Skip to content

Commit

Permalink
More necessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Apr 26, 2024
1 parent 4c1c457 commit 403203c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/include/86box/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,9 @@ extern const device_t wy700_device;
extern const device_t chips_69000_device;
extern const device_t chips_69000_onboard_device;

/* Bochs */
extern const device_t bochs_svga_device;

#endif

#endif /*EMU_VIDEO_H*/
17 changes: 16 additions & 1 deletion src/video/vid_bochs_vbe.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,21 @@ bochs_vbe_outw(uint16_t addr, uint16_t val, void *priv)
svga_recalctimings(&bochs_vbe->svga);
break;

case VBE_DISPI_INDEX_BANK:
{
uint16_t rw_mode = VBE_DISPI_BANK_RW; // compatibility mode
if ((val & VBE_DISPI_BANK_RW) != 0) {
rw_mode = (val & VBE_DISPI_BANK_RW);
}
if (val & VBE_DISPI_BANK_RD) {
bochs_vbe->svga.read_bank = (val & 0x1ff) * (bochs_vbe->bank_gran << 10);
}
if (val & VBE_DISPI_BANK_WR) {
bochs_vbe->svga.write_bank = (val & 0x1ff) * (bochs_vbe->bank_gran << 10);
}
break;
}

case VBE_DISPI_INDEX_ENABLE: {
uint32_t new_bank_gran = 64;
if ((val & VBE_DISPI_ENABLED) && !(bochs_vbe->vbe_regs[VBE_DISPI_ENABLED] & VBE_DISPI_ENABLED)) {
Expand Down Expand Up @@ -413,7 +428,7 @@ bochs_vbe_force_redraw(void *priv)
bochs_vbe->svga.fullchange = changeframecount;
}

const device_t vga_device = {
const device_t bochs_svga_device = {
.name = "Bochs SVGA",
.internal_name = "bochs_svga",
.flags = DEVICE_PCI,
Expand Down
1 change: 1 addition & 0 deletions src/video/vid_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ video_cards[] = {
{ &compaq_voodoo_3_3500_agp_device },
{ &voodoo_3_3500_se_agp_device },
{ &voodoo_3_3500_si_agp_device },
{ &bochs_svga_device },
{ NULL }
// clang-format on
};
Expand Down

0 comments on commit 403203c

Please sign in to comment.