Conversation
Notices
-
@crunklord420 The short explanation: you can only write to VGA memory during blanking periods, because during scan time the bus is busy reading, any write operation stalls and the CPU does nothing; VGA memory is main memory-mapped, obviously, but data transfer is limited by the VGA transfer rate. I think v-blank is not long enough to write the entire buffer, you have to encroach on the active frame time and use h-blanks too, at least in the 640x480 16-color mode. Finding dirty pixels makes sense if you only need to update a small portion of the screen, but if the entire framebuffer is to be redrawn, you're wasting precious microseconds on branching and call MOVSQ for each of the 4800*4 qwords individually, only losing time, because you still need to write every pixel, but now you also need to initialize the pipeline for the next MOVSQ again. All of that may cause the CPU to miss the next VGA bus 'tick', under utilize the V-blank and use more H-blanks than necessary. If you consistently waste all H-blanks, you get severe framerate drops.
My guess is vmware takes some liberties with VGA hardware emulation to produce realistic performance, and virtualbox and qemu try to emulate it 'faithfully', which doesn't quite work out.