Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: cycloid on May 05, 2003, 08:45:02 PM

Title: how do i get coding for os4?
Post by: cycloid on May 05, 2003, 08:45:02 PM
i'd like to jump right in with a tiny game (though not as tiny as minesweeper :-) but alas i've spent the past few years inside Microsoft Visual C++ (though i dont use the "visual" part) ... where on earth would i begin to begin coding something for os4?

should i get ahold of stormC and 3.9 in the mean time? what about getting a PPC? i'm sure  someone somewhere must have made an FAQ about all this somewhere!
Title: Re: how do i get coding for os4?
Post by: Beakster on May 05, 2003, 09:10:05 PM
Yo,

This is something I've also been wondering.  I've only ever done blitz and amos, and a few lines of C on the Amiga.  Now I have lots of experience of Java and some of Visual C++.

I have the books Mastering Amiga C and Complete Amiga C but they are VERY old now.

For programming for OS4/MOS what software do I need.  I have the Geek Gadgets CD I got about 5 years ago, and also and Amiga Developers Kit CD of about the same age.  Surely this will all be too old to be of use.

I know this is probably a stupid question, but has anyone written a book on amiga programming recently?  If someone did a Teach yourself Amiga C++ in 21days we could have some new programmers on the scene.
Title: Re: how do i get coding for os4?
Post by: Warface on May 05, 2003, 09:11:51 PM
Little is known ATM, but I'd suggest go for GCC. I doubt there will be an SDK released prior to the release of OS4, so make everything you can in GCC, and finish the OS dependant parts later, when OS4 will be available. IMO
Title: Re: how do i get coding for os4?
Post by: alx on May 05, 2003, 09:16:51 PM
Quote
For programming for OS4/MOS what software do I need


I've no idea about MOS, but since the OS is already out a few people here will definitely know.

As for OS4, you cannot really program lots for it untill it's out :-(   At first, Hyperion will release their GCC compiler, but that's not to everyone's taste.  This (http://amigaworld.net/modules/news/article.php?storyid=431) could be interesting for newer programmers though.
Title: Re: how do i get coding for os4?
Post by: SlimJim on May 05, 2003, 09:46:00 PM
Quote

alx wrote:
As for OS4, you cannot really program lots for it untill it's out  At first, Hyperion will release their GCC compiler, but that's not to everyone's taste. This could be interesting for newer programmers though.

 
Actually, that is only true if you want to use the specific new
features of the new OS. The Friedens have often said that
programming (system-friendly) for AOS3x will be a good start
for a future AOS4 app.
.
SlimJim
Title: Re: how do i get coding for os4?
Post by: downix on May 06, 2003, 01:51:43 AM
@Beakster

For MOS, geek gadgets is a good starting point.  Also familiarize
yourself with AHI (the audio API) and CyberGFX (the video API).  To
make cross-porting easier, I'd recommend using LibSDL, which already
works under MorphOS, and is likely to be rapidly ported to AOS4 if and
when it ships.
Title: Re: how do i get coding for os4?
Post by: on May 06, 2003, 01:55:43 AM
Quote
I'd recommend using LibSDL,


libSDL is fantastic, alongside openGL it makes cross-platform development a lot easier.

I wonder if someone will port GTK2 or wxWindows to AOS4/MorphOS?
Title: Re: how do i get coding for os4?
Post by: tonyw on May 06, 2003, 05:21:23 AM
ARRRGGGHHH

Ignorance strikes again. How come I never heard of libSDL until today?

I just spent some time looking around but can find nothing more recent than the Vers 1.25 release from Oct 2002,  and no Amiga docs except for the source files.

Does anyone know if there is any more recent information?

