Tuesday, June 4, 2013

The SOCoCo-80 Project

The SOCoco80 Project

The SOCoCo-80 Project

 

I’ve decided to start a new project.  Well, actually I started the project about a year ago but because of life’s bumps I had to table it for quite some time. I did, as usual, start then stop then start this project repeatedly over the last year. During which I’ve learned a great deal and this “blog” will step through my turmoil’s of the past and the present.

 

To get started, what exactly is this project? It started as an idea to put a graphics accelerator on a CoCo. The concept was to use an FPGA board inserted into the expansion slot to expand the graphics capability of the CoCo. This card would output to a standard VGA monitor and support many display resolutions. I intended to offload all the graphics functionality to the FPGA. This includes all draw function and some special features I had rolling around in my brain. More on those later… The graphics engine would be executed by a soft 6809 from John Kent ’s 6809 FPGA project. The CoCo would send commands through some sort of parallel interface to the FPGA and the FPGA would actually do the function. When complete, the FPGA would interrupt the CoCo to let in know that it’s done. This frees up the CoCo to do other things while the graphics are working. It was also the idea that there would be a command queue to allow a series of commands to be executed.

 

The basis for my experiments is the DE-1 board by Altera. With limited experience with FPGA I dove right in and bought one. Well, after some experimenting and changing my mind the project scope has changed considerably.

 

Project Scope:


CoCo purists please put your fingers in your ears
. The scope of this project is not to create another FPGA CoCo or CoCo “like” emulator. It’s also not envisioned to have all previous CoCo software run on this platform. I will be using a highly modified version of DECB (Disk Extended Color Basic) and will try to stay as close to form as possible. Because this platform is my vision of what a CoCo should be, it’s not going to be fully backward compatible. It’s the hope that with this platform, there will be those out in the CoCo community that would develop applications and games to run on it.

 

This project is a long term time investment. There will be periods where no updates will occur. This will most likely be because my other life’s activities have taken a front seat to my CoCo passion. There will be quite a few posting in the beginning as I am already quite far in the project. I have the CPU running code and the video functional. I have tested all the video modes listed below ( and more up to 1600x1200x16 color) but not incorporated them into the project yet. There’s also a module created as a font generator. This too was working but I pulled it from the project because there was a bug.

 

More details of the project to follow…

 

Project Details

 

 

GRAPHIC MODES:

1024x768 2 Colors – 8 pixels/byte – Colors from a palette of 256 colors
1024x768 16 Colors – 2 pixels/byte – Colors from a palette of 256 colors
1024x768 64 Colors – 1 pixel/byte – fixed color levels – xxBBGGRR
1024x768 256 Colors – 1 pixel/byte – Colors from a palette of 256 colors

800x600 2 Colors
– 8 pixels/byte – Colors from a palette of 256 colors
800x600 16 Colors – 2 pixels/byte – Colors from a palette of 256 colors
800x600 64 Colors – 1 pixel/byte – fixed color levels – xxBBGGRR
800x600 256 Colors – 1 pixel/byte – Colors from a palette of 256 colors

640x480 2 Colors
– 8 pixels/byte – Colors from a palette of 256 colors
640x480 16 Colors – 2 pixels/byte – Colors from a palette of 256 colors
640x480 64 Colors – 1 pixel/byte – fixed color levels – xxBBGGRR
640x480 256 Colors – 1 pixel/byte – Colors from a palette of 256 colors

320x240 2 Colors
– 8 pixels/byte – Colors from a palette of 256 colors
320x240 16 Colors – 2 pixels/byte – Colors from a palette of 256 colors
320x240 64 Colors – 1 pixel/byte – fixed color levels – xxBBGGRR
320x240 256 Colors – 1 pixel/byte – Colors from a palette of 256 colors

TEXT:

40x15 - 16 color Attributed – 8x16 Font Set
80x30 - 16 color Attributed – 8x16 Font Set
80x60 -  16 color Attributed – 8x8 Font Set

 

SOFT FONTS:

By default, the fonts will be similar to the IBM PC. However, provisions will be made for the implementation of soft fonts. If room is available, I will implement at least two font styles within the hardware. There will be a method to load fonts from disk for customization.

 

MOUSE ARROWS:

Graphics mouse pointers will be implemented in hardware removing this burden from the CPU. The hardware will control the masking via an alpha channel.

 

Alpha Channel:

An Alpha channel pane will be implemented in hardware to allow the easy masking of sprites. This will allow the creating of fast action video games.

 

CoCo Mode:

Future emulation of all CoCo screen modes – Phase Two perhaps?

 

CPU Details

 

This project will be using the open source 6809 core from John Kent. This can be found on Opencores.org. This core is not fully 6809 compatible but is close enough for 99% of the 6809 target systems.

 

The initial plan is to run the CPU at the same rate as the video. The CPU accesses all memory on the falling edge of the CPU clock and my video driver will be written to access the same memory on the rising edge of the same clock. That’s at least the plan.

 

Interrupts

 

The SoCoCo-80 will have a multichannel interrupt controller. My thought is to do something similar to the 8259 controller in the PC machines. This, of course will be a software implementation of the controller. The hope is to allow multiple devices be interrupt driven to allow better timing and accuracy than polling a port.

 

Peripherals

 

Keyboard – The keyboard will be a standard PS-2 style. The plan is to use the PS-2 module from OpenCore.org with it’s output generating an interrupt to the processor.

 

Mouse – Again, it’s the plan to use a PS-2 mouse if possible. I’m not sure if the DE-1 port is mouse compatible or not. More research needs to be done here.

Storage – The SD card will be the primary storage medium. I’m not sure what format will be used yet. This will come at a later time when I get into the BIOS and system coding.

USB/Ethernet – These may be implemented at a later time but is not currently a priority.

 

BIOS/System Core

 

Here’s where the fun begins. To start out with, I am going to implement a highly modified version of Color BASIC. Scanning and converting the source from the unraveled series will be the first step. This will be followed by some clean up and assembling to binary files. Once this operation is verified, I can then modify it to support the new system. The plan is to implement Extended Color BASIC at a later date also. DECB won’t be needed as I will be writing my own disk controller. The DECB assumes a format which I may not use.

 

Note regarding code publication: All code posted on this blog has been written and, posted and owned by Franklin Laboratories. This blog will reference code related to the project but will only post code created by me

 

© 2013 Franklin Laboratories

www.franklinlabs.com


                                   

                                                                                   

                                   

1 comment: