Author Topic: GBA Game Performance Issues  (Read 2886 times)

0 Members and 1 Guest are viewing this topic.

Offline mable

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
GBA Game Performance Issues
« on: September 18, 2017, 10:01 AM »
I've had my everdrive for a few months and have noticed extremely minor bits of lag in a couple games that are not present on a real cartridge of the game or playing with the same rom on emu. For instance in Hoshi no Kirby Kagami no Daimeikyuu there are very very minor frame drops when the game saves or when loading a file that aren't present on real hardware with an official cartridge, or on a more accurate GBA emulator like mGBA. The rom dump for the game that I use does not have this issue when I practice on emulator, nor do these incredibly minor frame drops happen when playing on a real cartridge.

I've noticed similar frame drops like that in a few other games too, these would most likely be unnoticeable to people who haven't extensively played the games while going back and forth between everdrive for practice saves on console, emulator for savestate practice, and a real cartridge for actually playing the game.

Today was the most major issue though. Here's a video of it: https://www.youtube.com/watch?v=73h03G4aCGg
In Rockman EXE 5 Team of Blues the game slows down to a single digit framerate in factory comp 1. This issue also happens when doing the 100 man challenge. These are the only two places in the game I experienced this issue. This does not occur when playing with this same rom on mGBA, VBA-next, or VBA-M. This leads me to believe that it's an issue with the everdrive. I tried my everdrive with Game Boy Player, Game Boy Interface, and an SP and all of them have the issue of major slowdown in these two spots.

I'd be happy to provide more information if necessary, because across my N64 and Genesis everdrives, the GBA everdrive is the only one that has ever introduced performance issues into games. Even if the frame drops I mention at the start are incredibly minor and would be unnoticeable by most people. I'm very curious why this happens, or if this is just some issue specifically with my everdrive. This is a very important issue regarding the legality of everdrives for GBA speedrunning.

To note I purchased this everdrive directly from Stone Age Gamer's website, so it's a brand new, official krikzz everdrive.

Offline Shadow666

  • Sr. Member
  • ****
  • Posts: 389
  • Karma: +13/-0
    • View Profile
Re: GBA Game Performance Issues
« Reply #1 on: September 18, 2017, 12:42 PM »
I have not noticed any slowdowns in Kirby and the amazing mirror your card is defective

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3086
  • Karma: +477/-2
    • View Profile
Re: GBA Game Performance Issues
« Reply #2 on: September 18, 2017, 05:42 PM »
Cartridge cannot affect on performance in some way. Console cpu only reads data from cartridge memory and then execute, tat's it. There is no some wait states for cartridge in gba architecture, so, if cart would not fast enough, then cpu will not take data in time and system just will hang.
The only way to slowdown games on gba which i can see is cart bus settings, but games should initialize console hardware at startup. May be this game does not perform regular initialization by some reasons.
How long ago you seen mentioned games on original carts? Are you sure that no gags on original carts?

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3086
  • Karma: +477/-2
    • View Profile
Re: GBA Game Performance Issues
« Reply #3 on: September 18, 2017, 05:47 PM »
Forget to ask: Did you disable quick boot in options? With this options some games may not work properly

Offline mable

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: GBA Game Performance Issues
« Reply #4 on: September 18, 2017, 09:58 PM »
Quick boot is off. Here's a video showing Game Boy Player running the game off an everdrive, an official cartridge, and the exact same rom file from my everdrive's folder in bizhawk. This issue is only present on the everdrive. https://www.youtube.com/watch?v=_LpI7h27V-4

I could also make a video of the Amazing Mirror frame drops, but I really don't know if that would be helpful at all. I'm not sure if this is just a defect in my everdrive or if it's a real issue. Since I'm specifically playing the Japanese versions of these games and BN5 isn't all that popular to begin with. For issues in games like Amazing Mirror though I really wouldn't trust anybody saying their game doesn't have the issues though because they are so extremely minor that I can't believe anybody not intimately familiar with the exact performance of the game on a real cartridge would notice this, especially since the issue does not occur during gameplay.

If I can provide any other stuff that could possibly help like rom/save files, a video of the full diagnostics screen running, or pictures of the everdrive's board let me know. I really don't know what would help troubleshoot an issue like this.

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3086
  • Karma: +477/-2
    • View Profile
Re: GBA Game Performance Issues
« Reply #5 on: September 19, 2017, 01:37 AM »
Please share your save file

Offline mable

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: GBA Game Performance Issues
« Reply #6 on: September 19, 2017, 12:18 PM »
https://www.dropbox.com/s/wgsgl8llvewe1xp/Rockman%20EXE%205%20-%20Team%20of%20Blues%20Practice%201.srm?dl=0

Here's the save file from the same spot in the video. Just press A near the statue, select the top option, and go down the path to start the minigame which is where the issue occurs.

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3086
  • Karma: +477/-2
    • View Profile
Re: GBA Game Performance Issues
« Reply #7 on: September 19, 2017, 03:02 PM »
I got same results on other  non everdrive flashcart and on VGBA emulator. Weird, but all working fine with everdrive and revo-k101 console. It make me think that it is not everdrive related problem. May be something wrong with save file itself, i don't know. At the moment i have no ideas why this game is work or not with various hardware combinations.

Offline Missingno255

  • hi
  • Sr. Member
  • ****
  • Posts: 281
  • Karma: +12/-1
    • View Profile
Re: GBA Game Performance Issues
« Reply #8 on: September 28, 2017, 08:05 AM »
I got same results on other  non everdrive flashcart and on VGBA emulator. Weird, but all working fine with everdrive and revo-k101 console. It make me think that it is not everdrive related problem. May be something wrong with save file itself, i don't know. At the moment i have no ideas why this game is work or not with various hardware combinations.
I tested her problem with Rockman EXE 5 as well. The same exact problem happens on my end and I'm using a second generation model GBA SP (the brighter back lit version) and it happens (Also happens on the first generation model too). I don't have the actual cartridge for the game, so if it happens on the real cart, is anyone's guess.
« Last Edit: September 30, 2017, 04:43 AM by Missingno255 »
Owned Everdrives: Everdrive MD, Mega Everdrive, Everdrive N8, Everdrive GB X5, Turbo Everdrive, Super Everdrive, Everdrive GBA

Misc Flashcarts: SD2SNES

Offline Prof. 9

  • Newbie
  • *
  • Posts: 1
  • Karma: +2/-0
    • View Profile
Re: GBA Game Performance Issues
« Reply #9 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.
« Last Edit: July 13, 2019, 06:45 PM by Prof. 9 »

Offline James Cree

  • Full Member
  • ***
  • Posts: 135
  • Karma: +2/-0
    • View Profile
Re: GBA Game Performance Issues
« Reply #10 on: July 14, 2019, 04:13 AM »
Words and stuff.

That's some damn nice investigation skills, man.

Offline bytestorm

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: GBA Game Performance Issues
« Reply #11 on: August 21, 2019, 09:59 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.

Holy smokes! Thats one helluva first post! *hats off* GREAT FIND!