From 9720a70bb6ca148cd7e333049a74cb86792ee79b Mon Sep 17 00:00:00 2001 From: Duncan Smith Date: Fri, 10 Sep 2010 12:47:20 -0700 Subject: Added stubs for putting the emulated screen into a TIOS-drawn window. --- video.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'video.c') diff --git a/video.c b/video.c index 21ae989..1d9d0a3 100644 --- a/video.c +++ b/video.c @@ -5,6 +5,8 @@ */ #include +#include +#include #define VIDEO_ROWMODE 0x01 @@ -28,11 +30,27 @@ char video_busy; // Always 0 char video_cur_row; char video_cur_col; +WINDOW *screen_window; + void video_write(char); char video_read(void); void *video_compute_address(void); int video_compute_shift(void); +void display_setup(void) +{ + screen_window = HeapAllocPtr(sizeof(WINDOW)); + WinOpen(screen_window, MakeWinRect(10, 10, 106, 74), WF_SAVE_SCR | WF_TTY | WF_ROUNDEDBORDER | WF_TITLE, "TI-83+ Emulator"); + WinActivate(screen_window); + return; +} + +void display_teardown(void) +{ + WinClose(screen_window); + HeapFreePtr(screen_window); +} + void video_write(char data) { int shift = video_compute_shift(); -- cgit v1.2.3