Removed (pretty inconsistently used) tab chars from source code base.

This commit is contained in:
Oliver Schmidt
2013-05-09 13:56:54 +02:00
parent 44fd1082ae
commit 85885001b1
1773 changed files with 62864 additions and 62868 deletions

View File

@@ -2,39 +2,39 @@
;-----------------------------------------------------------------------------
; Zero page stuff
WNDLFT := $20 ; Text window left
WNDWDTH := $21 ; Text window width
WNDTOP := $22 ; Text window top
WNDBTM := $23 ; Text window bottom+1
CH := $24 ; Cursor horizontal position
CV := $25 ; Cursor vertical position
BASL := $28 ; Text base address low
BASH := $29 ; Text base address high
INVFLG := $32 ; Normal/inverse(/flash)
PROMPT := $33 ; Used by GETLN
RNDL := $4E ; Random counter low
RNDH := $4F ; Random counter high
HIMEM := $73 ; Highest available memory address+1
WNDLFT := $20 ; Text window left
WNDWDTH := $21 ; Text window width
WNDTOP := $22 ; Text window top
WNDBTM := $23 ; Text window bottom+1
CH := $24 ; Cursor horizontal position
CV := $25 ; Cursor vertical position
BASL := $28 ; Text base address low
BASH := $29 ; Text base address high
INVFLG := $32 ; Normal/inverse(/flash)
PROMPT := $33 ; Used by GETLN
RNDL := $4E ; Random counter low
RNDH := $4F ; Random counter high
HIMEM := $73 ; Highest available memory address+1
;-----------------------------------------------------------------------------
; Vectors
DOSWARM := $03D0 ; DOS warmstart vector
BRKVec := $03F0 ; Break vector
SOFTEV := $03F2 ; Vector for warm start
PWREDUP := $03F4 ; This must be = EOR #$A5 of SOFTEV+1
DOSWARM := $03D0 ; DOS warmstart vector
BRKVec := $03F0 ; Break vector
SOFTEV := $03F2 ; Vector for warm start
PWREDUP := $03F4 ; This must be = EOR #$A5 of SOFTEV+1
;-----------------------------------------------------------------------------
; Hardware
; Keyboard input
KBD := $C000 ; Read keyboard
KBDSTRB := $C010 ; Clear keyboard strobe
KBD := $C000 ; Read keyboard
KBDSTRB := $C010 ; Clear keyboard strobe
; 80 column video switches
CLR80COL:= $C000 ; Disable 80 column store
SET80COL:= $C001 ; Enable 80 column store
RD80COL := $C018 ; >127 if 80 column store enabled
CLR80COL:= $C000 ; Disable 80 column store
SET80COL:= $C001 ; Enable 80 column store
RD80COL := $C018 ; >127 if 80 column store enabled
RD80VID := $C01F ; >127 if 80 column video enabled
; Character set switches
@@ -43,22 +43,22 @@ SETALTCHAR := $C00F ; Norm/inv LC, no flash
ALTCHARSET := $C01E ; >127 if alt charset switched in
; Language card switches
RDLCBNK2:= $C011 ; >127 if LC bank 2 in use
RDLCRAM := $C012 ; >127 if LC is read enabled
ROMIN := $C081 ; Swap in D000-FFFF ROM
LCBANK2 := $C083 ; Swap in LC bank 2
LCBANK1 := $C08B ; Swap in LC bank 1
RDLCBNK2:= $C011 ; >127 if LC bank 2 in use
RDLCRAM := $C012 ; >127 if LC is read enabled
ROMIN := $C081 ; Swap in D000-FFFF ROM
LCBANK2 := $C083 ; Swap in LC bank 2
LCBANK1 := $C08B ; Swap in LC bank 1
; Video mode switches
TXTCLR := $C050 ; Display graphics
TXTSET := $C051 ; Display text
MIXCLR := $C052 ; Disable 4 lines of text
MIXSET := $C053 ; Enable 4 lines of text
LOWSCR := $C054 ; Page 1
HISCR := $C055 ; Page 2
LORES := $C056 ; Lores graphics
HIRES := $C057 ; Hires graphics
TXTCLR := $C050 ; Display graphics
TXTSET := $C051 ; Display text
MIXCLR := $C052 ; Disable 4 lines of text
MIXSET := $C053 ; Enable 4 lines of text
LOWSCR := $C054 ; Page 1
HISCR := $C055 ; Page 2
LORES := $C056 ; Lores graphics
HIRES := $C057 ; Hires graphics
; Game controller
BUTN0 := $C061 ; Open-Apple Key
BUTN1 := $C062 ; Closed-Apple Key
BUTN0 := $C061 ; Open-Apple Key
BUTN1 := $C062 ; Closed-Apple Key

File diff suppressed because it is too large Load Diff

View File

