Upgraded the cx16 library to the Commander X16 Kernal ROM's prerelease 39.
This commit is contained in:
@@ -7,8 +7,13 @@
|
||||
|
||||
.if .def(__CX16__)
|
||||
; CX16 extended jump table
|
||||
KBDBUF_PEEK := $FEBD
|
||||
KBDBUF_GET_MODIFIERS := $FEC0
|
||||
KBDBUF_PUT := $FEC3
|
||||
I2C_READ_BYTE := $FEC6
|
||||
I2C_WRITE_BYTE := $FEC9
|
||||
CX_MONITOR := $FECC
|
||||
ENTROPY_GET := $FECF
|
||||
KEYBRD_BUF_PUT := $FED2
|
||||
CONSOLE_SET_PAGE_MSG := $FED5
|
||||
CONSOLE_PUT_IMAGE := $FED8
|
||||
CONSOLE_INIT := $FEDB
|
||||
@@ -52,7 +57,7 @@
|
||||
CLOCK_GET_DATE_TIME := $FF50
|
||||
JOYSTICK_SCAN := $FF53
|
||||
JOYSTICK_GET := $FF56
|
||||
SCREEN_SET_MODE := $FF5F
|
||||
SCREEN_MODE := $FF5F
|
||||
SCREEN_SET_CHARSET := $FF62
|
||||
MOUSE_CONFIG := $FF68
|
||||
MOUSE_GET := $FF6B
|
||||
|
||||
104
asminc/cx16.inc
104
asminc/cx16.inc
@@ -1,5 +1,5 @@
|
||||
;
|
||||
; CX16 r38 definitions
|
||||
; CX16 r39 definitions
|
||||
;
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
@@ -106,6 +106,10 @@ PI
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page
|
||||
|
||||
; Banking registers
|
||||
RAM_BANK := $00
|
||||
ROM_BANK := $01
|
||||
|
||||
; GEOS and graphics pseudo-registers
|
||||
.struct gREG
|
||||
.org $02
|
||||
@@ -226,7 +230,7 @@ PI
|
||||
; Kernal
|
||||
KTEMP2 := $80 ; 2 bytes for temporary storage
|
||||
IMPARM := $82 ; Pointer for PRIMM function
|
||||
FNAM := $8C ; Pointer to filename
|
||||
FNAM := $8A ; Pointer to filename
|
||||
|
||||
; BASIC
|
||||
TXTPTR := $EE ; Pointer into BASIC source code
|
||||
@@ -236,14 +240,13 @@ TXTPTR := $EE ; Pointer into BASIC source code
|
||||
BASIC_BUF := $0200 ; Location of command-line
|
||||
BASIC_BUF_LEN = 81 ; Maximum length of command-line
|
||||
|
||||
SCREEN_MODE := $0261 ; Current screen mode (set by SCREEN_SET_MODE)
|
||||
SCREEN_PTR := $0262 ; Pointer to current row on text screen (16 bits)
|
||||
STATUS := $0286 ; Status from previous I/O operation
|
||||
IN_DEV := $028A ; Current input device number
|
||||
OUT_DEV := $028B ; Current output device number
|
||||
FNAM_LEN := $028E ; Length of filename
|
||||
SECADR := $0290 ; Secondary address
|
||||
DEVNUM := $0291 ; Device number
|
||||
STATUS := $0289 ; Status from previous I/O operation
|
||||
IN_DEV := $028D ; Current input device number
|
||||
OUT_DEV := $028E ; Current output device number
|
||||
FNAM_LEN := $0291 ; Length of filename
|
||||
SECADR := $0293 ; Secondary address
|
||||
DEVNUM := $0294 ; Device number
|
||||
CURS_COLOR := $0373 ; Color under the cursor
|
||||
CHARCOLOR := $0376 ; Cursor's color nybbles (high: background, low: foreground)
|
||||
RVS := $0377 ; Reverse flag
|
||||
@@ -270,6 +273,42 @@ NMIVec := $0318
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O locations
|
||||
|
||||
; 65C22 Versatile Interface Adapter
|
||||
.struct VIA1 ; Versatile Interface Adapter
|
||||
.org $9F00
|
||||
PRB .byte ; mouse, LED, VIC bus (Port Register B)
|
||||
PRA .byte ; keyboard, controllers (Port Register A)
|
||||
DDRB .byte ; (Data Direction Register B)
|
||||
DDRA .byte ; (Data Direction Register A)
|
||||
T1 .word ; (Timer 1)
|
||||
T1L .word ; (Timer 1 Latch)
|
||||
T2 .word ; (Timer 2)
|
||||
SR .byte ; (Shift Register)
|
||||
ACR .byte ; (Auxiliary Control Register)
|
||||
PCR .byte ; (Peripheral Control Register)
|
||||
IFR .byte ; (Interrupt Flags Register)
|
||||
IER .byte ; (Interrupt Enable Register)
|
||||
PRA2 .byte ; keyboard, controllers (PRA without handshake)
|
||||
.endstruct
|
||||
|
||||
; 65C22 Versatile Interface Adapter
|
||||
.struct VIA2
|
||||
.org $9F10
|
||||
PRB .byte
|
||||
PRA .byte
|
||||
DDRB .byte
|
||||
DDRA .byte
|
||||
T1 .word
|
||||
T1L .word
|
||||
T2 .word
|
||||
SR .byte
|
||||
ACR .byte
|
||||
PCR .byte
|
||||
IFR .byte
|
||||
IER .byte
|
||||
PRA2 .byte
|
||||
.endstruct
|
||||
|
||||
; Video Enhanced Retro Adapter
|
||||
; Has audio and SPI.
|
||||
.scope VERA
|
||||
@@ -498,44 +537,16 @@ NMIVec := $0318
|
||||
.endstruct
|
||||
.endscope
|
||||
|
||||
; 65C22
|
||||
.struct VIA1 ; Versatile Interface Adapter
|
||||
.org $9F60
|
||||
PRB .byte ; ROM bank, IEC (Port Register B)
|
||||
PRA .byte ; RAM bank (Port Register A)
|
||||
DDRB .byte ; (Data Direction Register B)
|
||||
DDRA .byte ; (Data Direction Register A)
|
||||
T1 .word ; (Timer 1)
|
||||
T1L .word ; (Timer 1 Latch)
|
||||
T2 .word ; (Timer 2)
|
||||
SR .byte ; (Shift Register)
|
||||
ACR .byte ; (Auxiliary Control Register)
|
||||
PCR .byte ; (Peripheral Control Register)
|
||||
IFR .byte ; (Interrupt Flags Register)
|
||||
IER .byte ; (Interrupt Enable Register)
|
||||
PRA2 .byte ; RAM bank (Port Register A without handshaking)
|
||||
; YM2151 audio chip
|
||||
.struct YM2151
|
||||
.org $9F40
|
||||
.union
|
||||
STATUS .byte
|
||||
ADDR .byte
|
||||
.endunion
|
||||
DATA .byte
|
||||
.endstruct
|
||||
|
||||
; 65C22
|
||||
.struct VIA2
|
||||
.org $9F70
|
||||
PRB .byte ; Mouse communication ?
|
||||
PRA .byte ; NES controller communication
|
||||
DDRB .byte
|
||||
DDRA .byte
|
||||
T1 .word
|
||||
T1L .word
|
||||
T2 .word
|
||||
SR .byte
|
||||
ACR .byte
|
||||
PCR .byte
|
||||
IFR .byte
|
||||
IER .byte
|
||||
PRA2 .byte
|
||||
.endstruct
|
||||
|
||||
; Real-Time Clock
|
||||
|
||||
; X16 Emulator device
|
||||
; This device doesn't exist on the real machine.
|
||||
.struct EMULATOR
|
||||
@@ -556,8 +567,7 @@ NMIVec := $0318
|
||||
; ---------------------------------------------------------------------------
|
||||
; Banked RAM and ROM
|
||||
|
||||
KEY_COUNT := $A00A ; (bank 0) Number of keys in input buffer
|
||||
TIMER := $A037 ; (bank 0) 60 Hz. timer (3 bytes, big-endian)
|
||||
TIMER := $A03B ; (bank 0) 60 Hz. timer (3 bytes, big-endian)
|
||||
|
||||
.struct BANK
|
||||
.org $A000
|
||||
|
||||
Reference in New Issue
Block a user