[Platform] [PC-98] Graphics GDC initialization

I've copy-pasted this snippet so many times, it's time it gets a proper
home.

Part of P0232, funded by [Anonymous].
This commit is contained in:
nmlgc 2023-02-26 20:00:18 +01:00
parent 03519d2af8
commit d15bb0c4fa
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#include "platform.h"
#include "x86real.h"
#include "platform/x86real/pc98/graph.hpp"
void graph_show_16color_400line(void)
{
// Enter 400-line mode
_AH = 0x42;
_CH = 0xC0;
geninterrupt(0x18);
// Enter 16-color mode
outportb(0x6A, 1);
// Show VRAM
_AH = 0x40;
geninterrupt(0x18);
}

View File

@ -0,0 +1,5 @@
// Generic graphics layer functions
// --------------------------------
// Puts the graphics GDC into the common 16-color 640×400 graphics mode.
void graph_show_16color_400line(void);