Banner
Views: 783,809,713
Time:
11 users online:  Deeke, Green Jerry, hash, MORC, NextTactics, Pitchin Luigi, Redstonetech181,  Shiny Ninetales, Teows, xAsianjay, Xyspade - Guests: 37 - Bots: 319 Users: 41,004 (1,571 active)
Latest: Koops
Tip: Bad things to do in the title demo: Enter a door or a pipe, activate a P-switch or a star, complete the level, hit a message block, or die. These will either glitch the music, or force the player into an endlessly looping title level until they reset the game.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 2403 404 405 406 407 408 409 410 411 »
WhiteYoshiEgg, thank you once again for your help! Your explanation and the results are very helpful and achieve exactly what I am after. I reduced each entry in TileProp: by $30, and it made each tile of the urchin respect priority. I'll save this post for future reference :)
Hi

I downloaded quite a few of GHB's blocks, and a few of them use UberASM, but for some reason (maybe because those are a bit old?) they don't have any main/init/... label.
And as usual, I don't know what to put where to replace what.

For example, the 8-directional cannon blocks pack.
Link to the code

Can you help me please?

(I'd put main: instead of Cannon:, but just because that's usually where I see it)

--------------------
Super Mario Pants World by Romano338 - Playthough
Luigi's Lost Levels by Romano338 - Playthough
Baby Kaizo World by Romano338 [Cancelled] playthrough


It's because the uberasm GHB provided was written for the patch version of UberASM, rather than the tool. I believe you should just be able to change it to the tool by changing the "Cannon" label to "Main" and changing the RTS at the end to RTL.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
hey.. noob question here.
whats the purpose of that 'acts like' field in pixi cfg editor?
what it does?
Originally posted by NaroGugul
hey.. noob question here.
whats the purpose of that 'acts like' field in pixi cfg editor?
what it does?

Certain behaviours of the custom sprite depend on it, specially if it uses the default interaction with Mario. For example, if you pretend to make a stunnable-and-carryable sprite like the goomba, then you should set the act-like to the sprite number of the goomba,and so on. Sometimes the coders use directly a non-used act-like, such as 36.
Originally posted by Thomas
It's because the uberasm GHB provided was written for the patch version of UberASM, rather than the tool. I believe you should just be able to change it to the tool by changing the "Cannon" label to "Main" and changing the RTS at the end to RTL.

No more error! Thank you!

--------------------
Super Mario Pants World by Romano338 - Playthough
Luigi's Lost Levels by Romano338 - Playthough
Baby Kaizo World by Romano338 [Cancelled] playthrough
Originally posted by Darolac
Originally posted by NaroGugul
hey.. noob question here.
whats the purpose of that 'acts like' field in pixi cfg editor?
what it does?

Certain behaviours of the custom sprite depend on it, specially if it uses the default interaction with Mario. For example, if you pretend to make a stunnable-and-carryable sprite like the goomba, then you should set the act-like to the sprite number of the goomba,and so on. Sometimes the coders use directly a non-used act-like, such as 36.


i guess its just like the "act as" in map 16!?
but i dont quite get it.
For example if i make it act like goomba.. if i stun it, after some time it will shake and wake up again without having to code anything?


The "act as" value affects how routines outside the sprite itself see it. For instance, in the sprite-sprite interaction routine, an interaction between a shell and a custom sprite will check the setting to handle whether the custom sprite would jump into the shell or kick it (kicking happens if the act as setting is 02, the blue koopa).

90% of the time you can just re-implement these things into the custom sprite itself though (and you should, to give you the most control over what it does), so rather than setting a legitimate sprite to act as, pick an unused one like 36.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Originally posted by NaroGugul
Originally posted by Darolac
Originally posted by NaroGugul
hey.. noob question here.
whats the purpose of that 'acts like' field in pixi cfg editor?
what it does?

Certain behaviours of the custom sprite depend on it, specially if it uses the default interaction with Mario. For example, if you pretend to make a stunnable-and-carryable sprite like the goomba, then you should set the act-like to the sprite number of the goomba,and so on. Sometimes the coders use directly a non-used act-like, such as 36.


