diff --git a/src/devices/audio.h b/src/devices/audio.h index 288b291..49ca8db 100644 --- a/src/devices/audio.h +++ b/src/devices/audio.h @@ -25,7 +25,7 @@ typedef struct { extern Audio audio[POLYPHONY]; +Uint8 audio_get_vu(Audio *c); int audio_render(Audio *c, Sint16 *sample, Sint16 *end); void audio_start(Audio *c, Uint16 adsr, Uint8 pitch); -Uint8 audio_get_vu(Audio *c); void audio_finished_handler(Audio *c); \ No newline at end of file diff --git a/src/devices/file.c b/src/devices/file.c index e5c93b2..4a11821 100644 --- a/src/devices/file.c +++ b/src/devices/file.c @@ -139,7 +139,7 @@ file_delete(void) return unlink(current_filename); } -/* API */ +/* IO */ void file_deo(Device *d, Uint8 port) diff --git a/src/devices/screen.c b/src/devices/screen.c index 0406595..155eac8 100644 --- a/src/devices/screen.c +++ b/src/devices/screen.c @@ -154,7 +154,7 @@ screen_debug(Screen *p, Uint8 *stack, Uint8 wptr, Uint8 rptr, Uint8 *memory) } } -/* APIs */ +/* IO */ Uint8 screen_dei(Device *d, Uint8 port) @@ -174,7 +174,7 @@ screen_deo(Device *d, Uint8 port) switch(port) { case 0x1: d->vector = peek16(d->dat, 0x0); break; case 0x5: - /* TODO: if(!FIXED_SIZE) set_size(peek16(d->dat, 0x2), peek16(d->dat, 0x4), 1); */ + if(!FIXED_SIZE) set_size(peek16(d->dat, 0x2), peek16(d->dat, 0x4), 1); break; case 0xe: { Uint16 x = peek16(d->dat, 0x8); diff --git a/src/devices/screen.h b/src/devices/screen.h index 75ce96a..b608a80 100644 --- a/src/devices/screen.h +++ b/src/devices/screen.h @@ -27,6 +27,9 @@ typedef struct Screen { extern Screen screen; +/* this should probably be done differently */ +int set_size(Uint16 width, Uint16 height, int is_resize); + void screen_palette(Screen *p, Uint8 *addr); void screen_resize(Screen *p, Uint16 width, Uint16 height); void screen_clear(Screen *p, Layer *layer); diff --git a/src/uxnemu.c b/src/uxnemu.c index a852271..f6cc587 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -101,7 +101,7 @@ set_window_size(SDL_Window *window, int w, int h) SDL_SetWindowSize(window, w, h); } -static int +int set_size(Uint16 width, Uint16 height, int is_resize) { screen_resize(&screen, width, height);