The Appleblossom Apple IIe emulator is composed of three parts, each of which
is independent of the other parts.

CPU EMULATION PART - Carbon Dioxide

The Carbon Dioxide 65C02 core, the single file 65c02.c, is completely
independent and can be used in other projects (emulators for other 6502-based
computers, for example) with no modification.

65c02.c -
	Holds all the 65C02 CPU emulation code.
	Also contains all variables used for the registers.


APPLE II EMULATION PART - Appleblossom

All files starting with 'a2' compose the core of Appleblossom. They are all
dependent on each other. They are independent of all other files. The 'a2'
files do not contain any code specific to an implementation of the interface.
So other interfaces can be built for Appleblossom and use the same files.

a2includes.h -
	A nice header file to #include in your main interface code that gives you
	all the stuff you need to control the emulator.
	Depends on everything else mentioned here.

a2vars.h -
	Contains all variables used for memory management, device I/O, and disk
	images. Used by all other 'a2' files as well as your interface.

a2main.c -
	Contains the main functions for driving the Apple II emulation, a2_init
	and a2_cycle.
	Depends on everything else mentioned here.

a2mmu.c -
	Contains the master functions for reading and writing the Apple II's
	memory. Also contains functions for loading ROM.
	Depends on a2iou.c.

a2iou.c -
	Contains functions for the Apple II's built-in device I/O (keyboard, game
	controller, display modes, speaker, cassette, and VBL).
	Called by a2mmu.c when accessing I/O addresses which don't control memory.
	Depends on a2disk.c, a2hdisk.c, a2serial.c, a2clock.c.

a2disk.c -
	Contains all functions for controlling floppy disk I/O. Also contains
	functions for loading disk images.
	Called by a2iou.c when accessing the $C0E0-$C0EF I/O addresses (slot 6).

a2hdisk.c -
	Contains all functions for controlling hard disk I/O. Also contains
	functions for loading .hdv images.
	Called by a2iou.c when accessing the $C0F0-$C0FF I/O addresses (slot 7).

a2serial.c -
	Contains all functions for controlling serial I/O. Serial I/O on the
	Apple II can be connected to any file or device on the Unix file system,
	including real serial ports, through standard input and output.
	
	This file is not complete. Serial support is currently nonexistant.
	Anybody want to help?
	
	Called by a2iou.c when accessing the $C090-$C0AF I/O addresses (slots 1
	and 2).

a2clock.c -
	Contains functions for implementing a no-slot real-time clock. Also
	contains a routine to patch ProDOS with the appropriate driver.
	Called by a2iou.c in response to certain pokes to $C077 (a special I/O
	address implemented only by Appleblossom).
	
	You can install the no-slot clock driver by doing a POKE 49271,193
	after loading ProDOS. This only has to be done once after booting ProDOS
	or resetting the machine.
	
	If you create a machine-language file called ATINIT containing the
	instructions LDA #$C1; STA $C077; RTS the driver will be installed
	automatically when ProDOS boots. The file has to have file type $E2.
	ProDOS executes the ATINIT file before looking for a .SYSTEM file.
	Usually it's for initializing AppleTalk, but since we're not emulating
	AppleTalk we can use the ATINIT file for our own purpose.

a2video.c -
	Contains utility functions for video. These are non-interface-specific,
	but will most likely be used by your interface anyway. The functions are
	for determining which video mode we're in, calculating memory addresses,
	and decoding the video memory.

a2colors.h -
	Contains some color tables for Apple II video.

a2font.h / a2font.c -
	Your implementation may use this for drawing text characters if it wants
	to. Otherwise it is not needed. It contains the bitmaps for the Apple II
	text characters. None of the other a2*.c files depend on this.


INTERFACE PART - CursdII

Appleblossom can be compiled with a variety of interfaces for controlling it.
Two interfaces are supplied: a console interface using ncurses and a Nano-X
interface for iPodLinux. The files for each interface are contained in a
folder starting with 'if-'. The files themselves also start with 'if'. Here
are the files for the ncurses interface, known as CursdII:

ifcurses.c -
	Contains functions for initialization and deinitialization of curses,
	text video display, and keyboard check. Also handles the mouse if you've
	got that (it's hooked up to the game paddle inputs).

ifhelp.c -
	Contains functions for help messages displayed by the command line
	program. These are separated from ifmain.c mainly for readability.

ifmain.c -
	Contains the main interface code, including initialization, special
	keyboard keys, command line arguments, disassembly dumping, and the
	big processing loop.


ROM FILES

In order to run Apple II software, Appleblossom needs images of the ROMs from
actual Apple II hardware. All ROM files must reside in the same directory as
the executable program.

Other interfaces may use different directories or file names for these files,
but the ones included use these names.

APPLE2E.ROM -
	The Apple IIe's internal $C000-$FFFF ROM. This file is not supplied with
	the emulator, as the ROM is copyrighted software. It must be obtained
	through other means.

DISK2.ROM -
	The Disk II controller's $C600 ROM. This file is not supplied with the
	emulator, as the ROM is copyrighted software. It must be obtained through
	other means.

HDDRVR.ROM -
	The hard disk controller $C700 ROM. This file IS included, as it is an
	open-source driver originally written for the AppleWin emulator.

SERIAL.ROM and SERIALX.ROM -
	The Super Serial Card's $Cx00 and $C800 ROMs, respectively. Used to
	emulate the serial ports. SERIAL.ROM is necessary for the Apple II to
	recognize the serial "card." SERIALX.ROM is only needed for compatibility
	with some programs that may use it; otherwise it is not required. I have
	actually been unable to locate these ROMs, so I couldn't include them
	even if I wanted to.


OTHER FILES

COPYING -
	The text of the GNU General Public License.

fonts -
	Contains alternative character sets for a2fonts.c to load.

ATINIT -
	Placing this file on a ProDOS disk will automatically install the driver
	for the no-slot clock when the disk is booted. The file type should be $E2
	and the auxiliary type should be $0000 when it is copied onto the ProDOS
	disk.

build.sh -
	Run this with the name of an interface, i.e.:
		./build.sh ncurses
		./build.sh ipodlinux
	to compile Appleblossom with that interface.

