Programming for the Vampire In C | |
---|
|
---|
| | Andrew Miller
Posts 352 12 Aug 2018 13:30
| Can anyone point me to information on programming for the Vampire in C? Or is it sufficient to just use OS legal C to take advantage of the core? (I have Storm C V5)Thanks
| |
| | Roy Gillotti
Posts 517 12 Aug 2018 14:05
| Andrew Miller wrote:
| Can anyone point me to information on programming for the Vampire in C? Or is it sufficient to just use OS legal C to take advantage of the core? (I have Storm C V5) Thanks
|
Unless someone gets motivated, there is no C compiler that makes use of the vampire specific 64-bit features. Right now if you want to make the best use of these vampire features it will have to be done in ASM. Although that said, the vampire does run everything faster than other 68k systems...
| |
| | Andrew Miller
Posts 352 12 Aug 2018 14:18
| I'll eventually look at assembler, but for ease I think I'll start with C the general boost in performance should be epic enough at first :) Hey maybe for the V4 version they'll include already setup development tools and some tutorials.
| |
| | Roy Gillotti
Posts 517 12 Aug 2018 15:00
| Andrew Miller wrote:
| I'll eventually look at assembler, but for ease I think I'll start with C the general boost in performance should be epic enough at first :) Hey maybe for the V4 version they'll include already setup development tools and some tutorials.
|
Now that I'm not just on my phone, there is this Amiga 68k Linux cross-compuler environment that works well if you want to work on your PC. EXTERNAL LINK
| |
| | Andrew Miller
Posts 352 12 Aug 2018 15:04
| Nice, I'll have a look. At the moment I don't have a Vampire but I'm running Storm C on Amiga Forever, its at least faster than my 68040 card I had in my Amiga 1200.
| |
| | Kresimir Lukin
Posts 65 12 Aug 2018 18:27
| as I know vasm and vbcc are only assembler and c compiler what fully support apollo core
| |
| | Roy Gillotti
Posts 517 12 Aug 2018 19:12
| Kresimir Lukin wrote:
| as I know vasm and vbcc are only assembler and c compiler what fully support apollo core
|
I wasn't aware of VBCC, any more info on this?
| |
| | Kresimir Lukin
Posts 65 13 Aug 2018 05:46
| this is link, but at the moment page is down, I hope it will be fixed soon EXTERNAL LINK you can have some info here as wellEXTERNAL LINK
| |
| | Ronnie Beck (Apollo Team Member) Posts 199 13 Aug 2018 07:04
| It is typically hard to take advantage of low level CPU instructions from high level languages like C, without integrating some inline assembler or linking against a library that has already been optimised with those instructions. Even using a compiler which is optimised for the Apollo Core and AMMX will not yield the same results as custom written assembler. That said however, depending on your project, you may or may not find libraries which have already optimised with AMMX. One such example is the SDL library which had some optimisation: EXTERNAL LINK Using a library which is already optimised might be much easier than trying to cut your own ASM code and will for sure bring a performance boost. But you don't need to always use AMMX to harness the power of the Vampire boards. The raw processing power of the Apollo Core will also yield some benefits without any assembler language. But let me not discourage you from using assembler at all.
| |
| | Renee Cousins (Apollo Team Member) Posts 142 18 Aug 2018 01:50
| Andrew Miller wrote:
| Can anyone point me to information on programming for the Vampire in C? Or is it sufficient to just use OS legal C to take advantage of the core? (I have Storm C V5) Thanks
|
The short path to success (and how most embedded compilers do this), it to have a bunch of inline assembler code that's specific for each AMMX instruction. In most cases the high-level nature of C does not lend itself to leverage very niche instructions like AMMX (or MMX, or SSE, etc.). Honestly, getting a C compiler to unroll loops and intelligently generate vectored instructions would be the holy grail of compiler design.Next step is to build a set of libraries that leverage AMMX. For example, stuff like matrix multiplication, texture-fill, FFT, etc. The put all this into a shared library like 68080.library, or something.
| |
|