Users browsing this thread: 1 Guest(s)
ASM Question

#1
Posts: 2
Threads: 1
Thanks Received: 0
Thanks Given: 0
Joined: Oct 2017
Status
None
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.)
  Find
Quote  

#2
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
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:

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.
  Find
Quote  

#3
Posts: 2
Threads: 1
Thanks Received: 0
Thanks Given: 0
Joined: Oct 2017
Status
None
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. =)
  Find
Quote  
[-] The following 1 user says Thank You to Simulacrum for this post:
  • madsiur (10-22-2017)

#4
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
(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
  Find
Quote  

#5
Posts: 89
Threads: 11
Thanks Received: 3
Thanks Given: 1
Joined: Dec 2015
Reputation: 3
Status
Debrave
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.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite