AMIGA alive

AMIGA alive

Sunday, April 18, 2021

AADevLog #0 - IEEE and STL 3D file format

This is the first in a loose series of developer logs about projects I'm working on, from little experimental or example code, to more complex ideas. On my quest to create some proper Amiga software - a game! - I have encountered, and will encounter, lots of challenges. 

After a steep learning curve and endless hours of failure, finally there is some usable success - yay! ;-) Over the years I've started many ambitious projects, but all of these turned out to be quite a mess. I realized I needed more basic knowledge and better testing of individual code sections, along with improving my concepts of software architecture. So basically while learning more details about how to use C and AmigaOS, my main task was to scale down my ideas and get stuff to work together properly, so I don't end up with countless individual functions each doing only half-way what's required - in other words: a mess.

Ok, long story short, with "a little bit" (cough) of prior training, I'll just share some of my experience, starting with something I created recently, over a couple of days:

First version of "stl_info" for Linux and AmigaOS

It's called "stl_info", prints out information about an STL 3D file (binary format, as exported by e.g. Blender), and works on Linux and AmigaOS. For Linux, gcc is used for compilation, for Amiga it's vbcc (on Linux, cross-compiling). Currently the number format printed out is a bit weird (for debugging) - just think of the comma as a ".", and omit the "0." (zero integer part of float fraction).

Nothing too spectacular, but maybe a first step towards 3d printing on the Amiga? Anyway, apart from reading some header bytes from the STL file, then some 32bit numbers, etc. there were two slightly more interesting things about developing the program: 

First, long numbers and the endianness thing. To make sure number storage would be identical on both my 64-bit Linux computer and the Amiga I've created a header file called "amigatypes.h" that defines e.g. ULONG as 32 bits like on the Amiga, WORD as 16 bits, etc. Still the byte order is incompatible: my Linux computer is an Intel x86, so it looks at it's bytes least-significant-first, called little-endian, or Intel-byte-order. The Amiga is a Motorola M68000, and looks at it's bytes the other way round, most-significant-first, called big-endian, or Motorola-byte-order. I tried to get around this somehow, but I ended up adding some separate code that swaps bytes around (see picture: bytereverse.c), and is activated in source code by a compiler define "AMIGA". 

And then, IEEE754 numbers. In an STL binary file, Vertex coordinates are stored in IEEE754 floating point number format. (LSB first, part of the file format definition.) If you want to use this number format on AmigaOS as a float datatype, you'll probably be fine with the conversion function "SPFieee()" provided by mathtrans.library, but I wanted to be able to decode IEEE numbers to some custom format, something fixed-point, maybe for a future... game! IEEE numbers are made of three sections of bits: sign, exponent, and mantissa. I won't go into detail here, you can look it up (see links below) if you like. It looks a bit complicated on first sight, but once you work yourself through the individual steps of decoding, you realize: the exponent is just the bit-shift of the mantissa. It looks complicated when expressed as decimal-based math, but is pretty obvious in binary, and probably creates a useable fixed-point fraction. That's nice. Yes, there are more bits involved, you have to do a little bit of fiddling, but the exponent-bit-shift is really neat, feels super binary. (Well, it is.) :-)

If you're interested in IEEE754 here are some links:

https://www.h-schmidt.net/FloatConverter/IEEE754.html

https://en.wikipedia.org/wiki/IEEE_754


So far for the first AADevLog - c u next time!

Saturday, February 13, 2021

How Amiga is a NEC Multisync LCD1970VX monitor?

Whenever a LCD monitor comes around, it's worth testing if it's suitable for Amiga use. According to sources, this one partially supports Amiga screenmodes - I gave it a try, or two.

Let's quickly run down the features of the monitor. This is the "partial support" information gathered from famous website 15khz.wikidot.com: 'No practical evidence. I kindly ask author to provide more information. Support is considered "Partial" for now. "Full" can be after test.'

Here's what the device looks like on the outside, and some specifications:

