6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Oct 02, 2024 8:39 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Jun 10, 2020 4:29 am 
Offline

Joined: Wed Jun 10, 2020 4:19 am
Posts: 6
I joined the forum as I am currently working on a project to set up an Arduino Mega for bus emulation with a 65C02 based system. What I have done is obtained two VIC-20 "cores"(working boards with out case, keyboard, etc.) and tested good but lack their socketed ICs - so I am populating them with W65C02S6TPG-14 and W65C22S6TPG-14. I figured go with CMOS parts because they were cheaper, more readily available, and I could single-step the clock.
The purpose of the Arduino Mega is to emulate ROM/RAM resources. There at least three other projects where the Mega is used as either a ROM/RAM emulator or as a Processor emulator so I am not reinventing the wheel.
Anyways, I thought I would share my project to see if there was anyone else doing same/similar or have any feedback on this project goal.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 10, 2020 4:58 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Welcome, energysteven :)

Briefly, to replace a vintage 6522 with a modern chip from WDC you want W65C22N, not W65C22S. The S version is updated (and arguably improved) by making the /IRQ pin a normal, totem-pole output, but for backward compatibility you want an Open Drain output as featured on the N version.

Re the WDC CPU, be aware that pin 36 (BE) needs to be pulled high and pins 1 and 5 (which are now outputs) must be no-connect. To make these changes you can either inspect and modify the traces on the PCB, or bend the 3 pins outward so they don't engage the IC socket then solder a jumper on 36.

Have fun and keep us posted,

Jeff


Attachments:
65C02 pinout differences (Rockwell vs WDC).gif
65C02 pinout differences (Rockwell vs WDC).gif [ 38.55 KiB | Viewed 2754 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 10, 2020 7:41 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10943
Location: England
energysteven wrote:
I joined the forum as I am currently working on a project to set up an Arduino Mega for bus emulation with a 65C02 based system.
...
The purpose of the Arduino Mega is to emulate ROM/RAM resources. There at least three other projects where the Mega is used as either a ROM/RAM emulator or as a Processor emulator so I am not reinventing the wheel.

Indeed, welcome! It's an interesting project - as you say, not entirely a new idea, but each time it's tried there will be interesting things to learn.

To add to Jeff's points...

I think perhaps a major question is where the clock comes from. If the clock is free running and full speed and comes from the existing system, there are some hard real-time constraints on responding to the bus. But you mention CMOS and the ability to single step, so it may be that the microcontroller in your case controls the clock, which makes for an easier set of timing problems.

Another fairly major question is about which devices get to control the bus: does the CPU have a BE input that you can use, are there other devices (such as the VIC) which are relatively inflexible about bus accesses, and so on.

It might be handy to see a block diagram. It makes a difference, I think, as to whether you are putting the microcontroller into the CPU socket, or onto the cartridge port, or whether you have flying leads to various signals. Also whether you are able to disconnect any pins or connections on the existing board.

Should be a good adventure, and I hope you pursue it with lots of updates here.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 10, 2020 8:03 pm 
Offline

Joined: Wed Jun 10, 2020 4:19 am
Posts: 6
Dr Jefyll wrote:
Welcome, energysteven :)

Briefly, to replace a vintage 6522 with a modern chip from WDC you want W65C22N, not W65C22S. The S version is updated (and arguably improved) by making the /IRQ pin a normal, totem-pole output, but for backward compatibility you want an Open Drain output as featured on the N version.

Re the WDC CPU, be aware that pin 36 (BE) needs to be pulled high and pins 1 and 5 (which are now outputs) must be no-connect. To make these changes you can either inspect and modify the traces on the PCB, or bend the 3 pins outward so they don't engage the IC socket then solder a jumper on 36.

Have fun and keep us posted,

Jeff

I received my two VIC-20 "cores" and these are the original main boards from 1981with the two prong power input and the heat sink that is really heavy.
Upon inspection I discovered the 2114 SRAM was soldered to the board but the main MOS Technology parts were indeed pulled (and that was they way it was sold.)
I ordered two W65C22N6TPG-14 and one W65C02S6TPG-14 from Mouser Electronics. I found that Mouser had the N part from a Lemon forum post.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 10, 2020 8:09 pm 
Offline

Joined: Wed Jun 10, 2020 4:19 am
Posts: 6
BigEd wrote:
energysteven wrote:
I joined the forum as I am currently working on a project to set up an Arduino Mega for bus emulation with a 65C02 based system.
...
The purpose of the Arduino Mega is to emulate ROM/RAM resources. There at least three other projects where the Mega is used as either a ROM/RAM emulator or as a Processor emulator so I am not reinventing the wheel.

Indeed, welcome! It's an interesting project - as you say, not entirely a new idea, but each time it's tried there will be interesting things to learn.

To add to Jeff's points...

I think perhaps a major question is where the clock comes from. If the clock is free running and full speed and comes from the existing system, there are some hard real-time constraints on responding to the bus. But you mention CMOS and the ability to single step, so it may be that the microcontroller in your case controls the clock, which makes for an easier set of timing problems.

Another fairly major question is about which devices get to control the bus: does the CPU have a BE input that you can use, are there other devices (such as the VIC) which are relatively inflexible about bus accesses, and so on.

It might be handy to see a block diagram. It makes a difference, I think, as to whether you are putting the microcontroller into the CPU socket, or onto the cartridge port, or whether you have flying leads to various signals. Also whether you are able to disconnect any pins or connections on the existing board.

Should be a good adventure, and I hope you pursue it with lots of updates here.


