Banner
Views: 854,284,443
Time:
8 users online: ForthRightMC, Helloworld,  KevinM, MecchaSugoiTntn, MiracleWater, obersteiner86, Wariuzzo, WhiteYoshiEgg - Guests: 29 - Bots: 62 Users: 47,147 (2,480 active)
Latest: Jardeson
Tip: Don't place Yoshi coins near a goal post because they keep glowing when a level fades out.Not logged in.
Official Hex/ASM/Etc. Help Thread
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread
Pages: « 1 298 99 100 101 102412 413 »
I have a question. When you use HDMA do you have to load the table to the RAM or do you just use the address of it in the Rom? Any help appreciated!
Quick question: Can I somehow locate the ExAnimation slots from Lunar Magic in ASM? I'd like to turn on/off certain animations when specific conditions are met without being limited to 8 slots. (ON/OFF Switch/POW Switch)
I think this is a hex question:

Basically I wanted to disable the mushroom horizontal movement by doing this:

08FC4 - $01:8DC4 - 2 bytes - ASM
"Set to EA EA to disable mushroom horizontal movement"

but when I do that, my other sprites also have disabled horizontal movement, hopping flame, hopping goombas etc.

I decided to switch it back, but now when I place a mushroom/1up on the scenery, it simply moves back and forth, rather than staying put like it does in the original.

Can someone help me with this, I just want my mushrooms to be stationary, but still have horizontal moving sprites.

--------------------
Creator of:
Super Mario: Buried Treasure
The Haunt
Jigsaw's Test
KC- I have the same problem too, my 1-ups won't stay stationary either. I think it was after I edited a sprite in tweaker, but I don't know. I hope you can that problem fixed.

