Thoughts on future projects (68K!)

      No Comments on Thoughts on future projects (68K!)

This blog post does not document what I’ve done in my hobbies, except for some small projects, but rather what I plan to work on next.

Before getting to that though, I should finish my description of the progress I’ve made with the VGA controller.

I have attached the  EPF10K10 (PDF) FPGA to the 68000 CPU bus, and have had a reasonable level of success controlling what is shown on the screen from 68000 code. Here’s a picture of the fairly hairy breadboard setup:

One thing notable about this botched setup is I had to power it from both “ends” in order to get clear data from the analyser.

And what I managed to display on the screen, as driven by the 68000:

It’s important to realise there are two clocks in this setup: a 25.175 MHz pixel clock and a 16 MHz CPU clock. Also, no attempt has as yet been made to read back video memory content to the 68000.

My initial attempt at driving video memory writes from the 68000 involved using a FIFO to queue up writes to an FPGA-addressable register and then emptying the FIFO using the VGA clock, using a single process for reads and writes. The FIFO should have compensated for the different clock domains, but no matter what I tried I ended up with double writes into the video memory, or missing writes.

The best solution I came up with, which isn’t intuitive, was to do the writes synchronised on the CPU clock, and reads into video memory synchronised on the VGA pixel clock. Flags are set on the write action to make sure if a read happens at the same time the read will be skipped with a dummy (0) value inserted for that character square position.

The result is what you see above. It is also possible to shift the address of the writes by moving a “write cursor” using two 8 bit addressable address registers, which hold the next address to write into. I had hoped that this would be sufficient for me to start thinking about implementing a text-based console for my MINI000 computer, but after writing a test routine to scroll a message across the screen the result was not great: random corruption, as the following picture shows, which was taken after halting the MPU while it scrolled the message:

I’m not entirely sure what’s going on. I’ve not attempted to look at performing a timing analysis. It might be, but I think it’s unlikely, that I’m at the bounds of what the EPF10K is capable of. I am certain that this kind of circuit would be much easier if the CPU and the video signal clocks were multiples of each other. I could probably remove the 16 MHz oscillator from the MINI000 PCB and make the CPU run at half the 25.175 MHhz video clock; this would mean that writes and reads of the video memory would be on the same clock domain, as the expense of a slightly slower CPU clock.

In the intervening few months since my last post I’ve finished another CNC project: some cat shaped coaster and a holder for them:

I’m pretty pleased with how this came out. The five cat shaped coaster were milled out with the MPCNC over a few weeks. The wood is 6 mm oak sheet. It’s pretty basic milling. One of the cats gave me some trouble where the cut did not reach through the wood in a few places, but I managed to rescue it by drilling out the cat with a battery powered drill.

The base was more interesting. Essentially it is similar to the house number sign: cutting down the stock to the required depth, some pocketing operations to make the slots, a chamfer and finally cutting out the base with some tabs.

I did have one sizeable problem where I miss-measured the depth of the cut needed to free the base from the stock; the cut ending with a good mm of wood remaining. In the end I rather cheekily used the spindle with the CNC controller turned off and moved the spindle along the straight edges to cut out the part.

The other interesting thing with the base is it is made with recycled wood: the seat, I believe made of pine, from a broken chair.  Getting it cut down to then attach to the MPCNC was a bit of a mission with the jigsaw. It would have obviously been easier with the proper tools, but I got there in the end. The seat shaping had to be planed out on the NPCNC as well. Initially I tried using a 20mm wide planing cutter for this, but it did not cut down into the wood well, so eventually I settled on using a 5mm end mill for this cutting step.

I made a brief video showing the simulation of the cutting steps in Fusion 360:

And a bunch of short videos edited together of the milling of the base (the camera work is dreadful):

In terms of finishing, I went for “Superior Danish Oil”. I put on a couple of coats, applied with a tissue, on the cats. The base got a single coat. 

Another side project (more like an hours work really) was to replace the screen on a Dell Latitude E5550 laptop. This was stupidly easy: pop off the screen bezel, unscrew the 4 screws holding the screen to the frame, unhook the tiny video connector, and repeat the sequence in reverse for the new screen which I bought on ebay for about £35. If only swapping the screen on my MacBook was so easy, and cheap!

As is usual in this day and age, I followed a YouTube tutorial before attempting the swap.

This leads onto the main point of this post: what to work on next? There are so many possibilities it feel like a kind of paralysis, but after thinking about it for a few weeks, while relaxing on holiday, I think I’ve come up with a way through the maze of choice.

First up the MPCNC and 3D printing.

I’ve already concluded that this will continue as a kind of “background hobby”. Something which is not the focus for my free time, but rather something to return to when I feel like doings something other then electronics.

On the MPCNC, another job I have to do is to replace the spoil board and base of the table. Both are looking a bit worn out. I had a problem cutting out one of the cats and managed to gouge some long grooves in the spoil board. I’ve bought replacement MDF, but cutting them down, fitting it to the table legs, re-attaching the MPCNC, and finally levelling a new spoil board is going to be a lengthy and uninteresting job, which I have almost no enthusiasm for.

So the 68000 project will go back to being front and centre of my hobbies!

I have a few things planned.

First up will be an IO daughter board for the MINI000. Similar to the video daughter board I built for my 6809 SBC, it will have at least:

  1. An EFP10K10 FPGA doing VGA, based on the breadboard prototype. It will have 3 or 4 32KB SRAMs attached, which should give it enough memory to experiment with graphics modes. It’ll have a 3 bit resistor DAC, allowing it show 512 different shades (the same as the Atari ST). I believe the EPF10K10 has just enough IO pins.
  2. A keyboard will be attached to a dedicated UART port, probably one channel in a MC68681 (PDF). I’ve been able to obtain 5 of these in PLCC44 for a reasonable price. The keyboard itself will be the same as the one used in the MAXI09, but the keys themselves and the AVR controller will be housed in their own keyboard case, which will be 3D printed. A cable, probably a coiled one from an old desk phone will have the needed RX and TX, as well as power lines.  This same external keyboard can then be used in all future 68K computers, or indeed any homebrew computer. While it’s tempted to just stick with PS/2 that would be uninteresting.
  3. A MC68230 (PDF) Parallel Interface Timer (PIT), possibly with a Centronics parallel printer port, if there is room on the PCB.
  4. A PATA/IDE header.
  5. An addressable latch with a 9 pin joystick connector, as used in the MAXI09.
  6. Possibly some kind of sound IC though I’m doubtful there will be enough space on the board.

The EPF10K10, MC68230 and the addressable latch have been sufficiently prototyped, but I will prototype up the DUART just for completeness, even though it is a Motorola part specifically designed for the 68000 family.  I also plan to play around with attaching a Compact Flash, essentially directly to 68000 bus via a 40 pin PATA/IDE header. I might also have a look at attaching an OPL2. I never did properly play with this sound generator IC on the MAXI09.

After building and playing with the IO board, I’d say at least a couple of months with refining and improving the HDL for the VGA controller, I will build the keyboard.

Annoyingly the Amiga 600 keyboard is too wide to make a 3D printed case in one (or two: top and bottom) parts on the 3D printer. But it might be possible to design one in 4 parts and glue the left and right sides together, whilst still being separable into top and bottom halves. The case would hold the keyboard itself and a small PCB incorporating the ATMega8515 (PDF), keyboard flex connector, and power LED.

That about covers what I’ve got in more or less concrete plans. There’s other ideas floating about, but as yet they are not fully formed…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.