The NEC Multisync LCD1970VX has a nice front panel with four buttons and mini-joystick (sorry, bad picture)
The stand has room for cable routing, can be rotated, and is height adjustable (spring supported). Display can be tilted. Cable installation and position adjustment is smooth and easy - great stand!
Mains switch and input, and type label

DVI and VGA video connectors - an adapter for Amiga RGB video output is required

It's a 19 inch display, picture aspect is 5:4, and here's a 1280x1024 pixel screen from a Linux laptop:

Linux laptop VGA output, 1280x1024 pixel display mode

How does it perform with the Amiga?

For testing we're using an Amiga 1200, Commodore RGB to VGA adapter (DSUB23 to DSUB15), and VGA cable (DSUB15 to DSUB15), which is connected to the monitor's VGA input. On boot, the Amiga's Workbench is set to "PAL:High Res" 640x256 pixels, default overscan / screen size. For now, we won't change monitor settings manually, and let the monitor do all sensing and adjustments.

There's a picture!
Well, not bad! A (halfway) modern LCD monitor displaying some Amiga-native screenmode is a rare sight. There seems to be something a little off about the pixel clock or phase or something, the screen has slight vertical stripes. Also fonts look a little distorted, maybe due to scaling. Setting some background color, it becomes visible that Workbench screen size doesn't fit display size:
For "PAL:High Res" screenmode, the monitor chooses 640x240 pixel display mode

Ok, let's go through some more screenmodes - "PAL:High Res Laced" next. It shows up quite like the previous mode, but interlace flickering is strong. This might be acceptable for some games, but it quickly gives you nausea when using Workbench and fonts, and is probably completely useless for graphics work with DeluxePaint or the likes. 

"PAL:High Res Laced" screenmode - interlace flicker
"PAL:Low Res" and "PAL:Low Res Laced" screenmodes work as expected: same Workbench area visible, same screen position, same monitor display mode, just pixels double wide.

Same results with "PAL:Super-High Res" and "PAL:Super-High Res Laced", just pixels half as wide, here's what it looks like:

"PAL:Super-High Res" screenmode
"PAL:Super-High Res Laced" screenmode - interlace flicker

We go a little bit more into PC and VGA territory with "MULTISCAN:Productivity" screenmode, with "VGAonly" put into "Devs:Monitors". The monitor almost gets it right, with just a few lines missing at the bottom.

"MULTISCAN:Productivity" screenmode

Most other screenmodes are displayed quite similarly. "NTSC" screens are fully visible (no missing lines at the bottom) and there's very little vertical striping, but position is off. "EURO:72Hz Productivity Laced" looks pretty good: interlace flickering seems to be far less noticeable here. Without "VGAonly", display of the respective screenmodes is a bit off, and in case of "DBLPAL" the monitor complains about frequency range and tries to auto-adjust. Overall, sometimes a message would pop up notifying about the monitor's native resolution - indicating that the signal received isn't perfectly within limits.

"NTSC:High Res" screenmode - fully visible, but not centered

"EURO:72Hz Productivity Laced" screenmode - less interlace flickering compared to other interlaced modes

Some screenmodes are not working at all:

  • "EURO:36Hz" non-interlaced: no picture, frequency out of range
  • "A2024" modes: picture corrupted

"A2024" screenmodes - umh, nope...

So far, so good. So the monitor works when connected to the Amiga, but "out-of-the-box" pretty much none of the screenmodes are displayed flawlessly.

But then... surprise!

Surprisingly, when switching back to "PAL:High Res" from some interlaced screenmode, the entire Workbench area is now properly visible, both horizontally and vertically.

"PAL:High Res" screenmode - now with 800x300 pixel display mode!

I couldn't figure out what precisely causes the change in display mode. There seems to be some sort of limit, which if exceeded causes the monitor to adjust itself differently. Is it the interlacing of some other modes, or some specific higher vertical resolution?

"PAL:Super-High Res Laced" screenmode, 800x300 pixel display mode

