Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - Custom Block Problems [ASM]
  
User name:
Password:
Reply:
 

UserPost
cpubasic13
Posts: 988/1346
Originally posted by BMF3PO
Actually, it's not that complicated at all. This is the easiest, non-streamlined way to do it, but I'll leave the coding up to you, cpubasic.

1. Create a new block that loads the on/off switch flag ($14AF) and branches 14 (#$0E) bytes if the flag is not zero (switch is "on"). Save under whatever filename you choose.
2. Open 1wayl.bin, copy its contents, and paste them at the end of this new file. Repeat with 1wayr.bin.

How it works: if the switch is ON, the code will branch and execute jonwil's original 1-way Block Right code. If OFF, no branch will occur, and the 1-way Block Left code will be executed instead.


...never would have come up with that... thanks a bunch, BMF.

Anyway, the only block so far that I made is an earthquake block that changes to the next tile when touched... and it causes a little earthquake! That will be great for adding a cave level and then an auto scroll part... or something...
Juggling Joker
Posts: 791/1033
Graviteh, it is almost as useless to completely reiterate what someone else (and a local moderator to boot) has already said just 3 or 4 posts before your own.

Referring to your first reply here.
Graviteh
Posts: 56/500
smwedit, giving advice has no requirements. Unfortunately, you do not meet those requirements.

Referring to your first reply here.
BMF98567
Posts: 836/1261
Actually, it's not that complicated at all. This is the easiest, non-streamlined way to do it, but I'll leave the coding up to you, cpubasic.

1. Create a new block that loads the on/off switch flag ($14AF) and branches 14 (#$0E) bytes if the flag is not zero (switch is "on"). Save under whatever filename you choose.
2. Open 1wayl.bin, copy its contents, and paste them at the end of this new file. Repeat with 1wayr.bin.

How it works: if the switch is ON, the code will branch and execute jonwil's original 1-way Block Right code. If OFF, no branch will occur, and the 1-way Block Left code will be executed instead.
Sukasa
Posts: 499/1981
unfortunately, you'd need to do custom ASM with man y reloc offsets and other tidbits. Maximally complicated for a custom block.
cpubasic13
Posts: 984/1346
Originally posted by BMF3PO
Ack! No! You don't write directly to the SPC registers in SMW. There is a set of RAM addresses that do the work for you, at $1DF9-$1DFC. I can't recall which ones do which, though it should be in the archived memory locations thread from the old board. I'm pretty certain $1DFB is for music.


You're so close, but it is $1DFC.

Ok, so a little working around with Blocktool, I found out what the problem is: I accedently had the wrong .bin file selected. I had a different test .bin file in the same folder as Blocktool (not inserted) and I was editing that instead of the... actual... file...

Now I feel pretty stupid.

But now I get the understanding of a few commands in ASM. I just need an ASM guide so I can learn some more commands (the only real things I know are LDA and STA) and am able to actually add some really nice ASM hacks.

Another question: Let's say I just want a block to let Mario go through it through the left but not the right. When the on switch is active, it makes Mario go through the right but not the left. How would I go about doing this?
BMF98567
Posts: 833/1261
smwedit, if you don't even know what the heck you're talking about, please don't bother replying.
Originally posted by Darth Mole
Are you sure you got the right offset to write the sound byte to (it should be $214x)?
Ack! No! You don't write directly to the SPC registers in SMW. There is a set of RAM addresses that do the work for you, at $1DF9-$1DFC. I can't recall which ones do which, though it should be in the archived memory locations thread from the old board. I'm pretty certain $1DFB is for music.
ExKeeper
Posts: 256/512
do you have the latest version of blk tool?
blackhole89
Posts: 689/971
@smwedit, your reply was entirely pointless. ;;;

Well, your code seems pretty much ok... Are you sure you got the right offset to write the sound byte to (it should be $214x)? And, have you filled in the table in blocktool properly? (that means, all offsets at either 0 or -1, no reloc offsets whatsoever, ...)

One more idea what you could have done wrong... have you written the adress down as big-endian? It should be like A9 xx 8D 4x 21 60, means, the highest byte last.

For me to be able to tell more, you should post a screenshot of your blocktool setup for this one.
ExKeeper
Posts: 253/512
it is probably an ASM error
cpubasic13
Posts: 982/1346
So recently I have been trying to make a custom block or two so I can at least put some of my ASM knowledge to work in some way...

However, when making a block just make a simple sound, the rom freezes. Here is just a simple code that I use.

A9 xx 8D yy yy 60 (I don't remember what the values are (on a different computer) so xx is the sound and yy yy is the RAM offset for loading up the sound)

Now, I save it into a .bin file, change the necessary things in Blocktool to add the block in it, and then saved the block into a SMW rom.

I test, and... it freezes. I don't understand why, as I also test another block that has a very similar routine work like that.

So here is the question: How am I supposed to properly insert a custom block without any glitches? I just want to start out with a block that mmakes a coin sound. Any help?
Acmlm's Board - I2 Archive - Super Mario World hacking - Custom Block Problems [ASM]


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.003 seconds.