views:

1701

answers:

14

I would like to program an application for the Amiga, just for fun!

Please could someone post a step by step howto based on the following?

  • Exactly what programming tools I should use, are there any already installed?
  • Am I limited to plain text editors, or are there IDEs and debugging tools available?
  • If no tools are already installed, how can this done? Are there free ones?
  • I'd like to learn a traditional Amiga language, could you reccomend one?
  • What should I use to compile the language you suggest?
  • Please could you suggest tools I may use to debug the suggested language?
  • Are there any libraries I should be aware of, such as GUI libraries?

Some things to note...

  • I'm running Workbench 3.1 from within the WinUAE emulator.
  • From Workbench, I can access files from my Windows hard drive.
  • I'd like to code and compile it from Workbench if possible.
  • I'm running WinUAE in A1200 mode, not sure if that matters.
  • There's an application already installed called MEmacs.
  • I know C++ and C# very well, maybe there's a similar Amiga language.
  • I'm aware that you can code with C and C++, but I want to learn a new language.

Update:

I have answered my own question, but please do contribute more answers as I intend on extending my answer. Thanks to all that have contributed so far, you've been very helpful!

+3  A: 

Emulators

Operating systems

Programming resources

Manrico Corazzi
+2  A: 

There was a big programming tool for Amigas that had the same name as someone in the Bible....

AMOS

That was it.

ck
Does anyone remember N.I.A.L.L. written in AMOS Basic? :)
CraigTP
@CraigTP: Do you remember N.I.A.L.L. written in AMOS Basic?
Paul Ruane
@Paul - Yes I do. Non-Intelligent Artificial Language Learner is what the acronym stood for, IIRC.
CraigTP
@CraigTP: Sorry, bad joke — 90% of the time it repeated the last sentence.
Paul Ruane
@Paul - <smacks forehead> I get it now. You're right, now I remember that. LOL. Clearly, I did't remember it *that* well! :)
CraigTP
+2  A: 

I was an Amiga programmer for some time and used 68k Assembly Language exclusively. The Amiga Reference Manuals were the bibles and indispensable. As for fun programs, I suspect most have been done to death on the Amiga... just search for any idea you have and I'm sure you'll find an existing piece of code.

Playing with the blitter was always fun for me but that's the area I was working in anyway.

Lazarus
+8  A: 

You should certainly use an emulator -- a modern PC running UAE is a world apart from an A1200. You can run with a nice high screen resolution, and CPU performance orders of magnitude faster (if you want it to be faster that is, all optional of course). Oh, and you can actually access PC hardware through Amiga libraries provided by the emulator if you want.

The Amiga Reference Manuals would be the place to start if you want to hit the 'hardware'. Devpac was the assembler of choice for most people.

There were a few C compilers, and at least one C++ compiler, SAS/C. Here are links to a few more Amiga compilers

If you're looking to learn a new language then Modula-2 might be an option, but really C was the language of choice for most people. The OS itself was written in C (at least from 2.0 onwards -- BCPL prior to that), and the libraries all had C headers provided for accessing them.

Assembly language was hugely popular too for games and demos, and I can personally vouch for that being a whole lot of fun. Good books for this:

  • Motorola Programmer's Reference Manual for 68k-68040, the most comprehensive book on the instruction set. Available free to download here
  • Amiga Hardware Reference Manual, for a complete list of all the hardware registers, how they work and how to use them. Old copies for sale here

One other fun option might be the fairly powerful ARexx scripting language. You could do quite a lot with this, such as controlling other applications through their 'ARexx port' to gain access to their functionality. Much more high level than the other options, but quite easy to get it to do interesting things.

Nik
Asm-One was a nice 68k assembler. It was really slick.
dangph
Comeau C++ used Lattice C as the backend.
Thomas L Holaday
+2  A: 

I'm sure you can find an emulator as other people have mentioned, but I wanted to add that Modula-2 was fairly popular with Amiga programmers.

JasonTrue
+11  A: 
nbolton
+1  A: 

AMOS, as previously mentioned, is a pretty decent basic dialect, though I would probably take a look at Blitz Basic instead. Or straight 68k assembly using Asm-ONE of course. Asm-One is an IDE of sorts, just don't expect Visual Studio level support tools.

SAS/C was my weapon of choice on the Amiga platform, though there are ports of other C compilers as well.

Hank
+2  A: 

