mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-12-26 18:29:56 +00:00
more work, inc two libraries
This commit is contained in:
parent
8164d94cf8
commit
ab3aa53014
Binary file not shown.
Binary file not shown.
@ -2900,6 +2900,12 @@ TEGETOFFSET vATrap A??? ; {sources}Toolbox:TextEdit:TextEdit.a
|
||||
;__MICROSECONDS vATrap A??? ; {sources}OS:TimeMgr:TimeMgr.a
|
||||
;FREEZETIME vIndirect $2080, $0014, A7 ; {sources}OS:TimeMgr:TimeMgr.a
|
||||
;INITTIMEMGR vNoVector ; {sources}OS:TimeMgr:TimeMgr.a
|
||||
ELTM1 vIndirect $2080, $0004, A1
|
||||
ELTM2 vIndirect $2080, $0008, A1
|
||||
ELTM3 vIndirect $2080, $000c, A1
|
||||
ELTM4 vIndirect $2080, $0010, A1
|
||||
ELTM5 vIndirect $2080, $0014, A1
|
||||
ELTM6 vIndirect $2080, $0018, A1
|
||||
|
||||
;============================== End Time Manager Vectors
|
||||
|
||||
|
@ -151,7 +151,7 @@ Clock PROC EXPORT
|
||||
;_______________________________________________________________________
|
||||
|
||||
OneSecInt MOVE.B #1<<ifCA2,VIFR(A1) ; clear the interrupt <1.4>
|
||||
NOP
|
||||
ADDQ.L #1,Time
|
||||
BCLR #5,AlarmState ; flag GNEFilter to flash if enabled
|
||||
|
||||
TST.B SPVolCtl ; bit 7 is alarm enable
|
||||
|
32
OS/CrsrDev.a
32
OS/CrsrDev.a
@ -767,7 +767,12 @@ CrsrDevMove
|
||||
WITH tempParams
|
||||
|
||||
link a6,#tempSize ; create temp area
|
||||
|
||||
|
||||
move.l ExpandMem,a0
|
||||
move.l emCursorGlobals(a0),a0
|
||||
btst #2,CrsrDevFlags(a0)
|
||||
bz @exit
|
||||
|
||||
tst.l d0 ; and X movement?
|
||||
bne.s @cont ; yes, continue
|
||||
tst.l d1 ; and Y movement?
|
||||
@ -874,8 +879,15 @@ CrsrDevButtons
|
||||
lsl.w #2,d2 ;
|
||||
sub.l buttonTicks(a2,d2.w),d0 ;
|
||||
add.l d0,RndSeed ; randomize our seed
|
||||
|
||||
move.l ExpandMem,a0
|
||||
move.l emCursorGlobals(a0),a0
|
||||
btst #2,CrsrDevFlags(a0)
|
||||
bnz.s @noDebounce
|
||||
|
||||
subq.l #2,d0
|
||||
bmi.s @nextButton ; exit if went down too quickly (bounce)
|
||||
@noDebounce
|
||||
bset.b d3,buttons(a2) ; mark that we're really down...
|
||||
bra.s @dispatch ; and handle the down event
|
||||
|
||||
@ -989,8 +1001,6 @@ CrsrDevButtonDown
|
||||
cmpa.l a0,a1 ; is this the main cursor?
|
||||
bne.s @count ; no, just count other cursor's button
|
||||
|
||||
move.l doubleClickTime(a2),doubleTime ; set our double-click time
|
||||
|
||||
tst.b buttonCount(a1) ; is this the first button to go down?
|
||||
bne.s @count ; no, no need to post another eventÉ
|
||||
tst.b MBState ; yes, was mouse up before (should be)?
|
||||
@ -1473,6 +1483,16 @@ CrsrDevHandleVBL
|
||||
tst.l a3
|
||||
beq @exit
|
||||
|
||||
btst #2,CrsrDevFlags(a3)
|
||||
beq @skipClassicCall
|
||||
move.l Ticks,d0
|
||||
sub.l reserved+4(a3),d0
|
||||
beq @skipClassicCall
|
||||
move.l Ticks,reserved+4(a3)
|
||||
move.l #$00000726,d0
|
||||
dc.w $FE22
|
||||
@skipClassicCall
|
||||
|
||||
move.l firstCrsrDev(a3),d0 ; get ptr to 1st CrsrDevRec
|
||||
beq @exit ; if not even 1 device, just exit
|
||||
move.l d0,a2 ; ptr in a2
|
||||
@ -1544,7 +1564,11 @@ CrsrDevHandleVBL
|
||||
; and combine into our only cursor data record.
|
||||
;------------------------------------------------------
|
||||
|
||||
@accumLoop move.l whichCursor(a2),a4 ; get ptr to this devices CrsrDataRec in a4
|
||||
@accumLoop
|
||||
btst #2,CrsrDevFlags(a3)
|
||||
bne @flushCrsrs
|
||||
|
||||
move.l whichCursor(a2),a4 ; get ptr to this devices CrsrDataRec in a4
|
||||
|
||||
tst.b isAbs(a4) ; are we in absolute mode?
|
||||
beq.s @relative ; no, skip
|
||||
|
@ -1545,5 +1545,35 @@ FirstOS
|
||||
; end of vectors
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
WINDOWMGR_VEC01D8 PROC EXPORT
|
||||
WINDOWMGR_VEC01DC PROC EXPORT
|
||||
WINDOWMGR_VEC01E0 PROC EXPORT
|
||||
WINDOWMGR_VEC01E4 PROC EXPORT
|
||||
WINDOWMGR_VEC01E8 PROC EXPORT
|
||||
WINDOWMGR_VEC01EC PROC EXPORT
|
||||
WINDOWMGR_VEC01F0 PROC EXPORT
|
||||
WINDOWMGR_VEC01F4 PROC EXPORT
|
||||
WINDOWMGR_VEC01F8 PROC EXPORT
|
||||
WINDOWMGR_VEC01FC PROC EXPORT
|
||||
WINDOWMGR_VEC0200 PROC EXPORT
|
||||
WINDOWMGR_VEC0204 PROC EXPORT
|
||||
WINDOWMGR_VEC0208 PROC EXPORT
|
||||
WINDOWMGR_VEC020C PROC EXPORT
|
||||
WINDOWMGR_VEC0210 PROC EXPORT
|
||||
WINDOWMGR_VEC0214 PROC EXPORT
|
||||
ELTM1 PROC EXPORT
|
||||
DC.L 1
|
||||
ELTM2 PROC EXPORT
|
||||
DC.L 1
|
||||
ELTM3 PROC EXPORT
|
||||
DC.L 1
|
||||
ELTM4 PROC EXPORT
|
||||
DC.L 1
|
||||
ELTM5 PROC EXPORT
|
||||
DC.L 1
|
||||
ELTM6 PROC EXPORT
|
||||
DC.L 1
|
||||
|
||||
|
||||
END
|
||||
|
||||
|
@ -1347,7 +1347,7 @@ NewEgretFunc
|
||||
move.w pbByteCnt(a0),d2 ; get the length
|
||||
movea.l pbBufPtr(a0),a2 ; get the buffer pointer
|
||||
bsr.s @FillInVars ; setup A3, and ADB globals for ADB Parser
|
||||
bclr.b #fDBExpRunning,fDBAuFlag(a3) ; explicit command completed, allow new ones
|
||||
; bclr.b #fDBExpRunning,fDBAuFlag(a3) ; explicit command completed, allow new ones
|
||||
|
||||
;
|
||||
; For Egret must check the ADB Device address against the Device Bitmap <5>
|
||||
|
@ -127,6 +127,9 @@ GetRealProc PROC EXPORT
|
||||
MOVE.L D0,A0 ; Put the page number back into A0
|
||||
|
||||
_nkMMUGetPhysicalPage ; Get the physical page in D0
|
||||
|
||||
CMP.L #-1,D0
|
||||
BEQ.S @returnedNegativeOne
|
||||
|
||||
LSL.L D1,D0 ; Turn the Phys page number into an Address
|
||||
MOVE.L mdPageSize(A2),D1 ; Get the page size
|
||||
@ -137,10 +140,16 @@ GetRealProc PROC EXPORT
|
||||
MOVE.L D0,A0 ; Put the physical address into A0
|
||||
MOVEQ #0,D0 ; Signal no error
|
||||
|
||||
@return
|
||||
MOVEM.L (SP)+,A2/D1/D2 ; Restore regs
|
||||
* BRA.S @Done ; -> Exit
|
||||
RTS
|
||||
|
||||
@returnedNegativeOne
|
||||
MOVE.L D0,A0
|
||||
MOVEQ #-1,D0
|
||||
bra.s @return
|
||||
|
||||
|
||||
;----------------------------------------------------------------------------------
|
||||
; GetMMUInfo 7c7e - Fills the global area with MMU-specific table information.
|
||||
|
@ -710,6 +710,12 @@ SetupGlobals
|
||||
lea $FFFFFFA4,a0
|
||||
move.l a0,sgAllocOff(a6) ; save allocation offset <SM6> CSS
|
||||
|
||||
clr.w d0
|
||||
move.b #$AF,d0
|
||||
bsr ReadPRAMByte
|
||||
and.l #$FF,d0
|
||||
bz.s @noEdisk
|
||||
|
||||
clr.l d3 ; clear counter <T23>
|
||||
move.l sgTestSpace+24(a6),d1 ; Get the amount of bytes allocated by SizeMem for the EDisk <MC3>
|
||||
;
|
||||
|
@ -116,7 +116,7 @@ bootBlocksSize equ 1024 ; two 512-byte disk blocks
|
||||
|
||||
; ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
|
||||
BootBlocks main export
|
||||
BootBlocks proc export
|
||||
|
||||
; Here is the boot block header.
|
||||
|
||||
|
@ -179,6 +179,15 @@ DSErrorHandler
|
||||
MOVE.W #$2500,SR ; turn off interrupts 'cept power off <C448>
|
||||
MOVEQ #0,D6 ; clear upper word stuff <C309><C448><1.3>
|
||||
MOVE.W DSErrCode,D6 ; get saved error code <C822>
|
||||
|
||||
CMP.W #dsGreeting,D6
|
||||
BEQ @noClassicCall
|
||||
TST.W D6
|
||||
BLE.S @noClassicCall
|
||||
MOVE.L #$00001646,D0
|
||||
DC.W $FE22
|
||||
@noClassicCall
|
||||
|
||||
MOVE.L DSAlertTab,D7 ; get alert table pointer <C448>
|
||||
BNE.S @GoAlert ; installed, go nuts <C448>
|
||||
|
||||
@ -300,6 +309,10 @@ DSErrorHandler
|
||||
BEQ.S @NoRestart
|
||||
ADDQ.W #1,D0 ;yes, increment the buttonID number
|
||||
@NoRestart BSR DoButtons ;draw the button list and hit test it
|
||||
|
||||
MOVE.L #$00011661,D0
|
||||
DC.W $FE22
|
||||
|
||||
BEQ.S @NoSemantics ;if none, we're done <1.3>
|
||||
|
||||
; we got a semantic routine associated with a button so invoke it
|
||||
@ -466,7 +479,9 @@ DrawSysAlert
|
||||
; use rect at (A0)
|
||||
|
||||
; 4c74
|
||||
DrawBox2 MOVE.L A0, -(SP) ; rect for EraseRect
|
||||
DrawBox2 MOVE.L #$00011660, D0
|
||||
DC.W $FE22
|
||||
MOVE.L A0, -(SP) ; rect for EraseRect
|
||||
MOVE.L A0, -(SP) ; rect for FrameRect
|
||||
MOVE.L A0, -(SP) ; rect for InsetRect
|
||||
MOVE.L A0, -(SP) ; rect for FrameRect
|
||||
@ -814,6 +829,8 @@ GCmd BSR ReadToken ; try for address
|
||||
|
||||
GotResume ADD.W #20,SP ; get rid of event record, RTS
|
||||
CLR.B DSWndUpdate ; flag GNE to remove the alert . . .
|
||||
MOVE.L #$00011661,D0
|
||||
DC.W $FE22
|
||||
BRA RTS2SysErr ; return to SysError handler
|
||||
|
||||
; Erase the rect on the stack
|
||||
|
@ -177,6 +177,11 @@ SysErrInit PROC EXPORT ; <C152>
|
||||
|
||||
MOVEQ #13-1,D0 ; point unassigned (vector 12) thru spurious <1.4>
|
||||
@1 MOVE.L A1,(A0)+ ; interrupt vectors to the "undefined" handler
|
||||
CMP.W #$58,A0
|
||||
BNE.S @1SkipIter
|
||||
ADDQ #4,A0
|
||||
SUBQ #1,D0
|
||||
@1SkipIter
|
||||
DBRA D0,@1 ; (System Error #11)
|
||||
|
||||
LEA IRQException,A2 ; point to the IRQ exception handler
|
||||
@ -359,6 +364,39 @@ SysErr2
|
||||
|
||||
MOVE.W D0,DSErrCode ; Save the possibly modified ErrCode <SM7>
|
||||
|
||||
|
||||
MOVEM.L d0-d7/a0-a5,-(sp)
|
||||
|
||||
PEA SystemErrorStr
|
||||
MOVE.L $41000120,d0 ; special Classic memory location above ROM?
|
||||
BTST #0,d0
|
||||
BNZ.S @hiBitSet
|
||||
MOVE.L #$00011404,d0
|
||||
DC.W $FE22
|
||||
@hiBitSet
|
||||
ADDQ.L #4,sp
|
||||
|
||||
MOVE.W DSErrCode,d0
|
||||
EXT.L d0
|
||||
MOVE.L d0,-(sp)
|
||||
MOVE.L $41000120,d0
|
||||
BTST #0,d0
|
||||
BNZ.S @hiBitSet2
|
||||
MOVE.L #$00011406,d0
|
||||
DC.W $FE22
|
||||
@hiBitSet2
|
||||
ADDQ.L #4,sp
|
||||
|
||||
MOVE.L $41000120,d0
|
||||
BTST #0,d0
|
||||
BNZ.S @hiBitSet3
|
||||
MOVE.L #$00001408,d0
|
||||
DC.W $FE22
|
||||
@hiBitSet3
|
||||
|
||||
MOVEM.L (sp)+,d0-d7/a0-a5
|
||||
|
||||
|
||||
MOVE.L MacJmp,A1
|
||||
MOVE.B MacJmpFlag,D3
|
||||
ADD.B D3,D3
|
||||
@ -392,6 +430,10 @@ SysErrExit
|
||||
MOVE.W SESR,-(SP) ; restore status reg
|
||||
RTE ; and return to caller
|
||||
|
||||
SystemErrorStr
|
||||
STRING C
|
||||
DC.B 'SystemError'
|
||||
|
||||
ENDP ; <C152>
|
||||
|
||||
END
|
||||
|
@ -30,7 +30,6 @@ StartMgrObjs = "{ObjDir}StartTop.a.o"
|
||||
"{ObjDir}StartInterstix.c.o" ś
|
||||
"{ObjDir}Boot1.a.o" ś
|
||||
"{ObjDir}StartSearch.a.o" ś
|
||||
"{ObjDir}StartLibGlue.c.o" ¶
|
||||
"{ObjDir}StartBoot.a.o" ś
|
||||
"{ObjDir}StartFail.a.o" ś
|
||||
"{ObjDir}StartErr.a.o" ś
|
||||
|
@ -1058,22 +1058,6 @@ Ck4SupportsPartition
|
||||
;________________________________________________________________________________________
|
||||
|
||||
IsItDefault
|
||||
tst -4(A4)
|
||||
bne.s @skipsomestuff
|
||||
|
||||
pea.l -4(A4)
|
||||
import StartLib_GetStartupDevice
|
||||
jsr StartLib_GetStartupDevice
|
||||
lea.l $4(SP), SP
|
||||
tst D0
|
||||
bne.s @notTheDisk
|
||||
@skipsomestuff
|
||||
|
||||
move -4(A4), D0
|
||||
cmp 6(A2), D0
|
||||
beq.s @isTheDisk
|
||||
bra.s @notTheDisk
|
||||
|
||||
cmp.w dqRefNum(A2), D4 ; is this driver for the default device?
|
||||
bne.s @notTheDisk ; no-> definitely no the disk then
|
||||
|
||||
@ -1236,7 +1220,7 @@ VisualUpdate
|
||||
; Function: displays the Happy Mac icon, centered on the main video device
|
||||
;________________________________________________________________________________________
|
||||
|
||||
HappyMac BSR.S EraseMyIcon ; erase what's on the screen where the icon goes
|
||||
HappyMac
|
||||
LEA HappyIcon,A0 ; plot the happy mac icon
|
||||
MOVE #-20020,D0
|
||||
|
||||
@ -1444,44 +1428,23 @@ XDiskIcon DC.L $7FFFFFF0,$81000108,$81007104,$81008902,$81008901,$81008901,$8100
|
||||
|
||||
|
||||
|
||||
KeyMapTestFunc PROC EXPORT
|
||||
EXPORT ZeroD0
|
||||
ZeroD0
|
||||
cmp.w #$8805,KeypadMap+2
|
||||
beq.s @return1
|
||||
|
||||
cmp.w #$8005,KeypadMap+2
|
||||
bne.s @return0
|
||||
|
||||
DaFuq ; proc export ; but has no callers yet?
|
||||
; IMPORT NextDQEntry
|
||||
; IMPORT SelectDevice
|
||||
; IMPORT GetStartupInfo
|
||||
cmp.b #$04,KeypadMap+2
|
||||
bne.s @return0
|
||||
|
||||
@return1 move.b #1,d0
|
||||
rts
|
||||
|
||||
MOVEM.L D0-D2/A0-A2,-(SP)
|
||||
SUB.L A2,A2
|
||||
@loop
|
||||
MOVE #$A002,D0
|
||||
_GetOSTrapAddress
|
||||
MOVE.L ROMBase,A1
|
||||
CMP.L A0,A1
|
||||
BCS.S @return
|
||||
BSR NextDQEntry
|
||||
BEQ.S @return
|
||||
BSR SelectDevice
|
||||
BSR GetStartupInfo
|
||||
BRA.S @loop
|
||||
@return
|
||||
MOVEM.L (SP)+,D0-D2/A0-A2
|
||||
RTS
|
||||
|
||||
; ALIGN 16
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ZeroD0 PROC EXPORT
|
||||
MOVEQ.L #0, D0
|
||||
RTS
|
||||
|
||||
; ALIGN 16
|
||||
@return0 move.b #0,d0
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user