Paddle Games

Discussion, Reviews & High-scores

Moderator: Moderators

groepaz
Vic 20 Nerd
Posts: 597
Joined: Wed Aug 25, 2010 5:30 pm

Re: Paddle Games

Postby groepaz » Wed Nov 15, 2017 5:59 pm

If it was going to do anything at all, it would be there.

if only :)

[I think I got it... So you generate the charge sequences locally with a crystal of some sort? Thereby, bypassing the VIC entirely, except to tell it when something happened!]

what the circuit needs to do is first "look" at the POT line until its pulled low, this is the start of the sample period. then you need a (variable) counter that waits a bit (max the equivalent of 512 cycles) and then pull the line to VCC until the sample period is over (512 cycles since it was pulled low). then release the line, and repeat. see eg here - it works exactly the same on the vic20 (except with slightly different timing intervals) not sure if i would bother working it out without a microcontroller, a small micro that can do it costs almost nothing and makes the whole thing very easy :)

Forbidden64
Vic 20 Hobbyist
Posts: 109
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re: Paddle Games

Postby Forbidden64 » Wed Nov 15, 2017 6:42 pm

groepaz wrote:
If it was going to do anything at all, it would be there.


if only :)


I'm still not convinced this won't work at all...it hasn't even been tried yet. I am seriously getting a pair of paddles next week.[edit: I AM NOW!]

[I think I got it... So you generate the charge sequences locally with a crystal of some sort? Thereby, bypassing the VIC entirely, except to tell it when something happened!]


groepaz wrote:
what the circuit needs to do is first "look" at the POT line until its pulled low, this is the start of the sample period. then you need a (variable) counter that waits a bit (max the equivalent of 512 cycles) and then pull the line to VCC until the sample period is over (512 cycles since it was pulled low). then release the line, and repeat. see eg here - it works exactly the same on the vic20 (except with slightly different timing intervals) not sure if i would bother working it out without a microcontroller, a small micro that can do it costs almost nothing and makes the whole thing very easy :)


The problem is exactly the same if you use a micro or not. I don't see the difference, except one you need a chip programmer, and to write a program, and one method you don't need anything but some veroboard and a soldering iron. Seems like a no brainer to me! If you have all that stuff already set up for making micro controller programs, and for the program transfer...then sure I'd agree... an [ATTINY13a] for example would be a prime candidate. it's only 8 pins and has a 1mhz internal, or optional external clock up to 20mhz. It's also around 2$...at least when I bought them. Unfortunately, all my real goodies are in storage due to financial problems.
Last edited by Forbidden64 on Thu Nov 16, 2017 7:43 pm, edited 1 time in total.

Forbidden64
Vic 20 Hobbyist
Posts: 109
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re: Paddle Games

Postby Forbidden64 » Wed Nov 15, 2017 8:15 pm

I just checked UTsource, and the ATTINY13a is running for around 45-60 cents! Depending if you want SOP or DIP packaging. Still, that is freaking cheap! It's got way more ability than this type of project would need as well. If memory serves, it also has a permanent burn in option. You have to order 10 though, minimum, and then pay 4$ shipping. So all told it would be around 9 or 10$. Then throw in a nice eprom programmer, and you're set! I guess which route you would take is dictated by what you already have on hand, as well as what you prefer. for something as simple as this, I would think a few TTLs are fine. you can buy them by the bag full on jameco.com

https://www.jameco.com/shop/StoreCatalo ... =jamecoall

I got one of these bags a while back...at the same time I got those Atmels. My reasoning was that there are some projects that lend themselves well to compartmentalized task specific logic functions, and there are others which could more easily be handled by a program...and since I was brand new to electronics, I figured getting practice at both would be handy. I stand by that. Even modern phones use SOP or SMD package 74Fxx components for various things. They are tiny in comparison to ye ol' DIP chips, but they do the same thing. DIP packages are still the easiest for hobby mock ups and minimal equipment/time/learning curve/cost investment for projects such as these. It is simply easier to put together a mock circuit and have it running in a small period of time/make changes in real time. Anyway, at 9 cents each 7400s are a bargain. I believe I even got mine for 30$ for a bag of 300 or so.

eslapion
ultimate expander
Posts: 4330
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Paddle Games

Postby eslapion » Wed Nov 15, 2017 8:36 pm

Forbidden64 wrote:
groepaz wrote:what the circuit needs to do is first "look" at the POT line until its pulled low, this is the start of the sample period. then you need a (variable) counter that waits a bit (max the equivalent of 512 cycles) and then pull the line to VCC until the sample period is over (512 cycles since it was pulled low). then release the line, and repeat. see eg here - it works exactly the same on the vic20 (except with slightly different timing intervals) not sure if i would bother working it out without a microcontroller, a small micro that can do it costs almost nothing and makes the whole thing very easy :)


