View unanswered posts | View active topics It is currently Thu Mar 28, 2024 9:00 am



Reply to topic  [ 8 posts ] 
 MAXI09: 6809, FPGAs, V9958, OPL2, ... 
Author Message

Joined: Sun Jan 10, 2016 4:14 pm
Posts: 8
I have been playing around with building my own 6809 based computers for a couple of years now, starting from breadboards. MAXI09, which isn't entirely finished, is the latest iteration and includes some interesting things. Before discussing the computer I thought it would be good to talk about the "why".

The main reason is obviously: for fun. Other reasons are to learn new things. Since starting on these projects I have been learning VHDL, PCB layout, AVRs, and other current tech. And of course part of it is pure nostalgia!

One of the things I wanted to do was to make a self contained "home computer" in the spirit of the great 80s micros. One that had built in video, sound and a decent keyboard, on a single PCB. Ideally it would go in a nice case, but I will have to settle for some slabs of acrylic.

Anyway, the FPGAs are probably the most interesting feature. These are the most accessible, throughhole (via a PLCC socket), 5V parts I could get my hands on. Previously I had good results with a Xilinx XC95108 in PLCC84 acting as glue logic, bank switching etc, but there's only so much you can do with a CPLD. The FPGA I settled on is the Altera EPF10K10 again in PLCC84. These are tiny FPGAs by modern standards, but plenty sophisticated enough for my requirements. MAXI09 includes two, one acting as core logic which has access to most of the CPU pins and implements a DMA controller and will eventually implement a simple MMU. The MMU will use 4KB pages, and hopefully hold the mappings for at least 8 contexts/tasks.

The other FPGA acts mostly as a peripheral and implements an IDE interface (little more then a latch to present a 16 bit drive on a single 8 bit port), an SPI host controller, reset manager and interrupt routing. It also drives a buzzer and LED, which were useful getting the board running. Of course in theory I could come up with other uses of the logic. One thing I've thought of is a simple register-fed maths processor that can do divide, modulus etc.

Beside the FPGAs and the functionality they fascilitate, the board has the following parts:

:arrow: 68B09
:arrow: 512KB RAM, 32KB EEPROM - all of this is mappable
:arrow: V9958 with 192KB VRAM with DIN6 RGB using BBC Micro pinout
:arrow: OPL2 aka YM3812 sound output (mono, unfortunately)
:arrow: SC16C654 Quad UART - two channels on RJ45 at '232 levels, one on a TTL level header, and one attached to keyboard controller
:arrow: Keyboard controller is an AT8515 (PLCC44 to keep board space down) with an Amiga 600 keyboard attached
:arrow: The venerable 6522 acts as GPIO and parallel printer port
:arrow: Two Atari style 9 pin joysticks attached via addressable latches

SPI peripherals:

:arrow: Two XY analogue inputs via a MCP3002 which share the 9 pin joystick ports
:arrow: DS1305 RTC
:arrow: 32KB EEPROM in a CAT25256 for storing "stuff"

Power is supplied via a barrel plug which drives a compact 5V/1A switching regulator (SR10S05), all on the PCB. I've not used these before and they seem to work well.

Here's a block diagram:

Attachment:
maxi09schema.png
maxi09schema.png [ 819.87 KiB | Viewed 9904 times ]


It's not the best diagram. All the tools I've looked at for making these diagrams suck in one way or another.

The two FPGAs have lame names. MuDdy - MMU and DMAC, and DISCo - Disk, Interrupts, SPI (Controller). The DMAC blocks access to the CPU via bus mastering through usage of the /HALT pin. Some day I should like to look at interleaved bus access, but I suspect this is significantly more complicated. The current DMAC can read and write in two clocks, or write (to fill memory) at one clock per byte, both operations being considerably faster then CPU code.

I have used the V9958 in the previous board but have never fully explored what it can do. What I like about it is it can do 80 column text. After playing about with various amplifier ICs for driving the RGB output I settled on the transistor based amp circuit used in the MSX. I was really hoping for composite output so I could drive a TV capture card, useful when the computer is on the "bench" but in the end I couldn't get the AD724, which seemed like the best approach, to work well enough. If anyone knows of a USB TV card with RGB inputs...

I hadn't used the OPL2 before I used one in the MAXI09. Its more work to use then, say, an AY but the sound is certainly better. For anyone who doesn't know, they were used in the first Sound Blaster cards. I just wish I was muscically talented so I could write some nice tunes!

As you can probably tell from the inclusion of the joystick ports, I am I interested in writing games for my little micro. I figure the hardware should give me a crack at writing a decent Pac Man clone, though it would be a lot of work. I'm also, naturally, hoping to write a simple OS to extend the functionality provided my machine monitor. I could write a whole slew of words about that but this is rambly enough. :)

Some parts are not finished, or even started. I have yet to tackle the IDE interface, SPI parts (for the experience and pleasure I will write my own controller instead of using the code from a ready made one), nor have I started writing the MMU.

I will finish this with a few pictures. These's more info on my blog, or you can ask here. Comments, suggestions, whatever's, are very welcome.

Lawrence

Attachment:
IMAG0066.jpg
IMAG0066.jpg [ 2.07 MiB | Viewed 9904 times ]

Attachment:
IMAG0074.jpg
IMAG0074.jpg [ 1.56 MiB | Viewed 9904 times ]

_________________
8 bit fun and games: http://aslak3.blogspot.co.uk/


Sun Jan 10, 2016 8:57 pm
Profile

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1780
Very nice, thanks for the thorough writeup with lots of links! Those medium-size 5V-friendly FPGA in through-hole packages are interesting.


Sun Jan 10, 2016 9:35 pm
Profile

