Skip to content

Conversation

@AITUS95
Copy link
Contributor

@AITUS95 AITUS95 commented Nov 26, 2025

Summary

This change adjusts FIFO wake timing and CMDFIFO batching only for Voodoo1.
On fast emulated CPUs, some games (e.g., Final Racing) showed slow menu interaction when using a Voodoo1 card. Increasing batching and reducing wake frequency fixes this without affecting rendering or compatibility.

During testing, the same change applied to other cards (Voodoo2/Banshee/Voodoo3) could cause stalls in certain titles (for example Scream Rally 2 would freeze right when the race started). Because of that, the original behavior is restored for every card except Voodoo1.

No rendering logic or register behavior is modified here, only timing.


Files Changed

src/video/vid_voodoo.c
src/video/vid_voodoo_fifo.c

Code Changes

src/video/vid_voodoo_fifo.c
Voodoo1 uses a longer delay between FIFO thread wakeups; other cards keep the original value:

#define WAKE_DELAY_DEFAULT (TIMER_USEC * 100)
#define WAKE_DELAY_OF(v) ((v)->type == VOODOO_1 ? (TIMER_USEC * 2000) : WAKE_DELAY_DEFAULT)

timer_set_delay_u64(&voodoo->wake_timer, WAKE_DELAY_OF(voodoo));

src/video/vid_voodoo.c
Voodoo1 batches more CMDFIFO writes before waking the thread.
Other cards keep the original < 20 threshold to avoid stalls:

if (voodoo->type == VOODOO_1) {
    if ((voodoo->cmdfifo_depth_wr - voodoo->cmdfifo_depth_rd) > 300)
        voodoo_wake_fifo_thread(voodoo);
} else {
    if ((voodoo->cmdfifo_depth_wr - voodoo->cmdfifo_depth_rd) < 20)
        voodoo_wake_fifo_thread(voodoo);
}

Before / After (Final Racing, Voodoo1)

Before (slow UI):
NO FIX

After (normal speed):
FIX


Testing

Card Result
Voodoo1 UI slowdown fixed (Final Racing)
Voodoo2 No issues found
Banshee No issues found
Voodoo3 No issues found

Notes

  • No ROM changes required
  • No effect on rendering/output
  • All behavior changes are guarded by voodoo->type == VOODOO_1

@OBattler OBattler merged commit e6348aa into 86Box:master Nov 26, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants