Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Discussions > SID A/D conversion (POT-X, POT-Y)
2006-12-10 21:43
ready.

Registered: Feb 2003
Posts: 441
SID A/D conversion (POT-X, POT-Y)

Hi everybody,
I'd like to find some information about the proper usage of the analog inputs of the SID. I'm trying to do some audio acquisition for CD, microphone, ect. into the pot-x pot-y inputs of the SID. Do I need any special hardware between the audio source and the SID input (joystick port pin 5 and pin 9)?

thanx,
Ready.
2006-12-10 21:53
Graham
Account closed

Registered: Dec 2002
Posts: 990
The SID A/D converters are too slow for audio sampling.
2006-12-11 01:04
Oswald

Registered: Apr 2002
Posts: 5086
some more info on what u want to achieve would help. ATMO it sounds like you want to digitize sounds for a CD with sid.
2006-12-11 07:31
ready.

Registered: Feb 2003
Posts: 441
Yes, my first scope was to attach a microphone to the A/D converter, but a microphone signal was too weak and I didn't have an amplifier ready to be used. So I attached the output of a radio (headphone output)into the SID A/D converter, using the following rountine:

LDA #$FF
STA $D406
STA $D406+7
STA $D406+14
LDA #$49
STA $D404
STA $D404+7
STA $D404+14

here
lda $d41a ; A/D input value
lsr lsr lsr lsr
sta $d418 ;volume value
jmp here

After adjusting the radio volume, I managed to have a replay of the input sound, but it was quite crappy. I wonder if it is crappy because of the routine or because of the A/D input converting too slowly.

How did the digitalizers for C64 worked back in the 80s? What C64 input did they use?

thanx,
Ready.
2006-12-11 09:09
Scout

Registered: Dec 2002
Posts: 1570
here
lda $d41a ; A/D input value
lsr 
lsr 
lsr 
lsr
sta $d418 ;volume value
jmp here



shouldn't it be:

here

lda $d41a ; A/D input value
sta temp
lsr 
lsr 
lsr 
lsr
sta $d418 ;volume value

ldx #$<some delayvalue>
dex
bne *-1

temp = *+1
lda #$00
and #$0f
sta $d418

jmp here


Quote:

How did the digitalizers for C64 worked back in the 80s? What C64 input did they use?


Digitalizers? Samplers!
You had to stick 'em in your userport so far as I know they didn't use the SID as a A/D converter.

EDIT:
Disabling IRQ's (SEI) and turning off the screen (using $d011...duh!) improves sample replay.
2006-12-11 10:11
ready.

Registered: Feb 2003
Posts: 441
Thanx Scout,
I guess that the bad quality of the samples I acquired is only due to the slowness of the SID A/D converters.

Ready.
2006-12-11 10:26
Style

Registered: Jun 2004
Posts: 498
samplers used their own ADC chips and were connected via userport, cart port or sometimes even the joystick ports (I had a covox voice master that did that).

2006-12-11 11:09
ready.

Registered: Feb 2003
Posts: 441
mmmh, joy port....and what pin did they use?

Ready.
2006-12-11 13:20
Raf

Registered: Nov 2003
Posts: 343
joy port allows just to read na incoming nibble - that's all you need for C64 sampler :)

www.vulture.c64.org
2006-12-11 15:02
Mace

Registered: May 2002
Posts: 1799
Quote:

here

lda $d41a ; A/D input value
sta temp
lsr 
lsr 
lsr 
lsr
sta $d418 ;volume value

ldx #$<some delayvalue>
dex
bne *-1

temp = *+1
lda #$00
and #$0f
sta $d418

jmp here



The STA TEMP and AND#$0F is useless when reading $D41A, as $D41A holds a value between 0 and 255 and not a double nibble of a 'compressed' sample.
2006-12-11 15:21
Scout

Registered: Dec 2002
Posts: 1570
Ah! Handy to know that...!
 
... 4 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
REBEL 1/HF
Alakran_64
swasti
iceout/Avatar/HF
Doc Snyder/ONS
JEZ
Guests online: 95
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 The Demo Coder  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Triad  (9.2)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.039 sec.