The way the game is detected is nearly there for any Lock-On Blue Spheres based ROM, but two things keep it from being achievable:
- ROM Size detection is unnecessary and restrictive.
- ROM Header check for locked-on cartridge isn't ideal.
While it is easy to build around these limitations for a simple "your character here" hack, it limits support for existing Blue Spheres based ROM hacks, indie games with Blue Sphere support (Tanglewood comes to mind) and normal games that give a determined Blue Spheres seed.
The current header check can be replaced with the following :
- Check for the SEGA string at 0x200100 (this is all that S&K looks for a valid ROM)
- Special Check for Sonic 3 Complete as this is a fairly popular choice for playing as Tails.
- Looking for "SONIC 3 COMPLETE" instead of "SONIC & KNUCKLES" should suffice.
- Should an AP specifically for Sonic 3 Complete exist, ask them kindly to change the header to "S3C ARCHIPELAGO" or "SONIC 3 APLETE" :V
To make it compatible with existing logic and make fail-safe :
- Check for the Blue Spheres Game Mode
- only start a valid game when transitioning from the BS Title to the Special Stage.
- Game Mode is at RAM address 0xF600
- 0x2C = BS Title.
- 0x30 = BS Results.
- 0x34 = Special Stage.
It won't be necessary to check for Sonic 2 or 3's header as the Game Mode never gets to Blue Spheres without the use of glitches, exploits or cheats.
The way the game is detected is nearly there for any Lock-On Blue Spheres based ROM, but two things keep it from being achievable:
While it is easy to build around these limitations for a simple "your character here" hack, it limits support for existing Blue Spheres based ROM hacks, indie games with Blue Sphere support (Tanglewood comes to mind) and normal games that give a determined Blue Spheres seed.
The current header check can be replaced with the following :
To make it compatible with existing logic and make fail-safe :
It won't be necessary to check for Sonic 2 or 3's header as the Game Mode never gets to Blue Spheres without the use of glitches, exploits or cheats.