Monday, 31 December 2012

Sega SC-3000 (And Panasonic, again)



Sega SC-3000 (1983) is one of those gaming computers that do not have a built-in BASIC. I have some stuff lying around for it so it's not a complete waste of space. I enjoyed trying out Sindbad Mystery, one of the more decent games for the platform, a sort of Pac-Man with elements from Pengo. 

Pretty good looking for a 1983 game. The music makes me 
think of Sega's later Wonder Boy, especially when Sindbad reaches the third level.
Given that the SC-3000 does not have a built-in BASIC, it is a bit strange that there are BASIC keywords on the keyboard. Fiddling with the BASIC cart I have, I've found the speed to be reasonable, but it's a bit hard to guess what keywords there might be besides the ones on the keyboard. Apparently the higher level BASIC cartridges have more commands than the smaller ones, possibly for graphics and sound. The keyboard in my unit works so poorly that it's impossible to do anything but a few lines of code.
But what the hell are diereses?

The computer accepts good old Atari joysticks, which is good for games, as the Sega joysticks from the time are atrocious. Some games make use of the Sega second fire button, not available on all joysticks. The computer has tape connectors, a mysterious DIN-5 "video" output and a TV out. All in all, the black case is quite pretty, very flat and sci-fi. The sleek lines are greatly augmented by the flat rubber keyboard which has BASIC keywords imprinted above each key, and...

Wait a minute, haven't we seen something like this before?

JR200U keyboard
SC3000 keyboard
The rubber keyboard is suspiciously similar to the one in Panasonic JR200U. Ever since I got my Sega, I have been wondering about this feature. No, the layout is not identical, but there are enough similarities to make it certain there was some common origin for the two. I may never know the story behind this, but at least I can try to find out how similar the keyboards really are. Could they even be interchangeable?

The ribbon cable in front of JR200U. Connecting the red pins with the blue ones produces key presses.
I started the task with mapping the keyboard input of the Panasonic JR200. From the circuit board it is visually obvious how to start figuring out the columns and rows for the keyboard matrix, and after a little while of poking the connections with a short cable, I could map it for the most parts. (This way I could avoid breaking down the actual keyboard element, which might ruin it.)

Some keys, such as shift and control are left out for now, and I'm unsure about what some of the keys do. Here I have only included the keyboard-relevant parts for the table, as the rest of the 22 cables relate to the power LED, speaker and reset button.

Panasonic JR200U keyboard matrix (incomplete).
Connecting a blue pin with a red pin produces the desired key input.
Now, let's see the conditions under the hood of the Sega. The case top comes off in two parts. As the keyboard part is removed the backside of the case top can be kicked out. The insides are a bit crude, what with the bent, amorphous metal/folio covering most of the motherboard, but luckily the keyboard connectors are immediately visible. There is similar number of cables between the keyboard and the motherboard. This looks promising enough...

Removing the cover from Sega. The black wires connect the keyboard to the motherboard.
Here I found no need to examine the Sega keyboard connector, as the keyboard matrix (and a neat mod) can be found from here. I only rapidly checked that it holds true, poking a cable into the connector while running the BASIC cartridge. The table below is built using that information, assuming a running pin number from left to right, reading from the front of the machine.

SEGA SC3000 Keyboard matrix
The matrix has similarities with the JR200, especially when looking at the top half of my table. However there the similarities end. Compared to JR200 I'd say the Sega version is the messy one. Instead of the neat 8x8 matrix there is a 12x7 grid. It still might be possible to wire the Panasonic keyboard to the SC-3000, but it is not as straightforward as I had hoped. Then again, I'm not going to break my Panasonic anyway.

Sunday, 23 December 2012

Texas Adios


Just a quick peek at the computer called Texas Instruments TI99/4A. It's pretty old, from 1981, based on the earlier TI99/4 from '79. This makes it something of a contemporary to Sinclair ZX81 and Commodore VIC-20.

From what I had seen from pictures, I assumed this to be a more fun-sized computer. Possibly the TI brand made me expect something a bit more calculator-like. But really, it's huge, easily MSX-sized. The appearance is quite polished and the keyboard is very solid. It seems to me that quite a few US computers went for the "aluminum/black" look, don't know what is the origin for that. (TRS-80 and Timex Sinclair spring to mind.)

Despite the good physical quality, the keyboard lacks some crucial editing keys, like backspace and arrow keys. These are hidden behind FUNC-combinations. Curiously, the " character is via FUNC+P and not SHIFT+P, inconsistent with other characters. My unit is somewhat prone to double-type, but this could be the keyboard showing its age.

