Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
45 user(s) are online (40 user(s) are browsing Forums)

Members: 0
Guests: 45

more...
Support us!
Recent OS4 Files
OS4Depot.net



(1) 2 »


Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
Hi All

I posted this on Utilitybase a day ago because I thought it was the place to go for advise but ended up with a post from OldFart that didn't exactly help me... So... serious feedback please...

And yes, I'll make it plain... I'm not interested in porting or coding for any other OS or imitation OS other than AmigaOS4.x

-------------------- original post -----------------------

Ok, the time is getting close when I want to pick up a book and starting learning the process of logic sequence etc etc etc...

Would I serve AmigaOS4 development better if I was to start back at the beginning with say SAS/C or just an ANSI C book and the SDK for AmigaOS4...

And no if I have a choice I wouldn't want to program anything to run belowe AmigaOS4.x but that doesn't mean to say I'm not below going back to the start if it'll help me in the long run...

I've done heaps of compiling with gcc but generally I'm only porting unix code and mostly all old Mud Codebases... but I'm thinking just because gcc and it's config scripts make things easy for me I'm not afraid to leave it all behind and start from scratch with say VBCC etc...

knowing what you know now and thinking about coding only for AmigaOS4.x and not at the slightest interested in backward compatiability... what would you do? where would you start? what would you read first? and what compiler/coding packages would you use?

Please some serious input, what you say now could influence the future

Thanks for any serious thoughts, suggestions or/and insight...

-------------------------- end ----------------------------

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Supreme Council
Joined:
2006/11/16 19:25
From Sweden
Posts: 3145
@Slayer

It all depends on your current knowledge in programming. If you already know C programming and are used to dig around API documentation then what you need is:

- the SDK package (And use GCC)
- a way to edit code like notepad*
- the sdkbrowser to browse the amigaOS api documentation
- access to the RKRM's to read up on some basic amigaOS concepts
- join a group of amiga programmers, such as the IRC channel #amigadev
- a huge amount of patience**

If you have no knowledge of C programming then you'd need to get some C programming books before you start with AmigaOS specifics.




* You could go notepad only but I would recommend CodeBench which is a very good IDE made by Simon Archer (Rigo). Far easier to keep track of all files in your project(s) and less frustrating than having to load all files with notepad every time you have to reboot.

** You'll find that a lot of AOS documentation is crap, is outdated, contains invalid information or leaves out important concepts that you need to know beforehand. You'll also have to get used to rebooting A LOT. And you should be prepared to get a lot of "go read the documentation" rather than direct help from existing developers.

_________________
Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
@orgin

Thanks for your input

In hindsight yes I should have stated I couldn't code a bean

I do not mind be pointed towards documentation... I live and breath by and still stand by the concept 'if it has a manual, I can operate and/or understand it' One of the biggest advantages I have in a sense is if I read something I don't understand at the time I believe that is quite all right because once you start actually putting it to use you suddenly realise what it all means

I have many programming books, alot of the abacus series and the bible of programming reference books...

All I really want to know is where should I start given my desired path... to become a competent AmigaOS programmer where do I have to begin?

From the very very beginning or?

Should I just learn universal ANSI C and THEN look at the Amiga?

Should I perhaps pick a mudcode base I really like programmed in C and work on it as a project to learning and using C?

I'm in now rush to produce software, I just want to learn properly etc...

Put it this way... perhaps one day I want to contribute to AmigaOS4.x

but since AmigaOS4.x is running on modern hardwar, should I bother programming for the older Amiga Systems? to get a better understanding of AmigaOS4.x or would that be just beneficial in group hashing brain storming sessions?

Perhaps not having that history could provide me with a fresher look? or perhaps there already exists far too many with that perspective already...

If I don't get any real direction I'll probably just settle for learning ANSI C and using gcc but if there is a better route to my objective that will work and allow me to grow as a firm contributor in the future then please someone! light the path!

ALSO PLEASE NOTE: I do not want any advice to look at another language or similair... thanks for your restraint...

Oops I just re-read your post, you mention if I don't know C I should just start to learn it... ok nod

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Supreme Council
Joined:
2006/11/16 19:25
From Sweden
Posts: 3145
@Slayer

Start with ansi C to learn the basic concepts of programming. Stick to the SDK and GCC. Using Codebench is still helpful even though you probably won't do any big projects in a while.

Once you get a feel for it you can slowly move into the AOS api's.

_________________
Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2149
@Slayer

Learn plain C first. This can be done on any platform. When you get the hang of it, then start learning Amiga specific stuff. I'd recommend the same regardless of which OS you're working on.

