dos33fsprogs/games/lemm
2022-09-06 00:30:11 -04:00
..
graphics lemm: add danger to level7 2022-04-12 22:38:43 -04:00
hr_graphics lemm: update levels to be playable 2022-04-19 21:36:44 -04:00
hr_music lemm: hook up music 2022-04-22 01:56:34 -04:00
music lemm: hook up level9 music 2022-03-30 18:35:02 -04:00
sounds lemm: everything now fits, barely 2022-03-15 18:49:04 -04:00
audio.s lemm: add sound effect 2022-03-15 16:37:02 -04:00
decompress_fast_v2.s
draw_door.s lemm: make level2 winnable 2022-03-17 21:33:58 -04:00
draw_flames.s lemm: exit flames on l5 are green 2022-04-09 22:10:09 -04:00
draw_lemming.s lemm: improve exploding sequence a bit 2022-04-12 23:21:51 -04:00
draw_pointer.s lemm: keep pointer on screen 2022-04-04 19:17:37 -04:00
generate_common.c lemm: move some routines into loader 2022-03-16 23:40:34 -04:00
gr_fast_clear.s lemm: clean up the text a bit 2022-03-09 17:04:19 -05:00
gr_offsets.s
hardware.inc lemm: more work on iic vblank 2022-04-14 16:12:21 -04:00
hello.bas lemm: digging vaguely works 2022-03-11 00:53:18 -05:00
hgr_14x14_sprite.s lemm: update for proper pointers 2022-03-13 01:28:37 -05:00
hgr_box.s lemm: add miner support, move some things around 2022-03-27 15:40:20 -04:00
hgr_hlin.s lemm: draw menu to both pages 2022-03-14 23:22:32 -04:00
hgr_partial_restore.s lemm: keep pointer on screen 2022-04-04 19:17:37 -04:00
hgr_sprite.s lemm: more adjustment of various jobs 2022-03-31 00:10:00 -04:00
hgr_tables.s lemm: move some things to qload to free up space 2022-03-28 00:53:34 -04:00
hgr_vlin.s lemm: draw menu to both pages 2022-03-14 23:22:32 -04:00
hgr.inc lemm: add level6 2022-03-28 00:52:40 -04:00
hr_level1.s lemm: add hr expansion 2022-04-17 19:28:29 -04:00
hr_level2.s lemm: hr_level2 was still slightly too big to fit 2022-04-17 22:01:56 -04:00
hr_level3.s lemm: add hr expansion 2022-04-17 19:28:29 -04:00
hr_level4.s lemm: add hr expansion 2022-04-17 19:28:29 -04:00
hr_level5.s lemm: add hr expansion 2022-04-17 19:28:29 -04:00
hr_level6.s lemm: hook up music 2022-04-22 01:56:34 -04:00
hr_level7.s lemm: update levels to be playable 2022-04-19 21:36:44 -04:00
init_level.s lemm: support speeding up release 2022-03-23 21:49:58 -04:00
interrupt_handler.s lemm: some fixes to music 2022-03-19 21:48:03 -04:00
intro_level.s lemm: switch to other iic vblank method 2022-04-15 08:18:47 -04:00
joystick.s lemm: pointer vaguely works 2022-03-10 00:45:51 -05:00
keyboard.s lemm: let you switch jobs if digging, etc 2022-04-19 21:27:36 -04:00
lc_detect.s lemm: time counts down 2022-03-08 00:49:10 -05:00
lemm_test.s lemm: add level5 2022-03-15 15:16:37 -04:00
lemm.s lemm: exit flames on l5 are green 2022-04-09 22:10:09 -04:00
lemming_status.inc lemm: make draw lemming use jump table 2022-03-27 01:58:39 -04:00
letsgo.s lemm: everything now fits, barely 2022-03-15 18:49:04 -04:00
level1.s lemm: more hooking up proper job decrement 2022-04-02 23:52:15 -04:00
level2.s lemm: add hr expansion 2022-04-17 19:28:29 -04:00
level3.s lemm: more hooking up proper job decrement 2022-04-02 23:52:15 -04:00
level4.s lemm: handle falling into the water 2022-04-09 21:22:18 -04:00
level5.s lemm: exit flames on l5 are green 2022-04-09 22:10:09 -04:00
level6.s lemm: add animation to level6 2022-04-09 01:05:11 -04:00
level7.s lemm: add danger to level7 2022-04-12 22:38:43 -04:00
level8.s lemm: update all levels to support accurate job count 2022-04-03 00:13:17 -04:00
level9.s lemm: update all levels to support accurate job count 2022-04-03 00:13:17 -04:00
level10.s lemm: update all levels to support accurate job count 2022-04-03 00:13:17 -04:00
load_music.s lemm: some fixes to music 2022-03-19 21:48:03 -04:00
Makefile lemm: update levels to be playable 2022-04-19 21:36:44 -04:00
move_lemming.s lemm: improve exploding sequence a bit 2022-04-12 23:21:51 -04:00
NOTES lemm: fix bug where it'd crash if you get too close to ceiling 2022-04-03 01:03:13 -04:00
particle_hgr.s lemm: add hr expansion 2022-04-17 19:28:29 -04:00
pointer_sprites.inc lemm: update for proper pointers 2022-03-13 01:28:37 -05:00
pt3_lib_detect_model.s
pt3_lib_mockingboard_detect.s lemm: get music working on IIc 2022-04-13 21:35:48 -04:00
pt3_lib_mockingboard_patch.s
pt3_lib_mockingboard_setup.s lemm: get music working on IIc 2022-04-13 21:35:48 -04:00
pt3_lib_mockingboard.inc
qboot_sector.s lemm: was too big, load with qboot 2022-03-15 15:33:50 -04:00
qboot_stage2.s lemm: separate level1 file working 2022-03-17 13:56:03 -04:00
qboot.inc lemm: everything now fits, barely 2022-03-15 18:49:04 -04:00
qload.s lemm: move some stuff to qload to free up some room 2022-04-09 22:02:37 -04:00
README lemm: improve exploding sequence a bit 2022-04-12 23:21:51 -04:00
release_lemming.s lemm: particles start at right place 2022-03-24 20:27:20 -04:00
simple_sounds.s lemm: minor comment fix 2022-03-24 16:40:15 -04:00
text_print.s lemm: centralize printing outtro info 2022-03-22 17:13:38 -04:00
title.s lemm: add hr expansion 2022-04-17 19:28:29 -04:00
TODO appleiibot: add elite 2022-09-06 00:30:11 -04:00
update_menu.s lemm: update so we update number of jobs left 2022-04-02 23:28:45 -04:00
update_time.s lemm: improve exploding sequence a bit 2022-04-12 23:21:51 -04:00
update_timer.s lemm: improve exploding sequence a bit 2022-04-12 23:21:51 -04:00
wait_a_bit.s lemm: automatically start after pause at title screen 2022-03-14 23:45:15 -04:00
wait_keypress.s
wait.s lemm: time counts down 2022-03-08 00:49:10 -05:00
zp.inc lemm: update so we update number of jobs left 2022-04-02 23:28:45 -04:00

