6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 8:37 pm

All times are UTC




Post new topic Reply to topic  [ 50 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Thu May 07, 2020 5:26 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Agumander wrote:
Couldn't you avoid audio jitter by using a couple of '573s as a really short FIFO buffer? In exchange for a sample or two's worth of lag you wouldn't have to worry about sending the sample *early* so long as you don't send it late. Which seems easier to program for.

The '573 is a transparent latch; so maybe a '573, with latch-enable used as the write-enable from the processor, and then follow it wtth a '273 edge-triggered octal FF triggered by the timer interrupt? (Just make sure it doesn't get triggered by unrelated interrupts.) If you ever want to use the output for something else, you'll want a way to bypass them.

_________________
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 May 07, 2020 6:13 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
There are FIFO chips with 256 to 1K entries at reasonable cost, which can be driven at full bus speed on even the faster SBC designs. Just arrange a regular clock-out from one of those, and a way to read the "full", "half full" and "empty" flags, and you no longer need to explicitly care about timing in your sample generation routine - which will make it faster.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 07, 2020 7:03 pm 
Offline
User avatar

Joined: Tue Jul 17, 2018 9:58 am
Posts: 107
Location: Long Island, NY
The FIFO could be useful if I'm generating audio samples much faster than they are consumed, and want to let the CPU take breaks from audio to perform other tasks.

An idea I'd like to sketch up after work is dedicating a coprocessor to audio, that the main processor sends programs and parameters to over dual-ported RAM. The coprocessor would have IRQ and Reset controlled by the main processor while NMI comes from the audio sample clock.
The main program would copy some code into the audio processor's RAM much like shader code is sent to a modern GPU, write into a register controlling the interrupt vector and strobe IRQ or Reset to start the new program. If new programs are written to alternating buffers, changing the audio generation "shader" shouldn't have to cause audio glitches or artifacts.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 07, 2020 7:23 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
BigEd wrote:
> When trying to predict how well a particular I/O device will perform in a 65C02 system, you can only base that prediction on the Ø2 high period

Indeed, if you're using phi2 to qualify control signals: I believe other approaches are possible.

When it comes to write operations to non-65xx hardware, qualification with Ø2 is de rigueur. During Ø2 low, the address bus is in a state of flux. If a write is enabled at that time it may well touch the wrong address. The 65xx peripherals understand this, but not non-65xx hardware. That's why you don't qualify 65xx peripherals with the clock.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu May 07, 2020 8:45 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
<I'll resist the temptation to keep going in this vein: we have other threads for discussing 6502 bus timing, and I trust it's clear that there are subtleties afoot, and there are helpful simplifications.>


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

All times are UTC


Who is online

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