Language…
13 users online: anonimzwx, Dennsen86,  Donut, ForthRightMC, Fozymandias, hhuxy, oliver1, playagmes169, RichardDS90,  Segment1Zone2, steelsburg, tOaO, zAce08xZ - Guests: 278 - Bots: 305
Users: 64,795 (2,375 active)
Latest user: mathew

EasyP - patching's never been easier [Big Update V1.1]

  • Pages:
  • 1
  • 2

EasyP

patching's never been easier
DOWNLOAD




I get the feeling I'm making too many tools...
Anyway. before you go and post "We don't need" please read the whole thing (I've had this discussion with Vitor already).
Also, this is the first release, please tell me about any errors if you encounter one.
Also, backup your ROM. Even if errors occur during the usage of this tool, your ROM should remain unedited but backing up is never wrong

In a Nutshell:
EasyP is a GUI based tool, which uses xkas/asar to patch. The aim of this tool is:
- to make patching easier (and thus more appealing for beginers)
- to make it more organized (as it keeps a list of all inserted patches as well as the addresses and the size of changes).
- to make removing off single patches a simple task.

Alcaro's asar already makes pathing a whole lot easier. However, it doesn't change the fact, that (as of September 2013) less then 7% of all the patches hosted at this site or for asar... which concludes, that still more than 93% are for xkas.
This tool is especially meant to easen the task of using xkas. It calculates the size of the patch, looks for freespace in your ROM, set's the freespace and then patches it.
After having setup the xkas patch once, you never have to edit it (set freespace by hand) again.


Offnote: this tool only differes between hijacks and freespaces. Simply said, everything that isn't inserted into freespace, is viewed as a hijack...



Don't Use:
A word of warning. There are a few things (patches) you should entrust EasyP with just yet. (It's being worked on)
Those are patches which need 0x8000 bytes or more (that's 32kb) per one freespace (like Ladida's 32x32 player patch)
Or patches using macros (or other shenanigans) for determing the freepsace (like p4plus2's uberASM)
Please note though, that EasP has an option, that allows for patching "without EasyP" which basicly just measn it will call the assamblers and just insert the patch. It won't calculate the sizes or set freespace for xkas patches. It's save to use this methode for ANY patch. Just make you you've set up everything necessary yourself.



Requirement:

- Windows operationg system
- .NET Framework 4.0 or higher installed
- A clean SMW-ROM
- Lunar Expand by FuSoYa
- Asar by Alcaro
- xkas by Romi, byuu
- Slogger by smkdan

the later 4 are included in the download



Setup / How to use:
  • Use Lunar Expand on the clean ROM and change it's size to 64 MBit (8 MB).
    Lunar Expand is now no longer needed.

  • Rename the ROM to "clean.smc", case sensitive

  • Dragdrop clean.smc on slogger.exe, it should create a file called "clean.txt"
    It should look exaxtly like compare.txt which came along with the download.
    If they look alike, (that is, that they both start at 0x108000 and end at 0x6F8000
    (excluding the ones with (!) at the end) and the all have a size of 0x8000

  • If so, both, clean.txt and Compare.txt are no longer needed.

  • Make sure that the following are in one folder:
    • EasyP.exe
    • asar.exe
    • xkas.exe
    • slogger.exe
    • clean.smc
    • asar (folder)
    • xkas (folder)


  • Move the patch you want to install into the respective folder (depending on which assambler
    they were made for).
    Even if asar is capable of inserting xkas patches, please DO NOT put xkas patches into the asar
    folder, as patches in the asar foder do not search for freespace and other horrible things.

  • Open EasyP.exe, go to File - Open ROM, search for your ROM (which doesn't need to be in the same
    directory) and either doubleclick on the patch in the list to the right, or go to the menu
    Patch - Apply Patch after selecting one.

  • After opening your ROM, the tool will inform you, that it created a file called <ROMname>.pdb
    This file keeps track of all the patches you have inserted. Deleting it will not cause failure but it will make you unable to remove the patches with EasyP



Preparing xkas patches:

Patches which don't require freespace can be inserted without doing anything.
For patches which need freespace however, you need to tell EasyP where said freespace is. The line in the patch that is, not the address.
You use:
Code
;@freespace_blw

Place this above the "ORG $xxxxxx" line where you usually put the freespace. The address that is written behind the ORG now no longer matters.
In case the patch uses a definition instead of a direct ORG like this:
Code
!Freespace = $xxxxx
	.
ORG !Freespace

You put the command line above the definition, like this:
Code
;@freespace_blw
!Freespace = $xxxxx
	.
ORG !Freespace


Have a few examples:
DOING IT RIGHT

Code
;@freespace_blw
!Freespace = $xxxxx

;@freespace_blw
ORG $xxxxxx
	NOP #4
	.
	.
	.
ORG !Freespace
	NOP #10

ORG $xxxxxx	;Hijack, no freespace
	JSL Mycode
DOING IT WRONG

Code
!Freespace = $xxxxx

;@freespace_blw
			;don't put anything between
			;the command and the actuall line.
ORG $xxxxxx		
	NOP #4
	.
	.
	.
;@freespace_blw
ORG !Freespace  	;Command at definition
	NOP #10 	;not at the ORG

ORG $xxxxxx		;Hijack, no freespace
	JSL Mycode



HEX-Editor:

I implemented a simeple hex-editor. If you're gonna ask me why... then probably because I was bored + curious if I could do it.
Anyway, the hex-editor also keeps track of any changes you do. Also you can search for places in the ROM using both, the PC offset and the SNES address.




Mulitpatch Files

EasyP has an implemented system, which allows the usage of Multipatch files. Those are files which make EasyP patch more than one file in one go. It's also possible to use these for patches which require other files to be in the same folder as xkas/asar.

To make a Multipatch file, just create a new .asm file in either the xkas or asar folder (depending on which assambler should be used for all the patches listed in the file). Name the file whatever you want.
Now in the file add this to the first line:

Code
@multipatch

This will tell EasyP, that you're using a multipatch file
duh...
.
Next you need to tell it, which files you want to import and which patches to patch.
We use @files for the files and @patchlist for the patches.
below the command you write the patch to the file you want to import or the patch you want to apply.

As an example, here is how I wrote the Multipatch file for the Seperate Luigi Graphics Patch
First I created a new folder in the xkas folder called Seperate Luigi(the patch uses xkas, though it doesn't matter where the files are)
I exctracted the downloaded files into the folder. It now had thses files in it:


Next I created the file "Seperate_Luigi.asm" in the xkas folder.
this is what the file looks like:

Code
@multipatch

@patchlist
.\xkas\Seperate Luigi\luigi.asm

@files
.\xkas\Seperate Luigi\Luigi.bin
.\xkas\Seperate Luigi\Mario.bin


Now, if you open EasyP.exe and open a ROM with it, you'll see Seperate_Luigi in the xkas list. Just patch it and it will do the rest.

NOTES OR IMPORTANCE:
In the example, I used a relative path, that means it starts with .\ and the compiler replaces that with the path for EasyP.exe.
It's more efficient to use those, as you can move the EasyP folder without changing the files, though you can also use am abslotue path like "C:\Users\<Username>\Desktop\EasyP\xkas\Seperate Luigi\luigi.asm

It also doesn't matter in which order you use the @file and @patchlist command. You don't even need to use the @files command. However, it's necessary to have at least one patch in a multipatch file (what good would it do, without patching anything?)

The programm copies the files you list in the EasyP folder and the patches either in the xkas or asar folder (depending on where the multipatch.asm is) if you already have a file by the same name in there, they could be overwritten (you'll be asked).

DOWNLOAD
This will ease asar patching 100 times more.
Awesome. I don't think there has been any good patching GUI tools since Xkas GUI maybe.
Amazing. I hope the Hexeditor you made will be good :D I guess you use ctrl+g again to search correctly :)
Nice work #ab{:)}. Hopefully it would work flawlessly so I am wishing for no serious bugs.
Thanks everyone for your positive feetback

Originally posted by Everest
Nice work #ab{:)}. Hopefully it would work flawlessly so I am wishing for no serious bugs.

It's the first version, so I won't guarantee anything yet. I tested it with quite a few patches and it worked fine with them, so I'm hoping for the best.

Originally posted by Shog
Amazing. I hope the Hexeditor you made will be good :D I guess you use ctrl+g again to search correctly :)

Not quite. For this one, you can just type in the address/offset you're looking for, hit return and you'll be there.
The "Values to change" option, displayes how many values are shown.
To change one, you just overwrite it with whatever you want, hit enter again and done.
The list on the right keeps track of your changes.
In the first screenshot, you mispelled "Address". Who cares, though?

This looks like it could be quite handy. Does it support patches with external files? Will .bin files show up in the GUI? Is there a way to only display the one file to patch when in presence of a multi-file patch?
What's with the tablestretch? Can it be fixed?

Anyway, this tool looks useful, but I have no use for patches! *dodges shoe*
Fanatical like a Demon
With xkas patches, does it still use those addresses you place for freespace, or does it search for freespace itself like asar patches once you've prepared them?
Major thanks to Suika Ibuki for layout!
I'm open for music requests, just DM me on discord and we can further discuss there.
SMAS Soundtrack Status: 100% finished
YI Soundtrack Status: 100%
YI Unsampled Soundtrack Status: 100%
NSMB Soundtrack Status: 7.89%
Killer Instinct Soundtrack Status: 14.63%
SPC Thread
From our family to you, keep your pants dry, your dreams wet, and remember, hugs not drugs.
Originally posted by LadiesMan_217
With xkas patches, does it still use those addresses you place for freespace, or does it search for freespace itself like asar patches once you've prepared them?

Once you've prepared them, it'll search for freespace.
If you want to set the freespace by hand, just leave the ";@freespace_blw" away.

Originally posted by MercuryPenny
What's with the tablestretch? Can it be fixed?

Huh? What, where?

Originally posted by Sakuya Izayoi
This looks like it could be quite handy. Does it support patches with external files? Will .bin files show up in the GUI? Is there a way to only display the one file to patch when in presence of a multi-file patch?

I actually haven't considered multifile-patches yet. Thanks for pointing that out.
As for patches with external files, it depends on the patch, if it works or not. I guess in most cases the external file holds a number of definitions or something. Like maybe the freespace address.
In this case, the locating of the freespace address in an external file won't work.
I'll need to look into that. Are there any patches you can suggest for testing?
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Originally posted by JackTheSpades
I'll need to look into that. Are there any patches you can suggest for testing?


- Layer 3 Customizer
- 32x32 Character Tilemap
- UberASM
- VWF Dialogue
- Yoshi Player
- Mode 7 Game Over
- ...And more.

Either way, my main interest with this tool is that it seems useful for organization. The patches on the right panel in the first screenshot, are they all the patches the tool finds, or are they user-added, like a "favorites" list? I'd put patches I patch often there.
No, they are patches found in the respective folders.
Or, better said, the xkas list has all .asm files found in the xkas folder listed.
And the asar list... well you guess it.

Implementing a favourite list would however be interesting ^^.
(Thanks for the patchlist btw.)
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Originally posted by JackTheSpades
Originally posted by MercuryPenny
What's with the tablestretch? Can it be fixed?

Huh? What, where?


There was table stretch when I posted, I guess it's outdated.
I tried it but it doesn't report any errors. Here:
Code
print: "Patch is written at address $",pc,"."

Which is actually right:
Code
print "Patch is written at address $",pc,"."

Asar has reported errors to this but no EasyP.
Unfortunatelly, xkas doesn't differ between "output" or "errors".
In other words, the tool is programmed to handle any output from xkas as error.
As such, the tool removes "print" lines before patching. After all, it writes the address it insertes the patch to in the table.

Asar has a similiar problem, which forces me to remove "print" lines as they would interrupt with the calculation of the addresses and the sizes.

(Which reminds me though... the tool might as well erease labels called "print"... guess I need to fix that)
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Anyway, it didn't patched, so I used Asar manuell.
Which patch was it?
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Originally posted by JackTheSpades
Which patch was it?

A small patch where you can only spin jump if you aren't small nor caped:
Code
header
lorom

org $00D639
autoclean JSL Hijack
NOP

freecode
Hijack:
AND #$FE
TAX
LDA $19
BEQ No_Spin
CMP #$02
BEQ No_Spin
LDA $18
RTL
No_Spin:
LDA #$00
RTL

print "Patch is written at address $",pc,"."

and when I patched it with the error, it didn't patched it (is it grammatical right).

BTW: This is a bit optimized but will took more freespace :P :
Code
header
lorom

org $00D639
autoclean JSL Hijack
NOP

freecode
Hijack:
AND #$FE
TAX
LDA $18
BPL Return
PHX
LDX $19
LDA Table,x
PLX
Return:
RTL

Table:
db $00,$80,$80,$00

print "Patch is written at address $",pc,"."

And yes, inspired from SML2.
Actually, the patch works just fine for me.
Was able to patch it without any problems.

Also, if EasyP throws an error, it will abord the patching and restore the ROM to what it was before you even tried patching it. This is to prevent the ROM being corupted by half assabled patches.
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
  • Pages:
  • 1
  • 2