So, I bought a cartridge slot for the Game Boy. I solder the wires to the cartridge pins and connected the pins to a GPIO board based on the pinout given here http://www.hardwarebook.info/Game_Pak (I didn't solder pin 2, 5, 30 or 31 since based on my understanding I don't need them).
I am able to read rom bank 0 and 1 by reading from address 0 to 0x7FFF (I have checked this results to be correct, so I am pretty sure all wires are connected correctly). Since I want to read the entire rom, the natural thing to do now is to switch rom bank. However, this is where I got a problem.
Based off http://gbdev.gg8.se/wiki/articles/Memor ... ontrollers and https://www.insidegadgets.com/2011/03/1 ... d-the-rom/ I try to first set pin WR low and RD high. Then I write the address 0x21 (in binary) to the "output" pins (AD0-15). Then I convert the pins A16-23 from input to output and then write a rom bank number to those pins in binary. Then I set RD low and WR high again and set A16-23 back to input and try to read the next rom bank in address space 0x4000-0x7FFF, however I still read rom bank 1
Any idea on what I am missing?
BTW the game I have connected to the cartridge slot is "Spider-Man 2: The Sinister Six" for the GBC with a MBC5.
I am able to read rom bank 0 and 1 by reading from address 0 to 0x7FFF (I have checked this results to be correct, so I am pretty sure all wires are connected correctly). Since I want to read the entire rom, the natural thing to do now is to switch rom bank. However, this is where I got a problem.
Based off http://gbdev.gg8.se/wiki/articles/Memor ... ontrollers and https://www.insidegadgets.com/2011/03/1 ... d-the-rom/ I try to first set pin WR low and RD high. Then I write the address 0x21 (in binary) to the "output" pins (AD0-15). Then I convert the pins A16-23 from input to output and then write a rom bank number to those pins in binary. Then I set RD low and WR high again and set A16-23 back to input and try to read the next rom bank in address space 0x4000-0x7FFF, however I still read rom bank 1
Any idea on what I am missing?
BTW the game I have connected to the cartridge slot is "Spider-Man 2: The Sinister Six" for the GBC with a MBC5.