6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 15, 2024 5:02 am

All times are UTC




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Thu Jan 07, 2021 3:06 pm 
Offline
User avatar

Joined: Thu May 14, 2015 9:20 pm
Posts: 155
Location: UK
Although you may find schematics of people including the PHI2 clock in the /CS circuitry for a SID chip, Commodore does not appear to do this in their Commodore 64 schematics, for example in this one.

Is the system slow enough for the SID chip?

Mark


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 3:15 pm 
Offline

Joined: Sun Jan 03, 2021 10:15 am
Posts: 17
This is the part of the data sheet that I consulted when coming up with the timing.


Attachments:
sid cs.PNG
sid cs.PNG [ 140.74 KiB | Viewed 635 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 3:19 pm 
Offline

Joined: Sun Jan 03, 2021 10:15 am
Posts: 17
The SID works at 1mhz so yes it is.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 3:25 pm 
Offline

Joined: Sun Jan 03, 2021 10:15 am
Posts: 17
Yeah you're right, Commodore has it direct. The commodore works at 1.023 MHz and the Replica 1 works at exactly 1 MHZ. I wonder if that small difference could cause the timing issue. It just seems weird to me that the only other SID to Apple schematic I found did the same thing as me.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 3:30 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Rogers64 wrote:
This is the part of the data sheet that I consulted when coming up with the timing.
None of this contradicts what's implied by their Typical Application schematic.

Quote:
It just seems weird to me that the only other SID to Apple schematic I found did the same thing as me.
Understood! But misunderstandings happen. And a surprising amount of stuff that's misconceived in various ways nevertheless manages to (more or less) work -- it's quite astonishing. :shock:

_________________
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: Thu Jan 07, 2021 3:35 pm 
Offline

Joined: Sun Jan 03, 2021 10:15 am
Posts: 17
Interesting. I'll run some more configurations and see if I can get something closer to what the illustration in the data sheet shows. It's possible that jeff was right and it's entirely delay related.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 3:37 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
If you need further assistance, can you PLEASE show us some photos of your setup?!! :roll:

(On this forum you're permitted to attach images with your posts.)

_________________
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: Thu Jan 07, 2021 4:07 pm 
Offline

Joined: Thu Oct 29, 2015 8:07 am
Posts: 6
PHI2 should be connected to pin 6 on the SID, presumably because it has internal circuitry to qualify /CS and R/W.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 5:24 pm 
Offline
User avatar

Joined: Thu May 14, 2015 9:20 pm
Posts: 155
Location: UK
Rogers64 wrote:
Yeah you're right, Commodore has it direct. The commodore works at 1.023 MHz and the Replica 1 works at exactly 1 MHZ. I wonder if that small difference could cause the timing issue.

I can’t see that making any difference.

If the Replica 1 uses modern CMOS chips, they often have much quicker translations between logic levels, so it may be worthwhile checking that the timings are okay.

Mark


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 9:32 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 192
Location: Madrid, Spain
I've used an original MOS6526 in my SBC with modern WDC parts, a 65c02. /CS is not qualified by PHI2, only by the address bus, and it works.

As far as I know, no 65xx device needs it's /CS qualified by PHI2 as it handles it internally.

I just saw... You have R/W tied to ground. Why? It should be connected to the CPU R/W directly. This way, you maybe writing invalid data to the sid, and by qualifying it with PHI2 may be solving this issue.

Could you give it a try this way?


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 9:50 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
daniMolina wrote:
As far as I know, no 65xx device needs it's /CS qualified by PHI2 as it handles it internally.

Some of them specifically need the chip selects to not be qualified by phase 2, as they need the chip selects to go true some setup time before phase 2 rises. Same with register selects and R/W. I found out from experience in my early days that the 6522 specifically will not work at all if the chip selects are qualified by phase 2.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 07, 2021 11:04 pm 
Offline

Joined: Sun Jan 03, 2021 10:15 am
Posts: 17
Interestingly, when I had RW tied to the line on the computer nothing would happen. When I first connected it I did it like the suggested configuration shown in the data sheet, but there was no response. I must have tried wiring it that way at least 10 times and I still had no luck.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 08, 2021 6:14 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
The expansion bus of the Apple 1 (and Replica 1) is a pretty straightforward exposure of the 6502 bus, plus some minor high-order address decoding lines. It even includes the Phi0 clock for reasons I don't fully understand.

The SID expects to be connected pretty much directly to a 6502 bus. The datasheet explicitly says that /CS could be generated through a mere address line, though it would be far more common to run it through some decode logic first; either way, the timing diagram shows no relationship with the active Phi2 edge, and only says that the access time is to be calculated from the last active edge among Phi2, /CS, and addressing signals. The C64 decodes a rather generous portion of address space for the SID. It's important to remember that /CS is active-low; this is satisfied by the $A000, $B000, etc decode lines provided at the expansion ports.

The fact that this configuration doesn't work for you suggests strongly that you've missed some other detail - such as power supply bypass capacitors, which are roughly ten times as necessary on the wrong side of an expansion port than directly on the motherboard, and there're quite necessary enough on the latter. I would put a 10µF immediately beside the expansion connector, and a 100nF ceramic immediately beside the SID with minimum conductive distance to the Vcc (+5V) and GND pins, plus a second one similarly between Vdd (+12V) and GND. These bypass capacitors are not shown in the SID datasheet's application diagram, but are mentioned in the text and are generally required by all logic ICs.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 12, 2021 6:21 am 
Offline

Joined: Sun Jan 03, 2021 10:15 am
Posts: 17
So I ended up getting it to work like the diagram in the data sheet. It turns out there was something wrong with the SID that I was using. I bought a new SID and and had better luck. Interestingly, I also tried a swinsid but that didn't work unless I NANDed the PHI2 to the $b000 line. It turns out the swinsid doesn't read the PHI2 line and that's why it has to be NANDed. It's possible the person who designed that other card knew this as well and designed their schematic to be compatible with both a SID and swinsid.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 12, 2021 6:22 am 
Offline

Joined: Sun Jan 03, 2021 10:15 am
Posts: 17
I wonder if there's some way to modify a tracker program to write to the locations where the sid is on the replica 1.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

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