Added the Tulip PC Compact 2, the Tulip DGA font ROM, and assorted font ROM-related improvements.

This commit is contained in:
OBattler
2025-06-15 02:55:32 +02:00
parent b394480a06
commit 30ae882263
11 changed files with 238 additions and 19 deletions

View File

@@ -777,6 +777,18 @@ cga_standalone_init(UNUSED(const device_t *info))
}
}
switch(device_get_config_int("font")) {
case 0:
loadfont(FONT_IBM_MDA_437_PATH, 0);
break;
case 1:
loadfont(FONT_IBM_MDA_437_NORDIC_PATH, 0);
break;
case 4:
loadfont(FONT_TULIP_DGA_PATH, 0);
break;
}
return cga;
}
@@ -880,6 +892,22 @@ const device_config_t cga_config[] = {
},
.bios = { { 0 } }
},
{
.name = "font",
.description = "Font",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "US (CP 437)", .value = 0 },
{ .description = "IBM Nordic (CP 437-Nordic)", .value = 1 },
{ .description = "Tulip DGA", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "snow_enabled",
.description = "Snow emulation",

View File

@@ -555,6 +555,9 @@ hercules_init(UNUSED(const device_t *info))
case 3:
loadfont(FONT_KAMCL16_PATH, 0);
break;
case 4:
loadfont(FONT_TULIP_DGA_PATH, 0);
break;
}
timer_add(&dev->timer, hercules_poll, dev, 1);
@@ -649,17 +652,6 @@ static const device_config_t hercules_config[] = {
},
.bios = { { 0 } }
},
{
.name = "blend",
.description = "Blend",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "font",
.description = "Font",
@@ -673,10 +665,22 @@ static const device_config_t hercules_config[] = {
{ .description = "IBM Nordic (CP 437-Nordic)", .value = 1 },
{ .description = "Czech Kamenicky (CP 895) #1", .value = 2 },
{ .description = "Czech Kamenicky (CP 895) #2", .value = 3 },
{ .description = "Tulip DGA", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "blend",
.description = "Blend",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};

View File

@@ -992,6 +992,24 @@ incolor_init(UNUSED(const device_t *info))
dev->vram = (uint8_t *) malloc(0x40000); /* 4 planes of 64k */
switch(device_get_config_int("font")) {
case 0:
loadfont(FONT_IBM_MDA_437_PATH, 0);
break;
case 1:
loadfont(FONT_IBM_MDA_437_NORDIC_PATH, 0);
break;
case 2:
loadfont(FONT_KAM_PATH, 0);
break;
case 3:
loadfont(FONT_KAMCL16_PATH, 0);
break;
case 4:
loadfont(FONT_TULIP_DGA_PATH, 0);
break;
}
timer_add(&dev->timer, incolor_poll, dev, 1);
mem_mapping_add(&dev->mapping, 0xb0000, 0x08000,
@@ -1044,6 +1062,30 @@ speed_changed(void *priv)
recalc_timings(dev);
}
static const device_config_t incolor_config[] = {
// clang-format off
{
.name = "font",
.description = "Font",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "US (CP 437)", .value = 0 },
{ .description = "IBM Nordic (CP 437-Nordic)", .value = 1 },
{ .description = "Czech Kamenicky (CP 895) #1", .value = 2 },
{ .description = "Czech Kamenicky (CP 895) #2", .value = 3 },
{ .description = "Tulip DGA", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t incolor_device = {
.name = "Hercules InColor",
.internal_name = "incolor",
@@ -1055,5 +1097,5 @@ const device_t incolor_device = {
.available = NULL,
.speed_changed = speed_changed,
.force_redraw = NULL,
.config = NULL
.config = incolor_config
};

View File

@@ -629,6 +629,24 @@ herculesplus_init(UNUSED(const device_t *info))
dev->vram = (uint8_t *) malloc(0x10000); /* 64k VRAM */
dev->monitor_index = monitor_index_global;
switch(device_get_config_int("font")) {
case 0:
loadfont(FONT_IBM_MDA_437_PATH, 0);
break;
case 1:
loadfont(FONT_IBM_MDA_437_NORDIC_PATH, 0);
break;
case 2:
loadfont(FONT_KAM_PATH, 0);
break;
case 3:
loadfont(FONT_KAMCL16_PATH, 0);
break;
case 4:
loadfont(FONT_TULIP_DGA_PATH, 0);
break;
}
timer_add(&dev->timer, herculesplus_poll, dev, 1);
mem_mapping_add(&dev->mapping, 0xb0000, 0x08000,
@@ -715,6 +733,24 @@ static const device_config_t herculesplus_config[] = {
},
.bios = { { 0 } }
},
{
.name = "font",
.description = "Font",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "US (CP 437)", .value = 0 },
{ .description = "IBM Nordic (CP 437-Nordic)", .value = 1 },
{ .description = "Czech Kamenicky (CP 895) #1", .value = 2 },
{ .description = "Czech Kamenicky (CP 895) #2", .value = 3 },
{ .description = "Tulip DGA", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "blend",
.description = "Blend",

View File

@@ -337,13 +337,15 @@ mda_standalone_init(UNUSED(const device_t *info))
case 1:
loadfont(FONT_IBM_MDA_437_NORDIC_PATH, 0);
break;
case 2:
loadfont(FONT_KAM_PATH, 0);
break;
case 3:
loadfont(FONT_KAMCL16_PATH, 0);
break;
case 4:
loadfont(FONT_TULIP_DGA_PATH, 0);
break;
}
mem_mapping_add(&mda->mapping, 0xb0000, 0x08000,
@@ -419,6 +421,7 @@ static const device_config_t mda_config[] = {
{ .description = "IBM Nordic (CP 437-Nordic)", .value = 1 },
{ .description = "Czech Kamenicky (CP 895) #1", .value = 2 },
{ .description = "Czech Kamenicky (CP 895) #2", .value = 3 },
{ .description = "Tulip DGA", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }