Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Prof. 9

Pages: [1]
1
EverDrive GBA / Re: GBA Game Performance Issues
« on: July 11, 2019, 10:41 PM »
I've looked into this problem and my conclusion is that it's caused by how the EverDrive fills the remaining ROM space.

The part of the game that this problem occurs with is the 100 man challenge. It turns out that there's a software bug in this part of the game, which eventually causes it to try and process sprite data from 0xAA038D6. You can verify this quite easily in an emulator like No$gba that supports memory read breakpoints. If the game reads an 0xFF byte from this memory range, then it will immediately stop loading sprite data; however, if the game reads any other byte, then it will keep reading endlessly, every 5 bytes... until eventually it hits the SRAM region which happens to contain some FF bytes. This is done on every single frame, so this causes intense lag.

The Rockman EXE5 ROM is only 8 MiB, and thus only fills the space from 0x8000000 - 0x8800000, which is mirrored to 0xA000000 - 0xA800000, and 0xAA038D6 comes after that. Normally, any reads from ROM memory beyond that would simply return FF bytes. But it seems that the EverDrive doesn't reinitialize the memory beyond the end of the ROM, so whatever was there before will still be there when you boot the Rockman EXE5 ROM. If that space happened to be filled with non-FF bytes before, then the slowdown occurs.

To fix this problem, ideally the EverDrive would re-initialize all ROM space beyond the end of the ROM with FF bytes; this mimics how it works on actual hardware. A workaround would be to append 25165824 bytes of FF to the end of the ROM so that it's 32 MiB and fills the entire ROM memory region. From what I can tell the EverDrive self-test option writes random data to ROM0 and ROM1, so that doesn't help.

I haven't been able to test Factory Comp 1 which is the other location where this problem is reported to occur, but I suspect it would be caused by the same thing. By the way, this bug is fixed on the English versions of the game. EDIT: I've checked Factory Comp 1 and I can confirm it has the exact same problem, also triggering a load from 0xAA038D6.

All testing was done on EverDrive OS v1.12 and bootloader v1.04.

Pages: [1]