pouët.net

Upgrading the GBA EWRAM SRAM to a faster chip

category: general [glöplog]
The AGB and GBA SPs EWRAM chip is a 128kx16 SRAM chip with 70ns (M68AS128DL70N6), 85ns (μPD442012AGY-BB85X-MJH), or even 120ns (HY62LF16206A-LT12C) access time, depending on the chip (good hardware database here). Setting the undocumented EWRAM wait states to 0Eh (1 wait state) you can speed up EWRAM access to 1 wait state / 8MHz (sysclock / 2). Setting it to 0Fh will lock up the GBA though, probably because 0 wait states are out of the specs of all SRAM chips ever used as we'd need < 62ns access time. But there are SRAM chips available now with as low as 10ns access time.
Has anyone tried to swap one of those into the GBA?
Do you know of any drop-in replacements?
added on the 2021-06-17 18:03:30 by raer raer
The package is TSOP-48 btw
added on the 2021-06-17 18:14:48 by raer raer
Extraordinary discovery! I wonder what this would do to the performance of "Newton Never Did This, Bitch!", "Five Finger Discount" and friends.
added on the 2021-06-17 19:55:57 by rloaderro rloaderro
is that the 4000204 or the 4000800?
BB Image
added on the 2021-06-17 20:03:01 by the_Ye-Ti the_Ye-Ti
I suppose raer meant 4000800h, as that's the undocumented one.

I haven't heard of anyone who did this before, but sure you could try I guess?

Also another fun thing about the 4000800h register: you can use it to dump the BIOS (yes, that's yet another way to do it).
added on the 2021-06-17 20:39:24 by porocyon porocyon
Yes, I meant the 4000800h. Not sure about the actual performance improvement, but it would mean EWRAM access cycles should be 1/1/2, which is twice the speed. Not as fast as IWRAM (1/1/1), but still a lot faster.
I haven't found any drop-in replacements. TSOP-I-48 seems to have died out and every SRAM nowadays uses TSOP-I-44 or TSOP-II-44 and a different pinout. The IS62WV12816EBLL-45TLI looks like a good replacement (45ns access time, cheap). I'm drafting a breakout PCB in Kicad atm... Not sure if this is even working, but it's too stupid not to try :D
added on the 2021-06-17 22:33:31 by raer raer
How to kill the autorouter:
BB Image
added on the 2021-06-17 23:59:24 by raer raer
I approve of any kind of hardware hacking adventure even though I don't have a GBA myself, even more so if a custom board layout is involved! Keep the updates coming <3
added on the 2021-06-18 13:44:57 by dojoe dojoe
Modifying the perfect hardware is heresy.
added on the 2021-06-18 15:23:14 by kusma kusma
It'll simply make it even more perfect ;)

Layout done after the autorouter barfed a couple of times. It's probably utter crap signal-wise (I have no clue what I'm doing), but at 16MHz it should work. Not sure If I should better go 4-layer though.
BB Image

Any thoughts on board manufacturers? In the past I went with Aisler.net and I kinda like them due to being located in the Netherlands and KiCad sponsoring, but if you have recommendations for a service that properly imports KiCad files and possibly can make 0.8mm boards, I'd check that out.
added on the 2021-06-18 20:00:31 by raer raer
For a 27 MHz thing I once went for a 4-layer one with two ground planes in the middle (mostly because lots of pads/PCB connector thingies were needed, otherwise I probably would've put them on the top/bottom). If the manufacturer offers 'better impedance' board materials, better go for that. And castellated holes for placing it on the GBA mainboard, probably, too.

As for manufacturers, for now I've only used JLCPCB, because, they're cheap, places like Eurocircuits are much more expensive. Hadn't heard of Aisler before though.
added on the 2021-06-18 22:02:00 by porocyon porocyon
Switched to 4 layers:
BB Image

JLCPCB is cheap and has many options. Might try them this time, because they have an option for 0.8mm board thickness. Not sure if my Gerber exports are correct. Currently reviewing files...
added on the 2021-06-18 23:07:10 by raer raer
Ordered 3x IS62WV12816BLL-55TLI (55ns, 3mA) which has the same pinout as the IS62WV12816EBLL-45TLI (55ns, 18mA) and was available for ~3€ / piece on Ebay. The CY62136FV30LL-45ZSXIT (45ns, 18mA) might work too.
Here's the Mouser SRAM part search I used.
added on the 2021-06-19 00:24:49 by raer raer
Aaaand PCBs ordered:
BB Image

Now follows endless waiting... :/
added on the 2021-06-19 00:30:33 by raer raer
yeah, JLCPCB lead+shipping times are loooong... not exactly a surprise when they're at the other side of the world
added on the 2021-06-20 00:55:20 by porocyon porocyon
@porcyon: Thanks for the info about the lower impedance boards. JLPCB supports only "controlled impedance" boards that have a specific impedance depending on stackup etc. I'm not sure how to design my traces for a specific impedance though. I hope this won't be an issue for 16MHz...
Castellated holes would be perfect for this, but the GBA SRAM chip has tiny pins and manufacturers have a minimum hole diameter, so no-go. I made the board a bit narrwoer than the SRAM chip footprint on the GBA, so hopefully it will be solderable with my rework station.
added on the 2021-06-22 12:28:05 by raer raer
Should have tried this earlier. This is on a regular, unmodified (well, has an IPS display) AGB-001:
BB Image
Atm it only memsets EWRAM words. Will try some other copying etc. when I find time and post a .gba file. Seems like faster SRAM might not be necessary? :/
added on the 2021-06-28 23:33:25 by raer raer
Works on an AGS-001 too
added on the 2021-06-29 00:06:02 by raer raer
It doesn't work on my AGB-001 nor my AGS-001.

I don't know if you are already doing it, but to check if it works you should read and compare an EWRAM word (maybe more) against the original written value.

In this code I'm doing that check with 0Eh to avoid hanging the GBA Micro.
added on the 2021-06-29 17:14:30 by GValiente GValiente
Added some actual memory tests. You're right:
BB Image
Here's the .gba
added on the 2021-06-30 21:15:12 by raer raer
PCBs and chips arrived. Waiting for solder paste (opted for ChipQuik Sn42/Bi58 rework paste because of 138°C melting point). Will also need to check if I fucked up on the PCB before I screw up my GBA...
BB Image
added on the 2021-07-02 11:09:24 by raer raer
I can't wait to know how this ends :)
added on the 2021-07-02 15:00:13 by GValiente GValiente
ooh!

(also yes, chipquik stuff is good!)
added on the 2021-07-03 20:57:08 by porocyon porocyon
I toyed with this register during the middle 2000s in a work's project. Had tons of GBA consoles and it was working with all of them, even when trying with the devkits. Unfortunately I scrapped the idea of using this feature because the Nintendo DS in GBA mode seemed to be ignoring it, and also out of fear of Nintendo's Lotcheck :-)
added on the 2021-07-05 15:38:23 by Debvgger Debvgger
the trick is to make Lotcheck fear you
added on the 2021-07-06 01:14:14 by porocyon porocyon

login