FlexROM 100

From Tandy Tech
Jump to navigation Jump to search

EEPROM adapter for TRS-80 Model 100 system ROM

With REX main rom support.

PCB: OSHPark

BOM: Digi-Key

Also needed: dupont jumper wires Get 1 30CM Female-Female, and 1 10CM Male-Male.

Assembly and usage details...

KiCAD schematic and pcb sources: github


What Is This?

This is an adapter board that allows plugging a standard eeprom into the Model 100's non-standad pinout system rom socket.

Additionally, it provides a connection point for a REX to use REX's Main ROM Management Feature without having to remove the internal rom.

There are a few reasons why it might be nice to be able to edit or replace the system rom on any computer, including a Model 100. In the case of the Model 100, the simplest reason is just the Y2K patch But there are other possible things like fixing bugs or even customizing the rom software.

This board allows replacing the system rom in two different ways, directly, and via REX.

Most TRS-80 Model 100's have a main system rom that has a non-standard pinout, and so it's impossible to replace the system rom without some kind of adapter. So first off, this board serves as a pinout adapter between a standard 28C256 and the non-standard M100 pinout.

Another way to run a custom rom on a Model 100 is by using a REX with it's main rom feature.

That normally requires removing the original main rom completely and running a wire from one of the pins in the empty rom socket out to a connection point on the REX. This means the Model 100 can no longer run without the REX installed, and the Primary rom image in the REX MUST be treated very carefully because if it is ever corrupted or non-functional, then the only way to make the computer run again is to either re-load a good rom image into the REX using some other Model 100, or open the Model 100's case and reinstall the original rom long enough to use it to re-load the REX with a good rom image.

With this board, you can have a built-in rom like normal, AND at the same time use the software-updatable main rom from a REX, and switch between them without having to open the computer case (except one time to install it).

The board itself is updateable too, although that does require opening the case to get physical access to it again. Just remove the board from the system rom socket and attach a test clip to the 28C256 and program with an eprom programmer.

The REX connection is optional. If you don't have a REX and don't want wires hanging out in your option-rom compartment, you don't have to install the wires. The BOM includes a shunt. Just install that shunt onto the two /CS pins.

If you do have a REX, or even if you just want to allow for the possibility in the future, install 2 300mm female-female dupont jumper wires on the /CS pins instead of the shunt, and route them out to the option-rom compartment. Label the /CS OUT wire. Take a picture of the installed board with the wires connected before you close up the computer case so you can refer to it later in case you forget which wire is which.

For all the details about REX and it's main rom management feature, consult the following sources:

REX Documentation
REX Main ROM Management Feature
Building a REX

Building

Building is mostly straightforward. You can see everything just by looking at these pictures.

The only notes to add are what's the best order to proceed and why, and the best way to do the dip-28 legs.

If using a solding iron (rather than hot air or a reflow oven), the best order to solder the parts is:

1: Both resistors
2: /CS pin header (flush-cut the posts on the bottom of the PCB)
3: Legs
4: 28C256

The resistors are first simply for physical convenience, because later they are surrounded by other parts.

You should flush-cut the back-side of the /CS pin header before installing the legs, just to reduce the chance of accidentally damaging the legs later.

The important thing is to do the legs before the chip, because the through-holes for the legs are close enough to the pads for the chip that if you do the chip before the legs, then it's too easy to accidentally get solder in the holes for the legs, and that makes it difficult to install the legs later, even after you wick the solder out of the holes.

So you should do the legs while the holes for the legs are still clean and new.

Next, how to do the legs.

