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 - What file(s) of Block Inserter's do I edit to Program my own Custom Blocks?
  
User name:
Password:
Reply:
 

UserPost
Escherial
Posts: 21/90
It doesn't really matter, but the convention is .bin (you're going to specify the exact filename when you create a profile for the block in Block Inserter, anyway *shrug*).

There are quite a few compilers out there, some more mediocre than others. I still haven't found one that I'm totally happy with, but SNASM will do the trick, more or less.
Atma X
Posts: 291/801
Ok, I think I gave the wrong idea, I need to know what file extention to save the newly created file as (the one containing my customly writen ASM)

BTW: What do I use to compile it?
Escherial
Posts: 20/90
It's not just a matter of editing files; you actually need to write some assembly to be inserted into the ROM.

Essentially, the block inserter takes in files that contain blocks of assembly and inserts them into the ROM as well as modifies the ROM to look to the newly inserted code when the block is activated in-game. So, to make new blocks, you're going to have to write some code, compile it to a file, and create a profile for the new block in Block Inserter so that it knows where to find this new chunk of assembly (your file) to stick into the ROM.

From there, you use it as usual.
Atma X
Posts: 290/801
I guess I'll just randomly try editing some files, and hope that I find the right one.
HyperLamer
Posts: 855/8210
I'm a little confused myself. The only reason I can see that you might need to change the address is if you did a JSR to nearby code, in which case you don't know where your code's going to be anyway, so it wouldn't make much sense to do so.
Smallhacker
Posts: 183/2273
Originally posted by Atma X
Thanks BMF.
Now, does anyone know which Block Inserter file's' (which file extention) to edit so I can start programming my own Custom Blocks?


1: Program in ASM
2: Compile
3: Renamed compiled data into .bin
4: Add to Block Inserter
Atma X
Posts: 268/801
Thanks BMF.
Now, does anyone know which Block Inserter file's' (which file extention) to edit so I can start programming my own Custom Blocks?
BMF98567
Posts: 212/1261
JMP: Jump. Jumps to the specified address.
JSR: Jump to Subroutine. This pushes the address of the next instruction onto the stack and then jumps to the specified address. You can then use RTS (Return from Subroutine) to return to the address that was pushed onto the stack.
JSL: Just to Subroutine Long. Just like JSR, but uses a 24-bit address, allowing you to jump pretty much anywhere in ROM or RAM. Use RTL (Return from Subroutine Long) instead of RTS with this.
Atma X
Posts: 266/801
What does JMP, JSR, and JSL Stand for?
BTW: I'm just starting to learn ASM, so I'll probably need the Actual Words that the Abbreviations stand for (at least for a little while).

Also, I figured that Block Inserter would be a good place to start messing around with stuff, since it's more in my area of interest, and so I don't have to figure out where to place the Code in the Rom, since Block Tool will do it for me (I don't mean to ask a stupid question, but do you think this would be a good place for a beginner [like myself] to start?)
BMF98567
Posts: 210/1261
Reloc Offsets only need to be used if you have JMPs or JSRs within your block code (for more complex, multi-function blocks). Block Inserter is capable of redirecting these jumps to point to the correct address after the block is inserted (since, obviously, a jump to $20F isn't going to point to the same location inside the ROM). A Reloc Offset simply points to the first byte of the address in a JSL/JMP instruction. Try examining the Reloc Offsets for some of the pre-made blocks to see how they work for yourself.
Atma X
Posts: 263/801
Also, how do I know what to Set the Reloc Offset to (In Block Inserter itself) when my Custom Block is done? Should I assume that it's usually going to be -1, since most Blocks use that number, or should I just use -1 as the Reloc Offset until I know how to make more Complex Blocks? Because it seems that the more Complex Blocks are usually the one's to use different numbers (and more than one number).
Acmlm's Board - I2 Archive - Super Mario World hacking - What file(s) of Block Inserter's do I edit to Program my own Custom Blocks?


ABII


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



Page rendered in 0.003 seconds.