SuperCPU for the Vic-20

Modding and Technical Issues

Moderator: Moderators

Post Reply
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: SuperCPU for the Vic-20

Post by eslapion »

Kakemoms wrote:The first 10 pcs of MachXO3-9400 are here
That's good news!
I was going to mount the first board this weekend, but my PNP machine needs a new valve so I am waiting for that.
You have your own Pick&Place machine!! You're considerably better equipped than I am!
After shipping, upgrading the cards will require you to have a PC, an USB connection and a downloadable Lattice Programmer (win/linux) installed.
No special hardware ? Not too bad!
Be normal.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

eslapion wrote:No special hardware ? Not too bad!
I included the FTDI2232 chip and program space. It may require some tinkering, but in theory it should work now. As a backup I still have place for a 232 chip instead, which can be programmed with a PD bitbanger (I have tested this and it works!). So in any instance, only a USB cable is needed.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

I am almost ready to start mounting the boards. The PNP machine is working with one nozzle, so I am hoping to get the other one up and running during the weekend. A new reflow solder oven was also finished last week, so with that all machinery is ready. Next phase is to put down the components, program their position and do some debugging to get within accuracy. The Supervixen board has 112 surface mounted components, of which 39 are unique.

The goal is to have the first test board finished within two weeks, and start testing it. I will then mount the rest and start shipping them, probably by end of March.
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: SuperCPU for the Vic-20

Post by Radical Brad »

Cool to have that kind of equipment at your disposal!
Is this a home super-setup, or a commercial gig?
Would be neat to see a photo of your setup as well.

Following your project keeps me driven to continue on mine as well.
Looking forward to seeing the first version powered up and running.

Cheers,
Brad
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

Radical Brad wrote:Cool to have that kind of equipment at your disposal!
Is this a home super-setup, or a commercial gig?
Would be neat to see a photo of your setup as well.

Following your project keeps me driven to continue on mine as well.
Looking forward to seeing the first version powered up and running.
I am the worst blogger ever. Period. I even have a twitter account name of four letters and post like three times per year. :oops:

But I will upload a photo of the incredible OpenPNP machine I have. Or you can read all about how to make your own on openpnp.org :roll:

Yesterday I managed to get it to (finally) pick up, adjust and put down 0603 components. I am not even considering using 0402, and most are 0805 or bigger, so then its all set.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

Here is a video of the OpenPNP in action. It took some adjustments to get the 0805 properly placed. It kind of works for 0603 components as well, but I only have two of them (LEDs) so its easier to just put them down by hand. Click below the image to download the video.
OpenPNPSuperVixen.png
Video
PS: Its a 120MB file.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

Well, short update:

I mounted half a card (backside) and one of the Nema8 steppers (used for rotation of parts) burnt itself to electron heaven. Fortunately omc-stepperonline.com had them in store, so a new one left Germany on Friday and should be here soon.

Anyway, here is a picture of some of the enclosure during laser cutting tests (I eventually got one that fit). All enclosures will be made of 3-layer acrylic with a Polar Fox insert and holes for the copper heatsink. You will be able to choose between black, transparent and white acrylic as the top plate.
IMG_6444.JPG
User avatar
plbyrd
Vic 20 Hobbyist
Posts: 135
Joined: Tue Jun 01, 2010 9:32 pm
Website: http://thesharp.ninja
Location: Clarksville, TN
Occupation: Software Engineer

Re: SuperCPU for the Vic-20

Post by plbyrd »

Kakemoms wrote:Well, short update:

I mounted half a card (backside) and one of the Nema8 steppers (used for rotation of parts) burnt itself to electron heaven. Fortunately omc-stepperonline.com had them in store, so a new one left Germany on Friday and should be here soon.

Anyway, here is a picture of some of the enclosure during laser cutting tests (I eventually got one that fit). All enclosures will be made of 3-layer acrylic with a Polar Fox insert and holes for the copper heatsink. You will be able to choose between black, transparent and white acrylic as the top plate.
IMG_6444.JPG
This is looking so very cool. I cannot wait to get one.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

