The

Development Page

BIOS Version 1.5 (with Game Genie support and bugfixes!)

What is it?
It is a new and updated version of the Dr. PC Jr. BIOS. I've updated the BIOS so that a few of the bugs that were in the production version are fixed. But, most significantly, I've added Game Genie support in the BIOS! This means that after you load a PC Jr game from disk, you have the choice of entering in Game Genie codes for that particular game. (For those of you who don't know what a Game Genie is, it's a cheat device for the NES that modified games to have infinite lives, invincibility, mega-jump, etc.) These codes should work with the game almost as if you were playing them using a real Game Genie. The code effects will remain intact until you turn the power off on the Dr. PC Jr.

What else?
In the BIOS, I also fixed bugs in a few places that prevented the BIOS from loading full 8192-byte trainers as pseudo-SRAM files. On the PCJr, you can't normally load or save permanently your save positions in games that have save ram (SRAM). There is a way, which I'll describe later, how you can load an SRAM file as a trainer along with the ROM, so that at least you can load your save positions. In the standard release version of the BIOS (1.0a), a bug only allows trainer sizes of up to 7680 bytes; in my updated BIOS, I've fixed it so that it can now load trainers of sizes up to 8192 bytes.

There is still no way for the Dr. PC Jr. to save SRAM files along with a game, unfortunately.

So how do I get the new BIOS into my PCJr?
Well, because the BIOS is on a chip, you'll have to burn it onto an EPROM (or an EEPROM using a special adaptor) and replace it into the BIOS slot of the PCJr. Not everybody can do this, of course. If you don't know anybody who has EPROM- (or EEPROM-) writing equipment, then perhaps there are some services in your local area that will burn an EPROM for you. For your reference, you'll have to use a 27c256 EPROM. There is also a way that you can use a 28c256 EEPROM as a BIOS, but you'll have to construct an adaptor using two 28-pin sockets and completely switch pins 1 and 27; this requires technical knowledge and know-how of chip pinouts and soldering.

I should say right here that I am not responsible for any damage which you may cause to your equipment or yourself.

Okay, how do I use Game Genie codes?
With the new BIOS in place, turn on your Dr. PC Jr. Put in a disk with the game(s) on it, as you normally would. Select the game, and it will begin loading into memory. While the PCJr is loading the game hold down the START button. If you are still pressing the START button when the PCJr has finished loading the game, it should jump to the Game Genie Options screen, as pictured below.

You can now use the control pad to enter your Game Genie codes. Here are the controls:


Here's what you will see the first time you enter in a code. Let's say you want to enter in the code "SXUGTPVG". So, you advance the first letter to S by pressing Up or Down. Then, press Right and advance the next letter to X, and so on. When you have the full 8-letter code entered, press the A button once. You will now see a whole bunch of new information on screen. First, right next to the code, it will either say "OK" or "NO". OK means that the code was entered properly and the game was modified. NO means that the code was invalid for that particular game. In other words, it had searched in the locations in the game specified by the Game Genie code, but the value that it found at that location did NOT match the control value specified in the GG code.

If the code is OK, the next piece of information that you will see is "X 1", or some other value. This means that it has searched through the game and made 1 replacement in total. If it says "X 2", it means that it has searched through the game and made 2 replacements, etc. This can be important depending on whether a GG code works properly or not. Anyway, the next triplet of information is a bunch of hexadecimal numbers. From left to right, you will see the GG code's ADDRESS (ADD), the code VALUE (VAL) and the CONTROL (CNT) value. This is the decoded information that was stored in the GG code. The ADDRESS is the CPU address that will be modified by the GG code. The VALUE is what will be stored at the specified address. The CONTROL value is only present in 8-letter GG codes. It acts as a check in large, multi-bank games to make sure that the value being replaced at the specified address is the correct one first. This information is not necessary, but may be helpful to some people.

As you can see from the picture above, you can enter lots of codes. You can, in fact, enter as many GG codes as you like; when the cursor gets to the bottom of the screen, it'll go back to the top. The above example shows how most codes will look when you enter them. And as you can see from the code on the bottom, an invalid code will not be entered into the game. Of course, if you enter an 8-letter code that modifies a certain location, then enter another 8-letter code that modifies the same location, it will not work, and the GG decoder in the BIOS should not accept it.

