Skip to content

Commit c1ce662

Browse files
authored
Merge branch '86Box:master' into windows-dark-mode
2 parents 8389021 + 481b8c8 commit c1ce662

File tree

5 files changed

+30
-45
lines changed

5 files changed

+30
-45
lines changed

src/machine/m_at_socket7.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ machine_at_presario2240_init(const machine_t *model)
532532

533533
machine_at_common_init_ex(model, 2);
534534

535-
pci_init(PCI_CONFIG_TYPE_1);
535+
pci_init(PCI_CONFIG_TYPE_1 | FLAG_NO_BRIDGES);
536536
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
537537
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
538538
pci_register_slot(0x14, PCI_CARD_VIDEO, 3, 0, 0, 0);
@@ -563,7 +563,7 @@ machine_at_presario4500_init(const machine_t *model)
563563

564564
machine_at_common_init_ex(model, 2);
565565

566-
pci_init(PCI_CONFIG_TYPE_1);
566+
pci_init(PCI_CONFIG_TYPE_1 | FLAG_NO_BRIDGES);
567567
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
568568
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
569569
pci_register_slot(0x14, PCI_CARD_VIDEO, 3, 0, 0, 0);

src/unix/unix_cdrom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ cdrom_mount(uint8_t id, char *fn)
145145
cdrom[id].ops->exit(&(cdrom[id]));
146146
cdrom[id].ops = NULL;
147147
memset(cdrom[id].image_path, 0, sizeof(cdrom[id].image_path));
148-
if ((fn != NULL) && (strlen(fn) >= 1) && ((fn[strlen(fn) - 1] == '\\'))
148+
if ((fn != NULL) && (strlen(fn) >= 1) && (fn[strlen(fn) - 1] == '\\'))
149149
fn[strlen(fn) - 1] = '/';
150150
cdrom_image_open(&(cdrom[id]), fn);
151151
/* Signal media change to the emulated machine. */

src/video/vid_et4000.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,9 @@ et4000_recalctimings(svga_t *svga)
599599
const et4000_t *dev = (et4000_t *) svga->priv;
600600

601601
svga->ma_latch |= (svga->crtc[0x33] & 3) << 16;
602+
603+
svga->hblankstart = (((svga->crtc[0x3f] & 0x10) >> 4) << 8) + svga->crtc[2] + 1;
604+
602605
if (svga->crtc[0x35] & 1)
603606
svga->vblankstart += 0x400;
604607
if (svga->crtc[0x35] & 2)
@@ -613,10 +616,11 @@ et4000_recalctimings(svga_t *svga)
613616
svga->rowoffset = 0x100;
614617
if (svga->crtc[0x3f] & 1)
615618
svga->htotal += 256;
616-
if (svga->attrregs[0x16] & 0x20)
619+
if (svga->attrregs[0x16] & 0x20) {
617620
svga->hdisp <<= 1;
618-
619-
svga->hblankstart = (((svga->crtc[0x3f] & 0x10) >> 4) << 8) + svga->crtc[2] + 1;
621+
svga->hblankstart <<= 1;
622+
svga->hblank_end_val <<= 1;
623+
}
620624

621625
switch (((svga->miscout >> 2) & 3) | ((svga->crtc[0x34] << 1) & 4)) {
622626
case 0:
@@ -637,10 +641,14 @@ et4000_recalctimings(svga_t *svga)
637641
case 15:
638642
case 16:
639643
svga->hdisp /= 2;
644+
svga->hblankstart /= 2;
645+
svga->hblank_end_val /= 2;
640646
break;
641647

642648
case 24:
643649
svga->hdisp /= 3;
650+
svga->hblankstart /= 3;
651+
svga->hblank_end_val /= 3;
644652
break;
645653

646654
default:
@@ -689,7 +697,8 @@ et4000_kasan_recalctimings(svga_t *svga)
689697
et4000_recalctimings(svga);
690698

691699
if (svga->render == svga_render_text_80 && (et4000->kasan_cfg_regs[0] & 8)) {
692-
svga->ma_latch -= 3;
700+
svga->hdisp += svga->dots_per_clock;
701+
svga->ma_latch -= 5;
693702
svga->ca_adj = (et4000->kasan_cfg_regs[0] >> 6) - 3;
694703
svga->ksc5601_sbyte_mask = (et4000->kasan_cfg_regs[0] & 4) << 5;
695704
if ((et4000->kasan_cfg_regs[0] & 0x23) == 0x20 && (et4000->kasan_cfg_regs[4] & 0x80) && ((svga->crtc[0x37] & 0x0B) == 0x0A))

src/video/vid_et4000w32.c

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@ et4000w32p_recalctimings(svga_t *svga)
431431
et4000w32p_t *et4000 = (et4000w32p_t *) svga->priv;
432432

433433
svga->ma_latch |= (svga->crtc[0x33] & 0x7) << 16;
434+
435+
svga->hblankstart = (((svga->crtc[0x3f] & 0x10) >> 4) << 8) + svga->crtc[2] + 1;
436+
434437
if (svga->crtc[0x35] & 0x01)
435438
svga->vblankstart += 0x400;
436439
if (svga->crtc[0x35] & 0x02)
@@ -445,10 +448,11 @@ et4000w32p_recalctimings(svga_t *svga)
445448
svga->rowoffset += 0x100;
446449
if (svga->crtc[0x3F] & 0x01)
447450
svga->htotal += 256;
448-
if (svga->attrregs[0x16] & 0x20)
451+
if (svga->attrregs[0x16] & 0x20) {
449452
svga->hdisp <<= 1;
450-
451-
svga->hblankstart = (((svga->crtc[0x3f] & 0x10) >> 4) << 8) + svga->crtc[2] + 1;
453+
svga->hblankstart <<= 1;
454+
svga->hblank_end_val <<= 1;
455+
}
452456

453457
svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock((svga->miscout >> 2) & 3, svga->clock_gen);
454458

@@ -474,32 +478,6 @@ et4000w32p_recalctimings(svga_t *svga)
474478
}
475479
}
476480

477-
#if 0
478-
if (svga->adv_flags & FLAG_NOSKEW) {
479-
/* On the Cardex ET4000/W32p-based cards, adjust text mode clocks by 1. */
480-
if (!(svga->gdcreg[6] & 1) && !(svga->attrregs[0x10] & 1)) { /* Text mode */
481-
svga->ma_latch--;
482-
483-
if (svga->seqregs[1] & 8) /*40 column*/
484-
svga->hdisp += (svga->seqregs[1] & 1) ? 16 : 18;
485-
else
486-
svga->hdisp += (svga->seqregs[1] & 1) ? 8 : 9;
487-
} else {
488-
/* Also adjust the graphics mode clocks in some cases. */
489-
if ((svga->gdcreg[5] & 0x40) && (svga->bpp != 32)) {
490-
if ((svga->bpp == 15) || (svga->bpp == 16) || (svga->bpp == 24))
491-
svga->hdisp += (svga->seqregs[1] & 1) ? 16 : 18;
492-
else
493-
svga->hdisp += (svga->seqregs[1] & 1) ? 8 : 9;
494-
} else if ((svga->gdcreg[5] & 0x40) == 0) {
495-
svga->hdisp += (svga->seqregs[1] & 1) ? 8 : 9;
496-
if (svga->hdisp == 648 || svga->hdisp == 808 || svga->hdisp == 1032)
497-
svga->hdisp -= 8;
498-
}
499-
}
500-
}
501-
#endif
502-
503481
if (et4000->type == ET4000W32) {
504482
if ((svga->gdcreg[6] & 1) || (svga->attrregs[0x10] & 1)) {
505483
if (svga->gdcreg[5] & 0x40) {
@@ -522,8 +500,11 @@ et4000w32p_recalctimings(svga_t *svga)
522500
switch (svga->bpp) {
523501
case 15:
524502
case 16:
525-
if ((svga->gdcreg[6] & 1) || (svga->attrregs[0x10] & 1))
503+
if ((svga->gdcreg[6] & 1) || (svga->attrregs[0x10] & 1)) {
526504
svga->hdisp >>= 1;
505+
svga->hblankstart >>= 1;
506+
svga->hblank_end_val >>= 1;
507+
}
527508
if (et4000->type <= ET4000W32P_REVC) {
528509
if (et4000->type == ET4000W32P_REVC) {
529510
if (svga->hdisp != 1024)
@@ -534,6 +515,8 @@ et4000w32p_recalctimings(svga_t *svga)
534515
break;
535516
case 24:
536517
svga->hdisp /= 3;
518+
svga->hblankstart /= 3;
519+
svga->hblank_end_val /= 3;
537520
if (et4000->type <= ET4000W32P_REVC)
538521
et4000->adjust_cursor = 2;
539522
if ((et4000->type == ET4000W32P_DIAMOND) && ((svga->hdisp == (640 / 2)) || (svga->hdisp == 1232))) {
@@ -553,10 +536,6 @@ et4000w32p_recalctimings(svga_t *svga)
553536
else
554537
svga->render = svga_render_text_80;
555538
} else {
556-
if (svga->adv_flags & FLAG_NOSKEW) {
557-
svga->ma_latch--;
558-
}
559-
560539
switch (svga->gdcreg[5] & 0x60) {
561540
case 0x00:
562541
if (et4000->rev == 5)
@@ -2809,7 +2788,6 @@ et4000w32p_init(const device_t *info)
28092788
et4000->svga.ramdac = device_add(&stg_ramdac_device);
28102789
et4000->svga.clock_gen = et4000->svga.ramdac;
28112790
et4000->svga.getclock = stg_getclock;
2812-
et4000->svga.adv_flags |= FLAG_NOSKEW;
28132791
break;
28142792

28152793
case ET4000W32P_REVC:
@@ -2834,7 +2812,6 @@ et4000w32p_init(const device_t *info)
28342812
et4000->svga.ramdac = device_add(&stg_ramdac_device);
28352813
et4000->svga.clock_gen = et4000->svga.ramdac;
28362814
et4000->svga.getclock = stg_getclock;
2837-
et4000->svga.adv_flags |= FLAG_NOSKEW;
28382815
break;
28392816

28402817
case ET4000W32P_CARDEX:
@@ -2847,7 +2824,6 @@ et4000w32p_init(const device_t *info)
28472824
et4000->svga.ramdac = device_add(&stg_ramdac_device);
28482825
et4000->svga.clock_gen = et4000->svga.ramdac;
28492826
et4000->svga.getclock = stg_getclock;
2850-
et4000->svga.adv_flags |= FLAG_NOSKEW;
28512827
break;
28522828

28532829
case ET4000W32P_DIAMOND:

src/win/win_cdrom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ cdrom_mount(uint8_t id, char *fn)
136136
cdrom[id].ops->exit(&(cdrom[id]));
137137
cdrom[id].ops = NULL;
138138
memset(cdrom[id].image_path, 0, sizeof(cdrom[id].image_path));
139-
if ((fn != NULL) && (strlen(fn) >= 1) && ((fn[strlen(fn) - 1] == '/'))
139+
if ((fn != NULL) && (strlen(fn) >= 1) && (fn[strlen(fn) - 1] == '/'))
140140
fn[strlen(fn) - 1] = '\\';
141141
cdrom_image_open(&(cdrom[id]), fn);
142142
/* Signal media change to the emulated machine. */

0 commit comments

Comments
 (0)