A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Starting with demos

 

Author Message
merry
Member
#1 - Posted: 11 Oct 2009 22:23
Reply Quote
Hi people.

I'm a newbie in Amiga programming, I've used to code on other machines such ZX Spectrum, Amstrad CPC, Commodore 64 or PC. I am VERY VERY interested in learn Amiga programming 'cause I want to release a demo next year for that platform. The target I want to focuse on is Amiga ECS/OCS (I had an Amiga 500 and I love it, just that).

I'm an Ubuntu user, and I play using EUAE. I'm wondering if there is anyway (like in case of the other platforms I mentioned) to code and assemble natively in my Linux and launch the result against the emulator (e.g., when I code for C64, I write my code on Gedit, compile with ca65 then launch the VICE emulator all-in-one-step).

If there is no way to do that (e.g., there are no cross-assemblers for M68K, or no way to output the code on an ADF file), I will be so pleased If you can advise me about your coding environments (I do not own an Amiga right now so I mean using emulators or somewhat).

Thanks in advance.
d0DgE
Member
#2 - Posted: 11 Oct 2009 22:58 - Edited
Reply Quote
Welcome on board.
The Aminet should be a resource where you can search for cross compilers.

On the other hand you can use the AsmOne/Pro evironment on the UAE, set it to 68k straight and assemble the stuff directly on the emulator.
The point many guys that are into gaming only on the UAE miss is, that you can install an OS 3.9 on it and configure it so it just feels as a native Amiga OS environment ( but waaay faster ) with gfx board.
This way you don't have a lousy windowed OS running but instead a fullscreen workbench with 16-32bit colour depth.

So there are a lot of ways to get OCS/ECS stuff produces in a more advanced way.
dodke
Member
#3 - Posted: 12 Oct 2009 00:08
Reply Quote
phxass is a pretty decent free assembler that works from the amiga command line and works great if you use a text editor under your native os. You can also modify the amiga os' startup-sequence file so that when you reset the emulator it'll automatically go to your source directory and compile (plus save any phxass outputs you want into text files) and run the program you're working on.
noname
Member
#4 - Posted: 12 Oct 2009 12:06
Reply Quote
phxass is decent, but discontinued. its author joined the vasm/vlink/vbcc project which is still under active development and able to cross-compile from a variety of host platforms. it is a great system, although i must admit that vasm doesn't like my sources.

asmone/pro is a nice ide with very quick turn-around times, but also a bit buggy and not suitable for producing linkable code from the outset.

personally, i think devpac is the best assembler for amiga, but it is neither free nor can it cross-compile.
z5_
Member
#5 - Posted: 12 Oct 2009 12:34
Reply Quote
@merry: welcome and good luck. Would be great to see a production from you!! If you have any questions, use the forum. There's always somebody around to help out.
ZEROblue
Member
#6 - Posted: 12 Oct 2009 12:59
Reply Quote
I use vasm and vlink on OSX together with some small tools so I can format my code freely, and I test the code in WinUAE through VirtualBox. With some simple scripts you can automate the build process and reduce it to a few key presses from source code to running executable, though it's good to have ASM-One or one of its derivatives handy for quick testing.

The reason I use WinUAE through VirtualBox is because it's lightyears ahead of the old UAE and E-UAE in both features and accuracy.
merry
Member
#7 - Posted: 12 Oct 2009 13:51
Reply Quote
Thanks to all of you people for your answers. It seems not to easy to find information regarding this.

I've choiced the vasm/vlink option (seems the most suitable for my needs after reading your comments).

I have a handset of additional doubts right now, so if someone can help me, I will appreciate it a lot!!

My doubt list stars here :D

1 - I had no problem compiling vasm (just set target CPU to M68K and syntax to the Motorola one). But I can't compile vlink. I simply don't understand how to do it. If I use the UNIX makefile, the vlink target will be UNIX? Anyway, I can't compile it using the UNIX makefile because it does not work for me (even changing the TYPES32BIT to TYPES64BIT for my system as detailed in the doc).

2 - I suppose my code will, initially, run under AmigaDOS 2.x/3.x (someday I should program my own loader, etc). Is this right?

3 - How can I "set up" an ADF disk to put my binaries and launch them against the UAE? Or must I share a folder in my Linux to be "seen" in any form by AmigaDOS? How to do it?

@ZEROblue: why to use WinUAE instead of E-UAE? Aren't they based on the same emulation code? Will my code rely on some WinUAE-specific flag or command line option?

Thanks in advance for your answers. I'm really grateful for them all.
ZEROblue
Member
#8 - Posted: 12 Oct 2009 14:21
Reply Quote
If you're using the generic UNIX makefile for vlink then you first have to create a catalog named objects in the vlink catalog.

