Date: Tue, 13 Aug 1996 01:58:49 -0700 To: tghack-list@cpac.washington.edu From: daves@interlog.com (David Shadoff) X-Software: MLF v2.3, Copyright 1995, 1996 by Bt Subject: Memory Usage Interrupts: ----------- There are several interrupts on the Hu6280 processor, and therefore several interrupt vectors... $FFF6 - Unknown interrupt, possibly dealing with CD-ROM $FFF8 - Interrupt which services video in some way (VSYNC ?) $FFFA - Unknown interrupt, dealing at least with sound/PSG $FFFC - 'NMI' interrupt; default response on CD system card is 'RTI' $FFFE - Boot code; not handled as interrupt (on CD system card, at least) Hardware I/O mapping (Segment $FF): ----------------------------------- $0000 - 8-bit 'control' port to video control processor $0002/3 - 16-bit port for I/O to video control processor $0400 - control port for color processor $0401/2 - 'address' I/O port for color processor $0404/5 - 'data' I/O port for color processor $0800 - PSG-related hardware port; values 0-5 denote 'voice' to manipulate Used during interrupt @ $FFFA $0801 - PSG-related hardware port 'Vol' (not 'per-voice') $0802 - PSG-related hardware port 'FrqL' $0803 - PSG-related hardware port 'FrqH' $0804 - PSG-related hardware port 'ChVol' (channel volume; 'per voice') $0805 - PSG-related hardware port 'Pan' $0806 - PSG-related hardware port 'Wave' (takes $20 bytes of $00-$1F values) $0807 - PSG-related hardware port 'Noise' $0808 - PSG-related hardware port 'LFO' (not 'per-voice') $0809 - PSG-related hardware port 'LF_Ctrl' (not 'per-voice') $0C00 - PSG-related hardware port. Used during interrupt @ $FFFA $0C01 - PSG-related hardware port. Bit 0 set to enable sound in 'PSG_ON' Used during interrupt @ $FFFA $1403 - Unknown (Sound ?). Used during interrupt service @ $FFFA $1800-3 - Unknown (CD-ROM ?). Used during interrupt service @ $FFF6 $180B - Unknown (CD-ROM ?). Used during interrupt service @ $FFF6 $1A00-? - Arcade Card ? Zero Page and Other RAM locations (Segment $F8): ------------------------------------------------ $E6: Used during interrupt service routine @ $FFFA $E7: Special function bitmap Bit 7 set when soft reset (run+select) invoked Bit 0 set to disable PSG sound-generation routines Used during interrupt service routine @ $FFFA $EC-$F0: Scratch use by CD system card. $F2: Used during interrupt service routine @ $FFF6 $F3: Special function bitmap Bit 3 is set to '1' if the "IRQ" is set to "on" (0 if "off") Bits 6-7 are set to '11' if the "DSP" is set to "on" (00 if "off") Used during interrupt service routine @ $FFF8 $F4: Used during interrupt service routine @ $FFF8 $F5: Special function bitmap Bit 0 set for override of interrupt @ $FFF6 - place address of new service routine into $2200/1 Bit 1 set for override of interrupt @ $FFF8 - place address of new service routine into $2202/3 (Also inhibits wait for vsync during 'ex_vsync' routine) Bit 2 set for override of interrupt @ $FFFA - place address of new service routine into $2204/5 Bit 3 set for override of interrupt @ $FFFC $F6: Status returned from video controller Used during interrupt service routine @ $FFF8 $F7: Appears to echo current value placed into $0000 video-control chip (General case: $F7 is updated, then $0000) Used during interrupt service routine @ $FFF8 Parameter-passing locations: $F8: _AL $F9: _AH - Together, referred to as _AX $FA: _BL $FB: _BH - Together, referred to as _BX $FC: _CL $FD: _CH - Together, referred to as _CX $FE: _DL $FF: _DH - Together, referred to as _DX Early RAM usage (by CD system card): ------------------------------------ $2200/1 = Address of interrupt service routine @ $FFF6 (if $F5 bit 0 set) $2202/3 = Address of interrupt service routine @ $FFF8 (if $F5 bit 1 set) $2204/5 = Address of interrupt service routine @ $FFFA (if $F5 bit 2 set) $2206/7 = Address of interrupt service routine @ $FFFC (if $F5 bit 3 set) $220C-13 = Used during interrupt service routine @ $FFF8 contains values used for programming the video controller's $0002/3 values (register values ? memory adresses ?) $2214/15 = sat_addr (?). Used for programming the video controller's $0002/3 values (a memory address perhaps ?) $2216 = Value is related to the above, but unclear of its meaning Set to zeroes after 'sat_clr' is called. $2227 = Bitmask of 'important' controllers. These are the controllers which will be allowed to soft-reset the machine (run+select) controller #1 = $01 controller #2 = $02 controller #3 = $04 controller #4 = $08 controller #5 = $10 $2228-2C = 'current' pad value (pads 1 through 5) $222D-31 = 'delta' (new keys hit) pad value (pads 1 through 5) $2232-36 = 'previous' pad value (pads 1 through 5) Bit values for joystick bytes: bit 0 (ie $01) = Button I bit 1 (ie $02) = Button I bit 2 (ie $04) = 'select' bit 3 (ie $08) = 'run' bit 4 (ie $10) = bit 5 (ie $20) = bit 6 (ie $40) = bit 7 (ie $80) = $2241 = Used during 'ex_vsync'. Value changes during vertical retrace. Used during interrupt service routine @ $FFF8 $2242 = Used during 'ex_scrsiz'. Meaning of values is unknown. $2244-46 = Used during 'ex_scrmod'. Meaning of values is unknown. $2249 = Used during interrupt service routine @ $FFF8 $224C-50 = Used during interrupt service routine @ $FFF6 $227B = Used during interrupt service routine @ $FFF6 $2284/85 = Contains the address to jump to in the case of soft reset (run+select). $229D-A4 = Used during interrupt service routine @ $FFF6 $22D0/1 = Address of track to be played (should be in segments controlled by MMR4/5 = $8000-$BFFF) $22D4 = Echoes value placed into port $0C00 Used during interrupt service routine @ $FFFA $22DE/F = Used during interrupt service routine @ $FFFA $22EB/C = PSG_BANK (MMR's 4 & 5, used for sound generation) Used during interrupt service routine @ $FFFA $22ED = Echoes value placed into port @ $0800 Used during interrupt service routine @ $FFFA -- Dave