x3e / S29GL064N_writer

quick and dirty program to read and re-flash an S29GL064N flash chip
The Unlicense
2 stars 0 forks source link

Wiring info? #1

Open Andoramb opened 8 months ago

Andoramb commented 8 months ago

Hey, I would like to give this a try, got a console that I could experiment with :)

I was reading the descriptions and the code, but could you give some explanation on the wiring? ex. how to daisy-chain the shift registers? I was thinking flashing the memory directly on the chip, not sure if I should create a jig or solder wires directly on the board. Do you have any tips? 🙂

Thanks, Andor

x3e commented 8 months ago

Hi Andor, thanks for your interest!

If you didn't already, please check out the forum thread linked in the description: https://forums.nesdev.org/viewtopic.php?t=23807. It describes that I tried by soldering wires to the board, but failed. I ended up buying a holder for the flash chip on AliExpress and desoldering it from the board.

The shift registers are daisy chained and the outputs are connected to the address pins of the flash chip. (I believe the first shift register output corresponds to A0 of the flash chip, the second output A1, etc.). As for how to daisy-chain shift registers: Google is your friend! But in summary: connect clock pins together, and connect the nQH (output) pin of the previous shift register to the serial input of the next one.

Let me know if there are things that need more explaining and don't hesitate to keep me posted on your progress!

Andoramb commented 8 months ago

Wow, thanks for the quick response!

Tbh I really would like to avoid desoldering te chip from the board 😟 What was the reason for your fail on the first try? What is the reason to use an SD card? Wouldn't it be easier to just use a file as an input? 🙂

I still need to get hold of the shift registers for the assembly, that will end up happening somewhere in January

x3e commented 8 months ago

Well, the memory of my ESP32 wasn't big enough to contain the full flash dump of my 8MB flash chip, so the file has to be transferred to my PC in some way. At first I was doing that over the serial port (with a self-written protocol), but that was painfully slow and error prone. I switched to an SD card, because then you can transfer the image to your PC in seconds and it always works.

But if your ESP32 has more memory or your flash chip is smaller, it might make sense to modify the code to use SPIFFS. Should be pretty straightforward.

About the wiring: I was able to dump the flash with just wires to the PCB. But when I wanted to write to the flash chip, I needed to control the WE pin of the flash chip. But it was soldered (bridged) directly to a ground pin that was next to it. I tried removing the solder and bending the pin upward to solder a wire to it (and break contact with the pad underneath it) but the pin broke off. They're pretty fragile.

So unless you have VERY steady hands or a different game console that breaks out this pin separately, I recommend investing in a holder and a heat gun (if you dont have one) and removing the chip from the board.

Andoramb commented 8 months ago

Hi, so: I can confirm I have the same chip as you (even the same pcb)!

I am studying the chips documentation/wiring before the Christmas-frenzy begins. As far as I can see, the write-enable pin (#11) goes directly to the R15 resistor, so I might give it a try next time. I was aiming for a custom jig for the pins: I took some photos and plan to create a structure and print it, I'm curious to try that out first.

I'll report when I need some guidance or got some progress 🙂 Take care!

x3e commented 8 months ago

After revisiting the pictures, it seems I was mistaken in my previous comment. The problematic pin was the OE pin instead of the WE pin for me. So please check if you can access that one as well. (And all other pins listed in the code for that matter)

Anyway, good luck! I hope you succeed!