The Trigem 286M is now correctly initialized without IDE, fixes non-IDE hard disk controllers (eg. MFM);

A small change to how the video font array resetting is done, to correctly allow for internal Korean graphics cards, fixes the emulator segfaulting in some cases with the Trigem 286M and the internal Korean ET4000AX.
This commit is contained in:
OBattler
2018-08-16 03:18:53 +02:00
parent f4deff44a1
commit d6e4291a68
5 changed files with 21 additions and 11 deletions

View File

@@ -533,7 +533,10 @@ headland_init(void)
void
machine_at_headland_init(const machine_t *model)
{
machine_at_common_ide_init(model);
if (romset == ROM_TG286M)
machine_at_common_init(model);
else
machine_at_common_ide_init(model);
device_add(&keyboard_at_ami_device);
device_add(&fdc_at_device);

View File

@@ -8,7 +8,7 @@
*
* Main emulator module where most things are controlled.
*
* Version: @(#)pc.c 1.0.74 2018/08/04
* Version: @(#)pc.c 1.0.75 2018/08/16
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -766,6 +766,7 @@ pc_reset_hard_init(void)
scsi_disk_hard_reset();
/* Initialize the actual machine and its basic modules. */
video_font_reset(); /* Reset (deallocate) the video font arrays. */
machine_init();
fdd_reset();

View File

@@ -8,7 +8,7 @@
*
* Define all known video cards.
*
* Version: @(#)vid_table.c 1.0.32 2018/08/16
* Version: @(#)vid_table.c 1.0.33 2018/08/16
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
@@ -196,6 +196,16 @@ vid_table_log(const char *fmt, ...)
}
void
video_font_reset(void)
{
if (fontdatksc5601) {
free(fontdatksc5601);
fontdatksc5601 = NULL;
}
}
void
video_reset(int card)
{
@@ -206,11 +216,6 @@ video_reset(int card)
cga_palette = 0;
cgapal_rebuild();
if (fontdatksc5601) {
free(fontdatksc5601);
fontdatksc5601 = NULL;
}
/* Do not initialize internal cards here. */
if (!(card == GFX_NONE) && \
!(card == GFX_INTERNAL) && !machines[machine].fixed_gfxcard) {

View File

@@ -40,7 +40,7 @@
* W = 3 bus clocks
* L = 4 bus clocks
*
* Version: @(#)video.c 1.0.23 2018/05/25
* Version: @(#)video.c 1.0.24 2018/08/16
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -79,8 +79,8 @@ uint8_t fontdat[2048][8]; /* IBM CGA font */
uint8_t fontdatm[2048][16]; /* IBM MDA font */
uint8_t fontdatw[512][32]; /* Wyse700 font */
uint8_t fontdat8x12[256][16]; /* MDSI Genius font */
dbcs_font_t *fontdatksc5601; /* Korean KSC-5601 font */
dbcs_font_t *fontdatksc5601_user; /* Korean KSC-5601 user defined font */
dbcs_font_t *fontdatksc5601 = NULL; /* Korean KSC-5601 font */
dbcs_font_t *fontdatksc5601_user = NULL; /* Korean KSC-5601 user defined font */
uint32_t pal_lookup[256];
int xsize = 1,
ysize = 1;

View File

@@ -243,6 +243,7 @@ extern void updatewindowsize(int x, int y);
extern void video_init(void);
extern void video_close(void);
extern void video_font_reset(void);
extern void video_reset(int card);
extern uint8_t video_force_resize_get(void);
extern void video_force_resize_set(uint8_t res);