top | item 37389376

Amiga Systems Programming in 2023

209 points| todsacerdoti | 2 years ago |markround.com | reply

73 comments

order
[+] mark_round|2 years ago|reply
Author here, thanks for posting! Happy to answer any questions or chat Amiga stuff in general. Bear in mind - as I said in the article - I'm more-or-less a total newbie when it comes to all this stuff. I have been involved in the Amiga scene since I got my first A600 in the 90s, but really just observed the coding side of things from the sidelines although I did enjoy a brief stint as a Graphics Artist using DeluxePaint for a UK Scene group. My C code will probably make your eyes bleed, and I'm sure I've got some factual details wrong but diving back into this platform again (and discovering all the little details that made it so advanced for the time) after a long absence has been a lot of fun!
[+] helpfulContrib|2 years ago|reply
How do you feel about the Amiga 500 as a platform for teaching systems programming? These are a lot more accessible to kids and the like, than the fully loaded A600 that only a few of us have stashed in the attic/atop the retrocollection ..

Kids really love retro-computing (I'm a curator at such a museum, also) and the #1 request is - how do I get some hardware to get started?

What of the new-school platforms do you consider a viable answer to that question, Amiga systems-hacking wise?

[+] anfractuosity|2 years ago|reply
Very interesting article, I've only vaguely heard of the more modern Amiga computers. Looking at https://www.hyperion-entertainment.com/index.php/where-to-bu... the latest versions of the OS run on the 1200+ with an accelerator, I assume then the A500 isn't really supported any more?

I've got an A500 I bought second hand that I need to play with more, it came with some interesting looking software such as AMOS 3D. Just wondering if you have any recommendations to obtain a HDMI output. I just found - https://www.retropassion.co.uk/product/rgb2hdmi_amiga_500/. Also it sounds like I should probably dismantle it to remove the battery?

[+] tralarpa|2 years ago|reply
Do I see there an A1200 with a case that doesn't close properly because you put a 3.5" HD in it instead of the more expensive (and less capacity) 2.5" HD? :)

Edit: Ah, no. I just read the article. It's the accelerator, I suppose.

[+] Lucretia9|2 years ago|reply
Use AmigaE, far nicer than C. Never tried Chris Handley's "Portabl E" compiler.
[+] flohofwoe|2 years ago|reply
Wow blast from the past :D

I must say, I'm thoroughly impressed that the Amiga community sticks with and improves the standards that were already set in the early 1990's (AmigaGuide, the Lisp-y installer scripts, LHA, and probably also things that are not mentioned in the article, like AREXX and datatypes) instead of reinventing the same wheel over and over.

[+] mark_round|2 years ago|reply
There is a fantastic article which I've linked to before that goes into a lot of that: https://datagubbe.se/ltmag/

Datatypes in particular are amazing! I really wish some of these features (see also: ASSIGNs) made it over to other platforms. Which makes me think... A really nice hack (after I finally port SetCmd back to 68k and then bring it to more platforms) would be to add an ARexx port. Rexx itself is a pretty decent scripting language and the ubiquity of it on later-day Amiga systems meant that glue-ing components together and automating big chunks of platform behavior was very simple. Off down the rabbit hole again ;)

[+] daneel_w|2 years ago|reply
Great article. Some petty nitpicking:

> "Just use LHA format archives. It’s the standard compression tool on Amigas and even though there are modern (and technically better) alternatives ..."

LZX had supplanted LHA already by 1994.

> "a 7Mhz 68000 16-bit CPU"

It's a "16/32"-bit CPU, since it provides 32-bit operations/immediates and 32 bits worth of data- and address registers. For all practical accounts of programming the CPU it's a 32-bit machine, no matter the bus shoveling data 16 bits at a time behind the scenes.

> "... but all of what follows is in the context of developing a systems tool in C as that's the language of AmigaOS"

Not sure how to interpret this. You're in no way locked to C if you want to program for AmigaOS. You can load and interact with all of the libraries etc. of AmigaOS in Pascal, E and what-have-you, since there are headers available for almost any language you may want. Even assembly, which for the Amiga is/was a far more common choice for OS-friendly applications than people think.

