|
Well, 'SDL_dreamcast.h' header file has a set of functions as SDL addons for Dreamcast:
|
|
|
|
|
|
|
|
|
- VIDEO
|
SDL_DC_SetVideoDriver(SDL_DC_driver value)
|
Before SDL_Init call, you can choose SDL video driver for Dreamcast. The following values are valid.
- SDL_DC_DMA_VIDEO (default)
|
Use DMA video drive.
It is the fastest video driver using double buffer since every graphic access uses RAM and SDL_Flip function sends data to VRAM using DMA.
|
- SDL_DC_TEXTURED_VIDEO
|
Use Textured video driver.
If you want to use a virtual resolution (no 640x480, 320x240, ... ), you can use this driver for scaling using hardware texture.
PVR textures is always 2^n (128x128, 256x128, 512x256, ... ) and these resolutions are real SDL_Surface resolutions.
Using SDL_FULLSCREEN flag only 2^n resolution are allowed, but if you do not use this flag it will be automatically fit to SDL_SetVideoMode resolution.
See SDL_DC_SetWindow for manual fit.
|
- SDL_DC_DIRECT_VIDEO
|
Use Direct buffer video driver.
Maybe faster than DMA driver if you do not use double buffer.
|
|
|
|
|
|
|
|
SDL_DC_SetWindow(int width, int height)
|
Only for textured video driver and must be called after SDL_SetVideoMode ,
this function allow setting the visible area (hardware scaled).
If you open a 512x256 texture resolution, only smaller virtual resolution is allowed.
|
|
|
|
|
|
|
SDL_DC_VerticalWait(SDL_bool value)
|
Enable/disable wait for vertical retrace before blitting to PVR hardware.
|
|
|
|
|
|
|
SDL_DC_ShowAskHz(SDL_bool value)
|
Enable/disable ask for 50/60Hz (only for PAL Dreamcasts) video.
|
|
|
|
|
|
|
SDL_DC_Default60Hz(SDL_bool value)
|
True for 60Hz default display (only for PAL Dreamcasts).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- EVENTS
|
SDL_DC_MapKey(int joy, SDL_DC_button button, SDLKey key)
|
Map a Dreamcast button to SDLKey .
First parameter is number of Dreamcast joystick port (0,1,2 or 3).
The following table shows valid values for second parameter and default values for third parameter.
Value
| Port 0
| Port 1
| Port 2
| Port 3
|
SDL_DC_START |
SDLK_RETURN |
SDLK_z |
SDLK_v |
SDLK_m |
SDL_DC_A |
SDLK_LCTRL |
SDLK_e |
SDLK_y |
SDLK_o |
SDL_DC_B |
SDLK_LALT |
SDLK_q |
SDLK_r |
SDLK_u |
SDL_DC_X |
SDLK_SPACE |
SDLK_x |
SDLK_b |
SDLK_COMMA |
SDL_DC_Y |
SDLK_LSHIFT |
SDLK_c |
SDLK_n |
SDLK_PERIOD |
SDL_DC_L |
SDLK_TAB |
SDLK_1 |
SDLK_4 |
SDLK_8 |
SDL_DC_R |
SDLK_BACKSPACE |
SDLK_2 |
SDLK_5 |
SDLK_9 |
SDL_DC_LEFT |
SDLK_LEFT |
SDLK_a |
SDLK_f |
SDLK_j |
SDL_DC_RIGHT |
SDLK_RIGHT |
SDLK_d |
SDLK_h |
SDLK_l |
SDL_DC_UP |
SDLK_UP |
SDLK_w |
SDLK_t |
SDLK_i |
SDL_DC_DOWN |
SDLK_DOWN |
SDLK_s |
SDLK_g |
SDLK_k |
|
|
|
|
|
|
|
SDL_DC_EmulateKeyboard(SDL_bool value)
|
Enable/disable keyboard emulation. By default, emulation is enabled when dreamcast keyboard not present.
This function needs SDL_OpenJoystick call for working.
|
|
|
|
|
|
|
SDL_DC_EmulateMouse(SDL_bool value)
|
Enable/disable mouse emulation using analog pad and buttons X & Y (only for first joystick found). By default, emulation is enabled when dreamcast mouse not present.
This function needs SDL_OpenJoystick call for working.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- AUDIO
|
SDL_DC_SetSoundBuffer(void *buffer)
|
Set internal sound buffer for SDL audio driver.
You can use this function to avoid memory copy at sound callback for speed up. See UAE4ALL or NEO4ALL source code for a example to use.
|
|
|
|
|
|
|
SDL_DC_RestoreSoundBuffer(void)
|
Set internal sound buffer to initial value.
|
|
|
|
|