===========================================================================
 LineWars II  -  reconstructed engine, ready to run
===========================================================================

This is LineWars II (1994, Patrick Aalto / Safari Software) with its engine
rebuilt from scratch in C. It runs as a single GAME.EXE (107,200 bytes) plus
GAME.DAT, and plays all nine missions plus the attract-mode demo: cockpit, HUD,
radar, scanner, Sound Blaster audio, music, and the config screen.

You do not need to compile anything. Everything here is prebuilt.


HOW TO RUN
---------------------------------------------------------------------------

1. Install DOSBox-X if you do not have it: https://dosbox-x.org  (free).
   On Linux: flatpak install flathub com.dosbox_x.DOSBox-X
2. Windows: double-click  Play.bat.    Linux: bash play.sh

That is the whole thing. Play.bat finds DOSBox-X, boots the hard-disk image in
this folder (LINEWARS2-HD.img, a bootable FreeDOS disk with the game on it), and
starts LineWars II. It works wherever you unzip this folder; no paths are
hard-coded.

If Play.bat says it cannot find DOSBox-X, either install it from the link
above, or unzip dosbox-x into a folder named "dosbox-x" next to Play.bat.


CONTROLS
---------------------------------------------------------------------------

At the menu, the arrow keys move the highlight and Enter selects. "View
Demonstration" is the default; the missions are 1 through 9.

In flight (numeric keypad, verified against the flight loop in the code):

  Up / Down arrow ...... pitch up / down
  Left / Right arrow ... yaw left / right
  Keypad 7 9 1 3 ....... the diagonals (pitch + yaw together)
  Keypad +  /  - ....... thrust up / down
  Insert / Delete ...... roll clockwise / counter-clockwise
  Alt .................. fire laser        (rebindable in Configure)
  Ctrl ................. fire missile      (rebindable in Configure)
  F1 ................... cycle the view page
  F2 ................... flip the view (look behind)
  F3 ................... target the next Cobra
  F4 ................... recenter the stick
  Scroll Lock .......... pause
  Esc .................. quit the mission


SOUND
---------------------------------------------------------------------------

The reconstructed Sound Blaster driver is a decompile of the game's own
BLASTDRV, and it keeps one hard constraint from the original: it only supports
DMA channel 1. lw2-boot.conf already sets the emulated card to SB Pro 2 at
port 220, IRQ 7, DMA 1, and exports BLASTER=A220 I7 D1 T4, which is what the
driver reads. Leave those alone and sound works.


WHAT IS IN THIS FOLDER
---------------------------------------------------------------------------

  Play.bat .......... the launcher (double-click this)
  LINEWARS2-HD.img .. a bootable FreeDOS hard-disk image with the game; what
                      Play.bat boots. 32MB FAT16, loads fast.
  LINEWARS2.img ..... the same thing as a bootable 1.44MB floppy, for real
                      hardware or floppy purists; game loads are slower
  lw2-boot.conf ..... the DOSBox-X settings Play.bat uses
  GAME.EXE .......... the game on its own (see "Running it your own way")
  GAME.DAT .......... the game's data file
  play.sh ........... the same launcher for Linux
  README.txt ........ this file
  LICENSE.md ........ the PolyForm Noncommercial License 1.0.0
  NOTICE.md ......... who owns what, and the permission this ships under

Both boot images use FreeDOS (freely redistributable) rather than MS-DOS, so
the whole folder can be shared without a licensing problem. The HD image was
built with tools/make_hd_image.sh in the repo: DOSBox-X's IMGMAKE makes the
FAT16 disk, FreeDOS SYS (kernel 2046) makes it bootable, and the game files
are copied in by a scripted install boot.


RUNNING IT YOUR OWN WAY
---------------------------------------------------------------------------

GAME.EXE and GAME.DAT are here loose for a reason: if you have real DOS
hardware, or a DOSBox with its own built-in DOS, you can just put those two
files together and run GAME.EXE. The game reads GAME.DAT from its own drive
and writes one small TRACE.LOG there (a record of what it did, handy if you
ever want to report a bug). Nothing else is read or written.

The bundled Play.bat boots LINEWARS2-HD.img instead, because a real DOS boot
works on every DOSBox-X build, including the "OS-free" ones that have no
built-in DOS, and the hard-disk image loads missions faster than the floppy.


WHAT THIS IS, AND WHAT IT ISN'T
---------------------------------------------------------------------------

The engine was reversed from the shipped binary and rewritten in C. It is
semantically equivalent to the original block by block, not a byte-for-byte
copy of your 1994 machine code: Open Watcom schedules registers differently
than the original compiler did. Where the project's tests report "0 mismatch,"
it means the compiled C and the original's executed machine code agreed on
every input tested, and each test records how many that was.


LICENSE
---------------------------------------------------------------------------

The reconstructed engine (GAME.EXE) is under the PolyForm Noncommercial
License 1.0.0; the full text is in LICENSE.md beside this file, and NOTICE.md
says who owns what. Play it, copy it, share it; no commercial use.

Required Notice: The LineWars II reconstruction is Copyright 2026 Fred Angstadt.

Required Notice: LineWars II is Copyright 1994 Safari Software and Patrick Aalto. It is distributed as freeware with the author's permission; commercial use requires his agreement.
