==============================================================================
 Source Code Structure for jzIntv
 J. Zbiciak
==============================================================================

Introduction
------------

This should give you an idea when I last touched this document:

  $Id: source.txt,v 1.1.1.1 1998/12/28 04:56:45 im14u2c Exp $


This document aims to describe the overall layout of the jzIntv emulator.
It may be entirely accurate, or it may be completely out of date.  I'm 
notoriously poor at keeping documentation up to date, so I strongly 
suggest you refer to the source code for up-to-the minute information.

I'm trying like mad to keep most of the source code's meaty documentation
in the source itself.  Nonetheless, it doesn't hurt to have a top-level
document which provides a bit of a road map to my source.  That's what
this file is for.

Regards,

--Joe



Source Files
------------


First, let me do the obvious.  Here is a listing of all of the jzIntv
C source files as they currently exist, and a quick description of each.
I've divided these files into three categories:  Utility programs, Library 
routines, and Core Emulator source files.  A fourth section, Platform-
Specific Drivers, is empty, but forthcoming.


Utility programs:

 -- de_res.c    
    Takes an INTVPC Resource file and decodes it, giving a complete
    directory tree.

 -- re_res.c
    Rewrites an INTVPC Resource file, replacing cartridge ROM images. 
    Eventually, this program will be more like "zip" or "tar", in that
    it will build a new Resource file from a directory tree, and thus
    be the true complement to de_res.c

 -- de_dcl.c
    Decodes a ROM image in packed 8+2 format into padded 16-bit format.  

 -- re_dcl.c
    Packs a ROM image that is in padded 16-bit format into 8+2 format.

 -- mk_tbl.c
    Makes lookup tables from bit-pattern descriptions.

 -- jzintv_tb.c
    Eventual CP-1610/Intellivision testbench.

 -- test_cpu.c
    Current CP-1610/Intellivision hacked testbench.

Library routines/Utility functions:

 -- res_file.c
    INTVPC Resource file manipulation routines.

 -- data_fmt.c
    Data-format conversion functions, including routines for handling the 
    specialized file formats found in the INTVPC Resource files.

 -- file_util.c
    Generic file-handling functions, such as "file exists", "dir exists",
    and string-escaping functions.

 -- dasm1600.c
    CP-1600 Disassembler, written by Frank Palazzolo.  This version has been
    modified slightly to work as a library function called by test_cpu.

Core Emulator Files:

 -- cp_1610.c
    The main CP-1610 execution loop.  (Note:  See "cp_1610.txt" for
    more extensive documentation regarding the CP-1610 simulator.
    I got really fancy on it, ok?)

 -- op_decode.c
    Opcode decoder module for the CP-1610.

 -- op_exec.c
    Execute functions for the CP-1610 CPU.

 -- periph.c
    Peripheral event backplane.  All non-RAM peripheral events pass through
    this backplane.  This should allow multiple jzIntv emulators to link 
    up, by unifying events on this backplane. 

 -- stic.c
    STIC emulation.  (TBD)

 -- ay891x.c
    AY-8194 emulation. (TBD)

 -- more to come.

Platform-Specific Drivers

 -- this is empty.

