Porting SDL2 to a new platform, detailed docs?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Porting SDL2 to a new platform, detailed docs?

Arne Schwettmann
Hello SDL developers,
I want to help in porting SDL2 to a new platform. I am new to this, and I would greatly appreciate help from somebody who has done this before (porting to Android or other platforms where SDL2 now exists).

I have the following question:
- Is there a standard reference document that includes all the functions with implementation details*? I need something telling me which system level functions (drivers) I have to implement, detailing their desired behaviour (input/output etc.)?

*ideally this should be a long, indexed, pdf and not a bunch of disjointed comments in source or a bunch of disjointed comments/readme’s on GitHub :)

What I have found:

So far I have found this

, and some comments in the driver source for SDL2 for other platforms. But surely that can’t be all the documentation for a decade old project?

To clarify: None of the content at https://wiki.libsdl.org is of use to me, since it is at the user level. I need docs at the driver/internal level of the API. I am looking at documentation at the developer level for porting the SDL2 library itself, not documentation at the user level for using an existing SDL2 port for a project. 

Thank you very much for any help in advance,
Arne

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porting SDL2 to a new platform, detailed docs?

Jonathan Dearborn-2
Sounds like you should look at this file:

Jonny D

On Sun, Feb 19, 2017 at 4:41 PM, Arne Schwettmann <[hidden email]> wrote:
Hello SDL developers,
I want to help in porting SDL2 to a new platform. I am new to this, and I would greatly appreciate help from somebody who has done this before (porting to Android or other platforms where SDL2 now exists).

I have the following question:
- Is there a standard reference document that includes all the functions with implementation details*? I need something telling me which system level functions (drivers) I have to implement, detailing their desired behaviour (input/output etc.)?

*ideally this should be a long, indexed, pdf and not a bunch of disjointed comments in source or a bunch of disjointed comments/readme’s on GitHub :)

What I have found:

So far I have found this

, and some comments in the driver source for SDL2 for other platforms. But surely that can’t be all the documentation for a decade old project?

To clarify: None of the content at https://wiki.libsdl.org is of use to me, since it is at the user level. I need docs at the driver/internal level of the API. I am looking at documentation at the developer level for porting the SDL2 library itself, not documentation at the user level for using an existing SDL2 port for a project. 

Thank you very much for any help in advance,
Arne

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porting SDL2 to a new platform, detailed docs?

Jonathan Dearborn-2
Ah, yep, I followed that forum link now and that's the intro file for porting to a new platform.  My best advice is to do what it says and start from either a similar platform's implementation or use the dummy driver as a starting point.  There are several people who will have more to add.

Jonny D

On Sun, Feb 19, 2017 at 5:58 PM, Jonathan Dearborn <[hidden email]> wrote:
Sounds like you should look at this file:

Jonny D

On Sun, Feb 19, 2017 at 4:41 PM, Arne Schwettmann <[hidden email]> wrote:
Hello SDL developers,
I want to help in porting SDL2 to a new platform. I am new to this, and I would greatly appreciate help from somebody who has done this before (porting to Android or other platforms where SDL2 now exists).

I have the following question:
- Is there a standard reference document that includes all the functions with implementation details*? I need something telling me which system level functions (drivers) I have to implement, detailing their desired behaviour (input/output etc.)?

*ideally this should be a long, indexed, pdf and not a bunch of disjointed comments in source or a bunch of disjointed comments/readme’s on GitHub :)

What I have found:

So far I have found this

, and some comments in the driver source for SDL2 for other platforms. But surely that can’t be all the documentation for a decade old project?

To clarify: None of the content at https://wiki.libsdl.org is of use to me, since it is at the user level. I need docs at the driver/internal level of the API. I am looking at documentation at the developer level for porting the SDL2 library itself, not documentation at the user level for using an existing SDL2 port for a project. 

Thank you very much for any help in advance,
Arne

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porting SDL2 to a new platform, detailed docs?

Sam Lantinga-4
In reply to this post by Arne Schwettmann
New platforms are rare enough that nobody has written detailed documentation on how to add one, especially since platforms besides the desktop OSes are extremely unique. There isn't a standard reference document other than the API documentation. When in doubt, check the behavior of your favorite desktop platform.

As Jonathan said, your best bet is to look at a platform that is closest to yours, and see what is done there.

Feel free to ask lots of questions on the mailing list and create the document you wanted. :)

On Sun, Feb 19, 2017 at 1:41 PM, Arne Schwettmann <[hidden email]> wrote:
Hello SDL developers,
I want to help in porting SDL2 to a new platform. I am new to this, and I would greatly appreciate help from somebody who has done this before (porting to Android or other platforms where SDL2 now exists).

I have the following question:
- Is there a standard reference document that includes all the functions with implementation details*? I need something telling me which system level functions (drivers) I have to implement, detailing their desired behaviour (input/output etc.)?

*ideally this should be a long, indexed, pdf and not a bunch of disjointed comments in source or a bunch of disjointed comments/readme’s on GitHub :)

What I have found:

So far I have found this

, and some comments in the driver source for SDL2 for other platforms. But surely that can’t be all the documentation for a decade old project?

To clarify: None of the content at https://wiki.libsdl.org is of use to me, since it is at the user level. I need docs at the driver/internal level of the API. I am looking at documentation at the developer level for porting the SDL2 library itself, not documentation at the user level for using an existing SDL2 port for a project. 

Thank you very much for any help in advance,
Arne

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porting SDL2 to a new platform, detailed docs?

DLudwig
This ended up being what I did, when porting SDL2 to WinRT/UWP: I spent -lots- of time reading through SDL source code.  The hardest parts usually ended up being platform-specific bits, although, SDL2's window vs. full-screen management code was difficult to work with, at times.

I'm happy to try answering questions about, or during this process, as well.

Cheers,
-- David L.


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porting SDL2 to a new platform, detailed docs?

Ryan C. Gordon
> This ended up being what I did, when porting SDL2 to WinRT/UWP: I spent
> -lots- of time reading through SDL source code.  The hardest parts
> usually ended up being platform-specific bits, although, SDL2's window
> vs. full-screen management code was difficult to work with, at times.

Having just done this for a new platform, it's basically "get it to
compile with the platform's build system, then go through each subdir in
"src" to see if there needs to be a platform-specific piece added."

This gets more complicated in that a few things (SDL_atomic.c) expect
you to add an #ifdef, and others expect you to add a new implementation
and plug it into a list of available implementations to try at runtime
(audio, video), and others expect you to add a new implementation that's
the _only_ thing that works on that platform (thread, etc).

And then joystick expects you to have one implementation for the
platform, but both Linux and Windows then built their own
multi-implementation thing on top of that.

Also, almost universally, starting from the "dummy" driver is the wrong
move.

We should fix some of these details.

--ryan.


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Loading...