I became aware of the clock source issue which was further highlighted by your post here, BigEd. The VIC chip is missing from my VIC-20 cores so I plan on providing an external clock source usomg Ben Eater's clock module: https://eater.net/8bit/clock
I am proposing to feed it to the main board and then the CPU by jumping onto UE3 pin 13 which is normally tied to the UAB7 6560 pin 35. If I am off in the weeds, please advise.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 10, 2020 8:54 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10943
Location: England
Sorry, I don't know the VIC-20 well enough to comment, but hopefully you've got a circuit diagram to refer to. You should probably be prepared to do some debugging, whatever you do, because most things don't work exactly right first time.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 10, 2020 10:59 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1383
I have 4 or 5 Vic-20 machines. My original from 1982 plus some others. All are working sans one, which is the short board with a pair of 6116 SRAM chips to replace most of the original 2114 memory chips used. It appears to have a bad 6560, which is also soldered in. The clock oscillator is running, but there's no clock output to drive the CPU.

However, I've completely socketed two of the machines and rechipped them with CMOS chips (sans the RAM, ROMs and the 6560 VIC chip). I've also used the WDC 65C22N in one of them and they work fine and run much cooler. I've also yanked 10 of the 2114 chips, plus the 74LS138 decoder and replaced with a single 8KB CMOS SRAM... lovely!

Here's the real problem... I've tried using a WDC W65C02S, along with the proper lift for pin 1, adding pull-up resistors for certain lines, etc. The machine boots to the Basic screen, then craters quickly. I didn't spend a ton of time trying to hunt it down. I even had some dialogue with Bill Mensch and he couldn't think of anything specific that would cause this either.

I've also found out (later) that the Vic-20 had some changes in logic on some later manufactured boards (the full size boards using all 2114 memory)... I have a mix of boards, so perhaps this might be workable with one of the other (boards). I've been using Rockwell R65C02 CPUs for my Vic-20 mods... which has worked out fine for some different projects. I've also used Atmel EEPROMs with adapters to replace the standard Kernel and Basic ROMs without issue.

Good luck getting them running.... lots of resources out here to help of course.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 11, 2020 1:13 am 
Offline

Joined: Wed Jun 10, 2020 4:19 am
Posts: 6
floobydust wrote:
I have 4 or 5 Vic-20 machines. My original from 1982 plus some others. All are working sans one, which is the short board with a pair of 6116 SRAM chips to replace most of the original 2114 memory chips used. It appears to have a bad 6560, which is also soldered in. The clock oscillator is running, but there's no clock output to drive the CPU.

However, I've completely socketed two of the machines and rechipped them with CMOS chips (sans the RAM, ROMs and the 6560 VIC chip). I've also used the WDC 65C22N in one of them and they work fine and run much cooler. I've also yanked 10 of the 2114 chips, plus the 74LS138 decoder and replaced with a single 8KB CMOS SRAM... lovely!

Here's the real problem... I've tried using a WDC W65C02S, along with the proper lift for pin 1, adding pull-up resistors for certain lines, etc. The machine boots to the Basic screen, then craters quickly. I didn't spend a ton of time trying to hunt it down. I even had some dialogue with Bill Mensch and he couldn't think of anything specific that would cause this either.

I've also found out (later) that the Vic-20 had some changes in logic on some later manufactured boards (the full size boards using all 2114 memory)... I have a mix of boards, so perhaps this might be workable with one of the other (boards). I've been using Rockwell R65C02 CPUs for my Vic-20 mods... which has worked out fine for some different projects. I've also used Atmel EEPROMs with adapters to replace the standard Kernel and Basic ROMs without issue.

Good luck getting them running.... lots of resources out here to help of course.

Thank you passing along your experiences especially the heads-up on the 65C02 issues.
The boards I am using are marked 324002-01 rev E and 324002-01 rev F. The have the soldered in the 10 SRAM.
The parts missing upon receipt are:
1x 6502 / CPU
2x 6522 / VIA
1x MOS 6560 / VIC
1x MOS 901460-03 / Character ROM
1x MOS 901486-01 / BASIC ROM
1x MOS 901486-06 / KERNAL ROM
So I am putting in a new WDC 6502 and 6522 parts.
I did see where WDC 65C02 has reportedly choked on versions of BASIC.
My hope is I can avoid using the 9VAC and just supply and external P5Vdc with the CMOS and lack of 6560 seriously reducing the power budget.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 11, 2020 1:58 am 
Offline

Joined: Wed Jun 10, 2020 4:19 am
Posts: 6
I have posted a picture of my test bed or hot mockup of a known working VIC-20 main board with only 65C02 and 65C22 populated.
It includes the other items I am using to support my "experiment."

It is a Dorktronic Expansion Port Breakout that will plug into a solder-less breadboard.
(http://www.c64os.com/buyersguide/vic20e ... rtbreakout)
(Similar: https://www.tindie.com/products/syzygy_ ... out-board/)

A Ben Eater 65C02 Clock Module for slow clocking and stingle-stepping.
(https://hackaday.io/project/162955-yet- ... ock-module)

An external P5VDC Power Supply for the interfaces and the main board.

Finally the Arduino Mega "Bus Monitor" that will be wired similarly to how the Paul Swan "Arduino Mega Based In-Circuit Tester" is wired.
(http://www.zzzaccaria.com/arcade/ArduinoMegaICT.htm)


Attachments:
Block Diagram rev2.jpg
Block Diagram rev2.jpg [ 117.16 KiB | Viewed 2663 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 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: