aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-06 12:00:05 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-06 12:00:05 -0400
commit4e30e6509eea40f44d1d38316433c684257b4f8a (patch)
tree31d0cabdcd648f55f52e2930088b5ce21bd6e155
parenta0f6ce0b91877c6c26ca86ea282adbb791684736 (diff)
downloadnes-snake-4e30e6509eea40f44d1d38316433c684257b4f8a.tar.gz
nes-snake-4e30e6509eea40f44d1d38316433c684257b4f8a.zip
stop using named labels for short loops
-rw-r--r--main.s17
1 files changed, 8 insertions, 9 deletions
diff --git a/main.s b/main.s
index a3e7221..21ff47c 100644
--- a/main.s
+++ b/main.s
@@ -46,9 +46,9 @@ RESET:
STX $2001.w ; disable rendering (same)
STX $4010.w ; disable DMC IRQs
-vblankwait1: ; First wait for vblank to make sure PPU is ready
- BIT $2002 ; bit 7 of $2002 is reset once vblank ends
- BPL vblankwait1 ; and bit 7 is what is checked by BPL
+ ; First wait for vblank to make sure PPU is ready
+- BIT $2002 ; bit 7 of $2002 is reset once vblank ends
+ BPL - ; and bit 7 is what is checked by BPL
; set everything in ram ($0000-$07FF) to $00, except for $0200-$02FF which
; is conventionally used to hold sprite attribute data. we set that range
@@ -81,9 +81,9 @@ clrmem:
LDA #30
STA frame_skip
-vblankwait2: ; Second wait for vblank, PPU is ready after this
- BIT $2002
- BPL vblankwait2
+ ; Second wait for vblank, PPU is ready after this
+- BIT $2002
+ BPL -
; now that the ppu is ready, we can start initializing it
LoadPalettes:
@@ -108,9 +108,8 @@ LoadPalettesLoop:
loop:
INC sleeping
-sleep:
- LDA sleeping
- BNE sleep
+- LDA sleeping
+ BNE -
JSR read_controller1