Cut two sections of 14 legs off the leadframe strip. The BOM above specifies a single 28-pin strip, so if you go that, just cut that in half.
Use ordinary scissors to cut the entire fork contact end off the tops of the SIL (sigle in-line) pins. Try to cut in as straight a line as possible, following the ends of the legs where they widen into the SIL fork contacts, but about 1mm away from the end, well into the straight thin part of the leg so you are sure that the new cut ends of the legs definitely won't end up with any little "T" shapes on the ends. If you cut too close to the ends where the leg gets wider, then the little T bit that you will get on the ends of the legs will prevent the leg from fitting into the holes in the board, and youl'll have to trim the legs down, but it will be harder to cut the legs evenly after the original leadframe has been cut away and the legs are all loose on that end.
Insert the remaining "comb" into the pcb from the top, and pust the legs down until the legs are about 4mm long out of the bottom of the pcb. This will be about 1/2 way.
Before soldering any legs, bear in mind: Only touch the soldering iron to the leg sticking out of the TOP of the pcb. Don't touch the bottom side of the pcb at all. And don't add so much solder that it flows down and builds up on the bottom leg. The legs are tinned and the solder WANTS to wet and flow along the entire surface, so look at the bottom leg to make sure that isn't happening. The holes are a very close/tight fit to the legs and so it only takes a very little solder to do the job. If you DO get solder build-up on any legs, use flux and solder wick to clean t off, and make sure to do this BEFORE cutting off leadframe. Once you cut the leadframe away, the individual legs are only held in place by the solder. If you heat a leg up after that, the leg will fall out of neat lignment. You'll have to hold it in place with tweezers or something while touching the heat to it to put it back into alignment. With the leadframe still attached, there is no problem. You can heat the leg up as much as you want while wicking away solder to clean it thouroughly, and then solder the through-hole again.
Solder one end leg. Adjust the opposite end leg so the row of legs is parallel to the pcb and all legs are the same length, and solder the opposite end leg so the row is now held in place. Solder all the middle legs.
Examine the legs on the bottom side of the pcb to ensure that the lengths are all even, and ensure that none of the legs has solder build-up on it's surfaces. If any legs have solder build-up on them, use flux and solder wick to clean it off now while the leadframe is still attached to all the legs.
When you are definitely happy with the legs, use flush-cutters cut the tops of the legs and the leadframe away.

Finally install the 28C256 using the drag technique.

If you are using hot air or a reflow oven then you should do the resistors and 28C256 first.

Programming

You can write the 28C256 before soldering, using your eprom programmer's ordinary soic28 adapter. You can also write the 28C256 after soldering, but you will need a soic28 test clip.

