Files
sibo-playground/code/SIBOSDK/ldd/ossibo.inc
2026-07-06 18:01:36 +01:00

242 lines
6.4 KiB
PHP

.xlist
; Include file - OSSIBO.INC
; Epoc/Os Sibo include file.
; Copyright (c) Psion PLC 1989-90.
;
; VER DATE BY DESCRIPTION
; ----- -------- ---- -----------
; 2.00F 30/09/90 NSM Final release
;
NoNullFrames equ 1
;
A1Ent struc
A1Dummy dw ?
A1Control dw ?
A1LcdSize dw ?
A1LcdControl dw ?
A1InterruptMask dw ?
A1NonSpecificEoi dw ?
A1TimerEoi dw ?
A1FrcEoi dw ?
A1ResetWatchDog dw ?
A1FrcControl dw ?
A1ProtectionOn dw ?
A1ProtectionUpper dw ?
A1ProtectionLower dw ?
A1SoundLsw dw ?
A1SoundMsw dw ?
A1SoundControl dw ?
A1Ent ends
;
A1Status equ A1Control
A1ProtectionOff equ A1ProtectionOn
A1InterruptStatus equ A1LcdControl
;
A1StatusR record LcdData:2,Rtc4Hz:1,SldMsw:1,ComboBusy:1,Rtc32Hz:1,ExternalNmi:1,WatchDogNmi:1,SldTx:1,A1SldEnable:1,LcdEnable:1,Ram512:1,Ram128:1,FrcSource:1,TickRate:1,FrcMode:1
A1LcdSizeR record LcdMLineEnable:1,LcdNumberOfPixels:5,LcdEndOfFrame:10
A1LcdControlR record LcdMode:2,LcdMLineRate:5,LcdRate:5
A1InterruptMaskR record SldTransmit:1,SldReceive:1,FrcExpired:1,Asic2Int:1,ExpIntLeftA:1,ExpIntRightB:1,Mains:1,Timer:1
ExpAddressLeftA equ 0200h
ExpAddressRightB equ 0100h
ExpChannelLeftA equ SelectChannel6
ExpChannelRightB equ SelectChannel5
;
A2Ent struc
A2Dummy db 080h dup(?)
A2Index dw ?
A2Control dw ?
A2Control1 dw ?
A2Control2 dw ?
A2Control3 dw ?
A2SerialData dw ?
A2SerialControl dw ?
A2ChannelControl dw ?
A2Ent ends
;
A2External equ A2Control1
A2InterruptStatus equ A2Control2
A2Status equ A2Control3
A2KeyData equ A2SerialControl
A2SlaveData equ A2ChannelControl
A2IControl0 equ 0
A2IControl1 equ 1
A2IWrite equ 2
A2IDDR equ 3
;
A2InterruptStatusR record SlaveDataOverrun:1,SlaveDataControl:1,SlaveDataValid:1,ExpansionInterrupt:1,DoorInterrupt:1
A2StatusR record A2RevId:1,A2XExt:1,A2Sdis:1,SerialBusy:1,SerialClockState:1,ResetFlag:1,WakeUp:1,OnKey:1
A2Control1R record SerialClockRate:2,KeyScan:4
A2Control2R record ClockEnable7:1,ClockEnable6:1,ClockEnable5:1,BuzzerMode:1,BuzzerVolume:1,BuzzerToggle:1,XySwitch:1,DigitizerEnable:1
A2Control3R record ElEnable:1,VhControl:1,ExpansionEnable:1,DoorEnable:1,SerialEnable:1,A2SldEnable:1,Ps34Acknowledge:1,SerialNull:1
A2ChannelControlR record MultiplexEnable:1,ChannelSelect:3,Pack4Enable:1,Pack3Enable:1,Pack2Enable:1,Pack1Enable:1
;
SerialWriteSingle equ 10000000b
SerialWriteMulti equ 10010000b
SerialReadSingle equ 11000000b
SerialReadMulti equ 11010000b
SerialReset equ 00000000b
SerialSelect equ 01000000b
ClockRateSlow equ 2
ClockRateMedium equ 0
ClockRateFast equ 3
SelectChannel0 equ (4 shl ChannelSelect)
SelectChannel1 equ (mask Pack1Enable)
SelectChannel2 equ (mask Pack2Enable)
SelectChannel3 equ (mask Pack3Enable)
SelectChannel4 equ (mask Pack4Enable)
SelectChannel5 equ (5 shl ChannelSelect)
SelectChannel6 equ (6 shl ChannelSelect)
SelectChannel7 equ (7 shl ChannelSelect)
;
Asic4Id equ 001h
Asic5PackId equ 002h
Asic5NormalId equ 003h
Asic6Id equ 004h
Asic8Id equ 005h
Asic2SlaveId equ 01fh
;
A3Ent struc
A3Adc db ?
A3Control1 db ?
A3Setup db ?
A3Control2 db ?
A3Dummy1 db 3 dup (?)
A3Control3 db ?
A3Dummy2 db 5 dup (?)
A3Status db ?
A3Dummy3 db ?
A3Ent ends
;
A3AdcLsbR record InvertedBit:1,OtherBits:7
A3AdcMsbR record Polarity:1,Overrange:1,AdcBits:4
A3Control1R record Vcc5Enable:1,Vcc4Enable:1,Vcc3Enable:1,DtoaBits:5
A3Control2R record AnalogueMultiplex:2,VhSoftStart:1,Vee2SoftStart:1,Vee1SoftStart:1,VhEnable:1,Vee2Enable:1,Vee1Enable:1
A3Control3R record AdcReadHighEnable:1,OffEnable:1,xDummy1:1
A3StatusR record PowerFail:1,ColdStart:1
Ps34ControlR record Ps34Vcc3:1,xDummy2:1,Ps34Vcc4:1,xDummy3:1,Ps34Vcc5:1,xDummy4:3
;
AdcDigitizer equ 0
AdcVh equ 1
AdcMainBattery equ 2
AdcLithiumBattery equ 3
A3SetupValue equ 2
A3SelectId equ (SerialSelect or Asic5NormalId)
A3InfoByte equ 080h
;
Vee1SoftStartDelay equ (30*128)
Vee2SoftStartDelay equ (30*128)
VhSoftStartDelay equ (100*128)
Vee1OffDelay equ (100*128)
Vee2OffDelay equ (100*128)
VhOffDelay equ (100*128)
Vcc3Delay equ (25*128)
Vcc4Delay equ (25*128)
Vcc5Delay equ (25*128)
Vcc1_4To5Delay equ (3) ; Pan only in ms.
;
PS34R_ADC equ 0
PS34R_STATUS equ 1
PS34W_CONTROL equ 0
PS34W_DTOA equ 1
PS34W_OFF equ 0eh
;
PS34STATR record pPowerFail:1,pColdStart:1,pVhready:1,pPenup:1,pNc:1,pAdmsb:3
PS34CONTR record pVcc3:1,pVee1:1,pVcc4:1,pVee2:1,pVcc5:1,pVh:1,pVhpower:2
PS34DTOAR record pNcc:1,pAdcsel:2,pDac:5
;
ADCSEL_ADCIN equ 0
ADCSEL_VIN equ 1
ADCSEL_VH equ 2
ADCSEL_VBATT equ 3
;
VHP1TO8 equ 0
VHP1TO4 equ 1
VHP1TO2 equ 2
VHP1TO1 equ 3
;
; Asic5 info byte structure
;
A5InfoByteR record A5TTL:1,A5Modem:1,A5MultiDrop:1,A5Barcode:1,A5Other:2,A5Parallel:1,A5Rs232:1
A5OtherRom equ (1 shl A5Other)
A5OtherMCRTTL equ (3 shl A5Other)
A5MCR equ (2 shl A5Other)
;
PPowerControl equ 0100h
PPowerControlR record PVcc5Enable:1,PSoundEnable:1,PVee1Enable:1,PDropVoltage:1,PDac:4
PPia record PSoundVol:2,PClearCold:1,PDcPresent:1,PColdFlag:1,PLithiumWarn:1,PVinWarn:1
PSoundControl equ 0200h
;
if Consumer
DefaultLcdContrast equ 7
else
DefaultLcdContrast equ 15
endif
;
InterruptBase equ 078h
;
KeyPollColumns equ 10
KeyInitialDelay equ 24
if Consumer
KeyRepeatDelay equ 2
else
KeyRepeatDelay equ 4
endif
PenUpDelay equ 16
MouseDownDelay equ 8
KeySettleDelay equ 24
KeyCntrlMask equ 00000001b
KeyLeftShiftMask equ 00000010b
KeyPsionMask equ 00000100b
KeyCapsMask equ 00001000b
KeyRightShiftMask equ 00010000b
DigitizerRowMask equ 00010000b
PsionScanCode equ 6
CapsScanCode equ 5
PsionUpScanCode equ 65
;
PostRomTest equ 010h
PostSystemRamTest equ 020h
PostVideoRamTest equ 030h
PostComplete equ 0f0h
if Consumer
PostPort equ 0h
else
PostPort equ 01ffh
endif
;
if HandHeld
VideoRamSegment equ 00040h
VideoRamBase equ 00000h
if Corporate
VideoRamWords equ 00320h
else
VideoRamWords equ 00500h
endif
else
VideoRamSegment equ 0b800h
VideoRamBase equ 00000h
VideoRamWords equ 04000h
endif
;
CalSeg equ 0fffeh
CalEnt struc
CalVsupCLsw dw ?
CalVsupCMsw dw ?
CalVsupM dw ?
CalVlthCLsw dw ?
CalVlthCMsw dw ?
CalVlthM dw ?
CalType dw ?
CalEnt ends
;
CHKeyDataR record CHInSled:1,CHMains:1,CHDummy:2
;
Vcc4OffFrames equ 25 ; Gives 512 frames = 10.0 ms
;
Vcc1_4to5OffFrames equ 20 ; Gives 392 frames = 6.0 ms
Vcc1_4to5OnTime equ 4 ; Gives 4 ms
;
IntBXHw equ -2
.list