Switching ROM banks

Discussion of programming and development for the original Game Boy and Game Boy Color.
rombank
Posts: 8
Joined: Mon Feb 04, 2019 8:47 am

Re: Switching ROM banks

Post by rombank » Sat Feb 09, 2019 3:37 pm

I'm not certain. If I had to guess, I suppose you reversed things twice there.
Yep, that was what the error was boiling down to!

I got things working now! Wohoo!

However, I got two cartridges that I can test, one with a MBC3(GB game) and a MBC5(GBC game) and currently it only works with the GB game that has a MBC3. http://gbdev.gg8.se/wiki/articles/Memor ... te_Only.29 say that
3000-3FFF - High bit of ROM Bank Number (Write Only)

The 9th bit of the ROM bank number goes here.
Is the reason it doesn't work because I don't write the 9th bit? And would writing the 9th bit be done the same way as in step 2 and 3 (from the section: Now I will explain how to switch ROM banks!) before setting wr low ?

Thanks!

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Switching ROM banks

Post by lidnariq » Sat Feb 09, 2019 4:16 pm

The 9th bit ought to only matter if you're dealing with a game that is larger than 256 (8 bits) × 16384 bytes = 4 MB.

rombank
Posts: 8
Joined: Mon Feb 04, 2019 8:47 am

Re: Switching ROM banks

Post by rombank » Mon Feb 11, 2019 6:48 am

Makes sense!

What I don't understand then is why the Game Boy game switches rom bank just fine, but the Game Boy color game won't change it's rom bank... (I tried to switch to all the available rom banks, but it won't switch from the default one)

Any ideas ? :?

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Switching ROM banks

Post by lidnariq » Mon Feb 11, 2019 11:19 am

Maybe, are you driving /RST high?

rombank
Posts: 8
Joined: Mon Feb 04, 2019 8:47 am

Re: Switching ROM banks

Post by rombank » Mon Feb 11, 2019 3:01 pm

Nope, the same code is being run against both cartridges so my thought was that there is something to do with the different MBCs or maybe that the Game Boy color sent some different signals than the original Game Boy.

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Switching ROM banks

Post by lidnariq » Mon Feb 11, 2019 3:05 pm

That's what I meant. I don't know the pinouts for the MBC1 and other parts, maybe the MBC3 doesn't connect to /RST and maybe the MBC5 does, so that's why I asked if you're driving /RST.

Post Reply