The problem is exactly the same if you use a micro or not. I don't see the difference, except one you need a chip programmer, and to write a program, and one method you don't need anything but some veroboard and a soldering iron. Seems like a no brainer to me! If you have all that stuff already set up for making micro controller programs, and for the program transfer...then sure I'd agree... an [ATTINY13a] for example would be a prime candidate. it's only 8 pins and has a 1mhz internal, or optional external clock up to 20mhz. It's also around 2$...at least when I bought them. Unfortunately, all my real goodies are in storage due to financial problems.

In that project, the uController is required because of the PS/2 mouse protocol.

In reality, creating new 'paddles' doesn't need to involve the technical hurdles of programming a controller. A bunch of simple logic ICs can do the job if you're replacing the original paddle system with an ADC. You just compare the output of an 8bit ADC which reads the paddle in a good old voltage divider config to the number of pulses counted by a pair of 74_161 or 74_163...
No one can do everything. Everyone can do something.

Forbidden64
Vic 20 Hobbyist
Posts: 109
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re: Paddle Games

Postby Forbidden64 » Wed Nov 15, 2017 9:43 pm

@Eslapion
In that project, the uController is required because of the PS/2 mouse protocol.


Well, I was merely addressing this trend I see of people using micro controllers for literally everything! Even when it is counter intuitive or completely overkill. Kind of like people who use a Rasberry Pi B to control a doorlatch with IOT. I quite agree, this is not really a case for a micro controller...unless that is this persons only method of problem solving, and they are uncomfortable with other methods. In which case, hey, it's their design decision, not mine.

In short, I think for some, they are so comfortable with doing uCs that they are adverse to using TTL or CMOS solutions...even when they make more sense. I don't really like it, but it ensures that 7400's are cheaper for me since there is less demand :D. In fact, where I live, all electronics hobby courses focus almost solely on arduino and/or RPi and its family of packaged solutions/break out boards. Almost no attention is given to just using common TTL/CMOS logic gates to do everyday tasks. To me that is crazy sauce.

eslapion
ultimate expander
Posts: 4330
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Paddle Games

Postby eslapion » Wed Nov 15, 2017 11:12 pm

@Forbidden64
I just remembered my original 'clean' paddle was a variation on a PWM which is even simpler...
No one can do everything. Everyone can do something.

Forbidden64
Vic 20 Hobbyist
Posts: 109
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re: Paddle Games

Postby Forbidden64 » Thu Nov 16, 2017 6:49 am

eslapion wrote:@Forbidden64
I just remembered my original 'clean' paddle was a variation on a PWM which is even simpler...


Ooohhhh interesting! Then I hope there's a 555/556 timer in there somewhere! That would make my day! :idea:

eslapion
ultimate expander
Posts: 4330
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Paddle Games

Postby eslapion » Thu Nov 16, 2017 8:52 am

Forbidden64 wrote:
eslapion wrote:@Forbidden64
I just remembered my original 'clean' paddle was a variation on a PWM which is even simpler...


Ooohhhh interesting! Then I hope there's a 555/556 timer in there somewhere! That would make my day! :idea:

Nope. I used an op-amp configured as a relaxation oscillator to generate a triangle wave which had a frequency very close to the paddle reset rate of the NTSC VIC-20 then compared the value of the triangle wave with the voltage resulting of using the paddle as a voltage divider instead of a current limiter charging a capacitor.

The circuit was designed to sync itself to the paddle capacitor resetting triggered by the VIC-I.

Honestly, I have no clue how you could use a 555 in a PWM process. All PWM controllers I know use op-amps or comparators.
No one can do everything. Everyone can do something.

User avatar
tokra
Vic 20 Nerd
Posts: 816
Joined: Tue Apr 27, 2010 5:32 pm
Location: Germany

Re: Paddle Games

Postby tokra » Thu Nov 16, 2017 1:10 pm

groepaz wrote:gave it a quick try, cap in parallel to the paddle certainly has some interesting side effects - but it doesnt solve this problem :=)

Thanks for checking, since I'm a noob with soldering and hardware-hacking, I was going to wait until the next "Connected"-party near Hamburg to ask the local guys to try this out on my VIC-20. Looks like there's no need to now.
that said... the jitter is quite terrible, i didnt remember it being THAT bad :=)

Yeah, same here, while it was a little jittery in the 80s, I don't think it was THAT jittery compared to 2010, when I tried it again.
Hopefully some workable solution can be found in this thread. :D

eslapion
ultimate expander
Posts: 4330
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Paddle Games

Postby eslapion » Thu Nov 16, 2017 3:43 pm

groepaz wrote:gave it a quick try, cap in parallel to the paddle certainly has some interesting side effects - but it doesnt solve this problem :=)

