New Old Lynx Tech Demos with source and tools

Started by TrekMD, May 13, 2013, 21:27:43 PM

Previous topic - Next topic

TrekMD

Atari Age user Solidcorp (a.k.a. D. Scott Williamson programmer of STUN Runner and Road Blasters for the Lynx) started a thread there about some great finds for the Lynx.  With his permission, I'm posting what he posted here:

So a couple weeks ago Matt Scott, a friend of mine who developed Lynx music for tons of released and unreleased games sent me some Lynx ROMs he found on floppies.  This stuff always gets me excited. One was the Simpsons digitized sound demo the other was 720WS.ROM.  I knew that 720 was in development while I was there (the coin op was in my office) and I got very excited thinking we might have an unreleased partially done ROM but you can't just run unprotected ROMs in Handy.  I asked for some help in another thread and LX.NET introduced me to Harry_Dodgson.  They helped me preview the ROMS in Handy and I now understand that they are both already in circulation.  The 720WS.ROM is a silent display of just the skateboard character in the center of the screen rotatable with the joypad, but what happened next was awesome...

Some of you may recall that I went to great lengths to recover the RoadBlasters, Toki, and S.T.U.N. Runner source materials in 2011 (http://atariage.com/forums/topic/188836 ... try2413123).  After recovering those materials I recovered other batches of Amiga floppies with adfread, cleaning disks with alcohol, adapting my ruby script to extract files and folders from the various versions of Quarterback used to create the opaque disk images, and after all that I had the source code and .bin files for all the technology prototypes I developed.

I wanted to view the prototypes on Handy but they were in BIN format.  For 22 years, the only way to see these demos was on a single VHS tape I made of them in 1991.  Harry gave me a tool he wrote to convert .BIN to .O which Handy can read, but it didn't work, so he sent me the source.  It was done a long time ago in a unix/mac/pc cross platform dialect of C that  Visual Studio didn't like but the code was straight forward, well written and documented so I ported it over to standard C.  I discovered that Handy jumps to the first byte loaded from a .O file and my code was written using several blocks with the start address typically somewhere in the middle, so I added code to patch the binary adding a 3 byte JMP START at the beginning of the code where needed (along with a couple other technical tweaks) and VOILA!  My demos were now runnable on the Lynx!  I can't tell you how exciting it is for me to see these demos come to life.  These were all exploratory Lynx technologies I wrote for game concepts or just for fun that  never found their way into released products (other than the sound drivers).

Here are the highlights of my exploits...

abtest0.bin.o was a true 3D drawing test (as opposed to pseudo 3D used in RoadBlasters and S.T.U.N. Runner) for a game idea called Alien Brigade, that temporary artwork is my head.  The source is dated 11/20/91.

fractest0.bin.o, fractest2.bin.o, and fractest3.bin.o are fractal tests.  I loved Rescue at Fractalus and wanted to do a terrain based game but that code was too slow.  Source dated 11/18/91 

polytest.bin.o is a combination of my triangle rendering routine and my Quartet digitized sample midi music driver, press a button to start the music.

quartest.bin.o is a simple sprite test and my Quartet digitized sample midi music driver, press a button to start the music.

rottest0.bin.o a sprite rotation test.  Sprites can be skewed vertically and horizontally which is all that is needed to pseudo rotate a sprite up to 45 degrees.  it is undated but was probably done around the time I did RoadBlasters.

showfroggy.bin.o shows a full color picture of a frog by multiplexing 4 bit (16 shade) red, green, and blue images.  It looks better on LCD, I wish Handy had a "phosphor" setting that would simulate LCD ghosting.  If I were to try to do it again, I would do it a different way.

testspri2.bin is a simple sprite test with my multivoice 7 bit digitized sound driver I wrote for Al Baker 7/12/1990, either for Pit Fighter or Bill & Ted.  Pressing any button plays voices saying "replay", button A plays at subsequently higher  pitches, B plays subsequently lower pitches.

textdemo.bin.o is a text demo I used to explore trying to improve text appearance by attempting to take advantage of the color masked pixels on the LCD to try to effectively triple the horizontal display resolution.  Windows clear type does this for LCD displays now, I should have patented that one (http://www.microsoft.com/typography/ClearTypeInfo.mspx).  It is undated, I was inspired when I put the LCD into an unsupported monochrome mode - it looked terrible otherwise.

The original thread can be found here:  New old Lynx technology demos with source and tools. 

Going to the final frontier, gaming...


TL

I just moved it to the right section ;)

I also removed the italics as it was hard to read and added the download link!

This is excellent news, I will be trying these out on Handy!

TrekMD

I knew I was forgetting something when I posted it!  The download!  LOL

Thanks!

Going to the final frontier, gaming...


TL

More from D. Scott Williamson:

DIGISND.zip

This archive contains folders from my Amiga and my ST restores.

The ST folder contains most of the utilities I wrote on the game development at Atari.  The .prg files should run on an ST or STEEM emulator and the source code is all included in the .s and .q files.  I used Assempro for ST development.  None of it is too large or complex, especially if you are familiar with 68000 assembly and the ST.  I did not include Replay (useless without the cartridge really, use Audacity now), and Quartet which is copyrighted.  I think Quartet works in STEEM so it could be used if you had it.

In the Amiga folder are the source and bin files to 1,2,3, and 4 voice digitized music drivers, as well as simple 7 bit sample playback routines.  As you can see from the demo, playing back 4 voice digitized audio can be demanding on the Lynx.  It occasionally sounds a little crunchy or glitchy in Handy, I don't remember it sounding like that on a Lynx.  It would be nice if someone could verify that.  It may be that the interrupt service routine may be too dynamic a load for Handy at times.

The Quartest.bin.o example has color buffer writes enabled to show how much CPU is being consumed by the audio playback.

I'm not seeing the digitized sound routines I used in Toki and were then used in other games.  They used a 4 bit delta compression that could stream directly from cartridge ROM.  It was driven by a 4 bit delta lookup table and we tried everything in there from linear to powers of two, to Fibonacci numbers   I don't see it in here but the compression is probably in the ST code.

Quartet uses .set files (collections of instrument samples) and .4V (sequence like midi) files.  LYNXSPL.PRG converts 8 bit samples to 7 bit zero terminated samples.  QTET2LNX.TOS will convert quartet files to a .QLX file for the Lynx.

You can use the code, if you do give me credit.

~Enjoy!

D. Scott Williamson

TL

ALIEN BRIGADE.ZIP

Alien Brigade was a concept for an alien flight shooter over fractal terrain.  Some tests were done but it never got off the ground.  This test is for positioning objects.  Other tests coming later were the fractal terrain generator and renderer.

Attached is the source for the object positioning code.  This really is not anything terribly impressive.

~Enjoy!

D. Scott Williamson

------------------------------------------------------------------------------------------------------------------------------------------------------------------

FRACTAL.ZIP

Here is the source code and artwork for the fractal terrain experiments.

~Enjoy!

D. Scott Williamson

------------------------------------------------------------------------------------------------------------------------------------------------------------------

FROGGY.ZIP

Here are the sources and artwork to my extended or full color tests on the Lynx.  It looks way better on the LCD and even on the captured VHS than on the emulator but I wouldn't want to use it as is in a game.  It achieved 12 bit color by showing 4 bit red green and blue images in rapid succession.  The problem was really that with each color only showing 1/3 the time the image was 1/3 as bright overall and flickery.  If I were to try it again, I would do what Spectrum 512 did on the ST and create a bitmap and set of palettes designed to reload the palette on each line then "chase the beam" by setting colors mid-line.  Of at least swap between three low color images to achieve more than 4 bit color resolution without sacrificing so much brightness.  I think someone else has done that.

~Enjoy!

D. Scott Williamson

------------------------------------------------------------------------------------------------------------------------------------------------------------------

TL

POLYGONS.ZIP

Here are my original sprite polygon routines and the same routines working with the Quartet driver.  If you want to build the version with the music you will need the quartet.zip too.

I'm a little embarrassed by the grandiose comment in the source, not to mention my spelling but I left it - I was 22 and full of joy working at Atari.

Others also obviously came and made polygon drivers and games, but at the time I wrote these I hadn't heard of any.  My good friend John Sanderson later wrote both Hard Drivin' and Steel Talons on the Lynx - quite miraculous.

~ Enjoy!

D. Scott Williamson

------------------------------------------------------------------------------------------------------------------------------------------------------------------

ROTATION.ZIP

Sprite rotation on the lynx using hskew and vskew.  It looks like the vskew was done manually.  It worked but it probably wasn't that fast, but it may have been able to rotate a playfield to make a game like Assault.

~Enjoy!

D. Scott Williamson

------------------------------------------------------------------------------------------------------------------------------------------------------------------

TEXT.ZIP

This was a successful approach to use the pattern of the red, green, and blue subpixels of the LYNX display to effectively triple the horizontal resolution of monochrome fonts.  To get the full effect of what I was trying to accomplish run testtext.bin.o on Handy in full screen Lynx LCD emulation mode.  Press 1 to hflip the image which defaults to scale of 200 (x2) and you will notice that the colorful characters look pretty much the same when flipped.  But cursor around and decrease the horizontal and vertical scale to 100 (x1) and the small letters become clearer, press "1" to hflip the sprite (you may need to slide it to the right a little) and it looks really screwed up when hflipped.  I was inspired when I put the LCD into the unsupported monochrome mode and was rendering to monochrome subpixels. I just never got around to using it in a game.

~Enjoy!

D. Scott Williamson