Anyway, I need some info on the Item Box. I want to know how to edit the Y position of where the item comes down after hitting select. Also, certain sprites (ones that don't belong in the Box) comes down in a normal state unlike the Mushroom/fire/cape/star. I would like to edit that to make all sprites in the box come down in the same state as the Mushroom/fire/cape/star, but that won't really be important If I can get the first problem solved.

As always thanks in advance.
Originally posted by Kc
I think this is a hex question:

Basically I wanted to disable the mushroom horizontal movement by doing this:

08FC4 - $01:8DC4 - 2 bytes - ASM
"Set to EA EA to disable mushroom horizontal movement"

but when I do that, my other sprites also have disabled horizontal movement, hopping flame, hopping goombas etc.

Can someone help me with this, I just want my mushrooms to be stationary, but still have horizontal moving sprites.


I did some digging and was able to make a patch that will fix that.

EDIT: I heard the patch may "yield garbage." I saw no evidence of this, but make sure to back up your rom and keep it that way until I can be sure, I suppose...

BB Link:
I did some resarch and it looks like the Ypos is a value located at $028060 (That's not PC. Use Lunar address to convert it for hex editing.). Technically, it's an offset, but it'll get the job done I believe. The larger the number, the farther down on the screen.
As for making all sprites fall in that state, that's a little dangerous. Some sprites do not enjoy being stunned and it'll really screw up how they act.
And I assume you mean falling slowly and flashing. Well, that part is not a universal routine you can go to for all sprites. You won't want to do that.
I need some ASM help. I'm trying to make a block that displays a level message, then ends the level. I've got this code:

Code
LDA #$01        ;could be #$01 or #$02
STA $1426       ;message block RAM
LDA #$FF
STA $1493       ;end level RAM (goal sphere function)
RTS


However, when I pass through the block, the message shows up repeatedly several times before the end level flag is actually activated. What do I need to add to this code to make sure the level message only shows up once?
@Hailstorm: In your situation, I'd probably do something like this;

Code
LDA $1426 ;if the "end walk" timer isn't zero..
BNE return ;return
LDA #$01 ;could be #$01 or #$02
STA $1426 ;message block RAM
LDA #$FF
STA $1493 ;end level RAM (goal sphere function)
return:
RTS


It checks Mario's "end walk" timer, and if it ISN'T zero, it will do nothing..Of course, if that doesn't work, you could use your original code and add 3 extra lines, like;
LDA #$01
STA $9C
JSL $00BEB0

..Which will destroy the block upon contact, preventing it from reactivating a second time.



Thanks for helping, but neither of the codes seemed to work. The first one didn't change anything; the message still showed up repeatedly, and the second one prevented the message from showing up at all.

But just out of curiosity, what does JSL even mean? I don't know that much ASM.
Originally posted by Hailstorm

But just out of curiosity, what does JSL even mean? I don't know that much ASM.


Jump to Subroutine Long

EDIT: I have a problem with a level. I made a custom death routine that shoots you into the sky, teleporting you to the winged yoshi bonus area.
My problem is: when you enter the area, you are supposed to start at the top of the screen so Mario will be invisible to the player, but you end up falling onscreen. Here is a picture of my level.

http://img91.imageshack.us/img91/9585/heaven.png

Thanks in advance!
I am a GFX maniac to say the least, however, I know of a sprite I would like to improve... well, the GFX at least.

It is the Roto-Disc, unlike the one on SMB3... the Roto-disc for SMW doesn't leave a ghostly trail behind it... I was wondering if I could change that, so the question comes up: How?
Originally posted by 1024
Originally posted by andy_k_250
I'm looking for an address that controls the palette of the Cape Feather while it is in the Item Box. I tried a simple Tweaker edit of the palette, but this apparently only affects the sprite while it is active. In any event, for some reason, the Cape Feather keeps its default palette while stored in the Item Box. Any help would be great. Thanks!


The (palette-8)*2 for the feather is at $008E05 or x1005.

At $008E02 (x1002), the mushroom palette is stored and in between them is the other item box sprite palettes in the same order as in the Lunar Magic add sprites list.

There also is 0x30 (the rest of the YXPPCCCT format) that is ORA'd in from the routine that handles the sprite. You can find that value at $0090B8 or x12B8.

There is also the alternative of using the ItemFix patch in the patches section which you can use to edit the palette and tile for any sprite number including ones not originally supported.


Would you (or anyone else) be willing to explain how I edit that table in the itemfix.asm? I don't know how the data is stored. Most specifically, I need to switch the palette used by regular Goombas from A to C.

--------------------

[?] Miscellaneous Helpful Hints
If I moderated your hack, there was apparently a 90 percent chance it was rejected.
I would also need this info. I remapped the P-balloon GFX so it shows up in any stage (SP2), now I just need to remap its GFX in the ItemBox.

My main question is where in Hex would I be able to disable pitching Chuck jump throw. If Mario is high, he'll jump and throw a baseball. I want to disable that.

Thanks in a advance, and also thanks Maxx for the Y-pos of the ItemBox info.
Originally posted by andy_k_250
Would you (or anyone else) be willing to explain how I edit that table in the itemfix.asm? I don't know how the data is stored. Most specifically, I need to switch the palette used by regular Goombas from A to C.


The first entry is for sprite 73 and then the rest count up from there. I have commented the first sprite number for each row in the code below. Sprite 73 doesn't get released and its GFX entry is disabled. That means you can't use the Super Koopa with Feather.

Each entry is a "word" with four hex digits. The first two digits are the YXPPCCCT properties and the last two digits are the tile number.

If you wanted to change the feather you would find its sprite number, which is 77. then you would at the first line, as the sprite number is near 73. Counting up you would wind $240E as the entry. That means the sprite is using tile $0E. The $24 means --P--C-- of the YXPPCCCT format is used. In this case you should always have only the first priority (P) bit set, but not the other. You can set the X or Y bits to flip the tile if necessary. Of the CCC bits the middle one is set, which means it is sprite palette 2 (add 8 to get the LM pallete 0xA.) Set the T bit to one if the sprite is on the second page.

Code
dw $0000,$6824,$2A26,$2448,$240E,$6A24,$2AAE,$265C ; 73 (73 does not work)
dw $0000,$218A,$21E4,$28E8,$6024,$60EC,$2825,$21E4 ; 7B
dw $602A,$602A,$0000,$658C,$2060,$0000,$0000,$6BC2 ; 83
dw $25C5,$25AB,$239D,$0000,$2B80,$2B81,$2B0A,$0000 ; 8B
dw $0000,$2B4B,$0000,$0000,$0000,$0000,$0000,$6580 ; 93
dw $2746,$2240,$27A0,$23EA,$2382,$2BC8,$2D46,$6B40 ; 9B
dw $23A2,$21AA,$250A,$250C,$254A,$25A0,$0000,$6DA6 ; A3
dw $678A,$A14A,$214A,$6D64,$23C8,$2FAA,$202E,$61E0 ; AB
dw $6933,$236E,$252A,$A9AC,$2BE4,$6BE4,$66C0,$2BC4 ; B3
dw $23CC,$6330,$6686,$6BAE,$61C7,$6385,$2240,$6BA2 ; BB
dw $6D86,$2360,$29D6,$2D80,$6824,$282A,$0000,$0000 ; C3
dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 ; CB
dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 ; D3
dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 ; DB
dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 ; E3
dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 ; EB
dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 ; F3
dw $0000,$0000,$0000,$0000,$0000,$6AC8,$68C8,$66E0 ; FB
dw $64C8,$6A94,$6894,$6694,$6494,$6A92,$6A92,$2892 ; 03
dw $2892,$6492,$23CC,$20EB,$64AA,$64A8,$6D80,$0000 ; 0B
dw $6982,$6980,$2567,$0000,$2488,$6567,$0000,$28AC ; 13
dw $618A,$62A6,$258E,$0000,$27A4,$2788,$24E8,$2B17 ; 1B
dw $2917,$6B17,$6917,$238E,$23A2,$2D81,$2900,$0000 ; 23
dw $25DC,$0000,$0000,$698C,$2A2A,$6F82,$6FAA,$6F64 ; 2B
dw $25AC,$654A,$2B02,$0000,$6F8C,$6D6A,$6DED,$27C4 ; 33
dw $27C6,$27C8,$678C,$0000,$65E8,$63C2,$67E2,$6788 ; 3B
dw $27CE,$6380,$20E8,$0000,$2567,$6DC4,$2BA4,$6B8C ; 43
dw $6BEC,$2440,$6184,$2186,$28AE,$28AE,$29A7,$61EB ; 4B
dw $0000,$0000,$23EA,$2385,$23EB,$2386,$2040,$2040 ; 53
dw $2161,$21EB,$2BCB,$2BCC,$21A2,$2B00,$23E2,$2160 ; 5B
dw $0000,$21DE,$238E,$A38E,$236C,$25C8,$0000,$2060 ; 63
dw $0000,$0000,$202E,$6FC0,$6FAA,$258A,$0000,$0000 ; 6B
I almost got it, but I don't quite understand the YXPPCCCT format. Can I get some info on that? I just need to switch the P-Balloon ItemBox GFX page to 1 and i'll be set.

I still need to know where in Hex would I be able to disable pitching Chuck jump throw. If Mario is high, he'll jump and throw a baseball. I want to disable that.
Originally posted by B.B.Link
I almost got it, but I don't quite understand the YXPPCCCT format. Can I get some info on that? I just need to switch the P-Balloon ItemBox GFX page to 1 and i'll be set.

I still need to know where in Hex would I be able to disable pitching Chuck jump throw. If Mario is high, he'll jump and throw a baseball. I want to disable that.


Well, YXPPCCCT is the binary format in which some data for SMW is stored.

YX = the X/Y flipping of the sprite
PP = layer priority
CCC = palette
T = graphics page

What you end up with is an 8-digit number of ones and zeroes.

In this case, you need to change the P-Balloons T value. The P-Balloon is sprite 7D. It's in the second table row, which starts with 7B, so it is the third value into that row - $21E4.

The E4 in $21E4 is the tile number that the P-Balloon uses by default. Depending on where you put the sprite in your first graphics page, you may need to change this value.

The 21 in $21E4 is the hex conversion of whatever the P-Balloon's binary YXPPCCCT value is. Open Calculator on your computer (viewing Scientific mode) and switch to hex. Type in 21. Then switch to binary. You should see: 100001.

This isn't a complete YXPPCCCT value though - it only has six numbers, and you need eight. The calculator automatically erases any zeroes before the first 1, so to make a long story short, your true YXPPCCCT value for 21 is 00100001.

So:

YX | PP | CCC | T
00 10 000 1


To change the graphics page, you need to change the last one into a zero, to get 00100000. Put this into the calculator again (as binary) and then change to hex. You should get 20. Therefore, you would edit $21E4 to be $20E4.

If, say, you needed to change the palette, palettes (CCC) are stored as follows:

000 = Palette 8
001 = Palette 9
010 = Palette A
011 = Palette B
100 = Palette C
101 = Palette D
110 = Palette E
111 = Palette F

You just plug the appropriate three-digit code into your YXPPCCCT value (along with any other changes) and then convert.

I hope that helps!

Mod edit: Added a <pre> tag so it'll look nicer.

--------------------

[?] Miscellaneous Helpful Hints
If I moderated your hack, there was apparently a 90 percent chance it was rejected.
How can I make a Shyguy rideable and carryable or rideable, carryable, and stay on ledges? And having the same for Snifits except stay on ledges. One last help, I can't find the GFX format in the .asm of the mushroomblock [the updated one(in the custom sprite section, "SMB2 Updated Sprites")].
i want some help on how to let the player carry items above it's head, just like sonikku did. thanks if you help me!
  
  
 



I have a question about custom blocks... I know the routines to make them disappear or shatter, but is there any way to have it work with sprites rather than Mario? Right now, if a sprite touches a block set to shatter, it destroys the block right under Mario instead of the one it should. I'm not going to be picky; any way to have a sprite-destroyable block is perfectly fine, but I can't seem to find any way to do it.

Edit: Found a workaround for this, but it's pretty limited. I don't need this as urgently as before, but a better way would still be appreciated...


 
 
       

Fluffy video games by me and Raibys!
 
 
   
 
 
I need help with the graphics routine of a sprite.
I want the sprite to flip X every frame, like the classic Goomba, but my ASM is still pretty limited, so I don't know what I have to change/add to the GFX routine. Could someone help me with that?
Here is my current GFX routine:
Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite graphics routine
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

TILEMAP             dcb $8A,$8A
PROPERTIES		dcb $00,$40

SUB_GFX     JSR GET_DRAW_INFO       ; sets y = OAM offset
                    LDA $157C,x             ; \ $02 = direction
                    STA $02                 ; / 
                    LDA $14                 ; \ 
                    LSR A                   ;  |
                    LSR A                   ;  |
                    LSR A                   ;  |
                    CLC                     ;  |
                    ADC $15E9               ;  |
                    AND #$01                ;  |
                    STA $03                 ;  | $03 = index to frame start (0 or 1)
                    PHX                     ; /
                    
                    LDA $14C8,x
                    CMP #$02
                    BNE LOOP_START_2
                    STZ $03
                    LDA $15F6,x
                    ORA #$80
                    STA $15F6,x

LOOP_START_2	    LDA $00                 ; \ tile x position = sprite x location ($00)
                    STA $0300,y             ; /

                    LDA $01                 ; \ tile y position = sprite y location ($01)
                    STA $0301,y             ; /


                    LDA $15F6,x             ; tile properties xyppccct, format
                    LDX $02                 ; \ if direction == 0...
                    ;BNE NO_FLIP             ;  |
                    ORA PROPERTIES,x                ; /    ...flip tile
NO_FLIP             ORA $64                 ; add in tile priority of level
                    STA $0303,y             ; store tile properties

                    LDX $03                 ; \ store tile
                    LDA TILEMAP,x           ;  |
                    STA $0302,y             ; /

                    INY                     ; \ increase index to sprite tile map ($300)...
                    INY                     ;  |    ...we wrote 1 16x16 tile...
                    INY                     ;  |    ...sprite OAM is 8x8...
                    INY                     ; /    ...so increment 4 times


                    PLX                     ; pull, X = sprite index
                    LDY #$02                ; \ 460 = 2 (all 16x16 tiles)
                    LDA #$00                ;  | A = (number of tiles drawn - 1)
                    JSL $01B7B3             ; / don't draw if offscreen
                    RTS                     ; return
@RealLink: I think that changing the
Code
LDA $157C,x ; \ $02 = direction 

part just at the start of the routine into

Code
LDA $14 ;load timer
;insert some LSRs here for slower flipping
;each one halves the frequency
AND #$01 ;timer modulus 1

and uncommenting (removing the semicolon before) the

Code
BNE NO_FLIP

a bit above the NO_FLIP label should have the effect you want.
Pages: « 1 298 99 100 101 102412 413 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread

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

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


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy