taylus / gbdasm

A Game Boy disassembler written in .NET Core
6 stars 0 forks source link

0xF2 is not an undefined instruction #1

Closed taylus closed 4 years ago

taylus commented 4 years ago

https://github.com/taylus/gbdasm/blob/de542610988da9f21293566d4bc9f3dc8c432ef9/GBDasm.Core.Test/Decoder_Should.cs#L3026-L3032

The above should disassemble 0xF2 to ld a, [$ff00+c], not the current behavior of db $f2.

https://rednex.github.io/rgbds/gbz80.7.html#LDA,$FF00+C_

(or the alternate mnemonic ld a, (c)?)

http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html

LD A,(C) has alternative mnemonic LD A,($FF00+C)

Go with the format RGBDS prefers