| Official Hex/ASM/Etc. Help Thread |
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread |
|
|
|
|
| Posted on 2008-08-08 07:46:18 PM |
Link | Quote |
|
i have a few more questions:
1 if im running the status bar routine and i have it JSL to another subroutine without addinga JSL back to it, will it still work?
2 what is the if mario is on yoshi flag
3 using LR Hook, i want to have it have yoshi spit out the fireballs he does when he spits out a red shell. Ive looked in both maps but i couldnt find the subroutine. Help?
|
|
| Posted on 2008-08-08 10:44:01 PM |
Link | Quote |
|
Originally posted by GuYoNfIr31 if im running the status bar routine and i have it JSL to another subroutine without addinga JSL back to it, will it still work?
You shouldn't unless you wanna fuck up your code. When you uses RTL it will return back to where you JSL'd.
Originally posted by GuYoNfIr32 what is the if mario is on yoshi flag
Taken from RAM map:
| $7E:187A | 1 byte | Yoshi | Riding Yoshi Flag (0=No, 1 or 2=Yes) |
Can't help you with 3, sorry.
|
| Last edited on 2008-08-08 10:44:22 PM by Boingboingsplat. |
|
| Posted on 2008-08-08 11:06:04 PM |
Link | Quote |
|
looking thorugh the maps again i found this
0F46A $01:F26A Unknown Misc. Code that makes Yoshi spit out flames when he has the red shell in his mouth
im guessing i would JSL to $00F26A right?
|
|
| Posted on 2008-08-12 11:36:15 AM |
Link | Quote |
|
Originally posted by GuYoNfIr3looking thorugh the maps again i found this
0F46A $01:F26A Unknown Misc. Code that makes Yoshi spit out flames when he has the red shell in his mouth
im guessing i would JSL to $00F26A right?
You need to JSL to $01F26A, NOT to $00F26A. I guess you made a typo.
|
| Last edited on 2008-08-12 11:39:07 AM by Ersanio. |
|
| Posted on 2008-08-12 02:04:11 PM |
Link | Quote |
|
|
oh wow that was a stupid mistake
|
|
| Posted on 2008-08-12 03:18:43 PM |
Link | Quote |
|
|
There is any way to change a .bin file back to .asm?
|
|
| Posted on 2008-08-14 07:45:36 AM |
Link | Quote |
|
Hey all, just wondering if someone can help me make heads or tails of this ram map entry:
$7E:1F56 Sprite Palette/GFX High byte table - (Tile#Hi - 2) + 2 * (palette# -8)
Its pretty cryptic to me. I can't make sense of it.
I'd like to be able to change the palette of my sprite based on certain conditions.
Also, if anyone can tell me how to check if the current sprite is being hit with a cape or fireball, that would be rad!
Thanks for any replies!
|
| Last edited on 2008-08-14 07:51:16 AM by 2566. |
|
| Posted on 2008-08-14 08:12:11 AM |
Link | Quote |
|
It's actually at $15F6.
In binary it's laid out like:
----ccct
Just the lower 4 bits of the yxppccct. It's not forced onto the palette of the sprite tiles, that's all up to you. It's just a .cfg editable store for palette and page #.
|
|
| Posted on 2008-08-14 08:26:55 AM |
Link | Quote |
|
|
@smkdan: so, changing the ccc- won't have any effect? How would I go about forcing a new pallete onto my sprite's tiles then? I'm out of ideas. Is there something I'm totally overlooking? Trying to wade through the gfx part of the sprites asm make my brain hurt. X(
|
|
| Posted on 2008-08-14 08:44:46 AM |
Link | Quote |
|
|
What is written to $0303,y (normally in GFX routine) is what dictates the yxppccct of the sprite tile, but $15F6 is typically placed in there.
|
|
| Posted on 2008-08-14 10:31:32 AM |
Link | Quote |
|
Awesome, I think I've got it all worked out. Now to just twiddle some bits to find the right palette.
Thanks again, smkdan! You won't even recognize your pionpi by the time I'm done with him! ^_^
I guess now for my second question: how do I know if a sprite has been hit with a cape or fireball? Anyone?
Edit: k, nevermind, I got the cape collision detection routine working. Still looking for a fireball collision routine. Any ideas?
|
| Last edited on 2008-08-14 12:02:02 PM by 2566. |
|
| Posted on 2008-08-14 01:43:23 PM |
Link | Quote |
|
|
Whats the address to check if mario is in the air?
|
|
| Posted on 2008-08-14 03:22:22 PM |
Link | Quote |
|
Aiyo: would checking marios y speed help?
E: unless it chages when he's on a vertically moving platform that is. Nevermind.
E2: while I'm throwing stupid ideas out here, how does the value at address $0077 work? It looks to me like the D portion of xxxxUDLR would be set if mario were standing. Yeah?
|
| Last edited on 2008-08-14 03:35:51 PM by 2566. |
|
| Posted on 2008-08-14 05:07:14 PM |
Link | Quote |
|
|
its alright, i got smalls to help. It was $77 and you would have to "AND #$04"
|
|
| Posted on 2008-08-15 08:31:40 AM |
Link | Quote |
|
I was looking for a substitute to flutter jump in my hack, and decided to replace spinjump with a move that people who have roleplayed will remember...
Code
PHP ;Push the registers onto the stack to preserve their values.
PHA ;Since there is no opcode I know of that pushes the X
TXA ;register onto the stack, I transfer them to the accumulator
PHA ;first, then I push it onto the stack.
LDA $1900 ;I'm using the star counter to hold the player's 'stamina' for moves like this.
BEQ end ;Skip if we're out
TAX ;Move it to the X register
DEX
STX $1900 ;Update star counter
LDA $#F0 ;Negative value so that the player gets a lift
STA $007D ;Update player's Y speed
end: PLA
TAX
PLA
PLP
RTS ;return to where we called it
...Would this code work?
|
|
| Posted on 2008-08-15 02:14:44 PM |
Link | Quote |
|
Not absolutely sure if this goes here, but I'll give it a shot. I'm having trouble finding the hex address for ledge-dwelling Monty Mole and Peach (I don't want either of them using Palette 8 especially since I changed the palette for the player.) and their addresses are nowhere to be found in the ROM map.
Any help please?
|
|
| Posted on 2008-08-16 04:36:27 PM |
Link | Quote |
|
|
How can i disassemble sprites?
|
|
| Posted on 2008-08-18 09:19:44 PM |
Link | Quote |
|
Where is the status bar routine? Or is it a collection of routines? I searched the rom map, but can't seem to find it. And, where's the best spot to stick a jsr to hijack it?
E: and what the heck are the reloc offsets in blocktool all about?
|
| Last edited on 2008-08-18 10:11:18 PM by 2566. |
|
| Posted on 2008-08-19 01:44:52 AM |
Link | Quote |
|
Examine the LR Hook patch by Smallhacker for more info about the status bar, it hijacks the status bar routine. Edit: Listen to aiyo instead, her explanation seems better.
Reloc offsets in blocktool are used if you want to use jmp or jsr in your custom block code. I suggest not doing that.
|
| Last edited on 2008-08-19 01:54:20 AM by Alcaro. |
|
| Posted on 2008-08-19 01:52:09 AM |
Link | Quote |
|
Originally posted by Blue RabbitWhere is the status bar routine? Or is it a collection of routines? I searched the rom map, but can't seem to find it. And, where's the best spot to stick a jsr to hijack it?
E: and what the heck are the reloc offsets in blocktool all about?
hijacking the status bar routine is easy(this includes the basic form for an xkas patch):
Code
header
lorom
org $008F49 ;hijack status bar routine
JSL new_routine
org !free_space
so basically just org to $008F49. But make sure before you end your code you restore the status bar. so if you use that make sure you code ends like this..or some form of it.
Code
return:
lda $0dbe
inc
rtl(or rts)
|
|
|
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread |