WarpOS version of SDL
Does anyone know of or have an SDL link library for WarpOS for GCC 2.95.3?
I have found a StormC version and what I think is a SAS/C version but nothing for GCC or the source for it. http://aminet.net/package/dev/misc/AmigaSDLstorm4 I am aware of the WarpSDL.library from OnyxSoft. http://www.onyxsoft.se/warpsdl.html But no source is available and I'm not smart enough to convert all those to openlibrary calls even if all of the functions are available. Just as an experiment I tried compiling the old OS4 version of ScummVM 0.11.1 which fails on the OS FS stuff and SDL, but 589 other objects were compiled. |
So I found an older version which includes a WarpOS version and managed to get it all to compile except for the PPC Tasks and Threads part. These didn't compile.
Prerequisite `SDL_syssem.wo' of target `libSDL_wos.a' does not exist. ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -I./proto -I./devices -I./clib -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_syssem.wo -c SDL_syssem.cPrerequisite `SDL_systhread.wo' of target `libSDL_wos.a' does not exist. Prerequisite `SDL_thread.wo' of target `libSDL_wos.a' does not exist. In file included from SDL_syssem.c:34: /ade/os-includeppc/powerpc/semaphoresPPC.h:11: field `ssppc_SS' has incomplete type make: [SDL_syssem.wo] Error 1 (ignored) ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -I./proto -I./devices -I./clib -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_systhread.wo -c SDL_systhread.c In file included from /ade/os-includeppc/powerpc/portsPPC.h:13, from /ade/os-includeppc/powerpc/tasksPPC.h:5, from SDL_systhread.c:68: /ade/os-includeppc/powerpc/semaphoresPPC.h: In function `RunThread': /ade/os-includeppc/powerpc/semaphoresPPC.h:11: field `ssppc_SS' has incomplete type In file included from SDL_systhread.c:68: /ade/os-includeppc/powerpc/tasksPPC.h:28: field `tp_Task' has incomplete type SDL_systhread.c: In function `SDL_SYS_CreateThread': SDL_systhread.c:160: warning: assignment makes pointer from integer without a cast make: [SDL_systhread.wo] Error 1 (ignored) ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -I./proto -I./devices -I./clib -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_thread.wo -c SDL_thread.c SDL_thread.c: In function `SDL_CreateThread': SDL_thread.c:227: warning: assignment makes pointer from integer without a cast SDL_thread.c: At top level: SDL_thread.c:48: storage size of `thread_lock' isn't known make: [SDL_thread.wo] Error 1 (ignored) Which it seems to be complaining about: In sdlssyemc: Line 38: struct SDL_semaphore { struct SignalSemaphore Sem; Uint32 count; Uint32 waiters_count; SDL_mutex *count_lock; SDL_cond *count_nonzero; }; In Semawhoresppc.h: struct SignalSemaphorePPC { struct SignalSemaphore ssppc_SS; APTR ssppc_reserved; /* private */ UWORD ssppc_lock; /* private */ }; |
*Update* turns out I wasn't including the right file.
Done, I mean if it works. |
the .lib do indeed look like sas/c compatible stuff. fileheader on those gcc made .a look different.
some moons ago I was building successfully sdl with SDL-AmigaSrc.lha. using Makefile.cross. IIRC i only enabled "-DNO_AMIGADEBUG". it was build for 68k, not sure about ppc. cannot remember which compiler, maybe 2.95 gcc or the one from AmiDevCpp ( gcc 3.5) - on a win7 box. |
Grelbfarlk: Can you compile a simple intuition program and test if it works?
|
Quote:
others with 6.x only. most compatible gcc comes with AmiDevCPP - gcc3.4. you can use AmiDevCpp's gcc from a dos command shell. open a cmd, cd to AmiDevCpp/bin and start a bash. basicaly it is a cygwin environment. after starting bash.exe I only add path: Code:
export PATH=/cygdrive/d/AmiDevCpp/usr/local/amiga/bin:/cygdrive/d/AmiDevCpp/bin:$PATH it does also have ppc-amigaos-gcc-4.2.0.exe incl the compiler tools for that. #1) sometimes it is usefull to use CFLAGS like -std=c99 . not sure if the following options apply to warpos / ppc aswell: gcc with -noixemul or -mcrt=clib2 or -mcrt=nix13 or without any of them, can make big difference. #2) and offten you try to find some errors in the source code, but the troublemaker is the incompatibe compiler ... Quote:
|
Very interesting Emufan, I didn't know there was a cross compiler for WarpOS in Amidevcpp. I'll look into that.
Here's the lib if anyone wants to give it a try making it do something. It's compiled in gcc 2.95.3. Version 1.2.6 (really old). |
congrats :spin
1.2.6 is old, but good enough for the amiga. I'm using them for the sdl emulators. btw. I'm using the includes by Novacoder - SDL_AGA. take a look at the SDL_config* files. maybe usefull somehow. |
now if I could only figure out how to use ppc-amigaos-g++ to actually link to the thing properly, I might could meet Cowcat's challenge of opening a simple intution window.:banghead
|
hmm, link with libSDl.a ? something like this:
g++ example.cpp libSDl.a -o example.exe btw: some good point of AmiDevCpp, it does have the ability to produce binaries, which uses ixemul.library. this was of great use, when it came to source code with path/directory/filehandling. this happens if you do not use any of the 3 CFLAGs i wrote above. |
Quote:
|
Quote:
#1) in the gui i can only find new project for amiga-68k and amiga-OS4. my bad :/ |
Pretty sure the lib is a failure. No matter what I try to link it with I get stuff like:
Code:
Error: Undefined Symbol: SDL_LoadBMP_RW Like this: Code:
Error: Undefined Symbol: ChangeScreenBuffer |
As I explained in other thread, the gcc-warpos stuff doesn't work now AFAIK. I asume the compiled gcc binaries/libraries where done with old warpos includes. I tried to correct some of those (specially some function calls inlines that needed more parameters/registers), but no luck for now.
But I don't know any binary done by this gcc version to compare for example with an old or new warpos kernel. |
Quote:
Code:
$ m68k-amigaos-nm.exe -l libSDL.a | grep SDL_Flip Quote:
-noixemul is ment to take care of those aswell. not all compilers support those commands, or have their functionality, it seems. |
Quote:
|
Quote:
it's about grelbfarlk attemp to create a libsSDl for warpOS. i only gave some hint on how I did things with building m68k version of libSDL. but any help is welcome :spin #1) your vbcc does have support for warpos, does build wos binaries? #2) zoned: stormc4_gnu_sources.part1.rar stormc4_gnu_sources.part2.rar which should have wos support? there are some bin-utils binaries included. not sure if 68k or wos. project files for StormC4 to rebuild them seems to be there too, also some Makefies. is StormC4 still being sold? I can find StormC3 only. anyone with StormC4 installer? #3) tested the bin-utils from stromc archive, no ppc support it seems: Code:
3.SYS:binutils> nm-new -l ram:libSDL_wos.a |
Quote:
nm says: For SDL_Flip 000012d8 T SDL_Flip U SDL_FormatChanged (null):0 U SDL_FreeFormat (null):0 U SDL_FreeSurface (null):0 And SDL_Init 0000015c T SDL_Init |
Quote:
hmm, you did link with the correct version: g++ ... libSDL_wos.a dont use -lSDL to ensure you link with the correct one. |
Quote:
If I do: ppc-amigaos-g++ -warpup -lSDL_wos sdltest2.cpp -o sdltest801.elf that gives me: Error: Undefined Symbol: SDL_LoadBMP_RW Error: Undefined Symbol: SDL_Quit Error: Undefined Symbol: SDL_RWFromFile Error: Undefined Symbol: SDL_Delay Error: Undefined Symbol: SDL_UpperBlit Error: Undefined Symbol: SDL_Init Error: Undefined Symbol: SDL_FreeSurface Error: Undefined Symbol: SDL_Flip Error: Undefined Symbol: SDL_SetVideoMode If I do: ppc-amigaos-g++ sdltest2.cpp -warpup -lSDL_wos -o sdltest801.elf Error: Undefined Symbol: ChangeScreenBuffer Error: Undefined Symbol: BltMaskBitMapRastPort Error: Undefined Symbol: OpenScreenTags Error: Undefined Symbol: ChangeWindowBox Error: Undefined Symbol: CreateIORequest Error: Undefined Symbol: WaitTOF Error: Undefined Symbol: AllocVec Error: Undefined Symbol: FreeScreenBuffer Error: Undefined Symbol: ClearPointer Error: Undefined Symbol: SetPointer Error: Undefined Symbol: OpenWindowTags Error: Undefined Symbol: UnlockPubScreen Error: Undefined Symbol: ReleasePen Error: Undefined Symbol: CheckIO Error: Undefined Symbol: DeleteMsgPort Error: Undefined Symbol: BltBitMap Error: Undefined Symbol: AllocMem Error: Undefined Symbol: AbortIO Error: Undefined Symbol: GetMsg Error: Undefined Symbol: BltBitMapRastPort Error: Undefined Symbol: SetWindowTitles Error: Undefined Symbol: CloseWindow Error: Undefined Symbol: CreateMsgPort Error: Undefined Symbol: GetSysTimePPC Error: Undefined Symbol: LockPubScreen Error: Undefined Symbol: Wait Error: Undefined Symbol: PPCCallOS Error: Undefined Symbol: CloseDevice Error: Undefined Symbol: AllocScreenBuffer Error: Undefined Symbol: DeleteIORequest Error: Undefined Symbol: NextDisplayInfo Error: Undefined Symbol: AllocBitMap Error: Undefined Symbol: OpenLibrary Error: Undefined Symbol: GetVPModeID Error: Undefined Symbol: SendIO Error: Undefined Symbol: Delay Error: Undefined Symbol: WindowLimits Error: Undefined Symbol: FreeBitMap Error: Undefined Symbol: ReadJoyPort Error: Undefined Symbol: FreeVec Error: Undefined Symbol: CloseScreen Error: Undefined Symbol: FindDisplayInfo Error: Undefined Symbol: WaitIO Error: Undefined Symbol: LoadRGB32 Error: Undefined Symbol: InitRastPort Error: Undefined Symbol: FreeMem Error: Undefined Symbol: ReplyMsg Error: Undefined Symbol: GetDisplayInfoData Error: Undefined Symbol: ObtainBestPenA Error: Undefined Symbol: RawKeyConvert Error: Undefined Symbol: OpenDevice Error: Undefined Symbol: CloseLibrary Error: Error processing Elffile ! |
All times are GMT +2. The time now is 23:38. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.