summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-02 15:05:15 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-02 15:05:15 -0400
commit22bc5f367a75c801e426dbfa145826da8ab71697 (patch)
tree50e5e94190dfc60f7b732c83868bdcf2800553d8
parent163cf639f9190b53ec980b1b0600cf8812b5072a (diff)
downloadnes-input-test-22bc5f367a75c801e426dbfa145826da8ab71697.tar.gz
nes-input-test-22bc5f367a75c801e426dbfa145826da8ab71697.zip
use a full sized (2x2) sprite
-rw-r--r--test.s45
1 files changed, 37 insertions, 8 deletions
diff --git a/test.s b/test.s
index c493a32..4a1af2c 100644
--- a/test.s
+++ b/test.s
@@ -125,22 +125,51 @@ turn_red:
NMI:
JSR read_controller1
- ; load the sprite into the ppu ports (from $0200)
+ LDA sprite_y.w
+ STA $0200 ; y position
+ LDA #$32
+ STA $0201 ; set the sprite number to display
LDA #$00
- STA $2003
- LDA #$02
- STA $4014
-
+ STA $0202 ; set the sprite attributes (palette, flipping, etc)
LDA sprite_x.w
STA $0203 ; x position
+
LDA sprite_y.w
- STA $0200 ; y position
+ STA $0204 ; y position
+ LDA #$33
+ STA $0205 ; set the sprite number to display
+ LDA #$00
+ STA $0206 ; set the sprite attributes (palette, flipping, etc)
+ LDA sprite_x.w
+ ADC #$07 ; XXX why is this #$07 instead of #$08?
+ STA $0207 ; x position
+ LDA sprite_y.w
+ ADC #$08
+ STA $0208 ; y position
+ LDA #$34
+ STA $0209 ; set the sprite number to display
LDA #$00
- STA $0201 ; set the sprite number to display
+ STA $020A ; set the sprite attributes (palette, flipping, etc)
+ LDA sprite_x.w
+ STA $020B ; x position
+ LDA sprite_y.w
+ ADC #$08
+ STA $020C ; y position
+ LDA #$35
+ STA $020D ; set the sprite number to display
LDA #$00
- STA $0202 ; set the sprite attributes (palette, flipping, etc)
+ STA $020E ; set the sprite attributes (palette, flipping, etc)
+ LDA sprite_x.w
+ ADC #$08
+ STA $020F ; x position
+
+ ; load the sprite into the ppu ports (from $0200)
+ LDA #$00
+ STA $2003
+ LDA #$02
+ STA $4014
handle_up:
LDA buttons_pressed.w