View Single Post
Old August 12th, 2010 (2:31 PM).
omegazeroINFI's Avatar
omegazeroINFI omegazeroINFI is offline
Join Date: Sep 2009
Gender: Male
Posts: 19
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.
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,

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


you can use 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
compare branch if equal branch if not equal, when branching, you make a label for it like this

BEQ label
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"
dcb "MAIN"

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"
dcb "MAIN"
STZ $19

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.

i need some scripthelp, music help, and some images editing help. because one. i have vista. two. dont have photoshop and gimp doesnt seem to work.
three. because i got imagination. four. i can do pretty much everything else cept pallette editing.
Reply With Quote