Closed Kenjugs closed 9 months ago
IMO, the page should be removed entirely, since its information is already present in gbz80(7) and optables, with more adapted presentations to their respective use cases, while Pan Docs' pages are neither here nor there.
I agree, maybe we could have Pan Docs "import" the table from the optables repository? But I'm not super sure about the layout..
fwiw the optables
reference seems the most dense - it certainly has all the information i've been looking for from the CPU Instruction Set
page except that i've found it very helpful that the page in Pan Docs generalizes over trivial variants (no duplicate rows for ld b, b
, ld b, c
, ld b, d
, ... when they're all Basically The Same).
so +1 for prominently linking to optables, but it's nice to have something more concise
Reworking this into some kind of "instruction decoding" page would be more useful, then.
Dealing with the encoding column in the instruction set table is proving tough. Switching to a binary representation, plus adding a base opcode column like in technical guides, would really help. For the encoding column:
Suggested Format:
ld r, r'
__________
encoding: 0b01xxxyyy
base opcode: 0x40 (hex)
This change makes it easier to understand and matches common technical documentation style.
That sounds like a good idea, though then I'd like to use the tables introduced by #334. (Any help reviewing that PR so it gets merged, and this gets worked on faster, would be immensely appreciated. :pray:)
Here is a render of #511; please let me know what you think of it?
Currently, it seems that many of the instructions are "generalized" to avoid the need to write individual instructions for each register. However, there are some encodings for instructions that just say "xx", which doesn't really help with decoding those instructions or even specifying what valid values would be for that specific instruction.
For example, the
ld r, nn
instruction says the encoding isxx nn
. But valid values for "xx" in this case are0x06
,0x16
,0x26
,0x0E
,0x1E
,0x2E
, and0x3E
, which aren't really mentioned outside of the opcodes table which is buried in the References section.I'm not sure what the best style for expanding on this would be, but as it is, the Encoding column seems to not be very useful unless it has the entire encoding already. Maybe a link to the opcodes table might be better served at the top of this page?