@@ -7,193 +7,193 @@
; Zero page, Commodore stuff
TIME := $A0 ; 60HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
DEVNUM := $BA ; Device number
FNAM := $BB ; Address of filename
FNAM_BANK := $C7 ; Bank for filename
KEY_COUNT := $D0 ; Number of keys in input buffer
FKEY_COUNT := $D1 ; Characters for function key
MODE := $D7 ; 40/80 column mode flag
CURS_X := $EC ; Cursor column
CURS_Y := $EB ; Cursor row
SCREEN_PTR := $E0 ; Pointer to current char in text screen
CRAM_PTR := $E2 ; Pointer to current char in color RAM
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
DEVNUM := $BA ; Device number
FNAM := $BB ; Address of filename
FNAM_BANK := $C7 ; Bank for filename
KEY_COUNT := $D0 ; Number of keys in input buffer
FKEY_COUNT := $D1 ; Characters for function key
MODE := $D7 ; 40/80 column mode flag
CURS_X := $EC ; Cursor column
CURS_Y := $EB ; Cursor row
SCREEN_PTR := $E0 ; Pointer to current char in text screen
CRAM_PTR := $E2 ; Pointer to current char in color RAM
CHARCOLOR := $F1
RVS := $F3 ; Reverse output flag
SCROLL := $F8 ; Disable scrolling flag
SCROLL := $F8 ; Disable scrolling flag
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 162 ; Maximum length of command-line
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 162 ; Maximum length of command-line
FETCH := $2A2 ; Fetch subroutine in RAM
FETVEC := $2AA ; Vector patch location for FETCH
STASH := $2AF ; Stash routine in RAM
STAVEC := $2B9 ; Vector patch location for STASH
PALFLAG := $A03 ; $FF=PAL, $00=NTSC
INIT_STATUS := $A04 ; Flag: Reset/NMI Status
FKEY_LEN := $1000 ; Function key lengths
FKEY_TEXT := $100A ; Function key texts
INIT_STATUS := $A04 ; Flag: Reset/NMI Status
FKEY_LEN := $1000 ; Function key lengths
FKEY_TEXT := $100A ; Function key texts
; ---------------------------------------------------------------------------
; Kernal routines
; Direct entries
CURS_SET := $CD57
CURS_ON := $CD6F
CURS_SET := $CD57
CURS_ON := $CD6F
CURS_OFF := $CD9F
CLRSCR := $C142
KBDREAD := $C006
NEWLINE := $C363
PRINT := $C322
CLRSCR := $C142
KBDREAD := $C006
NEWLINE := $C363
PRINT := $C322
NMIEXIT := $FF33
INDFET := $FF74
; ---------------------------------------------------------------------------
; Vectors
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
KeyStoreVec := $033C
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
KeyStoreVec := $033C
; ---------------------------------------------------------------------------
; I/O: VIC
VIC := $D000
VIC_SPR0_X := $D000
VIC_SPR0_Y := $D001
VIC_SPR1_X := $D002
VIC_SPR1_Y := $D003
VIC_SPR2_X := $D004
VIC_SPR2_Y := $D005
VIC_SPR3_X := $D006
VIC_SPR3_Y := $D007
VIC_SPR4_X := $D008
VIC_SPR4_Y := $D009
VIC_SPR5_X := $D00A
VIC_SPR5_Y := $D00B
VIC_SPR6_X := $D00C
VIC_SPR6_Y := $D00D
VIC_SPR7_X := $D00E
VIC_SPR7_Y := $D00F
VIC_SPR_HI_X := $D010
VIC_SPR_ENA := $D015
VIC_SPR_EXP_Y := $D017
VIC_SPR_EXP_X := $D01D
VIC_SPR_MCOLOR := $D01C
VIC := $D000
VIC_SPR0_X := $D000
VIC_SPR0_Y := $D001
VIC_SPR1_X := $D002
VIC_SPR1_Y := $D003
VIC_SPR2_X := $D004
VIC_SPR2_Y := $D005
VIC_SPR3_X := $D006
VIC_SPR3_Y := $D007
VIC_SPR4_X := $D008
VIC_SPR4_Y := $D009
VIC_SPR5_X := $D00A
VIC_SPR5_Y := $D00B
VIC_SPR6_X := $D00C
VIC_SPR6_Y := $D00D
VIC_SPR7_X := $D00E
VIC_SPR7_Y := $D00F
VIC_SPR_HI_X := $D010
VIC_SPR_ENA := $D015
VIC_SPR_EXP_Y := $D017
VIC_SPR_EXP_X := $D01D
VIC_SPR_MCOLOR := $D01C
VIC_SPR_BG_PRIO := $D01B
VIC_SPR_MCOLOR0 := $D025
VIC_SPR_MCOLOR1 := $D026
VIC_SPR0_COLOR := $D027
VIC_SPR1_COLOR := $D028
VIC_SPR2_COLOR := $D029
VIC_SPR3_COLOR := $D02A
VIC_SPR4_COLOR := $D02B
VIC_SPR5_COLOR := $D02C
VIC_SPR6_COLOR := $D02D
VIC_SPR7_COLOR := $D02E
VIC_SPR0_COLOR := $D027
VIC_SPR1_COLOR := $D028
VIC_SPR2_COLOR := $D029
VIC_SPR3_COLOR := $D02A
VIC_SPR4_COLOR := $D02B
VIC_SPR5_COLOR := $D02C
VIC_SPR6_COLOR := $D02D
VIC_SPR7_COLOR := $D02E
VIC_CTRL1 := $D011
VIC_CTRL2 := $D016
VIC_CTRL1 := $D011
VIC_CTRL2 := $D016
VIC_HLINE := $D012
VIC_HLINE := $D012
VIC_VIDEO_ADR := $D018
VIC_VIDEO_ADR := $D018
VIC_IRR := $D019 ; Interrupt request register
VIC_IMR := $D01A ; Interrupt mask register
VIC_IRR := $D019 ; Interrupt request register
VIC_IMR := $D01A ; Interrupt mask register
VIC_BORDERCOLOR := $D020
VIC_BG_COLOR0 := $D021
VIC_BG_COLOR1 := $D022
VIC_BG_COLOR2 := $D023
VIC_BG_COLOR3 := $D024
VIC_BG_COLOR0 := $D021
VIC_BG_COLOR1 := $D022
VIC_BG_COLOR2 := $D023
VIC_BG_COLOR3 := $D024
; 128 stuff:
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
VIC_CLK_128 := $D030 ; Clock rate register (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)
; ---------------------------------------------------------------------------
; I/O: SID
SID := $D400
SID_S1Lo := $D400
SID_S1Hi := $D401
SID_PB1Lo := $D402
SID_PB1Hi := $D403
SID_Ctl1 := $D404
SID_AD1 := $D405
SID_SUR1 := $D406
SID := $D400
SID_S1Lo := $D400
SID_S1Hi := $D401
SID_PB1Lo := $D402
SID_PB1Hi := $D403
SID_Ctl1 := $D404
SID_AD1 := $D405
SID_SUR1 := $D406
SID_S2Lo := $D407
SID_S2Hi := $D408
SID_PB2Lo := $D409
SID_PB2Hi := $D40A
SID_Ctl2 := $D40B
SID_AD2 := $D40C
SID_SUR2 := $D40D
SID_S2Lo := $D407
SID_S2Hi := $D408
SID_PB2Lo := $D409
SID_PB2Hi := $D40A
SID_Ctl2 := $D40B
SID_AD2 := $D40C
SID_SUR2 := $D40D
SID_S3Lo := $D40E
SID_S3Hi := $D40F
SID_PB3Lo := $D410
SID_PB3Hi := $D411
SID_Ctl3 := $D412
SID_AD3 := $D413
SID_SUR3 := $D414
SID_S3Lo := $D40E
SID_S3Hi := $D40F
SID_PB3Lo := $D410
SID_PB3Hi := $D411
SID_Ctl3 := $D412
SID_AD3 := $D413
SID_SUR3 := $D414
SID_FltLo := $D415
SID_FltHi := $D416
SID_FltCtl := $D417
SID_Amp := $D418
SID_ADConv1 := $D419
SID_ADConv2 := $D41A
SID_Noise := $D41B
SID_Read3 := $D41C
SID_FltLo := $D415
SID_FltHi := $D416
SID_FltCtl := $D417
SID_Amp := $D418
SID_ADConv1 := $D419
SID_ADConv2 := $D41A
SID_Noise := $D41B
SID_Read3 := $D41C
; ---------------------------------------------------------------------------
; I/O: VDC (128 only)
VDC_INDEX := $D600
VDC_DATA := $D601
VDC_INDEX := $D600
VDC_DATA := $D601
; ---------------------------------------------------------------------------
; I/O: CIAs
CIA1 := $DC00
CIA1_PRA := $DC00
CIA1_PRB := $DC01
CIA1_DDRA := $DC02
CIA1_DDRB := $DC03
CIA1 := $DC00
CIA1_PRA := $DC00
CIA1_PRB := $DC01
CIA1_DDRA := $DC02
CIA1_DDRB := $DC03
CIA1_TOD10 := $DC08
CIA1_TODSEC := $DC09
CIA1_TODMIN := $DC0A
CIA1_TODHR := $DC0B
CIA1_ICR := $DC0D
CIA1_CRA := $DC0E
CIA1_CRB := $DC0F
CIA1_ICR := $DC0D
CIA1_CRA := $DC0E
CIA1_CRB := $DC0F
CIA2 := $DD00
CIA2_PRA := $DD00
CIA2_PRB := $DD01
CIA2_DDRA := $DD02
CIA2_DDRB := $DD03
CIA2 := $DD00
CIA2_PRA := $DD00
CIA2_PRB := $DD01
CIA2_DDRA := $DD02
CIA2_DDRB := $DD03
CIA2_TOD10 := $DD08
CIA2_TODSEC := $DD09
CIA2_TODMIN := $DD0A
CIA2_TODHR := $DD0B
CIA2_ICR := $DD0D
CIA2_CRA := $DD0E
CIA2_CRB := $DD0F
CIA2_ICR := $DD0D
CIA2_CRA := $DD0E
CIA2_CRB := $DD0F
; ---------------------------------------------------------------------------
; I/O: MMU
MMU_CR := $FF00
MMU_CR := $FF00
MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM
MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM
MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM
@@ -203,9 +203,9 @@ MMU_CFG_RAM3 := %11111111 ; Bank 3 full RAM
; ---------------------------------------------------------------------------
; Super CPU
SCPU_VIC_Bank1 := $D075
SCPU_Slow := $D07A
SCPU_Fast := $D07B
SCPU_VIC_Bank1 := $D075
SCPU_Slow := $D07A
SCPU_Fast := $D07B
SCPU_EnableRegs := $D07E
SCPU_DisableRegs:= $D07F
SCPU_Detect := $D0BC
SCPU_Detect := $D0BC

View File