Manual tweaking - better results

Until now there was no manual interference with the monitor settings involved. Certainly better results can be achieved with some tweaking. Using the monitors menu button and mini-joystick, the picture's vertical position, horizontal position, and horizontal size can be adjusted. (And colors etc.)

This is the best result I could achieve with "PAL:High Res" screenmode - vertical size adjustment would be nice:

"Best possible" in "PAL:High Res": display resolution switch trick, horizontal size, horizontal position, and vertical position adjusted

"Best possible" in "PAL:High Res", detail from the same screen as above: due to horizontal stretching the vertical stripes become less noticeable, but uneven pixel scaling becomes more visible
(Moire effect caused by photo camera, not display)
And here's a big Workbench using "EURO:72Hz Productivity Laced", which misses only two or three lines of pixels at the bottom:

"Best possible" in "EURO:72Hz Productivity Laced": horizontal size, horizontal position, and vertical position adjusted

The NEC LCD1970VX seems to remember size/position settings, but these apply to all display resolutions, so the picture will probably be off again when switching screenmode.

So is it usable?

Yes and no. It really depends on how you use your Amiga. Amiga-native screen modes' picture quality is average to acceptable. Of course the monitor displays true VGA modes from a PC or Amiga graphics card perfectly. ("MULTISCAN:Productivity" with "VGAonly" and size/position adjustment). The main issue is the switching of monitor display resolutions - depending on what you want to do, this might give you an oddly positioned picture, maybe bad flickering, and spoil the fun. Imagine if you're a gamer, and need to change Workbench screen resolution a couple of times before "PAL:High Res Laced" becomes fully visible, ready to display your game's title screen. Certainly not a desirable setup.

But one can imagine two scenarios where this monitor might be quite welcome:

One is, if you're a Workbench-only Amiga user. You can choose and save some "MULTISCAN:Productivity" screenmode, or "EUR:72Hz Productivity Laced" as shown above, adjust monitor settings, and have a very usable picture on boot and for working. Even better if you have a graphics card with a pass-through connector, this monitor will at least display something when you occasionally need to show some Amiga-native screen.

The other is "lab" work - experimentation, multiple, and different computers. This is where this monitor could be really helpful, as it obviously accepts quite a wide range of signals, and has VGA and DVI inputs. It might also save some serious space on your desk. Unfortunately, composite video / SCART / S-VHS inputs are missing - with these, it would really be versatile.

Additional sources:
http://15khz.wikidot.com
https://www.cnet.com/products/nec-multisync-lcd1970vx/specs/

Thursday, February 11, 2021

AMIGA A1100 - new, awesome Amiga 1000 mainboard!

Awesome news from the hardware scene: After numerous FPGA Amiga implementations, re-imagined Amiga 500 and 1200 mainboards, all sorts of new accelerator designs, and so on, the Amiga 1000 gets a major overhaul with "AMIGA A1100".

Miguel "Estrayk" Fides from Spain has just published information about his "A1100" mainboard, which is designed to fit a Amiga 1000 case. Using modern components along with some original ones, this new mainboard looks quite different from the original Amiga 1000 PCB - and it has a lot of impressive new features:

  • CPU Motorola 68020@14Mhz (PGA)
  • OCS/ECS chipset (original Paula / Agnus / Denise required)
  • 2MB ChipRAM
  • 64MB FastRAM
  • 2.5'' IDE controller
  • support for single and dual Kickstart ROMs (three sockets total)
  • built-in flickerfixer and scandoubler with RGB, cinch and VGA connectors
  • A1000 (86pin) and A1200 (150pin) expansion connectors
  • A1200 clockport
  • ATX power supply connector

According to SysInfo the A1100 is easily twice as fast as a stock Amiga 1200.

It looks as if currently there's no distribution or anything planned, but that doesn't mean it won't happen, the developer is evaluating possible options.

Here's a video showing the A1100 in action (2021-02-10):


https://www.youtube.com/watch?v=cP2rrnZsDm8

