Alternate font support for MDA and Hercules
This commit is contained in:
@@ -317,8 +317,32 @@ mda_standalone_init(UNUSED(const device_t *info))
|
||||
|
||||
mda->vram = malloc(0x1000);
|
||||
|
||||
mem_mapping_add(&mda->mapping, 0xb0000, 0x08000, mda_read, NULL, NULL, mda_write, NULL, NULL, NULL, MEM_MAPPING_EXTERNAL, mda);
|
||||
io_sethandler(0x03b0, 0x0010, mda_in, NULL, NULL, mda_out, NULL, NULL, mda);
|
||||
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;
|
||||
}
|
||||
|
||||
mem_mapping_add(&mda->mapping, 0xb0000, 0x08000,
|
||||
mda_read, NULL, NULL,
|
||||
mda_write, NULL, NULL,
|
||||
NULL, MEM_MAPPING_EXTERNAL,
|
||||
mda);
|
||||
|
||||
io_sethandler(0x03b0, 0x0010,
|
||||
mda_in, NULL, NULL,
|
||||
mda_out, NULL, NULL,
|
||||
mda);
|
||||
|
||||
mda_init(mda);
|
||||
|
||||
@@ -369,6 +393,23 @@ static const device_config_t mda_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 = "" }
|
||||
},
|
||||
.bios = { { 0 } }
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user