Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext Thread*Show in Threaded Mode


SubjectFast drawing in Windoze Reply to this message
Posted byMinuous
Posted on07/01/06 04:13 PM



I'm the coder of the WinArcadia emulator, which is now feature-complete. I want to optimize it as it is extremely slow, it only achieves 1-2 FPS in most modes, this is with the CPU emulation turned off! The Amiga port of WinArcadia runs faster than this, even through WinUAE!

I'm using SetPixel()/ClipBlit() to do the drawing. Apparently it is much quicker to use SetBitmapBits(), but there doesn't seem to be any reasonable documentation about it.

If I may say so the entire Windoze display subsystem is a joke, it seems convoluted and poorly designed, things are much easier to do on an Amiga. The documentation over at MSDN is absolute crap and there doesn't seem to be any tutorials about it.

I don't want to use DirectX as I know for a fact that it is not necessary to gain adequate performance, there are other emulators of more complex machines which achieve good performance with GDI.

All I need to do is plot pixels one at a time to a bitmap, it only needs to be 8 colours (3 bitplanes), and refresh the window after each frame has been drawn. It already does this of course but much too slowly.

Aaarrrggh....





SubjectAllegro or SDL new Reply to this message
Posted bynewsdee
Posted on07/02/06 11:00 AM



I wouldn't bother with Window's native interfaces, just because they're needlessly convoluted. All you need it a bitmap that you can manipulate without worrying too much about the rest. You can use either Allegro or SDL for that. I personally use Allegro just because I've been using it since the early DOS days (so it feels familiar), but SDL is very popular too.




[download a life]


SubjectRe: Allegro or SDL new Reply to this message
Posted byMinuous
Posted on07/02/06 12:13 PM



> I wouldn't bother with Window's native interfaces, just because they're
> needlessly convoluted. All you need it a bitmap that you can manipulate without
> worrying too much about the rest. You can use either Allegro or SDL for that. I
> personally use Allegro just because I've been using it since the early DOS days
> (so it feels familiar), but SDL is very popular too.

I've worked this out now, and it's dozens of times faster (using StretchDIBitmap()). I didn't end up needing to use Allegro or SDL or DirectX for this, but thanks for the advice anyway.

I agree totally that Windows is convoluted :-)





SubjectRe: Allegro or SDL new Reply to this message
Posted bysmf
Posted on07/09/06 06:36 AM



> I agree totally that Windows is convoluted :-)

Alot of Windows at the GDI level ( i.e. not MFC or other "helper" layers ) is actually very similar to AmigaOS. MUI on AmigaOS is even closer to Windows.

You may also want to have a play with SetDibBits()/GetDibBits(). You can then access the window bitmap directly.

smf





Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode