Skip to content

Commit

Permalink
NES: rm $FF writes; improve Zapper in menu
Browse files Browse the repository at this point in the history
Write to $00FF was used for a persistent debug breakpoint.
It does something in another environment.  Remove writes that
I'd forgotten to remove before.  Use $4444 instead henceforth.

Also the Zapper is more responsive in menus if the menu code
actually does nothing after finishing writing the page.
  • Loading branch information
pinobatch committed Jan 2, 2024
1 parent f9405af commit 833ba33
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 2 additions & 0 deletions nes/src/help.s
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,8 @@ pagenum_template_done:
jmp have_line_buffer

not_pagenum_line:
cmp #22 ; to improve Zapper responsiveness
bcs page_done ; do nothing if the page is finished

; 0: End of page
; 1: End of page if not multicart
Expand Down
4 changes: 2 additions & 2 deletions nes/src/helppages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ the A and Select Buttons.
Start: Show relevant help
B: Close activity

CRT users can navigate menus
with a Zapper in port 2.
CRT users can navigate
menus with a Zapper in port 2.
Shoot item: Choose
Shoot bottom: Change page
Shoot top/offscreen: Back
Expand Down
5 changes: 2 additions & 3 deletions nes/src/scrolltest.s
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ loop:
notDecSpeed:

dir_speed_change_done:

lda new_keys+0
and #KEY_B
bne done
Expand Down Expand Up @@ -269,7 +269,7 @@ nomove:
sta PPUDATA
inx
bne :-

ldx #4
jsr ppu_clear_oam
stx OAM+0
Expand Down Expand Up @@ -301,7 +301,6 @@ nomove:
bcc :+
ldy #splittable_pal-splittable_ntsc
:
sty $FF
splitloop:
ldx splittable_ntsc,y
iny
Expand Down
27 changes: 13 additions & 14 deletions nes/src/stills.s
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ restart:
loop:
lda need_reload
beq not_reloading
sty $FF
lda #0
sta need_reload
lda #120
Expand Down Expand Up @@ -462,7 +461,7 @@ loop:
ldx #40
jsr vwfPuts

; Prepare for blitting
; Prepare for blitting
lda #%0111
jsr rf_color_lineImgBuf
lda #$0F
Expand Down Expand Up @@ -501,7 +500,7 @@ loop:
lda #$80
sta vram_copydsthi
:

; And turn the display on
ldx #0
stx PPUSCROLL
Expand Down Expand Up @@ -700,7 +699,7 @@ pluge_shark_palettes:
.byte $0F,$10,$02,$1C
.byte $0F,$00,$0F,$0C
.byte $10,$20,$32,$3C

.segment "CODE"
.proc do_pluge
palettechoice = test_state+0
Expand Down Expand Up @@ -910,7 +909,7 @@ sprite_x = $03
cmp #160
bcc sprboxloop

; And hide the rest of sprites
; And hide the rest of sprites
jsr ppu_clear_oam

loop:
Expand Down Expand Up @@ -1052,7 +1051,7 @@ tvSystemFPS: .byte 60, 50, 50
sta vram_copydstlo
lda #$00
sta vram_copydsthi
rts
rts
.endproc

.proc do_full_stripes
Expand Down Expand Up @@ -1108,7 +1107,7 @@ restart:
tax
lda bleed_types,x
jsr rf_load_layout

; Set up the frame counter sprites
ldx #0
ldy #3
Expand All @@ -1132,8 +1131,8 @@ restart:
lda #3
sta OAM+$19
jsr ppu_clear_oam
; Set up the

; Set up the

loop:
ldx tile_shape
Expand Down Expand Up @@ -1276,7 +1275,7 @@ loop:
sta vram_copydsthi
lda #$00
sta vram_copydstlo

; Choose palette display
; 0-2: RGB, no box
; 3: white, optional box
Expand Down Expand Up @@ -1528,7 +1527,7 @@ loop:
bcc not_help
jmp restart
not_help:

lda new_keys+0
and #KEY_SELECT
beq not_invert_grays
Expand Down Expand Up @@ -1563,9 +1562,9 @@ loop:
:
sta gridlinestype
is_down:
not_updown:


not_updown:

jsr ppu_wait_vblank
lda #$3F
Expand Down

0 comments on commit 833ba33

Please sign in to comment.