5X: fix accelerator menu bugs after initial HW test

This commit is contained in:
mgcaret 2017-03-19 11:05:13 -07:00
parent 99d18d92c8
commit 19527adc3b
5 changed files with 29 additions and 10 deletions

View File

@ -78,7 +78,7 @@ msg1 = *
.byte $07,$06,"4 RAM Card Diags" .byte $07,$06,"4 RAM Card Diags"
.byte $07,$86,"5 Boot 3.5/SmartPort" .byte $07,$86,"5 Boot 3.5/SmartPort"
.byte $04,$2e,"6 Boot 5.25" .byte $04,$2e,"6 Boot 5.25"
; .byte $04,$ae,"7 Accelerator" .byte $04,$ae,"7 Accelerator"
.byte $07,$5f,"By M.G." .byte $07,$5f,"By M.G."
msg2: .byte $07,$db,"ROM 5X 02/10/17" msg2: .byte $07,$db,"ROM 5X 02/10/17"
.byte $05,$ae,$00 ; cursor pos in menu .byte $05,$ae,$00 ; cursor pos in menu

View File

@ -31,7 +31,11 @@ ckkey1: cmp #$b2 ; "2"
bne ckkey2 bne ckkey2
doconf: jsr conf5x doconf: jsr conf5x
bne menu ; go back to menu4x bne menu ; go back to menu4x
ckkey2: sec ckkey2: cmp #$b7 ; "7"
bne ckkey3
jsr $fd02 ; accelerator menu
bra menu
ckkey3: sec
sbc #$b0 ; ascii->number sbc #$b0 ; ascii->number
bmi menu ; < 0 not valid bmi menu ; < 0 not valid
cmp #$07 ; we will use 7 for accelerator later cmp #$07 ; we will use 7 for accelerator later

View File

@ -15,7 +15,8 @@ chk3: cmp #$40 ; beep
bne dowait bne dowait
; "classic air raid beep" ; "classic air raid beep"
; inspired by http://quinndunki.com/blondihacks/?p=2471 ; inspired by http://quinndunki.com/blondihacks/?p=2471
jsr $fcb5 ; (new) WAIT for .1 sec delay ; jsr $fcb5 ; (new) WAIT for .1 sec delay
jsr owait
ldy #$c0 ldy #$c0
obell2: lda #$0c obell2: lda #$0c
jsr owait ; old wait for correct sound jsr owait ; old wait for correct sound

View File

@ -19,6 +19,7 @@ TESTBLD = 0 ; set to 1 to enable test code that runs in random
; MIG RAM. ; MIG RAM.
XTRACMD = 0 ; set to 1 to enable extra accelerator speed commands XTRACMD = 0 ; set to 1 to enable extra accelerator speed commands
ACCMENU = 1 ; set to 1 to enable accelerator menu ACCMENU = 1 ; set to 1 to enable accelerator menu
ADEBUG = 0 ; turn on debugging (copies registers to $300 whenever they are set)
.psc02 .psc02
.if TESTBLD .if TESTBLD
@ -91,7 +92,9 @@ SWRTS2 = $C784
.org $FD00 .org $FD00
.endif .endif
.proc ACCEL .proc ACCEL
php bra accel1
jmp AMENU
accel1: php
sei sei
phy phy
phx phx
@ -340,15 +343,19 @@ exinit: rts
; plp ; plp
rts rts
.endproc ; ASETR1 .endproc ; ASETR1
; set accelerator registers from saved values in MIG
.proc ASETR1 .proc ASETR1
ldy ACWH ldy ACWH
jsr ACOND jsr ACOND ; conditionally enable accelerator
tya tya
and #$08 and #$08 ; is it disabled?
beq setdn bne setdn ; if so, don't change other registers
ldx #$03 ldx #$03 ; otherwise set all registers from MIG
@loop: lda ZIP5CSV,x @loop: lda ZIP5CSV,x
sta ZIP5C,x sta ZIP5C,x
.if ::ADEBUG
sta $300,x ; DEBUG
.endif
dex dex
bpl @loop bpl @loop
setdn: rts setdn: rts
@ -397,10 +404,11 @@ IREGV: .byte %01100111 ; Initial $C05C - slots & speaker: b7-b1 = slot spee
; Speed: 4.00 Pdl Dly: On ; Speed: 4.00 Pdl Dly: On
; ;
.proc AMENU .proc AMENU
; do this in case someone else calls us ; do this in case someone else calls us outside of AINIT
bit MIGPAG0 bit MIGPAG0
bit MIGPAGI bit MIGPAGI
bit MIGPAGI bit MIGPAGI
; save ZP locs we are using
lda COUNTER lda COUNTER
pha pha
lda UBFPTRH lda UBFPTRH
@ -441,7 +449,9 @@ dspd: lda ZIP5DSV ; Speed in 5D register
; fall through will say 0.00 MHz ; fall through will say 0.00 MHz
dspd1: tya dspd1: tya
stx COUNTER ; which speed option is selected stx COUNTER ; which speed option is selected
.if ::TESTBLD
stx $0e1f ; DEBUG stx $0e1f ; DEBUG
.endif
and #$03 ; MHz value and #$03 ; MHz value
ora #$b0 ; to digit ora #$b0 ; to digit
sta $072b ; ones sta $072b ; ones
@ -512,12 +522,16 @@ ckP: cmp #$d0 ; 'P'
eor #$40 eor #$40
sta ACWH sta ACWH
tomenu: jmp amenu1 tomenu: jmp amenu1
; restore saved values and set accelerator
exit: pla exit: pla
sta UBFPTRL sta UBFPTRL
pla pla
sta UBFPTRH sta UBFPTRH
pla pla
sta COUNTER sta COUNTER
jsr AUNLK
jsr ASETR1
jsr ALOCK
jmp dclear jmp dclear
disp: jsr dclear disp: jsr dclear
inx inx

View File

@ -1,5 +1,5 @@
; options ; options
newbeep = 1 ; 1 = use IIc+ beep newbeep = 0 ; 1 = use IIc+ beep
; hardware ; hardware
;set80col = $c001 ;set80col = $c001