http://www.lysek.tk

ATA/ATAPI Interface ver. 1
ATA/ATAPI Interface ver. 2
ATA/ATAPI Interface ver. 3
ATA/ATAPI Interface ver. 4
ATA/ATAPI Interface ver. 5

ATA / ATAPI Interface for Game Boy Advance - MAY 2003version 4

BSc with a major in Computer Systems Engineering & BSc in Computer Systems Engineering
Important:
We'd like to point out once more, that the interface has been build in such a way, that you have to use a GBA-cartridge to make it work. This has been done due to the reason that Nintendo would probably dislike if we'd disable the usage of cartridges all together. Our intentions were never to do anything that Nintendo might dislike, and we are willing to discuss anything that they would find to be not to their liking.
EDGE - issue #126 August 2003

The future of electronic entertainment

GBA CD
Sweden: That Sony's PSP (PlayStation Portable, or Possibly Slightly Pretend) will use, in concept at least, disc-based media shouldn't be a surprise. And given the capacity of the medium, surely Nintendo's SP Ex Plus Alpha will follow suit? Well, it doesn't matter if it doesn't, because two students at Halmstad University in Sweden have produced an ATA/ATAPI interface for the GBA. Eh? What? Oh, do pay attention. Lysek and Persson's device lets users connect a standard PC storage device to their handheld, like a hard drive or CD-ROM, increasing the cartridge storage space to something to turn the boffins at Sony GameCube purple with envy. Currently the design is more functional than sexy, but if it gets miniaturised, and if it's silver, and if someone makes a link-cable to an iPod… see more at www.gbacd.tk/

Michal Lysek - Lysekoid - mikael_ing@hotmail.com

Please let us know of any publications made by you about our design.
Prosze powiadomic nas o wszelkich publikacjach naszej konstrukcji.

Hi! Our names are Michal Lysek and Tobias Persson, and we are two students at Halmstad University in Sweden, who for our Degree Project in Computer Systems Engineering developed a ATA / ATAPI Interface for Nintendo's Game Boy Advance (GBA) consol.
This Interface enables you to connect the Game Boy Advance to an ATAPI-protocol-using peripheral like a CD-ROM or a harddrive. This will extend the GBAs maximum cartridge-memory beyond 32MB, which could be quite useful for those who'd like to use the GBA for large space-requiring graphical project or maybe even movies.

The interface is connected into the GBA cartridge slot. The interface also has slots for a GBA-cartridge and an ATA / ATAPI-using peripheral.

The ATA / ATAPI Interface (also called GBA-CD) contains a 32-bit RISC Atmel ARM7TDMI (AT91R40807) microprocessor connected to one 8-bit or one 16-bit Flash memory, 2MB secondary SRAM and 2-32MB primary SRAM. There are three slots free for tree different primary SRAM-memories (32K, 512K and 2048K), making it more flexible, although only one ought to be used at the same time. You can have both one 8-bit flash (32Kbit) and one (out of two) 16-bit flash-memories (16Mbit or 128Mbit) at the same time with different start-up code-instructions. The 8-bit flash is only accessible with the ARM AT91R40008 though.

If we wanted to discard the use of GBA cartridges altogether (we wouldn't and didn't though) then the first part of the interface (seen in the picture above) could have been removed, and the GBA would then have been connected directly to the inputs of the "Switch 2" on the second part of the interface (seen in the picture below). By doing this, the size of the interface would of course have diminished to half its current size. Although the size of the final product won't the bigger then a compact handheld CD-ROM.
This would have of course required a different software code for the microprocessor to upload into the primary SRAM-memory before the turn-on of the GBA.
You could also have solved this by adding an extra flash-memory and enable the GBA to use (as an example) 0-2MB of its memory space to access the flash, and 2-32MB to access the primary SRAM. This way, both CPUs would have had different memories each to boot from and still share the same SRAM.

The size of the primary SRAM is selectable between 2-30MB, depending on the cartridge / interface memory space ratio. As mentioned before, the maximum addressable memory space is 32MB, so if you choose to reserve 30MB for the cartridge you can only address up to 2MB on the interface, vice versa. The GBA will address the cartridge or the primary interface SRAM, depending on this memory-reservation-limit, and the interface will automatically switch connections between these two (through logics) depending on the Databus-driven address. It is important to remember that the GBA itself is not aware of the fact that a interface is connected to it.

The minimum space selectable on the cartridge is 2MB, and this prevents the interface to be used without a cartridge, due to the fact that Nintendo probably wouldn't want this product to discard the usage of cartridges. The GBA is thus forced to boot from a cartridge connected to the interface cartridge slot.

The microprocessors main functionality is to read instructions from the primary SRAM, witch are left there by the GBA, and fill the SRAM with the corresponding data taken from the CD-ROM or harddrive. This primary SRAM is thus accessible for both the microprocessor and the GBA, although the GBA has priority above the microprocessor of its usage. When the expected data has been fetched from the ATA / ATAPI-using peripheral and written to the SRAM, the GBA will be able to read from this memory and access the information. The GBA and the microprocessor cannot access the primary SRAM memory simultaneously.

The microprocessor also has a secondary SRAM that it can use to temporarily store data when the primary SRAM is used by the GBA. This feature improves the interface's performance.

The microprocessor uses 4 Chip Selects:

  • NCS0 is used to address the microprocessors extended Flash memory.
  • NCS1 is used to address the primary SRAM memory.
  • NCS2 is used to address the ATA / ATAPI-using peripheral.
  • NCS3 is used to address the microprocessor's secondary SRAM or a second cartridge slot, used for programming BGA-cartridges through a USART.
The functionality of the interface has been tested and verified both electronically and with the use of VHDL, and although more coding will be done for the interface microprocessor, the system works as we hoped it would. The interface will be improved and redesigned into a smaller size and more fitting form during the upcoming few months.
The whole system runs on two R6/AA batteries, and although this product-prototype looks quite large in those pictures above, it will be much smaller after we've redone it into a more fitting design.

The Game Boy Advance has a 32bit ARM7TDMI RISC processor at 16.78MHz. It has also 96kB VRAM, 32kB intern RAM and 256kB extern RAM.
More info about the GBA system and other related things, can be found at the link below:


Jeff Frohwein's Software-Hardware Dev'rs
The Pern Project
Gameboy Advance Development
Dev'rs GBA Dev FAQs
Reiner Ziegler
CowBite Virtual Harware Spec
Dark Fader
The Audio Advance - Gameboy Advance Sound Resources
GameBoy Developers Kit
GameDev.net - Audio Programming on the GameBoy Advance Part 1
Flash2advance HiSpeedLinker 256Mbit Card 128Mbit Card 64Mbit Card

Nintendo (Sweden)
Nintendo (USA)



Many thanks to Atmel for providing us with a free AT91R40807 CPU sample.
Game Boy Advance is a Nintendo trademark.