i guess its just like the "act as" in map 16!?
but i dont quite get it.
For example if i make it act like goomba.. if i stun it, after some time it will shake and wake up again without having to code anything?

That's correct, yes. You can toy with it a little bit, but if you don't want to code anything you will be limited to the already existing behaviours of the smw sprites.
Im trying to make a carriable sprite, but my problem is it keeps loading garbage gfx when its in carried status and even after a drop it etc..

Ive searched around, and apparently thats a common thing with custom sprites and the only answer was to move those graphics to offscreen.. which to me sounds a bit weird.. not sure if it still takes gfx slots or something..

So.. Theres any real fix for that??


** the code suggested to move the garbled gfx to offscreen was just

Code
LDA #$F0
STA $0309,y


It kinda works.. but i still get garbage gfx when turning around
Hey, *really* new to the hacking scene so apologies in advance.

I was following one of the asm tutorials here and ran into a problem. Any code I use "ruins" the rom. For example, I was putting something under level105 to always give Mario a cape in that level, but playing the edited rom just gives a black screen (on zsnes anyway). Even if I return it to the original asm code (no custom code, all "RTS") the rom won't run, effectively killing it.

I looked around for any sort of similar issues but I couldn't find anything, unfortunately. Any help would be greatly appreciated!

~Gizmo

P.S. Really sorry if this is the wrong place to post this.


Are you using the tool version of UberASM? If so, then code for it ends with an RTL rather than RTS.

Also, on an unrelated note, it's recommended that you use a different emulator than ZSNES due to accuracy issues with it (which may become important if you want to do ASM stuff). Try Snes9x (or ZMZ if you want to use it while keeping ZSNES interface), or Bizhawk.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Originally posted by Thomas
Are you using the tool version of UberASM? If so, then code for it ends with an RTL rather than RTS.

Also, on an unrelated note, it's recommended that you use a different emulator than ZSNES due to accuracy issues with it (which may become important if you want to do ASM stuff). Try Snes9x (or ZMZ if you want to use it while keeping ZSNES interface), or Bizhawk.



Thanks for the quick reply! I'll try them out now.
I'm currently trying to create a sprite that follows the movements of layer 2.
But for some reason the position of the sprite doesn't change at all and I don't really know why, because I don't often write my own sprite code.

This is the code I have right now, it's an sa-1 rom and I'm still using pixi till the swap is completly through.


Code
SpriteMainRt:
JSR SubGFX		; draw the sprite
LDA $9D			; if sprites are locked...
BNE ReturnMain		; return
LDA #$00			
%SubOffScreen()		
LDA !7FAB40,x		
AND #$08		
BEQ .NoGravity		
JSL $01802A|!BankB	
.NoGravity:		
LDA $E4,x
CLC
ADC $17BF|!Base2
STA $E4,x

LDA $D8,x
CLC
ADC $17BE|!Base2
STA $D8,x
JSL $018022|!BankB      ; Update x position, no gravity
JSL $01801A|!BankB	; Update y position, no gravity
ReturnMain:				
RTS							