http://en.wikipedia.org/wiki/AmigaE

This was like C, but without the pointers. I still have my system API books at home somewhere.

Paul Ruane
I came here to say AmigaE. I programmed a shape presorter for SegaCD Stellar Fire in AmigaE.Loved Modula-2 on the Amiga, and several good C compilers. Used to go hang out with the SAS C guys in Research Triangle. They had Amiga Users Groups meetings there. I think that's where I introduced Sliced HAM mode.
Nosredna
+2  A: 

Exactly what programming tools I should use, are there any already installed?

Basic was the only language to come pre-packaged, and even it was in two dialects (ABasic, and AmigaBasic). You'll want to look at the Fred Fish collection or AmiNet for more tools, as finding commercial compilers will be nigh-impossible.

Am I limited to plain text editors, or are there IDEs and debugging tools available?

You're pretty much back to edit-save-compile-link-run-crash-whycrash-doh-fixit-edit cycle, IDEs are not readily available. I would look at something like DME (Dillon's Macro Editor), also available on the Fred Fish collection or AmiNet (http://wuarchive.wustl.edu/pub/aminet/). It provides some basic macro construction facilities that will help.

If no tools are already installed, how can this done? Are there free ones?

Yes. Again, Fred Fish, or AmiNet.

I'd like to learn a traditional Amiga language, could you reccomend one?

Draco. It was written by Chris Grey. It's a little "primitive" but it should provide you with all that you need to get going, including the proper bindings and constants. The language is compiled and runs at speeds comparable to C.

What should I use to compile the language you suggest?

Manx or Lattice C were the C compilers of the time (if you can find them, good luck), with Manx tending towards 16bit and Lattice towards 32bit. There were a few tiny C-based compilers. There is 68k assembly (a neato instruction set IMHO), Draco, a pascal dialect, possibly Modula-2, as well as DICE (a free C compiler, but you're looking for something else)...

Please could you suggest tools I may use to debug the suggested language?

Again, commercial tools are far and few between, you're going to have to dig through the public domain archives to find anything.

Are there any libraries I should be aware of, such as GUI libraries?

The libraries are all built in. intuition.library is the name of the library that provides basic windowing support. gfx.library will provide you with high-level primitives, and layers.library will provide you with support for handing the unique bit-plane approach to graphics. Before you get that far, you'll want to look at exec, which was the heart & soul of the OS. It provides pre-emptive multitasking, built-in linked list primitives, message passing primitives, IO primitives, etc. and was heavily re-used throughout the system. If you understand exec, you'll understand the low-level innards of the rest of the system.

Keep in mind that the state of the system will look more like an embedded game console, as there will be no memory protection, SMP support, etc. All of these things could not easily be added due to design constraints that were introduced just before the first Amiga shipped. I seem to recall that the issue was surrounding how it would handle multiple processors and memory protection given that the entire microkernel runs in a non-priv CPU mode.

Last but not least, the magic number is 4, which is a memory address. That address is the pointer to the exec (which is not only a microkernel but also a library) and with it you can bootstrap into the rest of the system via OpenLibrary() calls. Libraries that could not be located will automatically be loaded from disk via AmigaDOS. This is how the Amiga dealt with the issue of portable code - all of the code was written using offsets into a pointer to the "base" of a library and there were no fixed addresses, other than address 4. Every library has a call table of 6 bytes per entry (a jump instruction) that then vectors off into the correct entry point. It was easy to write your own library, provided you had the correct format for your "header". Device drivers "borrowed" the structure of libraries and used the same concept to provide default I/O handlers.

Sorry if the names are slightly wrong, this information is off the top of my head from nearly 20 years ago...

Some things to note...

I'm running Workbench 3.1 from within the WinUAE emulator.

Cool. You're set. That was the last great "classic" workbench.

From Workbench, I can access files from my Windows hard drive.

It'll help, but you'll want to go "native" as much as possible.

I'd like to code and compile it from Workbench if possible.

See above.

I'm running WinUAE in A1200 mode, not sure if that matters.

It's the model of hardware you're emulating; it was a good budget machine, but try setting it for A3000 if possible, that was a nice high-end machine before Commodore had trouble.

There's an application already installed called MEmacs.

Give it a try, if Emacs is your thing...otherwise I would look at some of the native tools.

know C++ and C# very well, maybe there's a similar Amiga language. I'm aware that you can code with C and C++, but I want to learn a new language.

Then Draco is for you. It has most of the bindings for libraries, compiles cleanly, and it's officially a "dead" language given it's tied to a specific hardware platform. Very Amiga-specific. :)

Good luck! Let everyone know how it turned out...

Avery Payne
Thanks, excellent answer. I will add Draco to my todo list (see my self-answer).
nbolton
+1  A: 

Step one, buy one of these.

Step two, buy one of these, and install it.

(You might also need to wait around for one of these to be invented.)

Step three, get up to 88 miles per hour.

Matt Cruikshank
I was going to suggest something similar, but this is funnier. It's also important to set the year to 1988.
Furious Coder
dam it, now i want a flux capacitor!
Chris
+4  A: 

There is the Amiga Developer CD 2.1 which contains everything needed: All the SDKs (including the classic ones for 1.3, 2.0 and 3.1, and the newer one for 3.5 that can also be used on 3.9 to my knowledge) and a suitable 68k C-Compiler.

It's still available from some vendors, and I remember writing some stuff with it. It's C, so it should be rather straight-forward.

No Support for AmigaOS4 though, but then again, Workbench 3.1 was the last real AmigaOS.

Michael Stum
Nice! Thanks, I'll check that out.
nbolton
A: 

Hey, if you want to do Amiga programming for fun, there is a NEW piece of software, that will rock your world:

Hollywood 4.5 from Airsoft Softwair

It is a very easy and fun language, mainly targeted at multimedia presentations. It's a scripting language, based on the Lua syntax, but it also reminds me a little of good old Amos because of it's many and powerful gfx and sound functions. It is very easy to use, comes with an excellent documentation and many examples. Also, it is multiplatform, the interpreter/compiler works on all the different Amiga platforms (incl. OS 3.1, AROS, MorphOS...), and the finished, compiled scripts even runs without effort on both Windows and Mac OS X!

You might find it a little pricy at 89 euros, but I can tell you that it is worth the investment, if you want to have fun programming, and I haven't seen anything like it on any other platform!

You might want to test one of my creations :-). It's a fighting game with real actors, it is done in Hollywood and the Windows version can be downloaded right here:

