Banner
Views: 315,241,642
Time: 2014-09-30 02:53:05 PM
27 users online: altoiddealer, Aurel509, AWMonopolyMan, BigTarantula99, BlackMageMario, CidYoshi, o Everest, Falconpunch, Kazeshin, kebabchilla, Kieran Menor, o Ladida, LadiesMan217, LitDude, o Luigi-San, o mariocool1999, MarioMaster1337, MasterMario97, NGB, Prizm, reghrhre, o Sayuri, TheDarkOnyx, TheDutchLuigi, thereturnofdoritosxD, Torchkas, yoshicookiezeus - Guests: 29 - Bots: 34Users: 25,649 (1,164 active)
Latest: The.Metal.Plumber
Tip: Make a backup of your hack before using any external tools on it.
Ground pound move :O
Forum Index - SMW Hacking - General 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:

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

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


stomp:
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?
rtl

not_stomp:
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:
;1
;$01/F19E 8D E7 18 STA $18E7 [$01:18E7] A:F101 X:0007 Y:000A P:envMXdizc
;2
;$01/EBD6 9C E7 18 STZ $18E7 [$01:18E7] A:EB00 X:0007 Y:0000 P:envMXdiZc

;Powerup(?):
;$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...
Last edited on 2007-09-17 01:45:42 AM by Ersanio.
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
not_stomp:
rts ;return
to
not_stomp:
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
Last edited on 2007-09-17 02:15:03 AM by Ersanio.
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!
Last edited on 2007-09-17 06:43:45 AM by KilloZapit.
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...
Pages: « 1 »
Forum Index - SMW Hacking - General 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 - 2014 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 29

Menu

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG