Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: cycloid on February 08, 2007, 08:39:55 AM
-
To expand the rather cryptic title i'm trying to use AmiDevCpp to port chocoloate-doom to OS3:68k i'm not expecting any mega performance outside of winUAE but it's a prelude to just doing general Amiga/AROS cross porting work.
Anyway i've manged to get the thing configured and compiled, it's just the linking stage. At first i had undefined references to _atof and _pow. adding lib/libc.a and libs/libc_p.a cured this but now i'm getting undefined references to _ixemulbase. I'm building with the -noixemul options so i presume it's trying to staticly link it.
Any ideas which lib i need?
as an aside i've also noticed that the AmiDevCpp tree has four different versions of clib.a, all dated 1999 but different sizes in
lib/
lib/libb
lib/libb32
lib/libm020
lib/libnix
etc.
anyone got experience statically linking ixemul or am i just getting it wrong?
-
The static linker library for the 68k versions of GCC is called "LibNix". Zerohero's website (http://www.zerohero.se/cross/os3.html) contains both IXEmul.library and LibNix so go ahead and install LibNix in your link library path. Just be aware that ZeroHero's archives don't seem to unpack correctly with 7Zip or any other GUI frontend so go be sure to use the "tar jxf /path/to/libnix.tar.bz2" command line in Cygwin from the /lib/ directory to unpack it.
-
Anyway i've manged to get the thing configured and compiled, it's just the linking stage. At first i had undefined references to _atof and _pow. adding lib/libc.a and libs/libc_p.a cured this but now i'm getting undefined references to _ixemulbase. I'm building with the -noixemul options so i presume it's trying to staticly link it.
Then someone screwed it up and some parts were compiled without -noixemul switch.
Try adding -Wl,-Map=project.map to linker options and try to check out where it is trying to link against ixemul. Remember to link using gcc, not with ld directly, and remember to use -noixemul for both compile and link options.
Tho libnix for OS3 is quite old and probably not updated for years and might lack stuff...
-
Yeah i found what i was looking for in libnix, the ixemulbase thing went away once i'd linked it's maths lib in and rebuilt the entire tree, anyway:
(http://www.cyclomedia.co.uk/amiga/img/chocdoom002.png)
It's a start anyway, next step is to compare notes with the Adoom source to see what's different about the wad/lump parsing, there are endian issues with the wad format that probably have something to do with it
EDIT: a little googling suggests that the PNAMES error might be related to MAXTRANSFER but this is running on UAE, any ideas anyone?
-
If you run into endian problems, look into SDL_endian.h . It includes inline assembly macros for endian conversion that will work transparently between big and little-endian systems. :-)
-
yeah i suspect that there are endian issues, at the mo it's definately reading in (IIRC) 2921 lumps from doom2.wad, which is correct as verified by XWE but any attempt to printf the names of the lumps prints blank lines. will look into sdl_endian cheers
edit: i'm also lacking an amiga 68k inttypes.h or even a stdint.h in DevCpp. i can probably copy the PPC ones over and chop them up until i just have the types it needs but that seems like a lot of hard work , where do i get them from?
-
Built 0.2.0 (sans sound and networking)
still had the local path issue but i just stuck -iwad with a full path in to see what would happen next...
did the doom refresh deamon [..............]
conked out with a cybergraphics screenmode error, which probably falls somewhere between SDL and my emulated hardware.
so basically it's getting as far as actually rendering the title graphic but falling over due to external forces, good progress though and it seems to have taken care of the 0.1.4 lump issue
edit: looks like a standard SDL/CGX issue the error is "Found no sufficiently capable CGX visuals" and is a standard SDL bombout when it cant open a screen. I'm running this on WinUAE so i'll need to check what's defined in that (isnt UAE Picasso96 based? is that a problem) and i need to check if it's a dodgy version of SDL that i'm (statically) linking - IIRC it came with an AmiDevCpp devpak so i've no idea which version it is
-
burp:
(http://www.cyclomedia.co.uk/amiga/img/chocdoom_firstrun.gif)
-
Yay ;-)
-
I now have a progress page up at my domain
http://cyclomedia.co.uk/amiga/
having trouble in places seems that "full screen" mode always gives me just an empty blank screen and the AROS version also gives me an empty blank window in "window" mode
-
having trouble in places seems that "full screen" mode always gives me just an empty blank screen
Perhaps the SDL_Flip (http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fFlip) call is missing?
...or alternatively the SDL implementation just sucks.