Mac problems with SDL

Hai Nguyen wrote:

Hi,

I had some problems getting SDL(1.1.6) to work from the devel package(link
errors) so I downloaded the source and compiled the SDLMainLib and SDLPPCLib
and the resources and what not. I’ve gotten the graywin.c to compile -
however it’s not running. I’ve put the 1.1.6 SDL runtime into the same
folder and I double click on it and nothing happens. Anyone have any idea
what’s going on?

Thanks,
Hai

I’m not sure, but if it happens when you do any code that does an
initialization of the video, I have the same trouble though I doubt it
is related, considering I’m running on an SGI in IRIX. I’m not very
experienced with the code yet, but I suspect it’s something in video
initialization code. I suspect if you had a *NIX machine it would core
dump too.

Matthew Fredrickson

Hi,

I toyed around with the code some more last night. It seems that there is
some problem in the SDL_SetVideoMode (i think that’s what the routine is
called).
Anyway - it returns a NULL so my program just exists. But it goes through
the SDL_Init just fine. I messed around with it but got nothing to work.
Is this where your code is breaking out as well.

Hai

Matthew Fredrickson wrote in message
news:200011020139.RAA24752 at ftp.lokigames.com

Hai Nguyen wrote:

Hi,

I had some problems getting SDL(1.1.6) to work from the devel
package(link

errors) so I downloaded the source and compiled the SDLMainLib and
SDLPPCLib

and the resources and what not. I’ve gotten the graywin.c to compile -
however it’s not running. I’ve put the 1.1.6 SDL runtime into the same
folder and I double click on it and nothing happens. Anyone have any
idea> > what’s going on?

Thanks,
Hai

I’m not sure, but if it happens when you do any code that does an
initialization of the video, I have the same trouble though I doubt it
is related, considering I’m running on an SGI in IRIX. I’m not very
experienced with the code yet, but I suspect it’s something in video
initialization code. I suspect if you had a *NIX machine it would core
dump too.

Matthew Fredrickson

I am using the current CVS (with a few modifications-none of which should
cause video initialization to fail) and I am not having these problems. There
is a problem with palette modes that shows up in grawin program (which I have
fixed), but this doesn’t cause the unexplained exit of the program.

If you want to get to the root of video init problems, put a breakpoint in the
ROM_SetVideoMode method or DSp_SetVideoMode. If you never reach these methods,
it is probably not video related. If you do, step through the code to see
where things go awry.

Hai Nguyen wrote:> Hi,

I toyed around with the code some more last night. It seems that there is
some problem in the SDL_SetVideoMode (i think that’s what the routine is
called).
Anyway - it returns a NULL so my program just exists. But it goes through
the SDL_Init just fine. I messed around with it but got nothing to work.
Is this where your code is breaking out as well.

Hai

Matthew Fredrickson wrote in message
news:200011020139.RAA24752 at ftp.lokigames.com

Hai Nguyen wrote:

Hi,

I had some problems getting SDL(1.1.6) to work from the devel
package(link

errors) so I downloaded the source and compiled the SDLMainLib and
SDLPPCLib

and the resources and what not. I’ve gotten the graywin.c to compile -
however it’s not running. I’ve put the 1.1.6 SDL runtime into the same
folder and I double click on it and nothing happens. Anyone have any
idea

what’s going on?

Thanks,
Hai

I’m not sure, but if it happens when you do any code that does an
initialization of the video, I have the same trouble though I doubt it
is related, considering I’m running on an SGI in IRIX. I’m not very
experienced with the code yet, but I suspect it’s something in video
initialization code. I suspect if you had a *NIX machine it would core
dump too.

Matthew Fredrickson

Hai Nguyen wrote:

Hi,

I toyed around with the code some more last night. It seems that there is
some problem in the SDL_SetVideoMode (i think that’s what the routine is
called).
Anyway - it returns a NULL so my program just exists. But it goes through
the SDL_Init just fine. I messed around with it but got nothing to work.
Is this where your code is breaking out as well.

Hai

Matthew Fredrickson <@Matthew_Fredrickson> wrote in message
news:200011020139.RAA24752 at ftp.lokigames.com

Hai Nguyen wrote:

Hi,

I had some problems getting SDL(1.1.6) to work from the devel
package(link

errors) so I downloaded the source and compiled the SDLMainLib and
SDLPPCLib

and the resources and what not. I’ve gotten the graywin.c to compile -
however it’s not running. I’ve put the 1.1.6 SDL runtime into the same
folder and I double click on it and nothing happens. Anyone have any
idea

what’s going on?

Thanks,
Hai

I’m not sure, but if it happens when you do any code that does an
initialization of the video, I have the same trouble though I doubt it
is related, considering I’m running on an SGI in IRIX. I’m not very
experienced with the code yet, but I suspect it’s something in video
initialization code. I suspect if you had a *NIX machine it would core
dump too.

Matthew Fredrickson

I’ll lay you odds 2 to 1 that it’s because you can’t (as far as I know)
dynamically switch video modes on an SGI (at least on my SGI you can’t),
you have to reboot. Do you think it could be that?

Matthew Fredrickson

Hai Nguyen wrote:

I toyed around with the code some more last night. It seems that there is
some problem in the SDL_SetVideoMode (i think that’s what the routine is
called).
Anyway - it returns a NULL so my program just exists. But it goes through
the SDL_Init just fine. I messed around with it but got nothing to work.
Is this where your code is breaking out as well.

You should read the SDL documentation, available at
sdldoc.sourceforge.net/current/
When SDL_SetVideoMode returns NULL that an error occured setting the video
mode. Try SDL_GetError() to see what it is, and also try experimenting with
passing different flags to SDL_SetVideoMode(), such as SDL_ANYFORMAT if your
video card just can’t do what your telling it too, this should enable
emulation…

- David Snopek

I’ll lay you odds 2 to 1 that it’s because you can’t (as far as I know)
dynamically switch video modes on an SGI (at least on my SGI you can’t),
you have to reboot.

Am I allowed to bet against?

Hai Nguyen wrote:

Hi,

I had some problems getting SDL(1.1.6) to work from the devel package(link
errors) so I downloaded the source and compiled the SDLMainLib and SDLPPCLib
and the resources and what not. I’ve gotten the graywin.c to compile -
however it’s not running. I’ve put the 1.1.6 SDL runtime into the same
folder and I double click on it and nothing happens.

Are stderr.txt and stdout.txt being created? Can you step through the program
with a debugger?

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Hi,

I toyed around with the code some more last night. It seems that there is
some problem in the SDL_SetVideoMode (i think that’s what the routine is
called).
Anyway - it returns a NULL so my program just exists. But it goes through
the SDL_Init just fine. I messed around with it but got nothing to work.
Is this where your code is breaking out as well.

SDL_SetVideoMode() should never return NULL if the SDL_Init() call succeeds.
Can you tell me more about your configuration?

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software