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] | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
cpubasic13
17 years old now. Time to buy some M rated games by myself!
Level: 54

Posts: 982/1346
EXP: 1206934
For next: 26936

Since: 03-15-04
From: Blame my parents, Eddy

Since last post: 2 days
Last activity: 1 day
Posted on 04-30-05 09:11 PM Link | Quote
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?
ExKeeper

Bullet Bill
Level: 31

Posts: 253/512
EXP: 180084
For next: 5279

Since: 03-05-05
From: Riiight ^

Since last post: 1 day
Last activity: 6 hours
Posted on 04-30-05 10:52 PM Link | Quote
it is probably an ASM error
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 689/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 04-30-05 11:09 PM Link | Quote
@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

Bullet Bill
Level: 31

Posts: 256/512
EXP: 180084
For next: 5279

Since: 03-05-05
From: Riiight ^

Since last post: 1 day
Last activity: 6 hours
Posted on 04-30-05 11:33 PM Link | Quote
do you have the latest version of blk tool?
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 833/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 05-01-05 12:56 AM Link | Quote
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.


(edited by BMF3PO on 04-30-05 07:56 AM)
cpubasic13
17 years old now. Time to buy some M rated games by myself!
Level: 54

Posts: 984/1346
EXP: 1206934
For next: 26936

Since: 03-15-04
From: Blame my parents, Eddy

Since last post: 2 days
Last activity: 1 day
Posted on 05-01-05 08:23 AM Link | Quote
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?
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 499/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 05-01-05 08:53 AM Link | Quote
unfortunately, you'd need to do custom ASM with man y reloc offsets and other tidbits. Maximally complicated for a custom block.
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 836/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 05-01-05 01:09 PM Link | Quote
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.
Graviteh

Level: 31

Posts: 56/500
EXP: 165989
For next: 19374

Since: 03-27-05
From: The Internet

Since last post: 42 days
Last activity: 1 day
Posted on 05-01-05 06:50 PM Link | Quote
smwedit, giving advice has no requirements. Unfortunately, you do not meet those requirements.

Referring to your first reply here.
Juggling Joker

Boomerang Brother
SMW Hacking Moderator
Yeah, JAMH is still being worked on.
Level: 48

Posts: 791/1033
EXP: 811447
For next: 12096

Since: 03-15-04
From: Wyoming

Since last post: 2 days
Last activity: 3 hours
Posted on 05-01-05 07:47 PM Link | Quote
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.
cpubasic13
17 years old now. Time to buy some M rated games by myself!
Level: 54

Posts: 988/1346
EXP: 1206934
For next: 26936

Since: 03-15-04
From: Blame my parents, Eddy

Since last post: 2 days
Last activity: 1 day
Posted on 05-02-05 08:04 AM Link | Quote
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...
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
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.037 seconds.