Welcome, Guest. Please login or register.

Author Topic: RTG API replacement - Lets finally do this  (Read 1249 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
RTG API replacement - Lets finally do this
« on: May 20, 2016, 06:06:26 PM »
Given all the recent drama regarding the current situation in Amiga RTG land, I propose that we finally sit down and create our own open standard and have community control over our own future.

At this point, we can't count on the potentially opened CGX sources. I'm afraid that may be tied up in license hell for some time to come. If we do get that, great, but we can't count on it.

I suggest that we start pulling from and feeding into the Aros CGX-like implementation since nobody seems to have issues with the legal status and it is pretty far along already.

I do have issues with the Aros codebase that are directly related to their development process.

They jumped to an new architecture and completely foreign compiler without making 68k stable first.

That in turn made testing any one component a nightmare and introduced code that has seemingly more macros than actual code. It's like reading a foreign language in places.

I strongly believe that if they had replaced just one library at a time on a 68k system using all other stock libraries, we'd have a stable, fast 68k Aros by now.

This also allowed them to weave in Aros specifics throughout all components to the point that it's almost all or nothing. For example, graphics devices currently need their HID, etc.

So IMHO, that makes Aros more like a reference than usable code, but it's still very valuable.

My suggestion is to do what they could have done to start with.

1. Use a real Amiga compiler such as vbcc since it is still developed and the developer is quick to fix bugs or add features if the Amiga community needs them.

2. Using Aros code as a reference, write a new, APL licensed Graphics.library compatible replacement that doesn't use any Aros specific code. It should drop into any Amiga system and just work. At this point, even Picasso96 and CGX should still work with this new library because it's a OS3.x work-alike.

3. Do this for each library that requires heavy patching for RTG.

4. Port the Aros RTG code to our new libraries. This may or may not break the ability to run Picasso96 or CGX on our libraries.


This approach also gives us a start on being in control of the OS itself.

The existing version of OpenPCI gives us a way to support Mediator PCI backplanes without signing an NDA.

I have the authority to relicense the OpenPCI source as I see fit as long as it's open, so this could go APL in order to support future PCI backplanes.


What are your thoughts?

Edit: Also posted at http://eab.abime.net/showthread.php?t=82760
« Last Edit: May 20, 2016, 06:31:16 PM by Heiroglyph »
 

Offline Gulliver

Re: RTG API replacement - Lets finally do this
« Reply #1 on: May 20, 2016, 06:46:17 PM »
Amen brother!

Where do I sign? :)
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: RTG API replacement - Lets finally do this
« Reply #2 on: May 20, 2016, 07:12:43 PM »
Email me at jeperk70@gmail.com and let me know your skill set, skill level, etc. or post it here.

We can hash our details and assign tasks as we go along but I feel strongly that:

All source code must be APL licensed.

It should primarily target 68k. Cleaner code is in preference to cross-platform compatibility.

Each replacement component should be usable on a stock AOS system without requiring our other libraries.

Components will be built as native Amiga HUNK files, not mangled ELF.

Completed replacements will be comparable in performance to original AOS libraries on 68020 or higher. Support for 68000 and 68010 is IMHO optional, but I'm open to debate.

Assembly is permitted if performance or ROM size requires it, but must be accompanied by functionally identical C representations and must be kept in sync.

Both should be easily verifiable by setting a unique #define for each function replaced and by a define used to globally disable all assembly. This will be used for testing and verification of the C versions.

Example:
#if defined(NOASM) || defined(FUNCTIONNAME_CIMPL)
// C version of FunctionName goes here here
....
#else
// asm version of FunctionName goes here here
....
#endif
« Last Edit: May 20, 2016, 07:21:26 PM by Heiroglyph »
 

Offline wawrzon

Re: RTG API replacement - Lets finally do this
« Reply #3 on: May 20, 2016, 07:52:56 PM »
just lately in process of moving to gcc6 kalamatee added some code to the build system to allow alternate compilers like clang. perhaps vbcc can be introduced to aros build tree. it can be built itself for different targets rather easily. the question is, is it worth it? im not sure since deadwood experimented with vasm without the resulting binaries being much better. all that must be evaluated.

