If you could PM me the code that would be great.
I'll get r19 down instead and try that.
If you could PM me the code that would be great.
I'll get r19 down instead and try that.
<A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
<br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
<br /></A>
Uhm... same error in pm. Maybe the forum engine parses the makefile text and comes out something wrong. When I try to make a message preview or try to send it, I get a 404 error
I'll send that makefile via email (PM me your address)
Hmm... couldn't you alternately use PasteBin? www.pastebin.com
I'm making changed to the sdl.pas for JEDI-SDL to see if I can make is conpile out of the box for the ds.Originally Posted by Legolas
I have made all of the changes you specified with the exception of defining PSDL_mutex as it is defined in the source code.
But I get
Any ideas?Code:sdl.pas (4207,4) Error : Creation of Dynamic/Shared Libraries not supported
<A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
<br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
<br /></A>
I got everything compiling OK. And a basic sample working .
I'm now looking into OpenGL support, unfortunately the port of SDL to the DS does not support Opengl so I'm having to add it. Currently I just adding code like this
but apart from the MODE_0_3D I'm not sure what everything else actially does....Code:// Set the video mode to 3D if (flags & SDL_OPENGL) { videoSetMode(MODE_0_3D| DISPLAY_BG2_ACTIVE); //set the sub background up for text display (we could just print to one //of the main display text backgrounds just as easily videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE); //sub bg 0 will be used to print text }
But things are looking good so far.
<A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
<br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
<br /></A>
Some progresss on the plain SDL front.
This is running on the dualis emulator.
the Red box is using the standard SDL_FillRect, the Blue box is done using the JEDI-SDL SDL_PutPixel routine. Only the changes suggested by Legolas were made to the sdl.pas file. The sdlutils.pas was untouched and worked as is.
here is the code
[pascal]
program sdltest;
{$IFDEF NDS}
{$apptype arm9} //...or arm7
{$define ARM9} //...or arm7, according to apptype
{$mode objfpc} // required for some libc funcs implementation
uses
ctypes, sdl, SysUtils, sdlutils; // required by nds headers!
{$include nds.inc} // headers!
{$ELSE}
{$APPTYPE CONSOLE}
uses
sdl,
gl,
SysUtils, sdlutils;
{$ENDIF}
var Screen: PSDL_Surface;
r: TSDL_Rect;
x,y: Integer;
begin
SDL_Init(SDL_INIT_VIDEO);
try
Screen := SDL_SetVideoMode(320,200,16,SDL_HWSURFACE or SDL_DOUBLEBUF);
if Screen = nil then Exit;
try
r := SDLRect(10,10,20,20);
while True do
begin
SDL_FillRect(Screen, nil, SDL_MapRGB(Screen^.format, 255,0,0));
SDL_FillRect(Screen, @r, SDL_MapRGB(Screen^.format, 0,255,0));
for y := 40 to 80 do
begin
for x := 40 to 80 do
begin
SDL_PutPixel(Screen, x,y, SDL_MapRGB(Screen^.format, 0,0,255));
end;
end;
SDL_Flip(Screen);
end;
finally
SDL_FreeSurface(Screen);
end;
finally
SDL_Quit;
end;
end.
[/pascal]
Dom, shall I send you the changes to make the DS work with JEDI-SDL :?:
<A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
<br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
<br /></A>
This is extremely cool :thumbup:
This is super cool. Would I say no to such an opportunity. Btw, The latest version of sdl.pas is in CVS. Are you not able to merge the changes in? If not send it over and tell me what needs changing. I don't have a diff tool so will need some hand holding to get it right.Originally Posted by technomage
Bookmarks