Sunday 22 December 2019

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

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

This is the second part of the investigations into running the Minstrel 3 as a clone of a 1980s Lambda 8300, itself a clone of the ZX81.
The first part concentrated on running the Lamdba 8300 in it's native mode. This was a partly ZX81 compatible machine, with a modified character set, fixed in ROM (or to be more precise, in a ROM inside the ULA).
That pretty much worked, with a small temporary modification to the Minstrel 3, and a custom ROM with the Lambda 8300 ROM and a recreation of it's character ROM. This version of BASIC started with a READY prompt at the top of the screen, and instead of the inverse K, has a flashing black square. (or rather a flashing white square, since it's default mode was white text on a black background, but I've not been able to take very good pictures of that, so have used the jumper on the Minstrel to change to black text on a white background, which is more photogenic).
There was another ROM available for the 8300, one that claimed to be more ZX81 compatible, and was actually the thing which fired off this investigation.
Trying this out, it also worked. This time, no ready prompt, and the familiar inverse K, but oddly it flashes the inverse attribute. Since someone asked last time, K stands for 'Keyword', indicating it's ready for you to type a keyword. It can also be E for 'Extended', G for 'Graphics' and L for 'Letter'. I think that's all of them.
Other than the cursor, the rest of the machine behaves like a ZX81, so pressing P brings up PRINT, rather than having to type the individual characters on the standard Lambda 8300 BASIC.
And it runs pretty much like a ZX81. Typing in and loading up some BASIC programs, they ran as expected. Some games ran, but with some distortion on the top line and a second about two thirds of the way down the screen, seen here with Tut-Tut.
Interesting to note that the real Lambda 8300 exhibited the same behaviour on the top line, but not the second one. (Picture courtesy of @loudscotsbloke).
The same issue, in the same place, on 3D Monster Maze.
Note that although most of the character set is the same, the different characters on the Lambda character set do confuse things occasionally, such as the walls which are meant to be 50% grey, but Rex has been redecorating with some race car wallpaper.
However, one thing the Minstrel 3 can do that the Lambda cannot, is use the real ZX81 font, and non-inverted pictures.
That's better, it's the correct colours and characters, but still with the two distorted lines which make it not really a practical option.
You can see the two lines of distortion better with the grey border option turned on.
This does not occur with the standard ZX81 ROM on the same hardware so it must be something different in the timing in the Lambda ROM. There's a thought.
This is a ZX81 speed test, which I think was part of a ZX81 emulator suite. I'm pleased to say the Minstrel 3 scores 100% of the speed of a ZX81, that's what I was after. So how does the Lambda 8300 ZX81 ROM do?
Interesting, so there is a definite slow down, 88.3% and also some distortion on the top line and the wrong characters for the half grey underline and colon. Again, this is all running on the same hardware, just a different ROM image. (wonder if this is because it is in NTSC mode?)
So it has been interesting to try this out, I don't think it is good enough to include as an option with the Minstrel 3. I wonder what other ROMs I can try?

Sunday 15 December 2019

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

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

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.

Sunday 8 December 2019

TZXduino master tape creator update

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

A few years ago, I adapted the TZXduino project to work to create master tapes for The Future Was 8 bit cassette range, creating something out of a spare Spectrum +2 case, using it's tape deck to record the tapes.
That turned out to be quite useful, so I ended up fitting the prototype bits into a second spare +2 case to make one for me.
That's been handy a few times, but every time I dig it out, I have to fiddle around a bit as it's still on a breadboard and the switches keep popping out.
I had also used an Arduino Ethernet board because it had an on board microSD card, but was missing the USB serial on board programmer. The last time I dragged it I decided to do it properly. The case was still fine, it was a +2 where the keyboard supports had all been snapped by shipping it with the powersupply sitting on the keyboard.
I went for a standard Arduino UNO, so that it could be powered and programmed via USB. I wired up an Arduino portotype shield with the buttons and connections.
As I wasn't using the Ardunio Ethernet any more, I needed a card reader. Here I used an SD2BBC board, which was adapted to work as a plain card reader.
The final element was the display, here I reused the original one, as that was working fine.
And it is complete. The white plug in the middle is the output to the cassette deck built into the Spectrum +2 case.
I used that to generate the tapes I needed.
A minor modification requested by TFW8b was to create multiple copies, so I added the number of copies required to the menu, used to create multiple copies of the same program on each tape.
I've been getting mixed results from loading vintage ZX81 tapes into the Minstrel 3, some of them have not stood the test of time well, with noise and dropout.
I didn't fair any better loading them into original ZX81 hardware.
I got better results on both from the newly created tapes.
I made up an alternate lead for the TXZduino, with a 3,5mm jack plug on the end, to drive the ear input of the ZX81 / Minstrel 3.
That worked fine, and I have been using that for the cassette loading testing.
That works much better, cutting out the analogue tape middleman.