aboutsummaryrefslogtreecommitdiff
path: root/space/src/vectors/nmi.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2023-10-24 17:40:19 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-02-04 20:58:36 +0100
commit149020464517ff3d021eef5ccd50d3939ad463e6 (patch)
tree056ec1919fe0c0d515e7a0a414916307b768ef84 /space/src/vectors/nmi.s
parentbe2414f5b11b182998fca7e87712ff0502c8ee93 (diff)
downloadcode.nes-149020464517ff3d021eef5ccd50d3939ad463e6.tar.gz
code.nes-149020464517ff3d021eef5ccd50d3939ad463e6.zip
Lay out a proper structure for the project
Let's divide things by topic instead of a broad "examples" directory. This will allow for simple files to co-exist together with full-blown projects. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'space/src/vectors/nmi.s')
-rw-r--r--space/src/vectors/nmi.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/space/src/vectors/nmi.s b/space/src/vectors/nmi.s
new file mode 100644
index 0000000..4bc3dde
--- /dev/null
+++ b/space/src/vectors/nmi.s
@@ -0,0 +1,14 @@
+;; Non-Maskable Interrupts handler.
+nmi:
+ ;; As mentioned on the `main` subroutine, rendering will be skipped until
+ ;; the proper flag is set.
+ bit $20
+ bpl @next
+
+ ;; We can start rendering stuff.
+ OAM_WRITE_SPRITES
+
+ ;; And unset the render flag so the `main` code is unblocked.
+ UNSET_RENDER_FLAG
+@next:
+ rti