You must be thinking I am sleeping, but no, I am working hard to get things going.

I could probably have mounted several cards by now if I wasn't battling my new OpenPNP machine. No time for games either! :shock:

The latest problem (after I replaced the burnt-out NEMA8 stepper motor) is that the OpenPNP software is inconsistent with direction detection of components. For example, the FTDI232 (UART to USB) component should be detected as being one direction since its is not square, but this is not so:
bv_result_5220030697725987766.png
Orientation detected upwards
bv_result_4382770577811468863.png
Orientation still upwards!

A 0805 capacitor seems to be detected in this direction:
bv_result_5195582512276157706.png
The problem is that this inconsistency leads to components being placed in the wrong way. E.g. 90 degrees off-axis! They are all aligned the correct way in the tape, so this is quite stupid. :oops: If I were only to make a few cards, I would have mounted them manually, but since this job is going to be reused a few times (probably) I want to make the automation work.

I will get back with better news once the guys at OpenPNP finds some solution to this.

PS: I am thinking of selling the SuperVixen as a stand-alone unit as well. E.g. with a keyboard (it has a VGA output). Maybe it can give Arduino some competition. I mean, Commodore Basic is a really nice starter for kids that know nothing of programming. At least my kid likes it. But it will take some time to get all the software working (SDCard, keyboard, mouse? ++).

Thanks for your patience!
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

I finally went head in and had the devilish machine do something. All the pipelines for all the components (there are 38 different) had been defined, tested and found working... and many had to be set up again... So after 7 hours work I had the first machine mounted SuperVixen card:
SuperVixen3.jpg
The next one(s) are going to go much faster. All the small components are easy to get going. The machine works by itself, and even if it fails once in a while, that was mostly due to something I had forgotten. After some runs I hope to get rid of the bugs in the machine so it can make the cards faster.
SuperVixen2.jpg
After some minutes in the reflow oven it looks like this:
SuperVixen1.jpg
First mounted SuperVixen card version 0.76.4

There are a few shorts here and there, but nothing that can't be fixed in a few minutes. I will also need to solder in USB and VGA plugs, while the SDCard reader has to wait a little since Mouser had supplied the wrong type with a different solder pad.

I look forward to start playing with the MachXO3L-9400 and get everything together.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

Wow. That was painless. I had to reflow it again at 260C to get rid of a short, and except for a Power diode that is turned the wrong way, nothing seems to be wrong. :shock:

