• Please review our updated Terms and Rules here

Megarace for XT's

evildragon

Veteran Member
Joined
May 29, 2007
Messages
1,646
Location
Tampa Florida
Remember the old DOS game Megarace? I'm thinking of porting it to the XT. But it will come with a caveat, it's going to need an intriqet setup.

First, I'm planning an 8-bit ISA card complete with OPL3, a simple PCM chip (not sure which yet), and a video overlay circuit.

Basically the game will be stored on the XT, but it will require a special DVD player with 480p output, and an RS232 remote port so the XT can control it. The video overlay is going to require a VGA display and a VGA video card basically.

So what happens is, the DVD player plays the FMV background sequences, the XT plays the game code, music, sound effects, and the car graphics to overlay on the screen.. Using VGA mode X (320x240, but is double scanned to 640x480p 60Hz) I can genlock to the DVD player, and perhaps allow smooth movements of the cars sprites, so the 8088 isn't loaded too much.

(In my case an 8086 since my model 25 would be doing the work)..

This is all theory right now.. I think this can be pulled off.. Any opinions?

This is the game btw: http://www.youtube.com/watch?v=aLfNNBh8zGs

It was originally a DOS game too.
 
That's a crazy idea, but it's so crazy it just might work! I have a few questions. I might be wrong, but I noticed in the video that the game does seem to speed up and slow down in response to the player's actions. Are you thinking of using a DVD player that can repeat and/or skip frames in order to allow this? I have no idea if such things are available - do you have a specific DVD player in mind? Or are you thinking of building that part too (perhaps based on an off-the-shelf DVD drive)? Similarly with the VGA card - do you have a specific one in mind with the genlock feature? I have no idea how easy-to-find such a card would be but I don't think it's a standard feature.

It's definitely an interesting project, though - please do keep us updated about how it goes!
 
Why not put the FMV into flash memory or a usb stick, and keep the whole thing solid state ? I think that'd be easier than digging up/modding a dvd player. What did the original one use ? Laserdisc ?
patscc
 
I wouldn't have to mod a DVD player.. Some DVD players actually already have an RS232 port on it.. And yes, the track does speed up and slow down in some areas. The idea is, to find such a player that does this smoothly. You could command a 1.5x or 2.0x fast forward and slow speed playback.. Because the players with RS232 usually also have time code support, the XT could monitor what time it's on.

The original game was on CD-ROM, required a double speed drive.

As for genlocking VGA, you don't need any special card. The overlay circuitry can genlock easily just from Hsync and Vsync.. This is how the Sega 32X worked. All that's needed is a special magic color that tells the overlay circuitry this color is to be replaced with video.

Example of a DVD player with RS232: http://www.bhphotovideo.com/bnh/controller/home?sku=335759&Q=&O=&is=REG&A=details

http://qualityelectronics.net/media...08d6e5fb8d27136e95/d/v/dvd-v5000_rear_med.jpg
 
Last edited:
Yes it's expensive.. I don't know if there's a cheaper RS232 DVD player.

How else though would I do this? What flash based player has RS232 and can handle a smooth fast forward and slow speed playing?
 
I was just suggesting that it would be way cheaper to get it running, at least, using DVD content served from another PC. Then you can use RS232 or anything else you choose to control it and it will cost nothing most likely.
 
I was just suggesting that it would be way cheaper to get it running, at least, using DVD content served from another PC. Then you can use RS232 or anything else you choose to control it and it will cost nothing most likely.

Oh ok.. That's still kinda overkill though.. That's frankensteining it, lol.
 
I am, but I'm not willing to implement built in video playback features.

I'm only willing to build a card with an OPL3, PCM chip, and a video overlay circuit. Technically the video overlay could be external but they usually cost a couple hundred bucks and support multiple resolutions.. Making my own and supporting only one fixed frequency will be far cheaper, no scaling or deinterlacing required.

To make a card with built in flash and video playback capabilities, that's beyond me.
 
What flash based player has RS232 and can handle a smooth fast forward and slow speed playing?

A Laserdisc player! :) But seriously, you will probably not find a DVD player with the features you want for under $300 because it needs a larger framebuffer than necessary to handle variable-speed playback (MPEG-2 only has a keyframe once every 12/15/18 frames, and half the keyframes are bidirectional, so you need to decode a second or two in advance if you want to smoothly go forward and backward at variable speeds.)

The more I think about trying to do megarace on 8088, the more I think you can do it all internally without needing video overlays. You'd have to sacrifice a few things, such as maximum background playback framerate (15fps should be possible, higher if you can deal with a low-res background video) and # colors in the background video, and you'd probably need 100MB or more free on the hard disk to store the converted video. But hey, anything worth creating is worth sharing (in my opinion) and having it all internal means others could run your work.

Your only real problem is bandwidth, specifically moving video data to the card. 8088 has an upper bound on this; a typical 8088+CGA can only REP MOVS to video RAM at 240KB/s and there's nothing you can do to speed that up, so you have to plan accordingly. For example, let's say you had a 320x200@256 MCGA (64KB, linear addressing, 1byte = 1pixel) video mode you were targeting for this. 15fps means you'd have to transfer 960KB/s to the card just for the background video, and that's impossible for 8088.

But, we have alternatives. For example, let's now envision this as a 320x200@16-color VGA game (I know you wrote PS/2 Model 25 but just humor me for a minute). Each video frame is 32K, arranged in 4 bitplanes. Let's say you wanted to use 4 colors for background (2 bitplanes) and another 4 colors for the foreground (the other 2 bitplanes) This now cuts your minimum bandwidth requirement to 15 * 16K = 240KB/s which is much more reasonable. That is the minimum to keep the background going and you can update the other two bitplanes as free time/bandwidth allows (in Megarace, the cars move at a rate independent of the background video). Voila, you have an independent sprite layer.

Me personally, I think that's cutting it too close since we don't know how much extra bandwidth we're going to get from VGA card to VGA card (and you mentioned MCGA was your first target so you're stuck with a particularly slow card). If I were to implement megarace on an 8088, I would stick with CGA and use the VGA/MCGA palette registers to pick whatever 4 colors I wanted. I would slam the background video directly to the screen, and animate the sprites on top of it -- they will flicker when the background updates, but they will otherwise be visible (to see this technique in action, run If It Moves, Shoot It! by Broderbund).

With all ideas like this, the first step is running some speed tests just to see what is possible.
 
Oh ok.. That's still kinda overkill though.. That's frankensteining it, lol.

Actually, he has the only practical solution that will work for you -- a modern PC (or even a 10-yr-old one) can interface via RS232 effortlessly, and can play videos at any framerate in any direction or with random access nearly instantly. You could even use a video card on that PC that outputs composite or Y/C video natively. So, essentially, that $50 bucket of bolts has just now become your perfect "DVD" player for this project.

With that, you have your entire PS/2 Model 25 to simply draw pretty pictures in MCGA mode (but again, do some speed tests so you have realistic data that points to a maximum framerate you can achieve).
 
I'll see what I can achieve but I do have a Phillips DVD player that has the ability to fast-forward it two times smoothly with no hiccups it just doesn't have an RS-232 port.

It does have ethernet though.
 
Back
Top