Oldskool demo fixing

While I was doing the oldskool PC stuff, the demo Crystal Dream by Triton was one of my inspirations:

It’s one of the first demos ever to have smooth polygons on PC, and great mod-based music.
It uses the same EGA trickery that I developed.

However, when I tried to run it on my 486DX2-80, I couldn’t get the Sound Blaster to work. I have an original Sound Blaster Pro 2.0, and neither SB nor SB Pro worked properly. Only internal speaker worked, which sounds horrible.
That’s odd, because I recall the music well. But I had a 386SX-16 at the time (with the same SB Pro card). So I turned off the turbo on my 486, and found that the SB gets detected properly in that case. You just can’t fully enjoy the demo, because the system is too slow that way.

So I figured there must be some kind of timing bug or such in the SB code. So I put it on my todo-list to find and fix the bug.
I made a start with it a while ago, but it turned out to be more difficult than just putting a bigger value in a loop counter somewhere. And I did not know anything about programming the SB anyway. I didn’t have the time, so I left it for now, but kept it on the todo-list for later.

Yesterday and today, I had some more time to look into it, and I finally managed to pinpoint the issue, and patch up the actual code.
It now works flawlessly on my 486DX2-80 in both SB and SB Pro mode: https://www.dropbox.com/s/df1h2w2zapo2kpv/crystfix.zip?dl=0

It still does not work properly in Dosbox though, but I think that is related to the way it uses DMA. It also won’t run properly under Windows 95, only from pure DOS. It might be because it does not reset the PIC timer rate to the default value… But I don’t know if and when I’ll ever look into that.

Oh, and no, obviously I don’t have the source code for this demo. I just did it the oldskool way: unpack the executables, disassemble, find the offending code, and patch the fixed code in there. Open Source? Pah, the open source community is a bunch of quiche eaters. You don’t need the source code to fix things. You think I had the source code for Endless City too?

This entry was posted in Oldskool/retro programming, Software development and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

3 Responses to Oldskool demo fixing

  1. Pingback: Triton’s Crystal Dream restored and preserved for posterity | Scali's blog

  2. Pingback: Random thoughts on programming, culture and such | Scali's OpenBlog™

  3. Pingback: Triton’s Crystal Dream – the final chapter | Scali's OpenBlog™

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s