Exactly how NOT to make a multicart for the C64

Other Computers and Game Systems

Moderator: Moderators

User avatar
Noizer
Vic 20 Devotee
Posts: 297
Joined: Tue May 15, 2018 12:00 pm
Location: Europa

Re: Exactly how NOT to make a multicart for the C64

Post by Noizer »

Why you heroes of lost hardware dreams, don’t do something c o n s t r u c t i v e for this community?
http://sleepingelephant.com/ipw-web/bul ... 87#p108190
See first of my comment on that topic.
Since no one can prove the opposite, I declare this as the first and cheaper but more efficient way to play 8-bit mono or 4-bit stereo samples on Vicy. Challenge is open😡
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
User avatar
Gyro Gearloose
Vic 20 Enthusiast
Posts: 174
Joined: Wed Sep 28, 2016 8:26 pm
Location: Montreal
Occupation: Drunk

Re: Exactly how NOT to make a multicart for the C64

Post by Gyro Gearloose »

MCes wrote: Wed Jul 01, 2020 2:33 pm
Gyro Gearloose wrote: Tue Jun 30, 2020 11:17 pm Is there a way to simultaneously use an Eslapion product and a MCes product in a VIC-20?

I want to make this the goal of my life.
Someone has already tried it, here is the video of the experiment .... https://youtu.be/M2o2FRwn_hg?t=232
That reminds me of a Plenty Of Fish date I had once.
User avatar
Gyro Gearloose
Vic 20 Enthusiast
Posts: 174
Joined: Wed Sep 28, 2016 8:26 pm
Location: Montreal
Occupation: Drunk

Re: Exactly how NOT to make a multicart for the C64

Post by Gyro Gearloose »

Noizer wrote: Wed Jul 01, 2020 3:35 pm Why you heroes of lost hardware dreams, don’t do something c o n s t r u c t i v e for this community?
http://sleepingelephant.com/ipw-web/bul ... 87#p108190
See first of my comment on that topic.
Since no one can prove the opposite, I declare this as the first and cheaper but more efficient way to play 8-bit mono or 4-bit stereo samples on Vicy. Challenge is open😡
It's trivially easy to hook up a DAC to the VIC's user port. As a matter of fact, when I was in college studying electronics, many years ago, I brought my VIC with me. Instead of using the school's IBM-based computers I used my trusty VIC-20. Hooking up the user port to the Motorola MC1408 8 bit DAC was a fascinating experiment.

https://datasheetspdf.com/pdf-file/1243 ... a/MC1408/1

I remember using the MC1408 circuit to create a low frequency arbitrary signal generator. Using a few lines of BASIC I created a 256 byte table of values and I made the VIC cycle through it and output the values through the MC1408.

I also used this DAC to adjust the output voltage of a LM317 regulator. A few lines of BASIC to ask for the voltage and calculate the 8 bit value and I had a programmable power supply.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Exactly how NOT to make a multicart for the C64

Post by eslapion »

Noizer wrote: Wed Jul 01, 2020 3:35 pm Why you heroes of lost hardware dreams, don’t do something c o n s t r u c t i v e for this community?
Hey, buddy, I studied a couple of years at university, I created a couple of things for the VIC-20 and for the C64 and then here comes this guy who declares everything I learned is bullshit, everything I say is bullshit and everything I sell is crap.

Good luck indeed trying to do anything constructive under the circumstances.
http://sleepingelephant.com/ipw-web/bul ... 87#p108190
See first of my comment on that topic.
Since no one can prove the opposite, I declare this as the first and cheaper but more efficient way to play 8-bit mono or 4-bit stereo samples on Vicy. Challenge is open😡
You're not going to like me. I did that project back in 1984 and it has nothing to do with samples of any kind. It uses the shift register of the 6522 to play perfect square waves of various frequencies.

If that thing is able to play samples, I have no clue how.
Be normal.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: Exactly how NOT to make a multicart for the C64

Post by groepaz »

If that thing is able to play samples, I have no clue how.
All that studying left out DAC and PWM? :shock:
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
MCeslapion
Vic 20 Newbie
Posts: 5
Joined: Wed Jul 01, 2020 9:31 am
Website: https://www.youtube.com/watch?v=JY1Fymr ... u.be&t=126
Location: Mars
Occupation: Clone

Re: Exactly how NOT to make a multicart for the C64

Post by MCeslapion »

groepaz wrote: Thu Jul 02, 2020 6:28 am
If that thing is able to play samples, I have no clue how.
All that studying left out DAC and PWM? :shock:
I think Eslapion should do the DAC and MCes does the PWM. I want my Mum and Dad to work together. I don't like it when they fight.
Accidentally created in a Martian military experiment.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Exactly how NOT to make a multicart for the C64

Post by eslapion »

groepaz wrote: Thu Jul 02, 2020 6:28 am All that studying left out DAC and PWM? :shock:
I know perfectly well of DAC and PWM - I used both to make a uC controlled variable speed fan for aeronautics.

There's just none of either in the 2 pages of the VIC-20 P.R.G. mentioned in that specific thread.

I also used DAC and PWM to make a pure sine wave 12Vdc to 120Vac converter.
Be normal.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: Exactly how NOT to make a multicart for the C64

Post by groepaz »

Yet you cant imagine how to play samples with a shift register? I see.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Exactly how NOT to make a multicart for the C64

Post by eslapion »

groepaz wrote: Thu Jul 02, 2020 3:57 pm Yet you cant imagine how to play samples with a shift register? I see.
You could use it as a 1bit DAC, I suppose.

