Halting the Vic with Sally(6502c)

Modding and Technical Issues

Moderator: Moderators

User avatar
GreyGhost
Vic 20 Nerd
Posts: 525
Joined: Wed Oct 05, 2005 11:10 pm

Halting the Vic with Sally(6502c)

Post by GreyGhost »

Looking at the pin outs of the 6502 and 6502c, i see their are 2 pins that are exchanged (pins 34 & 36) and an extra pin halt (pin 35). Am i correct in assuming that the 6502c could be used in a Vic with the use of a single jumper? Or as I read I see that pin 35 on the 6502c has to be pulled high for the chip to work.

What does "pulled high" mean? And also could this halt feature be used also as say a click on/click off switch on the Vic?

Just wondering.
Last edited by GreyGhost on Sat Jan 30, 2010 7:04 am, edited 1 time in total.
Rob
wimoos
Vic 20 Afficionado
Posts: 347
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Do you mean the 65C02

Post by wimoos »

I have a 65C02 in my VIC and it works.

No need for jumpers or soldering, just replace (mind the orientation of course).

Regards
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
User avatar
RobertBe
Vic 20 Elite
Posts: 2312
Joined: Sat Jul 14, 2007 2:48 pm

Re: Do you mean the 65C02

Post by RobertBe »

wimoos wrote:I have a 65C02 in my VIC and it works.
Oh, that's interesting. I have a 65C02 lying around. What would be the benefits, if any, of putting in a 65C02 into the VIC?

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
The Other Group of Amigoids
http://www.calweb.com/~rabel1/
Southern California Commodore & Amiga Network
http://www.sccaners.org
6502dude
megacart
Posts: 1581
Joined: Wed Dec 01, 2004 9:53 am

Re: Do you mean the 65C02

Post by 6502dude »

RobertBe wrote:What would be the benefits, if any, of putting in a 65C02 into the VIC?
- lower power consumption
- runs cooler
Image Mega-Cart: the ultimate cartridge for your Commodore Vic-20
sjgray
Vic 20 Hobbyist
Posts: 115
Joined: Thu May 03, 2007 6:46 pm
Location: Markham, ON, Canada

Re: Halting the Vic with Sally(6502c)

Post by sjgray »

GreyGhost wrote:Looking at the pin outs of the 6502 and 6502c, i see their are 2 pins that are exchanged (pins 34 & 36) and an extra pin halt (pin 35). Am i correct in assuming that the 6502c could be used in a Vic with the use of a single jumper? Or as I read I see that pin 35 on the 6502c has to be pulled high for the chip to work.

What does "pulled high" mean? And also could this halt feature be used also as say a click on/click off switch on the Vic?

Just wondering.
If I understand correctly, Atari needed to halt the processor so the custom video chips could read memory and so they commisioned the 6502C (which is different than the 65c02). The 6502C can tri-state it's address and databus, which basically "disconnects" the CPU from the system, allowing a coprocessor to take over. The standard 6502 can not be tristated without adding some additional chips between it and the bus.

"Pulled high" means connecting to +5V (logic "1").

I suppose with a little rewiring the 6502C could work in the VIC and the halt line could be used to freeze the computer (program execution), but the VIC chip would still operate.

Steve
User avatar
RobertBe
Vic 20 Elite
Posts: 2312
Joined: Sat Jul 14, 2007 2:48 pm

Re: Halting the Vic with Sally(6502c)

Post by RobertBe »

sjgray wrote:If I understand correctly, Atari needed to halt the processor so the custom video chips could read memory and so they commisioned the 6502C (which is different than the 65c02).
Ah, you are correct.

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
The Other Group of Amigoids
http://www.calweb.com/~rabel1/
Southern California Commodore & Amiga Network
http://www.sccaners.org
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Re: Do you mean the 65C02

Post by Pedro Lambrini »

6502dude wrote:
RobertBe wrote:What would be the benefits, if any, of putting in a 65C02 into the VIC?
- lower power consumption
- runs cooler
Can I hijack this thread and ask; would changing the CPU, therefore, increase the lifespan of a machine in general? If it would this would surely be a great 'upgrade'. :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
wimoos
Vic 20 Afficionado
Posts: 347
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Advantages

Post by wimoos »

There are no specific advantages. Difference in powerconsumption for the VIC as a whole is marginal. The lifespan of a VIC also depends on other components (such as the 6561 VIC chip).
The reason that I replaced it, was my interest in using the extra instructions that are available in the 65C02, such as BRA, JMP (abs,X), SMB, etc. etc.

Regards.
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

How about any undocumented op-codes? I realize very few VIC-20 programs may use those, but beware if you find one that does but which the new CPU doesn't support.
Anders Carlsson

Image Image Image Image Image
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

carlsson wrote:How about any undocumented op-codes? I realize very few VIC-20 programs may use those, but beware if you find one that does but which the new CPU doesn't support.
That's kind of what I thought. Wouldn't some demos suffer from such things and therefore not work on the newer chip?
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
wimoos
Vic 20 Afficionado
Posts: 347
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Post by wimoos »

Try it.

Another big difference between the 6502 and the 65C02 is, that when there's an instruction that would otherwise "hang" the 6502, on the 65C02 the machine keeps going. On a demo, this could turn out handy.
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
User avatar
Wilson
Vic 20 Enthusiast
Posts: 190
Joined: Mon Sep 28, 2009 7:19 am
Location: Brooklyn, NY

Post by Wilson »

wimoos wrote: Another big difference between the 6502 and the 65C02 is, that when there's an instruction that would otherwise "hang" the 6502, on the 65C02 the machine keeps going. On a demo, this could turn out handy.
That's probably a bad thing, isn't it? Shouldn't a demo run on the regular 6502 present in the vast majority of Vic-20's? I'm also interested in a processor replacement, but even I use the occasional undocumented opcode. The 65C02 seems like a poor option. Has anyone tried the FPGA route with success? FPGAs have been successfully used as a PLA and other custom chip replacement.
http://fpgaarcade.com/parts.htm
I could be overlooking something, but it seems to be fairly basic as 6502 cores already exist.
Then again... I really don't have a clue when it comes to hardware.
wimoos
Vic 20 Afficionado
Posts: 347
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Post by wimoos »

That's probably a bad thing, isn't it?
That is matter of perception. From where I stand, using undocumented opcodes is a bad thing. :roll:
It all depends on the application and what you want to demonstrate.

(I'm sorry, I don't mean to be rude :oops:)
Last edited by wimoos on Tue Feb 02, 2010 1:49 am, edited 2 times in total.
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
User avatar
Wilson
Vic 20 Enthusiast
Posts: 190
Joined: Mon Sep 28, 2009 7:19 am
Location: Brooklyn, NY

Post by Wilson »

wimoos wrote: From where I stand, using undocumented opcodes is a bad thing.
This I understand.
What confused me is why you would want an instruction that causes the 6502 to "hang" to do nothing. To me that just seems to mask a problem. Sorry if I'm not following you. :oops:
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Well, it appears some undocumented op-codes are more stable and useful than others. While I haven't found use of any myself, I wouldn't disqualify anyone who did for producing a "dirty" program that deserves not to be executed anymore. In any case, it is a good point to make for anyone looking to replace the CPU with a similar one. People asked for the benefits of doing so and should probably also hear about the possible drawbacks.
Anders Carlsson

Image Image Image Image Image
Post Reply