Sunday, August 21, 2016

Boulder Dash - PC Speed and Joysticks

Boulder Dash was originally released for the IBM PC and PCjr. in 1984 by First Star Software. The disk included two separate executables, one for the IBM PC and one for the IBM PCjr. The disk was a PC booter.

The IBM PC executable is serviceable but not particularly impressive. There is a distinct lack of animation on the title screen and for the amoeba tiles. There is also no color-cycling effect for the diamonds. It is debatable whether the game really uses composite color graphics. Sound effects are weak even by PC speaker standards.

The IBM PCjr executable, on the other hand, is much, much more impressive. It uses the 3-voice PCjr. chip for music and sound effects. It supports 16-color graphics with full animation and color cycling. Despite the PCjr. being slower than the PC, it does not suffer from a lot of slowdown, despite the extra effort. Compare these pairs of screenshots from the PC and PCjr. executables :

In 1986, Electronic Arts released Super Boulder Dash, a compilation of Boulder Dash 1 & 2. This version included Tandy 1000 support to give owners of those computers the PCjr. graphics and sound.

Eventually, the standalone release of Boulder Dash was cracked and copies of the PC executable were disseminated. Super Boulder Dash was also cracked and a copy of the cracked disk was on the Retrograde Station site for a long time. Unfortunately, all these cracks only supported the bland PC executable, not the superior PCjr /Tandy 1000 executables.

Somewhat recently (2013), a patch to fix the Super Boulder Dash image was made. Now everyone can play a superior port of the Atari 8-bit game on DOSBox. But for those of us on real hardware, this port has one particular Achilles Heel, the joystick support.

The original code was written to read the analog PC joysticks in an IBM PC or PCjr. At that time, faster PCs really were just emerging in the marketplace. This code relied on tight timing loops to read the X and Y positions of the joysticks which do not scale well with CPU speed unless the programmer had programmed scaling factors into his code. Boulder Dash's PC programmer (probably Peter Liepa) evidently did not.

When the joystick does not respond correctly, Rockford will move uncontrollably in one direction or the other or he will move smoothly in one direction and jerkily in the other direction. He will not move smoothly in all four directions regardless of the settings on the joystick trimmers. The best you can do is, by fiddling with the trimmers, will be to get smooth movement up and left at any extension of the stick and smooth movement to the right and down with a partial extension of the stick. This is not ideal.

According to DOSBox, the PC and PCjr./Tandy executables have a rather narrow range of machine cycles when it comes to giving proper joystick response, about 300-450 cycles in the normal core work with the cga or tandy machine types. The pcjr. machine type requires a much lower cycle count, about 175 cycles, and can tolerate a much lower deviation (say 165-185 cycles). Surprisingly, the PCjr. does not have a problem with a V20 installed, which is supposed to speed up the system by 10-15%.

Why is this so important? Because Boulder Dash was meant to be played with an Atari-style digital joystick. Actually it really plays best with a Sega Genesis gamepad, but U.S. and European computer gamers did not have anything quite like that back in 1984. Playing Boulder Dash with a keyboard is an extra challenge because you often have to be extremely quick to dodge falling boulders and roaming fireflies and butterflies. The earlier Atari 8-bit and Commodore 64 ports (the PC/PCjr. port came third) support digital joysticks.

For the IBM PC, you can use a Gravis Gamepad as a digital gamepad. For the IBM PCjr., you can use a Gravis Gamepad, but you will need to make your own adapter or (more likely) appropriate a cable from a IBM PCjr. joystick. For the early Tandy 1000s, the EX, SX and HX, you can make the digital joystick adapter I described in a previous blog post : http://nerdlypleasures.blogspot.com/2016/08/the-pc-joystick-to-tandy-1000-joystick.html For the Tandy SL, SL/2 and RL, these systems use a 8086 CPU that can be slowed down to 4MHz or 4.77MHz, This should be sufficiently slow to use the built-in Tandy joystick ports.

For the Tandy 1000 TL, TL/2 and possibly TL/3, they cannot be slowed down sufficiently to make the built-in joystick port work properly. But you can disable the built-in joystick port using nojoy.com, put the machine into Slow mode using the setup program, then press Ctrl-Alt-Del (and not the red reset button) and use your own joystick card. Interestingly, the IBM PC joystick cards will work at this speed correctly, even without a hardware speed adjust, when the Tandy 1000 joystick interface will not.

For the Tandy 1000 TX, which runs at the same speed as the TL and TL/2, you are probably screwed, because you can't disable its built-in joystick port. If you use 100KOhm variable resistors instead of standard resistors in the digital adapter, you may be able to find a proper balance that will give you smooth movement in all four directions when these systems are set to slow CPU operation. Otherwise, you can disable the built in joystick port by lifting pins 1 & 19 of U10, a 74LS244, and wiring them to +5v.

