From: uz Date: Thu, 24 Sep 2009 17:44:22 +0000 (+0000) Subject: Moved most platform assembler includes into asminc, so they will be available X-Git-Tag: V2.13.0rc1~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c5d01d84a8b4aef5d3547116b80a87235498965;p=cc65 Moved most platform assembler includes into asminc, so they will be available in the distribution. Added --forget-inc-paths to the command line of the assembler in the Makefiles, because the assembler does now have builtin paths and will find include files from an installation first. Hopefully fixed any problems that arose from the two changes. git-svn-id: svn://svn.cc65.org/cc65/trunk@4223 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/asminc/c128.inc b/asminc/c128.inc new file mode 100644 index 000000000..ffe531b49 --- /dev/null +++ b/asminc/c128.inc @@ -0,0 +1,213 @@ +; +; C64 generic definitions. Stolen from Elite128 +; + + +; --------------------------------------------------------------------------- +; Zero page, Commodore stuff + +ST := $90 ; IEC status byte + +TIME := $A0 ; 60HZ clock +FNAM_LEN := $B7 ; Length of filename +SECADR := $B9 ; Secondary address +DEVNUM := $BA ; Device number +FNAM := $BB ; Address of filename +FNAM_BANK := $C7 ; Bank for filename +KEY_COUNT := $D0 ; Number of keys in input buffer +FKEY_COUNT := $D1 ; Characters for function key +MODE := $D7 ; 40/80 column mode flag +CURS_X := $EC ; Cursor column +CURS_Y := $EB ; Cursor row +SCREEN_PTR := $E0 ; Pointer to current char in text screen +CRAM_PTR := $E2 ; Pointer to current char in color RAM + +CHARCOLOR := $F1 +RVS := $F3 ; Reverse output flag +SCROLL := $F8 ; Disable scrolling flag + +BASIC_BUF := $200 ; Location of command-line +BASIC_BUF_LEN = 162 ; Maximum length of command-line + +FETCH := $2A2 ; Fetch subroutine in RAM +FETVEC := $2AA ; Vector patch location for FETCH +STASH := $2AF ; Stash routine in RAM +STAVEC := $2B9 ; Vector patch location for STASH +PALFLAG := $A03 ; $FF=PAL, $00=NTSC +INIT_STATUS := $A04 ; Flag: Reset/NMI Status +FKEY_LEN := $1000 ; Function key lengths +FKEY_TEXT := $100A ; Function key texts + +; --------------------------------------------------------------------------- +; Kernal routines + +; Direct entries +CURS_SET := $CD57 +CURS_ON := $CD6F +CURS_OFF := $CD9F +CLRSCR := $C142 +KBDREAD := $C006 +NEWLINE := $C363 +PRINT := $C322 +NMIEXIT := $FF33 +INDFET := $FF74 + +; --------------------------------------------------------------------------- +; Vectors + +IRQVec := $0314 +BRKVec := $0316 +NMIVec := $0318 +KeyStoreVec := $033C + +; --------------------------------------------------------------------------- +; I/O: VIC + +VIC := $D000 +VIC_SPR0_X := $D000 +VIC_SPR0_Y := $D001 +VIC_SPR1_X := $D002 +VIC_SPR1_Y := $D003 +VIC_SPR2_X := $D004 +VIC_SPR2_Y := $D005 +VIC_SPR3_X := $D006 +VIC_SPR3_Y := $D007 +VIC_SPR4_X := $D008 +VIC_SPR4_Y := $D009 +VIC_SPR5_X := $D00A +VIC_SPR5_Y := $D00B +VIC_SPR6_X := $D00C +VIC_SPR6_Y := $D00D +VIC_SPR7_X := $D00E +VIC_SPR7_Y := $D00F +VIC_SPR_HI_X := $D010 +VIC_SPR_ENA := $D015 +VIC_SPR_EXP_Y := $D017 +VIC_SPR_EXP_X := $D01D +VIC_SPR_MCOLOR := $D01C +VIC_SPR_BG_PRIO := $D01B + +VIC_SPR_MCOLOR0 := $D025 +VIC_SPR_MCOLOR1 := $D026 + +VIC_SPR0_COLOR := $D027 +VIC_SPR1_COLOR := $D028 +VIC_SPR2_COLOR := $D029 +VIC_SPR3_COLOR := $D02A +VIC_SPR4_COLOR := $D02B +VIC_SPR5_COLOR := $D02C +VIC_SPR6_COLOR := $D02D +VIC_SPR7_COLOR := $D02E + +VIC_CTRL1 := $D011 +VIC_CTRL2 := $D016 + +VIC_HLINE := $D012 + +VIC_VIDEO_ADR := $D018 + +VIC_IRR := $D019 ; Interrupt request register +VIC_IMR := $D01A ; Interrupt mask register + +VIC_BORDERCOLOR := $D020 +VIC_BG_COLOR0 := $D021 +VIC_BG_COLOR1 := $D022 +VIC_BG_COLOR2 := $D023 +VIC_BG_COLOR3 := $D024 + +; 128 stuff: +VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode) +VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode) + + +; --------------------------------------------------------------------------- +; I/O: SID + +SID := $D400 +SID_S1Lo := $D400 +SID_S1Hi := $D401 +SID_PB1Lo := $D402 +SID_PB1Hi := $D403 +SID_Ctl1 := $D404 +SID_AD1 := $D405 +SID_SUR1 := $D406 + +SID_S2Lo := $D407 +SID_S2Hi := $D408 +SID_PB2Lo := $D409 +SID_PB2Hi := $D40A +SID_Ctl2 := $D40B +SID_AD2 := $D40C +SID_SUR2 := $D40D + +SID_S3Lo := $D40E +SID_S3Hi := $D40F +SID_PB3Lo := $D410 +SID_PB3Hi := $D411 +SID_Ctl3 := $D412 +SID_AD3 := $D413 +SID_SUR3 := $D414 + +SID_FltLo := $D415 +SID_FltHi := $D416 +SID_FltCtl := $D417 +SID_Amp := $D418 +SID_ADConv1 := $D419 +SID_ADConv2 := $D41A +SID_Noise := $D41B +SID_Read3 := $D41C + +; --------------------------------------------------------------------------- +; I/O: VDC (128 only) + +VDC_INDEX := $D600 +VDC_DATA := $D601 + +; --------------------------------------------------------------------------- +; I/O: CIAs + +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 + +CIA2 := $DD00 +CIA2_PRA := $DD00 +CIA2_PRB := $DD01 +CIA2_DDRA := $DD02 +CIA2_DDRB := $DD03 +CIA2_TOD10 := $DD08 +CIA2_TODSEC := $DD09 +CIA2_TODMIN := $DD0A +CIA2_TODHR := $DD0B +CIA2_ICR := $DD0D +CIA2_CRA := $DD0E +CIA2_CRB := $DD0F + +; --------------------------------------------------------------------------- +; I/O: MMU + +MMU_CR := $FF00 +MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM +MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM +MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM + +; --------------------------------------------------------------------------- +; Super CPU + +SCPU_VIC_Bank1 := $D075 +SCPU_Slow := $D07A +SCPU_Fast := $D07B +SCPU_EnableRegs := $D07E +SCPU_DisableRegs:= $D07F +SCPU_Detect := $D0BC + + diff --git a/asminc/c64.inc b/asminc/c64.inc new file mode 100644 index 000000000..715e11d81 --- /dev/null +++ b/asminc/c64.inc @@ -0,0 +1,212 @@ +; +; C64 generic definitions. Stolen from Elite128 +; + + +; --------------------------------------------------------------------------- +; Zero page, Commodore stuff + +ST := $90 ; IEC status byte + +TIME := $A0 ; 60 HZ clock +FNAM_LEN := $B7 ; Length of filename +SECADR := $B9 ; Secondary address +DEVNUM := $BA ; Device number +FNAM := $BB ; Pointer to filename +KEY_COUNT := $C6 ; Number of keys in input buffer +RVS := $C7 ; Reverse flag +CURS_FLAG := $CC ; 1 = cursor off +CURS_BLINK := $CD ; Blink counter +CURS_CHAR := $CE ; Character under the cursor +CURS_STATE := $CF ; Cursor blink state +SCREEN_PTR := $D1 ; Pointer to current char in text screen +CURS_X := $D3 ; Cursor column +CURS_Y := $D6 ; Cursor row +CRAM_PTR := $F3 ; Pointer to current char in color RAM + +BASIC_BUF := $200 ; Location of command-line +BASIC_BUF_LEN = 89 ; Maximum length of command-line + +CHARCOLOR := $286 +CURS_COLOR := $287 ; Color under the cursor +PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC + + +; --------------------------------------------------------------------------- +; Kernal routines + +; Direct entries +CLRSCR := $E544 +KBDREAD := $E5B4 +NMIEXIT := $FEBC + +; --------------------------------------------------------------------------- +; Vector and other locations + +IRQVec := $0314 +BRKVec := $0316 +NMIVec := $0318 + +; --------------------------------------------------------------------------- +; Screen size + +XSIZE = 40 +YSIZE = 25 + +; --------------------------------------------------------------------------- +; I/O: VIC + +VIC := $D000 +VIC_SPR0_X := $D000 +VIC_SPR0_Y := $D001 +VIC_SPR1_X := $D002 +VIC_SPR1_Y := $D003 +VIC_SPR2_X := $D004 +VIC_SPR2_Y := $D005 +VIC_SPR3_X := $D006 +VIC_SPR3_Y := $D007 +VIC_SPR4_X := $D008 +VIC_SPR4_Y := $D009 +VIC_SPR5_X := $D00A +VIC_SPR5_Y := $D00B +VIC_SPR6_X := $D00C +VIC_SPR6_Y := $D00D +VIC_SPR7_X := $D00E +VIC_SPR7_Y := $D00F +VIC_SPR_HI_X := $D010 +VIC_SPR_ENA := $D015 +VIC_SPR_EXP_Y := $D017 +VIC_SPR_EXP_X := $D01D +VIC_SPR_MCOLOR := $D01C +VIC_SPR_BG_PRIO := $D01B + +VIC_SPR_MCOLOR0 := $D025 +VIC_SPR_MCOLOR1 := $D026 + +VIC_SPR0_COLOR := $D027 +VIC_SPR1_COLOR := $D028 +VIC_SPR2_COLOR := $D029 +VIC_SPR3_COLOR := $D02A +VIC_SPR4_COLOR := $D02B +VIC_SPR5_COLOR := $D02C +VIC_SPR6_COLOR := $D02D +VIC_SPR7_COLOR := $D02E + +VIC_CTRL1 := $D011 +VIC_CTRL2 := $D016 + +VIC_HLINE := $D012 + +VIC_VIDEO_ADR := $D018 + +VIC_IRR := $D019 ; Interrupt request register +VIC_IMR := $D01A ; Interrupt mask register + +VIC_BORDERCOLOR := $D020 +VIC_BG_COLOR0 := $D021 +VIC_BG_COLOR1 := $D022 +VIC_BG_COLOR2 := $D023 +VIC_BG_COLOR3 := $D024 + +; 128 stuff: +VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode) +VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode) + + +; --------------------------------------------------------------------------- +; I/O: SID + +SID := $D400 +SID_S1Lo := $D400 +SID_S1Hi := $D401 +SID_PB1Lo := $D402 +SID_PB1Hi := $D403 +SID_Ctl1 := $D404 +SID_AD1 := $D405 +SID_SUR1 := $D406 + +SID_S2Lo := $D407 +SID_S2Hi := $D408 +SID_PB2Lo := $D409 +SID_PB2Hi := $D40A +SID_Ctl2 := $D40B +SID_AD2 := $D40C +SID_SUR2 := $D40D + +SID_S3Lo := $D40E +SID_S3Hi := $D40F +SID_PB3Lo := $D410 +SID_PB3Hi := $D411 +SID_Ctl3 := $D412 +SID_AD3 := $D413 +SID_SUR3 := $D414 + +SID_FltLo := $D415 +SID_FltHi := $D416 +SID_FltCtl := $D417 +SID_Amp := $D418 +SID_ADConv1 := $D419 +SID_ADConv2 := $D41A +SID_Noise := $D41B +SID_Read3 := $D41C + +; --------------------------------------------------------------------------- +; I/O: VDC (128 only) + +VDC_INDEX := $D600 +VDC_DATA := $D601 + +; --------------------------------------------------------------------------- +; I/O: CIAs + +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 + +CIA2 := $DD00 +CIA2_PRA := $DD00 +CIA2_PRB := $DD01 +CIA2_DDRA := $DD02 +CIA2_DDRB := $DD03 +CIA2_TOD10 := $DD08 +CIA2_TODSEC := $DD09 +CIA2_TODMIN := $DD0A +CIA2_TODHR := $DD0B +CIA2_ICR := $DD0D +CIA2_CRA := $DD0E +CIA2_CRB := $DD0F + +; --------------------------------------------------------------------------- +; Super CPU + +SCPU_VIC_Bank1 := $D075 +SCPU_Slow := $D07A +SCPU_Fast := $D07B +SCPU_EnableRegs := $D07E +SCPU_DisableRegs:= $D07F +SCPU_Detect := $D0BC + + +; --------------------------------------------------------------------------- +; Processor Port at $01 + +LORAM = $01 ; Enable the basic rom +HIRAM = $02 ; Enable the kernal rom +IOEN = $04 ; Enable I/O +CASSDATA = $08 ; Cassette data +CASSPLAY = $10 ; Cassette: Play +CASSMOT = $20 ; Cassette motor on +TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode + +RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF + + diff --git a/asminc/cbm510.inc b/asminc/cbm510.inc new file mode 100644 index 000000000..0aad95f49 --- /dev/null +++ b/asminc/cbm510.inc @@ -0,0 +1,182 @@ +; +; Zero page variables and I/O definitions for the CBM 510 +; +; Taken from a kernal disassembly done by myself in 2000/2001. +; +; Ullrich von Bassewitz, 13.09.2001 + + +;----------------------------------------------------------------------------- +; Zeropage stuff + +ExecReg = $0000 +IndReg = $0001 + +; --------------------------------------------------------------------------- +; Screen size + +XSIZE = 40 +YSIZE = 25 + +;----------------------------------------------------------------------------- +; I/O Definitions + +; I/O $d800: VIC + +VIC_SPR0_X = $00 +VIC_SPR0_Y = $01 +VIC_SPR1_X = $02 +VIC_SPR1_Y = $03 +VIC_SPR2_X = $04 +VIC_SPR2_Y = $05 +VIC_SPR3_X = $06 +VIC_SPR3_Y = $07 +VIC_SPR4_X = $08 +VIC_SPR4_Y = $09 +VIC_SPR5_X = $0A +VIC_SPR5_Y = $0B +VIC_SPR6_X = $0C +VIC_SPR6_Y = $0D +VIC_SPR7_X = $0E +VIC_SPR7_Y = $0F +VIC_SPR_HI_X = $10 +VIC_SPR_ENA = $15 +VIC_SPR_EXP_Y = $17 +VIC_SPR_EXP_X = $1D +VIC_SPR_MCOLOR = $1C +VIC_SPR_BG_PRIO = $1B + +VIC_SPR_MCOLOR0 = $25 +VIC_SPR_MCOLOR1 = $26 + +VIC_SPR0_COLOR = $27 +VIC_SPR1_COLOR = $28 +VIC_SPR2_COLOR = $29 +VIC_SPR3_COLOR = $2A +VIC_SPR4_COLOR = $2B +VIC_SPR5_COLOR = $2C +VIC_SPR6_COLOR = $2D +VIC_SPR7_COLOR = $2E + +VIC_CTRL1 = $11 +VIC_CTRL2 = $16 + +VIC_HLINE = $12 + +VIC_VIDEO_ADR = $18 + +VIC_IRR = $19 ; Interrupt request register +VIC_IMR = $1A ; Interrupt mask register + +VIC_BORDERCOLOR = $20 +VIC_BG_COLOR0 = $21 +VIC_BG_COLOR1 = $22 +VIC_BG_COLOR2 = $23 +VIC_BG_COLOR3 = $24 + + + +; I/O $da00: SID 6581 + +SID_S1Lo = $00 +SID_S1Hi = $01 +SID_PB1Lo = $02 +SID_PB1Hi = $03 +SID_Ctl1 = $04 +SID_AD1 = $05 +SID_SUR1 = $06 + +SID_S2Lo = $07 +SID_S2Hi = $08 +SID_PB2Lo = $09 +SID_PB2Hi = $0A +SID_Ctl2 = $0B +SID_AD2 = $0C +SID_SUR2 = $0D + +SID_S3Lo = $0E +SID_S3Hi = $0F +SID_PB3Lo = $10 +SID_PB3Hi = $11 +SID_Ctl3 = $12 +SID_AD3 = $13 +SID_SUR3 = $14 + +SID_FltLo = $15 +SID_FltHi = $16 +SID_FltCtl = $17 +SID_Amp = $18 +SID_ADConv1 = $19 +SID_ADConv2 = $1A +SID_Noise = $1B +SID_Read3 = $1C + + +; I/O $db00: CIA 6526 Inter Process Communication +; I/O $dc00: CIA 6526 + +.struct CIA + PRA .byte + PRB .byte + DDRA .byte + DDRB .byte + .union + .struct + TALO .byte + TAHI .byte + .endstruct + TA .word + .endunion + .union + .struct + TBLO .byte + TBHI .byte + .endstruct + TB .word + .endunion + TOD10 .byte + TODSEC .byte + TODMIN .byte + TODHR .byte + SDR .byte + ICR .byte + CRA .byte + CRB .byte +.endstruct + + +; I/O $dd00: ACIA 6551 + +.struct ACIA + DATA .byte + STATUS .byte + CMD .byte + CTRL .BYTE +.endstruct + + +; I/O $de00: Triport #1 6525 +; I/O $df00: Triport #2 6525 + +.struct TPI + PRA .byte + PRB .byte + .union + PRC .byte + INT .byte + .endunion + DDRA .byte + DDRB .byte + .union + DDRC .byte + IMR .byte + .endunion + CR .byte + AIR .byte +.endstruct + + +; Out video memory address + +COLOR_RAM = $D400 ; System bank + diff --git a/asminc/cbm610.inc b/asminc/cbm610.inc new file mode 100644 index 000000000..ea85cd50d --- /dev/null +++ b/asminc/cbm610.inc @@ -0,0 +1,110 @@ +; +; Zeropage and I/O definitions for the CBM 610 +; +; Taken from a kernal disassembly done by myself in 1987. +; +; Ullrich von Bassewitz, 28.09.1998 + + +; --------------------------------------------------------------------------- +; Zeropage registers + +ExecReg = $00 +IndReg = $01 + +; --------------------------------------------------------------------------- +; Screen size + +XSIZE = 80 +YSIZE = 25 + +; --------------------------------------------------------------------------- +; I/O definitions + + +; I/O $d800: CRTC 6545 + +.struct CRTC + ADDR .byte + DATA .byte +.endstruct + +; I/O $db00: CIA 6526 Inter Process Communication +; +; IPCcia = $db00 + +.struct CIA + PRA .byte + PRB .byte + DDRA .byte + DDRB .byte + .union + .struct + TALO .byte + TAHI .byte + .endstruct + TA .word + .endunion + .union + .struct + TBLO .byte + TBHI .byte + .endstruct + TB .word + .endunion + TOD10 .byte + TODSEC .byte + TODMIN .byte + TODHR .byte + SDR .byte + ICR .byte + CRA .byte + CRB .byte +.endstruct + + +; I/O $dc00: CIA 6526 +; +; cia = $dc00 + + + +; I/O $dd00: ACIA 6551 +; +; acia = $dd00 + +.struct ACIA + DATA .byte + STATUS .byte + CMD .byte + CTRL .BYTE +.endstruct + + +; I/O $de00: Triport #1 6525 +; +; tpi1 = $de00 + +.struct TPI + PRA .byte + PRB .byte + .union + PRC .byte + INT .byte + .endunion + DDRA .byte + DDRB .byte + .union + DDRC .byte + IMR .byte + .endunion + CR .byte + AIR .byte +.endstruct + + +; I/O $df00: Triport #2 6525 + +; tpi2 = $df00 + + diff --git a/asminc/nes.inc b/asminc/nes.inc new file mode 100644 index 000000000..1ee5ebc8f --- /dev/null +++ b/asminc/nes.inc @@ -0,0 +1,93 @@ +; +; NES definitions. By Groepaz/Hitmem. +; + + +;; FIXME: optimize zeropage usage + +SCREEN_PTR = $62 ;2 +CRAM_PTR = $64 ;2 +CHARCOLOR = $66 +BGCOLOR = $67 +RVS = $68 +CURS_X = $69 +CURS_Y = $6a + +tickcount = $6b ;2 + +VBLANK_FLAG = $70 + +ringbuff = $0200 +ringwrite = $71 +ringread = $72 +ringcount = $73 + +ppuhi = $74 +ppulo = $75 +ppuval = $76 + +screenrows = (30-1) +charsperline = 32 +xsize = charsperline + +;; PPU defines + +PPU_CTRL1 = $2000 +PPU_CTRL2 = $2001 +PPU_STATUS = $2002 +PPU_SPR_ADDR = $2003 +PPU_SPR_IO = $2004 +PPU_VRAM_ADDR1 = $2005 +PPU_VRAM_ADDR2 = $2006 +PPU_VRAM_IO = $2007 + +;; APU defines + +APU_PULSE1CTRL = $4000 ; Pulse #1 Control Register (W) +APU_PULSE1RAMP = $4001 ; Pulse #1 Ramp Control Register (W) +APU_PULSE1FTUNE = $4002 ; Pulse #1 Fine Tune (FT) Register (W) +APU_PULSE1CTUNE = $4003 ; Pulse #1 Coarse Tune (CT) Register (W) +APU_PULSE2CTRL = $4004 ; Pulse #2 Control Register (W) +APU_PULSE2RAMP = $4005 ; Pulse #2 Ramp Control Register (W) +APU_PULSE2FTUNE = $4006 ; Pulse #2 Fine Tune Register (W) +APU_PULSE2STUNE = $4007 ; Pulse #2 Coarse Tune Register (W) +APU_TRICTRL1 = $4008 ; Triangle Control Register #1 (W) +APU_TRICTRL2 = $4009 ; Triangle Control Register #2 (?) +APU_TRIFREQ1 = $400A ; Triangle Frequency Register #1 (W) +APU_TRIFREQ2 = $400B ; Triangle Frequency Register #2 (W) +APU_NOISECTRL = $400C ; Noise Control Register #1 (W) +;;APU_ = $400D ; Unused (???) +APU_NOISEFREQ1 = $400E ; Noise Frequency Register #1 (W) +APU_NOISEFREQ2 = $400F ; Noise Frequency Register #2 (W) +APU_MODCTRL = $4010 ; Delta Modulation Control Register (W) +APU_MODDA = $4011 ; Delta Modulation D/A Register (W) +APU_MODADDR = $4012 ; Delta Modulation Address Register (W) +APU_MODLEN = $4013 ; Delta Modulation Data Length Register (W) +APU_SPR_DMA = $4014 ; Sprite DMA Register (W) +APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R) +APU_PAD1 = $4016 ; Joypad #1 (RW) +APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW) + + +CH_HLINE = 11 +CH_VLINE = 14 +CH_ULCORNER = 176 +CH_URCORNER = 174 +CH_LLCORNER = 173 +CH_LRCORNER = 189 +CH_TTEE = 178 +CH_RTEE = 179 +CH_BTEE = 177 +CH_LTEE = 171 +CH_CROSS = 123 +CH_CURS_UP = 145 +CH_CURS_DOWN = 17 +CH_CURS_LEFT = 157 +CH_CURS_RIGHT = 29 +CH_PI = 126 +CH_DEL = 20 +CH_INS = 148 +CH_ENTER = 10 +CH_STOP = 3 +CH_ESC = 27 + diff --git a/asminc/plus4.inc b/asminc/plus4.inc new file mode 100644 index 000000000..79d242e61 --- /dev/null +++ b/asminc/plus4.inc @@ -0,0 +1,87 @@ +; +; Plus/4 generic definitions. +; + + +; --------------------------------------------------------------------------- +; Zero page, Commodore stuff + +TMPPTR := $22 ; Temporary ptr used by BASIC +ST := $90 ; IEC status byte +TIME := $A3 ; 60HZ clock +FNAM_LEN := $AB ; Length of filename +LFN := $AC ; Logical file number +SECADR := $AD ; Secondary address +DEVNUM := $AE ; Device number +FNAM := $AF ; Pointer to filename for OPEN +KEY_COUNT := $EF ; Number of keys in input buffer +RVS := $C2 ; Reverse flag +CURS_X := $CA ; Cursor column +CURS_Y := $CD ; Cursor row +SCREEN_PTR := $C8 ; Pointer to current char in text screen +CRAM_PTR := $EA ; Pointer to current char in color RAM + +BASIC_BUF := $200 ; Location of command-line +BASIC_BUF_LEN = 89 ; Maximum length of command-line + +FNBUF := $25E ; Buffer for filename +FETCH := $494 ; lda (zp),y from RAM +CHARCOLOR := $53B +FKEY_COUNT := $55D ; Characters for function key +FKEY_SPACE := $55F ; Function key definitions +FKEY_ORIG := $F3D2 ; Original definitions + +; --------------------------------------------------------------------------- +; Kernal routines + +; Direct entries +CLRSCR := $D88B +KBDREAD := $D8C1 + +; --------------------------------------------------------------------------- +; Vector and other locations + +IRQVec := $0314 +BRKVec := $0316 +NMIVec := $0318 + +; --------------------------------------------------------------------------- +; Screen size + +XSIZE = 40 +YSIZE = 25 + +; --------------------------------------------------------------------------- +; I/O + +TED_T1LO := $FF00 +TED_T1HI := $FF01 +TED_T2LO := $FF02 +TED_T2HI := $FF03 +TED_T3LO := $FF04 +TED_T4HI := $FF05 +TED_MULTI1 := $FF07 +TED_KBD := $FF08 +TED_CURSHI := $FF0C +TED_CURSLO := $FF0D +TED_V1FRQLO := $FF0E +TED_V2FRQLO := $FF0F +TED_V2FRQHI := $FF10 +TED_BGCOLOR := $FF15 +TED_COLOR1 := $FF16 +TED_COLOR2 := $FF17 +TED_COLOR3 := $FF18 +TED_BORDERCOLOR := $FF19 +TED_VLINEHI := $FF1C +TED_VLINELO := $FF1D +TED_HPOS := $FF1E +TED_ROMSEL := $FF3E +TED_RAMSEL := $FF3F + +; --------------------------------------------------------------------------- +; RAM/ROM selection addresses + +ENABLE_ROM := TED_ROMSEL +ENABLE_RAM := TED_RAMSEL + + diff --git a/asminc/supervision.inc b/asminc/supervision.inc new file mode 100644 index 000000000..a75fb02f6 --- /dev/null +++ b/asminc/supervision.inc @@ -0,0 +1,76 @@ +; supervision symbols + +; supervision 65c02s +; in cc65 up to 2.9.1 65c02 means 65c02s +.pc02 + +lcd_addr = $4000 +LCD_LINESIZE = $30 +LCD_WIDTH = 160 +LCD_HEIGHT = 160 +; 2 bit per pixel, packed + +lcd_width = $2000 +lcd_height = $2001 +lcd_xpos = $2002 ; in pixel, bit 0+1 not used +lcd_ypos = $2003 ; weird + +sv_port_r = $2021 +sv_port_w = $2022 + +sv_timer_count = $2023 +; read for quitting +sv_timer_quit = $2024 + +; bit 0 timer, bit 1 dma +sv_irq_source = $2027 +SV_IRQ_REQUEST_TIMER = 1 +SV_IRQ_REQUEST_DMA = 2 + +; bit 5,6,7 select bank at 0x8000 +sv_bank = $2026 +SV_NMI_ENABLE_ON = 1 +SV_IRQ_ENABLE_TIMER = 2 +SV_IRQ_ENABLE_DMA = 4 +SV_LCD_ON = 8 +SV_TIMER_MODE_240Hz = $10 ; else 15360 + + +; low activ/pressed +sv_control = $2020 +SV_RIGHT = 1 +SV_LEFT = 2 +SV_DOWN = 4 +SV_UP = 8 +SV_BUTTONB = $10 +SV_BUTTONA = $20 +SV_SELECT = $40 +SV_START = $80 + +; frequency=125000/counter +sv_audio_right_counter = $2010 ;word +sv_audio_left_counter = $2014 +SV_AUDIO_ON =$40 +;bits 0..3 volume +; bit 4 ? +; bit 5 ? +sv_audio_right_control = $2012 +sv_audio_left_control = $2016 +; write activates tone for x/60 sec (0 means 256) +sv_audio_right_timer = $2013 +sv_audio_left_timer = $2017 + + +;read for irq quitting +sv_dma_quit = $2025 +sv_dma_on = $201c +; bit 7 true start, false stop +sv_dma_start = $2018 ; word +sv_dma_size = $201a ; *32 samples +sv_dma_control = $201b +; bit 0,1 speed: 0 15360, 11 15360/4 +; bit 2,3 volume: 0 silent, 11 loud + +sv_noise_volume = $2028 ; and frequency +sv_noise_timer = $2029 +sv_noise_control = $202a diff --git a/asminc/vic20.inc b/asminc/vic20.inc new file mode 100644 index 000000000..401762577 --- /dev/null +++ b/asminc/vic20.inc @@ -0,0 +1,77 @@ +; +; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke +; + + +; --------------------------------------------------------------------------- +; Zero page, Commodore stuff + +ST := $90 ; IEC status byte + +TIME := $A0 ; 60HZ clock +FNAM_LEN := $B7 ; Length of filename +SECADR := $B9 ; Secondary address +DEVNUM := $BA ; Device number +FNAM := $BB ; Pointer to filename +KEY_COUNT := $C6 ; Number of keys in input buffer +RVS := $C7 ; Reverse flag +CURS_FLAG := $CC ; 1 = cursor off +CURS_BLINK := $CD ; Blink counter +CURS_CHAR := $CE ; Character under the cursor +CURS_STATE := $CF ; Cursor blink state +SCREEN_PTR := $D1 ; Pointer to current char in text screen +CURS_X := $D3 ; Cursor column +CURS_Y := $D6 ; Cursor row +CRAM_PTR := $F3 ; Pointer to current char in color RAM + +BASIC_BUF := $200 ; Location of command-line +BASIC_BUF_LEN = 89 ; Maximum length of command-line + +CHARCOLOR := $286 +CURS_COLOR := $287 ; Color under the cursor + + +; --------------------------------------------------------------------------- +; Screen size + +XSIZE = 22 +YSIZE = 23 + +; --------------------------------------------------------------------------- +; Kernal routines + +; Direct entries +CLRSCR := $E55F +KBDREAD := $E5CF + +; --------------------------------------------------------------------------- +; Vector and other locations + +IRQVec := $0314 +BRKVec := $0316 +NMIVec := $0318 + +; --------------------------------------------------------------------------- +; I/O: 6560 VIC + +VIC := $9000 +VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE +VIC_HLINE := $9004 ; Rasterline, bits 1-8 +VIC_COLOR := $900F ; Border and background color + +; --------------------------------------------------------------------------- +; I/O: 6522 VIA1 + +VIA1 := $9110 +VIA1_JOY := $9111 +VIA1_DDRB := $9112 +VIA1_DDRA := $9113 + +; --------------------------------------------------------------------------- +; I/O: 6522 VIA2 + +VIA2 := $9120 +VIA2_JOY := $9120 +VIA2_DDRB := $9122 +VIA2_DDRA := $9123 + diff --git a/libsrc/apple2/Makefile b/libsrc/apple2/Makefile index adf96c6fe..fe2bd1602 100644 --- a/libsrc/apple2/Makefile +++ b/libsrc/apple2/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/apple2enh/Makefile b/libsrc/apple2enh/Makefile index e9e5d05f9..af25f3eff 100644 --- a/libsrc/apple2enh/Makefile +++ b/libsrc/apple2enh/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../apple2 -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../apple2 -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I ../apple2 -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/atari/Makefile b/libsrc/atari/Makefile index 0ea8e48e9..4e0b93013 100644 --- a/libsrc/atari/Makefile +++ b/libsrc/atari/Makefile @@ -30,7 +30,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/c128/Makefile b/libsrc/c128/Makefile index 47f795752..ee176650b 100644 --- a/libsrc/c128/Makefile +++ b/libsrc/c128/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/c128/c128.inc b/libsrc/c128/c128.inc deleted file mode 100644 index ffe531b49..000000000 --- a/libsrc/c128/c128.inc +++ /dev/null @@ -1,213 +0,0 @@ -; -; C64 generic definitions. Stolen from Elite128 -; - - -; --------------------------------------------------------------------------- -; Zero page, Commodore stuff - -ST := $90 ; IEC status byte - -TIME := $A0 ; 60HZ clock -FNAM_LEN := $B7 ; Length of filename -SECADR := $B9 ; Secondary address -DEVNUM := $BA ; Device number -FNAM := $BB ; Address of filename -FNAM_BANK := $C7 ; Bank for filename -KEY_COUNT := $D0 ; Number of keys in input buffer -FKEY_COUNT := $D1 ; Characters for function key -MODE := $D7 ; 40/80 column mode flag -CURS_X := $EC ; Cursor column -CURS_Y := $EB ; Cursor row -SCREEN_PTR := $E0 ; Pointer to current char in text screen -CRAM_PTR := $E2 ; Pointer to current char in color RAM - -CHARCOLOR := $F1 -RVS := $F3 ; Reverse output flag -SCROLL := $F8 ; Disable scrolling flag - -BASIC_BUF := $200 ; Location of command-line -BASIC_BUF_LEN = 162 ; Maximum length of command-line - -FETCH := $2A2 ; Fetch subroutine in RAM -FETVEC := $2AA ; Vector patch location for FETCH -STASH := $2AF ; Stash routine in RAM -STAVEC := $2B9 ; Vector patch location for STASH -PALFLAG := $A03 ; $FF=PAL, $00=NTSC -INIT_STATUS := $A04 ; Flag: Reset/NMI Status -FKEY_LEN := $1000 ; Function key lengths -FKEY_TEXT := $100A ; Function key texts - -; --------------------------------------------------------------------------- -; Kernal routines - -; Direct entries -CURS_SET := $CD57 -CURS_ON := $CD6F -CURS_OFF := $CD9F -CLRSCR := $C142 -KBDREAD := $C006 -NEWLINE := $C363 -PRINT := $C322 -NMIEXIT := $FF33 -INDFET := $FF74 - -; --------------------------------------------------------------------------- -; Vectors - -IRQVec := $0314 -BRKVec := $0316 -NMIVec := $0318 -KeyStoreVec := $033C - -; --------------------------------------------------------------------------- -; I/O: VIC - -VIC := $D000 -VIC_SPR0_X := $D000 -VIC_SPR0_Y := $D001 -VIC_SPR1_X := $D002 -VIC_SPR1_Y := $D003 -VIC_SPR2_X := $D004 -VIC_SPR2_Y := $D005 -VIC_SPR3_X := $D006 -VIC_SPR3_Y := $D007 -VIC_SPR4_X := $D008 -VIC_SPR4_Y := $D009 -VIC_SPR5_X := $D00A -VIC_SPR5_Y := $D00B -VIC_SPR6_X := $D00C -VIC_SPR6_Y := $D00D -VIC_SPR7_X := $D00E -VIC_SPR7_Y := $D00F -VIC_SPR_HI_X := $D010 -VIC_SPR_ENA := $D015 -VIC_SPR_EXP_Y := $D017 -VIC_SPR_EXP_X := $D01D -VIC_SPR_MCOLOR := $D01C -VIC_SPR_BG_PRIO := $D01B - -VIC_SPR_MCOLOR0 := $D025 -VIC_SPR_MCOLOR1 := $D026 - -VIC_SPR0_COLOR := $D027 -VIC_SPR1_COLOR := $D028 -VIC_SPR2_COLOR := $D029 -VIC_SPR3_COLOR := $D02A -VIC_SPR4_COLOR := $D02B -VIC_SPR5_COLOR := $D02C -VIC_SPR6_COLOR := $D02D -VIC_SPR7_COLOR := $D02E - -VIC_CTRL1 := $D011 -VIC_CTRL2 := $D016 - -VIC_HLINE := $D012 - -VIC_VIDEO_ADR := $D018 - -VIC_IRR := $D019 ; Interrupt request register -VIC_IMR := $D01A ; Interrupt mask register - -VIC_BORDERCOLOR := $D020 -VIC_BG_COLOR0 := $D021 -VIC_BG_COLOR1 := $D022 -VIC_BG_COLOR2 := $D023 -VIC_BG_COLOR3 := $D024 - -; 128 stuff: -VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode) -VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode) - - -; --------------------------------------------------------------------------- -; I/O: SID - -SID := $D400 -SID_S1Lo := $D400 -SID_S1Hi := $D401 -SID_PB1Lo := $D402 -SID_PB1Hi := $D403 -SID_Ctl1 := $D404 -SID_AD1 := $D405 -SID_SUR1 := $D406 - -SID_S2Lo := $D407 -SID_S2Hi := $D408 -SID_PB2Lo := $D409 -SID_PB2Hi := $D40A -SID_Ctl2 := $D40B -SID_AD2 := $D40C -SID_SUR2 := $D40D - -SID_S3Lo := $D40E -SID_S3Hi := $D40F -SID_PB3Lo := $D410 -SID_PB3Hi := $D411 -SID_Ctl3 := $D412 -SID_AD3 := $D413 -SID_SUR3 := $D414 - -SID_FltLo := $D415 -SID_FltHi := $D416 -SID_FltCtl := $D417 -SID_Amp := $D418 -SID_ADConv1 := $D419 -SID_ADConv2 := $D41A -SID_Noise := $D41B -SID_Read3 := $D41C - -; --------------------------------------------------------------------------- -; I/O: VDC (128 only) - -VDC_INDEX := $D600 -VDC_DATA := $D601 - -; --------------------------------------------------------------------------- -; I/O: CIAs - -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 - -CIA2 := $DD00 -CIA2_PRA := $DD00 -CIA2_PRB := $DD01 -CIA2_DDRA := $DD02 -CIA2_DDRB := $DD03 -CIA2_TOD10 := $DD08 -CIA2_TODSEC := $DD09 -CIA2_TODMIN := $DD0A -CIA2_TODHR := $DD0B -CIA2_ICR := $DD0D -CIA2_CRA := $DD0E -CIA2_CRB := $DD0F - -; --------------------------------------------------------------------------- -; I/O: MMU - -MMU_CR := $FF00 -MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM -MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM -MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM - -; --------------------------------------------------------------------------- -; Super CPU - -SCPU_VIC_Bank1 := $D075 -SCPU_Slow := $D07A -SCPU_Fast := $D07B -SCPU_EnableRegs := $D07E -SCPU_DisableRegs:= $D07F -SCPU_Detect := $D0BC - - diff --git a/libsrc/c16/Makefile b/libsrc/c16/Makefile index f8f4bf017..6aa5275dd 100644 --- a/libsrc/c16/Makefile +++ b/libsrc/c16/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I. -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/c16/break.s b/libsrc/c16/break.s index 76813595b..c51cc4b07 100644 --- a/libsrc/c16/break.s +++ b/libsrc/c16/break.s @@ -9,7 +9,7 @@ .destructor _reset_brk .export _brk_a, _brk_x, _brk_y, _brk_sr, _brk_pc - .include "../plus4/plus4.inc" + .include "plus4.inc" .bss diff --git a/libsrc/c16/c16-ram.s b/libsrc/c16/c16-ram.s index 30f6c4699..8f879095c 100644 --- a/libsrc/c16/c16-ram.s +++ b/libsrc/c16/c16-ram.s @@ -9,7 +9,7 @@ .include "em-kernel.inc" .include "em-error.inc" - .include "../plus4/plus4.inc" + .include "plus4.inc" .macpack generic diff --git a/libsrc/c16/cgetc.s b/libsrc/c16/cgetc.s index dc6e1e811..5a2125a0a 100644 --- a/libsrc/c16/cgetc.s +++ b/libsrc/c16/cgetc.s @@ -7,7 +7,7 @@ .export _cgetc .import cursor - .include "../plus4/plus4.inc" + .include "plus4.inc" ; -------------------------------------------------------------------------- diff --git a/libsrc/c16/clrscr.s b/libsrc/c16/clrscr.s index ff8bd5d10..4b6c48355 100644 --- a/libsrc/c16/clrscr.s +++ b/libsrc/c16/clrscr.s @@ -6,7 +6,7 @@ .export _clrscr - .include "../plus4/plus4.inc" + .include "plus4.inc" _clrscr = CLRSCR diff --git a/libsrc/c16/color.s b/libsrc/c16/color.s index 7d54eafb5..9d7107de8 100644 --- a/libsrc/c16/color.s +++ b/libsrc/c16/color.s @@ -8,7 +8,7 @@ .export _textcolor, _bgcolor, _bordercolor - .include "../plus4/plus4.inc" + .include "plus4.inc" _textcolor: ldx CHARCOLOR ; get old value diff --git a/libsrc/c16/conio.s b/libsrc/c16/conio.s index c3269359a..23c794856 100644 --- a/libsrc/c16/conio.s +++ b/libsrc/c16/conio.s @@ -6,5 +6,5 @@ .exportzp CURS_X, CURS_Y - .include "../plus4/plus4.inc" + .include "plus4.inc" diff --git a/libsrc/c16/cputc.s b/libsrc/c16/cputc.s index 26bc2ae5a..5788c1cb0 100644 --- a/libsrc/c16/cputc.s +++ b/libsrc/c16/cputc.s @@ -10,7 +10,7 @@ .import popa, _gotoxy .import PLOT - .include "../plus4/plus4.inc" + .include "plus4.inc" _cputcxy: diff --git a/libsrc/c16/crt0.s b/libsrc/c16/crt0.s index c967671c5..805d1c5ab 100644 --- a/libsrc/c16/crt0.s +++ b/libsrc/c16/crt0.s @@ -13,7 +13,7 @@ .import __INTERRUPTOR_COUNT__ .include "zeropage.inc" - .include "../plus4/plus4.inc" + .include "plus4.inc" ; ------------------------------------------------------------------------ diff --git a/libsrc/c16/get_tv.s b/libsrc/c16/get_tv.s index 6f27e747c..84f09b12c 100644 --- a/libsrc/c16/get_tv.s +++ b/libsrc/c16/get_tv.s @@ -5,7 +5,7 @@ ; /* Return the video mode the machine is using */ ; - .include "../plus4/plus4.inc" + .include "plus4.inc" .include "get_tv.inc" diff --git a/libsrc/c16/kbhit.s b/libsrc/c16/kbhit.s index be64e64b2..f1164bbaa 100644 --- a/libsrc/c16/kbhit.s +++ b/libsrc/c16/kbhit.s @@ -7,7 +7,7 @@ .export _kbhit .import return0, return1 - .include "../plus4/plus4.inc" + .include "plus4.inc" _kbhit: lda KEY_COUNT ; Get number of characters diff --git a/libsrc/c16/mainargs.s b/libsrc/c16/mainargs.s index 863c8e473..418bfe90f 100644 --- a/libsrc/c16/mainargs.s +++ b/libsrc/c16/mainargs.s @@ -25,7 +25,7 @@ .constructor initmainargs, 24 .import __argc, __argv - .include "../plus4/plus4.inc" + .include "plus4.inc" diff --git a/libsrc/c16/randomize.s b/libsrc/c16/randomize.s index 8bde89c6f..e65fd4dab 100644 --- a/libsrc/c16/randomize.s +++ b/libsrc/c16/randomize.s @@ -8,7 +8,7 @@ .export __randomize .import _srand - .include "../plus4/plus4.inc" + .include "plus4.inc" __randomize: ldx TED_VLINELO ; Use TED rasterline as high byte diff --git a/libsrc/c16/revers.s b/libsrc/c16/revers.s index c9adac7f2..c48ff9862 100644 --- a/libsrc/c16/revers.s +++ b/libsrc/c16/revers.s @@ -6,7 +6,7 @@ .export _revers - .include "../plus4/plus4.inc" + .include "plus4.inc" .proc _revers diff --git a/libsrc/c64/Makefile b/libsrc/c64/Makefile index 42f516758..bfce3e8f9 100644 --- a/libsrc/c64/Makefile +++ b/libsrc/c64/Makefile @@ -14,7 +14,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/c64/c64.inc b/libsrc/c64/c64.inc deleted file mode 100644 index 715e11d81..000000000 --- a/libsrc/c64/c64.inc +++ /dev/null @@ -1,212 +0,0 @@ -; -; C64 generic definitions. Stolen from Elite128 -; - - -; --------------------------------------------------------------------------- -; Zero page, Commodore stuff - -ST := $90 ; IEC status byte - -TIME := $A0 ; 60 HZ clock -FNAM_LEN := $B7 ; Length of filename -SECADR := $B9 ; Secondary address -DEVNUM := $BA ; Device number -FNAM := $BB ; Pointer to filename -KEY_COUNT := $C6 ; Number of keys in input buffer -RVS := $C7 ; Reverse flag -CURS_FLAG := $CC ; 1 = cursor off -CURS_BLINK := $CD ; Blink counter -CURS_CHAR := $CE ; Character under the cursor -CURS_STATE := $CF ; Cursor blink state -SCREEN_PTR := $D1 ; Pointer to current char in text screen -CURS_X := $D3 ; Cursor column -CURS_Y := $D6 ; Cursor row -CRAM_PTR := $F3 ; Pointer to current char in color RAM - -BASIC_BUF := $200 ; Location of command-line -BASIC_BUF_LEN = 89 ; Maximum length of command-line - -CHARCOLOR := $286 -CURS_COLOR := $287 ; Color under the cursor -PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC - - -; --------------------------------------------------------------------------- -; Kernal routines - -; Direct entries -CLRSCR := $E544 -KBDREAD := $E5B4 -NMIEXIT := $FEBC - -; --------------------------------------------------------------------------- -; Vector and other locations - -IRQVec := $0314 -BRKVec := $0316 -NMIVec := $0318 - -; --------------------------------------------------------------------------- -; Screen size - -XSIZE = 40 -YSIZE = 25 - -; --------------------------------------------------------------------------- -; I/O: VIC - -VIC := $D000 -VIC_SPR0_X := $D000 -VIC_SPR0_Y := $D001 -VIC_SPR1_X := $D002 -VIC_SPR1_Y := $D003 -VIC_SPR2_X := $D004 -VIC_SPR2_Y := $D005 -VIC_SPR3_X := $D006 -VIC_SPR3_Y := $D007 -VIC_SPR4_X := $D008 -VIC_SPR4_Y := $D009 -VIC_SPR5_X := $D00A -VIC_SPR5_Y := $D00B -VIC_SPR6_X := $D00C -VIC_SPR6_Y := $D00D -VIC_SPR7_X := $D00E -VIC_SPR7_Y := $D00F -VIC_SPR_HI_X := $D010 -VIC_SPR_ENA := $D015 -VIC_SPR_EXP_Y := $D017 -VIC_SPR_EXP_X := $D01D -VIC_SPR_MCOLOR := $D01C -VIC_SPR_BG_PRIO := $D01B - -VIC_SPR_MCOLOR0 := $D025 -VIC_SPR_MCOLOR1 := $D026 - -VIC_SPR0_COLOR := $D027 -VIC_SPR1_COLOR := $D028 -VIC_SPR2_COLOR := $D029 -VIC_SPR3_COLOR := $D02A -VIC_SPR4_COLOR := $D02B -VIC_SPR5_COLOR := $D02C -VIC_SPR6_COLOR := $D02D -VIC_SPR7_COLOR := $D02E - -VIC_CTRL1 := $D011 -VIC_CTRL2 := $D016 - -VIC_HLINE := $D012 - -VIC_VIDEO_ADR := $D018 - -VIC_IRR := $D019 ; Interrupt request register -VIC_IMR := $D01A ; Interrupt mask register - -VIC_BORDERCOLOR := $D020 -VIC_BG_COLOR0 := $D021 -VIC_BG_COLOR1 := $D022 -VIC_BG_COLOR2 := $D023 -VIC_BG_COLOR3 := $D024 - -; 128 stuff: -VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode) -VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode) - - -; --------------------------------------------------------------------------- -; I/O: SID - -SID := $D400 -SID_S1Lo := $D400 -SID_S1Hi := $D401 -SID_PB1Lo := $D402 -SID_PB1Hi := $D403 -SID_Ctl1 := $D404 -SID_AD1 := $D405 -SID_SUR1 := $D406 - -SID_S2Lo := $D407 -SID_S2Hi := $D408 -SID_PB2Lo := $D409 -SID_PB2Hi := $D40A -SID_Ctl2 := $D40B -SID_AD2 := $D40C -SID_SUR2 := $D40D - -SID_S3Lo := $D40E -SID_S3Hi := $D40F -SID_PB3Lo := $D410 -SID_PB3Hi := $D411 -SID_Ctl3 := $D412 -SID_AD3 := $D413 -SID_SUR3 := $D414 - -SID_FltLo := $D415 -SID_FltHi := $D416 -SID_FltCtl := $D417 -SID_Amp := $D418 -SID_ADConv1 := $D419 -SID_ADConv2 := $D41A -SID_Noise := $D41B -SID_Read3 := $D41C - -; --------------------------------------------------------------------------- -; I/O: VDC (128 only) - -VDC_INDEX := $D600 -VDC_DATA := $D601 - -; --------------------------------------------------------------------------- -; I/O: CIAs - -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 - -CIA2 := $DD00 -CIA2_PRA := $DD00 -CIA2_PRB := $DD01 -CIA2_DDRA := $DD02 -CIA2_DDRB := $DD03 -CIA2_TOD10 := $DD08 -CIA2_TODSEC := $DD09 -CIA2_TODMIN := $DD0A -CIA2_TODHR := $DD0B -CIA2_ICR := $DD0D -CIA2_CRA := $DD0E -CIA2_CRB := $DD0F - -; --------------------------------------------------------------------------- -; Super CPU - -SCPU_VIC_Bank1 := $D075 -SCPU_Slow := $D07A -SCPU_Fast := $D07B -SCPU_EnableRegs := $D07E -SCPU_DisableRegs:= $D07F -SCPU_Detect := $D0BC - - -; --------------------------------------------------------------------------- -; Processor Port at $01 - -LORAM = $01 ; Enable the basic rom -HIRAM = $02 ; Enable the kernal rom -IOEN = $04 ; Enable I/O -CASSDATA = $08 ; Cassette data -CASSPLAY = $10 ; Cassette: Play -CASSMOT = $20 ; Cassette motor on -TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode - -RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF - - diff --git a/libsrc/cbm510/Makefile b/libsrc/cbm510/Makefile index 2d1f36c06..0eadda41b 100644 --- a/libsrc/cbm510/Makefile +++ b/libsrc/cbm510/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/cbm510/cbm510.inc b/libsrc/cbm510/cbm510.inc deleted file mode 100644 index 0aad95f49..000000000 --- a/libsrc/cbm510/cbm510.inc +++ /dev/null @@ -1,182 +0,0 @@ -; -; Zero page variables and I/O definitions for the CBM 510 -; -; Taken from a kernal disassembly done by myself in 2000/2001. -; -; Ullrich von Bassewitz, 13.09.2001 - - -;----------------------------------------------------------------------------- -; Zeropage stuff - -ExecReg = $0000 -IndReg = $0001 - -; --------------------------------------------------------------------------- -; Screen size - -XSIZE = 40 -YSIZE = 25 - -;----------------------------------------------------------------------------- -; I/O Definitions - -; I/O $d800: VIC - -VIC_SPR0_X = $00 -VIC_SPR0_Y = $01 -VIC_SPR1_X = $02 -VIC_SPR1_Y = $03 -VIC_SPR2_X = $04 -VIC_SPR2_Y = $05 -VIC_SPR3_X = $06 -VIC_SPR3_Y = $07 -VIC_SPR4_X = $08 -VIC_SPR4_Y = $09 -VIC_SPR5_X = $0A -VIC_SPR5_Y = $0B -VIC_SPR6_X = $0C -VIC_SPR6_Y = $0D -VIC_SPR7_X = $0E -VIC_SPR7_Y = $0F -VIC_SPR_HI_X = $10 -VIC_SPR_ENA = $15 -VIC_SPR_EXP_Y = $17 -VIC_SPR_EXP_X = $1D -VIC_SPR_MCOLOR = $1C -VIC_SPR_BG_PRIO = $1B - -VIC_SPR_MCOLOR0 = $25 -VIC_SPR_MCOLOR1 = $26 - -VIC_SPR0_COLOR = $27 -VIC_SPR1_COLOR = $28 -VIC_SPR2_COLOR = $29 -VIC_SPR3_COLOR = $2A -VIC_SPR4_COLOR = $2B -VIC_SPR5_COLOR = $2C -VIC_SPR6_COLOR = $2D -VIC_SPR7_COLOR = $2E - -VIC_CTRL1 = $11 -VIC_CTRL2 = $16 - -VIC_HLINE = $12 - -VIC_VIDEO_ADR = $18 - -VIC_IRR = $19 ; Interrupt request register -VIC_IMR = $1A ; Interrupt mask register - -VIC_BORDERCOLOR = $20 -VIC_BG_COLOR0 = $21 -VIC_BG_COLOR1 = $22 -VIC_BG_COLOR2 = $23 -VIC_BG_COLOR3 = $24 - - - -; I/O $da00: SID 6581 - -SID_S1Lo = $00 -SID_S1Hi = $01 -SID_PB1Lo = $02 -SID_PB1Hi = $03 -SID_Ctl1 = $04 -SID_AD1 = $05 -SID_SUR1 = $06 - -SID_S2Lo = $07 -SID_S2Hi = $08 -SID_PB2Lo = $09 -SID_PB2Hi = $0A -SID_Ctl2 = $0B -SID_AD2 = $0C -SID_SUR2 = $0D - -SID_S3Lo = $0E -SID_S3Hi = $0F -SID_PB3Lo = $10 -SID_PB3Hi = $11 -SID_Ctl3 = $12 -SID_AD3 = $13 -SID_SUR3 = $14 - -SID_FltLo = $15 -SID_FltHi = $16 -SID_FltCtl = $17 -SID_Amp = $18 -SID_ADConv1 = $19 -SID_ADConv2 = $1A -SID_Noise = $1B -SID_Read3 = $1C - - -; I/O $db00: CIA 6526 Inter Process Communication -; I/O $dc00: CIA 6526 - -.struct CIA - PRA .byte - PRB .byte - DDRA .byte - DDRB .byte - .union - .struct - TALO .byte - TAHI .byte - .endstruct - TA .word - .endunion - .union - .struct - TBLO .byte - TBHI .byte - .endstruct - TB .word - .endunion - TOD10 .byte - TODSEC .byte - TODMIN .byte - TODHR .byte - SDR .byte - ICR .byte - CRA .byte - CRB .byte -.endstruct - - -; I/O $dd00: ACIA 6551 - -.struct ACIA - DATA .byte - STATUS .byte - CMD .byte - CTRL .BYTE -.endstruct - - -; I/O $de00: Triport #1 6525 -; I/O $df00: Triport #2 6525 - -.struct TPI - PRA .byte - PRB .byte - .union - PRC .byte - INT .byte - .endunion - DDRA .byte - DDRB .byte - .union - DDRC .byte - IMR .byte - .endunion - CR .byte - AIR .byte -.endstruct - - -; Out video memory address - -COLOR_RAM = $D400 ; System bank - diff --git a/libsrc/cbm610/Makefile b/libsrc/cbm610/Makefile index bd963d1da..ac0293ed6 100644 --- a/libsrc/cbm610/Makefile +++ b/libsrc/cbm610/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/cbm610/cbm610.inc b/libsrc/cbm610/cbm610.inc deleted file mode 100644 index ea85cd50d..000000000 --- a/libsrc/cbm610/cbm610.inc +++ /dev/null @@ -1,110 +0,0 @@ -; -; Zeropage and I/O definitions for the CBM 610 -; -; Taken from a kernal disassembly done by myself in 1987. -; -; Ullrich von Bassewitz, 28.09.1998 - - -; --------------------------------------------------------------------------- -; Zeropage registers - -ExecReg = $00 -IndReg = $01 - -; --------------------------------------------------------------------------- -; Screen size - -XSIZE = 80 -YSIZE = 25 - -; --------------------------------------------------------------------------- -; I/O definitions - - -; I/O $d800: CRTC 6545 - -.struct CRTC - ADDR .byte - DATA .byte -.endstruct - -; I/O $db00: CIA 6526 Inter Process Communication -; -; IPCcia = $db00 - -.struct CIA - PRA .byte - PRB .byte - DDRA .byte - DDRB .byte - .union - .struct - TALO .byte - TAHI .byte - .endstruct - TA .word - .endunion - .union - .struct - TBLO .byte - TBHI .byte - .endstruct - TB .word - .endunion - TOD10 .byte - TODSEC .byte - TODMIN .byte - TODHR .byte - SDR .byte - ICR .byte - CRA .byte - CRB .byte -.endstruct - - -; I/O $dc00: CIA 6526 -; -; cia = $dc00 - - - -; I/O $dd00: ACIA 6551 -; -; acia = $dd00 - -.struct ACIA - DATA .byte - STATUS .byte - CMD .byte - CTRL .BYTE -.endstruct - - -; I/O $de00: Triport #1 6525 -; -; tpi1 = $de00 - -.struct TPI - PRA .byte - PRB .byte - .union - PRC .byte - INT .byte - .endunion - DDRA .byte - DDRB .byte - .union - DDRC .byte - IMR .byte - .endunion - CR .byte - AIR .byte -.endstruct - - -; I/O $df00: Triport #2 6525 - -; tpi2 = $df00 - - diff --git a/libsrc/lynx/Makefile b/libsrc/lynx/Makefile index b355d9e8b..6f1aa071e 100644 --- a/libsrc/lynx/Makefile +++ b/libsrc/lynx/Makefile @@ -14,7 +14,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/nes/Makefile b/libsrc/nes/Makefile index 191f4bb06..f0fe1df21 100644 --- a/libsrc/nes/Makefile +++ b/libsrc/nes/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/nes/nes.inc b/libsrc/nes/nes.inc deleted file mode 100644 index 1ee5ebc8f..000000000 --- a/libsrc/nes/nes.inc +++ /dev/null @@ -1,93 +0,0 @@ -; -; NES definitions. By Groepaz/Hitmem. -; - - -;; FIXME: optimize zeropage usage - -SCREEN_PTR = $62 ;2 -CRAM_PTR = $64 ;2 -CHARCOLOR = $66 -BGCOLOR = $67 -RVS = $68 -CURS_X = $69 -CURS_Y = $6a - -tickcount = $6b ;2 - -VBLANK_FLAG = $70 - -ringbuff = $0200 -ringwrite = $71 -ringread = $72 -ringcount = $73 - -ppuhi = $74 -ppulo = $75 -ppuval = $76 - -screenrows = (30-1) -charsperline = 32 -xsize = charsperline - -;; PPU defines - -PPU_CTRL1 = $2000 -PPU_CTRL2 = $2001 -PPU_STATUS = $2002 -PPU_SPR_ADDR = $2003 -PPU_SPR_IO = $2004 -PPU_VRAM_ADDR1 = $2005 -PPU_VRAM_ADDR2 = $2006 -PPU_VRAM_IO = $2007 - -;; APU defines - -APU_PULSE1CTRL = $4000 ; Pulse #1 Control Register (W) -APU_PULSE1RAMP = $4001 ; Pulse #1 Ramp Control Register (W) -APU_PULSE1FTUNE = $4002 ; Pulse #1 Fine Tune (FT) Register (W) -APU_PULSE1CTUNE = $4003 ; Pulse #1 Coarse Tune (CT) Register (W) -APU_PULSE2CTRL = $4004 ; Pulse #2 Control Register (W) -APU_PULSE2RAMP = $4005 ; Pulse #2 Ramp Control Register (W) -APU_PULSE2FTUNE = $4006 ; Pulse #2 Fine Tune Register (W) -APU_PULSE2STUNE = $4007 ; Pulse #2 Coarse Tune Register (W) -APU_TRICTRL1 = $4008 ; Triangle Control Register #1 (W) -APU_TRICTRL2 = $4009 ; Triangle Control Register #2 (?) -APU_TRIFREQ1 = $400A ; Triangle Frequency Register #1 (W) -APU_TRIFREQ2 = $400B ; Triangle Frequency Register #2 (W) -APU_NOISECTRL = $400C ; Noise Control Register #1 (W) -;;APU_ = $400D ; Unused (???) -APU_NOISEFREQ1 = $400E ; Noise Frequency Register #1 (W) -APU_NOISEFREQ2 = $400F ; Noise Frequency Register #2 (W) -APU_MODCTRL = $4010 ; Delta Modulation Control Register (W) -APU_MODDA = $4011 ; Delta Modulation D/A Register (W) -APU_MODADDR = $4012 ; Delta Modulation Address Register (W) -APU_MODLEN = $4013 ; Delta Modulation Data Length Register (W) -APU_SPR_DMA = $4014 ; Sprite DMA Register (W) -APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R) -APU_PAD1 = $4016 ; Joypad #1 (RW) -APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW) - - -CH_HLINE = 11 -CH_VLINE = 14 -CH_ULCORNER = 176 -CH_URCORNER = 174 -CH_LLCORNER = 173 -CH_LRCORNER = 189 -CH_TTEE = 178 -CH_RTEE = 179 -CH_BTEE = 177 -CH_LTEE = 171 -CH_CROSS = 123 -CH_CURS_UP = 145 -CH_CURS_DOWN = 17 -CH_CURS_LEFT = 157 -CH_CURS_RIGHT = 29 -CH_PI = 126 -CH_DEL = 20 -CH_INS = 148 -CH_ENTER = 10 -CH_STOP = 3 -CH_ESC = 27 - diff --git a/libsrc/plus4/Makefile b/libsrc/plus4/Makefile index e2bedca37..b3a3c4eee 100644 --- a/libsrc/plus4/Makefile +++ b/libsrc/plus4/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/plus4/plus4-stdjoy.s b/libsrc/plus4/plus4-stdjoy.s index 4fe269a03..bdba131fb 100644 --- a/libsrc/plus4/plus4-stdjoy.s +++ b/libsrc/plus4/plus4-stdjoy.s @@ -9,7 +9,7 @@ .include "joy-kernel.inc" .include "joy-error.inc" - .include "../plus4/plus4.inc" + .include "plus4.inc" .macpack generic diff --git a/libsrc/plus4/plus4.inc b/libsrc/plus4/plus4.inc deleted file mode 100644 index 79d242e61..000000000 --- a/libsrc/plus4/plus4.inc +++ /dev/null @@ -1,87 +0,0 @@ -; -; Plus/4 generic definitions. -; - - -; --------------------------------------------------------------------------- -; Zero page, Commodore stuff - -TMPPTR := $22 ; Temporary ptr used by BASIC -ST := $90 ; IEC status byte -TIME := $A3 ; 60HZ clock -FNAM_LEN := $AB ; Length of filename -LFN := $AC ; Logical file number -SECADR := $AD ; Secondary address -DEVNUM := $AE ; Device number -FNAM := $AF ; Pointer to filename for OPEN -KEY_COUNT := $EF ; Number of keys in input buffer -RVS := $C2 ; Reverse flag -CURS_X := $CA ; Cursor column -CURS_Y := $CD ; Cursor row -SCREEN_PTR := $C8 ; Pointer to current char in text screen -CRAM_PTR := $EA ; Pointer to current char in color RAM - -BASIC_BUF := $200 ; Location of command-line -BASIC_BUF_LEN = 89 ; Maximum length of command-line - -FNBUF := $25E ; Buffer for filename -FETCH := $494 ; lda (zp),y from RAM -CHARCOLOR := $53B -FKEY_COUNT := $55D ; Characters for function key -FKEY_SPACE := $55F ; Function key definitions -FKEY_ORIG := $F3D2 ; Original definitions - -; --------------------------------------------------------------------------- -; Kernal routines - -; Direct entries -CLRSCR := $D88B -KBDREAD := $D8C1 - -; --------------------------------------------------------------------------- -; Vector and other locations - -IRQVec := $0314 -BRKVec := $0316 -NMIVec := $0318 - -; --------------------------------------------------------------------------- -; Screen size - -XSIZE = 40 -YSIZE = 25 - -; --------------------------------------------------------------------------- -; I/O - -TED_T1LO := $FF00 -TED_T1HI := $FF01 -TED_T2LO := $FF02 -TED_T2HI := $FF03 -TED_T3LO := $FF04 -TED_T4HI := $FF05 -TED_MULTI1 := $FF07 -TED_KBD := $FF08 -TED_CURSHI := $FF0C -TED_CURSLO := $FF0D -TED_V1FRQLO := $FF0E -TED_V2FRQLO := $FF0F -TED_V2FRQHI := $FF10 -TED_BGCOLOR := $FF15 -TED_COLOR1 := $FF16 -TED_COLOR2 := $FF17 -TED_COLOR3 := $FF18 -TED_BORDERCOLOR := $FF19 -TED_VLINEHI := $FF1C -TED_VLINELO := $FF1D -TED_HPOS := $FF1E -TED_ROMSEL := $FF3E -TED_RAMSEL := $FF3F - -; --------------------------------------------------------------------------- -; RAM/ROM selection addresses - -ENABLE_ROM := TED_ROMSEL -ENABLE_RAM := TED_RAMSEL - - diff --git a/libsrc/supervision/Makefile b/libsrc/supervision/Makefile index 09a4d91fe..1fa38c32a 100644 --- a/libsrc/supervision/Makefile +++ b/libsrc/supervision/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS = -t $(SYS) -I../../asminc +AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/supervision/supervision.inc b/libsrc/supervision/supervision.inc deleted file mode 100644 index a75fb02f6..000000000 --- a/libsrc/supervision/supervision.inc +++ /dev/null @@ -1,76 +0,0 @@ -; supervision symbols - -; supervision 65c02s -; in cc65 up to 2.9.1 65c02 means 65c02s -.pc02 - -lcd_addr = $4000 -LCD_LINESIZE = $30 -LCD_WIDTH = 160 -LCD_HEIGHT = 160 -; 2 bit per pixel, packed - -lcd_width = $2000 -lcd_height = $2001 -lcd_xpos = $2002 ; in pixel, bit 0+1 not used -lcd_ypos = $2003 ; weird - -sv_port_r = $2021 -sv_port_w = $2022 - -sv_timer_count = $2023 -; read for quitting -sv_timer_quit = $2024 - -; bit 0 timer, bit 1 dma -sv_irq_source = $2027 -SV_IRQ_REQUEST_TIMER = 1 -SV_IRQ_REQUEST_DMA = 2 - -; bit 5,6,7 select bank at 0x8000 -sv_bank = $2026 -SV_NMI_ENABLE_ON = 1 -SV_IRQ_ENABLE_TIMER = 2 -SV_IRQ_ENABLE_DMA = 4 -SV_LCD_ON = 8 -SV_TIMER_MODE_240Hz = $10 ; else 15360 - - -; low activ/pressed -sv_control = $2020 -SV_RIGHT = 1 -SV_LEFT = 2 -SV_DOWN = 4 -SV_UP = 8 -SV_BUTTONB = $10 -SV_BUTTONA = $20 -SV_SELECT = $40 -SV_START = $80 - -; frequency=125000/counter -sv_audio_right_counter = $2010 ;word -sv_audio_left_counter = $2014 -SV_AUDIO_ON =$40 -;bits 0..3 volume -; bit 4 ? -; bit 5 ? -sv_audio_right_control = $2012 -sv_audio_left_control = $2016 -; write activates tone for x/60 sec (0 means 256) -sv_audio_right_timer = $2013 -sv_audio_left_timer = $2017 - - -;read for irq quitting -sv_dma_quit = $2025 -sv_dma_on = $201c -; bit 7 true start, false stop -sv_dma_start = $2018 ; word -sv_dma_size = $201a ; *32 samples -sv_dma_control = $201b -; bit 0,1 speed: 0 15360, 11 15360/4 -; bit 2,3 volume: 0 silent, 11 loud - -sv_noise_volume = $2028 ; and frequency -sv_noise_timer = $2029 -sv_noise_control = $202a diff --git a/libsrc/vic20/Makefile b/libsrc/vic20/Makefile index eae0e96c6..67433999f 100644 --- a/libsrc/vic20/Makefile +++ b/libsrc/vic20/Makefile @@ -13,7 +13,7 @@ AS = ../../src/ca65/ca65 CC = ../../src/cc65/cc65 LD = ../../src/ld65/ld65 -AFLAGS=-t $(SYS) -I../../asminc +AFLAGS=-t $(SYS) --forget-inc-paths -I../../asminc CFLAGS=-Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- diff --git a/libsrc/vic20/vic20.inc b/libsrc/vic20/vic20.inc deleted file mode 100644 index 401762577..000000000 --- a/libsrc/vic20/vic20.inc +++ /dev/null @@ -1,77 +0,0 @@ -; -; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke -; - - -; --------------------------------------------------------------------------- -; Zero page, Commodore stuff - -ST := $90 ; IEC status byte - -TIME := $A0 ; 60HZ clock -FNAM_LEN := $B7 ; Length of filename -SECADR := $B9 ; Secondary address -DEVNUM := $BA ; Device number -FNAM := $BB ; Pointer to filename -KEY_COUNT := $C6 ; Number of keys in input buffer -RVS := $C7 ; Reverse flag -CURS_FLAG := $CC ; 1 = cursor off -CURS_BLINK := $CD ; Blink counter -CURS_CHAR := $CE ; Character under the cursor -CURS_STATE := $CF ; Cursor blink state -SCREEN_PTR := $D1 ; Pointer to current char in text screen -CURS_X := $D3 ; Cursor column -CURS_Y := $D6 ; Cursor row -CRAM_PTR := $F3 ; Pointer to current char in color RAM - -BASIC_BUF := $200 ; Location of command-line -BASIC_BUF_LEN = 89 ; Maximum length of command-line - -CHARCOLOR := $286 -CURS_COLOR := $287 ; Color under the cursor - - -; --------------------------------------------------------------------------- -; Screen size - -XSIZE = 22 -YSIZE = 23 - -; --------------------------------------------------------------------------- -; Kernal routines - -; Direct entries -CLRSCR := $E55F -KBDREAD := $E5CF - -; --------------------------------------------------------------------------- -; Vector and other locations - -IRQVec := $0314 -BRKVec := $0316 -NMIVec := $0318 - -; --------------------------------------------------------------------------- -; I/O: 6560 VIC - -VIC := $9000 -VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE -VIC_HLINE := $9004 ; Rasterline, bits 1-8 -VIC_COLOR := $900F ; Border and background color - -; --------------------------------------------------------------------------- -; I/O: 6522 VIA1 - -VIA1 := $9110 -VIA1_JOY := $9111 -VIA1_DDRB := $9112 -VIA1_DDRA := $9113 - -; --------------------------------------------------------------------------- -; I/O: 6522 VIA2 - -VIA2 := $9120 -VIA2_JOY := $9120 -VIA2_DDRB := $9122 -VIA2_DDRA := $9123 -