Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
I'm attempting to write a shmup for the GBC that uses as many sprites for bullets that the Game Boy will allow. I'm writing it in C with GBDK 2020, and everything was going smoothly until I changed the list containing all of the bullet-structs to a linked-list. Now, the game runs a lot faster, however after about 20 seconds, the game crashes.
I have absolutely no clue why it's doing this - I've checked all of my code and figured out that the problem lies somewhere within the edge-collision detection for each bullet, but from there I'm lost as to why. I assume it's a problem with the way I add/delete from my linked-lists, but I can't exactly pinpoint the problem I'm running into.
I know this is super vague, but I don't really know how to debug this problem or where to even look. Would anyone be willing to help me? If you'd need any other files, I'm willing to share them.
Thank you for trying!!
Here's the link:
https://drive.google.com/drive/folders/ … sp=sharing
UPDATE: I still have the problem, however, I've discovered that the problem really only happens when two bullets hit the wall at the same time.
Last edited by Bobyrman123 (2022-02-14 03:08:23)
Offline
Just when I almost forgot how ugly is the code GBDK produces... You have some buffer overflow here. Game stops because IE gets overwritten with 0 which disables interrupts. This is caused by enabledToDisabled function after some time, so it's probably due to lastNode content. Or just place access breakpoint (write) on $FFFF and try yourself.
Offline
tmk wrote:
Just when I almost forgot how ugly is the code GBDK produces... You have some buffer overflow here. Game stops because IE gets overwritten with 0 which disables interrupts. This is caused by enabledToDisabled function after some time, so it's probably due to lastNode content. Or just place access breakpoint (write) on $FFFF and try yourself.
Fantastic, thank you! I had no clue you could set breakpoints on Gameboys, I'll have to learn more about debugging Thank you!
Offline
A little late to this, but there is also C source debugging with Emulicious:
https://emulicious.net/a-major-update-o … ailable-4/
Offline