EXI:IDEHostAdapter
From gc-linux
The IDE-EXI adapter by emu_kidid is a small board that let's you connect an IDE ATA hard disk drive to a Nintendo GameCube or Wii via one of the memory card slots of the video game console.
Contents |
Board
Design
The board design is based on the GC HDD adapter by Dampro (Damián).
The files used to build the IDE-EXI adapter and the original firmware are available in this thread of gc-forever.com.
- gcide.zip. This is the package containing all the necessary files, except gc_ide.ucf.
- gc_ide.ucf. This is the specific User Constraint File for the IDE-EXI adapter.
Chips
- Xilinx "XC95144XL" "TQG100AWN1005" "D4049347A" "10C" datasheet
Connectors
Interfacing with the IDE-EXI
The adapter can be accessed via device 0 of EXI channel 0 for memory card slot A or device 0 of EXI channel 1 for memory card slot B, and supports a clock frequency of 32 MHz.
Commands (Original firmware)
| command index (3 bits) | description | ||
| direction read(0),write(1) | size 8 bit(0),16-bit(1) | multi no(0),yes(1) | |
| 0 | x | 0 | read 8-bit ATA reg |
| 1 | 0 | 0 | write 8-bit ATA reg |
| 0 | x | 0 | read 16-bit ATA reg |
| 1 | 1 | 0 | write 16-bit ATA reg |
| 0 | x | 1 | start multiple 32-bit word read from ATA reg |
Read 8 bits from ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (15:13) 000b | (12:8) <register_number> | (7:0) 00h (2 bytes)
read val (1 byte)
deselect exi channel {0,1}
Write 8 bits to ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (23:21) 100b | (20:16) <register_number> | (15:8) <data> | (7:0) 00h (3 bytes)
deselect exi channel {0,1}
Read 16 bits from ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (15:13) 010b | (12:8) <register_number> | (7:0) 00h (2 bytes)
read val (2 bytes)
deselect exi channel {0,1}
Write 16 bits to ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (31:29) 110b | (28:24) <register_number> | (23:16) <data_LSB> | (15:8) <data_MSB> | (7:0) 00h (4 bytes)
deselect exi channel {0,1}
Multiple 32-bit word read from ATA DATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (31:29) 011b | (28:24) 10000b | (23:16) <num_words_LSB> | (15:8) <num_words_MSB> | (7:0) 00h (4 bytes)
deselect exi channel {0,1}
repeat <num_words> times
select exi channel {0,1}, device 0, frequency 5 (32MHz)
read val (4 bytes)
deselect exi channel {0,1}
/* dummy read */
select exi channel {0,1}, device 0, frequency 5 (32MHz)
read val (4 bytes)
deselect exi channel {0,1}
Commands (Modified Firmware v0.2, EXI DMA-friendly)
| command index (3 bits) | description | ||
| direction read(0),write(1) | size 8 bit(0),16-bit(1) | multi no(0),yes(1) | |
| 0 | 0 | 0 | read 8-bit ATA reg |
| 1 | 0 | 0 | write 8-bit ATA reg |
| 0 | 1 | 0 | read 16-bit ATA reg |
| 1 | 1 | 0 | write 16-bit ATA reg |
| 0 | x | 1 | multiple 32-bit word read from ATA DATA reg |
| 1 | x | 1 | multiple 32-bit word write to ATA DATA reg |
EXI get ID
The IDE-EXI answers to an "exi_get_id()" request with 0x49444532 ("IDE2").
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write 0x0000 (2 bytes)
read exi id (4 bytes)
deselect exi channel {0,1}
Read 8 bits from ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (15:13) 000b | (12:8) <register_number> | (7:0) 00h (2 bytes)
read val (1 byte)
deselect exi channel {0,1}
Write 8 bits to ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (23:21) 100b | (20:16) <register_number> | (15:8) <data> | (7:0) 00h (3 bytes)
deselect exi channel {0,1}
Read 16 bits from ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (15:13) 010b | (12:8) <register_number> | (7:0) 00h (2 bytes)
read val (2 bytes)
deselect exi channel {0,1}
Write 16 bits to ATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (31:29) 110b | (28:24) <register_number> | (23:16) <data_LSB> | (15:8) <data_MSB> | (7:0) 00h (4 bytes)
deselect exi channel {0,1}
Multiple 32-bit word read from ATA DATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (31:29) 011b | (28:24) 10000b | (23:16) <num_words_LSB> | (15:8) <num_words_MSB> | (7:0) 00h (4 bytes)
repeat <num_words> times
read val (4 bytes) (big endian)
deselect exi channel {0,1}
Multiple 32-bit word write to ATA DATA register
select exi channel {0,1}, device 0, frequency 5 (32MHz)
write (23:21) 111b | (20:16) 10000b | (15:8) <num_words_LSB> | (7:0) <num_words_MSB> (3 bytes)
n = 0
repeat <num_words> times
write (31:24) <data[n](31:24)> | (23:16) <data[n](23:16)> | (15:8) <data[n](15:8)> | (7:0) <data[n](7:0)> (4 bytes)
n = n + 1
write (7:0) 00h (1 byte)
deselect exi channel {0,1}

