Ultimate Amiga

Network Boards => AMOS Professional Re-Development => AMOS Factory => Feature requests and bug reports => Topic started by: MadAngus on November 28, 2012, 12:04:14 PM

Title: AGA Support
Post by: MadAngus on November 28, 2012, 12:04:14 PM
Discussion and speculation thread for AGA Support in the ClassicAMOS project.

Once a clearer picture and some definitive decisions are made by the developers AGA project milestones can be added to the 'AGA Development project' (http://www.ultimateamiga.co.uk/index.php/topic,9575.0.html) thread.
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:23:02 PM
Snippet by MadAngus:

AGA support and other features:
AGA support, who doesn't want it!

However, to attempt to begin implementing AGA enhancements too early in the development cycle may lead to problems fixing old code while new code is being injected. Such as changes to original core code to allow integration of the new AGA code whilst trying to fix an old bug that related to that original core code.

As has been said, trying to dictate what people work on during the course of the development is absolutely out of the question for this project, there will be none of the "We know best" or "we won't implement that because we don't want to work on it/agree with it/like it" attitudes in this project.

So how to accommodate the desires for AGA support and other features (Including optimised code)?

We have been provided with the solution to that problem, Extensions thank you Francois.

This would allow anyone who wishes to develop alternative optimised code or features and role them into an extension (or even an alternative AMOSPro), and at a later date and if feasible role them into the core code. So if anyone decides to work on other things outside of this projects boundaries, know that you will be welcome to submit your work for integration at some point, it would also be appreciated if you would submit your work.

With all documentation being made available to everyone, your projects could follow an inline development process, i.e. as new fixes are applied to the core code you could in turn test your code against the changes. Would make implementation at a later date simpler.
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:26:07 PM
Snippet by bruceuncle:

But the point MadAngus made is very pertinent:
Quote
We have been provided with the solution to that problem, Extensions thank you Francois.
All the more reason to maintain a stable core for the product.  While we're doing Stage 1 and Stage 2, we don't want to do anything to upset any parallel development going on in Extensions.  People can then have confidence that their own efforts will be stable and useable in the future.  (Preferably without having to re-compile against a changed set of system equates :)).
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:34:43 PM
Snippet by MadAngus:

Quote
One more question for everyone to ponder (and hopefully post replies to  ::)).  I've previously asked what aspects of AGA do people want integrated into an AMOS Pro V3.x.  The extra colours?  The screen modes?  All of it?

All of it? Yes.

I would suggest that all AGA documentation be collated into a single archive and a detailed study of what the AGA chips capabilities and features are. this should be broken down into appropriate categories.

These categories/features etc. can then be reviewed here as to what should be implemented first.

Developers could do it blind but I wouldn't want to be the person who has to link it all into a library.
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:46:58 PM
Snippet by Hungry Horace:

C- Any AGA support for AMOS would benefit from a new AGA expansion of TOME.


I dont' know about anyone else, but I know what functions of AGA I would like to see (since it was asked before).....

- AGA screen modes, up to 256 colours, as a direct swap for the existing (i.e. 'normal' screen modes)
- AGA screen modes to support similar 'neat' functions of AMOS such as FADE etc. plus basic commands like LOAD IFF
- AGA Hardware Sprite adaptions, to allow the additional numbers /sizes etc that the AGA Chipset allows
- AGA Software Bob adaptions, maybe to include optimisations which would improve ECS/OCS Bob performance
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:47:53 PM
Snippet by SamuraiCrow:

  • Easy AMOS Tutor : ported to an AMOS Evolution Extension.

i am glad to see this in the discussion - obviously consideration must be given to the fact that
A- TOME is an excellent addition to AMOS
B- There are existing limitations (max. no. of tiles limit, minimum tile size limit) which I expect people would like to see expanded
C- Any AGA support for AMOS would benefit from a new AGA expansion of TOME.


I dont' know about anyone else, but I know what functions of AGA I would like to see (since it was asked before).....

- AGA screen modes, up to 256 colours, as a direct swap for the existing (i.e. 'normal' screen modes)
- AGA screen modes to support similar 'neat' functions of AMOS such as FADE etc. plus basic commands like LOAD IFF
- AGA Hardware Sprite adaptions, to allow the additional numbers /sizes etc that the AGA Chipset allows
- AGA Software Bob adaptions, maybe to include optimisations which would improve ECS/OCS Bob performance

