Omnimaga

General Discussion => Technology and Development => Other => Topic started by: Keoni29 on September 10, 2014, 12:12:44 pm

Title: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on September 10, 2014, 12:12:44 pm
Original blog post:
http://8times8.eeems.me:81/blog/index.php?thread=7 (http://8times8.eeems.me:81/blog/index.php?thread=7)

CBS6000 stands for Cartridge Based System 6000 (KB)
Name is subject to change.
I have been working on this computer for a couple of days now. Today I added the I/O board with a seven segment display on it. It is driven by a latch, so I could even put letters on it.
Specs: (https://www.omnimaga.org/index.php?action=dlattach;topic=21511.0;attach=18510;image)
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: TIfanx1999 on September 11, 2014, 11:37:53 pm
Pretty awesome Keoni! :D
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Sorunome on September 12, 2014, 04:09:58 am
Wow, now that is awesome :O
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: utz on September 12, 2014, 08:48:30 am
Epic! Beats http://www.mr-atari.com/afbeeldingen/systems/2600universumkeyboard.jpg, I guess ;)
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on September 12, 2014, 08:55:28 am
It has a lot more memory compared to the 2600, but it does not have video output or a decent keyboard/input method yet. I might wire up a CIA for serial communication.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on September 12, 2014, 05:22:13 pm
I found some cool stuff at the thriftshop. Old phone dial disks (or whatever you call these)
I want to use them as an input device for this computer.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on September 21, 2014, 12:49:27 pm
Proof of concept using an arduino. It reads the signals coming from the dial and makes LED's in a light ring light up to indicate which number you dialed.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on September 28, 2014, 11:22:32 am
More progress ^.^

I wired it up to my 8 bit computer and it works like a charm! Now I can use it as an input device for more complex programs.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Paul on September 28, 2014, 11:18:37 pm
Wow, that's quite cool! I've built some little things like this, but nothing as fleshed out of this. I can't wait to see where this goes.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on September 29, 2014, 03:55:42 pm
Documentation and device specification will be posted here:
http://8times8.eeems.me:81/project/computers/65xx/cbs/
I will xpost stuff regularly, but this page will contain more detailed information.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: DJ Omnimaga on October 01, 2014, 11:13:05 am
Fun stuff Keoni29. Is it a reboot of your older computer project or is it a side project? I was wondering since you were working on another 8-bit computer a while ago, but with an eZ80.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on October 01, 2014, 11:29:18 am
This is a little side project. I felt like taking a break from eZ8 assembly. The 6510 cpu is a very limited cpu, so I probably won't write a complete operating system for it.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: DJ Omnimaga on October 01, 2014, 11:31:41 am
If it lacks an OS, would it need something like floppy disks or cartridges to have something to boot from? (eg a game)
Wow, that's quite cool! I've built some little things like this, but nothing as fleshed out of this. I can't wait to see where this goes.
If you have any hardware projects or need help with one, you should post about them in this sub-forum. I'm sure some people might be interested :)
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on November 07, 2014, 07:43:06 pm
I wrote a bootloader for the computer. I can send data using a software-defined 2 wire serial interface. Because I didn't feel like writing a PC program to send files to the computer yet I hooked up 2 buttons to the pins and entered a 22 byte blinky led program manually. After I hit the execute key the LED started blinking :3 I am so glad that this is coming together so well.

Code: [Select]
// Pseudocode:
// Repeat 8 times
//   Wait for SCK to go LOW / Execute program if RUN is LOW
//   DOUT = 0
//   Wait for SCK to go HIGH again
//   Read bit from DIN and store to buffer
// End
// Move byte from buffer to address
// Increment address
// DOUT = 1
// Otherwise: receive another byte
SCK is the clock pin
DIN is the data-in pin
DOUT is the data-out pin. I use DOUT as an acknowledge signal. After every received byte DOUT is HIGH until CLK goes low again.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Streetwalrus on November 09, 2014, 01:39:49 am
Lol so you type in programs bit by bit ? *.*
Anyway nice project. :3
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on November 09, 2014, 12:40:33 pm
Lol so you type in programs bit by bit ? *.*
Anyway nice project. :3
Yep that is right  8) Don't worry: I will get rid of the buttons and hook it up to my PC via the printer port. That way I can send files to the 8 bit computer.