Joined: Tue Dec 11, 2012 8:03 am
Posts: 285
Location: California
Quote:
Ideally it would go in a nice case, but I will have to settle for some slabs of acrylic.

There are some really nice ABS plastic cases available. ABS is great stuff for machining at home with a Dremell tool, and for hot-gluing, and if you don't need a lot of thread strength, you can thread holes. An aluminum box is harder to cut and mill, and you can't glue or solder to it.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources


Mon Jan 11, 2016 2:39 am
Profile WWW
User avatar

Joined: Thu Oct 08, 2015 11:57 pm
Posts: 74
Garth wrote:
Quote:
Ideally it would go in a nice case, but I will have to settle for some slabs of acrylic.

There are some really nice ABS plastic cases available. ABS is great stuff for machining at home with a Dremell tool, and for hot-gluing, and if you don't need a lot of thread strength, you can thread holes. An aluminum box is harder to cut and mill, and you can't glue or solder to it.


Or you could do what I did and reuse an old PC case :D


Mon Jan 11, 2016 3:03 am
Profile
User avatar

Joined: Thu Oct 08, 2015 11:57 pm
Posts: 74
Oh, yes, I almost forgot. What IC are you using to interface with the keyboard in the second image? I have several laptop keyboards that I want to use, but never found the right parts to.


Mon Jan 11, 2016 3:07 am
Profile

Joined: Sun Jan 10, 2016 4:14 pm
Posts: 8
FloppidyDingo wrote:
Oh, yes, I almost forgot. What IC are you using to interface with the keyboard in the second image? I have several laptop keyboards that I want to use, but never found the right parts to.


Like 99% of modern keyboard its interfaced with a microcontroler. In this case, since I'm familiar with them, it's an AVR microcontroller. Specifically it's an ATMega8515. 8 KByte flash, 512 byte SRAM, 512 byte EEPROM (not currently using that). In terms of IO, it has 4 x 8 bit ports, plus about another 3 bits, giving about 35 IOs, and I'm using all but one. The connection to the rest of the computer is via a UART port.

The biggest headache with adapting an existing keyboard is figuring out the layout of the flex connector. For the Amiga 600 keyboard I was lucky: the Amiga 600 schematic I found includes the key matrix. The code that runs in the AVR was written by me. Actually it's not quite finished, but it works well enough to prove it will work for the rest of the MAXI09.

I wrote up how I prototyped the keyboard in my blog here: http://aslak3.blogspot.co.uk/2015/12/ma ... -more.html

_________________
8 bit fun and games: http://aslak3.blogspot.co.uk/


Mon Jan 11, 2016 9:43 am
Profile

Joined: Sun Jan 10, 2016 4:14 pm
Posts: 8
Some progress on my MAXI09 project. I have cobbled together a kind of "stand" for the PCB and keyboard, using a sheet of acrylic. The keyboard is propped up on some little acrylic "nuts" which in turn sit on some nylon spacers threaded onto some 3mm bolts. It works surprisingly well. The contraption can even be turned upside down without falling apart. The typing angle is a bit steep but its ok for a bodge. :)

Here's a pic:

Attachment:
IMAG0114.jpg
IMAG0114.jpg [ 2.45 MiB | Viewed 9797 times ]


My cameraphone has turned the white letters in cyan. I'm pretty happy and surprised at the picture quality - it's better then I'd hoped.

Software wise it is a hack that'll make grown men cry. It works, but it is not pretty. The keyboard is attached via a UART port, which then interrupts the CPU, which then pulls off the character, munges it to ASCII and places the character in a ring buffer. User code picks this up, using a almost-abstract IO channel system. So far the shift keys work, return works and backspace works. Basically it is a outgrowth of my monitor code. Eventually I'll hopefully write that OS.

VHDL written thus far, spread across both FPGAs:

:arrow: Core logic
:arrow: Buzzer driver
:arrow: Reset generation
:arrow: DMAC with 16bit address registers, 16bit length register, flags (inc source, inc dest, invert source, write only)
:arrow: Interrupt routing

Interrupt routing is fun. I have 8 sources (excluding the internal interrupt in the routing FPGA itself). I'm using Set and Reset registers for the routing mask registers, so the "driver" setting up the route does not need to read back the current mask. This works nicely, though I do wish it was possible to place the vector on the bus directly from the interrupt routing FPGA. Instead a register is read-back in the ISR which contains the masked out state for the particular interrupt (NMI, IRQ and FIRQ).

The Snake game I wrote for my previous board(s) has been "ported" and works well.

I have yet to finish the construction. Once done I'll be able to get the IDE/CompactFlash working, implement an SPI host so I can exercise the RTC. Randoms like hooking up the analogue joysticks will come much later. The other thing not yet started is the MMU/memory mapper.

The main thing I'm trying to focus on is my OS plans. I have a number of ideas, but actually implementing them is going to be a big challenge. It's design is closely related to how the memory mapper is going to work. I think I have some learning to do, since I'm only just getting my head around interrupts. :)

There's more on my blog, if anyone fancies a read.

_________________
8 bit fun and games: http://aslak3.blogspot.co.uk/


Tue Feb 02, 2016 9:17 pm
Profile

Joined: Sun Jan 10, 2016 4:14 pm
Posts: 8
Just a quick note that I've made a video of my MAXI09 board in action:

https://www.youtube.com/watch?time_cont ... 7epl7qjyn0

It shows things like: playing with the monitor, using the monitor to test out the hardware, reading files off Compact Flash, reading the time from the SPI RTC, and playing my version of Snake.

The production values are very close to "rubbish". And the narration, by yours truly, is a bit on the mumbly side. But hopefully you get the gist!

_________________
8 bit fun and games: http://aslak3.blogspot.co.uk/


Sat Apr 09, 2016 5:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: AhrefsBot and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software