AmigaExamples/README.md

107 lines
4.9 KiB
Markdown
Raw Permalink Normal View History

2016-02-27 03:15:25 +00:00
(re)Learning how to program an Amiga after a 20 year break
==========================================================
2016-03-02 04:28:54 +00:00
introduction
------------
2016-05-19 05:29:45 +00:00
This repo contains example programs I have written as I re-learn how to program an amiga. The programs are written in assembler and directly access the hardware. Most of the examples have been tested using FS-UAE and my Amiga 500. Some require 1mb of chip ram, most work fine with 512kb.
2016-03-01 10:20:49 +00:00
2016-05-19 05:29:45 +00:00
Don't use this as an amiga programming guide. I don't do things the "correct" way. There are heaps of great guides out there if you want to do things the right way. My a68k asm vocab starts out pretty small, and grows only very slowly, so again, this is not guide on the best way to do things.
2016-02-27 03:15:25 +00:00
2016-03-02 04:28:54 +00:00
documentation
2016-02-29 02:03:46 +00:00
-------------
2016-03-03 06:55:59 +00:00
Most of the sites I have used during the learning process:
2016-02-29 02:07:13 +00:00
* [68000 instructions](http://68k.hax.com/)
2016-02-29 09:20:04 +00:00
* [vasm documentation](http://sun.hasenbraten.de/vasm/release/vasm.html)
* [vlink documentation (PDF)](http://sun.hasenbraten.de/vlink/release/vlink.pdf)
2016-03-01 10:20:49 +00:00
* [amiga registers](http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0060.html)
* [amiga hardware reference manual](http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0000.html)
* [amiga rkm devices manual](http://amigadev.elowar.com/read/ADCD_2.1/Devices_Manual_guide/node0000.html)
2016-02-29 09:21:03 +00:00
* [coppershade.org downloads](http://coppershade.org/articles/More!/Downloads/)
2016-03-01 10:20:49 +00:00
* [copper timing details](http://coppershade.org/articles/AMIGA/Agnus/Copper:_Exact_WAIT_Timing/)
* [coding forum](http://ada.untergrund.net/?p=boardforums&forum=4)
2016-03-03 05:17:22 +00:00
* [coding forum](http://eab.abime.net/forumdisplay.php?f=112)
2016-02-29 02:03:46 +00:00
2016-03-09 04:12:06 +00:00
examples
--------
2016-03-09 04:13:12 +00:00
Each example tries to introduce only one new concept, often building on the previous examples.
2016-03-09 04:12:06 +00:00
2016-03-09 04:13:12 +00:00
See each example's README.md for a limited description as well as a clickable link to run the example in your browser using my hacked version of [Scripted Amiga Emulator](http://scriptedamigaemulator.net/)
2016-03-09 04:12:06 +00:00
2016-03-14 06:23:10 +00:00
Most of the examples are only tested on a 512kb chip ram A500. Some examples have an option extended versoin that might require more chip ram, and in that case an A600 would be the best option.
2016-03-02 04:28:54 +00:00
cross development environment
2016-02-27 03:15:25 +00:00
-----------------------------
2016-03-04 00:26:17 +00:00
These examples are developed on a mac using [cahirwpz's](https://github.com/cahirwpz) AmigaOS cross compiler for Linux / MacOSX / Windows.
2016-02-27 03:31:00 +00:00
https://github.com/cahirwpz/amigaos-cross-toolchain
2016-03-03 06:53:40 +00:00
The support tools I have developed have additional requirements which you may not have on your system.
2016-02-27 03:15:25 +00:00
2016-03-04 00:46:54 +00:00
For a dump of what I did to install them see [installing the cross development environment](doc/BuildingCrossDev.md)
2016-03-03 05:17:22 +00:00
2016-03-03 06:47:19 +00:00
building
2016-03-03 06:53:40 +00:00
--------
2016-03-03 06:47:19 +00:00
Build all examples by running ``make`` at the top level directory.
2016-03-04 09:30:01 +00:00
Individual examples can be built by entering the directory and running make:
2016-03-03 06:47:19 +00:00
```
# cd 001.simple_image
# make
```
2016-03-14 06:23:10 +00:00
this will create a bootable ADF image in the ```bin``` directory.
2016-03-14 06:29:03 +00:00
Load this file directly into your emulator of choice as ```DF0:```, or even better, run it on the real hardware.
2016-03-14 06:23:10 +00:00
2016-03-14 06:27:14 +00:00
emulators
---------
The following are the emulators I have used so far:
* [FS-UAE](http://fs-uae.net/)
* [Scripted Amiga Emulator](http://scriptedamigaemulator.net/)
* [WinUAE](http://www.winuae.net/)
2016-03-14 06:27:45 +00:00
they each have strengths and weaknesses, so it's worth giving them each a try.
2016-03-14 06:27:14 +00:00
2016-03-03 06:42:36 +00:00
tools
2016-03-03 06:53:40 +00:00
-----
2016-03-04 08:27:43 +00:00
The following cross development tools have been developed to support the examples:
2016-03-03 06:48:50 +00:00
2016-03-12 00:44:18 +00:00
* [imagecon](tools/imagecon) # create amiga compatible raw image data from true color images
* [resize](tools/resize) # resize images ready for imagecon
2016-04-21 01:52:08 +00:00
* [croppa](tools/croppa) # crop images ready for imagecon
2016-04-26 03:52:34 +00:00
* [mapgen](tools/mapgen) # generate amiga data from [tiled](http://www.mapeditor.org/) maps
* [fade](tools/fade) # generate data for fading between palettes
2016-03-12 00:44:18 +00:00
* [makeadf](tools/makeadf) # make ADF disk image
2016-03-03 06:42:36 +00:00
2016-03-15 23:42:33 +00:00
external tools
--------------
The following cross development tools have been sourced from external authors:
2016-03-30 21:29:57 +00:00
* [shrinkler](tools/external/shrinkler) # compress for maximum compression, slow decompression
* [doynamite68k](tools/external/doynamite68k) # compress for fast decompression
2016-03-15 23:42:33 +00:00
2016-03-03 06:49:15 +00:00
Each tool has a test to check if any changes you have made have broken basic functionality:
2016-03-03 06:42:36 +00:00
2016-03-03 06:43:12 +00:00
```
2016-03-03 06:42:36 +00:00
# cd tools/imagecon
# make test
______ ___ _____ _____ ___________
| ___ \/ _ \ / ___/ ___| ___| _ \
| |_/ / /_\ \\ `--.\ `--.| |__ | | | |
| __/| _ | `--. \`--. \ __|| | | |
| | | | | |/\__/ /\__/ / |___| |/ /
\_| \_| |_/\____/\____/\____/|___/
#
```
or test all by running ``make test`` at the top level
2016-03-03 05:17:22 +00:00
license
2016-03-03 06:54:50 +00:00
-------
2016-03-03 05:17:22 +00:00
Some of the code I have included in this repository is copyright by various authors and provided under various licenses. Copyright notices are preseved where possible.
Some of the tools use GPL licensed libraries which would mean they could only be distributed under the conditions of the respective version of the GPL.
2016-06-03 10:40:58 +00:00
All code without a copyright notice is licensed as per the terms in [LICENSE](LICENSE).