Under the Shrine of Death a small SRAM bug fix after the major update!
As usually I got excited to share my changes over the game and I ended up posting a version that had some problems.
To my excuse, the bug was created when I decided to change the emulator in the romBundler version from BlastEm to Genesis-Plus-gx.
Both of those retroarch versions of the emulators a buggy and get the game crashed for an unknown reason to me.
BlastEm core may crash in game when too many sprites are drawn in a single step and when you exit the game.
Genesis-Plus-gx crashes only when you exit the game so it is the less harmful one.
By the way my PAL MegaDrive never crashed like that. So the conclusion is that the cores are the problem.
I also want to mention here that the Stand Alone version of BlastEm does not crash either.
So I took the decision to change the core from BlastEm to Genesis-Plus-GX.
This change introduced another problem that I do not really know the absolute solution.
The problem is, what initial values the SRAM have? (The SRAM is used to save the game)
With the BlastEm core (and the stand alone one) the values of the SRAM are Zero so I used this knowledge to check if there is a save game or not.
The Everdrive 3X have the initial values of the SRAM to Zero too.
So everything was smooth until the switch of the cores.
But Genesis-Plus-GX have other values. I haven't check what are those values, but it is other than 0, so the game thinks that there is a save and by reading those numbers to load the game, it crashes.
I also think that in a discussion I had in the past with more technical guys than me about those things, that they said to me that the flash memory (SRAM) initially may contain random values.
So my solution was to write a fixed number at the beginning of the SRAM, in my case I used the extremely rare sequence 12345. So the game when it loads it checks if the first 16 bit integer in the SRAM is 12345, if not then this means that the game have no save.
The solution was valid, but I overlooked that I was writing in another place the Seed of the Dungeon there. This resulted to loose the save game of the previous run if you start a new character but abandon him before you jump on the first level.
Anyway, no it is fixed.
But, the solution is not an absolute one. For example, imagine that this game for some reason goes to be sold on cartridge with an SRAM filled with random values, and now imagine that this first random number is going to be out of pure luck 12345. My lucky guy is going to get a crash on his first run.
I bet if this ever happens it will happen to the cartridge given to me and I will panic believing that I once again managed to f@@@ things up at the last moment.
Files
Get Under the Shrine of Death
Under the Shrine of Death
Roguelike Dungeon Crawler for the Sega Mega Drive
Status | Released |
Author | kakoeimon |
Genre | Role Playing |
Tags | Dungeon Crawler, Mega Drive, Roguelike, Sega Genesis |
More posts
- Probably the last update.37 days ago
- AGAIN?39 days ago
- Under the Shrine of Death - 10/8/24 update39 days ago
- Under the Shrine of Death - Major Update 9/30/202447 days ago
- A minor update for Under the Shrine of DeathNov 03, 2023
- Under the Shrine of Death 6_13 - Beta CallJun 13, 2023
- Under the Shrine of Death -Cleric- 5_29May 29, 2023
- Under the Shrine of Death 5_23 Saving and LoadingMay 23, 2023
- Under the Shrine of Death 5_19 The Fighter is GoldMay 19, 2023
Leave a comment
Log in with itch.io to leave a comment.