Removed (pretty inconsistently used) tab chars from source code base.
This commit is contained in:
parent
44fd1082ae
commit
85885001b1
1773 changed files with 62864 additions and 62868 deletions
|
@ -2,39 +2,39 @@
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Zero page stuff
|
; Zero page stuff
|
||||||
|
|
||||||
WNDLFT := $20 ; Text window left
|
WNDLFT := $20 ; Text window left
|
||||||
WNDWDTH := $21 ; Text window width
|
WNDWDTH := $21 ; Text window width
|
||||||
WNDTOP := $22 ; Text window top
|
WNDTOP := $22 ; Text window top
|
||||||
WNDBTM := $23 ; Text window bottom+1
|
WNDBTM := $23 ; Text window bottom+1
|
||||||
CH := $24 ; Cursor horizontal position
|
CH := $24 ; Cursor horizontal position
|
||||||
CV := $25 ; Cursor vertical position
|
CV := $25 ; Cursor vertical position
|
||||||
BASL := $28 ; Text base address low
|
BASL := $28 ; Text base address low
|
||||||
BASH := $29 ; Text base address high
|
BASH := $29 ; Text base address high
|
||||||
INVFLG := $32 ; Normal/inverse(/flash)
|
INVFLG := $32 ; Normal/inverse(/flash)
|
||||||
PROMPT := $33 ; Used by GETLN
|
PROMPT := $33 ; Used by GETLN
|
||||||
RNDL := $4E ; Random counter low
|
RNDL := $4E ; Random counter low
|
||||||
RNDH := $4F ; Random counter high
|
RNDH := $4F ; Random counter high
|
||||||
HIMEM := $73 ; Highest available memory address+1
|
HIMEM := $73 ; Highest available memory address+1
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Vectors
|
; Vectors
|
||||||
|
|
||||||
DOSWARM := $03D0 ; DOS warmstart vector
|
DOSWARM := $03D0 ; DOS warmstart vector
|
||||||
BRKVec := $03F0 ; Break vector
|
BRKVec := $03F0 ; Break vector
|
||||||
SOFTEV := $03F2 ; Vector for warm start
|
SOFTEV := $03F2 ; Vector for warm start
|
||||||
PWREDUP := $03F4 ; This must be = EOR #$A5 of SOFTEV+1
|
PWREDUP := $03F4 ; This must be = EOR #$A5 of SOFTEV+1
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Hardware
|
; Hardware
|
||||||
|
|
||||||
; Keyboard input
|
; Keyboard input
|
||||||
KBD := $C000 ; Read keyboard
|
KBD := $C000 ; Read keyboard
|
||||||
KBDSTRB := $C010 ; Clear keyboard strobe
|
KBDSTRB := $C010 ; Clear keyboard strobe
|
||||||
|
|
||||||
; 80 column video switches
|
; 80 column video switches
|
||||||
CLR80COL:= $C000 ; Disable 80 column store
|
CLR80COL:= $C000 ; Disable 80 column store
|
||||||
SET80COL:= $C001 ; Enable 80 column store
|
SET80COL:= $C001 ; Enable 80 column store
|
||||||
RD80COL := $C018 ; >127 if 80 column store enabled
|
RD80COL := $C018 ; >127 if 80 column store enabled
|
||||||
RD80VID := $C01F ; >127 if 80 column video enabled
|
RD80VID := $C01F ; >127 if 80 column video enabled
|
||||||
|
|
||||||
; Character set switches
|
; Character set switches
|
||||||
|
@ -43,22 +43,22 @@ SETALTCHAR := $C00F ; Norm/inv LC, no flash
|
||||||
ALTCHARSET := $C01E ; >127 if alt charset switched in
|
ALTCHARSET := $C01E ; >127 if alt charset switched in
|
||||||
|
|
||||||
; Language card switches
|
; Language card switches
|
||||||
RDLCBNK2:= $C011 ; >127 if LC bank 2 in use
|
RDLCBNK2:= $C011 ; >127 if LC bank 2 in use
|
||||||
RDLCRAM := $C012 ; >127 if LC is read enabled
|
RDLCRAM := $C012 ; >127 if LC is read enabled
|
||||||
ROMIN := $C081 ; Swap in D000-FFFF ROM
|
ROMIN := $C081 ; Swap in D000-FFFF ROM
|
||||||
LCBANK2 := $C083 ; Swap in LC bank 2
|
LCBANK2 := $C083 ; Swap in LC bank 2
|
||||||
LCBANK1 := $C08B ; Swap in LC bank 1
|
LCBANK1 := $C08B ; Swap in LC bank 1
|
||||||
|
|
||||||
; Video mode switches
|
; Video mode switches
|
||||||
TXTCLR := $C050 ; Display graphics
|
TXTCLR := $C050 ; Display graphics
|
||||||
TXTSET := $C051 ; Display text
|
TXTSET := $C051 ; Display text
|
||||||
MIXCLR := $C052 ; Disable 4 lines of text
|
MIXCLR := $C052 ; Disable 4 lines of text
|
||||||
MIXSET := $C053 ; Enable 4 lines of text
|
MIXSET := $C053 ; Enable 4 lines of text
|
||||||
LOWSCR := $C054 ; Page 1
|
LOWSCR := $C054 ; Page 1
|
||||||
HISCR := $C055 ; Page 2
|
HISCR := $C055 ; Page 2
|
||||||
LORES := $C056 ; Lores graphics
|
LORES := $C056 ; Lores graphics
|
||||||
HIRES := $C057 ; Hires graphics
|
HIRES := $C057 ; Hires graphics
|
||||||
|
|
||||||
; Game controller
|
; Game controller
|
||||||
BUTN0 := $C061 ; Open-Apple Key
|
BUTN0 := $C061 ; Open-Apple Key
|
||||||
BUTN1 := $C062 ; Closed-Apple Key
|
BUTN1 := $C062 ; Closed-Apple Key
|
||||||
|
|
1584
asminc/atari.inc
1584
asminc/atari.inc
File diff suppressed because it is too large
Load diff
246
asminc/c128.inc
246
asminc/c128.inc
|
@ -7,193 +7,193 @@
|
||||||
; Zero page, Commodore stuff
|
; Zero page, Commodore stuff
|
||||||
|
|
||||||
TIME := $A0 ; 60HZ clock
|
TIME := $A0 ; 60HZ clock
|
||||||
FNAM_LEN := $B7 ; Length of filename
|
FNAM_LEN := $B7 ; Length of filename
|
||||||
SECADR := $B9 ; Secondary address
|
SECADR := $B9 ; Secondary address
|
||||||
DEVNUM := $BA ; Device number
|
DEVNUM := $BA ; Device number
|
||||||
FNAM := $BB ; Address of filename
|
FNAM := $BB ; Address of filename
|
||||||
FNAM_BANK := $C7 ; Bank for filename
|
FNAM_BANK := $C7 ; Bank for filename
|
||||||
KEY_COUNT := $D0 ; Number of keys in input buffer
|
KEY_COUNT := $D0 ; Number of keys in input buffer
|
||||||
FKEY_COUNT := $D1 ; Characters for function key
|
FKEY_COUNT := $D1 ; Characters for function key
|
||||||
MODE := $D7 ; 40/80 column mode flag
|
MODE := $D7 ; 40/80 column mode flag
|
||||||
CURS_X := $EC ; Cursor column
|
CURS_X := $EC ; Cursor column
|
||||||
CURS_Y := $EB ; Cursor row
|
CURS_Y := $EB ; Cursor row
|
||||||
SCREEN_PTR := $E0 ; Pointer to current char in text screen
|
SCREEN_PTR := $E0 ; Pointer to current char in text screen
|
||||||
CRAM_PTR := $E2 ; Pointer to current char in color RAM
|
CRAM_PTR := $E2 ; Pointer to current char in color RAM
|
||||||
|
|
||||||
CHARCOLOR := $F1
|
CHARCOLOR := $F1
|
||||||
RVS := $F3 ; Reverse output flag
|
RVS := $F3 ; Reverse output flag
|
||||||
SCROLL := $F8 ; Disable scrolling flag
|
SCROLL := $F8 ; Disable scrolling flag
|
||||||
|
|
||||||
BASIC_BUF := $200 ; Location of command-line
|
BASIC_BUF := $200 ; Location of command-line
|
||||||
BASIC_BUF_LEN = 162 ; Maximum length of command-line
|
BASIC_BUF_LEN = 162 ; Maximum length of command-line
|
||||||
|
|
||||||
FETCH := $2A2 ; Fetch subroutine in RAM
|
FETCH := $2A2 ; Fetch subroutine in RAM
|
||||||
FETVEC := $2AA ; Vector patch location for FETCH
|
FETVEC := $2AA ; Vector patch location for FETCH
|
||||||
STASH := $2AF ; Stash routine in RAM
|
STASH := $2AF ; Stash routine in RAM
|
||||||
STAVEC := $2B9 ; Vector patch location for STASH
|
STAVEC := $2B9 ; Vector patch location for STASH
|
||||||
PALFLAG := $A03 ; $FF=PAL, $00=NTSC
|
PALFLAG := $A03 ; $FF=PAL, $00=NTSC
|
||||||
INIT_STATUS := $A04 ; Flag: Reset/NMI Status
|
INIT_STATUS := $A04 ; Flag: Reset/NMI Status
|
||||||
FKEY_LEN := $1000 ; Function key lengths
|
FKEY_LEN := $1000 ; Function key lengths
|
||||||
FKEY_TEXT := $100A ; Function key texts
|
FKEY_TEXT := $100A ; Function key texts
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Kernal routines
|
; Kernal routines
|
||||||
|
|
||||||
; Direct entries
|
; Direct entries
|
||||||
CURS_SET := $CD57
|
CURS_SET := $CD57
|
||||||
CURS_ON := $CD6F
|
CURS_ON := $CD6F
|
||||||
CURS_OFF := $CD9F
|
CURS_OFF := $CD9F
|
||||||
CLRSCR := $C142
|
CLRSCR := $C142
|
||||||
KBDREAD := $C006
|
KBDREAD := $C006
|
||||||
NEWLINE := $C363
|
NEWLINE := $C363
|
||||||
PRINT := $C322
|
PRINT := $C322
|
||||||
NMIEXIT := $FF33
|
NMIEXIT := $FF33
|
||||||
INDFET := $FF74
|
INDFET := $FF74
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Vectors
|
; Vectors
|
||||||
|
|
||||||
IRQVec := $0314
|
IRQVec := $0314
|
||||||
BRKVec := $0316
|
BRKVec := $0316
|
||||||
NMIVec := $0318
|
NMIVec := $0318
|
||||||
KeyStoreVec := $033C
|
KeyStoreVec := $033C
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: VIC
|
; I/O: VIC
|
||||||
|
|
||||||
VIC := $D000
|
VIC := $D000
|
||||||
VIC_SPR0_X := $D000
|
VIC_SPR0_X := $D000
|
||||||
VIC_SPR0_Y := $D001
|
VIC_SPR0_Y := $D001
|
||||||
VIC_SPR1_X := $D002
|
VIC_SPR1_X := $D002
|
||||||
VIC_SPR1_Y := $D003
|
VIC_SPR1_Y := $D003
|
||||||
VIC_SPR2_X := $D004
|
VIC_SPR2_X := $D004
|
||||||
VIC_SPR2_Y := $D005
|
VIC_SPR2_Y := $D005
|
||||||
VIC_SPR3_X := $D006
|
VIC_SPR3_X := $D006
|
||||||
VIC_SPR3_Y := $D007
|
VIC_SPR3_Y := $D007
|
||||||
VIC_SPR4_X := $D008
|
VIC_SPR4_X := $D008
|
||||||
VIC_SPR4_Y := $D009
|
VIC_SPR4_Y := $D009
|
||||||
VIC_SPR5_X := $D00A
|
VIC_SPR5_X := $D00A
|
||||||
VIC_SPR5_Y := $D00B
|
VIC_SPR5_Y := $D00B
|
||||||
VIC_SPR6_X := $D00C
|
VIC_SPR6_X := $D00C
|
||||||
VIC_SPR6_Y := $D00D
|
VIC_SPR6_Y := $D00D
|
||||||
VIC_SPR7_X := $D00E
|
VIC_SPR7_X := $D00E
|
||||||
VIC_SPR7_Y := $D00F
|
VIC_SPR7_Y := $D00F
|
||||||
VIC_SPR_HI_X := $D010
|
VIC_SPR_HI_X := $D010
|
||||||
VIC_SPR_ENA := $D015
|
VIC_SPR_ENA := $D015
|
||||||
VIC_SPR_EXP_Y := $D017
|
VIC_SPR_EXP_Y := $D017
|
||||||
VIC_SPR_EXP_X := $D01D
|
VIC_SPR_EXP_X := $D01D
|
||||||
VIC_SPR_MCOLOR := $D01C
|
VIC_SPR_MCOLOR := $D01C
|
||||||
VIC_SPR_BG_PRIO := $D01B
|
VIC_SPR_BG_PRIO := $D01B
|
||||||
|
|
||||||
VIC_SPR_MCOLOR0 := $D025
|
VIC_SPR_MCOLOR0 := $D025
|
||||||
VIC_SPR_MCOLOR1 := $D026
|
VIC_SPR_MCOLOR1 := $D026
|
||||||
|
|
||||||
VIC_SPR0_COLOR := $D027
|
VIC_SPR0_COLOR := $D027
|
||||||
VIC_SPR1_COLOR := $D028
|
VIC_SPR1_COLOR := $D028
|
||||||
VIC_SPR2_COLOR := $D029
|
VIC_SPR2_COLOR := $D029
|
||||||
VIC_SPR3_COLOR := $D02A
|
VIC_SPR3_COLOR := $D02A
|
||||||
VIC_SPR4_COLOR := $D02B
|
VIC_SPR4_COLOR := $D02B
|
||||||
VIC_SPR5_COLOR := $D02C
|
VIC_SPR5_COLOR := $D02C
|
||||||
VIC_SPR6_COLOR := $D02D
|
VIC_SPR6_COLOR := $D02D
|
||||||
VIC_SPR7_COLOR := $D02E
|
VIC_SPR7_COLOR := $D02E
|
||||||
|
|
||||||
VIC_CTRL1 := $D011
|
VIC_CTRL1 := $D011
|
||||||
VIC_CTRL2 := $D016
|
VIC_CTRL2 := $D016
|
||||||
|
|
||||||
VIC_HLINE := $D012
|
VIC_HLINE := $D012
|
||||||
|
|
||||||
VIC_VIDEO_ADR := $D018
|
VIC_VIDEO_ADR := $D018
|
||||||
|
|
||||||
VIC_IRR := $D019 ; Interrupt request register
|
VIC_IRR := $D019 ; Interrupt request register
|
||||||
VIC_IMR := $D01A ; Interrupt mask register
|
VIC_IMR := $D01A ; Interrupt mask register
|
||||||
|
|
||||||
VIC_BORDERCOLOR := $D020
|
VIC_BORDERCOLOR := $D020
|
||||||
VIC_BG_COLOR0 := $D021
|
VIC_BG_COLOR0 := $D021
|
||||||
VIC_BG_COLOR1 := $D022
|
VIC_BG_COLOR1 := $D022
|
||||||
VIC_BG_COLOR2 := $D023
|
VIC_BG_COLOR2 := $D023
|
||||||
VIC_BG_COLOR3 := $D024
|
VIC_BG_COLOR3 := $D024
|
||||||
|
|
||||||
; 128 stuff:
|
; 128 stuff:
|
||||||
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
|
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
|
||||||
VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
|
VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: SID
|
; I/O: SID
|
||||||
|
|
||||||
SID := $D400
|
SID := $D400
|
||||||
SID_S1Lo := $D400
|
SID_S1Lo := $D400
|
||||||
SID_S1Hi := $D401
|
SID_S1Hi := $D401
|
||||||
SID_PB1Lo := $D402
|
SID_PB1Lo := $D402
|
||||||
SID_PB1Hi := $D403
|
SID_PB1Hi := $D403
|
||||||
SID_Ctl1 := $D404
|
SID_Ctl1 := $D404
|
||||||
SID_AD1 := $D405
|
SID_AD1 := $D405
|
||||||
SID_SUR1 := $D406
|
SID_SUR1 := $D406
|
||||||
|
|
||||||
SID_S2Lo := $D407
|
SID_S2Lo := $D407
|
||||||
SID_S2Hi := $D408
|
SID_S2Hi := $D408
|
||||||
SID_PB2Lo := $D409
|
SID_PB2Lo := $D409
|
||||||
SID_PB2Hi := $D40A
|
SID_PB2Hi := $D40A
|
||||||
SID_Ctl2 := $D40B
|
SID_Ctl2 := $D40B
|
||||||
SID_AD2 := $D40C
|
SID_AD2 := $D40C
|
||||||
SID_SUR2 := $D40D
|
SID_SUR2 := $D40D
|
||||||
|
|
||||||
SID_S3Lo := $D40E
|
SID_S3Lo := $D40E
|
||||||
SID_S3Hi := $D40F
|
SID_S3Hi := $D40F
|
||||||
SID_PB3Lo := $D410
|
SID_PB3Lo := $D410
|
||||||
SID_PB3Hi := $D411
|
SID_PB3Hi := $D411
|
||||||
SID_Ctl3 := $D412
|
SID_Ctl3 := $D412
|
||||||
SID_AD3 := $D413
|
SID_AD3 := $D413
|
||||||
SID_SUR3 := $D414
|
SID_SUR3 := $D414
|
||||||
|
|
||||||
SID_FltLo := $D415
|
SID_FltLo := $D415
|
||||||
SID_FltHi := $D416
|
SID_FltHi := $D416
|
||||||
SID_FltCtl := $D417
|
SID_FltCtl := $D417
|
||||||
SID_Amp := $D418
|
SID_Amp := $D418
|
||||||
SID_ADConv1 := $D419
|
SID_ADConv1 := $D419
|
||||||
SID_ADConv2 := $D41A
|
SID_ADConv2 := $D41A
|
||||||
SID_Noise := $D41B
|
SID_Noise := $D41B
|
||||||
SID_Read3 := $D41C
|
SID_Read3 := $D41C
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: VDC (128 only)
|
; I/O: VDC (128 only)
|
||||||
|
|
||||||
VDC_INDEX := $D600
|
VDC_INDEX := $D600
|
||||||
VDC_DATA := $D601
|
VDC_DATA := $D601
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: CIAs
|
; I/O: CIAs
|
||||||
|
|
||||||
CIA1 := $DC00
|
CIA1 := $DC00
|
||||||
CIA1_PRA := $DC00
|
CIA1_PRA := $DC00
|
||||||
CIA1_PRB := $DC01
|
CIA1_PRB := $DC01
|
||||||
CIA1_DDRA := $DC02
|
CIA1_DDRA := $DC02
|
||||||
CIA1_DDRB := $DC03
|
CIA1_DDRB := $DC03
|
||||||
CIA1_TOD10 := $DC08
|
CIA1_TOD10 := $DC08
|
||||||
CIA1_TODSEC := $DC09
|
CIA1_TODSEC := $DC09
|
||||||
CIA1_TODMIN := $DC0A
|
CIA1_TODMIN := $DC0A
|
||||||
CIA1_TODHR := $DC0B
|
CIA1_TODHR := $DC0B
|
||||||
CIA1_ICR := $DC0D
|
CIA1_ICR := $DC0D
|
||||||
CIA1_CRA := $DC0E
|
CIA1_CRA := $DC0E
|
||||||
CIA1_CRB := $DC0F
|
CIA1_CRB := $DC0F
|
||||||
|
|
||||||
CIA2 := $DD00
|
CIA2 := $DD00
|
||||||
CIA2_PRA := $DD00
|
CIA2_PRA := $DD00
|
||||||
CIA2_PRB := $DD01
|
CIA2_PRB := $DD01
|
||||||
CIA2_DDRA := $DD02
|
CIA2_DDRA := $DD02
|
||||||
CIA2_DDRB := $DD03
|
CIA2_DDRB := $DD03
|
||||||
CIA2_TOD10 := $DD08
|
CIA2_TOD10 := $DD08
|
||||||
CIA2_TODSEC := $DD09
|
CIA2_TODSEC := $DD09
|
||||||
CIA2_TODMIN := $DD0A
|
CIA2_TODMIN := $DD0A
|
||||||
CIA2_TODHR := $DD0B
|
CIA2_TODHR := $DD0B
|
||||||
CIA2_ICR := $DD0D
|
CIA2_ICR := $DD0D
|
||||||
CIA2_CRA := $DD0E
|
CIA2_CRA := $DD0E
|
||||||
CIA2_CRB := $DD0F
|
CIA2_CRB := $DD0F
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: MMU
|
; I/O: MMU
|
||||||
|
|
||||||
MMU_CR := $FF00
|
MMU_CR := $FF00
|
||||||
MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM
|
MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM
|
||||||
MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM
|
MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM
|
||||||
MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM
|
MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM
|
||||||
|
@ -203,9 +203,9 @@ MMU_CFG_RAM3 := %11111111 ; Bank 3 full RAM
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Super CPU
|
; Super CPU
|
||||||
|
|
||||||
SCPU_VIC_Bank1 := $D075
|
SCPU_VIC_Bank1 := $D075
|
||||||
SCPU_Slow := $D07A
|
SCPU_Slow := $D07A
|
||||||
SCPU_Fast := $D07B
|
SCPU_Fast := $D07B
|
||||||
SCPU_EnableRegs := $D07E
|
SCPU_EnableRegs := $D07E
|
||||||
SCPU_DisableRegs:= $D07F
|
SCPU_DisableRegs:= $D07F
|
||||||
SCPU_Detect := $D0BC
|
SCPU_Detect := $D0BC
|
||||||
|
|
246
asminc/c64.inc
246
asminc/c64.inc
|
@ -7,43 +7,43 @@
|
||||||
; Zero page, Commodore stuff
|
; Zero page, Commodore stuff
|
||||||
|
|
||||||
TIME := $A0 ; 60 HZ clock
|
TIME := $A0 ; 60 HZ clock
|
||||||
FNAM_LEN := $B7 ; Length of filename
|
FNAM_LEN := $B7 ; Length of filename
|
||||||
SECADR := $B9 ; Secondary address
|
SECADR := $B9 ; Secondary address
|
||||||
DEVNUM := $BA ; Device number
|
DEVNUM := $BA ; Device number
|
||||||
FNAM := $BB ; Pointer to filename
|
FNAM := $BB ; Pointer to filename
|
||||||
KEY_COUNT := $C6 ; Number of keys in input buffer
|
KEY_COUNT := $C6 ; Number of keys in input buffer
|
||||||
RVS := $C7 ; Reverse flag
|
RVS := $C7 ; Reverse flag
|
||||||
CURS_FLAG := $CC ; 1 = cursor off
|
CURS_FLAG := $CC ; 1 = cursor off
|
||||||
CURS_BLINK := $CD ; Blink counter
|
CURS_BLINK := $CD ; Blink counter
|
||||||
CURS_CHAR := $CE ; Character under the cursor
|
CURS_CHAR := $CE ; Character under the cursor
|
||||||
CURS_STATE := $CF ; Cursor blink state
|
CURS_STATE := $CF ; Cursor blink state
|
||||||
SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
||||||
CURS_X := $D3 ; Cursor column
|
CURS_X := $D3 ; Cursor column
|
||||||
CURS_Y := $D6 ; Cursor row
|
CURS_Y := $D6 ; Cursor row
|
||||||
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
||||||
|
|
||||||
BASIC_BUF := $200 ; Location of command-line
|
BASIC_BUF := $200 ; Location of command-line
|
||||||
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
||||||
|
|
||||||
CHARCOLOR := $286
|
CHARCOLOR := $286
|
||||||
CURS_COLOR := $287 ; Color under the cursor
|
CURS_COLOR := $287 ; Color under the cursor
|
||||||
PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC
|
PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Kernal routines
|
; Kernal routines
|
||||||
|
|
||||||
; Direct entries
|
; Direct entries
|
||||||
CLRSCR := $E544
|
CLRSCR := $E544
|
||||||
KBDREAD := $E5B4
|
KBDREAD := $E5B4
|
||||||
NMIEXIT := $FEBC
|
NMIEXIT := $FEBC
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Vector and other locations
|
; Vector and other locations
|
||||||
|
|
||||||
IRQVec := $0314
|
IRQVec := $0314
|
||||||
BRKVec := $0316
|
BRKVec := $0316
|
||||||
NMIVec := $0318
|
NMIVec := $0318
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Screen size
|
; Screen size
|
||||||
|
@ -54,157 +54,157 @@ YSIZE = 25
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: VIC
|
; I/O: VIC
|
||||||
|
|
||||||
VIC := $D000
|
VIC := $D000
|
||||||
VIC_SPR0_X := $D000
|
VIC_SPR0_X := $D000
|
||||||
VIC_SPR0_Y := $D001
|
VIC_SPR0_Y := $D001
|
||||||
VIC_SPR1_X := $D002
|
VIC_SPR1_X := $D002
|
||||||
VIC_SPR1_Y := $D003
|
VIC_SPR1_Y := $D003
|
||||||
VIC_SPR2_X := $D004
|
VIC_SPR2_X := $D004
|
||||||
VIC_SPR2_Y := $D005
|
VIC_SPR2_Y := $D005
|
||||||
VIC_SPR3_X := $D006
|
VIC_SPR3_X := $D006
|
||||||
VIC_SPR3_Y := $D007
|
VIC_SPR3_Y := $D007
|
||||||
VIC_SPR4_X := $D008
|
VIC_SPR4_X := $D008
|
||||||
VIC_SPR4_Y := $D009
|
VIC_SPR4_Y := $D009
|
||||||
VIC_SPR5_X := $D00A
|
VIC_SPR5_X := $D00A
|
||||||
VIC_SPR5_Y := $D00B
|
VIC_SPR5_Y := $D00B
|
||||||
VIC_SPR6_X := $D00C
|
VIC_SPR6_X := $D00C
|
||||||
VIC_SPR6_Y := $D00D
|
VIC_SPR6_Y := $D00D
|
||||||
VIC_SPR7_X := $D00E
|
VIC_SPR7_X := $D00E
|
||||||
VIC_SPR7_Y := $D00F
|
VIC_SPR7_Y := $D00F
|
||||||
VIC_SPR_HI_X := $D010
|
VIC_SPR_HI_X := $D010
|
||||||
VIC_SPR_ENA := $D015
|
VIC_SPR_ENA := $D015
|
||||||
VIC_SPR_EXP_Y := $D017
|
VIC_SPR_EXP_Y := $D017
|
||||||
VIC_SPR_EXP_X := $D01D
|
VIC_SPR_EXP_X := $D01D
|
||||||
VIC_SPR_MCOLOR := $D01C
|
VIC_SPR_MCOLOR := $D01C
|
||||||
VIC_SPR_BG_PRIO := $D01B
|
VIC_SPR_BG_PRIO := $D01B
|
||||||
|
|
||||||
VIC_SPR_MCOLOR0 := $D025
|
VIC_SPR_MCOLOR0 := $D025
|
||||||
VIC_SPR_MCOLOR1 := $D026
|
VIC_SPR_MCOLOR1 := $D026
|
||||||
|
|
||||||
VIC_SPR0_COLOR := $D027
|
VIC_SPR0_COLOR := $D027
|
||||||
VIC_SPR1_COLOR := $D028
|
VIC_SPR1_COLOR := $D028
|
||||||
VIC_SPR2_COLOR := $D029
|
VIC_SPR2_COLOR := $D029
|
||||||
VIC_SPR3_COLOR := $D02A
|
VIC_SPR3_COLOR := $D02A
|
||||||
VIC_SPR4_COLOR := $D02B
|
VIC_SPR4_COLOR := $D02B
|
||||||
VIC_SPR5_COLOR := $D02C
|
VIC_SPR5_COLOR := $D02C
|
||||||
VIC_SPR6_COLOR := $D02D
|
VIC_SPR6_COLOR := $D02D
|
||||||
VIC_SPR7_COLOR := $D02E
|
VIC_SPR7_COLOR := $D02E
|
||||||
|
|
||||||
VIC_CTRL1 := $D011
|
VIC_CTRL1 := $D011
|
||||||
VIC_CTRL2 := $D016
|
VIC_CTRL2 := $D016
|
||||||
|
|
||||||
VIC_HLINE := $D012
|
VIC_HLINE := $D012
|
||||||
|
|
||||||
VIC_VIDEO_ADR := $D018
|
VIC_VIDEO_ADR := $D018
|
||||||
|
|
||||||
VIC_IRR := $D019 ; Interrupt request register
|
VIC_IRR := $D019 ; Interrupt request register
|
||||||
VIC_IMR := $D01A ; Interrupt mask register
|
VIC_IMR := $D01A ; Interrupt mask register
|
||||||
|
|
||||||
VIC_BORDERCOLOR := $D020
|
VIC_BORDERCOLOR := $D020
|
||||||
VIC_BG_COLOR0 := $D021
|
VIC_BG_COLOR0 := $D021
|
||||||
VIC_BG_COLOR1 := $D022
|
VIC_BG_COLOR1 := $D022
|
||||||
VIC_BG_COLOR2 := $D023
|
VIC_BG_COLOR2 := $D023
|
||||||
VIC_BG_COLOR3 := $D024
|
VIC_BG_COLOR3 := $D024
|
||||||
|
|
||||||
; 128 stuff:
|
; 128 stuff:
|
||||||
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
|
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
|
||||||
VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
|
VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: SID
|
; I/O: SID
|
||||||
|
|
||||||
SID := $D400
|
SID := $D400
|
||||||
SID_S1Lo := $D400
|
SID_S1Lo := $D400
|
||||||
SID_S1Hi := $D401
|
SID_S1Hi := $D401
|
||||||
SID_PB1Lo := $D402
|
SID_PB1Lo := $D402
|
||||||
SID_PB1Hi := $D403
|
SID_PB1Hi := $D403
|
||||||
SID_Ctl1 := $D404
|
SID_Ctl1 := $D404
|
||||||
SID_AD1 := $D405
|
SID_AD1 := $D405
|
||||||
SID_SUR1 := $D406
|
SID_SUR1 := $D406
|
||||||
|
|
||||||
SID_S2Lo := $D407
|
SID_S2Lo := $D407
|
||||||
SID_S2Hi := $D408
|
SID_S2Hi := $D408
|
||||||
SID_PB2Lo := $D409
|
SID_PB2Lo := $D409
|
||||||
SID_PB2Hi := $D40A
|
SID_PB2Hi := $D40A
|
||||||
SID_Ctl2 := $D40B
|
SID_Ctl2 := $D40B
|
||||||
SID_AD2 := $D40C
|
SID_AD2 := $D40C
|
||||||
SID_SUR2 := $D40D
|
SID_SUR2 := $D40D
|
||||||
|
|
||||||
SID_S3Lo := $D40E
|
SID_S3Lo := $D40E
|
||||||
SID_S3Hi := $D40F
|
SID_S3Hi := $D40F
|
||||||
SID_PB3Lo := $D410
|
SID_PB3Lo := $D410
|
||||||
SID_PB3Hi := $D411
|
SID_PB3Hi := $D411
|
||||||
SID_Ctl3 := $D412
|
SID_Ctl3 := $D412
|
||||||
SID_AD3 := $D413
|
SID_AD3 := $D413
|
||||||
SID_SUR3 := $D414
|
SID_SUR3 := $D414
|
||||||
|
|
||||||
SID_FltLo := $D415
|
SID_FltLo := $D415
|
||||||
SID_FltHi := $D416
|
SID_FltHi := $D416
|
||||||
SID_FltCtl := $D417
|
SID_FltCtl := $D417
|
||||||
SID_Amp := $D418
|
SID_Amp := $D418
|
||||||
SID_ADConv1 := $D419
|
SID_ADConv1 := $D419
|
||||||
SID_ADConv2 := $D41A
|
SID_ADConv2 := $D41A
|
||||||
SID_Noise := $D41B
|
SID_Noise := $D41B
|
||||||
SID_Read3 := $D41C
|
SID_Read3 := $D41C
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: VDC (128 only)
|
; I/O: VDC (128 only)
|
||||||
|
|
||||||
VDC_INDEX := $D600
|
VDC_INDEX := $D600
|
||||||
VDC_DATA := $D601
|
VDC_DATA := $D601
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: CIAs
|
; I/O: CIAs
|
||||||
|
|
||||||
CIA1 := $DC00
|
CIA1 := $DC00
|
||||||
CIA1_PRA := $DC00
|
CIA1_PRA := $DC00
|
||||||
CIA1_PRB := $DC01
|
CIA1_PRB := $DC01
|
||||||
CIA1_DDRA := $DC02
|
CIA1_DDRA := $DC02
|
||||||
CIA1_DDRB := $DC03
|
CIA1_DDRB := $DC03
|
||||||
CIA1_TOD10 := $DC08
|
CIA1_TOD10 := $DC08
|
||||||
CIA1_TODSEC := $DC09
|
CIA1_TODSEC := $DC09
|
||||||
CIA1_TODMIN := $DC0A
|
CIA1_TODMIN := $DC0A
|
||||||
CIA1_TODHR := $DC0B
|
CIA1_TODHR := $DC0B
|
||||||
CIA1_ICR := $DC0D
|
CIA1_ICR := $DC0D
|
||||||
CIA1_CRA := $DC0E
|
CIA1_CRA := $DC0E
|
||||||
CIA1_CRB := $DC0F
|
CIA1_CRB := $DC0F
|
||||||
|
|
||||||
CIA2 := $DD00
|
CIA2 := $DD00
|
||||||
CIA2_PRA := $DD00
|
CIA2_PRA := $DD00
|
||||||
CIA2_PRB := $DD01
|
CIA2_PRB := $DD01
|
||||||
CIA2_DDRA := $DD02
|
CIA2_DDRA := $DD02
|
||||||
CIA2_DDRB := $DD03
|
CIA2_DDRB := $DD03
|
||||||
CIA2_TOD10 := $DD08
|
CIA2_TOD10 := $DD08
|
||||||
CIA2_TODSEC := $DD09
|
CIA2_TODSEC := $DD09
|
||||||
CIA2_TODMIN := $DD0A
|
CIA2_TODMIN := $DD0A
|
||||||
CIA2_TODHR := $DD0B
|
CIA2_TODHR := $DD0B
|
||||||
CIA2_ICR := $DD0D
|
CIA2_ICR := $DD0D
|
||||||
CIA2_CRA := $DD0E
|
CIA2_CRA := $DD0E
|
||||||
CIA2_CRB := $DD0F
|
CIA2_CRB := $DD0F
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Super CPU
|
; Super CPU
|
||||||
|
|
||||||
SCPU_VIC_Bank1 := $D075
|
SCPU_VIC_Bank1 := $D075
|
||||||
SCPU_Slow := $D07A
|
SCPU_Slow := $D07A
|
||||||
SCPU_Fast := $D07B
|
SCPU_Fast := $D07B
|
||||||
SCPU_EnableRegs := $D07E
|
SCPU_EnableRegs := $D07E
|
||||||
SCPU_DisableRegs:= $D07F
|
SCPU_DisableRegs:= $D07F
|
||||||
SCPU_Detect := $D0BC
|
SCPU_Detect := $D0BC
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Processor Port at $01
|
; Processor Port at $01
|
||||||
|
|
||||||
LORAM = $01 ; Enable the basic rom
|
LORAM = $01 ; Enable the basic rom
|
||||||
HIRAM = $02 ; Enable the kernal rom
|
HIRAM = $02 ; Enable the kernal rom
|
||||||
IOEN = $04 ; Enable I/O
|
IOEN = $04 ; Enable I/O
|
||||||
CASSDATA = $08 ; Cassette data
|
CASSDATA = $08 ; Cassette data
|
||||||
CASSPLAY = $10 ; Cassette: Play
|
CASSPLAY = $10 ; Cassette: Play
|
||||||
CASSMOT = $20 ; Cassette motor on
|
CASSMOT = $20 ; Cassette motor on
|
||||||
TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode
|
TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode
|
||||||
|
|
||||||
RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF
|
RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Zeropage stuff
|
; Zeropage stuff
|
||||||
|
|
||||||
ExecReg = $00
|
ExecReg = $00
|
||||||
IndReg = $01
|
IndReg = $01
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Screen size
|
; Screen size
|
||||||
|
@ -23,93 +23,93 @@ YSIZE = 25
|
||||||
|
|
||||||
; I/O $d800: VIC
|
; I/O $d800: VIC
|
||||||
|
|
||||||
VIC_SPR0_X = $00
|
VIC_SPR0_X = $00
|
||||||
VIC_SPR0_Y = $01
|
VIC_SPR0_Y = $01
|
||||||
VIC_SPR1_X = $02
|
VIC_SPR1_X = $02
|
||||||
VIC_SPR1_Y = $03
|
VIC_SPR1_Y = $03
|
||||||
VIC_SPR2_X = $04
|
VIC_SPR2_X = $04
|
||||||
VIC_SPR2_Y = $05
|
VIC_SPR2_Y = $05
|
||||||
VIC_SPR3_X = $06
|
VIC_SPR3_X = $06
|
||||||
VIC_SPR3_Y = $07
|
VIC_SPR3_Y = $07
|
||||||
VIC_SPR4_X = $08
|
VIC_SPR4_X = $08
|
||||||
VIC_SPR4_Y = $09
|
VIC_SPR4_Y = $09
|
||||||
VIC_SPR5_X = $0A
|
VIC_SPR5_X = $0A
|
||||||
VIC_SPR5_Y = $0B
|
VIC_SPR5_Y = $0B
|
||||||
VIC_SPR6_X = $0C
|
VIC_SPR6_X = $0C
|
||||||
VIC_SPR6_Y = $0D
|
VIC_SPR6_Y = $0D
|
||||||
VIC_SPR7_X = $0E
|
VIC_SPR7_X = $0E
|
||||||
VIC_SPR7_Y = $0F
|
VIC_SPR7_Y = $0F
|
||||||
VIC_SPR_HI_X = $10
|
VIC_SPR_HI_X = $10
|
||||||
VIC_SPR_ENA = $15
|
VIC_SPR_ENA = $15
|
||||||
VIC_SPR_EXP_Y = $17
|
VIC_SPR_EXP_Y = $17
|
||||||
VIC_SPR_EXP_X = $1D
|
VIC_SPR_EXP_X = $1D
|
||||||
VIC_SPR_MCOLOR = $1C
|
VIC_SPR_MCOLOR = $1C
|
||||||
VIC_SPR_BG_PRIO = $1B
|
VIC_SPR_BG_PRIO = $1B
|
||||||
|
|
||||||
VIC_SPR_MCOLOR0 = $25
|
VIC_SPR_MCOLOR0 = $25
|
||||||
VIC_SPR_MCOLOR1 = $26
|
VIC_SPR_MCOLOR1 = $26
|
||||||
|
|
||||||
VIC_SPR0_COLOR = $27
|
VIC_SPR0_COLOR = $27
|
||||||
VIC_SPR1_COLOR = $28
|
VIC_SPR1_COLOR = $28
|
||||||
VIC_SPR2_COLOR = $29
|
VIC_SPR2_COLOR = $29
|
||||||
VIC_SPR3_COLOR = $2A
|
VIC_SPR3_COLOR = $2A
|
||||||
VIC_SPR4_COLOR = $2B
|
VIC_SPR4_COLOR = $2B
|
||||||
VIC_SPR5_COLOR = $2C
|
VIC_SPR5_COLOR = $2C
|
||||||
VIC_SPR6_COLOR = $2D
|
VIC_SPR6_COLOR = $2D
|
||||||
VIC_SPR7_COLOR = $2E
|
VIC_SPR7_COLOR = $2E
|
||||||
|
|
||||||
VIC_CTRL1 = $11
|
VIC_CTRL1 = $11
|
||||||
VIC_CTRL2 = $16
|
VIC_CTRL2 = $16
|
||||||
|
|
||||||
VIC_HLINE = $12
|
VIC_HLINE = $12
|
||||||
|
|
||||||
VIC_VIDEO_ADR = $18
|
VIC_VIDEO_ADR = $18
|
||||||
|
|
||||||
VIC_IRR = $19 ; Interrupt request register
|
VIC_IRR = $19 ; Interrupt request register
|
||||||
VIC_IMR = $1A ; Interrupt mask register
|
VIC_IMR = $1A ; Interrupt mask register
|
||||||
|
|
||||||
VIC_BORDERCOLOR = $20
|
VIC_BORDERCOLOR = $20
|
||||||
VIC_BG_COLOR0 = $21
|
VIC_BG_COLOR0 = $21
|
||||||
VIC_BG_COLOR1 = $22
|
VIC_BG_COLOR1 = $22
|
||||||
VIC_BG_COLOR2 = $23
|
VIC_BG_COLOR2 = $23
|
||||||
VIC_BG_COLOR3 = $24
|
VIC_BG_COLOR3 = $24
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; I/O $da00: SID 6581
|
; I/O $da00: SID 6581
|
||||||
|
|
||||||
SID_S1Lo = $00
|
SID_S1Lo = $00
|
||||||
SID_S1Hi = $01
|
SID_S1Hi = $01
|
||||||
SID_PB1Lo = $02
|
SID_PB1Lo = $02
|
||||||
SID_PB1Hi = $03
|
SID_PB1Hi = $03
|
||||||
SID_Ctl1 = $04
|
SID_Ctl1 = $04
|
||||||
SID_AD1 = $05
|
SID_AD1 = $05
|
||||||
SID_SUR1 = $06
|
SID_SUR1 = $06
|
||||||
|
|
||||||
SID_S2Lo = $07
|
SID_S2Lo = $07
|
||||||
SID_S2Hi = $08
|
SID_S2Hi = $08
|
||||||
SID_PB2Lo = $09
|
SID_PB2Lo = $09
|
||||||
SID_PB2Hi = $0A
|
SID_PB2Hi = $0A
|
||||||
SID_Ctl2 = $0B
|
SID_Ctl2 = $0B
|
||||||
SID_AD2 = $0C
|
SID_AD2 = $0C
|
||||||
SID_SUR2 = $0D
|
SID_SUR2 = $0D
|
||||||
|
|
||||||
SID_S3Lo = $0E
|
SID_S3Lo = $0E
|
||||||
SID_S3Hi = $0F
|
SID_S3Hi = $0F
|
||||||
SID_PB3Lo = $10
|
SID_PB3Lo = $10
|
||||||
SID_PB3Hi = $11
|
SID_PB3Hi = $11
|
||||||
SID_Ctl3 = $12
|
SID_Ctl3 = $12
|
||||||
SID_AD3 = $13
|
SID_AD3 = $13
|
||||||
SID_SUR3 = $14
|
SID_SUR3 = $14
|
||||||
|
|
||||||
SID_FltLo = $15
|
SID_FltLo = $15
|
||||||
SID_FltHi = $16
|
SID_FltHi = $16
|
||||||
SID_FltCtl = $17
|
SID_FltCtl = $17
|
||||||
SID_Amp = $18
|
SID_Amp = $18
|
||||||
SID_ADConv1 = $19
|
SID_ADConv1 = $19
|
||||||
SID_ADConv2 = $1A
|
SID_ADConv2 = $1A
|
||||||
SID_Noise = $1B
|
SID_Noise = $1B
|
||||||
SID_Read3 = $1C
|
SID_Read3 = $1C
|
||||||
|
|
||||||
|
|
||||||
; I/O $db00: CIA 6526 Inter Process Communication
|
; I/O $db00: CIA 6526 Inter Process Communication
|
||||||
|
@ -178,5 +178,5 @@ SID_Read3 = $1C
|
||||||
|
|
||||||
; Out video memory address
|
; Out video memory address
|
||||||
|
|
||||||
COLOR_RAM = $D400 ; System bank
|
COLOR_RAM = $D400 ; System bank
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Zeropage stuff
|
; Zeropage stuff
|
||||||
|
|
||||||
ExecReg = $00
|
ExecReg = $00
|
||||||
IndReg = $01
|
IndReg = $01
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Screen size
|
; Screen size
|
||||||
|
@ -25,13 +25,13 @@ YSIZE = 25
|
||||||
; I/O $d800: CRTC 6545
|
; I/O $d800: CRTC 6545
|
||||||
|
|
||||||
.struct CRTC
|
.struct CRTC
|
||||||
ADDR .byte
|
ADDR .byte
|
||||||
DATA .byte
|
DATA .byte
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
; I/O $db00: CIA 6526 Inter Process Communication
|
; I/O $db00: CIA 6526 Inter Process Communication
|
||||||
;
|
;
|
||||||
; IPCcia = $db00
|
; IPCcia = $db00
|
||||||
|
|
||||||
.struct CIA
|
.struct CIA
|
||||||
PRA .byte
|
PRA .byte
|
||||||
|
@ -65,13 +65,13 @@ YSIZE = 25
|
||||||
|
|
||||||
; I/O $dc00: CIA 6526
|
; I/O $dc00: CIA 6526
|
||||||
;
|
;
|
||||||
; cia = $dc00
|
; cia = $dc00
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; I/O $dd00: ACIA 6551
|
; I/O $dd00: ACIA 6551
|
||||||
;
|
;
|
||||||
; acia = $dd00
|
; acia = $dd00
|
||||||
|
|
||||||
.struct ACIA
|
.struct ACIA
|
||||||
DATA .byte
|
DATA .byte
|
||||||
|
@ -83,7 +83,7 @@ YSIZE = 25
|
||||||
|
|
||||||
; I/O $de00: Triport #1 6525
|
; I/O $de00: Triport #1 6525
|
||||||
;
|
;
|
||||||
; tpi1 = $de00
|
; tpi1 = $de00
|
||||||
|
|
||||||
.struct TPI
|
.struct TPI
|
||||||
PRA .byte
|
PRA .byte
|
||||||
|
@ -105,6 +105,6 @@ YSIZE = 25
|
||||||
|
|
||||||
; I/O $df00: Triport #2 6525
|
; I/O $df00: Triport #2 6525
|
||||||
|
|
||||||
; tpi2 = $df00
|
; tpi2 = $df00
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,24 +6,24 @@
|
||||||
|
|
||||||
; Make the __ctype table an exported/imported symbol
|
; Make the __ctype table an exported/imported symbol
|
||||||
|
|
||||||
.global __ctype
|
.global __ctype
|
||||||
|
|
||||||
; Define bitmapped constants for the table entries
|
; Define bitmapped constants for the table entries
|
||||||
|
|
||||||
CT_NONE = $00 ; Nothing special
|
CT_NONE = $00 ; Nothing special
|
||||||
CT_LOWER = $01 ; 0 - Lower case char
|
CT_LOWER = $01 ; 0 - Lower case char
|
||||||
CT_UPPER = $02 ; 1 - Upper case char
|
CT_UPPER = $02 ; 1 - Upper case char
|
||||||
CT_DIGIT = $04 ; 2 - Numeric digit
|
CT_DIGIT = $04 ; 2 - Numeric digit
|
||||||
CT_XDIGIT = $08 ; 3 - Hex digit (both, lower and upper)
|
CT_XDIGIT = $08 ; 3 - Hex digit (both, lower and upper)
|
||||||
CT_CTRL = $10 ; 4 - Control character
|
CT_CTRL = $10 ; 4 - Control character
|
||||||
CT_SPACE = $20 ; 5 - The space character itself
|
CT_SPACE = $20 ; 5 - The space character itself
|
||||||
CT_OTHER_WS = $40 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
|
CT_OTHER_WS = $40 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
|
||||||
CT_SPACE_TAB = $80 ; 7 - Space or tab character
|
CT_SPACE_TAB = $80 ; 7 - Space or tab character
|
||||||
|
|
||||||
; Combined stuff
|
; Combined stuff
|
||||||
CT_ALNUM = (CT_LOWER | CT_UPPER | CT_DIGIT)
|
CT_ALNUM = (CT_LOWER | CT_UPPER | CT_DIGIT)
|
||||||
CT_ALPHA = (CT_LOWER | CT_UPPER)
|
CT_ALPHA = (CT_LOWER | CT_UPPER)
|
||||||
CT_CTRL_SPACE = (CT_CTRL | CT_SPACE)
|
CT_CTRL_SPACE = (CT_CTRL | CT_SPACE)
|
||||||
CT_NOT_PUNCT = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)
|
CT_NOT_PUNCT = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,19 +36,19 @@
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; The driver header
|
; The driver header
|
||||||
|
|
||||||
.struct EMD_HDR
|
.struct EMD_HDR
|
||||||
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
|
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
|
||||||
VERSION .byte 1 ; Interface version
|
VERSION .byte 1 ; Interface version
|
||||||
JUMPTAB .struct
|
JUMPTAB .struct
|
||||||
INSTALL .word ; INSTALL routine
|
INSTALL .word ; INSTALL routine
|
||||||
UNINSTALL .word ; UNINSTALL routine
|
UNINSTALL .word ; UNINSTALL routine
|
||||||
PAGECOUNT .word ; PAGECOUNT routine
|
PAGECOUNT .word ; PAGECOUNT routine
|
||||||
MAP .word ; MAP routine
|
MAP .word ; MAP routine
|
||||||
USE .word ; USE routine
|
USE .word ; USE routine
|
||||||
MAPCLEAN .word ; MAPCLEAN routine
|
MAPCLEAN .word ; MAPCLEAN routine
|
||||||
COPYFROM .word ; COPYFROM routine
|
COPYFROM .word ; COPYFROM routine
|
||||||
COPYTO .word ; COPYTO routine
|
COPYTO .word ; COPYTO routine
|
||||||
.endstruct
|
.endstruct
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -59,18 +59,18 @@ EMD_API_VERSION = $00
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; The asm equivalent to the C em_copy structure
|
; The asm equivalent to the C em_copy structure
|
||||||
|
|
||||||
.struct EM_COPY
|
.struct EM_COPY
|
||||||
BUF .word ; Memory buffer to copy from or to
|
BUF .word ; Memory buffer to copy from or to
|
||||||
OFFS .byte ; Offset into page
|
OFFS .byte ; Offset into page
|
||||||
PAGE .word ; Starting page to copy from or to
|
PAGE .word ; Starting page to copy from or to
|
||||||
COUNT .word ; Number of bytes to copy
|
COUNT .word ; Number of bytes to copy
|
||||||
UNUSED .byte ; Make the size 8 bytes
|
UNUSED .byte ; Make the size 8 bytes
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Variables
|
; Variables
|
||||||
|
|
||||||
.global _em_drv ; Pointer to driver
|
.global _em_drv ; Pointer to driver
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Driver entry points
|
; Driver entry points
|
||||||
|
@ -81,25 +81,25 @@ EMD_API_VERSION = $00
|
||||||
.global emd_map
|
.global emd_map
|
||||||
.global emd_use
|
.global emd_use
|
||||||
.global emd_commit
|
.global emd_commit
|
||||||
.global emd_copyfrom
|
.global emd_copyfrom
|
||||||
.global emd_copyto
|
.global emd_copyto
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ASM functions
|
; ASM functions
|
||||||
|
|
||||||
.global em_clear_ptr
|
.global em_clear_ptr
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; C callable functions
|
; C callable functions
|
||||||
|
|
||||||
.global _em_load_driver
|
.global _em_load_driver
|
||||||
.global _em_unload
|
.global _em_unload
|
||||||
.global _em_install
|
.global _em_install
|
||||||
.global _em_uninstall
|
.global _em_uninstall
|
||||||
.global _em_pagecount
|
.global _em_pagecount
|
||||||
.global _em_map
|
.global _em_map
|
||||||
.global _em_use
|
.global _em_use
|
||||||
.global _em_commit
|
.global _em_commit
|
||||||
.global _em_copyfrom
|
.global _em_copyfrom
|
||||||
.global _em_copyto
|
.global _em_copyto
|
||||||
|
|
||||||
|
|
|
@ -12,23 +12,23 @@
|
||||||
; Error codes, must match the values in the C headers
|
; Error codes, must match the values in the C headers
|
||||||
.enum
|
.enum
|
||||||
EOK ; No error
|
EOK ; No error
|
||||||
ENOENT ; No such file or directory
|
ENOENT ; No such file or directory
|
||||||
ENOMEM ; Out of memory
|
ENOMEM ; Out of memory
|
||||||
EACCES ; Permission denied
|
EACCES ; Permission denied
|
||||||
ENODEV ; No such device
|
ENODEV ; No such device
|
||||||
EMFILE ; Too many open files
|
EMFILE ; Too many open files
|
||||||
EBUSY ; Device or resource busy
|
EBUSY ; Device or resource busy
|
||||||
EINVAL ; Invalid argument
|
EINVAL ; Invalid argument
|
||||||
ENOSPC ; No space left on device
|
ENOSPC ; No space left on device
|
||||||
EEXIST ; File exists
|
EEXIST ; File exists
|
||||||
EAGAIN ; Try again
|
EAGAIN ; Try again
|
||||||
EIO ; I/O error
|
EIO ; I/O error
|
||||||
EINTR ; Interrupted system call
|
EINTR ; Interrupted system call
|
||||||
ENOSYS ; Function not implemented
|
ENOSYS ; Function not implemented
|
||||||
ESPIPE ; Illegal seek
|
ESPIPE ; Illegal seek
|
||||||
ERANGE ; Range error
|
ERANGE ; Range error
|
||||||
EBADF ; Bad file number
|
EBADF ; Bad file number
|
||||||
EUNKNOWN ; Unknown OS specific error - must be last!
|
EUNKNOWN ; Unknown OS specific error - must be last!
|
||||||
|
|
||||||
EMAX = EUNKNOWN ; Highest error code
|
EMAX = EUNKNOWN ; Highest error code
|
||||||
.endenum
|
.endenum
|
||||||
|
|
|
@ -8,12 +8,12 @@ STDOUT_FILENO = 1
|
||||||
STDERR_FILENO = 2
|
STDERR_FILENO = 2
|
||||||
|
|
||||||
; File mode constants, must match the values in the C headers
|
; File mode constants, must match the values in the C headers
|
||||||
O_RDONLY = $01
|
O_RDONLY = $01
|
||||||
O_WRONLY = $02
|
O_WRONLY = $02
|
||||||
O_RDWR = $03
|
O_RDWR = $03
|
||||||
O_CREAT = $10
|
O_CREAT = $10
|
||||||
O_TRUNC = $20
|
O_TRUNC = $20
|
||||||
O_APPEND = $40
|
O_APPEND = $40
|
||||||
O_EXCL = $80
|
O_EXCL = $80
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,16 +40,16 @@
|
||||||
; Driver header stuff
|
; Driver header stuff
|
||||||
|
|
||||||
.struct JOY_HDR
|
.struct JOY_HDR
|
||||||
ID .byte 3 ; $6A, $6F, $79 ("joy")
|
ID .byte 3 ; $6A, $6F, $79 ("joy")
|
||||||
VERSION .byte 1 ; Interface version
|
VERSION .byte 1 ; Interface version
|
||||||
MASKS .byte 8 ; Joystick state mask array
|
MASKS .byte 8 ; Joystick state mask array
|
||||||
JUMPTAB .struct
|
JUMPTAB .struct
|
||||||
INSTALL .word ; INSTALL routine
|
INSTALL .word ; INSTALL routine
|
||||||
UNINSTALL .word ; UNINSTALL routine
|
UNINSTALL .word ; UNINSTALL routine
|
||||||
COUNT .word ; COUNT routine
|
COUNT .word ; COUNT routine
|
||||||
READ .word ; READ routine
|
READ .word ; READ routine
|
||||||
IRQ .word ; IRQ routine
|
IRQ .word ; IRQ routine
|
||||||
.endstruct
|
.endstruct
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -60,7 +60,7 @@ JOY_API_VERSION = $01
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Variables
|
; Variables
|
||||||
|
|
||||||
.global _joy_drv ; Pointer to driver
|
.global _joy_drv ; Pointer to driver
|
||||||
.global _joy_masks
|
.global _joy_masks
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -76,10 +76,10 @@ JOY_API_VERSION = $01
|
||||||
|
|
||||||
.global _joy_load_driver
|
.global _joy_load_driver
|
||||||
.global _joy_unload
|
.global _joy_unload
|
||||||
.global _joy_install
|
.global _joy_install
|
||||||
.global _joy_uninstall
|
.global _joy_uninstall
|
||||||
.global _joy_count
|
.global _joy_count
|
||||||
.global _joy_read
|
.global _joy_read
|
||||||
|
|
||||||
.global _joy_clear_ptr
|
.global _joy_clear_ptr
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
; /* Free a loaded module. Note: The given pointer is the pointer to the
|
; /* Free a loaded module. Note: The given pointer is the pointer to the
|
||||||
; * module memory, not a pointer to a control structure.
|
; * module memory, not a pointer to a control structure.
|
||||||
; */
|
; */
|
||||||
.global _mod_free
|
.global _mod_free
|
||||||
|
|
||||||
; Errors
|
; Errors
|
||||||
.enum
|
.enum
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
;/* */
|
;/* */
|
||||||
;/* mouse-kernel.inc */
|
;/* mouse-kernel.inc */
|
||||||
;/* */
|
;/* */
|
||||||
;/* Mouse API */
|
;/* Mouse API */
|
||||||
;/* */
|
;/* */
|
||||||
;/* */
|
;/* */
|
||||||
;/* */
|
;/* */
|
||||||
|
@ -53,23 +53,23 @@
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; The driver header
|
; The driver header
|
||||||
|
|
||||||
.struct MOUSE_HDR
|
.struct MOUSE_HDR
|
||||||
ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
|
ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
|
||||||
VERSION .byte 1 ; Interface version
|
VERSION .byte 1 ; Interface version
|
||||||
JUMPTAB .struct
|
JUMPTAB .struct
|
||||||
INSTALL .addr
|
INSTALL .addr
|
||||||
UNINSTALL .addr
|
UNINSTALL .addr
|
||||||
HIDE .addr
|
HIDE .addr
|
||||||
SHOW .addr
|
SHOW .addr
|
||||||
SETBOX .addr
|
SETBOX .addr
|
||||||
GETBOX .addr
|
GETBOX .addr
|
||||||
MOVE .addr
|
MOVE .addr
|
||||||
BUTTONS .addr
|
BUTTONS .addr
|
||||||
POS .addr
|
POS .addr
|
||||||
INFO .addr
|
INFO .addr
|
||||||
IOCTL .addr
|
IOCTL .addr
|
||||||
IRQ .addr
|
IRQ .addr
|
||||||
.endstruct
|
.endstruct
|
||||||
FLAGS .byte ; Mouse driver flags
|
FLAGS .byte ; Mouse driver flags
|
||||||
CALLBACKS .struct ; Jump instructions
|
CALLBACKS .struct ; Jump instructions
|
||||||
.byte ; JMP opcode
|
.byte ; JMP opcode
|
||||||
|
@ -86,10 +86,10 @@
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; The mouse callback structure
|
; The mouse callback structure
|
||||||
|
|
||||||
.struct MOUSE_CALLBACKS
|
.struct MOUSE_CALLBACKS
|
||||||
HIDE .addr ; Hide the mouse cursor
|
HIDE .addr ; Hide the mouse cursor
|
||||||
SHOW .addr ; Show the mouse cursor
|
SHOW .addr ; Show the mouse cursor
|
||||||
MOVEX .addr ; Move the mouse cursor
|
MOVEX .addr ; Move the mouse cursor
|
||||||
MOVEY .addr ; Dito for Y
|
MOVEY .addr ; Dito for Y
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ MOUSE_FLAG_LATE_IRQ = $80 ; Enable IRQ *after* calling INSTALL
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Mouse button definitions
|
; Mouse button definitions
|
||||||
|
|
||||||
MOUSE_BTN_LEFT = $10
|
MOUSE_BTN_LEFT = $10
|
||||||
MOUSE_BTN_RIGHT = $01
|
MOUSE_BTN_RIGHT = $01
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -129,16 +129,16 @@ MOUSE_BTN_RIGHT = $01
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
.struct MOUSE_BOX
|
.struct MOUSE_BOX
|
||||||
MINX .word
|
MINX .word
|
||||||
MINY .word
|
MINY .word
|
||||||
MAXX .word
|
MAXX .word
|
||||||
MAXY .word
|
MAXY .word
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Variables
|
; Variables
|
||||||
|
|
||||||
.global _mouse_drv ; Pointer to driver
|
.global _mouse_drv ; Pointer to driver
|
||||||
.global _mouse_hidden ; Counter, 0 = mouse is visible
|
.global _mouse_hidden ; Counter, 0 = mouse is visible
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -152,14 +152,14 @@ MOUSE_BTN_RIGHT = $01
|
||||||
.global _mouse_hide
|
.global _mouse_hide
|
||||||
.global _mouse_show
|
.global _mouse_show
|
||||||
.global _mouse_setbox
|
.global _mouse_setbox
|
||||||
.global _mouse_getbox
|
.global _mouse_getbox
|
||||||
.global _mouse_move
|
.global _mouse_move
|
||||||
.global _mouse_buttons
|
.global _mouse_buttons
|
||||||
.global _mouse_pos
|
.global _mouse_pos
|
||||||
.global _mouse_info
|
.global _mouse_info
|
||||||
.global _mouse_ioctl
|
.global _mouse_ioctl
|
||||||
|
|
||||||
.global _mouse_clear_ptr
|
.global _mouse_clear_ptr
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Driver entry points (asm callable)
|
; Driver entry points (asm callable)
|
||||||
|
@ -168,8 +168,8 @@ MOUSE_BTN_RIGHT = $01
|
||||||
.global mouse_uninstall
|
.global mouse_uninstall
|
||||||
.global mouse_hide
|
.global mouse_hide
|
||||||
.global mouse_show
|
.global mouse_show
|
||||||
.global mouse_setbox
|
.global mouse_setbox
|
||||||
.global mouse_getbox
|
.global mouse_getbox
|
||||||
.global mouse_move
|
.global mouse_move
|
||||||
.global mouse_buttons
|
.global mouse_buttons
|
||||||
.global mouse_pos
|
.global mouse_pos
|
||||||
|
|
|
@ -5,17 +5,17 @@
|
||||||
|
|
||||||
;; FIXME: optimize zeropage usage
|
;; FIXME: optimize zeropage usage
|
||||||
|
|
||||||
SCREEN_PTR = $62 ;2
|
SCREEN_PTR = $62 ;2
|
||||||
CRAM_PTR = $64 ;2
|
CRAM_PTR = $64 ;2
|
||||||
CHARCOLOR = $66
|
CHARCOLOR = $66
|
||||||
BGCOLOR = $67
|
BGCOLOR = $67
|
||||||
RVS = $68
|
RVS = $68
|
||||||
CURS_X = $69
|
CURS_X = $69
|
||||||
CURS_Y = $6a
|
CURS_Y = $6a
|
||||||
|
|
||||||
tickcount = $6b ;2
|
tickcount = $6b ;2
|
||||||
|
|
||||||
VBLANK_FLAG = $70
|
VBLANK_FLAG = $70
|
||||||
|
|
||||||
ringbuff = $0200
|
ringbuff = $0200
|
||||||
ringwrite = $71
|
ringwrite = $71
|
||||||
|
@ -26,20 +26,20 @@ ppuhi = $74
|
||||||
ppulo = $75
|
ppulo = $75
|
||||||
ppuval = $76
|
ppuval = $76
|
||||||
|
|
||||||
screenrows = (30-1)
|
screenrows = (30-1)
|
||||||
charsperline = 32
|
charsperline = 32
|
||||||
xsize = charsperline
|
xsize = charsperline
|
||||||
|
|
||||||
;; PPU defines
|
;; PPU defines
|
||||||
|
|
||||||
PPU_CTRL1 = $2000
|
PPU_CTRL1 = $2000
|
||||||
PPU_CTRL2 = $2001
|
PPU_CTRL2 = $2001
|
||||||
PPU_STATUS = $2002
|
PPU_STATUS = $2002
|
||||||
PPU_SPR_ADDR = $2003
|
PPU_SPR_ADDR = $2003
|
||||||
PPU_SPR_IO = $2004
|
PPU_SPR_IO = $2004
|
||||||
PPU_VRAM_ADDR1 = $2005
|
PPU_VRAM_ADDR1 = $2005
|
||||||
PPU_VRAM_ADDR2 = $2006
|
PPU_VRAM_ADDR2 = $2006
|
||||||
PPU_VRAM_IO = $2007
|
PPU_VRAM_IO = $2007
|
||||||
|
|
||||||
;; APU defines
|
;; APU defines
|
||||||
|
|
||||||
|
@ -63,30 +63,30 @@ APU_MODCTRL = $4010 ; Delta Modulation Control Register (W)
|
||||||
APU_MODDA = $4011 ; Delta Modulation D/A Register (W)
|
APU_MODDA = $4011 ; Delta Modulation D/A Register (W)
|
||||||
APU_MODADDR = $4012 ; Delta Modulation Address Register (W)
|
APU_MODADDR = $4012 ; Delta Modulation Address Register (W)
|
||||||
APU_MODLEN = $4013 ; Delta Modulation Data Length Register (W)
|
APU_MODLEN = $4013 ; Delta Modulation Data Length Register (W)
|
||||||
APU_SPR_DMA = $4014 ; Sprite DMA Register (W)
|
APU_SPR_DMA = $4014 ; Sprite DMA Register (W)
|
||||||
APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R)
|
APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R)
|
||||||
APU_PAD1 = $4016 ; Joypad #1 (RW)
|
APU_PAD1 = $4016 ; Joypad #1 (RW)
|
||||||
APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW)
|
APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW)
|
||||||
|
|
||||||
|
|
||||||
CH_HLINE = 11
|
CH_HLINE = 11
|
||||||
CH_VLINE = 14
|
CH_VLINE = 14
|
||||||
CH_ULCORNER = 176
|
CH_ULCORNER = 176
|
||||||
CH_URCORNER = 174
|
CH_URCORNER = 174
|
||||||
CH_LLCORNER = 173
|
CH_LLCORNER = 173
|
||||||
CH_LRCORNER = 189
|
CH_LRCORNER = 189
|
||||||
CH_TTEE = 178
|
CH_TTEE = 178
|
||||||
CH_RTEE = 179
|
CH_RTEE = 179
|
||||||
CH_BTEE = 177
|
CH_BTEE = 177
|
||||||
CH_LTEE = 171
|
CH_LTEE = 171
|
||||||
CH_CROSS = 123
|
CH_CROSS = 123
|
||||||
CH_CURS_UP = 145
|
CH_CURS_UP = 145
|
||||||
CH_CURS_DOWN = 17
|
CH_CURS_DOWN = 17
|
||||||
CH_CURS_LEFT = 157
|
CH_CURS_LEFT = 157
|
||||||
CH_CURS_RIGHT = 29
|
CH_CURS_RIGHT = 29
|
||||||
CH_PI = 126
|
CH_PI = 126
|
||||||
CH_DEL = 20
|
CH_DEL = 20
|
||||||
CH_INS = 148
|
CH_INS = 148
|
||||||
CH_ENTER = 10
|
CH_ENTER = 10
|
||||||
CH_STOP = 3
|
CH_STOP = 3
|
||||||
CH_ESC = 27
|
CH_ESC = 27
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
;*****************************************************************************/
|
;*****************************************************************************/
|
||||||
;* */
|
;* */
|
||||||
;* o65.inc */
|
;* o65.inc */
|
||||||
;* */
|
;* */
|
||||||
;* Definitions for the o65 file format */
|
;* Definitions for the o65 file format */
|
||||||
;* */
|
;* */
|
||||||
;* */
|
;* */
|
||||||
;* */
|
;* */
|
||||||
|
@ -64,7 +64,7 @@ O65_MAGIC_2 = $35 ; '5'
|
||||||
O65_VERSION = $00
|
O65_VERSION = $00
|
||||||
|
|
||||||
; Defines for the mode word
|
; Defines for the mode word
|
||||||
O65_CPU_65816 = $8000 ; Executable is for 65816
|
O65_CPU_65816 = $8000 ; Executable is for 65816
|
||||||
O65_CPU_6502 = $0000 ; Executable is for the 6502
|
O65_CPU_6502 = $0000 ; Executable is for the 6502
|
||||||
O65_CPU_MASK = $8000 ; Mask to extract CPU type
|
O65_CPU_MASK = $8000 ; Mask to extract CPU type
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ O65_BSSZERO = $0200 ; BSS segment must be zeroed
|
||||||
O65_BSSZERO_MASK = $0200 ; Mask to extract bss zero flag
|
O65_BSSZERO_MASK = $0200 ; Mask to extract bss zero flag
|
||||||
|
|
||||||
; The following is used if O65_CPU == 6502
|
; The following is used if O65_CPU == 6502
|
||||||
O65_CPU2_6502 = $0000 ; Executable is for 6502
|
O65_CPU2_6502 = $0000 ; Executable is for 6502
|
||||||
O65_CPU2_65C02 = $0010 ; Executable is for 65C02
|
O65_CPU2_65C02 = $0010 ; Executable is for 65C02
|
||||||
O65_CPU2_65SC02 = $0020 ; Executable is for 65SC02
|
O65_CPU2_65SC02 = $0020 ; Executable is for 65SC02
|
||||||
O65_CPU2_65CE02 = $0030 ; Executable is for 65CE02
|
O65_CPU2_65CE02 = $0030 ; Executable is for 65CE02
|
||||||
|
@ -127,14 +127,14 @@ O65_SEGID_MASK = $07
|
||||||
|
|
||||||
; Option tags
|
; Option tags
|
||||||
O65_OPT_FILENAME = 0
|
O65_OPT_FILENAME = 0
|
||||||
O65_OPT_OS = 1
|
O65_OPT_OS = 1
|
||||||
O65_OPT_ASM = 2
|
O65_OPT_ASM = 2
|
||||||
O65_OPT_AUTHOR = 3
|
O65_OPT_AUTHOR = 3
|
||||||
O65_OPT_TIMESTAMP = 4
|
O65_OPT_TIMESTAMP = 4
|
||||||
|
|
||||||
; Operating system codes for O65_OPT_OS
|
; Operating system codes for O65_OPT_OS
|
||||||
O65_OS_OSA65 = 1
|
O65_OS_OSA65 = 1
|
||||||
O65_OS_LUNIX = 2
|
O65_OS_LUNIX = 2
|
||||||
O65_OS_CC65 = 3
|
O65_OS_CC65 = 3
|
||||||
O65_OS_OPENCBM = 4
|
O65_OS_OPENCBM = 4
|
||||||
|
|
||||||
|
|
|
@ -6,25 +6,25 @@
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Zero page, Commodore stuff
|
; Zero page, Commodore stuff
|
||||||
|
|
||||||
MEMSIZE := $34 ; Size of memory installed
|
MEMSIZE := $34 ; Size of memory installed
|
||||||
TIME := $8D ; 60HZ clock
|
TIME := $8D ; 60HZ clock
|
||||||
KEY_COUNT := $9E ; Number of keys in input buffer
|
KEY_COUNT := $9E ; Number of keys in input buffer
|
||||||
RVS := $9F ; Reverse flag
|
RVS := $9F ; Reverse flag
|
||||||
CURS_FLAG := $A7 ; 1 = cursor off
|
CURS_FLAG := $A7 ; 1 = cursor off
|
||||||
CURS_BLINK := $A8 ; Blink counter
|
CURS_BLINK := $A8 ; Blink counter
|
||||||
CURS_CHAR := $A9 ; Character under the cursor
|
CURS_CHAR := $A9 ; Character under the cursor
|
||||||
CURS_STATE := $AA ; Cursor blink state
|
CURS_STATE := $AA ; Cursor blink state
|
||||||
SCREEN_PTR := $C4 ; Pointer to current char in text screen
|
SCREEN_PTR := $C4 ; Pointer to current char in text screen
|
||||||
CURS_X := $C6 ; Cursor column
|
CURS_X := $C6 ; Cursor column
|
||||||
FNLEN := $D1 ; Length of filename
|
FNLEN := $D1 ; Length of filename
|
||||||
LFN := $D2 ; Current Logical File Number
|
LFN := $D2 ; Current Logical File Number
|
||||||
SECADR := $D3 ; Secondary address
|
SECADR := $D3 ; Secondary address
|
||||||
DEVNUM := $D4 ; Device number
|
DEVNUM := $D4 ; Device number
|
||||||
SCR_LINELEN := $D5 ; Screen line length
|
SCR_LINELEN := $D5 ; Screen line length
|
||||||
CURS_Y := $D8 ; Cursor row
|
CURS_Y := $D8 ; Cursor row
|
||||||
FNADR := $DA ; Pointer to file name
|
FNADR := $DA ; Pointer to file name
|
||||||
|
|
||||||
KEY_BUF := $26F ; Keyboard buffer
|
KEY_BUF := $26F ; Keyboard buffer
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; PET ROM type detection
|
; PET ROM type detection
|
||||||
|
@ -38,17 +38,17 @@ PET_4000 = $FD
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; Vector and other locations
|
; Vector and other locations
|
||||||
|
|
||||||
IRQVec := $0090
|
IRQVec := $0090
|
||||||
BRKVec := $0092
|
BRKVec := $0092
|
||||||
NMIVec := $0094
|
NMIVec := $0094
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: 6522 VIA2
|
; I/O: 6522 VIA2
|
||||||
|
|
||||||
VIA := $E840
|
VIA := $E840
|
||||||
VIA_PRB := $E840
|
VIA_PRB := $E840
|
||||||
VIA_PRA := $E841
|
VIA_PRA := $E841
|
||||||
VIA_DDRB := $E842
|
VIA_DDRB := $E842
|
||||||
VIA_DDRA := $E843
|
VIA_DDRA := $E843
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,41 +8,41 @@
|
||||||
|
|
||||||
TMPPTR := $22 ; Temporary ptr used by BASIC
|
TMPPTR := $22 ; Temporary ptr used by BASIC
|
||||||
TIME := $A3 ; 60HZ clock
|
TIME := $A3 ; 60HZ clock
|
||||||
FNAM_LEN := $AB ; Length of filename
|
FNAM_LEN := $AB ; Length of filename
|
||||||
LFN := $AC ; Logical file number
|
LFN := $AC ; Logical file number
|
||||||
SECADR := $AD ; Secondary address
|
SECADR := $AD ; Secondary address
|
||||||
DEVNUM := $AE ; Device number
|
DEVNUM := $AE ; Device number
|
||||||
FNAM := $AF ; Pointer to filename for OPEN
|
FNAM := $AF ; Pointer to filename for OPEN
|
||||||
KEY_COUNT := $EF ; Number of keys in input buffer
|
KEY_COUNT := $EF ; Number of keys in input buffer
|
||||||
RVS := $C2 ; Reverse flag
|
RVS := $C2 ; Reverse flag
|
||||||
CURS_X := $CA ; Cursor column
|
CURS_X := $CA ; Cursor column
|
||||||
CURS_Y := $CD ; Cursor row
|
CURS_Y := $CD ; Cursor row
|
||||||
SCREEN_PTR := $C8 ; Pointer to current char in text screen
|
SCREEN_PTR := $C8 ; Pointer to current char in text screen
|
||||||
CRAM_PTR := $EA ; Pointer to current char in color RAM
|
CRAM_PTR := $EA ; Pointer to current char in color RAM
|
||||||
|
|
||||||
BASIC_BUF := $200 ; Location of command-line
|
BASIC_BUF := $200 ; Location of command-line
|
||||||
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
||||||
|
|
||||||
FNBUF := $25E ; Buffer for filename
|
FNBUF := $25E ; Buffer for filename
|
||||||
FETCH := $494 ; lda (zp),y from RAM
|
FETCH := $494 ; lda (zp),y from RAM
|
||||||
CHARCOLOR := $53B
|
CHARCOLOR := $53B
|
||||||
FKEY_COUNT := $55D ; Characters for function key
|
FKEY_COUNT := $55D ; Characters for function key
|
||||||
FKEY_SPACE := $55F ; Function key definitions
|
FKEY_SPACE := $55F ; Function key definitions
|
||||||
FKEY_ORIG := $F3D2 ; Original definitions
|
FKEY_ORIG := $F3D2 ; Original definitions
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Kernal routines
|
; Kernal routines
|
||||||
|
|
||||||
; Direct entries
|
; Direct entries
|
||||||
CLRSCR := $D88B
|
CLRSCR := $D88B
|
||||||
KBDREAD := $D8C1
|
KBDREAD := $D8C1
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Vector and other locations
|
; Vector and other locations
|
||||||
|
|
||||||
IRQVec := $0314
|
IRQVec := $0314
|
||||||
BRKVec := $0316
|
BRKVec := $0316
|
||||||
NMIVec := $0318
|
NMIVec := $0318
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Screen size
|
; Screen size
|
||||||
|
@ -53,29 +53,29 @@ YSIZE = 25
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O
|
; I/O
|
||||||
|
|
||||||
TED_T1LO := $FF00
|
TED_T1LO := $FF00
|
||||||
TED_T1HI := $FF01
|
TED_T1HI := $FF01
|
||||||
TED_T2LO := $FF02
|
TED_T2LO := $FF02
|
||||||
TED_T2HI := $FF03
|
TED_T2HI := $FF03
|
||||||
TED_T3LO := $FF04
|
TED_T3LO := $FF04
|
||||||
TED_T4HI := $FF05
|
TED_T4HI := $FF05
|
||||||
TED_MULTI1 := $FF07
|
TED_MULTI1 := $FF07
|
||||||
TED_KBD := $FF08
|
TED_KBD := $FF08
|
||||||
TED_CURSHI := $FF0C
|
TED_CURSHI := $FF0C
|
||||||
TED_CURSLO := $FF0D
|
TED_CURSLO := $FF0D
|
||||||
TED_V1FRQLO := $FF0E
|
TED_V1FRQLO := $FF0E
|
||||||
TED_V2FRQLO := $FF0F
|
TED_V2FRQLO := $FF0F
|
||||||
TED_V2FRQHI := $FF10
|
TED_V2FRQHI := $FF10
|
||||||
TED_BGCOLOR := $FF15
|
TED_BGCOLOR := $FF15
|
||||||
TED_COLOR1 := $FF16
|
TED_COLOR1 := $FF16
|
||||||
TED_COLOR2 := $FF17
|
TED_COLOR2 := $FF17
|
||||||
TED_COLOR3 := $FF18
|
TED_COLOR3 := $FF18
|
||||||
TED_BORDERCOLOR := $FF19
|
TED_BORDERCOLOR := $FF19
|
||||||
TED_VLINEHI := $FF1C
|
TED_VLINEHI := $FF1C
|
||||||
TED_VLINELO := $FF1D
|
TED_VLINELO := $FF1D
|
||||||
TED_HPOS := $FF1E
|
TED_HPOS := $FF1E
|
||||||
TED_ROMSEL := $FF3E
|
TED_ROMSEL := $FF3E
|
||||||
TED_RAMSEL := $FF3F
|
TED_RAMSEL := $FF3F
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; RAM/ROM selection addresses
|
; RAM/ROM selection addresses
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
PUT .word ; PUT routine
|
PUT .word ; PUT routine
|
||||||
STATUS .word ; STATUS routine
|
STATUS .word ; STATUS routine
|
||||||
IOCTL .word ; IOCTL routine
|
IOCTL .word ; IOCTL routine
|
||||||
IRQ .word ; IRQ routine
|
IRQ .word ; IRQ routine
|
||||||
.endstruct
|
.endstruct
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
|
@ -74,44 +74,44 @@ SER_API_VERSION = $00
|
||||||
|
|
||||||
; Baudrate
|
; Baudrate
|
||||||
SER_BAUD_45_5 = $00
|
SER_BAUD_45_5 = $00
|
||||||
SER_BAUD_50 = $01
|
SER_BAUD_50 = $01
|
||||||
SER_BAUD_75 = $02
|
SER_BAUD_75 = $02
|
||||||
SER_BAUD_110 = $03
|
SER_BAUD_110 = $03
|
||||||
SER_BAUD_134_5 = $04
|
SER_BAUD_134_5 = $04
|
||||||
SER_BAUD_150 = $05
|
SER_BAUD_150 = $05
|
||||||
SER_BAUD_300 = $06
|
SER_BAUD_300 = $06
|
||||||
SER_BAUD_600 = $07
|
SER_BAUD_600 = $07
|
||||||
SER_BAUD_1200 = $08
|
SER_BAUD_1200 = $08
|
||||||
SER_BAUD_1800 = $09
|
SER_BAUD_1800 = $09
|
||||||
SER_BAUD_2400 = $0A
|
SER_BAUD_2400 = $0A
|
||||||
SER_BAUD_3600 = $0B
|
SER_BAUD_3600 = $0B
|
||||||
SER_BAUD_4800 = $0C
|
SER_BAUD_4800 = $0C
|
||||||
SER_BAUD_7200 = $0D
|
SER_BAUD_7200 = $0D
|
||||||
SER_BAUD_9600 = $0E
|
SER_BAUD_9600 = $0E
|
||||||
SER_BAUD_19200 = $0F
|
SER_BAUD_19200 = $0F
|
||||||
SER_BAUD_38400 = $10
|
SER_BAUD_38400 = $10
|
||||||
SER_BAUD_57600 = $11
|
SER_BAUD_57600 = $11
|
||||||
SER_BAUD_115200 = $12
|
SER_BAUD_115200 = $12
|
||||||
SER_BAUD_230400 = $13
|
SER_BAUD_230400 = $13
|
||||||
SER_BAUD_31250 = $14
|
SER_BAUD_31250 = $14
|
||||||
SER_BAUD_62500 = $15
|
SER_BAUD_62500 = $15
|
||||||
|
|
||||||
; Data bit settings
|
; Data bit settings
|
||||||
SER_BITS_5 = $00
|
SER_BITS_5 = $00
|
||||||
SER_BITS_6 = $01
|
SER_BITS_6 = $01
|
||||||
SER_BITS_7 = $02
|
SER_BITS_7 = $02
|
||||||
SER_BITS_8 = $03
|
SER_BITS_8 = $03
|
||||||
|
|
||||||
; Stop bit settings
|
; Stop bit settings
|
||||||
SER_STOP_1 = $00
|
SER_STOP_1 = $00
|
||||||
SER_STOP_2 = $01
|
SER_STOP_2 = $01
|
||||||
|
|
||||||
; Parity
|
; Parity
|
||||||
SER_PAR_NONE = $00
|
SER_PAR_NONE = $00
|
||||||
SER_PAR_ODD = $01
|
SER_PAR_ODD = $01
|
||||||
SER_PAR_EVEN = $02
|
SER_PAR_EVEN = $02
|
||||||
SER_PAR_MARK = $03
|
SER_PAR_MARK = $03
|
||||||
SER_PAR_SPACE = $04
|
SER_PAR_SPACE = $04
|
||||||
|
|
||||||
; Handshake
|
; Handshake
|
||||||
SER_HS_NONE = $00 ; No handshake
|
SER_HS_NONE = $00 ; No handshake
|
||||||
|
@ -119,16 +119,16 @@ SER_HS_HW = $01 ; Hardware (RTS/CTS) handshake
|
||||||
SER_HS_SW = $02 ; Software handshake
|
SER_HS_SW = $02 ; Software handshake
|
||||||
|
|
||||||
; Bit masks to mask out things from the status returned by ser_status
|
; Bit masks to mask out things from the status returned by ser_status
|
||||||
SER_STATUS_PE = $01 ; Parity error
|
SER_STATUS_PE = $01 ; Parity error
|
||||||
SER_STATUS_FE = $02 ; Framing error
|
SER_STATUS_FE = $02 ; Framing error
|
||||||
SER_STATUS_OE = $04 ; Overrun error
|
SER_STATUS_OE = $04 ; Overrun error
|
||||||
SER_STATUS_DCD = $20 ; NOT data carrier detect
|
SER_STATUS_DCD = $20 ; NOT data carrier detect
|
||||||
SER_STATUS_DSR = $40 ; NOT data set ready
|
SER_STATUS_DSR = $40 ; NOT data set ready
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Variables
|
; Variables
|
||||||
|
|
||||||
.global _ser_drv ; Pointer to driver
|
.global _ser_drv ; Pointer to driver
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Driver entry points
|
; Driver entry points
|
||||||
|
@ -141,7 +141,7 @@ SER_STATUS_DSR = $40 ; NOT data set ready
|
||||||
.global ser_put
|
.global ser_put
|
||||||
.global ser_status
|
.global ser_status
|
||||||
.global ser_ioctl
|
.global ser_ioctl
|
||||||
.global ser_irq
|
.global ser_irq
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; C callable functions
|
; C callable functions
|
||||||
|
|
136
asminc/smc.inc
136
asminc/smc.inc
|
@ -21,12 +21,12 @@
|
||||||
; distribution.
|
; distribution.
|
||||||
;
|
;
|
||||||
|
|
||||||
.define _SMCDesignator .mid(0, .tcount(label) - 1, label) .ident(.concat(.string(.right(1, label)), "_SMC"))
|
.define _SMCDesignator .mid(0, .tcount(label) - 1, label) .ident(.concat(.string(.right(1, label)), "_SMC"))
|
||||||
.define _SMCAlias .mid(0, .tcount(alias) - 1, alias) .ident(.concat(.string(.right(1, alias)), "_SMC"))
|
.define _SMCAlias .mid(0, .tcount(alias) - 1, alias) .ident(.concat(.string(.right(1, alias)), "_SMC"))
|
||||||
.define SMC_AbsAdr $FADE
|
.define SMC_AbsAdr $FADE
|
||||||
.define SMC_ZpAdr $00
|
.define SMC_ZpAdr $00
|
||||||
.define SMC_Opcode nop
|
.define SMC_Opcode nop
|
||||||
.define SMC_Value $42
|
.define SMC_Value $42
|
||||||
|
|
||||||
.macro SMC_OperateOnValue opcode, label
|
.macro SMC_OperateOnValue opcode, label
|
||||||
opcode _SMCDesignator+1
|
opcode _SMCDesignator+1
|
||||||
|
@ -48,86 +48,86 @@
|
||||||
.export _SMCAlias := _SMCDesignator
|
.export _SMCAlias := _SMCDesignator
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC label, statement
|
.macro SMC label, statement
|
||||||
_SMCDesignator: statement
|
_SMCDesignator: statement
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_TransferOpcode label, opcode, register
|
.macro SMC_TransferOpcode label, opcode, register
|
||||||
.if .paramcount = 2 .or .match ({register}, a)
|
.if .paramcount = 2 .or .match ({register}, a)
|
||||||
lda #opcode
|
lda #opcode
|
||||||
sta _SMCDesignator
|
sta _SMCDesignator
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
ldx #opcode
|
ldx #opcode
|
||||||
stx _SMCDesignator
|
stx _SMCDesignator
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
ldy #opcode
|
ldy #opcode
|
||||||
sty _SMCDesignator
|
sty _SMCDesignator
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_LoadOpcode label, register
|
.macro SMC_LoadOpcode label, register
|
||||||
.if .paramcount = 1 .or .match ({register}, a)
|
.if .paramcount = 1 .or .match ({register}, a)
|
||||||
lda _SMCDesignator
|
lda _SMCDesignator
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
ldx _SMCDesignator
|
ldx _SMCDesignator
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
ldy _SMCDesignator
|
ldy _SMCDesignator
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_StoreOpcode label, register
|
.macro SMC_StoreOpcode label, register
|
||||||
.if .paramcount = 1 .or .match ({register}, a)
|
.if .paramcount = 1 .or .match ({register}, a)
|
||||||
sta _SMCDesignator
|
sta _SMCDesignator
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
stx _SMCDesignator
|
stx _SMCDesignator
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
sty _SMCDesignator
|
sty _SMCDesignator
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_ChangeBranch label, destination, register
|
.macro SMC_ChangeBranch label, destination, register
|
||||||
.if .paramcount = 2 .or .match ({register}, a)
|
.if .paramcount = 2 .or .match ({register}, a)
|
||||||
lda #(destination - _SMCDesignator -2)
|
lda #(destination - _SMCDesignator -2)
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
ldx #(destination - _SMCDesignator - 2)
|
ldx #(destination - _SMCDesignator - 2)
|
||||||
stx _SMCDesignator+1
|
stx _SMCDesignator+1
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
ldy #(destination - _SMCDesignator - 2)
|
ldy #(destination - _SMCDesignator - 2)
|
||||||
sty _SMCDesignator+1
|
sty _SMCDesignator+1
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_TransferValue label, value, register
|
.macro SMC_TransferValue label, value, register
|
||||||
.if .paramcount = 2 .or .match ({register}, a)
|
.if .paramcount = 2 .or .match ({register}, a)
|
||||||
lda value
|
lda value
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
ldx value
|
ldx value
|
||||||
stx _SMCDesignator+1
|
stx _SMCDesignator+1
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
ldy value
|
ldy value
|
||||||
sty _SMCDesignator+1
|
sty _SMCDesignator+1
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_LoadValue label, register
|
.macro SMC_LoadValue label, register
|
||||||
.if .paramcount = 1 .or .match ({register}, a)
|
.if .paramcount = 1 .or .match ({register}, a)
|
||||||
lda _SMCDesignator+1
|
lda _SMCDesignator+1
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
ldx _SMCDesignator+1
|
ldx _SMCDesignator+1
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
ldy _SMCDesignator+1
|
ldy _SMCDesignator+1
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_StoreValue label, register
|
.macro SMC_StoreValue label, register
|
||||||
.if .paramcount = 1 .or .match ({register}, a)
|
.if .paramcount = 1 .or .match ({register}, a)
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
stx _SMCDesignator+1
|
stx _SMCDesignator+1
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
sty _SMCDesignator+1
|
sty _SMCDesignator+1
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
@ -146,49 +146,48 @@ SMC_StoreValue label, register
|
||||||
|
|
||||||
.macro SMC_TransferHighByte label, value, register
|
.macro SMC_TransferHighByte label, value, register
|
||||||
.if .paramcount = 2 .or .match ({register}, a)
|
.if .paramcount = 2 .or .match ({register}, a)
|
||||||
lda value
|
lda value
|
||||||
sta _SMCDesignator+2
|
sta _SMCDesignator+2
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
ldx value
|
ldx value
|
||||||
stx _SMCDesignator+2
|
stx _SMCDesignator+2
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
ldy value
|
ldy value
|
||||||
sty _SMCDesignator+2
|
sty _SMCDesignator+2
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_LoadHighByte label, register
|
.macro SMC_LoadHighByte label, register
|
||||||
.if .paramcount = 1 .or .match ({register}, a)
|
.if .paramcount = 1 .or .match ({register}, a)
|
||||||
lda _SMCDesignator+2
|
lda _SMCDesignator+2
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
ldx _SMCDesignator+2
|
ldx _SMCDesignator+2
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
ldy _SMCDesignator+2
|
ldy _SMCDesignator+2
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_StoreHighByte label, register
|
.macro SMC_StoreHighByte label, register
|
||||||
.if .paramcount = 1 .or .match ({register}, a)
|
.if .paramcount = 1 .or .match ({register}, a)
|
||||||
sta _SMCDesignator+2
|
sta _SMCDesignator+2
|
||||||
.elseif .match ({register}, x)
|
.elseif .match ({register}, x)
|
||||||
stx _SMCDesignator+2
|
stx _SMCDesignator+2
|
||||||
.elseif .match ({register}, y)
|
.elseif .match ({register}, y)
|
||||||
sty _SMCDesignator+2
|
sty _SMCDesignator+2
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
|
||||||
.macro SMC_TransferAddressSingle label, address, register
|
.macro SMC_TransferAddressSingle label, address, register
|
||||||
.if .paramcount = 2 .or .match ((register), a)
|
.if .paramcount = 2 .or .match ((register), a)
|
||||||
.if (.match (.left (1, {address}), #))
|
.if (.match (.left (1, {address}), #))
|
||||||
; immediate mode
|
; immediate mode
|
||||||
lda #<(.right (.tcount ({address})-1, {address}))
|
lda #<(.right (.tcount ({address})-1, {address}))
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
lda #>(.right (.tcount ({address})-1, {address}))
|
lda #>(.right (.tcount ({address})-1, {address}))
|
||||||
sta _SMCDesignator+2
|
sta _SMCDesignator+2
|
||||||
.else
|
.else
|
||||||
; assume absolute or zero page
|
; assume absolute or zero page
|
||||||
lda address
|
lda address
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
lda 1+(address)
|
lda 1+(address)
|
||||||
sta _SMCDesignator+2
|
sta _SMCDesignator+2
|
||||||
|
@ -196,13 +195,13 @@ SMC_StoreValue label, register
|
||||||
.elseif .match ((register), x)
|
.elseif .match ((register), x)
|
||||||
.if (.match (.left (1, {address}), #))
|
.if (.match (.left (1, {address}), #))
|
||||||
; immediate mode
|
; immediate mode
|
||||||
ldx #<(.right (.tcount ({address})-1, {address}))
|
ldx #<(.right (.tcount ({address})-1, {address}))
|
||||||
stx _SMCDesignator+1
|
stx _SMCDesignator+1
|
||||||
ldx #>(.right (.tcount ({address})-1, {address}))
|
ldx #>(.right (.tcount ({address})-1, {address}))
|
||||||
stx _SMCDesignator+2
|
stx _SMCDesignator+2
|
||||||
.else
|
.else
|
||||||
; assume absolute or zero page
|
; assume absolute or zero page
|
||||||
ldx address
|
ldx address
|
||||||
stx _SMCDesignator+1
|
stx _SMCDesignator+1
|
||||||
ldx 1+(address)
|
ldx 1+(address)
|
||||||
stx _SMCDesignator+2
|
stx _SMCDesignator+2
|
||||||
|
@ -210,13 +209,13 @@ SMC_StoreValue label, register
|
||||||
.elseif .match ((register), y)
|
.elseif .match ((register), y)
|
||||||
.if (.match (.left (1, {address}), #))
|
.if (.match (.left (1, {address}), #))
|
||||||
; immediate mode
|
; immediate mode
|
||||||
ldy #<(.right (.tcount ({address})-1, {address}))
|
ldy #<(.right (.tcount ({address})-1, {address}))
|
||||||
sty _SMCDesignator+1
|
sty _SMCDesignator+1
|
||||||
ldy #>(.right (.tcount ({address})-1, {address}))
|
ldy #>(.right (.tcount ({address})-1, {address}))
|
||||||
sty _SMCDesignator+2
|
sty _SMCDesignator+2
|
||||||
.else
|
.else
|
||||||
; assume absolute or zero page
|
; assume absolute or zero page
|
||||||
ldy address
|
ldy address
|
||||||
sty _SMCDesignator+1
|
sty _SMCDesignator+1
|
||||||
ldy 1+(address)
|
ldy 1+(address)
|
||||||
sty _SMCDesignator+2
|
sty _SMCDesignator+2
|
||||||
|
@ -224,17 +223,16 @@ SMC_StoreValue label, register
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
|
||||||
.macro SMC_TransferAddress label, address
|
.macro SMC_TransferAddress label, address
|
||||||
.if (.match (.left (1, {address}), #))
|
.if (.match (.left (1, {address}), #))
|
||||||
; immediate mode
|
; immediate mode
|
||||||
lda #<(.right (.tcount ({address})-1, {address}))
|
lda #<(.right (.tcount ({address})-1, {address}))
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
ldx #>(.right (.tcount ({address})-1, {address}))
|
ldx #>(.right (.tcount ({address})-1, {address}))
|
||||||
stx _SMCDesignator+2
|
stx _SMCDesignator+2
|
||||||
.else
|
.else
|
||||||
; assume absolute or zero page
|
; assume absolute or zero page
|
||||||
lda {address}
|
lda {address}
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
ldx 1+{address}
|
ldx 1+{address}
|
||||||
stx _SMCDesignator)+2
|
stx _SMCDesignator)+2
|
||||||
|
@ -242,8 +240,6 @@ SMC_StoreValue label, register
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro SMC_StoreAddress label
|
.macro SMC_StoreAddress label
|
||||||
sta _SMCDesignator+1
|
sta _SMCDesignator+1
|
||||||
stx _SMCDesignator+2
|
stx _SMCDesignator+2
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,25 +36,25 @@
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|
||||||
_IOFBF = 0
|
_IOFBF = 0
|
||||||
_IOLBF = 1
|
_IOLBF = 1
|
||||||
_IONBF = 2
|
_IONBF = 2
|
||||||
BUFSIZ = 256
|
BUFSIZ = 256
|
||||||
EOF = -1
|
EOF = -1
|
||||||
.if .defined(__APPLE2__) .or .defined(__APPLE2ENH__)
|
.if .defined(__APPLE2__) .or .defined(__APPLE2ENH__)
|
||||||
FILENAME_MAX = 64+1
|
FILENAME_MAX = 64+1
|
||||||
.elseif .defined(__ATARI__)
|
.elseif .defined(__ATARI__)
|
||||||
FILENAME_MAX = 12+1
|
FILENAME_MAX = 12+1
|
||||||
.elseif .defined(__LUNIX__)
|
.elseif .defined(__LUNIX__)
|
||||||
FILENAME_MAX = 80+1
|
FILENAME_MAX = 80+1
|
||||||
.else
|
.else
|
||||||
FILENAME_MAX = 16+1
|
FILENAME_MAX = 16+1
|
||||||
.endif
|
.endif
|
||||||
L_tmpnam = FILENAME_MAX
|
L_tmpnam = FILENAME_MAX
|
||||||
SEEK_CUR = 0
|
SEEK_CUR = 0
|
||||||
SEEK_END = 1
|
SEEK_END = 1
|
||||||
SEEK_SET = 2
|
SEEK_SET = 2
|
||||||
TMP_MAX = 256
|
TMP_MAX = 256
|
||||||
|
|
||||||
; Maximum number of open files (size of the file table)
|
; Maximum number of open files (size of the file table)
|
||||||
FOPEN_MAX = 8
|
FOPEN_MAX = 8
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
TGI_ERR_INV_DRIVER ; Invalid driver
|
TGI_ERR_INV_DRIVER ; Invalid driver
|
||||||
TGI_ERR_INV_MODE ; Mode not supported by driver
|
TGI_ERR_INV_MODE ; Mode not supported by driver
|
||||||
TGI_ERR_INV_ARG ; Invalid function argument
|
TGI_ERR_INV_ARG ; Invalid function argument
|
||||||
TGI_ERR_INV_FUNC ; Function not supported
|
TGI_ERR_INV_FUNC ; Function not supported
|
||||||
TGI_ERR_INV_FONT ; Font file is invalid
|
TGI_ERR_INV_FONT ; Font file is invalid
|
||||||
TGI_ERR_NO_RES ; Out of resources (memory, handles, ...)
|
TGI_ERR_NO_RES ; Out of resources (memory, handles, ...)
|
||||||
TGI_ERR_UNKNOWN ; Unknown error
|
TGI_ERR_UNKNOWN ; Unknown error
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
UNINSTALL .addr ; UNINSTALL routine
|
UNINSTALL .addr ; UNINSTALL routine
|
||||||
INIT .addr ; INIT routine
|
INIT .addr ; INIT routine
|
||||||
DONE .addr ; DONE routine
|
DONE .addr ; DONE routine
|
||||||
GETERROR .addr ; GETERROR routine
|
GETERROR .addr ; GETERROR routine
|
||||||
CONTROL .addr ; CONTROL routine
|
CONTROL .addr ; CONTROL routine
|
||||||
CLEAR .addr ; CLEAR routine
|
CLEAR .addr ; CLEAR routine
|
||||||
SETVIEWPAGE .addr ; SETVIEWPAGE routine
|
SETVIEWPAGE .addr ; SETVIEWPAGE routine
|
||||||
|
@ -106,14 +106,14 @@ TGI_CLIP_TOP = $08
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ASM accessible color constants
|
; ASM accessible color constants
|
||||||
|
|
||||||
.global tgi_color_black:zp ; Target-specific value for black
|
.global tgi_color_black:zp ; Target-specific value for black
|
||||||
.global tgi_color_white:zp ; Target-specific value for white
|
.global tgi_color_white:zp ; Target-specific value for white
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; C accessible variables
|
; C accessible variables
|
||||||
|
|
||||||
.global _tgi_drv ; Pointer to driver
|
.global _tgi_drv ; Pointer to driver
|
||||||
.global _tgi_error ; Last error code
|
.global _tgi_error ; Last error code
|
||||||
.global _tgi_gmode ; Flag: graphics mode active
|
.global _tgi_gmode ; Flag: graphics mode active
|
||||||
.global _tgi_curx ; Current drawing cursor X
|
.global _tgi_curx ; Current drawing cursor X
|
||||||
.global _tgi_cury ; Current drawing cursor Y
|
.global _tgi_cury ; Current drawing cursor Y
|
||||||
|
@ -139,10 +139,10 @@ TGI_CLIP_TOP = $08
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ASM accessible variables
|
; ASM accessible variables
|
||||||
|
|
||||||
.global tgi_clip_x1 ; Coordinate for line clipper
|
.global tgi_clip_x1 ; Coordinate for line clipper
|
||||||
.global tgi_clip_y1 ; Coordinate for line clipper
|
.global tgi_clip_y1 ; Coordinate for line clipper
|
||||||
.global tgi_clip_x2 ; Coordinate for line clipper
|
.global tgi_clip_x2 ; Coordinate for line clipper
|
||||||
.global tgi_clip_y2 ; Coordinate for line clipper
|
.global tgi_clip_y2 ; Coordinate for line clipper
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Driver entry points
|
; Driver entry points
|
||||||
|
@ -151,7 +151,7 @@ TGI_CLIP_TOP = $08
|
||||||
.global tgi_uninstall
|
.global tgi_uninstall
|
||||||
.global tgi_init
|
.global tgi_init
|
||||||
.global tgi_done
|
.global tgi_done
|
||||||
.global tgi_geterror
|
.global tgi_geterror
|
||||||
.global tgi_control
|
.global tgi_control
|
||||||
.global tgi_clear
|
.global tgi_clear
|
||||||
.global tgi_setviewpage
|
.global tgi_setviewpage
|
||||||
|
@ -192,7 +192,7 @@ TGI_CLIP_TOP = $08
|
||||||
.global _tgi_clear
|
.global _tgi_clear
|
||||||
.global _tgi_done
|
.global _tgi_done
|
||||||
.global _tgi_ellipse
|
.global _tgi_ellipse
|
||||||
.global _tgi_getaspectratio
|
.global _tgi_getaspectratio
|
||||||
.global _tgi_getcolor
|
.global _tgi_getcolor
|
||||||
.global _tgi_getcolorcount
|
.global _tgi_getcolorcount
|
||||||
.global _tgi_getdefpalette
|
.global _tgi_getdefpalette
|
||||||
|
@ -220,7 +220,7 @@ TGI_CLIP_TOP = $08
|
||||||
.global _tgi_outtext
|
.global _tgi_outtext
|
||||||
.global _tgi_outtextxy
|
.global _tgi_outtextxy
|
||||||
.global _tgi_pieslice
|
.global _tgi_pieslice
|
||||||
.global _tgi_setaspectratio
|
.global _tgi_setaspectratio
|
||||||
.global _tgi_setcolor
|
.global _tgi_setcolor
|
||||||
.global _tgi_setdrawpage
|
.global _tgi_setdrawpage
|
||||||
.global _tgi_setpalette
|
.global _tgi_setpalette
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
;/* */
|
;/* */
|
||||||
;/* time.inc */
|
;/* time.inc */
|
||||||
;/* */
|
;/* */
|
||||||
;/* Date and time */
|
;/* Date and time */
|
||||||
;/* */
|
;/* */
|
||||||
;/* */
|
;/* */
|
||||||
;/* */
|
;/* */
|
||||||
|
|
|
@ -7,26 +7,26 @@
|
||||||
; Zero page, Commodore stuff
|
; Zero page, Commodore stuff
|
||||||
|
|
||||||
TIME := $A0 ; 60HZ clock
|
TIME := $A0 ; 60HZ clock
|
||||||
FNAM_LEN := $B7 ; Length of filename
|
FNAM_LEN := $B7 ; Length of filename
|
||||||
SECADR := $B9 ; Secondary address
|
SECADR := $B9 ; Secondary address
|
||||||
DEVNUM := $BA ; Device number
|
DEVNUM := $BA ; Device number
|
||||||
FNAM := $BB ; Pointer to filename
|
FNAM := $BB ; Pointer to filename
|
||||||
KEY_COUNT := $C6 ; Number of keys in input buffer
|
KEY_COUNT := $C6 ; Number of keys in input buffer
|
||||||
RVS := $C7 ; Reverse flag
|
RVS := $C7 ; Reverse flag
|
||||||
CURS_FLAG := $CC ; 1 = cursor off
|
CURS_FLAG := $CC ; 1 = cursor off
|
||||||
CURS_BLINK := $CD ; Blink counter
|
CURS_BLINK := $CD ; Blink counter
|
||||||
CURS_CHAR := $CE ; Character under the cursor
|
CURS_CHAR := $CE ; Character under the cursor
|
||||||
CURS_STATE := $CF ; Cursor blink state
|
CURS_STATE := $CF ; Cursor blink state
|
||||||
SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
||||||
CURS_X := $D3 ; Cursor column
|
CURS_X := $D3 ; Cursor column
|
||||||
CURS_Y := $D6 ; Cursor row
|
CURS_Y := $D6 ; Cursor row
|
||||||
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
||||||
|
|
||||||
BASIC_BUF := $200 ; Location of command-line
|
BASIC_BUF := $200 ; Location of command-line
|
||||||
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
||||||
|
|
||||||
CHARCOLOR := $286
|
CHARCOLOR := $286
|
||||||
CURS_COLOR := $287 ; Color under the cursor
|
CURS_COLOR := $287 ; Color under the cursor
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
|
@ -39,37 +39,37 @@ YSIZE = 23
|
||||||
; Kernal routines
|
; Kernal routines
|
||||||
|
|
||||||
; Direct entries
|
; Direct entries
|
||||||
CLRSCR := $E55F
|
CLRSCR := $E55F
|
||||||
KBDREAD := $E5CF
|
KBDREAD := $E5CF
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Vector and other locations
|
; Vector and other locations
|
||||||
|
|
||||||
IRQVec := $0314
|
IRQVec := $0314
|
||||||
BRKVec := $0316
|
BRKVec := $0316
|
||||||
NMIVec := $0318
|
NMIVec := $0318
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: 6560 VIC
|
; I/O: 6560 VIC
|
||||||
|
|
||||||
VIC := $9000
|
VIC := $9000
|
||||||
VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
|
VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
|
||||||
VIC_HLINE := $9004 ; Rasterline, bits 1-8
|
VIC_HLINE := $9004 ; Rasterline, bits 1-8
|
||||||
VIC_COLOR := $900F ; Border and background color
|
VIC_COLOR := $900F ; Border and background color
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: 6522 VIA1
|
; I/O: 6522 VIA1
|
||||||
|
|
||||||
VIA1 := $9110
|
VIA1 := $9110
|
||||||
VIA1_JOY := $9111
|
VIA1_JOY := $9111
|
||||||
VIA1_DDRB := $9112
|
VIA1_DDRB := $9112
|
||||||
VIA1_DDRA := $9113
|
VIA1_DDRA := $9113
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; I/O: 6522 VIA2
|
; I/O: 6522 VIA2
|
||||||
|
|
||||||
VIA2 := $9120
|
VIA2 := $9120
|
||||||
VIA2_JOY := $9120
|
VIA2_JOY := $9120
|
||||||
VIA2_DDRB := $9122
|
VIA2_DDRB := $9122
|
||||||
VIA2_DDRA := $9123
|
VIA2_DDRA := $9123
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* 6502.h */
|
/* 6502.h */
|
||||||
/* */
|
/* */
|
||||||
/* 6502 specific declarations */
|
/* 6502 specific declarations */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -47,9 +47,9 @@ typedef unsigned size_t;
|
||||||
|
|
||||||
|
|
||||||
/* Possible returns of getcpu() */
|
/* Possible returns of getcpu() */
|
||||||
#define CPU_6502 0
|
#define CPU_6502 0
|
||||||
#define CPU_65C02 1
|
#define CPU_65C02 1
|
||||||
#define CPU_65816 2
|
#define CPU_65816 2
|
||||||
|
|
||||||
unsigned char getcpu (void);
|
unsigned char getcpu (void);
|
||||||
/* Detect the CPU the program is running on */
|
/* Detect the CPU the program is running on */
|
||||||
|
@ -57,29 +57,29 @@ unsigned char getcpu (void);
|
||||||
|
|
||||||
|
|
||||||
/* Macros for CPU instructions */
|
/* Macros for CPU instructions */
|
||||||
#define BRK() __asm__ ("brk")
|
#define BRK() __asm__ ("brk")
|
||||||
#define CLI() __asm__ ("cli")
|
#define CLI() __asm__ ("cli")
|
||||||
#define SEI() __asm__ ("sei")
|
#define SEI() __asm__ ("sei")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Struct that holds the registers for the sys function */
|
/* Struct that holds the registers for the sys function */
|
||||||
struct regs {
|
struct regs {
|
||||||
unsigned char a; /* A register value */
|
unsigned char a; /* A register value */
|
||||||
unsigned char x; /* X register value */
|
unsigned char x; /* X register value */
|
||||||
unsigned char y; /* Y register value */
|
unsigned char y; /* Y register value */
|
||||||
unsigned char flags; /* Flags value */
|
unsigned char flags; /* Flags value */
|
||||||
unsigned pc; /* Program counter */
|
unsigned pc; /* Program counter */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Defines for the flags in the regs structure */
|
/* Defines for the flags in the regs structure */
|
||||||
#define F6502_N 0x80 /* N flag */
|
#define F6502_N 0x80 /* N flag */
|
||||||
#define F6502_V 0x40 /* V flag */
|
#define F6502_V 0x40 /* V flag */
|
||||||
#define F6502_B 0x10 /* B flag */
|
#define F6502_B 0x10 /* B flag */
|
||||||
#define F6502_D 0x08 /* D flag */
|
#define F6502_D 0x08 /* D flag */
|
||||||
#define F6502_I 0x04 /* I flag */
|
#define F6502_I 0x04 /* I flag */
|
||||||
#define F6502_Z 0x02 /* Z flag */
|
#define F6502_Z 0x02 /* Z flag */
|
||||||
#define F6502_C 0x01 /* C flag */
|
#define F6502_C 0x01 /* C flag */
|
||||||
|
|
||||||
/* Function to call any machine language subroutine. All registers in the
|
/* Function to call any machine language subroutine. All registers in the
|
||||||
* regs structure are passed into the routine and the results are passed
|
* regs structure are passed into the routine and the results are passed
|
||||||
|
@ -98,11 +98,11 @@ void __fastcall__ _sys (struct regs* r);
|
||||||
* vector if the program ends.
|
* vector if the program ends.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern unsigned char brk_a; /* A register value */
|
extern unsigned char brk_a; /* A register value */
|
||||||
extern unsigned char brk_x; /* X register value */
|
extern unsigned char brk_x; /* X register value */
|
||||||
extern unsigned char brk_y; /* Y register value */
|
extern unsigned char brk_y; /* Y register value */
|
||||||
extern unsigned char brk_sr; /* Status register */
|
extern unsigned char brk_sr; /* Status register */
|
||||||
extern unsigned brk_pc; /* PC value */
|
extern unsigned brk_pc; /* PC value */
|
||||||
|
|
||||||
typedef void (*brk_handler) (void);
|
typedef void (*brk_handler) (void);
|
||||||
/* Type of the break handler */
|
/* Type of the break handler */
|
||||||
|
@ -116,8 +116,8 @@ void reset_brk (void);
|
||||||
|
|
||||||
|
|
||||||
/* Possible returns for irq_handler() */
|
/* Possible returns for irq_handler() */
|
||||||
#define IRQ_NOT_HANDLED 0
|
#define IRQ_NOT_HANDLED 0
|
||||||
#define IRQ_HANDLED 1
|
#define IRQ_HANDLED 1
|
||||||
|
|
||||||
typedef unsigned char (*irq_handler) (void);
|
typedef unsigned char (*irq_handler) (void);
|
||||||
/* Type of the C level interrupt request handler */
|
/* Type of the C level interrupt request handler */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* _6522.h */
|
/* _6522.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -41,22 +41,22 @@
|
||||||
* the compiler doesn't guarantee any order when writing 16 bit values.
|
* the compiler doesn't guarantee any order when writing 16 bit values.
|
||||||
*/
|
*/
|
||||||
struct __6522 {
|
struct __6522 {
|
||||||
unsigned char prb; /* Port register B */
|
unsigned char prb; /* Port register B */
|
||||||
unsigned char pra; /* Port register A */
|
unsigned char pra; /* Port register A */
|
||||||
unsigned char ddrb; /* Data direction register B */
|
unsigned char ddrb; /* Data direction register B */
|
||||||
unsigned char ddra; /* Data direction register A */
|
unsigned char ddra; /* Data direction register A */
|
||||||
unsigned char t1_lo; /* Timer 1, low byte */
|
unsigned char t1_lo; /* Timer 1, low byte */
|
||||||
unsigned char t1_hi; /* Timer 1, high byte */
|
unsigned char t1_hi; /* Timer 1, high byte */
|
||||||
unsigned char t1l_lo; /* Timer 1 latch, low byte */
|
unsigned char t1l_lo; /* Timer 1 latch, low byte */
|
||||||
unsigned char t1l_hi; /* Timer 1 latch, high byte */
|
unsigned char t1l_hi; /* Timer 1 latch, high byte */
|
||||||
unsigned char t2_lo; /* Timer 2, low byte */
|
unsigned char t2_lo; /* Timer 2, low byte */
|
||||||
unsigned char t2_hi; /* Timer 2, high byte */
|
unsigned char t2_hi; /* Timer 2, high byte */
|
||||||
unsigned char sr; /* Shift register */
|
unsigned char sr; /* Shift register */
|
||||||
unsigned char acr; /* Auxiliary control register */
|
unsigned char acr; /* Auxiliary control register */
|
||||||
unsigned char pcr; /* Peripheral control register */
|
unsigned char pcr; /* Peripheral control register */
|
||||||
unsigned char ifr; /* Interrupt flag register */
|
unsigned char ifr; /* Interrupt flag register */
|
||||||
unsigned char ier; /* Interrupt enable register */
|
unsigned char ier; /* Interrupt enable register */
|
||||||
unsigned char pra2; /* Port register A w/o handshake */
|
unsigned char pra2; /* Port register A w/o handshake */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _6525.h */
|
/* _6525.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -43,14 +43,14 @@
|
||||||
* union to do that, however that would introduce an additional name.
|
* union to do that, however that would introduce an additional name.
|
||||||
*/
|
*/
|
||||||
struct __6525 {
|
struct __6525 {
|
||||||
unsigned char pra; /* Port register A */
|
unsigned char pra; /* Port register A */
|
||||||
unsigned char prb; /* Port register B */
|
unsigned char prb; /* Port register B */
|
||||||
unsigned char prc; /* Port register C */
|
unsigned char prc; /* Port register C */
|
||||||
unsigned char ddra; /* Data direction register A */
|
unsigned char ddra; /* Data direction register A */
|
||||||
unsigned char ddrb; /* Data direction register B */
|
unsigned char ddrb; /* Data direction register B */
|
||||||
unsigned char ddrc; /* Data direction register C */
|
unsigned char ddrc; /* Data direction register C */
|
||||||
unsigned char cr; /* Control register */
|
unsigned char cr; /* Control register */
|
||||||
unsigned char air; /* Active interrupt register */
|
unsigned char air; /* Active interrupt register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _6526.h */
|
/* _6526.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -44,22 +44,22 @@
|
||||||
* the compiler doesn't guarantee any order when writing 16 bit values.
|
* the compiler doesn't guarantee any order when writing 16 bit values.
|
||||||
*/
|
*/
|
||||||
struct __6526 {
|
struct __6526 {
|
||||||
unsigned char pra; /* Port register A */
|
unsigned char pra; /* Port register A */
|
||||||
unsigned char prb; /* Port register B */
|
unsigned char prb; /* Port register B */
|
||||||
unsigned char ddra; /* Data direction register A */
|
unsigned char ddra; /* Data direction register A */
|
||||||
unsigned char ddrb; /* Data direction register B */
|
unsigned char ddrb; /* Data direction register B */
|
||||||
unsigned char ta_lo; /* Timer A, low byte */
|
unsigned char ta_lo; /* Timer A, low byte */
|
||||||
unsigned char ta_hi; /* Timer A, high byte */
|
unsigned char ta_hi; /* Timer A, high byte */
|
||||||
unsigned char tb_lo; /* Timer B, low byte */
|
unsigned char tb_lo; /* Timer B, low byte */
|
||||||
unsigned char tb_hi; /* Timer B, high byte */
|
unsigned char tb_hi; /* Timer B, high byte */
|
||||||
unsigned char tod_10; /* TOD, 1/10 sec. */
|
unsigned char tod_10; /* TOD, 1/10 sec. */
|
||||||
unsigned char tod_sec; /* TOD, seconds */
|
unsigned char tod_sec; /* TOD, seconds */
|
||||||
unsigned char tod_min; /* TOD, minutes */
|
unsigned char tod_min; /* TOD, minutes */
|
||||||
unsigned char tod_hour; /* TOD, hours */
|
unsigned char tod_hour; /* TOD, hours */
|
||||||
unsigned char sdr; /* Serial data register */
|
unsigned char sdr; /* Serial data register */
|
||||||
unsigned char icr; /* Interrupt control register */
|
unsigned char icr; /* Interrupt control register */
|
||||||
unsigned char cra; /* Control register A */
|
unsigned char cra; /* Control register A */
|
||||||
unsigned char crb; /* Control register B */
|
unsigned char crb; /* Control register B */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _6545.h */
|
/* _6545.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -40,8 +40,8 @@
|
||||||
|
|
||||||
/* Define a structure with the 6545 register offsets */
|
/* Define a structure with the 6545 register offsets */
|
||||||
struct __6545 {
|
struct __6545 {
|
||||||
unsigned char ctrl; /* Control register */
|
unsigned char ctrl; /* Control register */
|
||||||
unsigned char data; /* Data register */
|
unsigned char data; /* Data register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _6551.h */
|
/* _6551.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -40,10 +40,10 @@
|
||||||
|
|
||||||
/* Define a structure with the 6551 register offsets */
|
/* Define a structure with the 6551 register offsets */
|
||||||
struct __6551 {
|
struct __6551 {
|
||||||
unsigned char data; /* Data register */
|
unsigned char data; /* Data register */
|
||||||
unsigned char status; /* Status register */
|
unsigned char status; /* Status register */
|
||||||
unsigned char cmd; /* Command register */
|
unsigned char cmd; /* Command register */
|
||||||
unsigned char ctrl; /* Control register */
|
unsigned char ctrl; /* Control register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _gtia.h */
|
/* _gtia.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -29,19 +29,19 @@ struct usedblock {
|
||||||
* Beware: Field order is significant!
|
* Beware: Field order is significant!
|
||||||
*/
|
*/
|
||||||
struct freeblock {
|
struct freeblock {
|
||||||
unsigned size;
|
unsigned size;
|
||||||
struct freeblock* next;
|
struct freeblock* next;
|
||||||
struct freeblock* prev;
|
struct freeblock* prev;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Variables that describe the heap */
|
/* Variables that describe the heap */
|
||||||
extern unsigned* _heaporg; /* Bottom of heap */
|
extern unsigned* _heaporg; /* Bottom of heap */
|
||||||
extern unsigned* _heapptr; /* Current top */
|
extern unsigned* _heapptr; /* Current top */
|
||||||
extern unsigned* _heapend; /* Upper limit */
|
extern unsigned* _heapend; /* Upper limit */
|
||||||
extern struct freeblock* _heapfirst; /* First free block in list */
|
extern struct freeblock* _heapfirst; /* First free block in list */
|
||||||
extern struct freeblock* _heaplast; /* Last free block in list */
|
extern struct freeblock* _heaplast; /* Last free block in list */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ struct __mikey {
|
||||||
unsigned char mtest2; // 0xFD9E
|
unsigned char mtest2; // 0xFD9E
|
||||||
unsigned char unused5; // 0xFD9F not used
|
unsigned char unused5; // 0xFD9F not used
|
||||||
unsigned char palette[32]; // 0xFDA0 - 0xFDBF palette 32 bytes
|
unsigned char palette[32]; // 0xFDA0 - 0xFDBF palette 32 bytes
|
||||||
// 0xFDC0 - 0xFDFF not used
|
// 0xFDC0 - 0xFDFF not used
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _pbi.h */
|
/* _pbi.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -32,31 +32,31 @@
|
||||||
#define __PBI_H
|
#define __PBI_H
|
||||||
|
|
||||||
/* parallel bus interface area */
|
/* parallel bus interface area */
|
||||||
#define PBI ((unsigned char*)0xD100)
|
#define PBI ((unsigned char*)0xD100)
|
||||||
|
|
||||||
/* parallel device IRQ status */
|
/* parallel device IRQ status */
|
||||||
#define PDVI ((unsigned char*)0xD1FF)
|
#define PDVI ((unsigned char*)0xD1FF)
|
||||||
|
|
||||||
/* parallel device select */
|
/* parallel device select */
|
||||||
#define PDVS ((unsigned char*)0xD1FF)
|
#define PDVS ((unsigned char*)0xD1FF)
|
||||||
|
|
||||||
/* parallel bus interface RAM area */
|
/* parallel bus interface RAM area */
|
||||||
#define PBIRAM ((unsigned char*)0xD600)
|
#define PBIRAM ((unsigned char*)0xD600)
|
||||||
|
|
||||||
/* parallel device ID 1 */
|
/* parallel device ID 1 */
|
||||||
#define PDID1 ((unsigned char*)0xD803)
|
#define PDID1 ((unsigned char*)0xD803)
|
||||||
|
|
||||||
/* parallel device I/O vector */
|
/* parallel device I/O vector */
|
||||||
#define PDIDV ((unsigned char*)0xD805)
|
#define PDIDV ((unsigned char*)0xD805)
|
||||||
|
|
||||||
/* parallel device IRQ vector */
|
/* parallel device IRQ vector */
|
||||||
#define PDIRQV ((unsigned char*)0xD808)
|
#define PDIRQV ((unsigned char*)0xD808)
|
||||||
|
|
||||||
/* parallel device ID 2 */
|
/* parallel device ID 2 */
|
||||||
#define PDID2 ((unsigned char*)0xD80B)
|
#define PDID2 ((unsigned char*)0xD80B)
|
||||||
|
|
||||||
/* parallel device vector table */
|
/* parallel device vector table */
|
||||||
#define PDVV ((unsigned char*)0xD80D)
|
#define PDVV ((unsigned char*)0xD80D)
|
||||||
|
|
||||||
/* End of _pbi.h */
|
/* End of _pbi.h */
|
||||||
#endif /* #ifndef __PBI_H */
|
#endif /* #ifndef __PBI_H */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _pia.h */
|
/* _pia.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _pokey.h */
|
/* _pokey.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _sid.h */
|
/* _sid.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -40,23 +40,23 @@
|
||||||
|
|
||||||
/* Define a structure with the sid register offsets */
|
/* Define a structure with the sid register offsets */
|
||||||
struct __sid_voice {
|
struct __sid_voice {
|
||||||
unsigned freq; /* Frequency */
|
unsigned freq; /* Frequency */
|
||||||
unsigned pw; /* Pulse width */
|
unsigned pw; /* Pulse width */
|
||||||
unsigned char ctrl; /* Control register */
|
unsigned char ctrl; /* Control register */
|
||||||
unsigned char ad; /* Attack/decay */
|
unsigned char ad; /* Attack/decay */
|
||||||
unsigned char sr; /* Sustain/release */
|
unsigned char sr; /* Sustain/release */
|
||||||
};
|
};
|
||||||
struct __sid {
|
struct __sid {
|
||||||
struct __sid_voice v1; /* Voice 1 */
|
struct __sid_voice v1; /* Voice 1 */
|
||||||
struct __sid_voice v2; /* Voice 2 */
|
struct __sid_voice v2; /* Voice 2 */
|
||||||
struct __sid_voice v3; /* Voice 3 */
|
struct __sid_voice v3; /* Voice 3 */
|
||||||
unsigned flt_freq; /* Filter frequency */
|
unsigned flt_freq; /* Filter frequency */
|
||||||
unsigned char flt_ctrl; /* Filter control register */
|
unsigned char flt_ctrl; /* Filter control register */
|
||||||
unsigned char amp; /* Amplitude */
|
unsigned char amp; /* Amplitude */
|
||||||
unsigned char ad1; /* A/D converter 1 */
|
unsigned char ad1; /* A/D converter 1 */
|
||||||
unsigned char ad2; /* A/D converter 2 */
|
unsigned char ad2; /* A/D converter 2 */
|
||||||
unsigned char noise; /* Noise generator */
|
unsigned char noise; /* Noise generator */
|
||||||
unsigned char read3; /* Value of voice 3 */
|
unsigned char read3; /* Value of voice 3 */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ struct __suzy {
|
||||||
unsigned char parstat; // 0xFCC2 parallel port status
|
unsigned char parstat; // 0xFCC2 parallel port status
|
||||||
unsigned char pardata; // 0xFCC3 parallel port data
|
unsigned char pardata; // 0xFCC3 parallel port data
|
||||||
unsigned char howie; // 0xFCC4 howie (?)
|
unsigned char howie; // 0xFCC4 howie (?)
|
||||||
// 0xFCC5 - 0xFCFF unused
|
// 0xFCC5 - 0xFCFF unused
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _ted.h */
|
/* _ted.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _vdc.h */
|
/* _vdc.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -40,8 +40,8 @@
|
||||||
|
|
||||||
/* Define a structure with the vdc register offsets */
|
/* Define a structure with the vdc register offsets */
|
||||||
struct __vdc {
|
struct __vdc {
|
||||||
unsigned char ctrl; /* Control register */
|
unsigned char ctrl; /* Control register */
|
||||||
unsigned char data; /* Data register */
|
unsigned char data; /* Data register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* _vic.h */
|
/* _vic.h */
|
||||||
/* */
|
/* */
|
||||||
/* Internal include file, do not use directly */
|
/* Internal include file, do not use directly */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -40,21 +40,21 @@
|
||||||
|
|
||||||
/* Define a structure with the vic register offsets */
|
/* Define a structure with the vic register offsets */
|
||||||
struct __vic {
|
struct __vic {
|
||||||
unsigned char leftborder;
|
unsigned char leftborder;
|
||||||
unsigned char upperborder;
|
unsigned char upperborder;
|
||||||
unsigned char charsperline; /* Characters per line */
|
unsigned char charsperline; /* Characters per line */
|
||||||
unsigned char linecount; /* Number of lines */
|
unsigned char linecount; /* Number of lines */
|
||||||
unsigned char rasterline; /* Current raster line */
|
unsigned char rasterline; /* Current raster line */
|
||||||
unsigned char addr; /* Address of chargen and video ram */
|
unsigned char addr; /* Address of chargen and video ram */
|
||||||
unsigned char strobe_x; /* Light pen, X position */
|
unsigned char strobe_x; /* Light pen, X position */
|
||||||
unsigned char strobe_y; /* Light pen, Y position */
|
unsigned char strobe_y; /* Light pen, Y position */
|
||||||
unsigned char analog_x; /* Analog input X */
|
unsigned char analog_x; /* Analog input X */
|
||||||
unsigned char analog_y; /* Analog input Y */
|
unsigned char analog_y; /* Analog input Y */
|
||||||
unsigned char voice1; /* Sound generator #1 */
|
unsigned char voice1; /* Sound generator #1 */
|
||||||
unsigned char voice2; /* Sound generator #2 */
|
unsigned char voice2; /* Sound generator #2 */
|
||||||
unsigned char voice3; /* Sound generator #3 */
|
unsigned char voice3; /* Sound generator #3 */
|
||||||
unsigned char noise; /* Noise generator */
|
unsigned char noise; /* Noise generator */
|
||||||
unsigned char volume_color; /* Bits 0..3: volume, 4..7: color */
|
unsigned char volume_color; /* Bits 0..3: volume, 4..7: color */
|
||||||
unsigned char bg_border_color;/* Background and border color */
|
unsigned char bg_border_color;/* Background and border color */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* ace.h */
|
/* ace.h */
|
||||||
/* */
|
/* */
|
||||||
/* ACE system specific definitions */
|
/* ACE system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -52,10 +52,10 @@
|
||||||
|
|
||||||
|
|
||||||
struct aceDirentBuf {
|
struct aceDirentBuf {
|
||||||
unsigned long ad_size; /* Size in bytes */
|
unsigned long ad_size; /* Size in bytes */
|
||||||
unsigned char ad_date [8]; /* YY:YY:MM:DD:HH:MM:SS:TW */
|
unsigned char ad_date [8]; /* YY:YY:MM:DD:HH:MM:SS:TW */
|
||||||
char ad_type [4]; /* File type as ASCIIZ string */
|
char ad_type [4]; /* File type as ASCIIZ string */
|
||||||
unsigned char ad_flags; /* File flags */
|
unsigned char ad_flags; /* File flags */
|
||||||
unsigned char ad_usage; /* More flags */
|
unsigned char ad_usage; /* More flags */
|
||||||
unsigned char ad_namelen; /* Length of name */
|
unsigned char ad_namelen; /* Length of name */
|
||||||
char ad_name [17]; /* Name itself, ASCIIZ */
|
char ad_name [17]; /* Name itself, ASCIIZ */
|
||||||
|
@ -69,27 +69,27 @@ int aceDirRead (int handle, struct aceDirentBuf* buf);
|
||||||
typedef unsigned int aceKey;
|
typedef unsigned int aceKey;
|
||||||
|
|
||||||
/* #defines for the shift mask returned by aceConGetKey */
|
/* #defines for the shift mask returned by aceConGetKey */
|
||||||
#define aceSH_KEY 0x00FF /* Mask key itself */
|
#define aceSH_KEY 0x00FF /* Mask key itself */
|
||||||
#define aceSH_MASK 0xFF00 /* Mask shift mask */
|
#define aceSH_MASK 0xFF00 /* Mask shift mask */
|
||||||
#define aceSH_EXT 0x2000 /* Extended key */
|
#define aceSH_EXT 0x2000 /* Extended key */
|
||||||
#define aceSH_CAPS 0x1000 /* Caps lock key */
|
#define aceSH_CAPS 0x1000 /* Caps lock key */
|
||||||
#define aceSH_ALT 0x0800 /* Alternate key */
|
#define aceSH_ALT 0x0800 /* Alternate key */
|
||||||
#define aceSH_CTRL 0x0400 /* Ctrl key */
|
#define aceSH_CTRL 0x0400 /* Ctrl key */
|
||||||
#define aceSH_CBM 0x0200 /* Commodore key */
|
#define aceSH_CBM 0x0200 /* Commodore key */
|
||||||
#define aceSH_SHIFT 0x0100 /* Shift key */
|
#define aceSH_SHIFT 0x0100 /* Shift key */
|
||||||
|
|
||||||
/* #defines for the options in aceConSetOpt/aceConGetOpt */
|
/* #defines for the options in aceConSetOpt/aceConGetOpt */
|
||||||
#define aceOP_PUTMASK 1 /* Console put mask */
|
#define aceOP_PUTMASK 1 /* Console put mask */
|
||||||
#define aceOP_CHARCOLOR 2 /* Character color */
|
#define aceOP_CHARCOLOR 2 /* Character color */
|
||||||
#define aceOP_CHARATTR 3 /* Character attribute */
|
#define aceOP_CHARATTR 3 /* Character attribute */
|
||||||
#define aceOP_FILLCOLOR 4 /* Fill color */
|
#define aceOP_FILLCOLOR 4 /* Fill color */
|
||||||
#define aceOP_FILLATTR 5 /* Fill attribute */
|
#define aceOP_FILLATTR 5 /* Fill attribute */
|
||||||
#define aceOP_CRSCOLOR 6 /* Cursor color */
|
#define aceOP_CRSCOLOR 6 /* Cursor color */
|
||||||
#define aceOP_CRSWRAP 7 /* Force cursor wrap */
|
#define aceOP_CRSWRAP 7 /* Force cursor wrap */
|
||||||
#define aceOP_SHSCROLL 8 /* Shift keys for scrolling */
|
#define aceOP_SHSCROLL 8 /* Shift keys for scrolling */
|
||||||
#define aceOP_MOUSCALE 9 /* Mouse scaling */
|
#define aceOP_MOUSCALE 9 /* Mouse scaling */
|
||||||
#define aceOP_RPTDELAY 10 /* Key repeat delay */
|
#define aceOP_RPTDELAY 10 /* Key repeat delay */
|
||||||
#define aceOP_RPTRATE 11 /* Key repeat rate */
|
#define aceOP_RPTRATE 11 /* Key repeat rate */
|
||||||
|
|
||||||
/* Console functions */
|
/* Console functions */
|
||||||
void aceConWrite (char* buf, size_t count);
|
void aceConWrite (char* buf, size_t count);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* apple2.h */
|
/* apple2.h */
|
||||||
/* */
|
/* */
|
||||||
/* Apple ][ system specific definitions */
|
/* Apple ][ system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ extern void a2_lo_tgi[];
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* apple2enh.h */
|
/* apple2enh.h */
|
||||||
/* */
|
/* */
|
||||||
/* enhanced Apple //e system specific definitions */
|
/* enhanced Apple //e system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2004 Oliver Schmidt, <ol.sc@web.de> */
|
/* (C) 2004 Oliver Schmidt, <ol.sc@web.de> */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided 'as-is', without any expressed or implied */
|
/* This software is provided 'as-is', without any expressed or implied */
|
||||||
/* warranty. In no event will the authors be held liable for any damages */
|
/* warranty. In no event will the authors be held liable for any damages */
|
||||||
/* arising from the use of this software. */
|
/* arising from the use of this software. */
|
||||||
/* */
|
/* */
|
||||||
/* Permission is granted to anyone to use this software for any purpose, */
|
/* Permission is granted to anyone to use this software for any purpose, */
|
||||||
/* including commercial applications, and to alter it and redistribute it */
|
/* including commercial applications, and to alter it and redistribute it */
|
||||||
/* freely, subject to the following restrictions: */
|
/* freely, subject to the following restrictions: */
|
||||||
/* */
|
/* */
|
||||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||||
/* claim that you wrote the original software. If you use this software */
|
/* claim that you wrote the original software. If you use this software */
|
||||||
/* in a product, an acknowledgment in the product documentation would be */
|
/* in a product, an acknowledgment in the product documentation would be */
|
||||||
/* appreciated but is not required. */
|
/* appreciated but is not required. */
|
||||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||||
/* be misrepresented as being the original software. */
|
/* be misrepresented as being the original software. */
|
||||||
/* 3. This notice may not be removed or altered from any source */
|
/* 3. This notice may not be removed or altered from any source */
|
||||||
/* distribution. */
|
/* distribution. */
|
||||||
/* */
|
/* */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
#define CH_F10 0xB0
|
#define CH_F10 0xB0
|
||||||
|
|
||||||
/* Styles for textframe */
|
/* Styles for textframe */
|
||||||
#define TEXTFRAME_WIDE 0x00
|
#define TEXTFRAME_WIDE 0x00
|
||||||
#define TEXTFRAME_TALL 0x04
|
#define TEXTFRAME_TALL 0x04
|
||||||
|
|
||||||
/* Video modes */
|
/* Video modes */
|
||||||
#define VIDEOMODE_40x24 0x0011
|
#define VIDEOMODE_40x24 0x0011
|
||||||
|
@ -101,7 +101,7 @@ extern void a2e_lo_tgi[];
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* assert.h */
|
/* assert.h */
|
||||||
/* */
|
/* */
|
||||||
/* Diagnostics */
|
/* Diagnostics */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
# define assert(expr)
|
# define assert(expr)
|
||||||
#else
|
#else
|
||||||
extern void _afailed (const char*, unsigned);
|
extern void _afailed (const char*, unsigned);
|
||||||
# define assert(expr) ((expr)? (void)0 : _afailed(__FILE__, __LINE__))
|
# define assert(expr) ((expr)? (void)0 : _afailed(__FILE__, __LINE__))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* atari.h */
|
/* atari.h */
|
||||||
/* */
|
/* */
|
||||||
/* Atari system specific definitions */
|
/* Atari system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -45,11 +45,11 @@
|
||||||
|
|
||||||
|
|
||||||
/* Character codes */
|
/* Character codes */
|
||||||
#define CH_DELCHR 0xFE /* delete char under the cursor */
|
#define CH_DELCHR 0xFE /* delete char under the cursor */
|
||||||
#define CH_ENTER 0x9B
|
#define CH_ENTER 0x9B
|
||||||
#define CH_ESC 0x1B
|
#define CH_ESC 0x1B
|
||||||
#define CH_CURS_UP 28
|
#define CH_CURS_UP 28
|
||||||
#define CH_CURS_DOWN 29
|
#define CH_CURS_DOWN 29
|
||||||
#define CH_CURS_LEFT 30
|
#define CH_CURS_LEFT 30
|
||||||
#define CH_CURS_RIGHT 31
|
#define CH_CURS_RIGHT 31
|
||||||
|
|
||||||
|
@ -63,26 +63,26 @@
|
||||||
#define CH_INSLINE 0x9D /* insert line */
|
#define CH_INSLINE 0x9D /* insert line */
|
||||||
|
|
||||||
/* These are defined to be Atari + NumberKey */
|
/* These are defined to be Atari + NumberKey */
|
||||||
#define CH_F1 177
|
#define CH_F1 177
|
||||||
#define CH_F2 178
|
#define CH_F2 178
|
||||||
#define CH_F3 179
|
#define CH_F3 179
|
||||||
#define CH_F4 180
|
#define CH_F4 180
|
||||||
#define CH_F5 181
|
#define CH_F5 181
|
||||||
#define CH_F6 182
|
#define CH_F6 182
|
||||||
#define CH_F7 183
|
#define CH_F7 183
|
||||||
#define CH_F8 184
|
#define CH_F8 184
|
||||||
#define CH_F9 185
|
#define CH_F9 185
|
||||||
#define CH_F10 176
|
#define CH_F10 176
|
||||||
|
|
||||||
#define CH_ULCORNER 0x11
|
#define CH_ULCORNER 0x11
|
||||||
#define CH_URCORNER 0x05
|
#define CH_URCORNER 0x05
|
||||||
#define CH_LLCORNER 0x1A
|
#define CH_LLCORNER 0x1A
|
||||||
#define CH_LRCORNER 0x03
|
#define CH_LRCORNER 0x03
|
||||||
#define CH_TTEE 0x17
|
#define CH_TTEE 0x17
|
||||||
#define CH_BTEE 0x18
|
#define CH_BTEE 0x18
|
||||||
#define CH_LTEE 0x01
|
#define CH_LTEE 0x01
|
||||||
#define CH_RTEE 0x04
|
#define CH_RTEE 0x04
|
||||||
#define CH_CROSS 0x13
|
#define CH_CROSS 0x13
|
||||||
#define CH_HLINE 0x12
|
#define CH_HLINE 0x12
|
||||||
#define CH_VLINE 0x7C
|
#define CH_VLINE 0x7C
|
||||||
|
|
||||||
|
@ -114,22 +114,22 @@
|
||||||
/* Color defines, similar to c64 colors (untested) */
|
/* Color defines, similar to c64 colors (untested) */
|
||||||
/* Note that the conio color implementation is monochrome (bgcolor and textcolor are only placeholders) */
|
/* Note that the conio color implementation is monochrome (bgcolor and textcolor are only placeholders) */
|
||||||
/* Use the defines with the setcolor() or _atari_xxxcolor() functions */
|
/* Use the defines with the setcolor() or _atari_xxxcolor() functions */
|
||||||
#define COLOR_BLACK _gtia_mkcolor(HUE_GREY,0)
|
#define COLOR_BLACK _gtia_mkcolor(HUE_GREY,0)
|
||||||
#define COLOR_WHITE _gtia_mkcolor(HUE_GREY,7)
|
#define COLOR_WHITE _gtia_mkcolor(HUE_GREY,7)
|
||||||
#define COLOR_RED _gtia_mkcolor(HUE_REDORANGE,1)
|
#define COLOR_RED _gtia_mkcolor(HUE_REDORANGE,1)
|
||||||
#define COLOR_CYAN _gtia_mkcolor(HUE_CYAN,3)
|
#define COLOR_CYAN _gtia_mkcolor(HUE_CYAN,3)
|
||||||
#define COLOR_VIOLET _gtia_mkcolor(HUE_PURPLE,4)
|
#define COLOR_VIOLET _gtia_mkcolor(HUE_PURPLE,4)
|
||||||
#define COLOR_GREEN _gtia_mkcolor(HUE_GREEN,2)
|
#define COLOR_GREEN _gtia_mkcolor(HUE_GREEN,2)
|
||||||
#define COLOR_BLUE _gtia_mkcolor(HUE_BLUE,2)
|
#define COLOR_BLUE _gtia_mkcolor(HUE_BLUE,2)
|
||||||
#define COLOR_YELLOW _gtia_mkcolor(HUE_YELLOW,7)
|
#define COLOR_YELLOW _gtia_mkcolor(HUE_YELLOW,7)
|
||||||
#define COLOR_ORANGE _gtia_mkcolor(HUE_ORANGE,5)
|
#define COLOR_ORANGE _gtia_mkcolor(HUE_ORANGE,5)
|
||||||
#define COLOR_BROWN _gtia_mkcolor(HUE_YELLOW,2)
|
#define COLOR_BROWN _gtia_mkcolor(HUE_YELLOW,2)
|
||||||
#define COLOR_LIGHTRED _gtia_mkcolor(HUE_REDORANGE,6)
|
#define COLOR_LIGHTRED _gtia_mkcolor(HUE_REDORANGE,6)
|
||||||
#define COLOR_GRAY1 _gtia_mkcolor(HUE_GREY,2)
|
#define COLOR_GRAY1 _gtia_mkcolor(HUE_GREY,2)
|
||||||
#define COLOR_GRAY2 _gtia_mkcolor(HUE_GREY,3)
|
#define COLOR_GRAY2 _gtia_mkcolor(HUE_GREY,3)
|
||||||
#define COLOR_LIGHTGREEN _gtia_mkcolor(HUE_GREEN,6)
|
#define COLOR_LIGHTGREEN _gtia_mkcolor(HUE_GREEN,6)
|
||||||
#define COLOR_LIGHTBLUE _gtia_mkcolor(HUE_BLUE,6)
|
#define COLOR_LIGHTBLUE _gtia_mkcolor(HUE_BLUE,6)
|
||||||
#define COLOR_GRAY3 _gtia_mkcolor(HUE_GREY,5)
|
#define COLOR_GRAY3 _gtia_mkcolor(HUE_GREY,5)
|
||||||
|
|
||||||
/* color register functions */
|
/* color register functions */
|
||||||
extern void __fastcall__ _setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
|
extern void __fastcall__ _setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
|
||||||
|
|
100
include/atmos.h
100
include/atmos.h
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* atmos.h */
|
/* atmos.h */
|
||||||
/* */
|
/* */
|
||||||
/* Oric Atmos system-specific definitions */
|
/* Oric Atmos system-specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -47,82 +47,82 @@
|
||||||
|
|
||||||
|
|
||||||
/* Color defines */
|
/* Color defines */
|
||||||
#define COLOR_BLACK 0x00
|
#define COLOR_BLACK 0x00
|
||||||
#define COLOR_RED 0x01
|
#define COLOR_RED 0x01
|
||||||
#define COLOR_GREEN 0x02
|
#define COLOR_GREEN 0x02
|
||||||
#define COLOR_YELLOW 0x03
|
#define COLOR_YELLOW 0x03
|
||||||
#define COLOR_BLUE 0x04
|
#define COLOR_BLUE 0x04
|
||||||
#define COLOR_MAGENTA 0x05
|
#define COLOR_MAGENTA 0x05
|
||||||
#define COLOR_CYAN 0x06
|
#define COLOR_CYAN 0x06
|
||||||
#define COLOR_WHITE 0x07
|
#define COLOR_WHITE 0x07
|
||||||
|
|
||||||
/* TGI color defines */
|
/* TGI color defines */
|
||||||
/* White and red are swapped, so that the pallete
|
/* White and red are swapped, so that the pallete
|
||||||
** driver is compatible with black-and-white drivers.
|
** driver is compatible with black-and-white drivers.
|
||||||
*/
|
*/
|
||||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||||
#define TGI_COLOR_WHITE 1
|
#define TGI_COLOR_WHITE 1
|
||||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||||
#define TGI_COLOR_MAGENTA COLOR_MAGENTA
|
#define TGI_COLOR_MAGENTA COLOR_MAGENTA
|
||||||
#define TGI_COLOR_CYAN COLOR_CYAN
|
#define TGI_COLOR_CYAN COLOR_CYAN
|
||||||
#define TGI_COLOR_RED 7
|
#define TGI_COLOR_RED 7
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_6522.h>
|
#include <_6522.h>
|
||||||
#define VIA (*(struct __6522*)0x300)
|
#define VIA (*(struct __6522*)0x300)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* These are defined to be FUNCT + NumberKey */
|
/* These are defined to be FUNCT + NumberKey */
|
||||||
#define CH_F1 0xB1
|
#define CH_F1 0xB1
|
||||||
#define CH_F2 0xB2
|
#define CH_F2 0xB2
|
||||||
#define CH_F3 0xB3
|
#define CH_F3 0xB3
|
||||||
#define CH_F4 0xB4
|
#define CH_F4 0xB4
|
||||||
#define CH_F5 0xB5
|
#define CH_F5 0xB5
|
||||||
#define CH_F6 0xB6
|
#define CH_F6 0xB6
|
||||||
#define CH_F7 0xB7
|
#define CH_F7 0xB7
|
||||||
#define CH_F8 0xB8
|
#define CH_F8 0xB8
|
||||||
#define CH_F9 0xB9
|
#define CH_F9 0xB9
|
||||||
#define CH_F10 0xB0
|
#define CH_F10 0xB0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Character codes */
|
/* Character codes */
|
||||||
#define CH_ULCORNER '+'
|
#define CH_ULCORNER '+'
|
||||||
#define CH_URCORNER '+'
|
#define CH_URCORNER '+'
|
||||||
#define CH_LLCORNER '+'
|
#define CH_LLCORNER '+'
|
||||||
#define CH_LRCORNER '+'
|
#define CH_LRCORNER '+'
|
||||||
#define CH_TTEE '+'
|
#define CH_TTEE '+'
|
||||||
#define CH_BTEE '+'
|
#define CH_BTEE '+'
|
||||||
#define CH_LTEE '+'
|
#define CH_LTEE '+'
|
||||||
#define CH_RTEE '+'
|
#define CH_RTEE '+'
|
||||||
#define CH_CROSS '+'
|
#define CH_CROSS '+'
|
||||||
#define CH_CURS_UP 11
|
#define CH_CURS_UP 11
|
||||||
#define CH_CURS_DOWN 10
|
#define CH_CURS_DOWN 10
|
||||||
#define CH_CURS_LEFT 8
|
#define CH_CURS_LEFT 8
|
||||||
#define CH_CURS_RIGHT 9
|
#define CH_CURS_RIGHT 9
|
||||||
#define CH_DEL 127
|
#define CH_DEL 127
|
||||||
#define CH_ENTER 13
|
#define CH_ENTER 13
|
||||||
#define CH_STOP 3
|
#define CH_STOP 3
|
||||||
#define CH_LIRA 95
|
#define CH_LIRA 95
|
||||||
#define CH_ESC 27
|
#define CH_ESC 27
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* No support for dynamically loadable drivers */
|
/* No support for dynamically loadable drivers */
|
||||||
#define DYN_DRV 0
|
#define DYN_DRV 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* The addresses of the static drivers */
|
/* The addresses of the static drivers */
|
||||||
extern void atmos_pase_joy[]; /* Referred to by joy_static_stddrv[] */
|
extern void atmos_pase_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||||
extern void atmos_acia_ser[];
|
extern void atmos_acia_ser[];
|
||||||
extern void atmos_228_200_3_tgi[];
|
extern void atmos_228_200_3_tgi[];
|
||||||
extern void atmos_240_200_2_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
extern void atmos_240_200_2_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* c128.h */
|
/* c128.h */
|
||||||
/* */
|
/* */
|
||||||
/* C128 system specific definitions */
|
/* C128 system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -46,50 +46,50 @@
|
||||||
|
|
||||||
|
|
||||||
/* Additional key defines */
|
/* Additional key defines */
|
||||||
#define CH_F1 133
|
#define CH_F1 133
|
||||||
#define CH_F2 137
|
#define CH_F2 137
|
||||||
#define CH_F3 134
|
#define CH_F3 134
|
||||||
#define CH_F4 138
|
#define CH_F4 138
|
||||||
#define CH_F5 135
|
#define CH_F5 135
|
||||||
#define CH_F6 139
|
#define CH_F6 139
|
||||||
#define CH_F7 136
|
#define CH_F7 136
|
||||||
#define CH_F8 140
|
#define CH_F8 140
|
||||||
|
|
||||||
/* Color defines */
|
/* Color defines */
|
||||||
#define COLOR_BLACK 0x00
|
#define COLOR_BLACK 0x00
|
||||||
#define COLOR_WHITE 0x01
|
#define COLOR_WHITE 0x01
|
||||||
#define COLOR_RED 0x02
|
#define COLOR_RED 0x02
|
||||||
#define COLOR_CYAN 0x03
|
#define COLOR_CYAN 0x03
|
||||||
#define COLOR_VIOLET 0x04
|
#define COLOR_VIOLET 0x04
|
||||||
#define COLOR_GREEN 0x05
|
#define COLOR_GREEN 0x05
|
||||||
#define COLOR_BLUE 0x06
|
#define COLOR_BLUE 0x06
|
||||||
#define COLOR_YELLOW 0x07
|
#define COLOR_YELLOW 0x07
|
||||||
#define COLOR_ORANGE 0x08
|
#define COLOR_ORANGE 0x08
|
||||||
#define COLOR_BROWN 0x09
|
#define COLOR_BROWN 0x09
|
||||||
#define COLOR_LIGHTRED 0x0A
|
#define COLOR_LIGHTRED 0x0A
|
||||||
#define COLOR_GRAY1 0x0B
|
#define COLOR_GRAY1 0x0B
|
||||||
#define COLOR_GRAY2 0x0C
|
#define COLOR_GRAY2 0x0C
|
||||||
#define COLOR_LIGHTGREEN 0x0D
|
#define COLOR_LIGHTGREEN 0x0D
|
||||||
#define COLOR_LIGHTBLUE 0x0E
|
#define COLOR_LIGHTBLUE 0x0E
|
||||||
#define COLOR_GRAY3 0x0F
|
#define COLOR_GRAY3 0x0F
|
||||||
|
|
||||||
/* TGI color defines */
|
/* TGI color defines */
|
||||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||||
#define TGI_COLOR_WHITE COLOR_WHITE
|
#define TGI_COLOR_WHITE COLOR_WHITE
|
||||||
#define TGI_COLOR_RED COLOR_RED
|
#define TGI_COLOR_RED COLOR_RED
|
||||||
#define TGI_COLOR_CYAN COLOR_CYAN
|
#define TGI_COLOR_CYAN COLOR_CYAN
|
||||||
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
||||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||||
#define TGI_COLOR_ORANGE COLOR_ORANGE
|
#define TGI_COLOR_ORANGE COLOR_ORANGE
|
||||||
#define TGI_COLOR_BROWN COLOR_BROWN
|
#define TGI_COLOR_BROWN COLOR_BROWN
|
||||||
#define TGI_COLOR_LIGHTRED COLOR_LIGHTRED
|
#define TGI_COLOR_LIGHTRED COLOR_LIGHTRED
|
||||||
#define TGI_COLOR_GRAY1 COLOR_GRAY1
|
#define TGI_COLOR_GRAY1 COLOR_GRAY1
|
||||||
#define TGI_COLOR_GRAY2 COLOR_GRAY2
|
#define TGI_COLOR_GRAY2 COLOR_GRAY2
|
||||||
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
||||||
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
||||||
#define TGI_COLOR_GRAY3 COLOR_GRAY3
|
#define TGI_COLOR_GRAY3 COLOR_GRAY3
|
||||||
|
|
||||||
/* Video mode defines */
|
/* Video mode defines */
|
||||||
#define VIDEOMODE_40x25 0x00
|
#define VIDEOMODE_40x25 0x00
|
||||||
|
@ -101,22 +101,22 @@
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_vic2.h>
|
#include <_vic2.h>
|
||||||
#define VIC (*(struct __vic2*)0xD000)
|
#define VIC (*(struct __vic2*)0xD000)
|
||||||
|
|
||||||
#include <_sid.h>
|
#include <_sid.h>
|
||||||
#define SID (*(struct __sid*)0xD400)
|
#define SID (*(struct __sid*)0xD400)
|
||||||
|
|
||||||
#include <_vdc.h>
|
#include <_vdc.h>
|
||||||
#define VDC (*(struct __vdc*)0xD600)
|
#define VDC (*(struct __vdc*)0xD600)
|
||||||
|
|
||||||
#include <_6526.h>
|
#include <_6526.h>
|
||||||
#define CIA1 (*(struct __6526*)0xDC00)
|
#define CIA1 (*(struct __6526*)0xDC00)
|
||||||
#define CIA2 (*(struct __6526*)0xDD00)
|
#define CIA2 (*(struct __6526*)0xDD00)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Define special memory areas */
|
/* Define special memory areas */
|
||||||
#define COLOR_RAM ((unsigned char*)0xD800)
|
#define COLOR_RAM ((unsigned char*)0xD800)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,12 +128,12 @@ extern void c128_ramcart_emd[];
|
||||||
extern void c128_reu_emd[];
|
extern void c128_reu_emd[];
|
||||||
extern void c128_vdc_emd[];
|
extern void c128_vdc_emd[];
|
||||||
extern void c128_ptvjoy_joy[];
|
extern void c128_ptvjoy_joy[];
|
||||||
extern void c128_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
extern void c128_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||||
extern void c128_1351_mous[]; /* Referred to by mouse_static_stddrv[] */
|
extern void c128_1351_mous[]; /* Referred to by mouse_static_stddrv[] */
|
||||||
extern void c128_joy_mou[];
|
extern void c128_joy_mou[];
|
||||||
extern void c128_pot_mou[];
|
extern void c128_pot_mou[];
|
||||||
extern void c128_swlink_ser[];
|
extern void c128_swlink_ser[];
|
||||||
extern void c128_vdc_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
extern void c128_vdc_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
||||||
extern void c128_vdc2_tgi[];
|
extern void c128_vdc2_tgi[];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* c16.h */
|
/* c16.h */
|
||||||
/* */
|
/* */
|
||||||
/* C16 system specific definitions */
|
/* C16 system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|
100
include/c64.h
100
include/c64.h
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* c64.h */
|
/* c64.h */
|
||||||
/* */
|
/* */
|
||||||
/* C64 system specific definitions */
|
/* C64 system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -46,72 +46,72 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Additional key defines */
|
/* Additional key defines */
|
||||||
#define CH_F1 133
|
#define CH_F1 133
|
||||||
#define CH_F2 137
|
#define CH_F2 137
|
||||||
#define CH_F3 134
|
#define CH_F3 134
|
||||||
#define CH_F4 138
|
#define CH_F4 138
|
||||||
#define CH_F5 135
|
#define CH_F5 135
|
||||||
#define CH_F6 139
|
#define CH_F6 139
|
||||||
#define CH_F7 136
|
#define CH_F7 136
|
||||||
#define CH_F8 140
|
#define CH_F8 140
|
||||||
|
|
||||||
/* Color defines */
|
/* Color defines */
|
||||||
#define COLOR_BLACK 0x00
|
#define COLOR_BLACK 0x00
|
||||||
#define COLOR_WHITE 0x01
|
#define COLOR_WHITE 0x01
|
||||||
#define COLOR_RED 0x02
|
#define COLOR_RED 0x02
|
||||||
#define COLOR_CYAN 0x03
|
#define COLOR_CYAN 0x03
|
||||||
#define COLOR_VIOLET 0x04
|
#define COLOR_VIOLET 0x04
|
||||||
#define COLOR_PURPLE COLOR_VIOLET
|
#define COLOR_PURPLE COLOR_VIOLET
|
||||||
#define COLOR_GREEN 0x05
|
#define COLOR_GREEN 0x05
|
||||||
#define COLOR_BLUE 0x06
|
#define COLOR_BLUE 0x06
|
||||||
#define COLOR_YELLOW 0x07
|
#define COLOR_YELLOW 0x07
|
||||||
#define COLOR_ORANGE 0x08
|
#define COLOR_ORANGE 0x08
|
||||||
#define COLOR_BROWN 0x09
|
#define COLOR_BROWN 0x09
|
||||||
#define COLOR_LIGHTRED 0x0A
|
#define COLOR_LIGHTRED 0x0A
|
||||||
#define COLOR_GRAY1 0x0B
|
#define COLOR_GRAY1 0x0B
|
||||||
#define COLOR_GRAY2 0x0C
|
#define COLOR_GRAY2 0x0C
|
||||||
#define COLOR_LIGHTGREEN 0x0D
|
#define COLOR_LIGHTGREEN 0x0D
|
||||||
#define COLOR_LIGHTBLUE 0x0E
|
#define COLOR_LIGHTBLUE 0x0E
|
||||||
#define COLOR_GRAY3 0x0F
|
#define COLOR_GRAY3 0x0F
|
||||||
|
|
||||||
/* TGI color defines */
|
/* TGI color defines */
|
||||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||||
#define TGI_COLOR_WHITE COLOR_WHITE
|
#define TGI_COLOR_WHITE COLOR_WHITE
|
||||||
#define TGI_COLOR_RED COLOR_RED
|
#define TGI_COLOR_RED COLOR_RED
|
||||||
#define TGI_COLOR_CYAN COLOR_CYAN
|
#define TGI_COLOR_CYAN COLOR_CYAN
|
||||||
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
||||||
#define TGI_COLOR_PURPLE COLOR_PURPLE
|
#define TGI_COLOR_PURPLE COLOR_PURPLE
|
||||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||||
#define TGI_COLOR_ORANGE COLOR_ORANGE
|
#define TGI_COLOR_ORANGE COLOR_ORANGE
|
||||||
#define TGI_COLOR_BROWN COLOR_BROWN
|
#define TGI_COLOR_BROWN COLOR_BROWN
|
||||||
#define TGI_COLOR_LIGHTRED COLOR_LIGHTRED
|
#define TGI_COLOR_LIGHTRED COLOR_LIGHTRED
|
||||||
#define TGI_COLOR_GRAY1 COLOR_GRAY1
|
#define TGI_COLOR_GRAY1 COLOR_GRAY1
|
||||||
#define TGI_COLOR_GRAY2 COLOR_GRAY2
|
#define TGI_COLOR_GRAY2 COLOR_GRAY2
|
||||||
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
||||||
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
||||||
#define TGI_COLOR_GRAY3 COLOR_GRAY3
|
#define TGI_COLOR_GRAY3 COLOR_GRAY3
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_vic2.h>
|
#include <_vic2.h>
|
||||||
#define VIC (*(struct __vic2*)0xD000)
|
#define VIC (*(struct __vic2*)0xD000)
|
||||||
|
|
||||||
#include <_sid.h>
|
#include <_sid.h>
|
||||||
#define SID (*(struct __sid*)0xD400)
|
#define SID (*(struct __sid*)0xD400)
|
||||||
|
|
||||||
#include <_6526.h>
|
#include <_6526.h>
|
||||||
#define CIA1 (*(struct __6526*)0xDC00)
|
#define CIA1 (*(struct __6526*)0xDC00)
|
||||||
#define CIA2 (*(struct __6526*)0xDD00)
|
#define CIA2 (*(struct __6526*)0xDD00)
|
||||||
|
|
||||||
/* Define special memory areas */
|
/* Define special memory areas */
|
||||||
#define COLOR_RAM ((unsigned char*)0xD800)
|
#define COLOR_RAM ((unsigned char*)0xD800)
|
||||||
|
|
||||||
/* Return codes for get_ostype */
|
/* Return codes for get_ostype */
|
||||||
#define C64_OS_US 0xAA /* US version */
|
#define C64_OS_US 0xAA /* US version */
|
||||||
|
@ -152,7 +152,7 @@ extern void c64_hi_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* cbm.h */
|
/* cbm.h */
|
||||||
/* */
|
/* */
|
||||||
/* CBM system-specific definitions */
|
/* CBM system-specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -94,29 +94,29 @@ extern char _filetype; /* Defaults to 's' */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CH_HLINE 192
|
#define CH_HLINE 192
|
||||||
#define CH_VLINE 221
|
#define CH_VLINE 221
|
||||||
#define CH_ULCORNER 176
|
#define CH_ULCORNER 176
|
||||||
#define CH_URCORNER 174
|
#define CH_URCORNER 174
|
||||||
#define CH_LLCORNER 173
|
#define CH_LLCORNER 173
|
||||||
#define CH_LRCORNER 189
|
#define CH_LRCORNER 189
|
||||||
#define CH_TTEE 178
|
#define CH_TTEE 178
|
||||||
#define CH_BTEE 177
|
#define CH_BTEE 177
|
||||||
#define CH_LTEE 171
|
#define CH_LTEE 171
|
||||||
#define CH_RTEE 179
|
#define CH_RTEE 179
|
||||||
#define CH_CROSS 219
|
#define CH_CROSS 219
|
||||||
#define CH_CURS_UP 145
|
#define CH_CURS_UP 145
|
||||||
#define CH_CURS_DOWN 17
|
#define CH_CURS_DOWN 17
|
||||||
#define CH_CURS_LEFT 157
|
#define CH_CURS_LEFT 157
|
||||||
#define CH_CURS_RIGHT 29
|
#define CH_CURS_RIGHT 29
|
||||||
#define CH_PI 222
|
#define CH_PI 222
|
||||||
#define CH_HOME 19
|
#define CH_HOME 19
|
||||||
#define CH_DEL 20
|
#define CH_DEL 20
|
||||||
#define CH_INS 148
|
#define CH_INS 148
|
||||||
#define CH_ENTER 13
|
#define CH_ENTER 13
|
||||||
#define CH_STOP 3
|
#define CH_STOP 3
|
||||||
#define CH_LIRA 92
|
#define CH_LIRA 92
|
||||||
#define CH_ESC 27
|
#define CH_ESC 27
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,9 +166,9 @@ unsigned char get_tv (void);
|
||||||
*
|
*
|
||||||
* e.g., cbm_open(2, 8, CBM_READ, "0:data,s");
|
* e.g., cbm_open(2, 8, CBM_READ, "0:data,s");
|
||||||
*/
|
*/
|
||||||
#define CBM_READ 0 /* default is ",p" */
|
#define CBM_READ 0 /* default is ",p" */
|
||||||
#define CBM_WRITE 1 /* ditto */
|
#define CBM_WRITE 1 /* ditto */
|
||||||
#define CBM_SEQ 2 /* default is ",r" -- or ",s" when writing */
|
#define CBM_SEQ 2 /* default is ",r" -- or ",s" when writing */
|
||||||
|
|
||||||
/* Kernal-level functions */
|
/* Kernal-level functions */
|
||||||
unsigned char cbm_k_acptr (void);
|
unsigned char cbm_k_acptr (void);
|
||||||
|
@ -204,20 +204,20 @@ void cbm_k_unlsn (void);
|
||||||
/* The cbm_* I/O functions below set _oserror (see errno.h),
|
/* The cbm_* I/O functions below set _oserror (see errno.h),
|
||||||
* in case of an error.
|
* in case of an error.
|
||||||
*
|
*
|
||||||
* error-code BASIC error
|
* error-code BASIC error
|
||||||
* ---------- -----------
|
* ---------- -----------
|
||||||
* 1 = too many files
|
* 1 = too many files
|
||||||
* 2 = file open
|
* 2 = file open
|
||||||
* 3 = file not open
|
* 3 = file not open
|
||||||
* 4 = file not found
|
* 4 = file not found
|
||||||
* 5 = device not present
|
* 5 = device not present
|
||||||
* 6 = not input-file
|
* 6 = not input-file
|
||||||
* 7 = not output-file
|
* 7 = not output-file
|
||||||
* 8 = missing file-name
|
* 8 = missing file-name
|
||||||
* 9 = illegal device-number
|
* 9 = illegal device-number
|
||||||
*
|
*
|
||||||
* 10 = STOP-key pushed
|
* 10 = STOP-key pushed
|
||||||
* 11 = general I/O-error
|
* 11 = general I/O-error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
104
include/cbm264.h
104
include/cbm264.h
|
@ -46,83 +46,83 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Additional key defines */
|
/* Additional key defines */
|
||||||
#define CH_F1 133
|
#define CH_F1 133
|
||||||
#define CH_F2 137
|
#define CH_F2 137
|
||||||
#define CH_F3 134
|
#define CH_F3 134
|
||||||
#define CH_F4 138
|
#define CH_F4 138
|
||||||
#define CH_F5 135
|
#define CH_F5 135
|
||||||
#define CH_F6 139
|
#define CH_F6 139
|
||||||
#define CH_F7 136
|
#define CH_F7 136
|
||||||
#define CH_F8 140
|
#define CH_F8 140
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Color attributes */
|
/* Color attributes */
|
||||||
#define CATTR_LUMA0 0x00
|
#define CATTR_LUMA0 0x00
|
||||||
#define CATTR_LUMA1 0x10
|
#define CATTR_LUMA1 0x10
|
||||||
#define CATTR_LUMA2 0x20
|
#define CATTR_LUMA2 0x20
|
||||||
#define CATTR_LUMA3 0x30
|
#define CATTR_LUMA3 0x30
|
||||||
#define CATTR_LUMA4 0x40
|
#define CATTR_LUMA4 0x40
|
||||||
#define CATTR_LUMA5 0x50
|
#define CATTR_LUMA5 0x50
|
||||||
#define CATTR_LUMA6 0x60
|
#define CATTR_LUMA6 0x60
|
||||||
#define CATTR_LUMA7 0x70
|
#define CATTR_LUMA7 0x70
|
||||||
#define CATTR_BLINK 0x80
|
#define CATTR_BLINK 0x80
|
||||||
|
|
||||||
/* Base colors */
|
/* Base colors */
|
||||||
#define BCOLOR_BLACK 0x00
|
#define BCOLOR_BLACK 0x00
|
||||||
#define BCOLOR_WHITE 0x01
|
#define BCOLOR_WHITE 0x01
|
||||||
#define BCOLOR_RED 0x02
|
#define BCOLOR_RED 0x02
|
||||||
#define BCOLOR_CYAN 0x03
|
#define BCOLOR_CYAN 0x03
|
||||||
#define BCOLOR_VIOLET 0x04
|
#define BCOLOR_VIOLET 0x04
|
||||||
#define BCOLOR_PURPLE BCOLOR_VIOLET
|
#define BCOLOR_PURPLE BCOLOR_VIOLET
|
||||||
#define BCOLOR_GREEN 0x05
|
#define BCOLOR_GREEN 0x05
|
||||||
#define BCOLOR_BLUE 0x06
|
#define BCOLOR_BLUE 0x06
|
||||||
#define BCOLOR_YELLOW 0x07
|
#define BCOLOR_YELLOW 0x07
|
||||||
#define BCOLOR_ORANGE 0x08
|
#define BCOLOR_ORANGE 0x08
|
||||||
#define BCOLOR_BROWN 0x09
|
#define BCOLOR_BROWN 0x09
|
||||||
#define BCOLOR_LEMON 0x0A /* What's that color? */
|
#define BCOLOR_LEMON 0x0A /* What's that color? */
|
||||||
#define BCOLOR_LIGHTVIOLET 0x0B
|
#define BCOLOR_LIGHTVIOLET 0x0B
|
||||||
#define BCOLOR_BLUEGREEN 0x0C
|
#define BCOLOR_BLUEGREEN 0x0C
|
||||||
#define BCOLOR_LIGHTBLUE 0x0D
|
#define BCOLOR_LIGHTBLUE 0x0D
|
||||||
#define BCOLOR_DARKBLUE 0x0E
|
#define BCOLOR_DARKBLUE 0x0E
|
||||||
#define BCOLOR_LIGHTGREEN 0x0F
|
#define BCOLOR_LIGHTGREEN 0x0F
|
||||||
|
|
||||||
/* Now try to mix up a C64/C128 compatible palette */
|
/* Now try to mix up a C64/C128 compatible palette */
|
||||||
#define COLOR_BLACK (BCOLOR_BLACK)
|
#define COLOR_BLACK (BCOLOR_BLACK)
|
||||||
#define COLOR_WHITE (BCOLOR_WHITE | CATTR_LUMA7)
|
#define COLOR_WHITE (BCOLOR_WHITE | CATTR_LUMA7)
|
||||||
#define COLOR_RED (BCOLOR_RED | CATTR_LUMA4)
|
#define COLOR_RED (BCOLOR_RED | CATTR_LUMA4)
|
||||||
#define COLOR_CYAN (BCOLOR_CYAN | CATTR_LUMA7)
|
#define COLOR_CYAN (BCOLOR_CYAN | CATTR_LUMA7)
|
||||||
#define COLOR_VIOLET (BCOLOR_VIOLET | CATTR_LUMA7)
|
#define COLOR_VIOLET (BCOLOR_VIOLET | CATTR_LUMA7)
|
||||||
#define COLOR_PURPLE COLOR_VIOLET
|
#define COLOR_PURPLE COLOR_VIOLET
|
||||||
#define COLOR_GREEN (BCOLOR_GREEN | CATTR_LUMA7)
|
#define COLOR_GREEN (BCOLOR_GREEN | CATTR_LUMA7)
|
||||||
#define COLOR_BLUE (BCOLOR_BLUE | CATTR_LUMA7)
|
#define COLOR_BLUE (BCOLOR_BLUE | CATTR_LUMA7)
|
||||||
#define COLOR_YELLOW (BCOLOR_YELLOW | CATTR_LUMA7)
|
#define COLOR_YELLOW (BCOLOR_YELLOW | CATTR_LUMA7)
|
||||||
#define COLOR_ORANGE (BCOLOR_ORANGE | CATTR_LUMA7)
|
#define COLOR_ORANGE (BCOLOR_ORANGE | CATTR_LUMA7)
|
||||||
#define COLOR_BROWN (BCOLOR_BROWN | CATTR_LUMA7)
|
#define COLOR_BROWN (BCOLOR_BROWN | CATTR_LUMA7)
|
||||||
#define COLOR_LIGHTRED (BCOLOR_RED | CATTR_LUMA7)
|
#define COLOR_LIGHTRED (BCOLOR_RED | CATTR_LUMA7)
|
||||||
#define COLOR_GRAY1 (BCOLOR_WHITE | CATTR_LUMA1)
|
#define COLOR_GRAY1 (BCOLOR_WHITE | CATTR_LUMA1)
|
||||||
#define COLOR_GRAY2 (BCOLOR_WHITE | CATTR_LUMA3)
|
#define COLOR_GRAY2 (BCOLOR_WHITE | CATTR_LUMA3)
|
||||||
#define COLOR_LIGHTGREEN (BCOLOR_LIGHTGREEN | CATTR_LUMA7)
|
#define COLOR_LIGHTGREEN (BCOLOR_LIGHTGREEN | CATTR_LUMA7)
|
||||||
#define COLOR_LIGHTBLUE (BCOLOR_LIGHTBLUE | CATTR_LUMA7)
|
#define COLOR_LIGHTBLUE (BCOLOR_LIGHTBLUE | CATTR_LUMA7)
|
||||||
#define COLOR_GRAY3 (BCOLOR_WHITE | CATTR_LUMA5)
|
#define COLOR_GRAY3 (BCOLOR_WHITE | CATTR_LUMA5)
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_ted.h>
|
#include <_ted.h>
|
||||||
#define TED (*(struct __ted*)0xFF00)
|
#define TED (*(struct __ted*)0xFF00)
|
||||||
|
|
||||||
/* Define special memory areas */
|
/* Define special memory areas */
|
||||||
#define COLOR_RAM ((unsigned char*)0x0800)
|
#define COLOR_RAM ((unsigned char*)0x0800)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* cbm510.h */
|
/* cbm510.h */
|
||||||
/* */
|
/* */
|
||||||
/* System specific definitions for the CBM5x0 / P500 */
|
/* System specific definitions for the CBM5x0 / P500 */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -46,68 +46,68 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Additional key defines */
|
/* Additional key defines */
|
||||||
#define CH_F1 224
|
#define CH_F1 224
|
||||||
#define CH_F2 225
|
#define CH_F2 225
|
||||||
#define CH_F3 226
|
#define CH_F3 226
|
||||||
#define CH_F4 227
|
#define CH_F4 227
|
||||||
#define CH_F5 228
|
#define CH_F5 228
|
||||||
#define CH_F6 229
|
#define CH_F6 229
|
||||||
#define CH_F7 230
|
#define CH_F7 230
|
||||||
#define CH_F8 231
|
#define CH_F8 231
|
||||||
#define CH_F9 232
|
#define CH_F9 232
|
||||||
#define CH_F10 233
|
#define CH_F10 233
|
||||||
#define CH_F11 234
|
#define CH_F11 234
|
||||||
#define CH_F12 235
|
#define CH_F12 235
|
||||||
#define CH_F13 236
|
#define CH_F13 236
|
||||||
#define CH_F14 237
|
#define CH_F14 237
|
||||||
#define CH_F15 238
|
#define CH_F15 238
|
||||||
#define CH_F16 239
|
#define CH_F16 239
|
||||||
#define CH_F17 240
|
#define CH_F17 240
|
||||||
#define CH_F18 241
|
#define CH_F18 241
|
||||||
#define CH_F19 242
|
#define CH_F19 242
|
||||||
#define CH_F20 243
|
#define CH_F20 243
|
||||||
|
|
||||||
/* Color defines */
|
/* Color defines */
|
||||||
#define COLOR_BLACK 0x00
|
#define COLOR_BLACK 0x00
|
||||||
#define COLOR_WHITE 0x01
|
#define COLOR_WHITE 0x01
|
||||||
#define COLOR_RED 0x02
|
#define COLOR_RED 0x02
|
||||||
#define COLOR_CYAN 0x03
|
#define COLOR_CYAN 0x03
|
||||||
#define COLOR_VIOLET 0x04
|
#define COLOR_VIOLET 0x04
|
||||||
#define COLOR_PURPLE COLOR_VIOLET
|
#define COLOR_PURPLE COLOR_VIOLET
|
||||||
#define COLOR_GREEN 0x05
|
#define COLOR_GREEN 0x05
|
||||||
#define COLOR_BLUE 0x06
|
#define COLOR_BLUE 0x06
|
||||||
#define COLOR_YELLOW 0x07
|
#define COLOR_YELLOW 0x07
|
||||||
#define COLOR_ORANGE 0x08
|
#define COLOR_ORANGE 0x08
|
||||||
#define COLOR_BROWN 0x09
|
#define COLOR_BROWN 0x09
|
||||||
#define COLOR_LIGHTRED 0x0A
|
#define COLOR_LIGHTRED 0x0A
|
||||||
#define COLOR_GRAY1 0x0B
|
#define COLOR_GRAY1 0x0B
|
||||||
#define COLOR_GRAY2 0x0C
|
#define COLOR_GRAY2 0x0C
|
||||||
#define COLOR_LIGHTGREEN 0x0D
|
#define COLOR_LIGHTGREEN 0x0D
|
||||||
#define COLOR_LIGHTBLUE 0x0E
|
#define COLOR_LIGHTBLUE 0x0E
|
||||||
#define COLOR_GRAY3 0x0F
|
#define COLOR_GRAY3 0x0F
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_vic2.h>
|
#include <_vic2.h>
|
||||||
#define VIC (*(struct __vic2*)0xD800)
|
#define VIC (*(struct __vic2*)0xD800)
|
||||||
|
|
||||||
#include <_sid.h>
|
#include <_sid.h>
|
||||||
#define SID (*(struct __sid*)0xDA00)
|
#define SID (*(struct __sid*)0xDA00)
|
||||||
|
|
||||||
#include <_6526.h>
|
#include <_6526.h>
|
||||||
#define CIA (*(struct __6526*)0xDC00)
|
#define CIA (*(struct __6526*)0xDC00)
|
||||||
|
|
||||||
#include <_6551.h>
|
#include <_6551.h>
|
||||||
#define ACIA (*(struct __6551*)0xDD00)
|
#define ACIA (*(struct __6551*)0xDD00)
|
||||||
|
|
||||||
#include <_6525.h>
|
#include <_6525.h>
|
||||||
#define TPI1 (*(struct __6525*)0xDE00)
|
#define TPI1 (*(struct __6525*)0xDE00)
|
||||||
#define TPI2 (*(struct __6525*)0xDF00)
|
#define TPI2 (*(struct __6525*)0xDF00)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,13 +119,13 @@
|
||||||
|
|
||||||
/* The addresses of the static drivers */
|
/* The addresses of the static drivers */
|
||||||
extern void cbm510_ram_emd[];
|
extern void cbm510_ram_emd[];
|
||||||
extern void cbm510_std_joy[]; /* Referred to by joy_static_stddrv[] */
|
extern void cbm510_std_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||||
extern void cbm510_std_ser[];
|
extern void cbm510_std_ser[];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* cbm610.h */
|
/* cbm610.h */
|
||||||
/* */
|
/* */
|
||||||
/* CBM610 system specific definitions */
|
/* CBM610 system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,15 +74,15 @@
|
||||||
#define CH_F20 243
|
#define CH_F20 243
|
||||||
|
|
||||||
/* Color defines */
|
/* Color defines */
|
||||||
#define COLOR_BLACK 0x00
|
#define COLOR_BLACK 0x00
|
||||||
#define COLOR_WHITE 0x01
|
#define COLOR_WHITE 0x01
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_6545.h>
|
#include <_6545.h>
|
||||||
#define CRTC (*(struct __6545)0xD800)
|
#define CRTC (*(struct __6545)0xD800)
|
||||||
|
|
||||||
#include <_sid.h>
|
#include <_sid.h>
|
||||||
#define SID (*(struct __sid*)0xDA00)
|
#define SID (*(struct __sid*)0xDA00)
|
||||||
|
|
||||||
#include <_6526.h>
|
#include <_6526.h>
|
||||||
#define CIA (*(struct __6526*)0xDC00)
|
#define CIA (*(struct __6526*)0xDC00)
|
||||||
|
@ -109,7 +109,7 @@ extern void cbm610_std_ser[];
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* conio.h */
|
/* conio.h */
|
||||||
/* */
|
/* */
|
||||||
/* Direct console I/O */
|
/* Direct console I/O */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Functions */
|
/* Functions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* ctype.h */
|
/* ctype.h */
|
||||||
/* */
|
/* */
|
||||||
/* Character handling */
|
/* Character handling */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -41,21 +41,21 @@
|
||||||
extern unsigned char _ctype[256];
|
extern unsigned char _ctype[256];
|
||||||
|
|
||||||
/* Bits used to specify character classes */
|
/* Bits used to specify character classes */
|
||||||
#define _CT_LOWER 0x01 /* 0 - Lower case char */
|
#define _CT_LOWER 0x01 /* 0 - Lower case char */
|
||||||
#define _CT_UPPER 0x02 /* 1 - Upper case char */
|
#define _CT_UPPER 0x02 /* 1 - Upper case char */
|
||||||
#define _CT_DIGIT 0x04 /* 2 - Numeric digit */
|
#define _CT_DIGIT 0x04 /* 2 - Numeric digit */
|
||||||
#define _CT_XDIGIT 0x08 /* 3 - Hex digit (both lower and upper) */
|
#define _CT_XDIGIT 0x08 /* 3 - Hex digit (both lower and upper) */
|
||||||
#define _CT_CNTRL 0x10 /* 4 - Control character */
|
#define _CT_CNTRL 0x10 /* 4 - Control character */
|
||||||
#define _CT_SPACE 0x20 /* 5 - The space character itself */
|
#define _CT_SPACE 0x20 /* 5 - The space character itself */
|
||||||
#define _CT_OTHER_WS 0x40 /* 6 - Other whitespace ('\f', '\n', '\r', '\t', and '\v') */
|
#define _CT_OTHER_WS 0x40 /* 6 - Other whitespace ('\f', '\n', '\r', '\t', and '\v') */
|
||||||
#define _CT_SPACE_TAB 0x80 /* 7 - Space or tab character */
|
#define _CT_SPACE_TAB 0x80 /* 7 - Space or tab character */
|
||||||
|
|
||||||
/* Bit combinations */
|
/* Bit combinations */
|
||||||
#define _CT_ALNUM (_CT_LOWER | _CT_UPPER | _CT_DIGIT)
|
#define _CT_ALNUM (_CT_LOWER | _CT_UPPER | _CT_DIGIT)
|
||||||
#define _CT_ALPHA (_CT_LOWER | _CT_UPPER)
|
#define _CT_ALPHA (_CT_LOWER | _CT_UPPER)
|
||||||
#define _CT_NOT_GRAPH (_CT_CNTRL | _CT_SPACE)
|
#define _CT_NOT_GRAPH (_CT_CNTRL | _CT_SPACE)
|
||||||
#define _CT_NOT_PRINT (_CT_CNTRL)
|
#define _CT_NOT_PRINT (_CT_CNTRL)
|
||||||
#define _CT_NOT_PUNCT (_CT_SPACE | _CT_CNTRL | _CT_DIGIT | _CT_UPPER | _CT_LOWER)
|
#define _CT_NOT_PUNCT (_CT_SPACE | _CT_CNTRL | _CT_DIGIT | _CT_UPPER | _CT_LOWER)
|
||||||
#define _CT_WS (_CT_SPACE | _CT_OTHER_WS)
|
#define _CT_WS (_CT_SPACE | _CT_OTHER_WS)
|
||||||
|
|
||||||
/* Character classification functions */
|
/* Character classification functions */
|
||||||
|
@ -71,11 +71,11 @@ int __fastcall__ isspace (int c);
|
||||||
int __fastcall__ isupper (int c);
|
int __fastcall__ isupper (int c);
|
||||||
int __fastcall__ isxdigit (int c);
|
int __fastcall__ isxdigit (int c);
|
||||||
#if __CC65_STD__ >= __CC65_STD_C99__
|
#if __CC65_STD__ >= __CC65_STD_C99__
|
||||||
int __fastcall__ isblank (int c); /* New in C99 */
|
int __fastcall__ isblank (int c); /* New in C99 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int __fastcall__ toupper (int c); /* Always external */
|
int __fastcall__ toupper (int c); /* Always external */
|
||||||
int __fastcall__ tolower (int c); /* Always external */
|
int __fastcall__ tolower (int c); /* Always external */
|
||||||
|
|
||||||
#if __CC65_STD__ >= __CC65_STD_CC65__
|
#if __CC65_STD__ >= __CC65_STD_CC65__
|
||||||
unsigned char __fastcall__ toascii (unsigned char c);
|
unsigned char __fastcall__ toascii (unsigned char c);
|
||||||
|
@ -95,83 +95,83 @@ unsigned char __fastcall__ toascii (unsigned char c);
|
||||||
|
|
||||||
#define isalnum(c) (__AX__ = (c), \
|
#define isalnum(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_ALNUM), \
|
__asm__ ("and #%b", _CT_ALNUM), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define isalpha(c) (__AX__ = (c), \
|
#define isalpha(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_ALPHA), \
|
__asm__ ("and #%b", _CT_ALPHA), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#if __CC65_STD__ >= __CC65_STD_C99__
|
#if __CC65_STD__ >= __CC65_STD_C99__
|
||||||
#define isblank(c) (__AX__ = (c), \
|
#define isblank(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_SPACE_TAB), \
|
__asm__ ("and #%b", _CT_SPACE_TAB), \
|
||||||
__AX__)
|
__AX__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define iscntrl(c) (__AX__ = (c), \
|
#define iscntrl(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_CNTRL), \
|
__asm__ ("and #%b", _CT_CNTRL), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define isdigit(c) (__AX__ = (c), \
|
#define isdigit(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_DIGIT), \
|
__asm__ ("and #%b", _CT_DIGIT), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define isgraph(c) (__AX__ = (c), \
|
#define isgraph(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_NOT_GRAPH), \
|
__asm__ ("and #%b", _CT_NOT_GRAPH), \
|
||||||
__asm__ ("cmp #1"), \
|
__asm__ ("cmp #1"), \
|
||||||
__asm__ ("lda #1"), \
|
__asm__ ("lda #1"), \
|
||||||
__asm__ ("sbc #1"), \
|
__asm__ ("sbc #1"), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define islower(c) (__AX__ = (c), \
|
#define islower(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_LOWER), \
|
__asm__ ("and #%b", _CT_LOWER), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define isprint(c) (__AX__ = (c), \
|
#define isprint(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_NOT_PRINT), \
|
__asm__ ("and #%b", _CT_NOT_PRINT), \
|
||||||
__asm__ ("eor #%b", _CT_NOT_PRINT), \
|
__asm__ ("eor #%b", _CT_NOT_PRINT), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define ispunct(c) (__AX__ = (c), \
|
#define ispunct(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_NOT_PUNCT), \
|
__asm__ ("and #%b", _CT_NOT_PUNCT), \
|
||||||
__asm__ ("cmp #1"), \
|
__asm__ ("cmp #1"), \
|
||||||
__asm__ ("lda #1"), \
|
__asm__ ("lda #1"), \
|
||||||
__asm__ ("sbc #1"), \
|
__asm__ ("sbc #1"), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define isspace(c) (__AX__ = (c), \
|
#define isspace(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_WS), \
|
__asm__ ("and #%b", _CT_WS), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define isupper(c) (__AX__ = (c), \
|
#define isupper(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_UPPER), \
|
__asm__ ("and #%b", _CT_UPPER), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#define isxdigit(c) (__AX__ = (c), \
|
#define isxdigit(c) (__AX__ = (c), \
|
||||||
__asm__ ("tay"), \
|
__asm__ ("tay"), \
|
||||||
__asm__ ("lda %v,y", _ctype), \
|
__asm__ ("lda %v,y", _ctype), \
|
||||||
__asm__ ("and #%b", _CT_XDIGIT), \
|
__asm__ ("and #%b", _CT_XDIGIT), \
|
||||||
__AX__)
|
__AX__)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* dbg.h */
|
/* dbg.h */
|
||||||
/* */
|
/* */
|
||||||
/* Debugger module interface */
|
/* Debugger module interface */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Utility functions */
|
/* Utility functions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ char* DbgMemDump (unsigned Addr, char* Buf, unsigned char Len);
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* High level user interface */
|
/* High level user interface */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ void __fastcall__ DbgInit (unsigned unused);
|
||||||
* next brk encountered.
|
* next brk encountered.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BREAK() __asm__ ("brk")
|
#define BREAK() __asm__ ("brk")
|
||||||
/* Use this to insert breakpoints into your code */
|
/* Use this to insert breakpoints into your code */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,11 +113,11 @@ struct dirent {
|
||||||
#elif defined(__LYNX__)
|
#elif defined(__LYNX__)
|
||||||
|
|
||||||
struct dirent {
|
struct dirent {
|
||||||
unsigned char d_blocks;
|
unsigned char d_blocks;
|
||||||
unsigned int d_offset;
|
unsigned int d_offset;
|
||||||
char d_type;
|
char d_type;
|
||||||
void *d_address;
|
void *d_address;
|
||||||
unsigned int d_size;
|
unsigned int d_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct dirent FileEntry;
|
extern struct dirent FileEntry;
|
||||||
|
@ -144,7 +144,7 @@ struct dirent {
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct em_copy {
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Functions */
|
/* Functions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ typedef struct {
|
||||||
void* map; /* MAP routine */
|
void* map; /* MAP routine */
|
||||||
void* use; /* USE routine */
|
void* use; /* USE routine */
|
||||||
void* mapclean; /* MAPCLEAN routine */
|
void* mapclean; /* MAPCLEAN routine */
|
||||||
void* copyfrom; /* COPYFROM routine */
|
void* copyfrom; /* COPYFROM routine */
|
||||||
void* copyto; /* COPYTO routine */
|
void* copyto; /* COPYTO routine */
|
||||||
|
|
||||||
} em_drv_header;
|
} em_drv_header;
|
||||||
|
@ -68,7 +68,7 @@ typedef struct {
|
||||||
|
|
||||||
|
|
||||||
/* EM kernel variables */
|
/* EM kernel variables */
|
||||||
extern em_drv_header* em_drv; /* Pointer to driver */
|
extern em_drv_header* em_drv; /* Pointer to driver */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* errno.h */
|
/* errno.h */
|
||||||
/* */
|
/* */
|
||||||
/* Error codes */
|
/* Error codes */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,23 +56,23 @@ extern int _errno;
|
||||||
|
|
||||||
|
|
||||||
/* Possible error codes */
|
/* Possible error codes */
|
||||||
#define ENOENT 1 /* No such file or directory */
|
#define ENOENT 1 /* No such file or directory */
|
||||||
#define ENOMEM 2 /* Out of memory */
|
#define ENOMEM 2 /* Out of memory */
|
||||||
#define EACCES 3 /* Permission denied */
|
#define EACCES 3 /* Permission denied */
|
||||||
#define ENODEV 4 /* No such device */
|
#define ENODEV 4 /* No such device */
|
||||||
#define EMFILE 5 /* Too many open files */
|
#define EMFILE 5 /* Too many open files */
|
||||||
#define EBUSY 6 /* Device or resource busy */
|
#define EBUSY 6 /* Device or resource busy */
|
||||||
#define EINVAL 7 /* Invalid argument */
|
#define EINVAL 7 /* Invalid argument */
|
||||||
#define ENOSPC 8 /* No space left on device */
|
#define ENOSPC 8 /* No space left on device */
|
||||||
#define EEXIST 9 /* File exists */
|
#define EEXIST 9 /* File exists */
|
||||||
#define EAGAIN 10 /* Try again */
|
#define EAGAIN 10 /* Try again */
|
||||||
#define EIO 11 /* I/O error */
|
#define EIO 11 /* I/O error */
|
||||||
#define EINTR 12 /* Interrupted system call */
|
#define EINTR 12 /* Interrupted system call */
|
||||||
#define ENOSYS 13 /* Function not implemented */
|
#define ENOSYS 13 /* Function not implemented */
|
||||||
#define ESPIPE 14 /* Illegal seek */
|
#define ESPIPE 14 /* Illegal seek */
|
||||||
#define ERANGE 15 /* Range error */
|
#define ERANGE 15 /* Range error */
|
||||||
#define EBADF 16 /* Bad file number */
|
#define EBADF 16 /* Bad file number */
|
||||||
#define EUNKNOWN 17 /* Unknown OS specific error */
|
#define EUNKNOWN 17 /* Unknown OS specific error */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* fcntl.h */
|
/* fcntl.h */
|
||||||
/* */
|
/* */
|
||||||
/* File control operations */
|
/* File control operations */
|
||||||
/* */
|
/* */
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,13 +56,13 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
int open (const char* name, int flags, ...); /* May take a mode argument */
|
int open (const char* name, int flags, ...); /* May take a mode argument */
|
||||||
int __fastcall__ close (int fd);
|
int __fastcall__ close (int fd);
|
||||||
int __fastcall__ creat (const char* name, unsigned mode);
|
int __fastcall__ creat (const char* name, unsigned mode);
|
||||||
|
|
||||||
|
|
120
include/geos.h
120
include/geos.h
|
@ -68,70 +68,70 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define CH_ULCORNER '+'
|
#define CH_ULCORNER '+'
|
||||||
#define CH_URCORNER '+'
|
#define CH_URCORNER '+'
|
||||||
#define CH_LLCORNER '+'
|
#define CH_LLCORNER '+'
|
||||||
#define CH_LRCORNER '+'
|
#define CH_LRCORNER '+'
|
||||||
#define CH_TTEE '+'
|
#define CH_TTEE '+'
|
||||||
#define CH_RTEE '+'
|
#define CH_RTEE '+'
|
||||||
#define CH_BTEE '+'
|
#define CH_BTEE '+'
|
||||||
#define CH_LTEE '+'
|
#define CH_LTEE '+'
|
||||||
#define CH_CROSS '+'
|
#define CH_CROSS '+'
|
||||||
|
|
||||||
#define CH_F1 KEY_F1
|
#define CH_F1 KEY_F1
|
||||||
#define CH_F2 KEY_F2
|
#define CH_F2 KEY_F2
|
||||||
#define CH_F3 KEY_F3
|
#define CH_F3 KEY_F3
|
||||||
#define CH_F4 KEY_F4
|
#define CH_F4 KEY_F4
|
||||||
#define CH_F5 KEY_F5
|
#define CH_F5 KEY_F5
|
||||||
#define CH_F6 KEY_F6
|
#define CH_F6 KEY_F6
|
||||||
#define CH_F7 KEY_F7
|
#define CH_F7 KEY_F7
|
||||||
#define CH_F8 KEY_F8
|
#define CH_F8 KEY_F8
|
||||||
|
|
||||||
#define CH_CURS_UP KEY_UP
|
#define CH_CURS_UP KEY_UP
|
||||||
#define CH_CURS_DOWN KEY_DOWN
|
#define CH_CURS_DOWN KEY_DOWN
|
||||||
#define CH_CURS_LEFT KEY_LEFT
|
#define CH_CURS_LEFT KEY_LEFT
|
||||||
#define CH_CURS_RIGHT KEY_RIGHT
|
#define CH_CURS_RIGHT KEY_RIGHT
|
||||||
#define CH_DEL KEY_DELETE
|
#define CH_DEL KEY_DELETE
|
||||||
#define CH_INS KEY_INSERT
|
#define CH_INS KEY_INSERT
|
||||||
#define CH_ENTER KEY_ENTER
|
#define CH_ENTER KEY_ENTER
|
||||||
#define CH_STOP KEY_STOP
|
#define CH_STOP KEY_STOP
|
||||||
#define CH_ESC KEY_ESC
|
#define CH_ESC KEY_ESC
|
||||||
|
|
||||||
#define COLOR_BLACK BLACK
|
#define COLOR_BLACK BLACK
|
||||||
#define COLOR_WHITE WHITE
|
#define COLOR_WHITE WHITE
|
||||||
#define COLOR_RED RED
|
#define COLOR_RED RED
|
||||||
#define COLOR_CYAN CYAN
|
#define COLOR_CYAN CYAN
|
||||||
#define COLOR_VIOLET PURPLE
|
#define COLOR_VIOLET PURPLE
|
||||||
#define COLOR_PURPLE PURPLE
|
#define COLOR_PURPLE PURPLE
|
||||||
#define COLOR_GREEN GREEN
|
#define COLOR_GREEN GREEN
|
||||||
#define COLOR_BLUE BLUE
|
#define COLOR_BLUE BLUE
|
||||||
#define COLOR_YELLOW YELLOW
|
#define COLOR_YELLOW YELLOW
|
||||||
#define COLOR_ORANGE ORANGE
|
#define COLOR_ORANGE ORANGE
|
||||||
#define COLOR_BROWN BROWN
|
#define COLOR_BROWN BROWN
|
||||||
#define COLOR_LIGHTRED LTRED
|
#define COLOR_LIGHTRED LTRED
|
||||||
#define COLOR_GRAY1 DKGREY
|
#define COLOR_GRAY1 DKGREY
|
||||||
#define COLOR_GRAY2 MEDGREY
|
#define COLOR_GRAY2 MEDGREY
|
||||||
#define COLOR_LIGHTGREEN LTGREEN
|
#define COLOR_LIGHTGREEN LTGREEN
|
||||||
#define COLOR_LIGHTBLUE LTBLUE
|
#define COLOR_LIGHTBLUE LTBLUE
|
||||||
#define COLOR_GRAY3 LTGREY
|
#define COLOR_GRAY3 LTGREY
|
||||||
|
|
||||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||||
#define TGI_COLOR_WHITE COLOR_WHITE
|
#define TGI_COLOR_WHITE COLOR_WHITE
|
||||||
#define TGI_COLOR_RED COLOR_RED
|
#define TGI_COLOR_RED COLOR_RED
|
||||||
#define TGI_COLOR_CYAN COLOR_CYAN
|
#define TGI_COLOR_CYAN COLOR_CYAN
|
||||||
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
||||||
#define TGI_COLOR_PURPLE COLOR_PURPLE
|
#define TGI_COLOR_PURPLE COLOR_PURPLE
|
||||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||||
#define TGI_COLOR_ORANGE COLOR_ORANGE
|
#define TGI_COLOR_ORANGE COLOR_ORANGE
|
||||||
#define TGI_COLOR_BROWN COLOR_BROWN
|
#define TGI_COLOR_BROWN COLOR_BROWN
|
||||||
#define TGI_COLOR_LIGHTRED COLOR_LIGHTRED
|
#define TGI_COLOR_LIGHTRED COLOR_LIGHTRED
|
||||||
#define TGI_COLOR_GRAY1 COLOR_GRAY1
|
#define TGI_COLOR_GRAY1 COLOR_GRAY1
|
||||||
#define TGI_COLOR_GRAY2 COLOR_GRAY2
|
#define TGI_COLOR_GRAY2 COLOR_GRAY2
|
||||||
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
||||||
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
||||||
#define TGI_COLOR_GRAY3 COLOR_GRAY3
|
#define TGI_COLOR_GRAY3 COLOR_GRAY3
|
||||||
|
|
||||||
|
|
||||||
/* End of geos.h */
|
/* End of geos.h */
|
||||||
|
|
|
@ -9,59 +9,59 @@
|
||||||
#ifndef _GCONST_H
|
#ifndef _GCONST_H
|
||||||
#define _GCONST_H
|
#define _GCONST_H
|
||||||
|
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#define FALSE NULL
|
#define FALSE NULL
|
||||||
#define TRUE 0xff
|
#define TRUE 0xff
|
||||||
#define MOUSE_SPRNUM 0
|
#define MOUSE_SPRNUM 0
|
||||||
#define DISK_DRV_LGH 0x0d80
|
#define DISK_DRV_LGH 0x0d80
|
||||||
|
|
||||||
/* drivetypes */
|
/* drivetypes */
|
||||||
#define DRV_NULL 0
|
#define DRV_NULL 0
|
||||||
#define DRV_1541 1
|
#define DRV_1541 1
|
||||||
#define DRV_1571 2
|
#define DRV_1571 2
|
||||||
#define DRV_1581 3
|
#define DRV_1581 3
|
||||||
#define DRV_NETWORK 15
|
#define DRV_NETWORK 15
|
||||||
|
|
||||||
/* various disk constants */
|
/* various disk constants */
|
||||||
#define REL_FILE_NUM 9
|
#define REL_FILE_NUM 9
|
||||||
#define CMND_FILE_NUM 15
|
#define CMND_FILE_NUM 15
|
||||||
#define MAX_CMND_STR 32
|
#define MAX_CMND_STR 32
|
||||||
#define DIR_1581_TRACK 40
|
#define DIR_1581_TRACK 40
|
||||||
#define DIR_ACC_CHAN 13
|
#define DIR_ACC_CHAN 13
|
||||||
#define DIR_TRACK 18
|
#define DIR_TRACK 18
|
||||||
#define N_TRACKS 35
|
#define N_TRACKS 35
|
||||||
#define DK_NM_ID_LEN 18
|
#define DK_NM_ID_LEN 18
|
||||||
#define TRACK 9
|
#define TRACK 9
|
||||||
#define SECTOR 12
|
#define SECTOR 12
|
||||||
#define TOTAL_BLOCKS 664
|
#define TOTAL_BLOCKS 664
|
||||||
|
|
||||||
/* offset to something */
|
/* offset to something */
|
||||||
#define OFF_INDEX_PTR 1
|
#define OFF_INDEX_PTR 1
|
||||||
|
|
||||||
/* values for CPU_DATA memory config - C64 */
|
/* values for CPU_DATA memory config - C64 */
|
||||||
#define IO_IN 0x35
|
#define IO_IN 0x35
|
||||||
#define KRNL_IO_IN 0x36
|
#define KRNL_IO_IN 0x36
|
||||||
#define KRNL_BAS_IO_IN 0x37
|
#define KRNL_BAS_IO_IN 0x37
|
||||||
|
|
||||||
/* values for MMU config - C128 */
|
/* values for MMU config - C128 */
|
||||||
#define CIOIN 0x7E
|
#define CIOIN 0x7E
|
||||||
#define CRAM64K 0x7F
|
#define CRAM64K 0x7F
|
||||||
#define CKRNLBASIOIN 0x40
|
#define CKRNLBASIOIN 0x40
|
||||||
#define CKRNLIOIN 0x4E
|
#define CKRNLIOIN 0x4E
|
||||||
|
|
||||||
/* alarmSetFlag */
|
/* alarmSetFlag */
|
||||||
#define ALARMMASK 4
|
#define ALARMMASK 4
|
||||||
|
|
||||||
#define CLR_SAVE 0x40
|
#define CLR_SAVE 0x40
|
||||||
#define CONSTRAINED 0x40
|
#define CONSTRAINED 0x40
|
||||||
#define UN_CONSTRAINED 0
|
#define UN_CONSTRAINED 0
|
||||||
#define FG_SAVE 0x80
|
#define FG_SAVE 0x80
|
||||||
|
|
||||||
#define FUTURE1 7
|
#define FUTURE1 7
|
||||||
#define FUTURE2 8
|
#define FUTURE2 8
|
||||||
#define FUTURE3 9
|
#define FUTURE3 9
|
||||||
#define FUTURE4 10
|
#define FUTURE4 10
|
||||||
#define USELAST 127
|
#define USELAST 127
|
||||||
#define SHORTCUT 128
|
#define SHORTCUT 128
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GDISK_H
|
#ifndef _GDISK_H
|
||||||
#define _GDISK_H
|
#define _GDISK_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
#ifndef _GSTRUCT_H
|
||||||
|
@ -29,7 +29,7 @@ char OpenDisk(void);
|
||||||
char __fastcall__ FindBAMBit(struct tr_se *myTrSe);
|
char __fastcall__ FindBAMBit(struct tr_se *myTrSe);
|
||||||
char __fastcall__ BlkAlloc(struct tr_se output[], unsigned length);
|
char __fastcall__ BlkAlloc(struct tr_se output[], unsigned length);
|
||||||
char __fastcall__ NxtBlkAlloc(struct tr_se *startTrSe,
|
char __fastcall__ NxtBlkAlloc(struct tr_se *startTrSe,
|
||||||
struct tr_se output[], unsigned length);
|
struct tr_se output[], unsigned length);
|
||||||
char __fastcall__ FreeBlock(struct tr_se *myTrSe);
|
char __fastcall__ FreeBlock(struct tr_se *myTrSe);
|
||||||
struct tr_se __fastcall__ SetNextFree(struct tr_se *myTrSe);
|
struct tr_se __fastcall__ SetNextFree(struct tr_se *myTrSe);
|
||||||
// above needs (unsigned) casts on both sides of '='
|
// above needs (unsigned) casts on both sides of '='
|
||||||
|
@ -44,38 +44,38 @@ void PurgeTurbo(void);
|
||||||
|
|
||||||
char __fastcall__ ChangeDiskDevice(char newdev);
|
char __fastcall__ ChangeDiskDevice(char newdev);
|
||||||
|
|
||||||
/* disk header offsets i.e. index curDirHead with these */
|
/* disk header offsets i.e. index curDirHead with these */
|
||||||
#define OFF_TO_BAM 4
|
#define OFF_TO_BAM 4
|
||||||
#define OFF_DISK_NAME 144
|
#define OFF_DISK_NAME 144
|
||||||
#define OFF_GS_DTYPE 189
|
#define OFF_GS_DTYPE 189
|
||||||
#define OFF_OP_TR_SC 171
|
#define OFF_OP_TR_SC 171
|
||||||
#define OFF_GS_ID 173
|
#define OFF_GS_ID 173
|
||||||
/* disk errors reported in _oserror */
|
/* disk errors reported in _oserror */
|
||||||
#define ANY_FAULT 0xf0
|
#define ANY_FAULT 0xf0
|
||||||
#define G_EOF 0
|
#define G_EOF 0
|
||||||
#define NO_BLOCKS 1
|
#define NO_BLOCKS 1
|
||||||
#define INV_TRACK 2
|
#define INV_TRACK 2
|
||||||
#define INSUFF_SPACE 3
|
#define INSUFF_SPACE 3
|
||||||
#define FULL_DIRECTORY 4
|
#define FULL_DIRECTORY 4
|
||||||
#define FILE_NOT_FOUND 5
|
#define FILE_NOT_FOUND 5
|
||||||
#define BAD_BAM 6
|
#define BAD_BAM 6
|
||||||
#define UNOPENED_VLIR 7
|
#define UNOPENED_VLIR 7
|
||||||
#define INV_RECORD 8
|
#define INV_RECORD 8
|
||||||
#define OUT_OF_RECORDS 9
|
#define OUT_OF_RECORDS 9
|
||||||
#define STRUCT_MISMAT 10
|
#define STRUCT_MISMAT 10
|
||||||
#define BFR_OVERFLOW 11
|
#define BFR_OVERFLOW 11
|
||||||
#define CANCEL_ERR 12
|
#define CANCEL_ERR 12
|
||||||
#define DEV_NOT_FOUND 13
|
#define DEV_NOT_FOUND 13
|
||||||
#define INCOMPATIBLE 14
|
#define INCOMPATIBLE 14
|
||||||
#define HDR_NOT_THERE 0x20
|
#define HDR_NOT_THERE 0x20
|
||||||
#define NO_SYNC 0x21
|
#define NO_SYNC 0x21
|
||||||
#define DBLK_NOT_THERE 0x22
|
#define DBLK_NOT_THERE 0x22
|
||||||
#define DAT_CHKSUM_ERR 0x23
|
#define DAT_CHKSUM_ERR 0x23
|
||||||
#define WR_VER_ERR 0x25
|
#define WR_VER_ERR 0x25
|
||||||
#define WR_PR_ON 0x26
|
#define WR_PR_ON 0x26
|
||||||
#define HDR_CHKSUM_ERR 0x27
|
#define HDR_CHKSUM_ERR 0x27
|
||||||
#define DSK_ID_MISMAT 0x29
|
#define DSK_ID_MISMAT 0x29
|
||||||
#define BYTE_DEC_ERR 0x2e
|
#define BYTE_DEC_ERR 0x2e
|
||||||
#define DOS_MISMATCH 0x73
|
#define DOS_MISMATCH 0x73
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,22 +4,22 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GDLGBOX_H
|
#ifndef _GDLGBOX_H
|
||||||
#define _GDLGBOX_H
|
#define _GDLGBOX_H
|
||||||
|
|
||||||
char __fastcall__ DoDlgBox(const char *dboxstring);
|
char __fastcall__ DoDlgBox(const char *dboxstring);
|
||||||
char RstrFrmDialogue(void);
|
char RstrFrmDialogue(void);
|
||||||
|
|
||||||
/* These are custom, predefined dialog boxes, I'm sure you'll find them usable
|
/* These are custom, predefined dialog boxes, I'm sure you'll find them usable
|
||||||
Most of them show 2 lines of text */
|
Most of them show 2 lines of text */
|
||||||
|
|
||||||
char __fastcall__ DlgBoxYesNo(const char *line1, const char *line2);
|
char __fastcall__ DlgBoxYesNo(const char *line1, const char *line2);
|
||||||
char __fastcall__ DlgBoxOkCancel(const char *line1, const char *line2);
|
char __fastcall__ DlgBoxOkCancel(const char *line1, const char *line2);
|
||||||
void __fastcall__ DlgBoxOk(const char *line1, const char *line2);
|
void __fastcall__ DlgBoxOk(const char *line1, const char *line2);
|
||||||
char __fastcall__ DlgBoxGetString(char *myString, char strLength,
|
char __fastcall__ DlgBoxGetString(char *myString, char strLength,
|
||||||
const char *line1, const char *line2);
|
const char *line1, const char *line2);
|
||||||
char __fastcall__ DlgBoxFileSelect(const char *classtxt, char ftype,
|
char __fastcall__ DlgBoxFileSelect(const char *classtxt, char ftype,
|
||||||
char *fname);
|
char *fname);
|
||||||
|
|
||||||
/* This is a more general dialog box, works like printf in a window */
|
/* This is a more general dialog box, works like printf in a window */
|
||||||
char MessageBox(char mode, const char *format, ...);
|
char MessageBox(char mode, const char *format, ...);
|
||||||
|
@ -40,8 +40,8 @@ typedef void dlgBoxStr;
|
||||||
|
|
||||||
#define DB_DEFPOS(pattern) (char)(DEF_DB_POS | (pattern))
|
#define DB_DEFPOS(pattern) (char)(DEF_DB_POS | (pattern))
|
||||||
#define DB_SETPOS(pattern,top,bot,left,right) \
|
#define DB_SETPOS(pattern,top,bot,left,right) \
|
||||||
(char)(SET_DB_POS | (pattern)), (char)(top), (char)(bot), \
|
(char)(SET_DB_POS | (pattern)), (char)(top), (char)(bot), \
|
||||||
(unsigned)(left), (unsigned)(right)
|
(unsigned)(left), (unsigned)(right)
|
||||||
#define DB_ICON(i,x,y) (char)(i), (char)(x), (char)(y)
|
#define DB_ICON(i,x,y) (char)(i), (char)(x), (char)(y)
|
||||||
#define DB_TXTSTR(x,y,text) (char)DBTXTSTR, (char)(x), (char)(y), (text)
|
#define DB_TXTSTR(x,y,text) (char)DBTXTSTR, (char)(x), (char)(y), (text)
|
||||||
#define DB_VARSTR(x,y,ptr) (char)DBVARSTR, (char)(x), (char)(y), (char)(ptr)
|
#define DB_VARSTR(x,y,ptr) (char)DBVARSTR, (char)(x), (char)(y), (char)(ptr)
|
||||||
|
@ -59,52 +59,52 @@ typedef void dlgBoxStr;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* icons for DB_ICON */
|
/* icons for DB_ICON */
|
||||||
#define OK 1
|
#define OK 1
|
||||||
#define CANCEL 2
|
#define CANCEL 2
|
||||||
#define YES 3
|
#define YES 3
|
||||||
#define NO 4
|
#define NO 4
|
||||||
#define OPEN 5
|
#define OPEN 5
|
||||||
#define DISK 6
|
#define DISK 6
|
||||||
/* commands - internally used by command macros */
|
/* commands - internally used by command macros */
|
||||||
#define DBTXTSTR 11
|
#define DBTXTSTR 11
|
||||||
#define DBVARSTR 12
|
#define DBVARSTR 12
|
||||||
#define DBGETSTRING 13
|
#define DBGETSTRING 13
|
||||||
#define DBSYSOPV 14
|
#define DBSYSOPV 14
|
||||||
#define DBGRPHSTR 15
|
#define DBGRPHSTR 15
|
||||||
#define DBGETFILES 16
|
#define DBGETFILES 16
|
||||||
#define DBOPVEC 17
|
#define DBOPVEC 17
|
||||||
#define DBUSRICON 18
|
#define DBUSRICON 18
|
||||||
#define DB_USR_ROUT 19
|
#define DB_USR_ROUT 19
|
||||||
/* icons tabulation in standard window */
|
/* icons tabulation in standard window */
|
||||||
#define DBI_X_0 1
|
#define DBI_X_0 1
|
||||||
#define DBI_X_1 9
|
#define DBI_X_1 9
|
||||||
#define DBI_X_2 17
|
#define DBI_X_2 17
|
||||||
#define DBI_Y_0 8
|
#define DBI_Y_0 8
|
||||||
#define DBI_Y_1 40
|
#define DBI_Y_1 40
|
||||||
#define DBI_Y_2 72
|
#define DBI_Y_2 72
|
||||||
/* standard window size defaults */
|
/* standard window size defaults */
|
||||||
#define SET_DB_POS 0
|
#define SET_DB_POS 0
|
||||||
#define DEF_DB_POS 0x80
|
#define DEF_DB_POS 0x80
|
||||||
#define DEF_DB_TOP 32
|
#define DEF_DB_TOP 32
|
||||||
#define DEF_DB_BOT 127
|
#define DEF_DB_BOT 127
|
||||||
#define DEF_DB_LEFT 64
|
#define DEF_DB_LEFT 64
|
||||||
#define DEF_DB_RIGHT 255
|
#define DEF_DB_RIGHT 255
|
||||||
/* text tabulation in standard window */
|
/* text tabulation in standard window */
|
||||||
#define TXT_LN_1_Y 16
|
#define TXT_LN_1_Y 16
|
||||||
#define TXT_LN_2_Y 32
|
#define TXT_LN_2_Y 32
|
||||||
#define TXT_LN_3_Y 48
|
#define TXT_LN_3_Y 48
|
||||||
#define TXT_LN_4_Y 64
|
#define TXT_LN_4_Y 64
|
||||||
#define TXT_LN_5_Y 80
|
#define TXT_LN_5_Y 80
|
||||||
#define TXT_LN_X 16
|
#define TXT_LN_X 16
|
||||||
/* system icons size */
|
/* system icons size */
|
||||||
#define SYSDBI_HEIGHT 16
|
#define SYSDBI_HEIGHT 16
|
||||||
#define SYSDBI_WIDTH 6
|
#define SYSDBI_WIDTH 6
|
||||||
/* dialogbox string offsets */
|
/* dialogbox string offsets */
|
||||||
#define OFF_DB_FORM 0
|
#define OFF_DB_FORM 0
|
||||||
#define OFF_DB_TOP 1
|
#define OFF_DB_TOP 1
|
||||||
#define OFF_DB_BOT 2
|
#define OFF_DB_BOT 2
|
||||||
#define OFF_DB_LEFT 3
|
#define OFF_DB_LEFT 3
|
||||||
#define OFF_DB_RIGHT 5
|
#define OFF_DB_RIGHT 5
|
||||||
#define OFF_DB_1STCMD 7
|
#define OFF_DB_1STCMD 7
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GFILE_H
|
#ifndef _GFILE_H
|
||||||
#define _GFILE_H
|
#define _GFILE_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
#ifndef _GSTRUCT_H
|
||||||
|
@ -43,32 +43,32 @@ char __fastcall__ WriteRecord(const char *buffer, unsigned flength);
|
||||||
char UpdateRecordFile(void);
|
char UpdateRecordFile(void);
|
||||||
|
|
||||||
/* GEOS filetypes */
|
/* GEOS filetypes */
|
||||||
#define NOT_GEOS 0
|
#define NOT_GEOS 0
|
||||||
#define BASIC 1
|
#define BASIC 1
|
||||||
#define ASSEMBLY 2
|
#define ASSEMBLY 2
|
||||||
#define DATA 3
|
#define DATA 3
|
||||||
#define SYSTEM 4
|
#define SYSTEM 4
|
||||||
#define DESK_ACC 5
|
#define DESK_ACC 5
|
||||||
#define APPLICATION 6
|
#define APPLICATION 6
|
||||||
#define APPL_DATA 7
|
#define APPL_DATA 7
|
||||||
#define FONT 8
|
#define FONT 8
|
||||||
#define PRINTER 9
|
#define PRINTER 9
|
||||||
#define INPUT_DEVICE 10
|
#define INPUT_DEVICE 10
|
||||||
#define DISK_DEVICE 11
|
#define DISK_DEVICE 11
|
||||||
#define SYSTEM_BOOT 12
|
#define SYSTEM_BOOT 12
|
||||||
#define TEMPORARY 13
|
#define TEMPORARY 13
|
||||||
#define AUTO_EXEC 14
|
#define AUTO_EXEC 14
|
||||||
#define INPUT_128 15
|
#define INPUT_128 15
|
||||||
#define NUMFILETYPES 16
|
#define NUMFILETYPES 16
|
||||||
/* supported structures */
|
/* supported structures */
|
||||||
#define SEQUENTIAL 0
|
#define SEQUENTIAL 0
|
||||||
#define VLIR 1
|
#define VLIR 1
|
||||||
/* DOS filetypes */
|
/* DOS filetypes */
|
||||||
#define DEL 0
|
#define DEL 0
|
||||||
#define SEQ 1
|
#define SEQ 1
|
||||||
#define PRG 2
|
#define PRG 2
|
||||||
#define USR 3
|
#define USR 3
|
||||||
#define REL 4
|
#define REL 4
|
||||||
#define CBM 5
|
#define CBM 5
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GGRAPH_H
|
#ifndef _GGRAPH_H
|
||||||
#define _GGRAPH_H
|
#define _GGRAPH_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
#ifndef _GSTRUCT_H
|
||||||
|
@ -40,125 +40,125 @@ void UseSystemFont(void);
|
||||||
|
|
||||||
void __fastcall__ BitmapUp(struct iconpic *myIcon);
|
void __fastcall__ BitmapUp(struct iconpic *myIcon);
|
||||||
void __fastcall__ BitmapClip(char skipl, char skipr, unsigned skiptop,
|
void __fastcall__ BitmapClip(char skipl, char skipr, unsigned skiptop,
|
||||||
struct iconpic *myIcon);
|
struct iconpic *myIcon);
|
||||||
void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
|
void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
|
||||||
char skipr, unsigned skiptop,
|
char skipr, unsigned skiptop,
|
||||||
struct iconpic *myIcon);
|
struct iconpic *myIcon);
|
||||||
|
|
||||||
void __fastcall__ GraphicsString(char *myGfxString);
|
void __fastcall__ GraphicsString(char *myGfxString);
|
||||||
|
|
||||||
/* VIC colour constants */
|
/* VIC colour constants */
|
||||||
#define BLACK 0
|
#define BLACK 0
|
||||||
#define WHITE 1
|
#define WHITE 1
|
||||||
#define RED 2
|
#define RED 2
|
||||||
#define CYAN 3
|
#define CYAN 3
|
||||||
#define PURPLE 4
|
#define PURPLE 4
|
||||||
#define GREEN 5
|
#define GREEN 5
|
||||||
#define BLUE 6
|
#define BLUE 6
|
||||||
#define YELLOW 7
|
#define YELLOW 7
|
||||||
#define ORANGE 8
|
#define ORANGE 8
|
||||||
#define BROWN 9
|
#define BROWN 9
|
||||||
#define LTRED 10
|
#define LTRED 10
|
||||||
#define DKGREY 11
|
#define DKGREY 11
|
||||||
#define GREY 12
|
#define GREY 12
|
||||||
#define MEDGREY 12
|
#define MEDGREY 12
|
||||||
#define LTGREEN 13
|
#define LTGREEN 13
|
||||||
#define LTBLUE 14
|
#define LTBLUE 14
|
||||||
#define LTGREY 15
|
#define LTGREY 15
|
||||||
/* VIC memory banks - lowest 2 bits of cia2base+0 */
|
/* VIC memory banks - lowest 2 bits of cia2base+0 */
|
||||||
#define GRBANK0 3
|
#define GRBANK0 3
|
||||||
#define GRBANK1 2
|
#define GRBANK1 2
|
||||||
#define GRBANK2 1
|
#define GRBANK2 1
|
||||||
#define GRBANK3 0
|
#define GRBANK3 0
|
||||||
/* VIC screen sizes */
|
/* VIC screen sizes */
|
||||||
#define VIC_X_POS_OFF 24
|
#define VIC_X_POS_OFF 24
|
||||||
#define VIC_Y_POS_OFF 50
|
#define VIC_Y_POS_OFF 50
|
||||||
#ifdef __GEOS_CBM__
|
#ifdef __GEOS_CBM__
|
||||||
#define SC_BYTE_WIDTH 40
|
#define SC_BYTE_WIDTH 40
|
||||||
#define SC_PIX_HEIGHT 200
|
#define SC_PIX_HEIGHT 200
|
||||||
#define SC_PIX_WIDTH 320
|
#define SC_PIX_WIDTH 320
|
||||||
#define SC_SIZE 8000
|
#define SC_SIZE 8000
|
||||||
#else
|
#else
|
||||||
#define SC_BYTE_WIDTH 70
|
#define SC_BYTE_WIDTH 70
|
||||||
#define SC_PIX_HEIGHT 192
|
#define SC_PIX_HEIGHT 192
|
||||||
#define SC_PIX_WIDTH 560
|
#define SC_PIX_WIDTH 560
|
||||||
#define SC_SIZE 13440
|
#define SC_SIZE 13440
|
||||||
#endif
|
#endif
|
||||||
/* VDC screen constants */
|
/* VDC screen constants */
|
||||||
#define SCREENBYTEWIDTH 80
|
#define SCREENBYTEWIDTH 80
|
||||||
#define SCREENPIXELWIDTH 640
|
#define SCREENPIXELWIDTH 640
|
||||||
/* control characters for use as numbers, not characters */
|
/* control characters for use as numbers, not characters */
|
||||||
#define BACKSPACE 8
|
#define BACKSPACE 8
|
||||||
#define FORWARDSPACE 9
|
#define FORWARDSPACE 9
|
||||||
#define TAB 9
|
#define TAB 9
|
||||||
#define LF 10
|
#define LF 10
|
||||||
#define HOME 11
|
#define HOME 11
|
||||||
#define PAGE_BREAK 12
|
#define PAGE_BREAK 12
|
||||||
#define UPLINE 12
|
#define UPLINE 12
|
||||||
#define CR 13
|
#define CR 13
|
||||||
#define ULINEON 14
|
#define ULINEON 14
|
||||||
#define ULINEOFF 15
|
#define ULINEOFF 15
|
||||||
#define ESC_GRAPHICS 16
|
#define ESC_GRAPHICS 16
|
||||||
#define ESC_RULER 17
|
#define ESC_RULER 17
|
||||||
#define REV_ON 18
|
#define REV_ON 18
|
||||||
#define REV_OFF 19
|
#define REV_OFF 19
|
||||||
#define GOTOX 20
|
#define GOTOX 20
|
||||||
#define GOTOY 21
|
#define GOTOY 21
|
||||||
#define GOTOXY 22
|
#define GOTOXY 22
|
||||||
#define NEWCARDSET 23
|
#define NEWCARDSET 23
|
||||||
#define BOLDON 24
|
#define BOLDON 24
|
||||||
#define ITALICON 25
|
#define ITALICON 25
|
||||||
#define OUTLINEON 26
|
#define OUTLINEON 26
|
||||||
#define PLAINTEXT 27
|
#define PLAINTEXT 27
|
||||||
/* control characters for use in
|
/* control characters for use in
|
||||||
strings: eg: str[10]=CBOLDON "Hello"; */
|
strings: eg: str[10]=CBOLDON "Hello"; */
|
||||||
#define CCR "\015"
|
#define CCR "\015"
|
||||||
#define CULINEON "\016"
|
#define CULINEON "\016"
|
||||||
#define CULINEOFF "\017"
|
#define CULINEOFF "\017"
|
||||||
#define CREV_ON "\022"
|
#define CREV_ON "\022"
|
||||||
#define CREV_OFF "\023"
|
#define CREV_OFF "\023"
|
||||||
#define CBOLDON "\030"
|
#define CBOLDON "\030"
|
||||||
#define CITALICON "\031"
|
#define CITALICON "\031"
|
||||||
#define COUTLINEON "\032"
|
#define COUTLINEON "\032"
|
||||||
#define CPLAINTEXT "\033"
|
#define CPLAINTEXT "\033"
|
||||||
|
|
||||||
/*values of currentMode */
|
/*values of currentMode */
|
||||||
/* bitNumbers */
|
/* bitNumbers */
|
||||||
#define UNDERLINE_BIT 7
|
#define UNDERLINE_BIT 7
|
||||||
#define BOLD_BIT 6
|
#define BOLD_BIT 6
|
||||||
#define REVERSE_BIT 5
|
#define REVERSE_BIT 5
|
||||||
#define ITALIC_BIT 4
|
#define ITALIC_BIT 4
|
||||||
#define OUTLINE_BIT 3
|
#define OUTLINE_BIT 3
|
||||||
#define SUPERSCRIPT_BIT 2
|
#define SUPERSCRIPT_BIT 2
|
||||||
#define SUBSCRIPT_BIT 1
|
#define SUBSCRIPT_BIT 1
|
||||||
/* bitMasks */
|
/* bitMasks */
|
||||||
#define SET_UNDERLINE 0x80
|
#define SET_UNDERLINE 0x80
|
||||||
#define SET_BOLD 0x40
|
#define SET_BOLD 0x40
|
||||||
#define SET_REVERSE 0x20
|
#define SET_REVERSE 0x20
|
||||||
#define SET_ITALIC 0x10
|
#define SET_ITALIC 0x10
|
||||||
#define SET_OUTLINE 0x08
|
#define SET_OUTLINE 0x08
|
||||||
#define SET_SUPERSCRIPT 0x04
|
#define SET_SUPERSCRIPT 0x04
|
||||||
#define SET_SUBSCRIPT 0x02
|
#define SET_SUBSCRIPT 0x02
|
||||||
#define SET_PLAINTEXT 0
|
#define SET_PLAINTEXT 0
|
||||||
/* values of dispBufferOn */
|
/* values of dispBufferOn */
|
||||||
#define ST_WRGS_FORE 0x20
|
#define ST_WRGS_FORE 0x20
|
||||||
#define ST_WR_BACK 0x40
|
#define ST_WR_BACK 0x40
|
||||||
#define ST_WR_FORE 0x80
|
#define ST_WR_FORE 0x80
|
||||||
/* PutDecimal parameters */
|
/* PutDecimal parameters */
|
||||||
/* leading zeros? */
|
/* leading zeros? */
|
||||||
#define SET_NOSURPRESS 0
|
#define SET_NOSURPRESS 0
|
||||||
#define SET_SURPRESS 0x40
|
#define SET_SURPRESS 0x40
|
||||||
/* justification */
|
/* justification */
|
||||||
#define SET_RIGHTJUST 0
|
#define SET_RIGHTJUST 0
|
||||||
#define SET_LEFTJUST 0x80
|
#define SET_LEFTJUST 0x80
|
||||||
/* C128 x-extension flags */
|
/* C128 x-extension flags */
|
||||||
#define ADD1_W 0x2000
|
#define ADD1_W 0x2000
|
||||||
#define DOUBLE_B 0x80
|
#define DOUBLE_B 0x80
|
||||||
#define DOUBLE_W 0x8000
|
#define DOUBLE_W 0x8000
|
||||||
/* DrawLine/DrawPoint mode values */
|
/* DrawLine/DrawPoint mode values */
|
||||||
#define DRAW_ERASE 0x00
|
#define DRAW_ERASE 0x00
|
||||||
#define DRAW_DRAW 0x40
|
#define DRAW_DRAW 0x40
|
||||||
#define DRAW_COPY 0x80
|
#define DRAW_COPY 0x80
|
||||||
|
|
||||||
typedef void graphicStr;
|
typedef void graphicStr;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GMEMORY_H
|
#ifndef _GMEMORY_H
|
||||||
#define _GMEMORY_H
|
#define _GMEMORY_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
#ifndef _GSTRUCT_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GMENU_H
|
#ifndef _GMENU_H
|
||||||
#define _GMENU_H
|
#define _GMENU_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
#ifndef _GSTRUCT_H
|
||||||
|
@ -21,35 +21,35 @@ void GotoFirstMenu(void);
|
||||||
void __fastcall__ DoIcons(struct icontab *myIconTab);
|
void __fastcall__ DoIcons(struct icontab *myIconTab);
|
||||||
|
|
||||||
/* DoMenu - menutypes */
|
/* DoMenu - menutypes */
|
||||||
#define MENU_ACTION 0x00
|
#define MENU_ACTION 0x00
|
||||||
#define DYN_SUB_MENU 0x40
|
#define DYN_SUB_MENU 0x40
|
||||||
#define SUB_MENU 0x80
|
#define SUB_MENU 0x80
|
||||||
#define HORIZONTAL 0x00
|
#define HORIZONTAL 0x00
|
||||||
#define VERTICAL 0x80
|
#define VERTICAL 0x80
|
||||||
/* menu string offsets */
|
/* menu string offsets */
|
||||||
#define OFF_MY_TOP 0
|
#define OFF_MY_TOP 0
|
||||||
#define OFF_MY_BOT 1
|
#define OFF_MY_BOT 1
|
||||||
#define OFF_MX_LEFT 2
|
#define OFF_MX_LEFT 2
|
||||||
#define OFF_MX_RIGHT 4
|
#define OFF_MX_RIGHT 4
|
||||||
#define OFF_NUM_M_ITEMS 6
|
#define OFF_NUM_M_ITEMS 6
|
||||||
#define OFF_1ST_M_ITEM 7
|
#define OFF_1ST_M_ITEM 7
|
||||||
/* icon string offsets */
|
/* icon string offsets */
|
||||||
#define OFF_NM_ICNS 0
|
#define OFF_NM_ICNS 0
|
||||||
#define OFF_IC_XMOUSE 1
|
#define OFF_IC_XMOUSE 1
|
||||||
#define OFF_IC_YMOUSE 3
|
#define OFF_IC_YMOUSE 3
|
||||||
#define OFF_PIC_ICON 0
|
#define OFF_PIC_ICON 0
|
||||||
#define OFF_X_ICON_POS 2
|
#define OFF_X_ICON_POS 2
|
||||||
#define OFF_Y_ICON_POS 3
|
#define OFF_Y_ICON_POS 3
|
||||||
#define OFF_WDTH_ICON 4
|
#define OFF_WDTH_ICON 4
|
||||||
#define OFF_HEIGHT_ICON 5
|
#define OFF_HEIGHT_ICON 5
|
||||||
#define OFF_SRV_RT_ICON 6
|
#define OFF_SRV_RT_ICON 6
|
||||||
#define OFF_NX_ICON 8
|
#define OFF_NX_ICON 8
|
||||||
/* icons, menus status flags */
|
/* icons, menus status flags */
|
||||||
#define ST_FLASH 0x80
|
#define ST_FLASH 0x80
|
||||||
#define ST_INVERT 0x40
|
#define ST_INVERT 0x40
|
||||||
#define ST_LD_AT_ADDR 0x01
|
#define ST_LD_AT_ADDR 0x01
|
||||||
#define ST_LD_DATA 0x80
|
#define ST_LD_DATA 0x80
|
||||||
#define ST_PR_DATA 0x40
|
#define ST_PR_DATA 0x40
|
||||||
#define ST_WR_PR 0x40
|
#define ST_WR_PR 0x40
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GPROCESS_H
|
#ifndef _GPROCESS_H
|
||||||
#define _GPROCESS_H
|
#define _GPROCESS_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
#ifndef _GSTRUCT_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GSPRITE_H
|
#ifndef _GSPRITE_H
|
||||||
#define _GSPRITE_H
|
#define _GSPRITE_H
|
||||||
|
|
||||||
void StartMouseMode(void);
|
void StartMouseMode(void);
|
||||||
|
@ -24,73 +24,73 @@ void PromptOff(void);
|
||||||
char GetNextChar(void);
|
char GetNextChar(void);
|
||||||
|
|
||||||
/* keyboard constants */
|
/* keyboard constants */
|
||||||
#define KEY_F1 1
|
#define KEY_F1 1
|
||||||
#define KEY_F2 2
|
#define KEY_F2 2
|
||||||
#define KEY_F3 3
|
#define KEY_F3 3
|
||||||
#define KEY_F4 4
|
#define KEY_F4 4
|
||||||
#define KEY_F5 5
|
#define KEY_F5 5
|
||||||
#define KEY_F6 6
|
#define KEY_F6 6
|
||||||
#define KEY_NOSCRL 7
|
#define KEY_NOSCRL 7
|
||||||
#define KEY_ENTER 13
|
#define KEY_ENTER 13
|
||||||
#define KEY_F7 14
|
#define KEY_F7 14
|
||||||
#define KEY_F8 15
|
#define KEY_F8 15
|
||||||
#define KEY_HOME 18
|
#define KEY_HOME 18
|
||||||
#define KEY_CLEAR 19
|
#define KEY_CLEAR 19
|
||||||
#define KEY_LARROW 20
|
#define KEY_LARROW 20
|
||||||
#define KEY_UPARROW 21
|
#define KEY_UPARROW 21
|
||||||
#define KEY_STOP 22
|
#define KEY_STOP 22
|
||||||
#define KEY_RUN 23
|
#define KEY_RUN 23
|
||||||
#define KEY_BPS 24
|
#define KEY_BPS 24
|
||||||
#define KEY_HELP 25
|
#define KEY_HELP 25
|
||||||
#define KEY_ALT 26
|
#define KEY_ALT 26
|
||||||
#define KEY_ESC 27
|
#define KEY_ESC 27
|
||||||
#define KEY_INSERT 28
|
#define KEY_INSERT 28
|
||||||
#define KEY_INVALID 31
|
#define KEY_INVALID 31
|
||||||
#define KEY_LEFT BACKSPACE
|
#define KEY_LEFT BACKSPACE
|
||||||
#ifdef __GEOS_CBM__
|
#ifdef __GEOS_CBM__
|
||||||
#define KEY_UP 16
|
#define KEY_UP 16
|
||||||
#define KEY_DOWN 17
|
#define KEY_DOWN 17
|
||||||
#define KEY_DELETE 29
|
#define KEY_DELETE 29
|
||||||
#define KEY_RIGHT 30
|
#define KEY_RIGHT 30
|
||||||
#else
|
#else
|
||||||
#define KEY_UP 11
|
#define KEY_UP 11
|
||||||
#define KEY_DOWN 10
|
#define KEY_DOWN 10
|
||||||
#define KEY_DELETE 127
|
#define KEY_DELETE 127
|
||||||
#define KEY_RIGHT 21
|
#define KEY_RIGHT 21
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* values of faultData - pointer position vs. mouseWindow */
|
/* values of faultData - pointer position vs. mouseWindow */
|
||||||
/* bit numbers */
|
/* bit numbers */
|
||||||
#define OFFTOP_BIT 7
|
#define OFFTOP_BIT 7
|
||||||
#define OFFBOTTOM_BIT 6
|
#define OFFBOTTOM_BIT 6
|
||||||
#define OFFLEFT_BIT 5
|
#define OFFLEFT_BIT 5
|
||||||
#define OFFRIGHT_BIT 4
|
#define OFFRIGHT_BIT 4
|
||||||
#define OFFMENU_BIT 3
|
#define OFFMENU_BIT 3
|
||||||
/* bit masks */
|
/* bit masks */
|
||||||
#define SET_OFFTOP 0x80
|
#define SET_OFFTOP 0x80
|
||||||
#define SET_OFFBOTTOM 0x40
|
#define SET_OFFBOTTOM 0x40
|
||||||
#define SET_OFFLEFT 0x20
|
#define SET_OFFLEFT 0x20
|
||||||
#define SET_OFFRIGHT 0x10
|
#define SET_OFFRIGHT 0x10
|
||||||
#define SET_OFFMENU 0x08
|
#define SET_OFFMENU 0x08
|
||||||
|
|
||||||
/* mouseOn */
|
/* mouseOn */
|
||||||
/* bit numbers */
|
/* bit numbers */
|
||||||
#define MOUSEON_BIT 7
|
#define MOUSEON_BIT 7
|
||||||
#define MENUON_BIT 6
|
#define MENUON_BIT 6
|
||||||
#define ICONSON_BIT 5
|
#define ICONSON_BIT 5
|
||||||
/* bit masks */
|
/* bit masks */
|
||||||
#define SET_MSE_ON 0x80
|
#define SET_MSE_ON 0x80
|
||||||
#define SET_MENUON 0x40
|
#define SET_MENUON 0x40
|
||||||
#define SET_ICONSON 0x20
|
#define SET_ICONSON 0x20
|
||||||
|
|
||||||
/* pressFlag */
|
/* pressFlag */
|
||||||
/* bit numbers */
|
/* bit numbers */
|
||||||
#define KEYPRESS_BIT 7
|
#define KEYPRESS_BIT 7
|
||||||
#define INPUT_BIT 6
|
#define INPUT_BIT 6
|
||||||
#define MOUSE_BIT 5
|
#define MOUSE_BIT 5
|
||||||
/* bit masks */
|
/* bit masks */
|
||||||
#define SET_KEYPRESS 0x80
|
#define SET_KEYPRESS 0x80
|
||||||
#define SET_INPUTCHG 0x40
|
#define SET_INPUTCHG 0x40
|
||||||
#define SET_MOUSE 0x20
|
#define SET_MOUSE 0x20
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,157 +18,157 @@
|
||||||
|
|
||||||
typedef void (*void_func) (void);
|
typedef void (*void_func) (void);
|
||||||
|
|
||||||
struct s_date { /* system date & time */
|
struct s_date { /* system date & time */
|
||||||
char s_year;
|
char s_year;
|
||||||
char s_month;
|
char s_month;
|
||||||
char s_day;
|
char s_day;
|
||||||
char s_hour;
|
char s_hour;
|
||||||
char s_minutes;
|
char s_minutes;
|
||||||
char s_seconds;
|
char s_seconds;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tr_se { /* track and sector */
|
struct tr_se { /* track and sector */
|
||||||
char track;
|
char track;
|
||||||
char sector;
|
char sector;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct fileheader { /* header block (like fileHeader) */
|
struct fileheader { /* header block (like fileHeader) */
|
||||||
struct tr_se n_block;
|
struct tr_se n_block;
|
||||||
char icon_desc[3];
|
char icon_desc[3];
|
||||||
char icon_pic[63];
|
char icon_pic[63];
|
||||||
char dostype;
|
char dostype;
|
||||||
char type;
|
char type;
|
||||||
char structure;
|
char structure;
|
||||||
unsigned load_address;
|
unsigned load_address;
|
||||||
unsigned end_address;
|
unsigned end_address;
|
||||||
unsigned exec_address;
|
unsigned exec_address;
|
||||||
char class_name[19];
|
char class_name[19];
|
||||||
char column_flag;
|
char column_flag;
|
||||||
char author[63];
|
char author[63];
|
||||||
char note[96];
|
char note[96];
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __GEOS_CBM__
|
#ifdef __GEOS_CBM__
|
||||||
|
|
||||||
struct f_date { /* date in filedesctiptor */
|
struct f_date { /* date in filedesctiptor */
|
||||||
char f_year;
|
char f_year;
|
||||||
char f_month;
|
char f_month;
|
||||||
char f_day;
|
char f_day;
|
||||||
char f_hour;
|
char f_hour;
|
||||||
char f_minute;
|
char f_minute;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct filehandle { /* filehandle in directory sectors */
|
struct filehandle { /* filehandle in directory sectors */
|
||||||
char dostype; /* or in dirEntryBuf */
|
char dostype; /* or in dirEntryBuf */
|
||||||
struct tr_se n_block;
|
struct tr_se n_block;
|
||||||
char name[16];
|
char name[16];
|
||||||
struct tr_se header;
|
struct tr_se header;
|
||||||
char structure;
|
char structure;
|
||||||
char type;
|
char type;
|
||||||
struct f_date date;
|
struct f_date date;
|
||||||
unsigned size;
|
unsigned size;
|
||||||
};
|
};
|
||||||
|
|
||||||
#else /* #ifdef __GEOS_CBM__ */
|
#else /* #ifdef __GEOS_CBM__ */
|
||||||
|
|
||||||
struct f_date { /* date in filedesctiptor */
|
struct f_date { /* date in filedesctiptor */
|
||||||
unsigned f_day:5;
|
unsigned f_day:5;
|
||||||
unsigned f_month:4;
|
unsigned f_month:4;
|
||||||
unsigned f_year:7;
|
unsigned f_year:7;
|
||||||
char f_minute;
|
char f_minute;
|
||||||
char f_hour;
|
char f_hour;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct filehandle { /* filehandle in directory sectors */
|
struct filehandle { /* filehandle in directory sectors */
|
||||||
unsigned name_len:4; /* or in dirEntryBuf */
|
unsigned name_len:4; /* or in dirEntryBuf */
|
||||||
unsigned structure:4;
|
unsigned structure:4;
|
||||||
char name[15];
|
char name[15];
|
||||||
char type;
|
char type;
|
||||||
struct tr_se n_block;
|
struct tr_se n_block;
|
||||||
unsigned size;
|
unsigned size;
|
||||||
char byte_size[3];
|
char byte_size[3];
|
||||||
struct f_date date;
|
struct f_date date;
|
||||||
char version;
|
char version;
|
||||||
char min_version;
|
char min_version;
|
||||||
char access;
|
char access;
|
||||||
struct tr_se header;
|
struct tr_se header;
|
||||||
struct f_date mod_date;
|
struct f_date mod_date;
|
||||||
struct tr_se dir_head;
|
struct tr_se dir_head;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* #ifdef __GEOS_CBM__ */
|
#endif /* #ifdef __GEOS_CBM__ */
|
||||||
|
|
||||||
struct pixel { /* describes point */
|
struct pixel { /* describes point */
|
||||||
unsigned x;
|
unsigned x;
|
||||||
char y;
|
char y;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct fontdesc { /* describes font */
|
struct fontdesc { /* describes font */
|
||||||
char baseline;
|
char baseline;
|
||||||
char width;
|
char width;
|
||||||
char height;
|
char height;
|
||||||
char *index_tbl;
|
char *index_tbl;
|
||||||
char *data_ptr;
|
char *data_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct window { /* describes screen region */
|
struct window { /* describes screen region */
|
||||||
char top;
|
char top;
|
||||||
char bot;
|
char bot;
|
||||||
unsigned left;
|
unsigned left;
|
||||||
unsigned right;
|
unsigned right;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VLIR_info { /* VLIR information */
|
struct VLIR_info { /* VLIR information */
|
||||||
char curRecord; /* currently only used in VLIR */
|
char curRecord; /* currently only used in VLIR */
|
||||||
char usedRecords; /* as system info (curRecord is mainly of your interest */
|
char usedRecords; /* as system info (curRecord is mainly of your interest */
|
||||||
char fileWritten;
|
char fileWritten;
|
||||||
unsigned fileSize;
|
unsigned fileSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct process { /* process info, declare table of that type */
|
struct process { /* process info, declare table of that type */
|
||||||
unsigned pointer; /* (like: struct process proctab[2]=... */
|
unsigned pointer; /* (like: struct process proctab[2]=... */
|
||||||
unsigned jiffies; /* last entry HAVE TO BE {0,0} */
|
unsigned jiffies; /* last entry HAVE TO BE {0,0} */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iconpic { /* icon/encoded bitmap description */
|
struct iconpic { /* icon/encoded bitmap description */
|
||||||
char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
|
char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
|
||||||
char x; /* position in cards (*8 pixels) */
|
char x; /* position in cards (*8 pixels) */
|
||||||
char y;
|
char y;
|
||||||
char width; /* in cards */
|
char width; /* in cards */
|
||||||
char heigth; /* in lines (pixels) */
|
char heigth; /* in lines (pixels) */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct icondef { /* icon definition for DoIcons */
|
struct icondef { /* icon definition for DoIcons */
|
||||||
char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
|
char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
|
||||||
char x; /* position in cards (*8 pixels) */
|
char x; /* position in cards (*8 pixels) */
|
||||||
char y;
|
char y;
|
||||||
char width; /* of icon (in cards) */
|
char width; /* of icon (in cards) */
|
||||||
char heigth; /* of icon in lines (pixels) */
|
char heigth; /* of icon in lines (pixels) */
|
||||||
unsigned proc_ptr; /* pointer to function handling that icon */
|
unsigned proc_ptr; /* pointer to function handling that icon */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct icontab {
|
struct icontab {
|
||||||
char number; /* number of declared icons */
|
char number; /* number of declared icons */
|
||||||
struct pixel mousepos; /* position of mouse after DoIcons */
|
struct pixel mousepos; /* position of mouse after DoIcons */
|
||||||
struct icondef tab[]; /* table of size declared by icontab.number */
|
struct icondef tab[]; /* table of size declared by icontab.number */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct menuitem {
|
struct menuitem {
|
||||||
char *name;
|
char *name;
|
||||||
char type;
|
char type;
|
||||||
void *rest; /* may be ptr to function, or ptr to struct menu (submenu) */
|
void *rest; /* may be ptr to function, or ptr to struct menu (submenu) */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct menu {
|
struct menu {
|
||||||
struct window size;
|
struct window size;
|
||||||
char number;
|
char number;
|
||||||
struct menuitem items[];
|
struct menuitem items[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct inittab { /* use struct inittab mytab[n] for initram */
|
struct inittab { /* use struct inittab mytab[n] for initram */
|
||||||
unsigned ptr; /* ptr to 1st byte */
|
unsigned ptr; /* ptr to 1st byte */
|
||||||
char number; /* number of following bytes */
|
char number; /* number of following bytes */
|
||||||
char values[]; /* actual string of bytes */
|
char values[]; /* actual string of bytes */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,331 +11,331 @@
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define r0 (*(unsigned*)(R_BASE + 0x00))
|
#define r0 (*(unsigned*)(R_BASE + 0x00))
|
||||||
#define r0L (*(char*)(R_BASE + 0x00))
|
#define r0L (*(char*)(R_BASE + 0x00))
|
||||||
#define r0H (*(char*)(R_BASE + 0x01))
|
#define r0H (*(char*)(R_BASE + 0x01))
|
||||||
#define r1 (*(unsigned*)(R_BASE + 0x02))
|
#define r1 (*(unsigned*)(R_BASE + 0x02))
|
||||||
#define r1L (*(char*)(R_BASE + 0x02))
|
#define r1L (*(char*)(R_BASE + 0x02))
|
||||||
#define r1H (*(char*)(R_BASE + 0x03))
|
#define r1H (*(char*)(R_BASE + 0x03))
|
||||||
#define drawWindow (*(struct window*)(R_BASE + 0x04))
|
#define drawWindow (*(struct window*)(R_BASE + 0x04))
|
||||||
#define r2 (*(unsigned*)(R_BASE + 0x04))
|
#define r2 (*(unsigned*)(R_BASE + 0x04))
|
||||||
#define r2L (*(char*)(R_BASE + 0x04))
|
#define r2L (*(char*)(R_BASE + 0x04))
|
||||||
#define r2H (*(char*)(R_BASE + 0x05))
|
#define r2H (*(char*)(R_BASE + 0x05))
|
||||||
#define r3 (*(unsigned*)(R_BASE + 0x06))
|
#define r3 (*(unsigned*)(R_BASE + 0x06))
|
||||||
#define r3L (*(char*)(R_BASE + 0x06))
|
#define r3L (*(char*)(R_BASE + 0x06))
|
||||||
#define r3H (*(char*)(R_BASE + 0x07))
|
#define r3H (*(char*)(R_BASE + 0x07))
|
||||||
#define r4 (*(unsigned*)(R_BASE + 0x08))
|
#define r4 (*(unsigned*)(R_BASE + 0x08))
|
||||||
#define r4L (*(char*)(R_BASE + 0x08))
|
#define r4L (*(char*)(R_BASE + 0x08))
|
||||||
#define r4H (*(char*)(R_BASE + 0x09))
|
#define r4H (*(char*)(R_BASE + 0x09))
|
||||||
#define r5 (*(unsigned*)(R_BASE + 0x0a))
|
#define r5 (*(unsigned*)(R_BASE + 0x0a))
|
||||||
#define r5L (*(char*)(R_BASE + 0x0a))
|
#define r5L (*(char*)(R_BASE + 0x0a))
|
||||||
#define r5H (*(char*)(R_BASE + 0x0b))
|
#define r5H (*(char*)(R_BASE + 0x0b))
|
||||||
#define r6 (*(unsigned*)(R_BASE + 0x0c))
|
#define r6 (*(unsigned*)(R_BASE + 0x0c))
|
||||||
#define r6L (*(char*)(R_BASE + 0x0c))
|
#define r6L (*(char*)(R_BASE + 0x0c))
|
||||||
#define r6H (*(char*)(R_BASE + 0x0d))
|
#define r6H (*(char*)(R_BASE + 0x0d))
|
||||||
#define r7 (*(unsigned*)(R_BASE + 0x0e))
|
#define r7 (*(unsigned*)(R_BASE + 0x0e))
|
||||||
#define r7L (*(char*)(R_BASE + 0x0e))
|
#define r7L (*(char*)(R_BASE + 0x0e))
|
||||||
#define r7H (*(char*)(R_BASE + 0x0f))
|
#define r7H (*(char*)(R_BASE + 0x0f))
|
||||||
#define r8 (*(unsigned*)(R_BASE + 0x10))
|
#define r8 (*(unsigned*)(R_BASE + 0x10))
|
||||||
#define r8L (*(char*)(R_BASE + 0x10))
|
#define r8L (*(char*)(R_BASE + 0x10))
|
||||||
#define r8H (*(char*)(R_BASE + 0x11))
|
#define r8H (*(char*)(R_BASE + 0x11))
|
||||||
#define r9 (*(unsigned*)(R_BASE + 0x12))
|
#define r9 (*(unsigned*)(R_BASE + 0x12))
|
||||||
#define r9L (*(char*)(R_BASE + 0x12))
|
#define r9L (*(char*)(R_BASE + 0x12))
|
||||||
#define r9H (*(char*)(R_BASE + 0x13))
|
#define r9H (*(char*)(R_BASE + 0x13))
|
||||||
#define r10 (*(unsigned*)(R_BASE + 0x14))
|
#define r10 (*(unsigned*)(R_BASE + 0x14))
|
||||||
#define r10L (*(char*)(R_BASE + 0x14))
|
#define r10L (*(char*)(R_BASE + 0x14))
|
||||||
#define r10H (*(char*)(R_BASE + 0x15))
|
#define r10H (*(char*)(R_BASE + 0x15))
|
||||||
#define r11 (*(unsigned*)(R_BASE + 0x16))
|
#define r11 (*(unsigned*)(R_BASE + 0x16))
|
||||||
#define r11L (*(char*)(R_BASE + 0x16))
|
#define r11L (*(char*)(R_BASE + 0x16))
|
||||||
#define r11H (*(char*)(R_BASE + 0x17))
|
#define r11H (*(char*)(R_BASE + 0x17))
|
||||||
#define r12 (*(unsigned*)(R_BASE + 0x18))
|
#define r12 (*(unsigned*)(R_BASE + 0x18))
|
||||||
#define r12L (*(char*)(R_BASE + 0x18))
|
#define r12L (*(char*)(R_BASE + 0x18))
|
||||||
#define r12H (*(char*)(R_BASE + 0x19))
|
#define r12H (*(char*)(R_BASE + 0x19))
|
||||||
#define r13 (*(unsigned*)(R_BASE + 0x1a))
|
#define r13 (*(unsigned*)(R_BASE + 0x1a))
|
||||||
#define r13L (*(char*)(R_BASE + 0x1a))
|
#define r13L (*(char*)(R_BASE + 0x1a))
|
||||||
#define r13H (*(char*)(R_BASE + 0x1b))
|
#define r13H (*(char*)(R_BASE + 0x1b))
|
||||||
#define r14 (*(unsigned*)(R_BASE + 0x1c))
|
#define r14 (*(unsigned*)(R_BASE + 0x1c))
|
||||||
#define r14L (*(char*)(R_BASE + 0x1c))
|
#define r14L (*(char*)(R_BASE + 0x1c))
|
||||||
#define r14H (*(char*)(R_BASE + 0x1d))
|
#define r14H (*(char*)(R_BASE + 0x1d))
|
||||||
#define r15 (*(unsigned*)(R_BASE + 0x1e))
|
#define r15 (*(unsigned*)(R_BASE + 0x1e))
|
||||||
#define r15L (*(char*)(R_BASE + 0x1e))
|
#define r15L (*(char*)(R_BASE + 0x1e))
|
||||||
#define r15H (*(char*)(R_BASE + 0x1f))
|
#define r15H (*(char*)(R_BASE + 0x1f))
|
||||||
|
|
||||||
#ifdef __GEOS_CBM__
|
#ifdef __GEOS_CBM__
|
||||||
|
|
||||||
#define nameBuf char[17]
|
#define nameBuf char[17]
|
||||||
#define blockBuf char[256]
|
#define blockBuf char[256]
|
||||||
|
|
||||||
#define CPU_DDR (*(char*)0x00)
|
#define CPU_DDR (*(char*)0x00)
|
||||||
#define CPU_DATA (*(char*)0x01)
|
#define CPU_DATA (*(char*)0x01)
|
||||||
|
|
||||||
#define R_BASE 0x02
|
#define R_BASE 0x02
|
||||||
|
|
||||||
#define curPattern (*(unsigned*)0x22)
|
#define curPattern (*(unsigned*)0x22)
|
||||||
#define string (*(unsigned*)0x24)
|
#define string (*(unsigned*)0x24)
|
||||||
#define curFontDesc (*(struct fontdesc*)0x26)
|
#define curFontDesc (*(struct fontdesc*)0x26)
|
||||||
#define currentMode (*(char*)0x2e)
|
#define currentMode (*(char*)0x2e)
|
||||||
#define dispBufferOn (*(char*)0x2f)
|
#define dispBufferOn (*(char*)0x2f)
|
||||||
#define mouseOn (*(char*)0x30)
|
#define mouseOn (*(char*)0x30)
|
||||||
#define msePicPtr (*(unsigned*)0x31)
|
#define msePicPtr (*(unsigned*)0x31)
|
||||||
#define curWindow (*(struct window*)0x33)
|
#define curWindow (*(struct window*)0x33)
|
||||||
#define pressFlag (*(char*)0x39)
|
#define pressFlag (*(char*)0x39)
|
||||||
#define mousePos (*(struct pixel*)0x3a)
|
#define mousePos (*(struct pixel*)0x3a)
|
||||||
#define returnAddress (*(unsigned*)0x3d)
|
#define returnAddress (*(unsigned*)0x3d)
|
||||||
#define graphMode (*(char*)0x3f)
|
#define graphMode (*(char*)0x3f)
|
||||||
#define STATUS (*(char*)0x90)
|
#define STATUS (*(char*)0x90)
|
||||||
#define curDevice (*(char*)0xba)
|
#define curDevice (*(char*)0xba)
|
||||||
|
|
||||||
#define irqvec (*(void_func*)0x0314)
|
#define irqvec (*(void_func*)0x0314)
|
||||||
#define bkvec (*(void_func*)0x0316)
|
#define bkvec (*(void_func*)0x0316)
|
||||||
#define nmivec (*(void_func*)0x0318)
|
#define nmivec (*(void_func*)0x0318)
|
||||||
|
|
||||||
#define APP_RAM ((char*)0x0400)
|
#define APP_RAM ((char*)0x0400)
|
||||||
#define BACK_SCR_BASE ((char*)0x6000)
|
#define BACK_SCR_BASE ((char*)0x6000)
|
||||||
#define PRINTBASE ((char*)0x7900)
|
#define PRINTBASE ((char*)0x7900)
|
||||||
#define OS_VARS ((char*)0x8000)
|
#define OS_VARS ((char*)0x8000)
|
||||||
|
|
||||||
#define diskBlkBuf ((blockBuf)0x8000)
|
#define diskBlkBuf ((blockBuf)0x8000)
|
||||||
#define fileHeader (*(struct fileheader*)0x8100)
|
#define fileHeader (*(struct fileheader*)0x8100)
|
||||||
#define curDirHead ((blockBuf)0x8200)
|
#define curDirHead ((blockBuf)0x8200)
|
||||||
#define fileTrScTab ((struct tr_se[128])0x8300)
|
#define fileTrScTab ((struct tr_se[128])0x8300)
|
||||||
#define dirEntryBuf (*(struct filehandle*)0x8400)
|
#define dirEntryBuf (*(struct filehandle*)0x8400)
|
||||||
|
|
||||||
#define DrACurDkNm ((nameBuf)0x841e)
|
#define DrACurDkNm ((nameBuf)0x841e)
|
||||||
#define DrBCurDkNm ((nameBuf)0x8430)
|
#define DrBCurDkNm ((nameBuf)0x8430)
|
||||||
#define dataFileName ((nameBuf)0x8442)
|
#define dataFileName ((nameBuf)0x8442)
|
||||||
#define dataDiskName ((nameBuf)0x8453)
|
#define dataDiskName ((nameBuf)0x8453)
|
||||||
#define PrntFileName ((nameBuf)0x8465)
|
#define PrntFileName ((nameBuf)0x8465)
|
||||||
#define PrntDiskName ((nameBuf)0x8476)
|
#define PrntDiskName ((nameBuf)0x8476)
|
||||||
|
|
||||||
#define curDrive (*(char*)0x8489)
|
#define curDrive (*(char*)0x8489)
|
||||||
#define diskOpenFlg (*(char*)0x848a)
|
#define diskOpenFlg (*(char*)0x848a)
|
||||||
#define isGEOS (*(char*)0x848b)
|
#define isGEOS (*(char*)0x848b)
|
||||||
#define interleave (*(char*)0x848c)
|
#define interleave (*(char*)0x848c)
|
||||||
#define NUMDRV (*(char*)0x848d)
|
#define NUMDRV (*(char*)0x848d)
|
||||||
|
|
||||||
#define driveType ((char[4])0x848e)
|
#define driveType ((char[4])0x848e)
|
||||||
#define turboFlags ((char[4])0x8492)
|
#define turboFlags ((char[4])0x8492)
|
||||||
|
|
||||||
#define VLIRInfo (*(struct VLIR_info*)0x8496)
|
#define VLIRInfo (*(struct VLIR_info*)0x8496)
|
||||||
|
|
||||||
#define appMain (*(void_func*)0x849b)
|
#define appMain (*(void_func*)0x849b)
|
||||||
#define intTopVector (*(void_func*)0x849d)
|
#define intTopVector (*(void_func*)0x849d)
|
||||||
#define intBotVector (*(void_func*)0x849f)
|
#define intBotVector (*(void_func*)0x849f)
|
||||||
#define mouseVector (*(void_func*)0x84a1)
|
#define mouseVector (*(void_func*)0x84a1)
|
||||||
#define keyVector (*(void_func*)0x84a3)
|
#define keyVector (*(void_func*)0x84a3)
|
||||||
#define inputVector (*(void_func*)0x84a5)
|
#define inputVector (*(void_func*)0x84a5)
|
||||||
#define mouseFaultVec (*(void_func*)0x84a7)
|
#define mouseFaultVec (*(void_func*)0x84a7)
|
||||||
#define otherPressVec (*(void_func*)0x84a9)
|
#define otherPressVec (*(void_func*)0x84a9)
|
||||||
#define StringFaultVec (*(void_func*)0x84ab)
|
#define StringFaultVec (*(void_func*)0x84ab)
|
||||||
#define alarmTmtVector (*(void_func*)0x84ad)
|
#define alarmTmtVector (*(void_func*)0x84ad)
|
||||||
#define BRKVector (*(void_func*)0x84af)
|
#define BRKVector (*(void_func*)0x84af)
|
||||||
#define RecoverVector (*(void_func*)0x84b1)
|
#define RecoverVector (*(void_func*)0x84b1)
|
||||||
|
|
||||||
#define selectionFlash (*(char*)0x84b3)
|
#define selectionFlash (*(char*)0x84b3)
|
||||||
#define alphaFlag (*(char*)0x84b4)
|
#define alphaFlag (*(char*)0x84b4)
|
||||||
#define iconSelFlg (*(char*)0x84b5)
|
#define iconSelFlg (*(char*)0x84b5)
|
||||||
#define faultData (*(char*)0x84b6)
|
#define faultData (*(char*)0x84b6)
|
||||||
#define menuNumber (*(char*)0x84b7)
|
#define menuNumber (*(char*)0x84b7)
|
||||||
#define mouseWindow (*(struct window*)0x84b8)
|
#define mouseWindow (*(struct window*)0x84b8)
|
||||||
#define stringXY (*(struct pixel*)0x84be)
|
#define stringXY (*(struct pixel*)0x84be)
|
||||||
#define mousePicData (*(char*)0x84c1)
|
#define mousePicData (*(char*)0x84c1)
|
||||||
|
|
||||||
#define maxMouseSpeed (*(char*)0x8501)
|
#define maxMouseSpeed (*(char*)0x8501)
|
||||||
#define minMouseSpeed (*(char*)0x8502)
|
#define minMouseSpeed (*(char*)0x8502)
|
||||||
#define mouseAccel (*(char*)0x8503)
|
#define mouseAccel (*(char*)0x8503)
|
||||||
#define keyData (*(char*)0x8504)
|
#define keyData (*(char*)0x8504)
|
||||||
#define mouseData (*(char*)0x8505)
|
#define mouseData (*(char*)0x8505)
|
||||||
#define inputData (*(char*)0x8506)
|
#define inputData (*(char*)0x8506)
|
||||||
#define mouseSpeed (*(char*)0x8507)
|
#define mouseSpeed (*(char*)0x8507)
|
||||||
#define random (*(char*)0x850a)
|
#define random (*(char*)0x850a)
|
||||||
#define saveFontTab (*(struct fontdesc*)0x850c)
|
#define saveFontTab (*(struct fontdesc*)0x850c)
|
||||||
|
|
||||||
#define dblClickCount (*(char*)0x8515)
|
#define dblClickCount (*(char*)0x8515)
|
||||||
#define system_date (*(struct s_date*)0x8516)
|
#define system_date (*(struct s_date*)0x8516)
|
||||||
#define alarmSetFlag (*(char*)0x851c)
|
#define alarmSetFlag (*(char*)0x851c)
|
||||||
#define sysDBData (*(char*)0x851d)
|
#define sysDBData (*(char*)0x851d)
|
||||||
#define screencolors (*(char*)0x851e)
|
#define screencolors (*(char*)0x851e)
|
||||||
#define dlgBoxRamBuf (*(char*)0x851f)
|
#define dlgBoxRamBuf (*(char*)0x851f)
|
||||||
|
|
||||||
#define savedmoby2 (*(char*)0x88bb)
|
#define savedmoby2 (*(char*)0x88bb)
|
||||||
#define scr80polar (*(char*)0x88bc)
|
#define scr80polar (*(char*)0x88bc)
|
||||||
#define scr80colors (*(char*)0x88bd)
|
#define scr80colors (*(char*)0x88bd)
|
||||||
#define vdcClrMode (*(char*)0x88be)
|
#define vdcClrMode (*(char*)0x88be)
|
||||||
#define driveData ((char[4])0x88bf)
|
#define driveData ((char[4])0x88bf)
|
||||||
#define ramExpSize (*(char*)0x88c3)
|
#define ramExpSize (*(char*)0x88c3)
|
||||||
#define sysRAMFlg (*(char*)0x88c4)
|
#define sysRAMFlg (*(char*)0x88c4)
|
||||||
#define firstBoot (*(char*)0x88c5)
|
#define firstBoot (*(char*)0x88c5)
|
||||||
#define curType (*(char*)0x88c6)
|
#define curType (*(char*)0x88c6)
|
||||||
#define ramBase (*(char*)0x88c7)
|
#define ramBase (*(char*)0x88c7)
|
||||||
#define inputDevName ((nameBuf)0x88cb)
|
#define inputDevName ((nameBuf)0x88cb)
|
||||||
#define DrCCurDkNm ((nameBuf)0x88dc)
|
#define DrCCurDkNm ((nameBuf)0x88dc)
|
||||||
#define DrDCurDkNm ((nameBuf)0x88ee)
|
#define DrDCurDkNm ((nameBuf)0x88ee)
|
||||||
#define dir2Head ((blockBuf)0x8900)
|
#define dir2Head ((blockBuf)0x8900)
|
||||||
#define SPRITE_PICS ((char*)0x8a00)
|
#define SPRITE_PICS ((char*)0x8a00)
|
||||||
#define sprpic ((char[8][64])0x8a00)
|
#define sprpic ((char[8][64])0x8a00)
|
||||||
#define COLOR_MATRIX ((char[1000])0x8c00)
|
#define COLOR_MATRIX ((char[1000])0x8c00)
|
||||||
#define objPointer ((char[8])0x8ff8)
|
#define objPointer ((char[8])0x8ff8)
|
||||||
|
|
||||||
#define DISK_BASE ((char*)0x9000)
|
#define DISK_BASE ((char*)0x9000)
|
||||||
#define SCREEN_BASE ((char*)0xa000)
|
#define SCREEN_BASE ((char*)0xa000)
|
||||||
#define OS_ROM ((char*)0xc000)
|
#define OS_ROM ((char*)0xc000)
|
||||||
#define OS_JUMPTAB ((char*)0xc100)
|
#define OS_JUMPTAB ((char*)0xc100)
|
||||||
#define EXP_BASE ((char*)0xdf00)
|
#define EXP_BASE ((char*)0xdf00)
|
||||||
#define MOUSE_BASE_128 ((char*)0xfd00)
|
#define MOUSE_BASE_128 ((char*)0xfd00)
|
||||||
#define MOUSE_JMP_128 ((char*)0xfd00)
|
#define MOUSE_JMP_128 ((char*)0xfd00)
|
||||||
#define END_MOUSE_128 ((char*)0xfe80)
|
#define END_MOUSE_128 ((char*)0xfe80)
|
||||||
#define MOUSE_BASE ((char*)0xfe80)
|
#define MOUSE_BASE ((char*)0xfe80)
|
||||||
#define MOUSE_JMP ((char*)0xfe80)
|
#define MOUSE_JMP ((char*)0xfe80)
|
||||||
|
|
||||||
#define config (*(char*)0xff00)
|
#define config (*(char*)0xff00)
|
||||||
#define END_MOUSE ((char*)0xfffa)
|
#define END_MOUSE ((char*)0xfffa)
|
||||||
|
|
||||||
#define NMI_VECTOR (*(void_func*)0xfffa)
|
#define NMI_VECTOR (*(void_func*)0xfffa)
|
||||||
#define RESET_VECTOR (*(void_func*)0xfffc)
|
#define RESET_VECTOR (*(void_func*)0xfffc)
|
||||||
#define IRQ_VECTOR (*(void_func*)0xfffe)
|
#define IRQ_VECTOR (*(void_func*)0xfffe)
|
||||||
|
|
||||||
#define vicbase ((char*)0xd000)
|
#define vicbase ((char*)0xd000)
|
||||||
#define sidbase ((char*)0xd400)
|
#define sidbase ((char*)0xd400)
|
||||||
#define mmu ((char*)0xd500)
|
#define mmu ((char*)0xd500)
|
||||||
#define VDC ((char*)0xd600)
|
#define VDC ((char*)0xd600)
|
||||||
#define ctab ((char*)0xd800)
|
#define ctab ((char*)0xd800)
|
||||||
#define cia1base ((char*)0xdc00)
|
#define cia1base ((char*)0xdc00)
|
||||||
#define cia2base ((char*)0xdd00)
|
#define cia2base ((char*)0xdd00)
|
||||||
|
|
||||||
#define mob0xpos (*(char*)0xd000)
|
#define mob0xpos (*(char*)0xd000)
|
||||||
#define mob0ypos (*(char*)0xd001)
|
#define mob0ypos (*(char*)0xd001)
|
||||||
#define mob1xpos (*(char*)0xd002)
|
#define mob1xpos (*(char*)0xd002)
|
||||||
#define mob1ypos (*(char*)0xd003)
|
#define mob1ypos (*(char*)0xd003)
|
||||||
#define mob2xpos (*(char*)0xd004)
|
#define mob2xpos (*(char*)0xd004)
|
||||||
#define mob2ypos (*(char*)0xd005)
|
#define mob2ypos (*(char*)0xd005)
|
||||||
#define mob3xpos (*(char*)0xd006)
|
#define mob3xpos (*(char*)0xd006)
|
||||||
#define mob3ypos (*(char*)0xd007)
|
#define mob3ypos (*(char*)0xd007)
|
||||||
#define mob4xpos (*(char*)0xd008)
|
#define mob4xpos (*(char*)0xd008)
|
||||||
#define mob4ypos (*(char*)0xd009)
|
#define mob4ypos (*(char*)0xd009)
|
||||||
#define mob5xpos (*(char*)0xd00a)
|
#define mob5xpos (*(char*)0xd00a)
|
||||||
#define mob5ypos (*(char*)0xd00b)
|
#define mob5ypos (*(char*)0xd00b)
|
||||||
#define mob6xpos (*(char*)0xd00c)
|
#define mob6xpos (*(char*)0xd00c)
|
||||||
#define mob6ypos (*(char*)0xd00d)
|
#define mob6ypos (*(char*)0xd00d)
|
||||||
#define mob7xpos (*(char*)0xd00e)
|
#define mob7xpos (*(char*)0xd00e)
|
||||||
#define mob7ypos (*(char*)0xd00f)
|
#define mob7ypos (*(char*)0xd00f)
|
||||||
#define msbxpos (*(char*)0xd010)
|
#define msbxpos (*(char*)0xd010)
|
||||||
#define grcntrl1 (*(char*)0xd011)
|
#define grcntrl1 (*(char*)0xd011)
|
||||||
#define rasreg (*(char*)0xd012)
|
#define rasreg (*(char*)0xd012)
|
||||||
#define lpxpos (*(char*)0xd013)
|
#define lpxpos (*(char*)0xd013)
|
||||||
#define lpypos (*(char*)0xd014)
|
#define lpypos (*(char*)0xd014)
|
||||||
#define mobenble (*(char*)0xd015)
|
#define mobenble (*(char*)0xd015)
|
||||||
#define grcntrl2 (*(char*)0xd016)
|
#define grcntrl2 (*(char*)0xd016)
|
||||||
#define grmemptr (*(char*)0xd018)
|
#define grmemptr (*(char*)0xd018)
|
||||||
#define grirq (*(char*)0xd019)
|
#define grirq (*(char*)0xd019)
|
||||||
#define grirqen (*(char*)0xd01a)
|
#define grirqen (*(char*)0xd01a)
|
||||||
#define moby2 (*(char*)0xd017)
|
#define moby2 (*(char*)0xd017)
|
||||||
#define mobprior (*(char*)0xd01b)
|
#define mobprior (*(char*)0xd01b)
|
||||||
#define mobmcm (*(char*)0xd01c)
|
#define mobmcm (*(char*)0xd01c)
|
||||||
#define mobx2 (*(char*)0xd01d)
|
#define mobx2 (*(char*)0xd01d)
|
||||||
#define mobmobcol (*(char*)0xd01e)
|
#define mobmobcol (*(char*)0xd01e)
|
||||||
#define mobbakcol (*(char*)0xd01f)
|
#define mobbakcol (*(char*)0xd01f)
|
||||||
#define extclr (*(char*)0xd020)
|
#define extclr (*(char*)0xd020)
|
||||||
#define bakclr0 (*(char*)0xd021)
|
#define bakclr0 (*(char*)0xd021)
|
||||||
#define bakclr1 (*(char*)0xd022)
|
#define bakclr1 (*(char*)0xd022)
|
||||||
#define bakclr2 (*(char*)0xd023)
|
#define bakclr2 (*(char*)0xd023)
|
||||||
#define bakclr3 (*(char*)0xd024)
|
#define bakclr3 (*(char*)0xd024)
|
||||||
#define mcmclr0 (*(char*)0xd025)
|
#define mcmclr0 (*(char*)0xd025)
|
||||||
#define mcmclr1 (*(char*)0xd026)
|
#define mcmclr1 (*(char*)0xd026)
|
||||||
#define mob0clr (*(char*)0xd027)
|
#define mob0clr (*(char*)0xd027)
|
||||||
#define mob1clr (*(char*)0xd028)
|
#define mob1clr (*(char*)0xd028)
|
||||||
#define mob2clr (*(char*)0xd029)
|
#define mob2clr (*(char*)0xd029)
|
||||||
#define mob3clr (*(char*)0xd02a)
|
#define mob3clr (*(char*)0xd02a)
|
||||||
#define mob4clr (*(char*)0xd02b)
|
#define mob4clr (*(char*)0xd02b)
|
||||||
#define mob5clr (*(char*)0xd02c)
|
#define mob5clr (*(char*)0xd02c)
|
||||||
#define mob6clr (*(char*)0xd02d)
|
#define mob6clr (*(char*)0xd02d)
|
||||||
#define mob7clr (*(char*)0xd02e)
|
#define mob7clr (*(char*)0xd02e)
|
||||||
#define keyreg (*(char*)0xd02f)
|
#define keyreg (*(char*)0xd02f)
|
||||||
#define clkreg (*(char*)0xd030)
|
#define clkreg (*(char*)0xd030)
|
||||||
|
|
||||||
#define vdcreg (*(char*)0xd600)
|
#define vdcreg (*(char*)0xd600)
|
||||||
#define vdcdata (*(char*)0xd601)
|
#define vdcdata (*(char*)0xd601)
|
||||||
|
|
||||||
#else /* #ifdef __GEOS_CBM__ */
|
#else /* #ifdef __GEOS_CBM__ */
|
||||||
|
|
||||||
#define nameBuf char[16]
|
#define nameBuf char[16]
|
||||||
#define blockBuf char[512]
|
#define blockBuf char[512]
|
||||||
|
|
||||||
#define R_BASE 0x00
|
#define R_BASE 0x00
|
||||||
|
|
||||||
#define curPattern (*(unsigned*)0x022c)
|
#define curPattern (*(unsigned*)0x022c)
|
||||||
#define string (*(unsigned*)0x53)
|
#define string (*(unsigned*)0x53)
|
||||||
#define curFontDesc (*(struct fontdesc*)0x0218)
|
#define curFontDesc (*(struct fontdesc*)0x0218)
|
||||||
#define currentMode (*(char*)0x021c)
|
#define currentMode (*(char*)0x021c)
|
||||||
#define dispBufferOn (*(char*)0x021d)
|
#define dispBufferOn (*(char*)0x021d)
|
||||||
#define mouseOn (*(char*)0x5d)
|
#define mouseOn (*(char*)0x5d)
|
||||||
#define curWindow (*(struct window*)0x021e)
|
#define curWindow (*(struct window*)0x021e)
|
||||||
#define pressFlag (*(char*)0x08fe)
|
#define pressFlag (*(char*)0x08fe)
|
||||||
#define mousePos (*(struct pixel*)0x0241)
|
#define mousePos (*(struct pixel*)0x0241)
|
||||||
#define returnAddress (*(unsigned*)0x64)
|
#define returnAddress (*(unsigned*)0x64)
|
||||||
|
|
||||||
#define diskBlkBuf ((blockBuf)0xf659)
|
#define diskBlkBuf ((blockBuf)0xf659)
|
||||||
#define fileHeader (*(struct fileheader*)0xf859)
|
#define fileHeader (*(struct fileheader*)0xf859)
|
||||||
#define curDirHead ((char[39])0xfa80)
|
#define curDirHead ((char[39])0xfa80)
|
||||||
#define dirEntryBuf (*(struct filehandle*)0xfa59)
|
#define dirEntryBuf (*(struct filehandle*)0xfa59)
|
||||||
|
|
||||||
#define DrACurDkNm ((nameBuf)0xfaa7)
|
#define DrACurDkNm ((nameBuf)0xfaa7)
|
||||||
#define DrBCurDkNm ((nameBuf)0xfab7)
|
#define DrBCurDkNm ((nameBuf)0xfab7)
|
||||||
#define dataFileName ((nameBuf)0x02a4)
|
#define dataFileName ((nameBuf)0x02a4)
|
||||||
#define dataDiskName ((nameBuf)0x02b4)
|
#define dataDiskName ((nameBuf)0x02b4)
|
||||||
#define PrntFileName ((nameBuf)0x08ac)
|
#define PrntFileName ((nameBuf)0x08ac)
|
||||||
|
|
||||||
#define curDrive (*(char*)0xf60d)
|
#define curDrive (*(char*)0xf60d)
|
||||||
#define diskOpenFlg (*(char*)0xf617)
|
#define diskOpenFlg (*(char*)0xf617)
|
||||||
#define NUMDRV (*(char*)0xf60e)
|
#define NUMDRV (*(char*)0xf60e)
|
||||||
|
|
||||||
#define driveType ((char[4])0xfaf3)
|
#define driveType ((char[4])0xfaf3)
|
||||||
|
|
||||||
#define VLIRInfo (*(struct VLIR_info*)0xf618)
|
#define VLIRInfo (*(struct VLIR_info*)0xf618)
|
||||||
|
|
||||||
#define appMain (*(void_func*)0x0200)
|
#define appMain (*(void_func*)0x0200)
|
||||||
#define intTopVector (*(void_func*)0x0202)
|
#define intTopVector (*(void_func*)0x0202)
|
||||||
#define intBotVector (*(void_func*)0x0204)
|
#define intBotVector (*(void_func*)0x0204)
|
||||||
#define mouseVector (*(void_func*)0x0206)
|
#define mouseVector (*(void_func*)0x0206)
|
||||||
#define keyVector (*(void_func*)0x0208)
|
#define keyVector (*(void_func*)0x0208)
|
||||||
#define inputVector (*(void_func*)0x020a)
|
#define inputVector (*(void_func*)0x020a)
|
||||||
#define mouseFaultVec (*(void_func*)0x020c)
|
#define mouseFaultVec (*(void_func*)0x020c)
|
||||||
#define otherPressVec (*(void_func*)0x020e)
|
#define otherPressVec (*(void_func*)0x020e)
|
||||||
#define StringFaultVec (*(void_func*)0x0210)
|
#define StringFaultVec (*(void_func*)0x0210)
|
||||||
#define alarmTmtVector (*(void_func*)0x0212)
|
#define alarmTmtVector (*(void_func*)0x0212)
|
||||||
#define BRKVector (*(void_func*)0x0214)
|
#define BRKVector (*(void_func*)0x0214)
|
||||||
#define RecoverVector (*(void_func*)0x0216)
|
#define RecoverVector (*(void_func*)0x0216)
|
||||||
|
|
||||||
#define selectionFlash (*(char*)0x0224)
|
#define selectionFlash (*(char*)0x0224)
|
||||||
#define alphaFlag (*(char*)0x0225)
|
#define alphaFlag (*(char*)0x0225)
|
||||||
#define iconSelFlg (*(char*)0x0226)
|
#define iconSelFlg (*(char*)0x0226)
|
||||||
#define faultData (*(char*)0x0227)
|
#define faultData (*(char*)0x0227)
|
||||||
#define menuNumber (*(char*)0x0228)
|
#define menuNumber (*(char*)0x0228)
|
||||||
#define mouseWindow (*(struct window*)0x57)
|
#define mouseWindow (*(struct window*)0x57)
|
||||||
#define stringXY (*(struct pixel*)0x022e)
|
#define stringXY (*(struct pixel*)0x022e)
|
||||||
|
|
||||||
#define maxMouseSpeed (*(char*)0x027d)
|
#define maxMouseSpeed (*(char*)0x027d)
|
||||||
#define minMouseSpeed (*(char*)0x027e)
|
#define minMouseSpeed (*(char*)0x027e)
|
||||||
#define mouseAccel (*(char*)0x027f)
|
#define mouseAccel (*(char*)0x027f)
|
||||||
#define keyData (*(char*)0x0245)
|
#define keyData (*(char*)0x0245)
|
||||||
#define mouseData (*(char*)0x0246)
|
#define mouseData (*(char*)0x0246)
|
||||||
#define inputData (*(char*)0x0247)
|
#define inputData (*(char*)0x0247)
|
||||||
#define random (*(char*)0x024c)
|
#define random (*(char*)0x024c)
|
||||||
#define saveFontTab (*(struct fontdesc*)0x024e)
|
#define saveFontTab (*(struct fontdesc*)0x024e)
|
||||||
|
|
||||||
#define dblClickCount (*(char*)0x0258)
|
#define dblClickCount (*(char*)0x0258)
|
||||||
#define system_date (*(struct s_date*)0xf200)
|
#define system_date (*(struct s_date*)0xf200)
|
||||||
#define sysDBData (*(char*)0x0259)
|
#define sysDBData (*(char*)0x0259)
|
||||||
#define dlgBoxRamBuf (*(char*)0xf381)
|
#define dlgBoxRamBuf (*(char*)0xf381)
|
||||||
|
|
||||||
#define firstBoot (*(char*)0x0281)
|
#define firstBoot (*(char*)0x0281)
|
||||||
#define inputDevName ((nameBuf)0x08cc)
|
#define inputDevName ((nameBuf)0x08cc)
|
||||||
#define DrCCurDkNm ((nameBuf)0xfac7)
|
#define DrCCurDkNm ((nameBuf)0xfac7)
|
||||||
#define DrDCurDkNm ((nameBuf)0xfad7)
|
#define DrDCurDkNm ((nameBuf)0xfad7)
|
||||||
|
|
||||||
#define mobenble (*(char*)0x0818)
|
#define mobenble (*(char*)0x0818)
|
||||||
#define moby2 (*(char*)0x081a)
|
#define moby2 (*(char*)0x081a)
|
||||||
#define mobx2 (*(char*)0x0819)
|
#define mobx2 (*(char*)0x0819)
|
||||||
|
|
||||||
#endif /* #ifdef __GEOS_CBM__ */
|
#endif /* #ifdef __GEOS_CBM__ */
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
by Maciej 'YTM/Elysium' Witkowiak
|
by Maciej 'YTM/Elysium' Witkowiak
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GSYS_H
|
#ifndef _GSYS_H
|
||||||
#define _GSYS_H
|
#define _GSYS_H
|
||||||
|
|
||||||
void FirstInit(void);
|
void FirstInit(void);
|
||||||
|
@ -27,24 +27,24 @@ char get_ostype(void);
|
||||||
/* possible return values of get_ostype, machine and version flags will
|
/* possible return values of get_ostype, machine and version flags will
|
||||||
be combined with OR */
|
be combined with OR */
|
||||||
/* machine flags */
|
/* machine flags */
|
||||||
#define GEOS64 0x00
|
#define GEOS64 0x00
|
||||||
#define GEOS4 0x04 /* plus4 geos is not or'ed with version */
|
#define GEOS4 0x04 /* plus4 geos is not or'ed with version */
|
||||||
#define GEOS128 0x80
|
#define GEOS128 0x80
|
||||||
/* version flags */
|
/* version flags */
|
||||||
#define GEOS_V10 0x10
|
#define GEOS_V10 0x10
|
||||||
#define GEOS_V11 0x11
|
#define GEOS_V11 0x11
|
||||||
#define GEOS_V12 0x12 /* ??? not sure */
|
#define GEOS_V12 0x12 /* ??? not sure */
|
||||||
#define GEOS_V20 0x20
|
#define GEOS_V20 0x20
|
||||||
#define WHEELS 0x40 /* only Wheels? */
|
#define WHEELS 0x40 /* only Wheels? */
|
||||||
|
|
||||||
char get_tv(void);
|
char get_tv(void);
|
||||||
|
|
||||||
/* possible return values of get_tv, these flags will be combined
|
/* possible return values of get_tv, these flags will be combined
|
||||||
note that columns state can be changed during runtime and get_tv
|
note that columns state can be changed during runtime and get_tv
|
||||||
always returns the current state */
|
always returns the current state */
|
||||||
#define COLUMNS40 0x00
|
#define COLUMNS40 0x00
|
||||||
#define COLUMNS80 0x01
|
#define COLUMNS80 0x01
|
||||||
#define TV_PAL 0x00
|
#define TV_PAL 0x00
|
||||||
#define TV_NTSC 0x80
|
#define TV_NTSC 0x80
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* iso646.h */
|
/* iso646.h */
|
||||||
/* */
|
/* */
|
||||||
/* Alternative spellings */
|
/* Alternative spellings */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -39,17 +39,17 @@
|
||||||
|
|
||||||
|
|
||||||
/* Operator tokens */
|
/* Operator tokens */
|
||||||
#define and &&
|
#define and &&
|
||||||
#define and_eq &=
|
#define and_eq &=
|
||||||
#define bitand &
|
#define bitand &
|
||||||
#define bitor |
|
#define bitor |
|
||||||
#define compl ~
|
#define compl ~
|
||||||
#define not !
|
#define not !
|
||||||
#define not_eq !=
|
#define not_eq !=
|
||||||
#define or ||
|
#define or ||
|
||||||
#define or_eq |=
|
#define or_eq |=
|
||||||
#define xor ^
|
#define xor ^
|
||||||
#define xor_eq ^=
|
#define xor_eq ^=
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* joystick.h */
|
/* joystick.h */
|
||||||
/* */
|
/* */
|
||||||
/* Read the joystick on systems that support it */
|
/* Read the joystick on systems that support it */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
#define JOY_ERR_NO_DEVICE 4 /* Device (hardware) not found */
|
#define JOY_ERR_NO_DEVICE 4 /* Device (hardware) not found */
|
||||||
|
|
||||||
/* Argument for the joy_read function */
|
/* Argument for the joy_read function */
|
||||||
#define JOY_1 0
|
#define JOY_1 0
|
||||||
#define JOY_2 1
|
#define JOY_2 1
|
||||||
|
|
||||||
/* The following codes are *indices* into the joy_masks array */
|
/* The following codes are *indices* into the joy_masks array */
|
||||||
#define JOY_UP 0
|
#define JOY_UP 0
|
||||||
|
@ -83,7 +83,7 @@ extern const void joy_static_stddrv[];
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Functions */
|
/* Functions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ typedef struct {
|
||||||
|
|
||||||
|
|
||||||
/* JOY kernel variables */
|
/* JOY kernel variables */
|
||||||
extern joy_drv_header* joy_drv; /* Pointer to driver */
|
extern joy_drv_header* joy_drv; /* Pointer to driver */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* limits.h */
|
/* limits.h */
|
||||||
/* */
|
/* */
|
||||||
/* Sizes of integer types */
|
/* Sizes of integer types */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -38,30 +38,30 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CHAR_BIT 8
|
#define CHAR_BIT 8
|
||||||
|
|
||||||
#define SCHAR_MIN ((signed char) 0x80)
|
#define SCHAR_MIN ((signed char) 0x80)
|
||||||
#define SCHAR_MAX 127
|
#define SCHAR_MAX 127
|
||||||
|
|
||||||
#define UCHAR_MAX 255
|
#define UCHAR_MAX 255
|
||||||
|
|
||||||
#define CHAR_MIN 0
|
#define CHAR_MIN 0
|
||||||
#define CHAR_MAX 255
|
#define CHAR_MAX 255
|
||||||
|
|
||||||
#define SHRT_MIN ((short) 0x8000)
|
#define SHRT_MIN ((short) 0x8000)
|
||||||
#define SHRT_MAX 32767
|
#define SHRT_MAX 32767
|
||||||
|
|
||||||
#define USHRT_MAX 65535U
|
#define USHRT_MAX 65535U
|
||||||
|
|
||||||
#define INT_MIN ((int) 0x8000)
|
#define INT_MIN ((int) 0x8000)
|
||||||
#define INT_MAX 32767
|
#define INT_MAX 32767
|
||||||
|
|
||||||
#define UINT_MAX 65535U
|
#define UINT_MAX 65535U
|
||||||
|
|
||||||
#define LONG_MAX 2147483647L
|
#define LONG_MAX 2147483647L
|
||||||
#define LONG_MIN ((long) 0x80000000)
|
#define LONG_MIN ((long) 0x80000000)
|
||||||
|
|
||||||
#define ULONG_MAX 4294967295UL
|
#define ULONG_MAX 4294967295UL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* locale.h */
|
/* locale.h */
|
||||||
/* */
|
/* */
|
||||||
/* Localization <locale.h> */
|
/* Localization <locale.h> */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -40,38 +40,38 @@
|
||||||
|
|
||||||
/* NULL pointer */
|
/* NULL pointer */
|
||||||
#ifndef _HAVE_NULL
|
#ifndef _HAVE_NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#define _HAVE_NULL
|
#define _HAVE_NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Locale information constants */
|
/* Locale information constants */
|
||||||
#define LC_ALL 0
|
#define LC_ALL 0
|
||||||
#define LC_COLLATE 1
|
#define LC_COLLATE 1
|
||||||
#define LC_CTYPE 2
|
#define LC_CTYPE 2
|
||||||
#define LC_MONETARY 3
|
#define LC_MONETARY 3
|
||||||
#define LC_NUMERIC 4
|
#define LC_NUMERIC 4
|
||||||
#define LC_TIME 5
|
#define LC_TIME 5
|
||||||
|
|
||||||
/* Struct containing locale settings */
|
/* Struct containing locale settings */
|
||||||
struct lconv {
|
struct lconv {
|
||||||
char* currency_symbol;
|
char* currency_symbol;
|
||||||
char* decimal_point;
|
char* decimal_point;
|
||||||
char* grouping;
|
char* grouping;
|
||||||
char* int_curr_symbol;
|
char* int_curr_symbol;
|
||||||
char* mon_decimal_point;
|
char* mon_decimal_point;
|
||||||
char* mon_grouping;
|
char* mon_grouping;
|
||||||
char* mon_thousands_sep;
|
char* mon_thousands_sep;
|
||||||
char* negative_sign;
|
char* negative_sign;
|
||||||
char* positive_sign;
|
char* positive_sign;
|
||||||
char* thousands_sep;
|
char* thousands_sep;
|
||||||
char frac_digits;
|
char frac_digits;
|
||||||
char int_frac_digits;
|
char int_frac_digits;
|
||||||
char n_cs_precedes;
|
char n_cs_precedes;
|
||||||
char n_sep_by_space;
|
char n_sep_by_space;
|
||||||
char n_sign_posn;
|
char n_sign_posn;
|
||||||
char p_cs_precedes;
|
char p_cs_precedes;
|
||||||
char p_sep_by_space;
|
char p_sep_by_space;
|
||||||
char p_sign_posn;
|
char p_sign_posn;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* mouse.h */
|
/* mouse.h */
|
||||||
/* */
|
/* */
|
||||||
/* Mouse API */
|
/* Mouse API */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Definitions */
|
/* Definitions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@
|
||||||
#define MOUSE_ERR_INV_IOCTL 5 /* Invalid ioctl code */
|
#define MOUSE_ERR_INV_IOCTL 5 /* Invalid ioctl code */
|
||||||
|
|
||||||
/* Mouse button masks */
|
/* Mouse button masks */
|
||||||
#define MOUSE_BTN_LEFT 0x10
|
#define MOUSE_BTN_LEFT 0x10
|
||||||
#define MOUSE_BTN_RIGHT 0x01
|
#define MOUSE_BTN_RIGHT 0x01
|
||||||
|
|
||||||
/* Structure containing the mouse coordinates */
|
/* Structure containing the mouse coordinates */
|
||||||
struct mouse_pos {
|
struct mouse_pos {
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Structure containing information about the mouse */
|
/* Structure containing information about the mouse */
|
||||||
|
@ -72,10 +72,10 @@ struct mouse_info {
|
||||||
|
|
||||||
/* Structure used for getbox/setbox */
|
/* Structure used for getbox/setbox */
|
||||||
struct mouse_box {
|
struct mouse_box {
|
||||||
int minx;
|
int minx;
|
||||||
int miny;
|
int miny;
|
||||||
int maxx;
|
int maxx;
|
||||||
int maxy;
|
int maxy;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Structure containing mouse callback functions. These functions are declared
|
/* Structure containing mouse callback functions. These functions are declared
|
||||||
|
@ -113,7 +113,7 @@ extern const void mouse_static_stddrv[];
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Functions */
|
/* Functions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -150,10 +150,10 @@ void __fastcall__ mouse_setbox (const struct mouse_box* box);
|
||||||
* NOTE: The function does *not* check if the mouse is currently inside the
|
* NOTE: The function does *not* check if the mouse is currently inside the
|
||||||
* given margins. The proper way to use this function therefore is:
|
* given margins. The proper way to use this function therefore is:
|
||||||
*
|
*
|
||||||
* - Hide the mouse
|
* - Hide the mouse
|
||||||
* - Set the bounding box
|
* - Set the bounding box
|
||||||
* - Place the mouse at the desired position
|
* - Place the mouse at the desired position
|
||||||
* - Show the mouse again.
|
* - Show the mouse again.
|
||||||
*
|
*
|
||||||
* NOTE2: When setting the box to something that is larger than the actual
|
* NOTE2: When setting the box to something that is larger than the actual
|
||||||
* screen, the positioning of the mouse cursor can fail. If such margins
|
* screen, the positioning of the mouse cursor can fail. If such margins
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* Mouse kernel variables */
|
/* Mouse kernel variables */
|
||||||
extern void* mouse_drv; /* Pointer to driver */
|
extern void* mouse_drv; /* Pointer to driver */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* nes.h */
|
/* nes.h */
|
||||||
/* */
|
/* */
|
||||||
/* NES system specific definitions */
|
/* NES system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* o65.h */
|
/* o65.h */
|
||||||
/* */
|
/* */
|
||||||
/* Definitions for the o65 file format */
|
/* Definitions for the o65 file format */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -57,9 +57,9 @@ typedef struct o65_header o65_header;
|
||||||
struct o65_header {
|
struct o65_header {
|
||||||
char marker[2]; /* Non-C64 marker */
|
char marker[2]; /* Non-C64 marker */
|
||||||
char magic[3]; /* o65 magic */
|
char magic[3]; /* o65 magic */
|
||||||
char version; /* Version number */
|
char version; /* Version number */
|
||||||
unsigned mode; /* Mode word */
|
unsigned mode; /* Mode word */
|
||||||
o65_size tbase; /* Original text (code) segment address */
|
o65_size tbase; /* Original text (code) segment address */
|
||||||
o65_size tlen; /* Size of text (code) segment */
|
o65_size tlen; /* Size of text (code) segment */
|
||||||
o65_size dbase; /* Original data segment address */
|
o65_size dbase; /* Original data segment address */
|
||||||
o65_size dlen; /* Size of data segment */
|
o65_size dlen; /* Size of data segment */
|
||||||
|
@ -81,7 +81,7 @@ struct o65_header {
|
||||||
#define O65_VERSION 0x00
|
#define O65_VERSION 0x00
|
||||||
|
|
||||||
/* Defines for the mode word */
|
/* Defines for the mode word */
|
||||||
#define O65_CPU_65816 0x8000 /* Executable is for 65816 */
|
#define O65_CPU_65816 0x8000 /* Executable is for 65816 */
|
||||||
#define O65_CPU_6502 0x0000 /* Executable is for the 6502 */
|
#define O65_CPU_6502 0x0000 /* Executable is for the 6502 */
|
||||||
#define O65_CPU_MASK 0x8000 /* Mask to extract CPU type */
|
#define O65_CPU_MASK 0x8000 /* Mask to extract CPU type */
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ struct o65_header {
|
||||||
#define O65_RELOC_BYTE 0x0000 /* Byte wise relocation */
|
#define O65_RELOC_BYTE 0x0000 /* Byte wise relocation */
|
||||||
#define O65_RELOC_MASK 0x4000 /* Mask to extract relocation type */
|
#define O65_RELOC_MASK 0x4000 /* Mask to extract relocation type */
|
||||||
|
|
||||||
#define O65_SIZE_32BIT 0x2000 /* All size words are 32bit */
|
#define O65_SIZE_32BIT 0x2000 /* All size words are 32bit */
|
||||||
#define O65_SIZE_16BIT 0x0000 /* All size words are 16bit */
|
#define O65_SIZE_16BIT 0x0000 /* All size words are 16bit */
|
||||||
#define O65_SIZE_MASK 0x2000 /* Mask to extract size */
|
#define O65_SIZE_MASK 0x2000 /* Mask to extract size */
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ struct o65_header {
|
||||||
#define O65_BSSZERO_MASK 0x0200 /* Mask to extract bss zero flag */
|
#define O65_BSSZERO_MASK 0x0200 /* Mask to extract bss zero flag */
|
||||||
|
|
||||||
/* The following is used if O65_CPU == 6502 */
|
/* The following is used if O65_CPU == 6502 */
|
||||||
#define O65_CPU2_6502 0x0000 /* Executable is for 6502 */
|
#define O65_CPU2_6502 0x0000 /* Executable is for 6502 */
|
||||||
#define O65_CPU2_65C02 0x0010 /* Executable is for 65C02 */
|
#define O65_CPU2_65C02 0x0010 /* Executable is for 65C02 */
|
||||||
#define O65_CPU2_65SC02 0x0020 /* Executable is for 65SC02 */
|
#define O65_CPU2_65SC02 0x0020 /* Executable is for 65SC02 */
|
||||||
#define O65_CPU2_65CE02 0x0030 /* Executable is for 65CE02 */
|
#define O65_CPU2_65CE02 0x0030 /* Executable is for 65CE02 */
|
||||||
|
@ -131,12 +131,12 @@ struct o65_header {
|
||||||
O65_ALIGN_1)
|
O65_ALIGN_1)
|
||||||
|
|
||||||
/* The four o65 segment types. */
|
/* The four o65 segment types. */
|
||||||
#define O65_SEGID_UNDEF 0x00
|
#define O65_SEGID_UNDEF 0x00
|
||||||
#define O65_SEGID_ABS 0x01
|
#define O65_SEGID_ABS 0x01
|
||||||
#define O65_SEGID_TEXT 0x02
|
#define O65_SEGID_TEXT 0x02
|
||||||
#define O65_SEGID_DATA 0x03
|
#define O65_SEGID_DATA 0x03
|
||||||
#define O65_SEGID_BSS 0x04
|
#define O65_SEGID_BSS 0x04
|
||||||
#define O65_SEGID_ZP 0x05
|
#define O65_SEGID_ZP 0x05
|
||||||
#define O65_SEGID_MASK 0x07
|
#define O65_SEGID_MASK 0x07
|
||||||
|
|
||||||
/* Relocation type codes */
|
/* Relocation type codes */
|
||||||
|
@ -158,14 +158,14 @@ struct o65_header {
|
||||||
|
|
||||||
/* Option tags */
|
/* Option tags */
|
||||||
#define O65_OPT_FILENAME 0
|
#define O65_OPT_FILENAME 0
|
||||||
#define O65_OPT_OS 1
|
#define O65_OPT_OS 1
|
||||||
#define O65_OPT_ASM 2
|
#define O65_OPT_ASM 2
|
||||||
#define O65_OPT_AUTHOR 3
|
#define O65_OPT_AUTHOR 3
|
||||||
#define O65_OPT_TIMESTAMP 4
|
#define O65_OPT_TIMESTAMP 4
|
||||||
|
|
||||||
/* Operating system codes for O65_OPT_OS */
|
/* Operating system codes for O65_OPT_OS */
|
||||||
#define O65_OS_OSA65 1
|
#define O65_OS_OSA65 1
|
||||||
#define O65_OS_LUNIX 2
|
#define O65_OS_LUNIX 2
|
||||||
#define O65_OS_CC65 3
|
#define O65_OS_CC65 3
|
||||||
#define O65_OS_OPENCBM 4
|
#define O65_OS_OPENCBM 4
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* pet.h */
|
/* pet.h */
|
||||||
/* */
|
/* */
|
||||||
/* PET system specific definitions */
|
/* PET system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
|
|
||||||
|
|
||||||
/* Color defines */
|
/* Color defines */
|
||||||
#define COLOR_BLACK 0x00
|
#define COLOR_BLACK 0x00
|
||||||
#define COLOR_WHITE 0x01
|
#define COLOR_WHITE 0x01
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_pia.h>
|
#include <_pia.h>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* plus4.h */
|
/* plus4.h */
|
||||||
/* */
|
/* */
|
||||||
/* Plus/4 system specific definitions */
|
/* Plus/4 system specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -39,51 +39,51 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Baudrate settings */
|
/* Baudrate settings */
|
||||||
#define SER_BAUD_45_5 0x00
|
#define SER_BAUD_45_5 0x00
|
||||||
#define SER_BAUD_50 0x01
|
#define SER_BAUD_50 0x01
|
||||||
#define SER_BAUD_75 0x02
|
#define SER_BAUD_75 0x02
|
||||||
#define SER_BAUD_110 0x03
|
#define SER_BAUD_110 0x03
|
||||||
#define SER_BAUD_134_5 0x04
|
#define SER_BAUD_134_5 0x04
|
||||||
#define SER_BAUD_150 0x05
|
#define SER_BAUD_150 0x05
|
||||||
#define SER_BAUD_300 0x06
|
#define SER_BAUD_300 0x06
|
||||||
#define SER_BAUD_600 0x07
|
#define SER_BAUD_600 0x07
|
||||||
#define SER_BAUD_1200 0x08
|
#define SER_BAUD_1200 0x08
|
||||||
#define SER_BAUD_1800 0x09
|
#define SER_BAUD_1800 0x09
|
||||||
#define SER_BAUD_2400 0x0A
|
#define SER_BAUD_2400 0x0A
|
||||||
#define SER_BAUD_3600 0x0B
|
#define SER_BAUD_3600 0x0B
|
||||||
#define SER_BAUD_4800 0x0C
|
#define SER_BAUD_4800 0x0C
|
||||||
#define SER_BAUD_7200 0x0D
|
#define SER_BAUD_7200 0x0D
|
||||||
#define SER_BAUD_9600 0x0E
|
#define SER_BAUD_9600 0x0E
|
||||||
#define SER_BAUD_19200 0x0F
|
#define SER_BAUD_19200 0x0F
|
||||||
#define SER_BAUD_38400 0x10
|
#define SER_BAUD_38400 0x10
|
||||||
#define SER_BAUD_57600 0x11
|
#define SER_BAUD_57600 0x11
|
||||||
#define SER_BAUD_115200 0x12
|
#define SER_BAUD_115200 0x12
|
||||||
#define SER_BAUD_230400 0x13
|
#define SER_BAUD_230400 0x13
|
||||||
#define SER_BAUD_31250 0x14
|
#define SER_BAUD_31250 0x14
|
||||||
#define SER_BAUD_62500 0x15
|
#define SER_BAUD_62500 0x15
|
||||||
|
|
||||||
/* Data bit settings */
|
/* Data bit settings */
|
||||||
#define SER_BITS_5 0x00
|
#define SER_BITS_5 0x00
|
||||||
#define SER_BITS_6 0x01
|
#define SER_BITS_6 0x01
|
||||||
#define SER_BITS_7 0x02
|
#define SER_BITS_7 0x02
|
||||||
#define SER_BITS_8 0x03
|
#define SER_BITS_8 0x03
|
||||||
|
|
||||||
/* Stop bit settings */
|
/* Stop bit settings */
|
||||||
#define SER_STOP_1 0x00 /* One stop bit */
|
#define SER_STOP_1 0x00 /* One stop bit */
|
||||||
#define SER_STOP_2 0x01 /* Two stop bits */
|
#define SER_STOP_2 0x01 /* Two stop bits */
|
||||||
|
|
||||||
/* Parity settings */
|
/* Parity settings */
|
||||||
#define SER_PAR_NONE 0x00
|
#define SER_PAR_NONE 0x00
|
||||||
#define SER_PAR_ODD 0x01
|
#define SER_PAR_ODD 0x01
|
||||||
#define SER_PAR_EVEN 0x02
|
#define SER_PAR_EVEN 0x02
|
||||||
#define SER_PAR_MARK 0x03
|
#define SER_PAR_MARK 0x03
|
||||||
#define SER_PAR_SPACE 0x04
|
#define SER_PAR_SPACE 0x04
|
||||||
|
|
||||||
/* Handshake settings. The latter two may be combined. */
|
/* Handshake settings. The latter two may be combined. */
|
||||||
#define SER_HS_NONE 0x00 /* No handshake */
|
#define SER_HS_NONE 0x00 /* No handshake */
|
||||||
|
@ -93,22 +93,22 @@
|
||||||
/* Bit masks to mask out things from the status returned by ser_status.
|
/* Bit masks to mask out things from the status returned by ser_status.
|
||||||
* These are 6551 specific and must be mapped by drivers for other chips.
|
* These are 6551 specific and must be mapped by drivers for other chips.
|
||||||
*/
|
*/
|
||||||
#define SER_STATUS_PE 0x01 /* Parity error */
|
#define SER_STATUS_PE 0x01 /* Parity error */
|
||||||
#define SER_STATUS_FE 0x02 /* Framing error */
|
#define SER_STATUS_FE 0x02 /* Framing error */
|
||||||
#define SER_STATUS_OE 0x04 /* Overrun error */
|
#define SER_STATUS_OE 0x04 /* Overrun error */
|
||||||
#define SER_STATUS_DCD 0x20 /* NOT data carrier detect */
|
#define SER_STATUS_DCD 0x20 /* NOT data carrier detect */
|
||||||
#define SER_STATUS_DSR 0x40 /* NOT data set ready */
|
#define SER_STATUS_DSR 0x40 /* NOT data set ready */
|
||||||
|
|
||||||
/* Error codes returned by all functions */
|
/* Error codes returned by all functions */
|
||||||
#define SER_ERR_OK 0x00 /* Not an error - relax */
|
#define SER_ERR_OK 0x00 /* Not an error - relax */
|
||||||
#define SER_ERR_NO_DRIVER 0x01 /* No driver available */
|
#define SER_ERR_NO_DRIVER 0x01 /* No driver available */
|
||||||
#define SER_ERR_CANNOT_LOAD 0x02 /* Error loading driver */
|
#define SER_ERR_CANNOT_LOAD 0x02 /* Error loading driver */
|
||||||
#define SER_ERR_INV_DRIVER 0x03 /* Invalid driver */
|
#define SER_ERR_INV_DRIVER 0x03 /* Invalid driver */
|
||||||
#define SER_ERR_NO_DEVICE 0x04 /* Device (hardware) not found */
|
#define SER_ERR_NO_DEVICE 0x04 /* Device (hardware) not found */
|
||||||
#define SER_ERR_BAUD_UNAVAIL 0x05 /* Baud rate not available */
|
#define SER_ERR_BAUD_UNAVAIL 0x05 /* Baud rate not available */
|
||||||
#define SER_ERR_NO_DATA 0x06 /* Nothing to read */
|
#define SER_ERR_NO_DATA 0x06 /* Nothing to read */
|
||||||
#define SER_ERR_OVERFLOW 0x07 /* No room in send buffer */
|
#define SER_ERR_OVERFLOW 0x07 /* No room in send buffer */
|
||||||
#define SER_ERR_INIT_FAILED 0x08 /* Initialization failed */
|
#define SER_ERR_INIT_FAILED 0x08 /* Initialization failed */
|
||||||
#define SER_ERR_INV_IOCTL 0x09 /* IOCTL not supported */
|
#define SER_ERR_INV_IOCTL 0x09 /* IOCTL not supported */
|
||||||
#define SER_ERR_INSTALLED 0x0A /* A driver is already installed */
|
#define SER_ERR_INSTALLED 0x0A /* A driver is already installed */
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ struct ser_params {
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* setjmp.h */
|
/* setjmp.h */
|
||||||
/* */
|
/* */
|
||||||
/* Nonlocal jumps */
|
/* Nonlocal jumps */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -43,7 +43,7 @@ typedef char jmp_buf [5];
|
||||||
|
|
||||||
|
|
||||||
int __fastcall__ _setjmp (jmp_buf buf);
|
int __fastcall__ _setjmp (jmp_buf buf);
|
||||||
#define setjmp _setjmp /* ISO insists on a macro */
|
#define setjmp _setjmp /* ISO insists on a macro */
|
||||||
void __fastcall__ longjmp (jmp_buf buf, int retval) __attribute__((noreturn));
|
void __fastcall__ longjmp (jmp_buf buf, int retval) __attribute__((noreturn));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* stdarg.h */
|
/* stdarg.h */
|
||||||
/* */
|
/* */
|
||||||
/* Variable arguments */
|
/* Variable arguments */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -40,10 +40,10 @@
|
||||||
|
|
||||||
typedef unsigned char* va_list;
|
typedef unsigned char* va_list;
|
||||||
|
|
||||||
#define va_start(ap, fix) ap = ((va_list)&(fix))
|
#define va_start(ap, fix) ap = ((va_list)&(fix))
|
||||||
#define va_arg(ap,type) (*(type*)(ap -= ((sizeof (type) + 1) & ~1)))
|
#define va_arg(ap,type) (*(type*)(ap -= ((sizeof (type) + 1) & ~1)))
|
||||||
#if __CC65_STD__ >= __CC65_STD_C99__
|
#if __CC65_STD__ >= __CC65_STD_C99__
|
||||||
#define va_copy(dest, src) ((dest)=(src))
|
#define va_copy(dest, src) ((dest)=(src))
|
||||||
#endif
|
#endif
|
||||||
#define va_end(ap)
|
#define va_end(ap)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* stdbool.h */
|
/* stdbool.h */
|
||||||
/* */
|
/* */
|
||||||
/* C99 Boolean definitions */
|
/* C99 Boolean definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2002 Greg King */
|
/* (C) 2002 Greg King */
|
||||||
|
@ -11,20 +11,20 @@
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided "as-is," without any expressed or implied */
|
/* This software is provided "as-is," without any expressed or implied */
|
||||||
/* warranty. In no event will the authors be held liable for any damages */
|
/* warranty. In no event will the authors be held liable for any damages */
|
||||||
/* arising from the use of this software. */
|
/* arising from the use of this software. */
|
||||||
/* */
|
/* */
|
||||||
/* Permission is granted to anyone to use this software for any purpose, */
|
/* Permission is granted to anyone to use this software for any purpose, */
|
||||||
/* including commercial applications, and to alter and redistribute it */
|
/* including commercial applications, and to alter and redistribute it */
|
||||||
/* freely, subject to the following restrictions: */
|
/* freely, subject to the following restrictions: */
|
||||||
/* */
|
/* */
|
||||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||||
/* claim that you wrote the original software. If you use this software */
|
/* claim that you wrote the original software. If you use this software */
|
||||||
/* in a product, an acknowledgment, in the product's documentation, */
|
/* in a product, an acknowledgment, in the product's documentation, */
|
||||||
/* would be appreciated, but is not required. */
|
/* would be appreciated, but is not required. */
|
||||||
/* 2. Alterred source versions must be marked plainly as such, */
|
/* 2. Alterred source versions must be marked plainly as such, */
|
||||||
/* and must not be misrepresented as being the original software. */
|
/* and must not be misrepresented as being the original software. */
|
||||||
/* 3. This notice may not be removed or alterred */
|
/* 3. This notice may not be removed or alterred */
|
||||||
/* from any source distribution. */
|
/* from any source distribution. */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* stddef.h */
|
/* stddef.h */
|
||||||
/* */
|
/* */
|
||||||
/* Common definitions */
|
/* Common definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -54,12 +54,12 @@ typedef unsigned size_t;
|
||||||
|
|
||||||
/* NULL pointer */
|
/* NULL pointer */
|
||||||
#ifndef _HAVE_NULL
|
#ifndef _HAVE_NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#define _HAVE_NULL
|
#define _HAVE_NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* offsetof macro */
|
/* offsetof macro */
|
||||||
#define offsetof(type, member) (size_t) (&((type*) 0)->member)
|
#define offsetof(type, member) (size_t) (&((type*) 0)->member)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* stdio.h */
|
/* stdio.h */
|
||||||
/* */
|
/* */
|
||||||
/* Input/output */
|
/* Input/output */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -57,33 +57,33 @@ extern FILE* stdout;
|
||||||
extern FILE* stderr;
|
extern FILE* stderr;
|
||||||
|
|
||||||
/* Standard defines */
|
/* Standard defines */
|
||||||
#define _IOFBF 0
|
#define _IOFBF 0
|
||||||
#define _IOLBF 1
|
#define _IOLBF 1
|
||||||
#define _IONBF 2
|
#define _IONBF 2
|
||||||
#define BUFSIZ 256
|
#define BUFSIZ 256
|
||||||
#define EOF -1
|
#define EOF -1
|
||||||
#define FOPEN_MAX 8
|
#define FOPEN_MAX 8
|
||||||
#define SEEK_CUR 0
|
#define SEEK_CUR 0
|
||||||
#define SEEK_END 1
|
#define SEEK_END 1
|
||||||
#define SEEK_SET 2
|
#define SEEK_SET 2
|
||||||
#define TMP_MAX 256
|
#define TMP_MAX 256
|
||||||
|
|
||||||
/* Standard defines that are platform dependent */
|
/* Standard defines that are platform dependent */
|
||||||
#if defined(__APPLE2__) || defined(__APPLE2ENH__)
|
#if defined(__APPLE2__) || defined(__APPLE2ENH__)
|
||||||
# define FILENAME_MAX (64+1)
|
# define FILENAME_MAX (64+1)
|
||||||
#elif defined(__ATARI__)
|
#elif defined(__ATARI__)
|
||||||
# define FILENAME_MAX (12+1)
|
# define FILENAME_MAX (12+1)
|
||||||
#elif defined(__LUNIX__)
|
#elif defined(__LUNIX__)
|
||||||
# define FILENAME_MAX (80+1)
|
# define FILENAME_MAX (80+1)
|
||||||
#else
|
#else
|
||||||
# define FILENAME_MAX (16+1)
|
# define FILENAME_MAX (16+1)
|
||||||
#endif
|
#endif
|
||||||
#define L_tmpnam FILENAME_MAX
|
#define L_tmpnam FILENAME_MAX
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,14 +132,14 @@ int __fastcall__ vsscanf (const char* s, const char* format, va_list ap);
|
||||||
int __fastcall__ vfscanf (FILE* f, const char* format, va_list ap);
|
int __fastcall__ vfscanf (FILE* f, const char* format, va_list ap);
|
||||||
|
|
||||||
#if __CC65_STD__ == __CC65_STD_CC65__
|
#if __CC65_STD__ == __CC65_STD_CC65__
|
||||||
FILE* __fastcall__ fdopen (int fd, const char* mode); /* Unix */
|
FILE* __fastcall__ fdopen (int fd, const char* mode); /* Unix */
|
||||||
int __fastcall__ fileno (FILE* f); /* Unix */
|
int __fastcall__ fileno (FILE* f); /* Unix */
|
||||||
#endif
|
#endif
|
||||||
void __fastcall__ _poserror (const char* msg); /* cc65 */
|
void __fastcall__ _poserror (const char* msg); /* cc65 */
|
||||||
|
|
||||||
/* Masking macros for some functions */
|
/* Masking macros for some functions */
|
||||||
#define getc(f) fgetc (f) /* ANSI */
|
#define getc(f) fgetc (f) /* ANSI */
|
||||||
#define putc(c, f) fputc (c, f) /* ANSI */
|
#define putc(c, f) fputc (c, f) /* ANSI */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* stdlib.h */
|
/* stdlib.h */
|
||||||
/* */
|
/* */
|
||||||
/* General utilities */
|
/* General utilities */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -45,8 +45,8 @@ typedef unsigned size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Standard exit codes */
|
/* Standard exit codes */
|
||||||
#define EXIT_SUCCESS 0
|
#define EXIT_SUCCESS 0
|
||||||
#define EXIT_FAILURE 1
|
#define EXIT_FAILURE 1
|
||||||
|
|
||||||
/* Return type of the div function */
|
/* Return type of the div function */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -94,7 +94,7 @@ size_t _heapmaxavail (void);
|
||||||
|
|
||||||
|
|
||||||
/* Random numbers */
|
/* Random numbers */
|
||||||
#define RAND_MAX 0x7FFF
|
#define RAND_MAX 0x7FFF
|
||||||
int rand (void);
|
int rand (void);
|
||||||
void __fastcall__ srand (unsigned seed);
|
void __fastcall__ srand (unsigned seed);
|
||||||
void _randomize (void); /* Non-standard */
|
void _randomize (void); /* Non-standard */
|
||||||
|
@ -107,12 +107,12 @@ int __fastcall__ atoi (const char* s);
|
||||||
long __fastcall__ atol (const char* s);
|
long __fastcall__ atol (const char* s);
|
||||||
int __fastcall__ atexit (void (*exitfunc) (void));
|
int __fastcall__ atexit (void (*exitfunc) (void));
|
||||||
void* __fastcall__ bsearch (const void* key, const void* base, size_t n,
|
void* __fastcall__ bsearch (const void* key, const void* base, size_t n,
|
||||||
size_t size, int (*cmp) (const void*, const void*));
|
size_t size, int (*cmp) (const void*, const void*));
|
||||||
div_t __fastcall__ div (int numer, int denom);
|
div_t __fastcall__ div (int numer, int denom);
|
||||||
void __fastcall__ exit (int ret) __attribute__ ((noreturn));
|
void __fastcall__ exit (int ret) __attribute__ ((noreturn));
|
||||||
char* __fastcall__ getenv (const char* name);
|
char* __fastcall__ getenv (const char* name);
|
||||||
void __fastcall__ qsort (void* base, size_t count, size_t size,
|
void __fastcall__ qsort (void* base, size_t count, size_t size,
|
||||||
int (*compare) (const void*, const void*));
|
int (*compare) (const void*, const void*));
|
||||||
long __fastcall__ strtol (const char* nptr, char** endptr, int base);
|
long __fastcall__ strtol (const char* nptr, char** endptr, int base);
|
||||||
unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base);
|
unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base);
|
||||||
int __fastcall__ system (const char* s);
|
int __fastcall__ system (const char* s);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* string.h */
|
/* string.h */
|
||||||
/* */
|
/* */
|
||||||
/* String handling */
|
/* String handling */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -72,7 +72,7 @@ void* __fastcall__ _bzero (void* ptr, size_t n);
|
||||||
/* Non standard: */
|
/* Non standard: */
|
||||||
#if __CC65_STD__ == __CC65_STD_CC65__
|
#if __CC65_STD__ == __CC65_STD_CC65__
|
||||||
void __fastcall__ bzero (void* ptr, size_t n); /* BSD */
|
void __fastcall__ bzero (void* ptr, size_t n); /* BSD */
|
||||||
char* __fastcall__ strdup (const char* s); /* SYSV/BSD */
|
char* __fastcall__ strdup (const char* s); /* SYSV/BSD */
|
||||||
int __fastcall__ stricmp (const char* s1, const char* s2); /* DOS/Windows */
|
int __fastcall__ stricmp (const char* s1, const char* s2); /* DOS/Windows */
|
||||||
int __fastcall__ strcasecmp (const char* s1, const char* s2); /* Same for Unix */
|
int __fastcall__ strcasecmp (const char* s1, const char* s2); /* Same for Unix */
|
||||||
int __fastcall__ strnicmp (const char* s1, const char* s2, size_t count); /* DOS/Windows */
|
int __fastcall__ strnicmp (const char* s1, const char* s2, size_t count); /* DOS/Windows */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* supervision.h */
|
/* supervision.h */
|
||||||
/* */
|
/* */
|
||||||
/* Supervision specific definitions */
|
/* Supervision specific definitions */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
@ -11,20 +11,20 @@
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided "as-is," without any expressed or implied */
|
/* This software is provided "as-is," without any expressed or implied */
|
||||||
/* warranty. In no event will the authors be held liable for any damages */
|
/* warranty. In no event will the authors be held liable for any damages */
|
||||||
/* arising from the use of this software. */
|
/* arising from the use of this software. */
|
||||||
/* */
|
/* */
|
||||||
/* Permission is granted to anyone to use this software for any purpose, */
|
/* Permission is granted to anyone to use this software for any purpose, */
|
||||||
/* including commercial applications, and to alter and redistribute it */
|
/* including commercial applications, and to alter and redistribute it */
|
||||||
/* freely, subject to the following restrictions: */
|
/* freely, subject to the following restrictions: */
|
||||||
/* */
|
/* */
|
||||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||||
/* claim that you wrote the original software. If you use this software */
|
/* claim that you wrote the original software. If you use this software */
|
||||||
/* in a product, an acknowledgment, in the product's documentation, */
|
/* in a product, an acknowledgment, in the product's documentation, */
|
||||||
/* would be appreciated, but is not required. */
|
/* would be appreciated, but is not required. */
|
||||||
/* 2. Alterred source versions must be marked plainly as such, */
|
/* 2. Alterred source versions must be marked plainly as such, */
|
||||||
/* and must not be misrepresented as being the original software. */
|
/* and must not be misrepresented as being the original software. */
|
||||||
/* 3. This notice may not be removed or alterred */
|
/* 3. This notice may not be removed or alterred */
|
||||||
/* from any source distribution. */
|
/* from any source distribution. */
|
||||||
/* */
|
/* */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,8 +89,8 @@ struct __sv_dma {
|
||||||
|
|
||||||
#define SV_BANK (*(unsigned char*)0x2026)
|
#define SV_BANK (*(unsigned char*)0x2026)
|
||||||
#define SV_BANK_COMBINE(nmi,irq_timer,irq_dma,lcd_on, timer_prescale, bank) \
|
#define SV_BANK_COMBINE(nmi,irq_timer,irq_dma,lcd_on, timer_prescale, bank) \
|
||||||
((nmi)?1:0)|((irq_timer)?2:0)|((irq_dma)?4:0)|((lcd_on)?8:0) \
|
((nmi)?1:0)|((irq_timer)?2:0)|((irq_dma)?4:0)|((lcd_on)?8:0) \
|
||||||
|((timer_prescale)?0x10:0)|((bank)<<5)
|
|((timer_prescale)?0x10:0)|((bank)<<5)
|
||||||
|
|
||||||
#define SV_VIDEO ((unsigned char*)0x4000)
|
#define SV_VIDEO ((unsigned char*)0x4000)
|
||||||
#define SV_TIMER_COUNT (*(unsigned char*)0x2023)
|
#define SV_TIMER_COUNT (*(unsigned char*)0x2023)
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ typedef long int off_t;
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ struct utsname {
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ typedef struct tgi_vectorfont tgi_vectorfont;
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Functions */
|
/* Functions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue