Hacking Arduino GB/GBA flashcart possible?

mammastuffing

Well-Known Member
OP
Member
Joined
Aug 7, 2015
Messages
172
Trophies
0
Age
34
XP
1,586
Country
Hey all,

I'm not all too familiar with the details on how the GB/GBA works or what their clock frequencies are.
But I'm thinking about trying to build my own Arduino, or rather ATMega328 flashcart. (Prototyping with the Arduino first). But I've a feeling there might be some restrictions seeing as the clock frequency of the ATMega328 is only 16Mhz.

My idea would be to use shift registers to cover all pins of the GB/GBA cartridge pins. However, I realize that using shift registers I'm going to need a minimum of 8 clock cycles to read all 32 (minus vcc, gnd etc. pins) as they will be read serially to the Arduino. Probably more than 8 if we're being realistic.

When the GBA latches addresses I would simply like to load a rom from an SD card and output the requested address in the rom to the data bus.

What do you think? 16 Mhz insufficient or not? :P
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
So you are planning to use the arduino to fake the storage to feed to the GBA? How much space do you think you can get from that? I ask mainly as the GBA does have a very nice serial loading mode aka multiboot that can take a few hundred kilobytes.

The GBA is a bit of a timing/speed concerned device too -- it is why supercards are not great for the GBA. I am not sure even a modern SD is fast enough to do it justice, you could probably make something for homebrew use but trying to do commercial ROMs off it would be a nightmare.

Oh and I should also link http://reinerziegler.de/GBA/gba.htm#homebrew flash cart
If you wanted to use a programmable chip as a governor for other things (pages on a NOR or something) then that could work I suppose.
 

mammastuffing

Well-Known Member
OP
Member
Joined
Aug 7, 2015
Messages
172
Trophies
0
Age
34
XP
1,586
Country
So you are planning to use the arduino to fake the storage to feed to the GBA? How much space do you think you can get from that? I ask mainly as the GBA does have a very nice serial loading mode aka multiboot that can take a few hundred kilobytes.

The GBA is a bit of a timing/speed concerned device too -- it is why supercards are not great for the GBA. I am not sure even a modern SD is fast enough to do it justice, you could probably make something for homebrew use but trying to do commercial ROMs off it would be a nightmare.

Oh and I should also link http://reinerziegler.de/GBA/gba.htm#homebrew flash cart
If you wanted to use a programmable chip as a governor for other things (pages on a NOR or something) then that could work I suppose.

Thanks for the reply.

Yeah, the idea would primarily be to run commerical backups of an SD-card using an ATMega328 to fetch the data from the SD-card an supplying it to the GB/GBA. Would you mind explaining roughly what you mean by timing concerns? I'm sorry if I'm being lazy, guess I don't want to invest too much time into this if it would turn out to be pointless to begin with.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
For the time (and kind of still now) the GBA had pretty fast access rates and very low latency for cart/ROM access, things were coded both to take advantage of this and without regard to running things more slowly -- slowdowns, crashes and more would happen if you messed up here hence the supercards having slowdowns, crashes and the need to have speed patches for many games as they did not put fast enough memory in. NAND memory of the time could not keep up and whether it still struggles I am not sure as things have improved since GBA days but not necessarily in the ways that matter here. To work around that first NOR memory was used, then increasingly large amounts of it and after that things were dumped in RAM from NAND memory and that was pointed at the GBA.
 

Drud1995

Well-Known Member
Member
Joined
Apr 18, 2012
Messages
124
Trophies
1
Age
28
Location
Magicant
XP
398
Country
United States
Never thought of using an Arduino for this purpose, as I have always used it for basic robotics and small hobby projects. Like Fast said, the speed is quite a problem. What might be possible for custom homebrew games, it to find out what ROM chips are used, flash a custom ROM to an EPROM using special programming tools, and solder the new chip in place of the old one in a good donor cart. I know people do this all the time with reproductions for NES and SNES.
 

grossaffe

Well-Known Member
Member
Joined
May 5, 2013
Messages
3,007
Trophies
0
XP
2,799
Country
United States
Because they're the playskool of microcontrollers. If you want to do a serious project in embedded systems, you'll want to start with a real microcontroller. Well, in actuality, you'll want to start by identifying your requirements and constraints and picking a microcontroller, or perhaps FPGA/CPLD, based on those criteria.
 

Jack_Sparrow

Ruthless Pirate
Banned
Joined
Nov 17, 2015
Messages
852
Trophies
0
Age
37
Location
The Black Pearl
Website
www.nintendo.com
XP
495
Country
United States
Because they're the playskool of microcontrollers. If you want to do a serious project in embedded systems, you'll want to start with a real microcontroller. Well, in actuality, you'll want to start by identifying your requirements and constraints and picking a microcontroller, or perhaps FPGA/CPLD, based on those criteria.
Hey, if he can make it work i say let him use what he likes
 

mammastuffing

Well-Known Member
OP
Member
Joined
Aug 7, 2015
Messages
172
Trophies
0
Age
34
XP
1,586
Country
Thanks for all your feedback!

Why the Arduino? Well, it's what I have at my disposal. But I do realize the limitations with the speed and all.

I guess the main "goal" is to not spend a lot of money and to have a fun project to work on. Let's say I instead want to make a modular eprom/eeprom flashcart (I know there are alot of them out there) I would need a programmer.
But I don't want to spend $40-50 on a programmer, but a home made like this would should suffice I guess? http://www.ichbinzustaendig.de/dev/meeprommer-en

I was also looking at this: https://github.com/Xyl2k/Gameboy-Color-Cartridge
This pcb does not have room for SRAM/EEPROM for saving or a RAM chip which I've seen in some carts. Does this mean not all backups are possible to run?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=pnRVIC7kS4s