 |
Welcome to the Natami / Amiga ForumThis forum is for AMIGA fans interested in the new NATAMI platform.
Please read the forum usage manual.
|
Welcome to the Natami lounge. Meet new AMIGA friends here and enjoy having a friendly chit chat. |
| AROS On the NatAMI | page 1 2 3
|
|---|
|
|---|
Jason S. McMullan USA
| | Posts 35 29 Sep 2011 22:06
| Opened a new thread to talk to people about the state of AROS m68k, and what is needed for it to support NatAMI.
| |
Guillaume Michalakakos France
| | (MX-Board Owner) Posts 454 29 Sep 2011 22:33
| Good idea Jason :-) Of course, there will be a need for a 050.library, a new graphic.library who will take advantage of SAGA and certainly a new and enhanced scsi.device... Perhaps we could start with a list of what is actualy implemented on AROS 68k...
| |
Samuel D Crow USA
| | (Natami Team) Posts 1295 29 Sep 2011 23:12
| @Gui SCSI.device has been replaced by ATA.device in current versions of AROS. @Thread Hopefully the changes Mike Ness made to LLVM for AROS-Clang will someday trickle down to the NatAmi since we're both team members at this point. Let's not worry about optimizations at this point with regards to compilers.
| |
Matt Hey USA
| | Posts 734 30 Sep 2011 00:39
| Guillaume Michalakakos wrote:
| Of course, there will be a need for a 050.library, a new graphic.library who will take advantage of SAGA and certainly a new and enhanced scsi.device... |
A 68050.library probably wouldn't be needed unless using the FPU. There shouldn't be very many missing integer instructions. The AROS (ide) scsi.device/ATA.device should be looked into for adaption to Natami dma modes. Samuel D Crow wrote:
| SCSI.device has been replaced by ATA.device in current versions of AROS. |
The renaming will likely cause compatibility problems with some poorly written programs. Below is continued from this thread... CLICK HERE Jason S. McMullan wrote:
| Matt Hey wrote:
| Who's code is the AROS 680x0.libraries based on? Isn't this in 680x0 assembler? |
It's from Motorola, with a BSD style license. Toni Wilen added the integration code. |
Engineers only think they know how to program 8). Maybe Thomas Richter could donate the support code from his CPU libraries. They are faster, less buggy and better adapted to the Amiga than the ones from Motorola/FreeScale. Jason S. McMullan wrote:
| AROS (in general) supports OpenPCI, but I have not implemented chipset specific PCI support for m68k yet (I'm waiting on a new CPU card for my A4000 to code something up for the Mediator). |
Do you mean that AROS provides an OpenPCI compatible interface/library or that AROS uses the existing OpenPCI.library? Are you a developer for the Mediator? Would the support be through the Elbox pci.library or the OpenPCI.library? Jason S. McMullan wrote:
| Matt Hey wrote:
| That brings us to the point of GCC and it's horrible optimization. It gets worse with each new version. Does AROS compile with vbcc? AROS will probably never catch on for 68k using new versions of GCC. GCC 2.95.3 produced good 68k code but it's not very compatible to new GCC versions. |
Unfortunately, no, AROS does not compile with vbcc (and I tried!). However, most of the 'performance' problems are due to our multi-platform graphics subsystem. Direct chipset support for AGA/ECS/OCS that uses the blitter is not as well integrated as I would like, although I have some ideas to speed up some of the common cases. |
Have you tried the new vbcc 0.9b? It has better C99 support now. Frank Wille has said he will add support for the N680x0 in his vasm assembler (used in vbcc). ColdFire optimizations already exist for it and could be done without support in vbcc itself. Frank provides great support if you can give details on what you need in AROS. The GCC developers are just not interested in supporting the 68k or Amiga and it shows. This leaves vbcc and LLVM/Clang (when it gets 68k support) for cross platform compiling.
| |
Jason S. McMullan USA
| | Posts 35 30 Sep 2011 03:29
| Matt Hey wrote:
| Do you mean that AROS provides an OpenPCI compatible interface/library or that AROS uses the existing OpenPCI.library? Are you a developer for the Mediator? Would the support be through the Elbox pci.library or the OpenPCI.library?
|
/me digs... I am mistaken, they have their own thing. But writing an OpenPCI.library shim on top of it should be trivial. Although I am not an official Mediator developer, I do have one, and once my A4000 is running, I should be able to figure out how they've set up the PCI interface. The only 'hard' part about most 5v PCI chipsets is figuring out how to generate config cycles and map IRQs. Everything else is just address mapping.
Matt Hey wrote:
| Have you tried the new vbcc 0.9b? It has better C99 support now. Frank Wille has said he will add support for the N680x0 in his vasm assembler (used in vbcc). ColdFire optimizations already exist for it and could be done without support in vbcc itself. Frank provides great support if you can give details on what you need in AROS. The GCC developers are just not interested in supporting the 68k or Amiga and it shows. This leaves vbcc and LLVM/Clang (when it gets 68k support) for cross platform compiling.
|
Given the HUGE number of GCCisms that AROS uses, I think LLVM/CLang is a more likely candidate. I did the exercise to try to get AROS to compile under vbcc, but I saw little significant difference in the generated code between it and gcc in what I was able to get to compile. Given the number of changes required to both AROS and vbcc to get AROS to compile under vbcc, I saw little reason to continue that project. If someone else wants to take up the reigns and pick up where I left off, I still have my patches against vbcc to make things a little easier. My AROS patches have long since been made unusable by code changes.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3976 30 Sep 2011 08:48
| Well i'll shall be straight to the point in the boot sequence the natami needs PCI to run before IDE can be accessed this gives some security.(old software will refer to SCSI not to PCI) This difference IMHO opinion is enough to make branch project for the ROM at least.(keeping it clean for both platforms) as for what is the best compiler to port AROS i am not gonna stick my neck into that one. ;)
| |
Matt Hey USA
| | Posts 734 30 Sep 2011 09:28
| Jason S. McMullan wrote:
| /me digs... I am mistaken, they have their own thing. But writing an OpenPCI.library shim on top of it should be trivial. |
OpenPCI.library already is a "shim" to pci.library (Elbox), prometheus.library, cybpci.library (GRex), and powerpci.library (Amithlon). It opens these libraries and uses them while providing a standard interface to them instead of banging the PCI hardware. Why not ask Benjamin Vernoux if he will donate his code to AROS if you are going to do the same thing? His Amiga was broken the last I heard but he has been cooperating and communicating with Amiga users that contact him. Will OpenPCI drivers work under AROS? If I were to adapt OpenPCI P96 gfx drivers, would they work under AROS RTG? Jason S. McMullan wrote:
| Although I am not an official Mediator developer, I do have one, and once my A4000 is running, I should be able to figure out how they've set up the PCI interface. |
That would give me, and other Mediator owners, more incentive to try, develop for and support AROS. Jason S. McMullan wrote:
| Given the HUGE number of GCCisms that AROS uses, I think LLVM/CLang is a more likely candidate. |
Don't compiler specific requirements violate the portability and concepts of C and AROS? Jason S. McMullan wrote:
| I did the exercise to try to get AROS to compile under vbcc, but I saw little significant difference in the generated code between it and gcc in what I was able to get to compile. Given the number of changes required to both AROS and vbcc to get AROS to compile under vbcc, I saw little reason to continue that project. |
The newer 4.x GCC code I see still replaces the A6 library base before every library call, thinks bit field instructions are to be used everywhere possible (almost true for N680x0 and 68040), has no clue about basic 68k scheduling or peephole optimizing, loves to generate stack frames no matter what setting and does a lousy job of register utilization. The latest GCC code I see now sometimes does this... move.l #xxx,d0 move.l (a0,d0.l),d1 instead of... move.l (xxx,a0),d1 That's 2-8 cycles (bubble possibly introduced), 5 words of code and 3 registers used vs 1 cycle, 2 words of code and 2 registers used on the 68040+. That's acceptable to the GCC developers as long as it works. Vbcc's 68k code generation needs some work too but it does get peephole optimizations correct and has good register utilization while avoiding the fluff/bloat that GCC code generates. Jason S. McMullan wrote:
| If someone else wants to take up the reigns and pick up where I left off, I still have my patches against vbcc to make things a little easier. My AROS patches have long since been made unusable by code changes. |
While I can read and code some with C, I am no C expert. I find C compiling a frustrating and awkward experience on the Amiga. I can generally disassemble, fix and reassemble programs in less time than I can get them to compile correctly :/. The 68k Amiga assembler code looks more portable that the C to me because it works without changes on the next generation Amigas 8).
| |
Jason S. McMullan USA
| | Posts 35 30 Sep 2011 13:45
| On thing to note - AROS m68k is compiled (by default) with -m68000, so that the same binaries can run on all supported machines. Yes, this make it (slightly) slower for all the non-m68k builds, but considering the MASSIVE room for improvements in the graphics.library, it's not noticeable due to the slowness of the UI. We do not yet have the resources (build and testing) to do per-CPU builds, which would achieve a number of the optimizations you are looking for. What *would* greatly help is an open-source version of graphics.library that is optimized for the Amiga. Provide that, and Toni and I will be deeply in your debt.
| |
Wojtek P Poland
| | Posts 1597 30 Sep 2011 14:09
| Matt Hey wrote:
| move.l #xxx,d0 move.l (a0,d0.l),d1 instead of... move.l (xxx,a0),d1
|
The funny part of gcc is that isn't actually better even on their main target (x86) than older versions except special cases, and generates usually larger code.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3976 30 Sep 2011 14:18
| On a classic the UI is checked every NOT vertical sync. This means the machine state is stable during each V blank.This means we are both limited in type rate and scroll distance per second. Then again this is no very interresting, does anyone know anyone who can type faster then 1/60 (1/50 PAL) of a second? The above is only interresting when you have a high resolution even then the classic system caught the overrun in software. For the natami this will be interesting with USB 1200DPI mouses and high resolutions.(nudge, nudge, bigger registers saves ya from overruns) Back to topic, Jason it is a correct method with the current state of the hardware to support most important cpu's in a single build.(frankenstein amiga's all around)
| |
Matt Hey USA
| | Posts 734 01 Oct 2011 01:30
| Jason S. McMullan wrote:
| On thing to note - AROS m68k is compiled (by default) with -m68000, so that the same binaries can run on all supported machines. |
Are there masochists that try to run AROS on 68000? I would think a 68020 target would be a better base as it has most of the improvements used in later CPUs and it's 32 bit at least. Would AROS lose more users from not supporting 68000 (for now) or from too slow of 68020+ code? 68000 is ok for now. Jason S. McMullan wrote:
| Yes, this make it (slightly) slower for all the non-m68k builds, but considering the MASSIVE room for improvements in the graphics.library, it's not noticeable due to the slowness of the UI. |
Yea, fix or upgrade the algorithms first. Better compilers may come in the future. The AmigaOS uses mostly SAS/C with some of it still compiled for 68000 and has good performance. Of course, SAS/C and GCC 2.95.3 probably produce the best code on the Amiga. Jason S. McMullan wrote:
| What *would* greatly help is an open-source version of graphics.library that is optimized for the Amiga. Provide that, and Toni and I will be deeply in your debt.
|
Is the AROS graphics.library mostly bug free and the way it needs to be for chunky 16/24/32 gfx? Should planar gfx support go in the graphics.library? Where should ECS/AGA/SAGA hardware banging go (graphics.library, P96 .chip drivers, etc)? Is there a bit defined in the bitmap structure for chunky or planar detection like BMF_USERPRIVATE in P96 and BMF_SPECIALFMT in CGFX (should be bit 7, 15 or 31 for speed)? Does the AROS layers.library support planar? It may be premature to make an optimized version with planar support but I have an idea how I would do it to keep it "open source". It's a pretty big project though. I'll look into AROS some more and think about it but I have some other projects too.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3976 01 Oct 2011 04:38
| Matt Hey wrote:
|
Jason S. McMullan wrote:
| On thing to note - AROS m68k is compiled (by default) with -m68000, so that the same binaries can run on all supported machines. |
Are there masochists that try to run AROS on 68000? I would think a 68020 target would be a better base as it has most of the improvements used in later CPUs and it's 32 bit at least. Would AROS lose more users from not supporting 68000 (for now) or from too slow of 68020+ code? 68000 is ok for now.
|
Matt just because i use a A500 doesn't make me a Masochist. ;)
| |
Jason S. McMullan USA
| | Posts 35 01 Oct 2011 05:49
| Matt Hey wrote:
| Is the AROS graphics.library mostly bug free and the way it needs to be for chunky 16/24/32 gfx? Should planar gfx support go in the graphics.library? Where should ECS/AGA/SAGA hardware banging go (graphics.library, P96 .chip drivers, etc)? Is there a bit defined in the bitmap structure for chunky or planar detection like BMF_USERPRIVATE in P96 and BMF_SPECIALFMT in CGFX (should be bit 7, 15 or 31 for speed)? Does the AROS layers.library support planar? It may be premature to make an optimized version with planar support but I have an idea how I would do it to keep it "open source". It's a pretty big project though. I'll look into AROS some more and think about it but I have some other projects too.
|
AROS has a built-in CGFX support and OCS/ECS/AGA planar support, with some blitter acceleration for AGA/ECS/OCS copybox. We're missing quite a bit though for planar fast blits, so a lot of operations end up going through the software stack. AROS graphics is built upon oop.library, by the way.
| |
Rune Stensland Norway
| | (MX-Board Owner) Posts 871 01 Oct 2011 17:48
| Does AROS work without a FPU? We have some very sexy prototype boards with 060LC CPU's that lacks a FPU... EDIT: I saw that AROS m68k is compiled (by default) with -m68000 So I guess a FPU is not needed..
| |
Matt Hey USA
| | Posts 734 02 Oct 2011 00:26
| Rune Stensland wrote:
| Does AROS work without a FPU? We have some very sexy prototype boards with overclocked 060LC CPU's that lacks a FPU...
|
I think the better question is if AROS will detect that there is no FPU in the 060 and set the ExecBase->AttnFlags correctly (!AFB_FPU40). Some programs may have problems with a 68060 without FPU anyway.
| |
Rune Stensland Norway
| | (MX-Board Owner) Posts 871 02 Oct 2011 08:21
| I know that Linux for Mc680x0 has a built in FPU emulator. Also MAC OS for Mc680x0 have the same. I believe I can can rip the binary assembly code and wrap it into an Amigaos/AROS patch if I get it running. Line_F Interrupt Vectors are found on VBR relative adresses in memory, so all i need is a level7interrupt triggered dbugger with memory dump/assembly editor. But I also need a working linux distribution with the fpu patch enabled... But Linux is opensource, So Perhaps the C code for the FPU emulator is out there somewhere...
| |
Jakob Eriksson Sweden
| | (Moderator) Posts 1097 02 Oct 2011 09:42
| EXTERNAL LINK Don't know how relevant, but it's a starting point.
| |
Matt Hey USA
| | Posts 734 02 Oct 2011 13:01
| Generate an interrupt for every FPU instruction and then do the instruction in software? Yikes, that would be slow! That's why C= decided to use the math libraries. At least it avoids the trap. Another option would be to modify ThoR's MuRedox to replace all FPU instructions before the trap. The FPSP package (in 68060.library or AROS) already has code for missing 68881/68882 instructions and could be expanded for all FPU instructions. The fpsp.resource may need modifying too. This would be faster but still slow. Adding an FPU in the fpga and then patching the fpsp.resource (and maybe FPSP) to use it would provide a nice speedup for a MuRedox style solution as well as speeding up the math libraries which a lot of Amiga programs use. It's a lot of work to add that missing FPU support and get it working correctly. Personally, I have a 2nd Rev 6 68060 with full FPU and MMU waiting for my Natami here ;). I'll gladly give up a few MHz for the FPU and MMU.
| |
Gilles DRIDI France
| | Posts 107 02 Oct 2011 13:34
| Matt Hey wrote:
|
Jason S. McMullan wrote:
| On thing to note - AROS m68k is compiled (by default) with -m68000, so that the same binaries can run on all supported machines. |
Are there masochists that try to run AROS on 68000? I would think a 68020 target would be a better base as it has most of the improvements used in later CPUs and it's 32 bit at least. Would AROS lose more users from not supporting 68000 (for now) or from too slow of 68020+ code? 68000 is ok for now. Jason S. McMullan wrote:
| Yes, this make it (slightly) slower for all the non-m68k builds, but considering the MASSIVE room for improvements in the graphics.library, it's not noticeable due to the slowness of the UI. |
Yea, fix or upgrade the algorithms first. Better compilers may come in the future. The AmigaOS uses mostly SAS/C with some of it still compiled for 68000 and has good performance. Of course, SAS/C and GCC 2.95.3 probably produce the best code on the Amiga. Jason S. McMullan wrote:
| What *would* greatly help is an open-source version of graphics.library that is optimized for the Amiga. Provide that, and Toni and I will be deeply in your debt. |
Is the AROS graphics.library mostly bug free and the way it needs to be for chunky 16/24/32 gfx? Should planar gfx support go in the graphics.library? Where should ECS/AGA/SAGA hardware banging go (graphics.library, P96 .chip drivers, etc)? Is there a bit defined in the bitmap structure for chunky or planar detection like BMF_USERPRIVATE in P96 and BMF_SPECIALFMT in CGFX (should be bit 7, 15 or 31 for speed)? Does the AROS layers.library support planar? It may be premature to make an optimized version with planar support but I have an idea how I would do it to keep it "open source". It's a pretty big project though. I'll look into AROS some more and think about it but I have some other projects too.
|
There's no need to think bottom-up again except for graphics.library optimisation that could be done later. I think you forgot to think about C++ which "improved" C or a better "C", like ComeauC++ or Cfront1.0 C++(available on the net) which is the same, I think, that what happens to BCPL code. [But I'm really evaluating BCPL from a Virtual machine based language for AmigaDOS kind of Objective-BCPL!] Seriously, I've done work on ExecC++ and I think AROS has already done this with Exec or on the RoadMap : not saw the AROS code. Please consider a basic C compiler, like SAS and a better "C" for a programer (coder?) perspective as a Cfront1.0 with no template and no Exception (multiple heritage is 2.0). Here's my contribution but in France and reworking must be done even it respect 680x0 ins/data alignment using _struct_ intead of _class_ when needed (no virtual table pointer). EXTERNAL LINK Sincerely, Gilles DRIDI - technician
| |
Rune Stensland Norway
| | (MX-Board Owner) Posts 871 02 Oct 2011 16:07
| The team has startet to implent a compatible fpu in hardware, but the first n050 will be without it. TraPping all fpu instructions will be slow, but it works. But I doubt it will be worrh the effort...
| |
|
|
|
|