-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c27ed94
commit e96eee9
Showing
6 changed files
with
1,076 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
/** | ||
* @file cia.asm | ||
* @brief Cia module | ||
* @details Labels for Cia support | ||
* | ||
* https://c128lib.github.io/Reference/Cia | ||
* | ||
* @author Raffaele Intorcia raffaele.intorcia@gmail.com | ||
* | ||
* @copyright MIT License | ||
* Copyright (c) 2024 c128lib - https://github.com/c128lib | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
* | ||
* @date 2024 | ||
*/ | ||
|
||
#importonce | ||
|
||
.filenamespace c128lib | ||
|
||
.namespace Cia { | ||
|
||
/** I/O port data registers D1PRA https://c128lib.github.io/Reference/DC00 */ | ||
.label CIA1 = $DC00 | ||
/** I/O port data registers D1PRA https://c128lib.github.io/Reference/DC00#DC00 */ | ||
.label CIA1_DATA_PORT_A = CIA1 + $00 | ||
/** I/O port data registers D1PRB https://c128lib.github.io/Reference/DC00#DC01 */ | ||
.label CIA1_DATA_PORT_B = CIA1 + $01 | ||
/** Data direction registers D1DDRA https://c128lib.github.io/Reference/DC00#DC02 */ | ||
.label CIA1_DATA_DIR_A = CIA1 + $02 | ||
/** Data direction registers D1DDRB https://c128lib.github.io/Reference/DC00#DC03 */ | ||
.label CIA1_DATA_DIR_B = CIA1 + $03 | ||
/** Timer A latch/counter registers D1T1L https://c128lib.github.io/Reference/DC00#DC04 */ | ||
.label CIA1_TIMER_A_LO = CIA1 + $04 | ||
/** Timer A latch/counter registers D1T1H https://c128lib.github.io/Reference/DC00#DC05 */ | ||
.label CIA1_TIMER_A_HI = CIA1 + $05 | ||
/** Timer B latch/counter registers D1T2L https://c128lib.github.io/Reference/DC00#DC06 */ | ||
.label CIA1_TIMER_B_LO = CIA1 + $06 | ||
/** Timer B latch/counter registers D1T2H https://c128lib.github.io/Reference/DC00#DC07 */ | ||
.label CIA1_TIMER_B_HI = CIA1 + $07 | ||
/** Time-of-day clock registers D1TOD1 https://c128lib.github.io/Reference/DC00#DC08 */ | ||
.label CIA1_TOD_SEC10 = CIA1 + $08 | ||
/** Time-of-day clock registers D1TODS https://c128lib.github.io/Reference/DC00#DC09 */ | ||
.label CIA1_TOD_SEC = CIA1 + $09 | ||
/** Time-of-day clock registers D1TODM https://c128lib.github.io/Reference/DC00#DC0A */ | ||
.label CIA1_TOD_MIN = CIA1 + $0A | ||
/** Time-of-day clock registers D1TODH *https://c128lib.github.io/Reference/DC00#DC0B */ | ||
.label CIA1_TOD_HOUR = CIA1 + $0B | ||
/** Serial data register D1SDR https://c128lib.github.io/Reference/DC00#DC0C */ | ||
.label CIA1_IO_BUFFER = CIA1 + $0C | ||
/** Interrupt control register D1ICR https://c128lib.github.io/Reference/DC00#DC0D */ | ||
.label CIA1_IRQ_CONTROL = CIA1 + $0D | ||
/** Control register A D1CRA https://c128lib.github.io/Reference/DC00#DC0E */ | ||
.label CIA1_CONTROL_A = CIA1 + $0E | ||
/** Control register B D1CRB https://c128lib.github.io/Reference/DC00#DC0F */ | ||
.label CIA1_CONTROL_B = CIA1 + $0F | ||
|
||
/** I/O port data registers D2PRA https://c128lib.github.io/Reference/DD00 */ | ||
.label CIA2 = $DD00 | ||
/** I/O port data registers D2PRA https://c128lib.github.io/Reference/DD00#DD00 */ | ||
.label CIA2_DATA_PORT_A = CIA2 + $00 | ||
/** I/O port data registers D2PRB https://c128lib.github.io/Reference/DD00#DD01 */ | ||
.label CIA2_DATA_PORT_B = CIA2 + $01 | ||
/** Data direction registers D2DDRA https://c128lib.github.io/Reference/DD00#DD02 */ | ||
.label CIA2_DATA_DIR_A = CIA2 + $02 | ||
/** Data direction registers D2DDRA https://c128lib.github.io/Reference/DD00#DD03 */ | ||
.label CIA2_DATA_DIR_B = CIA2 + $03 | ||
/** Timer A latch/counter registers D2T1L https://c128lib.github.io/Reference/DD00#DD04 */ | ||
.label CIA2_TIMER_A_LO = CIA2 + $04 | ||
/** Timer A latch/counter registers D2T1H https://c128lib.github.io/Reference/DD00#DD05 */ | ||
.label CIA2_TIMER_A_HI = CIA2 + $05 | ||
/** Timer B latch/counter registers D2T2L https://c128lib.github.io/Reference/DD00#DD06 */ | ||
.label CIA2_TIMER_B_LO = CIA2 + $06 | ||
/** Timer B latch/counter registers D2T2H https://c128lib.github.io/Reference/DD00#DD07 */ | ||
.label CIA2_TIMER_B_HI = CIA2 + $07 | ||
/** Time-of-day clock registers D2TOD1 https://c128lib.github.io/Reference/DD00#DD08 */ | ||
.label CIA2_TOD_SEC10 = CIA2 + $08 | ||
/** Time-of-day clock registers D2TODS https://c128lib.github.io/Reference/DD00#DD09 */ | ||
.label CIA2_TOD_SEC = CIA2 + $09 | ||
/** Time-of-day clock registers D2TODM https://c128lib.github.io/Reference/DD00#DD0A */ | ||
.label CIA2_TOD_MIN = CIA2 + $0A | ||
/** Time-of-day clock registers D2TODH https://c128lib.github.io/Reference/DD00#DD0B */ | ||
.label CIA2_TOD_HOUR = CIA2 + $0B | ||
/** Serial data register D2SDR https://c128lib.github.io/Reference/DD00#DD0C */ | ||
.label CIA2_IO_BUFFER = CIA2 + $0C | ||
/** Interrupt control register D2ICR https://c128lib.github.io/Reference/DD00#DD0D */ | ||
.label CIA2_IRQ_CONTROL = CIA2 + $0D | ||
/** Control register A D2CRA https://c128lib.github.io/Reference/DD00#DD0E */ | ||
.label CIA2_CONTROL_A = CIA2 + $0E | ||
/** Control register B D2CRB https://c128lib.github.io/Reference/DD00#DD0F */ | ||
.label CIA2_CONTROL_B = CIA2 + $0F | ||
|
||
/** Mask for joystick up direction detection */ | ||
.label JOY_UP = %00001 | ||
/** Mask for joystick down direction detection */ | ||
.label JOY_DOWN = %00010 | ||
/** Mask for joystick left direction detection */ | ||
.label JOY_LEFT = %00100 | ||
/** Mask for joystick right direction detection */ | ||
.label JOY_RIGHT = %01000 | ||
/** Mask for joystick fire pressed detection */ | ||
.label JOY_FIRE = %10000 | ||
|
||
/** Mask for Vic-2 bank 0 selection ($0000-$3FFF) */ | ||
.label BANK_0 = %00000011 | ||
/** Mask for Vic-2 bank 1 selection ($4000-$7FFF) */ | ||
.label BANK_1 = %00000010 | ||
/** Mask for Vic-2 bank 2 selection ($8000-$BFFF) */ | ||
.label BANK_2 = %00000001 | ||
/** Mask for Vic-2 bank 3 selection ($C000-$FFFF) */ | ||
.label BANK_3 = %00000000 | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
/** | ||
* @file kernal.asm | ||
* @brief Kernal module | ||
* @details Labels for Kernal support | ||
* | ||
* https://c128lib.github.io/Reference/E000 | ||
* | ||
* @author Raffaele Intorcia raffaele.intorcia@gmail.com | ||
* | ||
* @copyright MIT License | ||
* Copyright (c) 2024 c128lib - https://github.com/c128lib | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
* | ||
* @date 2024 | ||
*/ | ||
|
||
#importonce | ||
|
||
.filenamespace c128lib | ||
|
||
.namespace Kernal { | ||
|
||
/** Serial fast input or output https://c128lib.github.io/Reference/E000#FF47 */ | ||
.label SPIN = $FF47 | ||
/** Close all files to a device https://c128lib.github.io/Reference/E000#FF4A */ | ||
.label CLOSE_ALL = $FF4A | ||
/** Enter 64 mode https://c128lib.github.io/Reference/E000#FF4D */ | ||
.label C64MODE = $FF4D | ||
/** Send command to dma device https://c128lib.github.io/Reference/E000#FF50 */ | ||
.label DMA_CALL = $FF50 | ||
/** Boot a program from disk https://c128lib.github.io/Reference/E000#FF53 */ | ||
.label BOOT_CALL = $FF53 | ||
/** Init function cartridges https://c128lib.github.io/Reference/E000#FF56 */ | ||
.label PHOENIX = $FF56 | ||
/** Work around a user’s open disk channels https://c128lib.github.io/Reference/E000#FF59 */ | ||
.label LKUPLA = $FF59 | ||
/** Work around a user’s open disk channels https://c128lib.github.io/Reference/E000#FF5C */ | ||
.label LKUPSA = $FF5C | ||
/** Switch between 40-column VIC (composite) video display and 80-column 8563 (RGBI) video display. https://c128lib.github.io/Reference/E000#FF5F */ | ||
.label SWAPPER = $FF5F | ||
/** Copy char defintions from ROM to VDC RAM https://c128lib.github.io/Reference/E000#FF62 */ | ||
.label DLCHR = $FF62 | ||
/** Program function key https://c128lib.github.io/Reference/E000#FF65 */ | ||
.label PFKEY = $FF65 | ||
/** Set bank for i/o operations https://c128lib.github.io/Reference/E000#FF68 */ | ||
.label SETBNK = $FF68 | ||
/** Get MMU bank configuration byte https://c128lib.github.io/Reference/E000#FF6B */ | ||
.label GETCFG = $FF6B | ||
/** Jump to subroutine in any bank https://c128lib.github.io/Reference/E000#FF6E */ | ||
.label JSRFAR = $FF6E | ||
/** Jump to routine in any bank https://c128lib.github.io/Reference/E000#FF71 */ | ||
.label JMPFAR = $FF71 | ||
/** Lda indexed from any bank https://c128lib.github.io/Reference/E000#FF74 */ | ||
.label INDFET = $FF74 | ||
/** Sta indexed to any bank https://c128lib.github.io/Reference/E000#FF77 */ | ||
.label INDSTA = $FF77 | ||
/** Cmp indexed to any bank https://c128lib.github.io/Reference/E000#FF7A */ | ||
.label INDCMP = $FF7A | ||
/** Print Immediate utility https://c128lib.github.io/Reference/E000#FF7D */ | ||
.label PRIMM = $FF7D | ||
/** Initialize screen editor and devices https://c128lib.github.io/Reference/E000#FF81 */ | ||
.label CINT = $FF81 | ||
/** Initialize system I/O https://c128lib.github.io/Reference/E000#FF84 */ | ||
.label IOINIT = $FF84 | ||
/** Init RAM and buffers https://c128lib.github.io/Reference/E000#FF87 */ | ||
.label RAMTAS = $FF87 | ||
/** Initialize Kernal indirects https://c128lib.github.io/Reference/E000#FF8A */ | ||
.label RESTOR = $FF8A | ||
/* Initialize or copy indirects* https://c128lib.github.io/Reference/E000#FF8D */ | ||
.label VECTOR = $FF8D | ||
/** Kernal messages on/off https://c128lib.github.io/Reference/E000#FF90 */ | ||
.label SETMSG = $FF90 | ||
/** Serial - send SA after LISTEN https://c128lib.github.io/Reference/E000#FF93 */ | ||
.label SECOND = $FF93 | ||
/** Serial - send SA after TALK https://c128lib.github.io/Reference/E000#FF96 */ | ||
.label TKSA = $FF96 | ||
/** Read/set top of system RAM https://c128lib.github.io/Reference/E000#FF99 */ | ||
.label MEMTOP = $FF99 | ||
/** Set/read bottom of system RAM https://c128lib.github.io/Reference/E000#FF9C */ | ||
.label MEMBOT = $FF9C | ||
/** Scans the entire c128 keyboard https://c128lib.github.io/Reference/E000#FF9F */ | ||
.label KEY = $FF9F | ||
/** Not used in the C128 https://c128lib.github.io/Reference/E000#FA2 */ | ||
.label SETTMO = $FFA2 | ||
/** Serial - byte input https://c128lib.github.io/Reference/E000#FFA5 */ | ||
.label ACPTR = $FFA5 | ||
/** Serial - byte output https://c128lib.github.io/Reference/E000#FFA8 */ | ||
.label CIOUT = $FFA8 | ||
/** Serial - send untalk https://c128lib.github.io/Reference/E000#FFAB */ | ||
.label UNTLK = $FFAB | ||
/** Serial - send unlisten https://c128lib.github.io/Reference/E000#FFAE */ | ||
.label UNLSN = $FFAE | ||
/** Serial - send listen command https://c128lib.github.io/Reference/E000#FFB1 */ | ||
.label LISTN = $FFB1 | ||
/** Serial - send talk https://c128lib.github.io/Reference/E000#FFB4 */ | ||
.label TALK = $FFB4 | ||
/** Read I/O status byte https://c128lib.github.io/Reference/E000#FFB7 */ | ||
.label READST = $FFB7 | ||
/** Set logical file https://c128lib.github.io/Reference/E000#FFBA */ | ||
.label SETLFS = $FFBA | ||
/** Set file name https://c128lib.github.io/Reference/E000#FFBD */ | ||
.label SETNAM = $FFBD | ||
/** Open device channel https://c128lib.github.io/Reference/E000#FFC0 */ | ||
.label OPEN = $FFC0 | ||
/** Close device channel https://c128lib.github.io/Reference/E000#FFC3 */ | ||
.label CLOSE = $FFC3 | ||
/** Set channel in https://c128lib.github.io/Reference/E000#FFC6 */ | ||
.label CHKIN = $FFC6 | ||
/** Set channel out https://c128lib.github.io/Reference/E000#FFC9 */ | ||
.label CHKOUT = $FFC9 | ||
/** Restore default i/o channels https://c128lib.github.io/Reference/E000#FFCC */ | ||
.label CLRCH = $FFCC | ||
/** Input from channel https://c128lib.github.io/Reference/E000#FFCF */ | ||
.label BASIN = $FFCF | ||
/** Output to channel https://c128lib.github.io/Reference/E000#FFD2 */ | ||
.label BSOUT = $FFD2 | ||
/** Load from device https://c128lib.github.io/Reference/E000#FFD5 */ | ||
.label LOAD = $FFD5 | ||
/** Save to device https://c128lib.github.io/Reference/E000#FFD8 */ | ||
.label SAVE = $FFD8 | ||
/** Set software clock https://c128lib.github.io/Reference/E000#FFDB */ | ||
.label SETTIM = $FFDB | ||
/** Read software clock https://c128lib.github.io/Reference/E000#FFDE */ | ||
.label RDTIM = $FFDE | ||
/** Scan the STOP key https://c128lib.github.io/Reference/E000#FFE1 */ | ||
.label STOP = $FFE1 | ||
/** Get key input https://c128lib.github.io/Reference/E000#FFE4 */ | ||
.label GETIN = $FFE4 | ||
/** Close all files and channels https://c128lib.github.io/Reference/E000#FFE7 */ | ||
.label CLALL = $FFE7 | ||
/** Increment internal clock https://c128lib.github.io/Reference/E000#FFEA */ | ||
.label UDTIM = $FFEA | ||
/** Get current screen window size https://c128lib.github.io/Reference/E000#FFED */ | ||
.label SCRORG = $FFED | ||
/** Set or read cursor position https://c128lib.github.io/Reference/E000#FFD0 */ | ||
.label PLOT = $FFF0 | ||
/** Reads base address of I/O block https://c128lib.github.io/Reference/E000#FFF3 */ | ||
.label IOBASE = $FFF3 | ||
/** Non-maskable interrupt vector lo-address https://c128lib.github.io/Reference/E000#FFFA */ | ||
.label NMI_LO = $FFFA | ||
/** Non-maskable interrupt vector hi-address https://c128lib.github.io/Reference/E000#FFFA */ | ||
.label NMI_HI = $FFFB | ||
/** Cold reset vector lo-address https://c128lib.github.io/Reference/E000#FFFC */ | ||
.label RESET_LO = $FFFC | ||
/** Cold reset vector hi-address https://c128lib.github.io/Reference/E000#FFFC */ | ||
.label RESET_HI = $FFFD | ||
/** Interrupt service routine vector lo-address https://c128lib.github.io/Reference/E000#FFFE */ | ||
.label IRQ_LO = $FFFE | ||
/** Interrupt service routine vector hi-address https://c128lib.github.io/Reference/E000#FFFE */ | ||
.label IRQ_HI = $FFFF | ||
|
||
} |
Oops, something went wrong.