[PATCH] nintendo ds update

Hello,

The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.

Rgeards,
Frank.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl13-nds.diff
Type: text/x-diff
Size: 28495 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110212/1e8ede05/attachment.diff

Thank you very much for your patch for SDL 1.3!

Do you give me permission to release your code with SDL 1.3 and future
versions of SDL under both the LGPL and a closed-source commercial
license?

See ya!On Sat, Feb 12, 2011 at 11:10 AM, Frank Zago wrote:

Hello,

The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the
"general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.

Rgeards,
Frank.


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

Yes.On 02/12/2011 01:29 PM, Sam Lantinga wrote:

Do you give me permission to release your code with SDL 1.3 and future
versions of SDL under both the LGPL and a closed-source commercial
license?

BTW, you probably want to nuke the NDS renderer and just implement these
three functions instead:
int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
format, void ** pixels, int *pitch);
int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int
numrects, SDL_Rect * rects);
void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);On Sat, Feb 12, 2011 at 11:10 AM, Frank Zago wrote:

Hello,

The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the
"general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.

Rgeards,
Frank.


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

BTW, you probably want to nuke the NDS renderer and just implement these three
functions instead:
int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
format, void ** pixels, int *pitch);
int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
SDL_Rect * rects);
void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);

The NDS has an opengl-like engine, so isn’t the renderer needed ?
In that case, should I still add these functions ?

btw, thanks for removing the atomic file. I hadn’t seen it was deprecated.

Frank.On 02/12/2011 01:44 PM, Sam Lantinga wrote:

On Sat, Feb 12, 2011 at 11:10 AM, Frank Zago <@Frank_Zago mailto:Frank_Zago> wrote:

Hello,

The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.

Rgeards,
 Frank.

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks


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

It’s fine to have a custom renderer, but I didn’t see line or point
functions implemented. It’s no longer legal to have partially functional
renderers.On Sat, Feb 12, 2011 at 6:42 PM, Frank Zago wrote:

On 02/12/2011 01:44 PM, Sam Lantinga wrote:

BTW, you probably want to nuke the NDS renderer and just implement these
three
functions instead:
int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
format, void ** pixels, int *pitch);
int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int
numrects,
SDL_Rect * rects);
void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);

The NDS has an opengl-like engine, so isn’t the renderer needed ?
In that case, should I still add these functions ?

btw, thanks for removing the atomic file. I hadn’t seen it was deprecated.

Frank.

On Sat, Feb 12, 2011 at 11:10 AM, Frank Zago <frank at zago.net <mailto:frank at zago.net>> wrote:

Hello,

The following patch fixes some of the bitrot for the Nintendo DS

port.

The support is still basic at the moment, but it allows to run the

“general”

test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that

John

Magnotti posted on Feb 1st.

Rgeards,
 Frank.

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks


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


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

Hello,On 02/12/2011 01:44 PM, Sam Lantinga wrote:

BTW, you probably want to nuke the NDS renderer and just implement these three
functions instead:
int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
format, void ** pixels, int *pitch);
int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
SDL_Rect * rects);
void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);

Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.

I’ve also added a README.ds and fixed the spinlocks.

Frank.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl13-nds2.diff
Type: text/x-diff
Size: 7804 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110213/e5bb8aa4/attachment.diff

Thanks! I applied your patch, I also removed the extra include paths, so
you’ll probably need to revert part of your patch which stripped the full
include paths from header files.On Sun, Feb 13, 2011 at 10:09 AM, Frank Zago wrote:

Hello,

On 02/12/2011 01:44 PM, Sam Lantinga wrote:

BTW, you probably want to nuke the NDS renderer and just implement these
three
functions instead:
int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
format, void ** pixels, int *pitch);
int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int
numrects,
SDL_Rect * rects);
void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);

Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.

I’ve also added a README.ds and fixed the spinlocks.

Frank.


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

