emulator (svn) - video rendering issues on GNU/Linux

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

emulator (svn) - video rendering issues on GNU/Linux

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

I built the revision 37 of the emulator source code from the rev-beta4 branch:

g++ avr8.cpp -o uzem -lSDL -I/usr/include/SDL -ggdb

when I try to run it ( ./uzem ../demos/Megatris/default/Megatris.hex ) it crashes with a SegFault.

I have run it through gdb and discovered that the crash was happening at the line 2002, where the pixels are drawn in the line buffers. It seems that there might be illegal access to data beyond the buffer limits (probably at the end of the frame).

Looking at the code I noticed that fullscreen has a black border. Which means that maybe these wrong accesses would fall within this border if I run the emulator in fullscreen. Then, indeed it worked when opened with -fulscreen flag. But the graphics where wrong. Look at this screenshot:

Image

then I have edited these 2 lines so that they now shift 2 bits instead of only one:

Code: Select all
            current_scanline[current_cycle>>2] = pixel;
            next_scanline[current_cycle>>2] = pixel;



and now it works nice. But it still crashes in windowed mode...
JucaBlues
 
Posts: 14
Joined: Mon Apr 06, 2009 11:15 pm

Re: emulator (svn) - video rendering issues on GNU/Linux

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

Not looking at the code and a pure guess it's nothing to do with video depth is it? 16-bit vs 24/32bit? - Although saying that the colours look okay.
lightfoot256
 
Posts: 98
Joined: Wed Jun 10, 2009 2:53 pm
Location: South Yorkshire, England


Return to Uzebox Emulator

Who is online

Users browsing this forum: No registered users and 1 guest