mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
Merge branch 'master' into popptr1
This commit is contained in:
commit
32bbacbb78
@ -23,6 +23,7 @@ including
|
||||
- newer PET machines (not 2001).
|
||||
- the Apple ]\[+ and successors.
|
||||
- the Atari 8 bit machines.
|
||||
- the Atari 2600 console.
|
||||
- the Atari 5200 console.
|
||||
- GEOS for the C64, C128 and Apple //e.
|
||||
- the Bit Corporation Gamate console.
|
||||
|
80
asminc/accelerator.inc
Normal file
80
asminc/accelerator.inc
Normal file
@ -0,0 +1,80 @@
|
||||
;
|
||||
; Accelerator definitions.
|
||||
;
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Speed definitions for all accelerator, to be used as input for the 'set'
|
||||
; functions.
|
||||
|
||||
|
||||
SPEED_SLOW = $00
|
||||
SPEED_FAST = $FF
|
||||
|
||||
SPEED_1X = SPEED_SLOW
|
||||
SPEED_2X = 2 - 1
|
||||
SPEED_3X = 3 - 1
|
||||
SPEED_4X = 4 - 1
|
||||
SPEED_5X = 5 - 1
|
||||
SPEED_6X = 6 - 1
|
||||
SPEED_7X = 7 - 1
|
||||
SPEED_8X = 8 - 1
|
||||
SPEED_10X = 10 - 1
|
||||
SPEED_12X = 12 - 1
|
||||
SPEED_16X = 16 - 1
|
||||
SPEED_20X = 20 - 1
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; C64/C128 Super CPU cartridge
|
||||
|
||||
SuperCPU_Slow := $D07A
|
||||
SuperCPU_Fast := $D07B
|
||||
SuperCPU_Speed_Mode := $D0B8
|
||||
SuperCPU_Detect := $D0BC
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; C64DTV
|
||||
|
||||
C64DTV_Extended_Regs := $D03F
|
||||
|
||||
C64DTV_Slow = $00
|
||||
C64DTV_Fast = $03
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; C128 native and C128 in C64 mode
|
||||
|
||||
C128_VICIIE_CLK := $D030
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; C64 Chameleon cartridge
|
||||
|
||||
CHAMELEON_CFGTUR := $D0F3
|
||||
CHAMELEON_CFGENA := $D0FE
|
||||
|
||||
CHAMELEON_ENABLE_REGS = $2A
|
||||
CHAMELEON_DISABLE_REGS = $FF
|
||||
|
||||
CHAMELEON_CFGTUR_LIMIT_1MHZ = %00001100
|
||||
CHAMELEON_CFGTUR_LIMIT_NONE = %10000000
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; C65/C64DX in C64 mode
|
||||
|
||||
C65_VICIII_KEY := $D02F
|
||||
C65_VICIII_CTRL_B := $D031
|
||||
|
||||
C65_VICIII_UNLOCK_1 = $A5
|
||||
C65_VICIII_UNLOCK_2 = $96
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; C64 Turbo Master cartridge
|
||||
|
||||
TURBOMASTER_DETECT := $BF53
|
||||
|
||||
TURBOMASTER_SPEED_REG := $00
|
||||
|
@ -104,8 +104,14 @@ PRINT := $F77C
|
||||
|
||||
; Sound Effects
|
||||
PING := $FA9F
|
||||
PING1 := $FA85
|
||||
SHOOT := $FAB5
|
||||
SHOOT1 := $FA9B
|
||||
EXPLODE := $FACB
|
||||
EXPLODE1 := $FAB1
|
||||
ZAP := $FAE1
|
||||
ZAP1 := $FAC7
|
||||
TICK := $FB14
|
||||
TICK1 := $FAFA
|
||||
TOCK := $FB2A
|
||||
TOCK1 := $FB10
|
||||
|
@ -15,7 +15,7 @@ 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
|
||||
MODE := $D7 ; 40-/80-column mode (bit 7: 80 columns)
|
||||
CURS_X := $EC ; Cursor column
|
||||
CURS_Y := $EB ; Cursor row
|
||||
SCREEN_PTR := $E0 ; Pointer to current char in text screen
|
||||
@ -167,34 +167,46 @@ SID_Read3 := $D41C
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: VDC (128 only)
|
||||
|
||||
VDC_INDEX := $D600
|
||||
VDC_DATA := $D601
|
||||
VDC_INDEX := $D600 ; register address port
|
||||
VDC_DATA := $D601 ; data port
|
||||
|
||||
; Registers
|
||||
VDC_DATA_HI = 18 ; video RAM address (big endian)
|
||||
VDC_DATA_LO = 19
|
||||
VDC_CSET = 28
|
||||
VDC_RAM_RW = 31 ; RAM port
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: CIAs
|
||||
; I/O: Complex Interface Adapters
|
||||
|
||||
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_PRA := $DC00 ; Port A
|
||||
CIA1_PRB := $DC01 ; Port B
|
||||
CIA1_DDRA := $DC02 ; Data direction register for port A
|
||||
CIA1_DDRB := $DC03 ; Data direction register for port B
|
||||
CIA1_TA := $DC04 ; 16-bit timer A
|
||||
CIA1_TB := $DC06 ; 16-bit timer B
|
||||
CIA1_TOD10 := $DC08 ; Time-of-day tenths of a second
|
||||
CIA1_TODSEC := $DC09 ; Time-of-day seconds
|
||||
CIA1_TODMIN := $DC0A ; Time-of-day minutes
|
||||
CIA1_TODHR := $DC0B ; Time-of-day hours
|
||||
CIA1_SDR := $DC0C ; Serial data register
|
||||
CIA1_ICR := $DC0D ; Interrupt control register
|
||||
CIA1_CRA := $DC0E ; Control register for timer A
|
||||
CIA1_CRB := $DC0F ; Control register for timer B
|
||||
|
||||
CIA2 := $DD00
|
||||
CIA2_PRA := $DD00
|
||||
CIA2_PRB := $DD01
|
||||
CIA2_DDRA := $DD02
|
||||
CIA2_DDRB := $DD03
|
||||
CIA2_TA := $DD04
|
||||
CIA2_TB := $DD06
|
||||
CIA2_TOD10 := $DD08
|
||||
CIA2_TODSEC := $DD09
|
||||
CIA2_TODMIN := $DD0A
|
||||
CIA2_TODHR := $DD0B
|
||||
CIA2_SDR := $DD0C
|
||||
CIA2_ICR := $DD0D
|
||||
CIA2_CRA := $DD0E
|
||||
CIA2_CRB := $DD0F
|
||||
|
@ -165,30 +165,36 @@ VDC_INDEX := $D600
|
||||
VDC_DATA := $D601
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: CIAs
|
||||
; I/O: Complex Interface Adapters
|
||||
|
||||
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_PRA := $DC00 ; Port A
|
||||
CIA1_PRB := $DC01 ; Port B
|
||||
CIA1_DDRA := $DC02 ; Data direction register for port A
|
||||
CIA1_DDRB := $DC03 ; Data direction register for port B
|
||||
CIA1_TA := $DC04 ; 16-bit timer A
|
||||
CIA1_TB := $DC06 ; 16-bit timer B
|
||||
CIA1_TOD10 := $DC08 ; Time-of-day tenths of a second
|
||||
CIA1_TODSEC := $DC09 ; Time-of-day seconds
|
||||
CIA1_TODMIN := $DC0A ; Time-of-day minutes
|
||||
CIA1_TODHR := $DC0B ; Time-of-day hours
|
||||
CIA1_SDR := $DC0C ; Serial data register
|
||||
CIA1_ICR := $DC0D ; Interrupt control register
|
||||
CIA1_CRA := $DC0E ; Control register for timer A
|
||||
CIA1_CRB := $DC0F ; Control register for timer B
|
||||
|
||||
CIA2 := $DD00
|
||||
CIA2_PRA := $DD00
|
||||
CIA2_PRB := $DD01
|
||||
CIA2_DDRA := $DD02
|
||||
CIA2_DDRB := $DD03
|
||||
CIA2_TA := $DD04
|
||||
CIA2_TB := $DD06
|
||||
CIA2_TOD10 := $DD08
|
||||
CIA2_TODSEC := $DD09
|
||||
CIA2_TODMIN := $DD0A
|
||||
CIA2_TODHR := $DD0B
|
||||
CIA2_SDR := $DD0C
|
||||
CIA2_ICR := $DD0D
|
||||
CIA2_CRA := $DD0E
|
||||
CIA2_CRB := $DD0F
|
||||
|
@ -48,14 +48,13 @@
|
||||
UNINSTALL .addr ; UNINSTALL routine
|
||||
COUNT .addr ; COUNT routine
|
||||
READ .addr ; READ routine
|
||||
IRQ .addr ; IRQ routine
|
||||
.endstruct
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The JOY API version, stored in JOY_HDR::VERSION
|
||||
|
||||
JOY_API_VERSION = $03
|
||||
JOY_API_VERSION = $05
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Variables
|
||||
|
@ -241,12 +241,11 @@ OPC_BIT_abx = $3C
|
||||
; OPC_NOP = $44 ; doublet
|
||||
; OPC_NOP = $4B ; doublet
|
||||
|
||||
OPC_EOR_izp = $52
|
||||
OPC_EOR_izp = $52
|
||||
; OPC_NOP = $53 ; doublet
|
||||
; OPC_NOP = $54 ; doublet
|
||||
; OPC_NOP = $5A ; doublet
|
||||
; OPC_NOP = $5B ; doublet
|
||||
OPC_EOR_abx = $5C
|
||||
|
||||
; OPC_NOP = $62 ; doublet
|
||||
; OPC_NOP = $63 ; doublet
|
||||
|
@ -61,8 +61,22 @@ NMIVec := $0094
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6522 VIA2
|
||||
|
||||
VIA := $E840
|
||||
VIA_PRB := $E840
|
||||
VIA_PRA := $E841
|
||||
VIA_DDRB := $E842
|
||||
VIA_DDRA := $E843
|
||||
VIA := $E840 ; VIA base address
|
||||
VIA_PB := VIA+$0 ; Port register B
|
||||
VIA_PA1 := VIA+$1 ; Port register A
|
||||
VIA_PRB := VIA+$0 ; *** Deprecated ***
|
||||
VIA_PRA := VIA+$1 ; *** Deprecated ***
|
||||
VIA_DDRB := VIA+$2 ; Data direction register B
|
||||
VIA_DDRA := VIA+$3 ; Data direction register A
|
||||
VIA_T1CL := VIA+$4 ; Timer 1, low byte
|
||||
VIA_T1CH := VIA+$5 ; Timer 1, high byte
|
||||
VIA_T1LL := VIA+$6 ; Timer 1 latch, low byte
|
||||
VIA_T1LH := VIA+$7 ; Timer 1 latch, high byte
|
||||
VIA_T2CL := VIA+$8 ; Timer 2, low byte
|
||||
VIA_T2CH := VIA+$9 ; Timer 2, high byte
|
||||
VIA_SR := VIA+$A ; Shift register
|
||||
VIA_CR := VIA+$B ; Auxiliary control register
|
||||
VIA_PCR := VIA+$C ; Peripheral control register
|
||||
VIA_IFR := VIA+$D ; Interrupt flag register
|
||||
VIA_IER := VIA+$E ; Interrupt enable register
|
||||
VIA_PA2 := VIA+$F ; Port register A w/o handshake
|
||||
|
@ -73,6 +73,7 @@ TED_CURSLO := $FF0D
|
||||
TED_V1FRQLO := $FF0E
|
||||
TED_V2FRQLO := $FF0F
|
||||
TED_V2FRQHI := $FF10
|
||||
TED_CLK := $FF13
|
||||
TED_BGCOLOR := $FF15
|
||||
TED_COLOR1 := $FF16
|
||||
TED_COLOR2 := $FF17
|
||||
|
@ -1,7 +1,7 @@
|
||||
;
|
||||
; Oric Telemon definition
|
||||
; Telemon 2.4 & Telemon 3.0
|
||||
; For telemon 3.0 check http://orix.oric.org
|
||||
; Telemon 2.4 & Telemon 3.x
|
||||
; For telemon 3.x check http://orix.oric.org
|
||||
;
|
||||
|
||||
|
||||
@ -15,6 +15,15 @@ FUNCTKEY = $A5
|
||||
|
||||
FNAME_LEN = 11 ; maximum length of file-name
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O Identifier
|
||||
; theses identifers are used for channel management
|
||||
;
|
||||
|
||||
XKBD = $80 ; keyboard
|
||||
XRSE = $83 ; RS232 in
|
||||
XSCR = $88 ; screen
|
||||
XRSS = $90 ; RS232 out
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
@ -34,10 +43,7 @@ TR5 := $11
|
||||
TR6 := $12
|
||||
TR7 := $13
|
||||
|
||||
|
||||
|
||||
|
||||
PTR_READ_DEST := $2C ; used for XFREAD and XWRITE only in telemon 3.0
|
||||
PTR_READ_DEST := $2C ; used for XFREAD and XWRITE only in telemon 3.x
|
||||
|
||||
HRSX := $46
|
||||
HRSY := $47
|
||||
@ -48,11 +54,43 @@ HRS3 := $51
|
||||
HRS4 := $53
|
||||
HRS5 := $55
|
||||
|
||||
HRSFB := $57
|
||||
|
||||
; RS232T
|
||||
; b0-b3 : speed
|
||||
; 1111 => 19200 bps (please note that telestrat can't handle this speed without stopping all IRQ except ACIA's one)
|
||||
; 1100 => 9600 bps (default from telemon)
|
||||
; 1110 => 4800 bps
|
||||
; 1010 => 2400 bps
|
||||
; 1000 => 1200 bps
|
||||
; 0111 => 600 bps
|
||||
; 0110 => 300 bps
|
||||
; 0101 => 150 bps
|
||||
; 0010 => 75 bps
|
||||
|
||||
; b4 : 0 external clock, 1 internal clock
|
||||
; b6-b5 : 00 8 bits
|
||||
; 01 7 bits
|
||||
; 10 6 bits
|
||||
; 11 5 bits
|
||||
; b7 : 0 a stop
|
||||
|
||||
RS232T := $59
|
||||
|
||||
; RS232C
|
||||
; b0-b3 : 0
|
||||
; b4 : 1 if echo
|
||||
; b5 : 1 if parity
|
||||
; b7-b6 : 00 in/out parity odd
|
||||
; : 01 on/out parity even
|
||||
; : 10 parity sent, answer not tested
|
||||
; : 11 SPACE SENT, reception not tested
|
||||
|
||||
RS232C := $5A
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Low memory
|
||||
|
||||
IRQVec := $02FB ; "fast" interrupt vector
|
||||
|
||||
|
||||
|
||||
@ -78,7 +116,7 @@ PRA2 .byte ; Port Register A without handshaking
|
||||
.endstruct
|
||||
|
||||
|
||||
.struct VIA2 ; Versatile Interface Adapter
|
||||
.struct VIA2 ; Versatile Interface Adapter
|
||||
.res $0320
|
||||
PRB .byte ; Port Register B
|
||||
PRA .byte ; Port Register A
|
||||
@ -110,33 +148,45 @@ SCREEN := $BB80
|
||||
; ---------------------------------------------------------------------------
|
||||
; ROM entries
|
||||
|
||||
; primitives telemon 2.4
|
||||
; telemon primitives (2.4 & 3.x)
|
||||
XRD0 = $08
|
||||
XRDW0 = $0C
|
||||
XWR0 = $10
|
||||
XWSTR0 = $14
|
||||
XWSTR0 = $14 ; write a string in text mode
|
||||
XTEXT = $19
|
||||
XHIRES = $1A
|
||||
XFILLM = $1C
|
||||
XMINMA = $1F
|
||||
XVARS = $24 ; only in TELEMON 3.0, in telemon 2.4, it's XNOMFI ($24)
|
||||
XFREAD = $27 ; only in TELEMON 3.0
|
||||
XOPEN = $30 ; only in TELEMON 3.0
|
||||
XVARS = $24 ; only in TELEMON 3.x, in telemon 2.4, it's XNOMFI ($24)
|
||||
XFREAD = $27 ; only in TELEMON 3.x
|
||||
XOPEN = $30 ; only in TELEMON 3.x
|
||||
XCOSCR = $34 ; switch off cursor
|
||||
XCSSCR = $35 ; switch on cursor
|
||||
XCLOSE = $3A ; only in TELEMON 3.0 Close file
|
||||
XFWRITE = $3B ; only in TELEMON 3.0 write file
|
||||
XCLOSE = $3A ; only in TELEMON 3.x Close file
|
||||
XFWRITE = $3B ; only in TELEMON 3.x write file
|
||||
XSONPS = $40
|
||||
XOUPS = $42
|
||||
XOUPS = $42 ; send Oups sound into PSG
|
||||
XPLAY = $43
|
||||
XSOUND = $44
|
||||
XMUSIC = $45
|
||||
XZAP = $46
|
||||
XSHOOT = $47
|
||||
XMKDIR = $4B ; create a folder. Only available in telemon 3.x
|
||||
XRM = $4D ; remove a folder or a file. Only available in telemon 3.x
|
||||
XSOUT = $67 ; send accumulator value (A) to RS232, available in telemon 2.4 & 3.x : if RS232 buffer is full, the Oric Telestrat freezes
|
||||
XHRSSE = $8C ; set hires position cursor
|
||||
XDRAWA = $8D ; draw a line
|
||||
XDRAWR = $8E ; draw a line
|
||||
XCIRCL = $8F
|
||||
XCURSE = $90
|
||||
XCURMO = $91
|
||||
XPAPER = $92
|
||||
XINK = $93
|
||||
XBOX = $94
|
||||
XABOX = $95
|
||||
XFILL = $96
|
||||
XCHAR = $97
|
||||
XSCHAR = $98 ; draw a string in hires
|
||||
XEXPLO = $9C
|
||||
XPING = $9D
|
||||
|
||||
@ -151,6 +201,7 @@ SCRX := $220
|
||||
SCRY := $224
|
||||
ADSCRL := $218
|
||||
ADSCRH := $21C
|
||||
HRSPAT := $2AA ; hires pattern : it's used to draw pattern for a line or a circle
|
||||
IRQVECTOR := $2FA
|
||||
|
||||
|
||||
|
@ -70,14 +70,13 @@
|
||||
BAR .addr ; BAR routine
|
||||
TEXTSTYLE .addr ; TEXTSTYLE routine
|
||||
OUTTEXT .addr ; OUTTEXT routine
|
||||
IRQ .addr ; IRQ routine
|
||||
.endstruct
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The TGI API version, stored at TGI_HDR_VERSION
|
||||
|
||||
TGI_API_VERSION = $05
|
||||
TGI_API_VERSION = $06
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Bitmapped tgi driver flags, stored in TGI_HDR::VARS::FLAGS.
|
||||
|
@ -66,16 +66,43 @@ 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 base address
|
||||
VIA1_JOY := VIA1+$0 ; *** Deprecated ***
|
||||
VIA1_PB := VIA1+$0 ; Port register B
|
||||
VIA1_PA1 := VIA1+$1 ; Port register A
|
||||
VIA1_DDRB := VIA1+$2 ; Data direction register B
|
||||
VIA1_DDRA := VIA1+$3 ; Data direction register A
|
||||
VIA1_T1CL := VIA1+$4 ; Timer 1, low byte
|
||||
VIA1_T1CH := VIA1+$5 ; Timer 1, high byte
|
||||
VIA1_T1LL := VIA1+$6 ; Timer 1 latch, low byte
|
||||
VIA1_T1LH := VIA1+$7 ; Timer 1 latch, high byte
|
||||
VIA1_T2CL := VIA1+$8 ; Timer 2, low byte
|
||||
VIA1_T2CH := VIA1+$9 ; Timer 2, high byte
|
||||
VIA1_SR := VIA1+$A ; Shift register
|
||||
VIA1_CR := VIA1+$B ; Auxiliary control register
|
||||
VIA1_PCR := VIA1+$C ; Peripheral control register
|
||||
VIA1_IFR := VIA1+$D ; Interrupt flag register
|
||||
VIA1_IER := VIA1+$E ; Interrupt enable register
|
||||
VIA1_PA2 := VIA1+$F ; Port register A w/o handshake
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6522 VIA2
|
||||
|
||||
VIA2 := $9120
|
||||
VIA2_JOY := $9120
|
||||
VIA2_DDRB := $9122
|
||||
VIA2_DDRA := $9123
|
||||
|
||||
VIA2 := $9120 ; VIA2 base address
|
||||
VIA2_JOY := VIA2+$0 ; *** Deprecated ***
|
||||
VIA2_PB := VIA2+$0 ; Port register B
|
||||
VIA2_PA1 := VIA2+$1 ; Port register A
|
||||
VIA2_DDRB := VIA2+$2 ; Data direction register B
|
||||
VIA2_DDRA := VIA2+$3 ; Data direction register A
|
||||
VIA2_T1CL := VIA2+$4 ; Timer 1, low byte
|
||||
VIA2_T1CH := VIA2+$5 ; Timer 1, high byte
|
||||
VIA2_T1LL := VIA2+$6 ; Timer 1 latch, low byte
|
||||
VIA2_T1LH := VIA2+$7 ; Timer 1 latch, high byte
|
||||
VIA2_T2CL := VIA2+$8 ; Timer 2, low byte
|
||||
VIA2_T2CH := VIA2+$9 ; Timer 2, high byte
|
||||
VIA2_SR := VIA2+$A ; Shift register
|
||||
VIA2_CR := VIA2+$B ; Auxiliary control register
|
||||
VIA2_PCR := VIA2+$C ; Peripheral control register
|
||||
VIA2_IFR := VIA2+$D ; Interrupt flag register
|
||||
VIA2_IER := VIA2+$E ; Interrupt enable register
|
||||
VIA2_PA2 := VIA2+$F ; Port register A w/o handshake
|
||||
|
@ -3,9 +3,12 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $00FF;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S, size = $C000 - %S;
|
||||
BSS: file = "", start = __MAIN_LAST__, size = $C000 - __MAIN_LAST__;
|
||||
}
|
||||
|
49
cfg/apple2-hgr.cfg
Normal file
49
cfg/apple2-hgr.cfg
Normal file
@ -0,0 +1,49 @@
|
||||
# Configuration for programs including a hires screen (with 6KB LOWCODE)
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
|
||||
CODE: load = MAIN, type = ro start = $4000;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
# Configuration for overlay programs (overlays located below main program)
|
||||
|
||||
# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this:
|
||||
# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
|
||||
# The overlay files are raw binary files so use AppleCommander like this:
|
||||
# java -jar ac.jar -as mydisk.dsk myprog < myprog
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
|
||||
# ...
|
||||
|
||||
FEATURES {
|
||||
@ -12,6 +12,7 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
@ -20,7 +21,7 @@ SYMBOLS {
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __OVERLAYSIZE__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
@ -36,7 +37,7 @@ MEMORY {
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
|
@ -1,18 +1,22 @@
|
||||
# Configuration for ProDOS 8 system programs (without the header)
|
||||
# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $00FF; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
MAIN: file = %O, start = $2000, size = $BF00 - $2000;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = $2000 - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = $2000, size = $BF00 - $2000;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
|
@ -5,6 +5,7 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
@ -12,14 +13,14 @@ SYMBOLS {
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
|
@ -3,9 +3,12 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $00FF;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S, size = $C000 - %S;
|
||||
BSS: file = "", start = __MAIN_LAST__, size = $C000 - __MAIN_LAST__;
|
||||
}
|
||||
|
49
cfg/apple2enh-hgr.cfg
Normal file
49
cfg/apple2enh-hgr.cfg
Normal file
@ -0,0 +1,49 @@
|
||||
# Configuration for programs including a hires screen (with 6KB LOWCODE)
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
|
||||
CODE: load = MAIN, type = ro start = $4000;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
# Configuration for overlay programs (overlays located below main program)
|
||||
|
||||
# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this:
|
||||
# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
|
||||
# The overlay files are raw binary files so use AppleCommander like this:
|
||||
# java -jar ac.jar -as mydisk.dsk myprog < myprog
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
|
||||
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
|
||||
# ...
|
||||
|
||||
FEATURES {
|
||||
@ -12,6 +12,7 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
@ -20,7 +21,7 @@ SYMBOLS {
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __OVERLAYSIZE__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
@ -36,7 +37,7 @@ MEMORY {
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
|
@ -1,18 +1,22 @@
|
||||
# Configuration for ProDOS 8 system programs (without the header)
|
||||
# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $00FF; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
MAIN: file = %O, start = $2000, size = $BF00 - $2000;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = $2000 - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = $2000, size = $BF00 - $2000;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
|
@ -5,6 +5,7 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
@ -12,14 +13,14 @@ SYMBOLS {
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
HEADER: file = %O, start = %S - $003A, size = $003A;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
|
@ -15,6 +15,7 @@ MEMORY {
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
DLIST: load = ROM , type = ro, define = yes, optional = yes;
|
||||
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
@ -22,9 +23,9 @@ SEGMENTS {
|
||||
RODATA: load = ROM, type = ro, optional = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
CARTNAME: load = CARTNAME, type = ro, define = yes;
|
||||
CARTYEAR: load = CARTYEAR, type = ro, define = yes;
|
||||
CARTENTRY: load = CARTENTRY, type = ro, define = yes;
|
||||
CARTNAME: load = CARTNAME, type = ro;
|
||||
CARTYEAR: load = CARTYEAR, type = ro;
|
||||
CARTENTRY: load = CARTENTRY, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
|
39
cfg/c16-32k.cfg
Normal file
39
cfg/c16-32k.cfg
Normal file
@ -0,0 +1,39 @@
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $0FFF, size = $0002;
|
||||
HEADER: file = %O, start = $1001, size = $000C;
|
||||
MAIN: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STACKSIZE__: type = weak, value = $0400; # 1k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $0FFF, size = $0002;
|
||||
HEADER: file = %O, start = $1001, size = $000C;
|
||||
MAIN: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
|
||||
MAIN: file = %O, start = $100D, size = $2FF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
|
@ -1,9 +1,9 @@
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0180;
|
||||
__STACKSIZE__: type = weak, value = $0040;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0020, size = $00E0;
|
||||
RAM: file = "", define = yes, start = $01FA, size = $0206;
|
||||
RAM: file = "", define = yes, start = $01FA, size = $0206 - __STACKSIZE__;
|
||||
ROM: file = %O, define = yes, start = $B000, size = $1000, fill = yes, fillval = $FF;
|
||||
}
|
||||
SEGMENTS {
|
||||
|
12
cfg/none.cfg
12
cfg/none.cfg
@ -1,12 +1,18 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $1000;
|
||||
}
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STACKSTART__: type = weak, value = $8000;
|
||||
__ZPSTART__: type = weak, value = $0080;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0000, size = $0001F;
|
||||
MAIN: file = %O, start = %S, size = $10000 - __STACKSIZE__;
|
||||
ZP: file = "", define = yes, start = __ZPSTART__, size = $001F;
|
||||
MAIN: file = %O, start = %S, size = __STACKSTART__ - __STACKSIZE__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro, optional = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
|
43
cfg/pce.cfg
43
cfg/pce.cfg
@ -1,34 +1,29 @@
|
||||
# linker config to produce simple NEC PC-Engine cartridge (.pce)
|
||||
|
||||
# linker config. to produce a NEC PC-Engine 8K, 16K, or 32K image (.bin)
|
||||
SYMBOLS {
|
||||
__CARTSIZE__: type = weak, value = $2000; # $2000, $4000, or $8000
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
# FIXME: is this correct? the first 3? bytes cant be used?
|
||||
ZP: file = "", start = $0003, size = $00FD, type = rw, define = yes;
|
||||
|
||||
# reset-bank and hardware vectors
|
||||
ROM0: file = %O, start = $E000, size = $1FF6, fill = yes, define = yes;
|
||||
ROMV: file = %O, start = $FFF6, size = $000A, fill = yes;
|
||||
|
||||
# first RAM page (also contains stack and zeropage)
|
||||
RAM: file = "", start = $2200, size = $1e00, define = yes;
|
||||
ZP: file = "", start = $0000, size = $0100, define = yes;
|
||||
# RAM bank
|
||||
MAIN: file = "", start = $2200, size = $1E00 - __STACKSIZE__, define = yes;
|
||||
# ROM banks, before swapping, and after mapping
|
||||
ROM: file = %O, start = $10000 - __CARTSIZE__, size = __CARTSIZE__, fill = yes, fillval = $FF;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
ONCE: load = ROM0, type = ro, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTORS: load = ROMV, type = rw, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
APPZP: load = ZP, type = zp, optional = yes;
|
||||
DATA: load = ROM, run = MAIN, type = rw, define = yes;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
RODATA: load = ROM, type = ro;
|
||||
CODE: load = ROM, type = ro;
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
STARTUP: load = ROM, type = ro, start = $FFF6 - $0066;
|
||||
VECTORS: load = ROM, type = ro, start = $FFF6;
|
||||
}
|
||||
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
|
@ -2,13 +2,13 @@
|
||||
# for assembler
|
||||
|
||||
# ld65 config file
|
||||
# ld65 --config supervision.cfg -o <prog>.bin <prog>.o
|
||||
# ld65 --config supervision-128k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0100; # 1 page stack
|
||||
}
|
||||
MEMORY {
|
||||
RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__;
|
||||
RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__, define = yes;
|
||||
VRAM: file = "", start = $4000, size = $2000;
|
||||
BANKROM1: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
|
||||
BANKROM2: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
|
||||
|
@ -1,7 +1,7 @@
|
||||
# supervision 16kbyte cartridge
|
||||
|
||||
# ld65 config file
|
||||
# ld65 --config supervision16.cfg -o <prog>.bin <prog>.o
|
||||
# ld65 --config supervision-16k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0100; # 1 page stack
|
||||
@ -9,9 +9,9 @@ SYMBOLS {
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $0100;
|
||||
CPUSTACK: file = "", start = $0100, size = $0100;
|
||||
RAM: file = "", start = $0200, size = $1E00 - __STACKSIZE__;
|
||||
RAM: file = "", start = $0200, size = $1E00 - __STACKSIZE__, define = yes;
|
||||
VRAM: file = "", start = $4000, size = $2000;
|
||||
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes;
|
||||
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $FF, define = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
|
@ -2,13 +2,13 @@
|
||||
# for assembler
|
||||
|
||||
# ld65 config file
|
||||
# ld65 --config supervision.cfg -o <prog>.bin <prog>.o
|
||||
# ld65 --config supervision-64k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0100; # 1 page stack
|
||||
}
|
||||
MEMORY {
|
||||
RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__;
|
||||
RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__, define = yes;
|
||||
VRAM: file = "", start = $4000, size = $2000;
|
||||
BANKROM1: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
|
||||
BANKROM2: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
|
||||
|
@ -8,7 +8,7 @@ SYMBOLS {
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $0100;
|
||||
CPUSTACK: file = "", start = $0100, size = $0100;
|
||||
RAM: file = "", start = $0200, size = $1E00 - __STACKSIZE__;
|
||||
RAM: file = "", start = $0200, size = $1E00 - __STACKSIZE__, define = yes;
|
||||
VRAM: file = "", start = $4000, size = $2000;
|
||||
ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0400; # 1k stack
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
|
@ -34,20 +34,14 @@ more information.
|
||||
<sect>Binary format<p>
|
||||
|
||||
The standard binary file format generated by the linker for the
|
||||
Apple ][ target is a binary program with a 4 byte DOS 3.3 header
|
||||
containing the load address and load length. The default load address is
|
||||
$803.
|
||||
Apple ][ target is an <url name="AppleSingle"
|
||||
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
|
||||
The default load address is $803.
|
||||
|
||||
<bf/AppleCommander 1.3.5/ or later (available at <url
|
||||
url="http://applecommander.sourceforge.net/">) includes the option <tt/-cc65/
|
||||
that allows to put binary files with a DOS 3.3 header onto disk images
|
||||
containing DOS 3.3 as well as ProDOS 8.
|
||||
|
||||
For ProDOS 8 system programs the load address is fixed to $2000 so there
|
||||
is no need for a header. Thus the linker configuration
|
||||
<ref id="apple-sys-cfg" name="apple2-system.cfg"> for those programs
|
||||
omits the DOS 3.3 header. The right AppleCommander option to put system files
|
||||
without a header on a ProDOS 8 disk image is <tt/-p/.
|
||||
<bf/AppleCommander 1.4.0/ or later (available at <url
|
||||
url="https://applecommander.github.io/">) includes the option <tt/-as/ that
|
||||
allows to put AppleSingle files onto disk images containing DOS 3.3 as well
|
||||
as ProDOS 8.
|
||||
|
||||
|
||||
<sect>Memory layout<p>
|
||||
@ -121,9 +115,8 @@ Parameters:
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
@ -153,6 +146,9 @@ Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
@ -168,10 +164,44 @@ Parameters:
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2-hgr.cfg/<p>
|
||||
|
||||
Configuration for a program including a hires page. See <tt>testcode/lib/apple/hgrtest.c</tt>
|
||||
for an example of such a program.
|
||||
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||
highest usable address.
|
||||
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2-overlay.cfg/<p>
|
||||
|
||||
Configuration for overlay programs with the up to nine overlays. The overlay files
|
||||
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
||||
Configuration for an overlay program with up to nine overlays. The overlay files
|
||||
don't include the AppleSingle header. See <tt>samples/overlaydemo.c</tt> for more
|
||||
information on overlays.
|
||||
|
||||
Parameters:
|
||||
@ -181,9 +211,8 @@ Parameters:
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
@ -210,7 +239,7 @@ Parameters:
|
||||
|
||||
<sect1><tt/apple2-asm.cfg/<p>
|
||||
|
||||
Configuration for a assembler programs which don't need a special setup.
|
||||
Configuration for an assembler program that doesn't need a special setup.
|
||||
|
||||
Parameters:
|
||||
|
||||
@ -219,9 +248,8 @@ Parameters:
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: No header. Use <tt/-u __EXEHDR__ apple2.lib/ to add a DOS 3.3 header
|
||||
(address and length).
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: No. Use <tt/-u __EXEHDR__ apple2.lib/ to add the AppleSingle header.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
@ -246,7 +274,8 @@ program (i.e. quits to the ProDOS dispatcher).
|
||||
|
||||
Using LOADER.SYSTEM is as simple as copying it to the ProDOS 8 directory of the
|
||||
program to load under name <program>.SYSTEM as a system program. For
|
||||
example the program <tt/MYPROG/ is loaded by <tt/MYPROG.SYSTEM/.
|
||||
example the program <tt/MYPROG/ is loaded by <tt/MYPROG.SYSTEM/. The right
|
||||
AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
|
||||
|
||||
|
||||
<sect1>Heap<p>
|
||||
@ -435,8 +464,7 @@ BASIC.SYSTEM) there are some limitations for DOS 3.3:
|
||||
<tag/Interrupts/
|
||||
There's no <tt/interruptor/ support. Any attempt to use it yields the message
|
||||
'FAILED TO ALLOC INTERRUPT' on program startup. This implicitly means that
|
||||
joystick, mouse and RS232 device drivers are not functional as they depend on
|
||||
interrupts.
|
||||
mouse and RS232 device drivers are not functional as they depend on interrupts.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
@ -34,20 +34,14 @@ more information.
|
||||
<sect>Binary format<p>
|
||||
|
||||
The standard binary file format generated by the linker for the
|
||||
enhanced Apple //e target is a binary program with a 4 byte DOS 3.3 header
|
||||
containing the load address and load length. The default load address is
|
||||
$803.
|
||||
enhanced Apple //e target is an <url name="AppleSingle"
|
||||
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
|
||||
The default load address is $803.
|
||||
|
||||
<bf/AppleCommander 1.3.5/ or later (available at <url
|
||||
url="http://applecommander.sourceforge.net/">) includes the option <tt/-cc65/
|
||||
that allows to put binary files with a DOS 3.3 header onto disk images
|
||||
containing DOS 3.3 as well as ProDOS 8.
|
||||
|
||||
For ProDOS 8 system programs the load address is fixed to $2000 so there
|
||||
is no need for a header. Thus the linker configuration
|
||||
<ref id="apple-sys-cfg" name="apple2enh-system.cfg"> for those programs
|
||||
omits the DOS 3.3 header. The right AppleCommander option to put system files
|
||||
without a header on a ProDOS 8 disk image is <tt/-p/.
|
||||
<bf/AppleCommander 1.4.0/ or later (available at <url
|
||||
url="https://applecommander.github.io/">) includes the option <tt/-as/ that
|
||||
allows to put AppleSingle files onto disk images containing DOS 3.3 as well
|
||||
as ProDOS 8.
|
||||
|
||||
|
||||
<sect>Memory layout<p>
|
||||
@ -121,9 +115,8 @@ Parameters:
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
@ -153,6 +146,9 @@ Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
@ -168,10 +164,44 @@ Parameters:
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2enh-hgr.cfg/<p>
|
||||
|
||||
Configuration for a program including a hires page. See <tt>testcode/lib/apple/hgrtest.c</tt>
|
||||
for an example of such a program.
|
||||
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||
highest usable address.
|
||||
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2enh-overlay.cfg/<p>
|
||||
|
||||
Configuration for overlay programs with the up to nine overlays. The overlay files
|
||||
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
||||
Configuration for an overlay program with up to nine overlays. The overlay files
|
||||
don't include the AppleSingle header. See <tt>samples/overlaydemo.c</tt> for more
|
||||
information on overlays.
|
||||
|
||||
Parameters:
|
||||
@ -181,9 +211,8 @@ Parameters:
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: Yes. Use <tt/-D __EXEHDR__=0/ to omit the AppleSingle header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
@ -210,7 +239,7 @@ Parameters:
|
||||
|
||||
<sect1><tt/apple2enh-asm.cfg/<p>
|
||||
|
||||
Configuration for a assembler programs which don't need a special setup.
|
||||
Configuration for an assembler program that doesn't need a special setup.
|
||||
|
||||
Parameters:
|
||||
|
||||
@ -219,9 +248,8 @@ Parameters:
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: No header. Use <tt/-u __EXEHDR__ apple2enh.lib/ to add a DOS 3.3 header
|
||||
(address and length).
|
||||
<tag><tt/__EXEHDR__:/ AppleSingle executable file header</tag>
|
||||
Default: No. Use <tt/-u __EXEHDR__ apple2enh.lib/ to add the AppleSingle header.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
@ -246,7 +274,8 @@ program (i.e. quits to the ProDOS dispatcher).
|
||||
|
||||
Using LOADER.SYSTEM is as simple as copying it to the ProDOS 8 directory of the
|
||||
program to load under name <program>.SYSTEM as a system program. For
|
||||
example the program <tt/MYPROG/ is loaded by <tt/MYPROG.SYSTEM/.
|
||||
example the program <tt/MYPROG/ is loaded by <tt/MYPROG.SYSTEM/. The right
|
||||
AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
|
||||
|
||||
|
||||
<sect1>Heap<p>
|
||||
@ -436,8 +465,7 @@ BASIC.SYSTEM) there are some limitations for DOS 3.3:
|
||||
<tag/Interrupts/
|
||||
There's no <tt/interruptor/ support. Any attempt to use it yields the message
|
||||
'Failed to alloc interrupt' on program startup. This implicitly means that
|
||||
joystick, mouse and RS232 device drivers are not functional as they depend on
|
||||
interrupts.
|
||||
mouse and RS232 device drivers are not functional as they depend on interrupts.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
@ -394,7 +394,7 @@ under different mappings, defining remapped strings works only flawlessly
|
||||
with static array initialization:
|
||||
|
||||
<verb>
|
||||
#include <atari\_screen\_charmap.h>
|
||||
#include <atari_screen_charmap.h>
|
||||
char pcScreenMappingString[] = "Hello Atari!";
|
||||
|
||||
#include <atari_atascii_charmap.h>
|
||||
|
@ -159,7 +159,10 @@ No extended memory drivers are currently available for the Atmos.
|
||||
<descrip>
|
||||
|
||||
<tag><tt/atmos-pase.joy (atmos_pase_joy)/</tag>
|
||||
Supports two standard joysticks connected to the P.A.S.E. interface of the Atmos.
|
||||
Supports two standard joysticks connected to a P.A.S.E. / Altai interface of the Atmos.
|
||||
|
||||
<tag><tt/atmos-ijk.joy (atmos_ijk_joy)/</tag>
|
||||
Supports two standard joysticks connected to an IJK interface of the Atmos.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
@ -85,8 +85,21 @@ url="funcref.html" name="function reference"> for declaration and usage.
|
||||
<itemize>
|
||||
<item>videomode
|
||||
<item>c64mode
|
||||
<item>fast
|
||||
<item>slow
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>C128-specific accelerator functions<p>
|
||||
|
||||
The functions listed below are accelerator functions for the C128. See the <url
|
||||
url="funcref.html" name="function reference"> for declaration and usage.
|
||||
|
||||
<itemize>
|
||||
<item>detect_c128
|
||||
<item>detect_scpu
|
||||
<item>get_c128_speed
|
||||
<item>get_scpu_speed
|
||||
<item>set_c128_speed
|
||||
<item>set_scpu_speed
|
||||
</itemize>
|
||||
|
||||
|
||||
@ -122,6 +135,19 @@ declaration and usage.
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>CBM specific CPU functions<p>
|
||||
|
||||
Some CPU related functions are available for some of the Commodore
|
||||
machines. See the <url url="funcref.html" name="function reference"> for
|
||||
declaration and usage.
|
||||
|
||||
<itemize>
|
||||
<item>fast
|
||||
<item>slow
|
||||
<item>isfast
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>Hardware access<p>
|
||||
|
||||
The following pseudo variables declared in the <tt/c128.h/ header file do
|
||||
@ -221,10 +247,8 @@ missing on VDC, and are translated to the two colors missing from the VIC palett
|
||||
Will test the hardware for the available RAM.
|
||||
|
||||
<tag><tt/c128-reu.emd (c128_reu_emd)/</tag>
|
||||
A driver for the CBM REUs. The driver will determine from the connected REU
|
||||
if it supports 128KB of RAM or more. In the latter case, 256KB are assumed,
|
||||
but since there are no range checks, the application can use more memory if
|
||||
it has better knowledge about the hardware than the driver.
|
||||
A driver for the CBM REUs. The driver will test the connected REU to find
|
||||
out how much RAM is present.
|
||||
|
||||
<tag><tt/c128-vdc.emd (c128_vdc_emd)/</tag>
|
||||
A driver for the VDC memory of the C128, written and contributed by Maciej
|
||||
|
12
doc/c16.sgml
12
doc/c16.sgml
@ -126,6 +126,18 @@ declaration and usage.
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>CBM specific CPU functions<p>
|
||||
|
||||
Some CPU related functions are available for some of the Commodore
|
||||
machines. See the <url url="funcref.html" name="function reference"> for
|
||||
declaration and usage.
|
||||
|
||||
<itemize>
|
||||
<item>fast
|
||||
<item>slow
|
||||
<item>isfast
|
||||
</itemize>
|
||||
|
||||
<sect1>Hardware access<p>
|
||||
|
||||
The following pseudo variables declared in the <tt/c16.h/ header file do
|
||||
|
41
doc/c64.sgml
41
doc/c64.sgml
@ -5,7 +5,7 @@
|
||||
<title>Commodore 64-specific information for cc65
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz"><newline>
|
||||
<url url="mailto:greg.king5@verizon.net" name="Greg King">
|
||||
<date>2017-01-18
|
||||
<date>2018-05-14
|
||||
|
||||
<abstract>
|
||||
An overview over the C64 runtime system as it is implemented for the cc65 C
|
||||
@ -122,8 +122,8 @@ since the program must be loaded to the BASIC start address.
|
||||
<sect1>80 Columns conio driver<p>
|
||||
|
||||
The C64 package comes with an alternative software driven 80 columns
|
||||
module <tt/c64-soft80.o/ which uses the memory under I/O between $d000
|
||||
and $ffff.
|
||||
module <tt/c64-soft80.o/ which uses the memory under I/O between $D000
|
||||
and $FF3F.
|
||||
|
||||
In memory constrained situations the memory from $400 to $7FF
|
||||
can be made available to a program by calling <tt/_heapadd ((void *) 0x0400, 0x0400);/
|
||||
@ -169,6 +169,33 @@ url="funcref.html" name="function reference"> for declaration and usage.
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>C64-specific accelerator functions<p>
|
||||
|
||||
The functions listed below are accelerator functions for the C64. See the <url
|
||||
url="funcref.html" name="function reference"> for declaration and usage.
|
||||
|
||||
<itemize>
|
||||
<item>detect_c128
|
||||
<item>detect_c64dtv
|
||||
<item>detect_c65
|
||||
<item>detect_chameleon
|
||||
<item>detect_scpu
|
||||
<item>detect_turbomaster
|
||||
<item>get_c128_speed
|
||||
<item>get_c64dtv_speed
|
||||
<item>get_c65_speed
|
||||
<item>get_chameleon_speed
|
||||
<item>get_scpu_speed
|
||||
<item>get_turbomaster_speed
|
||||
<item>set_c128_speed
|
||||
<item>set_c64dtv_speed
|
||||
<item>set_c65_speed
|
||||
<item>set_chameleon_speed
|
||||
<item>set_scpu_speed
|
||||
<item>set_turbomaster_speed
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>CBM-specific functions<p>
|
||||
|
||||
Some functions are available for all (or at least most) of the Commodore
|
||||
@ -291,7 +318,7 @@ Note that the graphics drivers are incompatible with the
|
||||
bytes each. Written and contributed by Marco van den Heuvel.
|
||||
|
||||
<tag><tt/c64-ram.emd (c64_ram_emd)/</tag>
|
||||
A driver for the hidden RAM below the I/O area and kernal ROM. Supports 48
|
||||
A driver for the hidden RAM below the I/O area and kernal ROM. Supports 47
|
||||
256 byte pages. Please note that this driver is incompatible with any of the
|
||||
graphics drivers, or the soft80 conio driver!
|
||||
|
||||
@ -300,10 +327,8 @@ Note that the graphics drivers are incompatible with the
|
||||
Will test the hardware for the available RAM.
|
||||
|
||||
<tag><tt/c64-reu.emd (c64_reu_emd)/</tag>
|
||||
A driver for the CBM REUs. The driver will determine from the connected REU
|
||||
if it supports 128KB of RAM or more. In the latter case, 256KB are assumed,
|
||||
but since there are no range checks, the application can use more memory if
|
||||
it has better knowledge about the hardware than the driver.
|
||||
A driver for the CBM REUs. The driver will test the connected REU to find
|
||||
out how much RAM is present.
|
||||
|
||||
<tag><tt/c64-vdc.emd (c64_vdc_emd)/</tag>
|
||||
A driver for the VDC memory of the C128. Written and contributed by Maciej
|
||||
|
@ -407,6 +407,7 @@ Here is a description of all the command line options:
|
||||
<item>sim6502
|
||||
<item>sim65c02
|
||||
<item>supervision
|
||||
<item>telestrat
|
||||
<item>vic20
|
||||
</itemize>
|
||||
|
||||
@ -941,6 +942,10 @@ The compiler defines several macros at startup:
|
||||
|
||||
This macro is defined if the target is the Supervision (-t supervision).
|
||||
|
||||
<tag><tt>__TELESTRAT__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Telestrat (-t telestrat).
|
||||
|
||||
<tag><tt>__TIME__</tt></tag>
|
||||
|
||||
This macro expands to the time of translation of the preprocessing
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>cl65 Users Guide
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
|
||||
<url url="mailto:greg.king5@verizon.net" name="Greg King">
|
||||
<date>2017-05-24
|
||||
<date>2017-10-16
|
||||
|
||||
<abstract>
|
||||
cl65 is the compile & link utility for cc65, the 6502 C compiler. It was
|
||||
@ -69,6 +69,7 @@ Short options:
|
||||
|
||||
Long options:
|
||||
--add-source Include source as comment
|
||||
--all-cdecl Make functions default to __cdecl__
|
||||
--asm-args options Pass options to the assembler
|
||||
--asm-define sym[=v] Define an assembler symbol
|
||||
--asm-include-dir dir Set an assembler include directory
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<title>VTech Creativision (aka Funvision) specific information for cc65
|
||||
<author><url url="mailto:polluks+cc65@sdf.lonestar.org" name="Stefan A. Haubenthal">
|
||||
<date>2016-04-14
|
||||
<date>2017-11-15
|
||||
|
||||
<abstract>
|
||||
An overview over the Creativision runtime system as it is implemented for the
|
||||
@ -31,14 +31,16 @@ more than one platform. Please see the function reference for more information.
|
||||
<sect>Binary format<p>
|
||||
|
||||
The standard binary output format generated by the linker for the Creativision target
|
||||
is a 4 kbyte machine language program. It is of course possible to change
|
||||
this behaviour by using one of the different linker configs.
|
||||
is a 4 KB ROM image. To create an 8 KB ROM a custom linker script has
|
||||
to be used.
|
||||
|
||||
<sect>Memory layout<p>
|
||||
|
||||
cc65 generated programs with the default setup run with the I/O area enabled,
|
||||
which gives a usable memory range of $B000 - $BEFF.
|
||||
More ROM may need additional bankswitching code.
|
||||
cc65 generated programs with the default setup are 4 KB in size,
|
||||
occupying $B000 - $BFFF. Usable memory space for the
|
||||
user program is $B000 - $BEFF. $BF00 -
|
||||
$BFFF is reserved for the runtime and cartridge configuration
|
||||
area.
|
||||
|
||||
Special locations:
|
||||
|
||||
@ -47,11 +49,15 @@ Special locations:
|
||||
The text screen is located at VRAM $1000.
|
||||
|
||||
<tag/Stack/
|
||||
The C runtime stack is located at $3FF and growing downwards.
|
||||
The C runtime stack is located at $03FF and growing downwards.
|
||||
|
||||
<tag/RAM/
|
||||
The available RAM for cc65 programs of an unexpanded Creativision
|
||||
starts at $01FA and ends at $03FF.
|
||||
|
||||
<tag/Heap/
|
||||
The C heap is located at the end of the program and grows towards the C
|
||||
runtime stack.
|
||||
The C heap is located at the end of the program's data area and
|
||||
grows towards the C runtime stack.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
@ -25,8 +25,7 @@ released with the <tt>dio_close</tt> function.
|
||||
dhandle_t __fastcall__ dio_open (unsigned char device);
|
||||
</verb></tscreen>
|
||||
|
||||
The <tt>device</tt> specifies the device to access, with 0 being the first
|
||||
device, 1 the second, and so on.
|
||||
The <tt>device</tt> specifies the device to access.
|
||||
|
||||
<tscreen><verb>
|
||||
unsigned char __fastcall__ dio_close (dhandle_t handle);
|
||||
|
2044
doc/funcref.sgml
2044
doc/funcref.sgml
File diff suppressed because it is too large
Load Diff
@ -44,6 +44,13 @@ by an external program. Such an utility is provided in util/gamate/gamate-fixcar
|
||||
Programs containing Gamate specific code may use the <tt/gamate.h/ header file.
|
||||
|
||||
|
||||
<sect1>Gamate specific functions<p>
|
||||
|
||||
<itemize>
|
||||
<item>waitvsync</item>
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>Hardware access<p>
|
||||
|
||||
The following pseudo variables declared in the <tt/gamate.inc/ include file do
|
||||
|
@ -85,6 +85,9 @@
|
||||
<tag><htmlurl url="dio.html" name="dio.html"></tag>
|
||||
Low-level disk I/O API.
|
||||
|
||||
<tag><htmlurl url="tgi.html" name="tgi.html"></tag>
|
||||
Tiny Graphics Interface.
|
||||
|
||||
<tag><htmlurl url="geos.html" name="geos.html"></tag>
|
||||
The GEOSLib manual.
|
||||
|
||||
|
@ -246,13 +246,13 @@ varies in its start and exit conditions.
|
||||
|
||||
<sect2>AppleWin<p>
|
||||
Available at <url
|
||||
url="http://applewin.berlios.de/">:
|
||||
url="https://github.com/AppleWin/AppleWin">:
|
||||
|
||||
Emulates Apple ][/enhanced Apple //e computers, with
|
||||
sound, video, joysticks, serial port, and disk images. Includes monitor. Only
|
||||
for Windows. The package comes with a DOS 3.3 disk (called "master.dsk") image;
|
||||
however, you will need <bf/AppleCommander 1.3.5/ or later (available at <url
|
||||
url="http://applecommander.sourceforge.net/">).
|
||||
however, you will need <bf/AppleCommander 1.4.0/ or later (available at <url
|
||||
url="https://applecommander.github.io/">).
|
||||
|
||||
Compile the tutorial with
|
||||
|
||||
@ -270,14 +270,13 @@ the <tt/master.dsk/ which comes with <bf/AppleWin/, and rename it to
|
||||
<tt/cc65.dsk/, then use <bf/AppleCommander/:
|
||||
|
||||
<tscreen><verb>
|
||||
java -jar ac.jar -cc65 cc65.dsk test B < hello
|
||||
java -jar ac.jar -as cc65.dsk test < hello
|
||||
</verb></tscreen>
|
||||
|
||||
Note that a convention in the Apple world is that "hello" is the file which is
|
||||
run automatically upon booting a DOS disk, sort of like the "autoexec.bat" of
|
||||
the MSDOS/Windows world. We've avoided that in the example, however. Also,
|
||||
the <tt/B/ parameter must be in caps., and "test" is the name of the program as
|
||||
it will appear on the Apple disk.
|
||||
the MSDOS/Windows world. We've avoided that in the example, however by using
|
||||
"test" as the name of the program as it will appear on the Apple disk.
|
||||
|
||||
Start the emulator, click on the <bf/Disk 1/ icon, and point to <bf/cc65.dsk/;
|
||||
then, click the big Apple logo, to boot the system. Then, type this on the
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<title>cc65 Library Overview
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
||||
<date>2014-04-12
|
||||
<date>2018-02-28
|
||||
|
||||
<abstract>
|
||||
An overview over the runtime and C libraries that come with the cc65 compiler,
|
||||
@ -43,7 +43,7 @@ Functions that are <em/not/ available:
|
||||
<itemize>
|
||||
<item><tt>tmpfile/tmpnam</tt>
|
||||
<p>
|
||||
<item><tt>system</tt>
|
||||
<item><tt>system</tt> (cc65 alternative <tt>exec</tt>)
|
||||
<p>
|
||||
<item>All functions that handle floating point numbers in some manner.
|
||||
<p>
|
||||
@ -172,10 +172,15 @@ portable. conio implementations exist for the following targets:
|
||||
<item>plus4 (or expanded c16/c116)
|
||||
<item>cbm510 (40 column video)
|
||||
<item>cbm610 (all CBM series-II computers with 80 column video)
|
||||
<item>creativision
|
||||
<item>gamate
|
||||
<item>geos-apple
|
||||
<item>geos-cbm
|
||||
<item>nes
|
||||
<item>osic1p
|
||||
<item>pce
|
||||
<item>pet (all CBM PET systems except the 2001)
|
||||
<item>telestrat
|
||||
<item>vic20
|
||||
</itemize>
|
||||
|
||||
@ -204,6 +209,7 @@ the following targets:
|
||||
<item>atarixl
|
||||
<item>c64
|
||||
<item>c128
|
||||
<item>cbm510
|
||||
</itemize>
|
||||
|
||||
The available functions are declared in <tt/mouse.h/.
|
||||
@ -235,6 +241,3 @@ freely, subject to the following restrictions:
|
||||
</enum>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
61
doc/pce.sgml
61
doc/pce.sgml
@ -3,9 +3,9 @@
|
||||
<article>
|
||||
|
||||
<title>PC-Engine (TurboGrafx) System specific information for cc65
|
||||
<author>
|
||||
<url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">
|
||||
<date>2016-09-29
|
||||
<author><url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">,<newline>
|
||||
<url url="mailto:greg.king5@verizon.net" name="Greg King">
|
||||
<date>2018-02-12
|
||||
|
||||
<abstract>
|
||||
An overview over the PCE runtime system as it is implemented for the
|
||||
@ -30,11 +30,36 @@ more than one platform. Please see the function reference for more
|
||||
information.
|
||||
|
||||
|
||||
|
||||
<sect>Binary format<p>
|
||||
|
||||
The standard binary output format generated by the linker for the PCE target
|
||||
is a cartridge image with no header. It is of course possible to change this
|
||||
behaviour by using a modified startup file and linker config.
|
||||
The binary output file generated by the linker, for the PCE target, is an
|
||||
image, with no header, that has 8K bytes in the wrong place. That file must be
|
||||
post-processed; the 8K at the end must be moved to the front of the image.
|
||||
|
||||
On POSIX systems, the <tt/dd/ command and the shell give a convenient way to do
|
||||
it. Here is an example of their use:
|
||||
<tscreen><verb>
|
||||
dd if=conio.bin bs=8K skip=3 > conio.pce
|
||||
dd if=conio.bin bs=8K count=3 >> conio.pce
|
||||
</verb></tscreen>
|
||||
The first command grabs the last 8K of a 32K file, and writes it as the first
|
||||
part of a new file. The second command reads all but the last part of the old
|
||||
file, and appends it to the new file.
|
||||
<tscreen><verb>
|
||||
+--------+--------+--------+--------+
|
||||
| Bank 1 | Bank 2 | Bank 3 | Bank 0 | <-- "conio.bin"
|
||||
+--------+--------+--------+--------+
|
||||
|
||||
+--------+--------+--------+--------+
|
||||
| Bank 0 | Bank 1 | Bank 2 | Bank 3 | <-- "conio.pce"
|
||||
+--------+--------+--------+--------+
|
||||
</verb></tscreen>
|
||||
<em/Note/: That <tt/.pce/ file shows the format of the ROM cartridge that is
|
||||
plugged into a PC-Engine. But, that <tt/.bin/ file shows what programs
|
||||
actually see when they execute the code in that cartridge.
|
||||
|
||||
|
||||
|
||||
<sect>Memory layout<p>
|
||||
|
||||
@ -52,19 +77,23 @@ Special locations:
|
||||
<tag/Stack/
|
||||
The C runtime stack is located in system RAM at $3FFF and growing downwards.
|
||||
|
||||
<tag/BSS and Data/
|
||||
|
||||
The BSS (uninitialized variables) and Data (initialized variables) sections are
|
||||
placed one after the other into system RAM at $2000.
|
||||
<tag/Data and BSS/
|
||||
The Data (initialized variables) and BSS (uninitialized variables) sections are
|
||||
placed one after the other into system RAM at $2200.
|
||||
|
||||
<tag/Heap/
|
||||
The C heap is located after the end of the Data section and grows towards the C
|
||||
The C heap is located after the end of the BSS section; and, grows towards the C
|
||||
runtime stack.
|
||||
|
||||
<tag/Code/
|
||||
The startup code is located at $E000 in the System/Hardware bank. Further
|
||||
code can be placed in other ROM banks, this must be done manually however.
|
||||
In an 8K ROM cartridge, code and read-only data are located between
|
||||
$E000 and $FFF5 in the System bank.
|
||||
|
||||
In a 16K cartridge, code and read-only data are located between $C000
|
||||
and $FFF5.
|
||||
|
||||
In a 32K cartridge, code and read-only data are located between $8000
|
||||
and $FFF5.
|
||||
</descrip><p>
|
||||
|
||||
|
||||
@ -171,7 +200,8 @@ following functions (and a few others):
|
||||
<sect>Other hints<p>
|
||||
|
||||
<itemize>
|
||||
<item>a good emulator to use for PC-Engine is "mednafen" (<url url="http://mednafen.fobby.net/">)
|
||||
<item><url url="https://mednafen.github.io/" name= "Mednafen"> is a good
|
||||
emulator to use for the PC-Engine.
|
||||
</itemize>
|
||||
|
||||
some useful resources on PCE coding:
|
||||
@ -210,6 +240,3 @@ freely, subject to the following restrictions:
|
||||
</enum>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
@ -124,6 +124,19 @@ declaration and usage.
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>CBM specific CPU functions<p>
|
||||
|
||||
Some CPU related functions are available for some of the Commodore
|
||||
machines. See the <url url="funcref.html" name="function reference"> for
|
||||
declaration and usage.
|
||||
|
||||
<itemize>
|
||||
<item>fast
|
||||
<item>slow
|
||||
<item>isfast
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>Hardware access<p>
|
||||
|
||||
The following pseudo variables declared in the <tt/plus4.h/ header file do
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<title>Watara Supervision specific information for cc65
|
||||
<author><url url="mailto:polluks@sdf.lonestar.org" name="Stefan A. Haubenthal">
|
||||
<date>2014-04-12
|
||||
<date>2017-11-21
|
||||
|
||||
<abstract>
|
||||
An overview over the Supervision runtime system as it is implemented for the
|
||||
@ -63,14 +63,6 @@ Special locations:
|
||||
Programs containing Supervision specific code may use the <tt/supervision.h/ header file.
|
||||
|
||||
|
||||
<sect1>Supervision specific functions<p>
|
||||
|
||||
<itemize>
|
||||
<item>waitvsync</item>
|
||||
</itemize>
|
||||
|
||||
|
||||
|
||||
<sect1>Hardware access<p>
|
||||
|
||||
The following pseudo variables declared in the <tt/supervision.inc/ include file do
|
||||
@ -102,11 +94,12 @@ No extended memory drivers are currently available for the Supervision.
|
||||
|
||||
<sect1>Joystick drivers<p>
|
||||
|
||||
No joystick drivers are currently available for the Supervision.
|
||||
<!--A joystick driver for the standard buttons is available, but must be
|
||||
statically linked, because no file I/O is available. See the documentation for
|
||||
the <url url="co65.html" name="co65 utility"> for information on how to do
|
||||
that.-->
|
||||
<descrip>
|
||||
|
||||
<tag><tt/supervision-stdjoy.joy (supervision_stdjoy_joy)/</tag>
|
||||
A joystick driver for the standard two buttons joypad is available.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
<sect1>Mouse drivers<p>
|
||||
|
||||
|
@ -9,9 +9,7 @@
|
||||
<date>2017-01-22
|
||||
|
||||
<abstract>
|
||||
An overview over the Telestrat (<url name="Telemon 3.0"
|
||||
url="http://orix.oric.org">) runtime system as it is implemented for the
|
||||
cc65 C compiler.
|
||||
An overview over the Telestrat (Telemon 2.4 & Telemon 3.x : http://orix.oric.org) runtime system as it is implemented for the cc65 C compiler.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
@ -117,6 +115,20 @@ structures; accessing the struct fields will access the chip registers.
|
||||
|
||||
<sect>Loadable drivers<p>
|
||||
|
||||
<sect1>TGI<p>
|
||||
|
||||
TGI drivers is available on Oric Telestrat with some functions :
|
||||
|
||||
<itemize>
|
||||
<item>tgi_done
|
||||
<item>tgi_install
|
||||
<item>tgi_init
|
||||
<item>tgi_clear
|
||||
<item>tgi_line
|
||||
<item>tgi_setpixel
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>Extended memory drivers<p>
|
||||
|
||||
No extended memory drivers are currently available for the Telestrat.
|
||||
@ -143,7 +155,7 @@ Telestrat manages also mouse, but it had been no handled yet in this version.
|
||||
|
||||
<descrip>
|
||||
|
||||
Telestrat has a RS232 port, but it's not used
|
||||
Telestrat has a RS232 port, but it's not usable in cc65.
|
||||
|
||||
</descrip>
|
||||
|
||||
|
1003
doc/tgi.sgml
Normal file
1003
doc/tgi.sgml
Normal file
File diff suppressed because it is too large
Load Diff
@ -58,7 +58,7 @@ SOURCES = foo.c bar.c
|
||||
PROGRAM = foobar
|
||||
|
||||
ifdef CC65_TARGET
|
||||
CC = $(CC65_HOME)/bin/cl65
|
||||
CC = cl65
|
||||
CFLAGS = -t $(CC65_TARGET) --create-dep $(<:.c=.d) -O
|
||||
LDFLAGS = -t $(CC65_TARGET) -m $(PROGRAM).map
|
||||
else
|
||||
@ -104,12 +104,6 @@ best done on the GNU Make command line like this:
|
||||
make CC65_TARGET=c64
|
||||
</verb></tscreen>
|
||||
|
||||
The sample Makefile presumes the variable <tt/CC65_HOME/ to point to the
|
||||
directory cc65 is located in. Again there are several ways to define this
|
||||
variable but as its value typically won't change often it is best done as an
|
||||
environment variable. On Windows the cc65 .exe installer package takes care
|
||||
of creating a <tt/CC65_HOME/ environment variable.
|
||||
|
||||
|
||||
<sect1>Understanding the sample Makefile<p>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<author>
|
||||
<url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
|
||||
<url url="mailto:polluks@sdf.lonestar.org" name="Stefan A. Haubenthal">
|
||||
<date>2017-05-18
|
||||
<date>2018-04-20
|
||||
|
||||
<abstract>
|
||||
An overview over the VIC20 runtime system as it is implemented for the cc65 C
|
||||
@ -147,7 +147,19 @@ No graphics drivers are currently available for the VIC20.
|
||||
|
||||
<sect1>Extended memory drivers<p>
|
||||
|
||||
No extended memory drivers are currently available for the VIC20.
|
||||
<descrip>
|
||||
|
||||
<tag><tt/vic20-rama.emd (vic20_rama_emd)/</tag>
|
||||
A driver for any RAM at $A000-$BFFF. Supports 32 256 byte pages.
|
||||
Written and contributed by Marco van den Heuvel.
|
||||
|
||||
<tag><tt/vic20-georam.emd (vic20_georam_emd)/</tag>
|
||||
A driver for the Berkeley Softworks GeoRam cartridge connected by means of
|
||||
the MasC=erade c64 cartridge adapter. The driver will determine the
|
||||
available RAM from the connected cartridge. It supports 64KB
|
||||
up to 2048KB of RAM.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1>Joystick drivers<p>
|
||||
@ -161,8 +173,8 @@ The default drivers, <tt/joy_stddrv (joy_static_stddrv)/, point to <tt/vic20-std
|
||||
|
||||
<tag><tt/vic20-ptvjoy.joy (vic20_ptvjoy_joy)/</tag>
|
||||
Driver for the Protovision 4-player adapter contributed by Groepaz. See
|
||||
<url url="http://www.protovision-online.de/hardw/4_player.php?language=en"
|
||||
name="Protovision shop"> for prices and building instructions. Up to three
|
||||
<url url="https://www.protovision.games/hardw/4_player.php"
|
||||
name="the Protovision shop"> for prices and building instructions. Up to three
|
||||
joysticks are supported.
|
||||
|
||||
</descrip><p>
|
||||
|
@ -51,6 +51,10 @@ typedef unsigned size_t;
|
||||
#define CPU_65C02 1
|
||||
#define CPU_65816 2
|
||||
#define CPU_4510 3
|
||||
#define CPU_65SC02 4
|
||||
#define CPU_65CE02 5
|
||||
#define CPU_HUC6280 6
|
||||
#define CPU_2A0x 7
|
||||
|
||||
unsigned char getcpu (void);
|
||||
/* Detect the CPU the program is running on */
|
||||
|
108
include/_gtia.h
108
include/_gtia.h
@ -34,63 +34,65 @@
|
||||
|
||||
/* Define a structure with the gtia register offsets */
|
||||
struct __gtia_write {
|
||||
unsigned char hposp0; /* horizontal position player 0 */
|
||||
unsigned char hposp1; /* horizontal position player 1 */
|
||||
unsigned char hposp2; /* horizontal position player 2 */
|
||||
unsigned char hposp3; /* horizontal position player 3 */
|
||||
unsigned char hposm0; /* horizontal position missile 0 */
|
||||
unsigned char hposm1; /* horizontal position missile 1 */
|
||||
unsigned char hposm2; /* horizontal position missile 2 */
|
||||
unsigned char hposm3; /* horizontal position missile 3 */
|
||||
unsigned char sizep0; /* size of player 0 */
|
||||
unsigned char sizep1; /* size of player 1 */
|
||||
unsigned char sizep2; /* size of player 2 */
|
||||
unsigned char sizep3; /* size of player 3 */
|
||||
unsigned char sizem; /* size of missiles */
|
||||
unsigned char grafp0; /* graphics shape player 0 */
|
||||
unsigned char grafp1; /* graphics shape player 1 */
|
||||
unsigned char grafp2; /* graphics shape player 2 */
|
||||
unsigned char grafp3; /* graphics shape player 3 */
|
||||
unsigned char grafm; /* graphics shape missiles */
|
||||
unsigned char colpm0; /* color player and missile 0 */
|
||||
unsigned char colpm1; /* color player and missile 1 */
|
||||
unsigned char colpm2; /* color player and missile 2 */
|
||||
unsigned char colpm3; /* color player and missile 3 */
|
||||
unsigned char colpf0; /* color playfield 0 */
|
||||
unsigned char colpf1; /* color playfield 1 */
|
||||
unsigned char colpf2; /* color playfield 2 */
|
||||
unsigned char colpf3; /* color playfield 3 */
|
||||
unsigned char colbk; /* color background */
|
||||
unsigned char prior; /* priority selection */
|
||||
unsigned char vdelay; /* vertical delay */
|
||||
unsigned char gractl; /* stick/paddle latch, p/m control */
|
||||
unsigned char hitclr; /* clear p/m collision */
|
||||
unsigned char consol; /* console buttons */
|
||||
unsigned char hposp0; /* 0x00: horizontal position player 0 */
|
||||
unsigned char hposp1; /* 0x01: horizontal position player 1 */
|
||||
unsigned char hposp2; /* 0x02: horizontal position player 2 */
|
||||
unsigned char hposp3; /* 0x03: horizontal position player 3 */
|
||||
unsigned char hposm0; /* 0x04: horizontal position missile 0 */
|
||||
unsigned char hposm1; /* 0x05: horizontal position missile 1 */
|
||||
unsigned char hposm2; /* 0x06: horizontal position missile 2 */
|
||||
unsigned char hposm3; /* 0x07: horizontal position missile 3 */
|
||||
unsigned char sizep0; /* 0x08: size of player 0 */
|
||||
unsigned char sizep1; /* 0x09: size of player 1 */
|
||||
unsigned char sizep2; /* 0x0A: size of player 2 */
|
||||
unsigned char sizep3; /* 0x0B: size of player 3 */
|
||||
unsigned char sizem; /* 0x0C: size of missiles */
|
||||
unsigned char grafp0; /* 0x0D: graphics shape player 0 */
|
||||
unsigned char grafp1; /* 0x0E: graphics shape player 1 */
|
||||
unsigned char grafp2; /* 0x0F: graphics shape player 2 */
|
||||
unsigned char grafp3; /* 0x10: graphics shape player 3 */
|
||||
unsigned char grafm; /* 0x11: graphics shape missiles */
|
||||
unsigned char colpm0; /* 0x12: color player and missile 0 */
|
||||
unsigned char colpm1; /* 0x13: color player and missile 1 */
|
||||
unsigned char colpm2; /* 0x14: color player and missile 2 */
|
||||
unsigned char colpm3; /* 0x15: color player and missile 3 */
|
||||
unsigned char colpf0; /* 0x16: color playfield 0 */
|
||||
unsigned char colpf1; /* 0x17: color playfield 1 */
|
||||
unsigned char colpf2; /* 0x18: color playfield 2 */
|
||||
unsigned char colpf3; /* 0x19: color playfield 3 */
|
||||
unsigned char colbk; /* 0x1A: color background */
|
||||
unsigned char prior; /* 0x1B: priority selection */
|
||||
unsigned char vdelay; /* 0x1C: vertical delay */
|
||||
unsigned char gractl; /* 0x1D: stick/paddle latch, p/m control */
|
||||
unsigned char hitclr; /* 0x1E: clear p/m collision */
|
||||
unsigned char consol; /* 0x1F: builtin speaker */
|
||||
};
|
||||
|
||||
/* Define a structure with the gtia register offsets */
|
||||
struct __gtia_read {
|
||||
unsigned char m0pf; /* missile 0 to playfield collision */
|
||||
unsigned char m1pf; /* missile 1 to playfield collision */
|
||||
unsigned char m2pf; /* missile 2 to playfield collision */
|
||||
unsigned char m3pf; /* missile 3 to playfield collision */
|
||||
unsigned char p0pf; /* player 0 to playfield collision */
|
||||
unsigned char p1pf; /* player 1 to playfield collision */
|
||||
unsigned char p2pf; /* player 2 to playfield collision */
|
||||
unsigned char p3pf; /* player 3 to playfield collision */
|
||||
unsigned char m0pl; /* missile 0 to player collision */
|
||||
unsigned char m1pl; /* missile 1 to player collision */
|
||||
unsigned char m2pl; /* missile 2 to player collision */
|
||||
unsigned char m3pl; /* missile 3 to player collision */
|
||||
unsigned char p0pl; /* player 0 to player collision */
|
||||
unsigned char p1pl; /* player 1 to player collision */
|
||||
unsigned char p2pl; /* player 2 to player collision */
|
||||
unsigned char p3pl; /* player 3 to player collision */
|
||||
unsigned char trig0; /* joystick trigger 0 */
|
||||
unsigned char trig1; /* joystick trigger 1 */
|
||||
unsigned char trig2; /* joystick trigger 2 */
|
||||
unsigned char trig3; /* joystick trigger 3 */
|
||||
unsigned char pal; /* pal/ntsc flag */
|
||||
unsigned char m0pf; /* 0x00: missile 0 to playfield collision */
|
||||
unsigned char m1pf; /* 0x01: missile 1 to playfield collision */
|
||||
unsigned char m2pf; /* 0x02: missile 2 to playfield collision */
|
||||
unsigned char m3pf; /* 0x03: missile 3 to playfield collision */
|
||||
unsigned char p0pf; /* 0x04: player 0 to playfield collision */
|
||||
unsigned char p1pf; /* 0x05: player 1 to playfield collision */
|
||||
unsigned char p2pf; /* 0x06: player 2 to playfield collision */
|
||||
unsigned char p3pf; /* 0x07: player 3 to playfield collision */
|
||||
unsigned char m0pl; /* 0x08: missile 0 to player collision */
|
||||
unsigned char m1pl; /* 0x09: missile 1 to player collision */
|
||||
unsigned char m2pl; /* 0x0A: missile 2 to player collision */
|
||||
unsigned char m3pl; /* 0x0B: missile 3 to player collision */
|
||||
unsigned char p0pl; /* 0x0C: player 0 to player collision */
|
||||
unsigned char p1pl; /* 0x0D: player 1 to player collision */
|
||||
unsigned char p2pl; /* 0x0E: player 2 to player collision */
|
||||
unsigned char p3pl; /* 0x0F: player 3 to player collision */
|
||||
unsigned char trig0; /* 0x10: joystick trigger 0 */
|
||||
unsigned char trig1; /* 0x11: joystick trigger 1 */
|
||||
unsigned char trig2; /* 0x12: joystick trigger 2 */
|
||||
unsigned char trig3; /* 0x13: joystick trigger 3 */
|
||||
unsigned char pal; /* 0x14: pal/ntsc flag */
|
||||
unsigned char unused[10];
|
||||
unsigned char consol; /* 0x1F: console buttons */
|
||||
};
|
||||
|
||||
/* End of _gtia.h */
|
||||
|
309
include/accelerator.h
Normal file
309
include/accelerator.h
Normal file
@ -0,0 +1,309 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* accelerator.h */
|
||||
/* */
|
||||
/* Accelerator specific definitions */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2018 Marco van den Heuvel */
|
||||
/* EMail: blackystardust68@yahoo.com */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef _ACCELERATOR_H
|
||||
#define _ACCELERATOR_H
|
||||
|
||||
/*****************/
|
||||
/* Speed defines */
|
||||
/*****************/
|
||||
|
||||
#define SPEED_SLOW 0x00
|
||||
#define SPEED_FAST 0xFF
|
||||
|
||||
#define SPEED_1X SPEED_SLOW
|
||||
#define SPEED_2X 2 - 1 /* C64 Chameleon, C64DTV, C128, PET 65816, Apple2 Fast Chip, Apple2 TransWarp, Apple2 Zip Chip */
|
||||
#define SPEED_3X 3 - 1 /* C64 Chameleon, C65, PET 65816, Apple2 Booster, Apple 2 Fast Chip, Apple2 Titan, Apple2 TransWarp, Apple2 Zip Chip */
|
||||
#define SPEED_4X 4 - 1 /* C64 Chameleon, C64 TurboMaster, C64 TurboProcess, PET 65816, Apple2 Fast Chip, Apple2 Zip Chip */
|
||||
#define SPEED_5X 5 - 1 /* C64 Chameleon, PET 65816, Apple2 Fast Chip */
|
||||
#define SPEED_6X 6 - 1 /* C64 Chameleon, PET 65816, Apple2 Fast Chip */
|
||||
#define SPEED_7X 7 - 1 /* PET 65816, Apple2 Fast Chip */
|
||||
#define SPEED_8X 8 - 1 /* C64 Flash8, PET 65816, Apple 2 Fast Chip */
|
||||
#define SPEED_10X 10 - 1 /* PET 65816, Apple2 Fast Chip */
|
||||
#define SPEED_12X 12 - 1 /* Apple2 Fast Chip */
|
||||
#define SPEED_16X 16 - 1 /* Apple2 Fast Chip */
|
||||
#define SPEED_20X 20 - 1 /* C64/C128 SuperCPU */
|
||||
|
||||
/***********************************/
|
||||
/* Accelerator function prototypes */
|
||||
/***********************************/
|
||||
|
||||
/* C64/C128 SuperCPU cartridge */
|
||||
|
||||
unsigned char __fastcall__ set_scpu_speed (unsigned char speed);
|
||||
|
||||
/* Set the speed of the SuperCPU cartridge, using SPEED_SLOW will switch to
|
||||
* 1 Mhz mode, SPEED_20X or SPEED_FAST will switch to 20 Mhz mode.
|
||||
*
|
||||
* Note that any value lower than SPEED_20X will switch to 1 Mhz mode, and
|
||||
* any value higher or equal to SPEED_20X will switch to 20 Mhz mode.
|
||||
*
|
||||
* This function will return the actual speed the CPU is at after trying
|
||||
* to set the requested speed, if this is not the speed that was requested
|
||||
* then possibly the hardware speed switch prevented any software speed
|
||||
* switching.
|
||||
*
|
||||
* This function does not check for the presence of the SuperCPU cartridge,
|
||||
* make sure you use 'detect_scpu();' before using.
|
||||
*/
|
||||
|
||||
unsigned char get_scpu_speed (void);
|
||||
|
||||
/* Get the speed of the SuperCPU cartridge.
|
||||
*
|
||||
* Possible return values:
|
||||
* SPEED_1X : 1 Mhz mode
|
||||
* SPEED_20X : 20 Mhz mode
|
||||
*
|
||||
* This function does not check for the presence of the SuperCPU cartridge,
|
||||
* make sure you use 'detect_scpu();' before using.
|
||||
*/
|
||||
|
||||
unsigned char detect_scpu (void);
|
||||
|
||||
/* Check for the presence of the SuperCPU cartridge.
|
||||
*
|
||||
* Possible return values:
|
||||
* 0x00 : SuperCPU cartridge not present
|
||||
* 0x01 : SuperCPU cartridge present
|
||||
*/
|
||||
|
||||
|
||||
/* C64DTV */
|
||||
|
||||
unsigned char __fastcall__ set_c64dtv_speed (unsigned char speed);
|
||||
|
||||
/* Set the speed of the C64DTV, using SPEED_SLOW will switch to
|
||||
* slow mode, SPEED_2X or SPEED_FAST will switch to fast mode.
|
||||
*
|
||||
* Note that any value higher or equal to SPEED_2X will switch to fast mode.
|
||||
*
|
||||
* This function will return the actual speed the CPU is at after trying
|
||||
* to set the requested speed, to my knowledge the switch should not fail.
|
||||
*
|
||||
* This function does not check for the presence of the C64DTV,
|
||||
* make sure you use 'detect_c64dtv();' before using.
|
||||
*/
|
||||
|
||||
unsigned char get_c64dtv_speed (void);
|
||||
|
||||
/* Get the speed of the C64DTV.
|
||||
*
|
||||
* Possible return values:
|
||||
* SPEED_1X : slow mode
|
||||
* SPEED_2X : fast mode
|
||||
*
|
||||
* This function does not check for the presence of the C64DTV,
|
||||
* make sure you use 'detect_c64dtv();' before using.
|
||||
*/
|
||||
|
||||
unsigned char detect_c64dtv (void);
|
||||
|
||||
/* Check for the presence of the C64DTV.
|
||||
*
|
||||
* Possible return values:
|
||||
* 0x00 : C64DTV not present
|
||||
* 0x01 : C64DTV present
|
||||
*/
|
||||
|
||||
|
||||
/* C128 8502 CPU */
|
||||
|
||||
unsigned char __fastcall__ set_c128_speed (unsigned char speed);
|
||||
|
||||
/* Set the speed of the C128 8502 CPU, using SPEED_SLOW will switch to
|
||||
* 1 Mhz (slow) mode, SPEED_2X or SPEED_FAST will switch to 2Mhz (fast) mode.
|
||||
*
|
||||
* Note that any value higher or equal to SPEED_2X will switch to fast mode.
|
||||
*
|
||||
* This function will return the actual speed the CPU is at after trying
|
||||
* to set the requested speed, to my knowledge the switching should not fail.
|
||||
*
|
||||
* This function does not check if the C128 CPU is the current CPU, make sure
|
||||
* you use 'detect_c128();' before using.
|
||||
*/
|
||||
|
||||
unsigned char get_c128_speed (void);
|
||||
|
||||
/* Get the speed of the C128 8502 CPU.
|
||||
*
|
||||
* Possible return values:
|
||||
* SPEED_SLOW : Slow mode
|
||||
* SPEED_2X : Fast mode
|
||||
*
|
||||
* This function does not check if the C128 CPU is the current CPU, make sure
|
||||
* you use 'detect_c128();' before using.
|
||||
*/
|
||||
|
||||
unsigned char detect_c128 (void);
|
||||
|
||||
/* Check if the C128 CPU is the current CPU.
|
||||
*
|
||||
* Possible return values:
|
||||
* 0x00 : C128 CPU is not the current CPU
|
||||
* 0x01 : C128 CPU is the current CPU
|
||||
*/
|
||||
|
||||
|
||||
/* C64 Chameleon cartridge */
|
||||
|
||||
unsigned char __fastcall__ set_chameleon_speed (unsigned char speed);
|
||||
|
||||
/* Set the speed of the C64 Chameleon cartridge, the following inputs
|
||||
* are accepted:
|
||||
* SPEED_SLOW : 1 Mhz mode
|
||||
* SPEED_1X : 1 Mhz mode
|
||||
* SPEED_2X : 2 Mhz mode
|
||||
* SPEED_3X : 3 Mhz mode
|
||||
* SPEED_4X : 4 Mhz mode
|
||||
* SPEED_5X : 5 Mhz mode
|
||||
* SPEED_6X : 6 Mhz mode
|
||||
* SPEED_FAST : Maximum speed mode
|
||||
*
|
||||
* Note that any value higher or equal to SPEED_7X will switch to maximum
|
||||
* speed mode.
|
||||
*
|
||||
* This function will return the actual speed the CPU is at after trying
|
||||
* to set the requested speed, to my knowledge the switching should not fail.
|
||||
*
|
||||
* This function does not check for the presence of the C64 Chameleon cartridge,
|
||||
* make sure you use 'detect_chameleon();' before using.
|
||||
*/
|
||||
|
||||
unsigned char get_chameleon_speed (void);
|
||||
|
||||
;/* Get the speed of the C64 Chameleon cartridge.
|
||||
; *
|
||||
; * Possible return values:
|
||||
; * SPEED_SLOW : Slow mode
|
||||
; * SPEED_2X : 2Mhz mode
|
||||
; * SPEED_3X : 3Mhz mode
|
||||
; * SPEED_4X : 4Mhz mode
|
||||
; * SPEED_5X : 5Mhz mode
|
||||
; * SPEED_6X : 6Mhz mode
|
||||
; * SPEED_FAST : Maximum speed mode
|
||||
; *
|
||||
; * This function does not check for the presence of the C64 Chameleon cartridge,
|
||||
; * make sure you use 'detect_chameleon();' before using.
|
||||
; */
|
||||
|
||||
unsigned char detect_chameleon (void);
|
||||
|
||||
/* Check for the presence of the C64 Chameleon cartridge.
|
||||
*
|
||||
* Possible return values:
|
||||
* 0x00 : C64 Chameleon cartridge not present
|
||||
* 0x01 : C64 Chameleon cartridge present
|
||||
*/
|
||||
|
||||
|
||||
/* C65/C64DX in C64 mode */
|
||||
|
||||
unsigned char __fastcall__ set_c65_speed (unsigned char speed);
|
||||
|
||||
/* Set the speed of the C65/C64DX CPU, using SPEED_SLOW will switch to
|
||||
* 1 Mhz mode, SPEED_3X or SPEED_FAST will switch to 3.5 Mhz (fast) mode.
|
||||
*
|
||||
* Note that any value higher or equal to SPEED_3X will switch to fast mode.
|
||||
*
|
||||
* This function will return the actual speed the CPU is at after trying
|
||||
* to set the requested speed, to my knowledge the switching should not fail.
|
||||
*
|
||||
* This function does not check for the presence of a C65/C64DX in C64 mode,
|
||||
* make sure you use 'detect_c65();' before using.
|
||||
*/
|
||||
|
||||
unsigned char get_c65_speed (void);
|
||||
|
||||
/* Get the speed of the C65/C64DX CPU.
|
||||
*
|
||||
* Possible return values:
|
||||
* SPEED_SLOW : Slow mode
|
||||
* SPEED_3X : Fast mode
|
||||
*
|
||||
* This function does not check for the presence of a C65/C64DX in C64 mode,
|
||||
* make sure you use 'detect_c65();' before using.
|
||||
*/
|
||||
|
||||
unsigned char detect_c65 (void);
|
||||
|
||||
/* Check for the presence of a C65/C64DX in C64 mode.
|
||||
*
|
||||
* Possible return values:
|
||||
* 0x00 : C65/C64DX in C64 mode not present
|
||||
* 0x01 : C65/C64DX in C64 mode present
|
||||
*/
|
||||
|
||||
|
||||
/* C64 Turbo Master cartridge */
|
||||
|
||||
unsigned char __fastcall__ set_turbomaster_speed (unsigned char speed);
|
||||
|
||||
/* Set the speed of the Turbo Master cartridge, using SPEED_SLOW will switch to
|
||||
* 1 Mhz mode, SPEED_4X or SPEED_FAST will switch to 4 Mhz mode.
|
||||
*
|
||||
* Note that any value higher or equal to SPEED_4X will switch to 4 Mhz mode,
|
||||
* any value lower than SPEED_4X will switch to 1 Mhz mode.
|
||||
*
|
||||
* This function will return the actual speed the CPU is at after trying
|
||||
* to set the requested speed, if the speed is different it might indicate
|
||||
* that the hardware switch has locked the speed.
|
||||
*
|
||||
* This function does not check for the presence of a Turbo Master cartridge,
|
||||
* make sure you use 'detect_turbomaster();' before using.
|
||||
*/
|
||||
|
||||
unsigned char get_turbomaster_speed (void);
|
||||
|
||||
/* Get the speed of the Turbo Master cartridge.
|
||||
*
|
||||
* Possible return values:
|
||||
* SPEED_SLOW : 1 Mhz mode
|
||||
* SPEED_4X : 4 Mhz mode
|
||||
*
|
||||
* This function does not check for the presence of a Turbo Master cartridge,
|
||||
* make sure you use 'detect_turbomaster();' before using.
|
||||
*/
|
||||
|
||||
unsigned char detect_turbomaster (void);
|
||||
|
||||
/* Check for the presence of a C64 Turbo Master cartridge.
|
||||
*
|
||||
* Possible return values:
|
||||
* 0x00 : C64 Turbo Master cartridge not present
|
||||
* 0x01 : C64 Turbo Master cartridge present
|
||||
*/
|
||||
|
||||
/* End of accelerator.h */
|
||||
#endif
|
||||
|
119
include/ace.h
119
include/ace.h
@ -1,119 +0,0 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* ace.h */
|
||||
/* */
|
||||
/* ACE system-specific definitions */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2015, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef _ACE_H
|
||||
#define _ACE_H
|
||||
|
||||
|
||||
|
||||
/* Check for errors */
|
||||
#if !defined(__ACE__)
|
||||
# error This module may only be used when compiling for the ACE os!
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifndef _STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
struct aceDirentBuf {
|
||||
unsigned long ad_size; /* Size in bytes */
|
||||
unsigned char ad_date [8]; /* YY:YY:MM:DD:HH:MM:SS:TW */
|
||||
char ad_type [4]; /* File type as ASCIIZ string */
|
||||
unsigned char ad_flags; /* File flags */
|
||||
unsigned char ad_usage; /* More flags */
|
||||
unsigned char ad_namelen; /* Length of name */
|
||||
char ad_name [17]; /* Name itself, ASCIIZ */
|
||||
};
|
||||
|
||||
int __cdecl__ aceDirOpen (char* dir);
|
||||
int __cdecl__ aceDirClose (int handle);
|
||||
int __cdecl__ aceDirRead (int handle, struct aceDirentBuf* buf);
|
||||
|
||||
/* Type of an ACE key. Key in low byte, shift mask in high byte */
|
||||
typedef unsigned int aceKey;
|
||||
|
||||
/* #defines for the shift mask returned by aceConGetKey */
|
||||
#define aceSH_KEY 0x00FF /* Mask key itself */
|
||||
#define aceSH_MASK 0xFF00 /* Mask shift mask */
|
||||
#define aceSH_EXT 0x2000 /* Extended key */
|
||||
#define aceSH_CAPS 0x1000 /* Caps lock key */
|
||||
#define aceSH_ALT 0x0800 /* Alternate key */
|
||||
#define aceSH_CTRL 0x0400 /* Ctrl key */
|
||||
#define aceSH_CBM 0x0200 /* Commodore key */
|
||||
#define aceSH_SHIFT 0x0100 /* Shift key */
|
||||
|
||||
/* #defines for the options in aceConSetOpt/aceConGetOpt */
|
||||
#define aceOP_PUTMASK 1 /* Console put mask */
|
||||
#define aceOP_CHARCOLOR 2 /* Character color */
|
||||
#define aceOP_CHARATTR 3 /* Character attribute */
|
||||
#define aceOP_FILLCOLOR 4 /* Fill color */
|
||||
#define aceOP_FILLATTR 5 /* Fill attribute */
|
||||
#define aceOP_CRSCOLOR 6 /* Cursor color */
|
||||
#define aceOP_CRSWRAP 7 /* Force cursor wrap */
|
||||
#define aceOP_SHSCROLL 8 /* Shift keys for scrolling */
|
||||
#define aceOP_MOUSCALE 9 /* Mouse scaling */
|
||||
#define aceOP_RPTDELAY 10 /* Key repeat delay */
|
||||
#define aceOP_RPTRATE 11 /* Key repeat rate */
|
||||
|
||||
/* Console functions */
|
||||
void __cdecl__ aceConWrite (char* buf, size_t count);
|
||||
void __cdecl__ aceConPutLit (int c);
|
||||
void __cdecl__ aceConPos (unsigned x, unsigned y);
|
||||
void __cdecl__ aceConGetPos (unsigned* x, unsigned* y);
|
||||
unsigned aceConGetX (void);
|
||||
unsigned aceConGetY (void);
|
||||
char __cdecl__* aceConInput (char* buf, unsigned initial);
|
||||
int aceConStopKey (void);
|
||||
aceKey aceConGetKey (void);
|
||||
int __cdecl__ aceConKeyAvail (aceKey* key);
|
||||
void __cdecl__ aceConKeyMat (char* matrix);
|
||||
void __cdecl__ aceConSetOpt (unsigned char opt, unsigned char val);
|
||||
int __cdecl__ aceConGetOpt (unsigned char opt);
|
||||
|
||||
/* Misc stuff */
|
||||
int __cdecl__ aceMiscIoPeek (unsigned addr);
|
||||
void __cdecl__ aceMiscIoPoke (unsigned addr, unsigned char val);
|
||||
|
||||
|
||||
|
||||
/* End of ace.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -41,9 +41,10 @@
|
||||
# error This module may only be used when compiling for the Apple ][!
|
||||
#endif
|
||||
|
||||
|
||||
#include <apple2_filetype.h>
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
@ -134,6 +135,7 @@ extern unsigned char _dos_type;
|
||||
** ProDOS 8 2.0.1 - 0x21
|
||||
** ProDOS 8 2.0.2 - 0x22
|
||||
** ProDOS 8 2.0.3 - 0x23
|
||||
** ProDOS 8 2.4.x - 0x24
|
||||
*/
|
||||
|
||||
|
||||
|
@ -42,10 +42,7 @@
|
||||
|
||||
|
||||
|
||||
/* If not already done, include the apple2.h header file */
|
||||
#if !defined(_APPLE2_H)
|
||||
# include <apple2.h>
|
||||
#endif
|
||||
#include <apple2.h>
|
||||
|
||||
|
||||
|
||||
|
@ -355,5 +355,7 @@ struct __iocb {
|
||||
#define IOCB_GETCWD 0x30 /* get current directory (MyDOS/SpartaDOS) */
|
||||
#define IOCB_FORMAT 0xFE /* format */
|
||||
|
||||
|
||||
|
||||
/* End of atari.h */
|
||||
#endif
|
||||
|
@ -8,9 +8,13 @@
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef _ATARI2600_H
|
||||
#define _ATARI2600_H
|
||||
|
||||
|
||||
|
||||
/* Check for errors */
|
||||
#if !defined(__ATARI2600__)
|
||||
# error This module may only be used when compiling for the Atari 2600!
|
||||
@ -22,5 +26,7 @@
|
||||
#include <_riot.h>
|
||||
#define RIOT (*(struct __riot*)0x0280)
|
||||
|
||||
|
||||
|
||||
/* End of atari2600.h */
|
||||
#endif /* #ifndef _ATARI2600_H */
|
||||
#endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2002 Debrune Jérome, <jede@oric.org> */
|
||||
/* (C) 2002 Debrune Jérome, <jede@oric.org> */
|
||||
/* (C) 2003-2013 Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
@ -129,6 +129,7 @@
|
||||
|
||||
/* The addresses of the static drivers */
|
||||
extern void atmos_pase_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||
extern void atmos_ijk_joy[];
|
||||
extern void atmos_acia_ser[];
|
||||
extern void atmos_228_200_3_tgi[];
|
||||
extern void atmos_240_200_2_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
||||
|
@ -167,7 +167,8 @@ void fast (void);
|
||||
void slow (void);
|
||||
/* Switch the CPU into 1MHz mode. */
|
||||
|
||||
|
||||
unsigned char isfast (void);
|
||||
/* Returns 1 if the CPU is in 2MHz mode. */
|
||||
|
||||
/* End of c128.h */
|
||||
#endif
|
||||
|
@ -45,11 +45,8 @@
|
||||
|
||||
|
||||
|
||||
/* Include the base header file for the 264 series. include file.
|
||||
*/
|
||||
#ifndef _CBM264_H
|
||||
/* Include the base header file for the 264 series. */
|
||||
#include <cbm264.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -46,10 +46,7 @@
|
||||
|
||||
|
||||
/* We need NULL. */
|
||||
|
||||
#if !defined(_STDDEF_H)
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
|
||||
/* Load the system-specific files here, if needed. */
|
||||
#if defined(__C64__) && !defined(_C64_H)
|
||||
@ -209,6 +206,7 @@ void __fastcall__ cbm_k_setnam (const char* Name);
|
||||
void __fastcall__ cbm_k_talk (unsigned char dev);
|
||||
void cbm_k_udtim (void);
|
||||
void cbm_k_unlsn (void);
|
||||
void cbm_k_untlk (void);
|
||||
|
||||
|
||||
|
||||
|
@ -136,11 +136,16 @@
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
void fast (void);
|
||||
/* Switch the CPU into double-clock mode. */
|
||||
|
||||
void slow (void);
|
||||
/* Switch the CPU into single-clock mode. */
|
||||
|
||||
unsigned char isfast (void);
|
||||
/* Returns 1 if the CPU is in double-clock mode. */
|
||||
|
||||
|
||||
|
||||
/* End of cbm264.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -85,7 +85,8 @@
|
||||
#define SID (*(struct __sid*)0xDA00)
|
||||
|
||||
#include <_6526.h>
|
||||
#define CIA (*(struct __6526*)0xDC00)
|
||||
#define CIA1 (*(struct __6526*)0xDB00)
|
||||
#define CIA2 (*(struct __6526*)0xDC00)
|
||||
|
||||
#include <_6551.h>
|
||||
#define ACIA (*(struct __6551*)0xDD00)
|
||||
@ -144,11 +145,9 @@ void __fastcall__ pokewsys (unsigned addr, unsigned val);
|
||||
#define _textcolor(color) COLOR_WHITE
|
||||
#define _bgcolor(color) COLOR_BLACK
|
||||
#define _bordercolor(color) COLOR_BLACK
|
||||
#define _cpeekcolor(color) COLOR_WHITE
|
||||
|
||||
|
||||
|
||||
/* End of cbm610.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -54,40 +54,8 @@
|
||||
|
||||
|
||||
|
||||
#if !defined(_STDARG_H)
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
/* Include the correct machine-specific file */
|
||||
#if defined(__APPLE2ENH__)
|
||||
# include <apple2enh.h>
|
||||
#elif defined(__APPLE2__)
|
||||
# include <apple2.h>
|
||||
#elif defined(__ATARI5200__)
|
||||
# include <atari5200.h>
|
||||
#elif defined(__ATARI__)
|
||||
# include <atari.h>
|
||||
#elif defined(__ATMOS__)
|
||||
# include <atmos.h>
|
||||
#elif defined(__CBM__)
|
||||
# include <cbm.h>
|
||||
#elif defined(__CREATIVISION__)
|
||||
# include <creativision.h>
|
||||
#elif defined(__GAMATE__)
|
||||
# include <gamate.h>
|
||||
#elif defined(__GEOS__)
|
||||
# include <geos.h>
|
||||
#elif defined(__LUNIX__)
|
||||
# include <lunix.h>
|
||||
#elif defined(__LYNX__)
|
||||
# include <lynx.h>
|
||||
#elif defined(__NES__)
|
||||
# include <nes.h>
|
||||
#elif defined(__OSIC1P__)
|
||||
# include <osic1p.h>
|
||||
#elif defined(__PCE__)
|
||||
# include <pce.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <target.h>
|
||||
|
||||
|
||||
|
||||
@ -148,6 +116,23 @@ int cscanf (const char* format, ...);
|
||||
int __fastcall__ vcscanf (const char* format, va_list ap);
|
||||
/* Like vscanf(), but uses direct keyboard input */
|
||||
|
||||
char cpeekc (void);
|
||||
/* Return the character from the current cursor position */
|
||||
|
||||
unsigned char cpeekcolor (void);
|
||||
/* Return the color from the current cursor position */
|
||||
|
||||
unsigned char cpeekrevers (void);
|
||||
/* Return the reverse attribute from the current cursor position.
|
||||
** If the character is reversed, then return 1; return 0 otherwise.
|
||||
*/
|
||||
|
||||
void __fastcall__ cpeeks (char* s, unsigned int length);
|
||||
/* Return a string of the characters that start at the current cursor position.
|
||||
** Put the string into the buffer to which "s" points. The string will have
|
||||
** "length" characters, then will be '\0'-terminated.
|
||||
*/
|
||||
|
||||
unsigned char __fastcall__ cursor (unsigned char onoff);
|
||||
/* If onoff is 1, a cursor is displayed when waiting for keyboard input. If
|
||||
** onoff is 0, the cursor is hidden when waiting for keyboard input. The
|
||||
@ -215,15 +200,18 @@ void __fastcall__ cputhex16 (unsigned val);
|
||||
** the macro will give access to the actual function.
|
||||
*/
|
||||
|
||||
#if defined(_textcolor)
|
||||
#ifdef _textcolor
|
||||
# define textcolor(x) _textcolor(x)
|
||||
#endif
|
||||
#if defined(_bgcolor)
|
||||
#ifdef _bgcolor
|
||||
# define bgcolor(x) _bgcolor(x)
|
||||
#endif
|
||||
#if defined(_bordercolor)
|
||||
#ifdef _bordercolor
|
||||
# define bordercolor(x) _bordercolor(x)
|
||||
#endif
|
||||
#ifdef _cpeekcolor
|
||||
# define cpeekcolor(x) _cpeekcolor(x)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +35,13 @@
|
||||
|
||||
|
||||
|
||||
#ifndef _HAVE_size_t
|
||||
typedef unsigned size_t;
|
||||
#define _HAVE_size_t
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
@ -107,7 +107,7 @@ struct dirent {
|
||||
|
||||
#define _DE_ISREG(t) (((t) & _CBM_T_REG) != 0)
|
||||
#define _DE_ISDIR(t) ((t) == _CBM_T_DIR)
|
||||
#define _DE_ISLBL(t) ((t) == _CBM_T_HDR)
|
||||
#define _DE_ISLBL(t) ((t) == _CBM_T_HEADER)
|
||||
#define _DE_ISLNK(t) ((t) == _CBM_T_LNK)
|
||||
|
||||
#elif defined(__LYNX__)
|
||||
|
@ -19,53 +19,19 @@
|
||||
|
||||
|
||||
|
||||
#ifndef _GCONST_H
|
||||
#include <geos/gconst.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GSYM_H
|
||||
#include <geos/gsym.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GDISK_H
|
||||
#include <geos/gdisk.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GFILE_H
|
||||
#include <geos/gfile.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GPROCESS_H
|
||||
#include <geos/gprocess.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GGRAPH_H
|
||||
#include <geos/ggraph.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GMENU_H
|
||||
#include <geos/gmenu.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GSPRITE_H
|
||||
#include <geos/gsprite.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GMEMORY_H
|
||||
#include <geos/gmemory.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GSYS_H
|
||||
#include <geos/gsys.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GDLGBOX_H
|
||||
#include <geos/gdlgbox.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define CH_ULCORNER '+'
|
||||
@ -140,5 +106,6 @@
|
||||
#define JOY_BTN_1_MASK 0x10
|
||||
|
||||
|
||||
|
||||
/* End of geos.h */
|
||||
#endif
|
||||
|
@ -7,9 +7,7 @@
|
||||
#ifndef _GDISK_H
|
||||
#define _GDISK_H
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
char __fastcall__ ReadBuff(struct tr_se *myTrSe);
|
||||
char __fastcall__ WriteBuff(struct tr_se *myTrSe);
|
||||
|
@ -7,9 +7,7 @@
|
||||
#ifndef _GFILE_H
|
||||
#define _GFILE_H
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
struct filehandle *Get1stDirEntry(void);
|
||||
struct filehandle *GetNxtDirEntry(void);
|
||||
|
@ -7,9 +7,7 @@
|
||||
#ifndef _GGRAPH_H
|
||||
#define _GGRAPH_H
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
void __fastcall__ SetPattern(char newpattern);
|
||||
|
||||
|
@ -7,9 +7,7 @@
|
||||
#ifndef _GMEMORY_H
|
||||
#define _GMEMORY_H
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
void __fastcall__ CopyString(char *dest, const char *source);
|
||||
char __fastcall__ CmpString(const char *dest, const char *source);
|
||||
|
@ -7,9 +7,7 @@
|
||||
#ifndef _GMENU_H
|
||||
#define _GMENU_H
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
void __fastcall__ DoMenu(struct menu *myMenu);
|
||||
void ReDoMenu(void);
|
||||
|
@ -7,9 +7,7 @@
|
||||
#ifndef _GPROCESS_H
|
||||
#define _GPROCESS_H
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
void __fastcall__ InitProcesses(char number, struct process *proctab);
|
||||
void __fastcall__ RestartProcess(char number);
|
||||
|
@ -7,9 +7,7 @@
|
||||
#ifndef _GSYM_H
|
||||
#define _GSYM_H
|
||||
|
||||
#ifndef _GSTRUCT_H
|
||||
#include <geos/gstruct.h>
|
||||
#endif
|
||||
|
||||
#define r0 (*(unsigned*)(R_BASE + 0x00))
|
||||
#define r0L (*(char*)(R_BASE + 0x00))
|
||||
|
@ -31,9 +31,13 @@ char get_ostype(void);
|
||||
#define GEOS4 0x04 /* plus4 geos is not or'ed with version */
|
||||
#define GEOS128 0x80
|
||||
/* version flags */
|
||||
#define MEGAPATCH3 0x03
|
||||
#define GATEWAY 0x08
|
||||
#define GEOS_V10 0x10
|
||||
#define GEOS_V11 0x11
|
||||
#define GEOS_V12 0x12 /* ??? not sure */
|
||||
#define GEOS_V12 0x12
|
||||
#define GEOS_V13 0x13
|
||||
#define GEOS_V15 0x15
|
||||
#define GEOS_V20 0x20
|
||||
#define WHEELS 0x40 /* only Wheels? */
|
||||
|
||||
|
@ -38,6 +38,10 @@
|
||||
|
||||
|
||||
|
||||
#include <target.h>
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Definitions */
|
||||
/*****************************************************************************/
|
||||
@ -103,6 +107,3 @@ unsigned char __fastcall__ joy_read (unsigned char joystick);
|
||||
|
||||
/* End of joystick.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -59,7 +59,6 @@ typedef struct {
|
||||
void* uninstall; /* UNINSTALL routine */
|
||||
void* count; /* COUNT routine */
|
||||
void* read; /* READ routine */
|
||||
void* irq; /* IRQ routine */
|
||||
|
||||
} joy_drv_header;
|
||||
|
||||
|
@ -123,6 +123,8 @@ extern void lynx_160_102_16_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
||||
/* Sound support */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
void lynx_snd_init (void);
|
||||
/* Initialize the sound driver */
|
||||
|
||||
@ -144,6 +146,8 @@ void __fastcall__ lynx_snd_stop_channel (unsigned char channel);
|
||||
unsigned char lynx_snd_active(void);
|
||||
/* Show which channels are active */
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Accessing the cart */
|
||||
/*****************************************************************************/
|
||||
@ -209,5 +213,6 @@ unsigned __fastcall__ lynx_eewrite (unsigned cell, unsigned val);
|
||||
#define SUZY (*(struct __suzy*)0xFC00)
|
||||
|
||||
|
||||
|
||||
/* End of lynx.h */
|
||||
#endif
|
||||
|
@ -105,6 +105,7 @@ extern void pet_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||
#define _textcolor(color) COLOR_WHITE
|
||||
#define _bgcolor(color) COLOR_BLACK
|
||||
#define _bordercolor(color) COLOR_BLACK
|
||||
#define _cpeekcolor(color) COLOR_WHITE
|
||||
|
||||
|
||||
|
||||
|
@ -45,11 +45,8 @@
|
||||
|
||||
|
||||
|
||||
/* Include the base header file for the 264 series. include file.
|
||||
*/
|
||||
#ifndef _CBM264_H
|
||||
/* Include the base header file for the 264 series. */
|
||||
#include <cbm264.h>
|
||||
#endif
|
||||
|
||||
/* Define hardware */
|
||||
#include <_6551.h>
|
||||
|
@ -38,12 +38,8 @@
|
||||
|
||||
|
||||
|
||||
#ifndef _STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
#ifndef _STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
|
||||
@ -147,6 +143,3 @@ void __fastcall__ _poserror (const char* msg); /* cc65 */
|
||||
|
||||
/* End of stdio.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -54,28 +54,28 @@ struct __sv_lcd {
|
||||
unsigned char xpos;
|
||||
unsigned char ypos;
|
||||
};
|
||||
#define SV_LCD ((struct __sv_lcd*)0x2000)
|
||||
#define SV_LCD (*(struct __sv_lcd*)0x2000)
|
||||
|
||||
struct __sv_tone {
|
||||
unsigned delay;
|
||||
unsigned char control;
|
||||
unsigned char timer;
|
||||
};
|
||||
#define SV_RIGHT ((struct __sv_tone*)0x2010)
|
||||
#define SV_LEFT ((struct __sv_tone*)0x2014)
|
||||
#define SV_RIGHT (*(struct __sv_tone*)0x2010)
|
||||
#define SV_LEFT (*(struct __sv_tone*)0x2014)
|
||||
|
||||
struct __sv_noise {
|
||||
unsigned char volume; /* and frequency */
|
||||
unsigned char timer;
|
||||
unsigned char control;
|
||||
};
|
||||
#define SV_NOISE ((struct __sv_noise*)0x2028)
|
||||
#define SV_NOISE (*(struct __sv_noise*)0x2028)
|
||||
|
||||
struct __io_port {
|
||||
unsigned char in;
|
||||
unsigned char out;
|
||||
};
|
||||
#define IO_PORT ((struct __io_port*)(0x2021)
|
||||
#define IO_PORT (*(struct __io_port*)0x2021)
|
||||
|
||||
struct __sv_dma {
|
||||
unsigned start;
|
||||
@ -83,7 +83,7 @@ struct __sv_dma {
|
||||
unsigned char control;
|
||||
unsigned char on;
|
||||
};
|
||||
#define SV_DMA ((struct __sv_dma*)0x2018)
|
||||
#define SV_DMA (*(struct __sv_dma*)0x2018)
|
||||
|
||||
#define SV_CONTROL (*(unsigned char*)0x2020)
|
||||
|
||||
@ -105,9 +105,33 @@ extern unsigned char sv_nmi_counter;
|
||||
extern unsigned char sv_timer_irq_counter;
|
||||
extern unsigned char sv_timer_dma_counter;
|
||||
|
||||
/* Masks for joy_read */
|
||||
#define JOY_UP_MASK 0x08
|
||||
#define JOY_DOWN_MASK 0x04
|
||||
#define JOY_LEFT_MASK 0x02
|
||||
#define JOY_RIGHT_MASK 0x01
|
||||
#define JOY_BTN_1_MASK 0x20
|
||||
#define JOY_BTN_2_MASK 0x10
|
||||
#define JOY_BTN_3_MASK 0x80
|
||||
#define JOY_BTN_4_MASK 0x40
|
||||
|
||||
#define JOY_BTN_A_MASK JOY_BTN_1_MASK
|
||||
#define JOY_BTN_B_MASk JOY_BTN_2_MASK
|
||||
#define JOY_START_MASK JOY_BTN_3_MASK
|
||||
#define JOY_SELECT_MASK JOY_BTN_4_MASK
|
||||
|
||||
#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK)
|
||||
#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK)
|
||||
#define JOY_START(v) ((v) & JOY_START_MASK)
|
||||
#define JOY_SELECT(v) ((v) & JOY_SELECT_MASK)
|
||||
|
||||
/* No support for dynamically loadable drivers */
|
||||
#define DYN_DRV 0
|
||||
|
||||
/* The addresses of the static drivers */
|
||||
extern void supervision_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||
|
||||
|
||||
|
||||
/* End of supervision.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
73
include/target.h
Normal file
73
include/target.h
Normal file
@ -0,0 +1,73 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* target.h */
|
||||
/* */
|
||||
/* Target specific definitions */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef _TARGET_H
|
||||
#define _TARGET_H
|
||||
|
||||
|
||||
|
||||
/* Include the correct target specific file */
|
||||
#if defined(__APPLE2ENH__)
|
||||
# include <apple2enh.h>
|
||||
#elif defined(__APPLE2__)
|
||||
# include <apple2.h>
|
||||
#elif defined(__ATARI__)
|
||||
# include <atari.h>
|
||||
#elif defined(__ATARI2600__)
|
||||
# include <atari2600.h>
|
||||
#elif defined(__ATARI5200__)
|
||||
# include <atari5200.h>
|
||||
#elif defined(__ATMOS__)
|
||||
# include <atmos.h>
|
||||
#elif defined(__CBM__)
|
||||
# include <cbm.h>
|
||||
#elif defined(__CREATIVISION__)
|
||||
# include <creativision.h>
|
||||
#elif defined(__GAMATE__)
|
||||
# include <gamate.h>
|
||||
#elif defined(__GEOS__)
|
||||
# include <geos.h>
|
||||
#elif defined(__LYNX__)
|
||||
# include <lynx.h>
|
||||
#elif defined(__NES__)
|
||||
# include <nes.h>
|
||||
#elif defined(__OSIC1P__)
|
||||
# include <osic1p.h>
|
||||
#elif defined(__PCE__)
|
||||
# include <pce.h>
|
||||
#elif defined(__SUPERVISION__)
|
||||
# include <supervision.h>
|
||||
#elif defined(__TELESTRAT__)
|
||||
# include <telestrat.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* End of target.h */
|
||||
#endif
|
@ -30,6 +30,76 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/* Color defines */
|
||||
#define COLOR_BLACK 0x00
|
||||
#define COLOR_RED 0x01
|
||||
#define COLOR_GREEN 0x02
|
||||
#define COLOR_YELLOW 0x03
|
||||
#define COLOR_BLUE 0x04
|
||||
#define COLOR_MAGENTA 0x05
|
||||
#define COLOR_CYAN 0x06
|
||||
#define COLOR_WHITE 0x07
|
||||
|
||||
/* TGI color defines */
|
||||
/* White and red are swapped, so that the pallete
|
||||
** driver is compatible with black-and-white drivers.
|
||||
*/
|
||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||
#define TGI_COLOR_WHITE 1
|
||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||
#define TGI_COLOR_MAGENTA COLOR_MAGENTA
|
||||
#define TGI_COLOR_CYAN COLOR_CYAN
|
||||
#define TGI_COLOR_RED 7
|
||||
|
||||
|
||||
extern void telestrat_228_200_3_tgi[];
|
||||
extern void telestrat_240_200_2_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
||||
|
||||
/* Define hardware */
|
||||
#include <_6522.h>
|
||||
#define VIA (*(struct __6522*)0x300)
|
||||
|
||||
|
||||
|
||||
/* These are defined to be FUNCT + NumberKey */
|
||||
#define CH_F1 0xB1
|
||||
#define CH_F2 0xB2
|
||||
#define CH_F3 0xB3
|
||||
#define CH_F4 0xB4
|
||||
#define CH_F5 0xB5
|
||||
#define CH_F6 0xB6
|
||||
#define CH_F7 0xB7
|
||||
#define CH_F8 0xB8
|
||||
#define CH_F9 0xB9
|
||||
#define CH_F10 0xB0
|
||||
|
||||
|
||||
|
||||
/* Character codes */
|
||||
#define CH_ULCORNER '+'
|
||||
#define CH_URCORNER '+'
|
||||
#define CH_LLCORNER '+'
|
||||
#define CH_LRCORNER '+'
|
||||
#define CH_TTEE '+'
|
||||
#define CH_BTEE '+'
|
||||
#define CH_LTEE '+'
|
||||
#define CH_RTEE '+'
|
||||
#define CH_CROSS '+'
|
||||
#define CH_CURS_UP 11
|
||||
#define CH_CURS_DOWN 10
|
||||
#define CH_CURS_LEFT 8
|
||||
#define CH_CURS_RIGHT 9
|
||||
#define CH_DEL 127
|
||||
#define CH_ENTER 13
|
||||
#define CH_STOP 3
|
||||
#define CH_LIRA 95
|
||||
#define CH_ESC 27
|
||||
|
||||
|
||||
|
||||
void oups();
|
||||
void ping();
|
||||
void zap();
|
||||
|
@ -38,9 +38,8 @@
|
||||
|
||||
|
||||
|
||||
#ifndef _TGI_ERROR_H
|
||||
#include <tgi/tgi-error.h>
|
||||
#endif
|
||||
#include <target.h>
|
||||
|
||||
|
||||
|
||||
@ -284,6 +283,3 @@ int __fastcall__ tgi_imulround (int rhs, int lhs);
|
||||
|
||||
/* End of tgi.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -105,7 +105,8 @@
|
||||
extern void vic20_ptvjoy_joy[];
|
||||
extern void vic20_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||
|
||||
|
||||
extern void vic20_rama_emd[];
|
||||
extern void vic20_georam_emd[];
|
||||
|
||||
/* End of vic20.h */
|
||||
#endif
|
||||
|
@ -27,6 +27,7 @@ TARGETS = apple2 \
|
||||
gamate \
|
||||
lynx \
|
||||
nes \
|
||||
none \
|
||||
osic1p \
|
||||
pce \
|
||||
sim6502 \
|
||||
|
@ -1,16 +1,40 @@
|
||||
;
|
||||
; Oliver Schmidt, 2012-06-10
|
||||
;
|
||||
; This module supplies a 4 byte DOS 3.3 header
|
||||
; containing the load address and load length.
|
||||
; This module supplies an AppleSingle version 2 file header + entry with
|
||||
; ID 11 according to https://tools.ietf.org/rfc/rfc1740.txt Appendix A.
|
||||
;
|
||||
|
||||
.export __EXEHDR__ : absolute = 1 ; Linker referenced
|
||||
.import __FILETYPE__ ; Linker generated
|
||||
.import __MAIN_START__, __MAIN_LAST__ ; Linker generated
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
; Data Fork
|
||||
ID01_LENGTH = __MAIN_LAST__ - __MAIN_START__
|
||||
ID01_OFFSET = ID01 - START
|
||||
|
||||
; ProDOS File Info
|
||||
ID11_LENGTH = ID01 - ID11
|
||||
ID11_OFFSET = ID11 - START
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "EXEHDR"
|
||||
|
||||
.addr __MAIN_START__ ; Load address
|
||||
.word __MAIN_LAST__ - __MAIN_START__ ; Load length
|
||||
START: .byte $00, $05, $16, $00 ; Magic number
|
||||
.byte $00, $02, $00, $00 ; Version number
|
||||
.res 16 ; Filler
|
||||
.byte 0, 2 ; Number of entries
|
||||
.byte 0, 0, 0, 1 ; Entry ID 1 - Data Fork
|
||||
.byte 0, 0, >ID01_OFFSET, <ID01_OFFSET ; Offset
|
||||
.byte 0, 0, >ID01_LENGTH, <ID01_LENGTH ; Length
|
||||
.byte 0, 0, 0, 11 ; Entry ID 11 - ProDOS File Info
|
||||
.byte 0, 0, >ID11_OFFSET, <ID11_OFFSET ; Offset
|
||||
.byte 0, 0, >ID11_LENGTH, <ID11_LENGTH ; Length
|
||||
ID11: .byte 0, %11000011 ; Access - Destroy, Rename, Write, Read
|
||||
.byte >__FILETYPE__, <__FILETYPE__ ; File Type
|
||||
.byte 0, 0 ; Auxiliary Type high
|
||||
.byte >__MAIN_START__, <__MAIN_START__ ; Auxiliary Type low
|
||||
ID01:
|
||||
|
@ -52,7 +52,6 @@ PREAD := $FB1E ; Read paddle in X, return AD conv. value in Y
|
||||
.addr UNINSTALL
|
||||
.addr COUNT
|
||||
.addr READJOY
|
||||
.addr 0 ; IRQ not used
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
|
@ -115,7 +115,6 @@ pages: .byte 2 ; Number of screens available
|
||||
.addr BAR
|
||||
.addr TEXTSTYLE
|
||||
.addr OUTTEXT
|
||||
.addr 0 ; IRQ entry is unused
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
|
@ -85,7 +85,6 @@ Y2 := ptr4
|
||||
.addr BAR
|
||||
.addr TEXTSTYLE
|
||||
.addr OUTTEXT
|
||||
.addr 0 ; IRQ entry is unused
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
;
|
||||
|
||||
.include "atari.inc"
|
||||
.export _cgetc,setcursor
|
||||
.export _cgetc
|
||||
.import setcursor
|
||||
.import KEYBDV_handler
|
||||
.import cursor,mul40
|
||||
|
||||
_cgetc:
|
||||
jsr setcursor
|
||||
@ -29,43 +29,3 @@ _cgetc:
|
||||
pha
|
||||
rts
|
||||
.endif
|
||||
|
||||
.proc setcursor
|
||||
|
||||
ldy #0
|
||||
lda OLDCHR
|
||||
sta (OLDADR),y
|
||||
|
||||
lda ROWCRS
|
||||
jsr mul40
|
||||
clc
|
||||
adc SAVMSC ; add start of screen memory
|
||||
sta OLDADR
|
||||
txa
|
||||
adc SAVMSC+1
|
||||
sta OLDADR+1
|
||||
lda COLCRS
|
||||
adc OLDADR
|
||||
sta OLDADR
|
||||
bcc nc
|
||||
inc OLDADR+1
|
||||
nc: lda (OLDADR),y
|
||||
sta OLDCHR
|
||||
|
||||
ldx cursor ; current cursor setting as requested by the user
|
||||
beq off
|
||||
ldx #0
|
||||
beq cont
|
||||
|
||||
off: inx
|
||||
cont: stx CRSINH ; update system variable
|
||||
|
||||
beq turnon
|
||||
and #$7f ; clear high bit / inverse flag
|
||||
finish: sta (OLDADR),y ; update on-screen display
|
||||
rts
|
||||
|
||||
turnon: ora #$80 ; set high bit / inverse flag
|
||||
bne finish
|
||||
|
||||
.endproc
|
||||
|
78
libsrc/atari/getdevice.s
Normal file
78
libsrc/atari/getdevice.s
Normal file
@ -0,0 +1,78 @@
|
||||
;
|
||||
; Oliver Schmidt, 2012-09-04
|
||||
; Christian Groessler, 2017-12-28
|
||||
;
|
||||
; unsigned char getfirstdevice (void);
|
||||
; unsigned char __fastcall__ getnextdevice (unsigned char device);
|
||||
;
|
||||
|
||||
.include "atari.inc"
|
||||
.export _getfirstdevice
|
||||
.export _getnextdevice
|
||||
|
||||
MAX_DIO_DEVICES = 8
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; _getfirstdevice
|
||||
|
||||
_getfirstdevice:
|
||||
lda #$FF
|
||||
; Fall through
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; _getnextdevice
|
||||
|
||||
_getnextdevice:
|
||||
tax
|
||||
next: inx
|
||||
cpx #MAX_DIO_DEVICES
|
||||
beq none
|
||||
|
||||
jsr check_device
|
||||
bmi next
|
||||
|
||||
done: txa
|
||||
ldx #$00
|
||||
rts
|
||||
|
||||
none: ldx #255 ; INVALID_DEVICE (see include/device.h)
|
||||
bne done ; jump always
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; check_device - checks if a disk device is present
|
||||
; input: X - device id (0 = D1, 1 = D2, ...)
|
||||
; output: NF - 0/1 for detected/not detected
|
||||
; X register preserved
|
||||
|
||||
check_device:
|
||||
txa
|
||||
pha
|
||||
lda #SIO_STAT
|
||||
sta DCOMND ; set command into DCB
|
||||
lda #%01000000 ; direction value, "receive data"
|
||||
sta DSTATS ; set data flow directon
|
||||
lda #15
|
||||
sta DTIMLO ; value got from DOS source
|
||||
lda #4
|
||||
sta DAUX1 ; set sector # (dummy: 4)
|
||||
sta DBYTLO ; # of bytes to transfer
|
||||
lda #0
|
||||
sta DAUX2
|
||||
sta DBYTHI
|
||||
lda #>DVSTAT
|
||||
sta DBUFHI
|
||||
lda #<DVSTAT
|
||||
sta DBUFLO ; set buffer address into DCB
|
||||
lda #DISKID ; SIO bus ID of diskette drive
|
||||
sta DDEVIC
|
||||
inx
|
||||
stx DUNIT ; unit number (1-based)
|
||||
|
||||
jsr SIOV ; execute SIO command
|
||||
|
||||
pla
|
||||
tax
|
||||
lda DSTATS
|
||||
rts
|
||||
|
||||
.end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user