Originally posted by HuFlungDuThat's... Interesting. So the readfile name has to be static, correct? It can't be passed in? Are you just not comfortable enough coding in a modern language to create a more robust utility? If that is the case, would you mind sending me the patch when you are done with it, so I can create a more versatile script that can do the same thing?
Actually, it's the incbin offsets that are static. You can't use math on the start and end offsets directly, but you can indirectly by using the #= operator on a define. The problem is that asar resolves the equation in decimal when incbin expects hexadecimal offsets. So, I had to write a macro that would convert the decimal result back into hexadecimal and in a way where asar would think I'm using static offsets on the incbin.
Also, yeah, I don't have much programming knowledge outside of SNES ASM, but I did learn a bit of batch file scripting out of necessity due to how my SMW hack is being handled. The overworld extractor started off as a batch script meant for my hack, but I turned it into an asar patch so that it would be easier for me to maintain. However, all the batch script was was a script that generated asar patches that extracted overworld data and would be auto applied to a ROM defined in the script. Anyway, if you'd like to make a more versatile script for me, you can. The patch isn't quite finished yet though, but I'll PM you once it is (and after FuSoYa sees it).
Originally posted by FuSoYaHmm, looks interesting but seems like this one might be better off as a separate patch people can configure and apply themselves.
I disagree. This is one of those things that'd be a lot easier to use if you can see what you're doing in addition to the fact that there would be less of a chance for something to go wrong. Even if I made the patch more user friendly and set it up in a way to reduce the chances of Mario not making it to the end position, there is still the issue of the player needing to reapply the patch if they move Mario (both due to the end position not being updated and because of the hijack conflict, although I probably could find a different spot for the hijack). If this was in Lunar Magic, then all the intro march related positions would be updated every time you move Mario so that no issues would arise.
Ultimately, it's up to you if you want to implement this. But, if it was implemented, maybe it would work by allowing the user to set the direction Mario moves, whether Mario is swimming, and how many half tiles Mario's start position is shifted away from the end location and the intro march start position would display as a transparent Mario facing towards the end position? Perhaps LM would disable the intro march by default like it already does, but it could be re-enabled through an overworld menu.
Originally posted by FuSoYaYeah this one's never been much of a priority since all the autosave does is just make it so you don't have to see the intro message again if you end up getting a game over before the first choice to save.
Yeah, this is a fairly minor thing compared to other things, but still. While the average hack might not be hurt by this bug too badly, keep in mind that not every hack uses the same/similar intro screen. The intro in a hack could be a cutscene (either by VWF ASM or a series of rooms or whatever), a kaizo trap that takes many tries to get past, or even a full blown level. Depending on how long the intro is and the difficulty of getting to the first save point, the time spent getting back into the game after each game over could potentially add up.
Also, I pretty much already gave you the fix for this issue with the intro march patch. All you have to do is modify the hijack LM inserts to disable the intro march so that it puts a NOP and a JSL to the save routine, and is inserted 2 bytes earlier into the ROM. Alternatively, put a JSL to some new code that sets up the stack so that it can JML safely to the save routine JSL in the intro march routine if you'd prefer LM's code to not JSL directly to the save routine for whatever reason. Optionally, you could also add an option that lets one disable the JSL so that one can have the current behavior if they desire.
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Strange Quest V1.3 /
V1.3.1 Beta 4.6
Mario & Yoshi's Strange Quests (2/10/2023 Build)
Other stuff:
My SMW/SMAS/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.