Skip to content

Commit

Permalink
Banshee / Voodoo3: Added support for mem_read() with length 3.
Browse files Browse the repository at this point in the history
This should fix Voodoo3 with Windows 3.11 driver.
  • Loading branch information
vruppert committed Sep 19, 2024
1 parent 0fe6799 commit 52c2fbe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bochs/iodev/display/banshee.cc
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,16 @@ void bx_banshee_c::mem_read(bx_phy_address addr, unsigned len, void *data)
case 2:
*((Bit16u*)data) = (Bit16u)value;
break;
case 3:
#ifdef BX_LITTLE_ENDIAN
*((Bit16u*)data) = (Bit16u)value;
*((Bit8u*)data + 2) = (Bit8u)(value >> 16);
#else
for (unsigned i = 0; i < 3; i++) {
*((Bit8u*)data + i) = (Bit8u)(value >> ((2 - i) << 8));
}
#endif
break;
case 4:
*((Bit32u*)data) = (Bit32u)value;
break;
Expand Down

0 comments on commit 52c2fbe

Please sign in to comment.