?login_element?
?pathlinks? – Rev 1424
Blame |
Last modification |
View Log
| Download
vers
;Return Spectrum type by 48k ROM. Requires ROM 3 to be paged in.
;Returns H=0 for 16/48/+ L=0 for Sinclair, 2 for TK95,
;3 for GROOT
;4 for IMC
; 1 for 128/+2 L=0 for Sinclair, 1 for Amstrad
; 2 for +3 L=1 for Amstrad, 4 for 48KDB
; #FF for unknown
PUSH AF
LD HL,#FFFF
LD A,(#0B52) ;Trap in 128k versions
CP #C3
JR Z,NON48
CP #D6
JR Z,IS48
VRSRET
POP AF
RET ;Unknown - #FFFF
IS48
LD A,(#04AA)
INC L ;0
CP #CD
JR Z,VRSRET
INC L
INC L
CP #11 ;TK95
JR Z,VRSRET
INC L
CP #3E ;GROOT
JR Z,VRSRET
INC L
CP #CA ;IMC
JR Z,VRSRET
LD L,#FF
POP AF
RET
;
NON48
LD A,(#0B53)
CP #9F ;128/+2
JR Z,TYP128
CP #7E
JR NZ,VRSRET ;+2a/+3
LD H,2
LD A,(#004C)
LD L,1 ;Amstrad
CP #38
JR Z,VRSRET
CP #3B
LD L,4
JR Z,VRSRET
LD L,#FF
POP AF
RET
;
TYP128
LD H,1
LD A,(#1540) ;(c) message
CP "A"
LD L,1
JR Z,VRSRET ;Amstrad
DEC L
CP "S" ;Sinclair
JR Z,VRSRET
DEC L
POP AF
RET