starting work on apu

This commit is contained in:
2025-02-02 12:35:53 -07:00
parent e0fc6123fc
commit 243e13b19e
3 changed files with 21 additions and 6 deletions

View File

@ -1,6 +1,7 @@
#include <timer.h>
#include <interrupts.h>
#include <audio.h>
static timer_context ctx = {0};
@ -37,6 +38,10 @@ void timer_tick() {
cpu_request_interrupt(IT_TIMER);
}
}
if((prev_div & (1 << 12)) && (!(ctx.div & (1 << 12)))){
audio_tick();
}
}
void timer_write(u16 address, u8 value){