mirror of
https://github.com/pruten/shoebill.git
synced 2024-06-10 03:29:29 +00:00
6773dd6020
- Fewer FPU-related crashes - Fewer video driver-related crashes - Cleaned up the SDL GUI - Bumped up cocoa GUI to v0.0.4
1 line
2.2 KiB
Plaintext
Executable File
1 line
2.2 KiB
Plaintext
Executable File
BLANKS ON
|
|
STRING ASIS
|
|
MACHINE MC68020
|
|
|
|
WITH seBlock,spBlock
|
|
|
|
DC.B 2 ; Code revision
|
|
DC.B 2 ; 68020
|
|
DC.W 0 ; reserved
|
|
DC.L SecondaryInitStart-*
|
|
|
|
SecondaryInitStart
|
|
|
|
; Return "success"
|
|
move.w #1, seStatus(a0) ; seStatus > 0 -> success
|
|
|
|
; Figure out the slot base address (non-superslot)
|
|
move.b seSlot(a0), d0 ; -> d0.b = slotnum
|
|
move.b d0, d1
|
|
or.b #$F0, d1
|
|
ror.l #8, d1
|
|
move.l d1, a1 ; -> a1 = slot base addr
|
|
|
|
; Set up a slot parameter block
|
|
suba #spBlockSize, sp
|
|
move.l sp, a0
|
|
move.b d0, spSlot(a0)
|
|
clr.b spExtDev(a0)
|
|
clr.l spsPointer(a0)
|
|
|
|
; Verify that 32bit QD is loaded
|
|
move.l #$a89f, d0
|
|
_GetTrapAddress ,NewTool
|
|
move.l a0, d1
|
|
move.l #$ab03, d0
|
|
_GetTrapAddress ,NewTool
|
|
cmpa.l d1, a0
|
|
beq.s sec_done
|
|
|
|
; Find the current video sResource
|
|
move.l sp, a0
|
|
clr.b spID(a0) ; start at id=0
|
|
clr.b spTBMask(a0) ; match exactly
|
|
move.w #CatDisplay, spCategory(a0)
|
|
move.w #TypVideo, spCType(a0)
|
|
move.w #DrSwApple, spDrvrSW(a0)
|
|
move.w #DrHwShoe, spDrvrHW(a0)
|
|
|
|
_sNextTypesRsrc
|
|
move.w spRefNum(a0), d5
|
|
|
|
; If, somehow, the 32 bit video sResource is the only active one, then just return
|
|
cmp.b #CategoryVideo_qd32, spID(a0)
|
|
beq.w sec_done
|
|
|
|
; Otherwise, it's the non-32bit sResource - so nuke it
|
|
_sDeleteSRTRec
|
|
|
|
; Load our PRAM bytes, which contain the default depth
|
|
; suba.l #sizesPRAMRec, sp
|
|
; _sReadPRAMRec
|
|
; move.b VendorUse2(sp), spID(a0)
|
|
; adda.l #sizesPRAMRec, sp
|
|
|
|
; And activate the 32bit sResource
|
|
move.b CategoryVideo_qd32, spID(a0)
|
|
clr.w spRefNum(a0) ; ?
|
|
clr.l spParamData(a0) ; clear for activation
|
|
clr.l spsPointer(a0) ; add back a sRsrc in directory
|
|
_InsertSRTRec
|
|
|
|
; If this is the boot screen, then update its gDevice
|
|
subq #4, sp ; make room for function return
|
|
_GetDeviceList ; get the boot gDevice
|
|
move.l (sp)+, a0 ; get the gdHandle
|
|
move.l (a0), a0 ; get pointer to gDevice
|
|
cmp.w gdRefNum(a0), d5 ; was this the boot device?
|
|
bne.s sec_done ; No? then return
|
|
|
|
move.l gdPMap(a0), a0 ; get pixMap handle
|
|
move.l (a0), a0 ; getpixMap ptr
|
|
move.l a1, pmBaseAddr(a0) ; save new base address
|
|
|
|
; FIXME: Wait, that wasn't necessary. All video modes have the same pmBaseAddr, I think
|
|
sec_done
|
|
adda #spBlockSize, sp
|
|
rts
|
|
|
|
|
|
|
|
SecondaryInitEnd |