Programming went fine.. so now we have 40% more LUTS and 48KiB of internal memory :mrgreen: :
ProgramMachXO3L9400.png
What remains is to test the VGA (which hasn't been changed much, only the connector), the 2 pcs 512KiB SRAM that works up to 100MHz (which should be straight forward), the FTDI2232 USB interface (I need to program an eprom to get the Lattice programmer to work) and the SDCard (once a new connector arrives).

The ports now have ESD protection ICs, so the 29-pin expansion connector can also be used for fun things. I may need to look into a VIA interface and direct access for that port. Nothing is more fun than to use POKE on the Vic-20 side and change the output lines, so the port will be mapped to some memory region.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

Short update: I am debugging the VGA and the screen size was not giving me good results. I decided to go to 1024x768 VGA resolution which has a lower pixel clock and looks sharper with this setup. As for the 3X filtering, its not done yet and I was thinking of moving over to SDCard implementation. So first version of core will have a 1024x768 VGA out without filtering.

In order to show the internals of the Vic-20 (e.g. the Vic-I chip), I will read the databus of the CPU and fetch all the writes to the VIC chip registers and internal SRAM. The plan is that if you want to run your favourite game on the Vic-20 and see it in VGA, you should be able to do so. Raster effects are more tricky to get working, so it will not in the first release.

The 2232 (USB) interface is not working, but I have ordered new crystals as they were the wrong frequency.

The 65C02 runs stable at 25MHz. It can run faster, but the program suite (Lattice) recommends 25MHz (they take all IC variations, temperature, weather and moon phases into account I believe). For reference I have had it run at over 40MHz, but that may not be a wise domain to work in. I won't push for higher frequency without rigorous testing.

The memory Map of the 65C02 is going to look like this at startup:
0000-00FF Zero page
0100-01FF Stack
0200-03FF internal RAM/Screen RAM
0400-0FFF internal RAM/Vic-20 expansion RAM
1000-1FFF internal RAM/Screen RAM
2000-7FFF internal RAM/Vic-20 expansion RAM
8000-8FFF internal CHAR RAM/Screen RAM
9000-93FF reserved I/O (future)
9400-9FFF internal color RAM
A000-BFFF internal RAM/Vic-20 expansion RAM
C000-FFFF SRAM

The first release will probably have CHAR Ram at one spot ($8000). I will try to implement a way to move this around (as for the screen RAM).

You may notice that color RAM is slightly bigger which allows for future improvements. I was thinking of allowing a 6564 mode with 40 char (e.g. double resolution of the VIC-I) and a 80 char mode. The implementation of this is very straight-forward, but we need to make it backwards compatible to VIC-I.

The SRAM area consists of two 8K blocks that can be selected from a 1024K SRAm area. I may also put in a mode in which the 65c02 run in any SRAM memory block. I am also thinking of having a 6509-compatible mode (but that is for future to decide).

As for mouse or other interfaces, I plan to add this via the expansion plug.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: SuperCPU for the Vic-20

Post by Kakemoms »

A short update on what is going on:

VGA output works after some debugging. Looks like I will need to fix a small crystal to one of the general output lines to get a more stable picture. It looks ok on some monitors (mostly newer ones with VGA in), but some older monitors have a quite poor picture. Its a known issue that Silicon oscillators are not goot for VGA, so nothing major.

As for showing things from the Vic-20 on the VGA I have made the first 6502 databus decoder for that. Debugging remains but it works as this:

The decoder reads every databyte on the databus regardless of what is happening. I decided to lock in to address bus changes to keep it "simpler". After reading the first byte it looks up a table to see if that is an instruction, then reads the given number of address changes and keeps the databytes.

Example:
STA ($44,X)
Looks like

Code: Select all

Address Byte
0002    81
0003    44
0044    00
0054    80
0055    00
0080    aa    (write)
So 6 bytes that needs to be read in order to know what is going on with this instruction. Target address is $0080 and written byte is $aa, so that is easy enough to read. Of course, in the start we may be misaligned with the instruction byte, so for invalid instructions the decoder simply skips these now. All valid ones are kept track of.
By decoding the databus this way we can get hold of all the writes to internal memory. Then its only a matter of watching the screen registers ($9002 and $9005) to see if the (internal) program writes to current screen memory.
As for double buffering, this will take some time to implement, but simpler games should work in the start.
User avatar
mingle
Vic 20 Dabbler
Posts: 89
Joined: Sun Sep 25, 2016 2:38 am
Location: Melbourne, Australia

Re: SuperCPU for the Vic-20

Post by mingle »

This is fascinating to watch...

Keep up the great work and keep these updates coming (when you have the chance!).

Cheers,

Mike.
User avatar
TLovskog
Vic 20 Enthusiast
Posts: 194
Joined: Fri Mar 25, 2011 3:16 pm
Location: Kävlinge, Sweden

Re: SuperCPU for the Vic-20

Post by TLovskog »

Kakemoms wrote: The decoder reads every databyte on the databus regardless of what is happening. I decided to lock in to address bus changes to keep it "simpler". After reading the first byte it looks up a table to see if that is an instruction, then reads the given number of address changes and keeps the databytes.

...
I had a similar idea at one time to catch certain internal writes. In theory it should work like a charm, but there was still a worry and itch of getting out of sync.

What do you think about that?

Cool project. Cool progress.
BR
Thomas Lövskog
Post Reply