Building a REX: Difference between revisions

From Tandy Tech
Jump to navigation Jump to search
No edit summary
 
(171 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:diy_rex_1.jpg|800px]]
[[File:20190730 232012.jpg|800px]]
<gallery>
REX_Classic_bkw_1.png
REX_Classic_bkw_2.png
REX_Classic_bkw_3.png
REX_Classic_bkw_4.png
REX_Classic_bkw_5.png
REX_Classic_bkw_6.png
REX_Classic_bkw_7.png
REX_BKW_C11_8.jpg
REX_BKW_C11_9.jpg
REX_BKW_C11_10.jpg
</gallery>
<!--
rex-bkw-c8-10.jpg
rex-bkw-c8-9.jpg
rex-bkw-c8-6.jpg
rex-bkw-c8-7.jpg
-->
=Introduction=
=Introduction=
Building Steven Adolf's REX from scratch.<br>
Building a REX<br>
Brian K. White - bw.aljex@gmail.com


:[https://drive.google.com/open?id=0Bys6eLbSbYyhV3NEdjhvWFlYMDg Files Used]
This is a version of [http://bitchin100.com/wiki/index.php?title=REXclassic Steven Adolph's REX Classic] with a modified PCB design.<br>
<!-- Build 254 obsoletes the build 162 -->
It is electrically identical to REX Classic, and uses the REX Classic firmware & software.<br>
<!-- :[http://bitchin100.com/wiki/index.php?title=REX_Release_4.9 Steven advises to use 4.9 Build 162] -->
:[https://goo.gl/photos/7wRjuTUDv6cojpjU9 A few pictures from the build process]


==Parts/Materials==
The PCB layout and shape are modified to
Bill of Materials. Order each of these.<br>
* snap into a 3d-printed carrier to fit the Molex78805 socket
These are parts to build 3 REX boards, because you will get 3 boards from OSHPark. If you only want to build one or two boards, reduce the quantities of the parts from DigiKey before checking out.
* provide connections for power and PORT_EN for programming the CPLD


<!-- *[https://oshpark.com/shared_projects/vFF7oXfw Printed Circuit Board] (Earlier version, possibly usable for NEC?) -->
'''[[REX:Build_(original_version)|Original version of this page, for building the original REX1]]'''
<!-- *[https://oshpark.com/shared_projects/o3YL0OEB Printed Circuit Board] (dead link) -->
*ONE of these: [https://oshpark.com/shared_projects/05Wk0mj8 PCB] OR [https://oshpark.com/shared_projects/5R4KDv8D Pre-castellated PCB]


*[http://www.digikey.com/short/qtqhcf Electronic Components, US] or [http://www.digikey.ca/short/qtqr90 Electronic Components, Canada]
[https://github.com/bkw777/REX_Classic PCB Source]<br>
: If the flash memory chip is on backorder: [[REX:flash|How to Identify a Compatible Flash Chip from Elsewhere]]
[https://github.com/bkw777/Molex78802_Module Carrier Source]


*[https://www.target.com/p/offray-174-grosgrain-ribbon-3-8-x-21ft-white/-/A-51687907 3/8" to 9/16" wide, strong, flat, fabric ribbon]
=Parts & Materials=
<!-- ==For Tandy 100/102/200== -->
* PCB: [https://oshpark.com/shared_projects/2aTIo5Fq OSHPark] or [https://www.pcbway.com/project/shareproject/REX_Classic__BKW_re_spin.html PCBWAY] 
* BOM: [https://www.digikey.com/short/tj7bzf3h Digi-Key]
* Carrier: [http://shpws.me/SGNn Shapeways] or [https://www.sculpteo.com/en/print/molex78802_pcb_28-13/Bw4x3yG6 Sculpteo]


*[https://www.target.com/p/scotch-double-sided-tape-1-2in-x-450in/-/A-14045762 1/2" wide permanent double sided tape]
Note if ordering from PCBWAY: On the order page, you may have to manually change "Min tracks/spaces" to "6/6mil"<br>
All tracks & spaces are well over 6 mil (everything is 0.2mm which is almost 8 mil), and that setting drops the price from $50 to $5


*Card stock, such as from a cereal box. 2 pieces 1/2" x 1-1/2" per REX.
ENIG adds a lot of cost on PCBWAY and JLCPCB lately.<br>
<!-- info that matters, but also clutters up the page
Currently the cheapest way to get an ENIG version for gold contacts (other than OSHPark) is [https://www.elecrow.com/ Elecrow].<br>
Upload the gerber zip from the [https://github.com/bkw777/REX_Classic/releases/latest releases], and manually select ENIG and Castellated Holes, and just use the cheapest shipping.


:The tape and card stock are for building up a spacer on the bottom of the REX, to prevent either edge of the REX from dropping deep enough into the socket for the socket pins to snap out over the top surface of the REX. If this is allowed to happen, then you risk damaging the socket when you try to get the REX back out. This means that neither the tape nor any other part of the spacer can be spongy or compressible, so no double-sided foam tape, and no cork or corrugated cardboard or foam board for the spacer material.
<!--
    The github includes a working re-spin REX Classic for NEC.
    REX NEC requires a different .jed file for the cpld, which is not publicly available.
    However, if you have a REX NEC, you can dump a .jed file from it, and use that to program new REX NECs.
-->
<!--
==For NEC PC-8201/8300==
* PCB: (see github)
* BOM: Same as above, but add 50 of these legs (you need 28, but 50 costs less than 28): https://www.digikey.com/product-detail/en/te-connectivity-amp-connectors/1544210-2/A117856CT-ND/4729775 Or these: https://www.digikey.com/en/products/detail/mill-max-manufacturing-corp/3121-2-00-15-00-00-08-0/436677
* No carrier needed.
-->
-->


==Tools==
[[REX:flash|Other Compatible Flash Chips and how to identify them]]
* Xilinx "Platform USB" programmer.
:I used this actual ebay item: http://ebay.com/itm/112073269777
:
:But ebay links die after a while, so if/when the link above is dead, just search for "Xilinx Platform USB" on ebay or amazon etc.
:There are a lot of overpriced programmers, and I include the official Xilinx ones in that group. There is no reason I can see why a jtag programmer should cost $200.
:So, go on ebay and search exactly "xilinx usb", then sort by "price+shipping, lowest first, and filter by buy-it-now.
:Then skip the cables and adapters until you get to the actual programmers. You want one of the kits that has the programmer and several adapter cables, all for about $25.
:Then expand the item pictures and verify that it says DLC9G or DLC9LP, or DLC9. Prefer DLC9G most, then DLC9LP. DLC9 is oldest but would still work fine for this. DLC10 probably works too, if you feel like spending the money.
:Don't search for DLC9G or DLC9LP directly by name, you will only get the overpriced ones. Search "xilinx usb" and then look at the pics.


* "Modern" PC with at least one usb port, and a COM port or usb-serial adapter.
=Tools=
:To run the Xilinx software to program the CPLD, and to run a TPDD server to complete the programming process, and to get software onto the M100.
[[File:DLC9G Clone.jpg|thumb]]
:"Modern", only in comparison to the Model 100. I used a 12 year old atom-powered netbook, running Ubuntu 16.04. The point is it is possible to do the entire job with very little special requirements, IE even a dirt cheap netbook running only free software and OS is enough. It did require several gigs of hard drive space for the Xilinx software though, and getting the LabTools software installed and working, and getting the special usb drivers working DID require some non-trivial futzing around. But I described all that [[https://drive.google.com/folderview?id=0Bys6eLbSbYyhVFBQSW1pclpjaWM Here]] if you want to use Linux. (TODO: Windows directions, MAC directions)
*[https://www.ebay.com/sch/i.html?_nkw=xilinx+usb&_sop=15 Xilinx Platform USB programmer]
:Cheap Chinese clone is fine.
:Look at the pictures for ones that say model DLC9G, or DLC9LP. Don't put "DLC9G" or "DLC9LP" in the search, you will only get the overpriced ones.
:Get one that includes a "flying leads" cable, with separate loose individual wires on one end.<br clear=all>


*Sandpaper, medium grit (120 or so)
[[File:Usb-ttl-cable.jpg|thumb]]
:This is just to clean up and smooth the edges of the PCB a little.
*[https://www.ebay.com/sch/i.html?_nkw=usb+ttl+cable&_sop=15 5v power source with dupont sockets]
:A cheap usb-ttl cable is perfect. It's cheap, and already ends in loose wires with female dupont pins.
:Just use the red and black wires and ignore the rest.<br clear=all>
 
*PC with at least one usb port, and a COM port or usb-serial adapter.
 
*Sandpaper, medium grit (120 or so), and a hard flat surface like a cutting board.


*[http://www.microcenter.com/product/391332/12_Watt_Miniature_Corded_Soldering_Iron Soldering Iron]
*[http://www.microcenter.com/product/391332/12_Watt_Miniature_Corded_Soldering_Iron Soldering Iron]
:Do not necessarily need anything fancy. I actually used this exact one.
:Do not necessarily need anything fancy. I actually used this exact one to build a few REXs, although now I use a Hakko FX-888D with a T18-C2 tip.


*[http://www.microcenter.com/product/448396/No-Clean_Flux_Core_Solder_Sn63-Pb37_-_2_Ounce_Spool Solder, fine pitch, 63/37, no-clean flux or rosin core]
*[http://www.microcenter.com/product/448396/No-Clean_Flux_Core_Solder_Sn63-Pb37_-_2_Ounce_Spool Solder, fine pitch, 63/37, no-clean flux]


*[http://www.microcenter.com/product/444655/SRA_No-Clean_312_Flux_Pens No-Clean Flux]
*[http://www.microcenter.com/product/444655/SRA_No-Clean_312_Flux_Pens No-Clean Flux]
Line 58: Line 86:


*[http://www.microcenter.com/product/458849/Three_Lens_Multi-Magnifier Magnifying Glasses]
*[http://www.microcenter.com/product/458849/Three_Lens_Multi-Magnifier Magnifying Glasses]
:Or the strongest reading glasses you can get at the local drug store.
:Or the strongest reading glasses you can get at a local drug store. 3.00x or higher.


*[http://www.microcenter.com/product/451968/Technical_Grade_Isopropyl_Alcohol_999_-_32oz Alcohol for cleaning up]
*[http://www.microcenter.com/product/451968/Technical_Grade_Isopropyl_Alcohol_999_-_32oz 99.9% Isopropyl Alcohol]
:Don't really need this. The "no-clean" flux above can be left on, or cleaned with warm water.


*[http://www.microcenter.com/product/411268/Ultra_Fine_Point_Slanted_Tweezers__-_Black Tweezers]
*[http://www.microcenter.com/product/411268/Ultra_Fine_Point_Slanted_Tweezers__-_Black Tweezers]


*[http://ebay.com/itm/262802420892 Test Hook] to jump between the jtag vcc pin and PORT_EN (R3) to program the CPLD.
[[File:1x6 1x4 shunt.jpg|thumb]]
*[https://www.digikey.com/short/pb0wvj Pin Headers and Shunt]
:0.1" (2.54mm) pitch single row male pin header
:1x6
:1x4
:one shunt
<br clear=all>


*[http://www.microcenter.com/product/426789/10_01_40_Single_Row_Headers Single-Row pin header]
*A Tandy Model 100, 102, or 200.
:Just need a little section of 6 pins snapped off of one stick. The rest are not needed, but you almost can't buy them in any smaller quantity.


*A Model 100, 102, or 200.
*A [[Model_100_102_200_600_Serial_Cable|9F-25M-Null-Modem Serial Cable]]


*[[Model_100_102_200_600_Serial_Cable|Serial Cable]]
*Optional but recommended: [https://www.amazon.com/dp/B072JXQ9P5/ Ultrasonic Cleaner] and [https://www.sra-solder.com/sra-trupower-35-circuit-board-ultrasonic-cleaning-solution-1-quart saponifying PCB cleaning solution] and distilled or deionized water.


=Assembly=
=Software=
*Xilinx ISE 14.7 Lab Tools
:Lab Tools is a subset of ISE. You can use either ISE or Lab Tools, but you only need Lab Tools to program the REX.
:This software is old and needs special futzing to make it work, no matter what OS you are using.
:[https://drive.google.com/folderview?id=0Bys6eLbSbYyhVFBQSW1pclpjaWM Installing on Ubuntu Linux]
:[https://www.micro-nova.com/xilinx-ise-win10 Installing on Windows].


==Electronic Components==
*A [[TPDD_client]] to run on the M100
Install these parts:
:There are several tpdd clients, and several ways to get one installed. These are a few options:
:29F800 (on the back side)
::For Mac, Linux, FreeBSD, any other unix: Get [http://gitlab.com/bkw777/dl2 dl2] and use the bootstrap option to install TEENY.100 or any of the other options listed by "$ dl -l"
:XCR3064XL
::For Windows: Get [http://gitlab.com/bkw777/tsend tsend.ps1] and use it to install TEENY.100 or any of the clients found at https://github.com/bkw777/dl2/tree/master/clients
:LP2980
::Play [[File:DOS100.CO.MP3]] into the cassette port to install TS-DOS. (SOUND OFF:CLEAR 0,57089:RUNM "CAS:DOS100.CO")
:R1 = 0 ohm
::Get a real tpdd and bootstrap it's utility disk to install "Floppy".
:R3 = 10K ohm
:C4 = 1.0 uF


All other locations left empty.
*A [[TPDD_server]] to run on a modern host machine
:For Mac, Linux, FreeBSD, any unix: [http://gitlab.com/bkw777/dl2 dl2]
:For Windows: [http://bitchin100.com/wiki/index.php?title=LaddieCon#LaddieAlpha LaddieAlpha]
<!--
  This is all still true, but most people will not have any problem. It depends on how slow the host machine is, and most are fast enough.
  So it's not worth cluttering up and complicating the directions which are already complicated enough.
  The bug is definitely in the RF#49.CO util rather than in the other tpdd emulators, because for one thing, RF*49.CO does not work with an *actual TPDD drive*.
  This also only started with build 254. Build 162 works fine.
*[http://bitchin100.com/wiki/index.php?title=LaddieCon#LaddieAlpha LaddieAlpha]
:The rex firmware updater needs a TPDD server.
:dl2 and mComm above are both tpdd servers, which come with tpdd client installers, and previously you used to be able to just use one of those packages for everything.
:But there is a bug in the latest REX build 254 files, such that it only works (reliably) with LaddieAlpha as the TPDD server.
:But LaddieAlpha does not come with any dos installer.
:So, right now it's a bit inconvenient. You have to get one of the above packages just to use it's dos installer, and then you have to get LaddieAlpha also, and use it for the rest of the rex setup process.
-->


Orientation of the chips:
*[http://www.club100.org/memfiles/index.php?action=downloadfile&filename=rex_0110_April24%202011_no%20RST.jed&directory=Steve%20Adolph/REX/info& REX1 CPLD Jedec file]
:[[file:rex_chips_orientation.jpg|320px]][[file:rex_chips_orientation_zoom.jpg|320px]]


How to solder the chips without special tools: [https://youtu.be/erb6-i54tbo DRAG TECHNIQUE] , another example: https://youtu.be/09qb0KY_IF4
*[http://bitchin100.com/wiki/index.php?title=REX REX1 firmware]
:Start there, and follow the links to whatever is the latest "REX Release x.x Rebuild Package" zip file.


Pay extreme attention to the flash chip on the back. Use magnification to inspect those legs after soldering. Bridges are very easy to get and very hard to see on legs that small.
=Procedure=
==Prep the Bare PCB==
Lay a piece of medium grit (100-200) sandpaper face up on a hard flat surface like a cutting board.


==Spacer & Extractor==
Sand the edges of the PCB on the sandpaper just enough to clean off the panelization break-away points.
:1/2" double sided tape
:Cereal box
:Cloth Ribbon, 3/8" to 9/16" width.


Cut a length of ribbon about 2 1/2" long, and melt the cut edges with the soldering pen to keep them from fraying.
[[File:Castellation flags.jpg|thumb]]
Use magnification to look closely at the castellated edge contacts for copper or gold "flags" hanging on the edge of most contacts. Scrape them off with an xacto knife.<br clear=all>


Apply double sided tape to bottom of REX (The side with the flash chip, not the Xilinx).
==Solder the Electronic Components==
[[File:Soldered top.jpg|thumb]]
[[File:Soldered bottom.jpg|thumb]]
Solder these parts onto the matching labeled locations on the pcb.


Stick the ribbon to the tape on the REX, in the center of the ribbon, aligned lengthwise.
:U1 = XCR3064XL
:U2 = 29F800
:U3 = LP2980-3.3
:R1 = 10K
:C1 = 1uF
:TP1 & TP2 = right-angle pin (optional)


Add another piece of double sided tape on top of the ribbon, only as long as the REX is.
Don't be too intimidated by the tiny legs on that TSOP-48 chip.<br>
Just use magnifying glasses, lots of flux, and the [https://youtu.be/erb6-i54tbo DRAG TECHNIQUE].<br>
Another example: https://youtu.be/09qb0KY_IF4


Cut a piece of cereal box about 1/2" x 1-1/4", and stick that to the tape, aligned lengthwise, centered on the REX.
The TP1 and TP2 pins are only needed if you think you will ever perform the hardware modification required to use the [http://bitchin100.com/wiki/index.php?title=Main_ROM_Management_Feature main rom management feature]. See [[FlexROM_100]] or [[FlexROM_102]] to facilitate this.
<br clear=all>
<!--
===NEC===
For the NEC version, do the DIP legs the same way as [[FlexROM_100]].
:Cut 2 strips of 14 pins each
:Cut the top (larger end) off of all the pins using ordinary scissors, leaving a simple "comb" of pins.
:Insert the "comb" into the top of the pcb and poke the legs down through about 1/2 way. The frame holding all the pins together should be on the top side of the pcb, 2-3mm above the pcb. The legs sticking out the bottom of the pcb should be 4 to 6 mm long.
:Adjust the leg on one end of the row and solder that leg.
:Adjust the leg on the opposite end of the row so the row is even, and solder that leg.
:Solder all remaining legs.
:Examine the legs for excess solder on the bottom of the pcb and along the length of the legs. If there is any solder built up on the legs, use flux and solder wick to remove it.
:When you are sure the legs are all good, use flush cutters and cut the top of each leg off flush with the top of the pcb.
[[File:FlexROM_100-12.jpg|thumb]]


=Programming=
<br clear=all>
-->


==Program the CPLD with the .jed==
==Clean the Finished PCB==
Now we need to flash the CPLD (Xilinx) with the '''.jed''' file. This configures the blank CPLD into a functional device or circuit that actually does something.
Even "No-Clean" flux should still be removed as much as possible after soldering.


* Get the .jed file from [http://www.club100.org/memfiles/index.php?&direction=0&order=&directory=Steve%20Adolph/REX/info here].
The best is to use an ultrasonic cleaner and saponifying pcb cleaning solution.


* Install LabTools 14.7 from Xilinx
If you don't have that, then at least make sure your flux and solder are both "no-clean", and then use 99% isopropyl alcohol and a brush. This will still leave flux trapped under the chips no matter how much you soak it or wash it, but for no-clean flux it's not ideal but ok.
:[https://drive.google.com/folderview?id=0Bys6eLbSbYyhVFBQSW1pclpjaWM Linux]
:[[Xilinx:Windows|Windows]]


* Supply +5vdc to pin 1 of the board edge, and gnd to pin 14.
==Program the CPLD==
:The simplest way to do this is just pop the REX into a Model 100 (or 102, or 200) with new batteries or a wall plug, turn it on, go into BASIC and issue a "POWER CONT" command (tells the M100 not to turn itself off when idle). The ram in the M100 would probably get scrambled along the way, so back up any files you want on the M100 first.
Now we need to flash the CPLD (Xilinx) with the '''.jed''' file. This configures the blank CPLD into a functional circuit that actually does something.
:Another option is take any 5v phone charger, cut off the usb plug, cut off 3 inches of the outer insulation so you have 2 separate wires, strip  1/4" of insulation off of those, and use rubber bands wrapped around the REX to hold the red wire on pin 1, and black or bare on pin 14.
:(TODO indicate where pin 1 and 14 are)


* Hook up the "platform usb" programmer to the jtag pins with a single row male-male double-sided pin header.
*Get the '''.jed''' file from [http://www.club100.org/memfiles/index.php?&direction=0&order=&directory=Steve%20Adolph/REX/info here].
:The staggered offset of the holes, while the pins in the header are in a straight line, creates the tension so the pin header stays in place and all pins make good electrical contact without needing an actual socket. It takes some wiggling to get the pins inserted, but that is how it works.
:The LED on the usb programmer should turn green, indicating that the programmer is detecting the correct/expected 3.3vdc on the board.
:[[file:rex_jtag_pins.png]][[file:rex_programmer_hookup.jpg|320px]]


* Get the iMPACT program up and running.
*Connect the jtag, 5vdc, and PORT_EN jumper.
:FILL IN - what menu items to click on to load the .jed file, something like "Assign Configuration something..." also "verify chain" ?
<gallery>
Rex xilinx programmer.jpg
Usb-ttl-cable.jpg
Rex all cpld conn.jpg
Rex jtag.jpg
Rex power port en.jpg
Rex cpld prg connected.jpg
</gallery>


* Temporarily pull PORT_EN high on the CPLD (the Xilinx chip) by jumping from the jtag vcc pin (labeled 3V3), to R3, on the side of R3 closer to the Xilinx chip. (Be careful to get this right! The other side of R3 is GND. If you short vcc to gnd you may burn out the LP2980 3.3vdc regulator on the REX.) Lift the programmer vcc wire slightly up the jtag vcc pin, and clip a J-hook test/jumper lead to the jtag vcc pin. Then manually hold the other end of the jumper lead to touch the side of R3, and hold it there carefully.
*[https://docs.google.com/document/d/10KIFE5Zo7FUw-gWCkEibTjgq-EmEbtgugif0lVh8Q2I/edit?usp=sharing Use iMPACT to program the .jed file]
:[[file:rex_port_en.jpg|320px]][[file:rex_port_en_zoom.jpg|320px]]


* While holding the PORT_EN jumper in place, use iMPACT to program the .jed file.
==Snap the PCB Into the Carrier==
: FILL IN - what actual menu options / steps?
<gallery>
:[[file:rex_jed_before.png|320px]][[file:rex_jed_after.png|320px]]
REX_and_carrier.jpg
REX_in_carrier.jpg
</gallery>


==Flash the Firmware==
==Flash the Firmware==
The firmware gets written to the flash memory. This includes an option-rom image loaded in one of the 32k blocks of flash, which in turn contains REXMGR.
Follow the REX 4.9 update directions to load the firmware onto the REX.<br>
The original directions for that are here: [http://bitchin100.com/wiki/index.php?title=REX_Release_4.9 4.9 update directions].


To do this, follow the directions for the 4.9 update. The "update" also works for first-time install.
Here are explicit/literal example directions to do that using [https://github.com/bkw777/dl2 dl2] on a Mac, Linux, FreeBSD, or other unix pc.<br>
 
(For Windows: instead of dl2,
:Download & unzip the various files manually with a browser instead of cutting & pasting the wget & unzip commands.
:use [https://github.com/bkw777/tsend tsend.ps1] for the bootstrap in place of "dl -v -b FILE.100"
:use [http://bitchin100.com/wiki/index.php?title=LaddieCon#LaddieAlpha LaddieAlpha] for the TPDD server in place of "dl -v -u")
 
Back up any files off of M100. M100 will be wiped.
 
Cold reset the M100  (ctrl+pause+reset)
 
Power off the M100
 
Install the REX in the M100's Option ROM socket
 
Connect the [[Model_T_Serial_Cable|serial cable]] between M100 and PC
 
Power on the M100
 
'''Install dl2 on a PC:'''<br>
On the PC, in a terminal window.
$ git clone git@github.com:bkw777/dl2.git
$ cd dl2
$ make all && sudo make install
 
'''Install TEENY onto the M100:'''<br>
On the PC:
$ dl -vb TEENY.100
 
Follow the prompts on the PC and on the M100 screen...
 
On the M100:
:BASIC
RUN "COM:98N1ENN"
 
On the PC:
:Enter
:wait...
 
On the M100:
:Enter
NEW
?HIMEM:CALL9643
:Look at the <code>Top: #####</code> number.
:A 32k machine should say 62213.
:Yours may say something else.
: Use that number in the following CLEAR command.
CLEAR 0,62213
MENU
 
On the PC:
:Enter
:should be back at a shell prompt now


<!--
<!--
Build 254 rf149.co has a bug in it's tpdd routines.
There is a timing/race-condition bug in the TPDD routines in the REX flasher util, in versions after 4.9 build 162, whereby it doesn't work reliably with all TPDD emulators on all host machines. In fact, it also does not work with a real TPDD drive.
The tpdd must be a tpdd server running on a very fast machine.
 
A real tpdd1 or tpdd2 won't work, nor does an otherwise perfectly good tpdd server running on a less-than-blazing machine.
Steve has admitted that he only tests against LaddieAlpha himself, and so that is the only TPDD server that is garanteed to work (or rather, it's the only one he's likely to care about any bug reports). This is unfortunate, because for instance it complcates bootstrapping directions like these, because LaddieAlpha does not include any DOS bootstrapper. So you have to use dl2 or mComm to get TEENY or TS-DOS installed, and then use LaddieAlpha just for RF*49.CO
 
MOST of the time, any TPDD server will actually work fine as long as the host machine isn't slow. But I have an old pentium-m laptop runing ubuntu 18.04 that would not work with anything but LaddieAlpha. dl2 actually worked fine for everything else, it's only RF149.CO that didn't work, and only versions after build 162.


Build 162 has no such problem, but those files are no longer available from bitchin100 or club100.
So, for simplicity I'll use dl2 in the visible directions below, but for reference, here are directions to use LaddieAlpha for this stage.


  I have build 162 files still available on my google drive, but only for M100/T102, I never grabbed the T200 or NEC versions.
  $ mkdir LaddieAlpha
  However, the T200 version of build 254 rf249.co, seems to be ok anyway. (it worked for me)
$ cd LaddieAlpha
$ sudo apt install mono-complete
$ wget http://bitchin100.com/files/linux/LaddieAlpha.EXE
$ wget http://bitchin100.com/wiki/images/3/38/R49_M100T102_260_rebuild.zip
  $ wget http://bitchin100.com/wiki/images/6/63/M100_OPTION_ROMS.zip
$ unzip R49_M100T102_260_rebuild.zip
$ unzip M100_OPTION_ROMS.zip
$ mono ./LaddieAlpha.EXE /dev/ttyUSB0 6
-->
-->
[http://bitchin100.com/wiki/index.php?title=REX_Release_4.9 4.9 update directions]


<!--
'''Download the REX Classic setup files'''
[http://www.club100.org/memfiles/index.php?&direction=0&order=&directory=Steve%20Adolph/REX%204.9%20Beta 4.9 update files]
$ mkdir rex_setup
-->
$ cd rex_setup
$ wget http://bitchin100.com/wiki/images/3/38/R49_M100T102_260_rebuild.zip
$ wget http://bitchin100.com/wiki/images/6/63/M100_OPTION_ROMS.zip
$ unzip R49_M100T102_260_rebuild.zip
$ unzip M100_OPTION_ROMS.zip
 
'''Use dl2 to start a TPDD server'''
$ dl -vu
 
'''Copy RF149.CO to the M100, then run it.'''<br>
On the M100:
:should be at menu
:TEENY.CO
> L RF149.CO
> Q
:should be at menu
:BASIC
CLEAR 0,55000
MENU
:should be at menu
:run RF149.CO
:Answer Y
:Wait...
:should be at menu
 
'''Reset the M100 to clear out TEENY and RF149.CO'''
:ctrl+pause+reset
:should be at menu, ram wiped
 
The flash memory on the REX is now formatted and loaded with REXMGR and a TS-DOS option rom image.
 
'''Install REXMGR from the REX itself'''
:BASIC
CALL 63012
 
:should be at menu, REXMGR should appear in menu
 
REX is now ready to use, and empty except for TS-DOS.


The directions for the 4.9 update state that you use any tpdd device to serve the 3 files to the M100/T102/T200, but in fact at least at present, it does not work with actual tpdd1 or tpdd2 drives at all, and is not reliable with any other tpdd server/emulator either, except [http://bitchin100.com/wiki/index.php?title=LaddieCon#LaddieAlpha LaddieAlpha].
'''Now install an option ROM image. Example: Ultimate Rom II'''
:REXMGR
:press TAB once
:screen should say "TS-DOS* ------"
:press right-arrow once, highlight should move to "------"
:press F2
Loading from image filename: UR2100
Hit any key when TPDD ready.
Loading 0:UR2100.BX    ####
:now it should say "TS-DOS* UR2100 ------"


TODO: Document this part better. This is a bullet list, but there are more details involved for each item to actually do it.
UR2 is now loaded into REX, but not currently selected/active, TS-DOS is.<br>
What this means is, If you were to go back to BASIC and run <code>CALL 63012</code> right now, it would load TS-DOS, as if you had a TS-DOS option rom in the option rom socket.<br>
To run UR2, you have to select it in REXMGR first.


*Install any dos on the M100/T102/T200: teeny, floppy, ts-dos.
:right-arrow to highlight UR2100
:This will generally require a special [[Model_100_102_200_600_Serial_Cable|serial cable]].
:press enter
*Get LaddieAlpha onto a modern host machine.
:Y
*Get the 3 update files, and share them with LaddieAlpha.
*Use whatever dos you installed on the M100 to copy rf149.co to the M100.
*Run rf149.co on the M100.


This was the last step. You're done! Consult the [http://bitchin100.com/wiki/index.php?title=Special%3ASearch&search=rex&fulltext=Search REX docs] to start using it!
UR2 is now the active option rom image. Additionally, the equivalent of <code>CALL 63012</code> was already done for you by REXMGR just as a convenience to skip a step.


=References=
F8 back to menu.


[http://bitchin100.com/wiki/index.php?title=REX User Manual]
Leave dl2 running on PC while you load more rom images.


[http://www.club100.org/memfiles/index.php?PHPSESSID=0iltg2un40287et7flm4m54387&direction=0&order=&directory=Steve%20Adolph Original sources and support files]
Ctrl+C to exit dl2 when you're done with it.


[https://oshpark.com/shared_projects/vFF7oXfw PCB] (This is now a dead link)
=Done!=
That was the last step. You're done! Consult the [http://bitchin100.com/wiki/index.php?title=Special%3ASearch&search=rex&fulltext=Search REX docs] to start using it!


[https://drive.google.com/open?id=0Bys6eLbSbYyhV3NEdjhvWFlYMDg Copies of some of the sources and support files, and new sources for modified from the originals]
=Main ROM Management=
[http://bitchin100.com/wiki/index.php?title=Main_ROM_Management_Feature Main ROM Management]
*For 100, see [[FlexROM_100]]
*For 102, see [[FlexROM_102]]
*For 200, no FlexROM for 200 yet. See the regular REX docs.
<!--
*For NEC, you can use FlexROM_102 in NEC, but there is almost no reason to. The main advantage to FlexROM is the ability to deactivate/re-activate an internal main rom without taking the computer apart. In the NEC, the main rom socket is accessible, so you can just pop the standard main rom back in any time you need to.
-->


[https://oshpark.com/shared_projects/05Wk0mj8 PCB] (This version is probably good, although it's a salvaged earlier version of the rex.brd file that has messier silk screen)
=References=
[https://github.com/bkw777/REX_Classic KiCAD source files for the PCB]


[https://oshpark.com/shared_projects/5R4KDv8D Printed Circuit Board, pre-castellated] (this version is converted from the original EagleCAD 5 or lower .brd file, loaded in EagleCAD 6.6 and saved as new xml format EagleCad 6.x .brd file, then imported into KiCAD 4.07 pcbnew, then the edge cut lines edited, and saved as .kicad_pcb)
[https://github.com/bkw777/Molex78802_Module OpenSCAD source files for the carrier]


[https://github.com/aljex/REX1 pcb on github]
[https://photos.app.goo.gl/aNfjvB1XucSehPGB9 Version c6 pcb] This version of the pcb is obsolete, but has pics of the firmware flashing process.


=New / Pending=
[https://photos.app.goo.gl/EzncfFFAvmRmq5Mt6 Version c8 pcb] This version is also now obsolete, but the only difference is the pcb dimensions and matching carrier.


Modified version of REX, not verified yet:
[http://bitchin100.com/wiki/index.php?title=REX User Manual]
[[File:REX-bkw2-t.png|thumb]] [[File:REX-bkw2-b.png|thumb]]


:https://oshpark.com/shared_projects/4jR7ddvL
[http://www.club100.org/memfiles/index.php?PHPSESSID=0iltg2un40287et7flm4m54387&direction=0&order=&directory=Steve%20Adolph Original sources and support files from Steven Adolph]


Molex carrier modified to hold a REX. Needs a slightly modified REX to fit. Not yet done.
[https://drive.google.com/drive/folders/0Bys6eLbSbYyhV3NEdjhvWFlYMDg?resourcekey=0-MKkAnbTYHoSeNHfjYqjsIQ&usp=sharing Backup copies of some of the sources and support files]
:https://www.thingiverse.com/thing:3723135

Latest revision as of 03:24, 13 November 2023

Introduction

Building a REX

This is a version of Steven Adolph's REX Classic with a modified PCB design.
It is electrically identical to REX Classic, and uses the REX Classic firmware & software.

The PCB layout and shape are modified to:

  • snap into a 3d-printed carrier to fit the Molex78805 socket
  • provide connections for power and PORT_EN for programming the CPLD

Original version of this page, for building the original REX1

PCB Source
Carrier Source

Parts & Materials

Note if ordering from PCBWAY: On the order page, you may have to manually change "Min tracks/spaces" to "6/6mil"
All tracks & spaces are well over 6 mil (everything is 0.2mm which is almost 8 mil), and that setting drops the price from $50 to $5

ENIG adds a lot of cost on PCBWAY and JLCPCB lately.
Currently the cheapest way to get an ENIG version for gold contacts (other than OSHPark) is Elecrow.
Upload the gerber zip from the releases, and manually select ENIG and Castellated Holes, and just use the cheapest shipping.


Other Compatible Flash Chips and how to identify them

Tools

Cheap Chinese clone is fine.
Look at the pictures for ones that say model DLC9G, or DLC9LP. Don't put "DLC9G" or "DLC9LP" in the search, you will only get the overpriced ones.
Get one that includes a "flying leads" cable, with separate loose individual wires on one end.
A cheap usb-ttl cable is perfect. It's cheap, and already ends in loose wires with female dupont pins.
Just use the red and black wires and ignore the rest.
  • PC with at least one usb port, and a COM port or usb-serial adapter.
  • Sandpaper, medium grit (120 or so), and a hard flat surface like a cutting board.
Do not necessarily need anything fancy. I actually used this exact one to build a few REXs, although now I use a Hakko FX-888D with a T18-C2 tip.
Or the strongest reading glasses you can get at a local drug store. 3.00x or higher.
0.1" (2.54mm) pitch single row male pin header
1x6
1x4
one shunt


  • A Tandy Model 100, 102, or 200.

Software

  • Xilinx ISE 14.7 Lab Tools
Lab Tools is a subset of ISE. You can use either ISE or Lab Tools, but you only need Lab Tools to program the REX.
This software is old and needs special futzing to make it work, no matter what OS you are using.
Installing on Ubuntu Linux
Installing on Windows.
There are several tpdd clients, and several ways to get one installed. These are a few options:
For Mac, Linux, FreeBSD, any other unix: Get dl2 and use the bootstrap option to install TEENY.100 or any of the other options listed by "$ dl -l"
For Windows: Get tsend.ps1 and use it to install TEENY.100 or any of the clients found at https://github.com/bkw777/dl2/tree/master/clients
Play File:DOS100.CO.MP3 into the cassette port to install TS-DOS. (SOUND OFF:CLEAR 0,57089:RUNM "CAS:DOS100.CO")
Get a real tpdd and bootstrap it's utility disk to install "Floppy".
For Mac, Linux, FreeBSD, any unix: dl2
For Windows: LaddieAlpha
Start there, and follow the links to whatever is the latest "REX Release x.x Rebuild Package" zip file.

Procedure

Prep the Bare PCB

Lay a piece of medium grit (100-200) sandpaper face up on a hard flat surface like a cutting board.

Sand the edges of the PCB on the sandpaper just enough to clean off the panelization break-away points.

Use magnification to look closely at the castellated edge contacts for copper or gold "flags" hanging on the edge of most contacts. Scrape them off with an xacto knife.

Solder the Electronic Components

Solder these parts onto the matching labeled locations on the pcb.

U1 = XCR3064XL
U2 = 29F800
U3 = LP2980-3.3
R1 = 10K
C1 = 1uF
TP1 & TP2 = right-angle pin (optional)

Don't be too intimidated by the tiny legs on that TSOP-48 chip.
Just use magnifying glasses, lots of flux, and the DRAG TECHNIQUE.
Another example: https://youtu.be/09qb0KY_IF4

The TP1 and TP2 pins are only needed if you think you will ever perform the hardware modification required to use the main rom management feature. See FlexROM_100 or FlexROM_102 to facilitate this.

Clean the Finished PCB

Even "No-Clean" flux should still be removed as much as possible after soldering.

The best is to use an ultrasonic cleaner and saponifying pcb cleaning solution.

If you don't have that, then at least make sure your flux and solder are both "no-clean", and then use 99% isopropyl alcohol and a brush. This will still leave flux trapped under the chips no matter how much you soak it or wash it, but for no-clean flux it's not ideal but ok.

Program the CPLD

Now we need to flash the CPLD (Xilinx) with the .jed file. This configures the blank CPLD into a functional circuit that actually does something.

  • Get the .jed file from here.
  • Connect the jtag, 5vdc, and PORT_EN jumper.

Snap the PCB Into the Carrier

Flash the Firmware

Follow the REX 4.9 update directions to load the firmware onto the REX.
The original directions for that are here: 4.9 update directions.

Here are explicit/literal example directions to do that using dl2 on a Mac, Linux, FreeBSD, or other unix pc.

(For Windows: instead of dl2,

Download & unzip the various files manually with a browser instead of cutting & pasting the wget & unzip commands.
use tsend.ps1 for the bootstrap in place of "dl -v -b FILE.100"
use LaddieAlpha for the TPDD server in place of "dl -v -u")

Back up any files off of M100. M100 will be wiped.

Cold reset the M100 (ctrl+pause+reset)

Power off the M100

Install the REX in the M100's Option ROM socket

Connect the serial cable between M100 and PC

Power on the M100

Install dl2 on a PC:
On the PC, in a terminal window.

$ git clone git@github.com:bkw777/dl2.git
$ cd dl2
$ make all && sudo make install

Install TEENY onto the M100:
On the PC:

$ dl -vb TEENY.100

Follow the prompts on the PC and on the M100 screen...

On the M100:

BASIC
RUN "COM:98N1ENN"

On the PC:

Enter
wait...

On the M100:

Enter
NEW
?HIMEM:CALL9643
Look at the Top: ##### number.
A 32k machine should say 62213.
Yours may say something else.
Use that number in the following CLEAR command.
CLEAR 0,62213
MENU

On the PC:

Enter
should be back at a shell prompt now


Download the REX Classic setup files

$ mkdir rex_setup
$ cd rex_setup
$ wget http://bitchin100.com/wiki/images/3/38/R49_M100T102_260_rebuild.zip
$ wget http://bitchin100.com/wiki/images/6/63/M100_OPTION_ROMS.zip
$ unzip R49_M100T102_260_rebuild.zip
$ unzip M100_OPTION_ROMS.zip

Use dl2 to start a TPDD server

$ dl -vu

Copy RF149.CO to the M100, then run it.
On the M100:

should be at menu
TEENY.CO
> L RF149.CO
> Q
should be at menu
BASIC
CLEAR 0,55000
MENU
should be at menu
run RF149.CO
Answer Y
Wait...
should be at menu

Reset the M100 to clear out TEENY and RF149.CO

ctrl+pause+reset
should be at menu, ram wiped

The flash memory on the REX is now formatted and loaded with REXMGR and a TS-DOS option rom image.

Install REXMGR from the REX itself

BASIC
CALL 63012
should be at menu, REXMGR should appear in menu

REX is now ready to use, and empty except for TS-DOS.

Now install an option ROM image. Example: Ultimate Rom II

REXMGR
press TAB once
screen should say "TS-DOS* ------"
press right-arrow once, highlight should move to "------"
press F2
Loading from image filename: UR2100
Hit any key when TPDD ready.
Loading 0:UR2100.BX     ####
now it should say "TS-DOS* UR2100 ------"

UR2 is now loaded into REX, but not currently selected/active, TS-DOS is.
What this means is, If you were to go back to BASIC and run CALL 63012 right now, it would load TS-DOS, as if you had a TS-DOS option rom in the option rom socket.
To run UR2, you have to select it in REXMGR first.

right-arrow to highlight UR2100
press enter
Y

UR2 is now the active option rom image. Additionally, the equivalent of CALL 63012 was already done for you by REXMGR just as a convenience to skip a step.

F8 back to menu.

Leave dl2 running on PC while you load more rom images.

Ctrl+C to exit dl2 when you're done with it.

Done!

That was the last step. You're done! Consult the REX docs to start using it!

Main ROM Management

Main ROM Management

References

KiCAD source files for the PCB

OpenSCAD source files for the carrier

Version c6 pcb This version of the pcb is obsolete, but has pics of the firmware flashing process.

Version c8 pcb This version is also now obsolete, but the only difference is the pcb dimensions and matching carrier.

User Manual

Original sources and support files from Steven Adolph

Backup copies of some of the sources and support files