My Amiga cross development environment on my Mac is getting really useful now: with vamos running the SAS C compiler I can create Amiga binaries with ease. With the binaries in place I want to try them on the real machine, too. For my trusty old Amiga 500, I still use disks to transfer the data. So I create an ADF image with my files on it and either use my kryoflux setup to write a real disk or write a virtual HFE disk image on an SD card to be used with the HXC2001 floppy emulator.
While building the code is done automatically in a Makefile, the disk image creation still involves manual steps including launching an UAE emulator to create the disk image. Hmm, I thought, an ADF file mastering tool (like mkisofs is used for CDs) would be a great tool!! Adding this to my Makefile would fully automates my build cycle… I was aware of ADFlib as being the portable library for ADF manipulation and I had a look there, but I did not found a mastering tool. Some more googling didn’t show me a similar tool – so again – I was left on my own and had to create the tool myself 😉
As a result xdftool was born and added to my amitools tool set! I started writing a small tool using the Python binding of ADFlib to create an ADF image and copy files there. This worked really quickly but soon I found the limitations of this library: the mastering part is only partially supported and essential things like setting all meta infos of a file were missing (or I didn’t find them ;). In the end I dropped the ADFlib approach and started to build a FS library for Amiga OFS/FFS from scratch… Thanks to the excellent ADF Disk Format FAQ I soon had all necessary information available and some hours later the first code files written.
The lib is done now and included in amitools as “fs” module. In its first incarnation it already has an impressive feature set:
- full object-oriented API in Python
- supports ADF and HDF containers
- supports all OFS/FFS modes including international and dircache
- read/write files/dir trees from/to host file system
- multi-layer support: work on block level or on FS level
- query and modify all parameters found in the file system including comments, protection flags and all time stamps in tick resolution
- supports unpacking/packing/repacking of full images into host file system with meta db files to store information not available on host file system
xdftool now supports all features of the library and while it started as a mastering tool for ADFs it is now a full featured command line tool to work with all kinds of ADF and HDF images… The remainder of this post gives you a short tutorial what you can do with xdftool:
In the last post I showed you that vamos is already able to call the SAS C Compiler 6.58 and compile some example source files. In the last few days I added the missing parts to vamos to support smake, too. Namely, calling sub processes with SystemTagList() was added and lots of bugs fixed. With smake at hand I am able to compile some real SAS C projects with an smakefile describing the build.
In this post I will show you how you can build the magPLIP network driver I used in my plip2slip project directly on your Mac without using an Amiga machine emulator like P-UAE…
Well, the vamos project is progressing really, really well… And while I’m working at bringing more and more native Amiga tools to life on my Mac, I almost overlooked the first major milestone (and actually its primary initial goal) of the project: running the SAS C Compiler…
This posts interrupts the rather technical series of articles describing the internals of vamos and simply shows you how to actually use vamos the way its intended to be 😉
Fasten your seatbelts, grab your old SAS C compiler disks and read on!
Today we continue our little journey through my newest project and have a look at libraries and structures in the “virtual” Amiga RAM of vamos.
Make sure to read Part 1 of the series first…
- Amiga Libraries
- Amiga Structures
I did some classic m68k Amiga code development that uses the SAS C compiler recently (see plip2slip). Everything was set up in a P-UAE-based AmigaOS 3.9 environment and worked fairly confortable. While switching between TextMate on my Mac I used for editing the code and the CLI window in P-UAE I had a thought: “It would be fairly cool to have something like Wine for AmigaOS… Then I’d simply run the SAS C compiler Amiga binary on my Mac directly…”
That was the beginning of my newes project: vamos – The Virtual AMiga OS emulator.
Read on to learn more about the birth of vamos and its first major milestone: run the SAS C compiler in my new “Developer’s Diary” series 😉
I just purchased a new HW goodie for my classic Amiga 500. A clockport adapter and a SilverSurfer serial card that allows high baudrates (e.g. 115200 baud) on this machine without generating too much CPU load.
HW installation was fairly easy, but with the software the trouble began… The supplied drivers does not run on an Amiga 500 but only on an A1200 🙁 Being a real retro hacker I had a look at the driver binary, disassembled it and found out that the code could be easily patched to run on an A500, too.
Now it works like a charm even on the 680000 machines. Here try yourself: silversurfer104-a500.zip
If you want to know how this was done… then read on… Be warned: technical details ahead 😉
While playing with my A500 recently, I had the idea to try out the TCP Stacks available for this platform. Since the little Amiga lacks a decent ethernet card I had to get along with the internal serial port and a SLIP connection. With 9600 Baud this is very slooow. So I kept on searching for a faster solution and found a PLIP implementation on Aminet. PLIP using the parallel port is much faster than SLIP, but you need a peer with a parallel port, too… and that’s the hard part today 😉
FollowingÂ the same approach as found in my dtv2ser project, I just attached an AVR ATmega microcontroller to the parallel lines of my Amiga and implemented the PLIP counterpart there. The ATmega on the popular Arduino 2009 boards has a fast serial connection that maps to a USB port via a FTDI 232. This is the ideal data channel for transporting the PLIP packets to your host Mac or PC. With baudrates up to 500 kBaud (~50 KiB/s) and hardware handshaking with RTS/CTS you can easily transfer the data packets very fast to your PC and encapsulate them again in SLIP.
With this idea I started to implement the plip2slip firmware. Fortunately, the magPLIP driver for the Amiga comes with source and so I could port the code to the AVR. With slight modifications on the Amiga part (patch included) I was able to receive the first packets from the Amiga on the Arduino. Then I implemented a simple Ping mode that receives ICMP Ping Requests transforms them to Replies and returns them to the Amiga: plip2slip soon was a ping machine 😉 I repeated the same thing for the SLIP side and with a patched slattach tool on Ubuntu Linux I was soon able to ping the AVR from this side, too.
With the basic parts of plip2slip in place and working I finally added the transport/bridging mode that transfers all received PLIP packets to SLIP and vice versa. With this mode running I could ping the Ubuntu host from my Amiga! After some IP forward configuration on Ubuntu I was able to reach my home network and also the Internet with the A500.
And its real fast! An FTP download on my Amiga reaches 25 KiB/s when transferring 10k from Linux! So compared to SLIP with 9600 Baud its a real break through and worth the little hardware effort needed to build the Arduino device…
There is still lots of potential for tuning and optimizing, but I wanted to share this little project as soon as possible with you. So I crammed up everything you need into a little 0.1 release that is available on my shiny new plip2slip homepage. I hope you enjoy it and bring lots of your classic machines back to the net with decent speed…
On my neverending quest to have a powerful cross compiler for m68k Classic Amiga (i.e. OS <= 3.x) for my Mac I had a closer look on the fresh new release of Volker Barthelmann’s C Compiler.
In this post I’ll describe how to install this nice piece of code on your machine in a few easy steps!
DICE (Matt Dillonâ€™s C Compiler Environment) was one of the first C compiler I came in touch with back in the days on my A500. Recently,while scanning the Net for a m68k Amiga Cross Compiler solution for my Mac I stumbled across the source code release of DICE by Matt himselfâ€¦
Here is the story of getting this old pearl running on my Macâ€¦