Thank you for trying it out!
Really neat - works fine in Fceux.
...BUT...the patched rom refuses to load in Nestopia - is this something you might want to look into?
Also, are you supposed to have to press select twice to do the actual switch?
The first time you press select - you get a preview of the character you will switch to - the next press triggers the actual switch.
Wouldn't it be faster/easier to only have to press select once?
Anyway - good work!
Hrmm, I'll have to figure out a way around that. Since I'm working with limited space (from the end of their routine where they poll buttons to the vectors at $FFFA). I may be able to find another empty space to work with though; this was just a decent chunk of unused data that was guaranteed to exist every time buttons were polled (this is a MMC3 cart, so PRG data swaps around a bit). Because of what I was working with, I was just able to fit in the following method to switch around who you would swap to next:
* Load current player character ($002B; Buster = 00, Plucky = 01, Dizzy = 10, Furball = 11)
* Increment the value by $02
* AND that value with 11 (to strip off bits that would put it over $03)
* Store the new value back at $002B
* Run the routines that swap the character in $002B with the one in $002C
I need to look at it some more. In the logic above, I didn't even have a free byte to clear the CARRY flag before adding $02 .. but I think I can clean things up a bit in case that is causing an issue. Any way, this leads to unreliable behavior if you .. I guess I could just remove the character select screen logic entirely and have it go right to the level. Then I could use the extra space created there to do more proper logic, prevent SELECT from running the swap routines outside of levels (I just tested and it looks like this will either cause visual ), etc.,
I've only tested in FCEUX for Windows and NES.emu on Android. I can check out Nestopia and see if I can find the issue there. I guess it's possible I took out some init code that FCEUX automatically corrects? I wonder if anyone is able to test this on a flash cart and see if it works there?
Something interesting to note is that they poll both controllers.. I'm going to have to see if P2's inputs are ever used, but I could overwrite that code to free up a few dozen bytes. I'm guessing it's probably just a standard 'check buttons' routine that Konami used around that time, but who knows -- maybe there's some dummied out content to find
Mz: Thank you for the tip. I checked out that editor, and I think I can use it to quickly set up new levels. The objects (powerups and enemies) aren't documented, but I should be able to suss them out and create some docs for it.