Boulder Dash II PC Version Differences

Everything said above applies equally to Boulder Dash and Boulder Dash II. DOSBox indicates that Boulder Dash II may be slightly more forgiving of system speed when it comes to joysticks because it will give a proper response up to 550 cycles, but on real hardware this does not help.

I would note that Boulder Dash II's PC executable in Super Boulder Dash tried to be a little more interesting than its predecessor's. It will use both standard 4-color CGA palettes. Caves E and M will give light green, light red and yellow instead of light cyan, light magenta, and bright white.

In the United Kingdom, Boulder Dash and Boulder Dash II were released by Prism Leisure Corp. separately. Their Boulder Dash II disk is a protected DOS disk and has two distinct executables, BD2PC.EXE and BD2JR.EXE. BD2JR.EXE does not support Tandy. Given that the PCjr. was never released in the U.K., one wonders why the executable is there at all. If your Tandy 1000 has no more than 128KB, then it may work but do not count on getting a proper joystick response.

BD2PC.EXE uses the unofficial light cyan, light red and bright white palette throughout. While perhaps more visually pleasing than the standard palette, the lack of any palette changes is felt.

I have never encountered an executable of Boulder Dash that uses anything other than the light cyan, light magenta, and bright white palette. I have more screenshot comparisons of the PC vs. the PCjr. executables, but hover over the images in the left column to see what they look like with the Prism Leisure Corp. PC executable :

I could use your help with a PCjr problem again. I am playing "Adventure in Serenia" on my 256k PCjr. I am using a Basic Cartridge so that the game will run on my PCjr. After I type the command to take the rock from the snake's tail, the snake reveals himself as king of the snakes and says "to repay you I will..." nothing. That's it. The game just hangs there forever and won't display the rest of the message. It keeps me from moving on with the game. Any ideas how to solve this?

One thing I did not mention. Sometimes right after the game title screen I see this message "/O error please re-insert disk and press enter." Sometimes I will press enter and the game run still run, but that doesn't mean the whole game will run flawlessly.

Sorry about my grammatical error. My "Adventure in Serenia" game will still run sometimes when I press enter after seeing that /O error. Problem is, not everything in the adventure seems to run without a hitch.

It may be possible that your disk is bad, especially if it is an original disk. I cannot say I have played the available disk image past that point.

You could try removing the BASIC cartridge. Cartridge BASIC and 256KB or more of RAM do not play well with each other. You do not need the cartridge to run the game. You could also remove the RAM expansion, Adventure in Serenia cannot use it.

Adventure in Serenia is the IBM PC version of the game. IBM's documentation states that the game is compatible with the PCjr, although there will be some color variations on a color composite monitor. You could try Wizard and the Princess, the PCjr. specific version of the game. It should be available in the latest Total DOS Collection.

I actually solved the problem. Just so you know, the PCjr "does" in fact need a basic cartridge for the Serenia game, if you are using a TV instead of a monitor. If you are using a TV, the game title screen barley shows up, and it's not very readable. When you press a key to start the game, you get a black screen and can't see the adventure at all. This is what happens with a TV display and no basic cartridge. If you use a basic cartridge, everything shows up bright and clear on your TV. As for my problem I learned this from the game instruction manual: It says if the game can't display a whole message, press the "Scroll Lock" key and the rest of the message shows up, and you are free to type the next command. A PCjr keyboard has a slightly different set up. The Scroll Lock key is actually the "S" key, AND you have to press "FN" right before pressing S. You are probably right about not needing a basic cartridge if you are using a computer monitor. But if you are using a TV, you can't see what you are doing without a basic cartridge. Thank you for your response. I appreciate it!

I have another IBM PC mystery on my hands. I received a game called "The Hobbit" by Addison Wesley. The requirements say 128k and DOS 2.0 or higher. I have DOS 2.10 and two PCjr's. One is a 128k and the other is 256k. I followed the loading instructions to type "hobbit" at the "A>" prompt and got this message on both computers: "program too big to fit in memory." Why the heck would it say that?!

Did you load a PCjr. expansion memory manager like JRCONFIG in CONFIG.SYS when you booted DOS on your 256KB PCjr.? Most DOS programs will not detect RAM above 128KB unless a memory manager is installed The box for The Hobbit indicates that 128KB is required for PC/PCjr., but it is possible that they overlooked the PCjr's RAM stealing or that IBM PC-DOS 2.1 requires more RAM than IBM PC-DOS 2.0.

