Skip to content

Implement PCM12 and PCM34 registers#42

Draft
struthiocamelus wants to merge 1 commit intomvdnes:mainfrom
struthiocamelus:pcm-registers
Draft

Implement PCM12 and PCM34 registers#42
struthiocamelus wants to merge 1 commit intomvdnes:mainfrom
struthiocamelus:pcm-registers

Conversation

@struthiocamelus
Copy link
Copy Markdown

This PR (supposedly) implements the undocumented PCM12 and PCM34 GBC registers that allow reading the current sound amplitudes.

TODO:

  • GBVisualizer does not run #41 needs fixing in order to test this with GBVisuaizer
  • I think this probably needs to return 0x00 on DMG and other non CGB models.

@struthiocamelus
Copy link
Copy Markdown
Author

I made some assumptions that the u32 amplitude should just lose 28 bits of precision in order to be returned in 2 nibbles. I think that's correct.

@mvdnes
Copy link
Copy Markdown
Owner

mvdnes commented Jun 8, 2025

This would be nice to have for some tests in https://github.com/daid/GBEmulatorShootout as well. I am looking forward to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants