ColecoFan1981 Posted November 28, 2022 Share Posted November 28, 2022 Hi, Inspired by the topic in the link above, what I wish to do is to try to duplicate this 65816-based code from Super Mario All-Stars, but to make it work for a classic 6502. Here is the code in question: KillPlayer: stx Player_X_Speed phx lda #$01 sta PlayerSize jsl GetPlayerColors (jsl is a special code used in 65816 to bring up subroutines from faraway program banks) plx inx lda #DeathMusic sta EventMusicQueue lda #DeathMusic sta EventMusicQueue What I am dealing with here is a phx after stx and before lda, and a plx after sta and jsl. For 6502, to duplicate phx I might: pha txa pha Whereas for plx: pla tax pla I read that to preserve the x register, I would also: lda $0100,x ~Ben Thank you, Ben Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.