Thanks once again to skaman: "The problem occurs because of the bank switch to 0xAA (0xAA * 0x4000 = 0x2A8000). I'm assuming that the code you're using writes the bank to address 0x2000 (or similar) then follows with the flash sequence to program the byte. Since 0xAA is also a flash command, the flash chip misinterprets the bank switch as the flash command and misses the command sequence to write the first byte in the bank."
Cartridge Reader for Arduino Mega2560
####Features:
- Reads SNES roms and reads/writes save games from and to the SNES cartridge
Supported cartridge types so far: LoRom, HiRom, ExHiRom, SuperFX, SuperFX2, SDD1, SA1(needs Adafruit Clock Generator) - Reads and writes SFC Nintendo Power Cartridges (also known as SF Memory, needs Adafruit Clock Generator for best result)
- Reads N64 roms and reads/writes save games(4K/16K Eeprom + Sram + all 3 types of Flashram)
- Reads and writes N64 controller paks and also can test a N64 controller's buttons and thumbstick
- Reads Game Boy (Color) roms and reads/writes save games(only tested with MBC5)
- Reads Game Boy Advance roms and reads/writes save games(4K Eeprom, 64K Eeprom, Sram/Fram, SST39VF512 512K flash + MX29L010 1M flash)
- Programs Flashroms like 29F016, 29F032, 29F033, 29F1610 and 29L3211(needs 3.3V)
####Be sure to check the guides in the wiki too.
####Thanks to:
MichlK - ROM-Reader for Super Nintendo
Jeff Saltzman - 4-Way Button
Wayne and Layne - Video-Game-Shield menu
skaman - SNES enhancements and SA1 sram support
nocash - Nintendo Power and GBA Eeprom commands and lots of other info
crazynation - N64 bus timing
hkz/themanbehindthecurtain - N64 flashram commands
jago85 - help with N64 stuff
Andrew Brown/Peter Den Hartog - N64 controller protocol
bryc - mempak
Shaun Taylor - N64 controller CRC functions
Angus Gratton - CRC32
Tamanegi_taro - SA1 fix
Snes9x - SuperFX sram fix
zzattack - multigame pcb fix
Pickle - SDD1 fix
insidegadgets - GBCartRead
RobinTheHood - GameboyAdvanceRomDumper
YamaArashi - GBA flashrom bank switch command
####Please join the discussion at: http://forum.arduino.cc/index.php?topic=158974.0