@@ -7,43 +7,43 @@
; Zero page, Commodore stuff
TIME := $A0 ; 60 HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
DEVNUM := $BA ; Device number
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
DEVNUM := $BA ; Device number
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
CURS_FLAG := $CC ; 1 = cursor off
CURS_BLINK := $CD ; Blink counter
CURS_CHAR := $CE ; Character under the cursor
CURS_STATE := $CF ; Cursor blink state
SCREEN_PTR := $D1 ; Pointer to current char in text screen
CURS_X := $D3 ; Cursor column
CURS_Y := $D6 ; Cursor row
CRAM_PTR := $F3 ; Pointer to current char in color RAM
CURS_FLAG := $CC ; 1 = cursor off
CURS_BLINK := $CD ; Blink counter
CURS_CHAR := $CE ; Character under the cursor
CURS_STATE := $CF ; Cursor blink state
SCREEN_PTR := $D1 ; Pointer to current char in text screen
CURS_X := $D3 ; Cursor column
CURS_Y := $D6 ; Cursor row
CRAM_PTR := $F3 ; Pointer to current char in color RAM
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 89 ; Maximum length of command-line
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 89 ; Maximum length of command-line
CHARCOLOR := $286
CURS_COLOR := $287 ; Color under the cursor
PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC
CURS_COLOR := $287 ; Color under the cursor
PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC
; ---------------------------------------------------------------------------
; Kernal routines
; Direct entries
CLRSCR := $E544
KBDREAD := $E5B4
CLRSCR := $E544
KBDREAD := $E5B4
NMIEXIT := $FEBC
; ---------------------------------------------------------------------------
; Vector and other locations
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
; ---------------------------------------------------------------------------
; Screen size
@@ -54,157 +54,157 @@ YSIZE = 25
; ---------------------------------------------------------------------------
; I/O: VIC
VIC := $D000
VIC_SPR0_X := $D000
VIC_SPR0_Y := $D001
VIC_SPR1_X := $D002
VIC_SPR1_Y := $D003
VIC_SPR2_X := $D004
VIC_SPR2_Y := $D005
VIC_SPR3_X := $D006
VIC_SPR3_Y := $D007
VIC_SPR4_X := $D008
VIC_SPR4_Y := $D009
VIC_SPR5_X := $D00A
VIC_SPR5_Y := $D00B
VIC_SPR6_X := $D00C
VIC_SPR6_Y := $D00D
VIC_SPR7_X := $D00E
VIC_SPR7_Y := $D00F
VIC_SPR_HI_X := $D010
VIC_SPR_ENA := $D015
VIC_SPR_EXP_Y := $D017
VIC_SPR_EXP_X := $D01D
VIC_SPR_MCOLOR := $D01C
VIC := $D000
VIC_SPR0_X := $D000
VIC_SPR0_Y := $D001
VIC_SPR1_X := $D002
VIC_SPR1_Y := $D003
VIC_SPR2_X := $D004
VIC_SPR2_Y := $D005
VIC_SPR3_X := $D006
VIC_SPR3_Y := $D007
VIC_SPR4_X := $D008
VIC_SPR4_Y := $D009
VIC_SPR5_X := $D00A
VIC_SPR5_Y := $D00B
VIC_SPR6_X := $D00C
VIC_SPR6_Y := $D00D
VIC_SPR7_X := $D00E
VIC_SPR7_Y := $D00F
VIC_SPR_HI_X := $D010
VIC_SPR_ENA := $D015
VIC_SPR_EXP_Y := $D017
VIC_SPR_EXP_X := $D01D
VIC_SPR_MCOLOR := $D01C
VIC_SPR_BG_PRIO := $D01B
VIC_SPR_MCOLOR0 := $D025
VIC_SPR_MCOLOR1 := $D026
VIC_SPR0_COLOR := $D027
VIC_SPR1_COLOR := $D028
VIC_SPR2_COLOR := $D029
VIC_SPR3_COLOR := $D02A
VIC_SPR4_COLOR := $D02B
VIC_SPR5_COLOR := $D02C
VIC_SPR6_COLOR := $D02D
VIC_SPR7_COLOR := $D02E
VIC_SPR0_COLOR := $D027
VIC_SPR1_COLOR := $D028
VIC_SPR2_COLOR := $D029
VIC_SPR3_COLOR := $D02A
VIC_SPR4_COLOR := $D02B
VIC_SPR5_COLOR := $D02C
VIC_SPR6_COLOR := $D02D
VIC_SPR7_COLOR := $D02E
VIC_CTRL1 := $D011
VIC_CTRL2 := $D016
VIC_CTRL1 := $D011
VIC_CTRL2 := $D016
VIC_HLINE := $D012
VIC_HLINE := $D012
VIC_VIDEO_ADR := $D018
VIC_VIDEO_ADR := $D018
VIC_IRR := $D019 ; Interrupt request register
VIC_IMR := $D01A ; Interrupt mask register
VIC_IRR := $D019 ; Interrupt request register
VIC_IMR := $D01A ; Interrupt mask register
VIC_BORDERCOLOR := $D020
VIC_BG_COLOR0 := $D021
VIC_BG_COLOR1 := $D022
VIC_BG_COLOR2 := $D023
VIC_BG_COLOR3 := $D024
VIC_BG_COLOR0 := $D021
VIC_BG_COLOR1 := $D022
VIC_BG_COLOR2 := $D023
VIC_BG_COLOR3 := $D024
; 128 stuff:
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
VIC_CLK_128 := $D030 ; Clock rate register (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)
; ---------------------------------------------------------------------------
; I/O: SID
SID := $D400
SID_S1Lo := $D400
SID_S1Hi := $D401
SID_PB1Lo := $D402
SID_PB1Hi := $D403
SID_Ctl1 := $D404
SID_AD1 := $D405
SID_SUR1 := $D406
SID := $D400
SID_S1Lo := $D400
SID_S1Hi := $D401
SID_PB1Lo := $D402
SID_PB1Hi := $D403
SID_Ctl1 := $D404
SID_AD1 := $D405
SID_SUR1 := $D406
SID_S2Lo := $D407
SID_S2Hi := $D408
SID_PB2Lo := $D409
SID_PB2Hi := $D40A
SID_Ctl2 := $D40B
SID_AD2 := $D40C
SID_SUR2 := $D40D
SID_S2Lo := $D407
SID_S2Hi := $D408
SID_PB2Lo := $D409
SID_PB2Hi := $D40A
SID_Ctl2 := $D40B
SID_AD2 := $D40C
SID_SUR2 := $D40D
SID_S3Lo := $D40E
SID_S3Hi := $D40F
SID_PB3Lo := $D410
SID_PB3Hi := $D411
SID_Ctl3 := $D412
SID_AD3 := $D413
SID_SUR3 := $D414
SID_S3Lo := $D40E
SID_S3Hi := $D40F
SID_PB3Lo := $D410
SID_PB3Hi := $D411
SID_Ctl3 := $D412
SID_AD3 := $D413
SID_SUR3 := $D414
SID_FltLo := $D415
SID_FltHi := $D416
SID_FltCtl := $D417
SID_Amp := $D418
SID_ADConv1 := $D419
SID_ADConv2 := $D41A
SID_Noise := $D41B
SID_Read3 := $D41C
SID_FltLo := $D415
SID_FltHi := $D416
SID_FltCtl := $D417
SID_Amp := $D418
SID_ADConv1 := $D419
SID_ADConv2 := $D41A
SID_Noise := $D41B
SID_Read3 := $D41C
; ---------------------------------------------------------------------------
; I/O: VDC (128 only)
VDC_INDEX := $D600
VDC_DATA := $D601
VDC_INDEX := $D600
VDC_DATA := $D601
; ---------------------------------------------------------------------------
; I/O: CIAs
CIA1 := $DC00
CIA1_PRA := $DC00
CIA1_PRB := $DC01
CIA1_DDRA := $DC02
CIA1_DDRB := $DC03
CIA1 := $DC00
CIA1_PRA := $DC00
CIA1_PRB := $DC01
CIA1_DDRA := $DC02
CIA1_DDRB := $DC03
CIA1_TOD10 := $DC08
CIA1_TODSEC := $DC09
CIA1_TODMIN := $DC0A
CIA1_TODHR := $DC0B
CIA1_ICR := $DC0D
CIA1_CRA := $DC0E
CIA1_CRB := $DC0F
CIA1_ICR := $DC0D
CIA1_CRA := $DC0E
CIA1_CRB := $DC0F
CIA2 := $DD00
CIA2_PRA := $DD00
CIA2_PRB := $DD01
CIA2_DDRA := $DD02
CIA2_DDRB := $DD03
CIA2 := $DD00
CIA2_PRA := $DD00
CIA2_PRB := $DD01
CIA2_DDRA := $DD02
CIA2_DDRB := $DD03
CIA2_TOD10 := $DD08
CIA2_TODSEC := $DD09
CIA2_TODMIN := $DD0A
CIA2_TODHR := $DD0B
CIA2_ICR := $DD0D
CIA2_CRA := $DD0E
CIA2_CRB := $DD0F
CIA2_ICR := $DD0D
CIA2_CRA := $DD0E
CIA2_CRB := $DD0F
; ---------------------------------------------------------------------------
; Super CPU
SCPU_VIC_Bank1 := $D075
SCPU_Slow := $D07A
SCPU_Fast := $D07B
SCPU_VIC_Bank1 := $D075
SCPU_Slow := $D07A
SCPU_Fast := $D07B
SCPU_EnableRegs := $D07E
SCPU_DisableRegs:= $D07F
SCPU_Detect := $D0BC
SCPU_Detect := $D0BC
; ---------------------------------------------------------------------------
; Processor Port at $01
LORAM = $01 ; Enable the basic rom
HIRAM = $02 ; Enable the kernal rom
IOEN = $04 ; Enable I/O
CASSDATA = $08 ; Cassette data
CASSPLAY = $10 ; Cassette: Play
CASSMOT = $20 ; Cassette motor on
TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode
LORAM = $01 ; Enable the basic rom
HIRAM = $02 ; Enable the kernal rom
IOEN = $04 ; Enable I/O
CASSDATA = $08 ; Cassette data
CASSPLAY = $10 ; Cassette: Play
CASSMOT = $20 ; Cassette motor on
TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode
RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF
RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF

View File

