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 - compiling custom blocks w/SNASM | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
rubixcuber

Red Goomba
Level: 12

Posts: 1/46
EXP: 6125
For next: 1796

Since: 10-13-04
From: St. Louis, MO USA

Since last post: 331 days
Last activity: 293 days
Posted on 10-14-04 07:45 AM Link | Quote
I've been trying to add a new custom block using blocktool but am unsure about the proper method. I wrote a simple asm file that adds 5 to the players y speed and compiled it using snasm, then I created a new block in blocktool and used the file produced by snasm as it's file and inserted it. When trying to start the rom, the screen is completely blank and only the music remains. Something I was confused about was setting the org value. Snasm refused to compile without setting a value, and i set the value to $8000. Does the code for the blocks need some kind or return statement or does block tool handle all of the encapsulation? Any help is appreciated.

-edit-
I noticed that the output from snasm is way too large, and i think it's putting in a header or something, is there something I need to be doing to stop this?


(edited by rubixcuber on 10-13-04 10:52 PM)
(edited by rubixcuber on 10-13-04 10:53 PM)
blackhole89

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

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

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

Since last post: 14 hours
Last activity: 12 hours
Posted on 10-14-04 02:09 PM Link | Quote
Argh. ORG $8000 is there because of the 65c816's reset vector (aka interrupt 0) and means that your code is put after 8000h in the output. For compiling custom blocks you should set ORG to 0, thus placing the code at the file's beginning and keeping your blocks' ROM bank undamaged. You should receive a file which is about 20 bytes in size.
Custom block routines have afaik to be terminated with an RTS statement (return from subroutine/short return). Try to prevent SNASM OF writing any kind of headers. And feed your blocktool's DB entries with the correct action pointers (-1 if you don't want anything to happen on this event), e.g. hit from above: 0, hit from the left: -1, hit from the right: -1, ...

~Blacky.
rubixcuber

Red Goomba
Level: 12

Posts: 2/46
EXP: 6125
For next: 1796

Since: 10-13-04
From: St. Louis, MO USA

Since last post: 331 days
Last activity: 293 days
Posted on 10-15-04 10:04 AM Link | Quote
thanks, got it to work
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - compiling custom blocks w/SNASM | |


ABII


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



Page rendered in 0.040 seconds.