Yesterday I put the bootloader on an EEPROM, so the data does not go away when the battery runs out! I am moving towards getting rid of the cartridge slot because this thing has so much ram. I'd rather load software from external media or my PC. I want to leave this thing connected to my PC during development. When the firmware is all done I will put it all on the EEPROM.

The system specs changed slightly: it now has 8KB of ROM instead of 4. User code will be able to access the lower 4KB of the EEPROM for writing, so there is some kind of non-volatile storage on the computer.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: bb010g on November 10, 2014, 10:53:41 pm
Lol so you type in programs bit by bit ? *.*
Anyway nice project. :3
Yep that is right  8) Don't worry: I will get rid of the buttons and hook it up to my PC via the printer port. That way I can send files to the 8 bit computer.
Relevant xkcd: (https://xkcd.com/378/)
(http://imgs.xkcd.com/comics/real_programmers.png)
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Streetwalrus on November 12, 2014, 01:04:38 am
Lol bb010g.

Also I think your computer is pretty unbalance in RAM:ROM ratio. I mean, usually computers have much more ROM than RAM. :P
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on November 12, 2014, 04:43:25 am
The firmware (bios) on modern computers is just a fraction of the size of ram. Computers these days rely on external media which contents are loaded into ram.
The c64 has 64k of ram and just 20k of rom. It too relies on external media such as floppies or casette tape. Yes this is more balanced than my computer, but I don't intend to write a large basic or kernal for it. Those take up 16k in the c64. I also don't need a character generator rom because this thing does not have a video chip. This saves another 4k of rom. The only things I want to save in rom are a program loader, peripheral drivers, menu system and a sound sample player.

That aside: it was either 128k or 8k because those were the only ram chips I currently have in stock. I want to add a serial flash rom with more data on it so I can play back sound samples for example.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: aeTIos on November 12, 2014, 04:52:24 am
Not quite sure how I missed this but it looks awesome, show me this thing the next time I visit you ^^
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Streetwalrus on November 12, 2014, 02:24:44 pm
The firmware (bios) on modern computers is just a fraction of the size of ram. Computers these days rely on external media which contents are loaded into ram.
The c64 has 64k of ram and just 20k of rom. It too relies on external media such as floppies or casette tape. Yes this is more balanced than my computer, but I don't intend to write a large basic or kernal for it. Those take up 16k in the c64. I also don't need a character generator rom because this thing does not have a video chip. This saves another 4k of rom. The only things I want to save in rom are a program loader, peripheral drivers, menu system and a sound sample player.

That aside: it was either 128k or 8k because those were the only ram chips I currently have in stock. I want to add a serial flash rom with more data on it so I can play back sound samples for example.
Oh ok lol, I thought you were going to have everything load off of your EEPROM. Embedded devices usually boot from flash.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on November 12, 2014, 02:25:33 pm
Well the eeprom is not large enough for sound samples and this is the largest parallel eeprom I got.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on December 20, 2014, 10:13:05 am
   CBS6000

Today a new computer was born
It had some startup issues
With it overwriting its eeprom
But short after I found a fix
The computer blinks its LED's, a colorful mix
As if it were trying to say
~ Merry Christmas!


Edit: Added picture of the main board.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Digital on December 20, 2014, 12:26:01 pm
cool this project is epic   merry chrismas ;)
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on December 24, 2014, 07:11:39 am
Original post:
http://8times8.eeems.me:81/blog/?thread=12

Muhahahahahaha
The cbs6000 is making some noise! I hooked up a digital to analog converter to the serial port and wrote some software that plays back sound data in ram. Almost the entire first 64k bank is filled up for about 5 seconds worth of 8000 bytes/sec 8 bit audio.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on December 26, 2014, 11:32:37 am
I made a debug routine. It's an interrupt service routine that prints human readable info about the CPU state.
Sample output:
Code: [Select]
A=03,X=08,Y=00,P=34,S=FB,PC=0240It can be called using a brk instruction or by pulling the IRQ pin low. I want to change this to the NMI because I still want to be able to use interrupts.
I want to make it elaborate on the status flags. It will explain what every flag does like so:
Code: [Select]
Negative number, BRK, INT disabled, Decimal mode enabled
https://raw.githubusercontent.com/keoni29/cbs6000/master/src/main/debug.asm
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: TIfanx1999 on December 27, 2014, 02:26:55 pm
Yay, audio! \o/ That's sweet! ;D
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 09, 2015, 06:40:58 pm
Stacked an I/O board on top. Total I/O including the main board:
32 I/O pins
serial RS232
2x SPI-like port
4 16 bit timer/counters
4 handshaking lines
8 bit Analog to Digital converter
6 digit seven segment display
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Sorunome on February 10, 2015, 05:49:34 am
This is looking sweet!
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 12, 2015, 11:56:33 am
I added an FSK modem chip (dial up-type) to convert serial data to sine waves and vice versa. I can use this to communicate over audio channels such as phone lines or store data on casette tape.

Old info in spoiler
Spoiler For Spoiler:
I tested the FSK modem chip and I can confirm that sending data works! There are a couple of glitches, but those are probably because of the low bitrate I used for recording the audio to my pc.
Receiving data still requires some tweaking of the modem's confidence-level knobs :P

Listen to audio sample here. (http://codewalr.us/index.php?action=dlattach;topic=116.0;attach=168)
Code: [Select]
minimodem -f file.wav --rx 1200
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=1 confidence=2.883 ampl=0.166 bps=1194.03 (0.5% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=1 confidence=3.147 ampl=0.165 bps=1194.03 (0.5% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=1 confidence=3.282 ampl=0.168 bps=1194.03 (0.5% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###
CBS Computer
CBS Computer
CBS COmputer
CBS Computer
CBS Computer
BS Computer
CBS Computer
BS Compu|er
CBS om`uter
CBS COmputer
CBS Computer
CBS CoMpu|er
CBS Computer
CBS Computer
BS Computer
CBs COm`uter
CS Computer
CBS Computer
CBS Computer
CBS Computer
CBSCompu|er
CBS Com`uter
CBSCNmputer
�BS Computer
CBS CoMputer
CBS Computer
CBS Compute
CBS Computer
CBS Computer
CBSComputer
CBS Compu|er
CBSComputer
CBS Com�uter

### NOCARRIER ndata=476 confidence=2.697 ampl=0.162 bps=1173.71 (2.2% slow) ###



With the recent updates to the operating system I can now save and load data to casette tape. At first I was a bit skeptical about the reliability, but so far I have been getting 100% reliable data back from the tape. I record the audio with FSK at 1200 baud, so about 120 characters per second.

I saved, loaded and executed a program and it ran fine!
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 16, 2015, 05:10:46 pm
I wrote a fast serial loader, so I can load data directly from my PC in binary format. This loader is saved on a casette tape for the time being. I will add it to the rom with the next firmware update.

The new serial loader allows for ~5200 bytes/s transfers as opposed to 120 bytes/s for the casette loader. Note that this loader cannot be used to load data from casette tape, but only from the PC.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: TIfanx1999 on February 16, 2015, 10:23:40 pm
Very neat stuff! ^^
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 20, 2015, 06:19:15 pm
Yesterday I bought a laser printer at a thrift shop with the intend to hook it up to my 8 bit computer. The parallel interface is fairly straightforward. After some troubleshooting I got it to work the day after I bought it. Right now it prints text pages, but I might be able to draw shapes and stuff using the printer's scripting language.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Sorunome on February 21, 2015, 05:50:31 am
That sounds awesome! :D
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 21, 2015, 10:50:18 am
Here's a picture of the resulting page printed. Sending a full page of text happens almost instantly.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Sorunome on February 21, 2015, 03:32:10 pm
That's pretty awesome!
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 23, 2015, 04:53:44 am
The address decoder of the computer is already pretty complex, yet I want to add one more feature to it. I want to exclude the zeropage, stack and 512 bytes of ram from the bankswitching mechanism. To do this I need to check if the cpu is accessing the first 1k of memory. To do this I can OR the upper 6 address lines and check if the result is 0. Then this needs to be fed into an and gate with the bank select signal coming from the decoder circuitry.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 25, 2015, 09:23:16 am
I hooked up a VGA video board to the computer. It's kinda slow since it uses the SPI bus, but it works.
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Sorunome on February 25, 2015, 01:29:14 pm
That sounds pretty awesome! Now on to make some nice games for it :P
Title: Re: CBS6000 - an 8-bit 6510 computer
Post by: Keoni29 on February 27, 2015, 03:03:37 pm
Imma wire up a snes controller to the thing and write a simple game for it.