Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bytes and cycles for prefix opcodes

Open
#3 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Domain
documentation

Research direction

Compare the main opcode table's PREFIX entry with the separate table of 0xCB-prefixed opcodes, focusing on how bytes and cycles are presented. Determine a clear way to explain that the prefix is included in the prefixed instruction totals, then verify that the tables or accompanying note no longer invite the reported confusion.

Written by the indexing model from the issue text.

Description

Some people (on the emudev Discord server) seem to be confused by the fact that the table lists 0xCB as 1 byte and 4 cycles, while all the 0xCB-prefixed opcodes in the separate table add that 1 byte and those 4 cycles to their totals.

For example, RLC B at 0xCB 0x00 is listed as taking 2 bytes and 8 cycles, but in the main table PREFIX at 0xCB is listed as taking 1 byte and 4 cycles.

That's not incorrect per se, since fetching the 1-byte prefix takes 4 cycles, so I'm not sure what the best "solution" would be. Perhaps just a footnote?

Dominant language
SCSS
Stars
29
Forks
10
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from gbdev/gb-opcodes

All issues in gbdev/gb-opcodes

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.