• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 29, 2024, 05:18:15 am

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


ASM Starter kit

Started by Choto, April 07, 2013, 07:38:57 pm

Choto

April 07, 2013, 07:38:57 pm Last Edit: February 08, 2015, 04:57:32 pm by Choto

ASM Notes most useful files:
This file tells where in RAM data and tables are located when BATTLE.BIN is loaded into RAM

This file has all of the routines that I've documented, but haven't been uploaded to the Wiki

This is all the research I've done into how Effect.bin files work. Most of the data therein is related to E0001.bin, or cure


The rest is a mix of miscellaneous files I've acquired over time, from various different people. I will try to keep a collective list of all routines that are currently documented in the respective file routine locations on the Wiki. Meaning, if you see routines without notes in these files, it may already be documented and you should check the wiki before doing needless work.
**Disclaimer: I may forget to update this stuff so additional information may be collected over time.

HxD - This is a hex editor which you can open .bin files with to view and edit the hex within.

MassHexASM - An essential tool for writing code into hex values. More information can be found here: http://ffhacktics.com/smf/index.php?topic=7130.0

Psxrel - This is a debugger, essential for testing things in game. Pokeytax gives a short tutorial on using it here: http://ffhacktics.com/smf/index.php?topic=7937.0

If you are just starting out, it is highly suggested that you visit the tutorials section and read all of the ASM tutorials: http://ffhacktics.com/smf/index.php?topic=9204.0

Things may seem overwhelming at first, but with time and effort anybody can learn to ASM hack and truly make FFT do what they want. Re-reading things every once in awhile definitely helps as well. Sometimes it takes a couple swings of a hammer to break through a wall.

@ the other ASM guys:
Let me know if there's any other important stuff you guys think would be useful to beginners.

flameman050

Thanks! I'm half-dead after pulling an all nighter and all of these notes are still easy to follow! I have a feeling they're going to be a go to reference for me for a while.

Choto

March 01, 2014, 06:01:24 pm #2 Last Edit: March 01, 2014, 10:48:11 pm by Choto
Posting some notes for Pride and anybody else who can get use out of them.

Vanya

I support this. It should get pinned.
  • Modding version: Other/Unknown
¯\(°_0)/¯

formerdeathcorps

Thank you for posting this.  Is Pride still AWOL?
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

Choto

no problemo! I'm not sure what his situation is, he was looking for notes the other day.

Angel

Pride is getting a replacement laptop soon, so he'll be a bit more alive in the near future.
  • Modding version: PSX
* Angel should quit being a lazy bitch
<@Elric> I agree to that as well

nyanyame nyanyajuu nyanyado no nyarabide nyakunyaku inyanyaku nyanyahan nyanyadai nyannyaku nyarabete nyaganyagame
At the end of the day, are we not all trapped inside lemons?

Choto

Posting a more recent version of both Data Locations and Battle.Bin routines 2. Most of the routines in that file aren't posted on the wiki, only their locations are posted with a broken red link. /lazy

Dokurider

I think what you guys can include are actual examples of instructions in action. Branching was a huge stumbling block because I couldn't see how it actually functioned and I thought for the longest time they just worked like conditional jumps (just type the address and go). And not having examples to deduce functionality from is what triggered me to make my help topic. So for instance, you can do:

r17 = 0x0080 + 0x0040 + 0x008 = 0x00c8

andi r2, r17, 0x0040
beq r2, r0, 0x000c
nop (Must be blank because the system executes the next command before actually jumping)
sb r1, 0x0000(r3)
sb r0, 0x0000(r3) (Branch jumps to here)


Stuff like that I'd imagine would help out some aspiring ASMers.

Xifanie

I don't see why it couldn't be:

andi r2, r17, 0x0040
beq r2, r0, 0x0008
sb r0, 0x0000(r3)
sb r1, 0x0000(r3)
whatever (Branch jumps to here)

Also, storing r1 is not something exactly common. It's only ever used for memory addresses. I don't think other uses could be problematic, but seeing what ASM can do on console, I try to be safer than sorry. I really doubt storing 2 values consecutively to the same address causes any issue.

Especially since, what your code does is:

Branch TRUE:
sb r0, 0x0000(r3)

Branch FALSE:
sb r1, 0x0000(r3)
sb r0, 0x0000(r3)

In the end, your branch is useless since in both instances it writes 0x00 to the location.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Dokurider

Oops, you're right. I guess I should've cribbed it from existing code rather than just making it up as I went along. Still, my ultimate point stands.

Choto

that's a good idea Doku, maybe i'll throw a little code snippets tutorial together this summer. Getting used to the commands is one of the most important hurdles.

Glain

That sounds sort of like the things we did in the ASM tutorials... maybe we should link those from here?
  • Modding version: Other/Unknown

Choto

Yep, there's already a link to the tutorial index Glain. I just had flashbacks checking the tutorials out for the first time in years lol.. perspective is crazy.

nitwit

Choto, should I download all the attachments on this page?  Are some of them newer than the others?  Why not move them all to the first post?

Choto

Yeah I should move them to the first post. The one down farther is more up to date.