Sunday, 15 December 2019

A Minstrel 3 based clone of the Lambda 8300 ZX81 clone - Part 1

This is the Lambda 8300, one of a series of 'sort of ZX81' computers released by Lambda Electronics of Hong Kong.
It appears to have had a few different variants, and many different names (Lambda 8300, Power 3000, Basic 2000 etc.).
It has the same ports as the ZX81, power, ear, mic and TV, but also has composite video out and a joystick port. The edge connector is the same, but apparently the Z80 signals such as /INT, /WAIT /NMI etc. are not connected (sort of understandable as these are driven directly by the logic used to generate the screen).
These pictures were posted on twitter by @loudscotsbloke (used here with permission - thank you), and the question was asked about the after market DIP switches, which turned out to be a ROM switcher to switch between the original Lambda 8300 ROM and a ZX81 ROM.
Oh, that's interesting, the discussion continued, and led to a thought of 'if the ZX81 ROM works in the Lambda 8300, would the Lamda 8300 ROM work in a ZX81?'. Or rather, as you may have guessed, would it work on my Minstrel 3, which is also ZX81 compatible (probably more so than the Lambda).
The answer is no, or rather, not quite. It does generate a screen, and there is a flashing cursor, but the characters displayed are wrong. It is also only typing a single character, rather than keywords being expanded (turn out it has a tokeniser in ROM - thanks to Geoff Wearmouth for the info). The keys don't have all the keywords marked on as the ZX81 does, but they do have nifty graphics symbols you didn't get on the Sinclair machine.
Looking into it further, it appears there ZX81 ROM was in fact a specially modified combination of the Lambda 8300 ROM and the ZX81 ROM. So I tried that version as well.
That also didn't produce anything readable, but I could see it was working and using keyword expansion (i.e. type P and it moves along enough characters to show PRINT). So I wrote a little program which printed out the character set, and it did run, but as you can see, didn't print any readable characters.
Inside was very reminiscent of a ZX81, with very few chips. On the left, a 7805 regulator and a 2K RAM chip (with options on the PCB for four 2114 chips instead). There would have been a single 8K ROM chip, but that has been replaced by the blue board with multiple ROM images in. In the middle is the Z80, and to the right is a special ULA.
This is not a direct copy of the Sinclair ULA, in fact it does quite a bit more. It has a sound output, and a joystick input. Some functionality is missing, the NOP generator is implemented using a single 74LS05 and a transistor (which is seven bits, I wonder what they did about the eighth?). 
Looking at the ROM image, it didn't appear to have a character ROM at the end like the ZX81, so where was it? There weren't any other chips on the board, so I went back to something I had read, but had discounted as unlikely, which was that the character ROM was in the ULA. Really? Was there enough space for all the ZX81 functionality, the extra bits and a 512 byte ROM? I wouldn't need to be on the address bus, it could just be connected directly to the line counters and character address and feed the internal shift register to generate character data output. 
I decided to try out the theory that the character ROM was implemented in hardware, and found a recreated Lambda character ROM in the Eighty One emulator ROMs folder. I figured that if it was using this, it would need that when the screen was being drawn, during the refresh cycle, and would not be using the normal ROM at that time, so I could use a single 16K ROM chip. I copied the character ROM into an EPROM at 1E00 (where the character font lives in a ZX81), and placed the Lambda ROM at 2000 onwards. I wired the A13 line of the ROM chip to /Refresh, so that when /Refresh was low (i.e. the screen was being drawn), the character ROM would be selected, and when /Refresh was high, it would access the normal ROM.
That didn't work, but it did make a difference, the inverse line was doing it's job, but rather than random data (or code) being used as the font, it was all blank (actually, it was all black with white squares, I find it easier to take pictures of black on white as the camera can focus on the white pixel blocks in the centre).
My second attempt was to move the character set ROM to 0000 in the EPROM, and that worked! I typed in a quick program. OK, it wasn't so quick as I had to work out which keys did what (" is shift + 5, delete is shift + dot etc.).
This printed out the character set, and that all looked good, including the funky characters you don't get on a ZX81, such as the ghost, the spider, the car, and the diagonals. There are a few black pixels on the line directly above the text area, and the line directly below. Not sure what is causing those.
This is looking good. I wonder if I can load any games? I wired up the Minstrel 3 to the master tape creator and gave it a go. Did it still load from the same input port?
I had a look around, and found a couple of Lambda 8300 titles, tried LOAD "" and it worked. This is DSTAR, quite a nice game where you move around collecting diamonds. This is a version of the one where when you move it keeps going until it hits something so you have to plan your route so you can get to all the diamonds (what's that called again?)
Of course, this should be the inverse of that, and with the normal/inverse jumper adjusted on the Minstrel 3, it looks better like that, the diamonds are now white.
However, one issue here is the PAL/NTSC jumper is not being read (it is in a different location apparently), so it is defaulting to NTSC mode, and my TV doesn't like white on black on NTSC and keeps trying to make it more colourful for me.
So back to black on white for now. This time a breakout clone.
In conclusion, it is possible to run the Lambda 8300 ROM on a ZX81 (ish) machine, with a small modification. However, it's not fully supported. Greater support could be added, the main issues are locating where it reads the joystick and PAL/NTSC jumper from, and how it generates sound. Identifying and sorting out the rogue pixels and finally, it would also need a new keyboard overlay.
I don't think there is sufficient interest to try to squeeze all those bits into the Minstrel 3, but might consider it if enough people demand it.
Read more of the adventures of the Lambda 8300 ROMs in part 2.

Footnote: I try to avoid using the term 'clone', as to me that implies a copy using the same hardware, where as in both the case of the Lambda and the Minstrel, they are implementing the same or similar functionality, but with different hardware, hence my use of 'ZX81 compatible' when describing the Minstrel 3.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.