Very nice, certainly a great piece of Amiga hardware to keep an eye on!

Sources:
http://www.retrowiki.es/viewtopic.php?t=200036585
http://amiga-news.de/de/news/AN-2021-02-00016-DE.html
https://www.amigafuture.de/app.php/newsportal/?ulg=de&news_id=38632


 

Sunday, February 7, 2021

Games galore #15: Luca Carminati games pack, Mutation Gold Compilation & Cyberpunks 2, Looty v2, Blask

In this issue we take a look at a very mixed set of titles: two compilations of arcade games, a little bit of a top-view shooter, a platformer, a first person shooter, and as a bonus the full free release of a strategy classic.
 

Amiga games pack by LC-Games

 
Luca "LC-Games" Carminati has released a set of games he has developed between 1995 and 1998 as an "Amiga games pack" - for free. Cool!

The games are: Croins (an Asteroids clone), Hyper Viper, Kangy, Marietto, and arcade sports game Slalom Speciale.

Hyper Viper, snake type game in a maze

Some of the games have previously been released as shareware titles. Now you can download the ADFs from LC-Games' itch.io page, and enjoy all full versions.

Kangy, a platformer

Arcade gaming with neat graphics and sound, and you get the full package, check this out: "Croins" is a well made Asteroids clone with pounding techno music on the title screen, "Hyper Viper" a snake-type game with a funny looking green worm and less pounding but equally enjoyable music, "Kangy" a platformer with cute looking animals and palm trees, "Marietto" is quite a unique blend of several classic game styles and can get pretty hectic, and finally "Slalom Speciale" is an unobtrusive skiing game.

Marietto - Pang meets Galaga meets Fury of the Furries

All included games are decent titles, no technical spectacle here, but pretty straightforward, and very Amiga-ish, arcade gaming. Very nice - Molto grazie, Luca!

Read more, and download "Amiga games pack" from LC-Games' website page:
https://lowcarb.itch.io/amiga-games-pack

Additional sources:
http://amiga-news.de/de/news/AN-2020-11-00060-DE.html
http://www.indieretronews.com/2020/11/an-amiga-games-pack-released-by-luca.html

 

Mutation Gold Compilation & Cyberpunks 2

 
Support for the Amiga CD32 is always rare, and very much appreciated. Mutation Software has re-released it's "Mutation Gold Compilation" for Amiga CD32, a collection of five games. All games have received some fixes and updates, including adaptions to CD32 joypad.

The individual games are: Doodlebug, Cyberpunks, Tin Toy, Tommy Gun and Castle Kingdoms.

Doodlebug, included in the "Mutation Gold Compilation"

The current (minimum) price for the "Gold Compilation" is $13.49 - but note that for just a few bucks more you can make a bargain and buy the "CD32 Games Bundle" which includes the "Gold Compilation" plus "Wiz - Quest for the Magic Lantern" (CD32 version).

Go to Mutation Software's "Gold Compilation" website page for more information and purchase:
https://softamuse.itch.io/mgc-cd32

Mutation Software has also announced a new game: "Cyberpunks 2" for AGA Amigas, a sequel to top down shooter "Cyberpunks" from 1993 (for OCS/ECS Amigas). "Cyberpunks 2" is said to be for 1 or 2 players, have new levels and new gameplay, and a tentative release date in late 2021.

1993 game "Cyberpunks", sequel announced

Read more about Mutation Software's releases at:
https://mutationsoftware.uk

Additional sources:
http://amiga-news.de/en/news/AN-2020-11-00044-EN.html
http://www.indieretronews.com/2020/11/mutation-gold-compilation-and.html
http://hol.abime.net/6231 ("Gold Compilation" original 1998 release)

 

Looty v2

"Looty v2" for all Amigas with 1MB ChipRAM is an updated version of 1993 public domain title "Looty", inspired by ZX Spectrum game "Booty".

