Any better site for OPCodes?

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
234
Trophies
0
Age
124
XP
436
Country
United States
http://imrannazar.com/ARM-Opcode-Map

site doesn't look accurate/organized for GBA.
I only understand some these commands, due to the fact they use a similar method in NES & Sega.

http://www.6502.org/tutorials/6502opcodes.html = nice and organized.

For Sega, I had to download a text file from zophar, which listed every single OPCode number.. also I found this PDF site.
http://wpage.unina.it/rcanonic/didattica/ce1/docs/68000.pdf

Any good pdf, or a website that does a better job at listing all the GBA OPcodes? So far, my best method of learning was to edit the hex value, and see what it changed the OPcode to... that would take time to write down all those combinations.. so I will, if I have to.

1688673923470.png
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,325
Trophies
4
Location
Space
XP
13,904
Country
Norway
http://imrannazar.com/ARM-Opcode-Map

site doesn't look accurate/organized for GBA.
I only understand some these commands, due to the fact they use a similar method in NES & Sega.

http://www.6502.org/tutorials/6502opcodes.html = nice and organized.

For Sega, I had to download a text file from zophar, which listed every single OPCode number.. also I found this PDF site.
http://wpage.unina.it/rcanonic/didattica/ce1/docs/68000.pdf

Any good pdf, or a website that does a better job at listing all the GBA OPcodes? So far, my best method of learning was to edit the hex value, and see what it changed the OPcode to... that would take time to write down all those combinations.. so I will, if I have to.

View attachment 382121
GBAtek is the holy grail AFAIK: https://problemkaputt.de/gbatek.htm (alternate link: https://problemkaputt.github.io/gbatek.htm)
I also found this, which has some more links: https://gbadev.net/resources
 

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
234
Trophies
0
Age
124
XP
436
Country
United States
but I can't find which page has the exact info I need, just for debugging, for cheat code purposes.
The PDF, while long.. only focused on OPcodes and nothing else.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
Amusingly the emulator you show a screenshot of has it all as was noted.
https://problemkaputt.de/gbatek.htm#armcpureference It is written more for the use of those that already know a fair bit and need a reference (cycle times and such like featuring prominently) but can get it done as a beginner reference.
https://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm#CPU might also be of use.
I do also generally link http://coranac.com/tonc/text/asm.htm at times like this.

The 6502 is also a simpler processor in many ways which might preclude something like your link from having an equivalent here.

Crash course on GBA ARM7TDMI

It is a 32 bit processor, which is to say it has 32 bit registers to play with. There are no legacy modes like you might deal with on the PC that multiply the complexity a bit. It does however have a 16 bit mode known as THUMB which still has access to a selection of the 32 bit registers.

Most code runs from the ROM itself (one reason why GBA flash carts are relatively expensive as you have to build to that) but you might occasionally see things copied to various parts of RAM and run from there, this is usually for high performance code though as you are sharply limited in space.

Telling what mode a given section of code is in could be done as it will make little sense in one mode or the other but better than that is the emulator knows what mode it is running in at the time so if you are making cheats or dynamic debugging (as opposed to static) then go with that. General wisdom is most of the time you will be in THUMB mode (16 bit instructions do make for slightly faster execution/pipeline woe dodging whilst retaining considerable functionality) but that is ultimately going to come down to the game.

It has no floating point nor fixed point options baked into the device (the DS has some fixed point for its 3d aspects) so anything there will have to be either a lookup table or software methods. Likewise you have no divide internally on the CPU but you do have it as part of the BIOS calls (most normally consider these when dealing with compression, also known as SWI calls aka software interrupt). Said lookup tables will also be how you do trigonometry. That said most things can get done with unsigned numbers, signed numbers, integer maths, boolean logic (do have this on lock, even more so if you are going into the world of more complicated cheats) and other standard operations on numbers (shifts, rotates, inverts and the like).

In most instructions you are only able to reference an immediate within the instruction (owing to instructions being 16 or 32 bits long that means you don't have the option to do a 32 bit number within it*) or another register. Any access to normal memory is done by the relevant read and write commands for the modes, or I guess DMA. http://web.archive.org/web/20140811...ers.com/files/2013/03/unequivocal-answer.html

*you do have things like MOVN as an inverting copy which means if you wanted all FF or something in there you could do MOVN of all 00 and end up with it, as opposed to having to put what you can in there, shift it along (the ARM7 is really good at shifting) and add the rest afterwards. Some assemblers will give you such things as a virtual instruction but that is not all the hacking ones as that can trouble some aspects of hacking if you suddenly have 3 instructions when you might have thought you were having the 1.

If you already understand flags from the 6502 the principles are largely the same. Mostly of interest to you as a hacker as that is where the results of various compares are stored such that future instructions might know the results and operate accordingly.

You have a lot more free use registers than the 6502 where you have two or three depending upon your philosophy. Here the last few registers are given over to special tasks like program counter (where you are in the program), link return (where to jump back to after the subroutine has ended, one of many reasons you are told not to call a function within a function in higher level languages) and stack pointer but the rest are up to you to use as you will.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Tonight's nightmare sponsored but G-Fuel! lolo