About porting SDL to a simple OS (called uCore)

Hello, everyone,

I’m just a newcomer to SDL and want to port SDL to a simple OS called
uCore, which is based on MIT’s XV6.

I am told that SDL is convienient to port to other platforms. Now I have a
very basic confusion. I know that what SDL could do includes video, events,
audio, threads, timer etc. But this seems too general for me. I wonder
whether there is a list of modules that must be reimplemented when porting.

Many thanks!!!

Best,
Penn.–
Peiyun Hu ???
Department of Computer Science and Technology, Tsinghua University
Beijing, P.R.China
Zip Code: 100084

A good place to start is to look at the SDL source from the hg repository.
There’s a file in the base directory called README.Porting that tells you
which files to start with, to use the dummy drivers and to build them up
for your platform. It’s likely that the drivers for other OSes will be
good reference for the code you need to write.

If you are new to SDL, it is also a good idea to write a couple of small
SDL programs on another platform to get a feel for what it does. You can
look at the test programs too, and use the mailing list to clarify any
details.

Jonny DOn Mon, Mar 11, 2013 at 6:13 AM, Peiyun Hu <penn.peiyun at gmail.com> wrote:

Hello, everyone,

I’m just a newcomer to SDL and want to port SDL to a simple OS called
uCore, which is based on MIT’s XV6.

I am told that SDL is convienient to port to other platforms. Now I have a
very basic confusion. I know that what SDL could do includes video, events,
audio, threads, timer etc. But this seems too general for me. I wonder
whether there is a list of modules that must be reimplemented when porting.

Many thanks!!!

Best,
Penn.


Peiyun Hu ???
Department of Computer Science and Technology, Tsinghua University
Beijing, P.R.China
Zip Code: 100084


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It seems ucore provides everything you need other than video and audio. Unfortunately, video and audio are pretty much the point with SDL – although SDL can serve many other functions, SDL’s stated purpose is for dealing with media.

You could always implement/port a VGA driver, but you’d only be able to use the software renderer (which, in a virtual machine, would be quite slow).

Not sure what basic standard there is for audio, if any, though.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

Actually there’s a standard for audio since Microsoft needed it to let
Windows have at least some basic sound support when there aren’t any
proper sound drivers installed yet. No idea where’s the documentation
for it though.

There are also other standards that evolved over time for the same
reason - mainly because manufacturers got tired of being compatible
with the SoundBlaster 16 :stuck_out_tongue:

2013/3/11, Nathaniel J Fries :> It seems ucore provides everything you need other than video and audio.

Unfortunately, video and audio are pretty much the point with SDL –
although SDL can serve many other functions, SDL’s stated purpose is for
dealing with media.

You could always implement/port a VGA driver, but you’d only be able to use
the software renderer (which, in a virtual machine, would be quite slow).

Not sure what basic standard there is for audio, if any, though.


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/