aboutsummaryrefslogtreecommitdiff
path: root/basics/flicker.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-10 22:52:15 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-10 22:52:15 +0100
commit1a74e6a1856673072a61abd0861759901bc2d939 (patch)
treebb1b54a7c27280d7d9e83c031233dd8402f1e721 /basics/flicker.s
parentff22231f8a2f3714df701fd7c12b07915adc15e9 (diff)
downloadcode.nes-1a74e6a1856673072a61abd0861759901bc2d939.tar.gz
code.nes-1a74e6a1856673072a61abd0861759901bc2d939.zip
Bring code style to better standards
Be more careful on everything and try to follow along style.nes from my repository. This might change in the future, but it's in a much better state now. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'basics/flicker.s')
-rw-r--r--basics/flicker.s14
1 files changed, 8 insertions, 6 deletions
diff --git a/basics/flicker.s b/basics/flicker.s
index 8db03e8..2522cb2 100644
--- a/basics/flicker.s
+++ b/basics/flicker.s
@@ -61,7 +61,6 @@
jmp @main_game_loop
.endproc
-
;;;
;; NOTE: this is the actual meat of the example :D
.proc apply_flicker
@@ -135,7 +134,7 @@
;;;
;; NOTE: and from here on stuff that is not relevant for sprite flickering.
-nmi:
+.proc nmi
bit $20
bpl @next
@@ -168,15 +167,16 @@ nmi:
pla
@next:
rti
+.endproc
-reset:
+.proc reset
sei
cld
ldx #$40
stx $4017 ; APU Frame Counter
- ldx #$ff
+ ldx #$FF
txs
inx
@@ -201,7 +201,7 @@ reset:
inx
bne @ram_reset_loop ; if x overflows back to #00, then we are done.
- lda #$ef
+ lda #$EF
@sprite_reset_loop:
sta $200, x
inx
@@ -229,9 +229,11 @@ reset:
bne @palettes_reset_loop
jmp main
+.endproc
-irq:
+.proc irq
rti
+.endproc
.proc init_sprites
NUM_SPRITES = 20