anyway the crictical 68k binaries, especially those in amiga-m68k theoretically could be built that way. however i wouldnt expect that things like register parametrizing macros present for neccessary functions for 68k could/should be avoided or otherwise hidden from the code. as other compilers have also certain ways around it.

i think whoever has a good idea how to handle this better should enter dev ml list and discuss it with aros team. gcc couldnt be improved to handle this in the past any beter alas. currently gcc6 also seems to be buggy producing crashing code at times, maybe its time to take care of this?
 

Offline wawrzon

Re: RTG API replacement - Lets finally do this
« Reply #4 on: May 20, 2016, 07:59:24 PM »
Quote from: Heiroglyph;808854


Components will be built as native Amiga HUNK files, not mangled ELF.

aros build system/gcc produces elf by default, but the binary format is being converted to hunk afterwards for 68k. (elf2hunk)

Quote

Completed replacements will be comparable in performance to original AOS libraries on 68020 or higher. Support for 68000 and 68010 is IMHO optional, but I'm open to debate.

aros builds currently 68000 binaries for what i know, except what setpatch provides.

Quote

Assembly is permitted if performance or ROM size requires it, but must be accompanied by functionally identical C representations and must be kept in sync.


thats the policy anyway for what i know.

Quote

Both should be easily verifiable by setting a unique #define for each function replaced and by a define used to globally disable all assembly. This will be used for testing and verification of the C versions.

Example:
#if defined(NOASM) || defined(FUNCTIONNAME_CIMPL)
// C version of FunctionName goes here here
....
#else
// asm version of FunctionName goes here here
....
#endif


such could be discussed with the maintainers, toni and jason. i wouldnt leave aros build system and fork if possible as it makes maintenance much more difficult. ask toni.
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: RTG API replacement - Lets finally do this
« Reply #5 on: May 20, 2016, 08:06:06 PM »
I'm open to debate on anything.

My main concern was using an available, supported, open compiler that can produce Amiga binaries.

gcc is available and open, but isn't really supported on 68k, it's pretty much untested legacy code and it can't make HUNKs properly.

clang is compatible enough with gcc that many gcc-isms still build. I have no knowledge of whether clang even handles 68k.

My secondary concern was readability. Targeting the one compiler we really have left for the one platform that this project would target would make the code a lot cleaner and more predictable.

As far as I can tell, Aros uses gcc primarily to target platforms this project isn't concerned with and now they are mostly stuck with it trying to backport to 68k.

If at some point in the future this project is complete and Aros isn't, vbcc is available for other platforms if we choose to expand to them.

IMHO, it's a lot easier to port from a working and tested 68k to new platforms rather than get everything working on a new platform, then port back and hope for compatibility.
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: RTG API replacement - Lets finally do this
« Reply #6 on: May 20, 2016, 08:08:57 PM »
Quote from: wawrzon;808857

such could be discussed with the maintainers, toni and jason. i wouldnt leave aros build system and fork if possible as it makes maintenance much more difficult. ask toni.


This isn't Aros, they aren't currently involved in this project, although they are more than welcome.

I strongly disagree with the Aros development process. Although I have the utmost respect for them, will share code with them and will discuss options for compatibility, I won't work on that project directly.
 

Offline wawrzon

Re: RTG API replacement - Lets finally do this
« Reply #7 on: May 20, 2016, 08:12:10 PM »
then you will fail im afraid, because you will have to keep the sources synchronized by hand, among others. i wish you luck nevertheless and am curious how you are going to go around this and how far you get.
 

Offline wawrzon

Re: RTG API replacement - Lets finally do this
« Reply #8 on: May 20, 2016, 08:19:11 PM »
btw, the sources of afa-os, which comes closest to what you want to achieven, namely patch/replace some critical aos binaries with aros counterpparts are still within aros repository. maybe they will be of some use for you, even if severly outdated, the project itself unmaintained:
https://trac.aros.org/trac/browser/AROS/branches/trunk-AFAOS
especially they wont be compatible with the current v1 main trunk, which 68k target is based upon.
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: RTG API replacement - Lets finally do this
« Reply #9 on: May 20, 2016, 08:19:41 PM »
Quote from: wawrzon;808862
then you will fail im afraid, because you will have to keep the sources synchronized by hand, among others. i wish you luck nevertheless and am curious how you are going to go around this and how far you get.


