Language…
11 users online: anonimzwx, DanMario24YT, howardadam1126, iamtheratio, JPhanto, kurtistrydiz, playagmes169, Rhubarb44230, Saela, TheOrangeToad,  YouFailMe - Guests: 282 - Bots: 340
Users: 64,795 (2,378 active)
Latest user: mathew

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 418
  • 419
  • 420
im asking about this issue because im trying to mimic the settings i have in a "static" level, but with the added hdma wave effect.

so at the "static" level if i set $40 to 24 it looks the way i want with translucency

but when i add the wave effect it loses its translucency. Ive tried almost every value from 00 to ff and its always opaque.

ive played around a bit with $2121/$2122 but unfortunately that doesnt seem to do anything (its originally set to 11 and FF i think)

so im not sure if its possible to have layer 2 translucency with hdma effect on it.

edit. now ive seen the updated ram adresses.. will give it a try
My bad, the correct addresses are $212C/$212D. lol I corrected my previous post.
MK2TDS
they doesnt do anything either #tb{:(}
If you're using a FG gradient effect, setting these addresses before the HDMA code will have no effect, as the HDMA code also writes to them. But doing so after the code will likely mess up with the effect. It's the only thing I can think of for it to not working.

If you're only using parallax/wave effect, however, it's supposed to work...
MK2TDS
you are right.
ive removed the fg gradient and it worked.

so i guess i cant have both effects at the same time with the translucency thing!?
You could have translucency if I'm not wrong, but the FG effect wouldn't look quite right. So yep, it's best considering this as a "it's one or another" answer.
MK2TDS
So I'm trying to install Multiple Midway Points and I'm getting stuck on... something. I install the patch, use the included sram table (modified to bwram for SA-1), and while it certainly changes my midway points, it just changes them to something arbitrary. The level I'm testing this with (10A) has both its natural midway and secondary midway moved to level 134, rather than being in 10A and secondary exit 10B as I set it to. Any idea what I could be doing wrong?

For reference, both the natural and secondary midway end up pointing to level 134's secondary midway in the table instead, and modifying it does modify where I go (but is obviously not helpful as both midways are going to the same place....)
I seem to have a problem making a code run every frame in uberasm.
What I've been trying to accomplish is, make it so when a certain thing is triggered in the level, it will set some ram addres, then some code inside the level main code will run. No matter how I go about this I can't get it right.
Any tips on how to do that?


It would help to see the code in question, to see what you're doing.

Assuming the address is fixed, you would want to set it in your block and then in levelasm just check if it's non-zero. If you are indeed doing that correctly, it's possible either A) you're writing back over the address before it gets used (e.g. clearing it at some point) or B) if it's a timer from SMW, it's decrementing to 0 before it gets used in LevelASM (e.g. if you're treating it like a flag and setting it to just 1).

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Also, some addresses in the ram map listed as freeram are used by tools and patches, so it could be getting overwritten by something.
So, I was writing a reply and in the middle of the text I realized what was wrong. I can't believe it was so simple yet it took me a whole day to realize it.

It was supposed to be a code that would trigger a ground-shake when X Ram was set.

Code
MAIN:
	LDA $79		;free RAM
	BEQ Skip	;skip if not set

	LDA #$7F
	STA $1887
	
	Skip:
	RTL

I was keeping track of it in the Hex Editor and everything was working properly, except the actual shake routine would never trigger even if it's timer was set. What confused me even more was that when I manually poked 00:1887, it would trigger normally.
Sometime after, I've put $79 and $1887 to watch and realized $79 was never cleared after it was set (it was supposed to be cleared by another block). Simply adding STZ $79 at the end of the code did the trick.
Thanks for the replies!
Hey guys, so right now I'm attempting to make my custom sprite inanimate when it first appears on screen (INIT) and when it touches the ground, it will start its animation all the way through, even if it's sent falling again, it will still animate. This is similar to how some enemies behave in SMW when you put them in the air, like Red Koopa and Rex, to name a few.

Basically, I managed to figure out how to make my sprite behave this way, but I wanted to find out if there was a more efficient way to pull this off since I believe my method will use a lot of bytes...

Here is the code if you want to review it.

Keep in mind of how I'm using $1602,x and $03. And be aware of my comments to see what I was trying to go for.
My YouTube Channel
Best SMW Hacks Compilation
how do i prevent baby yoshi from eating a bullet bill?

