6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 5:01 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jun 30, 2016 10:51 pm 
Offline

Joined: Wed Jun 29, 2016 12:36 pm
Posts: 4
Here's a newbie question:
If I want to connect a PSG chip to my 6502 computer, like an AY-3-8910 for example, do I need to connect it through a 6522? Or can I just connect it direct to the bus? And if either solution would work, is there any advantage to using the 6522 in this scenario?

Jason

_________________
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Check out my home-brew computer projects:
https://m.youtube.com/watch?v=EgXulWcfLKc
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 01, 2016 7:47 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I notice Acorn's BBC Micro connects the sound chip indirectly. I can think of a couple of possible reasons:
- the timing of the chip's bus interface might make it tricky to connect directly
- by putting several (low-bandwidth) peripheral chips behind the 6522, there's reduced load on the bus. In this machine, the bus is very overloaded even with this tactic in play, so it might have been an important consideration

Another possibility is that indirect connection offers a boundary, both for hardware and software, which means the main part of the machine can be developed and debugged even if it's not yet known exactly what peripheral chips will be needed.

(On the Beeb, behind the system VIA we find the keyboard, LEDs, sound chip, optional ROM cartridge interface and optional speech chip, behind which is the optional serial ROM.)


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 01, 2016 12:47 pm 
Offline
User avatar

Joined: Mon Dec 08, 2008 6:32 pm
Posts: 143
Location: Brighton, England
There are two reasons to use a 6522 to connect a sound chip

1) Incompatible bus speed.
The old PSGs, like the AY-3-8910, can't be connected directly to the 6502 bus if the CPU is running faster than 2MHz without the hassle of implementing wait-states. If you want to run your CPU faster than 2MHz, connecting older, slow devices through a 6522 is the easiest option.

2) Incompatible bus signals.
Most PSGs were not designed to directly connect to the 6502 bus. As a result, they need different control signals to those on the 6502 bus, requiring logic to convert the 6502 bus signals to those needed by the PSG. While this isn't a major problem if you are implementing your system with a programmable logic device, if you are using 74HC devices, the interface between a 6502 and a PSG can require several logic devices to implement. By connecting the PSG through a 6522, the logic needed to generate the control signals for the PSG becomes a software issue instead of a hardware issue.

To summarize, if you are happy running your system at a low clock speed and it isn't too difficult to interface the PSG to the 6502's bus, there is no advantage to using a 6522 to connect the PSG. If, however, you want to run your CPU faster than 2MHz or the interfacing requirements of the PSG are complex, connecting the PSG through a 6522 is the better option.

_________________
Shift to the left,
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 01, 2016 1:13 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
One other advantage of using a 6522 between the PSG and CPU is that is how the Mockingboard (for example) in the Apple II was designed. Which makes it a little easier to find example code to control the PSG. In other words, it's a "proven" design with software floating out there that uses that design.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

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