It certainly still requires a little bit of polish, but it's quite fast paced, plays smoothly, and: it has a level editor! A platformer with a level editor - that sounds like hours and hours of creating challenging courses. The author has expressed interest in improving the game further, and he'd like a graphics artist to join in. Maybe this is your chance?

Here you can watch a video of "Looty v2" (2020-11-19):


https://www.youtube.com/watch?v=w3sBHOZ5F_Q

Read more, and purchase (you can name your own price!) the game at:
https://mixelsoftware.itch.io/looty-v2

Additional sources:
http://www.indieretronews.com/2020/11/looty-v2-amiga-game-inspired-by-classic.html
http://amiga-news.de/de/news/AN-2020-12-00001-DE.html
https://www.amigafuture.de/app.php/newsportal/?ulg=de&news_id=38424

http://eab.abime.net/showthread.php?t=104728


Blask, early first person shooter demo

Doom never stops. After "Dread" here's another 2020 low-spec Amiga first person shooter, called "Blask". Actually this project seems to have been around for quite a while, mostly under the name of "Alien Enemy: Dangerous", with occasional tech demos popping up - this one is the latest.

Not too much to show here, but this already looks quite enjoyable. Written in AMOS, it has what appears to be pretty smooth 3D graphics, proper graphics and color palette, and this simple, but quite convincing light source effect.

Certainly a welcome addition to the set of first-person shooters available for the Amiga, make sure you stay up to date on this one.

You can watch the latest tech demo of "Blask" on YouTube (2020-11-09):


https://www.youtube.com/watch?v=FIZMbPKN4o4

You can download the demo here:
https://chomikuj.pl/marowu/blaskscr,7450164853.adf

Additional sources:
https://www.ppa.pl/forum/programowanie/36707/alien-enemy-dangerous/14#m702587
http://amiga-news.de/de/news/AN-2020-11-00021-DE.html
http://www.indieretronews.com/2020/11/blask-first-person-shooter-amiga-tech.html

* * *
 

...and again some bonus gaming news:

Archon and Archon 2 full versions for free

In November 2020 printmag "Amiga Future" continued their efforts of releasing full Amiga software titles for free with the addition of two highly regarded classics: "action-chess"-type games "Archon" and "Archon 2"!

"Archon" from 1985 (Amiga release)

"Archon" (Greek for "ruler") by Electronic Arts was first released for Atari 8-bit computers in 1983, received rave reviews, and was ported to many other platforms, including Amiga. It's a fast-paced mixture of chess-type strategy, and realtime combat action sequences deciding the outcome of individual attacks.

"Archon" combat section
"Archon 2: Adept" from 1984 was the first sequel, released for Amiga in 1988. In later years, more sequels would follow: "Archon Ultra" for MS-DOS in 1994, "Archon: Evolution" around 2007 using some of the original 8-bit code, "Archon" remakes for mobile devices, "Archon Classic" in 2010 available on Steam, and there seems to be another new version in development since 2017.

"Archon 2: Adept" from 1988 (Amiga release)

The games' disk files are available in ADF, IPF (Archon and Archon 2) and WHD (Archon 2 only) format, plus a manual in PDF.

Go to Amiga Future magazine's website to download "Archon" and "Archon 2":
https://www.amigafuture.de/app.php/dlext/search?search_keywords=archon


Additional sources:
https://www.amigafuture.de/app.php/newsportal/?ulg=de&news_id=38388
http://www.amiga-news.de/en/news/AN-2020-11-00040-EN.html
https://www.facebook.com/playArchon/
https://archive.org/details/ArchonEvolution
https://en.wikipedia.org/wiki/Archon_Ultra


* * *

Thanks for reading! Stay tuned for "Games galore #16"!


* * *

Support Amiga game development! Buy a game!

Friday, February 5, 2021

The Kickstart switcher from hell

or: How not to build an electronic device

Learning from this little case study might save the beginner some hours of mistakes and wasted experimentation. A Kickstart switcher for an Amiga 500/600/2000 computer is not a complex device, so for many aspiring hardware developers it's one of the first projects to try. I was one of these.

