============================================================================
 JZINTV  -- Joe Zbiciak's Portable Intellivision Emulator 
============================================================================

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

Hello, and welcome to jzIntv for Windows.  This document covers 
details specific for building jzIntv for Windows.  For general 
documentation, please see the main "README".

So far, jzIntv has been built for Windows via two different methods:
Cross compiling from Linux, and direct compilation under Windows.
In both cases, the Mingw32 "GCC for Windows" compiler was used.
Mingw32 can be gotten here:

    http://www.devolution.com/~slouken/SDL/Xmingw32/index.html

This document is divided into two sections:  How to cross-compile
and how to native-compile jzIntv.

In either case, before you start, you need to get a couple items.
Make sure to get the appropriate version for your platform.

 -- The Mingw32 compiler.

    http://www.devolution.com/~slouken/SDL/Xmingw32/index.html

 -- SDL 0.10.x built for Win32 / GCC

    http://www.devolution.com/~slouken/SDL/download.html


Let me know how this process goes for you.  Whether you have problems,
or you successfully build jzintv, email me at this address:

              im14u2c@primenet.com  (Joe Zbiciak)

Thanks!

---------
 Credits
---------

Special thanks to Frank Palazzolo <palazzol@home.com> for actually
building jzIntv directly under Windows, and providing detailed 
feedback on what I needed to fix.

-------------------
 Cross Compilation
-------------------

Currently, this is the easiest way to build jzIntv for Windows, 
since currently, that's the only way _I_ can build jzIntv for
Windows.  :-)  

Install the Mingw32 cross-compiler and SDL Win32 libraries on your system
in a separate directory from your normal compiler tools and libraries.
(By default, they like to install in /usr/local/win32, which seems
reasonable.  Indeed, that's what my makefile is set to.)

Now, change directories to the "src" directory and edit "Makefile.w32x".
This is the cross-compilation Makefile which is meant for cross-compiling
jzIntv for Windows from a Unix platform.  Mainly, you'll need to edit
the variable "P" which should give the path to where Mingw32's "bin"
director is, as well as edit "SDL_DIR" to point to the directory where
SDL's lib and include directories are.

For example, suppose Mingw32 and SDL are in /usr/local/cross-compile
instead.  Edit Makefile.w32x like so:

    P         = PATH=/usr/local/cross-compile/bin:$$PATH; export PATH;
    SDL_DIR   = /usr/local/cross-compile


Next, edit "Makefile" and make sure that "CC" points to the native
compiler on your platform.  jzIntv's build process needs to build a
native program named "mk_tbl", which it uses for generating look-up
tables.  So, if your build process dies when making "mk_tbl", 
double check your primary "Makefile".

At this point, you should be ready to cross-compile jzIntv for Windows.
Type the following magic incantation, sit back, and relax:

    make -f Makefile.w32x

If the make completes successfully, you should be left with a shiny 
new "jzintv" binary in the "bin" directory.  If not, double check
your settings and try again.  If you have problems, give me a holler.

--------------------
 Native Compilation
--------------------

This section is a little more sparse, since I personally have not
attempted native compilation of jzIntv under Windows.  However,
Frank Palazzolo has, and he's shared his experience with me.
If you try this, let me know how it turns out, and also let me
know of any inaccuracies in this section.  

[Note:  At this time, "Makefile.w32" hasn't been directly tested.
It has been modified according to some feedback I've received
from Frank, but it needs to be tried out.  Please, please, PLEASE
email me if you try it out, to let me know if it works or not! --JZ]

Install the Mingw32 native compiler and SDL Win32 libraries on
your system.  Make note of where they install, and make sure 
Mingw32 is in your path.  (If you also have DJGPP installed, make
sure it is _not_ in your path when you build jzIntv, otherwise
much confusion will ensue.)

Now, change directories to jzintv's "src" director and edit
"Makefile.w32".  This is the native-compilation version of the Makefile
for compiling jzIntv directly in a Windows-hosted environment.
The only change you should need to make is the setting for SDL_DIR.
Point this to the directory where SDL's include and lib directories
are.

For example, suppose SDL is installed in E:\sdl-0.10.0.  You'd 
change SDL_DIR like so:

    SDL_DIR   = E:\sdl-0.10.0

At this point, you should be able to type "make" and build jzIntv.
Good luck!

Email me <im14u2c@primenet.com> if you run into difficulties.


