SPU Controll Register

This commit is contained in:
2022-08-31 22:00:38 +02:00
parent 48ba6a4f8b
commit 10dbcbeef7
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();
}
}