mirror of
https://github.com/a2-4am/4cade.git
synced 2025-04-09 15:38:40 +00:00
proper FASTChip support
This commit is contained in:
parent
e600044bc5
commit
7fe893d48a
@ -18,7 +18,7 @@
|
||||
; D672..DB6D - HGR font code & ProRWTS glue code
|
||||
; DB6E..DB7D - backup of stack (during gameplay and self-running demos)
|
||||
; ...unused...
|
||||
; DBB6..DBFF - (de)acceleration function
|
||||
; DBB2..DBFF - (de)acceleration function
|
||||
; DC00..DFFF - HGR font data
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
@ -112,7 +112,7 @@ gCheatsAvailable = $D000 ; master cheats table, indexed by game index in gGam
|
||||
MachineStatus = $FFF9
|
||||
|
||||
; LC RAM 2
|
||||
DisableAccelerator = $DBB6
|
||||
DisableAccelerator = $DBB2
|
||||
EnableAccelerator = DisableAccelerator+3
|
||||
|
||||
; AND masks for MachineStatus
|
||||
|
@ -118,7 +118,8 @@ fc_lock = $C06A
|
||||
FC_UNLOCK = $6A ; write 4 times
|
||||
FC_LOCK = $A6
|
||||
fc_enable = $C06B
|
||||
fc_speed = $C06D
|
||||
fc_config = $C06E
|
||||
fc_data = $C06F
|
||||
FC_1MHZ = 9
|
||||
FC_ON = 40 ; doco says 16.6Mhz
|
||||
|
||||
@ -193,7 +194,7 @@ maccheck
|
||||
iic
|
||||
ldx romid_c
|
||||
cpx #ROMID_CPLUS
|
||||
bne build_addon ; not a //c+, eventually hit Zip
|
||||
bne patch_zc ; not a //c+, eventually hit Zip
|
||||
|
||||
lda #<iicplus
|
||||
ldy #>iicplus
|
||||
@ -208,6 +209,13 @@ build_setspeed
|
||||
ldx #(end_setspeed-setspeed)
|
||||
rts
|
||||
|
||||
patch_zc
|
||||
lda #$d0 ; BNE
|
||||
sta zc_iic
|
||||
lda #(FASTChip-zc_iic)-2
|
||||
sta zc_iic+1
|
||||
; fall through
|
||||
|
||||
build_addon
|
||||
lda #<addon
|
||||
ldy #>addon
|
||||
@ -334,15 +342,26 @@ addon
|
||||
; TransWarp I
|
||||
sta tw1_speed
|
||||
|
||||
; Zip Chip
|
||||
; trademarked accelerator from Germany
|
||||
|
||||
tay
|
||||
sta uw_fast,y ; value does not matter
|
||||
|
||||
; Zip Chip
|
||||
|
||||
ldy #FC_1MHZ
|
||||
eor #1
|
||||
tax
|
||||
lda #ZC_UNLOCK
|
||||
beq +
|
||||
ldy #FC_ON
|
||||
+ lda #ZC_UNLOCK
|
||||
php
|
||||
sei ; timing sensitive
|
||||
sta zc_lock
|
||||
|
||||
zc_iic
|
||||
sta zc_lock ; SMC
|
||||
; no blind Zip Chip on the IIc
|
||||
; it has unwanted side-effects
|
||||
sta zc_lock
|
||||
sta zc_lock
|
||||
sta zc_lock
|
||||
@ -351,29 +370,19 @@ addon
|
||||
lda #ZC_LOCK
|
||||
sta zc_lock
|
||||
|
||||
;; current products are subject to change so do
|
||||
;; these last
|
||||
|
||||
; trademarked accelerator from Germany
|
||||
|
||||
sta uw_fast,y ; value does not matter
|
||||
|
||||
; FASTChip
|
||||
|
||||
ldx #FC_1MHZ
|
||||
tya
|
||||
bne fcset
|
||||
ldx #FC_ON ; enable set speed?
|
||||
fcset
|
||||
FASTChip
|
||||
lda #FC_UNLOCK
|
||||
sta fc_lock
|
||||
sta fc_lock
|
||||
sta fc_lock
|
||||
sta fc_lock
|
||||
sta fc_enable
|
||||
stx fc_speed
|
||||
lda #0
|
||||
sta fc_config
|
||||
sty fc_data
|
||||
lda #FC_LOCK
|
||||
sta fc_lock
|
||||
|
||||
plp ; restore interrupt state
|
||||
rts
|
||||
end_addon
|
||||
end_addon
|
Loading…
x
Reference in New Issue
Block a user