VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

As far as I can see, my accurate VGA emulation is currently the slowest part in my emulator (making the rest of the emulator slow too). Anyone knows how to make this faster? (It's already using some lookup tables for speeding it up)

http://bitbucket.org/superfury/x86emu.git

The VGA emulation modules in in hardware/vga. The main rendering happens in the vga_sequencer.c (combined with the other vga modules), one pixel at a time. VGA_Sequencer() function is called for every pixel to process, from the main thread(where the CPU and hardware also are executed, synchronized with the CPU, which is in turn synchronized with realtime unless it's too slow(<100% realtime speed when the emuation is too slow for the CPU to process)).

It's a little of a bottleneck with slow(er) CPUs atm (<4GHz, testing with 4GHz i7 quad core and 2GHz dual core(~50% speed of the 4GHz one, also PSP running at 333MHz goes as low as (<=)1% CPU speed(it's running though, else it would be 0%, so everything between 0-1% is rounded up to 1% to indicate it's actually running, instead of doing nothing(then it would actually say 0%))).

Although that bottleneck could also be caused by the resizing of the resulting frames? (Depending on the rendering mode set in the emulator settings)

After checking that and disabling the emulator rendering (effectively the resizing of the frames) it runs much faster (about 2-3 times as fast on a 4GHz PC).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io