Language…
19 users online: bradcomp, cletus_deletus, DanMario24YT, Domokun007, Green Jerry, GRIMMKIN, hhuxy, JezJitzu, lo fang 123, Nayfal, Nemesis1407, playagmes169, prisvag, Shomi,  shovda, sinseiga, SMW Magic, TheXander, Torchkas - Guests: 276 - Bots: 377
Users: 64,795 (2,374 active)
Latest user: mathew

Xkas Tutorial

Requested by ds777fighter.

I. What you need



II. Finding Freespace

All you need to do to find freespace is drag your rom on top of the Free Space logger executable. This will generate a text file with the addresses of your rom's freespace in both PC and SNES notation. Choose any address you want (provide there is enough space) and copy down the SNES address. Now open up the patch file in Notepad and paste the freespace address where specified.

III. Making a batch file

To make a batch file, open up Notepad and type the following:

Code
xkas patchname.asm romname.smc cls


Where patchname and romname are the name of your patch and rom, respectively. Then save it as filename.bat (filename can be whatever you want).

IV. Patching your rom

All you have to do to patch your rom is run the batch file you just made. Just note that it won't work unless it, your rom, the patch, and xkas are all in the same folder.

V. The End

And that's the end of the tutorial. I hope that this has helped you learn how to patch with Xkas, and if you have any questions, don't hesitate to ask.
I think that "cls" isn't necessary...
Fierce Deity is cool.
Workin' in OW request...
Currently attendind Scape Santa, but I don't know what to do...
how do I aply the bat file.

do I use cmd and typ xkas.exe patch bat file name rom name.smc

when I do put this line in cmd it gives me a erro

Originally posted by sonic the hackerhog
how do I aply the bat file.

do I use cmd and typ xkas.exe patch bat file name rom name.smc


You double-click on the batch file, of course.
Now with extra girl and extra hacker
when I double click it a window a pears the just cloases. I test my rom and I do not see any changes.

Im using the pound patch

dose double cliking it outomaticly patch it?

Also I see no need to point the rom to some free space....

here is my pound.asm file...

;-------------
;Ground Pound
;By Iceguy
;-------------

see? the pound.asm file already is pointed to some free space.
!Freespace = $1286B9 ;/ Freespace.
!RAM = $0660 ;\ Empty RAM for the pound flag.
!FreezeMarioTimer = $0D ;/ Time to freeze Mario in the air.
!AirSFX = $43 ;\ Sound when stomping in air..
!PoundSFX = $37 ;/ And on ground..
!GroundTimer = $28 ;\ Time to fall to ground (30 high)
!Player = $01

Header
LoROM

;-------------


org $029C09
db $20 ; Fix ground pound Y pos.
org $F60A
JML MarioDie
org $00A21B
JSL Routine
org !Freespace
!CodeSize = Ending-Routine
db "STAR"
dw !CodeSize-$01
dw !CodeSize-$01^$FFFF
Routine:
;---------------------

;LDA $0DB3
;CMP #!Player
;BNE Return
LDA $1493
BNE Clear
LDA $19 ;/
BEQ Return ;\ Doesn't work if Small Mario.
LDA $73 ;/ Or if you are ducking..
ORA $187A ;\ Or if you are on Yoshi.
BNE Return
LDA $77
AND #$04 ;/ If Mario's on the ground..
BNE CheckStomp ;\ Check for the pound flag.
LDA !RAM ;/ If the RAM is already set,
BNE Return ;\ Skip (prevent multiple button presses).
LDA $18
AND #$80 ;/ Only works if you press the X button.
BEQ Return
LDA #!AirSFX ;\ Set sound when pound activated.
STA $1DFC
STZ $7D ;/ Temporarily freeze X
STZ $7B ;\ And Y speed.
LDA #!FreezeMarioTimer
STA $18BD ;\ For a defined period of time.
LDA #$01
STA $140D ;/ Set spin jump flag...
LDA #$20
STA $149B ;\ Set palette change...
LDA #!GroundTimer
STA $7D ;/ Set speed on coming back to ground..
LDA #$01 ;\ And set the pound flag on.
STA !RAM
BRA Return

CheckStomp:
LDA !RAM ;\ If the flag hasn't been set..
BEQ Return ;/ Skip.
CMP #$FF
BEQ Clear ;\ Clear flag (for the block).
LDA $77 ;/ Skip if in air again.
AND #$04
BEQ Return
LDA #!PoundSFX ;\ Set Pound SFX...
STA $1DFC
JSL $0286BF

Clear:
STZ !RAM

Return:
LDA $16 ;\ Part of the
AND #$10 ;/ Hijacked code.
RTL

MarioDie:
STZ !RAM
LDA #$09
STA $1DFB
JML $00F60F
Ending:
----------------------------------------------------------------------
so whats wrong??????
yes, assuming xkas, your rom, and your patch are all in the same folder, and you set up the batch file correctly.
Now with extra girl and extra hacker
yes they are all in the same folder.

here is my bat file for pound

