src/osd/sdl/README_SDL20.txt
| r14448 | r14449 | |
| 1 | | ======================================================================================
|
| 2 | | SDLMAME now supports SDL from version 2.0 on upwards.
|
| 3 | | =======================================================================================
|
| 4 | | |
| 5 | | |
| 6 | | Warning
|
| 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 | | |
| 13 | | Known 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 | | |
| 21 | | Build SDL 2.0 from HG
|
| 22 | | ======================
|
| 23 | | |
| 24 | | Pull 2.0 from hg. Than |
| 25 | | |
| 26 | | sh autogen.sh
|
| 27 | | ./configure --prefix=/usr/local/sdl13/ --disable-video-svga --enable-video-directfb --enable-fusionsound
|
| 28 | | make |
| 29 | | [sudo] make install
|
| 30 | | |
| 31 | | You may leave away the last two enables, if you do not want to play around with directfb - although it is lightning fast now :-)
|
| 32 | | |
| 33 | | To build the files in test, do
|
| 34 | | |
| 35 | | cd test
|
| 36 | | ./configure --prefix=/usr/local/sdl13/ --with-sdl-pfx=/usr/local/sdl13
|
| 37 | | make
|
| 38 | | |
| 39 | | Replace /usr/local/sdl13 above with a safe location, this may as well be a directory in $HOME.
|
| 40 | | |
| 41 | | Edit sdl.mak to have
|
| 42 | | |
| 43 | | SDL_LIBVER = sdl2
|
| 44 | | SDL_INSTALL_ROOT = /usr/local/sdl13
|
| 45 | | |
| 46 | | That's it.
|
| 47 | | |
| 48 | | make
|
| 49 | | ./mame -video sdl13 -rd opengl dkong
|
| 50 | | |
| 51 | | |
| 52 | | All drivers
|
| 53 | | ===========
|
| 54 | | |
| 55 | | should support:
|
| 56 | | |
| 57 | | -waitvsync
|
| 58 | | -prescale
|
| 59 | | -resolution[X]
|
| 60 | | -switchres
|
| 61 | | -numscreens
|
| 62 | | -screen[X]
|
| 63 | | |
| 64 | | The following modes are working:
|
| 65 | | |
| 66 | | SDL13
|
| 67 | | =====
|
| 68 | | |
| 69 | | This is driver using SDL texture and line drawing support. It supports |
| 70 | | -prescale, -filter and -waitvsync. The driver determines which pixel |
| 71 | | formats perform best and converts textures to these pixel formats and at |
| 72 | | the same time performs any necessary rotation. |
| 73 | | |
| 74 | | Basic usage examples:
|
| 75 | | |
| 76 | | X11/opengl: ./mamed -video sdl13 -rd opengl mario |
| 77 | | DFB/DFB: ./mamed -video sdl13 -vd directfb -rd directfb mario |
| 78 | | |
| 79 | | The performance of the directfb driver depends on the combined
|
| 80 | | support of the kernel framebuffer driver and the directfb driver.
|
| 81 | | Having loaded radeonfb I get the same performance as with the open source
|
| 82 | | radeon X11 driver.
|
| 83 | | |
| 84 | | Using the SDL software renderer (preferred is -video soft, thought)
|
| 85 | | |
| 86 | | X11,DFB,WIN32 ./mamed -video sdl13 -rd software
|
| 87 | | |
| 88 | | Soft:
|
| 89 | | =====
|
| 90 | | |
| 91 | | ./mamed -mt -video soft -sm none -numscreens 2 mario
|
| 92 | | |
| 93 | | OpenGL:
|
| 94 | | =======
|
| 95 | | |
| 96 | | Plain opengl does work. Anything more advanced like pbo, fbo or glsl will |
| 97 | | most probably not work with more than one screen.
|
| 98 | | |
| 99 | | ./mamed -mt -video opengl mario -nogl_pbo -nogl_vbo -nogl_glsl -numscreens 2
|
| 100 | | |
| 101 | | YUV - modes:
|
| 102 | | ============
|
| 103 | | |
| 104 | | ./mamed -mt -video soft -sm yuy2 mario
|
| 105 | | |
| 106 | | Using DirectFB, the following should get you going
|
| 107 | | |
| 108 | | ./mamed -mt -video soft -sm yuy2 -vd directfb -rd directfb mario
|
| 109 | |
|
| 110 | | for accelerated blitting on the framebuffer - provided directfb supports it. |
| 111 | | At least my Radeon R480 is supported.
|
| 112 | | |
| 113 | | -video soft and -scale_mode (-sm)
|
| 114 | | =================================
|
| 115 | | |
| 116 | | sdlmame supports 7 scale modes using textures in -video soft:
|
| 117 | | |
| 118 | | none: All rendering/scaling in software.
|
| 119 | | |
| 120 | | hwblit: Rendering in software/scaling with hardware (if supported)
|
| 121 | | |
| 122 | | hwbest: Rendering in software/antialiased scaling with hardware (if supported)
|
| 123 | | |
| 124 | | yv12, yv12x2, yuy2, yuy2x2: |
| 125 | | Rendering in software / scaling with hardware (if supported)
|
| 126 | | |
| 127 | | Whether these are actually hardware accelerated depends on the SDL driver
|
| 128 | | and the hardware. The SDL directfb driver supports all above if the hardware |
| 129 | | supports it. However, only one YUV-texture per display is supported. |
| 130 | | The second window consequently will get "software" YUV blitting.
|
| 131 | | |
| 132 | |
|
| 1 | ====================================================================================== |
| 2 | SDLMAME now supports SDL from version 2.0 on upwards. |
| 3 | ======================================================================================= |
| 4 | |
| 5 | |
| 6 | Warning |
| 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 | |
| 13 | Known 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 | |
| 21 | Build SDL 2.0 from HG |
| 22 | ====================== |
| 23 | |
| 24 | Pull 2.0 from hg. Than |
| 25 | |
| 26 | sh autogen.sh |
| 27 | ./configure --prefix=/usr/local/sdl13/ --disable-video-svga --enable-video-directfb --enable-fusionsound |
| 28 | make |
| 29 | [sudo] make install |
| 30 | |
| 31 | You may leave away the last two enables, if you do not want to play around with directfb - although it is lightning fast now :-) |
| 32 | |
| 33 | To build the files in test, do |
| 34 | |
| 35 | cd test |
| 36 | ./configure --prefix=/usr/local/sdl13/ --with-sdl-pfx=/usr/local/sdl13 |
| 37 | make |
| 38 | |
| 39 | Replace /usr/local/sdl13 above with a safe location, this may as well be a directory in $HOME. |
| 40 | |
| 41 | Edit sdl.mak to have |
| 42 | |
| 43 | SDL_LIBVER = sdl2 |
| 44 | SDL_INSTALL_ROOT = /usr/local/sdl13 |
| 45 | |
| 46 | That's it. |
| 47 | |
| 48 | make |
| 49 | ./mame -video sdl13 -rd opengl dkong |
| 50 | |
| 51 | |
| 52 | All drivers |
| 53 | =========== |
| 54 | |
| 55 | should support: |
| 56 | |
| 57 | -waitvsync |
| 58 | -prescale |
| 59 | -resolution[X] |
| 60 | -switchres |
| 61 | -numscreens |
| 62 | -screen[X] |
| 63 | |
| 64 | The following modes are working: |
| 65 | |
| 66 | SDL13 |
| 67 | ===== |
| 68 | |
| 69 | This is driver using SDL texture and line drawing support. It supports |
| 70 | -prescale, -filter and -waitvsync. The driver determines which pixel |
| 71 | formats perform best and converts textures to these pixel formats and at |
| 72 | the same time performs any necessary rotation. |
| 73 | |
| 74 | Basic usage examples: |
| 75 | |
| 76 | X11/opengl: ./mamed -video sdl13 -rd opengl mario |
| 77 | DFB/DFB: ./mamed -video sdl13 -vd directfb -rd directfb mario |
| 78 | |
| 79 | The performance of the directfb driver depends on the combined |
| 80 | support of the kernel framebuffer driver and the directfb driver. |
| 81 | Having loaded radeonfb I get the same performance as with the open source |
| 82 | radeon X11 driver. |
| 83 | |
| 84 | Using the SDL software renderer (preferred is -video soft, thought) |
| 85 | |
| 86 | X11,DFB,WIN32 ./mamed -video sdl13 -rd software |
| 87 | |
| 88 | Soft: |
| 89 | ===== |
| 90 | |
| 91 | ./mamed -mt -video soft -sm none -numscreens 2 mario |
| 92 | |
| 93 | OpenGL: |
| 94 | ======= |
| 95 | |
| 96 | Plain opengl does work. Anything more advanced like pbo, fbo or glsl will |
| 97 | most probably not work with more than one screen. |
| 98 | |
| 99 | ./mamed -mt -video opengl mario -nogl_pbo -nogl_vbo -nogl_glsl -numscreens 2 |
| 100 | |
| 101 | YUV - modes: |
| 102 | ============ |
| 103 | |
| 104 | ./mamed -mt -video soft -sm yuy2 mario |
| 105 | |
| 106 | Using DirectFB, the following should get you going |
| 107 | |
| 108 | ./mamed -mt -video soft -sm yuy2 -vd directfb -rd directfb mario |
| 109 | |
| 110 | for accelerated blitting on the framebuffer - provided directfb supports it. |
| 111 | At least my Radeon R480 is supported. |
| 112 | |
| 113 | -video soft and -scale_mode (-sm) |
| 114 | ================================= |
| 115 | |
| 116 | sdlmame supports 7 scale modes using textures in -video soft: |
| 117 | |
| 118 | none: All rendering/scaling in software. |
| 119 | |
| 120 | hwblit: Rendering in software/scaling with hardware (if supported) |
| 121 | |
| 122 | hwbest: Rendering in software/antialiased scaling with hardware (if supported) |
| 123 | |
| 124 | yv12, yv12x2, yuy2, yuy2x2: |
| 125 | Rendering in software / scaling with hardware (if supported) |
| 126 | |
| 127 | Whether these are actually hardware accelerated depends on the SDL driver |
| 128 | and the hardware. The SDL directfb driver supports all above if the hardware |
| 129 | supports it. However, only one YUV-texture per display is supported. |
| 130 | The second window consequently will get "software" YUV blitting. |
| 131 | |
| 132 | |