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.


IBM PCjr. - Joystick responds correctly
IBM PCjr. w/NEC V20 - Joystick responds correctly
IBM PC/XT - Joystick responds correctly
IBM PC/XT w/NEC V20 - Joystick responds correctly
Tandy 1000 SX (7.16MHz 8088) - Joystick does not respond correctly
Tandy 1000 SX in Slow Mode (4.77MHz 8088) - Joystick responds correctly
Tandy 1000 SX with 286 Express Accelerator, cache enabled (7.16MHz 80286 w/8KB Cache) - Joystick does not respond at all
Tandy 1000 SX with 286 Express Accelerator, cache disabled - Joystick responds correctly
Tandy 1000 TX or TL (8MHz 80286) - Joystick does not respond at all
Tandy 1000 TX or TL in Slow Mode (4MHz 80286) - Joystick does not respond correctly

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 :

 









36 comments:

  1. OK, If I own a T1000RL where can I get both Versions with PCjr support?

    ReplyDelete
  2. There's a sentence fragment in the 10th paragraph, it ends with "Given that the"

    ReplyDelete
  3. I have no idea what I was trying to say, so it is now gone.

    ReplyDelete
  4. Hello Great Hierophant,

    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?

    ReplyDelete
  5. 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.

    ReplyDelete
  6. 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.

    ReplyDelete
  7. 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.

    ReplyDelete
  8. Hello,

    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!

    ReplyDelete
  9. IBM lied :) Good to know about Adventure in Serenia, I forgot about its odd way of scrolling text. Wizard and the Princess uses the same method, despite the inconvenience.

    ReplyDelete
  10. Hello again,

    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?!

    ReplyDelete
  11. 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.

    ReplyDelete
  12. 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.

    ReplyDelete
  13. 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.

    ReplyDelete
  14. Hello,

    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?

    ReplyDelete
  15. 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.)

    ReplyDelete
  16. Hello,

    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?

    ReplyDelete
  17. 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.

    ReplyDelete
  18. Hello again,

    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.

    ReplyDelete
  19. 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.

    ReplyDelete
  20. Hello,

    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.

    ReplyDelete
  21. Hello,

    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.

    ReplyDelete
  22. My first thought is that you need to step up to 640K by installing a fourth memory expansion. If you do that you will also need an IBM Power Sidecar, three sidecars is the maximum the built-in power supply can support (assuming you are using the 45W card). The PCjr.'s memory layout is highly inefficient compared to the IBM PC or the Tandy 1000s.

    Now you might now begin to understand why PCjrs were something of a money pit when it came to upgrades. The PCjr. is only CGA compatible, its 16-color graphics support is its own standard, not EGA. Oregon Trail does not support 16-color graphics, just 4-color and 256-color.

    The official maximum RAM that you can have in a PCjr. is 640KB, but with third party expansions you get up to 736KB. But given that in an expanded PCjr, the first 128KB is effectively not available to programs, you can't have more than 512KB free officially. In an IBM PC, you can easily get 578KB free for programs. Some of the earlier Tandy 1000s can give you no less than 562KB free.

    ReplyDelete
  23. Hello,

    If three sidecars is the maximum for a PCjr, then how can it support a fourth. You said a fourth is what it takes to boost the memory up 640k. Three memory sidecars give me 512k. By the way, I have a Power Expansion side car. At the risk of not understanding the answer, what does the Power Expansion do? I thought it helps to boost the memory further, but whenever I connect it with the memory sidecars it doesn't effect the memory at all. At the moment, I only have three memory sidecars. Maybe after I am able to add a fourth the PCjr will be able to run the IBM MECC games. Does that sound like it would be worth a try to you?

    ReplyDelete
  24. The standalone PCjr can power two or three IBM sidecars depending on what power board is inside the PCjr. Early PCjrs. came with a power board that can provide 33W, later PCjrs. came with a 45W board. The Power Expansion sidecar can power up to three more sidecars. It comes with its own brick. So if you have a Power Expansion sidecar, it should be in between memory sidecar one and two or two and three. I would suggest adding the fourth just to see if the memory is the issue, this won't be the only game that will complain about too little memory. Plus, you can always show off your monster, fully-maxxed out PCjr.!

    There will be games that will not run on a PCjr. no matter how much memory it has. The graphic adapter is not 100% CGA or Tandy compatible. The keyboard and the disk drive controllers have differences at the hardware level compared to ordinary PC keyboards and disk drive controllers. If the game's copy protection doesn't want to load the game or the game won't respond to keyboard input, not much you can do :(

    ReplyDelete
  25. I have one more question. I might have committed a big "no no." I tried attaching the three memory sidecars to the PCjr first, and then the Power Expansion on top of them. The three dipswitches were 1,2,3, but it wouldn't boot up past the computer's built in 128k memory. After that happened, I tried the memory expansions by themselves. I attached one memory expansion just to see if I could get 256k memory. No matter what I tried it wouldn't boot up past 128k. Did I ruin my memory expansions!?

    ReplyDelete
  26. I think it is unlikely, if your memory expansion failed you would typically see an error message of some kind popup on the boot screen. The boot screen will count up to 640KB if the expansions are installed properly. But DOS programs will NOT know about memory beyond 128KB unless you have loaded the device driver in CONFIG.SYS.

    I have not personally encountered the issue you describe. You should register at the PCjr. forum, http://www.brutman.com/forums/, where other PCjr. owners and experts may be able to help you out.

    ReplyDelete
  27. Hello again,

    First of all I would like to inform you that I figured out why My PCjr was having so much trouble reading my expansions all of a sudden. You know that port on the side of the PCjr with the two rows of small gold colored pins? I discovered that one of them was badly bent, which accounted for the problem. I was unable to straighten it, broke off instead. Oh well. I bought a new PCjr and I am being more careful with it.

    I have a question about those IBM Mecc games. I am able to run my PCjr on 640k. I tried using that to run the IBM MECC games and I still got the "Program to big to fit in memory" message. I decided to try the "Install" method that the game's manual refers to. No matter what drive I assigned (C, or A) it told me that both didn't have enough disk space on the target drive. News Flash! When I tried this same installation process with my "2.0" Oregon Trail game (as apposed to 2.1) and told it to target drive A, the drive worked really hard for a while and showed me "reading, writing, reading, writing" a bunch of times, and then asked for disk 2. It acted like it wanted to go through the same process with disk 2 and then just gave up, and left the screen in suspended animation (multiple flashing cursors at the bottom). I wonder if that means it ran into a defect with disk 2. As for version 2.1 of Oregon Trail, after the computer tells me that the target drive does not have enough space and advises me to delete some files, it leads me through some more messages. One message is about VGA and CGA displays, the next is about registration, and then the next message is about making a copy of the disk. It then asks me for a command.com disk. Any idea what a command.com disk is? Do you think any of this might lead me to getting these games to work, or am I just spinning me wheels?

    ReplyDelete
  28. One has to be very careful with the expansion slot pins or the port pins, they can break or bend or get pushed back. It was a cheap design decision and it does not bode well for frequent insertion and removal of peripherals and expansion sidecars.

    I do not have disk images of the original Oregon Trail disks. I assume they let you play from floppy disks, you should not have to install anything to a hard drive. The full game weighs in at less than 720KB (two 360KB floppy disks). The game as installed on a hard drive can automatically detect whether you have a VGA or an Adlib sound card installed. This is valid for versions 2.0 and 2.1. There is a version 1.1 which should come on a single floppy disk and does not support VGA or Adlib.

    If the game is asking for the disk with command.com on it, its asking for your DOS disk. You will need to swap disks if the PCjr. has only one floppy drive.

    ReplyDelete
  29. Hello again,

    It's me, the guy with all of the PCjr game problems. Ulysses is doing it to me again! This time I got one that was in much better condition than the last. It is an IBM 1981 folder version, just like before. Two disks with tan colored labels. I am starting to think that this game just doesn't like PCjr's. I booted the game on my PCjr's 128k memory and a basic cartridge for converting the PCjr into an IBM PC. You told me it should ask me for disk 2. It never asks me for disk 2. Please look at the youtube video I posted for this problem. It's titled "Ulysses and the Golden Fleece / Will it run on an IBM PCjr? (Yes, No, Maybe?)." Please let me know what you think.

    ReplyDelete
  30. One suggestion I would have is to remove the BASIC Cartridge. It doesn't convert your PCjr. into a PC, in fact, it in some ways it makes the PCjr. less like a PC. Your PCjr. already has a BASIC built into the ROM inside the machine. The Cartridge adds new features, but Ulyssees does not use BASIC as far as I know.

    ReplyDelete
  31. I appreciate your suggestion, except removing the cartridge didn't change anything. It treats Ulysses the same with or without.

    ReplyDelete
  32. Hello Great Hierophant,

    I have asked you questions in the past about PCjr stuff. I am looking at an opportunity to purchase the King's Quest SCI 1990 re-make. It is on 9 "5 and a quarter" floppies. The person selling them says that it should be able to run on a PCjr. In your opinion, do you think that is true? Would it run if I expanded the memory to say 512 KB, or 640 KB? Also, does this game require the use of a mouse, or can you use only the keyboard?

    ReplyDelete
    Replies
    1. KQ1 SCI should be able to work with the PCjr. However, at the stock PCjr. speed with 640KiB you may find it running a bit slow to be playable. I would think a PC Sprint accelerator would be very helpful if you plan on running it. The game requires a keyboard and can be controlled completely by it, the mouse is optional.

      Delete
  33. I bought the 1.0 version. Does the slowness even apply to that too? Unfortunately, I wouldn't know how to install a PC Sprint Accelerator, even if I had one. When it comes to installing computer hardware, I'm a total novice.

    ReplyDelete
    Replies
    1. Unless you have a soldering iron and a desoldering tool, you won't be installing the PC Sprint Accelerator on your own.

      Delete
    2. That's okay, I downloaded the KQ1 SCI game to run off of DosBox, which has been a very nice consolation prize for me. By the way, can you tell me how I can get the 1.1H version of King's Quest 2 for download so that I can play it on DosBox? I have a feeling that its out there somewhere, but it is not easy to find.

      Delete