Mercurial > repos > blastem
view terminal_win.c @ 1215:cf69a179aeaf
Basic implementation of serial IO registers, but without actual serial IO support. Needed to run a certain software check cartridge that is floating around.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 01 Feb 2017 21:19:35 -0800 |
parents | 0433fdd9ba66 |
children |
line wrap: on
line source
#include <windows.h> #include <stdio.h> static char init_done; void force_no_terminal() { init_done = 1; } void init_terminal() { if (!init_done) { AllocConsole(); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr); init_done = 1; } }