Log in

View Full Version : GB Emulation Question



cabreak1
December 9th, 2011, 17:17
Hi

I recently started the development of a GB Emulator.
But I have got a question about the order of bytes in the GameBoy hardware.

Let's say I have the opcode:

$C3040A

C3 indicates that it's a jump (JP) instruction, 04 0A indicates the 16 bit address.

Now, should I treat it like JP $040A or JP $0A04 ?
So does it use Big Endian (normal order) or Little Endian (reverse order)?

Thanks in advance!

ulaoulao
December 11th, 2011, 03:33
ZD has a lot of nes docs FYI: http://www.zophar.net/documents/nes.html

If its anything like VB I bet its little-endian


Note: although the bits are listed in network (big-endian) order below, remember that the VB is a little-endian architecture.