pandocs
pandocs copied to clipboard
Port "Gameboy sound hardware" from the old wiki
https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware
I can work on this. @ISSOtm any idea about how we can call this page?
A significant amount of this info is already present in the existing pages. I think the first order of business is cataloguing what's missing (and thus needs to be added).
Then we can decide what should be added to existing pages, and from the rest, the title of that new page.
I would also like to work on this, from what I can see this is the information already present in pages (left is the old wiki section, right the new pages section):
- [x] Overview -> Audio Overview.
- [x] Registers -> Audio Registers.
- [ ] Channels -> Explained in Audio Registers, but there is no diagram like in the old wiki.
- [x] Timer -> Audio and Audio Registers, Period counter
- [ ] Frame Sequencer -> Partly explained in Audio Details DIV-APU, but the precise diagram from the old wiki is missing.
- [x] Length Counter -> Length Timer.
- [x] Volume envelope -> In Audio, Volume & Envelope and in the Audio Register entries.
- [x] Square Wave -> Audio Registers, FF11-NR11.
- [ ] Frequency Sweep -> FF10 - NR10, but all references to the shadow frequency are omitted. Could be added to Audio Details?
- [x] Noise Channel -> Audio Details, Noise Channel.
- [x] Wave Channel -> Audio Registers, Sound channel 3.
- [ ] Trigger Event -> Audio, Triggering and in Audio Registers, but there is no enumeration of what triggering does, like in the old wiki.
- [x] Channel DAC -> Audio Details, DACs.
- [x] Mixer -> Audio Registers, NR50 and Audio Details diagram.
- [ ] Power Control -> Audio Registers, FF26-NR52. Missing details about writes to length counters on DMG and that turning the APU off doesn't affect wave RAM. Also missing are values after boot, but maybe that should have its own section.
- [x] Register Reading -> Audio Registers.
- [ ] Vin Mixing
- [ ] Obscure behavior
- [ ] Differences
Thank you! Please feel free to submit any PRs covering any part(s) of this.
In the Frame Sequencer section of the old wiki the clocks of the DIV_APU are described as:
Step Length Ctr Vol Env Sweep
---------------------------------------
0 Clock - -
1 - - -
2 Clock - Clock
3 - - -
4 Clock - -
5 - - -
6 Clock - Clock
7 - Clock -
---------------------------------------
Rate 256 Hz 64 Hz 128 Hz
But looking at SameBoy's source (void GB_apu_div_event(GB_gameboy_t *gb) function) it looks like:
Step Length Ctr Vol Env Sweep
---------------------------------------
0 - - -
1 Clock - -
2 - - -
3 Clock - Clock
4 - - -
5 Clock - -
6 - - -
7 Clock Clock Clock
---------------------------------------
Rate 256 Hz 64 Hz 128 Hz
Is there any reference on which is correct?
cc @LIJI32