|
|
||
![]() |
||
|
|
||
|
|
||
|
|
![]()
DRAGON'S LAIR II PC CONVERSION -
March 20, 2000
Written & Developed by
Rob DiNapoli |
Additional hacking by
Andrew Hepburn
INTRODUCTION
For your laser disc game playing enjoyment, here is a PC port of the Dragon's Lair 2 ROM. The DL2 ROM was already 8088 based; the same as your modern day PC. Some (actually, a lot) changes have been made to the DL2 ROM to enable it to work on a modern PC. You can read a little about these below...PARTS NEEDED
1) A PC, of course - Any old computer should do, but it must have a com2 port (and optionally a printer port available at 0x378). Be sure to read the question section below for delay tweaking that may be needed...DOWNLOAD
Full documentation including theory of operation and more are included in the download. If you have any questions, please contact Robert DiNapoli or Andrew Hepburn.
UPDATE!
The original hack by Rob DiNapoli worked only with the second pressing of the DLII laser disc (part # c910-00002-00). Andrew Hepburn went thru Rob's hack and added support for the first pressing as well. (part # c910-00001-00). Be sure to read the notes below to find out what .com file you should use.
DOWNLOAD DL2CONV.ZIP NOW! (396k)
THEORY OF OPERATION (and other notes)
There are now 8 versions of the .com file included in the download. They are as follows:
DL2v1_J_1450.com
- LDP-1450 version with joystick support for the 1st pressing disc.
DL2v1_J_2000.com - LDP-2000 (or
compatible) version
with joystick support for the 1st pressing disc.
DL2v1_K_1450.com - LDP-1450 version with keyboard support for the 1st pressing
disc.
DL2v1_K_2000.com - LDP-2000 (or
compatible) version
with keyboard support for the 1st pressing disc.
DL2v2_J_1450.com - LDP- 1450 version with
joystick support for the 2nd pressing disc.
DL2v2_J_2000.com - LDP-2000 (or
compatible) version
with joystick support for the 2nd pressing disc.
DL2v2_K_1450.com - LDP-1450 version with keyboard support for the 2nd pressing
disc.
DL2v2_K_2000.com - LDP-2000 (or
compatible) version
with keyboard support for the 2nd pressing disc.
(all versions above are based of DL2 Rev 3.15)
Plug
the LDP into com2 on the PC. Run the appropriate .com file - the DL2
introduction should immediately begin...
Here are the keyboard settings:
C
- Insert Coin
1 - Player 1 start
2 - Player 2 start
Space - Sword
M - Maintenance Mode
Up, Down, Left, Right arrows to move (The keys on the keypad will not work)
JOYSTICKS.... AND OTHER CABINET RELATED STUFF:
Ooh, 'tis a cruel trick IBM played upon us with their analog joystick port... DL2 uses the IBM joystick port in the ROM code. To keep things short and simple, I'm going to avoid a detailed discussion of the joystick port, but I will leave you with a little background. Suffice it to say: it's *EVIL*.
'Analog' type joysticks use a variable resistor inside (like a volume control knob), which varies depending on the position of the joystick. All PC joysticks are analog.
'Digital' type joysticks are relatively simple. There is a switch for each direction - each direction is either 'on' or 'off'. The DL2 joystick is digital. (Almost all arcade joysticks are digital.) There is hardware on the DL2 board that converts the on/off position to a value that is passed to the joystick port.
Repeat after me: "Analog is evil." Good. Why? Plugging the same joystick into a different speed computer will yield different values when reading it. Plugging 2 different joysticks into the same computer will yield different values when reading them. That's why you have to calibrate joysticks on a PC, and it makes for a lot of trouble for game programmers. I really didn't want to have to write a calibration routine in assembly...
How do we work around this without too much pain? We use the parallel port! The parallel port has plenty of inputs; we need eight. 4 for the directions (up, down, left, right), and 4 for buttons (1 player, 2 player, sword, coin). Maintenance mode is triggered by a combination of the coin switch and the sword button, or the coin switch and 1 player button at the same time.
In order to use this, you must set the parallel port on the PC to 'Bi-Directional', or 'EPP' mode.
Here's how to wire it:
| Parallel Port | DL2 Joystick |
| Pin 2 | Up |
| Pin 3 | Down |
| Pin 4 | Left |
| Pin 5 | Right |
| Pin 6 | 1 Player |
| Pin 7 | 2 Player |
| Pin 8 | Sword |
| Pin 9 | Coin Switch |
| Pin 17 | Ground |
Note: I don't own a DL2 cabinet. (This is wired into my DL cabinet) Make sure that there is no voltage present between the coin switch and ground. I can't imagine why they would do this, but who knows what these crazy game designers did...
Other cabinet notes: The move 'beeps' come from the PC speaker. You have to wire the PC speaker into the main cabinet speakers. And while on the subject of sound, you'll need to get a small audio amplifier and wire it in-between the laserdisc player audio out, and the cabinet speakers. A Radio Shack one should suffice.
ROM HACKING:
You can look at dl2tech.txt for some of the things going through my mind while hacking... Most of it might not make sense, unless you know some assembly and are further interested in hacking the ROM...
Some of the hacks that were needed:
* Being a ROM file, it nicely decided to situate itself at 1000:0000. A PC loads a .com file wherever. A few places in the .com file required making the code use register CS, instead of a hard coded 1000. The ISR routines were particularly insidious to find the first time around...
* No way were the joystick routines even going to attempt to work... I just rewrote the input routines and stuck them at b065 (joystick) and b100 (keyboard).
* Input was a little too fast on a modern machine. The program tried to read from the buffer too fast, and write characters out too fast. Simple delay routines fixed this, located at b000 and b030
* A lot of the addresses, such as lookup tables and text offsets were not adjusted when converting the ROM image (offset 0) to a .com file (offset 100). These had to be manually found and adjusted (*groan*)
* There's a lot of code in the ROM that is leftover from development and not used. This includes code to use Com port 1, an exit routine, and code for laserdisc player commands that are not used.
* Oh, Most insidious of evils... When converting the ROM data to a .com file, data addresses get adjusted by $100. During the conversion, about 10 of the ROM data moves decided to offset by $100 also. This led to crashes during certain moves of the game... Took about 3 hours to find this mess...
MR. GRUMPY ANSWERS YOUR QUESTIONS:
Q:
Hey, can you make this work with a normal PC joystick?
A: It would really, really require a lot of work...
A: No.
Q:
Please?
A: No.
Q:
I have the 'other' version of the DL2 disc. What do I need to do??
A: Go back, read the documentation, and use the proper ROM file
Q:
I don't have a Tercel, but I just want to test you. What is the proper torquing
procedure for Tercel head bolts?
A: 22 ft-lbs first pass, 36 ft-lbs second pass, an additional 90 degrees on the
3rd pass. (Yes, I pulled that from memory. Scary, yes?)
Q:
Why is there a slight pause before searching?
A: The delay routine that I inserted is too long for your computer. I was
testing on a 400mhz machine. See the 'Delay Tweaking' section for how to fix
this. There is no harm in the delay being too long; it's just annoying.
Q:
Why does keyboard / joystick input feel sluggish?
A: See the previous question
Q:
Hey, I made it to Level x, and all of a sudden the game 'froze'.
A: Most likely, you set the delay time too low.
Q:
I suck at this game. Can you tell me how to get infinite lives?
A: See the section below, marked 'I want to cheat'.
Q:
What guarantee do I have that this will work for me?
A: None. In fact, there's the possibility that you can make your parallel port
go *poof* should you decide to pump voltage through it.
Q:
So, there's no warranty, express or implied?
A: Absolutely none.
Q:
Can I sell this program in hopes of making lots of money?
A: I really hope that no one would buy it from you, since it's available for
free.
A: Feel free to give it away though :)
A: It *is* still based on a ROM image, and maintains copyright by its respective
holders.
A: No.
If the keyboard/joystick input feels sluggish, or there are delays upon searching, then you can adjust the delay routines in the program. As-is, the program runs fine on a 400mhz machine, and should run ok within 100mhz or so either way. If you want to run the program on a much faster / slower machine, then you must adjust the delay routines.
There are two values that need adjusting. They default to 0230h and 0150h. When testing on a 100mhz laptop, values of 0080h and 0150h worked ok. (These are not optimal values, I just chose them at 'random'; ie: you can probably lower the second number also...). Basically, the bigger the number, the longer the delay. Faster machines, need bigger numbers...
To
change the values, execute the following commands from a dos prompt:
(Yes, this seems lengthy, but it's really a simple process...)
Type: debug dl2k1450.com (press return) - substitute dl2k1450.com with the file
to edit...
The system will respond with a '-' character.
Type: a b001 (press return)
The system will respond with xxxx:b001
Type: mov cx,0080 (press return) - substitute 0080 with the delay value you
want...
The system will respond with xxxx:b004
Press return.
The system will respond with a '-' character.
Type: a b031 (press return)
The system will respond with xxxx:b031
Type: mov cx,0150 (press return) - this is the second delay value mentioned
above...
The system will respond with xxxx:b034
Press return.
The system will respond with a '-' character.
Type: w (press return) - This writes the changes to disc.
Type: q (press return) - This quits the debug program.
*You did remember to make a backup copy of the file before you changed it, right?*
Q:
So what happens if I put in numbers that are too big?
A: Searches are slow, and the keyboard / joystick input seems sluggish.
Q:
And if the numbers are too small?
A: Searches won't complete, or the program will reboot itself constantly. If the
delay time is only slightly too small, the game may play, but occasionally
'freeze' at a random spot.
I WANT TO CHEAT:
Well, I was going to build a cheat mode into the ROM image and enable it with a keyboard key, but I really feel that this takes all the fun out of the game... So, if you want the cheat mode, you're going to have to do a little work. It's similar to the delay tweaking procedure above. Keep in mind, that once you edit the ROM image, it stays changed. Make sure you have a backup copy.
From
a dos prompt:
debug dl2k1450.com (press return)
a 2a76 (press return)
nop (press return)
nop (press return)
nop (press return)
nop (press return)
press return
w (press return)
q (press return)
KNOWN PROBLEMS:
* There is a problem with adding credits while in the middle of a game... I got it to work - sometimes. Back to those crazy designers mentioned above... I haven't fully deciphered all the code yet, and the coin detection routines seem to be a little odd, which makes this unsuitable for use in an arcade...
*
It doesn't save the preference settings. Maintenance mode works fine, and allows
you to change the settings; there is just no way to save them.
DISCLAIMER: Blah, blah, blah, blah, blah, blah, blah. The “stuff” contained above is
believed to be correct, and works fine for the author. No one is forcing
you to do this. If you break your game, it's your fault!
QUESTIONS? COMMENTS?
PROBLEMS?
Contact Us
HOME
| LASER GAMES |
LASER COMMUNITY
| TECH CENTER
This website was created by
Jeff Kinder
& Dave Hallock, 1997 - 2012.
All trademarks and copyrighted materials are property of their respective
owners.