I found a shop block (mushroom)in an old thread which works with the
6-digit-counter I added to my rom. the problem is there is something
wrong with the amount of coins spend for the mushroom - it chances
(sometimes 20, 30, 10).
could someone help me please? (I don't know much about ASM)
is it possible to change the sold item (flower, 1-up)?
if you were me, you would not prefer being you
6-digit-counter I added to my rom. the problem is there is something
wrong with the amount of coins spend for the mushroom - it chances
(sometimes 20, 30, 10).
could someone help me please? (I don't know much about ASM)
is it possible to change the sold item (flower, 1-up)?
Code
;6 coin shop block - Spigmike ;Standard Shop Block ;Mushroom JMP HitBottom : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return HitBottom: REP #$20 ;Set accumulator to 16-bit LDA $0F34 ;Load Coins CMP #$0009 ;Compare to cost-1 BCS Enough ;Branch if the player has enough coins SEP #$20 ;\ LDY #$01 LDA #$30 STA $1693 RTL ;/If they don't, exit block and set accumulator back to 8-bit Enough: SEP #$20 ;set accumulator to 8-bit LDA $0DBC ;\See if there's already a mushroom in the item box CMP #$01 ;/ BEQ Return REP #$20 ;set accumulator to 16-bit again LDA $0F34 ;Load Coins SEC ;\ SBC #$000A ;| Subtract 10 coins and store STA $0F34 ;/ SEP #$20 ;set accumulator back to 8-bit LDA #$01 ;Load mushroom sprite number STA $0DC2 ;Store it in mario's item box Return: LDY #$01 LDA #$30 STA $1693 RTL
if you were me, you would not prefer being you