Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-05-01 18:07:00

Siamese Dream
New member
Registered: 2014-04-19
Post 1/6

Using ASM

Hi, I'm Siamese Dream and this is my first post on this board; I've been lurking for about six months. I have taken up the task of learning ASM and ran into the following problem: while there is plenty of documentation on writing ASM code, there is very little on how to implement it in a hack. I don't know how to assemble the code or use it in a ROM. Can anyone help me?

Offline

#2 2014-05-01 20:20:14

ShantyTown
Member
Registered: 2013-12-04
Post 48/344

Re: Using ASM

Here are the disassembly projects!

https://github.com/iimarckus/pokered
https://github.com/kanzure/pokecrystal

Like it says in the instructions, read the INSTALL.md files.  They'll walk you through getting all the tools you need to start writing code.

If you have troubles, you might want to hop on the Skeetendo IRC channel.  There are a bunch of really helpful people on there all the time.
http://hax.iimarck.us/topic/1109/

Edit:  If you're not familiar with Git version control, then this is a great opportunity to learn.  There is tons of documentation on the internet and plenty of tutorials to help out.

Last edited by ShantyTown (2014-05-01 20:21:54)

Offline

#3 2014-05-01 21:00:51

Siamese Dream
New member
Registered: 2014-04-19
Post 2/6

Re: Using ASM

I'm sorry, but now I'm even more confused.

Offline

#4 2014-05-02 05:12:35

Miksy91
Member
Registered: 2010-10-16
Post 2,102/2,315

Re: Using ASM

Yeah, that's good advice from ShantyTown there. Nevertheless if you're just starting out, it might be helpful to just play around with writing asm code straight in the rom file at first and once you have gotten used to what it is all about, you could start playing with the disassembly which gives a lot more options and saves a lot of trouble while at it.

Every asm instruction is a 8-bit (or 1-byte) opcode which could be written straight to the rom file with a hex editor.
Some of the opcodes are longer because they require 1- or 2-byte parameters attached to them.

As an example,

ret - C9
ld a, 62 - 3E 62
call $417B - CD 7B 41

You don't have to remember those codes by heart though! :D
We have asm editors and assemblers for that. And not to mention the disassembly for crystal and red which is what you want to use if you plan on hacking those games.

Online

Board footer

Powered by FluxBB