Thanks for the quick replies.
SteveM said:
Ah, I guess it's just writing to /dev/dsp directly? Still no luck getting SDL audio to work. I got the ALSA stuff compiled in but starting the audio thread still fails.
Correct. In the src-file sound_gp2x.cpp "/dev/dsp" is opened and used.
SteveM said:
john4p said:
Encountered a very weird problem: setting UAE4All to 320x200 pixels doesn't work with framebuffer. While the menu works fine as soon as you start emulation UAE4All crashes.
320x200 without framebuffer works fine.
Also doesn't matter if you set framebuffer to 320x200, too, or some larger area - if the SDL_Surface in UAE4All is 320x200 it crashes (but only in framebuffer-mode).
The lowest working height is 205 pixels meaning 320x205 (and any higher resolution) works fine in framebuffer mode (320x204 and anything lower doesn't) so it's not a big issue (as this still almost uses the full height of games in 320x200 resolution).
I just don't understand why the menu works fine in framebuffer-mode with an SDL_Surface of 320x200 but crashes once you start emulation whilst everything works fine with an SDL_Surface of 320x200 without framebuffer. <_<
That really does sound odd. I've been testing with Handy which has a tiny resolution (160x102) and that worked OK. I'm guessing by crash you mean a segfault? What are the other parameters, like bpp and your ofbset/fbset stuff? I don't know if the library I posted had debugging symbols in it, but I can definitely make a new one which does if you're interested in troubleshooting it.
I don't think there's a bug in ofbset/fbset. UAE4All's menu works fine at 320x200 with framebuffer. Only once you start emulation it crashes - and not with a segfault, but this:
*** glibc detected *** ./uae4all: free(): invalid pointer: 0x00aa12b0 ***
The values for ofbset/fbset are correct:
ofbset -fb $SDL_FBDEV -pos 16 0 -size 768 480 -mem 128000 -en 1 (<= also tried with 800x480 and 640x480)
fbset -fb $SDL_FBDEV -g 320 200 320 200 16
notaz said:
Sounds like the emu is simply writing beyond 200 lines. That 320x200 mode might be a be larger in reality (just a guess, not familiar with Amiga's video hardware), or it might be doing this because of some optimization.
But why does it then work without framebuffer? Without framebuffer I also just call SDL_SetVideoMode with width 320 and height 200 and it still works fine when you start emulation (of course without framebuffer the 320x200 area is a tiny rectangle in the middle of our 800x480 screen).
Btw., with an SDL_Surface of 320x200 UAE4All also crashes if I use for example 320x240 or even 800x480 with fbset.
But well, 320x205 (upscaled to 750x480 to keep correct x:y-aspect ratio) looks great already. The picture is huge. The very few black lines on top and bottom (when playing games with a 320x200-resolution) are hardly noticable.
___________________________________________________________________________
Another issue:
I tried to call ofbset and fbset using system(...) from UAE4All to change the framebuffer dimensions on the fly in UAE4All via button-press. This works flawlessly.
But this would only make sense if I could also change the SDL Surface to the changed dimensions on the fly.
Unfortunately I can't get this to work.
Calling SDL_SetVideoMode again resulted in a segfault. Okay, that's probably because there was still something being drawn to the old Surface when it ceased to exist.
Thus I tried calling
graphics_init() at the end of
flush_block() in sdlgfx.cpp in order to reinitialize the SDL_Surface - of course with changed dimensions.
When I try this UAE4All also crashes - but instead of a segfault with this:
*** glibc detected *** ./uae4all: double free or corruption (out): 0x00b51488 ***
As suggested by some website I exported MALLOC_CHECK_=0 before starting UAE4All to just ignore this double deletion error. But the error is not ignored. Still crashes.
I also searched every source for possible bad "new", "malloc" and "SDL_FreeSurface"-calls. Without success.
So it looks like there won't be the possibility to change the resolution on the fly in UAE4All for now.
You'll have to decide for one at the start (and quit and restart if you want to play at a different resolution).