2023-08-20 18:36 UTC
Even though the MC-10 was marketed as a low-end machine, shipping it with only 4k of RAM is extremely limiting even back when it was released. It soon became very clear to me that more RAM was going to be needed in order to do anything useful. There was an official 16k RAM expansion unit that plugged in to the expansion port. I think that was the only official expansion ever released and it was quite common among MC-10 owners. The expansion port of the MC-10 is a little different to, say the Commodore 64, where the expansion port had a dedicated place in the memory address space. In the MC-10 the expansion port has access to every address in the machine and with a single input pin an external device can disable the internal address decoding entirely and place itself anywhere in the address space. Quite flexible actually but it does require relatively complex expansion cartridges. You can not simply create a game/progam cartridge with a single ROM for example. The expansion port comes with a drawback though. Even if it can insert devices and memory anywhere in the address space, it can not be used to expand the memory accessible by the 6847 VDP since the VDP and internal RAM is hooked up to an internal bus that is isolated from the expansion port. Since the 6847 VDP can address up to 8k of video memory it would be nice to expand the internal 4k RAM on that internal bus to 8k so that the full potential of the 6847 could be utilized. There was actually an article published in 1987 that explained such a modification. It involved piggybacking two more 2k SRAM chips on top of the existing ones and add some additional decoding. Today I would not recommend following that article. Not only does the article contain a few critical errors but it's just an unnecessarily complicated mod that adds four more chips, and piggybacking the RAM chips makes the RF shield not fit any more. I have another approach that involves just swapping the two onboard 2k RAM chips with a single 8k RAM chip. Actually the end result is reducing the total chip count by one.
2023-08-12 10:23 UTC
Shortly after I started my MC3 computer project I became aware of another computer from back in the day that was eerily similar in name and CPU choice. The TRS-80 MC-10 by RadioShack. From what I understand it was marketed as a low cost alternative to the bigger TRS-80 Color Computer but it did not sell very well. Here in Sweden it is very rare.
Basic specs- Processor: MC6803 0.89 MHz (derived from the 3.579545 MHz NTSC color crystal) - Video generator: MC6847 (only RF output) - Sound output: Single bit software flip-flop - RAM: 4kB - ROM: 8kB - Storage: Cassette I/O - Expansion: Bit banged RS232 and an expansion port with access to system bus - Keyboard: 48-keys "Chiclet" that is actually not that bad My MC-10 is originally from Canada so it's an NTSC version. I've heard rumors of a PAL version but never seen one. First I tried hooking it up to my modern LCD TV but it did not work very well. The MC-10 can be set to either CH3 och CH4. Not only was the image practically unusable but CH3 did not work at all and setting it to CH4 made it sort of work if I the TV was set to CH3. The RF-modulator was clearly out of tune. This is the best image I managed to get out of my Samsung TV. Not good enough. Let's pop the hood and see what can be done! Armed with the service manual and schematic I went in. RadioShack sure tried to meet regulations with the MC-10. That shield is thick and needed a lot of heat to desolder. There is a shield on the back of the PCB as well held on by small clamps. That bodgy looking 74LS32 is actually part of the official schematic. It even has a label. It’s a fix for making the code in ROM detect the correct amount of RAM (more on this later). Let’s get that RF modulator out of there and have a closer look. No surprises on the PCB under the RF-modulator. The machine gets its main clock from the RF-modulator though so it will not work without it and the chip inside (MC1372) is actually the NTSC color encoder so the RF-modulator is an important part of the machine. A quick look on the spectrum analyzer made it clear why I could not get my TV to lock on the MC-10 signal. Here the modulator is set to CH3 (61.25MHz) but the actual carrier at 67.60Mhz is closer to CH4 (67.65MHz). The audio sub carrier side bands are clearly visible though. The MC-10 RF modulator 4.5MHz audio sub carrier is there and looks to be reasonably within specs. The HP 5316A and the HP 5342A are both on the same frequency reference and displays a little differently. Most likely due to the different load they put on the oscillator. The color crystal oscillator should be 3.579545MHz and is easier to measure reliably. Needs a little tweaking but is not the reason the MC-10 RF modulator carrier is off frequency. I decided not to dive deeper into this and instead focus on how to get a composite video signal out of this machine. Even though the MC1372 is designed to generate an RF signal, there is a paragraph in the datasheet about striping the RF oscillator from the circuit and having it generate composite video. I pulled the crystal and the MC1372 from the original modulator and put them on a breadboard roughly the size of the original modulator. Followed the examples straight from the MC6847 and MC1372 datasheets and got something that sure looks like a composite video signal! Moved on by adding the final two transistor output stage as described in the datasheet as well as two trimmers to set the working point of the amplifier. After some quick adjustment I was greeted with a very nice and colorful image. The output is a 3.5mm stereo jack placed in the same spot as the original RCA RF output on the modulator. This way I have both video and audio output without any modification to the case. Added an attenuator and low-pass filter for the single flippy bit audio and routed it to the jack as well. Now I could finally use the TRS-80 MC-10!
Poking aroundNow when I could actually look at the video output without imminent headache I started looking around using the built-in basic and the original manual. Turns out that the keyboard is actually not that bad for something like this. The thing that takes some getting used to is that there is no backspace key. To correct your typing errors you either have to press CTRL+A which will act at backspace, or CTRL+Q which will delete the entire line. There is also only one SHIFT key, to the right, and only one CONTROL key, to the left. This takes some getting used to but after a while the typing experience is actually quite good. On power on you are greeted with the basic startup screen.
MICROCOLOR BASIC 1.0
COPYRIGHT 1982 MICROSOFT
That is very similar as the original 6803 Microsoft basic.
MICROSOFT BASIC VER. 1.0
COPYRIGHT 1982 MICROSOFT
Comparing the disassembled MC-10 ROM with the Microsoft 6803 basic source reveals that, indeed, it is the Microsoft basic with a few added custom tokens like SOUND for making noise and SET, RESET and POINT for modifying video memory etc. In general the basic is a very run of the mill Microsoft basic which is a good thing.
Memory mapDigging further into the address decoding reveals some of the, lets call them cost saving, choices made by RadioShack. The 4k of RAM is located at all the way up at $4000-$4FFF and the incomplete address decoding makes the RAM also appear at $6000-$6FFF. The schematic explains a bit of this. The 64k address space is divided into four 16k chunks by the U4 74LS155 decoder. The first 16k chunk is unconnected making the only thing existing there is the internal CPU registers and devices. The second 16k chunk is the RAM of which only 4k is used. That's the reason for the RAM showing up at two locations, and also the reason for the bodged in U20 74LS32 which is used to disable write to RAM in the second 4k area just beyond end of real RAM. I suspect this is to make the Basic detect the correct amount of RAM on startup. The Basic memory size detection routine is quite crude and will continue counting mirrored RAM as new RAM as long as it is writable. Here RadioShack simply opted for a hardware patch instead of altering the ROM. The third 16k chunk is decoded into two single byte devices, one latch on write (U8) which controls the five bit VDP config register and one bit sound output, and one buffer on read (U14) which scans the keyboard. The last 16k area is used for the ROM. Here RadioShack made it possible to use both 8k and 16k ROMs but only 8k was ever used as far as I know. This means, just like the RAM, the ROM is mirrored on this area. One thing to watch out for here is that the ROM is referenced to using the lower half of the 16k area but the CPU vectors are at the top of the 16k area which relies on the ROM being mirrored. To sum it up the memory map looks like this: $0000-$001F --- 6803 internal registers $0020-$007F --- UNUSED $0080-$00FF --- 6803 internal RAM $0100-$3FFF --- UNUSED $4000-$4FFF --- 4kB RAM $5000-$5FFF --- mirror of 4kB RAM (read only) $6000-$6FFF --- mirror of 4kB RAM (writable) $7000-$7FFF --- mirror of 4kB RAM (read only) $8000-$BFFF --- Minimally decoded single byte I/O slot for keyboard, VDG control and sound out $C000-$FFFF --- 16kB ROM but only 8kB used and mirrored twice I will continue exploring the MC-10. One of the first things I will start working on is some form of memory expansion. 4k is simply too little to make use of all the things this machine is capable of.
2022-08-28 16:43 UTC
This is a quick update to my MCFS file system to version 2.0.3 than contains stability updates to the compact flash driver as well as changes to the 'ls' and 'dir' command to now show file sizes in decimal form instead of hexadecimal. Thank you Steve for the debugging and feedback!
Source code for MCFS 2.0.3The source code structure is the same as for 2.0.2 and divided into four files. mcfs2.asm - main code mcfs2_rtc.asm - driver for the real-time clock mcfs2_storage.asm - driver for flash card storage mcfs2_ram.asm - variables in RAM format.asm - flash card format routine (use with caution) Make sure you read the documentation in the original article --> HERE
CompilingThe source files need to be combined in order to compile MCFS2. Either the assembler have the ability to read all files sequentially or they can simply be concatenated before compiling. Example 1 - all files at once
# as1h mcfs2.asm mcfs2_rtc.asm mcfs2_storage.asm mcfs2_ram.asm
# as1h format.asm mcfs2_storage.asm
Example 2 - concatenation
# cat mcfs2.asm mcfs2_rtc.asm mcfs2_storage.asm mcfs2_ram.asm > combined_mcfs2.asm
# as1h combined_mcfs2.asm
# cat format.asm mcfs2_storage.asm > combined_format.asm
# as1h combined_format.asm
Care must be taken to read the files in the right order. As a reference I have included my resulting S19-files.
2022-08-07 17:23 UTC
After completing and testing the QSD/QSE module and the BPF module, I knew the basic concept of the transceiver was living up to my expectations (see part 4 and part 5 for more information) and now I had to take a step back to figure out how to bring this all together into a self contained radio. My main mode of operation is SSB and I think I share that with many others. Having SSB makes it possible to also receive AM and CW which probably covers most, if not all, of my needs. CW TX is trivial to add later since it's just a carrier. The QSD/QSE module works with I/Q signals on the AF/LF side and while I/Q signals can represent more ore less any traffic mode (AM, FM, SSB etc) it requires quite a lot of processing to be useful. In order to make this transceiver operate on SSB I need to phase shift the I and Q signals precisely 90 degrees from each other over the entire modulation range, say 300Hz-3000Hz. Nowadays this is normally done in software but I really want to try doing this the analog way using all-pass phase shift networks and see if I can make it good enough for general use.
Basic conceptBelow is a block diagram of the basic layout of the transceiver that I have in mind (click to enlarge). This is most likely going to change as the project progresses but for now it sums up the general idea and concept. The two parts that are completed are the switchable BPF module and quadrature sampling detector/exciter module. In this write-up I will cover components to the right of the QSD/QSE, starting with the phase shift networks for processing the I/Q signals and convert them to and from AF signals. My idea is to create two all-pass filter networks, one for the I path and one for the Q path, and have them shift the phase +45 degrees and -45 degrees respectively. That way the total shift between I and Q will be 90 degrees. The naive approach would be to use only one 90 degree phase shift network on either the I path och the Q path, but doing it this way will limit the phase shift done in each network, making them perform better. I also want the filters to have the ability to change direction so that the same filters can be used for both RX and TX. There is a lot of fine tuning involved in these filters and doing it this way, besides reducing the number adjustment points by half, also ensures that the transmit performance will be about as good as the receive performance. It's a good sanity check.
Mechanical constructionFor the AF/LF parts of the transceiver I decided not to use individually shielded boxes, as I did it for the RF modules since it adds considerable amount of metal work compared to the performance gain (this may come back and bite me in the end). I decided to stack two half eurocards (100x80mm) with standoffs. Bottom board for the digital parts and top board for the analogue parts. These are interconnected by a 20pin ribbon cable. By separating this into two boards I hope to reduce the self-induced digital noise. The phase shift board/module is mounted on top of the analogue board.
All-pass filter phase shift moduleThis is the core of what makes this a self contained SSB radio. The idea here is to have a module that inputs I/Q signals on one side and outputs single sideband audio on the other side, as well as the reverse to make it work for both RX and TX. It should also have the ability to select upper or lower sideband. Below is the module I came up with. By just looking at the number of trimmers on this board one can expect quite a bit of tweaking but it's mostly due to the fact that the all-pass filter requires very specific resistor values. The design is based around two four pole all-pass filters with an optimized frequency range of 200Hz to 4000Hz. That should cover normal SSB traffic with some margin. The filter will only suppress the sideband for frequencies that are inside of this range. This means that the filter must be used together with corresponding band-pass filtration. Below is the schematic for the phase module. The all-pass filters are made up of two quad TL074 op-amps (U3 and U4). The resistors, trimmers and capacitors here must be high precision and low tempco. The trimmers set the frequency for each pole. In the schematic I have included the calculated pole frequencies and corresponding trimmer values. I used my Keithley 196 multimeter with kelvin clipleads to measure and adjust the trimmers in circuit after soldering to be as close as possible to the calculated values. Before the filters is a dual TL072 op-amp amplifier, U2, acting as a buffer to ensure high input impedance and constant drive to the filter. To do all the switching between TX and RX as well as selecting USB or LSB, I used two 74HC4052 dual channel four way analog switches. One on the input to the filter, U1, and one on the output of the filter, U5. I was very happy when I realized I could use these switches. It made the design very clean. During receive the signal flow is: I_RX & Q_RX --> AF_DEMOD and during transmit the signal flow is: AF_MOD --> I_TX & Q_TX During receive the output of the filters are summed into a trimmer, one trimmer for LSB and one trimmer for USB. The same arrangement goes for the input to the filter during transmit. That way the signal balance can be individually adjusted for all the four situations, LSB RX, USB RX, LSB TX and USB TX using the trimmers RV1, RV2, RV11, RV12. For selecting LSB or USB the filters are swapped between the I path and the Q path. One bonus feature of the 74HC4052 is that there is an enable input. Pulling this input high disables all switches and puts the module into a high impedance state. That makes it possible to connect multiple modules like these in parallel and select between them in software by setting this logic pin. The mechanical design I use makes it possible to stack multiple boards using pin headers. I have not yet tried this but it's an interesting expansion possibility. Dedicated narrow CW module maybe? AM? FM? We'll see...
Update 2023-01-06Can't believe I forgot to mention where the filter values are derived from. I spent quite some time reading and trying out various algorithms but in the end component quality and overall construction had a far greater impact on my end result than finding the absolute optimum algorithm. The J-TEK all pass filter designer software by GJ3RAX is a very good start. Great piece of software. In my opinion experimentation is needed to find the optimal values. The resistor values in the schematic will get you in the ball park. To get full performance out of the filter each pole must be adjusted individually. To do this, hook it up on the bench and jumper it to TX mode and any sideband. Then use a signal generator to input each frequency in turn and adjust each pole for 90 degree phase shift by measuring each pole input and output using a two channel scope. Either use the scopes built-in phase meter or set it to XY mode and adjust for best looking circle.
Main analog boardThis board is still very much under development but I figured I would post parts of it since it contains the very important band pass filter required by the phase module described above. The phase module sits as a mezzanine board on top of the main analog board and connects using three sets of pin header. Since the phase module only works for a specific audio band, the audio going in and out of the module must be filtered. This filtering is done on the main board. Below is an excerpt from the analog board showing the RX/TX audio switching and audio band pass filter. I based the filter around the well known MAX7400 switched capacitor low pass filter to make the bandwidth adjustable from software. It's currently driven by a spare output of the Si5351 signal generator. The drive frequency is 100 times the crossover point. The MAX7400 is then combined with a 300Hz high-pass filter on the input and a 3600Hz low-pass filter on the output. The low-pass filter is important since the MAX7400 will leak the drive frequency to the output, but being 100 times above the crossover frequency it's easy to filter out. To be able to share the filter between both RX and TX, I added a HC4053 analog switch. Outside of the schematic the RX_AUDIO signal goes to an AGC controller and the final audio amplifier, and the TX_AUDIO comes from the microphone amplifier and dynamic processor. There are also logic level control signals in the schematic but I think they are quite self explanatory. They are all coming from a separate CPU/logic board that I will present later.
PerformanceI have not yet performed any proper measurements regarding sideband suppression but after many evenings on the bands I can tell that it works surprisingly good. Definitely better than my Icom IC-735 reference transceiver. Using earphones and swapping sideband on an ear-shattering signal completely wipes it out and pushes it down in the noise. Good enough for me.
2021-10-21 19:59 UTC
I've had this Time Electronics 2003S Voltage Calibrator on the shelf for a very long time. It never worked. The output was way off and with several mV of ripple and oscillations at around 400-700 Hz. From time to time I've been working on it but never really got anywhere. The reason is that the core part of this instrument is rudely enough potted in epoxy. After going through everything within reach I realized the the problem was inside that nasty slab of hardened goop. I will spare you the details of the massacre that followed but after hacking away at this using acetone, heat and chisel, I eventually gained a peak inside the module only to sadly discover the, somewhat expected, state of bulging and fishy smelling leaking electrolytic capacitors and corrosion. I had spent hours already and was not going to spend all the time needed to refurbish this nasty design that was clearly intended to prevent repairability in the first place. I threw the module in the bin. This however left me with a nice base to rebuild the instrument. Let's have a closer look. The front panel comes off easily and contains all major parts of the device except for the power supply that is mounted in the back of the box. The device can be battery powered but I removed the batteries and disabled the trickle charger circuit a long time ago to prevent damage from leaking batteries. Now it's just a basic 18V linear power supply regulated by the somewhat uncommon 7818 voltage regulator. Not very interesting. Let's focus on the front instead. The front panel is quite self explanatory. There are five ranges selected by the knob to the right and the desired output voltage is entered with five digits resolution using the switch on the left. The difference between each range is a factor of ten. Range 1: 0-9.9999 V Range 2: 0-999.99 mV Range 3: 0-99.999 mV Range 4: 0-9.9999 mV Range 5: 0-999.99 uV No surprises so far. The front panel contains all the things you would expect. However flipping the panel over reveals a pretty nice PCB with guard rings and populated with precision resistors and trimmers. The connector on the left is where the epoxy potted module would connect. The manual and schematics are available online. Or rather part of the schematics. Unfortunately the schematic for the potted module is not in those files. It is only mentioned that in case of problem with the module it could be sent in for replacement. Probably not going to happen for an over forty year old instrument. However the manual also states that the module contains the voltage reference and a chopper stabilized amplifier. This is very useful information. Above is the schematic from the available documentation (I erased the parts for the 2003N that is not applicable here). It matches the board inside the meter. The component marked "2003 circuit module" is the epoxy potted module. That is just a black box but doing the math backwards using the resistors on the board reveals that the module is simply an inverting op-amp. An inverting amplifier also means that voltage reference is negative. About -6.294V. This is the block diagram of the 2003S. It's a voltage reference and an amplifier with variable gain plus an additional attenuator for the low ranges. The active components marked REF and AMP are what's inside the module and the resistors and switches are on the PCB. This is really good. It means that all of the critical components for voltage selection are on the PCB and not in the module! Armed with this new knowledge I set out to design a proof of concept replacement module. On the top of the schematic is the voltage reference. High performing voltage references are a whole other topic. This is a naive design around an LM129 reference zener and an OP177 op-amp. Good enough for a start but time will tell if it will be enough to meet the original specifications of the instrument. The LM129 provides a 6.9V reference and the OP177 is wired up as an inverting amplifier. The resistors R2 and R4 are equal and matched, which sets the gain of the OP177 to unity and inverted (-1). This is actually too much since we need a lower gain of around -0.912 to achieve the desired reference voltage of -6.294V. To nudge the amplifier gain down a bit, R4 is paralleled with a set of fixed resistors and a trimmer. The specs of these resistors are not as good as R2 and R4 but their values are selected to affect the gain just enough to reach the desired level. Therefore their impact on the final performance is reduced. In the middle is the main amplifier responsible for the actual output of the instrument. This amplifier have its feedback and gain setting resistors on the main PCB and knobs and dials. Even though the original design used a chopper amplifier I opted to try using the OP177 here as well. I did however buffer the output a little extra using a BC547 transistor and an oversized series power resistor to handle eventual shorted output terminals. The output driver transistor is also fed directory from the main supply to keep load off the local 12V supply. At the bottom is the power supply. Not much to say here. A positive 7812 regulator provides local 12V and a DC/DC converter based on a 555 provides -10V. The 12V rail stability is most important here since it also powers the LM129 reference. Note that there are two different grounds. One for the supply and one for the reference. Both end up in the same ground point on the main PCB to provide a star ground. This is the complete replacement board. I salvaged the connector from the potted module (only a small part of a corner was lost in the process). One important thing to mention here is the choice of components. As you see there are no crazy high end resistors. I simply did not have suitable alternatives at hand and component shortage is no joke at the moment, so I did the best I could with what I had. I will need to improve that once I manage to source proper ones. I probably also should get rid of the IC sockets to lower the thermal EMF. One thing I did however was to match the temperature coefficient on the U2 gain setting resistors R2 and R4. These resistors set the base gain of the reference amplifier as described above and need to be equal. The theory here is that the values of R2 and R4 will vary with temperature and it is okay for R2 and R4 to vary a small amount as long as the amount of change is the same in both resistors. This is where their temperature coefficients comes in. The way I did this was to heat up a container of mineral oil to around 50C and then use a 6.5 digit multimeter (my Keithley 196) with four point kelvin leads to measure a batch of 25ppm/C resistors until I found two resistors that exhibited the same resistance change when dipped into the oil. Then I mounted these two resistors close together on the board.[show older articles]