Arcade_Card
From ArchaicPixels: HuC and PCEAS Documentation
The Arcade Card is an expansion HuCard for the PC Engine, intended to be used with the CD·ROM² hardware. The card comes in two varieties, one with 256kB extra RAM and the Super CD·ROM² System 3.1 BIOS for non-Duo PC-Engines called the "Arcade Card Pro", and one without the extra RAM to be used in a Duo called the "Arcade Card Duo"(it is unknown if the Duo version of the Arcade Card contains the CD·ROM² BIOS). Both types come with an additional 2MB of non-memory-mapped RAM, a collection of registers to access the aforementioned 2MiB RAM in various patterns, and a 32-bit-wide programmable shift register.
The Arcade Card has 4 individual port registers than access the 2MB of memory. Each are there own index in the memory and can overlap without conflict.
$1A00 port 1 $1A10 port 2 $1A20 port 3 $1A30 port 4
Each port register consists of the following.
Byte 0/1 = byte wide read/write port access into the AC memory. Byte 0 and 1 are the same port. Useful for TIA and TAI instructions.
Byte 2/3/4 = the 24bit address of the AC memory. The order is: low byte, medium byte, high byte.
Byte 5/6 = offset for use with base+offset address mode. The order is: LSB, MSB.
Byte 7/8 = incrementor value (LSB/MSB). If the increment flag is enabled, the address reg will be incremented by byte 7/8.
byte 9 = control reg (bitmap).
bit 7: N/A
bit 6: allow writes to byte 6 to add offset to base(but only if bit 5 is clear?)
bit 5: allow writes to byte 0xA to add offset to base (but only if bit 6 also set)
bit 4: auto-increment flag; 0 -> inc offset; 1 -> inc base
bit 3: auto-decrement. 1 -> AND 0xff0000 to the 24bit address for byte 5/6. (note: use 2's compliment for the offset)
bit 2: N/A(unknown)
bit 1: use offset value when calculating effective address (ie. 'base only' or 'base+offset')
bit 0: auto-increment enable flag
Byte 0xA = write access to this will add base += offset if bit 6 set in byte 9
The shift register is located in $1AE4 and the data, which is 4 bytes in length, is located in $1AE0. The value to shift is a signed 4bit value.
$1AE0-$1AE3 = lowest byte, low byte, high byte, highest byte. (32bit value in little endian format) $1AE4 = the number bits to shift. Negative values shift right and positive values shift left. $1AE5 = Simple 8-bit latch?
The Arcade Card identification byte is located in $1AFF and the version number in $1AFE.
$1AFD = $00 (?) $1AFE = version number(0x10) $1AFF = Arcade card identification(0x51)
The Arcade Card can also be access via banks $40-43. Each and every byte in the bank is the same as the port of its corresponding register ($1Ax0). With this method you can use the TIA to transfer data from the Arcade Card memory to the VDC(VRAM) directly and TAI from the VDC to AC memory. You can also use this method to read from the CD directly to the Arcade Card memory with the CD_READ function by using MPR agurment with any of the AC banks.
$40 = Arcade Card port register 1 $41 = Arcade Card port register 2 $42 = Arcade Card port register 3 $43 = Arcade Card port register 4
