Emulator in an (not-so) old PC
Moderator: Moderators
Emulator in an (not-so) old PC
I tried RockNES in an old PC, a Pentium 4 with SiS chipset (video/audio). I don't remember the board/system date, but lacks support for widescreen, and even on Windows 7, drivers are not "easily" located through Windows Update - in fact, most of them must be "hunted" Google-ing with a huge luck to find. ^_^;; Anyway, it's another thing.
The emulator works, but only in windowed mode and 1x (original size), with a frame rate around 50Hz. Fullscreen has problems - the program window is still visible in the screen edges, and no game image. Of course, this might be related to the gcc compilation flags, CPU optimizations and so on.
Well, anything specific to compile it with gcc, or just a bit of lucky, and lots of try-and-error builds?
The emulator works, but only in windowed mode and 1x (original size), with a frame rate around 50Hz. Fullscreen has problems - the program window is still visible in the screen edges, and no game image. Of course, this might be related to the gcc compilation flags, CPU optimizations and so on.
Well, anything specific to compile it with gcc, or just a bit of lucky, and lots of try-and-error builds?
Re: Emulator in an (not-so) old PC
Sis is terrible, invest 5$ in a PCI or AGP GPU from a decent vendor.
Re: Emulator in an (not-so) old PC
LoopyNES can run in the most ancient of ancient (early pentium or later) PCs, and that's with standard VGA. It's all about the software that's actually running that matters.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Emulator in an (not-so) old PC
With a major detail - it was written 100% in ASM. No external modules, no sh*t. Pure ASM.Dwedit wrote:LoopyNES can run in the most ancient of ancient (early pentium or later) PCs, and that's with standard VGA. It's all about the software that's actually running that matters.
The Pentium 4 PC is a second PC I own. It's the first time I run my emulator in old hardware, and I want to improve it a bit.
Re: Emulator in an (not-so) old PC
Anyway, I'd be using a small hardware surface for video (256x240), blitting to there, then stretching the hardware surface to the window. On many video cards, that automatically interpolates too.
This can be done with DirectDraw, Direct3D9, or OpenGL.
That would probably take care of any performance bottlenecks on a larger screen size.
Hardest part about learning the graphics APIs is finding good boilerplate code that sets stuff up and gets things ready to go. After that, it's not that hard (make the calls to lock the surface, blit there, unlock the surface, blit to the screen, etc...)
This can be done with DirectDraw, Direct3D9, or OpenGL.
That would probably take care of any performance bottlenecks on a larger screen size.
Hardest part about learning the graphics APIs is finding good boilerplate code that sets stuff up and gets things ready to go. After that, it's not that hard (make the calls to lock the surface, blit there, unlock the surface, blit to the screen, etc...)
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Emulator in an (not-so) old PC
Well, Allegro has an option -stretch_blit_to_hdc — Blits an Allegro memory bitmap to a Windows device context.
At anyway, I'd like to know gcc flags for Pentium 4, and others too... for optimizations. Currently, I've found that i586/686 makes the emulator compatible, but slow. With a "native" flag, the speed is better.
At anyway, I'd like to know gcc flags for Pentium 4, and others too... for optimizations. Currently, I've found that i586/686 makes the emulator compatible, but slow. With a "native" flag, the speed is better.
Re: Emulator in an (not-so) old PC
-march=pentium4. See the gcc manual for other options.
P4 is an oddball thing where it differs from other generations so much that arch optimization really matters.
P4 is an oddball thing where it differs from other generations so much that arch optimization really matters.
Re: Emulator in an (not-so) old PC
Are you sure P4 only? I noticed a major difference with i586 and native options while compiling & running in my Core i5 2nd gen.calima wrote:-march=pentium4. See the gcc manual for other options.
P4 is an oddball thing where it differs from other generations so much that arch optimization really matters.
Re: Emulator in an (not-so) old PC
Pentium 4 has very large pipelines, and is extremely sensitive to cache misses and other pipeline stalls.
They pretty much canned that generation and went back a step, building their next architectures after the Pentium III instead.
They pretty much canned that generation and went back a step, building their next architectures after the Pentium III instead.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Emulator in an (not-so) old PC
You don't want this one. The source surface is in system RAM, and the destination surface is a device context, either the primary surface (VRAM) or a DIB section (system RAM). You want both source and destination to be in VRAM.Zepper wrote:Well, Allegro has an option -stretch_blit_to_hdc — Blits an Allegro memory bitmap to a Windows device context.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Emulator in an (not-so) old PC
Naturally any processor benefits from tuned optimizations. It's just larger for some.