[Gameboy] How to know when a level changed?

eyeliner

Has an itch needing to be scratched.
OP
Member
Joined
Feb 17, 2006
Messages
2,921
Trophies
2
Age
44
XP
5,658
Country
Portugal
batman the murderer.PNG


Hello, friendly mammals!

I am hacking away my favorite GB game, Batman the Murderer Videogame.
My main motivator is adding SGB borders, which I have done successfully and tested on real hardware.

My question is if anyone knows the specifics of how or if, for that matter, the level transitions have some identifiable method or trigger. Or, at least, how to look for such a thing.

My motivation, now, is trying to trigger a new border on level transition.

Thanks.
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,752
Trophies
2
XP
8,628
Country
Tuvalu
No idea about this game, but I guess the "level" that you're referring to, is the "STAGE X-X" displayed in the top left?
If so, I'd find which memory address that that value is stored at.
Not sure if you need advice on how to find that.
Could find location by using bgb to see which tile is being drawn for the value, then working backwards and seeing how that tile is chosen.
Or just search memory, assuming first level is 1, go to the next level and search for 2... etc.

Once you have found that, then you'd incorporate checking the value at that memory address when you're setting up the data for your SGB border.
I'm not sure if borders can be dynamic, or how they work at all to be honest!

I might have made it sound a bit too simple :D
 

eyeliner

Has an itch needing to be scratched.
OP
Member
Joined
Feb 17, 2006
Messages
2,921
Trophies
2
Age
44
XP
5,658
Country
Portugal
No idea about this game, but I guess the "level" that you're referring to, is the "STAGE X-X" displayed in the top left?
If so, I'd find which memory address that that value is stored at.
Not sure if you need advice on how to find that.
Could find location by using bgb to see which tile is being drawn for the value, then working backwards and seeing how that tile is chosen.
Or just search memory, assuming first level is 1, go to the next level and search for 2... etc.

Once you have found that, then you'd incorporate checking the value at that memory address when you're setting up the data for your SGB border.
I'm not sure if borders can be dynamic, or how they work at all to be honest!

I might have made it sound a bit too simple :D
You got the gist of it, yes. It really is that string. I have tried to look for numbers increasing when exiting a level and starting the next, but got nowhere. Didn't cross my mind checking for the tile access. Good catch!

Just from memory, there's a couple of games that I've seen doing a border change, but their name eludes me. They are definitely marked as "SGB Enhanced" on the No-Intro romset.
 
  • Like
Reactions: cearp

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=mAk6McnZ2nU