For a company that is renowned for its calculators, the TI calculation keys are surprisingly not very prominent. On the right side, in front of the front-loading cartridge port, there is a flat surface which to modern eyes might look like some kind of trackpad, but is really just a flat surface. There could have been some room for a keypad, who knows. I've read on the net people call it lovingly the "cup warmer" for the heat it gives, which is good to know because otherwise I might have been worried about the warmth.

The BASIC shows numbers "as they are" up to 9999999999, which is nice.

To my liking, this computer is bit too much like a video game console with an added keyboard and a BASIC added for a good measure. The BASIC does not integrate with the computer in the way it would do in most other home computers, so it seems more like an add-on that just happens to be included with the machine. Although the expandability of the machine is apparently very good, the built-in facilities and connectors are poor, really almost nothing. For these various reasons I've not been inspired to explore this computer too much, even if it is something of a minor classic.

If I've understood correctly, the computer uses the video chip memory as its main memory. From what I've read, the central processing unit can really only access 256 bytes of memory, and the processor is - get this - 16 bit, a first in home computers! Although the setup makes it sound like TI could be potentially a fast computer, as it happens this does not seem to be the case at all. I don't have any games but at least the BASIC is extremely slow, possibly the slowest I've yet encountered. It takes virtually seconds to print a bunch of numbers in a FOR-NEXT loop. LISTings are almost like teletyped.

Using CALL CHAR to re-edit the empty character.
The command affords quite nice pixel graphics, but this was all I could bother to do for now.
I'm usually quite intrigued to explore various BASIC dialects in the old computers, and I was lucky enough to get the computer with the BASIC manual. Curiously enough the manual is a Finnish version published by Salora, who also branded Laser 200 as Salora Fellow in Finland at around the same time, but that is another story.

I was eager to find out whether the BASIC had some similarities with the "TI BASIC" included in their later calculator lines. Alas, there does not seem to be any meaningful relation. This BASIC is not really geared towards calculation any more than other similar languages back in the day. The BASIC displays large numbers in somewhat more user friendly format but that's about it.

Looking at the manual and trying out the commands it strikes as weird that there are no PEEK or POKE commands that could access the memory directly. So, the programmer can forget about inserting machine code statements via BASIC. Also, as the video chip is the famous VDP as used in MSX and the like, there's no straightforward "character memory" to mess with either. Instead, there are CALL commands for doing various helpful things that would otherwise be far too slow to do in TI Basic, such as filling portions of the screen and re-editing the character set.

As a separate product, there was some kind of "extended" BASIC and an assembler too, which presumably give more freedom to the programmer. As it is, the access to the hardware is very limited, and it's even a bit uncertain how much memory there even is. The manual boasts of the 16k memory available to the user in addition to the memory used by the TI BASIC, which really cannot be the 256 bytes the processor uses? So, what is that memory about? Also, one part in the manual warns that the memory upgrades available do not extend the available memory for the BASIC, but are instead used for the other (separately sold) extensions. Wow.

TI 99/4a is a kind of a neat kit, but allows for very little exploration and experimentation. This makes it somewhat dull, even if the BASIC command set is quite potent for its time. Although the TI is in some ways superior to both ZX81 and VIC-20 I mentioned early on, the available potential to the user is clearly inferior, at least from out of the box. To assess the gaming potential, I'd have to see some actual games. Due to the VDP chip I expect them to be quite close to MSX and Colecovision in visual appearance.

For what it's worth, here is TI99/4A making a cameo in an italo-disco music video:





Saturday, 8 December 2012

Night of the living dead Spectrum keyboards

I have started to do some groundwork for some simple 8-bit keyboard projects. The first goal is to connect an original Spectrum keyboard to the ZX Evolution computer I discussed previously. The Evolution has pins for connecting the original keyboard, and this way, a Spectrum keyboard could be used for an authentic gaming experience.
ZX evolution keyboard input pins.
1-8 for rows, 10-14 for columns. (9 is for Reset) The rest are for Joysticks.
The figure is borrowed from the ZX Evolution manual.


Spectrum keyboard membrane, colour coded for columns and rows. 
Each of the 40 keys completes an unique connection between the 5-lane and 8-lane pathways.

With the original Spectrum, the 40 key switches are connected to the motherboard with two pathways, one with 5 lanes and the other with 8. Crossing these forms a matrix that the computer can use to decipher which of the 40 switches are pressed at a time. For those interested in the Spectrum keyboard matrix and the membrane logic, I can refer to this blog post.

Yes, it's a bit crude.
The 20 pins in the ZXevo port handle both joystick input and the Spectrum keyboard inputs. For example, my first joystick adapter is pictured above. The thirteen not-yet connected wires ought to be continued to the membrane. My approach is to do this Franken-adapter first, and if it works, do a better and more interesting solution.

