Fixed UNIX compilation

This commit is contained in:
2025-02-08 13:08:34 -07:00
parent 65e4dbadb5
commit fc67151bfa
613 changed files with 34 additions and 38 deletions

View File

@ -1,29 +1,16 @@
#include <Windows.h>
#include <timer.h>
#include <interrupts.h>
#include <audio.h>
#include <profileapi.h>
static timer_context ctx = {0};
long long counts_per_cycle;
long long last;
long long now;
void timer_init() {
ctx.div = 0XAC00;
}
void timer_tick() {
//while(now - last < counts_per_cycle){
// LARGE_INTEGER current;
// QueryPerformanceCounter(&current);
// now = current.QuadPart;
//printf("Last-now: %lld, counts: %lld\n", now - last, counts_per_cycle);
//}
last = now;
u16 prev_div = ctx.div;
u16 prev_div = ctx.div;
ctx.div++;
bool timer_update = false;
switch(ctx.tac & 0b11) {
@ -107,4 +94,4 @@ u8 timer_read(u16 address) {
timer_context *timer_get_context() {
return &ctx;
}
}