Merge branch 'bugfixes' of https://github.com/starfrost013/86Box into bugfixes

This commit is contained in:
starfrost013
2025-06-10 22:55:08 +01:00
9 changed files with 264 additions and 88 deletions

View File

@@ -212,7 +212,7 @@ isarom_init(const device_t *info)
static const device_config_t isarom_config[] = {
{
.name = "bios_fn",
.description = "BIOS File",
.description = "BIOS file",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
@@ -234,7 +234,7 @@ static const device_config_t isarom_config[] = {
},
{
.name = "bios_size",
.description = "BIOS Size:",
.description = "BIOS size",
.type = CONFIG_INT,
.default_string = NULL,
.default_int = 8192,
@@ -260,7 +260,7 @@ static const device_config_t isarom_config[] = {
static const device_config_t isarom_dual_config[] = {
{
.name = "bios_fn",
.description = "BIOS File (ROM #1)",
.description = "BIOS file (ROM #1)",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
@@ -271,7 +271,7 @@ static const device_config_t isarom_dual_config[] = {
},
{
.name = "bios_addr",
.description = "BIOS Address (ROM #1)",
.description = "BIOS address (ROM #1)",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0x00000,
@@ -282,7 +282,7 @@ static const device_config_t isarom_dual_config[] = {
},
{
.name = "bios_size",
.description = "BIOS Size (ROM #1):",
.description = "BIOS size (ROM #1)",
.type = CONFIG_INT,
.default_string = NULL,
.default_int = 8192,
@@ -304,7 +304,7 @@ static const device_config_t isarom_dual_config[] = {
},
{
.name = "bios_fn2",
.description = "BIOS File (ROM #2)",
.description = "BIOS file (ROM #2)",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
@@ -315,7 +315,7 @@ static const device_config_t isarom_dual_config[] = {
},
{
.name = "bios_addr2",
.description = "BIOS Address (ROM #2)",
.description = "BIOS address (ROM #2)",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0x00000,
@@ -326,7 +326,7 @@ static const device_config_t isarom_dual_config[] = {
},
{
.name = "bios_size2",
.description = "BIOS Size (ROM #2):",
.description = "BIOS size (ROM #2)",
.type = CONFIG_INT,
.default_string = NULL,
.default_int = 8192,
@@ -352,7 +352,7 @@ static const device_config_t isarom_dual_config[] = {
static const device_config_t isarom_quad_config[] = {
{
.name = "bios_fn",
.description = "BIOS File (ROM #1)",
.description = "BIOS file (ROM #1)",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
@@ -363,7 +363,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_addr",
.description = "BIOS Address (ROM #1)",
.description = "BIOS address (ROM #1)",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0x00000,
@@ -374,7 +374,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_size",
.description = "BIOS Size (ROM #1):",
.description = "BIOS size (ROM #1)",
.type = CONFIG_INT,
.default_string = NULL,
.default_int = 8192,
@@ -396,7 +396,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_fn2",
.description = "BIOS File (ROM #2)",
.description = "BIOS file (ROM #2)",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
@@ -407,7 +407,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_addr2",
.description = "BIOS Address (ROM #2)",
.description = "BIOS address (ROM #2)",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0x00000,
@@ -418,7 +418,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_size2",
.description = "BIOS Size (ROM #2):",
.description = "BIOS size (ROM #2)",
.type = CONFIG_INT,
.default_string = NULL,
.default_int = 8192,
@@ -440,7 +440,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_fn3",
.description = "BIOS File (ROM #3)",
.description = "BIOS file (ROM #3)",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
@@ -451,7 +451,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_addr3",
.description = "BIOS Address (ROM #3)",
.description = "BIOS address (ROM #3)",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0x00000,
@@ -462,7 +462,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_size3",
.description = "BIOS Size (ROM #3):",
.description = "BIOS size (ROM #3)",
.type = CONFIG_INT,
.default_string = NULL,
.default_int = 8192,
@@ -484,7 +484,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_fn4",
.description = "BIOS File (ROM #4)",
.description = "BIOS file (ROM #4)",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
@@ -495,7 +495,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_addr4",
.description = "BIOS Address (ROM #4)",
.description = "BIOS address (ROM #4)",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0x00000,
@@ -506,7 +506,7 @@ static const device_config_t isarom_quad_config[] = {
},
{
.name = "bios_size4",
.description = "BIOS Size (ROM #4):",
.description = "BIOS size (ROM #4)",
.type = CONFIG_INT,
.default_string = NULL,
.default_int = 8192,

View File

@@ -109,7 +109,7 @@ static const device_config_t keycard_config[] = {
};
const device_t novell_keycard_device = {
.name = "Novell Netware 2.x Key Card",
.name = "Novell NetWare 2.x Key Card",
.internal_name = "mssystems",
.flags = DEVICE_ISA,
.local = 0,

View File

@@ -183,7 +183,7 @@ static const device_config_t monster_fdc_config[] = {
#if 0
{
.name = "bios_size",
.description = "BIOS Size:",
.description = "BIOS size",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 32,

View File

@@ -1128,7 +1128,7 @@ machine_at_3302_init(const machine_t *model)
device_add(&fdc_at_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(&paradise_pvga1a_ncr3302_device);
device_add(machine_get_vid_device(machine));
device_add(&keyboard_at_ncr_device);

View File

@@ -2447,7 +2447,7 @@ machine_at_actionpc2600_init(const machine_t *model)
device_add(&keyboard_ps2_tg_ami_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(&tgui9440_onboard_pci_device);
device_add(machine_get_vid_device(machine));
return ret;
}
@@ -2479,7 +2479,7 @@ machine_at_actiontower8400_init(const machine_t *model)
device_add(&intel_flash_bxt_device); // The ActionPC 2600 has this so I'm gonna assume this does too.
device_add(&keyboard_ps2_ami_pci_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(&gd5430_onboard_pci_device);
device_add(machine_get_vid_device(machine));
return ret;
}

View File

@@ -3693,7 +3693,7 @@ const machine_t machines[] = {
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.vid_device = &paradise_pvga1a_ncr3302_device,
.snd_device = NULL,
.net_device = NULL
},
@@ -9236,7 +9236,7 @@ const machine_t machines[] = {
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.vid_device = &tgui9440_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
@@ -9277,7 +9277,7 @@ const machine_t machines[] = {
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.vid_device = &gd5430_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},

View File

@@ -598,7 +598,10 @@ msgid "ISA RTC:"
msgstr "ISA RTC:"
msgid "ISA Memory Expansion"
msgstr "Карта расширения памяти ISA"
msgstr "Карты расширения памяти ISA"
msgid "ISA ROM Cards"
msgstr "Карты ПЗУ ISA"
msgid "Card 1:"
msgstr "Карта 1:"
@@ -1237,7 +1240,7 @@ msgid "Pen"
msgstr "Ручка"
msgid "Host CD/DVD Drive (%1:)"
msgstr "CD/DVD-привод хоста (%1:)"
msgstr "CD/DVD Привод хоста (%1:)"
msgid "&Connected"
msgstr "&Кабель подключен"
@@ -1249,7 +1252,7 @@ msgid "Create..."
msgstr "Создать..."
msgid "Host CD/DVD Drive (%1)"
msgstr "CD/DVD-привод хоста (%1)"
msgstr "CD/DVD Привод хоста (%1)"
msgid "Unknown Bus"
msgstr "Неизвестная шина"
@@ -1413,12 +1416,54 @@ msgstr "Системный MIDI"
msgid "MIDI Input Device"
msgstr "Устройство ввода MIDI"
msgid "BIOS file"
msgstr "Файл BIOS"
msgid "BIOS file (ROM #1)"
msgstr "Файл BIOS (ПЗУ #1)"
msgid "BIOS file (ROM #2)"
msgstr "Файл BIOS (ПЗУ #2)"
msgid "BIOS file (ROM #3)"
msgstr "Файл BIOS (ПЗУ #3)"
msgid "BIOS file (ROM #4)"
msgstr "Файл BIOS (ПЗУ #4)"
msgid "BIOS Address"
msgstr "Адрес BIOS"
msgid "BIOS address (ROM #1)"
msgstr "Адрес BIOS (ПЗУ #1)"
msgid "BIOS address (ROM #2)"
msgstr "Адрес BIOS (ПЗУ #2)"
msgid "BIOS address (ROM #3)"
msgstr "Адрес BIOS (ПЗУ #3)"
msgid "BIOS address (ROM #4)"
msgstr "Адрес BIOS (ПЗУ #4)"
msgid "Enable BIOS extension ROM Writes"
msgstr "Разрешить запись в ПЗУ расширения BIOS"
msgid "Enable BIOS extension ROM Writes (ROM #1)"
msgstr "Разрешить запись в ПЗУ расширения BIOS (ПЗУ #1)"
msgid "Enable BIOS extension ROM Writes (ROM #2)"
msgstr "Разрешить запись в ПЗУ расширения BIOS (ПЗУ #2)"
msgid "Enable BIOS extension ROM Writes (ROM #3)"
msgstr "Разрешить запись в ПЗУ расширения BIOS (ПЗУ #3)"
msgid "Enable BIOS extension ROM Writes (ROM #4)"
msgstr "Разрешить запись в ПЗУ расширения BIOS (ПЗУ #4)"
msgid "Linear framebuffer base"
msgstr "Линейная база кадрового буфера"
msgid "Address"
msgstr "Адрес"
@@ -1428,6 +1473,21 @@ msgstr "IRQ"
msgid "BIOS Revision"
msgstr "Версия BIOS"
msgid "BIOS Version"
msgstr "Версия BIOS"
msgid "BIOS Versions"
msgstr "Версии BIOS"
msgid "BIOS Language"
msgstr "Язык BIOS"
msgid "IBM 5161 Expansion Unit"
msgstr "Блок расширения IBM 5161"
msgid "IBM Cassette Basic"
msgstr "Кассетный бейсик IBM"
msgid "Translate 26 -> 17"
msgstr "Переводить 26 -> 17"
@@ -1443,6 +1503,18 @@ msgstr "Инвертировать цвета"
msgid "BIOS size"
msgstr "Размер BIOS"
msgid "BIOS size (ROM #1)"
msgstr "Размер BIOS (ПЗУ #1)"
msgid "BIOS size (ROM #2)"
msgstr "Размер BIOS (ПЗУ #2)"
msgid "BIOS size (ROM #3)"
msgstr "Размер BIOS (ПЗУ #3)"
msgid "BIOS size (ROM #4)"
msgstr "Размер BIOS (ПЗУ #4)"
msgid "Map C0000-C7FFF as UMB"
msgstr "Отображение C0000-C7FFF в качестве UMB"
@@ -1518,6 +1590,9 @@ msgstr "Уровень реверберации"
msgid "Interpolation Method"
msgstr "Метод интерполяции"
msgid "Dynamic Sample Loading"
msgstr "Динамическая загрузка сэмплов"
msgid "Reverb Output Gain"
msgstr "Усиление выходного сигнала ревербератора"
@@ -1606,7 +1681,7 @@ msgid "Enable Game port"
msgstr "Включить игровой порт"
msgid "Surround module"
msgstr "Модуль объемного звучания"
msgstr "Модуль объёмного звучания"
msgid "CODEC"
msgstr "Кодек"
@@ -1617,6 +1692,9 @@ msgstr "Поднимать прерывание кодека при настро
msgid "SB Address"
msgstr "Адрес SB"
msgid "Use EEPROM setting"
msgstr "Использовать настройку EEPROM"
msgid "WSS IRQ"
msgstr "IRQ WSS"
@@ -1701,6 +1779,9 @@ msgstr "Тип RAMDAC"
msgid "Blend"
msgstr "Смесь"
msgid "Font"
msgstr "Шрифт"
msgid "Bilinear filtering"
msgstr "Билинейная фильтрация"
@@ -1746,6 +1827,33 @@ msgstr "Скорость передачи данных"
msgid "EMS mode"
msgstr "Режим EMS"
msgid "EMS Address"
msgstr "Адрес EMS"
msgid "EMS 1 Address"
msgstr "Адрес EMS 1"
msgid "EMS 2 Address"
msgstr "Адрес EMS 2"
msgid "EMS Memory Size"
msgstr "Размер памяти EMS"
msgid "EMS 1 Memory Size"
msgstr "Размер памяти EMS 1"
msgid "EMS 2 Memory Size"
msgstr "Размер памяти EMS 2"
msgid "Enable EMS"
msgstr "Включить EMS"
msgid "Enable EMS 1"
msgstr "Включить EMS 1"
msgid "Enable EMS 2"
msgstr "Включить EMS 2"
msgid "Address for > 2 MB"
msgstr "Адрес для > 2 МБ"
@@ -1765,10 +1873,10 @@ msgid "BIOS setting + Hotkeys (off during POST)"
msgstr "Настройка BIOS + горячие клавиши (отключается во время POST)"
msgid "64 kB starting from F0000"
msgstr "64 кБ, начиная с F0000"
msgstr "64 КБ, начиная с F0000"
msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)"
msgstr "128 кБ, начиная с E0000 (адрес MSB инвертирован, сначала последние 64 КБ)"
msgstr "128 КБ, начиная с E0000 (адрес MSB инвертирован, сначала последние 64 КБ)"
msgid "Sine"
msgstr "Синусоидальная"
@@ -1792,7 +1900,7 @@ msgid "45 Hz (JMP2 not populated)"
msgstr "45 Гц (без джампера на JMP2)"
msgid "Two"
msgstr "Два"
msgstr "Две"
msgid "Three"
msgstr "Три"
@@ -1935,6 +2043,9 @@ msgstr "Янтарный"
msgid "Gray"
msgstr "Серый"
msgid "Grayscale"
msgstr "Монохромный"
msgid "Color"
msgstr "Цветной"
@@ -1950,6 +2061,12 @@ msgstr "Другие языки"
msgid "Bochs latest"
msgstr "Bochs последний"
msgid "Apply overscan deltas"
msgstr "Применить дельты вылетов развёртки"
msgid "Mono Interlaced"
msgstr "Монохромный с чересстрочной развёрткой"
msgid "Mono Non-Interlaced"
msgstr "Монохромный без чересстрочной развёртки"
@@ -2095,7 +2212,7 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t
msgstr "Шрифты TrueType в каталоге \"roms/printer/fonts\" необходимы для эмуляции стандартного матричного принтера ESC/P."
msgid "Inhibit multimedia keys"
msgstr "Перехватывать мультимедиа-клавиши"
msgstr "Перехватывать мультимедийные клавиши"
msgid "Ask for confirmation before saving settings"
msgstr "Запрашивать подтверждение перед сохранением настроек"
@@ -2182,7 +2299,7 @@ msgid "Send Control+Alt+Escape"
msgstr "Отправить Control+Alt+Escape"
msgid "Toggle fullscreen"
msgstr "Переключить на полноэкранный режим"
msgstr "Переключить полноэкранный режим"
msgid "Screenshot"
msgstr "Скриншот"

View File

@@ -174,7 +174,7 @@ compaq_plasma_out(uint16_t addr, uint8_t val, void *priv)
Another source (Ralf Brown?) gives 4 = CGA, 5 = EGA, 7 = MDA;
This leads me to believe bit 2 is not relevant to the mode.
*/
if ((val & 0x03) == 0x03)
if ((val & 0x07) == 0x03)
mem_mapping_set_addr(&self->cga.mapping, 0xb0000, 0x08000);
else
mem_mapping_set_addr(&self->cga.mapping, 0xb8000, 0x08000);
@@ -182,7 +182,6 @@ compaq_plasma_out(uint16_t addr, uint8_t val, void *priv)
case 0x23c6:
self->port_23c6 = val;
compaq_plasma_recalcattrs(self);
break;
case 0x27c6:
@@ -221,10 +220,6 @@ compaq_plasma_in(uint16_t addr, void *priv)
case 0x13c6:
ret = self->port_13c6;
#if 0
if ((self->cga.cgamode & 0x28) == 0x00)
ret |= 0x04;
#endif
break;
case 0x17c6:
@@ -264,11 +259,15 @@ compaq_plasma_poll(void *priv)
int cursorline;
int blink = 0;
int underline = 0;
int cursorvisible = 0;
int cursorinvisible = 0;
int c;
int x;
uint32_t ink = 0;
uint32_t fg = (self->cga.cgacol & 0x0f) ? amber : black;
uint32_t bg = black;
uint32_t black_half = black;
uint32_t amber_half = amber;
uint32_t cols[2];
uint8_t dat;
uint8_t pattern;
@@ -304,8 +303,19 @@ compaq_plasma_poll(void *priv)
if ((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x60) == 0x20)
cursorline = 0;
else
cursorline = (((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) << 1) <= scanline) && (((self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) << 1) >= scanline);
else {
if ((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) > 0x07)
cursorvisible = (self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) + 1;
else
cursorvisible = ((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) << 1);
if ((self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) > 0x07)
cursorinvisible = (self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) + 2;
else
cursorinvisible = ((self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) << 1);
cursorline = (cursorvisible <= scanline) && (cursorinvisible >= sc);
}
/* for each text column */
for (x = 0; x < 80; x++) {
@@ -319,12 +329,13 @@ compaq_plasma_poll(void *priv)
chr = 0x00;
attr = 0x00;
}
uint8_t hi_bit = attr & 0x08;
/* check if cursor has to be drawn */
drawcursor = ((memaddr == cursoraddr) && cursorline && (self->cga.cgamode & 0x08) && (self->cga.cgablink & 0x10));
/* check if character underline mode should be set */
underline = ((attr & 0x07) == 0x01);
underline = underline || (((self->port_23c6 >> 5) == 2) && hi_bit);
underline = underline || (((self->port_23c6 >> 5) == 1) && hi_bit);
if (underline) {
/* set forecolor to white */
attr = attr | 0x7;
@@ -353,7 +364,7 @@ compaq_plasma_poll(void *priv)
chr_addr |= 0x1000;
/* character underline active and 7th row of pixels in character height being drawn */
if (underline && (scanline == 7)) {
if (underline) {
/* for each pixel in character width */
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 3) + c] = mdaattr[attr][blink][1];
@@ -366,15 +377,39 @@ compaq_plasma_poll(void *priv)
}
if (hi_bit) {
if ((self->port_23c6 >> 5) == 1) {
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 3) + c] ^= (amber ^ black);
} else if ((self->port_23c6 >> 5) == 4) {
for (c = 0; c < 8; c++) {
uint32_t b = ((buffer32->line[self->cga.displine][(x << 3) + c]) >> 1) & 0x7f;
uint32_t g = ((buffer32->line[self->cga.displine][(x << 3) + c]) >> 9) & 0x7f;
uint32_t r = ((buffer32->line[self->cga.displine][(x << 3) + c]) >> 17) & 0x7f;
buffer32->line[self->cga.displine][(x << 3) + c] = b | (g << 8) || (r << 16);
if ((self->port_23c6 >> 5) == 4) {
uint8_t b = (cols[1] & 0xff) >> 1;
uint8_t g = ((cols[1] >> 8) & 0xff) >> 1;
uint8_t r = ((cols[1] >> 16) & 0xff) >> 1;
cols[1] = b | (g << 8) | (r << 16);
b = (cols[0] & 0xff) >> 1;
g = ((cols[0] >> 8) & 0xff) >> 1;
r = ((cols[0] >> 16) & 0xff) >> 1;
cols[0] = b | (g << 8) | (r << 16);
if (drawcursor) {
black_half = black;
amber_half = amber;
uint8_t bB = (black & 0xff) >> 1;
uint8_t gB = ((black >> 8) & 0xff) >> 1;
uint8_t rB = ((black >> 16) & 0xff) >> 1;
black_half = bB | (gB << 8) | (rB << 16);
uint8_t bA = (amber & 0xff) >> 1;
uint8_t gA = ((amber >> 8) & 0xff) >> 1;
uint8_t rA = ((amber >> 16) & 0xff) >> 1;
amber_half = bA | (gA << 8) | (rA << 16);
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber_half ^ black_half);
} else {
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 1 : 0];
}
} else if ((self->port_23c6 >> 5) == 2) {
if (drawcursor) {
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 0 : 1] ^ (amber ^ black);
} else {
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 0 : 1];
}
}
}
@@ -389,8 +424,19 @@ compaq_plasma_poll(void *priv)
if ((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x60) == 0x20)
cursorline = 0;
else
cursorline = (((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) << 1) <= scanline) && (((self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) << 1) >= scanline);
else {
if ((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) > 0x07)
cursorvisible = (self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) + 1;
else
cursorvisible = ((self->cga.crtc[CGA_CRTC_CURSOR_START] & 0x0f) << 1);
if ((self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) > 0x07)
cursorinvisible = (self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) + 2;
else
cursorinvisible = ((self->cga.crtc[CGA_CRTC_CURSOR_END] & 0x0f) << 1);
cursorline = (cursorvisible <= scanline) && (cursorinvisible >= sc);
}
for (x = 0; x < 40; x++) {
/* video output enabled */
@@ -403,12 +449,13 @@ compaq_plasma_poll(void *priv)
chr = 0x00;
attr = 0x00;
}
uint8_t hi_bit = attr & 0x08;
/* check if cursor has to be drawn */
drawcursor = ((memaddr == cursoraddr) && cursorline && (self->cga.cgamode & 0x08) && (self->cga.cgablink & 0x10));
/* check if character underline mode should be set */
underline = ((attr & 0x07) == 0x01);
underline = underline || (((self->port_23c6 >> 5) == 2) && hi_bit);
underline = underline || (((self->port_23c6 >> 5) == 1) && hi_bit);
if (underline) {
/* set forecolor to white */
attr = attr | 0x7;
@@ -450,18 +497,41 @@ compaq_plasma_poll(void *priv)
}
if (hi_bit) {
if ((self->port_23c6 >> 5) == 1)
for (c = 0; c < 8; c++) {
buffer32->line[self->cga.displine][(x << 4) + (c << 1)] ^= (amber ^ black);
buffer32->line[self->cga.displine][(x << 4) + (c << 1) + 1] ^= (amber ^ black);
if ((self->port_23c6 >> 5) == 4) {
uint8_t b = (cols[1] & 0xff) >> 1;
uint8_t g = ((cols[1] >> 8) & 0xff) >> 1;
uint8_t r = ((cols[1] >> 16) & 0xff) >> 1;
cols[1] = b | (g << 8) | (r << 16);
b = (cols[0] & 0xff) >> 1;
g = ((cols[0] >> 8) & 0xff) >> 1;
r = ((cols[0] >> 16) & 0xff) >> 1;
cols[0] = b | (g << 8) | (r << 16);
if (drawcursor) {
black_half = black;
amber_half = amber;
uint8_t bB = (black & 0xff) >> 1;
uint8_t gB = ((black >> 8) & 0xff) >> 1;
uint8_t rB = ((black >> 16) & 0xff) >> 1;
black_half = bB | (gB << 8) | (rB << 16);
uint8_t bA = (amber & 0xff) >> 1;
uint8_t gA = ((amber >> 8) & 0xff) >> 1;
uint8_t rA = ((amber >> 16) & 0xff) >> 1;
amber_half = bA | (gA << 8) | (rA << 16);
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 4) + (c << 1)] = buffer32->line[self->cga.displine][(x << 4) + (c << 1) + 1] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber_half ^ black_half);
} else {
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 4) + (c << 1)] = buffer32->line[self->cga.displine][(x << 4) + (c << 1) + 1] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 1 : 0];
}
else if ((self->port_23c6 >> 5) == 4)
for (c = 0; c < 8; c++) {
uint32_t b = ((buffer32->line[self->cga.displine][(x << 4) + (c << 1)]) >> 1) & 0x7f;
uint32_t g = ((buffer32->line[self->cga.displine][(x << 4) + (c << 1)]) >> 9) & 0x7f;
uint32_t r = ((buffer32->line[self->cga.displine][(x << 4) + (c << 1)]) >> 17) & 0x7f;
buffer32->line[self->cga.displine][(x << 4) + (c << 1)] = buffer32->line[self->cga.displine][(x << 4) + (c << 1) + 1] = b | (g << 8) || (r << 16);
} else if ((self->port_23c6 >> 5) == 2) {
if (drawcursor) {
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 4) + (c << 1)] = buffer32->line[self->cga.displine][(x << 4) + (c << 1) + 1] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 0 : 1] ^ (amber ^ black);
} else {
for (c = 0; c < 8; c++)
buffer32->line[self->cga.displine][(x << 4) + (c << 1)] = buffer32->line[self->cga.displine][(x << 4) + (c << 1) + 1] = cols[(self->font_ram[chr_addr] & (1 << (c ^ 7))) ? 0 : 1];
}
}
}
memaddr++;
}
@@ -638,30 +708,18 @@ compaq_plasma_recalcattrs(compaq_plasma_t *self)
for (n = 0x11; n <= 0xFF; n++) {
if ((n & 7) == 0)
continue;
if ((self->port_23c6 >> 5) == 1) { /* Inverse */
blinkcols[n][0] = normcols[n][0] = amber;
blinkcols[n][1] = normcols[n][1] = black;
} else { /* Normal */
blinkcols[n][0] = normcols[n][0] = black;
blinkcols[n][1] = normcols[n][1] = amber;
}
blinkcols[n][0] = normcols[n][0] = black;
blinkcols[n][1] = normcols[n][1] = amber;
}
/* Set up the 01-0E range, controlled by bits 0 and 1 of the
* passed value. When blinking is enabled this also affects 81-8E. */
for (n = 0x01; n <= 0x0E; n++) {
if (n == 7)
continue;
if ((self->port_23c6 >> 5) == 1) {
blinkcols[n][0] = normcols[n][0] = amber;
blinkcols[n][1] = normcols[n][1] = black;
blinkcols[n + 128][0] = amber;
blinkcols[n + 128][1] = black;
} else {
blinkcols[n][0] = normcols[n][0] = black;
blinkcols[n][1] = normcols[n][1] = amber;
blinkcols[n + 128][0] = black;
blinkcols[n + 128][1] = amber;
}
blinkcols[n][0] = normcols[n][0] = black;
blinkcols[n][1] = normcols[n][1] = amber;
blinkcols[n + 128][0] = black;
blinkcols[n + 128][1] = amber;
}
/* Colours 07 and 0F are always amber on black. If blinking is
* enabled so are 87 and 8F. */
@@ -720,6 +778,7 @@ compaq_plasma_init(UNUSED(const device_t *info))
io_sethandler(0x03d0, 0x0010, compaq_plasma_in, NULL, NULL, compaq_plasma_out, NULL, NULL, self);
overscan_x = overscan_y = 16;
compaq_plasma_recalcattrs(self);
self->cga.rgb_type = device_get_config_int("rgb_type");
cga_palette = (self->cga.rgb_type << 1);

View File

@@ -3441,7 +3441,7 @@ static const device_config_t da2_configuration[] = {
// clang-format off
{
.name = "charset",
.description = "Charset",
.description = "Character set",
.type = CONFIG_SELECTION,
.default_int = DA2_DCONFIG_CHARSET_JPAN,
.selection = {