EMU7800: A .NET Atari 7800 Emulator
Mike Murphy, mimurphy@u.washington.edu, mike@jones-murphy.dyndns.info
v0.32, November 15, 2003



1.0 Introduction

This is a pre-1.0 release of EMU7800, an Atari 7800 emulator implemented using
Microsoft's .NET platform. While many features are working, 7800-specific
support will not be implemented until by the end of the year.  However I had
an interest in getting the feedback process started; I was curious to see how
it would work on other machines.

You are probably asking, "Why would you want to implement an emulator in .NET for?"
This was an academic graduate capstone project, at UW Tacoma, where I needed to
find a project that had lots of technical risk.  Emulator writing is fun too,
so that was a helpful bonus.  Before I started this project, I had no experience
in .NET or Win32 programming, no real object-oriented programming experience,
or emulator writing for that matter.  So, there was plenty of risk indeed.

Also, while most people will consider EMU7800 freeware, it is also joblead-ware.
Know of any job leads for skilled IT labor in the Seattle-Tacoma area?
(Wash. State, USA)  If so, please drop me a line!

Regardless, send me a note if you have questions or feedback.

Enjoy!


1.1 Copyright Notice, Disclaimer, License

EMU7800 is Copyright (c) 2003 Mike Murphy.

THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY EXPRESSED OR IMPLIED WARRANTY.
IN NO EVENT WILL THE AUTHOR BE HELD LIABLE FOR ANY DAMAGES ARISING FROM THE USE
OF THIS SOFTWARE.  PLEASE SEE THE ENCLOSED "LICENSE.TXT" FILE FOR THE COMPLETE
LICENSING TERMS.


1.2 Release Notes

0.31:

Probably the most notable item in this release is an attempt at a general
algorithm for handling "ill-advised" HMOVEs.  That is, when the HM
registers are fiddled with within 24 CPU cycles of an HMOVE register strobe.

Andrew Towers' excellent paper, A Small Opus on the TIA, provided invaluable
insight for accomplishing this.  So, give Cosmic Ark a try.  You will see 
the starry background, but with no special hacks.


0.32:

Fixed: the file picker on the GameSelectTab hung in certain circumstances
Fixed: Pitfall2 rom was being ignored because of its odd size
Cleaned up the distribution by removing some unneeded junk


1.3 Acknowledgements

EMU7800 is a derived work of many people.  Please let me know if I need to
include someone else in this list.

Bradford W. Mott, Author of the Stella emulator
John Saeger, Author of the Z26 emulator
Andrew Towers, Author of "TIA Hardware Notes: A Small Opus on the TIA"
Ron Fries, Author of the Tiasound library
Erik Kovach, Author of the Stella property file 
Kevin Horton, Author of the 2600 bankswitching method paper


1.4 Known Issues/TODO List

ROM Problems:

Off Your Rocker: b6166f15720fdf192932f1f76df5b65d (screen rolls)
Star Fox (several scanline roll/jitter)
Tetris (one scanline fast jitter)
Challenge: 4311a4115fb7bc68477c96cf44cebacf  (doesnt work)
Laser Base (AKA World End): 130c5742cd6cbe4877704d733d5b08ca (doesnt work)
Pitfall II sound needs fixin'
Spider Fighter shows bug with logo at screen bottom

Misc TODO:

Use DirectInput; Find way to use analog joysticks for paddle games
Sound occasionally crunches; try to find better way to keep buffer full
Actually add Maria/7800 support
Fix Pitfall II sound
Address performance problem demonstrated in Yar's Revenge (display optimization?)
Add Supercharger support
Figure out weird "off by two CLK" bug in Grand Prix, probably multiple RESPs need emulating
Add game state saving


2.0 Installation

2.1 Prerequisites

To run EMU7800, you will need to have the .NET runtime installed onto
your computer.  Currently, this means that you will also need to be
running Microsoft Windows.  (Hopefully this will change in the near future.)
In any case, it is a free download from Microsoft's website.  To have
the capability to build from the included source code, be sure to install
the SDK (software development kit) as opposed to just the redistributable
runtime.

