Views: 575,632,515
Time: 2017-10-20 11:40:00 PM
17 users online: Amomario123w, Conal the Snowman, DarkBOO!m, David, :spookyboy:, Green Jerry, Nate "British" Spidgewood, 2sp00ky4me, K I A T U S, Baka, MarcStar Hacks, NaroGugul, NovaSquirrel, Fidget Spinner, SHEBANG, hi, anime sucks - Guests: 50 - Bots: 160Users: 32,735 (1,338 active)
Latest: SilasTheWise
Tip: Make a backup of your hack before using any external tools on it.Not logged in.
Ground pound move :O
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Ground pound move :O
Pages: « 1 »
I am trying to code a ground pound move (My very first attempt for coding-from-scratch)
However, I have a problem...
When I patch the rom with Xkas, nothing happens in the game
the code:

org $E844 ;$20:E844
JSL in_air
;;;;;;;;stomp ground;;;;;;;;;
org $648A30 ;The place where the code will be assembled

lda $0077 ;player status (air/ground stuff) 0!=in air
bne stomp ;jump to stomp routine
beq not_stomp ;jump to not-stomp routine

lda #$01
sta $18E7 ;Yoshi ground stomp flag
lda $0077 ;Player Position Status
cmp #$01 ;When in air...
bne not_stomp ;
lda #$02
sta $0015 ;controller data 1, which value is down?
lda #$02
sta $0016 ;controller data 1 one frame, which value is down?
lda #$02
sta $0017 ;controller data 2, which value is down?
lda #$02
sta $0018 ;controller data 2 ONE FRAME, which value is down?

rts ;return

;additional information
;Yoshi stomps ground status:
;read breakpoint:
;$00/EF87 AD E7 18 LDA $18E7 [$00:18E7] A:0024 X:0000 Y:0000 P:envMXdizC
;Write breakpoint:
;$01/F19E 8D E7 18 STA $18E7 [$01:18E7] A:F101 X:0007 Y:000A P:envMXdizc
;$01/EBD6 9C E7 18 STZ $18E7 [$01:18E7] A:EB00 X:0007 Y:0000 P:envMXdiZc

;$00/D156 E6 19 INC $19 [$00:0019] A:D100 X:0000 Y:0000 P:envMXdiZc ;grow
;$00/F600 64 19 STZ $19 [$00:0019] A:2501 X:0006 Y:0004 P:envMXdizc ;shrink
;$00/D156 E6 19 INC $19 [$00:0019] A:D100 X:0000 Y:0000 P:envMXdiZc ;grow
;$01/C5F9 85 19 STA $19 [$00:0019] A:C503 X:000B Y:0005 P:envMXdizc ;fire get
;$01/C59A 85 19 STA $19 [$00:0019] A:C502 X:0003 Y:000F P:envMXdizc ;feather/cape get
;$00/D0B6 64 19 STZ $19 [$00:0019] A:D0B6 X:0000 Y:0000 P:envMXdiZc ;rest in peace get

I think this code doesnt make any sense, but could someone help me what is wrong with it?
And remember, this is just my VERY FIRST ASM code...
Layout by Counterfeit.
RTS and RTL are not interchangable. It'll crash because JSL puts a 24bit return address on the stack and RTS only pulls 16bits (PB is unchanged). So, that probably means the test for 'bne stomp' always passes or else it'll run into the RTS.

Also, if you tested $77 first, why do you test it again in 'stomp:?

I can't speak for the game variables.
I changed
rts ;return
rtl ;return
and I removed this place:
lda $0077 ;Player Position Status
cmp #$01 ;When in air...
bne not_stomp ;
But It still doesnt work because I cant find the controller data, when you press down. Any tips how I can find it? :O
Layout by Counterfeit.
I beleave the controller data bytes are bitfields... I did a test with the snes9x debugger and it looks like down is bit 3! or 2 if the first one is 0 I guess. (Value of A when not pressed: $0200 when down pressed $0204)

Edit: oops I forgot, the byte order is switched form how I am used to so it's really bit 10/9!

Your layout has been removed.
why are you writing to the contoller data? shouldn't you be checking it insted, also, setting the Yoshi's ground pound flag will just change nothing if Mario isn't riding yoshi
Hmm, so actually the ground pound doesnt work at all...
Someone may close this if he/she want, since it wont work...
Layout by Counterfeit.
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Ground pound move :O

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2017 - SMW Central
Legal Information - Privacy Policy - Link To Us

Total queries: 23


Follow Us On

  • Facebook
  • Twitter
  • YouTube


  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • MFGG
  • Gaming Reinvented