mirror of
https://github.com/86Box/86Box.git
synced 2026-02-28 01:44:22 -07:00
Merge branch 'master' into pc98x1
This commit is contained in:
16
src/config.c
16
src/config.c
@@ -431,6 +431,10 @@ load_video(void)
|
||||
strcpy(p, "none");
|
||||
}
|
||||
free_p = 1;
|
||||
} else if (!strcmp(p, "c&t_69000")) {
|
||||
p = (char *) malloc((strlen("chips_69000") + 1) * sizeof(char));
|
||||
strcpy(p, "chips_69000");
|
||||
free_p = 1;
|
||||
}
|
||||
gfxcard[0] = video_get_video_from_internal_name(p);
|
||||
if (free_p) {
|
||||
@@ -554,36 +558,24 @@ load_sound(void)
|
||||
char *p;
|
||||
|
||||
p = ini_section_get_string(cat, "sndcard", NULL);
|
||||
/* FIXME: Hack to not break configs with the Sound Blaster 128 PCI set. */
|
||||
if ((p != NULL) && (!strcmp(p, "sbpci128") || !strcmp(p, "sb128pci")))
|
||||
p = "es1371";
|
||||
if (p != NULL)
|
||||
sound_card_current[0] = sound_card_get_from_internal_name(p);
|
||||
else
|
||||
sound_card_current[0] = 0;
|
||||
|
||||
p = ini_section_get_string(cat, "sndcard2", NULL);
|
||||
/* FIXME: Hack to not break configs with the Sound Blaster 128 PCI set. */
|
||||
if ((p != NULL) && (!strcmp(p, "sbpci128") || !strcmp(p, "sb128pci")))
|
||||
p = "es1371";
|
||||
if (p != NULL)
|
||||
sound_card_current[1] = sound_card_get_from_internal_name(p);
|
||||
else
|
||||
sound_card_current[1] = 0;
|
||||
|
||||
p = ini_section_get_string(cat, "sndcard3", NULL);
|
||||
/* FIXME: Hack to not break configs with the Sound Blaster 128 PCI set. */
|
||||
if ((p != NULL) && (!strcmp(p, "sbpci128") || !strcmp(p, "sb128pci")))
|
||||
p = "es1371";
|
||||
if (p != NULL)
|
||||
sound_card_current[2] = sound_card_get_from_internal_name(p);
|
||||
else
|
||||
sound_card_current[2] = 0;
|
||||
|
||||
p = ini_section_get_string(cat, "sndcard4", NULL);
|
||||
/* FIXME: Hack to not break configs with the Sound Blaster 128 PCI set. */
|
||||
if ((p != NULL) && (!strcmp(p, "sbpci128") || !strcmp(p, "sb128pci")))
|
||||
p = "es1371";
|
||||
if (p != NULL)
|
||||
sound_card_current[3] = sound_card_get_from_internal_name(p);
|
||||
else
|
||||
|
||||
@@ -365,13 +365,7 @@ gdbstub_break(void)
|
||||
static void
|
||||
gdbstub_jump(uint32_t new_pc)
|
||||
{
|
||||
/* Nasty hack; qemu always uses the full 32-bit EIP internally... */
|
||||
if (cpu_state.op32 || ((new_pc >= cs) && (new_pc < (cs + 65536)))) {
|
||||
cpu_state.pc = new_pc - cs;
|
||||
} else {
|
||||
loadseg((new_pc >> 4) & 0xf000, &cpu_state.seg_cs);
|
||||
cpu_state.pc = new_pc & 0xffff;
|
||||
}
|
||||
cpu_state.pc = new_pc - cs;
|
||||
flushmmucache();
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,19 @@ recalc_timings(pcjr_t *pcjr)
|
||||
pcjr->dispofftime = (uint64_t) (_dispofftime);
|
||||
}
|
||||
|
||||
static int
|
||||
vid_get_h_overscan_size(pcjr_t *pcjr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (pcjr->array[0] & 1)
|
||||
ret = 128;
|
||||
else
|
||||
ret = 256;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
vid_out(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
@@ -181,6 +194,8 @@ vid_out(uint16_t addr, uint8_t val, void *priv)
|
||||
case 0x3d7:
|
||||
old = pcjr->crtc[pcjr->crtcreg];
|
||||
pcjr->crtc[pcjr->crtcreg] = val & crtcmask[pcjr->crtcreg];
|
||||
if (pcjr->crtcreg == 2)
|
||||
overscan_x = vid_get_h_overscan_size(pcjr);
|
||||
if (old != val) {
|
||||
if (pcjr->crtcreg < 0xe || pcjr->crtcreg > 0x10) {
|
||||
pcjr->fullchange = changeframecount;
|
||||
@@ -273,6 +288,93 @@ vid_read(uint32_t addr, void *priv)
|
||||
return (pcjr->b8000[addr & 0x3fff]);
|
||||
}
|
||||
|
||||
static int
|
||||
vid_get_h_overscan_delta(pcjr_t *pcjr)
|
||||
{
|
||||
int def;
|
||||
int coef;
|
||||
int ret;
|
||||
|
||||
switch ((pcjr->array[0] & 0x13) | ((pcjr->array[3] & 0x08) << 5)) {
|
||||
case 0x13: /*320x200x16*/
|
||||
def = 0x56;
|
||||
coef = 8;
|
||||
break;
|
||||
case 0x12: /*160x200x16*/
|
||||
def = 0x2b;
|
||||
coef = 16;
|
||||
break;
|
||||
case 0x03: /*640x200x4*/
|
||||
def = 0x56;
|
||||
coef = 8;
|
||||
break;
|
||||
case 0x01: /*80 column text*/
|
||||
def = 0x5a;
|
||||
coef = 8;
|
||||
break;
|
||||
case 0x00: /*40 column text*/
|
||||
default:
|
||||
def = 0x2c;
|
||||
coef = 16;
|
||||
break;
|
||||
case 0x02: /*320x200x4*/
|
||||
def = 0x2b;
|
||||
coef = 16;
|
||||
break;
|
||||
case 0x102: /*640x200x2*/
|
||||
def = 0x2b;
|
||||
coef = 16;
|
||||
break;
|
||||
}
|
||||
|
||||
ret = pcjr->crtc[0x02] - def;
|
||||
|
||||
if (ret < -8)
|
||||
ret = -8;
|
||||
|
||||
if (ret > 8)
|
||||
ret = 8;
|
||||
|
||||
return ret * coef;
|
||||
}
|
||||
|
||||
static void
|
||||
vid_blit_h_overscan(pcjr_t *pcjr)
|
||||
{
|
||||
int cols;
|
||||
int i;
|
||||
int x;
|
||||
int y = (pcjr->lastline << 1) + 16;
|
||||
int ho_s = vid_get_h_overscan_size(pcjr);
|
||||
|
||||
if (pcjr->dispon)
|
||||
cols = (pcjr->array[2] & 0xf) + 16;
|
||||
else {
|
||||
if (pcjr->array[3] & 4)
|
||||
cols = (pcjr->array[2] & 0xf) + 16;
|
||||
else
|
||||
cols = pcjr->array[0 + 16] + 16;
|
||||
}
|
||||
|
||||
if (pcjr->array[0] & 1)
|
||||
x = (pcjr->crtc[1] << 3) + ho_s;
|
||||
else
|
||||
x = (pcjr->crtc[1] << 4) + ho_s;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
hline(buffer32, 0, i, x, cols);
|
||||
hline(buffer32, 0, y + i, x, cols);
|
||||
|
||||
if (pcjr->composite) {
|
||||
Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[i]);
|
||||
Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[y + i]);
|
||||
} else {
|
||||
video_process_8(x, i);
|
||||
video_process_8(x, y + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
vid_poll(void *priv)
|
||||
{
|
||||
@@ -288,6 +390,9 @@ vid_poll(void *priv)
|
||||
uint16_t dat;
|
||||
int cols[4];
|
||||
int oldsc;
|
||||
int l = (pcjr->displine << 1) + 16;
|
||||
int ho_s = vid_get_h_overscan_size(pcjr);
|
||||
int ho_d = vid_get_h_overscan_delta(pcjr) + (ho_s / 2);
|
||||
|
||||
if (!pcjr->linepos) {
|
||||
timer_advance_u64(&pcjr->timer, pcjr->dispofftime);
|
||||
@@ -306,13 +411,13 @@ vid_poll(void *priv)
|
||||
}
|
||||
pcjr->lastline = pcjr->displine;
|
||||
cols[0] = (pcjr->array[2] & 0xf) + 16;
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
(buffer32->line[pcjr->displine])[c] = cols[0];
|
||||
if (pcjr->array[0] & 1) {
|
||||
buffer32->line[pcjr->displine << 1][c + (pcjr->crtc[1] << 3) + 8] = buffer32->line[(pcjr->displine << 1) + 1][c + (pcjr->crtc[1] << 3) + 8] = cols[0];
|
||||
} else {
|
||||
buffer32->line[pcjr->displine << 1][c + (pcjr->crtc[1] << 4) + 8] = buffer32->line[(pcjr->displine << 1) + 1][c + (pcjr->crtc[1] << 4) + 8] = cols[0];
|
||||
}
|
||||
|
||||
if (pcjr->array[0] & 1) {
|
||||
hline(buffer32, 0, l, (pcjr->crtc[1] << 3) + ho_s, cols[0]);
|
||||
hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 3) + ho_s, cols[0]);
|
||||
} else {
|
||||
hline(buffer32, 0, l, (pcjr->crtc[1] << 4) + ho_s, cols[0]);
|
||||
hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 4) + ho_s, cols[0]);
|
||||
}
|
||||
|
||||
switch (pcjr->addr_mode) {
|
||||
@@ -326,45 +431,76 @@ vid_poll(void *priv)
|
||||
case 3: /*High resolution graphics*/
|
||||
offset = (pcjr->sc & 3) * 0x2000;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch ((pcjr->array[0] & 0x13) | ((pcjr->array[3] & 0x08) << 5)) {
|
||||
case 0x13: /*320x200x16*/
|
||||
for (x = 0; x < pcjr->crtc[1]; x++) {
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) | pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
int ef_x = (x << 3) + ho_d;
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) |
|
||||
pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
pcjr->ma++;
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + 8] = buffer32->line[pcjr->displine << 1][(x << 3) + 9] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 9] = pcjr->array[((dat >> 12) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + 10] = buffer32->line[pcjr->displine << 1][(x << 3) + 11] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 10] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 11] = pcjr->array[((dat >> 8) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + 12] = buffer32->line[pcjr->displine << 1][(x << 3) + 13] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 12] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 13] = pcjr->array[((dat >> 4) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + 14] = buffer32->line[pcjr->displine << 1][(x << 3) + 15] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 14] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 15] = pcjr->array[(dat & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x] = buffer32->line[l][ef_x + 1] =
|
||||
buffer32->line[l + 1][ef_x] = buffer32->line[l + 1][ef_x + 1] =
|
||||
pcjr->array[((dat >> 12) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x + 2] = buffer32->line[l][ef_x + 3] =
|
||||
buffer32->line[l + 1][ef_x + 2] = buffer32->line[l + 1][ef_x + 3] =
|
||||
pcjr->array[((dat >> 8) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x + 4] = buffer32->line[l][ef_x + 5] =
|
||||
buffer32->line[l + 1][ef_x + 4] = buffer32->line[l + 1][ef_x + 5] =
|
||||
pcjr->array[((dat >> 4) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x + 6] = buffer32->line[l][ef_x + 7] =
|
||||
buffer32->line[l + 1][ef_x + 6] = buffer32->line[l + 1][ef_x + 7] =
|
||||
pcjr->array[(dat & pcjr->array[1]) + 16] + 16;
|
||||
}
|
||||
break;
|
||||
case 0x12: /*160x200x16*/
|
||||
for (x = 0; x < pcjr->crtc[1]; x++) {
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) | pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
int ef_x = (x << 4) + ho_d;
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) |
|
||||
pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
pcjr->ma++;
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + 8] = buffer32->line[pcjr->displine << 1][(x << 4) + 9] = buffer32->line[pcjr->displine << 1][(x << 4) + 10] = buffer32->line[pcjr->displine << 1][(x << 4) + 11] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 9] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 10] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 11] = pcjr->array[((dat >> 12) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + 12] = buffer32->line[pcjr->displine << 1][(x << 4) + 13] = buffer32->line[pcjr->displine << 1][(x << 4) + 14] = buffer32->line[pcjr->displine << 1][(x << 4) + 15] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 12] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 13] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 14] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 15] = pcjr->array[((dat >> 8) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + 16] = buffer32->line[pcjr->displine << 1][(x << 4) + 17] = buffer32->line[pcjr->displine << 1][(x << 4) + 18] = buffer32->line[pcjr->displine << 1][(x << 4) + 19] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 16] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 17] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 18] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 19] = pcjr->array[((dat >> 4) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + 20] = buffer32->line[pcjr->displine << 1][(x << 4) + 21] = buffer32->line[pcjr->displine << 1][(x << 4) + 22] = buffer32->line[pcjr->displine << 1][(x << 4) + 23] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 20] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 21] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 22] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + 23] = pcjr->array[(dat & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x] = buffer32->line[l][ef_x + 1] =
|
||||
buffer32->line[l][ef_x + 2] = buffer32->line[l][ef_x + 3] =
|
||||
buffer32->line[l + 1][ef_x] = buffer32->line[l + 1][ef_x + 1] =
|
||||
buffer32->line[l + 1][ef_x + 2] = buffer32->line[l + 1][ef_x + 3] =
|
||||
pcjr->array[((dat >> 12) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x + 4] = buffer32->line[l][ef_x + 5] =
|
||||
buffer32->line[l][ef_x + 6] = buffer32->line[l][ef_x + 7] =
|
||||
buffer32->line[l + 1][(x << 4) + 12] = buffer32->line[l + 1][(x << 4) + 13] =
|
||||
buffer32->line[l + 1][(x << 4) + 14] = buffer32->line[l + 1][(x << 4) + 15] =
|
||||
pcjr->array[((dat >> 8) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x + 8] = buffer32->line[l][ef_x + 9] =
|
||||
buffer32->line[l][ef_x + 10] = buffer32->line[l][ef_x + 11] =
|
||||
buffer32->line[l + 1][ef_x + 8] = buffer32->line[l + 1][ef_x + 9] =
|
||||
buffer32->line[l + 1][ef_x + 10] = buffer32->line[l + 1][ef_x + 11] =
|
||||
pcjr->array[((dat >> 4) & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x + 12] = buffer32->line[l][ef_x + 13] =
|
||||
buffer32->line[l][ef_x + 14] = buffer32->line[l][ef_x + 15] =
|
||||
buffer32->line[l + 1][ef_x + 12] = buffer32->line[l + 1][ef_x + 13] =
|
||||
buffer32->line[l + 1][ef_x + 14] = buffer32->line[l + 1][ef_x + 15] =
|
||||
pcjr->array[(dat & pcjr->array[1]) + 16] + 16;
|
||||
}
|
||||
break;
|
||||
case 0x03: /*640x200x4*/
|
||||
for (x = 0; x < pcjr->crtc[1]; x++) {
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1] << 8) | pcjr->vram[((pcjr->ma << 1) & mask) + offset];
|
||||
int ef_x = (x << 3) + ho_d;
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1] << 8) |
|
||||
pcjr->vram[((pcjr->ma << 1) & mask) + offset];
|
||||
pcjr->ma++;
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
chr = (dat >> 7) & 1;
|
||||
chr |= ((dat >> 14) & 2);
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + 8 + c] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + 8 + c] = pcjr->array[(chr & pcjr->array[1]) + 16] + 16;
|
||||
buffer32->line[l][ef_x + c] = buffer32->line[l + 1][ef_x + c] =
|
||||
pcjr->array[(chr & pcjr->array[1]) + 16] + 16;
|
||||
dat <<= 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x01: /*80 column text*/
|
||||
for (x = 0; x < pcjr->crtc[1]; x++) {
|
||||
int ef_x = (x << 3) + ho_d;
|
||||
chr = pcjr->vram[((pcjr->ma << 1) & mask) + offset];
|
||||
attr = pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
drawcursor = ((pcjr->ma == ca) && pcjr->con && pcjr->cursoron);
|
||||
@@ -377,26 +513,26 @@ vid_poll(void *priv)
|
||||
cols[1] = pcjr->array[((attr & 15) & pcjr->array[1]) + 16] + 16;
|
||||
cols[0] = pcjr->array[((attr >> 4) & pcjr->array[1]) + 16] + 16;
|
||||
}
|
||||
if (pcjr->sc & 8) {
|
||||
if (pcjr->sc & 8)
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[l][ef_x + c] =
|
||||
buffer32->line[l + 1][ef_x + c] = cols[0];
|
||||
else
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[l][ef_x + c] =
|
||||
buffer32->line[l + 1][ef_x + c] =
|
||||
cols[(fontdat[chr][pcjr->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
if (drawcursor)
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + c + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + c + 8] = cols[0];
|
||||
buffer32->line[l][ef_x + c] ^= 15;
|
||||
buffer32->line[l + 1][ef_x + c] ^= 15;
|
||||
}
|
||||
} else {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + c + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + c + 8] = cols[(fontdat[chr][pcjr->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
}
|
||||
if (drawcursor) {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 3) + c + 8] ^= 15;
|
||||
buffer32->line[(pcjr->displine << 1) + 1][(x << 3) + c + 8] ^= 15;
|
||||
}
|
||||
}
|
||||
pcjr->ma++;
|
||||
}
|
||||
break;
|
||||
case 0x00: /*40 column text*/
|
||||
for (x = 0; x < pcjr->crtc[1]; x++) {
|
||||
int ef_x = (x << 4) + ho_d;
|
||||
chr = pcjr->vram[((pcjr->ma << 1) & mask) + offset];
|
||||
attr = pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
drawcursor = ((pcjr->ma == ca) && pcjr->con && pcjr->cursoron);
|
||||
@@ -410,21 +546,24 @@ vid_poll(void *priv)
|
||||
cols[0] = pcjr->array[((attr >> 4) & pcjr->array[1]) + 16] + 16;
|
||||
}
|
||||
pcjr->ma++;
|
||||
if (pcjr->sc & 8) {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[pcjr->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[0];
|
||||
}
|
||||
} else {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[pcjr->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[(fontdat[chr][pcjr->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
}
|
||||
if (drawcursor) {
|
||||
if (pcjr->sc & 8)
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[l][ef_x + (c << 1)] =
|
||||
buffer32->line[l][ef_x + (c << 1) + 1] =
|
||||
buffer32->line[l + 1][ef_x + (c << 1)] =
|
||||
buffer32->line[l + 1][ef_x + (c << 1) + 1] = cols[0];
|
||||
else
|
||||
for (uint8_t c = 0; c < 8; c++)
|
||||
buffer32->line[l][ef_x + (c << 1)] =
|
||||
buffer32->line[l][ef_x + (c << 1) + 1] =
|
||||
buffer32->line[l + 1][ef_x + (c << 1)] =
|
||||
buffer32->line[l + 1][ef_x + (c << 1) + 1] =
|
||||
cols[(fontdat[chr][pcjr->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
if (drawcursor)
|
||||
for (uint8_t c = 0; c < 16; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + c + 8] ^= 15;
|
||||
buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + c + 8] ^= 15;
|
||||
buffer32->line[l][ef_x + c] ^= 15;
|
||||
buffer32->line[l + 1][ef_x + c] ^= 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x02: /*320x200x4*/
|
||||
@@ -433,10 +572,15 @@ vid_poll(void *priv)
|
||||
cols[2] = pcjr->array[2 + 16] + 16;
|
||||
cols[3] = pcjr->array[3 + 16] + 16;
|
||||
for (x = 0; x < pcjr->crtc[1]; x++) {
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) | pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
int ef_x = (x << 4) + ho_d;
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) |
|
||||
pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
pcjr->ma++;
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[pcjr->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[dat >> 14];
|
||||
buffer32->line[l][ef_x + (c << 1)] =
|
||||
buffer32->line[l][ef_x + (c << 1) + 1] =
|
||||
buffer32->line[l + 1][ef_x + (c << 1)] =
|
||||
buffer32->line[l + 1][ef_x + (c << 1) + 1] = cols[dat >> 14];
|
||||
dat <<= 2;
|
||||
}
|
||||
}
|
||||
@@ -445,10 +589,13 @@ vid_poll(void *priv)
|
||||
cols[0] = pcjr->array[0 + 16] + 16;
|
||||
cols[1] = pcjr->array[1 + 16] + 16;
|
||||
for (x = 0; x < pcjr->crtc[1]; x++) {
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) | pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
int ef_x = (x << 4) + ho_d;
|
||||
dat = (pcjr->vram[((pcjr->ma << 1) & mask) + offset] << 8) |
|
||||
pcjr->vram[((pcjr->ma << 1) & mask) + offset + 1];
|
||||
pcjr->ma++;
|
||||
for (uint8_t c = 0; c < 16; c++) {
|
||||
buffer32->line[pcjr->displine << 1][(x << 4) + c + 8] = buffer32->line[(pcjr->displine << 1) + 1][(x << 4) + c + 8] = cols[dat >> 15];
|
||||
buffer32->line[l][ef_x + c] = buffer32->line[l + 1][ef_x + c] =
|
||||
cols[dat >> 15];
|
||||
dat <<= 1;
|
||||
}
|
||||
}
|
||||
@@ -460,33 +607,33 @@ vid_poll(void *priv)
|
||||
} else {
|
||||
if (pcjr->array[3] & 4) {
|
||||
if (pcjr->array[0] & 1) {
|
||||
hline(buffer32, 0, (pcjr->displine << 1), (pcjr->crtc[1] << 3) + 16, (pcjr->array[2] & 0xf) + 16);
|
||||
hline(buffer32, 0, (pcjr->displine << 1) + 1, (pcjr->crtc[1] << 3) + 16, (pcjr->array[2] & 0xf) + 16);
|
||||
hline(buffer32, 0, l, (pcjr->crtc[1] << 3) + ho_s, (pcjr->array[2] & 0xf) + 16);
|
||||
hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 3) + ho_s, (pcjr->array[2] & 0xf) + 16);
|
||||
} else {
|
||||
hline(buffer32, 0, (pcjr->displine << 1), (pcjr->crtc[1] << 4) + 16, (pcjr->array[2] & 0xf) + 16);
|
||||
hline(buffer32, 0, (pcjr->displine << 1) + 1, (pcjr->crtc[1] << 4) + 16, (pcjr->array[2] & 0xf) + 16);
|
||||
hline(buffer32, 0, l, (pcjr->crtc[1] << 4) + ho_s, (pcjr->array[2] & 0xf) + 16);
|
||||
hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 4) + ho_s, (pcjr->array[2] & 0xf) + 16);
|
||||
}
|
||||
} else {
|
||||
cols[0] = pcjr->array[0 + 16] + 16;
|
||||
if (pcjr->array[0] & 1) {
|
||||
hline(buffer32, 0, (pcjr->displine << 1), (pcjr->crtc[1] << 3) + 16, cols[0]);
|
||||
hline(buffer32, 0, (pcjr->displine << 1) + 1, (pcjr->crtc[1] << 3) + 16, cols[0]);
|
||||
hline(buffer32, 0, l, (pcjr->crtc[1] << 3) + ho_s, cols[0]);
|
||||
hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 3) + ho_s, cols[0]);
|
||||
} else {
|
||||
hline(buffer32, 0, (pcjr->displine << 1), (pcjr->crtc[1] << 4) + 16, cols[0]);
|
||||
hline(buffer32, 0, (pcjr->displine << 1) + 1, (pcjr->crtc[1] << 4) + 16, cols[0]);
|
||||
hline(buffer32, 0, l, (pcjr->crtc[1] << 4) + ho_s, cols[0]);
|
||||
hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 4) + ho_s, cols[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pcjr->array[0] & 1)
|
||||
x = (pcjr->crtc[1] << 3) + 16;
|
||||
x = (pcjr->crtc[1] << 3) + ho_s;
|
||||
else
|
||||
x = (pcjr->crtc[1] << 4) + 16;
|
||||
x = (pcjr->crtc[1] << 4) + ho_s;
|
||||
if (pcjr->composite) {
|
||||
Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[pcjr->displine << 1]);
|
||||
Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[(pcjr->displine << 1) + 1]);
|
||||
Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[l]);
|
||||
Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[l + 1]);
|
||||
} else {
|
||||
video_process_8(x, pcjr->displine << 1);
|
||||
video_process_8(x, (pcjr->displine << 1) + 1);
|
||||
video_process_8(x, l);
|
||||
video_process_8(x, l + 1);
|
||||
}
|
||||
pcjr->sc = oldsc;
|
||||
if (pcjr->vc == pcjr->crtc[7] && !pcjr->sc) {
|
||||
@@ -547,37 +694,42 @@ vid_poll(void *priv)
|
||||
picint(1 << 5);
|
||||
if (pcjr->crtc[7]) {
|
||||
if (pcjr->array[0] & 1)
|
||||
x = (pcjr->crtc[1] << 3) + 16;
|
||||
x = (pcjr->crtc[1] << 3) + ho_s;
|
||||
else
|
||||
x = (pcjr->crtc[1] << 4) + 16;
|
||||
x = (pcjr->crtc[1] << 4) + ho_s;
|
||||
pcjr->lastline++;
|
||||
|
||||
xs_temp = x;
|
||||
ys_temp = (pcjr->lastline - pcjr->firstline) << 1;
|
||||
|
||||
if ((xs_temp > 0) && (ys_temp > 0)) {
|
||||
int actual_ys = ys_temp;
|
||||
|
||||
if (xs_temp < 64)
|
||||
xs_temp = 656;
|
||||
if (ys_temp < 32)
|
||||
ys_temp = 400;
|
||||
if (!enable_overscan)
|
||||
xs_temp -= 16;
|
||||
xs_temp -= ho_s;
|
||||
|
||||
if ((xs_temp != xsize) || (ys_temp != ysize) || video_force_resize_get()) {
|
||||
xsize = xs_temp;
|
||||
ysize = ys_temp;
|
||||
set_screen_size(xsize, ysize + (enable_overscan ? 16 : 0));
|
||||
|
||||
set_screen_size(xsize, ysize + (enable_overscan ? 32 : 0));
|
||||
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
|
||||
vid_blit_h_overscan(pcjr);
|
||||
|
||||
if (enable_overscan) {
|
||||
video_blit_memtoscreen(0, (pcjr->firstline - 4) << 1,
|
||||
xsize, ((pcjr->lastline - pcjr->firstline) + 8) << 1);
|
||||
video_blit_memtoscreen(0, pcjr->firstline << 1,
|
||||
xsize, actual_ys + 32);
|
||||
} else {
|
||||
video_blit_memtoscreen(8, pcjr->firstline << 1,
|
||||
xsize, (pcjr->lastline - pcjr->firstline) << 1);
|
||||
video_blit_memtoscreen(ho_s / 2, (pcjr->firstline << 1) + 16,
|
||||
xsize, actual_ys);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,6 +990,8 @@ machine_pcjr_init(UNUSED(const machine_t *model))
|
||||
pcjr->memctrl &= ~0x24;
|
||||
display_type = machine_get_config_int("display_type");
|
||||
pcjr->composite = (display_type != PCJR_RGB);
|
||||
overscan_x = 256;
|
||||
overscan_y = 32;
|
||||
|
||||
pic_init_pcjr();
|
||||
pit_common_init(0, pit_irq0_timer_pcjr, NULL);
|
||||
|
||||
@@ -50,6 +50,7 @@ public:
|
||||
SettingsModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
{
|
||||
fontHeight = QApplication::fontMetrics().height();
|
||||
}
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
@@ -82,6 +83,7 @@ private:
|
||||
"other_removable_devices",
|
||||
"other_peripherals",
|
||||
};
|
||||
int fontHeight;
|
||||
};
|
||||
|
||||
QVariant
|
||||
@@ -94,6 +96,8 @@ SettingsModel::data(const QModelIndex &index, int role) const
|
||||
return tr(pages.at(index.row()).toUtf8().data());
|
||||
case Qt::DecorationRole:
|
||||
return QIcon(QString("%1/%2.ico").arg(ProgSettings::getIconSetPath(), page_icons[index.row()]));
|
||||
case Qt::SizeHintRole:
|
||||
return QSize(-1, fontHeight * 2);
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
@@ -182,9 +186,6 @@ Settings::Settings(QWidget *parent)
|
||||
[this](const QModelIndex ¤t, const QModelIndex &previous) {
|
||||
ui->stackedWidget->setCurrentIndex(current.row()); });
|
||||
|
||||
ui->listView->resizeColumnsToContents();
|
||||
ui->listView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
|
||||
ui->listView->setCurrentIndex(model->index(0, 0));
|
||||
|
||||
Settings::settings = this;
|
||||
|
||||
@@ -36,25 +36,31 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTableView" name="listView">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
<widget class="QListView" name="listView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
<property name="viewMode">
|
||||
<enum>QListView::ListMode</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>544</width>
|
||||
<height>617</height>
|
||||
<height>363</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -35,6 +35,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="tableViewFloppy">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@@ -53,49 +65,38 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxFloppyType">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxTurboTimings">
|
||||
<property name="text">
|
||||
<string>Turbo timings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxCheckBPB">
|
||||
<property name="text">
|
||||
<string>Check BPB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QWidget" name="floppyControls" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxFloppyType">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxTurboTimings">
|
||||
<property name="text">
|
||||
<string>Turbo timings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxCheckBPB">
|
||||
<property name="text">
|
||||
<string>Check BPB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
@@ -106,6 +107,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="tableViewCDROM">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@@ -124,64 +137,66 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Bus:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Channel:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Speed:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBoxBus">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="comboBoxChannel">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBoxSpeed">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3">
|
||||
<widget class="QComboBox" name="comboBoxCDROMType">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QWidget" name="cdControls" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Bus:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Channel:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Speed:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBoxBus">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="comboBoxChannel">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBoxSpeed">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3">
|
||||
<widget class="QComboBox" name="comboBoxCDROMType">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>418</width>
|
||||
<height>433</height>
|
||||
<height>368</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -35,6 +35,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="tableViewMO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@@ -53,63 +65,52 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Bus:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Channel:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBoxMOBus">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="comboBoxMOChannel">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3">
|
||||
<widget class="QComboBox" name="comboBoxMOType">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QWidget" name="moControls" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Bus:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Channel:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBoxMOBus">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="comboBoxMOChannel">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3">
|
||||
<widget class="QComboBox" name="comboBoxMOType">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
@@ -120,6 +121,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="tableViewZIP">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@@ -138,43 +151,45 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Bus:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxZIPBus">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Channel:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxZIPChannel">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxZIP250">
|
||||
<property name="text">
|
||||
<string>ZIP 250</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QWidget" name="zipControls" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Bus:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxZIPBus">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Channel:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxZIPChannel">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxZIP250">
|
||||
<property name="text">
|
||||
<string>ZIP 250</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -156,7 +156,7 @@ typedef struct chips_69000_t {
|
||||
|
||||
rom_t bios_rom;
|
||||
|
||||
void* i2c_ddc, *ddc;
|
||||
void *i2c, *ddc;
|
||||
|
||||
uint8_t st01;
|
||||
} chips_69000_t;
|
||||
@@ -1497,10 +1497,10 @@ chips_69000_read_ext_reg(chips_69000_t* chips)
|
||||
{
|
||||
val = chips->ext_regs[index];
|
||||
if (!(chips->ext_regs[0x62] & 0x8))
|
||||
val = (val & ~8) | (i2c_gpio_get_scl(chips->i2c_ddc) << 3);
|
||||
val = (val & ~8) | (i2c_gpio_get_scl(chips->i2c) << 3);
|
||||
|
||||
if (!(chips->ext_regs[0x62] & 0x4))
|
||||
val = (val & ~4) | (i2c_gpio_get_sda(chips->i2c_ddc) << 2);
|
||||
val = (val & ~4) | (i2c_gpio_get_sda(chips->i2c) << 2);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1560,14 +1560,14 @@ chips_69000_write_ext_reg(chips_69000_t* chips, uint8_t val)
|
||||
if (chips->ext_regs[0x62] & 0x8)
|
||||
scl = !!(val & 8);
|
||||
else
|
||||
scl = i2c_gpio_get_scl(chips->i2c_ddc);
|
||||
scl = i2c_gpio_get_scl(chips->i2c);
|
||||
|
||||
if (chips->ext_regs[0x62] & 0x4)
|
||||
sda = !!(val & 4);
|
||||
else
|
||||
scl = i2c_gpio_get_sda(chips->i2c_ddc);
|
||||
scl = i2c_gpio_get_sda(chips->i2c);
|
||||
|
||||
i2c_gpio_set(chips->i2c_ddc, scl, sda);
|
||||
i2c_gpio_set(chips->i2c, scl, sda);
|
||||
|
||||
chips->ext_regs[chips->ext_index] = val & 0x9F;
|
||||
break;
|
||||
@@ -2455,7 +2455,7 @@ chips_69000_init(const device_t *info)
|
||||
|
||||
io_sethandler(0x03c0, 0x0020, chips_69000_in, NULL, NULL, chips_69000_out, NULL, NULL, chips);
|
||||
|
||||
pci_add_card(PCI_ADD_VIDEO, chips_69000_pci_read, chips_69000_pci_write, chips, &chips->slot);
|
||||
pci_add_card(info->local ? PCI_ADD_VIDEO : PCI_ADD_NORMAL, chips_69000_pci_read, chips_69000_pci_write, chips, &chips->slot);
|
||||
|
||||
chips->svga.bpp = 8;
|
||||
chips->svga.miscout = 1;
|
||||
@@ -2477,8 +2477,8 @@ chips_69000_init(const device_t *info)
|
||||
timer_add(&chips->decrement_timer, chips_69000_decrement_timer, chips, 0);
|
||||
timer_on_auto(&chips->decrement_timer, 1000000. / 2000.);
|
||||
|
||||
chips->i2c_ddc = i2c_gpio_init("c&t_69000_mga");
|
||||
chips->ddc = ddc_init(i2c_gpio_get_bus(chips->i2c_ddc));
|
||||
chips->i2c = i2c_gpio_init("chips_69000_ddc");
|
||||
chips->ddc = ddc_init(i2c_gpio_get_bus(chips->i2c));
|
||||
|
||||
chips->flat_panel_regs[0x01] = 1;
|
||||
|
||||
@@ -2500,7 +2500,7 @@ chips_69000_close(void *p)
|
||||
// thread_set_event(chips->fifo_event);
|
||||
// thread_wait(chips->accel_thread);
|
||||
ddc_close(chips->ddc);
|
||||
i2c_gpio_close(chips->i2c_ddc);
|
||||
i2c_gpio_close(chips->i2c);
|
||||
svga_close(&chips->svga);
|
||||
|
||||
free(chips);
|
||||
@@ -2524,7 +2524,7 @@ chips_69000_force_redraw(void *p)
|
||||
|
||||
const device_t chips_69000_device = {
|
||||
.name = "Chips & Technologies B69000",
|
||||
.internal_name = "c&t_69000",
|
||||
.internal_name = "chips_69000",
|
||||
.flags = DEVICE_PCI,
|
||||
.local = 0,
|
||||
.init = chips_69000_init,
|
||||
@@ -2537,8 +2537,8 @@ const device_t chips_69000_device = {
|
||||
};
|
||||
|
||||
const device_t chips_69000_onboard_device = {
|
||||
.name = "Chips & Technologies B69000 (onboard)",
|
||||
.internal_name = "c&t_69000_onboard",
|
||||
.name = "Chips & Technologies B69000 On-Board",
|
||||
.internal_name = "chips_69000_onboard",
|
||||
.flags = DEVICE_PCI,
|
||||
.local = 1,
|
||||
.init = chips_69000_init,
|
||||
|
||||
Reference in New Issue
Block a user