I very well may fail, but you're at least missing some points.

This isn't a fork of Aros.
This isn't an OS.

This is a replacement RTG system for AmigaOS 3.x.
This is based on Aros.
This uses the same license as Aros.

There's no keeping the sources synchronized beyond watching for bugs we both share or code that the other team did better.

In the future, maybe the project will expand to include more AOS libraries, but for right now, it's just a 3.x 68k RTG system.
 

Offline grond

  • Full Member
  • ***
  • Join Date: Feb 2016
  • Posts: 154
    • Show only replies by grond
Re: RTG API replacement - Lets finally do this
« Reply #10 on: May 20, 2016, 08:41:57 PM »
Would this replacement library also support the custom chipset if active, i.e. do what cpu-blitting does cleanly?

And do you happen to own an a600? I think a vampire would keep the compile time low... :)
« Last Edit: May 20, 2016, 08:46:37 PM by grond »
 

Offline wawrzon

Re: RTG API replacement - Lets finally do this
« Reply #11 on: May 20, 2016, 08:43:47 PM »
Quote

This is a replacement RTG system for AmigaOS 3.x.
This is based on Aros.
This uses the same license as Aros.

thats an approach i agree with, if its feasible, that is. see my afa-os mention, and my other previous postings on such subject.

Quote

There's no keeping the sources synchronized beyond watching for bugs we both share or code that the other team did better.


currently aros rtg system contain a rather serious limitation on amiga hardware, i asked toni to fix provided a testcase. it doesnt notice when its running out of vmem and needs to swap to main memory, so opening a second screen that doesnt fit into vmem, as example, causes (partly) corrupted, unusable display even if not a crash.

that is an example of what needs to be kept an eye onto. at least this is what kept me from providing current aros binaries to vampire team for testing.
« Last Edit: May 20, 2016, 08:47:13 PM by wawrzon »
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: RTG API replacement - Lets finally do this
« Reply #12 on: May 20, 2016, 08:47:52 PM »
Quote from: grond;808867
Would this replacement library also support the custom chipset if active, i.e. do what cpu-blitting cleanly?

And do you happen to own an a600? I think a vampire would keep the compile time low... :)


That's all future features that we shouldn't deal with until it works as intended.

We'll have the source and documentation, so anything is possible.

Nope, no a600. They can send me the A4000 version any time they like though ;)

I'll probably use WinUAE for the majority of work. (I know heresy, but it's blazing fast and has a cool debugger built in)
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: RTG API replacement - Lets finally do this
« Reply #13 on: May 20, 2016, 08:52:51 PM »
Quote from: wawrzon;808868
thats an approach i agree with, if its feasible, that is. see my afa-os mention, and my other previous postings on such subject.


I thought maybe we were misunderstanding each other. We're generally somewhat on the same page about what we need for the future.

This would be a lot like AfA, but HUNK. I'm adamant about native HUNK format libraries.

Last I messed with AfaOS it had some odd exe/elf thing going on.

Quote

currently aros rtg system contain a rather serious limitation on amiga hardware, i asked toni to fix provided a testcase. it doesnt notice when its running out of vmem and needs to swap to main memory, so opening a second screen that doesnt fit into vmem, as example, causes (partly) corrupted, unusable display even if not a crash.

that is an example of what needs to be kept an eye onto. at least this is what kept me from providing current aros binaries to vampire team for testing.


Once we have something we'll definitely need your feedback since you know some Aros quirks.
 

Offline wawrzon

Re: RTG API replacement - Lets finally do this
« Reply #14 on: May 20, 2016, 08:58:45 PM »
Quote from: Heiroglyph;808870
Last I messed with AfaOS it had some odd exe/elf thing going on.


afa-os dates back to times when amiga-m68k native aros was unmaintained. there was no elf2hunk tool, which was first written by jason, when porting aros back to 68k in oder to ensure aros binaries to run on aos, so far as they dont contain aros library dependencies.