A couple of years ago, my intention was just to build something usable for the Amiga, and not waste a lot of time on research and obtaining material. A Kickstart switcher quickly came to mind, and it looked as if - with some extra manual work - my initially very limited set of tools and components would be sufficent to get the job done. All I used for the Kickstart switcher is: some drilled circuit board, 2x DIP IC sockets, wire, single-row pin headers, 2x jumpers, and a resistor. I think I got the schematics from AmiNet.

Cutting a lot of short pieces of wire, and using tweezers to put them into place didn't scare me - here's what I came up with:

Well, it's undeniably a Kickstart switcher.

Let's start with the positive aspect:

It cost very little, and any electronic components dealer probably has the required components in stock at any time.

But that's really about it - and this is where the "hell" part comes in:

Using a single sided drilled circuit board doesn't make planning exceptionally easy. A Kickstart switcher requires a lot of signals to be passed from one IC to the next, which using plastic-coated wires requires an unusual amount of space on the circuit board. 

I figured out I had to do the routing on both sides of the board, and have lots of wires cross lines of IC pins and solder pads. Also there would be a certain order required which part to solder before adding the next one.

I was ambitious and wanted to build a compact, small board.

Which turned out to be... interesting.

I started having doubts about my design when pulling the wires under the first IC socket, and soldering them to the second one. This was extremely tedious: the wires are a little too stiff for such short lengths, and needed to be soldered almost underneath the second IC socket. So there was very little room to work here, with stubborn hot wires and hot solder slipping around. I frequently touched plastic parts or wire insulation with the solder iron, leaving ugly markings.

After the doubts came the hate. 

When I accidentally dropped some solder on one of the inner wires I had already done, and wanted to remove the excessive solder, the wire came loose. I quickly realized this was near impossible to fix without either damaging plastic parts, or touching solder nearby, which would make one of the other wires come loose. My morale was sinking, but I went on, and after some serious fiddling I managed to fix and finish the solder work. 

Or so I had thought...

This looks quite tidy. But it's the devil's work.  

Then I checked with a multimeter for shorts. Everything looked flawless from visual inspection, but then... BEEP! What? I really wasn't expecting this. You'd probably expect a short to happen with solderpads next to each other, but I had accidentally touched opposite sides of IC pin rows, and the multimeter had beeped... ?!

It took me a little while to find out what was going on. 

And I hated myself even more.

With all the space saving considerations, all the wires were now in-line with all solder points. I had been soldering the bottom side wires to the board first. So what was happening was: When I soldered wires from the top side of the board, the hot metal wire would stick through the drilled board, and melt the insulation of the bottom side wire below it, creating a short.

Great. Quality design.

Well, eventually I finished the damn thing, and tested it.

Today, I still don't know if it works properly, and I don't want to. It might have fried the 2.04 ROM chip you can see in the first picture - it creates a red bootscreen on the Amiga.

It was a little, interesting journey, but I'm through with this Kickstart switcher.

Now it sits here on my desk, as a grim & funny reminder of how not to build an electronic device, especially not a prototype. 

It all comes down to basically one important lesson learned: Leave some space! If you build such a thing, always add a couple of extra millimetres here and there as working space, for corrections, unexpected wire, or just to simplify visual inspection. Being a little generous with space might save you a lot of time, and from getting unusable results.

"Kickstart switcher from hell"

68000 vs. 68010 CPU performance

The 68010 is a fully compatible drop-in replacement for the 68000, with a few extra features and slightly better performance.

In case you always wondered how much of a speed gain the 68010 would be over the 68000 here are the hard facts as given by classic Amiga benchmarking tool SysInfo:

MC68000 at 7.09 Mhz: 528 Dhrystones

MC68010 at 7.09 MHz: 547 Dhrystones

Tested on Amiga 500 rev. 6a, 512KB ChipRAM

Saturday, December 26, 2020