W65C816SXB Expansion, Keyboard, VGA and Sound.

For discussing the 65xx hardware itself or electronics projects.
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by BigDumbDinosaur »

Alamorobotics wrote:
I'm not sure why there are diodes on the IRQ for the W65C22, the schematics I copied had them so I threw them in there... :lol:
http://www.westerndesigncenter.com/wdc/ ... 816SXB.pdf
They should not cause me any problems since I don't plan to use the IRQ for now..

Any thoughts about the diodes ?
The W65C22S (note the S) has a totem-pole interrupt output, whereas many devices use an open collector output. On a wired-OR interrupt line, the diode will prevent one of the open collector devices from trying to sink the output of the W65C22S. This arrangement is not necessary if using the W65C22N, which has an open collector interrupt output.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

Thanks Garth for the IRQ primer, nice work...

That explains the diode, the schematics uses a MMSD4148 and I picked the through hole version of it.
What would be a better choice for through hole diode ?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by GARTHWILSON »

You're welcome. Actually, that's the IRQ/NMI connections page of the 22-chapter 6502 primer which is about building your own 6502 computer and is mostly hardware-oriented. My interrupts primer is separate, and is at http://wilsonminesco.com/6502interrupts/ .

As for a recommended diode in thru-hole: I checked Mouser's site for Schottky diodes hoping to find one in a DO-35 package like the common 1N4148 or 1N914 uses, but the only one they had listed turned out to not be Schottky, if you look at the data sheet. In the DO-41 package (like the 1N4001 uses), there's the 1N5817 which is usually used for switching power supplies, not logic, but it looks like it would work ok. Even at 20mA, its forward voltage is only about 100mV. Schottkys do have a lot of capacitance, and this one sits at close to 200pF but it should still work ok for this application since you don't need to switch as quickly as a logic gate does.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

Thanks for the recommendation, I have finished the schematics and also update Github.
I replaced the diode in the schematic but kept the one on the prototype board.
https://github.com/alamorobotics/W65C81 ... d_VGA_SID/

I'm wrapping up the soldering and hope to be done tonight...
Attachments
Schematics_03.png
Expansion_02.pdf
(30.71 KiB) Downloaded 61 times
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

Got it all done and tested, seem to work OK.
Lots of interference between the SID emulation and VGA, will look into it later... ;-)

Now for the fun part, programming...
Attachments
Expansion_06.jpg
Expansion_07.jpg
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

Made a little board to bolt everything down to and the keyboard...

Starting to look like a little computer... ;-)
Attachments
Board.PNG
Expansion_08.jpg
Expansion_09.jpg
Briggs
Posts: 11
Joined: 01 Dec 2015

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Briggs »

Looks really nice :)

How did you do the board? 3d printer?

Doh, I sould have looked closer at the picture :) Saw the wood parts now!

/jan
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

Howdy...

Yes, that is simply some cheap plywood from Home Depot.
I made a hobby CNC machine earlier and used it to cut the base for the Zeberpupin computer.

I call it Zeberpupin in honor of the Dilbert cartoon, http://dilbert.com/strip/2011-11-21
Briggs
Posts: 11
Joined: 01 Dec 2015

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Briggs »

Hehe good name :)

I am going to do as you did and connect an old c64 keyboard to my 65c02, will most probably look at your code to get some inspiration :)
User avatar
jac_goudsmit
Posts: 229
Joined: 23 Jun 2011
Location: Rancho Cucamonga, California
Contact:

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by jac_goudsmit »

Interesting project, @Alamorobotics! Are you working on building a C64 replica or something?

You may want to modify your .gitignore file so that files that are generated by the compilers (.bin, .lst, .obj etc.) aren't added to source control. And you will want to delete the generated files that were already added of course.

Also, you should add two 10K pull-up resistors to the Propeller on P31 (RxD) and Reset. Without the pullup on Reset, when you unplug the Prop Plug, the Propeller will keep resetting randomly, and without the pullup on P31, the serial driver will keep getting framing errors which it doesn't handle correctly.

===Jac
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

Thanks Jac.

I have updated the schematics on Github, just added the two pull up resistors...
At the same time, tidy up a little bit and removed old files...

I'm not making a Commodore 64 clone or anything, I just playing around with some hardware.
Since I had a couple of dead C=64s, I took a keyboard from one of them and decided to use it in my Expansion.
The Propeller was added to see if I could communicate with the W65C816, this seem to work fine with the extra W65C22s.

I've been looking into the VGA driver to see if I can add color per character and change the font to a C=64 font.
However, I'm lost in the Propeller VGA generation and have not been able to figure out how to change the driver...
User avatar
jac_goudsmit
Posts: 229
Joined: 23 Jun 2011
Location: Rancho Cucamonga, California
Contact:

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by jac_goudsmit »

Alamorobotics wrote:
I've been looking into the VGA driver to see if I can add color per character and change the font to a C=64 font.
However, I'm lost in the Propeller VGA generation and have not been able to figure out how to change the driver...
Given what you already have, you probably want to take a look at something like the AiGeneric driver.

===Jac
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

Thanks Jac...

I'm looking for VGA generation though.
I've actually written some rudimentary TV drivers on the Propeller, not as good as the AiGeneric but it gave me a good understanding of the NTSC standard.

I did find some Tile VGA drivers, maybe I should have a closer look at them.
User avatar
jac_goudsmit
Posts: 229
Joined: 23 Jun 2011
Location: Rancho Cucamonga, California
Contact:

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by jac_goudsmit »

Alamorobotics wrote:
I'm looking for VGA generation though.
Oh whoops, I didn't pay attention to that, sorry.

I used the vga_hires_text driver in my projects previously because it supports inverse video in the same way as the 8 bit Commodores: set bit 7 of the character code to reverse background and foreground. Unfortunately, "out of the box", that driver only supports one background/foreground color setting per row, but it may be possible to change that, though you may not be able to run it at the highest resolution anymore if the code needs to retrieve color bytes for each character from the hub. But maybe it's possible to modify it so that it runs on more cogs: currently the code is written so that each cog alternately sets up its data and displays it; with 3 cogs there will be twice as much time to do the setup.

When I started on my Propeddle project, I did some experiments with vga_hires_text but I mostly ran it with the entire screen configured for green on black like the old PET computers. I created a font file based on a PETSCII font ROM dump from Zimmers. Click here for some pictures on my facebook page (use the left and right arrow to see more)

https://www.facebook.com/photo.php?fbid ... =3&theater

===Jac
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB Expansion, Keyboard, VGA and Sound.

Post by Alamorobotics »

That is looking great, do you happen to have the vga_hires_text with the PETSCII font ?

I think I'm getting too caught up in changing the VGA driver, I haven't done much of 65C02 coding lately.
Got to fresh up on my 6502 and then learn 65C816... ;-)
Post Reply