Amiga.org
Amiga computer related discussion => General chat about Amiga topics => Topic started by: Super TWiT on May 02, 2010, 04:07:33 PM
-
I want to program the amiga in assembly and learn how to take advantage of the custom chip features. What should I get as far as learning material and software (the cheaper the better!) I have an amiga 500.
-
I want to program the amiga in assembly and learn how to take advantage of the custom chip features. What should I get as far as learning material and software (the cheaper the better!) I have an amiga 500.
PhxAss (http://pb-owl.de/~frank/phxass_e.html) is free. To use the latest version, you'll need OS2.04 at least.
For using the OS, the required LVO definitions are usually present in the NDK.
From a literature perspective, you can't beat the RKM.
If you buy the DevCD 2.1, it includes these as HTML (as well as the OS3.5NDK), which you can read on a spare PC if your A500 isn't up to the task.
-
I only have workbench 1.3. Where can I find DevCD 2.1?
-
I only have workbench 1.3.
PhxAss 3.95 will run on OS 1.x and is available on the same page.
-
I tell a lie, all the links on his page seem to be broken :(
The 4.x versions are here: http://aminet.net/search?query=phxass (http://aminet.net/search?query=phxass)
Will need to try and find a working link for 3.95
-
Where could I find that devcd? Who makes it?
-
Where could I find that devcd? Who makes it?
Software Hut still sell it: See here (http://www.softhut.com/cgi-bin/test/Web_store/web_store.cgi?page=catalog/software/development/new_amigadev.html&cart_id=3235363_21644)
You could try asking amigakit too.
I should point out that it's aimed at OS3.5+ development but it does include the old 1.3-3.1 NDK too.
-
Note that Software Hut also sell DevPac 3, which is a full commercial assembler development suite. Alas, not cheap.
-
I only have workbench 1.3. Where can I find DevCD 2.1?
I would seriously suggest that you get hold of amiga forever and use UAE. Else you will have tons of pain.
-
Yeah, I have amiga forever. I think I will buy that devcd as it includes everything which acutally is cheaper in the longrun than buying the books seperately. Thanks for the info!
-
Is there any other free assembler that will run on wb 1.3?
-
I think it's great that you want to learn to program in Assembly for the Amiga! If you want more help and advice you should also check out these Amiga coding/development sites:
http://ada.untergrund.net/forum/
http://utilitybase.com/
Good luck!
-
Hi Super TWiT,
Do you have any experience with Assembly and, in particular, Assembly with the 68000 series? If not, I can recommend the following book:
68000 Family Assembly Language, by Alan Clements ISBN: 0-534-93275-4
It's not Amiga specific (it's 68000 specific) but you're going to need familiarity with Assembly for the 68000 series before you can put it to use on the Amiga platform anyway.
I'd also second the recommendations made by others.
-
You need a 68000 book as reference. Charts/index/examples are vital stuff!
I recently got one called "Programming the 68000" by Steve Williams.
It's pretty solid.
Without a good 68000 reference, and an understanding of how ASM pieces together, you are in for a long haul!
next, you should figure out what it is you want to do with your programming...
do you want to make a game?
music software?
Officestuff?
whatever it is, break it up into tiny little pieces and get them all to work.
For example if you want to make a game, figure out what your planned game is...
then get a character moving around via keyboard or joystick input, animate him, etc.
then work on getting backgrounds/levels up and scrolling, etc.
Don't try to just dive in head first! Little baby steps. You'll hone your skills, get an understanding of the hardware, and be able to piece it all together.
-
I recently got one called "Programming the 68000" by Steve Williams.
It's pretty solid.
I've never seen that book, I'll have to check it out! The book I offered has the advantage that it includes the entire 680xx series, but I think it's quite expensive so not so good on that front.
If I'm honest, I probably wouldn't recommend the Assembly language to a new starter these days. C Compilers have improved over the years to the point where Assembly is now rarely needed. Even in Embedded applications (which is my forte), Assembly is rarely used. C is the language of choice for embedded systems these days. Assembly is only used in very specific situations.
Assembly can be a useful skill, no doubt about that, but it's a lot of effort for little gain these days I reckon. If you learn C you can apply your skill in lots of areas and on lots of platforms. You might even get yourself a job doing it if you're good. But not many people would employ an Assembly programmer these days if that was his/her only skill?
It depends what the op wants to do with Assembly I guess.
-
I have Motorola MC68000 Family Programmer's Reference Manual (http://www.freescale.com/files/archives/doc/ref_manual/M68000PRM.pdf) provided by freescale. Is that enough. I don't have assembly experience, although I heard that if you want to learn assembly, the 68000 is the chip to learn it for (syntax much cleaner)
-
@SuperTwit
If you'd care for some free advice, I'd suggest you actually start with C, if you want to do a bit of Amiga development. The reason for this is that the NDK examples focus on C.
Once you are familiar with the basics of opening screens, handling input etc, you can then start looking at doing the same sort of stuff in assembly language. Even then, I'd say for non time-critical stuff, it isn't really worth it.
In the end, I favour writing in high level languages and only reimplementing those things in assembler which are either impossible (or impractical) to do in C, or where I feel that the compiler hasn't done a decent job optimising some critical piece of code. Integrating C and assembler is pretty straightforward, you just have to know what calling convention C is using, or failing that, write your own register-specific argument list when defining a C callable assembler routine.
Writing entire applications from the ground up in assembler is comparatively time consuming and can be very frustrating. Although, I have to admit, when you get an executable down to a few hundred bytes, there is an undeniable feeling of satisfaction :D
-
Is the rkm information pertinent to c? What compiler is included on the Devcd?
-
I have Motorola MC68000 Family Programmer's Reference Manual (http://www.freescale.com/files/archives/doc/ref_manual/M68000PRM.pdf) provided by freescale. Is that enough. I don't have assembly experience, although I heard that if you want to learn assembly, the 68000 is the chip to learn it for (syntax much cleaner)
I'm not familiar with that manual but I just had a very quick scan through it and it seems to be more reference biased than learning biased. For this reason I would not recommend using it as a learning manual, especially if you've no previous experience of Assembly programming.
What you really need is a book that teaches you Assembly language and gives you examples / exercises to work through and stuff like that. The book you've quoted seems to be a reference for someone who is already experienced in Assembly.
-
Is the rkm information pertinent to c? What compiler is included on the Devcd?
The RKM tends to focus on C for it's examples but the information about the OS is obviously language independent. The DevCD comes with StormC/C++ 3, which provides a complete IDE. You can actually write assembler with it too. On the whole, it's very easy to write applications with both C/asm sources with the included software.
-
If you're looking for the DevCD, you can try AmigaKit but when I was looking to buy it a couple of months ago I don't think they had stock of it. I certainly couldn't find it anyway. I got mine from Vesalia.
It's also a good idea to try and get hold of the RKM manuals if you're serious about this. It's not absolutely essential if you've got the DevCD but it's just a lot nicer to have a decent book to look at in my opinion. Just keep an eye out on Ebay or something, just in case they come up.
-
Guys!!!! I think AmiBlitz is the right way to go here. :)
-
AmiBlitz doesn't support Kickstart 1.3. AmosPro does but you'll be hard pressed to find a second floppy drive to get that up and running unless you have a hard drive.
-edit-
http://aminet.net/dev/asm/A68kGibbs.lha should work on a flat A500. It's Charlie Gibbs' A68k assembler. It doesn't do any optimizations though.
For more Assembly and AmosPro info see http://www.amigacoding.com/index.php/Main_Page .
-
right, ASM is not for the feint of heart.
Thankfully, 68000 ASM is pretty easy and approaches a higher level language almost.
also, 68000's are C-Friendly, unlike the 6502 and z80 for example, where using C really does put the brakes on things.
Are there any good C game programming libraries for the Amiga?
-
Re:C game programming libraries
Game Smith used to be really C friendly for SAS/C and DICE. It also worked with Assembly. It's a pity you can't really buy it any more. All you can do is find pirated keyfiles for it. :-(
Now what would be nice is if somebody would start making a modern replacement for some of those old libraries. Especially if they were shared libraries. I think Sidewinder is in the process of making a shared library out of scrolling trick (http://aminet.net/package/dev/src/ScrollingTrick). That should help out a lot!
-
Re:C game programming libraries
Game Smith used to be really C friendly for SAS/C and DICE. It also worked with Assembly. It's a pity you can't really buy it any more. All you can do is find pirated keyfiles for it. :-(
Now what would be nice is if somebody would start making a modern replacement for some of those old libraries. Especially if they were shared libraries. I think Sidewinder is in the process of making a shared library out of scrolling trick (http://aminet.net/package/dev/src/ScrollingTrick). That should help out a lot!
Just out of interest what's on these disks... They were in a batch of disks given to me. I know the last are DICE cus I have used them...
Amiga Developers Update Disks 1985-93
Amiga Developers Disk 01
Amiga Developers Disk 02
Amiga Developers Disk 03
Amiga Developers Disk 04
Amiga Developers Disk 05
CDGS Support Disks 40.60
CDGS Disk 01
CDXL Tool Kit 5th March 1992
CDXL Tool Kit Disk 01
CDXL Tool Kit Disk 02
ISO 9660 Tools v1.04x
ISO 9660 01
SASC 6.50
SASC DISK 01
SASC DISK 02
SASC DISK 03
SASC DISK 04
SASC DISK 05
SASC DISK 06
SASC 6.55 Patch
SASC 6.55 DISK 01
SASC 6.55 DISK 02
DICE Amiga C Programming Disks
xdcc1
xdcc2
xdcc3
xdcc4
They all look pretty official with the Commodore Logo on them... Seems to be a set and there is stuff about CD support on them.
scuzz
-
@scuzzb494
The SASC disks are probably SAS/C. It's a better C compiler than DICE because it has an excellent debugger. The ISO tools are probably the software used to make CDTV and CD32 disks. The CDXL toolkit is for mastering video using the CDXL video codec that Commodore developed for use with the CDTV and other Amigas.
I'm sure that Cammy and RebelCD32 would be interested in most of those disks because they want to make games with CDXL cut scenes on CD-ROM for the CDTV and CD32!
-edit-
I'm not sure what the CDGS support disks are. Maybe they involve the optional video decoder in the CD32.
-
@scuzzb494
I'm not sure what the CDGS support disks are. Maybe they involve the optional video decoder in the CD32.
This is a guess, but the CDGS disc may be support for CDG which the CDTV supported. CDG is still widely used today for karaoke systems.
Gaz
-
id be interested in a streamlined game-programming library, if thats floatin around.
-
Here's a link to Hello world for 68k Amiga:
http://www.helloworldexample.net/cisc-amiga-workbench-20-motorola-68000-hello-world-example.html (http://www.helloworldexample.net/cisc-amiga-workbench-20-motorola-68000-hello-world-example.html)
Here is some learning guides:
http://eab.abime.net/archive/index.php/t-21516.html (http://eab.abime.net/archive/index.php/t-21516.html)
I think you should try some examples and see which one feels right to you. Once you get use to accessing the hardware you could probably switch over to C later.
-
Here's a link to Hello world for 68k Amiga:
http://www.helloworldexample.net/cisc-amiga-workbench-20-motorola-68000-hello-world-example.html (http://www.helloworldexample.net/cisc-amiga-workbench-20-motorola-68000-hello-world-example.html)
And here's the fixed version of the same example:
include lvo/exec_lib.i
include lvo/dos_lib.i
; open DOS library
movea.l 4.w,a6
lea dosname(pc),a1
moveq #36,d0
jsr _LVOOpenLibrary(a6)
tst.l d0
beq.b .nodos
movea.l d0,a6
; actual print string
lea hellostr(pc),a0
move.l a0,d1
jsr _LVOPutStr(a6)
; close DOS library
movea.l a6,a1
movea.l 4.w,a6
jsr _LVOCloseLibrary(a6)
moveq #0,d0
rts
.nodos:
moveq #20,d0
rts
dosname dc.b 'dos.library',0
hellostr dc.b 'Hello, world!',0
Changes:
- Properly test for OpenLibrary failure. No longer crashes when run on KS 1.3.
- Set return code properly.
-
(http://img714.imageshack.us/img714/2946/amiga.png)