Build updated MainCode image (matches Mac OS ROM 9.6.1+)
This commit is contained in:
parent
283a0c5ba8
commit
1c43f478a3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -22,8 +22,8 @@ BackLightDir = {DriverDir}BackLight:
|
|||
|
||||
#include {SonyDir}Sony.make
|
||||
|
||||
#include {SerialDir}Serial.make
|
||||
#include {SerialDMADir}SerialDMA.make
|
||||
##include {SerialDir}Serial.make
|
||||
##include {SerialDMADir}SerialDMA.make
|
||||
|
||||
#include {NewAgeDir}NewAge.make
|
||||
|
||||
|
|
|
@ -674,7 +674,7 @@ btQType EQU 21 ; B*Tree Manager
|
|||
; Device Control Entry Definition
|
||||
;dCtlEntrySize used to be only 40 bytes!
|
||||
|
||||
dCtlEntrySize EQU $34 ; length of a DCE [52 bytes]
|
||||
dCtlEntrySize EQU $38 ; length of a DCE [52 bytes]
|
||||
dCtlDriver EQU 0 ; driver [handle]
|
||||
dCtlFlags EQU 4 ; flags [word]
|
||||
dCtlQueue EQU 6 ; queue header
|
||||
|
|
|
@ -53,7 +53,7 @@ resetCmd EQU $00 ; Command for Bus Reset
|
|||
kbdAddr EQU $02 ; keyboard type device
|
||||
mouseAddr EQU $03 ; mouse type device
|
||||
numFDBAdr EQU 16 ; number of avaiblae FDB address
|
||||
moveTime EQU 50 ; number of times to move device
|
||||
moveTime EQU 10 ; number of times to move device
|
||||
|
||||
IF IopADB THEN
|
||||
|
||||
|
|
|
@ -90,6 +90,8 @@ denom ds.w 1 ; Private: fraction of the errors to use next time
|
|||
spread ds.w 1 ; Private: Number of samples to spread errors over
|
||||
newData ds.b 1 ; Private: set when deltas are new
|
||||
ds.b 1 ; align
|
||||
|
||||
ds.b 4 ; new
|
||||
|
||||
CrsrDevSize EQU *
|
||||
ENDR
|
||||
|
|
|
@ -231,41 +231,110 @@ DockingGlobals EQU $1FF8 ; pointer to docking globals <H12>
|
|||
|
||||
|
||||
;_______________________________________________________________________
|
||||
; Processor Info Record
|
||||
;
|
||||
; Used to pass Processor information from the NanoKernel to user mode
|
||||
; software.
|
||||
; Configuration Info Record
|
||||
; Used to pass Configuration information from the Boot Program to the
|
||||
; NanoKernel for data structure and address mapping initialization.
|
||||
;_______________________________________________________________________
|
||||
|
||||
ProcessorInfoPtr equ $5FFFEFD8 ; logical address of ProcessorInfo record
|
||||
ProcessorInfoVer equ $5FFFEFDC ; version number of ProcessorInfo record
|
||||
ProcessorInfoLen equ $5FFFEFDE ; length of ProcessorInfo record
|
||||
NKConfigurationInfo record 0,increment
|
||||
ROMByteCheckSums ds.l 8 ; 000 ; ROM Checksums - one word for each of 8 byte lanes
|
||||
ROMCheckSum64 ds.l 2 ; 020 ; ROM Checksum - 64 bit sum of doublewords
|
||||
|
||||
ProcessorInfo record 0,increment
|
||||
ProcessorVersionReg ds.l 1 ; contents of the PVR special purpose register
|
||||
CpuClockRateHz ds.l 1 ; CPU Clock frequency
|
||||
BusClockRateHz ds.l 1 ; Bus Clock frequency
|
||||
DecClockRateHz ds.l 1 ; Decrementer Clock frequency
|
||||
PageSize ds.l 1 ; number of bytes in a memory page
|
||||
DataCacheTotalSize ds.l 1 ; number of bytes in the Data Cache
|
||||
InstCacheTotalSize ds.l 1 ; number of bytes in the Instruction Cache
|
||||
CoherencyBlockSize ds.w 1 ; number of bytes in a Coherency Block
|
||||
ReservationGranuleSize ds.w 1 ; number of bytes in a Reservation Granule
|
||||
CombinedCaches ds.w 1 ; 1 <- combined or no cache, 0 <- split cache
|
||||
InstCacheLineSize ds.w 1 ; number of bytes in a Line of the Instruction Cache
|
||||
DataCacheLineSize ds.w 1 ; number of bytes in a Line of the Data Cache
|
||||
DataCacheBlockSizeTouch ds.w 1 ; number of bytes in a Block for DCBT DCBTST
|
||||
InstCacheBlockSize ds.w 1 ; number of bytes in a Block of the Instruction Cache
|
||||
DataCacheBlockSize ds.w 1 ; number of bytes in a Block of the Data Cache
|
||||
InstCacheAssociativity ds.w 1 ; Associativity of the Instruction Cache
|
||||
DataCacheAssociativity ds.w 1 ; Associativity of the Data Cache
|
||||
ROMImageBaseOffset ds.l 1 ; 028 ; Offset of Base of total ROM image
|
||||
ROMImageSize ds.l 1 ; 02c ; Number of bytes in ROM image
|
||||
ROMImageVersion ds.l 1 ; 030 ; ROM Version number for entire ROM
|
||||
|
||||
TransCacheTotalSize ds.w 1 ; number of entries in the Translation Cache
|
||||
TransCacheAssociativity ds.w 1 ; Associativity of the Translation Cache
|
||||
align 32 ; pad to nice cache block alignment
|
||||
Size equ *-ProcessorInfo
|
||||
Mac68KROMOffset ds.l 1 ; 034 ; Offset of base of Macintosh 68K ROM
|
||||
Mac68KROMSize ds.l 1 ; 038 ; Number of bytes in Macintosh 68K ROM
|
||||
|
||||
ExceptionTableOffset ds.l 1 ; 03c ; Offset of base of PowerPC Exception Table Code
|
||||
ExceptionTableSize ds.l 1 ; 040 ; Number of bytes in PowerPC Exception Table Code
|
||||
|
||||
HWInitCodeOffset ds.l 1 ; 044 ; Offset of base of Hardware Init Code (field moved!)
|
||||
HWInitCodeSize ds.l 1 ; 048 ; Number of bytes in Hardware Init Code
|
||||
|
||||
KernelCodeOffset ds.l 1 ; 04c ; Offset of base of NanoKernel Code
|
||||
KernelCodeSize ds.l 1 ; 050 ; Number of bytes in NanoKernel Code
|
||||
|
||||
EmulatorCodeOffset ds.l 1 ; 054 ; Offset of base of Emulator Code
|
||||
EmulatorCodeSize ds.l 1 ; 058 ; Number of bytes in Emulator Code
|
||||
|
||||
OpcodeTableOffset ds.l 1 ; 05c ; Offset of base of Opcode Table
|
||||
OpcodeTableSize ds.l 1 ; 060 ; Number of bytes in Opcode Table
|
||||
|
||||
BootstrapVersion ds.b 16 ; 064 ; Bootstrap loader version info
|
||||
BootVersionOffset ds.l 1 ; 074 ; offset within EmulatorData of BootstrapVersion
|
||||
ECBOffset ds.l 1 ; 078 ; offset within EmulatorData of ECB
|
||||
IplValueOffset ds.l 1 ; 07c ; offset within EmulatorData of IplValue
|
||||
|
||||
EmulatorEntryOffset ds.l 1 ; 080 ; offset within Emulator Code of entry point
|
||||
KernelTrapTableOffset ds.l 1 ; 084 ; offset within Emulator Code of KernelTrapTable
|
||||
|
||||
TestIntMaskInit ds.l 1 ; 088 ; initial value for test interrupt mask
|
||||
ClearIntMaskInit ds.l 1 ; 08c ; initial value for clear interrupt mask
|
||||
PostIntMaskInit ds.l 1 ; 090 ; initial value for post interrupt mask
|
||||
LA_InterruptCtl ds.l 1 ; 094 ; logical address of Interrupt Control I/O page
|
||||
InterruptHandlerKind ds.b 1 ; 098 ; kind of handler to use
|
||||
ds.b 3 ; 099 ; filler
|
||||
|
||||
LA_InfoRecord ds.l 1 ; 09c ; logical address of InfoRecord page
|
||||
LA_KernelData ds.l 1 ; 0a0 ; logical address of KernelData page
|
||||
LA_EmulatorData ds.l 1 ; 0a4 ; logical address of EmulatorData page
|
||||
LA_DispatchTable ds.l 1 ; 0a8 ; logical address of Dispatch Table
|
||||
LA_EmulatorCode ds.l 1 ; 0ac ; logical address of Emulator Code
|
||||
|
||||
MacLowMemInitOffset ds.l 1 ; 0b0 ; offset to list of LowMem addr/data values
|
||||
|
||||
PageAttributeInit ds.l 1 ; 0b4 ; default WIMG/PP settings for PTE creation
|
||||
PageMapInitSize ds.l 1 ; 0b8 ; size of page mapping info
|
||||
PageMapInitOffset ds.l 1 ; 0bc ; offset to page mapping info (from base of ConfigInfo)
|
||||
PageMapIRPOffset ds.l 1 ; 0c0 ; offset of InfoRecord map info (from base of PageMap)
|
||||
PageMapKDPOffset ds.l 1 ; 0c4 ; offset of KernelData map info (from base of PageMap)
|
||||
PageMapEDPOffset ds.l 1 ; 0c8 ; offset of EmulatorData map info (from base of PageMap)
|
||||
|
||||
SegMaps
|
||||
SegMap32SupInit ds.l 32 ; 0cc ; 32 bit mode Segment Map Supervisor space
|
||||
SegMap32UsrInit ds.l 32 ; 14c ; 32 bit mode Segment Map User space
|
||||
SegMap32CPUInit ds.l 32 ; 1cc ; 32 bit mode Segment Map CPU space
|
||||
SegMap32OvlInit ds.l 32 ; 24c ; 32 bit mode Segment Map Overlay mode
|
||||
|
||||
BATRangeInit ds.l 32 ; 2cc ; BAT mapping ranges
|
||||
|
||||
BatMap32SupInit ds.l 1 ; 34c ; 32 bit mode BAT Map Supervisor space
|
||||
BatMap32UsrInit ds.l 1 ; 350 ; 32 bit mode BAT Map User space
|
||||
BatMap32CPUInit ds.l 1 ; 354 ; 32 bit mode BAT Map CPU space
|
||||
BatMap32OvlInit ds.l 1 ; 358 ; 32 bit mode BAT Map Overlay mode
|
||||
|
||||
SharedMemoryAddr ds.l 1 ; 35c ; physical address of Mac/Smurf shared message mem
|
||||
|
||||
PA_RelocatedLowMemInit ds.l 1 ; 360 ; physical address of RelocatedLowMem
|
||||
|
||||
OpenFWBundleOffset ds.l 1 ; 364 ; Offset of base of OpenFirmware PEF Bundle
|
||||
OpenFWBundleSize ds.l 1 ; 368 ; Number of bytes in OpenFirmware PEF Bundle
|
||||
|
||||
LA_OpenFirmware ds.l 1 ; 36c ; logical address of Open Firmware
|
||||
PA_OpenFirmware ds.l 1 ; 370 ; physical address of Open Firmware
|
||||
LA_HardwarePriv ds.l 1 ; 374 ; logical address of HardwarePriv callback
|
||||
|
||||
; Used to stop here, plus 8 bytes for cache block alignment (0x380 bytes).
|
||||
; Now there be more!
|
||||
|
||||
Debug ds.w 1 ; 378 ; > 256 required for screen log
|
||||
DebugThreshold equ 257
|
||||
|
||||
org $388
|
||||
DebugFlags ds.l 1 ; 388 ; bit 1<< 1 required for screen log
|
||||
NanodbgrFlagShift equ 0
|
||||
NanodbgrFlagBit equ 31 - NanodbgrFlagShift
|
||||
LogFlagShift equ 1
|
||||
LogFlagBit equ 31 - LogFlagShift
|
||||
|
||||
org $100
|
||||
Size equ *
|
||||
endr
|
||||
|
||||
|
||||
|
||||
;_______________________________________________________________________
|
||||
; System Info Record
|
||||
;
|
||||
|
@ -273,70 +342,112 @@ Size equ *-ProcessorInfo
|
|||
; software.
|
||||
;_______________________________________________________________________
|
||||
|
||||
NKSystemInfoPtr equ $5FFFEFF0 ; logical address of NKSystemInfo record
|
||||
NKSystemInfoVer equ $5FFFEFF4 ; version number of NKSystemInfo record
|
||||
NKSystemInfoLen equ $5FFFEFF6 ; length of NKSystemInfo record
|
||||
NKSystemInfoPtr equ $68FFEFF0 ; logical address of NKSystemInfo record
|
||||
NKSystemInfoVer equ $68FFEFF4 ; version number of NKSystemInfo record
|
||||
NKSystemInfoLen equ $68FFEFF6 ; length of NKSystemInfo record
|
||||
|
||||
NKSystemInfo record 0,increment
|
||||
PhysicalMemorySize ds.l 1 ; Number of bytes in Physical RAM
|
||||
UsableMemorySize ds.l 1 ; Number of bytes in Usable RAM
|
||||
LogicalMemorySize ds.l 1 ; Number of bytes in Logical RAM
|
||||
HashTableSize ds.l 1 ; Number of bytes in Memory Hash Table
|
||||
PhysicalMemorySize ds.l 1 ; 000, irp+dc0 ; Number of bytes in Physical RAM
|
||||
UsableMemorySize ds.l 1 ; 004, irp+dc4 ; Number of bytes in Usable RAM
|
||||
LogicalMemorySize ds.l 1 ; 008, irp+dc8 ; Number of bytes in Logical RAM
|
||||
HashTableSize ds.l 1 ; 00c, irp+dcc ; Number of bytes in Memory Hash Table
|
||||
|
||||
L2DataCacheTotalSize ds.l 1 ; number of bytes in the L2 Data Cache
|
||||
L2InstCacheTotalSize ds.l 1 ; number of bytes in the L2 Instruction Cache
|
||||
L2CombinedCaches ds.w 1 ; 1 <- combined or no cache, 0 <- split cache
|
||||
L2InstCacheBlockSize ds.w 1 ; number of bytes in a Block of the L2 Instruction Cache
|
||||
L2DataCacheBlockSize ds.w 1 ; number of bytes in a Block of the L2 Data Cache
|
||||
L2InstCacheAssociativity ds.w 1 ; Associativity of the L2 Instruction Cache
|
||||
L2DataCacheAssociativity ds.w 1 ; Associativity of the L2 Data Cache
|
||||
ds.b 2 ; unused
|
||||
L2DataCacheTotalSize ds.l 1 ; 010, irp+dd0 ; number of bytes in the L2 Data Cache
|
||||
L2InstCacheTotalSize ds.l 1 ; 014, irp+dd4 ; number of bytes in the L2 Instruction Cache
|
||||
L2CombinedCaches ds.w 1 ; 018, irp+dd8 ; 1 <- combined or no cache, 0 <- split cache
|
||||
L2InstCacheBlockSize ds.w 1 ; 01a, irp+dda ; number of bytes in a Block of the L2 Instruction Cache
|
||||
L2DataCacheBlockSize ds.w 1 ; 01c, irp+ddc ; number of bytes in a Block of the L2 Data Cache
|
||||
L2InstCacheAssociativity ds.w 1 ; 01e, irp+dde ; Associativity of the L2 Instruction Cache
|
||||
L2DataCacheAssociativity ds.w 1 ; 020, irp+de0 ; Associativity of the L2 Data Cache
|
||||
ds.b 2 ; 022, irp+de2 ; unused
|
||||
|
||||
ds.b 2 ; unused
|
||||
FlashManufacturerCode ds.b 1 ; Flash ROM Manufacturer code
|
||||
FlashDeviceCode ds.b 1 ; Flash ROM Device code
|
||||
FlashStart ds.l 1 ; Starting address of Flash ROM
|
||||
FlashSize ds.l 1 ; Number of bytes in Flash ROM
|
||||
ds.b 2 ; 024, irp+de4 ; unused
|
||||
FlashManufacturerCode ds.b 1 ; 026, irp+de6 ; Flash ROM Manufacturer code
|
||||
FlashDeviceCode ds.b 1 ; 027, irp+de7 ; Flash ROM Device code
|
||||
FlashStart ds.l 1 ; 028, irp+de8 ; Starting address of Flash ROM
|
||||
FlashSize ds.l 1 ; 02c, irp+dec ; Number of bytes in Flash ROM
|
||||
|
||||
align 16
|
||||
Bank0Start ds.l 1 ; Starting address of RAM bank 0
|
||||
Bank0Size ds.l 1 ; Number of bytes in RAM bank 0
|
||||
Bank1Start ds.l 1 ; Starting address of RAM bank 1
|
||||
Bank1Size ds.l 1 ; Number of bytes in RAM bank 1
|
||||
Bank2Start ds.l 1 ; Starting address of RAM bank 2
|
||||
Bank2Size ds.l 1 ; Number of bytes in RAM bank 2
|
||||
Bank3Start ds.l 1 ; Starting address of RAM bank 3
|
||||
Bank3Size ds.l 1 ; Number of bytes in RAM bank 3
|
||||
Bank4Start ds.l 1 ; Starting address of RAM bank 4
|
||||
Bank4Size ds.l 1 ; Number of bytes in RAM bank 4
|
||||
Bank5Start ds.l 1 ; Starting address of RAM bank 5
|
||||
Bank5Size ds.l 1 ; Number of bytes in RAM bank 5
|
||||
Bank6Start ds.l 1 ; Starting address of RAM bank 6
|
||||
Bank6Size ds.l 1 ; Number of bytes in RAM bank 6
|
||||
Bank7Start ds.l 1 ; Starting address of RAM bank 7
|
||||
Bank7Size ds.l 1 ; Number of bytes in RAM bank 7
|
||||
Bank8Start ds.l 1 ; Starting address of RAM bank 8
|
||||
Bank8Size ds.l 1 ; Number of bytes in RAM bank 8
|
||||
Bank9Start ds.l 1 ; Starting address of RAM bank 9
|
||||
Bank9Size ds.l 1 ; Number of bytes in RAM bank 9
|
||||
Bank10Start ds.l 1 ; Starting address of RAM bank 10
|
||||
Bank10Size ds.l 1 ; Number of bytes in RAM bank 10
|
||||
Bank11Start ds.l 1 ; Starting address of RAM bank 11
|
||||
Bank11Size ds.l 1 ; Number of bytes in RAM bank 11
|
||||
Bank12Start ds.l 1 ; Starting address of RAM bank 12
|
||||
Bank12Size ds.l 1 ; Number of bytes in RAM bank 12
|
||||
Bank13Start ds.l 1 ; Starting address of RAM bank 13
|
||||
Bank13Size ds.l 1 ; Number of bytes in RAM bank 13
|
||||
Bank14Start ds.l 1 ; Starting address of RAM bank 14
|
||||
Bank14Size ds.l 1 ; Number of bytes in RAM bank 14
|
||||
Bank15Start ds.l 1 ; Starting address of RAM bank 15
|
||||
Bank15Size ds.l 1 ; Number of bytes in RAM bank 15
|
||||
align 32 ; pad to nice cache block alignment
|
||||
MaxBanks equ 16 ; 16 banks, 0É15
|
||||
Size equ *-SystemInfo
|
||||
Bank0Start ds.l 1 ; 030, irp+df0 ; Starting address of RAM bank 0
|
||||
Bank0Size ds.l 1 ; 034, irp+df4 ; Number of bytes in RAM bank 0
|
||||
Bank1Start ds.l 1 ; 038, irp+df8 ; Starting address of RAM bank 1
|
||||
Bank1Size ds.l 1 ; 03c, irp+dfc ; Number of bytes in RAM bank 1
|
||||
Bank2Start ds.l 1 ; 040, irp+e00 ; Starting address of RAM bank 2
|
||||
Bank2Size ds.l 1 ; 044, irp+e04 ; Number of bytes in RAM bank 2
|
||||
Bank3Start ds.l 1 ; 048, irp+e08 ; Starting address of RAM bank 3
|
||||
Bank3Size ds.l 1 ; 04c, irp+e0c ; Number of bytes in RAM bank 3
|
||||
Bank4Start ds.l 1 ; 050, irp+e10 ; Starting address of RAM bank 4
|
||||
Bank4Size ds.l 1 ; 054, irp+e14 ; Number of bytes in RAM bank 4
|
||||
Bank5Start ds.l 1 ; 058, irp+e18 ; Starting address of RAM bank 5
|
||||
Bank5Size ds.l 1 ; 05c, irp+e1c ; Number of bytes in RAM bank 5
|
||||
Bank6Start ds.l 1 ; 060, irp+e20 ; Starting address of RAM bank 6
|
||||
Bank6Size ds.l 1 ; 064, irp+e24 ; Number of bytes in RAM bank 6
|
||||
Bank7Start ds.l 1 ; 068, irp+e28 ; Starting address of RAM bank 7
|
||||
Bank7Size ds.l 1 ; 06c, irp+e2c ; Number of bytes in RAM bank 7
|
||||
Bank8Start ds.l 1 ; 070, irp+e30 ; Starting address of RAM bank 8
|
||||
Bank8Size ds.l 1 ; 074, irp+e34 ; Number of bytes in RAM bank 8
|
||||
Bank9Start ds.l 1 ; 078, irp+e38 ; Starting address of RAM bank 9
|
||||
Bank9Size ds.l 1 ; 07c, irp+e3c ; Number of bytes in RAM bank 9
|
||||
Bank10Start ds.l 1 ; 080, irp+e40 ; Starting address of RAM bank 10
|
||||
Bank10Size ds.l 1 ; 084, irp+e44 ; Number of bytes in RAM bank 10
|
||||
Bank11Start ds.l 1 ; 088, irp+e48 ; Starting address of RAM bank 11
|
||||
Bank11Size ds.l 1 ; 08c, irp+e4c ; Number of bytes in RAM bank 11
|
||||
Bank12Start ds.l 1 ; 090, irp+e50 ; Starting address of RAM bank 12
|
||||
Bank12Size ds.l 1 ; 094, irp+e54 ; Number of bytes in RAM bank 12
|
||||
Bank13Start ds.l 1 ; 098, irp+e58 ; Starting address of RAM bank 13
|
||||
Bank13Size ds.l 1 ; 09c, irp+e5c ; Number of bytes in RAM bank 13
|
||||
Bank14Start ds.l 1 ; 0a0, irp+e60 ; Starting address of RAM bank 14
|
||||
Bank14Size ds.l 1 ; 0a4, irp+e64 ; Number of bytes in RAM bank 14
|
||||
Bank15Start ds.l 1 ; 0a8, irp+e68 ; Starting address of RAM bank 15
|
||||
Bank15Size ds.l 1 ; 0ac, irp+e6c ; Number of bytes in RAM bank 15
|
||||
Bank16Start ds.l 1 ; 0b0, irp+e70 ; Starting address of RAM bank 16
|
||||
Bank16Size ds.l 1 ; 0b4, irp+e74 ; Number of bytes in RAM bank 16
|
||||
Bank17Start ds.l 1 ; 0b8, irp+e78 ; Starting address of RAM bank 17
|
||||
Bank17Size ds.l 1 ; 0bc, irp+e7c ; Number of bytes in RAM bank 17
|
||||
Bank18Start ds.l 1 ; 0c0, irp+e80 ; Starting address of RAM bank 18
|
||||
Bank18Size ds.l 1 ; 0c4, irp+e84 ; Number of bytes in RAM bank 18
|
||||
Bank19Start ds.l 1 ; 0c8, irp+e88 ; Starting address of RAM bank 19
|
||||
Bank19Size ds.l 1 ; 0cc, irp+e8c ; Number of bytes in RAM bank 19
|
||||
Bank20Start ds.l 1 ; 0d0, irp+e90 ; Starting address of RAM bank 20
|
||||
Bank20Size ds.l 1 ; 0d4, irp+e94 ; Number of bytes in RAM bank 20
|
||||
Bank21Start ds.l 1 ; 0d8, irp+e98 ; Starting address of RAM bank 21
|
||||
Bank21Size ds.l 1 ; 0dc, irp+e9c ; Number of bytes in RAM bank 21
|
||||
Bank22Start ds.l 1 ; 0e0, irp+ea0 ; Starting address of RAM bank 22
|
||||
Bank22Size ds.l 1 ; 0e4, irp+ea4 ; Number of bytes in RAM bank 22
|
||||
Bank23Start ds.l 1 ; 0e8, irp+ea8 ; Starting address of RAM bank 23
|
||||
Bank23Size ds.l 1 ; 0ec, irp+eac ; Number of bytes in RAM bank 23
|
||||
Bank24Start ds.l 1 ; 0f0, irp+eb0 ; Starting address of RAM bank 24
|
||||
Bank24Size ds.l 1 ; 0f4, irp+eb4 ; Number of bytes in RAM bank 24
|
||||
Bank25Start ds.l 1 ; 0f8, irp+eb8 ; Starting address of RAM bank 25
|
||||
Bank25Size ds.l 1 ; 0fc, irp+ebc ; Number of bytes in RAM bank 25
|
||||
EndOfBanks
|
||||
MaxBanks equ 26 ; Pads out to old struct len (cache block), more to come...
|
||||
|
||||
; Interrupt Support Data
|
||||
IntCntrBaseAddr ds.l 1 ; 100, irp+ec0 ; Interrupt Controller Base Address (variable is used since this is a PCI Dev and address is relocatable)
|
||||
IntPendingReg ds.l 2 ; 104, irp+ec4 ; Data of current interrupts pending register
|
||||
|
||||
; These fields were added to report information about tightly-coupled L2 caches.
|
||||
; The inline L2 information should be used in situations where there is a CPU
|
||||
; card L2 cache that can coexist with a motherboard L2.
|
||||
|
||||
InlineL2DSize ds.l 1 ; 10c, irp+ecc ; Size of in-line L2 Dcache
|
||||
InlineL2ISize ds.l 1 ; 110, irp+ed0 ; Size of in-line L2 Icache
|
||||
InlineL2Combined ds.w 1 ; 114, irp+ed4 ; 1 <- combined or no cache, 0 <- split cache
|
||||
InlineL2IBlockSize ds.w 1 ; 116, irp+ed6 ; Block size of in-line I L2 cache
|
||||
InlineL2DBlockSize ds.w 1 ; 118, irp+ed8 ; Block size of in-line D L2 cache
|
||||
InlineL2IAssoc ds.w 1 ; 11a, irp+eda ; Associativity of L2 I
|
||||
InlineL2DAssoc ds.w 1 ; 11c, irp+edc ; Associativity of L2 D
|
||||
ds.w 1 ; 11e, irp+ede ; pad
|
||||
|
||||
; More Interrupt Support Data
|
||||
IntsCompleted ds.l 2 ; 120, irp+ee0 ; completed interrupts
|
||||
|
||||
ds.b $18
|
||||
Size equ *
|
||||
endr
|
||||
|
||||
|
||||
|
||||
;_______________________________________________________________________
|
||||
; Diagnostic Info Record
|
||||
;
|
||||
|
@ -344,19 +455,52 @@ Size equ *-SystemInfo
|
|||
; the NanoKernel, and from the NanoKernel to user mode software.
|
||||
;_______________________________________________________________________
|
||||
|
||||
nkDiagInfoPtr equ $5FFFEFE8 ; logical address of DiagnosticInfo record
|
||||
nkDiagInfoVer equ $5FFFEFEC ; version number of DiagnosticInfo record
|
||||
nkDiagInfoLen equ $5FFFEFEE ; length of DiagnosticInfo record
|
||||
NKDiagInfoPtr equ $68FFEFE8 ; logical address of DiagnosticInfo record
|
||||
NKDiagInfoVer equ $68FFEFEC ; version number of DiagnosticInfo record
|
||||
NKDiagInfoLen equ $68FFEFEE ; length of DiagnosticInfo record
|
||||
|
||||
nkDiagInfo record 0,increment
|
||||
ds.b 236 ; it WILL all fit in 256 bytes
|
||||
DiagPOSTResult2 ds.l 1 ; POST results
|
||||
DiagPOSTResult1 ds.l 1 ; POST results
|
||||
DiagEmoRestart ds.l 1 ; Burn in restart flag
|
||||
DiagWarmStartHigh ds.l 1 ; First long of native warm start (WLSC) <SM44>
|
||||
DiagWarmStartLow ds.l 1 ; Second long of native warm start (SamB) <SM44>
|
||||
align 32 ; pad to nice cache block alignment
|
||||
Size equ *-nkDiagInfo
|
||||
NKDiagInfo record 0,increment
|
||||
BankMBFailOffset ds.l 1 ; 000 ; Mother Board RAM failure code
|
||||
BankAFailOffset ds.l 1 ; 004 ; Bank A RAM failure code
|
||||
BankBFailOffset ds.l 1 ; 008 ; Bank B RAM failure code
|
||||
BankCFailOffset ds.l 1 ; 00c ; Bank C RAM failure code
|
||||
|
||||
BankDFailOffset ds.l 1 ; 010 ; Bank D RAM failure code
|
||||
BankEFailOffset ds.l 1 ; 014 ; Bank E RAM failure code
|
||||
BankFFailOffset ds.l 1 ; 018 ; Bank F RAM failure code
|
||||
BankGFailOffset ds.l 1 ; 01c ; Bank G RAM failure code
|
||||
|
||||
BankHFailOffset ds.l 1 ; 020 ; Bank H RAM failure code
|
||||
CacheFailOffset ds.l 1 ; 024 ; cache failure code
|
||||
LongBootParamOffset ds.l 1 ; 028 ; on longBoot this is where the params will be
|
||||
POSTTraceOffset ds.l 1 ; 02c ; this tells us what route the POST took
|
||||
|
||||
POSTOldWarmOffset ds.l 1 ; 030 ; logged address of old warmstart flag
|
||||
POSTOldLongOffset ds.l 1 ; 034 ; logged address of old long boot flag
|
||||
POSTOldGlobbOffset ds.l 1 ; 038 ; logged address of old Diagnostic Info Record
|
||||
POSTOldParamOffset ds.l 1 ; 03c ; the params from the old diag globb
|
||||
|
||||
POSTStartRTCUOffset ds.l 1 ; 040 ; PPC Real Time Clock Upper at start of POST
|
||||
POSTStartRTCLOffset ds.l 1 ; 044 ; PPC Real Time Clock Lower at start of POST
|
||||
POSTEndRTCUOffset ds.l 1 ; 048 ; PPC Real Time Clock Upper at end of POST
|
||||
POSTEndRTCLOffset ds.l 1 ; 04c ; PPC Real Time Clock Lower at end of POST
|
||||
|
||||
POSTTestTypeOffset ds.l 1 ; 050 ; when long RAM tests fail test type which failed is put here
|
||||
POSTError2Offset ds.l 1 ; 054 ; result codes from tests
|
||||
POSTError3Offset ds.l 1 ; 058 ; result codes from tests
|
||||
POSTError4Offset ds.l 1 ; 05c ; result codes from tests
|
||||
|
||||
RegistersStore ds.b 140 ; 060 ; store all 60x registers here, still fit into 256 bytes size.
|
||||
|
||||
; Everything BEFORE here is new (hence the funny-sized register store)
|
||||
|
||||
DiagPOSTResult2 ds.l 1 ; 0ec ; POST results
|
||||
DiagPOSTResult1 ds.l 1 ; 0f0 ; POST results
|
||||
DiagLongBootSig ds.l 1 ; 0f4 ; Burn in restart flag
|
||||
DiagWarmStartHigh ds.l 1 ; 0f8 ; First long of native warm start (WLSC) <SM44>
|
||||
DiagWarmStartLow ds.l 1 ; 0fc ; Second long of native warm start (SamB) <SM44>
|
||||
|
||||
Size equ *
|
||||
endr
|
||||
|
||||
|
||||
|
@ -368,30 +512,278 @@ Size equ *-nkDiagInfo
|
|||
; software.
|
||||
;_______________________________________________________________________
|
||||
|
||||
nkNanoKernelInfoPtr equ $5FFFEFE0 ; logical address of NanoKernelInfo record
|
||||
nkNanoKernelInfoVer equ $5FFFEFE4 ; version number of NanoKernelInfo record
|
||||
nkNanoKernelInfoLen equ $5FFFEFE6 ; length of NanoKernelInfo record
|
||||
NKNanoKernelInfoPtr equ $68FFEFE0 ; logical address of NanoKernelInfo record
|
||||
NKNanoKernelInfoVer equ $68FFEFE4 ; version number of NanoKernelInfo record
|
||||
NKNanoKernelInfoLen equ $68FFEFE6 ; length of NanoKernelInfo record
|
||||
|
||||
nkNanoKernelInfo record 0,increment
|
||||
ExceptionCauseCounts ds.l 32 ; counters per exception cause
|
||||
NanoKernelCallCounts ds.l 16 ; counters per NanoKernel call
|
||||
ExternalIntCount ds.l 1 ; count of External Interrupts
|
||||
MisalignmentCount ds.l 1 ; count of Misalignment Interrupts
|
||||
FPUReloadCount ds.l 1 ; count of FPU reloads on demand
|
||||
DecrementerIntCount ds.l 1 ; count of Decrementer Interrupts
|
||||
QuietWriteCount ds.l 1 ; count of Writes to Quiet Read-Only memory
|
||||
HashTableCreateCount ds.l 1 ; count of Hash Table Entry creations
|
||||
HashTableDeleteCount ds.l 1 ; count of Hash Table Entry deletions
|
||||
HashTableOverflowCount ds.l 1 ; count of Hash Table Entry overflows
|
||||
EmulatedUnimpInstCount ds.l 1 ; count of Emulated unimplemented instructions
|
||||
NCBPtrCacheMissCount ds.l 1 ; count of NCB Pointer cache misses
|
||||
ExceptionPropagateCount ds.l 1 ; count of Exceptions propagated to system
|
||||
ExceptionForcedCount ds.l 1 ; count of Exceptions forced to system
|
||||
align 8 ; align for 64 bit time base counters
|
||||
SysContextCpuTime ds.l 2 ; CPU Time used by System Context
|
||||
AltContextCpuTime ds.l 2 ; CPU Time used by Alternate Context
|
||||
align 32 ; pad to nice cache block alignment
|
||||
Size equ *-nkNanoKernelInfo
|
||||
NKNanoKernelInfo record 0,increment
|
||||
ExceptionCauseCounts ds.l 32 ; 000, kdp+dc0 ; counters per exception cause
|
||||
NanoKernelCallCounts ds.l 16 ; 080, kdp+e40 ; counters per NanoKernel call
|
||||
ExternalIntCount ds.l 1 ; 0c0, kdp+e80 ; count of External Interrupts
|
||||
MisalignmentCount ds.l 1 ; 0c4, kdp+e84 ; count of Misalignment Interrupts
|
||||
FPUReloadCount ds.l 1 ; 0c8, kdp+e88 ; count of FPU reloads on demand
|
||||
DecrementerIntCount ds.l 1 ; 0cc, kdp+e8c ; count of Decrementer Interrupts
|
||||
QuietWriteCount ds.l 1 ; 0d0, kdp+e90 ; count of Writes to Quiet Read-Only memory
|
||||
HashTableCreateCount ds.l 1 ; 0d4, kdp+e94 ; count of Hash Table Entry creations
|
||||
HashTableDeleteCount ds.l 1 ; 0d8, kdp+e98 ; count of Hash Table Entry deletions
|
||||
HashTableOverflowCount ds.l 1 ; 0dc, kdp+e9c ; count of Hash Table Entry overflows
|
||||
EmulatedUnimpInstCount ds.l 1 ; 0e0, kdp+ea0 ; count of Emulated unimplemented instructions
|
||||
NCBPtrCacheMissCount ds.l 1 ; 0e4, kdp+ea4 ; count of NCB Pointer cache misses
|
||||
ExceptionPropagateCount ds.l 1 ; 0e8, kdp+ea8 ; count of Exceptions propagated to system
|
||||
ExceptionForcedCount ds.l 1 ; 0ec, kdp+eac ; count of Exceptions forced to system
|
||||
SysContextCpuTime ds.l 2 ; 0f0, kdp+eb0 ; CPU Time used by System Context
|
||||
AltContextCpuTime ds.l 2 ; 0f8, kdp+eb4 ; CPU Time used by Alternate Context
|
||||
|
||||
; This stuff is new (starts at 0x100)
|
||||
|
||||
blueProcessID ds.l 1 ; 100, kdp+ec0 ; ID of the blue process.
|
||||
blueTaskID ds.l 1 ; 104, kdp+ec4 ; ID of the blue task.
|
||||
pageQueueID ds.l 1 ; 108, kdp+ec8 ; ID of the page fault queue.
|
||||
TaskCount ds.l 1 ; 10c, kdp+ecc ; Number of tasks.
|
||||
FreePoolExtendCount ds.l 1 ; 110, kdp+ed0 ; Number of pages given to the nanokernel.
|
||||
|
||||
;rsrv1 ds.l 3 ; 114, kdp+ed4 ; reserved???
|
||||
|
||||
; My additions
|
||||
|
||||
org $11c
|
||||
ConfigFlags ds.l 1 ; 11c, kdp+edc ; includes ScreenConsole ... TODO put flag equs here
|
||||
NanodbgrFlagShift equ 1
|
||||
NanodbgrFlagBit equ 31 - NanodbgrFlagShift
|
||||
LogFlagShift equ 3
|
||||
LogFlagBit equ 31 - LogFlagShift
|
||||
; bit 31 always set on replacement, bit 27 set on replacement with ROM 2.7f3 or later
|
||||
|
||||
org $128
|
||||
VMDispatchCountTblPtr ds.l 1 ; 128, kdp+ee8
|
||||
ds.l 1
|
||||
ds.l 1
|
||||
MPDispatchCountTblPtr ds.l 1 ; 134, kdp+ef4 ; ???????
|
||||
AddrSpcSetCtr ds.l 1 ; 138, kdp+ef8 ; incremented by SetAddrSpcRegisters
|
||||
IDCtr ds.l 1 ; 13c, kdp+efc
|
||||
|
||||
ds.b $20
|
||||
Size equ *
|
||||
endr
|
||||
|
||||
|
||||
|
||||
;_______________________________________________________________________
|
||||
; Processor Info Record
|
||||
;
|
||||
; Used to pass Processor information from the NanoKernel to user mode
|
||||
; software.
|
||||
;_______________________________________________________________________
|
||||
|
||||
ProcessorInfoPtr equ $68FFEFD8 ; logical address of ProcessorInfo record
|
||||
ProcessorInfoVer equ $68FFEFDC ; version number of ProcessorInfo record
|
||||
ProcessorInfoLen equ $68FFEFDE ; length of ProcessorInfo record
|
||||
|
||||
ProcessorInfo record 0,increment
|
||||
ProcessorVersionReg ds.l 1 ; 000, kdp+f20 ; contents of the PVR special purpose register
|
||||
CpuClockRateHz ds.l 1 ; 004, kdp+f24 ; CPU Clock frequency
|
||||
BusClockRateHz ds.l 1 ; 008, kdp+f28 ; Bus Clock frequency
|
||||
DecClockRateHz ds.l 1 ; 00c, kdp+f2c ; Decrementer Clock frequency
|
||||
|
||||
Ovr
|
||||
PageSize ds.l 1 ; 010, kdp+f30 ; number of bytes in a memory page
|
||||
DataCacheTotalSize ds.l 1 ; 014, kdp+f34 ; number of bytes in the Data Cache
|
||||
InstCacheTotalSize ds.l 1 ; 018, kdp+f38 ; number of bytes in the Instruction Cache
|
||||
CoherencyBlockSize ds.w 1 ; 01c, kdp+f3c ; number of bytes in a Coherency Block
|
||||
ReservationGranuleSize ds.w 1 ; 01e, kdp+f3e ; number of bytes in a Reservation Granule
|
||||
CombinedCaches ds.w 1 ; 020, kdp+f40 ; 1 <- combined or no cache, 0 <- split cache
|
||||
InstCacheLineSize ds.w 1 ; 022, kdp+f42 ; number of bytes in a Line of the Instruction Cache
|
||||
DataCacheLineSize ds.w 1 ; 024, kdp+f44 ; number of bytes in a Line of the Data Cache
|
||||
DataCacheBlockSizeTouch ds.w 1 ; 026, kdp+f46 ; number of bytes in a Block for DCBT DCBTST
|
||||
InstCacheBlockSize ds.w 1 ; 028, kdp+f48 ; number of bytes in a Block of the Instruction Cache
|
||||
DataCacheBlockSize ds.w 1 ; 02a, kdp+f4a ; number of bytes in a Block of the Data Cache
|
||||
InstCacheAssociativity ds.w 1 ; 02c, kdp+f4c ; Associativity of the Instruction Cache
|
||||
DataCacheAssociativity ds.w 1 ; 02e, kdp+f4e ; Associativity of the Data Cache
|
||||
|
||||
TransCacheTotalSize ds.w 1 ; 030, kdp+f50 ; number of entries in the Translation Cache
|
||||
TransCacheAssociativity ds.w 1 ; 032, kdp+f52 ; Associativity of the Translation Cache
|
||||
OvrEnd
|
||||
|
||||
; These fields were added to report information about back-side L2 caches
|
||||
|
||||
ProcessorL2DSize ds.l 1 ; 034, kdp+f54 ; Size of back-side L2 Dcache
|
||||
ProcessorL2ISize ds.l 1 ; 038, kdp+f58 ; Size of back-side L2 Icache
|
||||
ProcessorL2Combined ds.w 1 ; 03c, kdp+f5c ; 1 <- combined or no cache, 0 <- split cache
|
||||
ProcessorL2IBlockSize ds.w 1 ; 03e, kdp+f5e ; Block size of back-side I L2 cache
|
||||
ProcessorL2DBlockSize ds.w 1 ; 040, kdp+f60 ; Block size of back-side D L2 cache
|
||||
ProcessorL2IAssoc ds.w 1 ; 042, kdp+f62 ; Associativity of L2 I
|
||||
ProcessorL2DAssoc ds.w 1 ; 044, kdp+f64 ; Associativity of L2 D
|
||||
|
||||
filler1 ds.w 1 ; 046, kdp+f66 ; align to long
|
||||
|
||||
; ProcessorFlags - Definitions for the processor flags field. These are bit positions,
|
||||
; as in 1 << hasVMX, and not masks.
|
||||
hasL2CR equ 0
|
||||
hasPLRUL1 equ 1
|
||||
hasTAU equ 2
|
||||
hasVMX equ 3
|
||||
unknownFlag equ 4
|
||||
hasExtraBATs equ 5
|
||||
ProcessorFlags ds.l 1 ; 048, kdp+f68 ; flags to specify processor features
|
||||
|
||||
align 5 ; pad to nice cache block alignment
|
||||
|
||||
org $05e
|
||||
SetToZero ds.w 1 ; 05e, kdp+f7e ; by same code that sets below
|
||||
CpuClockRateHzCopy ds.l 1 ; 060, kdp+f80 ; copies by Init.s
|
||||
BusClockRateHzCopy ds.l 1 ; 064, kdp+f84 ; copies by Init.s
|
||||
DecClockRateHzCopy ds.l 1 ; 068, kdp+f88 ; copies by Init.s
|
||||
|
||||
ds.b $34
|
||||
Size equ *
|
||||
endr
|
||||
|
||||
|
||||
|
||||
;_______________________________________________________________________
|
||||
; Hardware Info Record
|
||||
;
|
||||
; Used to pass hardware information from the NanoKernel to user mode
|
||||
; software.
|
||||
;_______________________________________________________________________
|
||||
|
||||
NKHWInfoPtr equ $68FFEFD0 ; logical address of HWInfo record
|
||||
NKHWInfoVer equ $68FFEFD4 ; version number of HWInfo record
|
||||
NKHWInfoLen equ $68FFEFD6 ; length of HWInfo record
|
||||
|
||||
NKHWInfo record 0,increment
|
||||
MacROM_Base ds.l 1 ; 000, irp+f00 ; base address (physical) of Mac ROM
|
||||
DeviceTreeBase ds.l 1 ; 004, irp+f04 ; base address of the copied device tree properties
|
||||
UniversalInfoTableBase ds.l 1 ; 008, irp+f08 ; base address of the Universal Info Table
|
||||
ConfigInfoTableBase ds.l 1 ; 00c, irp+f0c ; base address of the Config Info Table
|
||||
VectorLookupTable ds.l 1 ; 010, irp+f10 ; base address of the interrupt vector lookup table (short *)
|
||||
VectorMaskTable ds.l 1 ; 014, irp+f14 ; base address of the interrupt vector mask table (long *)
|
||||
|
||||
OpenPICBaseAddr ds.l 1 ; 018, irp+f18 ; OpenPIC base address
|
||||
|
||||
ISAMaster8259 ds.l 1 ; 01c, irp+f1c ; ISA Master 8259 ports (char *)
|
||||
ISASlave8259 ds.l 1 ; 020, irp+f20 ; ISA Slave 8259 ports (char *)
|
||||
InterruptAck8259 ds.l 1 ; 024, irp+f24 ; address to read to ack 8259 interrupt (long *)
|
||||
|
||||
; interrupt pending bits (actively changing)
|
||||
|
||||
PendingInts ds.l 2 ; 028, irp+f28 ; 64 bits of pending interrupts
|
||||
|
||||
; some Mac I/O device base addresses
|
||||
|
||||
ADB_Base ds.l 1 ; 030, irp+f30 ; base address of ADB
|
||||
SCSI_DMA_Base ds.l 1 ; 034, irp+f34 ; base address of SCSI DMA registers
|
||||
|
||||
; RTAS related stuff
|
||||
|
||||
RTAS_PrivDataArea ds.l 1 ; 038, irp+f38 ; RTAS private data area
|
||||
MacOS_NVRAM_Offset ds.l 1 ; 03c, irp+f3c ; offset into nvram to MacOS data
|
||||
|
||||
RTAS_NVRAM_Fetch ds.l 1 ; 040, irp+f40 ; token for RTAS NVRAM fetch
|
||||
RTAS_NVRAM_Store ds.l 1 ; 044, irp+f44 ; token for RTAS NVRAM store
|
||||
RTAS_Get_Clock ds.l 1 ; 048, irp+f48 ; token for RTAS clock get
|
||||
RTAS_Set_Clock ds.l 1 ; 04c, irp+f4c ; token for RTAS clock set
|
||||
RTAS_Restart ds.l 1 ; 050, irp+f50 ; token for RTAS Restart
|
||||
RTAS_Shutdown ds.l 1 ; 054, irp+f54 ; token for RTAS Shutdown
|
||||
RTAS_Restart_At ds.l 1 ; 058, irp+f58 ; token for RTAS system startup at specified time
|
||||
RTAS_EventScan ds.l 1 ; 05c, irp+f5c ; token for RTAS event scan
|
||||
RTAS_Check_Exception ds.l 1 ; 060, irp+f60 ; token for RTAS check exception
|
||||
RTAS_Read_PCI_Config ds.l 1 ; 064, irp+f64 ; token for RTAS read PCI config
|
||||
RTAS_Write_PCI_Config ds.l 1 ; 068, irp+f68 ; token for RTAS write PCI config
|
||||
|
||||
; SIO interrupt source numbers for the MPIC
|
||||
|
||||
SIOIntVect ds.w 1 ; 06c, irp+f6c ; SIO (8259 cascade vector) vector number
|
||||
SIOIntBit ds.w 1 ; 06e, irp+f6e ; SIO (8259 cascade vector) bit number
|
||||
|
||||
Signature ds.l 1 ; 070, irp+f70 ; signature for this record ('Hnfo')
|
||||
|
||||
; more interrupt source numbers
|
||||
|
||||
SpuriousIntVect ds.w 1 ; 074, irp+f74 ; spurious vector number
|
||||
|
||||
CPU_ID ds.w 1 ; 076, irp+f76 ; the ID of this CPU (universal-tables-related)
|
||||
|
||||
SCCAIntVect ds.w 1 ; 078, irp+f78 ; SCC A (non-DMA) vector number
|
||||
SCCBIntVect ds.w 1 ; 07a, irp+f7a ; SCC B (non-DMA) vector number
|
||||
SCSIIntVect ds.w 1 ; 07c, irp+f7c ; SCSI vector number
|
||||
SCSIDMAIntVect ds.w 1 ; 07e, irp+f7e ; SCSI DMA vector number
|
||||
VIAIntVect ds.w 1 ; 080, irp+f80 ; VIA vector number
|
||||
VIAIntBit ds.w 1 ; 082, irp+f82 ; VIA bit number
|
||||
ADBIntVect ds.w 1 ; 084, irp+f84 ; vector number
|
||||
NMIIntVect ds.w 1 ; 086, irp+f86 ; NMI vector number
|
||||
NMIIntBit ds.w 1 ; 088, irp+f88 ; NMI bit number
|
||||
|
||||
; current (actively changing) interrupt handling variables
|
||||
|
||||
ISAPendingInt ds.w 1 ; 08a, irp+f8a ; currently pending ISA/8259 interrupt
|
||||
CompletedInts ds.b 8 ; 08c, irp+f8c ; completed interrupts
|
||||
|
||||
nkHWInfoFlagSlowMESH equ 1 ; set if fast MESH doesn't work on this box
|
||||
nkHWInfoFlagAsynchMESH equ 2 ; set if Synchronous MESH doesn't work on this box
|
||||
nkHWInfoFlagNoCopySWTLB equ 4 ; set if the software TLB walk code for 603 should NOT be copied
|
||||
HardwareInfoFlags ds.l 1 ; 094, irp+f94 ; 32 bits of flags (see enum above)
|
||||
|
||||
RTAS_Get_PowerOn_Time ds.l 1 ; 098, irp+f98 ; token for RTAS getting time for system startup
|
||||
|
||||
ds.b $24
|
||||
Size equ *
|
||||
endr
|
||||
|
||||
|
||||
|
||||
;_______________________________________________________________________
|
||||
; Processor State Record
|
||||
;
|
||||
; Used to save the state of the processor across sleep.
|
||||
;_______________________________________________________________________
|
||||
|
||||
NKProcessorStatePtr equ $68FFEFC8 ; logical address of ProcessorState record
|
||||
NKProcessorStateVer equ $68FFEFCC ; version number of ProcessorState record
|
||||
NKProcessorStateLen equ $68FFEFCE ; length of ProcessorState record
|
||||
|
||||
NKProcessorState record 0,increment
|
||||
saveDBAT0u ds.l 1 ; 000 ; place to store DBAT0U
|
||||
saveDBAT0l ds.l 1 ; 004 ; place to store DBAT0L
|
||||
saveDBAT1u ds.l 1 ; 008 ; place to store DBAT1U
|
||||
saveDBAT1l ds.l 1 ; 00c ; place to store DBAT1L
|
||||
saveDBAT2u ds.l 1 ; 010 ; place to store DBAT2U
|
||||
saveDBAT2l ds.l 1 ; 014 ; place to store DBAT2L
|
||||
saveDBAT3u ds.l 1 ; 018 ; place to store DBAT3U
|
||||
saveDBAT3l ds.l 1 ; 01c ; place to store DBAT3L
|
||||
|
||||
saveIBAT0u ds.l 1 ; 020 ; place to store IBAT0U
|
||||
saveIBAT0l ds.l 1 ; 024 ; place to store IBAT0L
|
||||
saveIBAT1u ds.l 1 ; 028 ; place to store IBAT1U
|
||||
saveIBAT1l ds.l 1 ; 02c ; place to store IBAT1L
|
||||
saveIBAT2u ds.l 1 ; 030 ; place to store IBAT2U
|
||||
saveIBAT2l ds.l 1 ; 034 ; place to store IBAT2L
|
||||
saveIBAT3u ds.l 1 ; 038 ; place to store IBAT3U
|
||||
saveIBAT3l ds.l 1 ; 03c ; place to store IBAT3L
|
||||
|
||||
saveSPRG0 ds.l 1 ; 040 ; place to store SPRG0
|
||||
saveSPRG1 ds.l 1 ; 044 ; place to store SPRG1
|
||||
saveSPRG2 ds.l 1 ; 048 ; place to store SPRG2
|
||||
saveSPRG3 ds.l 1 ; 04c ; place to store SPRG3
|
||||
|
||||
saveL2CR ds.l 1 ; 050 ; place to store Arthur's L2CR
|
||||
|
||||
saveSRR0 ds.l 1 ; 054 ; place to store SRR0
|
||||
saveSRR1 ds.l 1 ; 058 ; place to store SRR1
|
||||
saveTBU ds.l 1 ; 05c ; place to store TBU
|
||||
saveTBL ds.l 1 ; 060 ; place to store TBL
|
||||
saveHID0 ds.l 1 ; 064 ; place to store HID0
|
||||
saveDEC ds.l 1 ; 068 ; place to store DEC
|
||||
saveMSR ds.l 1 ; 06c ; place to store MSR
|
||||
saveSDR1 ds.l 1 ; 070 ; place to store SDR1
|
||||
|
||||
; saveKernelDataPtr needs to always be right after saveReturnAddr
|
||||
; because of how the code works. DO NOT CHANGE THIS ORDERING!
|
||||
|
||||
saveReturnAddr ds.l 1 ; 074 ; place to store the addr to jump to.
|
||||
saveKernelDataPtr ds.l 1 ; 078 ; place to store the KernelDataPtr
|
||||
saveContextPtr ds.l 1 ; 07c ; place to store the ContextPtr
|
||||
Size equ *
|
||||
endr
|
||||
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ kPreventFileFromBeingClosedMask equ 16
|
|||
kAllOverrideAttributesMask equ kOverrideNextMapMask + \
|
||||
kDontCountOrIndexDuplicatesMask + \
|
||||
kTwoDeepMask + \
|
||||
kPreventFileFromBeingClosedMask
|
||||
kPreventFileFromBeingClosedMask + 32 + 64 + 128
|
||||
kAllButOverrideAttributesMask equ 255 - kAllOverrideAttributesMask
|
||||
|
||||
selectMakeOverrideMap equ 4
|
||||
|
|
|
@ -436,11 +436,13 @@ emExpansionBusGlobals ds.l 1 ; Pointer to Expansion Bus Manager Globals
|
|||
|
||||
jSWModemSoundVector ds.l 1 ; Vector to control routine for software modem sound
|
||||
|
||||
ds.b 270
|
||||
|
||||
; NOTE: When adding new fields here, be sure to update the high-level language header files as well
|
||||
; (currently {CInternal}ExpandMemPriv.h is the one)
|
||||
; Be sure to update the Reality sources when you change this file (and the version number)
|
||||
|
||||
emCurVersion EQU $0133 ; version
|
||||
emCurVersion EQU $016b ; version
|
||||
|
||||
emRecSize equ * ; size for this version
|
||||
size equ *
|
||||
|
|
|
@ -118,13 +118,13 @@ InitVec&TVec proc export ; initialize the vector table vector
|
|||
|
||||
Endif
|
||||
|
||||
; fill in the unused "holes" with the address of UNIMPLEMENTED
|
||||
; fill in the unused "holes" with the address of BADTRAP
|
||||
|
||||
If (&thisCVect - &lastCVect) > 4 Then
|
||||
|
||||
import UNIMPLEMENTED
|
||||
import BADTRAP
|
||||
|
||||
dcb.l (&thisCVect - &lastCVect - 4)/4 ,UNIMPLEMENTED-BASEOFROM+ROMBASE
|
||||
dcb.l (&thisCVect - &lastCVect - 4)/4 ,BADTRAP-BASEOFROM+ROMBASE
|
||||
|
||||
Endif
|
||||
|
||||
|
|
|
@ -109,6 +109,7 @@ ContinueComp ds.l 1 ; vector to power message continue procedure <SM5>
|
|||
deferredPDM ds.l 1 ; pointer to PDM deferred task to post alert <SM5>
|
||||
prevPollStack ds.l 1 ; keep address of any other poll stack <SM6>
|
||||
SpareComp3 ds.l 1 ; spare vector #3 <SM5>
|
||||
ds.b $178-$64 ; new
|
||||
EgretGlobSize EQU *
|
||||
ENDR
|
||||
|
||||
|
@ -273,7 +274,8 @@ EnDisPDM equ $21 ; Enable/Disable PowerDown Message <T2>
|
|||
RdWrIIC equ $22 ; Read or Write IIC (I sqared C) <SM3>[rbm]<3>
|
||||
WakeUpMode equ $23 ; Enable/Disable WakeUpMode <P1>
|
||||
TimerTickle equ $24 ; ShutDown Timer Tickle <P1>
|
||||
MaxPseudoCmd equ TimerTickle ; largest possible pseudo command number <P1>
|
||||
; more commands apparently added
|
||||
MaxPseudoCmd equ $2A ; largest possible pseudo command number <P1>
|
||||
|
||||
;
|
||||
;__________________________________________________________________________________________________
|
||||
|
|
|
@ -285,7 +285,7 @@
|
|||
Exit 1
|
||||
End
|
||||
|
||||
"{Sources}Tools:Make" -w {MOpts} {Targets} -f "{MakeFile}" > "{MakeOut}" || Exit
|
||||
Make -w {MOpts} {Targets} -f "{MakeFile}" > "{MakeOut}" || Exit
|
||||
|
||||
If {EchoCmds}
|
||||
Set Echo 1
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
#
|
||||
# Change History (most recent first):
|
||||
#
|
||||
# 1/29/17 HQX Add conditionals for "Custer" (Mirrored Drive Door G4 ROM v10.2.1)
|
||||
# resources, change TNTPlus to hasPCI.
|
||||
# 1/9/17 HQX Add Classic flag
|
||||
# 12/28/16 HQX Finally realise how this works. Patch to emulate the missing
|
||||
# "ParseFeatures" command. Added NewWorld and TNTPlus flags.
|
||||
#
|
||||
# <SM25> 12/13/93 PN Roll in KAOs and Horror changes to support Malcom and AJ
|
||||
# machines
|
||||
# <SM24> 11/10/93 fau Update from SuperMunggio <SMG2-3>.
|
||||
|
@ -64,7 +70,28 @@
|
|||
#
|
||||
#
|
||||
|
||||
Set AvailableFeatures "hasROMGibbly ¶
|
||||
Set cdg5Features "¶
|
||||
Vanilla ¶
|
||||
LatestHack ¶
|
||||
hasPCI ¶
|
||||
BlueBox ¶
|
||||
NewWorld ¶
|
||||
CusterBacklightParcel ¶
|
||||
CusterUSBShimKeyboard ¶
|
||||
cdg5HappyMac ¶
|
||||
NKDebugShim ¶
|
||||
NKShowLog ¶
|
||||
ExtraNKLogging ¶
|
||||
DebugAlways ¶
|
||||
SkipTbxiValidation ¶
|
||||
TbxiPatchG4Version ¶
|
||||
TbxiDisableAppleKiwi ¶
|
||||
Wedge ¶
|
||||
"
|
||||
|
||||
Set AvailableFeatures "{cdg5Features} ¶
|
||||
hasBCScreen ¶
|
||||
hasROMGibbly ¶
|
||||
hasManEject ¶
|
||||
hasCacheTypeCPU ¶
|
||||
forPDMProto ¶
|
||||
|
@ -197,12 +224,25 @@ Set AvailableFeatures "hasROMGibbly
|
|||
useROMFonts "
|
||||
|
||||
|
||||
If "` ParseFeatures -a "{AvailableFeatures}" -f ": ROM {1}" `" =~ /': ROM '(Å)¨1/
|
||||
Set Defines "{¨1}"
|
||||
Else
|
||||
Exit 1
|
||||
End
|
||||
|
||||
|
||||
# # ParseFeatures is lost to the ages...
|
||||
# If "` ParseFeatures -a "{AvailableFeatures}" -f ": ROM {1}" `" =~ /': ROM '(Å)¨1/
|
||||
# Set Defines "{¨1}"
|
||||
# Else
|
||||
# Exit 1
|
||||
# End
|
||||
|
||||
# Set Defines "-d "
|
||||
|
||||
# This block of code replaces it...
|
||||
For Feature in {AvailableFeatures}
|
||||
Set Defines "{Defines} -d {Feature}=`Evaluate " {1} " =~ /Å {Feature} Å/`"
|
||||
End
|
||||
|
||||
# Ugh!
|
||||
Set Defines "`Echo {Defines} | StreamEdit -e '¥,° Replace /=1/ "=TRUE" -c °' -e '¥,° Replace /=0/ "=FALSE" -c °'`"
|
||||
|
||||
For Override in {2}
|
||||
|
||||
If "{Override}" =~ /(Å)¨1=(Å)¨2/
|
||||
|
@ -214,9 +254,9 @@ Set AvailableFeatures "hasROMGibbly
|
|||
End
|
||||
|
||||
If {Value} =~ /true/
|
||||
Set Value TRUE
|
||||
Set Value 1 #TRUE # to allow overrides to work right!
|
||||
Else If {Value} =~ /false/
|
||||
Set Value FALSE
|
||||
Set Value 0 #FALSE
|
||||
End
|
||||
|
||||
If "{Defines}" =~ /(Å)¨3{Name}=[Â ¶t]+(Å)¨4/
|
||||
|
|
|
@ -54,30 +54,23 @@ MainCodeLibs =
|
|||
"{MiscDir}GoNativeROMLib.o" ¶
|
||||
"{LibDir}SlotMgr.lib" ¶
|
||||
"{LibDir}SCSI.lib" ¶
|
||||
"{LibDir}SCSI4pt3.lib" ¶
|
||||
"{LibDir}HFS.lib" ¶
|
||||
"{LibDir}PPC.lib" ¶
|
||||
"{LibDir}ADBMgr.lib" ¶
|
||||
"{LibDir}TimeMgr.lib" ¶
|
||||
"{LibDir}Toolbox.lib" ¶
|
||||
"{LibDir}CommToolboxPatch.Lib" ¶
|
||||
"{LibDir}MemoryMgr.lib" ¶
|
||||
"{LibDir}AliasMgr.lib" ¶
|
||||
"{LibDir}ComponentMgr.lib" ¶
|
||||
"{LibDir}DataAccessMgr.lib" ¶
|
||||
"{LibDir}EditionMgr.lib" ¶
|
||||
"{LibDir}ExpansionBusMgr.lib" ¶
|
||||
"{LibDir}HelpMgr.lib" ¶
|
||||
"{LibDir}SoundMgr.lib" ¶
|
||||
"{LibDir}Gestalt.lib" ¶
|
||||
"{LibDir}IconUtils.lib" ¶
|
||||
"{LibDir}NotificationMgr.lib" ¶
|
||||
"{LibDir}PictUtilities.lib" ¶
|
||||
"{LibDir}ToolboxEventMgr.lib" ¶
|
||||
"{LibDir}ControlMgr.lib" ¶
|
||||
"{LibDir}DisplayMgr.lib" ¶
|
||||
"{LibDir}WindowMgr.lib" ¶
|
||||
"{LibDir}MenuMgr.lib" ¶
|
||||
"{LibDir}ATAMgr.lib" ¶
|
||||
"{ObjDir}DeviceMgr.a.o" ¶
|
||||
# ¶
|
||||
# DispatchHelper and DialogMgr.lib need to be colocated ¶
|
||||
# ¶
|
||||
|
@ -89,15 +82,8 @@ MainCodeLibs =
|
|||
"{LibDir}ResourceMgr.lib" ¶
|
||||
"{LibDir}ScriptMgr.lib" ¶
|
||||
"{LibDir}CQD.lib" ¶
|
||||
"{LibDir}TextServicesMgr.lib" ¶
|
||||
"{LibDir}FontMgr.lib" ¶
|
||||
"{LibDir}RomInterface.Lib" ¶
|
||||
"{LibDir}RomStandardLib.lib" ¶
|
||||
"{LibDir}StartTest.lib" ¶
|
||||
"{LibDir}VideoDriver.lib" ¶
|
||||
"{ObjDir}WallyWorld.a.o" ¶
|
||||
"{ObjDir}FPEmulation.a.o" ¶
|
||||
"{LibDir}Beep.lib" ¶
|
||||
"{LibDir}Lastly.lib" ¶
|
||||
# ¶
|
||||
# Keep DispTable at end ¶
|
||||
# ¶
|
||||
|
@ -118,7 +104,7 @@ MainCodeLibs =
|
|||
#
|
||||
# Vectorization
|
||||
#
|
||||
"{LibDir}MainCode.Lib" Ä {MainCodeLibs} "{ObjDir}VectorTablePatch.a.o"
|
||||
"{LibDir}MainCode.Lib" Ä {MainCodeLibs} "{ObjDir}VectorTablePatch.a.o" "{ToolDir}Vectorize"
|
||||
"{ToolDir}Vectorize" -w -v "{ObjDir}VectorTablePatch.a.o" -log "{TextDir}MainCode.Sym" {StdVOpts} -o "{Targ}" {MainCodeLibs}
|
||||
|
||||
"{ObjDir}VectorTablePatch.a.o" Ä "{Sources}Make:VectorTable.a" "{IntAIncludes}VectorTablePatch.a"
|
||||
|
|
|
@ -162,26 +162,21 @@ IntAIncludes = {Sources}Internal:Asm:
|
|||
IntCIncludes = {Sources}Internal:C:
|
||||
IntPInterfaces = {Sources}Internal:Pascal:
|
||||
IntRIncludes = {Sources}Internal:Rez:
|
||||
Libraries = {Sources}Libs:Libraries:
|
||||
CLibraries = {Sources}Libs:CLibraries:
|
||||
PLibraries = {Sources}Libs:PLibraries:
|
||||
|
||||
|
||||
MAOpts = -d TRUE=1 -d FALSE=0 -d Alignment=8 -d CPU=20 -d ROMRelease=$D4C1 -wb -d SubRelease=3 -blksize 62
|
||||
MCOpts = -d TRUE=1 -d FALSE=0 -d Alignment=8 -d CPU=20 -d ROMRelease=$D4C1 -b3 -mbg full -mc68020 -blksize 62 -opt full
|
||||
MAOpts = -d TRUE=1 -d FALSE=0 -d Alignment=8 -d CPU=20 -d ROMRelease=$45F6 -wb -d SubRelease=1 -blksize 62
|
||||
MCOpts = -d TRUE=1 -d FALSE=0 -d Alignment=8 -d CPU=20 -d ROMRelease=$45F6 -b3 -mbg full -mc68020 -blksize 62 -opt full
|
||||
MPOpts = -mbg full -mc68020
|
||||
|
||||
RomBase = $40800000
|
||||
RomBase = $FFC00000
|
||||
|
||||
Features = hasRISCV0ResMgrPatches ¶
|
||||
hasDoubleByte ¶
|
||||
hasAMIC ¶
|
||||
SupportNativeComponents ¶
|
||||
Script_Char_Extra ¶
|
||||
hasPenFraction ¶
|
||||
hasFullKerning ¶
|
||||
hasGlyphState ¶
|
||||
hasNewHeapMgr ¶
|
||||
hasPDMMaceEnet ¶
|
||||
hasAppleTalkInROM ¶
|
||||
hasMixedMode ¶
|
||||
|
@ -189,9 +184,7 @@ Features = hasRISCV0ResMgrPatches
|
|||
hasSCSIDiskModeFeature ¶
|
||||
hasSysSevenResources ¶
|
||||
hasDataAccessPACK ¶
|
||||
hasYMCA ¶
|
||||
hasCPUIDRegister ¶
|
||||
hasHMC ¶
|
||||
has2MegROMOrMore ¶
|
||||
hasVideoIn ¶
|
||||
hasAsyncSCSI ¶
|
||||
|
@ -208,7 +201,6 @@ Features = hasRISCV0ResMgrPatches
|
|||
forLocalizability ¶
|
||||
has040MMU ¶
|
||||
hasADBKeyLayouts ¶
|
||||
hasASC ¶
|
||||
hasAliasMgr ¶
|
||||
hasApple2Fonts ¶
|
||||
hasAppleEventMgr ¶
|
||||
|
@ -216,49 +208,25 @@ Features = hasRISCV0ResMgrPatches
|
|||
hasBattery ¶
|
||||
hasCommToolbox ¶
|
||||
hasCQD ¶
|
||||
hasDAFB ¶
|
||||
hasDJMEMC ¶
|
||||
hasDataAccessMgr ¶
|
||||
hasDisplayMgr ¶
|
||||
hasDisplayMgrWindows ¶
|
||||
hasEDisk ¶
|
||||
hasEclipseVIA2 ¶
|
||||
hasEditionMgr ¶
|
||||
hasEgret ¶
|
||||
hasExtendedCharacterSet ¶
|
||||
hasFMC ¶
|
||||
hasGDU ¶
|
||||
hasGlue ¶
|
||||
hasGrandCentral ¶
|
||||
hasIdle ¶
|
||||
hasIopScc ¶
|
||||
hasIopSwim ¶
|
||||
hasJaws ¶
|
||||
hasMDU ¶
|
||||
hasMMU ¶
|
||||
hasMSC ¶
|
||||
hasMac2VIA2 ¶
|
||||
hasNetBoot ¶
|
||||
hasNiagra ¶
|
||||
hasOrwell ¶
|
||||
hasOss ¶
|
||||
hasPratt ¶
|
||||
hasProtectedPRAM ¶
|
||||
hasSCSI96 ¶
|
||||
hasSWIM2 ¶
|
||||
hasSwim3 ¶
|
||||
hasSlotMgr ¶
|
||||
hasSonora ¶
|
||||
hasSplineFonts ¶
|
||||
hasVDAC ¶
|
||||
hasVIAClock ¶
|
||||
hasVISA2 ¶
|
||||
hasVISADecoder ¶
|
||||
hasWaimeaVIA2 ¶
|
||||
isUniversal ¶
|
||||
hasPwrControls ¶
|
||||
hasPwrMgrClock ¶
|
||||
hasRBV ¶
|
||||
hasSplineFonts ¶
|
||||
hasVIAClock ¶
|
||||
hasWaimeaVIA2 ¶
|
||||
|
@ -267,6 +235,8 @@ Features = hasRISCV0ResMgrPatches
|
|||
onHafMac ¶
|
||||
onMac32 ¶
|
||||
onNuMac ¶
|
||||
hasBCScreen ¶
|
||||
hasMMU ¶
|
||||
ForROM
|
||||
|
||||
|
||||
|
@ -340,9 +310,6 @@ FeatureSet
|
|||
Set CIncludes "{CIncludes}"
|
||||
Set PInterfaces "{PInterfaces}"
|
||||
Set RIncludes "{RIncludes}"
|
||||
Set Libraries "{Libraries}"
|
||||
Set CLibraries "{CLibraries}"
|
||||
Set PLibraries "{PLibraries}"
|
||||
Set StdAOpts "{MAOpts} {FeatureSet} -i {IntAIncludes} {AOpts} -i {ObjDir}"
|
||||
Set StdCOpts "{MCOpts} {FeatureSet} -i {IntCIncludes} {COpts}"
|
||||
Set StdCPOpts "{MCPOpts} {FeatureSet} -i {IntCIncludes} {COpts}"
|
||||
|
@ -381,10 +348,10 @@ Clean
|
|||
|
||||
#include {ToolSrcDir}Tools.make
|
||||
|
||||
#include {MakeDir}MainCode.make
|
||||
|
||||
#include {DeclDir}DeclData.make
|
||||
|
||||
#include {DriverDir}Drivers.make
|
||||
|
||||
#include {ResourceDir}Resources.make
|
||||
#include {MakeDir}MainCode.make
|
||||
|
||||
##include {DeclDir}DeclData.make
|
||||
|
||||
##include {ResourceDir}Resources.make
|
||||
|
|
1644
Make/VectorTable.a
1644
Make/VectorTable.a
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -182,7 +182,7 @@ Debugging equ 0 ; disable debugging checks
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: CountADBs
|
||||
; Routine: CountADBs 2b380
|
||||
; Arguments: None
|
||||
; Output: D0.W Number of ADB entries
|
||||
; Function: This routine counts the number of entries in the ADB
|
||||
|
@ -210,7 +210,7 @@ FirstCount
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: GetIndADB
|
||||
; Routine: GetIndADB 2b39a
|
||||
; Arguments: DO.W Index from 1 to the value returned by CountADBs
|
||||
; A0 Pointer to buffer in which DeviceType, OrigAddr,
|
||||
; ServiceAddr, DataAddr are returned (10 bytes)
|
||||
|
@ -245,7 +245,7 @@ LoadBuf MOVE.B FDBDevTy(A1), (A0)+ ; Return DeviceType
|
|||
Title 'KbdADB - ADB Manager - GetADBInfo / SetADBInfo / FindFDBInfo'
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: GetADBInfo
|
||||
; Routine: GetADBInfo 2b3c6
|
||||
; Arguments: DO.B ADBAddr
|
||||
; A0 Pointer to buffer in which DeviceType, OrigAddr,
|
||||
; ServiceAddr, DataAddr are returned (10 bytes)
|
||||
|
@ -261,7 +261,7 @@ GetADBInfoTrap
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: SetADBInfo
|
||||
; Routine: SetADBInfo 2b3cc
|
||||
; Arguments: DO.B ADBAddr
|
||||
; A0 Pointer to buffer containing ServiceAddr and
|
||||
; DataAddr (8 bytes)
|
||||
|
@ -282,7 +282,7 @@ DoneSet RTS
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: FindFDBInfo
|
||||
; Routine: FindFDBInfo 2b3da
|
||||
; Arguments: DO.B FDBAddr
|
||||
; Output: D0.L 0 if found, -1 if not
|
||||
; A1 Real address of FDB record if found.
|
||||
|
@ -317,7 +317,7 @@ DoneFind
|
|||
Title 'KbdADB - ADB Manager - ADBOp'
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: ADBOp
|
||||
; Routine: ADBOp 2b3fc
|
||||
; Inputs: A0.L - pointer to ADBOpBlock paramater block
|
||||
; D0.B - ADB command/address byte to send
|
||||
;
|
||||
|
@ -379,7 +379,7 @@ ADBOpTrap ; a0-a1/d1-d2 saved by OsTrap dispatch
|
|||
Title 'KbdADB - ADB Manager - RunADBRequest'
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: RunADBRequest
|
||||
; Routine: RunADBRequest 2b44c
|
||||
; Inputs: A3 - pointer to ADBBase
|
||||
;
|
||||
; Outputs: D2 - length of transmit buffer data
|
||||
|
@ -424,7 +424,7 @@ RunADBRequest
|
|||
Title 'KbdADB - ADB Manager - ExplicitRequestDone'
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: ExplicitRequestDone
|
||||
; Routine: ExplicitRequestDone 2b47e
|
||||
; Inputs: D2 - length of receive buffer data
|
||||
; D3 - command byte / SRQ flag (bit 31)
|
||||
; A2 - pointer to buffer containing receive data
|
||||
|
@ -482,7 +482,7 @@ ExplicitRequestDone
|
|||
Title 'KbdADB - ADB Manager - ImplicitRequestDone'
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: ImplicitRequestDone
|
||||
; Routine: ImplicitRequestDone 2b4b4
|
||||
; Inputs: D2 - length of receive buffer data
|
||||
; D3 - command byte / SRQ flag (bit 31)
|
||||
; A2 - pointer to buffer containing receive data
|
||||
|
@ -524,7 +524,7 @@ ImplicitRequestDone
|
|||
Title 'KbdADB - ADB Manager - RequestDone'
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: RequestDone
|
||||
; Routine: RequestDone 2b4d4
|
||||
; Inputs: D2 - length of receive buffer data
|
||||
; D3 - command byte / SRQ flag (bit 31)
|
||||
; A0 - pointer to buffer to pass to completion routine
|
||||
|
@ -559,37 +559,74 @@ RequestDone move.l a0,-(sp) ; copy buffer address to A0 save area on stack
|
|||
|
||||
TestFor SupportsIdle
|
||||
BEQ.S @notsupported
|
||||
_IdleUpdate ; this is activity, stay at full speed
|
||||
|
||||
MoveA.L (PmgrBase), A1
|
||||
CmpI.L #sleepConst, PmgrRec.SleepSaveFlag(A1)
|
||||
BEQ.B @definitelyNot
|
||||
BTst.B #$2, $129(A1)
|
||||
BEQ.B @nearEnd
|
||||
@definitelyNot
|
||||
|
||||
Move.L (A7), D3
|
||||
Move.B D3, D0
|
||||
LsR.B #$4, D0
|
||||
Bsr FindFDBInfo
|
||||
Move.B $1(A1), D0
|
||||
MoveA.L $4(A7), A1
|
||||
Move.L (A1), D3
|
||||
CmpI.B #$2, D0
|
||||
BNE.B @noTesting
|
||||
BTst.L #$17, D3
|
||||
BNE.B @idleDone
|
||||
Bra.B @nearEnd
|
||||
@noTesting
|
||||
MoveA.L (PmgrBase), A1
|
||||
CmpI.L #sleepConst, PmgrRec.SleepSaveFlag(A1)
|
||||
BEQ.B @idleDone
|
||||
CmpI.B #$3, D0
|
||||
BNE.B @idleDone
|
||||
@nearEnd
|
||||
Move.L D0, -(A7)
|
||||
Move.L #$10001, D0
|
||||
_PowerDispatch
|
||||
Move.L (A7)+, D0
|
||||
@idleDone
|
||||
@notsupported
|
||||
|
||||
movem.l (sp)+,d0/a0/a1/a2 ; setup cmd, buffer, handler, data
|
||||
; (13).start
|
||||
TestFor SupportsIdle
|
||||
beq.s @continue
|
||||
move.l d0,-(sp) ; save d0 temporarily on the stack <t10> ag
|
||||
move.l #((UsrActivity<<16)|\ ; set for user activity <K2>
|
||||
(IdleUpdateDisp<<0)),d0 ; idle update selector <K2>
|
||||
_PowerDispatch ; call power manager
|
||||
move.l (sp)+,d0 ; restore d0 <t10> ag
|
||||
@continue
|
||||
move.l a1,d1 ; test to see if handler address is valid
|
||||
beq.s @noHandler ; if not, don't call it
|
||||
|
||||
BTST #fDBInit,FDBFlag(A3) ; is ADB initialization in progress?
|
||||
BNE.S @JustDoIt ; -> yes, calling the handler now is allowed
|
||||
|
||||
MOVE.L D0,D2
|
||||
AND #$F,D2
|
||||
CMP.B #$C,D2
|
||||
BNE @justDoIt
|
||||
|
||||
; jump thru the ProductInfo table to check if a keyswitch is in the secure position <H4>
|
||||
|
||||
MOVEA.L UnivInfoPtr,A1 ; point to the ProductInfo table <H4>
|
||||
ADDA.L ProductInfo.ADBDebugUtilPtr(A1),A1 ; and get the address of its ADB table <H4>
|
||||
MOVE.L 4*adbKeySwSecure(A1),D2 ; get the offset to the keyswitch code <H4>
|
||||
BEQ.S @JustDoIt ; -> no keyswitch check, so just call the handler <H4>
|
||||
BEQ.S @MaybeDoIt ; -> no keyswitch check, so just call the handler <H4>
|
||||
MOVEM.L D0/D1/A0/A2,-(SP) ; <H4>
|
||||
ADDA.L D2,A1 ; calculate the routine's address <H4>
|
||||
JSR (A1) ; and call it <H4>
|
||||
MOVEM.L (SP)+,D0/D1/A0/A2 ; <H4>
|
||||
BEQ.S @noHandler ; -> the keyswitch is secure, so don't call the handler
|
||||
|
||||
@MaybeDoIt BTST.B #3,$240A
|
||||
BEQ.S @JustDoIt
|
||||
|
||||
MOVE.L PmgrBase,A1
|
||||
CMP.L #sleepConst,PmgrRec.SleepSaveFlag(A1)
|
||||
BEQ.S @noHandler
|
||||
|
||||
BTST.B #2,PmgrRec.PmgrFlags2(A1)
|
||||
BNE.B @noHandler
|
||||
|
||||
@JustDoIt MOVEA.L D1,A1 ; get the handler's address <H4>
|
||||
jsr (a1) ; call the handler
|
||||
|
||||
|
@ -602,7 +639,7 @@ RequestDone move.l a0,-(sp) ; copy buffer address to A0 save area on stack
|
|||
Title 'KbdADB - ADB Manager - Initialization'
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; ADBReInit - ReInitialize the Front Desk Bus
|
||||
; ADBReInit 2b5aa - ReInitialize the Front Desk Bus
|
||||
;
|
||||
;______________________________________________________________________
|
||||
|
||||
|
@ -638,7 +675,7 @@ iLocalData EQU iDeviceTy
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; ADBProc - this routine lives in the JADBProc vector and is called
|
||||
; ADBProc 2b5d0 - this routine lives in the JADBProc vector and is called
|
||||
; by ADBReInit before and after initialization
|
||||
;
|
||||
;______________________________________________________________________
|
||||
|
@ -695,6 +732,7 @@ ADBProc
|
|||
;______________________________________________________________________
|
||||
|
||||
PostInit ; <SM3> rb
|
||||
; 2b610
|
||||
WITH ExpandMemRec,KybdDriverData ; <SM3> rb
|
||||
|
||||
_CountADBs ; Get the number of ADB devices
|
||||
|
@ -728,14 +766,14 @@ PostInit ; <SM3> rb
|
|||
ENDWITH ; <SM3> rb
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; InitADBDrvr - this routine bring in all appropriate 'ADBS' resources and
|
||||
; InitADBDrvr 2b64c - this routine bring in all appropriate 'ADBS' resources and
|
||||
; execute the initialization routines.
|
||||
;
|
||||
;______________________________________________________________________
|
||||
|
||||
InitADBDrvr _CountADBs ; get the number of valid ADB entries
|
||||
Move D0,D3 ; save it in D3
|
||||
BEQ.S DoneSrv ; If none, nothing to do
|
||||
BEQ DoneSrv ; If none, nothing to do
|
||||
MoveQ #1,D4 ; start at first entry
|
||||
Link A6,#iLocalData ; reserve stack frame
|
||||
FSrvLoop
|
||||
|
@ -759,9 +797,7 @@ FSrvLoop
|
|||
_DetachResource ; detach it
|
||||
|
||||
Move.L D1,A0 ; put handle in A0
|
||||
Move.L (A0),D0 ; dereference handle
|
||||
_StripAddress ; make it a 24-bit address
|
||||
Move.L D0,A0 ; put it in A0
|
||||
Move.L (A0),A0 ; dereference handle
|
||||
Move.B iADBAddr(A6),D0 ; put ADB Address in D0
|
||||
Move.B iDeviceTy(A6),D1 ; put device type in D1
|
||||
JSR (A0) ; execute the service routine
|
||||
|
@ -777,7 +813,7 @@ DoneSrv
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; InitADB - Initialize state variables
|
||||
; InitADB 2b69c - Initialize state variables
|
||||
;
|
||||
;_______________________________________________________________________
|
||||
|
||||
|
@ -796,6 +832,50 @@ InitADB MOVE.L #FDBDSize,D0 ; get local data area length
|
|||
LEA FDBTask,A0 ; setup the FDB VBL task
|
||||
MOVE.L A0,JKybdTask ; lomem vector
|
||||
|
||||
BTst.B #$2, ($2408)
|
||||
BEQ.B @dontHitExpandMem
|
||||
import IOPR_ADB
|
||||
Lea.L IOPR_ADB, A0
|
||||
Move.L A0, ([ExpandMem],$294)
|
||||
@dontHitExpandMem
|
||||
|
||||
Move.L UnivROMFlags, D0
|
||||
|
||||
AndI.L #$E, D0
|
||||
BEQ.B @escape
|
||||
|
||||
CmpI.L #$A, D0
|
||||
BEQ.B @escape
|
||||
|
||||
CmpI.L #$C, D0
|
||||
BEQ.B @second
|
||||
|
||||
CmpI.L #$8, D0
|
||||
BEQ.B @fourth
|
||||
|
||||
CmpI.L #$2, D0
|
||||
BNE.B @third
|
||||
|
||||
@first Lea.L ($FFFDB592).L, A0
|
||||
Lea.L @first(A0.L), A0
|
||||
Bra.B @done
|
||||
|
||||
@second Lea.L ($FFFDB5A2).L, A0
|
||||
Lea.L @second(A0.L), A0
|
||||
Bra.B @done
|
||||
|
||||
@third Lea.L ($FFFDB5CE).L, A0
|
||||
Lea.L @third(A0.L), A0
|
||||
Bra.B @done
|
||||
|
||||
@fourth Lea.L ($FFFDB5DE).L, A0
|
||||
Lea.L @fourth(A0.L), A0
|
||||
|
||||
@done MoveA.L (UnivInfoPtr), A1
|
||||
SubA.L A1, A0
|
||||
Move.L A0, $48(A1)
|
||||
@escape
|
||||
|
||||
; jump thru the ProductInfo table to call the hardware-dependent initialization code
|
||||
|
||||
MOVEA.L UnivInfoPtr,A0 ; point to the ProductInfo table <H4>
|
||||
|
@ -838,7 +918,7 @@ ReInit ori.w #HiIntMask,sr ; mask out interrupts
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; InitDevT - Initialize the Device Table
|
||||
; InitDevT 2b7a0 - Initialize the Device Table
|
||||
;
|
||||
; NOTE: everything after BusReset below is part of an ADB completion
|
||||
; routine, and thus is run at interrupt level 1. No calls
|
||||
|
@ -853,17 +933,19 @@ InitDevT bsr BusReset ; reset all devices on the bus
|
|||
@PollNext move.b d0,InitAddr(a3) ; save device address
|
||||
bsr TalkR3 ; issue a Talk R3 command (asynchronously)
|
||||
move.b InitAddr(a3),d0 ; restore poll address
|
||||
tst.b (a0)+ ; test reply length, see if device returned data
|
||||
tst.b (a0) ; test reply length, see if device returned data
|
||||
beq.s @NoDevice ; no, nothing to install
|
||||
|
||||
; there is a response from the device in the address, so update the
|
||||
; device table according to the device
|
||||
|
||||
@whoaGoBack
|
||||
moveq.l #0,d1 ; zero extend for indexing
|
||||
move.b DevTOffset(a3),d1 ; get offset to devicetable
|
||||
move.b 1(a0),FDBDevTy(a3,d1.w) ; copy device handler ID into table
|
||||
move.b 2(a0),FDBDevTy(a3,d1.w) ; copy device handler ID into table
|
||||
move.b d0,FDBOAddr(a3,d1.w); save device address
|
||||
move.b d0,FDBAddr(a3,d1.w) ; save device address
|
||||
move.b d0,FDBOAddr(a3,d1.w); save device address
|
||||
|
||||
cmpi.b #KbdAddr,d0 ; is it a keyboard type device?
|
||||
bne.s @notKbd ; no, branch
|
||||
|
@ -878,10 +960,29 @@ InitDevT bsr BusReset ; reset all devices on the bus
|
|||
move.w HasDev(a3),d2 ; get value in HasDev
|
||||
bset.l d0,d2 ; remember which address has device
|
||||
move.w d2,HasDev(A3) ; save it
|
||||
Bra @skipNewNoDeviceCode
|
||||
@NoDevice
|
||||
|
||||
BTst.B #$2, ($2408)
|
||||
BEQ.B @skipNewNoDeviceCode
|
||||
|
||||
Tst.L ([$2B6],$29C)
|
||||
BEQ.B @skipNewNoDeviceCode
|
||||
|
||||
MoveM.L D0/A0-A3, -(A7)
|
||||
MoveA.L ([$2B6],$29C), A1
|
||||
MoveA.L A0, A2
|
||||
AndI #$FF, D0
|
||||
OrI #$200, D0
|
||||
Jsr (A1)
|
||||
MoveM.L (A7)+, D0/A0-A3
|
||||
Tst.B (A0)
|
||||
BNE.B @whoaGoBack
|
||||
@skipNewNoDeviceCode
|
||||
|
||||
addq.b #1,d0 ; advance device address
|
||||
cmpi.b #NumFDBAdr,d0 ; has it polled all addresses yet?
|
||||
bne.s @PollNext ; no, go to poll next device
|
||||
bne @PollNext ; no, go to poll next device
|
||||
|
||||
; ChgAddr - check the device address to identify multiple devices on
|
||||
; the same address
|
||||
|
@ -922,7 +1023,7 @@ ChgNext
|
|||
; to the old address by issuing a Listen R3.
|
||||
|
||||
Move.B InitAddr(A3),D0 ; get address
|
||||
BSR.s TalkR3 ; issue a Talk R3 command <1.6>
|
||||
BSR TalkR3 ; issue a Talk R3 command <1.6>
|
||||
|
||||
; MovBack - A Talk R3 has just been issued, a timeout in S1 indicates no
|
||||
; more device in original address, we want to move the device back to
|
||||
|
@ -931,21 +1032,40 @@ ChgNext
|
|||
tst.b (a0) ; did the device return data
|
||||
beq.S @1 ; no, branch
|
||||
; no timeout indication,
|
||||
BSR.S CopyEntry ; copy entry into device table
|
||||
@whoaGoBack
|
||||
BSR CopyEntry ; copy entry into device table
|
||||
Move.B FDBByte1(A3),FDBDevTy(A3,D1.W) ; get new handle ID into table
|
||||
BRA.S ChgNext ; go to change next device
|
||||
; there is timeout indication
|
||||
@1
|
||||
BTst.B #$2, ($2408)
|
||||
BEQ.B @skipNewTimeoutCode
|
||||
|
||||
Move.B $16F(A3), D0
|
||||
Tst.L ([$2B6],$29C)
|
||||
BEQ.B @skipNewTimeoutCode
|
||||
|
||||
MoveM.L D0/A1-A2, -(A7)
|
||||
MoveA.L ([$2B6],$29C), A1
|
||||
MoveA.L A0, A2
|
||||
AndI #$FF, D0
|
||||
OrI #$300, D0
|
||||
Jsr (A1)
|
||||
MoveM.L (A7)+, D0/A1-A2
|
||||
Tst.B (A0)
|
||||
BNE.B @whoaGoBack
|
||||
@skipNewTimeoutCode
|
||||
|
||||
Move.B InitAddr(A3),D1 ; get address to change back to
|
||||
Move.B NewAddr(A3),D0 ; get address to talk to
|
||||
bsr.s ListenR3 ; send a listen R3 command <1.6>
|
||||
bsr ListenR3 ; send a listen R3 command <1.6>
|
||||
|
||||
; CKNewAdr - check the new address by issuing a Talk R3, to see if
|
||||
; there is still any device left. If yes, add entry into device
|
||||
; table, but if not, just go to change next device address
|
||||
|
||||
Move.B NewAddr(A3),D0 ; get address
|
||||
BSR.S TalkR3 ; issue a talk R3 <1.6>
|
||||
BSR TalkR3 ; issue a talk R3 <1.6>
|
||||
|
||||
; AddEntry - a Talk R3 command has just been issed to the new address,
|
||||
; if there is no timeout in S1, one or more device is still in that
|
||||
|
@ -964,7 +1084,7 @@ ExitEntry
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; CopyEntry - copy the device entry from the original address to the
|
||||
; CopyEntry 2b8ea - copy the device entry from the original address to the
|
||||
; new address, a Talk R3 had just been issued
|
||||
;
|
||||
; Called by: MoveBack and AddEntry
|
||||
|
@ -1003,7 +1123,7 @@ CopyEntry
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; BusReset - issue a Reset command
|
||||
; BusReset 2b930 - issue a Reset command
|
||||
;
|
||||
; On entry, (SP) has completion routine address <1.6>
|
||||
;
|
||||
|
@ -1017,7 +1137,7 @@ BusReset moveq.l #0,d0 ; address zero
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Talk R3 - issue a Talk R3 command
|
||||
; Talk R3 2b938 - issue a Talk R3 command
|
||||
;
|
||||
; On entry, D0 has device address
|
||||
; (SP) has completion routine address <1.6>
|
||||
|
@ -1031,7 +1151,7 @@ TalkR3 moveq.l #talkCmd+3,d1 ; talk command, register 3
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; ListenR3 - issue a listen R3 command
|
||||
; ListenR3 2b93e - issue a listen R3 command
|
||||
;
|
||||
; On entry, D0 has device address to send the command
|
||||
; D1 has new device address to change to
|
||||
|
@ -1058,7 +1178,7 @@ MakeAsyncRequest
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; GNextAddr - get next address to change
|
||||
; GNextAddr 2b964 - get next address to change
|
||||
;
|
||||
;_______________________________________________________________________
|
||||
|
||||
|
@ -1081,7 +1201,7 @@ GNextAddr MoveQ #0,D0
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; GEmptyAddr - get empty address space
|
||||
; GEmptyAddr 2b986 - get empty address space
|
||||
;
|
||||
; on return:
|
||||
; D0 = empty address or
|
||||
|
@ -1100,7 +1220,7 @@ GEmptyAddr MoveQ #0,D1
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; FDBTask - FDB VBL Task
|
||||
; FDBTask 2b998 - FDB VBL Task
|
||||
;
|
||||
;_______________________________________________________________________
|
||||
|
||||
|
@ -1119,7 +1239,7 @@ KbdDRTS RTS
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; DefaultDev - check mouse and keyboard in the device table, if they
|
||||
; DefaultDev 2b9ac - check mouse and keyboard in the device table, if they
|
||||
; are not there, set them up as default device anyway.
|
||||
;
|
||||
;______________________________________________________________________
|
||||
|
@ -1143,7 +1263,7 @@ ChkMouse moveq #1,d0 ; post processing <H6>
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: flushkbds
|
||||
; Routine: flushkbds 2b9de
|
||||
; Arguments: none
|
||||
; Output: none
|
||||
; Function: this routine finds all kbd devices, and sends a flush command to them
|
||||
|
@ -1167,6 +1287,7 @@ waitForKeys equ (4+4) ; add 100% margin
|
|||
@type cmp.b #kbdAddr,origADBAddr(a0); is this a keyboard
|
||||
bne.s @next ; not a keyboard, next device
|
||||
bsr.s sendFlush ; send a flush command to kbd
|
||||
bsr.s newAdbFunc
|
||||
bra.s @next ; next device
|
||||
|
||||
@done movea.l #waitForKeys,a0 ; wait for keys
|
||||
|
@ -1176,9 +1297,34 @@ waitForKeys equ (4+4) ; add 100% margin
|
|||
movem.l (sp)+,@saved ; restore registers
|
||||
rts
|
||||
|
||||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: sendFlush
|
||||
; Routine: newAdbFunc 2ba12
|
||||
; Arguments: a0
|
||||
; Output: none
|
||||
; Function:
|
||||
; Note:
|
||||
;______________________________________________________________________
|
||||
|
||||
newAdbFunc
|
||||
@saved reg d0/d1/a0
|
||||
|
||||
movem.l @saved,-(sp)
|
||||
|
||||
move.l 6(a0),a0
|
||||
addq.l #4,a0
|
||||
clr.l (a0)+
|
||||
clr.l (a0)
|
||||
bsr RSetKmap
|
||||
|
||||
movem.l (sp)+,@saved ; restore registers
|
||||
rts
|
||||
|
||||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: sendFlush 2ba2a
|
||||
; Arguments: d0.b adb id
|
||||
; Output: none
|
||||
; Function: this routine sends a "flush" command to the adb device at d0.b
|
||||
|
@ -1225,7 +1371,7 @@ CompleteFlush
|
|||
Title 'KbdADB - ADB KeyBoard Driver'
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: KbdDrvr
|
||||
; Routine: KbdDrvr 2ba72
|
||||
; Arguments: D0.B ADB Command
|
||||
; A0 ADB Buffer address
|
||||
; A1 ADB Completion Routine Address (= KbdServ)
|
||||
|
@ -1288,7 +1434,7 @@ KbdDrvr
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: KeyIn
|
||||
; Routine: KeyIn 2ba9e
|
||||
; Arguments: D0.B Raw Keycode
|
||||
; D3.L Device Type, Orig Addr, ADB Addr, Unused
|
||||
; A2 Private data area
|
||||
|
@ -1373,7 +1519,7 @@ NextWord
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: PostIt
|
||||
; Routine: PostIt 2bb2c
|
||||
; Arguments: D0.W ASCII Code
|
||||
; D3.W ADB Address in high byte and raw keycode in low byte
|
||||
; Output: None
|
||||
|
@ -1415,7 +1561,7 @@ PostKeyUp
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; FoundEx
|
||||
; FoundEx 2bb64
|
||||
; An exception exists for this particular keystroke. Process it appropriately.
|
||||
;______________________________________________________________________
|
||||
FoundEx
|
||||
|
@ -1491,7 +1637,7 @@ FoundEx
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: KbdListen
|
||||
; Routine: KbdListen 2bbee
|
||||
; Arguments: D0.B ADB Command
|
||||
; D1.L DeviceType, OrigAddr, ADBAddr, Unused (byte order)
|
||||
; A0 ADB Buffer Address
|
||||
|
@ -1553,7 +1699,7 @@ KbdListen
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; Routine: KbdBufFree
|
||||
; Routine: KbdBufFree 2bc36
|
||||
; Arguments: D0.B ADB Command
|
||||
; D1.L DeviceType, OrigAddr, ADBAddr, Unused (byte order)
|
||||
; A0 ADB Buffer Address
|
||||
|
@ -1573,7 +1719,7 @@ KbdBufFree
|
|||
|
||||
;______________________________________________________________________
|
||||
;
|
||||
; KbdInstall - allocate memory for keyboard information and put in ADB record,
|
||||
; KbdInstall 2bc3c - allocate memory for keyboard information and put in ADB record,
|
||||
; loading resources as necessary.
|
||||
;
|
||||
;______________________________________________________________________
|
||||
|
@ -1606,6 +1752,13 @@ FirstInstall
|
|||
MOVE.L D0, A0
|
||||
MOVE.L (A0), KCHRPtr(A2) ; Dereference and put away
|
||||
|
||||
MOVE.L A1, -(SP)
|
||||
MOVE.L ExpandMem, A1
|
||||
TST.L ExpandMemRec.emKeyCache(A1)
|
||||
BNE.S @no
|
||||
MOVE.L (A0), ExpandMemRec.emKeyCache(A1)
|
||||
@no MOVE.L (SP)+, A1
|
||||
|
||||
SUBQ.L #4, SP ; Make room for result
|
||||
MOVE.L #'KMAP', -(SP) ; ResType = KCHR
|
||||
CLR.W -(SP) ; theID = 0
|
||||
|
@ -1718,6 +1871,7 @@ kchrTableNoLink equ kchrTable-return ; kchrTable offset before link <SM10> r
|
|||
endr
|
||||
|
||||
KeyTrans
|
||||
; 2bcb8
|
||||
;------------------------------------------------------------------------------
|
||||
with ktFrame,SMgrRecord
|
||||
; if SMgr not initialized or no itlk, skip
|
||||
|
@ -1909,7 +2063,7 @@ KeyTrans
|
|||
; Macintosh keyboard mapping hook, which relies on the new KeyTrans trap.
|
||||
; -----------------------------------------------------------------------------
|
||||
|
||||
KeyHook PROC
|
||||
KeyHook PROC EXPORT
|
||||
with ExpandMemRec
|
||||
bra.s SkipHeader ; skip the header.
|
||||
|
||||
|
|
33
OS/Clock.a
33
OS/Clock.a
|
@ -129,7 +129,7 @@ Clock PROC EXPORT
|
|||
IF NOT BlackBirdDebug THEN
|
||||
;_______________________________________________________________________ <1.3>
|
||||
;
|
||||
; Routine: OneSecInt
|
||||
; Routine: OneSecInt 8180
|
||||
;
|
||||
; Arguments: A1 (input) -- Address of VIA1
|
||||
;
|
||||
|
@ -151,7 +151,7 @@ Clock PROC EXPORT
|
|||
;_______________________________________________________________________
|
||||
|
||||
OneSecInt MOVE.B #1<<ifCA2,VIFR(A1) ; clear the interrupt <1.4>
|
||||
ADDQ.L #1,Time ; count the second
|
||||
NOP
|
||||
BCLR #5,AlarmState ; flag GNEFilter to flash if enabled
|
||||
|
||||
TST.B SPVolCtl ; bit 7 is alarm enable
|
||||
|
@ -210,7 +210,7 @@ OneSecInt MOVEA.l A1, A0 ;
|
|||
|
||||
;________________________________________________________________________________________
|
||||
;
|
||||
; Routine: PramIO
|
||||
; Routine: PramIO 81a8
|
||||
;
|
||||
; Inputs: A0 - pointer to table of base addresses
|
||||
; A1 - pointer to ProductInfo record for this machine
|
||||
|
@ -239,7 +239,7 @@ PramIO MOVEM.L D0-D2/A0-A2,-(SP) ; <H2>
|
|||
|
||||
;________________________________________________________________________________________
|
||||
;
|
||||
; Routine: ReadXPRAM, WriteXPRAM
|
||||
; Routine: ReadXPRAM 81c2, WriteXPRAM 81cc
|
||||
;
|
||||
; Inputs: A0 - pointer to caller's buffer
|
||||
; D0 - [number of bytes to transfer][starting PRAM address]
|
||||
|
@ -277,7 +277,7 @@ rwXCommon BTST.B #hwCbClock-8,HWCfgFlags ; do we have a new clock chip (256 PRAM
|
|||
|
||||
;________________________________________________________________________________________ <H2>
|
||||
;
|
||||
; Routine: ValidatePRAM
|
||||
; Routine: ValidatePRAM 81f8
|
||||
;
|
||||
; Inputs: A6 - return address
|
||||
; A0 - pointer to table of base addresses
|
||||
|
@ -322,14 +322,16 @@ ValidatePRAM
|
|||
(8<<0),D3 ; starting at PRAM address 8 <H2>
|
||||
BSR PramIO ; write out the last 4 bytes of original PRAM <H2>
|
||||
|
||||
LEA @other,A3
|
||||
MOVE.L #(1<<31)|\ ; write
|
||||
(1<<16)|\ ; 1 byte
|
||||
(16<<0),D3 ; starting at PRAM address 16
|
||||
BSR PramIO
|
||||
|
||||
@CheckXPRAM LEA @XPRAMSig,A3 ; <H2>
|
||||
MOVE.L 12(SP),D3 ; are the extended PRAM signature bytes valid? <H2>
|
||||
CMP.L (A3),D3 ; <H2>
|
||||
BEQ.S @Done ; -> yes, we're done <H2>
|
||||
MOVE.L #(1<<31)|\ ; write <H2>
|
||||
(4<<16)|\ ; 4 bytes <H2>
|
||||
(12<<0),D3 ; starting at PRAM address 12 <H2>
|
||||
BSR PramIO ; write out the correct extended PRAM signature bytes <H2>
|
||||
|
||||
MOVEA.L SP,A3 ; point to our stack buffer <H2>
|
||||
MOVEQ #(256-32)/4-1,D3 ; and zero each byte <H2>
|
||||
|
@ -337,8 +339,11 @@ ValidatePRAM
|
|||
DBRA D3,@ClearBuf ; <H2>
|
||||
|
||||
BIGLEA PRAMInitTbl,A2 ; point to the table of default extended PRAM values <H2>
|
||||
BIGLEA *+$373c,A3
|
||||
SUB.L A2,A3
|
||||
MOVE.L A3,D3
|
||||
SUB.L #1,D3
|
||||
LEA $76-32(SP),A3 ; and where they'll go in the buffer <H2>
|
||||
MOVEQ #$89-$76,D3 ; copy them into the buffer <H2>
|
||||
@CopyXDefs MOVE.B (A2)+,(A3)+ ; <H2>
|
||||
DBRA D3,@CopyXDefs ; <H2>
|
||||
|
||||
|
@ -348,11 +353,19 @@ ValidatePRAM
|
|||
(32<<0),D3 ; starting at PRAM address 32 <H2>
|
||||
BSR PramIO ; <H2>
|
||||
|
||||
LEA @XPRAMSig,A3
|
||||
MOVE.L #(1<<31)|\ ; write
|
||||
(4<<16)|\ ; 4 bytes
|
||||
(12<<0),D3 ; starting at PRAM address 12
|
||||
BSR PramIO
|
||||
|
||||
@Done
|
||||
LEA 256(SP),SP ; clean up the stack <H2>
|
||||
MOVEM.L (SP)+,D0-D3/A0-A3 ; restore regs from StartINIT <SM5> <8.6>
|
||||
RTS ; <H2>
|
||||
|
||||
@other DC.W $A800
|
||||
|
||||
@XPRAMSig DC.L 'NuMc' ; extended PRAM validity bytes (slot-based machines) <H2>
|
||||
|
||||
|
||||
|
|
169
OS/CrsrDev.a
169
OS/CrsrDev.a
|
@ -100,7 +100,7 @@ _FixDiv OPWORD $A84D
|
|||
CrsrDev PROC
|
||||
|
||||
EXPORT InitCrsrDev,CrsrDevDispatch
|
||||
IMPORT CrsrVBLTask
|
||||
IMPORT CrsrVBLTask,vDrawCursor,vEraseCursor
|
||||
|
||||
WITH CrsrDevGlobals, CrsrDevRec, CrsrDevSegment, CrsrDataRec
|
||||
WITH ADBDeviceEntry, ADBVars, ExpandMemRec
|
||||
|
@ -108,7 +108,7 @@ CrsrDev PROC
|
|||
|
||||
_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevDispatch (trap # $AADB)
|
||||
; Routine: CrsrDevDispatch 82b0 (trap # $AADB)
|
||||
;
|
||||
; Inputs: d0.w - selector
|
||||
; 4(sp) - last parameter
|
||||
|
@ -177,7 +177,7 @@ paramBase equ * ; ptr to base of parameters
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevMoveTrap
|
||||
; Routine: CrsrDevMoveTrap 82ec
|
||||
;
|
||||
; Inputs: 8(a6).l - delta Y
|
||||
; 12(a6).l - delta X
|
||||
|
@ -207,7 +207,7 @@ CrsrDevMoveTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevMoveToTrap
|
||||
; Routine: CrsrDevMoveToTrap 8306
|
||||
;
|
||||
; Inputs: 8(a6).l - V
|
||||
; 12(a6).l - H
|
||||
|
@ -248,7 +248,7 @@ CrsrDevMoveToTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevFlushTrap
|
||||
; Routine: CrsrDevFlushTrap 8334
|
||||
;
|
||||
; Inputs: 8(a6).l - pointer to CrsrDevRec for this device
|
||||
;
|
||||
|
@ -282,7 +282,7 @@ CrsrDevFlushTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevButtonsTrap
|
||||
; Routine: CrsrDevButtonsTrap 8360
|
||||
;
|
||||
; Inputs: 8(a6).w - new button states (1 = down, 0 = up)
|
||||
; 10(a6).l - pointer to CrsrDevRec for this device
|
||||
|
@ -312,7 +312,7 @@ CrsrDevButtonsTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevButtonDownTrap
|
||||
; Routine: CrsrDevButtonDownTrap 8376
|
||||
;
|
||||
; Inputs: 8(a6).l - pointer to CrsrDevRec for this device
|
||||
;
|
||||
|
@ -335,7 +335,7 @@ CrsrDevButtonDownTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevButtonUpTrap
|
||||
; Routine: CrsrDevButtonUpTrap 8388
|
||||
;
|
||||
; Inputs: 8(a6).l - pointer to CrsrDevRec for this device
|
||||
;
|
||||
|
@ -358,7 +358,7 @@ CrsrDevButtonUpTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevButtonOpTrap
|
||||
; Routine: CrsrDevButtonOpTrap 839a
|
||||
;
|
||||
; Inputs: 8(a6).l - Operation specific data
|
||||
; 12(a6).w - Operation code
|
||||
|
@ -388,7 +388,7 @@ CrsrDevButtonOpTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevSetButtonsTrap
|
||||
; Routine: CrsrDevSetButtonsTrap 83ba
|
||||
;
|
||||
; Inputs: 8(a6).w - # buttons for this device
|
||||
; 10(a6).l - pointer to CrsrDevRec for this device
|
||||
|
@ -413,7 +413,7 @@ CrsrDevSetButtonsTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevSetAccelTrap
|
||||
; Routine: CrsrDevSetAccelTrap 83ce
|
||||
;
|
||||
; Inputs: 8(a6).l - acceleration (Fixed)
|
||||
; 12(a6).l - pointer to CrsrDevRec for this device
|
||||
|
@ -440,7 +440,7 @@ CrsrDevSetAccelTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevDoubleTimeTrap
|
||||
; Routine: CrsrDevDoubleTimeTrap 83e4
|
||||
;
|
||||
; Inputs: 8(a6).l - duration (ticks)
|
||||
; 12(a6).l - pointer to CrsrDevRec for this device
|
||||
|
@ -468,7 +468,7 @@ CrsrDevDoubleTimeTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevSetUnitsPerInchTrap
|
||||
; Routine: CrsrDevSetUnitsPerInchTrap 83f8
|
||||
;
|
||||
; Inputs: 8(a6).l - resolution (fixed)
|
||||
; 12(a6).l - pointer to CrsrDevRec for this device
|
||||
|
@ -500,7 +500,7 @@ CrsrDevSetUnitsPerInchTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevNextDeviceTrap
|
||||
; Routine: CrsrDevNextDeviceTrap 8414
|
||||
;
|
||||
; Inputs: 8(a6).l - VAR ptr to CrsrDevRec
|
||||
;
|
||||
|
@ -539,7 +539,7 @@ CrsrDevNextDeviceTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevNewDeviceTrap
|
||||
; Routine: CrsrDevNewDeviceTrap 843c
|
||||
;
|
||||
; Inputs: 8(a6).l - VAR pointer to CrsrDevRec
|
||||
;
|
||||
|
@ -566,7 +566,7 @@ CrsrDevNewDeviceTrap
|
|||
|
||||
;====================================================================
|
||||
;
|
||||
; Routine: CrsrDevDisposeDevTrap
|
||||
; Routine: CrsrDevDisposeDevTrap 8450
|
||||
;
|
||||
; Inputs: 8(a6).l - pointer to CrsrDevRec for this device
|
||||
;
|
||||
|
@ -594,7 +594,7 @@ CrsrDevDisposeDevTrap
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevHandleADB
|
||||
; Routine: CrsrDevHandleADB 8462
|
||||
;
|
||||
; Inputs: a0 - pointer to mouse data
|
||||
; a2 - pointer to CrsrDevRec for this device
|
||||
|
@ -741,7 +741,7 @@ CrsrDevHandleADB
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevMove
|
||||
; Routine: CrsrDevMove 854e
|
||||
;
|
||||
; Inputs: d0.l - delta X
|
||||
; d1.l - delta Y
|
||||
|
@ -843,7 +843,7 @@ CrsrDevMove
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevButtons
|
||||
; Routine: CrsrDevButtons 85ee
|
||||
;
|
||||
; Inputs: d0.b - new button states (1 = down, 0 = up)
|
||||
; a2 - pointer to CrsrDevRec for this device
|
||||
|
@ -934,20 +934,20 @@ doDouble
|
|||
|
||||
;---------------------------------------------------------
|
||||
doClickLock
|
||||
tst.b buttonData(a2,d3.w) ; is this the 1st time?
|
||||
tst.b buttonData(a2,d2.w) ; is this the 1st time?
|
||||
bne.s @secondHit ; no, skip
|
||||
btst.b d3,buttons(a2) ; are we down?
|
||||
beq.s @firstUp ; no, skip
|
||||
bsr.s CrsrDevButtonDown ; yes, generate button down event
|
||||
bra.s @done
|
||||
|
||||
@firstUp st.b buttonData(a2,d3.w) ; first up, mark it
|
||||
@firstUp st.b buttonData(a2,d2.w) ; first up, mark it
|
||||
bra.s @done
|
||||
|
||||
@secondHit btst.b d3,buttons(a2) ; are we up (2nd time)?
|
||||
bne.s @done ; no, do nothing...
|
||||
bsr.s CrsrDevButtonUp ; yes, post up event
|
||||
clr.b buttonData(a2,d3.w) ; mark that we're really up
|
||||
clr.b buttonData(a2,d2.w) ; mark that we're really up
|
||||
@done rts
|
||||
|
||||
|
||||
|
@ -963,13 +963,13 @@ doAppleScript
|
|||
|
||||
;---------------------------------------------------------
|
||||
doCustom
|
||||
pea buttonData(a2) ; push our custom routine address
|
||||
move.l buttonData(a2,d2.w),-(sp) ; push our custom routine address
|
||||
rts ; and call it.
|
||||
|
||||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevButtonDown
|
||||
; Routine: CrsrDevButtonDown 86a4
|
||||
;
|
||||
; Inputs: a2 - pointer to CrsrDevRec for this device
|
||||
;
|
||||
|
@ -1009,7 +1009,7 @@ CrsrDevButtonDown
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevButtonUp
|
||||
; Routine: CrsrDevButtonUp 86e4
|
||||
;
|
||||
; Inputs: a2 - pointer to CrsrDevRec for this device
|
||||
;
|
||||
|
@ -1051,7 +1051,7 @@ CrsrDevButtonUp
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevSetAccel
|
||||
; Routine: CrsrDevSetAccel 8720
|
||||
;
|
||||
; Inputs: a2 - pointer to CrsrDevRec for device we want to set
|
||||
; d0 - acceleration to set (0-1, fixed point)
|
||||
|
@ -1102,7 +1102,21 @@ CrsrDevSetAccel
|
|||
; first find the two tables which enclose the desired acceleration
|
||||
;----------------------------------------------
|
||||
|
||||
@foundIt move.l acceleration(a2),d3 ; get new acceleration in d3
|
||||
@foundIt Move.B $85(A2), D3
|
||||
BEQ.B @endofthing
|
||||
Clr -(SP)
|
||||
Move.L #'accl', -(A7)
|
||||
Move #$FFFF, (ROMMapInsert)
|
||||
_CountResources
|
||||
Move (SP)+, D3
|
||||
Move.L #'USB*', D4
|
||||
Bsr FindResource
|
||||
BEQ.B @endofthing
|
||||
MoveQ.L #$0, D4
|
||||
Bsr FindResource
|
||||
@endofthing
|
||||
|
||||
move.l acceleration(a2),d3 ; get new acceleration in d3
|
||||
move.w (a0)+,d2 ; get # of acceleration tables in resource
|
||||
move.l a0,a1 ; keep ptr to 'low' accel table in a1
|
||||
|
||||
|
@ -1316,7 +1330,7 @@ CrsrDevSetAccel
|
|||
|
||||
;------------------------------------------------
|
||||
;
|
||||
; Routine: FindResource
|
||||
; Routine: FindResource 8906
|
||||
;
|
||||
; Inputs: d3 - # of 'accl' resources to search
|
||||
; d4 - 'accl' resource tag we're looking for
|
||||
|
@ -1353,7 +1367,7 @@ FindResource
|
|||
|
||||
;------------------------------------------------
|
||||
;
|
||||
; Routine: Interpolate
|
||||
; Routine: Interpolate 892e
|
||||
;
|
||||
; Inputs: 18(sp) - x1
|
||||
; 14(sp) - y1
|
||||
|
@ -1437,7 +1451,7 @@ Interpolate
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevHandleVBL
|
||||
; Routine: CrsrDevHandleVBL 8992
|
||||
;
|
||||
; Inputs: -
|
||||
;
|
||||
|
@ -1456,6 +1470,9 @@ CrsrDevHandleVBL
|
|||
|
||||
movea.l ExpandMem,a3 ; get ptr to expandmem rec
|
||||
movea.l emCursorGlobals(a3),a3 ; get cursory global ptr
|
||||
tst.l a3
|
||||
beq @exit
|
||||
|
||||
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
|
||||
|
@ -1664,7 +1681,7 @@ CrsrDevHandleVBL
|
|||
|
||||
;_______________________________________________________________________ <H15>
|
||||
;
|
||||
; Routine: DrawCursor
|
||||
; Routine: DrawCursor 8b38
|
||||
;
|
||||
; Inputs: a3 - ptr to CrsrDevGlobals
|
||||
;
|
||||
|
@ -1691,6 +1708,7 @@ DrawCursor movea.l firstCrsrData(a3),a4 ; get ptr to main CrsrDataRec <H15>
|
|||
bne.s @exit ; yesÉ exit
|
||||
|
||||
lea CrsrPin,a0 ; it's ok to update cursor, get bounding rect
|
||||
move.l d0,-(sp)
|
||||
BSR.L CrsrVBLTask ; pin and draw the cursor
|
||||
|
||||
move.l Mouse,d0 ; has cursor been pinned?
|
||||
|
@ -1730,7 +1748,7 @@ DrawCursor movea.l firstCrsrData(a3),a4 ; get ptr to main CrsrDataRec <H15>
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevNewDevice
|
||||
; Routine: CrsrDevNewDevice 8bb8
|
||||
;
|
||||
; Inputs: ...
|
||||
;
|
||||
|
@ -1827,7 +1845,7 @@ CrsrDevNewDevice
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevDisposeDev
|
||||
; Routine: CrsrDevDisposeDev 8c6e
|
||||
;
|
||||
; Inputs: a2 - pointer to CrsrDevRec for device we want to remove
|
||||
;
|
||||
|
@ -1850,6 +1868,7 @@ CrsrDevDisposeDev
|
|||
@loop cmpa.l a1,a2 ; is this the linked list element we want?
|
||||
beq.s @gotIt ; yes, handle it
|
||||
move.l a1,d1 ; no, prev := next
|
||||
beq.s @exit
|
||||
move.l nextCrsrDev(a1),d0 ; get next->nextCrsrDev
|
||||
beq.s @exit ; exit if NIL (we never found it)
|
||||
move.l d0,a1 ; next := next->nextCrsrDev
|
||||
|
@ -1859,8 +1878,10 @@ CrsrDevDisposeDev
|
|||
tst.l d1 ; was it the first one?
|
||||
beq.s @firstOne ; yes, handle special case
|
||||
|
||||
move.l a2,d0
|
||||
move.l d1,a2
|
||||
move.l a1,nextCrsrDev(a2) ; else, delete our element from middle of list
|
||||
move.l d0,a2
|
||||
bra.s @dispose
|
||||
|
||||
@firstOne move.l a1,firstCrsrDev(a0)
|
||||
|
@ -1879,7 +1900,7 @@ CrsrDevDisposeDev
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: CrsrDevReInit
|
||||
; Routine: CrsrDevReInit 8cae
|
||||
;
|
||||
; Inputs: d0 - 0 = pre-init, 1=post-init
|
||||
;
|
||||
|
@ -1912,6 +1933,7 @@ CrsrDevReInit ; <H14>
|
|||
|
||||
movem.l d0-d3/a0-a3,-(sp)
|
||||
link a6,#adbPBSize ; Make a stack frame for our param block
|
||||
tst d0
|
||||
bne.s @PostInit ; Skip if post-processing
|
||||
|
||||
;---------------------
|
||||
|
@ -2106,7 +2128,7 @@ CrsrDevReInit ; <H14>
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: syncADBTalk
|
||||
; Routine: syncADBTalk 8e7c
|
||||
;
|
||||
; Inputs: d0 - address/command byte
|
||||
; a0 - ptr to receive buffer
|
||||
|
@ -2120,7 +2142,9 @@ CrsrDevReInit ; <H14>
|
|||
;_______________________________________________________________________
|
||||
|
||||
syncADBTalk
|
||||
@restart
|
||||
move.l a0,-(sp) ; save ptr to our buffer
|
||||
move.l d0,-(sp)
|
||||
clr.w -(sp) ; our 'sync' flag
|
||||
|
||||
move.l sp,a1 ; keep pointer to globals for later
|
||||
|
@ -2129,18 +2153,23 @@ syncADBTalk
|
|||
move.l a0,-(sp) ; push pointer to our reply buffer
|
||||
move.l sp,a0
|
||||
_ADBOp
|
||||
bmi.s @weird
|
||||
|
||||
@spin tst.b (a1) ; have we completed?
|
||||
beq.s @spin ; no, keep waiting
|
||||
|
||||
lea 14(sp),sp ; dump locals
|
||||
lea 18(sp),sp ; dump locals
|
||||
move.l (sp)+,a0 ; restore a0
|
||||
rts
|
||||
|
||||
@weird lea.l $e(sp),sp
|
||||
move.l (sp)+,d0
|
||||
move.l (sp)+,a0
|
||||
bra.s @restart
|
||||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: syncADBListen
|
||||
; Routine: syncADBListen 8ea8
|
||||
;
|
||||
; Inputs: d0 - address/command byte
|
||||
; a0 - ptr to transmit buffer
|
||||
|
@ -2154,6 +2183,8 @@ syncADBTalk
|
|||
;_______________________________________________________________________
|
||||
|
||||
syncADBListen
|
||||
@restart
|
||||
movem.l d0/a0,-(sp)
|
||||
clr.w -(sp) ; our 'sync' flag
|
||||
move.l sp,a1 ; keep pointer to data area for later
|
||||
move.l sp,-(sp) ; push pointer to data area
|
||||
|
@ -2161,17 +2192,21 @@ syncADBListen
|
|||
move.l a0,-(sp) ; push ptr to data to send
|
||||
move.l sp,a0
|
||||
_ADBOp
|
||||
bmi.s @weird
|
||||
|
||||
@spin tst.b (a1) ; have we completed?
|
||||
beq.s @spin ; no, keep waiting
|
||||
|
||||
lea 14(sp),sp ; dump locals
|
||||
lea 22(sp),sp ; dump locals
|
||||
rts
|
||||
|
||||
|
||||
@weird lea.l $e(sp),sp
|
||||
movem.l (sp)+,d0/a0
|
||||
bra.s @restart
|
||||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: syncComp
|
||||
; Routine: syncComp 8ed2
|
||||
;
|
||||
; Inputs: d0 - ADB command byte
|
||||
; a0 - ptr to data (pascal string)
|
||||
|
@ -2192,7 +2227,7 @@ syncComp st.b (a2) ; set our complete flag
|
|||
|
||||
;_______________________________________________________________________
|
||||
;
|
||||
; Routine: InitCrsrDev
|
||||
; Routine: InitCrsrDev 8ed6
|
||||
;
|
||||
; Inputs: -
|
||||
;
|
||||
|
@ -2246,7 +2281,7 @@ InitCrsrDev
|
|||
|
||||
;______________________________________________________________________________ <H15>
|
||||
;
|
||||
; Routine: SetCrsrDelay
|
||||
; Routine: SetCrsrDelay 8f22
|
||||
;
|
||||
; Inputs: a1 contains the ptr to the cursor gDevice being setup
|
||||
;
|
||||
|
@ -2278,7 +2313,7 @@ SetCrsrDelay
|
|||
|
||||
;______________________________________________________________________________ <H15>
|
||||
;
|
||||
; Routine: SetCrsrDelCore
|
||||
; Routine: SetCrsrDelCore 8f3c
|
||||
;
|
||||
; Inputs: a1 contains the ptr to the cursor gDevice being setup
|
||||
;
|
||||
|
@ -2296,6 +2331,22 @@ SetCrsrDelCore
|
|||
rts ; just a hook for now
|
||||
|
||||
|
||||
NewCrsrFunction
|
||||
; 8f3e
|
||||
Move.L (DeviceList), D0
|
||||
@loop BEQ.B @done
|
||||
MoveA.L D0, A0
|
||||
CmpA.L D1, A0
|
||||
BNE.B @moredone
|
||||
MoveA.L (A0), A0
|
||||
Move.L $1E(A0), D0
|
||||
Bra.B @loop
|
||||
@done SubA.L A0, A0
|
||||
@moredone Move.L A0, D1
|
||||
Rts
|
||||
|
||||
|
||||
|
||||
;_____________________________________________________________________________________________ <H15>
|
||||
; VDrawCursor - default DrawCursor routine
|
||||
;
|
||||
|
@ -2304,23 +2355,10 @@ SetCrsrDelCore
|
|||
; the routine InitCrsrVects.
|
||||
;
|
||||
|
||||
EXPORT VDrawCursor
|
||||
IMPORT BLITCURSOR ;from ccrsrcore.a
|
||||
VDrawCursor
|
||||
MOVE.B #1,CRSRBUSY ;MARK CHANGE IN PROGRESS
|
||||
|
||||
TST CRSRSTATE
|
||||
BMI.S DoneSho ;QUIT IF STILL HIDDEN
|
||||
CLR CRSRSTATE ;DON'T LET CRSRSTATE GET > 0
|
||||
TST.B CRSRVIS ;IS CURSOR ALREADY VISIBLE?
|
||||
BNE.S DoneSho ;YES, DON'T TRY TO REDRAW
|
||||
TST.B CrsrObscure ;Skip if obscured
|
||||
BNE.S DoneSho
|
||||
VDrawCursor PROC EXPORT
|
||||
|
||||
BSR.L BLITCURSOR ;Do the real work: put pixels up
|
||||
|
||||
DoneSho CLR.B CRSRBUSY ;CHANGE COMPLETE
|
||||
RTS
|
||||
IMPORT QD_DRAWCURSOR
|
||||
BRA.L QD_DRAWCURSOR
|
||||
|
||||
|
||||
;______________________________________________________________________________________________ <H15>
|
||||
|
@ -2331,16 +2369,9 @@ DoneSho CLR.B CRSRBUSY ;CHANGE COMPLETE
|
|||
; the routine InitCrsrVects.
|
||||
;
|
||||
|
||||
EXPORT VEraseCursor
|
||||
IMPORT UNBLITCURSOR ;from ccrsrcore.a
|
||||
VEraseCursor
|
||||
MOVE.B #1,CRSRBUSY ;MARK CHANGE IN PROGRESS
|
||||
TST.B CRSRVIS ;IS CURSOR VISIBLE?
|
||||
BEQ.S DoneHid ;NO, DON'T TRY TO REMOVE IT
|
||||
|
||||
BSR.L UNBLITCURSOR ;Zap Pixels
|
||||
VEraseCursor PROC EXPORT
|
||||
|
||||
DoneHid CLR.B CRSRBUSY ;CHANGE COMPLETE
|
||||
RTS
|
||||
IMPORT QD_ERASECURSOR
|
||||
BRA.L QD_ERASECURSOR
|
||||
|
||||
END
|
230
OS/CudaMgr.a
230
OS/CudaMgr.a
|
@ -208,7 +208,7 @@ ErrCudaInit equ $0030 ; TEMPORARY definition of error equate defined in STEQ
|
|||
WITH EgretGlobals,EgretPB,RespHeader
|
||||
eject ; { With
|
||||
;________________________________________________________________________________________________
|
||||
; Routine: CudaDispatch
|
||||
; Routine: CudaDispatch 8f90
|
||||
;
|
||||
; Function: This is the Cuda manager trap routine. It waits for Cuda to be idle, sends
|
||||
; the first byte of the command packet. If Cuda didn't abort, then it sets up
|
||||
|
@ -271,6 +271,48 @@ CudaDispatch
|
|||
bra @done
|
||||
|
||||
@CudaRestart
|
||||
CmpI #$10C, (A0)
|
||||
BEQ.B @L4
|
||||
CmpI #$107, (A0)
|
||||
BNE.B @endChicanery
|
||||
Tst.B $64(A2)
|
||||
BEQ @endChicanery
|
||||
|
||||
@L4 CmpI #$100, $2(A0)
|
||||
BLT.B @L5
|
||||
Move #$FFCE, $E(A0)
|
||||
Bra @done
|
||||
|
||||
@L5 Lea.L $66(A2), A2
|
||||
Move $6(A0), D1
|
||||
BEQ @L9
|
||||
SubQ #$1, D1
|
||||
MoveQ.L #$0, D2
|
||||
Move $2(A0), D2
|
||||
MoveA.L $8(A0), A1
|
||||
|
||||
@L6 CmpI.B #$7, $1(A0)
|
||||
BEQ.B @L7
|
||||
Move.B (A1)+, $0(A2,D2.W)
|
||||
Bra.B @L8
|
||||
|
||||
@L7 Move.B $0(A2,D2.W), (A1)+
|
||||
|
||||
@L8 AddQ #$1, D2
|
||||
AndI #$FF, D2
|
||||
DBF D1, @L6
|
||||
|
||||
@L9 MoveA.L ($DE0), A2
|
||||
MoveA.L ($1D4), A1
|
||||
CmpI.B #$C, $1(A0)
|
||||
BEQ.B @endChicanery
|
||||
Tst.L $10(A0)
|
||||
BEQ @done
|
||||
MoveA.L $10(A0), A1
|
||||
Jsr (A1)
|
||||
Bra @done
|
||||
|
||||
@endChicanery
|
||||
move.w sr,-(sp) ; save SR
|
||||
ori.w #hiIntMask,sr ; mask interrupts
|
||||
|
||||
|
@ -285,17 +327,21 @@ CudaDispatch
|
|||
|
||||
@abort move.w (sp)+,sr ; we were busy, enable interrupts
|
||||
jsr pollByte ; poll shift reg, calling handler if interrupts masked
|
||||
bra.s @CudaRestart ; and keep waiting for busy to go away...
|
||||
bra.s @endChicanery ; and keep waiting for busy to go away...
|
||||
|
||||
@sendPackType ; interrupts masked here
|
||||
eieioSTP
|
||||
bset.b #SRdir,vACR(a1) ; switch to output, Define direction FROM System
|
||||
nop
|
||||
eieioSTP
|
||||
move.b pbCmdType(a0),vSR(a1) ; send command packet to shift reg
|
||||
nop
|
||||
eieioSTP
|
||||
bset.b #vByteAck,vBufB(a1) ; make sure state is idle before transaction
|
||||
nop
|
||||
eieioSTP
|
||||
bclr.b #TIP,vBufB(a1) ; assert TIP (we're starting command packet)
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
;
|
||||
|
@ -303,7 +349,7 @@ CudaDispatch
|
|||
; When the shift register irq comes in call the PollProc
|
||||
; then process the shift register irq data
|
||||
;
|
||||
movem.l d0/d1/a0-a4/a6,-(sp) ; save some registers
|
||||
movem.l d0-d3/a0-a4/a6,-(sp) ; save some registers
|
||||
move.l PollStack,-(sp) ; save previous poll stack
|
||||
lea @zero, a3
|
||||
move.l sp,PollStack ; Pointer to buffer for polled bytes
|
||||
|
@ -323,6 +369,7 @@ CudaDispatch
|
|||
beq.s @2
|
||||
move.b (a6),-(sp) ; Push the data on the stack
|
||||
@2
|
||||
bsr.l otherDelay
|
||||
eieioSTP
|
||||
btst.b #vShift,vIFR(a1) ; now wait for shift reg IRQ
|
||||
eieioSTP
|
||||
|
@ -341,7 +388,7 @@ CudaDispatch
|
|||
|
||||
@NoSCCData
|
||||
move.l (sp)+,PollStack ; restore previous poll stack
|
||||
movem.l (sp)+,d0/d1/a0-a4/a6 ; restore work registers
|
||||
movem.l (sp)+,d0-d3/a0-a4/a6 ; restore work registers
|
||||
eieioSTP
|
||||
btst.b #TReq,vBufB(a1) ; did CUDA abort?
|
||||
eieioSTP
|
||||
|
@ -353,22 +400,24 @@ CudaDispatch
|
|||
; of CB1. Delay long enough for the edge to occur before acknowledging the shift
|
||||
; register interrupt. (R. Montagne 1/11/93)
|
||||
;________________________________________________________________________________________________
|
||||
moveq #10,d0 ; delay for 10µS min.
|
||||
move $d00,d0
|
||||
divu #$50,d0
|
||||
@mode7delay
|
||||
eieioSTP
|
||||
tst.b vBufB(a1) ; 1.2µS per access
|
||||
eieioSTP
|
||||
dbra d0,@mode7delay
|
||||
|
||||
eieioSTP
|
||||
bclr.b #SRdir,vACR(a1) ; yes, switch back to input
|
||||
nop
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; clear pending shift register interrupt
|
||||
nop
|
||||
eieioSTP
|
||||
ori.b #((1<<TIP)|\ ; abort the current transaction
|
||||
(1<<vByteAck)),vBufB(a1) ;
|
||||
nop
|
||||
eieioSTP
|
||||
@abortAck
|
||||
bsr.l otherDelay
|
||||
eieioSTP
|
||||
btst.b #ifSR,vIFR(a1) ; now wait for shift reg IRQ to acknowledge abort
|
||||
eieioSTP
|
||||
|
@ -394,7 +443,7 @@ CudaDispatch
|
|||
rts
|
||||
|
||||
;________________________________________________________________________________________________
|
||||
; Routine: PollByte
|
||||
; Routine: PollByte 914e
|
||||
;
|
||||
; Function: This routine checks to see if level 1 interrupts are masked, exits if not.
|
||||
; If masked, it polls the flag register for a shift reg interrupt, and
|
||||
|
@ -412,6 +461,7 @@ PollByte
|
|||
move.w sr,d0 ; get 68xxx interrupt mask
|
||||
andi.w #hiIntMask,d0 ; are we at interrupt level?
|
||||
beq.s @exit ; no, just exit
|
||||
bsr.l otherDelay
|
||||
eieioSTP
|
||||
btst.b #ifSR,vIFR(a1) ; yes, poll the shift reg
|
||||
eieioSTP
|
||||
|
@ -421,7 +471,7 @@ PollByte
|
|||
|
||||
|
||||
;________________________________________________________________________________________________
|
||||
; Routine: SendByte
|
||||
; Routine: SendByte 9168
|
||||
;
|
||||
; Function: This routine transmits a byte by writing to the via shift register and
|
||||
; then changes the state of vByteAck to indicate that the via shift register
|
||||
|
@ -438,8 +488,10 @@ PollByte
|
|||
SendByte
|
||||
eieioSTP
|
||||
move.b d0,vSR(a1) ; send the byte to the shift reg
|
||||
nop
|
||||
eieioSTP
|
||||
eori.b #1<<vByteAck,vBufB(a1) ; let Cuda know it's there
|
||||
nop
|
||||
eieioSTP
|
||||
rts
|
||||
|
||||
|
@ -456,7 +508,7 @@ CudaCallShiftRegIRQ
|
|||
|
||||
|
||||
;________________________________________________________________________________________________
|
||||
; Routine: CudaShiftRegIRQ
|
||||
; Routine: CudaShiftRegIRQ 9176
|
||||
;
|
||||
; Function: This routine is called in response to a VIA shift reg interrupt. It will transfer
|
||||
; the next byte in the current packet. When the packet is complete, the globals are
|
||||
|
@ -492,27 +544,34 @@ CudaCallShiftRegIRQ
|
|||
CudaShiftRegIRQ
|
||||
move.w sr,d3
|
||||
ori.w #hiIntMask,sr ; mask interrupts <LW8><LW5>
|
||||
movea.l EgretBase,a2 ; get ptr to globals <13>
|
||||
bset.b #busy,flags(a2) ; make sure we're marked as busy
|
||||
|
||||
eieioSTP
|
||||
btst.b #SRdir,vACR(a1) ; see if VIA direction is output
|
||||
eieioSTP
|
||||
beq.s @input ; no, then we're receiving..
|
||||
|
||||
btst.b #vShift,vIFR(a1)
|
||||
bne.s @output
|
||||
|
||||
move.w d3,sr ; restore interrupts
|
||||
rts
|
||||
|
||||
;________________________________________________________________________________________________
|
||||
; When outputing from the VIA to Cuda, the interrupt will occur prior to the rising edge
|
||||
; of CB1. Delay long enough for the edge to occur before acknowledging the shift
|
||||
; register interrupt. (R. Montagne 1/11/93)
|
||||
;________________________________________________________________________________________________
|
||||
moveq #10,d0 ; delay for 10µS min. <LW2><VIA rbm>
|
||||
|
||||
@output
|
||||
movea.l EgretBase,a2 ; get ptr to globals <13>
|
||||
bset.b #busy,flags(a2) ; make sure we're marked as busy
|
||||
|
||||
btst.b #$4, $1600(A1)
|
||||
beq.s * + $60 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
move $d00,d0
|
||||
divu #$50,d0
|
||||
@mode7delay
|
||||
eieioSTP
|
||||
tst.b vBufB(a1) ; 1.2µS per access <LW2><VIA rbm>
|
||||
eieioSTP
|
||||
dbra d0,@mode7delay ; <LW2><VIA rbm>
|
||||
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; clear the shift reg interrupt
|
||||
nop
|
||||
eieioSTP
|
||||
tst.w sendHdrCnt(a2) ; any bytes left in header?
|
||||
ble.s @ckSendData ; no, see if any send bytes left...
|
||||
|
@ -535,6 +594,7 @@ CudaShiftRegIRQ
|
|||
@CmdFinished
|
||||
eieioSTP
|
||||
bclr.b #SRdir,vACR(a1) ; now switch to input
|
||||
nop
|
||||
eieioSTP
|
||||
;________________________________________________________________________________________________
|
||||
; When changing VIA direction, a clock can be generated to the VIA bit counter. An
|
||||
|
@ -548,12 +608,14 @@ CudaShiftRegIRQ
|
|||
eieioSTP
|
||||
ori.b #((1<<TIP)| \ ; terminate transaction
|
||||
(1<<vByteAck)),vBufB(a1) ; and set idle state
|
||||
nop
|
||||
eieioSTP
|
||||
bra @exit ; and exit
|
||||
|
||||
@input ;-----------------------------------------------------------------------------
|
||||
eieioSTP
|
||||
move.b vSR(a1),d0 ; read the byte from shift reg into D0
|
||||
nop
|
||||
eieioSTP
|
||||
tst.w rcvHdrCnt(a2) ; any bytes left in response packet header?
|
||||
ble.s @ckRcvData ; if not then must be data byte
|
||||
|
@ -612,7 +674,7 @@ CudaShiftRegIRQ
|
|||
cmp.b #((1<<TIP)|\ ; is this an idle acknowledge?
|
||||
(1<<vByteAck)|\
|
||||
(1<<TReq)),d0
|
||||
beq.s @done ; yes, dont handshake.
|
||||
beq @done ; yes, dont handshake.
|
||||
|
||||
cmp.b #((1<<TIP)|\ ; is this an attention byte?
|
||||
(1<<vByteAck)|\
|
||||
|
@ -629,12 +691,14 @@ CudaShiftRegIRQ
|
|||
@dataIrq
|
||||
eieioSTP
|
||||
eori.b #1<<vByteAck,vBufB(a1) ; acknowledge the current byte
|
||||
nop
|
||||
eieioSTP
|
||||
bra @exit ;
|
||||
|
||||
@attnIrq
|
||||
eieioSTP
|
||||
bclr.b #TIP,vBufB(a1) ; start the response packet transaction
|
||||
nop
|
||||
eieioSTP
|
||||
bra @exit ;
|
||||
|
||||
|
@ -642,6 +706,7 @@ CudaShiftRegIRQ
|
|||
eieioSTP
|
||||
ori.b #((1<<TIP)|\ ; no, terminate the response packet transaction
|
||||
(1<<vByteAck)),vBufB(a1)
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
|
@ -656,11 +721,13 @@ CudaShiftRegIRQ
|
|||
; <SM6> (rbm)
|
||||
@waitIdleAck ; <SM6> (rbm)
|
||||
eieioSTP
|
||||
bsr.l otherDelay
|
||||
btst.b #ifSR,vIFR(a1) ; wait for idle state acknowledgement <SM6> (rbm)
|
||||
eieioSTP
|
||||
beq.s @waitIdleAck ; <SM6> (rbm)
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; clear the shift reg interrupt <SM6> (rbm)
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
|
@ -806,7 +873,7 @@ CudaShiftRegIRQ
|
|||
Eject
|
||||
|
||||
;________________________________________________________________________________________________
|
||||
; Routine: SetTransferParams
|
||||
; Routine: SetTransferParams 93e0
|
||||
;
|
||||
; Function: This routine sets up transmit/receive ptrs (globals) for the packet pointed to by A0,
|
||||
; for use by the Shift Reg interrupt handler.
|
||||
|
@ -850,7 +917,9 @@ SetTransferParams
|
|||
clr.l sendDataPtr(a2) ; no extended data ptr <12>
|
||||
bra @rcvParams
|
||||
|
||||
@notDFAC cmp.b #RdWrIIC,pbCmd(a0) ; check for IIC transaction <SM3>
|
||||
@notDFAC cmp.b #$25,pbCmd(a0)
|
||||
beq @dontjump
|
||||
cmp.b #RdWrIIC,pbCmd(a0) ; check for IIC transaction <SM3>
|
||||
bne.s @notRdWrIIC ; use the table if not RdWrIIC <SM3>
|
||||
*
|
||||
* Here is how the transfer globals are set up for IIC transactionsÉ
|
||||
|
@ -885,21 +954,30 @@ SetTransferParams
|
|||
* RespData ¥ RespData ¥
|
||||
* curPB CudaPB curPB CudaPB
|
||||
*
|
||||
@dontjump
|
||||
move.w pbByteCnt(a0),d1 ; RdWrIIC uses byte count for send portion <SM3>
|
||||
addq.w #1,d1 ; include the packet byte already sent <SM3>
|
||||
move.w d1,sendHdrCnt(a2) ; set up header byte count <SM3>
|
||||
move.w #4,rcvHdrCnt(a2) ; 4 byte header default <SM3>
|
||||
clr.w rcvHdrIndex(a2) ; reset index into header buffer <SM3>
|
||||
move.l pbBufPtr(a0),a1 ; get address of data buffer <SM3>
|
||||
btst.b #0,pbParam(a0) ; is this a read or write IIC operation? <SM3>
|
||||
bne.s @doIICread ; <SM3>
|
||||
|
||||
cmp.b #RdWrIIC,pbCmd(a0)
|
||||
beq.s @doIICwrite
|
||||
|
||||
btst.b #0,4(a0)
|
||||
bne.s @doIICread
|
||||
@doIICwrite ; <SM3>
|
||||
btst.b #0,pbParam(a0)
|
||||
bne.s @doIICread
|
||||
|
||||
moveq #0,d1 ; data phase count must be 1 to 256 <SM3>
|
||||
move.b (a1),d1 ; <SM3>
|
||||
bne.s @wrCntOK ; <SM3>
|
||||
move.w #$0100,d1 ; <SM3>
|
||||
@wrCntOK ; <SM3>
|
||||
move.w d1,sendDataCnt(a2) ; number of extended data bytes to send <SM3>
|
||||
@newlbl
|
||||
adda.l #1,a1 ; <SM3>
|
||||
move.l a1,sendDataPtr(a2) ; extended data ptr <SM3>
|
||||
clr.w rcvDataCnt(a2) ; no data to receive on IIC write <SM3>
|
||||
|
@ -1001,7 +1079,7 @@ CheckCudaPacket
|
|||
|
||||
|
||||
;________________________________________________________________________________________________
|
||||
; Routine: CudaTickHandler
|
||||
; Routine: CudaTickHandler 9566
|
||||
;
|
||||
; Function: This is the completion routine for tick response packets.
|
||||
;
|
||||
|
@ -1063,7 +1141,7 @@ CudaTickHandler
|
|||
ENDWITH ; }
|
||||
|
||||
;=========================================================================
|
||||
; Routine: CudaInit
|
||||
; Routine: CudaInit 9584
|
||||
;
|
||||
; This routine sends a NOP/WarmStart command to Cuda. This routine is
|
||||
; called early during rom Startup to stop autopoll and 1 sec irq. Also,
|
||||
|
@ -1118,6 +1196,7 @@ CudaInit
|
|||
eieioSTP
|
||||
ori.b #((1<<TIP)| \ ; terminate transaction <SM3>
|
||||
(1<<vByteAck)),vBufB(a2) ; and set idle state <SM3> <SM9>
|
||||
nop
|
||||
eieioSTP
|
||||
move.l #hw4msDelay,d4 ; we want to delay 4 millisecs for ADB reset to complete <SM3>
|
||||
@killtime
|
||||
|
@ -1139,10 +1218,12 @@ CudaInit
|
|||
@noX
|
||||
eieioSTP
|
||||
tst.b vSR(a2) ; clear the pending interrupt <SM9>
|
||||
nop
|
||||
eieioSTP
|
||||
move.l #hw10msDelay,d4 ; Timeout values must exceed duration of maximum ADB auto poll. <7>
|
||||
eieioSTP
|
||||
bclr.b #vByteAck,vBufB(a2) ; issue a sync state (TIP = negated, ByteAck = asserted) <SM9>
|
||||
nop
|
||||
eieioSTP
|
||||
@waitSync
|
||||
eieioSTP
|
||||
|
@ -1161,6 +1242,7 @@ CudaInit
|
|||
@haveSync move.l #hw10msDelay,d4 ; number of retries before giving up with Cuda
|
||||
eieioSTP
|
||||
bset.b #vByteAck,vBufB(a2) ; terminate the sync cycle <SM9>
|
||||
nop
|
||||
eieioSTP
|
||||
@syncTerm
|
||||
eieioSTP
|
||||
|
@ -1172,6 +1254,7 @@ CudaInit
|
|||
@haveTerm
|
||||
eieioSTP
|
||||
tst.b vSR(a2) ; clear the pending interrupt <SM9>
|
||||
nop
|
||||
eieioSTP
|
||||
move.l #hw10msDelay,d4 ; number of retries before giving up with Cuda
|
||||
@waitIdle2
|
||||
|
@ -1185,15 +1268,17 @@ CudaInit
|
|||
eieioSTP
|
||||
ori.b #((1<<TIP)| \ ; terminate transaction
|
||||
(1<<vByteAck)),vBufB(a2) ; and set idle state <SM9>
|
||||
nop
|
||||
eieioSTP
|
||||
tst.b vSR(a2) ; clear the pending interrupt <SM9>
|
||||
nop
|
||||
eieioSTP
|
||||
@exit
|
||||
rts6 ; setup the return to caller of CudaInit
|
||||
|
||||
eject
|
||||
************************************************************************************************************
|
||||
* SendCudaCmd: This register based routine will send up to four bytes of data to
|
||||
* SendCudaCmd 9630: This register based routine will send up to four bytes of data to
|
||||
* Cuda. The packet type, command, byte count and data are passed in
|
||||
* registers. The routine will return with d0.w = $0000 if it sent the
|
||||
* command successfully. A value of $FFFF signifies that the command did
|
||||
|
@ -1236,14 +1321,17 @@ SendCudaCmd
|
|||
eieioSTP
|
||||
ori.b #((1<<TIP)| \ ; terminate transaction
|
||||
(1<<vByteAck)),vBufB(a1) ; and set idle state
|
||||
nop
|
||||
eieioSTP
|
||||
@WaitIdle
|
||||
bsr.l otherDelay
|
||||
eieioSTP
|
||||
btst.b #ifSR,vIFR(a1) ; wait for idle state acknowledgement
|
||||
eieioSTP
|
||||
beq.s @WaitIdle ;
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; clear the idle acknowledge interrupt
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
@AllOK swap.w d4 ; timeout in low word of d4 Retry count in high word
|
||||
|
@ -1276,9 +1364,11 @@ SendCudaCmd
|
|||
|
||||
eieioSTP
|
||||
bclr.b #SRdir,vACR(a1) ; shift in
|
||||
nop
|
||||
eieioSTP
|
||||
ori.b #((1<<TIP)|\ ; terminate command packet transaction
|
||||
(1<<vByteAck)),vBufB(a1) ;
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
;
|
||||
|
@ -1287,6 +1377,7 @@ SendCudaCmd
|
|||
bsr5 readAttn ; get the Attention byte
|
||||
eieioSTP
|
||||
bclr.b #TIP,vBufB(a1) ; start the response transaction
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
bsr5 readByte ; get the packet type
|
||||
|
@ -1302,15 +1393,19 @@ SendCudaCmd
|
|||
eieioSTP
|
||||
ori.b #((1<<TIP)|\ ; terminate command packet transaction
|
||||
(1<<vByteAck)),vBufB(a1) ;
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
@WaitIdle1
|
||||
bsr.l otherDelay
|
||||
eieioSTP
|
||||
btst.b #ifSR,vIFR(a1) ; wait for idle state acknowledgement
|
||||
nop
|
||||
eieioSTP
|
||||
beq.s @WaitIdle1 ;
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; clear the idle acknowledge interrupt
|
||||
nop
|
||||
eieioSTP
|
||||
;
|
||||
; Check for an error packet returned by Cuda
|
||||
|
@ -1327,20 +1422,24 @@ SendCudaCmd
|
|||
@SendPtype
|
||||
eieioSTP
|
||||
bset.b #SRdir,vACR(a1) ; shift out
|
||||
nop
|
||||
eieioSTP
|
||||
btst.b #TReq,vBufB(a1) ; check for abort
|
||||
eieioSTP
|
||||
beq.w AbortReq ; go away if abort requested
|
||||
eieioSTP
|
||||
move.b d0,vSR(a1) ; load byte into shift reg
|
||||
nop
|
||||
eieioSTP
|
||||
bclr.b #TIP,vBufB(a1) ; TIP indicates shift reg is full on 1st byte
|
||||
nop
|
||||
eieioSTP
|
||||
;
|
||||
; Check Vsr Irq until timeout. If timeout then check the retry count
|
||||
; and Call Death Chimes if Retry count exausted.
|
||||
;
|
||||
@PollDelay btst.b #ifSR,vIFR(a1) ; wait for shift to complete
|
||||
@PollDelay bsr.l otherDelay
|
||||
btst.b #ifSR,vIFR(a1) ; wait for shift to complete
|
||||
eieioSTP
|
||||
bne.w VsrIrq ; Go service Shift register Irq
|
||||
dbra.w d4,@PollDelay ; try again if timed out
|
||||
|
@ -1353,29 +1452,30 @@ DeadCuda
|
|||
eieioSTP
|
||||
ori.b #((1<<TIP)| \ ; terminate transaction
|
||||
(1<<vByteAck)),vBufB(a1) ; and set idle state
|
||||
nop
|
||||
eieioSTP
|
||||
move.l #ErrCudaInit,d7 ; Cuda failed, zero high byte flags <SM7>
|
||||
move.l #0001,d6 ; d6.l must be nonzero
|
||||
bigjmp Error1Handler,a3 ; Play death chimes
|
||||
bra.s *
|
||||
|
||||
VsrIrq
|
||||
move.b #10,d4 ; mode 7 interrupt occurs at falling edge CB1 <LW2><VIA rbm>
|
||||
@m7dly ; use d4 since retry count not required anymore <LW2><VIA rbm>
|
||||
eieioSTP
|
||||
tst.b vBufB(a1) ; hardware access is 1.2µS <LW2><VIA rbm>
|
||||
eieioSTP
|
||||
sub.b #1,d4 ; can only trash low byte <LW2><VIA rbm>
|
||||
bne.s @m7dly ; wait long enough for CB1 to rise (10µS delay) <LW2><VIA rbm>
|
||||
|
||||
move.l d4,-(sp)
|
||||
move $d00,d4
|
||||
divu #10,d4
|
||||
dbra.w d4,*
|
||||
move.l (sp)+,d4
|
||||
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; clear the interrupt
|
||||
nop
|
||||
eieioSTP
|
||||
btst.b #TReq,vBufB(a1) ; exit with abort status
|
||||
nop
|
||||
eieioSTP
|
||||
AbortReq rts5
|
||||
|
||||
;--------------------------------------------------------------------------
|
||||
; DumpAbort This routine will read all the data for an abort transaction and
|
||||
; DumpAbort 9774 This routine will read all the data for an abort transaction and
|
||||
; discard it. When done it will jump back to SendNopCmd entry point
|
||||
; to retry our command. This command will eventually complete...
|
||||
|
||||
|
@ -1383,14 +1483,18 @@ AbortReq rts5
|
|||
RealAbort
|
||||
eieioSTP
|
||||
bclr.b #SRdir,vACR(a1) ; shift in <rbm>
|
||||
nop
|
||||
eieioSTP
|
||||
ori.b #((1<<TIP)| \ ; terminate transaction
|
||||
(1<<vByteAck)),vBufB(a1) ; and set idle state
|
||||
nop
|
||||
eieioSTP
|
||||
WAbortAck btst.b #ifSR,vIFR(a1) ; wait for acknowledgement of abort cycle
|
||||
WAbortAck bsr.l otherDelay
|
||||
btst.b #ifSR,vIFR(a1) ; wait for acknowledgement of abort cycle
|
||||
eieioSTP
|
||||
beq.s WAbortAck ;
|
||||
tst.b vSR(a1) ; clear the pending interrupt
|
||||
nop
|
||||
eieioSTP
|
||||
bra.s StartRPkt ; and go start the response transaction
|
||||
;
|
||||
|
@ -1406,27 +1510,33 @@ IrqMissed
|
|||
bsr5 Delay100us ; Let Cuda see SysSes. ³ 125µsec
|
||||
eieioSTP
|
||||
bclr.b #SRdir,vACR(a1) ; shift in
|
||||
nop
|
||||
eieioSTP
|
||||
StartRPkt
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; discard the byte
|
||||
nop
|
||||
eieioSTP
|
||||
bclr.b #TIP,vBufB(a1) ; start the response transaction
|
||||
nop
|
||||
eieioSTP
|
||||
|
||||
DumpAbort
|
||||
bsr.l otherDelay
|
||||
eieioSTP
|
||||
btst.b #ifSR,vIFR(a1) ; wait for shift to complete
|
||||
eieioSTP
|
||||
beq.s DumpAbort
|
||||
eieioSTP
|
||||
tst.b vSR(a1) ; discard the byte
|
||||
nop
|
||||
eieioSTP
|
||||
|