6502-OS/system/io_W65C22.h65

50 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-10-26 19:51:20 +02:00
;********************************************************************************
; @module IO-W65C22
; @type utility
; @device Western Design - W65C22N Versatile Interface Adapter
; @details
;********************************************************************************
.ifndef INCLUDE_IOW65C22
INCLUDE_IOW65C22 = 1
; IO-CHIPS OFFSETS FOR PINS FROM BASE ADDRESS
IO_RB = $0
IO_RA = $1
IO_DDRB = $2
IO_DDRA = $3
IO_T1CL = $4
IO_T1CH = $5
IO_T1LL = $6
IO_T1LH = $7
IO_T2CL = $8
IO_T2CH = $9
IO_SR = $a
IO_ACR = $b
IO_PCR = $c
IO_IFR = $d
IO_IER = $e
IO_RANH = $f ; no handshake
; TODO: leave?
.struct VIA_Pins
RB .byte ; $0
RA .byte ; $1
DDRB .byte ; $2
DDRA .byte ; $3
T1CL .byte ; $4
T1CH .byte ; $5
T1LL .byte ; $6
T1LH .byte ; $7
T2CL .byte ; $8
T2CH .byte ; $9
SR .byte ; $a
ACR .byte ; $b
PCR .byte ; $c
IFR .byte ; $d
IER .byte ; $e
RANH .byte ; $f ; no handshake
.endstruct
.endif