@@ -9,8 +9,8 @@
;-----------------------------------------------------------------------------
; Zeropage stuff
ExecReg = $00
IndReg = $01
ExecReg = $00
IndReg = $01
; ---------------------------------------------------------------------------
; Screen size
@@ -23,93 +23,93 @@ YSIZE = 25
; I/O $d800: VIC
VIC_SPR0_X = $00
VIC_SPR0_Y = $01
VIC_SPR1_X = $02
VIC_SPR1_Y = $03
VIC_SPR2_X = $04
VIC_SPR2_Y = $05
VIC_SPR3_X = $06
VIC_SPR3_Y = $07
VIC_SPR4_X = $08
VIC_SPR4_Y = $09
VIC_SPR5_X = $0A
VIC_SPR5_Y = $0B
VIC_SPR6_X = $0C
VIC_SPR6_Y = $0D
VIC_SPR7_X = $0E
VIC_SPR7_Y = $0F
VIC_SPR_HI_X = $10
VIC_SPR_ENA = $15
VIC_SPR_EXP_Y = $17
VIC_SPR_EXP_X = $1D
VIC_SPR_MCOLOR = $1C
VIC_SPR0_X = $00
VIC_SPR0_Y = $01
VIC_SPR1_X = $02
VIC_SPR1_Y = $03
VIC_SPR2_X = $04
VIC_SPR2_Y = $05
VIC_SPR3_X = $06
VIC_SPR3_Y = $07
VIC_SPR4_X = $08
VIC_SPR4_Y = $09
VIC_SPR5_X = $0A
VIC_SPR5_Y = $0B
VIC_SPR6_X = $0C
VIC_SPR6_Y = $0D
VIC_SPR7_X = $0E
VIC_SPR7_Y = $0F
VIC_SPR_HI_X = $10
VIC_SPR_ENA = $15
VIC_SPR_EXP_Y = $17
VIC_SPR_EXP_X = $1D
VIC_SPR_MCOLOR = $1C
VIC_SPR_BG_PRIO = $1B
VIC_SPR_MCOLOR0 = $25
VIC_SPR_MCOLOR1 = $26
VIC_SPR0_COLOR = $27
VIC_SPR1_COLOR = $28
VIC_SPR2_COLOR = $29
VIC_SPR3_COLOR = $2A
VIC_SPR4_COLOR = $2B
VIC_SPR5_COLOR = $2C
VIC_SPR6_COLOR = $2D
VIC_SPR7_COLOR = $2E
VIC_SPR0_COLOR = $27
VIC_SPR1_COLOR = $28
VIC_SPR2_COLOR = $29
VIC_SPR3_COLOR = $2A
VIC_SPR4_COLOR = $2B
VIC_SPR5_COLOR = $2C
VIC_SPR6_COLOR = $2D
VIC_SPR7_COLOR = $2E
VIC_CTRL1 = $11
VIC_CTRL2 = $16
VIC_CTRL1 = $11
VIC_CTRL2 = $16
VIC_HLINE = $12
VIC_HLINE = $12
VIC_VIDEO_ADR = $18
VIC_VIDEO_ADR = $18
VIC_IRR = $19 ; Interrupt request register
VIC_IMR = $1A ; Interrupt mask register
VIC_IRR = $19 ; Interrupt request register
VIC_IMR = $1A ; Interrupt mask register
VIC_BORDERCOLOR = $20
VIC_BG_COLOR0 = $21
VIC_BG_COLOR1 = $22
VIC_BG_COLOR2 = $23
VIC_BG_COLOR3 = $24
VIC_BG_COLOR0 = $21
VIC_BG_COLOR1 = $22
VIC_BG_COLOR2 = $23
VIC_BG_COLOR3 = $24
; I/O $da00: SID 6581
SID_S1Lo = $00
SID_S1Hi = $01
SID_PB1Lo = $02
SID_PB1Hi = $03
SID_Ctl1 = $04
SID_AD1 = $05
SID_SUR1 = $06
SID_S1Lo = $00
SID_S1Hi = $01
SID_PB1Lo = $02
SID_PB1Hi = $03
SID_Ctl1 = $04
SID_AD1 = $05
SID_SUR1 = $06
SID_S2Lo = $07
SID_S2Hi = $08
SID_PB2Lo = $09
SID_PB2Hi = $0A
SID_Ctl2 = $0B
SID_AD2 = $0C
SID_SUR2 = $0D
SID_S2Lo = $07
SID_S2Hi = $08
SID_PB2Lo = $09
SID_PB2Hi = $0A
SID_Ctl2 = $0B
SID_AD2 = $0C
SID_SUR2 = $0D
SID_S3Lo = $0E
SID_S3Hi = $0F
SID_PB3Lo = $10
SID_PB3Hi = $11
SID_Ctl3 = $12
SID_AD3 = $13
SID_SUR3 = $14
SID_S3Lo = $0E
SID_S3Hi = $0F
SID_PB3Lo = $10
SID_PB3Hi = $11
SID_Ctl3 = $12
SID_AD3 = $13
SID_SUR3 = $14
SID_FltLo = $15
SID_FltHi = $16
SID_FltCtl = $17
SID_Amp = $18
SID_ADConv1 = $19
SID_ADConv2 = $1A
SID_Noise = $1B
SID_Read3 = $1C
SID_FltLo = $15
SID_FltHi = $16
SID_FltCtl = $17
SID_Amp = $18
SID_ADConv1 = $19
SID_ADConv2 = $1A
SID_Noise = $1B
SID_Read3 = $1C
; I/O $db00: CIA 6526 Inter Process Communication
@@ -178,5 +178,5 @@ SID_Read3 = $1C
; Out video memory address
COLOR_RAM = $D400 ; System bank
COLOR_RAM = $D400 ; System bank

View File

@@ -9,8 +9,8 @@
; ---------------------------------------------------------------------------
; Zeropage stuff
ExecReg = $00
IndReg = $01
ExecReg = $00
IndReg = $01
; ---------------------------------------------------------------------------
; Screen size
@@ -25,13 +25,13 @@ YSIZE = 25
; I/O $d800: CRTC 6545
.struct CRTC
ADDR .byte
DATA .byte
ADDR .byte
DATA .byte
.endstruct
; I/O $db00: CIA 6526 Inter Process Communication
;
; IPCcia = $db00
; IPCcia = $db00
.struct CIA
PRA .byte
@@ -65,13 +65,13 @@ YSIZE = 25
; I/O $dc00: CIA 6526
;
; cia = $dc00
; cia = $dc00
; I/O $dd00: ACIA 6551
;
; acia = $dd00
; acia = $dd00
.struct ACIA
DATA .byte
@@ -83,7 +83,7 @@ YSIZE = 25
; I/O $de00: Triport #1 6525
;
; tpi1 = $de00
; tpi1 = $de00
.struct TPI
PRA .byte
@@ -105,6 +105,6 @@ YSIZE = 25
; I/O $df00: Triport #2 6525
; tpi2 = $df00
; tpi2 = $df00

View File

@@ -6,24 +6,24 @@
; Make the __ctype table an exported/imported symbol
.global __ctype
.global __ctype
; Define bitmapped constants for the table entries
CT_NONE = $00 ; Nothing special
CT_LOWER = $01 ; 0 - Lower case char
CT_UPPER = $02 ; 1 - Upper case char
CT_DIGIT = $04 ; 2 - Numeric digit
CT_XDIGIT = $08 ; 3 - Hex digit (both, lower and upper)
CT_CTRL = $10 ; 4 - Control character
CT_SPACE = $20 ; 5 - The space character itself
CT_OTHER_WS = $40 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
CT_SPACE_TAB = $80 ; 7 - Space or tab character
CT_LOWER = $01 ; 0 - Lower case char
CT_UPPER = $02 ; 1 - Upper case char
CT_DIGIT = $04 ; 2 - Numeric digit
CT_XDIGIT = $08 ; 3 - Hex digit (both, lower and upper)
CT_CTRL = $10 ; 4 - Control character
CT_SPACE = $20 ; 5 - The space character itself
CT_OTHER_WS = $40 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
CT_SPACE_TAB = $80 ; 7 - Space or tab character
; Combined stuff
CT_ALNUM = (CT_LOWER | CT_UPPER | CT_DIGIT)
CT_ALPHA = (CT_LOWER | CT_UPPER)
CT_CTRL_SPACE = (CT_CTRL | CT_SPACE)
CT_NOT_PUNCT = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)
CT_ALNUM = (CT_LOWER | CT_UPPER | CT_DIGIT)
CT_ALPHA = (CT_LOWER | CT_UPPER)
CT_CTRL_SPACE = (CT_CTRL | CT_SPACE)
CT_NOT_PUNCT = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)

View File

@@ -36,19 +36,19 @@
;------------------------------------------------------------------------------
; The driver header
.struct EMD_HDR
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
VERSION .byte 1 ; Interface version
JUMPTAB .struct
INSTALL .word ; INSTALL routine
UNINSTALL .word ; UNINSTALL routine
PAGECOUNT .word ; PAGECOUNT routine
MAP .word ; MAP routine
USE .word ; USE routine
MAPCLEAN .word ; MAPCLEAN routine
COPYFROM .word ; COPYFROM routine
COPYTO .word ; COPYTO routine
.endstruct
.struct EMD_HDR
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
VERSION .byte 1 ; Interface version
JUMPTAB .struct
INSTALL .word ; INSTALL routine
UNINSTALL .word ; UNINSTALL routine
PAGECOUNT .word ; PAGECOUNT routine
MAP .word ; MAP routine
USE .word ; USE routine
MAPCLEAN .word ; MAPCLEAN routine
COPYFROM .word ; COPYFROM routine
COPYTO .word ; COPYTO routine
.endstruct
.endstruct
;------------------------------------------------------------------------------
@@ -59,18 +59,18 @@ EMD_API_VERSION = $00
;------------------------------------------------------------------------------
; The asm equivalent to the C em_copy structure
.struct EM_COPY
BUF .word ; Memory buffer to copy from or to
OFFS .byte ; Offset into page
PAGE .word ; Starting page to copy from or to
COUNT .word ; Number of bytes to copy
UNUSED .byte ; Make the size 8 bytes
.struct EM_COPY
BUF .word ; Memory buffer to copy from or to
OFFS .byte ; Offset into page
PAGE .word ; Starting page to copy from or to
COUNT .word ; Number of bytes to copy
UNUSED .byte ; Make the size 8 bytes
.endstruct
;------------------------------------------------------------------------------
; Variables
.global _em_drv ; Pointer to driver
.global _em_drv ; Pointer to driver
;------------------------------------------------------------------------------
; Driver entry points
@@ -81,25 +81,25 @@ EMD_API_VERSION = $00
.global emd_map
.global emd_use
.global emd_commit
.global emd_copyfrom
.global emd_copyfrom
.global emd_copyto
;------------------------------------------------------------------------------
; ASM functions
.global em_clear_ptr
.global em_clear_ptr
;------------------------------------------------------------------------------
; C callable functions
.global _em_load_driver
.global _em_unload
.global _em_install
.global _em_uninstall
.global _em_pagecount
.global _em_map
.global _em_use
.global _em_commit
.global _em_copyfrom
.global _em_copyto
.global _em_load_driver
.global _em_unload
.global _em_install
.global _em_uninstall
.global _em_pagecount
.global _em_map
.global _em_use
.global _em_commit
.global _em_copyfrom
.global _em_copyto