I know that there are still improvements to do, like the direction of the movement, but right now I just want to see any movement (which this code doesn't do).
I would appreciate any help, since I couldn't find any sprite directly updating the sprite position for reference, they all just update the sprite speed.


Edit: nvm, I forgot to update the sprite adresses to sa-1 cause I always forget those...
Thanks anyways #tb{XD}

--------------------
My Youtube channel

Currently working on:
Project C

Finished project:
Originally posted by Gizmo3301
Originally posted by Thomas
Are you using the tool version of UberASM? If so, then code for it ends with an RTL rather than RTS.

Also, on an unrelated note, it's recommended that you use a different emulator than ZSNES due to accuracy issues with it (which may become important if you want to do ASM stuff). Try Snes9x (or ZMZ if you want to use it while keeping ZSNES interface), or Bizhawk.



Thanks for the quick reply! I'll try them out now.


Hey, back again. I redownloaded uberasm and started using asar (instead of xkas), and now I can get general patches to work. Hooray! Already got mario's lives locked to 99 which is the first thing I wanted to do, so already a good start. However, I've run into another problem:

The next thing I want to do (or try to do) is apply asm to a single level. Specifically, I want mario to always be ducking in level 105. I patched the asar_patch.asm, added LDA #$01 and STA $7E0073 under level105, applied the asar_patch.asm again and...he's still standing. At least it's not killing the rom!

Anyway, as usual any and all help is appreciated. Thank you!

tldr: added code to level_code.asm, applied asar_patch.asm and no changes were detected.


Well, in that case, simply storing to $73 won't work; it's usually cleared every frame in-between the time when levelasm runs and when Mario actually gets handled (except when in the air; you'll notice that if you jump, Mario will suddenly duck as expected).

A better way than storing to $73 would be to store the actual down-button input. For that, you would use $15. Note that this is a bitwise address, though; in order to not inadvertently clear the other input bits, you should use bitwise operations to set it:

Code
level105:
	LDA #$04	; corresponds to the bit for "down"
	TSB $15		; set that bit
	RTS

(as a sidenote though, you may want to switch from the patch version of uberasm to the tool; the tool provides additional functionality, and also all the codes in the uberasm section are meant for it)

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Originally posted by Thomas
Well, in that case, simply storing to $73 won't work; it's usually cleared every frame in-between the time when levelasm runs and when Mario actually gets handled (except when in the air; you'll notice that if you jump, Mario will suddenly duck as expected).

A better way than storing to $73 would be to store the actual down-button input. For that, you would use $15. Note that this is a bitwise address, though; in order to not inadvertently clear the other input bits, you should use bitwise operations to set it:

Code
level105:
	LDA #$04	; corresponds to the bit for "down"
	TSB $15		; set that bit
	RTS

(as a sidenote though, you may want to switch from the patch version of uberasm to the tool; the tool provides additional functionality, and also all the codes in the uberasm section are meant for it)


I downloaded the tool/pasted the code you put and they worked like a charm! Thank you so much for helping me!
I'm tweaking Ersanio's Enter level sound patch so overworld pipes also make a sound effect when you use them, and I came across a bug where Mario treats both pipes and Star Roads as proper levels, warping him either to level 0 or test levels respectively (similar to how SMB3 OW pipes work actually).

Any idea how to fix it and maybe even optimize it? Here's the code I'm currently using:

Code
HEADER
LOROM

!SFX1 = $01		;SFX used when entering Level
!Port1 = $1DFC

!SFX2 = $04		;SFX used when entering a Pipe
!Port2 = $1DF9

!base = $0000

if read1($00ffd5) == $23
	sa1rom
	!base = $6000
endif

ORG $049195
autoclean JML EnterPipe

ORG $0491E5
autoclean JML EnterLevel

freedata 

EnterPipe:		INC $0100|!base
			LDA #!SFX2
			STA.w !Port2|!base
			JML $04F9A7

EnterLevel:		INC $0100|!base
			LDA #!SFX1
			STA.w !Port1|!base
			JML $04F8A5
End:
Looks like you're restoring the hijacked code incorrectly, aren't you? The code at $049195 says STA $0100, but you're making that an INC.

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


 
Originally posted by WhiteYoshiEgg
Looks like you're restoring the hijacked code incorrectly, aren't you? The code at $049195 says STA $0100, but you're making that an INC.


Oh yeah, just checked and the code was like that in the original too...:P

Now the patch works but also happens to have the side effect of making a Star Road trigger the pipe's SFX every time the screen goes black. I've got the feeling it happens because both the pipe and star road share the same code for warping someone into somewhere else (at least according to the disassembly), which is a shame 'cause fixing it would require me writing a new code from scratch so both warps don't mess with each other, which is out of my league as far my "asm skills" go.
Pages: « 1 2403 404 405 406 407 408 409 410 411 »
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 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

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