mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.72k stars 793 forks source link

F1 Pole Position crashes when loading a track #2218

Open FMecha opened 3 years ago

FMecha commented 3 years ago

I was making a ROM hack that would replace Michael Andretti with Ayrton Senna and then noticed the game crashes whenever it loads a track. I've tried with the original ROM and two mGBA versions (0.7.2 and 0.9.1, latest) and the game also crashes regardless.

There are several ways to trigger this bug:

It is worth noting F1PP GB is a localized version of Nakajima Satoru Kanshuu F-1 Hero GB '92 - The Graded Driver, so the bug might also exist in that version, but I have not tested.

ROM info (umodified):

Database match: F1 Pole Position (USA, Europe)
Database: No-Intro: Game Boy/Color (v. 20210227-015730)
File/ROM SHA-1: A0087BD7421D73E1F8F339A266E62C2D03D081D6
File/ROM CRC32: AABE61BB

EDIT: After it crashes, enabling Game Error logs causes the storm of the following there:

[GAME ERROR] GB MBC:    Attempting to switch to an invalid RAM bank: 0 // also occurs in the menus
[GAME ERROR] GB MBC:    Attempting to switch to an invalid ROM bank: 7B
[GAME ERROR] GB MBC:    Attempting to switch to an invalid ROM bank: 60
[GAME ERROR] GB MBC:    Attempting to switch to an invalid RAM bank: 3

Also, with Stub logging enabled, there is also spam of this:

[STUB] GB MBC:  MBC1 unknown value 3B

as well as:

[STUB] GB MBC:  MBC1 unknown address: A001:00 // even addresses give out Axxx:00
[STUB] GB MBC:  MBC1 unknown address: A000:3B // odd addresses give out Axxx:3B

EDIT 2: OS is Microsoft Windows 10 x64 [Version 10.0.19041.985]

Peltomar commented 1 year ago

This is also a problem in Nakajima, and that one has a long intro cutscene before the title screen that's glitchy and crashes when you attempt to skip it. The intro isn't in the English version.