A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Getting started

 

Author Message
johnsa
Member
#1 - Posted: 1 Nov 2011 10:47
Reply Quote
Hi,

I've just recently thought about getting back into some amiga coding.. My 1200 is long since dead, so I'm shopping around for an old one just to get it fired up again, in the meantime I've gotten the latest WinUAE and bunch of my old software + bought some new and I'm trying to find out what others are using/suggest to be the best.

In terms of emulation / setup:
WinUAE (obviously)
I've downloaded AmiKit (I'm not sure if others use this?) If so I tried setting it to Megllan interface, which is very nice.. but I'm not sure how "Amiga'ish" it is. I've also got my original 3.1 OS disks + 3.5/3.9 and I'm not sure which I should go with.. Logic would say latest is best.
I was considering just a straight WinUAE install + OS 3.9 instead of Amikit?

In terms of dev tools:
I still have my full Devpac + manuals, and I really enjoyed it last time round. Is there any reason I should consider asm-one / asm-pro over devpac as they seem to be quite buggy to me?

Thanks
John
korruptor
Member
#2 - Posted: 1 Nov 2011 14:20 - Edited
Reply Quote
You should have a look at ClassicWB. It's not as fancy as AmiKit, but it's a comfortable environment that's nice and easy to configure. I've ended up running it in WinUAE and on my A1200 and it's nice and fast. I dropped 3.9 as it was pretty slow on my A1200, and 3.1 is really what I know from back in the day...

http://classicwb.abime.net/

If you're a devpac user you're probably just as well off sticking to what you know. I use AsmPro and quite like it. It has some nice features for writing out, generating sines and other bits and bobs, but it's totally personal preference.

A bunch of people use vasm, vlink and vbcc, as you can set them up to cross compile from Windows and Mac. I've only dabbled with that, but it's a good option to have if you want to use modern editors to write your code with...

As a bit of a time saver, Amiga Forever is worth getting. There's loads of software on the DVD you can nick (saves trawling through Aminet when you can't remember what it is you actually want), but to be honest, the default WB setup it comes with is actually really nice. I used it for WinUAE coding up until I got my A1200.

There're a few other posts on here about tools and stuff which you should have a look at. For me, a tracker, Piccon & Personal Paint are essentials.
johnsa
Member
#3 - Posted: 8 Nov 2011 14:57
Reply Quote
Hey thanks for the info!

I've checked out ClassicWB, and i'll probably go that route for my actual machine, for the emulator I've decided to stick with amikit. It seems to be working very nicely for me.

I've managed to track down all the other tools and bits/pieces.. quite glad I still have a hard-copy set of the last rom kernel manuals and devpac + 020 instruction set reference (not big on ebooks/pdfs) but managed to get most of them electronically as well.

So I've started playing with devpac (it seems in 15 years I've forgotten everything! haha).
So I have 3 n00b questions:

1) In PC/MASM I often use $ as program location counter within segment/section.. IE:
myData dd 100 DUP (?)
myDataSize EQU $-myData
Is there some sort of devpac equivalent?

2) Does DevPac not support any form of STRUCT declaration?
IE: (once again masm)

myStruct Struct
var1 db ?
var2 dd ?
ends

mov eax,[edi].var2

3) Is there an equivalent to OFFSET to get the address of something into either an A(n) register or into another variable?
IE:

MyData db 100 DUP (?)
MyDataAddr dd (OFFSET MyData)
mov eax,offset MyData ;as opposed to lea eax,MyData

thanks for all the help/info!
John
pmc
Member
#4 - Posted: 8 Nov 2011 21:15 - Edited
Reply Quote
For your questions:

1. you can use * as the current program counter location. For your example though, I'd tend to do something like this:

mydata:             dc.b                0,1,2,3,4,5,6,7,8,9
mydata_end:

mydata_sz equ mydata_end-mydata


2. yes. Use an rs structure like this:

variables:
rsreset

label1: rs.l 1
label2: rs.w 1
label3: rs.b 1
keep_things_even: rs.b 1

variables_sz: rs.b 0
dcb.b variables_sz,0


