diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-02 15:05:15 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-02 15:05:15 -0400 |
commit | 22bc5f367a75c801e426dbfa145826da8ab71697 (patch) | |
tree | 50e5e94190dfc60f7b732c83868bdcf2800553d8 | |
parent | 163cf639f9190b53ec980b1b0600cf8812b5072a (diff) | |
download | nes-input-test-22bc5f367a75c801e426dbfa145826da8ab71697.tar.gz nes-input-test-22bc5f367a75c801e426dbfa145826da8ab71697.zip |
use a full sized (2x2) sprite
-rw-r--r-- | test.s | 45 |
1 files changed, 37 insertions, 8 deletions
@@ -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 |