Mercurial > repos > blastem
view terminal_win.c @ 1162:c4ea535cf57e
Forgot that the expansion to 32-bit values for 16-bit addresses is not done when calling a C function to handle a memory operation. Mask on location in mapper_write was needed afterall
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 08 Jan 2017 16:55:30 -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; } }