OK. Patch attached.

Frank.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl13-nds3.diff
Type: text/x-diff
Size: 2769 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110214/ae5cd034/attachment.diffOn 02/13/2011 04:03 PM, Sam Lantinga wrote:

Thanks! I applied your patch, I also removed the extra include paths, so
you’ll probably need to revert part of your patch which stripped the full
include paths from header files.

Hi Frank,

I did a fresh pull from the repo and tried the basic make -f
Makefile.ds (following README.ds) and get an immediate error:

src/SDL.c:22:24: fatal error: SDL_config.h: No such file or directory

I noticed that SDL_config_nintendods.h isn’t automatically copied, so
I tried that, but still got the error.

Is there another step that you did so it would compile?

I didn’t want to work around it, in case I was missing something obvious.

Thanks,

JohnOn Mon, Feb 14, 2011 at 11:14 PM, Frank Zago wrote:

On 02/13/2011 04:03 PM, Sam Lantinga wrote:

Thanks! ?I applied your patch, I also removed the extra include paths, so
you’ll probably need to revert part of your patch which stripped the full
include paths from header files.

OK. Patch attached.

Frank.


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

Copy include/SDL_config.h.default to include/SDL_config.h

It’s a generated file so we don’t automatically check it in, although
someone could probably add a build rule in Makefile.ds to copy it if it
doesn’t exist.On Tue, Feb 15, 2011 at 2:29 PM, John Magnotti <john.magnotti at gmail.com>wrote:

Hi Frank,

I did a fresh pull from the repo and tried the basic make -f
Makefile.ds (following README.ds) and get an immediate error:

src/SDL.c:22:24: fatal error: SDL_config.h: No such file or directory

I noticed that SDL_config_nintendods.h isn’t automatically copied, so
I tried that, but still got the error.

Is there another step that you did so it would compile?

I didn’t want to work around it, in case I was missing something obvious.

Thanks,

John

On Mon, Feb 14, 2011 at 11:14 PM, Frank Zago wrote:

On 02/13/2011 04:03 PM, Sam Lantinga wrote:

Thanks! I applied your patch, I also removed the extra include paths,
so

you’ll probably need to revert part of your patch which stripped the
full

include paths from header files.

OK. Patch attached.

Frank.


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


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

Copy include/SDL_config.h.default to include/SDL_config.h

That’s correct. But there’s already a rule for that in the makefile
(copy_config). So it should just work.

Frank.On 02/15/2011 04:43 PM, Sam Lantinga wrote:

It’s a generated file so we don’t automatically check it in, although someone
could probably add a build rule in Makefile.ds to copy it if it doesn’t exist.

On Tue, Feb 15, 2011 at 2:29 PM, John Magnotti <john.magnotti at gmail.com <mailto:john.magnotti at gmail.com>> wrote:

Hi Frank,

I did a fresh pull from the repo and tried the basic make -f
Makefile.ds  (following README.ds) and get an immediate error:

src/SDL.c:22:24: fatal error: SDL_config.h: No such file or directory

I noticed that SDL_config_nintendods.h isn't automatically copied, so
I tried that, but still got the error.

Is there another step that you did so it would compile?

I didn't want to work around it, in case I was missing something obvious.

Thanks,

John

On Mon, Feb 14, 2011 at 11:14 PM, Frank Zago <@Frank_Zago <mailto:@Frank_Zago>> wrote:
> On 02/13/2011 04:03 PM, Sam Lantinga wrote:
>> Thanks!  I applied your patch, I also removed the extra include paths, so
>> you'll probably need to revert part of your patch which stripped the full
>> include paths from header files.
>
> OK. Patch attached.
>
> Frank.
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks


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

Copy include/SDL_config.h.default to include/SDL_config.h

That’s correct. But there’s already a rule for that in the makefile
(copy_config). So it should just work.

Frank.