Since the paddle system of the VIC-20/C64 operates by checking how many pulses can charge a capacitor to a certain voltage level, what this is going to do is make all the values restricted to a specific narrower angle width of rotation on the paddle.
No one can do everything. Everyone can do something.

Forbidden64
Vic 20 Hobbyist
Posts: 109
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re: Paddle Games

Postby Forbidden64 » Thu Nov 16, 2017 3:49 pm

@eslapion
well, supposedly, you just hook it up in a monostable configuration. When trigger is low, output is high until the cap is fully charged, then it goes low.
So you can toy with it at different C and R values at pin 7.

Now, I'm not sure what your plan is here, but a 555 timer for pwm is a cool option I thought. Here is a link showing how the monostable 555 pwm is wired and what pins act as what in the circuit. They are using it for a motor control in this application, but it can be used for other PWM applications they claim as well.

In any case, hopefully you remember your perfect paddle system from back at school! Channel your inner bored student! :D

http://www.brighthubengineering.com/diy ... -555-ics/#

[It sounds like you already are starting to remember, and it is much simpler than the 555 solution.]
Last edited by Forbidden64 on Thu Nov 16, 2017 6:12 pm, edited 1 time in total.

Forbidden64
Vic 20 Hobbyist
Posts: 109
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re: Paddle Games

Postby Forbidden64 » Thu Nov 16, 2017 4:34 pm

eslapion wrote:
groepaz wrote:gave it a quick try, cap in parallel to the paddle certainly has some interesting side effects - but it doesnt solve this problem :=)

Since the paddle system of the VIC-20/C64 operates by checking how many pulses can charge a capacitor to a certain voltage level, what this is going to do is make all the values restricted to a specific narrower angle width of rotation on the paddle.


hmm, yes in theory, but remembering that these capacitors have such a small charge limit, that I don't think it will be nearly the affect your thinking here. Imagine a 104nF pot to control a set of paddles...[Don't worry, read the edit below]

[I believe I may have had some misunderstanding of this entirely, actually. I just went to look at this:
http://vintagegamingandmore.com/atari-p ... -cleaning/

There is no cap internal to the paddle. just a button and a pot with 4 wires. The capacitor then, I should guess is on the circuit board itself, and the resistance of the paddles limits the rate of charge. As such, I can only assume that the pot itself is at fault[another edit: its not, since it dances like a chihuahua even when your standing across the room.] I should be able to just build a set of new paddles and test that on there. What would be the effect of using a smaller resistance value pot, and a larger capacitor value? I guess I can test that too. Time to open up a VIC!]

[Okay, so now I feel like a total moron lol. I just looked at the schematic, and confirmed C14 on my motherboard, that indeed, a z104pF cap is in fact the only capacitor between the control port and the VIC I chip. I triple checked the schematic. Then I went back again. Yes, only one tiny cap 0.001uF 50V, C14 is the POT x, and C13, is the same value for POT y. So my solution definitely will not work at all...and will cause totally weird outputs in the games. I had assumed incorrectly that the value would be thousands of times larger. Imagine my shock when I saw that!]
Last edited by Forbidden64 on Thu Nov 16, 2017 7:58 pm, edited 3 times in total.

groepaz
Vic 20 Nerd
Posts: 597
Joined: Wed Aug 25, 2010 5:30 pm

Re: Paddle Games

Postby groepaz » Thu Nov 16, 2017 5:58 pm

As such, I can only assume that the pot itself is at fault.

no. that article talks about the jitter you get from dirty potentiometers *when turning* them. thats an entirely different problem. the same paddles that give crazy jitter here (when *not* turning them) on the vic20 give pretty stable values (with more or less random LSB, but thats normal) on the C64.

Forbidden64
Vic 20 Hobbyist
Posts: 109
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re: Paddle Games

Postby Forbidden64 » Thu Nov 16, 2017 6:01 pm

groepaz wrote:
As such, I can only assume that the pot itself is at fault.

no. that article talks about the jitter you get from dirty potentiometers *when turning* them. thats an entirely different problem. the same paddles that give crazy jitter here (when *not* turning them) on the vic20 give pretty stable values (with more or less random LSB, but that's normal) on the C64.


I really should stop making assumptions then... Anyway, I went back and edited my comment, and now I guess I'll edit it again.

So, we are left with eslapion's voltage dividing triangle wave wizardry PWM solution as the best circuit solution, or a micro controller solution.

eslapion
ultimate expander
Posts: 4330
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Paddle Games

Postby eslapion » Thu Nov 16, 2017 10:45 pm

groepaz wrote:... the same paddles that give crazy jitter here (when *not* turning them) on the vic20 give pretty stable values (with more or less random LSB, but thats normal) on the C64.

... because the C64 uses the SID to check paddle values and it has a much more stable internal reference voltage.
No one can do everything. Everyone can do something.


Return to “Games”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest