Some Sdl Help For Pandoros


Lol, Sounds like you need a massage Craigix , and maybe some loose tea.

Also sounds like there is plenty of people here that can help, I would say go ahead and release it for the gp2x, then release what you got to some of the devs you got on board already if possible.
 
quasist said:
craigix said:
for(n = 0; n < height; n++){
for(nt = 0; nt < width; nt++){
SDL_LockSurface(screen);
memcpy(screen->pixels,scrbuf,SCRBUF_SIZE); //strings.h
SDL_UnlockSurface(screen);

is much faster solution
Bloating thine code already? :)

craigix said:
as Windows is wasting my time :(
you are the one wasting the Windows' time


Yes memcpy is better , i was thinking of that ( i use it a lot for DS ;) ) in wakeup this morning :p

and well don't forget to put SDL.dll in a directory of searchpath ( for example in c:\windows\system32 ;) ) or in directory of the program

sorry i forgot give sdl.dll in my zip :rolleyes:
i have use last Sdl : 1..2.13

And Craig make your demo on the platform easier to do for you, and after publish it with source on board so we could make version for linux , windows :)
 
Last edited by a moderator:
craigix said:
Thanks for the help everyone, I've decided to just release a version for the GP2X as Windows is wasting my time :(
You could make a livecd and/or a virtual machine image (qemu, virtualbox, vmware) for testing.
 
Last edited by a moderator:
If you didn't completely give up on Windows yet, give this a shot:

CODE

// http://www.libsdl.org/cgi/docwiki.cgi/Pixel_Access
void putpixel(SDL_Surface *surface, int x, int y, Uint32 pixel)
{
int bpp = surface->format->BytesPerPixel;
/* Here p is the address to the pixel we want to set */
Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp;

switch(bpp) {
case 1:
*p = pixel;
break;

case 2:
*(Uint16 *)p = pixel;
break;

case 3:
if(SDL_BYTEORDER == SDL_BIG_ENDIAN) {
p[0] = (pixel >> 16) & 0xff;
p[1] = (pixel >> 8) & 0xff;
p[2] = pixel & 0xff;
} else {
p[0] = pixel & 0xff;
p[1] = (pixel >> 8) & 0xff;
p[2] = (pixel >> 16) & 0xff;
}
break;

case 4:
*(Uint32 *)p = pixel;
break;
}
}

void sdlHACK(SDL_Surface *surface) // forces the non sdl famebuffer on to the SDL frame
{

int height=480;
int width=800;
int xl=0;
int yl=0;
int n;
int nt;

if(SDL_MUSTLOCK(surface)) SDL_LockSurface(surface);

for(n = 0; n < height; n++){
for(nt = 0; nt < width; nt++){

// The following are the individual r, g, b of pandorascreen[((n+yl)*SCREENWIDTH)+nt+xl]
Uint8 r =;
Uint8 g =;
Uint8 b =;

// http://www.libsdl.org/cgi/docwiki.cgi/SDL_MapRGB
putpixel(surface, nt+xl, n+yl, SDL_MapRGB(surface->format, r, g, b));
}
}

if(SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface);

}



This should avoid any problems caused by potentially different formats of pandorascreen and surface.
 
craigix said:
I'm just calling the GUI PandorOS for now, I'll probably rename it something else later.

The idea of this port is that it sits on top of windows not linux so people on here can try it out.
Heh...what about those of us who DON'T use Windows? ;)
 
Last edited by a moderator:
Svartalf said:
craigix said:
I'm just calling the GUI PandorOS for now, I'll probably rename it something else later.

The idea of this port is that it sits on top of windows not linux so people on here can try it out.
Heh...what about those of us who DON'T use Windows? ;)


Aye, that would leave several of us in the dark.
 
Last edited by a moderator:
icurafu said:
lindows?
what?

Craig, if it doesn't work with wine I'll lead your crucifixion.
 
Last edited by a moderator:
You can use the same SDL code for Linux with a simple recompile...
 
Tinnus said:
You can use the same SDL code for Linux with a simple recompile...
If the code is released.
 
Last edited by a moderator:
Svartalf said:
craigix said:
I'm just calling the GUI PandorOS for now, I'll probably rename it something else later.

The idea of this port is that it sits on top of windows not linux so people on here can try it out.
Heh...what about those of us who DON'T use Windows? ;)


...or don't own a GP2X. I can't believe I'm going to miss out on the first GUI demo. :(

Edit: Wine is pretty good nowadays, so if Craigix did release an EXE, we Linux folk should be alright.
 
Last edited by a moderator:
Vorporeal said:
Now the question arises - is there a GP2X emulator for Windows/Linux?
Sega Megadrive emulates the picodrive of GP2X for instance :)
 
Last edited by a moderator:
quasist said:
Vorporeal said:
Now the question arises - is there a GP2X emulator for Windows/Linux?
Sega Megadrive emulates the picodrive of GP2X for instance :)


I mean, is there a program for Windows or Linux that we could use to emulate the GP2X and run this demo that Craig's gonna release for the GP2X (for those of us that don't have one).
 
Last edited by a moderator:
You should be able to emulate the GP2X with Qemu and open2x or some other firmware.
 
Back
Top