From 506749e7f4e0036864bde3ca3fb7201b13782a18 Mon Sep 17 00:00:00 2001 From: Damian Yerrick Date: Tue, 17 Oct 2023 10:41:53 -0400 Subject: [PATCH] monoscope: switch to khmr33's 50 Hz pattern it saves about 7 tiles --- nes/src/padstest.s | 110 +++++++++++++++++++---------------- nes/src/stills.s | 2 +- nes/tilesets/monoscope50.png | Bin 960 -> 807 bytes 3 files changed, 61 insertions(+), 51 deletions(-) diff --git a/nes/src/padstest.s b/nes/src/padstest.s index 3633990..3dd8537 100644 --- a/nes/src/padstest.s +++ b/nes/src/padstest.s @@ -37,55 +37,7 @@ cur_semitone = test_state + 14 .code -; Menu ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -.proc do_input_unfinished - ldx #helpsect_under_construction - lda #KEY_A|KEY_B|KEY_START - jsr helpscreen - ; fall through to input unfinished -.endproc - -.proc do_input_test - jsr read_pads ; read them once because B to exit may double trigger - ldy #$FF - jsr pads_play_semitone_y - ldx #helpsect_input_test_menu - lda #KEY_A|KEY_B|KEY_START|KEY_UP|KEY_DOWN|KEY_LEFT|KEY_RIGHT - jsr helpscreen - - lda new_keys+0 - and #KEY_A - beq not_input_test - tya - asl a - tay - lda input_tests+1,y - pha - lda input_tests+0,y - pha - rts - not_input_test: - - lda #helpsect_input_test - jsr helpcheck - bcs do_input_test - lda new_keys+0 - and #KEY_B - beq do_input_test - rts -.endproc - -input_tests: - .addr do_serial_analyzer-1 - .addr do_fcpads_test-1 - .addr do_fourscore_test-1 - .addr do_zapper_test-1 - .addr do_power_pad_test-1 - .addr do_vaus_test-1 - .addr do_snes_pad_test-1 - .addr do_mouse_test-1 - +.align 32 ; Serial analyzer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NUM_READS = 32 @@ -233,6 +185,7 @@ shift1byte: jmp do_input_test .endproc +.rodata SERIAL_LEFT = 10 SERIAL_TOP = 10 SERIAL_ROWS_BETWEEN_PORTS = 1 @@ -251,7 +204,7 @@ serial_dst_lo: .endrepeat ; Famicom and NES controllers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - +.code .proc load_std_controller_images lda #13 .endproc @@ -482,6 +435,7 @@ next_group: jmp ppu_screen_on .endproc +.rodata controller_test_palette: .byte $0F,$20,$28,$16 ; Text and FC .byte $0F,$00,$10,$16 ; NES @@ -767,6 +721,7 @@ put_sign: rts .endproc +.rodata mouse_oam_data: .byte $FF, $02, $00, $FF ; OAM+0: top half of arrow .byte $FF, $03, $00, $FF ; OAM+4: bottom half of arrow @@ -778,6 +733,7 @@ mouse_xy_max: ; Arkanoid controller test ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +.code VAUS_Y = 96 VAUS_BUTTON_Y = 128 VAUS_GRID_TL = $2000 + (VAUS_Y / 8) * 32 @@ -1028,6 +984,7 @@ xposition = $0F jmp vwfPutTile .endproc +.rodata vaus_grid_strip_data: .byte 3,1,2,1,2,1,2,1,3,1,2,1,2,1,2,5 vaus_oam_data: @@ -1036,3 +993,56 @@ vaus_oam_data: .byte VAUS_Y + 4 - 1, $06, $00, $FF ; OAM+8: left side of range .byte VAUS_Y + 4 - 1, $06, $40, $FF ; OAM+12: right side of range vaus_oam_data_end: + +; Menu ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +.code +.if 0 +.proc do_input_unfinished + ldx #helpsect_under_construction + lda #KEY_A|KEY_B|KEY_START + jsr helpscreen + ; fall through to input unfinished +.endproc +.endif + +.proc do_input_test + jsr read_pads ; read them once because B to exit may double trigger + ldy #$FF + jsr pads_play_semitone_y + ldx #helpsect_input_test_menu + lda #KEY_A|KEY_B|KEY_START|KEY_UP|KEY_DOWN|KEY_LEFT|KEY_RIGHT + jsr helpscreen + + lda new_keys+0 + and #KEY_A + beq not_input_test + tya + asl a + tay + lda input_tests+1,y + pha + lda input_tests+0,y + pha + rts + not_input_test: + + lda #helpsect_input_test + jsr helpcheck + bcs do_input_test + lda new_keys+0 + and #KEY_B + beq do_input_test + rts +.endproc + +.rodata +input_tests: + .addr do_serial_analyzer-1 + .addr do_fcpads_test-1 + .addr do_fourscore_test-1 + .addr do_zapper_test-1 + .addr do_power_pad_test-1 + .addr do_vaus_test-1 + .addr do_snes_pad_test-1 + .addr do_mouse_test-1 diff --git a/nes/src/stills.s b/nes/src/stills.s index 5273a70..d791486 100644 --- a/nes/src/stills.s +++ b/nes/src/stills.s @@ -641,7 +641,7 @@ loop: lda #VBLANK_NMI|BG_0000 clc jsr ppu_screen_on_xy0 - + ; Update sound lda smpte_level and #$01 diff --git a/nes/tilesets/monoscope50.png b/nes/tilesets/monoscope50.png index 1509f4a83c35fd2f54c10debf8d66a46eacaa4ed..1b7b0ac53c3599df7b479e623adec0e0b69bbc87 100644 GIT binary patch delta 760 zcmV`3IPfso%|8|H?m_p|6*0f+~aO0`OM6mIlD3@%gZFmV71w+ppDhj^eSlcKX{;4 z;jv|WyHn1_NoP$c_m$O6i*Bx8u$s9^2k0S)Nz}`zZzO#yt4ZW`{yxRB zbKf8Xt|7RbjfLH2!F{w3N;{`%ArD4^G`ZDRV|iIT@Tc4g0BQwtv-MyGY(1#q0m{1q z>LvrIo7jVG2!D|WW*HC6Rsedov#L9{zFzeTsQ7xZi?3*N9iWFGB~dTq<2F)TG9j#6 z*(^w+Ymh`b55_&fY3a~?Hnk#v*AG*@El1z z0N&1H4uF0iWWZ5{D}aCE1OWPpvjISy90NA@@p%9}`+s_mUa;ap9iWGx0}cS%ISD{J z>i{`~18|%NPhN$OZzNw6fDi1!XBiNm2T1_hSq3~o4h}%j&Y!r2e+2C;1CA;@$9do~ z{yTu)9|(ZxePRsQ&KEL(($ak4CZO*F0KJ$_0%*PiN25^v=&i2>k_`NHpc>0Kt5 zU%`Aq1*jn)iKWc|Xx`|6L>Xz`2tejYtDDt>#8#$xV-CRcMh7I?8RJ435QP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