Are there limitations or bugs?
Unfortunately, yes. The real Game Genie is always functioning while the game is being played. It sits between the game and the NES, intercepting all address line values as they are changed. Because the Dr. PC Jr. BIOS can't do this, my GG module implements the codes just once: before the game is started. Given a GG code, my program searches through the specified locations in all the banks of the game, looking for a match. If it finds a match, it replaces that location with the code value in the PCJr's DRAM. Unfortunately, because the memory mappers of the NES do some weird bank-switching, placing different banks of the game ROM into different sections of the address space, my program can't anticipate exactly which banks will go into which address spaces, and which will not. As such, some GG codes can get written into more than one location in the game memory, if that location matches the GG CONTROL value (as you can see if the GG decoder says "OK X 2" or something). This is where the two different replace modes come in.

As you can see if you press the B button, the GG decoder will either replace "one value" or "all values". What this means is that you can choose whether the GG decoder replaces only the first instance of the correct value, or all instances. By default, this is set to "all values". If, perchance, you enter a GG code, and the decoder encounters two locations in the game ROM and modifies them, and it messes up the game somehow, then you still have a last chance to get it to work. By pressing the B button first, to kick it into "one value" mode, and then entering the GG code, the decoder will modify only the first location specified by the GG code. This MAY modify the correct value, so that the game doesn't screw up while you're playing it. Of course, 6-letter GG codes will modify the specified locations in the GG code across all banks of the game. That's just what they do anyway (although you can still have the GG decoder modify only the first value in the first bank).

There may be other bugs in the decoder, but I haven't encountered any bad ones. There might be problems with the GG module if the game you're loading is VERY large and also uses SRAM. I'm not 100% sure. The Game Genie module of this updated BIOS should not interfere with any other function in the BIOS. If you notice that it does, PLEASE let me know about it!! If you don't press START as a game is loading on the PCJr, you shouldn't even notice that the GG module is there (except for the new text on the menu screen, of course :-)). It should load properly as usual.

One last thing: If you load a game ROM and a Game Genie code that you correctly entered fails (ie: it says "NO" when you enter it), but it should work in the game, remember that there are several dumped versions of many games. GG codes don't always work for all versions of a game.

Okay, what about that SRAM loading feature?
Okay, this is unrelated to the Game Genie feature, but I've fixed it in the BIOS anyway. The PCJr doesn't normally save game SRAM or load it. As such, many long RPGs are unplayable, unless you play it in one long session. There is a way, however, to at least load an SRAM file at the same time as the game is loaded. This requires a couple of utilities and a hex editor. First, (in an emulator,) play your game and save it at whatever position you want. The emulator should generate an 8192-byte (.SAV) SRAM file. Keep that. Convert your game ROM into the PCJr format (using QND for DOS, I presume). What you will have to do now is remove the 512-byte PCJr header from the game ROM -- perhaps by using a file split utility, but I cannot suggest any in particular. A hex editor may also be able to do this. -- and insert the SRAM file between the header and the ROM data, and replace the header at the beginning of the file again. Alternately, if you have a hex editor that can do binary insertion, insert the SRAM file between the header and the ROM data. Make sure that the final file size of the PCJr ROM has increased by 8192 bytes.

Next, edit the entire file in a hex editor. You will have to modify these locations in the PCJr header (in hex): offset $000A gets changed to #$60, offset $000D gets changed to #$10. Make sure offset $000F remains as #$00. Save the file. It should now load with SRAM into the Dr. PC Jr.

Final Words...
I hope you find this addition to the Dr. PC Jr. BIOS useful. I did it because it was one of my dreams and goals when I first got the system: to use GG codes on almost any game. Please note that I am not affiliated or connected with Bung, Camerica, Galoob, or Nintendo; I did all this modification just for fun and intellectual curiosity. Please e-mail me if you have any questions or comments.


Back!