Emulator performance on GNU/Linux

The Uzebox now have a fully functional emulator! Download and discuss it here.

Emulator performance on GNU/Linux

Postby JucaBlues » Wed Apr 15, 2009 3:28 pm

I am running the the emulator compiled from svn (revision 37 of the rev-beta4 branch) on Ubuntu 8.10 (amd64).
It is running very slowly.
Does it have good performance when running in Windows? On Ubuntu the performance is really poor. Any idea why?
JucaBlues
 
Posts: 14
Joined: Mon Apr 06, 2009 11:15 pm

Re: Emulator performance on GNU/Linux

Postby DaveyPocket » Wed Apr 15, 2009 6:29 pm

The emulator runs fine under Windows.
I will have to try it under Ubuntu when I get the chance and post my results.
User avatar
DaveyPocket
 
Posts: 174
Joined: Sun Sep 14, 2008 8:33 pm

Re: Emulator performance on GNU/Linux

Postby nitrofurano » Thu Apr 16, 2009 12:21 am

where can we download a binary .deb or tarball (i386) of this emulator, and some roms (examples) to try? i'm not very lucky on compiling sources...
nitrofurano
 
Posts: 8
Joined: Wed Apr 15, 2009 11:10 pm

Re: Emulator performance on GNU/Linux

Postby uze6666 » Thu Apr 16, 2009 12:36 am

User avatar
uze6666
Site Admin
 
Posts: 1550
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada

Re: Emulator performance on GNU/Linux

Postby louroboros » Sat Apr 18, 2009 3:15 am

I am experiencing very poor emulator performance in Ubuntu, as well.

That tutorial is very out of date.

Here's what I had to do to get the emulator built under linux:
1. Make sure you have the tools required to build...
Code: Select all
sudo apt-get install build-essential libsdl-dev


2. Then get the latest sources... (skip if you already have them)
Code: Select all
svn checkout http://uzebox.googlecode.com/svn/trunk/ uzebox


3. Now edit the file "uzebox/emulator/avr8.cpp" and replace ...
Code: Select all
#include "SDL.h"

... with ...
Code: Select all
#include <SDL/SDL.h>


4. Now build like so:
Code: Select all
g++ -lSDL avr8.cpp -o uzem


5. Test it out:
Code: Select all
./uzem ../demos/megatris.hex


The game is fairly responsive, but it's chewing %100 of one of my cores, and the sound is very choppy and delayed.

Let me know if there's anything I can do to help fix this problem, I'm excited about developing for the platform, but an emulator is crucial (and so is my operating system of choice). :)
louroboros
 
Posts: 2
Joined: Sat Apr 18, 2009 2:57 am

Re: Emulator performance on GNU/Linux

Postby DavidEtherton » Sat Apr 18, 2009 4:33 am

g++ -O3 -lSDL avr8.cpp -o uzem
DavidEtherton
 
Posts: 252
Joined: Tue Dec 02, 2008 12:38 am
Location: Carlsbad, California (USA)

Re: Emulator performance on GNU/Linux

Postby louroboros » Sun Apr 19, 2009 11:47 pm

I guess enabling optimizations improved performance enough to get it to run at close to %100.. but it seems like it's just barely getting there if at all.
I imagine it would still perform rather atrociously on older hardware...

Is there a way to see how close to %100 the emulator is running?
louroboros
 
Posts: 2
Joined: Sat Apr 18, 2009 2:57 am

Re: Emulator performance on GNU/Linux

Postby DavidEtherton » Mon Apr 20, 2009 4:42 am

On MacOS at least, SDL performance is fairly terrible.

If you want to see how fast the emulator can run, turn off sound (-nosound I think) -- otherwise it slows down emulation to avoid flooding the sound buffer.

If/when particular video modes become dominant, it would be pretty simple to detect the timer interrupt and basically simulate the resulting screen much faster than running the video signal emulation code would be able to do it (roughly 90% of the cycles are spent on video and audio mixing, both of which could be done much faster with native code)

-Dave
DavidEtherton
 
Posts: 252
Joined: Tue Dec 02, 2008 12:38 am
Location: Carlsbad, California (USA)

Re: Emulator performance on GNU/Linux

Postby lightfoot256 » Tue Jun 16, 2009 1:37 pm

I noticed in the windows build I downloaded there were lots and lots of errors being printed in the console (especially on the v4 kernel) regarding bad memory access; This caused a big slow down of the emulator maxing my CPU to 100%; minimising the window under xp makes it run a little faster ( I guess windows doesn't have to render all those error lines) but it's still hogging a lot of CPU.

Might make sense to allow enabling/disabling of errors like that.
lightfoot256
 
Posts: 98
Joined: Wed Jun 10, 2009 2:53 pm
Location: South Yorkshire, England

Re: Emulator performance on GNU/Linux

Postby uze6666 » Tue Jun 16, 2009 5:48 pm

Yes, this is a known issue. Most of the bad memory access are in fact generated by LPM instructions used as 3xNOPs. Problem is the Z pointer could point to invalid locations at that time but we don't care. Pragma is working on the emulator and has fixed this. Just don't know when he wants to publish his work.

-uze
User avatar
uze6666
Site Admin
 
Posts: 1550
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada

Next

Return to Uzebox Emulator

Who is online

Users browsing this forum: No registered users and 1 guest