SPU Controll Register

This commit is contained in:
Jaby
2022-08-31 22:00:38 +02:00
parent de7d0945a1
commit a84b2c4f14
4 changed files with 78 additions and 3 deletions

View File

@@ -24,12 +24,23 @@ namespace SPU {
voice.repeatAdr = 0x200;
}
static void enable_control() {
io_class__update_with(Control::Register, Control().set_on().set_unmute().set_cd_audio_enable());
}
static void disable_control() {
io_class__update_with(Control::Register, Control());
}
void setup() {
clear_main_volume();
clear_keys();
disable_control();
for(auto& voice : Voice::Channel) {
clear_voice(voice);
}
enable_control();
}
}