forked from libsdl-org/SDL-1.2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.DC
174 lines (130 loc) · 7.64 KB
/
README.DC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
SDL for Dreamcast
Upgraded by GPF (Troy Davis) to latest version 1.2.15 - https://github.com/GPF/SDL-1.2
**Added virtual Keyboard Popup Window
call SDL_DC_EmulateVirtualKeyboard(SDL_TRUE);
will open simple onscreen bios font keyboard when joystick is first opened.
, Press A button to submit keypress, press right trigger to toggle the virtual keyboard on and off
This version is based off SDL 1.2.13 from https://github.com/ianmicheal/SDL-dreamhal--GLDC
(beta2)
by
BERO
http://www.geocities.co.jp/Playtown/2004/
this work with kos-newlib
http://sourceforge.net/projects/dcquake/
compile
- source environ.sh (from the KOS distribution)
- make -f Makefile.dc
compile with gl support
- install latest libgl from http://sourceforge.net/projects/dcquake/
- uncomment GL=1 in Makefile.dc
- make -f Makefile.dc clean
- make -f Makefile.dc
install
- copy include/*.h and libSDL.a or libSDL_gl.a for your enviroment
changelog:
beta2
- OpenGL support
- Hardware page flip support
beta
- thread, timer don't tested so much.
- not support OpenGL
-- integrating back into main branch
# DREAMCAST SDL-DREAMHAL Version 1.0
**Based on SDL 1.2.13**
## Overview
SDL-DREAMHAL is a customized version of SDL (Simple DirectMedia Layer) tailored for the Dreamcast. It leverages GLDC for rendering, providing significant performance enhancements for 2D blitting and other operations. This version includes updates for fixed headers and multiple defines.
## Features
- **Dreamcast Hardware + OpenGL**: Optimized for SDL FAST BLIT SPEED.
- **2D Blit Speed Benchmark**: Significant improvements in both software and hardware modes.
- **Integration with GLDC**: Utilizes Kazade's GLDC library for enhanced OpenGL compatibility and performance.
![Screenshot of SDL-DREAMHAL](https://github.com/ianmicheal/SDL-dreamhal--GLDC/blob/main/benchmark.png)
## Dreamcast Integration
- **Correct OpenGL integration.**:
- **Textured video driver for virtual resolutions.**:
- **Direct framebuffer video driver using store queues.**:
- **Mouse emulation using analog pad**:
- **Mapped keys as pad buttons.**:
- **Two texture internal color mode supported: RGB5551 and RGB4444.**:
- **Fast threaded audio driver.**:
## SDL
SDL is a cross-platform multimedia library designed to provide low-level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
### New Features
- **Upgraded Blit Speed**: Utilizing moops dreamhal SH4 ASM memcpy and memset.
- **GLDC Integration**: Improved compatibility and performance with OpenGL 1.2.
### Video Drivers for Dreamcast
- **SDL_DC_DMA_VIDEO** (default): Fastest video driver using double buffer.
- **SDL_DC_TEXTURED_VIDEO**: Allows virtual resolutions and scaling using hardware texture.
- **SDL_DC_DIRECT_VIDEO**: Direct buffer video driver, potentially faster than DMA without double buffer.
### Configuration Options
- **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 video (only for PAL Dreamcasts).
- **SDL_DC_Default60Hz(SDL_bool value)**: Set default display to 60Hz (only for PAL Dreamcasts).
- **SDL_DC_MapKey(int joy, SDL_DC_button button, SDLKey key)**: Map Dreamcast buttons to SDL keys.
## Additional Resources
- **PORTED TO SDL + OpenGL Dreamhal + GLDC Demos**:
- **SDL[DREAMHAL]+[GLDC]KOS2.0 TWINKLE STAR DEMO HARDWARE**:
- [Demo 1](https://youtu.be/aTKOW4GrLsQ)
- ** SDL[DREAMHAL]+[GLDC]KOS2.0 BLENDING GLASS CUBE HARDWARE**:
- [Demo 2](https://youtu.be/GM4JnKxp1ZQ)
- ** SDL[DREAMHAL]+[GLDC]KOS2.0 SPINNING TEXTURES CUBE 60FPS
- [Demo 3](https://youtu.be/G0KFthogrPg)
- **SDLQUAKE DREAMHAL**:
- [Demo port quake 1](https://youtu.be/QiEo3FNNEZc).
- **OLD VERSION CANT BE COMPILED OR USED ON KOS2.0**
- **Old Version**: [SDL by Chui](http://chui.dcemu.co.uk/sdl.html)
---
For a complete list of features and detailed documentation, please visit the [GLDC repository](https://gitlab.com/simulant/GLdc).
## Credits
- **BERO**: Original work for SDL on Dreamcast.
- **Chui**: Original work and improvements for SDL on Dreamcast.
- **Kazade**: GLDC library and enhancements.
- **MRNEO240**:GLDC Optimizing and Support.
- DreamHal -- https://github.com/sega-dreamcast/dreamhal/
GNU Lesser General Public License, version 2.1
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# SDL-DREAMHAL Version 1.0
**Based on SDL 1.2.13**
## Overview
SDL-DREAMHAL is a customized version of SDL (Simple DirectMedia Layer) tailored for the Dreamcast. It leverages GLDC for rendering, providing significant performance enhancements for 2D blitting and other operations. This version includes updates for fixed headers and multiple defines.
## Features
- **Dreamcast Hardware + OpenGL**: Optimized for SDL FAST BLIT SPEED.
- **2D Blit Speed Benchmark**: Significant improvements in both software and hardware modes.
- **Integration with GLDC**: Utilizes Kazade's GLDC library for enhanced OpenGL compatibility and performance.
[[https://github.com/ianmicheal/SDL-dreamhal--GLDC/main/benchmark.png|alt=benchmark]]
## Benchmark Results
| Resolution | Mode | Slow Points (frames/sec) | Fast Points (frames/sec) | Rect Fill (rects/sec) | 32x32 Blits (blits/sec) |
|------------|-----------|--------------------------|--------------------------|-----------------------|-------------------------|
| 320x240 | Software | 0.20885 | 18.4372 | 652.125 | 1327.28 |
| 320x240 | Hardware | 0.208823 | 18.4544 | 652.333 | 1327.28 |
| 640x480 | Software | 0.0250253 | 4.47263 | 156.312 | 1277.21 |
| 640x480 | Hardware | 0.0250252 | 4.47271 | 156.3 | 1277.6 |
## Dreamcast Integration
- **Arch**: Shutting down kernel.
- **Maple**: Final stats -- device count = 2, vbl_cntr = 56270, dma_cntr = 56266.
- **Video Mode**: Set to 640x480 NTSC.
## Simple DirectMedia Layer (SDL)
SDL is a cross-platform multimedia library designed to provide low-level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
### New Features
- **Upgraded Blit Speed**: Utilizing moops dreamhal SH4 ASM memcpy and memset.
- **GLDC Integration**: Improved compatibility and performance with OpenGL 1.2.
### Video Drivers for Dreamcast
- **SDL_DC_DMA_VIDEO** (default): Fastest video driver using double buffer.
- **SDL_DC_TEXTURED_VIDEO**: Allows virtual resolutions and scaling using hardware texture.
- **SDL_DC_DIRECT_VIDEO**: Direct buffer video driver, potentially faster than DMA without double buffer.
### Configuration Options
- **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 video (only for PAL Dreamcasts).
- **SDL_DC_Default60Hz(SDL_bool value)**: Set default display to 60Hz (only for PAL Dreamcasts).
- **SDL_DC_MapKey(int joy, SDL_DC_button button, SDLKey key)**: Map Dreamcast buttons to SDL keys.
## Credits
- **Chui**: Original work and improvements for SDL on Dreamcast.
- **Kazade**: GLDC library and enhancements.
## Additional Resources
- **Old Version**: [SDL by Chui](http://chui.dcemu.co.uk/sdl.html)
- **OpenGL Dreamhal + GLDC Demos**:
- [Demo 1](https://streamable.com/55982r)
- [Demo 2](https://streamable.com/kvk4ez)
- [Demo 3](https://streamable.com/5k8lsk)
---
For a complete list of features and detailed documentation, please visit the [GLDC repository](https://gitlab.com/simulant/GLdc).