Previous 15994 Revisions Next

r14449 Monday 13th February, 2012 at 23:44:51 UTC by R. Belmont
sync with MAME (nw)
[src/osd/sdl]README_SDL20.txt sdlinc.h sdlmain.c sdlos_macosx.c video.c

src/osd/sdl/README_SDL20.txt
r14448r14449
1======================================================================================
2SDLMAME now supports SDL from version 2.0 on upwards.
3=======================================================================================
4 
5 
6Warning
7=======
8 
9- SDL2.0 still is still under development, the following may or may not
10  work.
11- if you are using wine on unix be sure to disable wintab32.dll
12 
13Known bugs:
14===========
15 
16* SDL1.3/X11: Some compound keys, e.g. "'" are not supported by SDL driver
17* SDL2.0: sdlvideofps does not take -numscreens>1 into account.
18* SDL1.3/WIN32: crashes with -rd d3d
19* SDL1.3/WIN32: resizing does not work
20       
21Build SDL 2.0 from HG
22======================
23 
24Pull 2.0 from hg. Than 
25 
26sh autogen.sh
27./configure --prefix=/usr/local/sdl13/ --disable-video-svga --enable-video-directfb --enable-fusionsound
28make 
29[sudo] make install
30 
31You may leave away the last two enables, if you do not want to play around with directfb - although it is lightning fast now :-)
32 
33To build the files in test, do
34 
35cd test
36./configure --prefix=/usr/local/sdl13/ --with-sdl-pfx=/usr/local/sdl13
37make
38 
39Replace /usr/local/sdl13 above with a safe location, this may as well be a directory in $HOME.
40 
41Edit sdl.mak to have
42 
43SDL_LIBVER = sdl2
44SDL_INSTALL_ROOT = /usr/local/sdl13
45 
46That's it.
47 
48make
49./mame -video sdl13 -rd opengl dkong
50 
51 
52All drivers
53===========
54 
55should support:
56 
57-waitvsync
58-prescale
59-resolution[X]
60-switchres
61-numscreens
62-screen[X]
63 
64The following modes are working:
65 
66SDL13
67=====
68 
69This is driver using SDL texture and line drawing support. It supports 
70-prescale, -filter and -waitvsync.  The driver determines which pixel 
71formats perform best and converts textures to these pixel formats and at 
72the same time performs any necessary rotation.   
73 
74Basic usage examples:
75 
76X11/opengl: ./mamed -video sdl13 -rd opengl mario 
77DFB/DFB:    ./mamed -video sdl13 -vd directfb -rd directfb mario 
78 
79The performance of the directfb driver depends on the combined
80support of the kernel framebuffer driver and the directfb driver.
81Having loaded radeonfb I get the same performance as with the open source
82radeon X11 driver.
83 
84Using the SDL software renderer (preferred is -video soft, thought)
85 
86X11,DFB,WIN32 ./mamed -video sdl13 -rd software
87 
88Soft:
89=====
90 
91./mamed -mt -video soft  -sm none -numscreens 2 mario
92 
93OpenGL:
94=======
95 
96Plain opengl does work. Anything more advanced like pbo, fbo or glsl will 
97most probably not work with more than one screen.
98 
99   ./mamed -mt -video opengl mario -nogl_pbo -nogl_vbo -nogl_glsl -numscreens 2
100 
101YUV - modes:
102============
103 
104   ./mamed -mt -video soft -sm yuy2 mario
105 
106Using DirectFB, the following should get you going
107 
108   ./mamed -mt -video soft -sm yuy2 -vd directfb -rd directfb mario
109   
110for accelerated blitting on the framebuffer - provided directfb supports it. 
111At least my Radeon R480 is supported.
112 
113-video soft and -scale_mode (-sm)
114=================================
115 
116sdlmame supports 7 scale modes using textures in -video soft:
117 
118none: All rendering/scaling in software.
119 
120hwblit: Rendering in software/scaling with hardware (if supported)
121 
122hwbest: Rendering in software/antialiased scaling with hardware (if supported)
123 
124yv12, yv12x2, yuy2, yuy2x2: 
125Rendering in software / scaling with hardware (if supported)
126 
127Whether these are actually hardware accelerated depends on the SDL driver
128and the hardware. The SDL directfb driver supports all above if the hardware 
129supports it. However, only one YUV-texture per display is supported. 
130The second window consequently will get "software" YUV blitting.
131 
132     
1======================================================================================
2SDLMAME now supports SDL from version 2.0 on upwards.
3=======================================================================================
4
5
6Warning
7=======
8
9- SDL2.0 still is still under development, the following may or may not
10  work.
11- if you are using wine on unix be sure to disable wintab32.dll
12
13Known bugs:
14===========
15
16* SDL1.3/X11: Some compound keys, e.g. "'" are not supported by SDL driver
17* SDL2.0: sdlvideofps does not take -numscreens>1 into account.
18* SDL1.3/WIN32: crashes with -rd d3d
19* SDL1.3/WIN32: resizing does not work
20     
21Build SDL 2.0 from HG
22======================
23
24Pull 2.0 from hg. Than
25
26sh autogen.sh
27./configure --prefix=/usr/local/sdl13/ --disable-video-svga --enable-video-directfb --enable-fusionsound
28make
29[sudo] make install
30
31You may leave away the last two enables, if you do not want to play around with directfb - although it is lightning fast now :-)
32
33To build the files in test, do
34
35cd test
36./configure --prefix=/usr/local/sdl13/ --with-sdl-pfx=/usr/local/sdl13
37make
38
39Replace /usr/local/sdl13 above with a safe location, this may as well be a directory in $HOME.
40
41Edit sdl.mak to have
42
43SDL_LIBVER = sdl2
44SDL_INSTALL_ROOT = /usr/local/sdl13
45
46That's it.
47
48make
49./mame -video sdl13 -rd opengl dkong
50
51
52All drivers
53===========
54
55should support:
56
57-waitvsync
58-prescale
59-resolution[X]
60-switchres
61-numscreens
62-screen[X]
63
64The following modes are working:
65
66SDL13
67=====
68
69This is driver using SDL texture and line drawing support. It supports
70-prescale, -filter and -waitvsync.  The driver determines which pixel
71formats perform best and converts textures to these pixel formats and at
72the same time performs any necessary rotation. 
73
74Basic usage examples:
75
76X11/opengl: ./mamed -video sdl13 -rd opengl mario
77DFB/DFB:    ./mamed -video sdl13 -vd directfb -rd directfb mario
78
79The performance of the directfb driver depends on the combined
80support of the kernel framebuffer driver and the directfb driver.
81Having loaded radeonfb I get the same performance as with the open source
82radeon X11 driver.
83
84Using the SDL software renderer (preferred is -video soft, thought)
85
86X11,DFB,WIN32 ./mamed -video sdl13 -rd software
87
88Soft:
89=====
90
91./mamed -mt -video soft  -sm none -numscreens 2 mario
92
93OpenGL:
94=======
95
96Plain opengl does work. Anything more advanced like pbo, fbo or glsl will
97most probably not work with more than one screen.
98
99   ./mamed -mt -video opengl mario -nogl_pbo -nogl_vbo -nogl_glsl -numscreens 2
100
101YUV - modes:
102============
103
104   ./mamed -mt -video soft -sm yuy2 mario
105
106Using DirectFB, the following should get you going
107
108   ./mamed -mt -video soft -sm yuy2 -vd directfb -rd directfb mario
109   
110for accelerated blitting on the framebuffer - provided directfb supports it.
111At least my Radeon R480 is supported.
112
113-video soft and -scale_mode (-sm)
114=================================
115
116sdlmame supports 7 scale modes using textures in -video soft:
117
118none: All rendering/scaling in software.
119
120hwblit: Rendering in software/scaling with hardware (if supported)
121
122hwbest: Rendering in software/antialiased scaling with hardware (if supported)
123
124yv12, yv12x2, yuy2, yuy2x2:
125Rendering in software / scaling with hardware (if supported)
126
127Whether these are actually hardware accelerated depends on the SDL driver
128and the hardware. The SDL directfb driver supports all above if the hardware
129supports it. However, only one YUV-texture per display is supported.
130The second window consequently will get "software" YUV blitting.
131
132     
src/osd/sdl/sdlos_macosx.c
r14448r14449
1010//============================================================
1111
1212// standard sdl header
13#include "sdlinc.h"
14
1513#include <sys/stat.h>
1614#include <unistd.h>
1715
r14448r14449
1917#include <mach/mach_time.h>
2018#include <Carbon/Carbon.h>
2119
20#include "sdlinc.h"
21
2222// MAME headers
2323#include "osdcore.h"
2424
src/osd/sdl/video.c
r14448r14449
99//
1010//============================================================
1111
12#include "sdlinc.h"
13
1412#ifdef SDLMAME_X11
1513#include <X11/extensions/Xinerama.h>
1614#endif
r14448r14449
3735#include <os2.h>
3836#endif
3937
38#include "sdlinc.h"
39
4040// MAME headers
4141#include "emu.h"
4242#include "rendutil.h"
src/osd/sdl/sdlmain.c
r14448r14449
99//
1010//============================================================
1111
12// standard sdl header
13#include "sdlinc.h"
1412
1513#ifdef SDLMAME_UNIX
1614#ifndef SDLMAME_MACOSX
r14448r14449
3634#include <os2.h>
3735#endif
3836
37#include "sdlinc.h"
38
3939// MAME headers
4040#include "osdepend.h"
4141#include "emu.h"
src/osd/sdl/sdlinc.h
r14448r14449
1#ifndef _sdlinc_h_
2#define _sdlinc_h_
3 
4#if (SDLMAME_SDL2)
5#include <SDL2/SDL.h>
6#include <SDL2/SDL_version.h>
7// on win32 this includes windows.h by itself and breaks us!
8#ifndef SDLMAME_WIN32
9#include <SDL2/SDL_syswm.h>
10#endif
11#else
12#include <SDL/SDL.h>
13#include <SDL/SDL_version.h>
14// on win32 this includes windows.h by itself and breaks us!
15#ifndef SDLMAME_WIN32
16#include <SDL/SDL_syswm.h>
17#endif
18#endif
19 
20#endif
1#ifndef _sdlinc_h_
2#define _sdlinc_h_
3
4#if (SDLMAME_SDL2)
5#include <SDL2/SDL.h>
6#include <SDL2/SDL_version.h>
7// on win32 this includes windows.h by itself and breaks us!
8#ifndef SDLMAME_WIN32
9#include <SDL2/SDL_syswm.h>
10#endif
11#else
12#include <SDL/SDL.h>
13#include <SDL/SDL_version.h>
14// on win32 this includes windows.h by itself and breaks us!
15#ifndef SDLMAME_WIN32
16#include <SDL/SDL_syswm.h>
17#endif
18#endif
19
20#endif

Previous 15994 Revisions Next


© 1998-2018 The MESS Team