Merge branch 'master' of ssh://github.com/86Box/86Box into version/4.1
# Conflicts: # CMakeLists.txt # debian/changelog # src/include_make/86box/version.h # src/unix/assets/86Box.spec # src/unix/assets/net.86box.86Box.metainfo.xml # vcpkg.json
This commit is contained in:
@@ -280,7 +280,7 @@ compaq_plasma_poll(void *priv)
|
||||
uint32_t fg = (self->cga.cgacol & 0x0f) ? amber : black;
|
||||
uint32_t bg = black;
|
||||
uint32_t cols[2];
|
||||
uint8_t dat2;
|
||||
uint8_t dat;
|
||||
uint8_t pattern;
|
||||
uint32_t ink0 = 0;
|
||||
uint32_t ink1 = 0;
|
||||
@@ -315,25 +315,25 @@ compaq_plasma_poll(void *priv)
|
||||
addr = ((self->cga.displine >> 1) & 1) * 0x2000 + (self->cga.displine >> 2) * 80 + ((ma & ~1) << 1);
|
||||
}
|
||||
for (uint8_t x = 0; x < 80; x++) {
|
||||
dat2 = self->cga.vram[addr & 0x7FFF];
|
||||
dat = self->cga.vram[addr & 0x7FFF];
|
||||
addr++;
|
||||
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
ink = (dat2 & 0x80) ? fg : bg;
|
||||
ink = (dat & 0x80) ? fg : bg;
|
||||
if (!(self->cga.cgamode & 8))
|
||||
ink = black;
|
||||
(buffer32->line[self->cga.displine])[x * 8 + c] = ink;
|
||||
dat2 <<= 1;
|
||||
dat <<= 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addr = ((self->cga.displine >> 1) & 1) * 0x2000 + (self->cga.displine >> 2) * 80 + ((ma & ~1) << 1);
|
||||
for (uint8_t x = 0; x < 80; x++) {
|
||||
dat2 = self->cga.vram[addr & 0x7fff];
|
||||
dat = self->cga.vram[addr & 0x7fff];
|
||||
addr++;
|
||||
|
||||
for (uint8_t c = 0; c < 4; c++) {
|
||||
pattern = (dat2 & 0xC0) >> 6;
|
||||
pattern = (dat & 0xC0) >> 6;
|
||||
if (!(self->cga.cgamode & 8))
|
||||
pattern = 0;
|
||||
|
||||
@@ -368,7 +368,7 @@ compaq_plasma_poll(void *priv)
|
||||
}
|
||||
buffer32->line[self->cga.displine][x * 8 + 2 * c] = ink0;
|
||||
buffer32->line[self->cga.displine][x * 8 + 2 * c + 1] = ink1;
|
||||
dat2 <<= 2;
|
||||
dat <<= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -386,34 +386,25 @@ compaq_plasma_poll(void *priv)
|
||||
/* for each text column */
|
||||
for (uint8_t x = 0; x < 80; x++) {
|
||||
/* video output enabled */
|
||||
if (self->cga.cgamode & 8) {
|
||||
chr = self->cga.vram[(addr + 2 * x) & 0x7fff];
|
||||
attr = self->cga.vram[(addr + 2 * x + 1) & 0x7fff];
|
||||
} else
|
||||
chr = attr = 0;
|
||||
/* check if cursor has to be drawn */
|
||||
drawcursor = ((ma == ca) && cursorline && self->cga.cursoron);
|
||||
chr = self->cga.vram[(addr + 2 * x) & 0x7FFF];
|
||||
attr = self->cga.vram[(addr + 2 * x + 1) & 0x7FFF];
|
||||
drawcursor = ((ma == ca) && cursorline && (self->cga.cgamode & 8) && (self->cga.cgablink & 16));
|
||||
|
||||
blink = ((self->cga.cgablink & 16) && (self->cga.cgamode & 0x20) && (attr & 0x80) && !drawcursor);
|
||||
underline = ((self->port_23c6 & 0x40) && (attr & 0x1) && !(attr & 0x6));
|
||||
if (underline) {
|
||||
/* set forecolor to white */
|
||||
attr |= 7;
|
||||
}
|
||||
blink = 0;
|
||||
/* blink active */
|
||||
if (self->cga.cgamode & 0x20) {
|
||||
cols[1] = blinkcols[attr][1];
|
||||
cols[0] = blinkcols[attr][0];
|
||||
/* attribute 7 active and not cursor */
|
||||
if ((self->cga.cgablink & 8) && (attr & 0x80) && !self->cga.drawcursor) {
|
||||
if (blink) {
|
||||
/* set blinking */
|
||||
cols[1] = cols[0];
|
||||
blink = 1;
|
||||
}
|
||||
} else {
|
||||
/* Set intensity bit */
|
||||
cols[1] = normcols[attr][1];
|
||||
cols[0] = normcols[attr][0];
|
||||
blink = (attr & 0x80) * 8 + 7 + 16;
|
||||
}
|
||||
/* character underline active and 7th row of pixels in character height being drawn */
|
||||
if (underline && (sc == 7)) {
|
||||
@@ -422,10 +413,10 @@ compaq_plasma_poll(void *priv)
|
||||
buffer32->line[self->cga.displine][(x << 3) + c] = mdaattr[attr][blink][1];
|
||||
} else if (drawcursor) {
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(fontdatm[chr + self->cga.fontbase][sc] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber ^ black);
|
||||
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(fontdatm2[chr + self->cga.fontbase][sc] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber ^ black);
|
||||
} else {
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(fontdatm[chr + self->cga.fontbase][sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
buffer32->line[self->cga.displine][(x << 3) + c] = cols[(fontdatm2[chr + self->cga.fontbase][sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
|
||||
++ma;
|
||||
@@ -441,34 +432,25 @@ compaq_plasma_poll(void *priv)
|
||||
cursorline = ((self->cga.crtc[0x0a] & 0x0f) * 2 <= sc) && ((self->cga.crtc[0x0b] & 0x0F) * 2 >= sc);
|
||||
|
||||
for (uint8_t x = 0; x < 40; x++) {
|
||||
if (self->cga.cgamode & 8) {
|
||||
chr = self->cga.vram[(addr + 2 * x) & 0x7fff];
|
||||
attr = self->cga.vram[(addr + 2 * x + 1) & 0x7fff];
|
||||
} else {
|
||||
chr = attr = 0;
|
||||
}
|
||||
drawcursor = ((ma == ca) && cursorline && self->cga.cursoron);
|
||||
chr = self->cga.vram[(addr + 2 * x) & 0x7FFF];
|
||||
attr = self->cga.vram[(addr + 2 * x + 1) & 0x7FFF];
|
||||
drawcursor = ((ma == ca) && cursorline && (self->cga.cgamode & 8) && (self->cga.cgablink & 16));
|
||||
|
||||
blink = ((self->cga.cgablink & 16) && (self->cga.cgamode & 0x20) && (attr & 0x80) && !drawcursor);
|
||||
underline = ((self->port_23c6 & 0x40) && (attr & 0x1) && !(attr & 0x6));
|
||||
if (underline) {
|
||||
/* set forecolor to white */
|
||||
attr |= 7;
|
||||
}
|
||||
blink = 0;
|
||||
/* blink active */
|
||||
if (self->cga.cgamode & 0x20) {
|
||||
cols[1] = blinkcols[attr][1];
|
||||
cols[0] = blinkcols[attr][0];
|
||||
/* attribute 7 active and not cursor */
|
||||
if ((self->cga.cgablink & 8) && (attr & 0x80) && !self->cga.drawcursor) {
|
||||
if (blink) {
|
||||
/* set blinking */
|
||||
cols[1] = cols[0];
|
||||
blink = 1;
|
||||
}
|
||||
} else {
|
||||
/* Set intensity bit */
|
||||
cols[1] = normcols[attr][1];
|
||||
cols[0] = normcols[attr][0];
|
||||
blink = (attr & 0x80) * 8 + 7 + 16;
|
||||
}
|
||||
/* character underline active and 7th row of pixels in character height being drawn */
|
||||
if (underline && (sc == 7)) {
|
||||
@@ -476,13 +458,11 @@ compaq_plasma_poll(void *priv)
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[self->cga.displine][(x << 4) + (c * 2)] = buffer32->line[self->cga.displine][(x << 4) + (c * 2) + 1] = mdaattr[attr][blink][1];
|
||||
} else if (drawcursor) {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[self->cga.displine][(x << 4) + c * 2] = buffer32->line[self->cga.displine][(x << 4) + c * 2 + 1] = cols[(fontdatm[chr][sc] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber ^ black);
|
||||
}
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[self->cga.displine][(x << 4) + c * 2] = buffer32->line[self->cga.displine][(x << 4) + c * 2 + 1] = cols[(fontdatm2[chr][sc] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber ^ black);
|
||||
} else {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[self->cga.displine][(x << 4) + c * 2] = buffer32->line[self->cga.displine][(x << 4) + c * 2 + 1] = cols[(fontdatm[chr][sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[self->cga.displine][(x << 4) + c * 2] = buffer32->line[self->cga.displine][(x << 4) + c * 2 + 1] = cols[(fontdatm2[chr][sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
++ma;
|
||||
}
|
||||
@@ -653,7 +633,7 @@ compaq_plasma_init(UNUSED(const device_t *info))
|
||||
memset(self, 0, sizeof(compaq_plasma_t));
|
||||
|
||||
video_inform(VIDEO_FLAG_TYPE_CGA, &timing_compaq_plasma);
|
||||
loadfont_ex("roms/machines/portableiii/K Combined.bin", 1, 0x4bb2);
|
||||
loadfont_ex("roms/machines/portableiii/K Combined.bin", 11, 0x4bb2);
|
||||
|
||||
self->cga.composite = 0;
|
||||
self->cga.revision = 0;
|
||||
|
||||
@@ -716,18 +716,18 @@ machine_at_ap5s_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 2, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 3, 2, 1);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&keyboard_ps2_ami_device);
|
||||
device_add(&fdc37c665_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
@@ -745,19 +745,19 @@ machine_at_ms5124_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 0x41, 0x42, 0x43, 0x44);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 0x44, 0x41, 0x42, 0x43);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 0x43, 0x44, 0x41, 0x42);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 0x42, 0x43, 0x44, 0x41);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&w83787f_device);
|
||||
device_add(&keyboard_ps2_ami_device);
|
||||
device_add(&w83787f_88h_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -130,7 +130,7 @@ typedef struct m24_kbd_t {
|
||||
uint8_t scan[7];
|
||||
|
||||
/* Mouse stuff. */
|
||||
int mouse_mode;
|
||||
int mouse_input_mode;
|
||||
int b;
|
||||
|
||||
pc_timer_t send_delay_timer;
|
||||
@@ -550,7 +550,7 @@ m24_kbd_write(uint16_t port, uint8_t val, void *priv)
|
||||
if (m24_kbd->param == m24_kbd->param_total) {
|
||||
switch (m24_kbd->command) {
|
||||
case 0x11:
|
||||
m24_kbd->mouse_mode = 0;
|
||||
m24_kbd->mouse_input_mode = 0;
|
||||
m24_kbd->scan[0] = m24_kbd->params[0];
|
||||
m24_kbd->scan[1] = m24_kbd->params[1];
|
||||
m24_kbd->scan[2] = m24_kbd->params[2];
|
||||
@@ -561,7 +561,7 @@ m24_kbd_write(uint16_t port, uint8_t val, void *priv)
|
||||
break;
|
||||
|
||||
case 0x12:
|
||||
m24_kbd->mouse_mode = 1;
|
||||
m24_kbd->mouse_input_mode = 1;
|
||||
m24_kbd->scan[0] = m24_kbd->params[0];
|
||||
m24_kbd->scan[1] = m24_kbd->params[1];
|
||||
m24_kbd->scan[2] = m24_kbd->params[2];
|
||||
@@ -720,7 +720,7 @@ m24_kbd_reset(void *priv)
|
||||
m24_kbd->wantirq = 0;
|
||||
keyboard_scan = 1;
|
||||
m24_kbd->param = m24_kbd->param_total = 0;
|
||||
m24_kbd->mouse_mode = 0;
|
||||
m24_kbd->mouse_input_mode = 0;
|
||||
m24_kbd->scan[0] = 0x1c;
|
||||
m24_kbd->scan[1] = 0x53;
|
||||
m24_kbd->scan[2] = 0x01;
|
||||
@@ -767,7 +767,7 @@ ms_poll(void *priv)
|
||||
m24_kbd_adddata(m24_kbd->scan[1] | 0x80);
|
||||
m24_kbd->b = (m24_kbd->b & ~4) | (b & 4);
|
||||
|
||||
if (m24_kbd->mouse_mode) {
|
||||
if (m24_kbd->mouse_input_mode) {
|
||||
if (((key_queue_end - key_queue_start) & 0xf) > 12)
|
||||
return 0xff;
|
||||
|
||||
|
||||
@@ -1045,7 +1045,7 @@ const machine_t machines[] = {
|
||||
.ram = {
|
||||
.min = 256,
|
||||
.max = 640,
|
||||
.step = 256
|
||||
.step = 128
|
||||
},
|
||||
.nvrmask = 0,
|
||||
.kbc_device = &keyboard_xtclone_device,
|
||||
@@ -1472,7 +1472,7 @@ const machine_t machines[] = {
|
||||
.bus_flags = MACHINE_PC,
|
||||
.flags = MACHINE_VIDEO_FIXED,
|
||||
.ram = {
|
||||
.min = 256,
|
||||
.min = 384,
|
||||
.max = 640,
|
||||
.step = 128
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user