Permalink
Browse files

PC-98: Reflect 24khz/31khz selection in BIOS data area byte 0x54C and…

… remove redundant write to that byte
  • Loading branch information...
joncampbell123 committed Apr 25, 2018
1 parent 042bf8e commit b2f5331e2cb24bca1648596bb5b950daf9db5024
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/ints/bios.cpp
View
@@ -5045,6 +5045,8 @@ void gdc_16color_enable_update_vars(void) {
}
}
extern bool pc98_31khz_mode;
class BIOS:public Module_base{
private:
static Bitu cb_bios_post__func(void) {
@@ -5129,16 +5131,13 @@ class BIOS:public Module_base{
* Ref: http://hackipedia.org/browse/Computer/Platform/PC,%20NEC%20PC-98/Collections/Undocumented%209801,%209821%20Volume%202%20(webtech.co.jp)/memsys.txt */
mem_writeb(0x501,0x20 | memsize_real_code);
/* set up some default state */
mem_writeb(0x54C/*MEMB_PRXCRT*/,0x4F); /* default graphics layer off, 24KHz hsync */
/* keyboard buffer */
mem_writew(0x524/*tail*/,0x502);
mem_writew(0x526/*tail*/,0x502);
/* various BIOS flags */
mem_writeb(0x53B,0x0F); // CRT_RASTER, 640x400 24.83KHz-hsync 56.42Hz-vsync
mem_writeb(0x54C,(enable_pc98_grcg ? 0x02 : 0x00) | (enable_pc98_16color ? 0x04 : 0x00)); // PRXCRT, 16-color G-VRAM, GRCG
mem_writeb(0x54C,(enable_pc98_grcg ? 0x02 : 0x00) | (enable_pc98_16color ? 0x04 : 0x00) | (pc98_31khz_mode ? 0x20/*31khz*/ : 0x00/*24khz*/)); // PRXCRT, 16-color G-VRAM, GRCG
mem_writeb(0x54D,(enable_pc98_egc ? 0x40 : 0x00) | (gdc_5mhz_mode ? 0x20 : 0x00) | (gdc_5mhz_mode ? 0x04 : 0x00)); // EGC
mem_writeb(0x597,(enable_pc98_egc ? 0x04 : 0x00/*FIXME*/)); // EGC
}

0 comments on commit b2f5331

Please sign in to comment.