tony
Title: Re: how do i get coding for os4?
Post by: hnl_dk on May 06, 2003, 06:24:22 AM
Looks like it is the newest one ... here (http://ggreco.interfree.it/sdl.html) is the link to the homepage ... and here (http://www.libsdl.org/index.php) is the link to the main libSDL website.
Title: Re: how do i get coding for os4?
Post by: yssing on May 06, 2003, 07:38:39 AM
You could do as I do, start by coding for Amiga OS.
Make it as RTG and RTA as possible.
It should then run out of the box on AOS4.0.

Then once os4 is done, I think it would only be a small matter to compile it natively on os4.
Title: Re: how do i get coding for os4?
Post by: cycloid on May 06, 2003, 12:28:22 PM
that's pretty much what i thought: do it in 3.x as os friendly as possible and port it later , cheers
Title: Re: how do i get coding for os4?
Post by: cycloid on May 06, 2003, 01:53:30 PM
ok, this is funny. i'm getting somewhere now

1. downloaded gnu from aminet, extracted it all onto my PC

2. downloaded latest winUAE

3. dug out my 1999 (licensed) copy of amiga forever

4. read the readmes

5. got it configured

6. after a lock up and some bodge ups got a quick "Hello World" compiled!


took about an hour!

so where do i learn about multiple file projects (makefiles?) etc. i think i have a link to that amiga dev site where it just lists all the libraries / functions so that's a start ... i'll need to dig out my old vbcc projects too to get back into opening windows etc.


oh, and i will get it on on my amiga just wanted a quick go at familiarising myself with GCC

i only downloaded the 020c and 020cpp libs  and it seemed to go, but of course i need to read all the guides too to make c++ work proper!


edit: the beauty of this is that i can edit my cpp files in my nice text editor of choice on windows! (textpad = syntax highlighting, multiple files) and then compile it on the "amiga" ... what i really could do with is an 68k targetted cross compiler so that i'm not emulating the compiler! is there such a build of gnu?
Title: Re: how do i get coding for os4?
Post by: itix on May 07, 2003, 05:45:38 PM
Quote

cycloid wrote:
that's pretty much what i thought: do it in 3.x as os friendly as possible and port it later , cheers


Shouldnt be too difficult in general but please remember yuo dont have 68k registers in PPC. For example in hooks you retrieve parameters from A0/A1/A2 but in OS4 68k registers are mapped somewhere else. You probably need macros for function prototypes in this case.

There could be other issues too like stack usage... reading morphos dev guidelines (it is somewhere in morphos.net IIRC) can be some use here. Although it is not for OS4 but worth of reading anyway I think... Especially taking care of proper alignment is important.
Title: Re: how do i get coding for os4?
Post by: zee4 on May 07, 2003, 08:18:41 PM
Quote
Looks like it is the newest one ... here is the link to the homepage ... and here is the link to the main libSDL website.


Yes, SDL is quite cool. I noticed the book "Data Structures for Game Programmers" (good read) makes use of it for the examples. The author explains why: if he used DirectX, the examples would have been much longer. Of couse he doesn't mention that his code now also much more portable. :) One of these days I'll have try them out on AmigaOS.

Zoltan
Title: Re: how do i get coding for os4?
Post by: cycloid on May 07, 2003, 08:52:34 PM
Quote
meaningless talk about registers etc.


i've no idea what any of that meant, which probably means it wont bother me. all i'll be doing is shuffling a sprite or two around a small window!
Title: Re: how do i get coding for os4?
Post by: itix on May 08, 2003, 01:21:49 PM
It is not meaningless if you are MUI developer :)

Whatever, just respect C= coding standards, dont rely on undocumented features and write portable code.
Title: Re: how do i get coding for os4?
Post by: redrumloa on May 08, 2003, 01:34:06 PM
Write your game for MOS, and just port it back to OS4 when it is available.
Title: Re: how do i get coding for os4?
Post by: cycloid on May 08, 2003, 05:29:15 PM
next problem: header files?

i think i have the correct header files but i'm not so sure. i'm now attempting a basic open-a-window prog and when attempting to copmile it get:

warning: implicit declaration of function int OpenLibrary( )

for all the intuition functions i used (OpenWindowTags etc.)

it might well be my header files, unless i put them in the wrong place (i stuffed them into "mc68020-amigados/include")

help!

edit: right i think i've got the proper includes and the libs and i've put them in gnu/os-include and gnu/os-lib respectively. i got rid of my previous include attempt BTW... still no joy!
Title: Re: how do i get coding for os4?
Post by: cycloid on May 08, 2003, 06:24:54 PM
argh! the more i try to find out the more confusing it is. wtf is all this fd2inline and hunk2out business all about? hasnt someone with some basic common sense and a 1200 got a working gcc distro, stuck all the correct headers abd libs and such in it and lha'ed it up anywhere? or would that be too easy?