|
Register or have you forgotten your password?
|
|
|
| Amiga Software Issues and Discussion This forum exists for the discussion of the use, issues with, and fun brought about by classic and next generation Amiga software. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||||||
|
Too much caffeine
![]()
|
Hi,
After looking into programming in E, I'm considering learning C++ with intentions of either programming games for, or porting them to, 68k Amigas. (Someone I may be working on games with is already learning C++/OpenGL, so I could possibly share non-graphical code with/bug him for help) Does anyone know what sort of material I should be getting, in terms of software and tutorials? I know I'll need to find a C compiler, standard libraries, and the AmigaOS 3 APIs, and some tutorials both on C++ (easy to find, google would probably work for me here) and how to code for the APIs (much harder to find). I'll also need some sort of library for playing back ProTracker modules. Thanks, Matt
__________________
[UK] A1200 with 2GB hard drive and Apollo 1240 040/33MHz/16MB FastRAM | A500+ with trapdoor memory upgrade and A520 modulator and no battery or power supply Floppy Drive Grim Reaper and DPaint lover |
||||||||
|
|
|
|
|
#2 | ||||||||
|
Cult Member
![]()
Join Date: Aug 2007
Location: Kansas
Posts: 753
|
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.p...ic=1791&page=0 |
||||||||
|
|
|
|
|
#3 | ||||||||
|
Premium Member
|
http://aminet.net/mus/play/ptreplay_ahi.lha is what you want for playing ProTracker modules. (This archive includes MorphOS as well as AmigaOS 3.x library versions.)
-edit- http://aminet.net/package/mus/play/ptreplay66 is the original hardware-banging version BTW. Last edited by SamuraiCrow; 08-30-2009 at 11:30 AM.. |
||||||||
|
|
|
|
|
#4 | ||||||||
|
VIP / Donor
Join Date: Nov 2007
Location: Norway
Posts: 294
|
That's highly debatable. If you simply compile C sources with a C++ compiler there's no difference unless you're using a retarded compiler. C++ function objects can be inlined, while function pointers in C can not. Some sorting algorithms have proven to be many times faster on C++ due to this.
It is true that certain parts of the C++ language are slow, like using virtual functions in a tight loop. It's really a matter of knowing your language, knowing the little 'gotchas'. In my experience, the main disadvantage with C++ is slower compiling, especially when using templates. But I'm a little tired of reading "use C instead" every time someone mentions C++ on the Amiga.
__________________
Theology is just a debate over who to frame for creating reality. |
||||||||
|
|
|
|
|
#5 | ||||||||
|
Merely Curious
![]()
Join Date: Sep 2006
Posts: 14
|
I agree with Matthey about staying with C and avoiding C++ on the Amiga. If you use any part of the standard library e. g. streams, vectors, list, etc. expect code bloat. That's not a problem if you have gigabytes of memory, but on Amiga systems, we're talking megabytes.
|
||||||||
|
|
|
|
|
#6 | ||||||||
|
Sockologist
![]()
|
I use C++ on the 68k miggy all the time. It's fine, provided you know what you are doing. It's also a lot more convenient than C at times.
If you use heavyweight features like templates and RTTI, you'll get bloat, but metaprogramming and reflection aren't free. On the other hand, you can create code that is effectively "C with classes", that is both compact and fast.
__________________
OCA This isn't SCSI... This is SATA!!! I have CDO. It's like OCD except all the letters are in ascending order. The way they should be. Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64 A1XE 800MHz / 512MB / Radeon 9200 / OS4.1 A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4 A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9 A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB |
||||||||
|
|
|
|
|
#7 | ||||||||
|
Technoid
![]()
Join Date: Aug 2008
Location: Plano, Texas
Posts: 153
|
Has anyone mentioned AmiDevCpp? It's a cross-platform IDE (I can use in on WinXP), that will let you choose your target like 68k, or PPC, etc. It's pretty good, but I haven't had much time to really spend on it.
Since I'm a PC graphics guy, I don't know (or can find) anything about graphics programming on the old miggy, which is what I'm trying to do with it. Here's the link to AmiDevCpp: http://amidevcpp.amiga-world.de/inde...R_LANG=english |
||||||||
|
|
|
|
|
#8 | ||||||||
|
Premium Member
|
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).
Anyway I've been using C++ on my 1200 for a port of DOTT. I use StormC V4 which uses the GCC compiler and features an IDE with built in debugger which makes everything a lot easier. You can still buy StromC V4 new for about $50. It will take you longer to learn C++ of course, I spent a year learning straight C before I started looking at C++. |
||||||||
|
|
|
|
|
#9 | ||||||||
|
Premium Member
|
@Hayashi
What made you decide to give up E? It's not as powerful as C++ but it's as efficent as some C compilers and a LOT easier than C++. @Beast96GT What do you want to know about Amiga graphics programming? You can find out a lot by getting the Amiga Developer CD version 2.1 and looking at the graphics libraries section of the RKRMs. Last edited by SamuraiCrow; 08-30-2009 at 05:45 PM.. |
||||||||
|
|
|
|
|
#10 | ||||||||
|
Too much caffeine
![]()
|
@SamuraiCrow: A friend and I have had an idea for an RPG, which (if it ever moves out of planning) will likely be made first for Windows (and maybe Linux etc) using C++/OpenGL. If this happens, I really want to make an Amiga version (not a straight port, of course), and using the same language will of course help as we can trade core game code.
I was looking at trying to learn E, but now believe it's useless to spend time learning it when I could be learning a language that would both lend itself well to the above situation and be useful outside the Amiga.
__________________
[UK] A1200 with 2GB hard drive and Apollo 1240 040/33MHz/16MB FastRAM | A500+ with trapdoor memory upgrade and A520 modulator and no battery or power supply Floppy Drive Grim Reaper and DPaint lover |
||||||||
|
|
|
|
|
#11 | |||||||||
|
Sockologist
![]()
|
Quote:
__________________
OCA This isn't SCSI... This is SATA!!! I have CDO. It's like OCD except all the letters are in ascending order. The way they should be. Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64 A1XE 800MHz / 512MB / Radeon 9200 / OS4.1 A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4 A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9 A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB |
|||||||||
|
|
|
|
|
#12 | |||||||||
|
Technoid
![]()
Join Date: Aug 2008
Location: Plano, Texas
Posts: 153
|
Quote:
I was kid when I had my Amiga and know nothing of the architecture. I'm a very experienced C++ programmer, but I simply don't have the time to try and figure everything out from scratch with regards to the Amiga. Maybe I can make it a process, but resources are what I need--else I get frustrated and take large breaks. What can you tell me about this Ami Dev CD, and what are the RKRMs? Thanks. |
|||||||||
|
|
|
|
|
#13 | ||||||||
|
Cult Member
![]()
Join Date: Aug 2007
Location: Kansas
Posts: 753
|
@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/guidetoamig...leprogramming/ 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 |
||||||||
|
|
|
|
|
#14 | ||||||||
|
Cult Member
![]()
Join Date: Aug 2007
Location: Kansas
Posts: 753
|
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.
|
||||||||
|
|
|
|
|
#15 | |||||||||
|
Premium Member
|
Quote:
Well obviously over the years C/C++ compilers have improved massively and these days you'll improve performance more from looking at what the code is doing from a high-level rather than trying to hand-optimize algorithms (the quickest code is code you don't actually execute). I remember reading an assembler 'tuning' article which had an exercise to improve some compiler generated assembler by-hand. When I went to make the change myself, I found that my newer version of the compiler had already produced exactly the same assembler as the article suggested I wasn't talking specifically about GCC, I was talking about modern compilers C++ in general. Last edited by NovaCoder; 08-31-2009 at 05:40 PM.. |
|||||||||
|
|
|
![]() |
| Bookmarks |
| Tags |
| c++ , api , amigaos3 , amigaos apis , amiga |
| Thread Tools | |
| Display Modes | |
|
|