游戏移植,SDL与framebuffer
移植了一个游戏到ARM92-EJS,通过X(export DISPLAY=:0)是可以运行的,但是游戏速度有点慢,16位游戏。想直接走framebuffer!但是export SDL_VIDEODRIVER=FBCON
“root@xxxx:/# export SDL_VIDEODRIVER=FBCON
root@xxxx:/# ./snes9x ./snes9x_roms/course.zip
/dev/dsp: No such file or directory
Sound device open failed
Could not initialize SDL(No available video device)
。
如果直接进入ROOTFS,不进行DISPLAY的设置,也不进行export SDL_VIDEODRIVER=FBCON,错误是下面这样的(我加了debug信息。)。我的屏幕是:480x272.
root@xxxx:/# ./snes9x ./snes9x_roms/course.zip
/dev/dsp: No such file or directory
Sound device open failed
Checked mode 1152x864 at 8 bpp, got mode 1152x864 at 8 bpp
Adding mode 1152x864 at 1 bytes per pixel
Checked mode 1024x768 at 8 bpp, got mode 1024x768 at 8 bpp
Adding mode 1024x768 at 1 bytes per pixel
Checked mode 960x720 at 8 bpp, got mode 960x720 at 8 bpp
Adding mode 960x720 at 1 bytes per pixel
Checked mode 800x600 at 8 bpp, got mode 800x600 at 8 bpp
Adding mode 800x600 at 1 bytes per pixel
Checked mode 768x576 at 8 bpp, got mode 768x576 at 8 bpp
Adding mode 768x576 at 1 bytes per pixel
Checked mode 720x576 at 8 bpp, got mode 720x576 at 8 bpp
No valid timing line for mode 720x576
Checked mode 720x480 at 8 bpp, got mode 720x480 at 8 bpp
No valid timing line for mode 720x480
Checked mode 640x480 at 8 bpp, got mode 640x480 at 8 bpp
Adding mode 640x480 at 1 bytes per pixel
Checked mode 640x400 at 8 bpp, got mode 640x400 at 8 bpp
Adding mode 640x400 at 1 bytes per pixel
Checked mode 512x384 at 8 bpp, got mode 512x384 at 8 bpp
Adding mode 512x384 at 1 bytes per pixel
Checked mode 320x240 at 8 bpp, got mode 320x240 at 8 bpp
Adding mode 320x240 at 1 bytes per pixel
Checked mode 320x200 at 8 bpp, got mode 320x200 at 8 bpp
Adding mode 320x200 at 1 bytes per pixel
Checked mode 800x600 at 16 bpp, got mode 800x600 at 16 bpp
Adding mode 800x600 at 2 bytes per pixel
Checked mode 768x576 at 16 bpp, got mode 768x576 at 16 bpp
Adding mode 768x576 at 2 bytes per pixel
Checked mode 720x576 at 16 bpp, got mode 720x576 at 16 bpp
No valid timing line for mode 720x576
Checked mode 720x480 at 16 bpp, got mode 720x480 at 16 bpp
No valid timing line for mode 720x480
Checked mode 640x480 at 16 bpp, got mode 640x480 at 16 bpp
Adding mode 640x480 at 2 bytes per pixel
Checked mode 640x400 at 16 bpp, got mode 640x400 at 16 bpp
Adding mode 640x400 at 2 bytes per pixel
Checked mode 512x384 at 16 bpp, got mode 512x384 at 16 bpp
Adding mode 512x384 at 2 bytes per pixel
No valid timing line for mode 480x272
Checked mode 320x240 at 16 bpp, got mode 320x240 at 16 bpp
Adding mode 320x240 at 2 bytes per pixel
Checked mode 320x200 at 16 bpp, got mode 320x200 at 16 bpp
Adding mode 320x200 at 2 bytes per pixel
Checked mode 640x400 at 32 bpp, got mode 640x400 at 32 bpp
Adding mode 640x400 at 4 bytes per pixel
Checked mode 512x384 at 32 bpp, got mode 512x384 at 32 bpp
Adding mode 512x384 at 4 bytes per pixel
Checked mode 320x240 at 32 bpp, got mode 320x240 at 32 bpp
Adding mode 320x240 at 4 bytes per pixel
Checked mode 320x200 at 32 bpp, got mode 320x200 at 32 bpp
Adding mode 320x200 at 4 bytes per pixel
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3982:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM default
Printing original vinfo:
Printing vinfo:
xres: 480
yres: 272
xres_virtual: 480
yres_virtual: 272
xoffset: 0
yoffset: 0
bits_per_pixel: 16
grayscale: 0
nonstd: 0
activate: 0
height: -1
width: -1
accel_flags: 0
pixclock: 39721
left_margin: 40
right_margin: 24
upper_margin: 32
lower_margin: 11
hsync_len: 96
vsync_len: 2
sync: 0
vmode: 0
red: 5/11
green: 6/5
blue: 5/0
alpha: 0/0
Using VESA timings for 320x240
Printing wanted vinfo:
Printing vinfo:
xres: 320
yres: 240
xres_virtual: 320
yres_virtual: 480
xoffset: 0
yoffset: 0
bits_per_pixel: 16
grayscale: 0
nonstd: 0
activate: 0
height: -1
width: -1
accel_flags: 0
pixclock: 63492
left_margin: 16
right_margin: 16
upper_margin: 16
lower_margin: 4
hsync_len: 48
vsync_len: 2
sync: 0
vmode: 2
red: 0/0
green: 0/0
blue: 0/0
alpha: 0/0
Couldn't set video mode: Couldn't set console screen info