EverDrive-64 X7
The EverDrive-64 X7 is a flash cart made by Krikzz.
Serial Communication
The EverDrive-64 X7 supports serial over USB communication to a host PC. This can be used to load ROMs and allows running ROMs to send an receive data from the host PC. Krikzz provides a reference implementation here.
Serial Registers
The EverDrive-64 X7 provides various registers starting at the address 0x1F800000
in the cartridge address space. The following registers are used for USB communcation.
Name | Description | Address relative to 0x1F800000 | Size (bytes) |
---|---|---|---|
REG_USB_CFG | Reads USB status and sends read and write commands | 0x0004 | 4 |
REG_USB_DATA | The temporary data buffer used to read and write to USB | 0x0400 | 512 |
REG_KEY | Set to 0xAA55 on initialization | 0x8004 | 4 |
REG_SYS_CFG | Set to 0 on initialization | 0x8000 | 4 |
The REG_USB_CFG
register contains various bits as described below
Name | Description | Bits (15-0) | Hex Mask |
---|---|---|---|
USB_LE_CFG | Set to a 1 when reading and writing data | 15 | 0x8000 |
USB_LE_CTR | Set to a 1 when reading and writing data | 14 | 0x4000 |
USB_STA_BSY | Behavior not known | 13 | 0x2000 |
USB_STA_PWR | Set to when 1 when data can be read or written | 12 | 0x1000 |
USB_STA_TXE | Set to 0 when data can be written | 11 | 0x0800 |
USB_CFG_RD/USB_STA_RXF | Writing a 1 switches the controller to read mode. Writing a 0 switches the controller to write mode.
Reads as a 0 when data is available to be read. |
10 | 0x0400 |
USB_CFG_ACT/USB_STA_ACT | Writing a 1 starts reading or writing to REG_USB_DATA. The direction of data is specified by the value of USB_CFG_RD. The amount of data written is specified by baddr.
When reading this bit, a 1 indicates the USB port is busy reading or writing data. |
9 | 0x0200 |
baddr | These 5 bits give the address into REG_USB_DAT where USB data is read from and written to. Data is read starting at baddr offset until the end of the REG_USB_DAT buffer. This means the amount of data read is 512 - baddr . Because of this, when copying data to and from REG_USB_DAT, you don't always start copying at the beginning of the buffer.
|
8..0 | 0x01FF |