xkas pound.asm smw.smc @pause cls.

so whats wrong????

also I did not point it to free space because....in the asm file....


!Freespace = $1286B9 ITS ALLREADY POINTED TO FREE SPACE!!!!

I do not get whats going wrong.....
That looks right and if everything's in the same folder, it should be patched.
!Freespace = $1286B9 ;/ Freespace.

Not neccesarely freespace. There is a chance that it isn't freespace. You'd probably want to change it just in case.

Also I've done some renovations to his patch if you're interested. There are some bugs in there that I fixed.

You could ground pound during pause.
You could ground pound while swimming, or holding on nets.
If you ground pound in midair and land on yoshi, duck, land in water, or grab a net, then you could hold the attack with you which was odd.
If you ground pound in midair and pause then unpause when you hit the ground there is an odd delay of the smoke effects and the attack.
I own a community of TF2 servers!

ASMT - A new revolutionary ASM system, aka 65c816 ASseMbly Thing
SMWCP - SMW Central Presents a Product- tion long name

frog

http://esolangs.org/wiki/MarioLANG
Try to type ONLY this:

xkas pound.asm smw.smc
@pause

Check your patch before doing this.
Fierce Deity is cool.
Workin' in OW request...
Currently attendind Scape Santa, but I don't know what to do...
I am using the emptysmw xkas file. I did everything the tutorial says
but when I start the patched ROM on Lunar Magic, it was still the same as if I hadn't patched it. What am I doing wrong?

I typed it in like this:

xkas emptysmw.asm smw.smc

SMW rocks!
Luigi is the best.


So the program spat out nothing? As in, everything went OK?


No. The world map was still the same as if it were a normal SMW world rom. All the levels were still there like Yoshi's Island 1.
SMW rocks!
Luigi is the best.

Forgot the @pause on second line.
Fierce Deity is cool.
Workin' in OW request...
Currently attendind Scape Santa, but I don't know what to do...
That just makes CMD to wait for input before it continues. You don't need it.
Background image by Tzadkiel & Anomalin
I need some help with patching my rom with fastrom and perfect sm3 powerdown.

First of all, No txt file will open if my rom is clean and I put it in slogger(Free Space Logger, so I tried patching it with xkas gui(2.2.3) and I do get a txt file, I run it in zsnes and... it doesnt run.

second thing is I input the "xkas patchname.asm romname.smc cls" code into a notepad file and tried to save as a batch file, no batch file savetype was found. So I saved it as a txt file and tried to change it to a bat file through renaming it. and I try running, not suprisingly I get jack.

...did you say that you tried running the text file in ZSNES? You are supposed to open it in Notepad, as it contains a list of the freespace locations in your ROM.

Also, you can get a .bat file by choosing "All Files" from the Save As dialog in Notepad and saving the file as [insert name here].bat.
My YouTube channel
Get the official ASMT resource pack here!

I didnt run a txt file in zsnes I ran the newly patched rom in zsnes, which didnt run.

And I made the batch file which now runs and starts but it still deosnt seem to be working, I ran the smb3 powerdown patch through the steps double clicked it and I got squat when I ran the rom in zsnes afterwords.
ok i really nees help with this.... the patch i wanna use is Rcar.asm it looks like this in the notepad:

;CHANGE THIS ADDRESS TO A FREE SECTION OF THE ROM!
!freeSpace = $178000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

macro RATS_start(id)
db "STAR"
dw RATS_Endcode<id>-RATS_Startcode<id>
dw RATS_Endcode<id>-RATS_Startcode<id>^#$FFFF
RATS_Startcode<id>:
endmacro

macro RATS_end(id)
RATS_Endcode<id>:
endmacro

lorom
header

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;Disable L/R scrolling
org $00CDF6
BRA lrSkip

org $00CE49
lrSkip:

;Hijack the status bar routine
org $008F49
JSL NewRoutine

org !freeSpace
%RATS_start(0)

NewRoutine:
LDA $18
AND #$20
BNE buttonL
LDA $18
AND #$10
BEQ Return
LDA $17
AND #$20
BNE Return

LDA $0DB3
BEQ ToLuigi

LDA #$00
STA $0DB3
LDA #$30
STA $0EF9
LDA #$31
STA $0EFA
LDA #$32
STA $0EFB
LDA #$33
STA $0EFC
LDA #$34
STA $0EFD
BRA Return

ToLuigi:

LDA #$01
STA $0DB3
LDA #$40
STA $0EF9
LDA #$41
STA $0EFA
LDA #$42
STA $0EFB
LDA #$43
STA $0EFC
LDA #$44
STA $0EFD

BRA Return
buttonL:
LDA $17
AND #$10
BNE Return

;INSERT L BUTTON CODE HERE
;Use "BRA Return" instead of RTL

Return:
LDA $0DBE
INC A
RTL

%RATS_end(0)

so what is it im gonna copy and paste in to this?
YouTube <-- Let's Plays and stuff.
^ Made by Tahixham
Ignoring the posts, drag the ROM to the bat file.