ive tried setting bullet bill´s
$1686,x to #$99
-inedible (1)
-Dont interact with other sprites (8)
-Dont change direction if touched (10)
-Dont interact with objects (80)

but baby yoshi is still able to eat it
#smw{o_O?}


Baby Yoshi is a bit weird in how it handles that. It actually does check $1686, for either bit 0 or bit 1. However, if the sprite's ID is less than 1D (the hopping flame, for original sprites), $1686 is ignored entirely and there's no way to prevent the Yoshi from eating it.
(it does that so both Yoshi and baby Yoshi can eat shells, but baby Yoshi can't eat P-switches even though adult Yoshi can)

Now, I'm not quite sure if Spritetool/PIXI does anything to that routine, but probably not. So your options are, try inserting your sprite under an ID greater than 1D, or edit the routine checking this ($02EA4E through $02EA81) to fix that for custom sprites.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Is there a way to disable a sprite (sprite 14 falling spiny) interaction with water without disabling buoyancy?


For some sprites, clearing $164A every frame will work, although you'll want to disable the water splash from appearing every frame by either the bit in $166E or setting $1FE2 (although that one has some other uses that may not be preferred).

If that doesn't work, though, you'll just have to mess with the sprite position update routine at $019032, specifically $019035 through $019074 (just hijack the start of it and make a special case for Y; 0 = not in water, 1 = in water).

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Ive made this custom block clearing $164A like you said and it worked.

the water splash only appears when it reach the ground, so ive left it the way it is

Code
; Act as 2
db $37

JMP DoNothing : JMP DoNothing : JMP DoNothing
JMP IgnoreWater : JMP IgnoreWater
JMP DoNothing : JMP DoNothing
JMP DoNothing : JMP DoNothing : JMP DoNothing
JMP DoNothing : JMP DoNothing

IgnoreWater:
	LDA $9E,x				; \ If the sprite's type is equal to #$14...
	CMP #$14				; |
	BNE DoNothing				; /
	
	STZ $164A,x				;Sprite is in liquid indicator table. #$00 = Sprite not in liquid; #$01 = Sprite in water; #$80 = Sprite in lava.

DoNothing:					; > --------
RTL


thank you
I am making my first custom block ever. It is supposed to works like a conveyor belt, increasing Mario's X position on the screen by 1 per frame. But something is not working:

Code
db $42

jmp MarioBelow : jmp MarioAbove : jmp MarioSide
jmp SpriteV : jmp SpriteH : jmp MarioCape : jmp MarioFireball
jmp TopCorner : jmp BodyInside : jmp HeadInside

MarioAbove:
inc $7E
rtl

MarioBelow:
MarioSide:
SpriteV:
SpriteH:
MarioCape:
MarioFireball:
TopCorner:
BodyInside:
HeadInside:
rtl
Are you sure you want to increase Mario's position on the screen instead of $9A, his actual position?

Edit: And another problem is that $9A is a 16-bit value, meaning that you need to switch to 16-bit mode ("REP #$20" at the beginning, "SEP #$20" at the end), else Mario teleports foreward or backwards if he hits the screen border.
It looks like this code (meant to disable IRQ during levels) glitches up mode 7 boss battles. I've tried branching to .defaultIRQ if there's a mode 7 battle going on right now, but that changed nothing - in fact, it looks like that code isn't even run during them.

Can anyone more familiar with interrupts and registers help me investigate and/or fix this?

Code
org $008292
	autoclean JML IRQHack

freecode
IRQHack:
        PHB : PHK : PLB
	LDX.w $0100
        LDA.w .allowedModes,x
        BNE .disableIRQ

.defaultIRQ
        PLB
        LDY #$00
        LDA.w $4211
        JML $008297

.disableIRQ
        PLB
        LDY.b #$E0
        LDA.w $4211
        STY.w $4209
        STZ.w $420A
        LDA.w $0DAE
        STA.w $2100
        LDA.w $0D9F
        STA.w $420C
        JML $008394

.allowedModes
        db $00,$00,$00,$00,$00,$00,$00,$00
        db $00,$00,$00,$01,$00,$00,$00,$01
        db $00,$00,$01,$01,$01,$01,$00,$00
        db $00,$00,$00,$00,$00


 


 
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 418
  • 419
  • 420