But that's completely besides the point. The basic program proposed in the PRG has one function only, play square waves of various frequencies and it does it magnificently. Where that thread turned to samples and DAC, it was no longer about what the OP tried to discuss.
Be normal.
User avatar
joshuadenmark
Big Mover
Posts: 1218
Joined: Sat Oct 23, 2010 11:32 am
Location: Fr-Havn, Denmark
Occupation: Service engineer

Re: Exactly how NOT to make a multicart for the C64

Post by joshuadenmark »

Hi all

Please keep the debate friendly and constructive, do you even know how tiresome this is to follow?

In behalf of our community “please behave boys”.
Kind regards, Peter.
____________________________________________________
In need of a wiki logon - PM me
English Invader
Vic 20 Scientist
Posts: 1193
Joined: Tue Apr 28, 2009 3:51 pm

Re: Exactly how NOT to make a multicart for the C64

Post by English Invader »

joshuadenmark wrote: Fri Jul 03, 2020 1:36 am Please keep the debate friendly and constructive, do you even know how tiresome this is to follow?
No, because I haven't been following. I just switch off from topics that don't interest me and this one has been going around for years; gold plated connectors = good, non-gold plated connectors = bad. Got it.

eslapion is an old hand at making Commodore hardware accessories so I'll defer to his judgement on this one. My BB is still working fine after many years and he has nothing to prove here as far as I'm concerned. Case closed.
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Re: Exactly how NOT to make a multicart for the C64

Post by Vic20-Ian »

joshuadenmark wrote: Fri Jul 03, 2020 1:36 am Hi all

Please keep the debate friendly and constructive, do you even know how tiresome this is to follow?

In behalf of our community “please behave boys”.
Thanks for the more considerate moderation compared to the 20Q programming thread I was contributing to that was expunged in a digital version of Fahrenheit 451 with no warning :shock: :lol:
Last edited by Vic20-Ian on Sat Jul 04, 2020 7:41 am, edited 1 time in total.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
User avatar
MCeslapion
Vic 20 Newbie
Posts: 5
Joined: Wed Jul 01, 2020 9:31 am
Website: https://www.youtube.com/watch?v=JY1Fymr ... u.be&t=126
Location: Mars
Occupation: Clone

Re: Exactly how NOT to make a multicart for the C64

Post by MCeslapion »

English Invader wrote: Fri Jul 03, 2020 3:11 am eslapion is an old hand at making Commodore hardware accessories so I'll defer to his judgement on this one. My BB is still working fine after many years and he has nothing to prove here as far as I'm concerned. Case closed.
Yeah my Dad's pretty cool!
Accidentally created in a Martian military experiment.
User avatar
Noizer
Vic 20 Devotee
Posts: 297
Joined: Tue May 15, 2018 12:00 pm
Location: Europa

Re: Exactly how NOT to make a multicart for the C64

Post by Noizer »

eslapion wrote: Thu Jul 02, 2020 6:38 pm But that's completely besides the point. The basic program proposed in the PRG has one function only, play square waves of various frequencies and it does it magnificently. Where that thread turned to samples and DAC, it was no longer about what the OP tried to discuss.
That thread is titled "User Port Sound" so the discussion fits in that frame
Gyro Gearloose wrote: Wed Jul 01, 2020 5:36 pm ...
I remember using the MC1408 circuit to create a low frequency arbitrary signal generator. Using a few lines of BASIC I created a 256 byte table of values and I made the VIC cycle through it and output the values through the MC1408.

I also used this DAC to adjust the output voltage of a LM317 regulator. A few lines of BASIC to ask for the voltage and calculate the 8 bit value and I had a programmable power supply.
Very interesting, but have you ever tried doing these things in machine language rather than basic?
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
User avatar
Gyro Gearloose
Vic 20 Enthusiast
Posts: 174
Joined: Wed Sep 28, 2016 8:26 pm
Location: Montreal
Occupation: Drunk

Re: Exactly how NOT to make a multicart for the C64

Post by Gyro Gearloose »

Noizer wrote: Fri Jul 03, 2020 10:10 am Very interesting, but have you ever tried doing these things in machine language rather than basic?
It was 25 years ago but I definitely remember that the loop for the function generator was in ML, otherwise it would have been glacial.

For sure the code that created the table of values is much easier in BASIC.

I enjoyed making the stupidest formulas possible, like (SIN / TAN ^ 2 * COS / pi)

etc

Just to see what is the craziest waveform I could show on the oscilloscope. The novelty wore off quickly however. It was too slow.

Reading 256 values from RAM and sending them out, I guess, would be what, 4 cycles for a LDA, 4 cycles for a STA, so 1MHz/8 = 125000 I/Os per second, and 256 values for a full cycle would give about 490Hz as the maximum frequency, but I guess you could improve that by unrolling the loop and using immediate mode LDA # and save two cycles that way, but I don't think I did that. It's also hard to get rid of the blip when the CPU has to jump back to the beginning instead of sending out a byte. Not clean.

490Hz fits with my recollection. Of course you can increase the frequency by reducing the time resolution of the table, maybe fit 2 to 4 cycles in there.

The voltage regulator would not benefit in the slightest from ML, just calculating a value and POKEing it to get the voltage doesn't need speed. At all.

My teachers didn't know what to make of me with my hand-painted zebra-striped VIC-20, but the coursework never specified I had to use the school's computers... My stuff worked and I passed the courses.
Post Reply