FF6 Hacking
Assembler vs Hex Editing - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Assembler vs Hex Editing (/thread-3380.html)



Assembler vs Hex Editing - Turbotastic - 12-13-2016

Time for my semi-monthly dumb question.

What does an assembler do, and more specifically, how does one use an assembler to either implement others' custom code or insert one's own?

Is there a difference between using an assembler and generating the opcodes via changing the bytes in hex?

Nearly all of the assembly tutorials point to learning the assembly language, and while obviously, that's required to understand the code...I feel like something is being skipped.


RE: Assembler vs Hex Editing - funkydiscogod - 12-14-2016

I know I'm still a rank amateur at this.  So, take it for what it's worth.

I just make changes in hex, and don't use the assembler.


RE: Assembler vs Hex Editing - B-Run - 12-14-2016

For the longest time I did everything in hex... and i mean EVERYTHING. I do all sorts of extensive hacks in a lot of areas, and it was all hex until recently. I really liked the granular control of adding the hex manually. It helped me see what was going on, how much space I was using, and I was worried using an assembler would create a disconnect between what I was doing and what actually went into the ROM.

Now, after spending some time using xkas (assembler), it just saves too much time to work in hex for serious code edits. The biggest difference was not having to recalculate jumps and branches manually, labels get's all of that get done for you. And since I spent so much time working only in hex. I actually think I've got a leg up on a lot of other coders who have used almost exclusively the assembler because I can troubleshoot the hex pretty easily.

It actually wasn't that hard of a jump from doing raw hex to using the assembly language for xkas. 90% of it is literally just typing out the opcodes that you would be putting into the hex anyway. Then once you learn labels, everything else is bells and whistles that are certainly helpful, but by no means necessary, and you can expand your knowledge from there at your leisure.

Bottom line: From experience I can tell you you certainly CAN do everything you want to do in hex without ever touching an assembler. But they are handy tools to learn if you're willing to put in a little work up front to learn.


RE: Assembler vs Hex Editing - madsiur - 12-14-2016

Outside a 2 or 3 bytes edit, not using an assembler is counter productive. An assembler remove the step of knowing the opcodes hex values. You also don't have to rewrite everything each time you edit your function. Finally, labels remove the step of manually calculating branches, JSRs and jumps.


RE: Assembler vs Hex Editing - ScarabEnigma - 12-14-2016

For me, and my failure of a attempt at ff2 edits. I cannot edit any maps, or tile palette assignments, or even just a simple single color of a palette for field sprites, unless I know how to do assembly. But how can I?! The many attempts of downloading programs that specialize in 6502 assembly only result in either its dos exclusive or it exits the instant I open the program. Sad

I think I've ranted enough about the value of assembly. Cause it is something I seek but repeatedly, fate denies me so.


RE: Assembler vs Hex Editing - madsiur - 12-14-2016

(12-14-2016, 05:14 PM)ScarabEnigma Wrote: The many attempts of downloading programs that specialize in 6502 assembly only result in either its dos exclusive or it exits the instant I open the program.

DOS exclusive?!? You probably mean they are command line tools... You should learn how to use them and usually a single command will assemble your code. What is this trend that everything must have a GUI in order to "work" for the user...


RE: Assembler vs Hex Editing - ScarabEnigma - 12-18-2016

(12-14-2016, 05:37 PM)Madsiur Wrote:
(12-14-2016, 05:14 PM)ScarabEnigma Wrote: The many attempts of downloading programs that specialize in 6502 assembly only result in either its dos exclusive or it exits the instant I open the program.

DOS exclusive?!? You probably mean they are command line tools... You should learn how to use them and usually a single command will assemble your code. What is this trend that everything must have a GUI in order to "work" for the user...

Actually, one thing I did not mention is that I actually did try a few gui based programs as well that resulted in the same result of instantly exiting, and it hasn't been exclusive to programs related to hacking...