diff --git a/bochs/iodev/display/voodoo.cc b/bochs/iodev/display/voodoo.cc index c5bfcdc1f..2bd94f0f1 100644 --- a/bochs/iodev/display/voodoo.cc +++ b/bochs/iodev/display/voodoo.cc @@ -178,12 +178,18 @@ BX_THREAD_FUNC(fifo_thread, indata) BX_UNLOCK(fifo_mutex); } break; - case FIFO_WR_FBI: - lfb_w(offset, data, 0xffffffff); - break; case FIFO_WR_TEX: texture_w(offset, data); break; + case FIFO_WR_FBI_32: + lfb_w(offset, data, 0xffffffff); + break; + case FIFO_WR_FBI_16L: + lfb_w(offset, data, 0x0000ffff); + break; + case FIFO_WR_FBI_16H: + lfb_w(offset, data, 0xffff0000); + break; } } if (v->fbi.cmdfifo[0].enabled) { diff --git a/bochs/iodev/display/voodoo_data.h b/bochs/iodev/display/voodoo_data.h index 65bd3a5da..44269711b 100644 --- a/bochs/iodev/display/voodoo_data.h +++ b/bochs/iodev/display/voodoo_data.h @@ -1775,9 +1775,11 @@ bx_bool fifo_wait_for_event(fifo_event_t *fifo_ev) /* fifo content defines */ #define FIFO_TYPES (7 << 29) -#define FIFO_WR_REG (1 << 29) -#define FIFO_WR_FBI (2 << 29) -#define FIFO_WR_TEX (4 << 29) +#define FIFO_WR_REG (1 << 29) +#define FIFO_WR_TEX (2 << 29) +#define FIFO_WR_FBI_32 (3 << 29) +#define FIFO_WR_FBI_16L (4 << 29) +#define FIFO_WR_FBI_16H (5 << 29) BX_CPP_INLINE void fifo_reset(fifo_state *f) { diff --git a/bochs/iodev/display/voodoo_func.h b/bochs/iodev/display/voodoo_func.h index 33f984475..0d3e363ec 100644 --- a/bochs/iodev/display/voodoo_func.h +++ b/bochs/iodev/display/voodoo_func.h @@ -3126,7 +3126,13 @@ void voodoo_w(Bit32u offset, Bit32u data, Bit32u mask) } } else { if (v->fbi.fifo.enabled) { - fifo_add(&v->fbi.fifo, FIFO_WR_FBI | offset, data); + if (mask == 0xffffffff) { + fifo_add(&v->fbi.fifo, FIFO_WR_FBI_32 | offset, data); + } else if (mask & 1) { + fifo_add(&v->fbi.fifo, FIFO_WR_FBI_16L | offset, data); + } else { + fifo_add(&v->fbi.fifo, FIFO_WR_FBI_16H | offset, data); + } } else { lfb_w(offset, data, mask); }