#154 game crashes with custom code in VBA-M but other emulators don't (???)

Verified
closed-invalid
None
1
2014-09-06
2014-05-20
ipatix
No

So hello, I hope I didn't miss the right ticket to report bugs :)

So what the problem is that I rewrote a routine that does internal sound rendering in Pokemon Emerald (German Version) and "sometimes" causes the game to crash with VBA-M (PC seems to get into unused memory areas above 0x10000000) and to reset after a while (when PC reaches BIOS area). It only seems to happen when closing the main Pokemon Menu (Start -> Pokemon). The amount of trys you need to get is crash can vary between 2 and ~100 (just open and close the Pokemon menu).
So the first thing you might tell me now is that I wrote some buggy code which causes the game to crash. I loaded the ROM in the VBA-SDL-H debugger and couldn't force a single crash and therefore I cannot analyze my code. I tried a few other emulators like the "old" VBA 1.8.0 and No$gba 2.7. I didn't have a single crash with those ones and I'm a little bit unsure if it's a problem with VBA-M or my code (or the repointed memory areas, nothing out of valid areas!!!).

I'll try to attatch an IPS file (patch) to give you my modified version of Pokemon Emerald GER (Code: BPED) and I'd really appreciate any help or advice you can offer me.

PS: If you want to I can offer you the source of my code.
It's located at 0xF00000 in ROM and gets loaded to IWRAM 0x03006380 upon ROM start and is executed in IWRAM.

1 Attachments

Discussion

  • Try a version prior to R 1170

     
  • ipatix
    ipatix
    2014-05-21

    Well, I tried R1149 but it failed as well.

    What's up with the versions before R1170? Was there a special change in the emulator core?

     
  • Try Higan, i believe it uses the same GB_APU as us.

     
  • ipatix
    ipatix
    2014-05-21

    Higan doesn't seem to work with games that use 128k Flash Backup Memory. The game will always freeze right after the BIOS. I didn't find a way to adjust the save type so I couldn't test it on Higan :/

     
    Last edit: ipatix 2014-05-21
  • ipatix
    ipatix
    2014-05-30

    This ticket can get closed now. There was nothing wrong with the emulator. Apperantly it has been an issue with the DMA registers I didn't consider.

     
    Last edit: ipatix 2014-06-06
    • status: open --> closed-invalid
    • assigned_to: Squall Leonhart
    • Group: Unverified --> Verified