View File

@@ -12,23 +12,23 @@
; Error codes, must match the values in the C headers
.enum
EOK ; No error
ENOENT ; No such file or directory
ENOMEM ; Out of memory
EACCES ; Permission denied
ENODEV ; No such device
EMFILE ; Too many open files
EBUSY ; Device or resource busy
EINVAL ; Invalid argument
ENOSPC ; No space left on device
EEXIST ; File exists
EAGAIN ; Try again
EIO ; I/O error
EINTR ; Interrupted system call
ENOSYS ; Function not implemented
ESPIPE ; Illegal seek
ENOENT ; No such file or directory
ENOMEM ; Out of memory
EACCES ; Permission denied
ENODEV ; No such device
EMFILE ; Too many open files
EBUSY ; Device or resource busy
EINVAL ; Invalid argument
ENOSPC ; No space left on device
EEXIST ; File exists
EAGAIN ; Try again
EIO ; I/O error
EINTR ; Interrupted system call
ENOSYS ; Function not implemented
ESPIPE ; Illegal seek
ERANGE ; Range error
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
.endenum

View File

@@ -8,12 +8,12 @@ STDOUT_FILENO = 1
STDERR_FILENO = 2
; File mode constants, must match the values in the C headers
O_RDONLY = $01
O_WRONLY = $02
O_RDWR = $03
O_CREAT = $10
O_TRUNC = $20
O_APPEND = $40
O_RDONLY = $01
O_WRONLY = $02
O_RDWR = $03
O_CREAT = $10
O_TRUNC = $20
O_APPEND = $40
O_EXCL = $80

View File

@@ -40,16 +40,16 @@
; Driver header stuff
.struct JOY_HDR
ID .byte 3 ; $6A, $6F, $79 ("joy")
VERSION .byte 1 ; Interface version
MASKS .byte 8 ; Joystick state mask array
JUMPTAB .struct
INSTALL .word ; INSTALL routine
UNINSTALL .word ; UNINSTALL routine
COUNT .word ; COUNT routine
READ .word ; READ routine
ID .byte 3 ; $6A, $6F, $79 ("joy")
VERSION .byte 1 ; Interface version
MASKS .byte 8 ; Joystick state mask array
JUMPTAB .struct
INSTALL .word ; INSTALL routine
UNINSTALL .word ; UNINSTALL routine
COUNT .word ; COUNT routine
READ .word ; READ routine
IRQ .word ; IRQ routine
.endstruct
.endstruct
.endstruct
;------------------------------------------------------------------------------
@@ -60,7 +60,7 @@ JOY_API_VERSION = $01
;------------------------------------------------------------------------------
; Variables
.global _joy_drv ; Pointer to driver
.global _joy_drv ; Pointer to driver
.global _joy_masks
;------------------------------------------------------------------------------
@@ -76,10 +76,10 @@ JOY_API_VERSION = $01
.global _joy_load_driver
.global _joy_unload
.global _joy_install
.global _joy_uninstall
.global _joy_count
.global _joy_read
.global _joy_install
.global _joy_uninstall
.global _joy_count
.global _joy_read
.global _joy_clear_ptr

View File

@@ -63,7 +63,7 @@
; /* Free a loaded module. Note: The given pointer is the pointer to the
; * module memory, not a pointer to a control structure.
; */
.global _mod_free
.global _mod_free
; Errors
.enum

View File

@@ -2,7 +2,7 @@
;/* */
;/* mouse-kernel.inc */
;/* */
;/* Mouse API */
;/* Mouse API */
;/* */
;/* */
;/* */
@@ -53,23 +53,23 @@
;------------------------------------------------------------------------------
; The driver header
.struct MOUSE_HDR
ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
VERSION .byte 1 ; Interface version
JUMPTAB .struct
INSTALL .addr
UNINSTALL .addr
HIDE .addr
SHOW .addr
SETBOX .addr
GETBOX .addr
MOVE .addr
BUTTONS .addr
POS .addr
.struct MOUSE_HDR
ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
VERSION .byte 1 ; Interface version
JUMPTAB .struct
INSTALL .addr
UNINSTALL .addr
HIDE .addr
SHOW .addr
SETBOX .addr
GETBOX .addr
MOVE .addr
BUTTONS .addr
POS .addr
INFO .addr
IOCTL .addr
IRQ .addr
.endstruct
IRQ .addr
.endstruct
FLAGS .byte ; Mouse driver flags
CALLBACKS .struct ; Jump instructions
.byte ; JMP opcode
@@ -86,10 +86,10 @@
;------------------------------------------------------------------------------
; The mouse callback structure
.struct MOUSE_CALLBACKS
HIDE .addr ; Hide the mouse cursor
SHOW .addr ; Show the mouse cursor
MOVEX .addr ; Move the mouse cursor
.struct MOUSE_CALLBACKS
HIDE .addr ; Hide the mouse cursor
SHOW .addr ; Show the mouse cursor
MOVEX .addr ; Move the mouse cursor
MOVEY .addr ; Dito for Y
.endstruct
@@ -112,7 +112,7 @@ MOUSE_FLAG_LATE_IRQ = $80 ; Enable IRQ *after* calling INSTALL
;------------------------------------------------------------------------------
; Mouse button definitions
MOUSE_BTN_LEFT = $10
MOUSE_BTN_LEFT = $10
MOUSE_BTN_RIGHT = $01
;------------------------------------------------------------------------------
@@ -129,16 +129,16 @@ MOUSE_BTN_RIGHT = $01
.endstruct
.struct MOUSE_BOX
MINX .word
MINY .word
MAXX .word
MAXY .word
MINX .word
MINY .word
MAXX .word
MAXY .word
.endstruct
;------------------------------------------------------------------------------
; Variables
.global _mouse_drv ; Pointer to driver
.global _mouse_drv ; Pointer to driver
.global _mouse_hidden ; Counter, 0 = mouse is visible
;------------------------------------------------------------------------------
@@ -152,14 +152,14 @@ MOUSE_BTN_RIGHT = $01
.global _mouse_hide
.global _mouse_show
.global _mouse_setbox
.global _mouse_getbox
.global _mouse_getbox
.global _mouse_move
.global _mouse_buttons
.global _mouse_pos
.global _mouse_info
.global _mouse_ioctl
.global _mouse_clear_ptr
.global _mouse_clear_ptr
;------------------------------------------------------------------------------
; Driver entry points (asm callable)
@@ -168,8 +168,8 @@ MOUSE_BTN_RIGHT = $01
.global mouse_uninstall
.global mouse_hide
.global mouse_show
.global mouse_setbox
.global mouse_getbox
.global mouse_setbox
.global mouse_getbox
.global mouse_move
.global mouse_buttons
.global mouse_pos

View File

