Language…
3 users online: EvilGuy0613, Sweetdude, underway - Guests: 61 - Bots: 163
Users: 67,633 (2,000 active)
Latest user: mittenfitz

Emulator Specific(?) Issue with ASM code; Any ideas?

I have an issue where one of my sprites I wrote doesn't work on certain emulators, however I can't figure out why. Specifically it's broken on Bizhawk as far as I know. Problem is, the issue was found by moderation, and I can't recreate the glitch myself. Figured id post the code here to see if anyone can spot anything specifically weird that might cause this. It's not using SA-1. There's also a bit of weird empty ram use (18C5, 18C7, etc) because I'm not the best at ASM. I also suspect this might be the root cause of the problem, thought 18C5 - 18CC clear on level load so not sure.

You can see the problem in this livestream around this point:

https://www.twitch.tv/videos/957274750?t=1h9m39s

The sprite isn't exactly just a sprite either, it's a combination of a sprites and UberASM. The UberASM spawns the sprites, and the sprites basically just do their thing. I'll post the code to both.

Here is the sprite code (some things omitted for brevity):

Arrow.asm (the sprite representing the arrows):
https://pastebin.com/mptUkhxE


And this is stepmania.asm, the UberASM code for the level:
https://pastebin.com/DGS4BdtS


Unsure if it's the cause, but, in arrow.asm, your CheckForHit routine can seemingly return in either 8-bit or 16-bit:

Code
CheckForHit:			; enters this routine in 8-bit
    ; Check for kepress
    LDY $C2,x
    LDA Keys,y
    STA $00
    LDA $16
    AND $00
    BEQ Return			; returns in 8-bit
    ;
    LDA $14D4,x
	XBA
	LDA $D8,x
    REP #$20			; changes to 16-bit
    CMP #$0070
    BPL Return			; returns in 16-bit


Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer