So I have this subroutine I got from another sprite on this website. This one.https://www.smwcentral.net/?p=section&a=details&id=5748 But I have a problem with the subroutine I got from it. In one emulator that's a fusion of ZSNES and some other emulator It works as it should but in the other two emulators I have it only outputs 4 fucking directions!!!
I have no idea why the hell this shit is happening. here's the code if you guys were curious.
I have no idea why the hell this shit is happening. here's the code if you guys were curious.
Code
I don't why it would work on one emulator but not the others but whatever..... If you guys could either fix it up or give me something new that would be great! Also the other emulators that it doesn't work on are BizHawk and the original ZSNES.GET_ANGLE: REP #$20 LDY #$00 LDA $02 SEC SBC $06 BPL GET_ANGLE2 INY EOR #$FFFF INC A GET_ANGLE2: STA $02 LDA $00 SEC SBC $04 BPL GET_ANGLE3 INY INY EOR #$FFFF INC A GET_ANGLE3: STA $00 STY $04 BEQ GET_ANGLE7 CMP #$0100 XBA ROR A XBA TAY LDA $02 BEQ GET_ANGLE9 CMP #$0100 XBA ROR A AND #$FF80 STA $4204 STY $4206 LDA $4214 LSR A LSR A LSR A LSR A CMP #$0100 SEP #$20 BCC GET_ANGLE4 LDA #$FF GET_ANGLE4: TAY LDA ATANTABLE,y LSR $04 BCS GET_ANGLE5 EOR #$FF INC A BEQ GET_ANGLE5 INC $01 GET_ANGLE5: LSR $04 BCS GET_ANGLE6 EOR #$FF INC A BNE GET_ANGLE6 INC $01 GET_ANGLE6: STA $00 LDA #$FE TRB $01 RTS GET_ANGLE7: SEP #$20 LDY #$00 LSR $04 BCS GET_ANGLE8 INY GET_ANGLE8: STY $01 LDA #$80 STA $00 LDY #$FF RTS GET_ANGLE9: SEP #$20 STZ $00 LDY #$00 LDA $04 AND #$02 BNE GET_ANGLE10 INY GET_ANGLE10: STY $01 LDY #$00 RTS