mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-28 13:52:37 +00:00
133 lines
3.7 KiB
Plaintext
133 lines
3.7 KiB
Plaintext
|
;
|
|||
|
; File: CommToolboxFix.a
|
|||
|
;
|
|||
|
; Copyright: © 1991-1993 by Apple Computer, Inc., all rights reserved.
|
|||
|
;
|
|||
|
; Change History (most recent first):
|
|||
|
;
|
|||
|
; <3> 8/12/93 kc <mb>: I deleted all of the "TheFuture" conditionals in all of
|
|||
|
; the CommToolbox files per Mike Bell's instructions. I also had
|
|||
|
; to delete some old code that was compiled under the "CubeE"
|
|||
|
; conditional.
|
|||
|
; <4> 6/8/92 JSM For TheFuture, check emProcessMgrExists instead of Gestalt to
|
|||
|
; test for the existence of the Process Mgr. Doesn’t really
|
|||
|
; matter, since this file isn’t used in any builds??
|
|||
|
; <3> 7/10/91 BH better patch (all three rolled into a single patch)
|
|||
|
; <2> 7/10/91 BH add fix to CRMGetHeader
|
|||
|
; <1> 7/9/91 BH first checked in
|
|||
|
;
|
|||
|
|
|||
|
|
|||
|
|
|||
|
print push,off
|
|||
|
load 'StandardEqu.d'
|
|||
|
include 'MFPrivate.a'
|
|||
|
include 'LinkedPatchMacros.a'
|
|||
|
include 'GestaltEqu.a'
|
|||
|
include 'GestaltPrivateEqu.a'
|
|||
|
include 'CommToolboxPriv.a'
|
|||
|
include 'CommResources.a'
|
|||
|
include 'CTBUtilities.a'
|
|||
|
print pop
|
|||
|
|
|||
|
;====================================================================================================
|
|||
|
;====================================================================================================
|
|||
|
;====================================================================================================
|
|||
|
|
|||
|
ROMs Plus,SE,II,Portable,IIci
|
|||
|
|
|||
|
;====================================================================================================
|
|||
|
; this fixes problems with
|
|||
|
; CRMOpenRFPerm/CRMReleaseRF persistent connection problems
|
|||
|
; CRMGetHeader not working in 7.0
|
|||
|
;
|
|||
|
;FixCommResourceMgr installproc
|
|||
|
;
|
|||
|
;@checkGestalt
|
|||
|
; MOVE.L #gestaltCRMAttr,D0
|
|||
|
; _Gestalt
|
|||
|
; bne.s @done ; no gestalt so do nothing
|
|||
|
; move.l A0,D0 ; get return value
|
|||
|
; btst.l #gestaltCRMPersistentFix,D0 ; is it fixed?
|
|||
|
; bne.s @done
|
|||
|
;@patchIt
|
|||
|
;
|
|||
|
;@patchCRMOpenRFPerm
|
|||
|
;
|
|||
|
;@patchCRMReleaseRF
|
|||
|
;
|
|||
|
;@updateGestalt
|
|||
|
;
|
|||
|
;
|
|||
|
;@done
|
|||
|
; rts
|
|||
|
; endproc
|
|||
|
|
|||
|
;----------------------------------------------------------------------------------
|
|||
|
PatchCRM PatchProc _CommToolboxDispatch,(Plus,SE,II,Portable,IIci)
|
|||
|
|
|||
|
MOVEM.L A0/D0-D7,-(sp)
|
|||
|
|
|||
|
MOVE.W (A0),D0
|
|||
|
move.w d0,d7 ; save please
|
|||
|
|
|||
|
CMP.W #$0512,D0 ; CRMOpenRFPerm
|
|||
|
BEQ.S @checkprocessmgr
|
|||
|
|
|||
|
CMP.W #$0514,D0 ; CRMReleaseRF
|
|||
|
BEQ.S @checkprocessmgr
|
|||
|
|
|||
|
CMP.W #$0502,D0 ; CRMGetHeader
|
|||
|
BEQ.S @checkprocessmgr
|
|||
|
BNE.S @notMine
|
|||
|
|
|||
|
@checkprocessmgr
|
|||
|
move.l ExpandMem,a0 ; get ExpandMem <4>
|
|||
|
tst.w ExpandMemRec.emProcessMgrExists(a0) ; is Process Mgr up yet? <4>
|
|||
|
beq.s @notMine ; no <4>
|
|||
|
@checkgestalt
|
|||
|
MOVE.L #gestaltCRMAttr,D0
|
|||
|
_Gestalt
|
|||
|
bne.s @notMine
|
|||
|
move.l A0,D0 ; get return value
|
|||
|
btst.l #gestaltCRMPersistentFix,D0 ; is it fixed?
|
|||
|
bne.s @notMine
|
|||
|
|
|||
|
CMP.W #$0502,D7 ; CRMGetHeader
|
|||
|
BEQ.S @patchCRMGetHeader
|
|||
|
|
|||
|
;--------------------------------------------------------------------------------------
|
|||
|
@patchCRMOpenRFPerm
|
|||
|
@patchCRMReleaseRF
|
|||
|
|
|||
|
@beginsystemmode
|
|||
|
subq.l #2,sp
|
|||
|
_BeginSystemMode
|
|||
|
addq.l #2,sp
|
|||
|
|
|||
|
@callthetrap
|
|||
|
movem.l (sp)+,A0/D0-D7
|
|||
|
jsrOld
|
|||
|
MOVEM.L A0/D0-D7,-(sp)
|
|||
|
|
|||
|
@endsystemmode
|
|||
|
subq.l #2,sp
|
|||
|
_EndSystemMode
|
|||
|
addq.l #2,sp
|
|||
|
|
|||
|
movem.l (sp)+,A0/D0-D7
|
|||
|
rts
|
|||
|
@notMine
|
|||
|
movem.l (sp)+,A0/D0-D7
|
|||
|
jmpOld
|
|||
|
|
|||
|
;--------------------------------------------------------------------------------------
|
|||
|
@patchCRMGetHeader
|
|||
|
movem.l (sp)+,A0/D0-D7
|
|||
|
|
|||
|
move.l CommToolboxGlobals,a0
|
|||
|
with CTBBlock
|
|||
|
move.l CRMQueue(a0),d0
|
|||
|
endwith
|
|||
|
rts
|
|||
|
End
|