@@ -5,17 +5,17 @@
;; FIXME: optimize zeropage usage
SCREEN_PTR = $62 ;2
SCREEN_PTR = $62 ;2
CRAM_PTR = $64 ;2
CHARCOLOR = $66
BGCOLOR = $67
RVS = $68
CURS_X = $69
CURS_Y = $6a
CHARCOLOR = $66
BGCOLOR = $67
RVS = $68
CURS_X = $69
CURS_Y = $6a
tickcount = $6b ;2
VBLANK_FLAG = $70
VBLANK_FLAG = $70
ringbuff = $0200
ringwrite = $71
@@ -26,20 +26,20 @@ ppuhi = $74
ppulo = $75
ppuval = $76
screenrows = (30-1)
screenrows = (30-1)
charsperline = 32
xsize = charsperline
;; PPU defines
PPU_CTRL1 = $2000
PPU_CTRL2 = $2001
PPU_STATUS = $2002
PPU_SPR_ADDR = $2003
PPU_SPR_IO = $2004
PPU_VRAM_ADDR1 = $2005
PPU_VRAM_ADDR2 = $2006
PPU_VRAM_IO = $2007
PPU_CTRL1 = $2000
PPU_CTRL2 = $2001
PPU_STATUS = $2002
PPU_SPR_ADDR = $2003
PPU_SPR_IO = $2004
PPU_VRAM_ADDR1 = $2005
PPU_VRAM_ADDR2 = $2006
PPU_VRAM_IO = $2007
;; APU defines
@@ -63,30 +63,30 @@ APU_MODCTRL = $4010 ; Delta Modulation Control Register (W)
APU_MODDA = $4011 ; Delta Modulation D/A Register (W)
APU_MODADDR = $4012 ; Delta Modulation Address Register (W)
APU_MODLEN = $4013 ; Delta Modulation Data Length Register (W)
APU_SPR_DMA = $4014 ; Sprite DMA Register (W)
APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R)
APU_PAD1 = $4016 ; Joypad #1 (RW)
APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW)
APU_SPR_DMA = $4014 ; Sprite DMA Register (W)
APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R)
APU_PAD1 = $4016 ; Joypad #1 (RW)
APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW)
CH_HLINE = 11
CH_VLINE = 14
CH_ULCORNER = 176
CH_URCORNER = 174
CH_LLCORNER = 173
CH_LRCORNER = 189
CH_TTEE = 178
CH_RTEE = 179
CH_BTEE = 177
CH_LTEE = 171
CH_CROSS = 123
CH_CURS_UP = 145
CH_CURS_DOWN = 17
CH_CURS_LEFT = 157
CH_CURS_RIGHT = 29
CH_PI = 126
CH_DEL = 20
CH_INS = 148
CH_HLINE = 11
CH_VLINE = 14
CH_ULCORNER = 176
CH_URCORNER = 174
CH_LLCORNER = 173
CH_LRCORNER = 189
CH_TTEE = 178
CH_RTEE = 179
CH_BTEE = 177
CH_LTEE = 171
CH_CROSS = 123
CH_CURS_UP = 145
CH_CURS_DOWN = 17
CH_CURS_LEFT = 157
CH_CURS_RIGHT = 29
CH_PI = 126
CH_DEL = 20
CH_INS = 148
CH_ENTER = 10
CH_STOP = 3
CH_ESC = 27

View File

@@ -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
; 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_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
; 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_65SC02 = $0020 ; Executable is for 65SC02
O65_CPU2_65CE02 = $0030 ; Executable is for 65CE02
@@ -127,14 +127,14 @@ O65_SEGID_MASK = $07
; Option tags
O65_OPT_FILENAME = 0
O65_OPT_OS = 1
O65_OPT_ASM = 2
O65_OPT_AUTHOR = 3
O65_OPT_TIMESTAMP = 4
O65_OPT_OS = 1
O65_OPT_ASM = 2
O65_OPT_AUTHOR = 3
O65_OPT_TIMESTAMP = 4
; Operating system codes for O65_OPT_OS
O65_OS_OSA65 = 1
O65_OS_LUNIX = 2
O65_OS_OSA65 = 1
O65_OS_LUNIX = 2
O65_OS_CC65 = 3
O65_OS_OPENCBM = 4

View File

@@ -6,25 +6,25 @@
; ---------------------------------------------------------------------------
; Zero page, Commodore stuff
MEMSIZE := $34 ; Size of memory installed
MEMSIZE := $34 ; Size of memory installed
TIME := $8D ; 60HZ clock
KEY_COUNT := $9E ; Number of keys in input buffer
RVS := $9F ; Reverse flag
CURS_FLAG := $A7 ; 1 = cursor off
CURS_BLINK := $A8 ; Blink counter
CURS_CHAR := $A9 ; Character under the cursor
CURS_STATE := $AA ; Cursor blink state
SCREEN_PTR := $C4 ; Pointer to current char in text screen
CURS_X := $C6 ; Cursor column
KEY_COUNT := $9E ; Number of keys in input buffer
RVS := $9F ; Reverse flag
CURS_FLAG := $A7 ; 1 = cursor off
CURS_BLINK := $A8 ; Blink counter
CURS_CHAR := $A9 ; Character under the cursor
CURS_STATE := $AA ; Cursor blink state
SCREEN_PTR := $C4 ; Pointer to current char in text screen
CURS_X := $C6 ; Cursor column
FNLEN := $D1 ; Length of filename
LFN := $D2 ; Current Logical File Number
SECADR := $D3 ; Secondary address
DEVNUM := $D4 ; Device number
SCR_LINELEN := $D5 ; Screen line length
CURS_Y := $D8 ; Cursor row
SECADR := $D3 ; Secondary address
DEVNUM := $D4 ; Device number
SCR_LINELEN := $D5 ; Screen line length
CURS_Y := $D8 ; Cursor row
FNADR := $DA ; Pointer to file name
KEY_BUF := $26F ; Keyboard buffer
KEY_BUF := $26F ; Keyboard buffer
;----------------------------------------------------------------------------
; PET ROM type detection
@@ -38,17 +38,17 @@ PET_4000 = $FD
;----------------------------------------------------------------------------
; Vector and other locations
IRQVec := $0090
BRKVec := $0092
NMIVec := $0094
IRQVec := $0090
BRKVec := $0092
NMIVec := $0094
; ---------------------------------------------------------------------------
; I/O: 6522 VIA2
VIA := $E840
VIA := $E840
VIA_PRB := $E840
VIA_PRA := $E841
VIA_DDRB := $E842
VIA_DDRA := $E843
VIA_DDRB := $E842
VIA_DDRA := $E843

View File

@@ -8,41 +8,41 @@
TMPPTR := $22 ; Temporary ptr used by BASIC
TIME := $A3 ; 60HZ clock
FNAM_LEN := $AB ; Length of filename
FNAM_LEN := $AB ; Length of filename
LFN := $AC ; Logical file number
SECADR := $AD ; Secondary address
DEVNUM := $AE ; Device number
SECADR := $AD ; Secondary address
DEVNUM := $AE ; Device number
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
CURS_X := $CA ; Cursor column
CURS_Y := $CD ; Cursor row
SCREEN_PTR := $C8 ; Pointer to current char in text screen
CRAM_PTR := $EA ; Pointer to current char in color RAM
CURS_X := $CA ; Cursor column
CURS_Y := $CD ; Cursor row
SCREEN_PTR := $C8 ; Pointer to current char in text screen
CRAM_PTR := $EA ; Pointer to current char in color RAM
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 89 ; Maximum length of command-line
BASIC_BUF := $200 ; Location 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
CHARCOLOR := $53B
FKEY_COUNT := $55D ; Characters for function key
FKEY_SPACE := $55F ; Function key definitions
FKEY_ORIG := $F3D2 ; Original definitions
FKEY_COUNT := $55D ; Characters for function key
FKEY_SPACE := $55F ; Function key definitions
FKEY_ORIG := $F3D2 ; Original definitions
; ---------------------------------------------------------------------------
; Kernal routines
; Direct entries
CLRSCR := $D88B
KBDREAD := $D8C1
CLRSCR := $D88B
KBDREAD := $D8C1
; ---------------------------------------------------------------------------
; Vector and other locations
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
; ---------------------------------------------------------------------------
; Screen size
@@ -53,29 +53,29 @@ YSIZE = 25
; ---------------------------------------------------------------------------
; I/O
TED_T1LO := $FF00
TED_T1HI := $FF01
TED_T2LO := $FF02
TED_T2HI := $FF03
TED_T3LO := $FF04
TED_T4HI := $FF05
TED_T1LO := $FF00
TED_T1HI := $FF01
TED_T2LO := $FF02
TED_T2HI := $FF03
TED_T3LO := $FF04
TED_T4HI := $FF05
TED_MULTI1 := $FF07
TED_KBD := $FF08
TED_CURSHI := $FF0C
TED_CURSLO := $FF0D
TED_V1FRQLO := $FF0E
TED_V2FRQLO := $FF0F
TED_V2FRQHI := $FF10
TED_BGCOLOR := $FF15
TED_COLOR1 := $FF16
TED_COLOR2 := $FF17
TED_COLOR3 := $FF18
TED_BORDERCOLOR := $FF19
TED_VLINEHI := $FF1C
TED_VLINELO := $FF1D
TED_HPOS := $FF1E
TED_ROMSEL := $FF3E
TED_RAMSEL := $FF3F
TED_KBD := $FF08
TED_CURSHI := $FF0C
TED_CURSLO := $FF0D
TED_V1FRQLO := $FF0E
TED_V2FRQLO := $FF0F
TED_V2FRQHI := $FF10
TED_BGCOLOR := $FF15
TED_COLOR1 := $FF16
TED_COLOR2 := $FF17
TED_COLOR3 := $FF18
TED_BORDERCOLOR := $FF19
TED_VLINEHI := $FF1C
TED_VLINELO := $FF1D
TED_HPOS := $FF1E
TED_ROMSEL := $FF3E
TED_RAMSEL := $FF3F
; ---------------------------------------------------------------------------
; RAM/ROM selection addresses

View File

