fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ibmpc: Add new config file option "cga40" to start up in CGA 40 column mode

+19 -9
+13 -8
src/arch/ibmpc/ibmpc.c
··· 5 5 /***************************************************************************** 6 6 * File name: src/arch/ibmpc/ibmpc.c * 7 7 * Created: 1999-04-16 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 1999-2019 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 1999-2021 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 478 478 void pc_setup_system (ibmpc_t *pc, ini_sct_t *ini) 479 479 { 480 480 unsigned fdcnt, sw1val, sw1msk; 481 - int patch_init, patch_int19, memtest, kbden; 481 + int patch_init, patch_int19, memtest, kbden, cga40; 482 482 const char *model; 483 483 ini_sct_t *sct; 484 484 ··· 486 486 pc->switches1_msk = 0; 487 487 488 488 pc->blink = 0; 489 + pc->cga40 = 0; 489 490 pc->force_keyboard_enable = 0; 490 491 491 492 pc->fd_cnt = 0; ··· 510 511 ini_get_uint16 (sct, "switches_1_val", &sw1val, 0); 511 512 ini_get_uint16 (sct, "switches_1_msk", &sw1msk, 0); 512 513 ini_get_bool (sct, "force_keyboard_enable", &kbden, 0); 514 + ini_get_bool (sct, "cga40", &cga40, 0); 513 515 ini_get_bool (sct, "patch_bios_init", &patch_init, 1); 514 516 ini_get_bool (sct, "patch_bios_int19", &patch_int19, 1); 515 517 ini_get_bool (sct, "memtest", &memtest, 1); 516 518 517 519 pce_log_tag (MSG_INF, "SYSTEM:", 518 - "model=%s floppies=%u sw1=%02X/%02X patch-init=%d patch-int19=%d\n", 519 - model, fdcnt, sw1val, sw1msk, patch_init, patch_int19 520 + "model=%s floppies=%u cga40=%d sw1=%02X/%02X" 521 + " patch-init=%d patch-int19=%d\n", 522 + model, fdcnt, cga40, sw1val, sw1msk, patch_init, patch_int19 520 523 ); 521 524 522 525 if (strcmp (model, "5150") == 0) { ··· 550 553 pc->switches1_val = sw1val & sw1msk; 551 554 pc->switches1_msk = sw1msk; 552 555 556 + pc->cga40 = (cga40 != 0); 557 + 553 558 pc->force_keyboard_enable = (kbden != 0); 554 559 555 560 if (pc->model & PCE_IBMPC_5160) { ··· 1070 1075 mem_add_blk (pc->mem, pce_video_get_mem (pc->video), 0); 1071 1076 mem_add_blk (pc->prt, pce_video_get_reg (pc->video), 0); 1072 1077 1073 - pc_set_video_mode (pc, 2); 1078 + pc_set_video_mode (pc, pc->cga40 ? 1 : 2); 1074 1079 1075 1080 return (0); 1076 1081 } ··· 1086 1091 mem_add_blk (pc->mem, pce_video_get_mem (pc->video), 0); 1087 1092 mem_add_blk (pc->prt, pce_video_get_reg (pc->video), 0); 1088 1093 1089 - pc_set_video_mode (pc, 2); 1094 + pc_set_video_mode (pc, pc->cga40 ? 1 : 2); 1090 1095 1091 1096 return (0); 1092 1097 } ··· 1102 1107 mem_add_blk (pc->mem, pce_video_get_mem (pc->video), 0); 1103 1108 mem_add_blk (pc->prt, pce_video_get_reg (pc->video), 0); 1104 1109 1105 - pc_set_video_mode (pc, 2); 1110 + pc_set_video_mode (pc, pc->cga40 ? 1 : 2); 1106 1111 1107 1112 return (0); 1108 1113 } ··· 1134 1139 mem_add_blk (pc->mem, pce_video_get_mem (pc->video), 0); 1135 1140 mem_add_blk (pc->prt, pce_video_get_reg (pc->video), 0); 1136 1141 1137 - pc_set_video_mode (pc, 2); 1142 + pc_set_video_mode (pc, pc->cga40 ? 1 : 2); 1138 1143 1139 1144 return (0); 1140 1145 }
+2 -1
src/arch/ibmpc/ibmpc.h
··· 5 5 /***************************************************************************** 6 6 * File name: src/arch/ibmpc/ibmpc.h * 7 7 * Created: 2001-05-01 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2001-2019 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2001-2021 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 121 121 int support_rtc; 122 122 123 123 char blink; 124 + char cga40; 124 125 char force_keyboard_enable; 125 126 126 127 unsigned fd_cnt;
+4
src/arch/ibmpc/pce-ibmpc.cfg.in
··· 40 40 # Enable read access to the host's RTC. 41 41 rtc = 1 42 42 43 + # When a CGA compatible video card is selected, start up 44 + # in 40 column mode. 45 + cga40 = 0 46 + 43 47 # Patch the main BIOS before the emulator starts running. 44 48 # If this option is set, the main BIOS is patched to use 45 49 # a custom initialization routine.