• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Super Mario World Hacking-Lunar Magic Basics

rstar095

Baby Seal Clubber
24
Posts
15
Years
Super Mario World Hacking-Lunar Magic Basics*Updated* 8/10/10

I havent seen much mention of SMW hacking in this forum(probably because its a pokemon one) but Im bored and feel like sharing my knowledge.
Here is what you need
SNES Super mario World ROM.
Lunar Magic
Lunar Magic is a very powerful tool and is almost all you need to make a good hack. It can be found at Smwcentral.net with many other usefull tools, gfx, sprites, and hacks.

Lets begin with the Basics:
OPENING YOUR ROM
Spoiler:


Keyboard Buttons
Spoiler:


LAYERS AND SPRITES
Spoiler:


ADDING SPRITES/FOREGROUND
Spoiler:

PALETTES
Spoiler:


CHANGING BACKGROUND
Spoiler:


SCREEN EXITS
Spoiler:


SECONDARY EXITS
Spoiler:


MUSIC AND TIME
Spoiler:


IN DEPTH SPRITES
Spoiler:


IN DEPTH FOREGROUND
Spoiler:


OVERWORLD
Spoiler:


GRAPHIC EDITING
Spoiler:


MAP16
Spoiler:


Block Tool
Spoiler:


Sprite Tool
Spoiler:


MUSIC INSERTION
Spoiler:



TIPS
Spoiler:



What You Can End up With
Spoiler:








Spoiler:
 
Last edited:
19
Posts
14
Years
  • Seen Feb 10, 2013
you should try to use block tool super deluxe rather then block tool, btsd is alot better.
if you need help on the music bit, i can help out there
 

rstar095

Baby Seal Clubber
24
Posts
15
Years
Thanks, I havent used block tool super deluxe yet, I haven't been doing much with smw lately, and i already know how to add music, I just need to add it to the tut, which I can't get to right now. I'll probably update it evry 2-3 days untill I have almost everything you need to know excluding asm and hex
 
19
Posts
14
Years
  • Seen Feb 10, 2013
midis arent required when adding music, you can write it from scratch in a txt as well as use tinymm to convert a format 0 midi to an mml which you have to get fixed up, the syntax it throws out is not recognized in addmusic, the squares and channel 1 to whatever shouldnt be there, its specified most commonly like this for a channel header
#0 @0 q7f w255 v255 y10 t45.
the channel number s specified with a # and the number 0-7, the instruments are specified @0-29, this gives you 28 instruments total, 19 and 20 i think are the 2 that crash the game, either those 2 or its 20 and 21, the q7f isnt required and can be removed, same with either the w255 or v255, if you get rid of the w255, you can specify vwhatever to all the channels, a major limitation i like better then the pokemon limitations is you only get 8 channels. pokemon probably gives you more, never got it to work, and channels #4, #6, #7 all use sfx, so sfx has priority over music making the song cutout till the sfx is done, i have written a basic music tutorial that can easily be improved if i had a bigger screen to take screenshots with.
http://s1.zetaboards.com/SMW_Archives/topic/3554146/1/#new
you can read up on more in that thread.
im not the best at music porting, but i definitely have alot off the top of my head here,

now for a suggestion, hex isnt that hard, it goes on a base of 16 digits rather then the normal 10,
1=1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
A=10
B=11
C=12
D=13
E=14
F=15

and 65c816 asm i suppose can be complicated, but try to mention a little bit of asm like making a block.

using block tool super deluxe's format, which has the ability to add 3 extra offsets.

db $42
JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall : JMP Corners : JMP MarioHeadIn : JMP MarioBodyIn

MarioBelow:
MarioAbove:
MarioSide:
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
Corners:
MarioHeadIn:
MarioBodyIn:
RTL


you can use http://www.smwcentral.net/?p=map&type=ram for ram address's to load and store to using
LDA= load accumulator and STA store accumulator,

a simple example would be to make mario big using these 2 lines of code.

LDA #$01
STA $19

the ram address is 7e0019 and since 7e00 is assumed, you can either not use long addressing and cut out the 7e00 or just the 7e, up to you.

ram addresses like 0DC2, 7e is assumed,

a side note, ram addresses with flags, load value #$01 or STZ(store zero) to the flag ram address, its a no or yes question.
LDA #$01 ;always use 2 digits for the value you pick,
STA $13CE;if your storing zero, you can always do the below

STZ $13CE ; feel free to change this ram address
;to whatever, you can load and store anything

theres other important commands like
CMP or BEQ, BNE
compare branch if equal branch if not equal, when branching, you make a label for it like this

BEQ label
RTS
label:
RTL
you use a word i guess sorta like a pokemon script, add a colon on the label, write code under it, your good to go.

one more note, blocktool uses rts to end a code and btsd uses rtl to end a code
both return from a subroutine and the rtl returns form a long subroutine, btsd completely obselete block tool at this point.

generators i guess are the blocks version of sprites, if you can code a block, you can code a generator with not much else knowledge.

dcb "INIT"
RTL
dcb "MAIN"
RTL

this is the build for a sprite that hasnt been coded yet in TRASM, xkas is better, but i currently dont know much about making xkas sprites let alone patches.

generators have their code run every frame, so the init routine is left alone
dcb "INIT"
RTL
dcb "MAIN"
STZ $19
RTL

with this code, if you insert as a generator after of course making the config file, just take one form an existing generator, open it in note pad and change the whatever.asm to the name of your asm generator sprite.
the init is run once while main is run every frame, if a generator is run every frame, i bet you dont see a reason to add anything to the init routine which you must always have anyway.

LDA has an x and y counter part. same with sta and cmp
LDX CPX STX same with y, theres also the stack were you push it onto a stack and pull it later like

LDA #$01 load value 1
PHA push to stack
LDX #$02 load value 2 to x reguster
STX $19 store to ram 19 to make mario have a cape
PLA pull value 1 out back to the accumulator
STA $19 store to 19 making mario big.

i could go on for a little, but this isnt my thing to post about, its yours.
 
Back
Top