« Last post by pimpinelephant on February 21, 2018, 01:45:42 pm »
Not perfect. But should work as a cursor. Gaia. Passable given Canoe atm.
Gun Hazard. Going to run trace logs on what a soft reset does differently. But. I muffed my saves on purpose and GH still thinks they can be read (detected). And then returns to title screen when fails to load.
Could Canoe not be loading the sram save.. because of file name oddity?
"Front Mission Series - Gun Hazard (Japan).sfc" ==> "Gun Hazard (Japan).sfc"
"Kirby's Dream Land 3 (USA).sfc" ==> "Dream Land 3 (USA).sfc"
(Forgot what Japan name is, suppose saves are borked there too)
Slayers = huh. Trips snes9x crash. Woot? Considering they didn't fix this yet, joke on me? (Looking to be some evil spc timing issue)
So 1st guess as to loud pops is either very fast adsr changes, not clipping correctly overflows, or looping sound problems. Maybe sound cache being used. Not enjoying audio debugging for now but will have to build up practice.
Daffy Duck = flickers anytime? title? just in-game?
I just checked the SRAM file that is created when using the in-game saves, and the first 16 bytes (offsets 0x0 to 0xF) are:
2D 2D 20 47 55 4E 20 48 41 5A 41 52 44 20 2D 2D | -- GUN HAZARD --
I went ahead and checked a couple of other games' SRAM files, and the couple of games that I checked did not have the name of the game anywhere within the SRAM file. I decided to then change those first 16 bytes to  to see what would happen. I loaded the game up on Higan and the SRAM file was not loaded, exactly like in Canoe.
Here's the interesting part though, the SRAM file is always edited upon game boot-up. The first 16 bytes are always changed to the above mentioned values when booting up the game, whether or not you load or play any file (I only checked the Continue option and then shut down Higan). Despite the SRAM file being edited to contain the name of the game every time the game boots up, the game continued to act exactly as it does in Canoe. The game would not recognize the SRAM file until you made a new save file.
Here's where it gets really interesting though. I searched for another game that contained the name of the game within the SRAM file. Turns out that Slayers SRAM files contain just that, albeit at a different location! The values at offsets 0xD0 to 0xD7 are:
53 4C 41 59 45 52 53 A2 | SLAYERS¢
I went ahead and did the same thing with the Slayers SRAM file that I did with Front Mission - Gun Hazard, replacing those 8 bytes with . As expected, the SRAM file was edited at game boot-up, as I mentioned earlier, to the hex values mentioned above. But unlike Front Mission - Gun Hazard, the game recognized and loaded the SRAM file as it normally would.
This might possibly solve why, in Canoe, the game loads the SRAM on soft resets but not on shutdown/boot-up. The game should be loading the SRAM similarly to Slayers, where even if you edit the SRAM file, booting-up the game will revert it to what it should be and therefore be able to be loaded. Unfortunately, Front Mission - Gun Hazard does not do this, it will continue to revert the SRAM to what it should be, but it will not load the SRAM, at least until you make a new in-game save.
It almost appears as if that process of editing the SRAM file upon game boot-up is what is causing the issue in Canoe, although who knows (certainly not me).
Canoe creates the SRAM file -> shutdown/boot-up game -> the game edits the SRAM file -> the game refuses to load the SRAM
I think in most cases this process is fine, as Slayers demonstrates, but in the case of Front Mission - Gun Hazard, the game will refuse to load the SRAM upon SRAM edit.
Alright, I did some more testing with Front Mission - Gun Hazard and its SRAM. I've been able to reproduce the Canoe soft-reset vs shutdown/boot-up issue in Higan.
I booted up the game with an in-game save file present. After booting up the game, I deleted the SRAM file from the Higan library directory. The game would simply just re-create the same SRAM file once selecting the "Continue" option or by soft resetting. I'm assuming this is the case due to the data already having been loaded and stored within the RAM(?).
I then did the same steps once again, but I instead deleted the SRAM file and completely shut down the game. A re-created SRAM was never created due to not selecting the "Continue" option. I then booted up the game, and there were no in-game save files present. This is obviously to be expected, but I wanted to make sure that it would behave exactly like in Canoe.
Now, the SRAM file is obviously not being deleted in the Classic, but at the very least, I was able to achieve the same behavior in regards to soft-resets and shutdown/boot-ups.
I'm not sure what exactly could be causing the issue, but it's possible that it might be linked to what I discussed earlier about Front Mission - Gun Hazard and Slayers. I have no clue though, so take my words with a grain of salt.
As for Kirby's Dream Land 3, the issue is a bit different. In the case of Front Mission, the SRAM isn't loaded in any circumstance, while for Dream Land 3, the SRAM is loaded normally with other preset IDs, just not with its official preset ID. I believe the general consensus with regards to Dream Land 3 is that it's a Canoe issue. It would appear that the developers (whether intentionally or not) simply disabled the SRAM feature for that specific preset ID.