Jump to content
Jagware
Tyrant

C under Win98, Removers Libs vs Raptor Lib

Recommended Posts

Tyrant    0

Hiya, I'm thinking of trying to knock out a quick project on the Jag (the problem with most of my Jag ideas being that they take forever and a day to complete), and I'm seriously considering trying to do the core of it in C. Naturally I've got a few questions about this, and where else is there to ask and get sensible answers but here? :poulpe:

 

First off, my current dev setup involves an alpine, with a rather antique laptop running win98. I'm on the Atari MAC and ALN under DOS, and I don't want to change any of that. My first headache is naturally going to be getting a MinGW install set up to compile native windoze apps, and then build a cross-compile version to target the 68k. AFAIK MinGW should work fine under w98, but I don't even know if it's possible to get it to cross-compile for other platforms, since it has been modified a fair bit from standard gcc in order to run under windoze. Any help anyone can offer here is most welcome. I see there is a shell script to automate the building of a cross-compiling gcc on the removers site, and I'll start by trying to pick that apart and try to achieve the same results with mingw.

 

Once I've got (if I can get) a cross compiling gcc/mingw environment set up, there are a whole host of jaguar specific questions I have.

 

How easy is it to implement inline assembly into a c function?

How does one call asm from C? C from asm?

What kind of calling convention does C use? Is it possible to force arguments/return values into specific registers?

I presume I'll need the removers C libs in order to get malloc etc to work? Do I also have to use the removers libs for drawing/etc? Can reboots Raptor be used instead? Has anyone made a comparison of the two in terms of features/limitations/etc?

 

Finally, and perhaps most importantly (also sadly most subjectively), I have to ask myself if all the hassle with building a cross-compiler is actually worth it, and if I can't achieve the same results with asm in less time?

If so, is it still possible to use some/all of the removers libs without C (especially malloc and heap management), how about raptor?

 

The game I'm thinking of implementing isn't especially complicated in terms of numbers of sprites, and barely needs any collision detection, but I am trying to save as much development time as possible.

 

If I do go ahead with this, I'll try to document as much of the setup process as possible, so as to create a guide for how to get C dev working from scratch.

 

Share this post


Link to post
Share on other sites
Matmook    1

Yop !

 

If you want to use Seb's library, you could download on his website the JagStation. It's a VirtualBox Image containing everything you need (pre-built and ready to build :D ). Raptor use mac/aln or smac/sln to work.

 

About mixing Seb's library and Raptor, I don't think it's a good idea because they don't work the same way.

 

It's up to you to choose which engine use. In all case, Raptor or Seb's library allow you to quickly create something (init, display, sound, ... a lot of things are allready done).

Share this post


Link to post
Share on other sites
Tyrant    0
If you want to use Seb's library, you could download on his website the JagStation. It's a VirtualBox Image containing everything you need (pre-built and ready to build :D ).

 

I did try that today... however first off running x-windows under virtualbox proved very laggy, and I also bumped into an annoying KDE error: It seems that if you change from the default french-azerty key layout, but you remove the original french layout before enabling the switcher icon on the taskbar and switching layouts using it, then you get stuck in a situation where the switcher icon does nothing and you can't switch until you re-add french back into the list (never mind that shows in the menu, it has to be in the list of layouts too). After that I got a little frustrated.

 

I might try again with it, (starting by uninstalling kde and X11 as they slow things down too much), but I suspect the hassle of having to edit on my mac (textmate beats vi and my fingers don't like emacs keyboard twister), then copy/network the source into virtualbox, compile, and get the binaries back out, across a usb stick onto my 98 machine, then uploaded into an alpine, is a bit too awkward to really work properly.

Share this post


Link to post
Share on other sites
Zerosquare    10

As a matter of fact, I've been trying to get SebRmv's setup to work with Windows 98 during the last few weeks... I already solved several problems but still can't get the linking process to work, it seems any symbol name that's longer than 8 characters gets truncated and confuses ALN. I tried using SMAC & SLN instead, but SLN doesn't support the binary format used by Seb's libs, and it crashes with an internal error if I try to recompile the libs from sources...

 

Anyways, you don't need to build the C cross-compiler yourself : there is an executable Windows version available on SebRmv's download page (look for "Cross GCC m68k binaries").

 

Regarding interfacing C & ASM together, I believe this topic could help you.

Share this post


Link to post
Share on other sites
Tyrant    0
As a matter of fact, I've been trying to get SebRmv's setup to work with Windows 98 during the last few weeks... I already solved several problems but still can't get the linking process to work, it seems any symbol name that's longer than 8 characters gets truncated and confuses ALN.

That's really weird, have you tried examining the files and making sure they really are bsd a.out format? I remember madmac warning that some of it's output modes only support 8 character symbol names, maybe for some reason gcc is also outputting in a weird format?

 

As for the links, they look very helpful. I've got a w98 virtualbox I'm going to try experimenting on (so as not to muck up my main dev machine) and I'll report back once I try installing their prebuilt cross-compiler and cygwin.

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×