mirror of
https://github.com/mgcaret/davex-mg-utils.git
synced 2024-10-06 23:57:02 +00:00
minor updates
This commit is contained in:
parent
b37d301c36
commit
74e7fedc9a
36
deschw.s
36
deschw.s
@ -44,6 +44,8 @@
|
||||
; Reduce emulator detection to actual emulator for those supporting
|
||||
; EMUBYTE, or "probable" if no floating bus detected. If you want more
|
||||
; specific identification, see idemu program.
|
||||
; 10-Feb-19 MAG => v1.4
|
||||
; Detect VidHD
|
||||
|
||||
;.segment "CODE_9000"
|
||||
|
||||
@ -76,7 +78,7 @@ sptREAD = 8
|
||||
sptWRITE = 9
|
||||
;
|
||||
;*********************************************
|
||||
MyVersion = $13
|
||||
MyVersion = $14
|
||||
MinVersion = $11
|
||||
;*********************************************
|
||||
rts
|
||||
@ -105,12 +107,14 @@ totalmem = scratch+1 ;ds.b 4
|
||||
emubyte = totalmem+4
|
||||
emuver = emubyte+1
|
||||
scratch2 = emuver+1
|
||||
checkemu = scratch2+1
|
||||
checkemu = scratch2+1 ; zero = need to check for emulator
|
||||
iie_flag = checkemu+1 ; zero = running on Apple IIe
|
||||
; dend
|
||||
;
|
||||
start:
|
||||
lda #$80
|
||||
lda #$00
|
||||
sta checkemu
|
||||
sta iie_flag
|
||||
jsr xgetnump
|
||||
beq do_all
|
||||
lda #'t'+$80 ;system Type
|
||||
@ -271,9 +275,7 @@ Not2e1: cmp #$e0
|
||||
jsr xmess
|
||||
asc ")"
|
||||
.byte $00
|
||||
.pc02
|
||||
stz checkemu
|
||||
.p02
|
||||
dec checkemu
|
||||
rts
|
||||
|
||||
NotLC:
|
||||
@ -435,8 +437,8 @@ brokec02:
|
||||
rts
|
||||
;****************************************************
|
||||
emulation:
|
||||
lda checkemu ; skip if we positively identified hardware (LC PDS card)
|
||||
beq noemu1
|
||||
bit checkemu ; skip if we positively identified hardware (LC PDS card)
|
||||
bmi noemu1
|
||||
sta $c04f ; get emubyte
|
||||
lda $c04f ; Emulator ID
|
||||
ldy $c04f ; The GS emulators (except Gus) all do version # here
|
||||
@ -530,6 +532,7 @@ ss1: jsr scan1
|
||||
lda slot
|
||||
cmp #8
|
||||
bcc ss1
|
||||
|
||||
rts
|
||||
;
|
||||
scan1: jsr xmess
|
||||
@ -659,10 +662,6 @@ PrSlotDesc:
|
||||
lda bitpos,y
|
||||
and sltbyt
|
||||
beq SlotEmpty
|
||||
ldy #5
|
||||
lda (rom),y
|
||||
cmp #$38
|
||||
bne notPasc0
|
||||
ldy #7
|
||||
lda (rom),y
|
||||
cmp #$18
|
||||
@ -671,7 +670,18 @@ PrSlotDesc:
|
||||
lda (rom),y
|
||||
cmp #$1
|
||||
bne notPasc0
|
||||
iny
|
||||
ldy #5
|
||||
lda (rom),y
|
||||
cmp #$38
|
||||
beq :+
|
||||
cmp #$2C
|
||||
bne notPasc0
|
||||
; ViDHD
|
||||
jsr xmess
|
||||
asc "VidHD"
|
||||
.byte $00
|
||||
rts
|
||||
: ldy #$0c
|
||||
lda (rom),y
|
||||
pha
|
||||
jsr xmess
|
||||
|
54
idemu.s
54
idemu.s
@ -19,9 +19,7 @@ temp0 = xczpage
|
||||
DX_end_ptab
|
||||
DX_desc "Identify emulator."
|
||||
DX_main
|
||||
;rts
|
||||
jsr idemu
|
||||
; bcs noemu
|
||||
stx temp0
|
||||
jsr xprint_path
|
||||
lda temp0
|
||||
@ -44,17 +42,17 @@ temp0 = xczpage
|
||||
sta emuver
|
||||
sec
|
||||
jsr $fe1f
|
||||
bcc doemub ; skip the BS if it claims to be a GS
|
||||
bcc :+ ; skip to checking emubute if it's a IIgs
|
||||
; okay, let's check for some obvious things first
|
||||
lda $fbb3
|
||||
cmp #$06 ; Apple IIe or better
|
||||
bne :+
|
||||
lda $fbdd
|
||||
cmp #$02 ; PDS card or IIe for classic MacOS
|
||||
cmp #$02 ; LC PDS card or "IIe" for classic MacOS
|
||||
bne :+
|
||||
lda $fbde
|
||||
cmp #$40 ; IIe for classic MacOS
|
||||
bne iiecard
|
||||
bne iiecard ; If not, it's Apple IIe Card for Mac.
|
||||
ldy #<emIIe
|
||||
lda #>emIIe
|
||||
bne foundemu1
|
||||
@ -63,50 +61,34 @@ iiecard: lda $fbbe
|
||||
ldy #<emPDS
|
||||
lda #>emPDS
|
||||
bne foundemu1
|
||||
: jmp doemub ; fall back to emubyte
|
||||
;
|
||||
; Routine to handle emulator detected, but emubyte=$00
|
||||
zeroid: sec
|
||||
; Identify by emubyte value if possible
|
||||
: jsr getemub
|
||||
bne noemu ; floating bus, not emu or a really good one
|
||||
cmp #$00 ; yes this is needed
|
||||
bne ckcatak ; if not zero, go check for Catakig
|
||||
sta emuver ; zero out the version
|
||||
sec
|
||||
jsr $fe1f ; is GS?
|
||||
bcs :+
|
||||
bcs :+ ; nope, skip forward
|
||||
ldy #<emGus ; assume Gus if GS and ID 0
|
||||
lda #>emGus
|
||||
bne foundemu1
|
||||
; check for Virtual II
|
||||
: ldy #$00
|
||||
ldx #$10 ; loop to check for Virtual ][
|
||||
viilp: lda $c04f
|
||||
and #$b0
|
||||
cmp #$b0 ; VII has mostly this here
|
||||
bne :+
|
||||
iny
|
||||
: dex
|
||||
bne viilp
|
||||
cpy #$0d ; more than 14 $Bx?
|
||||
bcc :+ ; nope
|
||||
stx emuver ; zero version
|
||||
ldy #<emVII
|
||||
lda #>emVII
|
||||
bne foundemu1
|
||||
; check for Apple IIjs or jse
|
||||
; which always have zeros from $c001-$c00f
|
||||
: lda #$00
|
||||
ldx #$0f
|
||||
jslp: lda $c000,x
|
||||
bne :+
|
||||
bne :+ ; find nonzero, move on
|
||||
dex
|
||||
bne jslp
|
||||
stx emuver
|
||||
stx emuver ; zero emuver
|
||||
ldy #<emJS
|
||||
lda #>emJS
|
||||
bne foundemu1
|
||||
: jmp unkemu
|
||||
; Routine to identify by emubyte value if possible
|
||||
doemub: jsr getemub
|
||||
bne noemu
|
||||
cmp #$00 ; yes this is needed
|
||||
beq zeroid ; do zero identification
|
||||
cmp #$ad ; Catakig always has this in $c04f
|
||||
: ldy #<emVII ; Not one of those, just assume Virtual ][
|
||||
lda #>emVII
|
||||
bne foundemu1
|
||||
ckcatak: cmp #$ad ; Catakig always has this in $c04f
|
||||
bne :+
|
||||
lda #$00
|
||||
sta emuver ; catakig doesn't have a version byte
|
||||
@ -199,7 +181,7 @@ emNone: pstr_hi "None identified"
|
||||
emUnk: pstr_hi "Unknown, emubyte = $XX"
|
||||
unkemub = *-2
|
||||
emPDS: pstr_hi "Apple IIe Card"
|
||||
emVII: pstr_hi "Virtual ]["
|
||||
emVII: pstr_hi "Virtual ][ (probably)"
|
||||
emIIe: pstr_hi "IIe"
|
||||
emGus: pstr_hi "Gus (probably)"
|
||||
emCatak: pstr_hi "Catakig"
|
||||
|
Loading…
Reference in New Issue
Block a user