zeta0134 / rusticnes-core

I decided to teach myself Rust by writing an NES emulator. Things quickly got out of hand.
MIT License
34 stars 4 forks source link

Mappers: Support Expansion Audio #3

Closed zeta0134 closed 2 years ago

zeta0134 commented 4 years ago

On the FamiCom system, several cartridges support expanison audio of some sort. See: https://wiki.nesdev.com/w/index.php/MMC5_audio https://wiki.nesdev.com/w/index.php/VRC6_audio https://wiki.nesdev.com/w/index.php/Sunsoft_5B_audio https://wiki.nesdev.com/w/index.php/List_of_games_with_expansion_audio

Currently the Mapper trait has no interface defined for expansion audio hardware, so the emulated APU has no way to retrieve samples in a generic way to begin implementing this feature. Additionally, mappers supporting expansion audio probably need to be clocked at some rate, in order to update their internal state without relying on hacky CPU / PPU snooping behavior.

zeta0134 commented 2 years ago

The mapper interface now fully supports the concept of expansion audio, and can mix things accordingly. While two common expansion audio types are still missing (FDS and VRC7) those are separate issues. They'll be able to slot right in once those mappers are implemented.