It is currently Tue Oct 17, 2017 12:53 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sun Apr 16, 2017 8:20 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
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? ;)


Top
 Profile  
 
PostPosted: Sun Apr 16, 2017 11:40 am 
Offline

Joined: Tue Oct 06, 2015 10:16 am
Posts: 552
Sis is terrible, invest 5$ in a PCI or AGP GPU from a decent vendor.


Top
 Profile  
 
PostPosted: Sun Apr 16, 2017 11:55 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3941
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!


Top
 Profile  
 
PostPosted: Sun Apr 16, 2017 7:59 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
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.

With a major detail - it was written 100% in ASM. No external modules, no sh*t. Pure ASM.

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.


Top
 Profile  
 
PostPosted: Sun Apr 16, 2017 9:09 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3941
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...)

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Mon Apr 17, 2017 4:47 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
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.


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 1:26 am 
Offline

Joined: Tue Oct 06, 2015 10:16 am
Posts: 552
-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.


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 4:09 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
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.

Are you sure P4 only? I noticed a major difference with i586 and native options while compiling & running in my Core i5 2nd gen.


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 4:48 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3941
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.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 4:51 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3941
Zepper wrote:
Well, Allegro has an option -stretch_blit_to_hdc — Blits an Allegro memory bitmap to a Windows device context.

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.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Wed Apr 19, 2017 1:36 am 
Offline

Joined: Tue Oct 06, 2015 10:16 am
Posts: 552
Naturally any processor benefits from tuned optimizations. It's just larger for some.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Gilbert, Google Adsense [Bot], Pokun and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group