Vasm doesn't add any code to your exe. Your exe can be started on any Amiga, but if you make use of 68020 instructions or Kickstart 2.x specific features etc. then of course you will need an Amiga with those specs or your exe will crash. You don't need anything higher than 1.2 for your typical demo startup code.

WinUAE started as a port of the old UAE, but has been further developed for many years. There's no comparison between the two, though for plain A500 emulation UAE is probably accurate enough.

What I do is use a catalog in OSX as a harddrive in WinUAE by sharing it with VirtualBox. My build script just copies the file to the shared catalog and it is instantly available inside the emulated Amiga.

I've never used UAE or E-UAE but I think they can do this too.
merry
Member
#9 - Posted: 12 Oct 2009 14:32 - Edited
Reply Quote
Thank you so much, ZEROblue, the "objects" catalog (folder in my jargon) do work!!!

I should try now to set up a shared folder between my host system and the emulated one and see if it works. Thanks :D

(I've seen E-UAE can do that, in fact E-UAE, AFAIK, is a port of the WinUAE to UNIX or something like that).
merry
Member
#10 - Posted: 12 Oct 2009 18:55
Reply Quote
Hi again.

I've created the hard disk as ZEROblue said, and it seems to work. I've have just a minimal WB disk (unknown version, but only works with DOS >= 2.0, so it's not a 1.x WB). I don't know if this is valid to make A500 demos, or too much for it. I'm looking for a minimal AmigaDOS disk or somewhat, just to launch the demo with no additional tools and no extra loading times, or at least a tutorial of how to build one of these disks.

Anyway, the problem I have is that I don't know what to do with my binary file: I copy it onto my shared folder, but I can't access it from the WB (the share is working, and I've noticed that when I create a folder or file inside it from the WB itself, an additional file with the .info extension is also created, so I think I'm missing my own .info file, but I don't know how to create it).

Sorry about all these questions, I really don't know where to find the answers... hope here is the place!

Thanks in advance.
sp_
Member
#11 - Posted: 12 Oct 2009 19:10
Reply Quote
This demo contain a stripped workbench you can use to launch your exe files in wb1.3 (OCS)


Andromeda- D.O.S

http://ada.untergrund.net/?p=demo&i=161
ZEROblue
Member
#12 - Posted: 12 Oct 2009 20:35
Reply Quote
Using an empty catalog as a harddrive in UAE and selecting the bootable option should make it boot from that drive right into the CLI window, and from there you just type the name of your binary.

Some applications might store necessary information in its Workbench icon like required stack space etc. but the Workbench isn't required to make or run demos or apps as such. If you insist on using it for just testing your code then you can either copy an existing icon and changing its name and flags, or select Window -> Show -> Show all files from the Workbench menu to see it.

The Workbench launches apps differently than the CLI however, and to have a process terminate properly it needs to exchange some messages with the WB. Just booting into the CLI and testing your code from there is really the simplest way.
merry
Member
#13 - Posted: 13 Oct 2009 01:28
Reply Quote
Thanks too much ZEROblue, booting from HDD takes me to the CLI prompt.

Another problem I think :( Sorry :P

I've assemblied my code that way:
vasm -Fhunk -o <objfile> <infile>
vlink -bamigahunk -o <outfile> -s <objfile>
but it does not work ("error 121" in AmigaDOS 1.x, "file is not executable" in AmigaDOS 3.x). I've tried both with my own code and with third party code. I've tried also without linking (just supposing the vasm output was a valid executable -that it is not-). I'm working with vasm 1.4a (the one available in source code form). Sombody said that the 1.4b version is capable of outputting Amiga executables directly (option -Fhunkexe), anyway I'm not able to grab this one.

Any ideas about that? Thank you so much.
skurk
Member
#14 - Posted: 13 Oct 2009 15:30 - Edited
Reply Quote
Is the executable bit set on <outfile>?
ZEROblue
Member
#15 - Posted: 13 Oct 2009 15:32
Reply Quote
That should work fine. Could it be because you built vlink with the wrong DTYPES32/64 setting? Remove the objects catalog to be sure and rebuild with the other setting and try again.

If that doesn't work then try typing in the code below and build just like you did above, and then do a binary compare with this file: http://filebin.ca/ajdvjw/test.exe


moveq #-1,d0
Loop move.w $dff006,$dff180
subq.w #1,d0
bne.b Loop
moveq #0,d0
rts


That should at least tell you if you get the correct output from vasm and vlink, or if the file somehow gets mangled when you transfer it.
merry
Member
#16 - Posted: 13 Oct 2009 20:41
Reply Quote
I'm just surprised. I've downloaded your file, and it worked. I've compiled your code using the lines I've written above and both files are equal, and both WORKING!!!

I don't know what happened before so :( Anyway, thank you very much for that :D

 

  Please log in to comment

  

  

  

 

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