I had a lot of time to think about AMOS and ECS/AGA support whilst I was in hospital. I also had the printed AMOS Pro sources for a bit of light reading
. Anyway, the main problem is backward compatibility. We've been through a few ideas on the forum but haven't settled on anything yet. The main problem is the existing screen structure, which only allows 6 bitplanes.
My latest thinking is:
Add two new instructions to AMOSPro.Lib. These would be
Set Ecs and
Set Aga. No parameters and would have to appear at the start of any program along with any similar instructions (eg.
Set Buffer or
Set Double Precision).
Add two more functions to allow the programmer to check the environment. These would be
Ecs and
Aga (similar to the existing
Ntsc).
Define the screen structures for ECS (if necessary) and AGA (for 8 bitplanes). Then modify all the existing instructions that are affected to use the new structures if the programmer has specified ECS or AGA. And change their parameter rules (eg. allow 256 for the number of colours when defining a screen).
There are three modules that need attention for this: the internal amos.library (core graphics functionality), AMOSPro.Lib (the instructions) and AMOSPro (the tokenise and verify bits). Adding the new instructions to the end of AMOSPro.Lib's token table is straightforward.
It's quite an extensive and tricky mod, but looks feasible. Luckily, most instructions that might need more than their current number of parameters are already handled as special cases. Eg.
Fade specifies no parameters in its library spec. The checking is done during tokenising and verifying. (How on earth do you specify 256 colours in a fade anyway?! Probably modify it to accept an integer array maybe?)
This is far from trivial to do but has the advantage that the language mainly remains familiar and there's only four new instructions to learn. I'm assuming also that, for AGA, the programmer will only be interested in 256 colours, larger bitmaps and so on. And not some of the fancier screen modes (like SuperHires and chunky graphics).
This is still at the 'thought bubble' stage as I've got my hands more than full at the moment and my 'sitting time' is still rather limited. Any comments anyone?