Welcome, Guest. Please login or register.

Author Topic: C++ on Amiga  (Read 14926 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show all replies
Re: C++ on Amiga
« on: August 30, 2009, 05:53:57 PM »
You should head over to http://www.utilitybase.com for help. I would recommend staying with C on the Amiga although GCC supports C++ on the Amiga. C++ is rarely used on the Amiga and it's slower. GCC is a major pain to set up on the Amiga. VBCC is a light weight Amiga compiler that is much easier to work with on the Amiga but does not support C++.

VBCC is here...

http://sun.hasenbraten.de/vbcc/

GCC is from the GeekGadgets CD on backtoroots.org (good luck!)...

http://geekgadgets.back2roots.org/

You should have the ROM Kernal Reference Manuals for documentation. The Libraries is the most important. They can be found on the internet. They are not updated past AmigaOS 2.x. You should have the latest SDK for AmigaOS 3.9. It can be found here...

http://aweb.sunsite.dk/download.php

That might get you started. It's not easy developing in C on a low end classic Amiga. There is some ide's available that help like this...

http://devplex.awardspace.biz/

or Murk's (free) may work already...

http://utilitybase.com/forum/index.php?action=vthread&forum=3&topic=1791&page=0
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show all replies
Re: C++ on Amiga
« Reply #1 on: August 31, 2009, 06:49:59 AM »
@Beast96GT

RKRM stands for ROM Kernal Reference Manual. Libraries and Devices are the most important ones. Look here for more...

http://gega.homelinux.net/AmigaDevDocs/

Also get the SDK for 3.9 from the AWeb site I listed above and look at the autodocs.

Here is a guide to setting up an Amiga C programming environment...

http://code.google.com/p/guidetoamigacompatibleprogramming/

Warp3D developer archive...

http://aminet.net/dev/misc/Warp3DDev-4.2a.lha

StormMesa developer archive...

http://aminet.net/util/libs/StormMesa_Dev.lha

Info on developing in 3D on Amiga...

http://vague.lorraine-design.com/the_vague_1.html
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show all replies
Re: C++ on Amiga
« Reply #2 on: August 31, 2009, 07:13:46 AM »
Quote from: NovaCoder;521543
Yep I think the idea that C++ is slower is not accurate these days, it's similar to the idea the C is slower than assembler (modern compilers produce very efficient assembler).


C IS slower than assembler. GCC's code optimization is a joke. Why is ffmpeg for the 68060 twice as fast with a few assembler routines compared to all C routines? I don't know much about C++ compared to C but I have seen too much assembly output from C programs to believe C is as fast as assembler. Plus I can beat it 95% of the time with assembler.
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show all replies
Re: C++ on Amiga
« Reply #3 on: September 01, 2009, 12:26:11 AM »
@NovaCoder

C optimizing is getting better but it's not there yet with GCC 68k. GCC will do a pretty good job on some things and then add a nop or exg d0,d0 in there. I've been debugging Warp3D lately to try and fix a bug and I keep seeing those darn exg d0,d0. The wasted instructions even make for difficult reading. I wan't to fix everyone of them. For all the poor code, GCC code amazingly rarely crashes. The newest versions of GCC are worse at optimizing than the older versions by the way. I wouldn't be surprised if VBCC and SASC generate better code.
« Last Edit: September 01, 2009, 12:32:46 AM by matthey »