Actually that’s normal in that tree. The include directories were all removed
from that makefile. Apply the patch sdl13-nds3.diff that I posted yesterday.

Frank.On 02/15/2011 06:21 PM, Frank Zago wrote:

On 02/15/2011 04:43 PM, Sam Lantinga wrote:

Frank’s patch is in, so this should be fixed.

See ya!On Tue, Feb 15, 2011 at 2:29 PM, John Magnotti <john.magnotti at gmail.com>wrote:

Hi Frank,

I did a fresh pull from the repo and tried the basic make -f
Makefile.ds (following README.ds) and get an immediate error:

src/SDL.c:22:24: fatal error: SDL_config.h: No such file or directory

I noticed that SDL_config_nintendods.h isn’t automatically copied, so
I tried that, but still got the error.

Is there another step that you did so it would compile?

I didn’t want to work around it, in case I was missing something obvious.

Thanks,

John

On Mon, Feb 14, 2011 at 11:14 PM, Frank Zago wrote:

On 02/13/2011 04:03 PM, Sam Lantinga wrote:

Thanks! I applied your patch, I also removed the extra include paths,
so

you’ll probably need to revert part of your patch which stripped the
full

include paths from header files.

OK. Patch attached.

Frank.


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


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

I must have pulled my revision just before your uploaded the
fix–updating and building this morning works fine.

thanks!

JohnOn Tue, Feb 15, 2011 at 6:45 PM, Sam Lantinga wrote:

Frank’s patch is in, so this should be fixed.

See ya!

On Tue, Feb 15, 2011 at 2:29 PM, John Magnotti <@John_Magnotti> wrote:

Hi Frank,

I did a fresh pull from the repo and tried the basic make -f
Makefile.ds ?(following README.ds) and get an immediate error:

src/SDL.c:22:24: fatal error: SDL_config.h: No such file or directory

I noticed that SDL_config_nintendods.h isn’t automatically copied, so
I tried that, but still got the error.

Is there another step that you did so it would compile?

I didn’t want to work around it, in case I was missing something obvious.

Thanks,

John

On Mon, Feb 14, 2011 at 11:14 PM, Frank Zago wrote:

On 02/13/2011 04:03 PM, Sam Lantinga wrote:

Thanks! ?I applied your patch, I also removed the extra include paths,
so
you’ll probably need to revert part of your patch which stripped the
full
include paths from header files.

OK. Patch attached.

Frank.


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


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


? ? -Sam Lantinga, Founder and CEO, Galaxy Gameworks


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

Great! :)On Wed, Feb 16, 2011 at 6:17 AM, John Magnotti <john.magnotti at gmail.com>wrote:

I must have pulled my revision just before your uploaded the
fix–updating and building this morning works fine.

thanks!

John

On Tue, Feb 15, 2011 at 6:45 PM, Sam Lantinga <@slouken> wrote:

Frank’s patch is in, so this should be fixed.

See ya!

On Tue, Feb 15, 2011 at 2:29 PM, John Magnotti <john.magnotti at gmail.com> wrote:

Hi Frank,

I did a fresh pull from the repo and tried the basic make -f
Makefile.ds (following README.ds) and get an immediate error:

src/SDL.c:22:24: fatal error: SDL_config.h: No such file or directory

I noticed that SDL_config_nintendods.h isn’t automatically copied, so
I tried that, but still got the error.

Is there another step that you did so it would compile?

I didn’t want to work around it, in case I was missing something
obvious.

Thanks,

John

On Mon, Feb 14, 2011 at 11:14 PM, Frank Zago wrote:

On 02/13/2011 04:03 PM, Sam Lantinga wrote:

Thanks! I applied your patch, I also removed the extra include
paths,

so
you’ll probably need to revert part of your patch which stripped the
full
include paths from header files.

OK. Patch attached.

Frank.


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


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks


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


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


-Sam Lantinga, Founder and CEO, Galaxy Gameworks