@@ -48,7 +48,7 @@
PUT .word ; PUT routine
STATUS .word ; STATUS routine
IOCTL .word ; IOCTL routine
IRQ .word ; IRQ routine
IRQ .word ; IRQ routine
.endstruct
.endstruct
@@ -74,44 +74,44 @@ SER_API_VERSION = $00
; Baudrate
SER_BAUD_45_5 = $00
SER_BAUD_50 = $01
SER_BAUD_50 = $01
SER_BAUD_75 = $02
SER_BAUD_110 = $03
SER_BAUD_134_5 = $04
SER_BAUD_110 = $03
SER_BAUD_134_5 = $04
SER_BAUD_150 = $05
SER_BAUD_300 = $06
SER_BAUD_600 = $07
SER_BAUD_1200 = $08
SER_BAUD_300 = $06
SER_BAUD_600 = $07
SER_BAUD_1200 = $08
SER_BAUD_1800 = $09
SER_BAUD_2400 = $0A
SER_BAUD_2400 = $0A
SER_BAUD_3600 = $0B
SER_BAUD_4800 = $0C
SER_BAUD_4800 = $0C
SER_BAUD_7200 = $0D
SER_BAUD_9600 = $0E
SER_BAUD_19200 = $0F
SER_BAUD_38400 = $10
SER_BAUD_57600 = $11
SER_BAUD_115200 = $12
SER_BAUD_230400 = $13
SER_BAUD_31250 = $14
SER_BAUD_62500 = $15
SER_BAUD_9600 = $0E
SER_BAUD_19200 = $0F
SER_BAUD_38400 = $10
SER_BAUD_57600 = $11
SER_BAUD_115200 = $12
SER_BAUD_230400 = $13
SER_BAUD_31250 = $14
SER_BAUD_62500 = $15
; Data bit settings
SER_BITS_5 = $00
SER_BITS_6 = $01
SER_BITS_7 = $02
SER_BITS_8 = $03
SER_BITS_5 = $00
SER_BITS_6 = $01
SER_BITS_7 = $02
SER_BITS_8 = $03
; Stop bit settings
SER_STOP_1 = $00
SER_STOP_2 = $01
SER_STOP_1 = $00
SER_STOP_2 = $01
; Parity
SER_PAR_NONE = $00
SER_PAR_ODD = $01
SER_PAR_EVEN = $02
SER_PAR_MARK = $03
SER_PAR_SPACE = $04
SER_PAR_NONE = $00
SER_PAR_ODD = $01
SER_PAR_EVEN = $02
SER_PAR_MARK = $03
SER_PAR_SPACE = $04
; 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
; Bit masks to mask out things from the status returned by ser_status
SER_STATUS_PE = $01 ; Parity error
SER_STATUS_FE = $02 ; Framing error
SER_STATUS_OE = $04 ; Overrun error
SER_STATUS_DCD = $20 ; NOT data carrier detect
SER_STATUS_DSR = $40 ; NOT data set ready
SER_STATUS_PE = $01 ; Parity error
SER_STATUS_FE = $02 ; Framing error
SER_STATUS_OE = $04 ; Overrun error
SER_STATUS_DCD = $20 ; NOT data carrier detect
SER_STATUS_DSR = $40 ; NOT data set ready
;------------------------------------------------------------------------------
; Variables
.global _ser_drv ; Pointer to driver
.global _ser_drv ; Pointer to driver
;------------------------------------------------------------------------------
; Driver entry points
@@ -141,7 +141,7 @@ SER_STATUS_DSR = $40 ; NOT data set ready
.global ser_put
.global ser_status
.global ser_ioctl
.global ser_irq
.global ser_irq
;------------------------------------------------------------------------------
; C callable functions

View File

