Users browsing this thread: 1 Guest(s)
ASM Question
10-22-2017, 12:06 AM
I'm very sorry if this is the wrong place and I'm very sorry if this is the dumbest question you've ever read, but I would love a small bit of clarification. I've spent the last 14 and a half hours familiarizing myself with the hexidecimal system, binary system, ASM terminology (I know and understand LDA, JMP, STA, NOP = EA, etc.), and I've learned a ton. My question is how do I take and apply code based on assembly? Do I literally create lines of code, say in Notepad ++, save the file as a .asm and patch it to the rom with an assembler (such as asar)?
For instance, if I wanted to change the sprite ID of the moogle suit, do I copy and paste the following into Notepad ++, have it be .asm, and patch it with an assembler?:
C2/2872: A5 C9
C2/2874: C9 9F
C2/2876: D0 0B
C2/2878: 8A
C2/2879: 0A
C2/287A: 0A
C2/287B: 0A
C2/287C: 0A
C2/287D: A8
C2/287E: A9 09
C2/2880: 99 AE 2E
(I think this particular instance could be handled with a hex editor but I'm curious as to an asm format.)
For instance, if I wanted to change the sprite ID of the moogle suit, do I copy and paste the following into Notepad ++, have it be .asm, and patch it with an assembler?:
C2/2872: A5 C9
C2/2874: C9 9F
C2/2876: D0 0B
C2/2878: 8A
C2/2879: 0A
C2/287A: 0A
C2/287B: 0A
C2/287C: 0A
C2/287D: A8
C2/287E: A9 09
C2/2880: 99 AE 2E
(I think this particular instance could be handled with a hex editor but I'm curious as to an asm format.)
You got the idea but your asm file will not work. You need instructions in your asm file and not the hex they are represented by. (there are ways to insert hex data though)
As an example a working piece of code for the assembler would be:
You can repeat the org instruction to "place your assembler cursor" on an offset. If your code is one block you only need a single org instruction.
As an example a working piece of code for the assembler would be:
Code:
org $C22872
LDA #$40
STA $1969
You can repeat the org instruction to "place your assembler cursor" on an offset. If your code is one block you only need a single org instruction.
10-22-2017, 09:58 PM
Thank you so so much Madsiur. It's funny, I finally thought to take a peek at one your asm patches you included with and ips patch (thank you so much for doing that) and started to mimic that format and managed to create one successful patch! It was a little one, but boy was I so happy. I just came here to mention that but of course you were already on top of that! You both answered my question without knowing it, and then answered my question after knowing it haha! And thank you for that blurb regarding repeating the org instruction. This place is awesome. =)
10-22-2017, 10:09 PM
(10-22-2017, 09:58 PM)Simulacrum Wrote: Thank you so so much Madsiur. It's funny, I finally thought to take a peek at one your asm patches you included with and ips patch (thank you so much for doing that) and started to mimic that format and managed to create one successful patch! It was a little one, but boy was I so happy. I just came here to mention that but of course you were already on top of that! You both answered my question without knowing it, and then answered my question after knowing it haha! And thank you for that blurb regarding repeating the org instruction. This place is awesome. =)
No joke. My last hacking project was on Final Fantasy Tactics: War of the Lions, and the community over at FFHacktics is just toxic. I was amazed at just how NICE people are over here.
Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
10-23-2017, 06:56 AM
(This post was last modified: 10-23-2017, 06:58 AM by Turbotastic.)
Actually, I'm glad somebody asked this question because up until recently, I did not understand the .asm file format, either.
Asking questions helps everyone, even if you don't think those questions will have an effect.
Asking questions helps everyone, even if you don't think those questions will have an effect.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)