afminitools - Alien Flash minitools
-----------------------------------

(c) 2011 Hannu Nuotio <nojoopa@users.sf.net>


1. Intro
--------

Alternative firmware for the Alien Flash cart.
See COPYING_fw for license.

PRG loading routines heavily based on EasyLoader from EasyFlash.

ROMH contents are EAPI and somewhat modified banking-test.s, both
from EasySDK (from EasyFlash).

Copyright notice for eapi-am29f040-04:
===<snip>===
; EasyFlash
;
; (c) 2009-2010 Thomas 'skoe' Giesel
;
; This software is provided 'as-is', without any express or implied
; warranty.  In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Permission is granted to anyone to use this software for any purpose,
; including commercial applications, and to alter it and redistribute it
; freely, subject to the following restrictions:
;
; 1. The origin of this software must not be misrepresented; you must not
;    claim that you wrote the original software. If you use this software
;    in a product, an acknowledgment in the product documentation would be
;    appreciated but is not required.
; 2. Altered source versions must be plainly marked as such, and must not be
;    misrepresented as being the original software.
; 3. This notice may not be removed or altered from any source distribution.
===<snip>===

For more information on EasyFlash, see:
http://skoe.de/easyflash/

For more info on Alien Flash, see:
http://t-winkler.net/dokuwiki/doku.php?id=en:af:start


2. Installing
-------------

Flash afminitools.crt to ROM SLOT 0, or if you'd like to test this thing
out first with relative safety, flash afminitools_slot1.crt to ROM SLOT 1.

Assuming everything is working, you can do this with aftool:
    aftool scrt afminitools.crt
...or for ROM SLOT 1:
    aftool scrt afminitools_slot1.crt

Note: be sure to be in USB mode on the C64 side when attempting either of the
above commands (or any aftool/afgui USB operation, for the matter).

If aftool is not working for you, use EasyProg:
http://skoe.de/easyflash/index.php?page=easyprog-en


3. Usage
--------

Press the shown keys to perform the functions. Simple, eh?

Once booted, the screen looks something like this:
===<snip>===                               notes:
----------------------------------------
| Alien Flash minitools vX.Y | q : quit      Name, version, an important key.
----------------------------------------
Boot               |Transfer
0-f: ROM SLOT 0-15 | u : USB mode
 z : Action Replay | w : drive <- D64
 p : PRG in Flash  | r : D64 <- drive
                   | j : format drive
                   |n,m: drive #8            Available functions.
                   | l : PRG <- RAM
                   |
                   |
                   |
----------------------------------------
ROM: 0....5.....b....              AR: n
D64: (no file exists),..                     Detected Flash contents.
PRG: COOL PROGRAM     load $0801 - $5432
----------------------------------------
Welcome.

Remember that only the key x works while     Message area.
USB mode is on. Don't exit while in the
middle of a transfer.  Good luck.
===<snip>===

The example screen shows that ROM SLOTs 0, 5 and 11 ($b) have bootable
contents in them; press 0, 5 or b to boot the respective ROM SLOT.

Neither Action Replay nor a D64 is available in flash, and hence
the "drive <- D64" and "(Boot) Action Replay" options will issue
an error.

A PRG file is available and can be started by pressing p.

All the drive functions use the shown drive number, which can be changed
(in the range 8 - 11) by pressing n or m.

The format function starts the format and exits back to the menu.
The format goes on in the background; the drive functions check if a
format is in progress on the selected drive when they're called and
will wait for the format to finish before proceeding. It is possible
to format three other drives while writing/reading to/from the fourth
(at least in theory).

The "PRG <- RAM" function can copy a freshly LOAD program to Flash.
The start and end addresses (taken from $2b - $2e) must be in the range
$0801 - $cfff, and the start address must (naturally) be less than the end.
Simply LOAD a program and reset before RUN and it should work.

The USB mode allows transfers from/to a PC (using, for example, aftool).
While in USB mode, only they key x works; it exits the USB mode.
The lower part of the screen (and the border color) will show what the
C64 sees on the bus; if the border isn't constantly black, the PC is
doing something via USB. Please do not exit the USB mode while this
is happening.


4. Future
---------

Use the rest of the available 128kB for some good.
Faster D64<->drive functions.
"Start program from the D64 in flash".
