diff --git a/bochs/iodev/display/banshee.cc b/bochs/iodev/display/banshee.cc index dd2d2b9e7..a0c3580f2 100644 --- a/bochs/iodev/display/banshee.cc +++ b/bochs/iodev/display/banshee.cc @@ -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;