Can I ask you to show how to add a save game function to a GB game and how to modify your Makefile to do it? I've been struggling with this for some time, and your tutorial would be really helpful. Thank you.
@RetroCGameProgramming24 күн бұрын
I will look into this, in theory it should be just a case of adding a RAM bank I think. But I haven't played with these yet. I am trying to get Banked ROMs working, so I can have games larger than 32k. If I manage to get this working I will make a video.
@RetroCGameProgramming23 күн бұрын
OK, just found a tutorial on it which looks like it should work. Can't test it myself at the moment as my battery in my EZ Flash Junior is flat. The site is laroldsretrogameyard.com/tutorials/gb/how-to-save-data-in-game-boy-games/ I had a quick read through and also have downloaded the code example from github. In his makefile he shows the correct flags for battery backed RAM. Let me know if this worked for you? As I haven't made a game for the Gameboy that justifies saving stuff yet. It should just be creating a struct with key game details in, like Level,Score,Lives and saving that to a battery backed RAM struct. Then checking if there are any saves available and reloading the details from a struct back into the game variables. But I haven't tried that. Hope the link helps