Language…
11 users online: 35TCB77, Alex No, Darolac, DentalFloss, fanfan21, fsvgm777, Fylth, jferrerfaj, JinRokhZenobi, Maw, PixelFhacks - Guests: 100 - Bots: 87
Users: 70,508 (2,454 active)
Latest user: lancejameslim

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 418
  • 419
  • 420
*sigh* Even though I'm done with A Strange Mission, I'm still having some problems with ASM. Okay, here goes...

Originally posted by RAM Map
$7E:14931 byteTimerEnd level timer. Setting to FF will end the level as a goal sphere; however, this is a timer. If your code always sets this address, then it will never end.

Setting it to 01 (even repeatly) will make it flash with ugly colors and end the level.


Looks like the last sentence is true for any non-FF value. How would I go about achieving the same effect (Player does the ending march, but for less than FF frames, preferably 20 or 30, then the screen gets black and the usual circle appears)?



On a related note, how come the screen flashes and becomes extremely bright during an overworld event (see picture below)? Is this related to ending the level with the method I'm trying to use, and if so, in which way, and how can I prevent that?




 
There is a ROM address you can edit.

Quote
CODE_01C0F9: A9 FF LDA.B #$FF
CODE_01C0FB: 8D 93 14 STA.W $1493


This is for the goal tape.
To change the value (FF is the one you need to change) in a hex editor, open it and go to xC2FA.
It is preferred that you stay beyond #$50, though. Otherwise, the colours will mess up. The switch palace stores #$08 to this address, but I don't think you wanted that ending.
I think #$51 is the fastest value you can get.
--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------
Seems like the ugly colors are related to the fade-out at the end... If the timer value isn't high enough to let the screen darken out completely, those ugly colors appear. Disabling the fade-out seemed to fix that. So yeah, thanks Roy, I guess. ;)

I'm still having this problem though:




 
Hm. That wasn't quite what I was asking for; I already knew that Mario, Yoshi, and the Podoboo use that special routine. There must be other sprites that do the same...the boss fireball, perhaps?

Well, that isn't all that important. At $00A300 in all.log is the routine that DMAs Mario's GFX, but does that also take care of the others (such as Yoshi and Podoboo)? And which VRAM address corresponds to which tile in SP1? I don't need to erase the entire routine, obviously, but I do intend to disable part of it all the time and all of it on occasion.

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

I'm working on a hack! Check it out here. Progress: 64/95 levels.

Originally posted by JeRRy86
How can i check in a patch if i stand above ANY brown block?

For some reason nobody mentioned my problem?
(sorry if this is against the rules but i need it to be able to work further)



I might put some sort of signature here once. I guess.
I don't believe you can check which block you are standing on except inside the block itself... so... by changing the Blocks code?
WYE:

Are you using HDMA channel 6 ($4360) in one of your levels?
How can I generate a random sprite from a block, specifically the SMB2 Veggie block. I tried ripping a routine from some patch, but that failed :/ Would I just JSL to the random number generator?

Edit: more specifically, how would I generate random sprites, but from a table, as i dont want junksprites being generated D:
There's multiple ways for that. One of them is to use $13, the frame counter which changes all the time:

LDA $13
LSR
AND #$07
PHX
TAX
LDA RandValues,x
PLX
STA $9E,x ; store any of the following sprites into $9e,x
JMP GenSprite ; routine that generates sprites

RandValues:
db $02,$04,$01,$03,$06,$05,$09,$08

Or if you wanted custom sprites, just store to $7FAB9E,x instead and set bit 3 of $7FAB10,x.

You can jump to SMW's random number generation routine ($01ACF9) but I never use it, so I'm not sure how that works. This post might be useful to you about it.

Also, you could use 1024's RNG, I always use and it works all the time.

In the frame counter one, would AND #$07 be the number of values in the table, -1?

Also, I decided to us 1024's code, and it works perfectly. Thanks!
Cool, glad to hear it works.

Quote
In the frame counter one, would AND #$07 be the number of values in the table, -1?

If you meant +1, yes. There are 8 bytes for AND #$07, 4 bytes for AND #$03 (they should be powers of 2 -1 since the count starts at 0).
Originally posted by Kaijyuu
WYE:

Are you using HDMA channel 6 ($4360) in one of your levels?


I don't think so... As far as I know, I'm using channels 3, 4 and 5. I might be overlooking something though, since I don't fully understand HDMA yet.


Here's the code I have:

REP #$20
LDA #$3200
STA $4330
LDA #Red
STA $4332
PHK
PLY
STY $4334
LDA #$3200
STA $4340
LDA #Green
STA $4342
STY $4344
LDA #$3200
STA $4350
LDA #Blue
STA $4352
STY $4354
SEP #$20
LDA #$38
TSB $0D9F
RTS


Also, if it matters, I'm ending the level in a room without HDMA.


 

so if that isn't possible(checking if im standing on a brown block), can i check if i stand on ANY tile?



I might put some sort of signature here once. I guess.
You could try this:
LDA $77
AND #$04
BNE InAir
<blm> zsnes users are the flatearthers of emulation
WYE: That was just a guess. I'm having the same issue in my hack, but I assumed it was because I was using channel 6 in one of my levels.


The game uses windowing so the color flashing effect you see is limited to the revealed tile. For some reason though, the HDMA that boxes it around that tile isn't working. If you find a fix, I'd be interested in hearing it because it means the problem might still exist for me too.

Originally posted by Alcaro
You could try this:
LDA $77
AND #$04
BNE InAir

Thanks.



I might put some sort of signature here once. I guess.
I'm trying to build a block that when ran at, at full speed it'd act like a coin so far I have this.

Code
db $42

JMP End : JMP End : JMP Mario : JMP End : JMP End : JMP End : JMP End
JMP End : JMP End : JMP End

Mario:
	LDA $7B
	BPL rightspeed
	EOR #$FF
	INC
	rightspeed:
	CMP #$29
	BCC notmaxspeed
	LDA #$2C
	STA $1693

notmaxspeed:
End:
	RTL


now when I make a block and make it shatter at full speed I can make it work with making the last LDA #$02 so mario keeps running but why doesn't this code work?
Try adding LDY #$00 before the STA $1693.
yeah that works I just didn't add it in because at somepoint someone told me I didn't need LDY #$00 if loading blocks on page 0 I guess they were wrong.
Does anyone know the address of Turn Block Bridge properties?
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 418
  • 419
  • 420