binji/binjgb

Cube Raider doesn't work as expected

dag7dev opened this issue · 3 comments

Description

When Cube Raider tries to load, it loads, but it's not correctly viewed.
This is a behavior encountered with other emus too.

Steps

Could we do something to fix this behaviour?
TBH I don't know if we can do anything for it, but it would be nice to have it working.

binji commented

AFAICT, this game seems to expect an incorrect implementation of MBC2 behavior, where it can write to address $2000 to switch the ROM1 bank. But according to https://gbdev.io/pandocs/MBC2.html, bit 8 of the address must be set to switch rom banks (e.g. it should be writing to $2100).

Hacking my emulator to allow this incorrect behavior makes it work. But it would be better to patch the game instead, I think.

AFAICT, this game seems to expect an incorrect implementation of MBC2 behavior, where it can write to address $2000 to switch the ROM1 bank. But according to https://gbdev.io/pandocs/MBC2.html, bit 8 of the address must be set to switch rom banks (e.g. it should be writing to $2100).

Hacking my emulator to allow this incorrect behavior makes it work. But it would be better to patch the game instead, I think.

It would be really interesting even if I don't know where to start. But nice idea, thanks for suggesting this!

binji commented

Well, the simplest fix would be to change from using MBC2 to MBC1. You should be able to patch just one byte, see https://gbdev.io/pandocs/The_Cartridge_Header.html#0147--cartridge-type.