My perhaps biggest concern is how to continue the fragile membrane material with wires. This could be easier with the proper parts, but I usually go first to my existing collection of junk parts. (As can be seen from my joystick adapter.) There is a certain type of connector inside the ZX Spectrum that does the job, but I do not have those kind of parts available. So, I used the two connectors I happened to have:

This image shows the piece of balsawood that fastens the membrane to the connector.

These connectors are too wide so I insert the membrane pathways along with a piece of soft balsa wood. Notice also that the membranes are one-sided. There is also a possibility the connective material in the membrane wears off with too much inserting and removing. I used a broken membrane for practice so I would not ruin a working one. (It's very common for old Spectrum membranes to have some of the pathways broken.)

The "key" chosen for testing is marked with an arrow. This is the key "5" on the Spectrum.
The sharp-sighted might note that my connectors look like ZX Spectrum peripheral connector parts. Indeed they are cannibalized from old joystick adapters. Hopefully I do not need to waste both of the connectors for this project...

I have connected two chosen pins to a multimeter. This way, I can check one key on the membrane I want to use as a switch to complete the circuit.

Pictured from the other side, testing the connection. Give my creation life!

It's not so straightforward to understand how the 8-bit computer reads the keyboard. In this respect, the above test is a bit misleading, as there are no 40 inputs inside the Spectrum which could all be individually read. Thankfully, in this project, this does not need to be deciphered. My task is just to continue the membrane wires to the corresponding pins on the ZX Evolution motherboard. The test was only about the physical connection between the membrane and the electric cables. 


Connecting the keyboard membrane to the ZX Evolution

The test was promising enough so I went forward with building a complete keyboard connector. I cut one of the peripheral connectors in half, so I do not have to waste both of them. I am using a raster board for keeping the connectors in place, and some terminal blocks for joining the cables at the other end to the same plug. I did not want to solder anything at this stage. This turned out to be a good idea because the connections ended up wrong. My terminal blocks are a bit too large for this kind of work but I will eventually abandon them anyway so it does not matter.

A bit difficult to keep this all in position...
As the membrane is connected to the ZX evolution, it becomes apparent that something is wrong. Promisingly I can get some key reactions, but everything comes from the wrong place. At first I thought I might just have got the pathways in reverse order, but no.

I ended up checking the connections directly from the ZX evo pins, connecting each row pin with each column pin with a piece of wire to find out what letters are then displayed on the screen.


It turns out the ZX evolution manual could have been more helpful here. Although the five lanes are in a direct order, as implied by the manual, the eight lanes are really not. I clarified my findings on a piece of paper, tracing each connection explicitly to the motherboard pins. The order is shown below.

The ZX evolution keyboard input port. K1-K8 connect to the wide membrane pathway,
and the D0-D4 to the narrow. Pins 16-20 are for joystick.
As I rebuilt the connections, I could finally use a proper ZX Spectrum keyboard. Now, all the keys work. However, the keyboard can't be really used yet, as this version of the connector is so poorly built. The contraption now needs to be put inside the empty Spectrum case. 

I am already happy to note the Spectrum keyboard input does not disturb the PS/2 keyboard in any way. The Spectrum keyboard can be connected at all times, and all the Evo functions can be accessed from the PC keyboard if needed.

It looks slightly infernal...
Closing the case

I replaced the Spectrum motherboard with the electronics board. I also made sure I could screw the board in place if I want to. There is only one screw that connects the motherboard to the casing, so this whole thing is a very clean to do. I have in no way ruined the original Spectrum, and will probably return all the parts after I've toyed with this result.
The view from under the hood.

I soldered the connectors to the board. I turned the connectors sideways, because otherwise they would not fit inside the Spectrum casing. I had to bend the pins to do this. As the two membrane pathways have the contact surface on a different side, the connectors also face into different directions. I have removed the flat cable connectors and soldered wires directly using the board underside, and these wires now go to the screw terminal block that brings the wires to the ZX evolution. In some ways the setup is more comfortable for the membranes than in the original. These are a bit difficult to insert, though, but that's mostly because of the silly balsa wood solution.

Playing "Bruce Lee" on the ZX evolution with the rubber keyboard.
Carpal tunnel syndrome, I welcome thee!
Was it really worth it? I mean, back in the day people usually went through the trouble to replace the original keyboard with something else. But anyway, the keyboard works as intended. The squishy rubbery feeling is almost a part of the genuine Spectrum games. Playing with something else would be almost like cheating!

I still have some points to consider. If I really want an "authentic" experience, the sound ought to come from inside the case, too... I have assumed my board works with the Spectrum+ and 128 varieties, but I have not tried it out yet.

Eventually, I hope to understand the Spectrum keyboard for connecting some other keyboard to the original ZX Spectrum, or just generally swapping different 8-bit computer keyboards with each other. With computers such as Laser 200, Spectravideo and Spectrum this ought to be doable as the keyboard "modules" usually do not contain any electronic parts, just the connection matrix. The why of such a project might be a bit unclear, but at least in the case of Laser/Fellow it would improve the existing keyboard greatly, and it would be simpler to build than a PS/2 or USB adapter. Anyway, making such a swap would mean rewiring an entire keyboard matrix, so I am not going to do that just yet.

Sunday, 25 November 2012

ZX Evolution


The tinfoil protects it from UFOs.
ZX Evolution is not an "old machine", but it continues the proud tradition of Spectrums in the 21st century. It is a new computer model based on the z80, compatible with Spectrum and Spectrum-related models, such as the Russian Pentagon. It's not really meant to be a 100% authentic replacement for an original Spectrum, and it is not a Spectrum emulator either. As they say, it is a "hobby computer". This means it is good for building your own projects, no matter how big or small. You can enjoy making something simple like your own joystick connector, or you can try to rewrite the whole computer. Or you can be content playing games and watching scene demos. It's just that the foundation is a Spectrum compatible computer.

Basically, ZX evolution can be used for running original spectrum software as TAP files from a memory card. These files are available on emulation sites. It also reads TRD and SCL disk formats.

From Russia with Evol.
The package I received includes a short printed manual, a CD with software and information (mostly in Russian), stickers with the ZXevo logo and stickers for the keyboard with Sinclair Basic keywords. There is no power supply, connectors or any storage media. The manual, which is in English, is quite minimal, but it gives a detailed explanation of all the board connectors and pins and tells how to get the computer running. 

Stuff needed:

-A power supply
-A VGA monitor that can display 50hz and a VGA cable
-Alternatively you can use an RGB monitor/TV, but you may need to build an RGB cable as there is no direct connector, but on-board jumper-style pins.
-PS/2 compatible keyboard
-SD card (Not necessary, of course you can load games from tape)

ZX Evolution housed in a mini-ITX case, connected to a VGA monitor and a PS/2 keyboard.

ZXevo for dummies

The simplest and most painless way to get ZXevo up and running is to put it into a Mini-ITX case with a power supply. This is very easy and requires no special equipment or knowledge, only a screwdriver. The board is larger than a Spectrum motherboard, so it does not simply fit inside an existing Spectrum case. This might be a pity for Sinclair fans, but it is hardly a big problem. However, with some creativity, I think it might fit inside a modified +2 case. (The +2 case depth is about 170mm, which is the same as the board dimension.)

I ended up buying an Antec ISK-110 VESA case, which offers good options for different positioning, including a wall mount. Nearly all the parts and faces of the case can be removed, and the cover is also quickly removable. This is quite important as otherwise it will be difficult to access the board.

Click the image for a closer look at this old Compaq keyboard/mouse combo,
fitted with the Evolution key stickers. 
In addition to the PS/2 standard mouse and keyboard connectors, the evo board has pins for Spectrum-compatible keyboard and joystick inputs. Of course, these pins can be used for whatever switches you want to. The PS/2 functions as a Kempston mouse when used with old Spectrum software. It is also very simple to create mouse-based programs even in BASIC.

I used the front panel audio connectors for stereo out and tape in. I tested a cassette tape recorder for loading in an original Spectrum tape and (of course) it works. I also used Fuse spectrum emulator on Macintosh to send audio to ZXevo audio in, with volume at maximum. If Fuse emulation speed is set to 200% and Evo is set to 7mhz, the files can be loaded in double speed. I can't vouch for the reliability of this method, though. Using 400%/14mhz did not work directly.

One thing I'm not yet certain is whether the RS232 port on board works as the Spectrum RS/MIDI port, of if it has some other purpose in ZXevo.

Basic use

The first impression can be confusing. The screen is filled with numerous options and key commands. However, only few of these are important for the casual user. The screen has been clearly divided between settings and direct commands. There is some mouse support, but to be honest the direct key commands and cursor keys work better. 

The normal EVO Service boot screen.
Using reset (F12 on the keyboard) always brings back the boot screen. The EVO service boot screen is not the only boot screen, as it depends on the chosen service. Pressing 0 together with the reset should bring back the original EVO reset service.

Loading TAP tape images, TRD or SCL files from the memory card is straightforward. "File browse" can be used for selecting these file types. Tapes run instantly, and TRD and SCL also require to use "TR-DOS boot" option after the image has been chosen. Press reset button when bored to get back to the EVO reset service screen.

Pressing I and U keys boots a 48k and 128k Spectrum, respectively. The Turbo mode allows switching between 3.5mhz, 7mhz and 14 mhz CPU speeds.

TR-DOS what?

None of the following is really necessary for the normal use of the ZX evolution, as disk images can be mounted in the boot screen. When storing data and BASIC programs from the Spectrum to the memory card, it becomes necessary to learn some TR-DOS. Simply using SAVE "myprog" from BASIC does not store the program on the disk, as the computer will begin outputting the file as audio. 

The average Sinclair user may never have encountered TR-DOS, but it is quite big part of the ZX Evolution experience and very much used in the Russian Spectrum scene. One should know at least how to exit it! (Hint: It's the RETURN keyword.)

TR-DOS is basically a command set for a disk interface that was not part of the normal Spectrum. It originated in the UK, but it seems the later Russian computers generally used a modified TR-DOS for disk access. Here, it allows running and storing data to a ram disk or a disk image on the memory card. 

Thankfully, it's not very complex. In BASIC,  the interface is entered via RANDOMIZE USR 15616 and then the SAVE keyword works as usual. If the mounted image is on the memory card, the basic program will be permanently stored within that image on the card.

LISTing the contents of a disk image in "drive A" via TR-DOS.

When in TR-DOS, the commands are accessed through normal Spectrum BASIC keywords, which now have a different meaning. LIST lists the current disk image contents. Using LOAD "filename" loads and runs the chosen file. SAVE can be used for storing the current BASIC program into the chosen disk image. COPY can be used for copying files and so on. RETURN keyword exits the TR-DOS. From the BASIC, RANDOMIZE USR 15616 brings back the TR-DOS. The disk interface can be accessed even if you did not boot into TR-DOS, as the interface is a permanent part of the ROM.

Viewing the SD card contents via TR DOS.
The later ZXevolution firmware has been extended to allow mounting and manipulation of TRD disk images from the SD memory card from inside the TR-DOS interface. The memory card has its own file structure, the one that can be seen if you connect it to your PC and Macintosh. This is also shown by the EVO service file selector. The disk images on the card have their own internal file structure that is normally visible in TR-DOS. 

Now, both file structures can be accessed from within TR-DOS. This can be confusing, as there are two "layers" of directories and a different command set for each of them. The new commands are preceded with a period (".") and these are typed in letter by letter. .DIR lists the contents of the memory card (and NOT the TR-DOS disk image), and likewise .CD and .MOUNT can be used to access the files on the card. .MOUNT filename drive: inserts the chosen disk image into the chosen virtual drive. .A:, .B:, .C: and .D: can be used to switch to that drive. Then the disk image contents can be viewed with the LIST keyword.

Assuming there is a folder called TRIMAGES in the SD card, and within that directory there is a TRD image called ELITE3:

.CD TRIMAGES
.DIR
.MOUNT ELITE3.TRD B:
.B:
LIST
LOAD "boot"

It appears confusing but as I already said, this is not really necessary for running software. The images can be mounted and booted from the EVO service file selector. Working with the TR-DOS can be messy, and it is not always obvious what is going on, depending on what machine has been booted. Sometimes it seems the zxevo insists on loading the boot file on the disk regardless of what I'm trying to do. So, a little persistence is needed.

Summary

A card reader and an original Spectrum is a good combination if you just want to run programs and games on the original, authentic hardware. Emulation is even easier choice. Pretty much everything can be made to run on an emulator these days. Emulators are good for cross-platform code development, as you can get your code running instantly. But honestly, emulation on its own gets a bit boring. There are no simple connectors for Do-It-Yourself projects. You also have to wait for the computer to boot up. Also, modern computers do not easily give solid frame rates.

Now, the ZX evolution is a new computer, a continuation of the Spectrum lineage in Russia in the 90s. It is very open for simple modifications and personalization, starting from the casing and the keyboard.  It is silent and the boot time is instantaneous. Zxevo can also run various different versions of the Spectrum-style computers, and is not limited to the original hardware.

ZXevolution page on NedoPC

NedoPC site

http://zx.rediron.ru/ (ZX Evolution site, in Russian)

Installing TS-Conf

Sunday, 18 November 2012

Spectrum 128 and MIDI




Information on MIDI and the ZX Spectrum is available on the net but it is a bit more scarce than one might think. So I'll try to collect some of the useful things here and also fool around with Spectrum and MIDI.

The RS232/MIDI port on the back of the Spectrum is not a standard MIDI port, obviously. But making it work is not a matter of simply rewiring the port, as it needs a few resistors and a transistor. Also, a somewhat obscure plug is needed if one does not wish to build the cable directly into the Spectrum.

Pictured, a BT-like plug and a DIN-8 connector, which passes for a MIDI port.
The plug at least looks like a BT cable, 631A, with all the six pins. The plastic parts may need some changes before it fits the Spectrum port. For the MIDI connector, I used an 8-pin DIN, which has more pins than a MIDI port requires, but as long as there are holes in the correct place it does not matter. My MIDI connector is built according to a document by Ben Versteeg at benophetinternet.nl/hobby. Direct link to the document is here.

The white cable is connected to the RS232/MIDI port. Yes, it looks a bit messy now.
Programming MIDI via BASIC

Try as I did, I could not really find a proper MIDI sequencer for the Spectrum. I suppose around 1986 onward nobody in UK did little else than games for the Spectrum. Possibly the russians have made something for their Pentagons and Scorpions, but they might not work on a vanilla machine.

Fortunately, BASIC offers a simple way to test the port in action. The Sinclair Spectrum 128k introductory manual describes all the commands. Perfectly timed sequences can be built out of text strings. As the Spectrum BASIC allows fairly flexible string manipulation, tunes can be structured programmatically. The single PLAY command then initiates the whole multi-channel sequence.

The pseudo-full screen BASIC editor in 128 Spectrum.
Something like this was used to create the loop in the video above.  
The example below should be valid in 128 BASIC:

10 LET a$="T120Y1M1O3N((1e1e1e1e1e1e1e1e))"
20 LET b$="T120Y1M1O3N((1c1&1&1&1&2&1&1&))"
30 PLAY a$,b$

The example plays notes simultaneusly on two channels. T sets the tempo at 120BPM. Y is the important command here, as Y1 selects the MIDI output channel #1.

The actual tune is controlled by the codes within the character strings. Lower case letters cdefgab play the notes on the octave, whereas upper case letters CDEFGAB play notes on a higher octave. The & denotes a rest. The notes are preceded by a number (1-9) that defines their length. Using a # indicates a sharp note. The brackets are used to repeat a section, and this can be done to up to four levels. Here I'm looping the contents four times.

M selects the channel (not needed for MIDI I think). O1 sets the octave at the second lowest octave. N is used to separate numbers from each other. It seems to be a good practice to insert it at least between the setup and the notes. Z apparently would send out raw MIDI data, but I'll see about that one later.

A 32-step sequencer with two channels.
It's fairly easy to sketch out graphical ways for creating sequences. as the data can always be "compiled" into the strings and played. However, in BASIC these things are notoriously slow. One thing to avoid is trying to build loops or song structures with GOTO commands. It just won't work. It's better to append the whole song into the character strings and use a single PLAY statement.

To be continued...

The Spectrum connected to a KORG Electribe sampler.

Sunday, 4 November 2012

Spectrum 128k+2 MINI summary


The above shows a modified Sinclair Spectrum+2, side to side with the original rubber keyed Spectrum 48k. I removed the integrated tape recorder. I have described the modding process with detail. Links to Part I and Part II. As an add-on, the picture shows the Divide 2k11 compact flash card reader, which removes the need for tape loading.

I bought my Divide 2k11 from Lotharek.

If you want to repair the tape recorder instead of removing it, here are some pointers.

RWAP software is worth mentioning. They sell keyboard membranes for the Sinclair series.

Schematics for building an RGB cable for the 128k +2. Fortunately this one is probably the simplest to build.

Alternatively, you can order one online from Retrocables. It can come off cheaper than building your own if you don't have the parts and equipment already.




Saturday, 6 October 2012

Sinclair Spectrum 128 +2 MINI part II

(Continued from Part I)

I'll continue describing the MINI ZX Spectrum 128+2 project, a.k.a "The sawed-off Spectrum". I'm not entirely satisfied with the turn of events described here. Also, some of the following stages might be avoided, but bear with me.


I previously cut off the cassette recorder part from the main body. I have also cut about two centimeters off the end of the recorder part. The opening will be capped with this small part. Just as the first cut was aligned with the left side of the tape recorder opening, the second cut was positioned with the right side. This was pretty convenient.

Now the cut edges need to be smoothed and connected to each other.

Sanding the edges


When I understood the project would involve sanding, I was somewhat demoralized. It needs a lot of patience to get good results. I might also end up doing a lot of work that gets me nowhere (I'm thinking of the seam). Yet I could not imagine any other way for smoothing the part edges.

Building the sanding device. The sanding paper is glued to a block of wood.
I used 120 grit sand paper for the more rough work and a 240 grit "metal" sanding paper for smoothing it off. The little end piece was worked against a sanding paper on a table surface. For sanding the face on the Spectrum body, I created a bit more sophisticated sanding setup.

I positioned the Spectrum cover upside down on two thin wooden "rails", so that the body would stay level. I glued a piece of the 120 grit sanding paper on a wooden block. This helps to get the sanded surface into a 90-degree angle. 

The sanding jig in action. The Spectrum body is elevated on two rails. There's also a piece of wood under the sanding block, not very visible in the picture.
(Of course, sanding plastic may be a bit of an unpredictable health hazard, so I'm not really recommending it. Especially machine sanders tend to produce fine particle dust floating in the air. I did some work inside but as the workload got bigger I moved outdoors.)

Sanding the body part with the block did not take long. In fact, the smaller piece was more difficult to do and ended up a bit skewed.

Joining the pieces


This is the stage that I have been longing to get at. Would the two pieces connect well? After the sanding, the connecting surfaces turned out to be better than I expected. I did not think too long and just used a simple generic "Scotch" plastic glue to put the pieces together. Although the parts fit each other very well the seam line remained very visible, as expected.

As can be just about seen from the image below, the piece is at an angle with the body. This was a result of careless sanding of the smaller piece. The process almost automatically eats away the shorter ends, where there is less surface area. Therefore the angle did not stay rectangular. Some more thought could have been used there. Fixing this would have required so much more sanding I let it be.

The seam is coloured by dust and is really not that prominent. The resulting surface is still pretty smooth.
I also did a little extra thing, which may or may not be silly. I used a solder station in 300C setting to melt and fuse the seam from the underside. I hoped to give some additional firmness to the connection, as I don't trust this glue that much. However, I suppose it's not a good practice for connecting plastic pieces. (Also, the resulting gases and stench are quite horrible.) 

Why not "fuse" the topside too with the soldering iron and sand off the residue? I did not dare to. It might have resulted in pits and holes that would have been impossible to remove with sanding.

Also notice the mysterious block of soft gum at the bottom of the picture, a feature of the Spectrum +2. 
I might eventually need to spray paint the cover, to make the seam invisible. But in order to do that, I would need to level the seam completely with some kind of paste, and sand the surface before painting. No surface unevenness can be hidden with the paint alone. I do not have any good filling material now, so this stage will have to wait a little. Of course this somewhat defeats the purpose of sanding the faces in the first place, as with the paste almost any holes could be filled prior to painting.

Before filling off the seams and painting.

So, what was meant to a be a very simple cut, has become a complicated mucking around with different materials, glues, paints, primers and whatnot. Nevertheless, the initial idea has now been mostly achieved. The right side is slightly longer than in the original mock-up image, but this way I could avoid creating problems with the heat sink. Besides, this outcome resembles the original Spectrum 128 and Spectrum+ asymmetrical designs, so it can't be all bad.

Putting it all together


I cut a part out of the heatsink with an iron saw. This way it can be bent tighter. The sink is now so small that it would be possible to make the computer as short as in the original mock-up image. But I'm ok with the results for now.

The iron saw bites the material very well.
Here, the modified heat sink is relocated inside the bottom part of the casing, which has now been put together with glue and melted plastic. The original L-shaped heatsink curled around the corner of the screw holder and faced the grille behind the machine. Now it's bent into a strange block. I just assume this is sufficient, but at least some testing is needed before I can say this is safe.

The not-so-good place for the heat sink.
If I did this again, I'd make sure to bend the heat sink around the original screw holder position. (I may still do it later). This requires sawing off a bit off the heat sink. It would have been easy to saw off before the piece was bent, but I avoided this precisely because I thought I'd avoid sawing the heat sink.

If positioned as in the image above, the heat sink will touch the bottom part of the box that contains the keyboard. (It is held in the top part of the plastic casing, not shown in the pictures.) The heat now probably spreads to that element, which may not be so good. It is much better to push the sink nearer the backside of the computer anyway.

I've only begun to scratch the surface of what can be done... (groan)
I've for now abandoned the idea of painting the surface. The Mini spectrum is still meant to be a useable object, and spray paint wears off a bit too easily. I'm now looking into the possibility of concealing the seam with scratching. So it's more of a camouflage technique. The seam can of course be seen in good lighting conditions, but it's not so prominent as before. It requires some "artistry" to create the best optical effect. What hides the seam from view from one angle may not be sufficient for another.

I like the scratching idea because it solves the main problem and can be still undone if I find a better solution.

Looking back...


For the most part, the 128k 8-bit computers were placed into big, imposing cases with little more inside compared to their predecessors. In terms of weight and dimensions this was a step backwards from the 16-64k wave of 8-bit home micros.

The mod ought to fix this problem somewhat. Let's see what the numbers say:

Original weight: 1.525 kg
New weight: 1.186 kg 
ZX Spectrum+ weight: 0.86 kg
ZX Spectrum weight: 0.55 kg

Original width: 44 cm
ZX Spectrum 128k width: 32 cm
ZX Spectrum+ width: 31.7 cm
New width: 31.5 cm
ZX Spectrum width: 23.0 cm

(Some of the values are taken from old-computers.com. 128k Spectrum weight was not available.)

I'm not saying that smaller and lighter is always better, as there's bound to be a comfortable size for the keyboard and a too light computer might be "swept by the wind". But it is great to get the bulky old 128k+2 more closer to the Spectrum+ dimensions.

The modified +2 required some more work than I anticipated, but it's still not too huge a project. Of course, having all the tools at hand was a big incentive for doing it. It might be a bit expensive to buy all the saws, knifes, glue and sanding paper just for this purpose. But I'm confident it might be pulled off with less equipment.

This has not been an electronics project, so these questions are still open:

-How to rewire the power LED?
-How to build a tape audio in port? (Maybe not necessary)


Thursday, 20 September 2012

Sinclair Spectrum 128k +2 MINI

Sinclair Spectrum 128k +2 Mini!
The above image is a mock-up of what a sawed-off Sinclair Spectrum 128k +2 might look like. Read below to see how it turned out to be reality! The idea for this picture came from Marq, who suggested removing the ugly and unnecessary tape device in a rather brutal manner.

The original
The initial idea was that the cut would be aligned with the left edge of the cassette slot opening, giving a very straight line from which to begin. The whole operation ought to be simple, as the tape recorder is not really very integrated to the other stuff inside the casing. The motherboard is entirely contained at the left side.

128+2 insides: With the cut, the heat sink would have to be re-arranged and the casing would lose one support.
Still, the cut suggested in the first image may not be quite as straightforward. There are some parts beside the tape recorder that extend beyond the cutting line. This could be covered by having some kind of addition to the right side, perhaps something that resembles the original 128k Spectrum. Another option might be to use a couple of centimeters of the +2 casing itself! But this would probably leave a visible seam.

Preparing for the cut


Removing the cassette recorder proved to be simple. Also, the computer appears to work just as well without the tape recorder, which comes as no big surprise. In this process the power LED has come off, and I think someone else will have to figure out how to rewire it.


The now revealed plastic protrusions and screw holders can hinder the cut, so some re-thinking is in order at this stage. On the plus side the heat sink (A strange L-shaped contraption) may indeed be possible to turn around to the front side. However, it is unlikely to fit without at least some changes.

Cutting


About that re-thinking... Nah, I just decided to go with the original line. I first used a sharp paper knife to cut as deep as possible along the side of the tape recorder opening. Using a ruler, I also made careful lines using the opening as a guideline. When it came to actually cutting the plastic, the paper knife turned out to be surprisingly poor, so for the rest of the project I only used it for initiating points for sawing.

Some care needs to be taken when sawing the front. I used a straightedge and the paper knife before sawing.

I used a "Japanese" style back saw, meant for wood cutting. I probably ruined the blade but it had seen its best days anyway. This saw took to the plastic surprisingly well, and I felt encouraged to just push violently through the screw holders and other protrusions. However as I progressed I realised the casing would loose most of its support at the same time, and the part remaining to the right side of the keyboard became quite fragile. So I did away with the protrusions with some more care, trying to saw them sideways from below when possible.

The tape recorder part could be made into a unique, stand alone, Spectrum-themed tape unit. But who cares?

It might have been a wiser move to saw first the bottom half, leaving the more visible parts for later stage. Then I could have used the "gained experience" for the more important parts. But this way, I can use the existing cut for lining up the bottom half of the casing. Had the bottom been cut first, the resulting alignment might have been unsuitable. 

But really, I just could not resist getting first at the meat of the matter!

And now, what at first was just a mock-up, is rapidly becoming a reality...
The resulting edge is surprisingly straight given it is hand sawn and my sawing skills are a bit rusty. The success is mostly thanks to the existing tape recorder opening edge. The face certainly needs sanding, but perhaps not as much as I had feared.

Cutting the bottom half posed no problems, but making the end part from the remaining plastic and solving the heat sink placement is a bit tricky.

Closing the case


I have bent the heat sink from the L-shape to a formless blob. It does not quite go into a neat U-shape, at least without sawing the piece. I'm hoping to avoid that work phase, yet it may come to that.

Yet another decision to make...
The seam looks worrying at the moment, and at this stage I am tempted to cap off the end with a flat plastic plane cut from the former case bottom. This would diminish the effect of the seam and make the computer look very neat (from front and above) and much like the original mock-up image. However this would buy very little room for the heatsink and would maybe not look so nice from the side.

Adding the pictured end piece gives some more length to the computer, a bit like the original 128k Spectrum. The bent heat sink would fit easily. This direction means that there will be nearly endless sanding of the two parts and still the seam will probably be somewhat visible.

So, which ever route will be chosen, there will be work. But then again so far everything has gone quite smoothly.

(Continued to Part Two)