Adding to this, the full 24 or even 25 bit (one for genlock transparency) palette operations would be a good addition to AmosPro's AGA support.

Here's a thought:  Do we want datatype-based image loader support?  That would bump the requirements for running the software from Workbench 1.3 to 3.0 or better or AROS 68k.  The reason I'm asking is that libPNG supports 8-bit images but offers better compression than IFF.  Also, AROS uses PNG images for icons.
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:49:49 PM
Snippet by MadAngus:

AGA
Thanks Hungry Horace and SamuraiCrow, that gives some focus to the development of the AGA extension. Any developer can start writing some experimental/test code based on those requests if they feel the need to dabble.
(Note: preferred license is BSD (BSD templates Here), Apache 2.0 if you want copyleft)

I personally have no issues with bumping the requirements to Workbench 3.0 for the AGA extension.
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:52:02 PM
Snippet by bruceuncle:

Many thanks for all the input guys. 

These comments apply to Classic AMOS:

Regard this as 'thinking out loud'.

From what I've read (repeat, read, not actually dabbled in yet  ;)) integrating everything AGA except the productivity resolutions and the more extreme 'other' resolutions should be relatively straightforward.  (Does anyone actually use 1280x256/200 et al?).

As soon as we talk about resolutions other than 640x256/200 the problems begin to stack up.  We would need to define what we mean by a 'windowed editor'.  As I see it there are two alternatives:


Which then begs the question "What would we want for AMOS output?"  That is, should a program output to a floating window (i.e. not AMOS's current concept of a window) or full screen at the programmer's whim?  Yeah, yeah.  I know the answer's "Yes to all of it!" but try to think of consequences at the AMOS Basic Language level - the instructions required and their ease of use.

One option:

The AMOS architecture suggests a rewrite of amos.library to enable all these features as it's mainly that library that interfaces directly to the hardware.   If it was a fully decoupled system (more like an OO system) that would be the only change needed.  (Not quite a true statement as I've yet to meet an OO system that does not make some assumptions about other objects. ;D)

It would not realistically be practical to move AMOS architecture to an OO model (feasible, but not practical if we want results sooner rather than much, much later  :)) .  However it may suit the current architecture to incorporate AGA into amos.library rather than as an extension.  This would give maximum flexibility to the programmers of extensions and would help decouple AGA spcifics from the core AMOSPro_xxx.Lib files.  The AMOSPro.Lib file would be rewritten to choose whether AGA is appropriate for the specific existing AMOS Basic screen, window, graphics, text, sprite and bob instructions that would be affected (most of them  ::)).  Not that that choice would automatically allow any instruction, any time.  It should politely decline inappropriate usage with an error as usual.  But also transparently adjust parameter requirements. 

As an example, on an ECS system, something like Screen Open 1,640,256,256,Hires should give a meaningful error whilst being allowed if the system is AGA.

If the main implementation is in amos.library, I would expect that the resulting AMOS Basic AGA instruction set would include:


There's also the possibility of using the launcher (AMOSPro) to query the capabilites and limit the language accordingly.

Another option:

Same as for the option above, the main implementation to go into amos.library.  But the AMOS Basic Language implementation is put into an Extension.  For discussion, I'll christen this AMOSPro_AGA.Lib.

This would remove the burden on the programmer to query the environment - that would be the domain of the extension.  The necessary code for AGA would still lie within amos.library but would be dormant unless the AGA extension invokes it.  The assumption being that the programmer is using the AGA extension because they are targetting that specific environment.  Therefore they know what they want and how to get it.  The extension should elegantly decline AGA instruction usage in a non-AGA environment.

The big disadvantage with this approach is that AMOS Basic instructions that already exist, but would be affected by the capabilities of an AGA environment, would need to be repeated in the extension.  For example Fade  (implemented in AMOSPro.lib) and Aga Fade (implemented in AMOSPro_AGA.Lib).