lemm -- a Lemmings proof-of-concept for the Apple II

by Vince `Deater` Weaver <vince@deater.net>
http://www.deater.net/weave/vmwprod/lemm/

Background
~~~~~~~~~~

Lemmings is a 1991 game by DMA Design originally for the OCS Amiga but
ported to many other platforms

This is a proof of concept of what it would look like on an Apple II
from 1977

(NOTE: while it might technically be possible to play this on an Apple II
from 1977, you would need to upgrade it to 48k of RAM which would have been
astronomically expensive before 1980 or so, and you'd need a Disk II drive
with DOS3.3 which again is around 1980, and for best results you want
64k of RAM (a language card or Apple IIe) and Mockingboard for sound which 
would push things more toward 1983.

How was it Made
~~~~~~~~~~~~~~~

This was made purely from observing gameplay and taking screenshots of
the DOS and Amiga versions.  No reverse-engineering or asset decoding
happened.

The music files are YM5 files found on the internet that were presumably
captured from the Atari ST version of the game.

I developed the game in 6502 assembly language on Linux using the ca65
assembler.  Graphics were manipulated using the Gimp.


What's missing
~~~~~~~~~~~~~~

This demo only has 10 levels, all single-screen.  I think it might just be
barely possible to have scrolling backgrounds like the original, but it
would take a major re-write of the entire game engine.

The bridge builder's bridges aren't right.  Due to Apple II limitations
it's hard to get properly sized bridges.

You can't really play speaker sounds in the background on Apple II, so
the sound effects are limited to "Let's Go" at the beginning.

The one-way digging is a bit of a hack, and non-diggable surfaces are
not supported.

Mouse support is missing (I don't have a mouse, also mice are often
slot#4 which would conflict with the Mockingboard).  Keyboard support
is a bit awkward, but that's due to limitations of the keyboard on
Apple II/II+.  I could probably improve this with separate code paths
for IIe/IIc or by using the timers on the Mockingboard but not sure
it's worth the trouble.

Novelty
~~~~~~~

This actually isn't the first 8-bit port.  I'd like to think it's nicer
looking than the C64 or ZX-Spectrum ports, but those ports have scrollable
backgrounds and a full set of levels.


Code Layout
~~~~~~~~~~~

Qkumba's QBOOT fast track-at-a-time loader is used for loading data from disk.
Raw tracks are written to disk, there's no operating system (no DOS33 or ProDos)
involved.

The QBOOT bootsector loads two sectors to RAM from boot at $800, then
it loads the second-stage loader and library code to 4k at $1000.
HGR (280x192x6 color) graphics are 8k at $2000, and HGR2 (page2, used
for background) is another 8k at $4000.  The LEMM game engine lives in 12k
starting at $6000.  Each level has to fit in 11.5k or so (qboot can't
load up against the $C000 I/O area) starting at $9000.

If a language card (16k RAM expansion) is available, then
the "let's go" sound sample is stored in 4k at Language Card $D000 bank 0
and 12k of BANK1 is used for decoded music data.

Unlike my PT3 player which can play compact tracker music in roughly 3k,
I could only find the lemmings music in YM format.  This compresses nice
too (and is simple to play) but to decompress the songs it takes roughly
14 channels * 50Hz = 700 bytes per second of music, so you only get about
10s of music fitting in the language card.  To make things work the song
is broken up in chunks and every 5s or so more music has to be decoded.
While the current buffer is playing the next buffer is decoded so there
are no glitches in the music, but this takes more than a video frame to
do so there's an occasional glitch in gameplay as this happens.

Since we are constantly playing music from the language card, we can't
easily use any ROM routines so useful routines like WAIT and HPOSN
are re-implemented in RAM.


Code Description
~~~~~~~~~~~~~~~~
TODO



Memory Map
~~~~~~~~~~
	$0000-$00ff  = zero page
	$0100-$01ff  = stack
	$0300-$03c0  = disk lookup tables
	$0400-$07ff  = text page 1
	$0800-$0bff  = hgr lookup tables
	$0c00-$0fff  = particle effects? (check this)
	$1000-$1100  = disk track loading code
	$1200-$1f00  = common library routines
	$2000-$3fff  = HGR page 1
	$4000-$5fff  = HGR page 2
	$6000-$8fff  = LEMM game engine
	$9000-$Beff  = Current Level
	$C000-$Cfff  = I/O area
	$D000-$Dfff  = (bank 0) sound sample for "let's go"
	$D000-$F000  = (bank 1) decoded music data