http://dl.dropbox.com/u/2920309/BEF-win32.zip

Alfkil Wennermark
+1  A: 

This has to be the strangest and at the same time quite inspiring question.

Forgive me, as an ex-Amiga developer, I've given up on the platform. The idea of writing something now is, for me, quite abstract.

However, duty bound to a platform that once I believed could be number one I must diligently answer your questions.

Programming tools; either 68k assembler or C with SAS/C

Personally I always used CygnusEd for edtting, and I don't know of any IDE's. I think SAS/C had some sort of nebulous IDE but I can't be sure as a I only used the source level debugger (a very new thing at the time for me).

In terms of free tools I was involved in making GCC and libraries available on the Amiga, but I have no idea what happened to this project. There probably is something on my A3000 in the Barn, but little reason to find out.

The only traditional Amiga language is native 68k assembler. But you can do a lot with C providing that you've read the 15" of RKM in detail.

BTW Amos was rubbish. A toy in its time.

To debug I only ever used SAS/C (or Lattice as it was formally known).

Are there any libraries I should be aware of, such as GUI libraries?

Lots. To code effectively on the Amiga you really need to have learnt how a lot of things about the layers of the OS hang together. At the time this was the biggest hurdle pre-internet when information and knowledge was a lot harder to come by.

Workbench 3.1 is the first of the best. I could bore you with the details if only I could remember them.

The most similar Amiga language to C++ is C, and knowing C will only get you a small part of the way, as the devil is in the detail of the system calls/libraries.

If you want to learn a new langauge then maybe don't pick an almost dead platform.If I had time I'd be learning lua.

Amos is still rubbish, even now.

Richard Harrison
Haha, awesome answer. I'm a big fan of C, so that's great. I have to agree that Amos is quite rubbish :D
nbolton
A: 

Don't forget ARexx which comes with most Amiga installations. It is a truly wonderful language, surprisingly readable and easy to write. Most existing applications on the Amiga have hooks for ARexx so that you can cobble together larger applications from many smaller ones quite easily and efficiently. One of my favorite aspects of ARexx is its versatile string handling. Even though it is an interpreted language it is surprisingly fast, particularly if you made good use of its connection to other programs to do low-level stuff for it.

miriam