What is an "expansion memory manager?" What I typically do is load the dos 2.1 disk, type in a made up date and time, and then at the A> prompt switch the dos disk with the game disk. I then type one of two commands. I have come across a few games that require you to type "AUTOEXEC" and press enter to run the game. Otherwise you type the first word of the game like "hobbit". Some Sierra games, like King's Quest, require you to type "sierra." If what I am missing is something called JRCONFIG, how do I include it so that it doesn't get overlooked. Just so you know, I have a PCjr with a little toggle switch in the back that allows you to go back and forth between PC and PCjr, which happens to be my 128k PCjr with two disk drives. My 256k PCjr does not have that toggle switch and uses one disk drive. I tried to run the game on both computers and on both PCjr and regular PC.

You can find the answers and links to the files you need here : http://nerdlypleasures.blogspot.com/2014/03/ibm-pcjr-upgrades.html

If your boot disk is an original IBM disk, make a copy of it with the DISKCOPY program. Then on your copied disk, create an AUTOEXEC.BAT file and a CONFIG.SYS file and copy over the JRCONFIG driver you wish to use. If you put anything in the AUTOEXEC.BAT file like "PROMPT$p$g" you won't be prompted for the date and time every time you boot the machine. You load device drivers by entering the appropriate line in the CONFIG.SYS file.

Now I have a new problem. I have Ulysses and the Golden Fleece for the IBM PC. The instructions tell me to place disk 1 into the drive and turn on computer. It says that the next thing to happen is for a prompt to ask for disk 2. After I inserted disk 1 and turned on the computer I didn't get a prompt asking for disk 2. I got the game title screen instead. I pressed a key to begin, heard a small pop, the red light illuminated for a moment, and then it went right back to the game title screen. Does this make sense to you? Am I doing something wrong?

What should happen is that once you get past the title screen, the game will ask for disk 2, then load the first game screen. If it isn't happening for you, you may have a bad disk, a drive that needs refurbishment or the game's copy protection doesn't like your system (if you are using a PCjr.)

I don't think it has anything to do with refurbishment. How do I know if it's "bad disk" versus something else? It never gives me a problem message. It said press a key to begin. I press the space bar, a pop sound occurs while switching to display of blinking cursor in the top left of the screen, and then it loops back to displaying the game title screen. If this clue helps, the game was sealed in one of those flat fold out cardboard displays, except it wasn't perfectly flat. The packaging was a little bit warped. The front cover had some bubbling going on. The disks inside "appeared to be" pristine. They were perfectly straight. No warping either. Plus the reading area seemed to look really good from what I could tell. But I guess that doesn't necessarily mean it won't still be damaged in some way. Can there be damage from a seemingly perfect looking 5.25" disk that isn't visible?

Unfortunately, you cannot guarantee that you have a working disk by a visual inspection. All it takes is one flux transition to fade/fail and your disk may be unusable. The only way to know for sure is to try a working disk image on your system. Fortunately one does exist.

I have a question about PCjr memory expansions. I currently have two 128k memory expansions. One of them will show me 256k on boot up (PCjr is 128k without it). I plugged in the second one, thinking that it would show me 384k on boot up, but instead it stays at 256k. Am I missing something? What I ultimately want is 512k, as soon as I can get a third memory expansion. I don't understand why my 128k PCjr will go up to 256 after one memory expansion, but doesn't seem to want to go up any further.

Did you check the dipswitches on the expansion? The four dipswitches must be set appropriately. Switch 1 is for the 256KB expansion, switch 2 is for the 384KB expansion, switch 3 is for the 512KB expansion and switch 4 is for the 640KB expansion.

I wondered what those little white switches were for. I tried it out, and Presto, you were right! I got it to boot up to 384k! Thank you so much! In addition to my IBM Sierra collection, I've been building up a small IBM MECC collection as well. As soon as I can boot up to 512k, I'll will try them out.

Well, it's happening to me again. I now have 512k of memory and DOS 2.10. I tried using that for my PCjr to boot up the IBM/Tandy Oregon Trail 2.1 game. I typed "oregon" at the A prompt and got "program too big to fit in memory" like I got that time before. Am I suppose to "Install" the game like the game manual suggests, or should I be able to just run the game off of the disk? I know you told me some things about how to upgrade my PCjr, problem is it's alien to me. I don't know, step by step, what to do. I am not a techy, so I don't know anything about my PCjr, or how to modify it. It is 128k memory single disk drive, and I assume it has both CGA and EGA capability. I now have three memory expansion sidecars and I thought that would be enough to run the IBM MECC games I bought, but unfortunately it's not that simple.