Video Output For TLC-MBC And An MC Monitor
Wow… has it been four weeks since the last update??? In my defense, as you can see above, I have done a fair bit of work on TLC-MBC, she now has her own screen for output and I’ve written a rudimentary Machine Code Monitor so that she can do stuff. I also got a TL886CS Programmer, and wow, is it fast!! The Meeprommer took around 206 seconds to burn a 28C256, this thing erases, programs and verifies in around 7 seconds!!!! It has also opened the door to other things which I will talk about later.
Since starting this project I have wanted to have video output. I have a TMS9928 that I would REALLY like to use but I’m having trouble locating the 10.738Mhz crystal it needs. In the meantime I have some 6545/6845 but they are too much work for something temporary, so I looked elsewhere.
So I built it on a half length bread board and hooked it up to an Arduino Nano just to make sure it was working – and it did! Apart from the lack of color it’s not bad for a morning’s work. With that success I ordered a 7″ TFT screen for £20 that could be dedicated to TLC-MBC instead of cables across the living room to the TV.
That afternoon I decided to hook the “video card” upto TLC-MBC by way of the 65C22. The “video card” sat to the left and was connected by jumpers to the VIA. I like to start simple and work up to more difficult stuff, so I connected 8 bits from the ‘328 to Port A and the AVAIL and ACK pins to Port B, bits 0 and 1. It took about an hour to get something on the screen. It worked, I had successfully written a driver for it, so I took the rest of the evening off 😉
I was itching to get back to working on it but real life got in the way… Anyhow, about a week later I had some free time to work on writing the MC monitor and this is where the problems occurred. At first the display just flickered a little now and then, but after a couple of hours, every time I hit a key the display would either garble or disappear until I hit another key. On the Nano the display was rock solid so it had to be either my driver or the connections. After a bit of prodding and poking around it looked like it was the jumpers connections on the half bread board.
This flickering would not go away, so I decided to make a “video card” on a peice of perfboard. So, I spent the afternoon in the company of a soldering iron, perfboard and bits. I didn’t really want to expend this much time and energy on something that will be replaced, hopefully sooner rather than later, but in hind sight it has worked out well. I also replaced the 2m Audio phono cable with a .5m Video cable. The display is now rock solid. As you can see it uses a row of header pins to plug into the breadboard, this is so that it is easy to connect it to the Via and it won’t move about on the table when the cable is moved about.
With the video done, for now, I could concentrate on the fun part of the project – writing a monitor so that TLC-MBC could do things, like real computers can… Though I am building this for me, I realise that there is a possibility that others may build one too because eveything is up on GitHub for all to see and use. So I am trying to make TLCMon easy to use and with error checking. So first up is, what can she do right now? Rather than write it here is a shot of the help screen(Click to view larger).
I started of with the basic stuff like read and write to a memory location, then fill and move a memory block. If you want to see more than one memory location then dump will show a block of memory along with the ASCII to the side like this.
All well and good but so what?… How about being able to toggle the display between 80 and 40 character width? Done… and functions are aware of the screen width, so that for example Dump will display 16 bytes per row in 80 col mode but only 8 bytes per row in 40 col mode. At any point numbers can be input in either Hex or Decimal, Hex is denoted by a preceding ‘$’ for example: d $1000 60 – this will dump 60 bytes starting at $1000. If command parameters are out of range, wrong or missing you get the relevant error message.
The memory editor works by showing a line of bytes ,like a line from the dump cmd, a flashing cursor shows whch byte will be changed. To move left/right use the ,/. keys. Pressing 0-9 or a-f updates the byte value by rolling it in. For example if the byte was $1A and you hit 5 then the value would change to $A5, then pressing E would result in the byte being $5E. Pressing the Escape key exits the command.
I want to work on the video driver, so I will sometimes need output to go to the terminal, so I wrote a VERY basic I/O handler so that I can redirect output to the screen, terminal or both.This will need updating as I want to add other devices.
The last day or so I have been working on the first real “application” for TLC-MBC – a Text Editor. It’s very basic at the moment, lines cannot be longer than the screen width and a line can only be deleted not editted, yet.
What’s on my mind?
Quite a bit actually… In no particular order, here are my thoughts:
The TL886CS Programmer has proved very useful and vastly time saving. I discovered it can also burn GAL22V10D chips. One of these could replace ALL the glue logic I am currently using. But that means ripping up the bread boards again!! And I’m having so much fun writing the firmware right now…
I have a PCF8584 waiting to be installed. This will add I2C bus capabilities. It needs a faster clock, but I have a 16Mhz oscillator and a 74LS293. These could provide the 8Mhz that the PCF8584 needs and 1, 2, 4 or 8Mhz for the 65C02. The extra speed could come in useful, but I may need faster memory at the higher speeds.
I really, really need a keyboard. At the moment I’m using the PC’s keyboard via the serial port to the terminal – it’s all a bit Heath Robinson. I have an old C64 naked keyboard from an old project that never got started. I could hook up an AVR to it to scan and output the ASCII codes.
I want to add SPI so that I can add an SD card so that I can have some mass storage, this is becoming more important now that I am writing a text editor, I want to save/load the files.
Most irritating is the lack of a 10.738Mhz crystal so that I can use my TMS9928 for color video output. The only source I have found so far is Digikey – the crystal is less than a dollar but shipping is £12. £5 or even £6 and I might go for it but £12 is a bit to much. But if I cannot find another source I may have to bite the bullet….
The PCB, is coming along nicely in Kicad, the thought of using a GAL has delayed finalising the layout. Also it would be nice to have the SPI and I2C on the mother board, so that is further delaying things.
So that is the state of the project so far TLC-MBC now has video output, a rudimentary MC monitor and a very basic text editor, any comments or questions? Click below and say something….