Also, I recommend sticking to GCC. I see no benefit to using VBCC unless you're used to it. Plus, VBCC doesn't have C++ support, and that's going to matter further down the track when you want to do Object Orientated Programming (OOP). OOP makes working on larger projects much easier.

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
Thank You Guys

I'm happy now

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1648
@Slayer

Quote:

Plus, VBCC doesn't have C++ support, and that's going to matter further down the track when you want to do Object Orientated Programming (OOP). OOP makes working on larger projects much easier.


Just so you know, if you intend to learn C++ then it's not recommended or considered an advantage to learn 'plain' C or any other low level programming for that matter before learning C++ as it's too much of a different language than C for that. If you intend to go the C++ route it's better if you just pick up a C++ book as it will teach you everything you need to know about C++ and you won't have any useless (for C++) C baggage slowing you down.

   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Home away from home
Joined:
2006/12/2 3:55
From Italy, Perugia
Posts: 3125
@Slayer

I'm in a similar situation, so i decide to contribute a little more learning a bit, if you can accept suggestions, before starting learning complexing language from scratch take a look at this excellent SpotUp Guide

http://os4depot.net/index.php?functio ... ment/manual/spots-pfd.lha

No one IMHO start programming directly, often young developers start learning how to port various little things, then bigger apps etc .. they build an experience with the compilators, configure files etc ...

   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
@salass00

I've heard of this outlook; the book I did try working through until I hit a chapter I couldn't get past at that time was designed to teach you ANSI C but with the route of C++ in mind to make the transition easy or easier...

If what you say is true, exactly in reality does this mean? Is there a stepper learning curve or worse documentation OR? I dunno, I'm trying to also understand why there are just as many arguements against learning C++ as there are yours from your point of view...

I have compiled C++ mud codebases as well...

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
@samo79

Thanks for that Samo79 but Spot and I have had dealing before in emails even with him sending me his guides directly... and yes, I found his works helpful in getting some mud codebases configured right...

after a while if you keep at it you get to recognise similair things like particular headers missing and replacing %ld with now I can't remember LOL

but I really want to stop all the hit and miss and actually start learning so I can be one of the ones problem solving someone elses problem... besides, that's what I'm better at

It seems I'm destined to learn C and not C++ but I am willing to listen... always better to listen than be stubborn...

except in the case of red verses blue etc etc... there is only one AmigaOS *cackle*

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1648
@Hans

I'd recommend VBCC over GCC for these reasons:
- It's amiga native
- It's easy to setup and use
- It has all sensible compiler warnings enabled by default (with GCC you have to remember to use -Wall switch which also enables also some very stupid ones like the double parenthesis thing)
- Better m68k/ppc code generators
- Crosscompiling for all Amiga-like OSes except AROS available on all targets
- You can send bug reports to Frank Wille/Volker Barthelmann and they are usually handled very quickly

Only advantage I can see with using GCC is if you're porting stuff from Linux or other Unix-like OSes. For Amiga native code you can just as well use VBCC, and it's not like switching from VBCC to GCC later if needed is very hard to do.

   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1648
@Slayer

The problem with learning plain C before C++ is that you will also learn some practices that you will have to unlearn later when starting with C++.

Personally I'm a C programmer so I am of course partial to that choice. I've read some C++ books but this language didn't really seem like my thing. I actually went the other way around and learned C++ on PC first and then changed to plain C later as I started programming for AmigaOS.

   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
@salass00

Yes I've heard that and understood it too...

I think you're just covering the bases in this regards because Hans brought uup the C++ scenario and also, it's not always that difficult to unlearn something if you remember why its done this way now (given these circumstances) and if you have a mind built on acceptance (not so much linear reasoning) then it could be even fun to have to remember where this is now relevant and then it isn't

I will stick with plain ANSI C...

and I am certainly not going to program for any other platform in my lifetime...

I'm 43 now... I hope to have a suitable understanding of the C language by the time I'm 45... then I hope to be able to program suitably for AmigaOS specifically coming up to 50... then I hope to program for 20 years with a useful place somewhere in the world of AmigaOS programming LOL

That might be generous amounts of time? but I'm in no hurry

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Supreme Council
Joined:
2006/11/16 19:25
From Sweden
Posts: 3145
@Slayer

It's personal really, I'm doing c++, c, java amongst others and are able to switch between them without problems. Switching between thinking OO or not has never been a problem for me.

That said, amiga programming is usually done in C. Basically all examples you'll get in contact with from the SDK and RKRM's are written in C and most devs you'll run into know C.

You may also run into some dev tool related problems if you try using c++ for amigaos programming.

Without me having any personal preference for either I'd still recommend you to learn C for amiga programming.

_________________
Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
@orgin

Can't think of a better arguement to keep it personal and sensible... I think we can safely say that we've established C as the clear winner for me to begin with...

