SDL using raw video buffer access

I am wanting to create a port of SDL for the XBOX (yes, I know there is
already a DirectX-based port, but it requires the MS XDK which is
virtually impossible to get (legally) for most folk). Initially I just
want to get it working in the default mode through writing pixel values
directly to the video buffer memory address (0xF0040240).

I’ve looked through most of the supplied video ports, and they all seem to
be based upon previously built graphics libs/APIs. Have I missed one that
just uses plain old memory access (the FB_VGA16Update mechanism in fbcon
looks reasonably close)? Any thoughts or suggestions would be much
appreciated. Thanks a lot.–
Craig Edwards

Craig Edwards wrote:

I am wanting to create a port of SDL for the XBOX (yes, I know there
is already a DirectX-based port, but it requires the MS XDK which is
virtually impossible to get (legally) for most folk). Initially I
just want to get it working in the default mode through writing pixel
values directly to the video buffer memory address (0xF0040240).

I’ve looked through most of the supplied video ports, and they all
seem to be based upon previously built graphics libs/APIs. Have I
missed one that just uses plain old memory access (the FB_VGA16Update
mechanism in fbcon looks reasonably close)?

Look at the dc backend for example. It returns a video surface whose
->pixels member point to video memory. If no locking/unlocking process
is needed that can be as simple as that.

Stephane

Ahh… now that is a neat trick. I am a little unsure as to how
double-buffering would work in this case… I think I need to go and read
some more SDL doco.

On the weekend (before I received your reply), I implemented my own very
simple copying routine from the screen->pixels to the video memory and it
works like a champ. I am very impressed with how simple the whole thing
was… SDL is a champ! Joystick support is next on the hit list!

Thanks very much for your reply. BTW, you mentioned a few weeks ago that
you had some doco on porting to new systems… did that make it onto the
WIKI? Is it in a state where you would be able to share on the list (or
via private email?) Anyway, thanks again.On Mon, 23 Aug 2004 20:20:54 +0200, Stephane Marchesin <stephane.marchesin at wanadoo.fr> wrote:

Look at the dc backend for example. It returns a video surface whose
->pixels member point to video memory. If no locking/unlocking process
is needed that can be as simple as that.


Craig Edwards