Open weierstrass1 opened 3 years ago
sd2snes does not do anything special depending on instructions; given that most commercial software also uses lots of stack operations I would be surprised if it would cause problems with your code. Maybe there is an obfuscated dependency on initialized memory or the stack pointer exceeds $2000?
Memory addesses used by the code are set up before use it also it was tested in all emulators that all starts with different data in RAM Address then shouldn't be that.
About stack pointer, that doesn't happend, the routine is not recursive and i dont use any recursive routine, also in emulators with luck the stack surpass like 40 bytes, this only fails in sd2snes. At the end i changed the code to use scratch ram address instead of stack.
I did a routine that works on all emulators but not in sd2snes, i was doing tests and could be the use of some stack commands:
For example this zone of code:
if i replace it by:
This doesn't crash instantly (the game still crash but i can play some seconds), I really don't know why this happend only in sd2snes maybe could be a bug. This works on all emulators, includes bsnes, higan, snes9x ,etc...