summaryrefslogtreecommitdiff
path: root/video.c
diff options
context:
space:
mode:
authorAstrid Smith2010-09-10 12:47:20 -0700
committerAstrid Smith2010-09-10 12:47:20 -0700
commit548316a52d8649556ebbc8b3a7835ac7ae4aa7c0 (patch)
treee004fdf53930e534bb3fd6a393070bc3003aa8b8 /video.c
parent0bfdccd24972de80d4ab808f4429a70947e87335 (diff)
Added stubs for putting the emulated screen into a TIOS-drawn window.
Diffstat (limited to 'video.c')
-rw-r--r--video.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/video.c b/video.c
index 1760bfc..ac037bc 100644
--- a/video.c
+++ b/video.c
@@ -5,6 +5,8 @@
*/
#include <graph.h>
+#include <wingraph.h>
+#include <alloc.h>
#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();