Sound and fullscreen features utilize Managed DirectX.  Again, a free download
from Microsoft.  If this is not installed, sound and fullscreen/direct draw
will be unavailable.  The emulator attempts to autodetect the presence of the
necessary DLLs; check the log messages on the Green Screen tab to be sure.

Both of these products can be download at the following URL:

<http://msdn.microsoft.com/downloads/default.aspx>

EMU7800 was developed on a machine with a Pentium 4 Celeron 1.7 GHZ processor.
This appeared more than adequate for emulator performance.  Your mileage may vary,
but I would be interested in hearing how well it works (or doesn't) on other machines.


2.2 Unpacking

If you are reading this now, chances are that you have already figured out how to
unpack the distribution ;)  Simply find a folder on your system, and unzip the
archive.  Inside, you should find a single executable target:

EMU7800.exe

To run in fullscreen direct draw mode, feed it the command line parameter
"/fullscreen".  This may be easier to do by creating a shortcut to the executable,
naming it something like "EMU7800 Fullscreen", and by specifying the option to
the executable mentioned above.  If Managed DirectX is not available on your
system, it will fall back to windowed mode.


2.3 Rebuilding from Source

In true GNU spirit, the source code for the emulator is included in the distribution.
To rebuild from source, simply start a command prompt (CMD.EXE), and change directories
to the src/ subdirectory of the EMU7800 distribution.  Then to rebuild, enter the
command:

C:\..EMU7800\src> csc @build.rsp

The EMU7800.exe executable should appear within the directory within a few moments.


2.3.1 ROMProperties

As in other emulators, there are properties that are associated with recognized roms.
In EMU7800, these are stored in ROMProperties.txt in the source directory.  This
file is embedded into the executable, so to make changes, the executable will need to
be rebuilt.  Since the text file is a bit terse, there is an associated MS Access DB
that is also included that makes updating the file easier.

After the Access DB is updated, export to ROMProperties.txt, then move this file
into the top-level src/ directory before rebuilding.


3.0 Running the Emulator

3.1 Keyboard Mappings

Key	Function

[ESC]	Quit the fullscreen version
[TAB]	Bring up the Control Panel GUI
[P]	Pause the emulator, any key to resume
[M]	Sound mute toggle
[F]	Show framerate

[R]	Game Reset Console Switch
[S]	Game Select Console Switch
[C]	Toggle between Color and B/W Console Switch settings
[1]	Toggle between A/B difficulty for left player
[2]	Toggle between A/B difficulty for right player

[F1]	Set keyboard to player 1 control
[F2]	Set keyboard to player 2 control
[F3]	Set keyboard to player 3 control
[F4]	Set keyboard to player 4 control

[F5]	Adjust display left
[F6]	Adjust display right
[F7]	Adjust display up
[F8]	Adjust display down

[F9]	Save per game settings (currently, only the display adjustments)

[Up Arrow]  Move up: joystick, booster grip
[Left Arrow]  Move left: joystick, booster grip, paddles, driving
[Right Arrow]  Move right: joystick, booster grip, paddles, driving
[Down Arrow]  Move down: joystick, booster grip

[LCTRL]	Trigger
[LALT]	Booster


Corresponding keys on keypad controller:

[7] [8] [9]	7 8 9
[4] [5] [6]	4 5 6
[1] [2] [3]	1 2 3
[*] [0] [/]	* 0 #


3.2 User Interface

3.2.1 Game Select Tab

The number of ROMs recognized in the roms/ directory is displayed in the lower
left corner.  To select a new directory, Click the Select ROM File button, and
navigate to the ROM directory of your choice.  When a ROM file is selected,
the rest of the directory contents will be scanned and will be presented
for subsequent selection.

3.2.2 Manual Viewer Tab

Some ASCII-based game manual transcriptions are available in the manuals/
directory, courtesy of <http://www.atariage.com>.  To add new manuals, an entry
will need to be made in the ROMProperties.txt attribute file.

3.2.3 Green Screen Tab

This is a commandline interface to EMU7800.  To see what commands are available,
enter "h" for help.

3.2.4 Game Settings Tab

Shows the attributes for the currently executing game.  ROMs not registered to the
ROMProperties.txt file can be loaded here.

3.2.5 README Tab

Shows this file ;)













 