I'm very grateful for everyones input and I'll be happy to carry on discussing and listening to anything else that the thread brings with it...

Hoping in due time I'm not too annoying when I argue a point only discover I don't know enough, I'm hoping I have sense enough to have an adequate percentage of i's dotted and t's crossed before I stand behind my trails of thought

Thanks All!

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2006/12/2 0:35
From Sydney
Posts: 683
@Slayer

My eldest son has a saying that "it takes ten years to become an expert in anything", and I think it's fairly accurate.

I started with FORTRAN back in the 60s, then Algol, C64 assembler and finally C when I got my first Amiga in 1987. At that stage I was mainly an assembler programmer and the C language was a real eye-opener. Fancy being able to write re-entrant code without thinking about it!

I used SAS/C (I still use the "se" editor) and only changed over to using gcc when I had to produce PPC-native code for OS4.

Rigo's Codebench is a great help and I can recommend it. Unfortunately the OS support for debugging (gdb) is limited to user processes (it's not much use when you are debugging a driver or OS component). That shouldn't worry you, though.

Download the OS4 SDK, read the Examples and write yourself some simple "Hello, World!" apps (eg open a window and print it in the window). There are many people around here who can help you with the lack of documentation.

Good luck!

_________________
cheers
tony
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Just can't stay away
Joined:
2007/10/25 9:21
From Gothenburg / Sweden
Posts: 1175
@Slayer

Coders are always welcome. I wish you good luck in learning C :)

   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
@Kicko

Thanks!

@tonyw & all

exactly why is gdb next to useless?

back in the day when I used to haunt the gcc mailing lists (I miss those days actually) with 2.95.3 out etc and Gunther Nikl working his magic with 3.x and me harassing them with lame enquires...

I remember gdb has always been useless! and I remember AmigaOS didn't support the dropping of core files?

apart from me running some mud codebases through it (it solved an annoying problem with some circlemud distributions which would freeze randomly) I'd control-c into the window then type continue and the mud would start running again with x amount of missed pulses or ticks etc... heartbeats if you like... years later it was suggested it was an incompatiable wait() function that was the culprit...

Anyway, I'm sure someone has explained this to me before *whistle* but is it just our kernel that makes porting gdb with all its bells and whistles across an impossibility?

Thanks! for any insight

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2010/5/16 11:20
From Grimsby, UK
Posts: 950
@Slayer

I hope to get into some C programming myself again when the X1000 is released although I have experience.

When I first learnt programming I was like 10yr programming in BASIC on a Spectrum 48k and the BASIC language lead me slowly into other fields such as AMOS and AMOS Pro and then as the internet era dawned I moved into HTML, Perl and Javascript and probably could do with understanding what PHP and ASP are for.

I digress... if you really have no code experience I would straightaway suggest purchasing an IDE of some flavour as being able to keep multiple files open at the same time is apart of C life and even if you don't need this functionality from day one you soon will if your interested enough to continue.

1. Start with printf and basic math operations.

2. Understand how to declare variables and how to test their value using if...then..else..end if structures.

3. Learn how to branch code correctly to create loops; eg. add +1 to a value until it reaches 10 then exit the loop.

4. Strings and manipulation. Learn how to define strings, find out their length and then how to pick out a single letter from a string and print it to the screen.

5. Strings and manipulation. Learn more string operations fore-instance how to print the second word from a string or take the last word. Reverse the string, change to upper case or lower case. How to join strings together.

Once your competent at the above:

6. User text input. Fore-instance ask the user for his name and print it to the screen and tell them how many words and letters are in their name. If your being adventurous ask the user to enter as many positive numbers as he wants adding them up on the way and exit the loop when the user enters nothing and show the total number.

7. Learn what an array is and how to declare one and access the data inside, and how to change a value inside an array.

8. Finally learn how to create a function and pass values to it and why we create functions in the first place.

Then move onto multi-dimensional arrays.... have I lost you yet? \o/

ONLY once have you mastered the above which apply to all languages should you move onto creating windows, gadgets, understanding pointers, I/O operations and everything else.

I'll stop there. :)

   Report Go to top

Re: Wanting to start coding for AmigaOS4.x from scratch
Quite a regular
Joined:
2008/3/11 8:29
From Dunedin, New Zealand
Posts: 868
@djrikki

And I was trying to sneak off to bed clear minded (it's midnight here) LOL

I must say regardless of whether it is exactly 100% I must say it's concise and certainly believable... I'll be taking this onboard... I do not wavier at the thought of repeating the prior to make the latter easier to understand...

thanks for your energy and suggestions and measured insight

_________________
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
   Report Go to top


(1) 2 »



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project