Added ability to choose monochrome displays (green, amber, and gray) for CGA MDA, and Hercules graphics cards, based on VileRancour's DOSBox patch.

This commit is contained in:
OBattler
2017-02-19 16:36:43 +01:00
parent b440d749de
commit 92be9c98df
10 changed files with 208 additions and 78 deletions

View File

@@ -10,6 +10,9 @@
#include "timer.h"
#include "video.h"
#include "vid_mda.h"
#ifndef __unix
#include "win-cgapal.h"
#endif
typedef struct mda_t
{
@@ -298,6 +301,11 @@ void *mda_init()
overscan_x = overscan_y = 0;
#ifndef __unix
cga_palette = device_get_config_int("rgb_type");
rebuild_cgapal();
#endif
return mda;
}
@@ -316,6 +324,40 @@ void mda_speed_changed(void *p)
mda_recalctimings(mda);
}
#ifndef __unix
static mda_config_t hercules_config[] =
{
{
.name = "rgb_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.selection =
{
{
.description = "Default 4-color",
.value = 0
},
{
.description = "Green, 4-color",
.value = 1
},
{
.description = "Amber, 4-color",
.value = 3
},
{
.description = "Gray, 4-color",
.value = 5
},
{
.description = ""
}
},
.default_int = 0
}
};
#endif
device_t mda_device =
{
"MDA",
@@ -325,5 +367,10 @@ device_t mda_device =
NULL,
mda_speed_changed,
NULL,
#ifdef __unix
NULL
#else
NULL,
mda_config
#endif
};