and then do something like:

	lea	variables(pc),a5
move.l a0,label1(a5)


etc.

3. I don't know Intel assembly language at all but I think what you mean is to use something like offset with index so:

	move.w	2(a0,d0.w),d1


look it up in an 680x0 assembly manual for a more complete explanation. Also, my example is for 68000, there are other ways to do indexing on > 68020 but I only really write code for vanilla 68000 :)
johnsa
Member
#5 - Posted: 8 Nov 2011 22:11
Reply Quote
Hey,

1 and 2 are absolutely perfect! Thanks for that.. I vaguely recall * now :)

With 3 what I was trying to do is something like this:

lea.l MyVar,d0
move.l d0,MyVarPtr

MyVar dc.b 0
MyVarPtr dc.l 0

So there you'd be taking the address at runtime, I want it at compile time rather via something like:

MyVar dc.b 0
MyVarPtr dc.l (ADDRESSOF(MyVar))

Based on your answer to my point 1.. I'm guess you could just do this:

MyVar dc.b 0
MyVarPtr dc.l MyVar

Some more n00b questions from me:

1) Does LVODisplayBeep() not work under WinUAE or later OSes? The library function is there and calls fine but it doesn't do what I remember it used to on my A500 :)

2) Library versions.. V33 = KS1.2, V36=KS2.0, V37=2.04 .. what are the other lib versions corresponding to KS3.1 ? V39/V40 .. more?

Thanks again!
John
pmc
Member
#6 - Posted: 8 Nov 2011 22:23
Reply Quote
Ah, OK - yeah sorry. I see what you were getting at with question 3 now so yes you can do:

myvar:	dc.b	0
myvarptr: dc.l myvar


for the questions:

1. I don't really know I'm afraid. I don't tend to use many library functions. I tend to just kill off the OS and do what I like to the machine :D If it works on the real machine though, it should work under WinUAE too.

2. V33.180 = KS1.2, V34.5 = KS1.3, V37.175 = KS2.04, V37.350 = KS2.05, V39.106 = KS3.0, V40.68 = KS3.1
johnsa
Member
#7 - Posted: 8 Nov 2011 22:38
Reply Quote
Brilliant, thanks! :) I'm trying to compile all my ramblings into a personal guide... as I come up with things/questions.

I see there are loads of links to startup code examples, I'll begin on that again tomorrow then I can "fiddle" happily ;)

john
johnsa
Member
#8 - Posted: 10 Nov 2011 22:53
Reply Quote
Hey,

Got started on some startup code, I know there are loads around, but for the sake of learning it's probably worth going through the whole exercise.

Is it safe to assume the Custom chip base is always $00dff000 ?
I saw in the h/w RKM that the A3000 memory map defines the custom chipset to start at $00df0000 ?

What I've gathered so-far the flow should be something like:

Handle CLI/Workbench startup
Determine total chip and available
Determine total fast and available
Allocate as much as required of both
Determine KS version
Determine CPU Type + Coprocessor present
Determine chipset type (OCS/ECS/AGA)
Any-way to know if the machine is a500/3000/4000.. does it actually matter if you know the rest?
Handle acti view
Disable Multitasking via Disable
Supervisor mode switch (either permanant or just for the next part)
Get VBR
Save copperlist
Save int/dma/adk
disable int/dma/intreq
Install new copperlist and interrupts

Does that sound right? I'm sure i'll have loads of questions about many of these steps as I go :)

Thanks
John
pmc
Member
#9 - Posted: 11 Nov 2011 11:10
Reply Quote
Assigning numbers to each entry in your list I don't personally bother with 1, 2, 3, 4, 5, 6 or 7. Of course, you will need to consider those things if your demo relies on a certain amount of memory or a certain processor or an FPU to run.

I don't suppose it really matters what type the machine is as long as you know that the right spec of memory and CPU / FPU are available in whatever machine your code is running on which you would already know if you did steps 1 - 7 above.

The rest of your list looks about right to me. There may be some other things required in certain circumstances like, for example, disabling caches on machines that have CPUs that have them if you're using self modifying code etc.

 

  Please log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0