1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-01 22:50:35 +00:00

Change Apple Disk ][ I/O defs to constants

The $C0En approach wasn't really working well.  This changes the
addresses to $C08x, and makes them constants so they don't clash
with the LC defs.
This commit is contained in:
Andy McFadden 2020-03-22 13:16:21 -07:00
parent 456f2c8afb
commit 76784848d0

View File

@ -139,28 +139,27 @@ CLRROM @ $CFFF ;disable slot C8 ROM
; Disk ][ I/O locations.
;
; A few things hard-code slot 6 for disk access, in which case
; these will work. In most cases code uses something like
; "LDA $C088,X", which clashes with the slot 0 definitions. We
; define these for slot 6 to get the symbols defined in a way that
; is unlikely to clash, allowing them to be manually set for values
; in the C08x range.
IWM_PH0_OFF @ $C0E0 ;IWM phase 0 off
IWM_PH0_ON @ $C0E1 ;IWM phase 0 on
IWM_PH1_OFF @ $C0E2 ;IWM phase 1 off
IWM_PH1_ON @ $C0E3 ;IWM phase 1 on
IWM_PH2_OFF @ $C0E4 ;IWM phase 2 off
IWM_PH2_ON @ $C0E5 ;IWM phase 2 on
IWM_PH3_OFF @ $C0E6 ;IWM phase 3 off
IWM_PH3_ON @ $C0E7 ;IWM phase 3 on
IWM_MOTOR_OFF @ $C0E8 ;IWM motor off
IWM_MOTOR_ON @ $C0E9 ;IWM motor on
IWM_DRIVE_1 @ $C0EA ;IWM select drive 1
IWM_DRIVE_2 @ $C0EB ;IWM select drive 2
IWM_Q6_OFF @ $C0EC ;read
IWM_Q6_ON @ $C0ED ;WP-sense
IWM_Q7_OFF @ $C0EE ;WP-sense/read
IWM_Q7_ON @ $C0EF ;write
; A few things hard-code slot 6 for disk access, in which case addresses
; like $C0E8 will work here. It's far more common for code to use indexed
; addressing like "LDA $C088,X", which clashes with the slot 0
; definitions. We define these symbols as constants so they're not
; applied automatically but are available for use.
IWM_PH0_OFF = $C080 ;IWM phase 0 off
IWM_PH0_ON = $C081 ;IWM phase 0 on
IWM_PH1_OFF = $C082 ;IWM phase 1 off
IWM_PH1_ON = $C083 ;IWM phase 1 on
IWM_PH2_OFF = $C084 ;IWM phase 2 off
IWM_PH2_ON = $C085 ;IWM phase 2 on
IWM_PH3_OFF = $C086 ;IWM phase 3 off
IWM_PH3_ON = $C087 ;IWM phase 3 on
IWM_MOTOR_OFF = $C088 ;IWM motor off
IWM_MOTOR_ON = $C089 ;IWM motor on
IWM_DRIVE_1 = $C08A ;IWM select drive 1
IWM_DRIVE_2 = $C08B ;IWM select drive 2
IWM_Q6_OFF = $C08C ;IWM read
IWM_Q6_ON = $C08D ;IWM WP-sense
IWM_Q7_OFF = $C08E ;IWM WP-sense/read
IWM_Q7_ON = $C08F ;IWM write
; Not strictly I/O locations, but they're in the neighborhood.