[+] mark_round|2 years ago|reply
Nitpick away, always glad to include corrections!

> LZX had supplanted LHA already by 1994.

True, but LHA always felt like more of the standard and tools were readily available and present on most systems. Sort of like how Bzip2/XZ and so on are technically far superior, yet a gzipped tarball is still the universal standard on Unix systems. A quick glance through AmiNet shows the majority of packages there are still using LHA as standard. Even stuff targetting a "modern" Amiga tends to use LHA - grepping the Os4Depot full package list shows:

  grep -c '.lha' FULLINDEX.readme
  4110
  grep -c '.lzx' FULLINDEX.readme
  37
> For all practical accounts of programming the CPU it's a 32-bit machine

True. I'll update the article to include that - I guess I'm really thinking of things like the 68020 processor (and CD32 which proudly proclaimed "32-BIT" in big letters on the case :)

> You're in no way locked to program for AmigaOS in C.

Also true. From what I can see, calling & opening the libraries from Assembly is remarkably similar to e.g. C, but from browsing the leaked OS source (not that I'd ever advocate for that sort of thing ;) ) it was all originally in C. I wanted to dive in and get a better understanding of the code as it was originally written hence my experiments targeting C. Plus, I knew enough C from my old University days to get up to speed in a short enough timespan. With no memory protection, crashing my Amiga because I forgot to free some DOS object or other was a common occurrence - if I was attempting this in Assembly, I'd probably still be working on a basic proof-of-concept! Although I really admire the skills of those developers who did choose that language to write system utilities, not to mention the magic of the demo-scene. It's just a bit beyond my abilities/time constraints at the moment!

[+] amiga386|2 years ago|reply
> LZX had supplanted LHA already by 1994.

Firstly - no it didn't. Sorry for nitpicking the nitpick, but the first public release of LZX was February 5, 1995.

Secondly, "LZX supplanted LHA" is an opinion with varying levels of support.

LZX did take the Amiga community by storm, with its higher compression ratios, solid archiving and built-in support for unpacking LhA files, faster than LhA could. Many people started recompressing their archives with LZX... but also many people didn't. Some Amiga magazine coverdisks (e.g. AUI) started using DiskSpare and LZX to get as much on a disk as possible... others stuck with normal disks and LHA.

The majority of Amiga software archives are on Aminet, which is still getting uploads today. Aminet standardized on LhA, not LZX.

Just as a random non-Aminet example, the WHDLoad homepage offers you its software in either LHA or LZX format, your choice. Wouldn't it be LZX only by now if LZX supplanted LHA in 1994?

What the OP said rings true; LhA files are ubiquitous on the Amiga, and also it's possible to portably unpack and create them on other systems. LZX is very popular, but I wouldn't personally say it supplanted LHA, even though I have hundreds of LZX archives.

[+] deaddodo|2 years ago|reply
> It's a "16/32"-bit CPU, since it provides 32-bit operations/immediates and 32 bits worth of data- and address registers.

Eh, you're getting into some real crafty wordplay here. If you want to be technical it's a 16-bit processor with compound operations at 32-bit, in the same way a Z80 is an 8-bit processor that does 16-bit compound operations.

Yeah, if you redefine the terms, you can make it mean exactly what you want. This is exactly what Atari did to label the Jaguar a "64-bit" machine, after all. It doesn't change what people meant at the time when they used the nomenclature (the native operating size of the ALU).

[+] sgt|2 years ago|reply
> LZX had supplanted LHA already by 1994.

What's your background as an Amiga user?

As someone who started using Amiga around 94 until 2000, I can't remember seeing many usages of LZX. It was always LHA.

[+] mhd|2 years ago|reply
Given how much Amiga users I knew in the past gushed about their allegedly stellar GoldEd and CygnusEd, I'm quite surprised that this uses Lite.
[+] unwind|2 years ago|reply
I was old enough back then that I remember actually paying for the shareware version of FrexxEd [1]. I just learned from that page that it's open source now, cool!

[1]: https://daniel.haxx.se/opensource.html (yes, by the author of curl).

[+] mark_round|2 years ago|reply
CygnusEd was the absolute business back in the day. I still love it, but my muscle memory just isn't there anymore after years of PC/Mac editors! I guess I've also become too spoiled by modern conveniences. LiteXL runs on pretty much anything and writing extensions is also pretty easy. But maybe I should get back into the habit of using CygnusEd some more...
[+] throwaway92753|2 years ago|reply
CygnusEd was first released in 1987. I don't think it's fair to compare with a modern editor that was released 30+ years later.

I have not used either [1], but their choice was based on what was available at the time.

Edit: [1] Actually I did use CygnusEd for simple text editing, but I was not into programming at the time. I don't have a basis to compare it to modern editors, other than the knowledge that choices needs to be seen in the proper context.

[+] harel|2 years ago|reply
I've just got an A1200, installed the latest Amiga OS 3.2 (on CF card). It sits nicely next to my upgraded A500. But my resolution and UI in either of them is nothing like the one shown in your screenshots. I'm almost jealous. Are you using the Hyperion latest? I mean, look at those colours - they pop!
[+] mark_round|2 years ago|reply
The images from my A1200 are on a very customized OS 3.2/CoffinOS (legally "dubious" AmigaOS distribution favoured by Vampire accelerator users) hybrid system with Faenza PNG icons. But if you have a graphics card (or emulate one in e.g. WinUAE), you can run in high resolutions/bit depths like this. The X5000 screenshots are on a QHD 24-bit resolution as the X5000 is a far more modern machine and has a hardware-accelerated compositor and 3D stack running on a Radeon PCIe card.
[+] anta40|2 years ago|reply
I'm not old enough to actually use Amiga in the past. My 1st PC was... IBM PC something running MS DOS.

But definitely want to learn system programming on retro machines (beside GBA, Nintendo, etc. Just installed FS-UAE and FS-UAE launcher on my Mac. It asked you to provide the ROM of various Amiga machines (A500, A500+, A600, A1000, A1200 etc). I assume pick A500?

[+] vidarh|2 years ago|reply
A500 has broadest compatibility of those listed. A1200 is the most capable of those listed (A1200 and A4000 had the upgraded "AGA" graphics chipset) but for emulation it doesn't matter so much as the emulators tends to offer expansions (like e.g. emulated "Picasso" graphics cards for something closer to modern resolutions and colours).
[+] floor_|2 years ago|reply
I remember hearing a gamedev saying the last time he was happy programming was on the Amiga where he had total control.
[+] bjourne|2 years ago|reply
How energy-efficient are old Amigas? I get the appeal of "limited computing" because it forces you to be smart about using the resources. But it becomes silly when an Amiga and crt draws more power than a modern server.
[+] daneel_w|2 years ago|reply
My A1200 power supply (Commodore original) is rated for a maximum consumption of 35 watts, which includes headroom for putting both an accelerator board with CPU+FPU+RAM and a 2.5" HDD inside the computer.
[+] robinsonb5|2 years ago|reply
Efficient is the wrong word here, because the amount of computing work they can do for a given amount of electrical energy is pretty tiny compared with anything modern. They're pretty light in terms of energy usage though, and because of the elegant simplicity of the system you don't notice how underpowered they are until you ask them to do something CPU intensive. (Think several minutes to draw fractals that even 20-year-old PCs can draw in realtime.)
[+] mark_round|2 years ago|reply
I have mine connected to a modern flat-panel display as I use an Indivision adapter, and there are other solutions which is fortunate as CRTs are getting very rare (and fragile!) now. Would still love one for the retro appeal, but I just can't justify it! The power draw from the base system is pretty small, I just checked the power meter my A1200 is plugged into, and powering it on jumped the draw from around 1.6A at 240V to around 1.77A.
[+] vidarh|2 years ago|reply
Given most of them didn't have or need fans, I'd imagine they'd come out ok if you only ditch the CRT.
[+] _ea1k|2 years ago|reply
I bet it'd be rare to see more than 150W. Maybe not efficient compared to a modern laptop, but probably very efficient compared to most modern servers or desktops under load.

Of course, a CRT is much worse, but using an LCD shouldn't be difficult.

[+] snvzz|2 years ago|reply
A1200 with 68030 accel board draws some 15w, measured.

In contrast, my Ryzen 5800x3d based PC idles at 70w.