@@ -21,12 +21,12 @@
; distribution.
;
.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 _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 SMC_AbsAdr $FADE
.define SMC_ZpAdr $00
.define SMC_ZpAdr $00
.define SMC_Opcode nop
.define SMC_Value $42
.define SMC_Value $42
.macro SMC_OperateOnValue opcode, label
opcode _SMCDesignator+1
@@ -48,86 +48,86 @@
.export _SMCAlias := _SMCDesignator
.endmacro
.macro SMC label, statement
.macro SMC label, statement
_SMCDesignator: statement
.endmacro
.macro SMC_TransferOpcode label, opcode, register
.if .paramcount = 2 .or .match ({register}, a)
lda #opcode
sta _SMCDesignator
lda #opcode
sta _SMCDesignator
.elseif .match ({register}, x)
ldx #opcode
stx _SMCDesignator
ldx #opcode
stx _SMCDesignator
.elseif .match ({register}, y)
ldy #opcode
sty _SMCDesignator
ldy #opcode
sty _SMCDesignator
.endif
.endmacro
.macro SMC_LoadOpcode label, register
.if .paramcount = 1 .or .match ({register}, a)
lda _SMCDesignator
lda _SMCDesignator
.elseif .match ({register}, x)
ldx _SMCDesignator
ldx _SMCDesignator
.elseif .match ({register}, y)
ldy _SMCDesignator
ldy _SMCDesignator
.endif
.endmacro
.macro SMC_StoreOpcode label, register
.if .paramcount = 1 .or .match ({register}, a)
sta _SMCDesignator
sta _SMCDesignator
.elseif .match ({register}, x)
stx _SMCDesignator
stx _SMCDesignator
.elseif .match ({register}, y)
sty _SMCDesignator
sty _SMCDesignator
.endif
.endmacro
.macro SMC_ChangeBranch label, destination, register
.if .paramcount = 2 .or .match ({register}, a)
lda #(destination - _SMCDesignator -2)
sta _SMCDesignator+1
lda #(destination - _SMCDesignator -2)
sta _SMCDesignator+1
.elseif .match ({register}, x)
ldx #(destination - _SMCDesignator - 2)
stx _SMCDesignator+1
ldx #(destination - _SMCDesignator - 2)
stx _SMCDesignator+1
.elseif .match ({register}, y)
ldy #(destination - _SMCDesignator - 2)
sty _SMCDesignator+1
ldy #(destination - _SMCDesignator - 2)
sty _SMCDesignator+1
.endif
.endmacro
.macro SMC_TransferValue label, value, register
.if .paramcount = 2 .or .match ({register}, a)
lda value
sta _SMCDesignator+1
lda value
sta _SMCDesignator+1
.elseif .match ({register}, x)
ldx value
stx _SMCDesignator+1
ldx value
stx _SMCDesignator+1
.elseif .match ({register}, y)
ldy value
sty _SMCDesignator+1
ldy value
sty _SMCDesignator+1
.endif
.endmacro
.macro SMC_LoadValue label, register
.if .paramcount = 1 .or .match ({register}, a)
lda _SMCDesignator+1
lda _SMCDesignator+1
.elseif .match ({register}, x)
ldx _SMCDesignator+1
ldx _SMCDesignator+1
.elseif .match ({register}, y)
ldy _SMCDesignator+1
ldy _SMCDesignator+1
.endif
.endmacro
.macro SMC_StoreValue label, register
.if .paramcount = 1 .or .match ({register}, a)
sta _SMCDesignator+1
sta _SMCDesignator+1
.elseif .match ({register}, x)
stx _SMCDesignator+1
stx _SMCDesignator+1
.elseif .match ({register}, y)
sty _SMCDesignator+1
sty _SMCDesignator+1
.endif
.endmacro
@@ -146,49 +146,48 @@ SMC_StoreValue label, register
.macro SMC_TransferHighByte label, value, register
.if .paramcount = 2 .or .match ({register}, a)
lda value
sta _SMCDesignator+2
lda value
sta _SMCDesignator+2
.elseif .match ({register}, x)
ldx value
stx _SMCDesignator+2
ldx value
stx _SMCDesignator+2
.elseif .match ({register}, y)
ldy value
sty _SMCDesignator+2
ldy value
sty _SMCDesignator+2
.endif
.endmacro
.macro SMC_LoadHighByte label, register
.if .paramcount = 1 .or .match ({register}, a)
lda _SMCDesignator+2
lda _SMCDesignator+2
.elseif .match ({register}, x)
ldx _SMCDesignator+2
ldx _SMCDesignator+2
.elseif .match ({register}, y)
ldy _SMCDesignator+2
ldy _SMCDesignator+2
.endif
.endmacro
.macro SMC_StoreHighByte label, register
.if .paramcount = 1 .or .match ({register}, a)
sta _SMCDesignator+2
sta _SMCDesignator+2
.elseif .match ({register}, x)
stx _SMCDesignator+2
stx _SMCDesignator+2
.elseif .match ({register}, y)
sty _SMCDesignator+2
sty _SMCDesignator+2
.endif
.endmacro
.macro SMC_TransferAddressSingle label, address, register
.if .paramcount = 2 .or .match ((register), a)
.if (.match (.left (1, {address}), #))
; immediate mode
lda #<(.right (.tcount ({address})-1, {address}))
lda #<(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+1
lda #>(.right (.tcount ({address})-1, {address}))
lda #>(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+2
.else
; assume absolute or zero page
lda address
.else
; assume absolute or zero page
lda address
sta _SMCDesignator+1
lda 1+(address)
sta _SMCDesignator+2
@@ -196,13 +195,13 @@ SMC_StoreValue label, register
.elseif .match ((register), x)
.if (.match (.left (1, {address}), #))
; immediate mode
ldx #<(.right (.tcount ({address})-1, {address}))
ldx #<(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+1
ldx #>(.right (.tcount ({address})-1, {address}))
ldx #>(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+2
.else
; assume absolute or zero page
ldx address
.else
; assume absolute or zero page
ldx address
stx _SMCDesignator+1
ldx 1+(address)
stx _SMCDesignator+2
@@ -210,13 +209,13 @@ SMC_StoreValue label, register
.elseif .match ((register), y)
.if (.match (.left (1, {address}), #))
; immediate mode
ldy #<(.right (.tcount ({address})-1, {address}))
ldy #<(.right (.tcount ({address})-1, {address}))
sty _SMCDesignator+1
ldy #>(.right (.tcount ({address})-1, {address}))
ldy #>(.right (.tcount ({address})-1, {address}))
sty _SMCDesignator+2
.else
; assume absolute or zero page
ldy address
.else
; assume absolute or zero page
ldy address
sty _SMCDesignator+1
ldy 1+(address)
sty _SMCDesignator+2
@@ -224,17 +223,16 @@ SMC_StoreValue label, register
.endif
.endmacro
.macro SMC_TransferAddress label, address
.if (.match (.left (1, {address}), #))
; immediate mode
lda #<(.right (.tcount ({address})-1, {address}))
lda #<(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+1
ldx #>(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+2
.else
; assume absolute or zero page
lda {address}
lda {address}
sta _SMCDesignator+1
ldx 1+{address}
stx _SMCDesignator)+2
@@ -242,8 +240,6 @@ SMC_StoreValue label, register
.endmacro
.macro SMC_StoreAddress label
sta _SMCDesignator+1
stx _SMCDesignator+2
sta _SMCDesignator+1
stx _SMCDesignator+2
.endmacro

View File

@@ -36,25 +36,25 @@
;----------------------------------------------------------------------------
; Constants
_IOFBF = 0
_IOLBF = 1
_IONBF = 2
BUFSIZ = 256
EOF = -1
_IOFBF = 0
_IOLBF = 1
_IONBF = 2
BUFSIZ = 256
EOF = -1
.if .defined(__APPLE2__) .or .defined(__APPLE2ENH__)
FILENAME_MAX = 64+1
FILENAME_MAX = 64+1
.elseif .defined(__ATARI__)
FILENAME_MAX = 12+1
FILENAME_MAX = 12+1
.elseif .defined(__LUNIX__)
FILENAME_MAX = 80+1
.else
FILENAME_MAX = 16+1
FILENAME_MAX = 16+1
.endif
L_tmpnam = FILENAME_MAX
SEEK_CUR = 0
SEEK_END = 1
SEEK_SET = 2
TMP_MAX = 256
L_tmpnam = FILENAME_MAX
SEEK_CUR = 0
SEEK_END = 1
SEEK_SET = 2
TMP_MAX = 256
; Maximum number of open files (size of the file table)
FOPEN_MAX = 8

View File

@@ -41,7 +41,7 @@
TGI_ERR_INV_DRIVER ; Invalid driver
TGI_ERR_INV_MODE ; Mode not supported by driver
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_NO_RES ; Out of resources (memory, handles, ...)
TGI_ERR_UNKNOWN ; Unknown error

View File

@@ -54,7 +54,7 @@
UNINSTALL .addr ; UNINSTALL routine
INIT .addr ; INIT routine
DONE .addr ; DONE routine
GETERROR .addr ; GETERROR routine
GETERROR .addr ; GETERROR routine
CONTROL .addr ; CONTROL routine
CLEAR .addr ; CLEAR routine
SETVIEWPAGE .addr ; SETVIEWPAGE routine
@@ -106,14 +106,14 @@ TGI_CLIP_TOP = $08
;------------------------------------------------------------------------------
; ASM accessible color constants
.global tgi_color_black:zp ; Target-specific value for black
.global tgi_color_white:zp ; Target-specific value for white
.global tgi_color_black:zp ; Target-specific value for black
.global tgi_color_white:zp ; Target-specific value for white
;------------------------------------------------------------------------------
; C accessible variables
.global _tgi_drv ; Pointer to driver
.global _tgi_error ; Last error code
.global _tgi_drv ; Pointer to driver
.global _tgi_error ; Last error code
.global _tgi_gmode ; Flag: graphics mode active
.global _tgi_curx ; Current drawing cursor X
.global _tgi_cury ; Current drawing cursor Y
@@ -139,10 +139,10 @@ TGI_CLIP_TOP = $08
;------------------------------------------------------------------------------
; ASM accessible variables
.global tgi_clip_x1 ; Coordinate for line clipper
.global tgi_clip_y1 ; Coordinate for line clipper
.global tgi_clip_x2 ; Coordinate for line clipper
.global tgi_clip_y2 ; Coordinate for line clipper
.global tgi_clip_x1 ; Coordinate for line clipper
.global tgi_clip_y1 ; Coordinate for line clipper
.global tgi_clip_x2 ; Coordinate for line clipper
.global tgi_clip_y2 ; Coordinate for line clipper
;------------------------------------------------------------------------------
; Driver entry points
@@ -151,7 +151,7 @@ TGI_CLIP_TOP = $08
.global tgi_uninstall
.global tgi_init
.global tgi_done
.global tgi_geterror
.global tgi_geterror
.global tgi_control
.global tgi_clear
.global tgi_setviewpage
@@ -192,7 +192,7 @@ TGI_CLIP_TOP = $08
.global _tgi_clear
.global _tgi_done
.global _tgi_ellipse
.global _tgi_getaspectratio
.global _tgi_getaspectratio
.global _tgi_getcolor
.global _tgi_getcolorcount
.global _tgi_getdefpalette
@@ -220,7 +220,7 @@ TGI_CLIP_TOP = $08
.global _tgi_outtext
.global _tgi_outtextxy
.global _tgi_pieslice
.global _tgi_setaspectratio
.global _tgi_setaspectratio
.global _tgi_setcolor
.global _tgi_setdrawpage
.global _tgi_setpalette

View File

@@ -2,7 +2,7 @@
;/* */
;/* time.inc */
;/* */
;/* Date and time */
;/* Date and time */
;/* */
;/* */
;/* */

View File

@@ -7,26 +7,26 @@
; Zero page, Commodore stuff
TIME := $A0 ; 60HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
DEVNUM := $BA ; Device number
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
DEVNUM := $BA ; Device number
FNAM := $BB ; Pointer to filename
KEY_COUNT := $C6 ; Number of keys in input buffer
RVS := $C7 ; Reverse flag
CURS_FLAG := $CC ; 1 = cursor off
CURS_BLINK := $CD ; Blink counter
CURS_CHAR := $CE ; Character under the cursor
CURS_STATE := $CF ; Cursor blink state
SCREEN_PTR := $D1 ; Pointer to current char in text screen
CURS_X := $D3 ; Cursor column
CURS_Y := $D6 ; Cursor row
CRAM_PTR := $F3 ; Pointer to current char in color RAM
KEY_COUNT := $C6 ; Number of keys in input buffer
RVS := $C7 ; Reverse flag
CURS_FLAG := $CC ; 1 = cursor off
CURS_BLINK := $CD ; Blink counter
CURS_CHAR := $CE ; Character under the cursor
CURS_STATE := $CF ; Cursor blink state
SCREEN_PTR := $D1 ; Pointer to current char in text screen
CURS_X := $D3 ; Cursor column
CURS_Y := $D6 ; Cursor row
CRAM_PTR := $F3 ; Pointer to current char in color RAM
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 89 ; Maximum length of command-line
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 89 ; Maximum length of command-line
CHARCOLOR := $286
CURS_COLOR := $287 ; Color under the cursor
CURS_COLOR := $287 ; Color under the cursor
; ---------------------------------------------------------------------------
@@ -39,37 +39,37 @@ YSIZE = 23
; Kernal routines
; Direct entries
CLRSCR := $E55F
KBDREAD := $E5CF
CLRSCR := $E55F
KBDREAD := $E5CF
; ---------------------------------------------------------------------------
; Vector and other locations
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
; ---------------------------------------------------------------------------
; I/O: 6560 VIC
VIC := $9000
VIC := $9000
VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
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
VIA1 := $9110
VIA1_JOY := $9111
VIA1_DDRB := $9112
VIA1_DDRA := $9113
VIA1 := $9110
VIA1_JOY := $9111
VIA1_DDRB := $9112
VIA1_DDRA := $9113
; ---------------------------------------------------------------------------
; I/O: 6522 VIA2
VIA2 := $9120
VIA2_JOY := $9120
VIA2_DDRB := $9122
VIA2_DDRA := $9123
VIA2 := $9120
VIA2_JOY := $9120
VIA2_DDRB := $9122
VIA2_DDRA := $9123