Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user tomek ! (Registered 2024-11-24) 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...!
2006-12-11 15:31
ready.

Registered: Feb 2003
Posts: 441
@Raf: are you sure about reading a nibble? As far as I know using the pot-x / pot-y, the SID converts a 0-5 V signal into 0-255 digital value (8-bit).

Anyhow, my doubt is how did samplers based on the SID A/D converters (joyport inputs) manage to do a decent sampling? From my experiments I get quite crappy results, caused by (I suppose) the slowness of the A/D conversion.
2006-12-11 16:08
algorithm

Registered: May 2002
Posts: 705
Better to sample on something like a PC, resample, process and then place on the c64.
2006-12-11 16:59
chatGPZ

Registered: Dec 2001
Posts: 11352
Quote:
Anyhow, my doubt is how did samplers based on the SID A/D converters (joyport inputs) manage to do a decent sampling? From my experiments I get quite crappy results, caused by (I suppose) the slowness of the A/D conversion.


there were no samplers that used the sid a/d converters, because like you said, they are too slow.
2006-12-11 17:30
Raf

Registered: Nov 2003
Posts: 343
Quote: @Raf: are you sure about reading a nibble? As far as I know using the pot-x / pot-y, the SID converts a 0-5 V signal into 0-255 digital value (8-bit).

Anyhow, my doubt is how did samplers based on the SID A/D converters (joyport inputs) manage to do a decent sampling? From my experiments I get quite crappy results, caused by (I suppose) the slowness of the A/D conversion.


I mean there are 5 data lines connected to joyport. there is even something like fake hrdsid driver - PC connected with C64 by LPT to joyport cable.

www.vulture.c64.org
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
JAYCE - THE MiNiSTRY
Perff/No Name
JEZ
Mibri/ATL^MSL^PRX
Earthshaker/Silicon ..
Steffan/BOOM!
GuyGavin/HF
Nordischsound/Hokuto..
krikkit/Censor Design
anonym/padua
Brittle/Dentifrice^(?)
REBEL 1/HF
Peacemaker/CENSOR/Hi..
Barfly/Extend
CA$H/TRiAD
Guests online: 153
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 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Comaland 100%  (9.6)
10 No Bounds  (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 Censor Design  (9.3)
Top Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

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