With a test clip, you can also re-write the chip any time and as many times as you want after soldering the chip to the board. (In order to re-write the chip after the board is installed in the computer, you would have to open the case again to remove the FlexROM from the system rom socket and attach the test clip to the chip, but you CAN do that. The chip itself is re-programmable, and the FlexROM connects the chip's /WE pin to the /Vcc pin through a pullup resistor not a direct trace, so you can attach a programmer directly to the chip with a test clip, and the programmer will safely drive the /WE pin.

The following directions will make several assumptions:

  • Using a TL-866 programmer
  • Using the "minipro" program on Linux
  • Using the "hexedit" program on Linux
  • Using a Tandy 102 system rom image (It fixes a few minor issues from the original Model 100 rom, yet runs the same on a Model 100)
  • Using a REX and the REX main rom management feature

To write the eeprom, you need:

  • EPROM Programmer such as TL866
FlexROM_100 is only for Model 100, but you can run the rom from either M100 or T102 in a M100. The T102 rom fixes a few minor issues from the M100 rom, yet runs and works the same on the M100 hardware.
These two rom images are already patched for Y2K, and with the REX detection signature. We will be editing the rom to actually undo the REX signature, while leaving the Y2K part.

Assemble the test clip cable:

Put the female ends of the wires onto the test clip.
Put the male ends of the wires into the dip28 socket.
Put the dip28 socket into the ZIF socket on the programmer.

Download a system rom image and make 3 copies of it

$ wget http://bitchin100.com/wiki/images/c/cb/R_T102.BR
$ cp R_T102.BR T102_P.BR
$ cp R_T102.BR T102_S.BR
$ cp R_T102.BR T102_M.BR
T102_P.BR is for the REX Primary main rom slot. The filename for this must be 6 characters or less, plus ".BR"
T102_S.BR is for the REX Secondary main rom slot. The filename for this must be 6 characters or less, plus ".BR"
T102_M.BR is for the 28C256 on the FlexROM. The filename for this doesn't actually matter.

Hex-edit the three rom images.

For the internal main rom, T102_M.BR, change "Menu" to "MENU" at 0x03
This reverses the REX signature so that when the M100 boots from the FlexROM, REXMGR does not think it's really running from one of the primary or secondary rom images in the REX.
$ hexedit T102_M.BR
before: 00000000 C3 A7 1B 4D 65 6E 75 00 7E E3 BE C2 46 04 23 E3 ...Menu.~...F.#.
after: 00000000 C3 A7 1B 4D 45 4E 55 00 7E E3 BE C2 46 04 23 E3 ...MENU.~...F.#.
For the Primary main rom slot in REX, T102_P.BR, change "Software" to "(T102_P)" at 0x7FB5
$ hexedit T102_P.BR
before: 00007FB0 20 31 30 30 20 53 6F 66 74 77 61 72 65 0D 0A 43 100 Software..C
after: 00007FB0 20 31 30 30 20 28 4D 41 49 4E 31 50 29 0D 0A 43 100 (T102_P)..C
For the Secondary main rom slot in REX, T102_S.BR, change "Software" to "(T102_S)" at 0x7FB5
$ hexedit T102_S.BR
before: 00007FB0 20 31 30 30 20 53 6F 66 74 77 61 72 65 0D 0A 43 100 Software..C
after: 00007FB0 20 31 30 30 20 28 4D 41 49 4E 31 53 29 0D 0A 43 100 (T102_S)..C


Write the T102_M.BR file to the FlexROM:

Clip the test clip onto the 28C256.
Obviously, ensure that pin #1 on the 28C256 ends up connected to pin #1 on the programmer.
Use minipro to program the chip.
The device type is "AT28C256"
The file to write is "T102_M.BR"
 $ minipro -p "AT28C256" -w T102_M.BR
 Found TL866II+ 04.2.110 (0x26e)
 Erasing... 0.02Sec OK
 Protect off...OK
 Writing Code...  6.77Sec  OK
 Reading Code...  0.50Sec  OK
 Verification OK
 Protect on...OK

The FlexROM is now complete.

Installing

Plug the FlexROM into the system rom socket (M12) in the Model 100, and either install the shunt on the /CS pin header, or install two dupont jumper wires running out to the option rom compartment. Even if you don't have a REX you can install the wires instead of the shunt, to allow installing a REX later without having to open the computer case again.

If you installed the shunt instead of the wires, then you are now done. Re-assemble the Model 100 case and use the computer the same as before.

The rest of this assumes you installed the wires.

Before closing up the computer case, take a picture of the installed FlexROM with the wires connected, and/or label the /CS OUT wire in the option rom bay, so that later when the computer is closed up you can tell which wire is /CS OUT.

Re-assemble the computer case.

Using

Whether you have a REX or not, at first install the short male-to-male dupont jumper wire joining the two wires in the option rom compartment to each other.

If you don't have a REX, then you are now done. With the wires connected to each other in the option rom compartment, the computer boots from the FlexROM. You can use the computer exactly the same as usual, including you can install a ram expansion or a Disk/Video Interface cable on the bus connector, and/or install option roms, Teeprom, or REX in the option rom socket.

The rest of this assumes you DO have a REX. The rest of this is really more about using REX than using FlexROM, but with FlexROM, the directions for REX just slightly different.
With FlexROM,

You don't have to be so careful with the primary rom image in the REX, because the system is always self-recoverable.
You don't connect a wire to one of the pins in the empty main rom socket, instead the FlexROM is installed in the main rm socket and the wire is connected to the pin header on the FlexROM.

Install the REX in the option rom socket as normal, but don't connect any wires to it yet. First we need to load rom images into the primary and secondary slots in the REX, and for that, the computer needs to run from the internal rom. The two wires in the option rom compartment should be connected to each other with the male jumper wire.

Turn the memory power switch on the bottom of the computer ON

Turn the main power switch on the side of the computer ON.

Cold-reset the computer by pressing the Ctrl, Break, and Reset buttons all at the same time.

Connect a Model_100_102_200_600_Serial_Cable between the Model 100 and a modern pc.

Run DLPlus or LaddieAlpha in the directory containing the primary and secondary rom images prepared earlier (T102_P.BR and T102_S.BR).

~/Documents/TRS-80/FlexROM $ dl -v
Using Serial Device: /dev/ttyUSB0
Working In Directory:
--------------------------------------------------------------------------------
/home/bkw/Documents/TRS-80/FlexROM
total 128
-rw-rw-r-- 1 bkw bkw 32768 Oct 18  2010 R_T102.BR
-rw-rw-r-- 1 bkw bkw 32768 Feb 11 20:46 T102_M.BR
-rw-rw-r-- 1 bkw bkw 32768 Feb 11 22:05 T102_P.BR
-rw-rw-r-- 1 bkw bkw 32768 Feb 11 22:07 T102_S.BR
--------------------------------------------------------------------------------
Read...

On the Model 100:

Notice that the date on the main menu has the year 2000 instead of 1900. This shows that the computer is running a Y2K patched system rom.
Launch BASIC.
Notice that the top line has the word "Software". This shows that the computer is NOT running either of the rom images that were edited to say "(T102_P)" or "(T102_S)".
Issue the command CALL 63012 to activate the REX and install REXMGR.
Launch REXMGR from the main menu.
Notice the top line in REXMGR has an "M". This shows that REXMGR does not think the currently running rom was loaded from the REX Primary or Secondary images, which is correct.
Press TAB until you get the SYS screen.
Highlight the Primary main rom slot (MAIN1P, on the left) and press F2 to load a rom image into the Primary slot.
When is says "load from filename:______" type "T102_P" and press Enter.
This will try to download "T102_P.BR" via TPDD protocol over the serial port. This is why we have the serial cable connected and dlplus or laddiealpha running on the modern pc.
When it's done loading, the Primary slot on the left will now say "T102_P" instead of "MAIN1P"
Highlight the Secondary main rom slot (MAIN1S, on the right) and press F2 to load a rom image into the Secondary slot.
Highlight the Primary main rom slot (MAIN1P, on the left) and press F2 to load a rom image into the Primary slot.
When it's done loading, the Secondary slot on the right will now say "T102_S" instead of "MAIN1S"
Exit REXMGR

Turn off the Model 100.

Remove the male-male jumper wire from the wires in the option-rom compartment.

Connect the /CS OUT wire to the TP1 pin on the REX.

Leave the other wire loose in the compartment. Don't connect it to the TP2 pin. Either remove the male jumer wire from the compartment entirely, or leave the male wire connected to the end of the other wire, and install the shunt on the other end of the male wire to cover it and prevent it from shorting on anything.

Turn on the Model 100.

If you enter BASIC, the top line should now say "(T102_P)". This proves that when the computer powered-on, the FlexROM was disabled and the REX provided the rom instead, and used the Primary slot.

If you enter REXMGR,

Notice the top line now has a "P" where there was an "M" before. This shows that REXMGR recognizes that the currently running rom was loaded from the REX, and that REX is currently configured to use the Primary image.
Tab to the SYS screen, highlight the secondary rom image T102_S, and press F3 "Use", exit back to the main menu

Enter BASIC again,

The top line should now say (T102_S) instead of (T102_P). This shows that we have indeed switched to the secondary rom image.

If you turn off the computer, remove the wire from the REX, re-connect the two wires to each other, either leave the REX installed or remove the REX, and turn the computer on again, and enter BASIC, you'll see the top line has "Software" again. This shows the computer is running the rom from the FlexROM again.