Maybe a hybrid of the first option and the second would be preferable?  That is, existing AMOS Basic instructions re-implemented to suit AGA in AMOSPro.lib and AGA specific instructions (ones that don't currently exist) implemented in AMOSPro_AGA.Lib.

As you've probably gathered by now, I'm pretty well convinced that the success of AMOS Pro V2.x will depend on the AMOS Basic Language perspective.  :o  In any case, food for thought...
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:53:39 PM

Snippet by MadAngus:

AGA amos.library/extension
Would it be better to keep AGA as an extension for initial development and bug tracking thus decoupling it from the ClassicAMOS clean up. Then integrate as part of 'Stage4: AMOS Pro V3.0'.
Developers please discuss and decide on this and bruceuncles optional development tracks (previous post).
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:55:02 PM
Snippet by SamuraiCrow:

Ummm... floating windows are asking for punishment.  Methinks that palette collisions and color cycling will prevent us from making it a floating window.  The resizable floating windows will require that we get the graphics card support done first since graphics cards don't use palettes at all.  It would be nice to have a flippable screen that lets you click in the upper-right corner instead of hitting left-Amiga a to get back to it.

OO should be left to other programming languages.  If I wanted it object-oriented, I'd be using AmigaE or PortablE instead of AmosPro.  Besides, the new extension format in Amos Evolution can be made more flexibly than the old one.

Do we really want to make AGA support an extension?  We could adapt the token table to list the old commands as Old_Fade for the ECS/OCS palette entries and then use the Fade command with long integers as palette entries as the default.  Converting from the old format to the new one is as simple as multiplying the red, green, and blue values by 17 so that they proportionately scale from 0 to 255 instead of 0 to 15.  (17=$11 thus converting the 4-bit nybbles into 8-bit bytes without errors in color. Eg. $47C will become $4477CC.)  Of course, AOS 3.x goes totally overboard by using 96-bits of palette entries in the new ROM versions when 24 bits will do.
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 02:57:54 PM
Snippet by bruceuncle:

Quote from: SamuraiCrow
Do we really want to make AGA support an extension?

Probably not.  To be more specific, AMOSPro.Lib could quite happily encapsulate both the existing and the new instructions for AGA support.  There's no need to deprecate instructions as long as the system capabilities are automatically determined by the AMOSPro launcher (to setup the appropriate Editor and Monitor format) and by AMOSPro.Lib (to transparently switch any affected 'old' instructions between AGA and non-AGA).  The tasks for each then become something like:

For AMOSPro:

For AMOSPro.Lib:

It would also be preferable to delegate all actual hardware access to amos.library in order to fully decouple AMOSPro.Lib from the hardware.  The reponsibilities being:

amos.library:

The level of abstraction provided by the existing amos.library functions already appears to be appropriate.

AMOSPro.Lib:

The above is preferable as an objective.  But only as long as ity doesn't impact performance to any great degree.
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 03:01:28 PM
And finally an actual post be mesome.

Now that you have re-read all that could you now go back and and re-read the second and third post. Are you sure you don't want to start with an AGA extension first?
Title: Re: AGA Support
Post by: MadAngus on November 28, 2012, 06:14:47 PM
Post here any links and resources that could be used for developing AGA support into AMOS.

Thought I had more than this, apparently not, I may have deleted stuff during my recent file clearout, oops!

Links:
Mysterious Ways - How to Code the Amiga - AGA Chipset (http://www.mways.co.uk/amiga/howtocode/text/aga.php)
www.amiga-stuff.com General chip info (http://www.amiga-stuff.com/hardware/index.html)
Action's Guide to AGA-Fixing! (http://zakalwe.fi/~shd/amiga-cracking/agafix-v2.html)

Amiga AAA chipset (http://www.amigahistory.co.uk/amigaaaa.html)
This article from amigahistory.co.uk gives a clear breakdown of the differences between the AAA (Advanced Amiga Architecture) chipset and the AA chipset (renamed to AGA).
So if you come across documentation and your not sure if it relates to AAA or AGA then this will help.

A guide to Guru Meditation Error Codes (http://www.amigahistory.co.uk/guruguide.html)
You are definitely going to need this.


Files:
68k and AGA registers references & The Source-diskmagazine.rar (Attached)
Includes:
Specification for the Advanced Amiga (AA) Chip Set (aga2.lha)
Programming AGA hardware - lot of techy stuff here (aga.lha)
And other stuff, can't exactly remember where I got these files from.

agaguide.zip (Attached)
This is the "Aga guide", written by TFA. It explains all the new features of the AGA chip compared to ECS/OCS, and how to use them.

AA-Lisa-Specification (ENG).pdf (Attached)

The following specification docs are (I believe) available on the EAB server. If I find the location I'll add a link. They are large downloads as they are image scans 60-200MB per file.
Specifications_AA_png
Specifications_AGNUS_NTSC
Specifications_AGNUS_png
Specifications_CIA_png
Specifications_DENISE
Specifications_GAYLE_png
Specifications_LISA_png

Title: Re: AGA Support
Post by: bruceuncle on November 28, 2012, 09:41:43 PM
Now that you have re-read all that could you now go back and and re-read the second and third post. Are you sure you don't want to start with an AGA extension first?

I have thought long and hard about this.  I put myself in the position of the average AMOS programmer and asked: "What would I want to see out of all this techo stuff they're waffling on about?"  It's probably easier to answer the negative side of that question: "What wouldn't I like to see?!"


These thoughts incline me heavily towards the 'all in one' approach of not using an extension.

I think there is also a substantial programming advantage in doing all the hard work in the core libraries:  amos.library and AMOSPro.Lib.  It would be easier to manage the development as the tight coupling imposed by fully optimised assembler programming is in one of two places:  The hardware access implemented in amos.library and the instructions implemented in AMOSPro.Lib.  I may be fooling myself.  It's more a gut feeling.  But I've learnt to trust those over the years.  ;)

All the above is purposely pitched at a high level.  I'm well aware that AMOS has a few peculiarities that we could discuss ad infinitum.  But my aim here is to get the goalposts firmly defined rather than worry about the details of how the actual code will implement those ideals.  At the machine-code level, there's always a way to implement stuff - a bit like the ultimate Lego set really.   :)  The only constraints for implementing an idea at the machine-code level are complexity, performance and size.

There's always the alternative of the hybrid approach if the above is too daunting:
Quote
That is, existing AMOS Basic instructions re-implemented to suit AGA in AMOSPro.lib and AGA specific instructions (ones that don't currently exist) implemented in AMOSPro_AGA.Lib.
But I suspect that that would only result in an extension which we may prefer to slip into AMOSPro.Lib anyway (ok, ok - my prejudices are showing again ::)).
Title: Re: AGA Support
Post by: bruceuncle on November 28, 2012, 10:00:17 PM
Many thanks MadAngus.  I hadn't got anywhere near as many. :'(
Title: Re: AGA Support
Post by: asymetrix on December 07, 2012, 10:52:10 AM
some more AGA, Fat docs.. attached.
Title: Re: AGA Support
Post by: bruceuncle on December 07, 2012, 12:23:45 PM
some more AGA, Fat docs.. attached.

Thanks asymetrix.  And I don't think I ever said a big thank you for the PDF of the original AMOS Pro Manual  :-[.  It's the one I hacked in Acrobat to put the bookmarks into.  We couldn't have got anywhere much on these projects without it.  8)  Thanks again mate.
Title: Re: AGA Support
Post by: MadAngus on December 07, 2012, 04:40:29 PM
Nice docs asymetrix, cheers. 8)
Title: Re: AGA Support
Post by: asymetrix on December 08, 2012, 08:49:20 PM
Thanks asymetrix.  And I don't think I ever said a big thank you for the PDF of the original AMOS Pro Manual  :-[.  It's the one I hacked in Acrobat to put the bookmarks into.  We couldn't have got anywhere much on these projects without it.  8)  Thanks again mate.

You are welcome. Glad people find it useful and using Amos once again. Yeah I remember when I did it - alot of work took me 3/4 of a year. At the time lots of people needed it so I said - OKAY i'll do it, Amos and Amiga needs this great program to flourish.

@MadAngus

Thanks - This is a great project and I am very exited to see what happens weekly :)

I am really impressed with you and bruceuncle commitment to this project, just keep up the momentum and you will be fine.

What I do is take regular breaks then do a specified amount of work that I know can be done on a given day.

My own work has slowed down today due to a toothache .. :)