use documented IIGS detection, fixes FastChip issues

This commit is contained in:
Peter Ferrie 2019-09-22 11:04:48 -07:00
parent 2e8687da73
commit 74580aaf4c
2 changed files with 6 additions and 31 deletions

View File

@ -40,11 +40,13 @@
@no64Klen=(*-@s_no64K)-1
+ jsr DisableAccelerator ; set to 1 MHz (supports IIgs and many common accelerator cards)
jsr IsGS ; check for IIgs (allows super hi-res artwork)
php
bcc +
sec
jsr $FE1F ; check for IIgs (allows super hi-res artwork)
bcs NotGS
jsr ROM_TEXT2COPY ; set alternate display mode on IIgs (required for some games)
+ plp
+ sec
+HIDE_NEXT_BYTE
NotGS clc
ror zpMachineStatus
sta SETC3ROM
jsr HasVidHDCard ; check for VidHD card (allows super hi-res artwork even on non-IIgs machines)
@ -145,7 +147,6 @@
ProRWTSBuffer
; these routines will only be called once, from main memory, before relocating to language card
!source "src/hw.diskcheck.a"
!source "src/hw.iigs.a"
!source "src/hw.vidhd.a"
!source "src/hw.memcheck.a"
!source "src/hw.joystick.a"

View File

@ -1,26 +0,0 @@
;license:MIT
;(c) 2018-9 by 4am
;
; IIgs support functions
;
;------------------------------------------------------------------------------
; IsGS
; detect IIgs by running CPU-specific magic
;
; in: none
; out: C set if running on a IIgs
; C clear otherwise
; A clobbered
; X/Y preserved
;------------------------------------------------------------------------------
IsGS
lda #0 ; set Z flag
!cpu 65816
rep #2 ; clear Z flag on 65816 only
!cpu 6502
beq @no
@yes sec
+HIDE_NEXT_BYTE
@no clc
rts