1351 mouse and the VIC20

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

1351 mouse and the VIC20

Groepaz
hy!

i am currently trying to somehow make a mouse work on the vic20, and while
doing that i wondered why a 1351 would not work _at all_ - ie the paddle
values would not change at all. that indicates that the ADC in the VIC works
fundamently differently to what the SID does - does anyone have an idea what
exactly that would be?

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

History, I believe, furnishes no example of a priest-ridden people maintaining
a free civil government. This marks the lowest grade of ignorance of which
their civil as well as religious leaders will always avail themselves for
their own purposes.
<Thomas Jefferson>



       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Jim Brain
On 4/26/2017 9:46 PM, [hidden email] wrote:
hy!

i am currently trying to somehow make a mouse work on the vic20, and while 
doing that i wondered why a 1351 would not work _at all_ - ie the paddle 
values would not change at all. that indicates that the ADC in the VIC works 
fundamently differently to what the SID does - does anyone have an idea what 
exactly that would be?


I remember working on my PSXJoy AVR code to support the VIC-20, and as I recall, the VIC-I uses a 1024 cycle sampling period, but I believe it only counts for 256 cycles.

Jim



-- 
Jim Brain
[hidden email] 
www.jbrain.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Groepaz
On Thursday 27 April 2017, 00:11:18 Jim Brain <[hidden email]> wrote:

> On 4/26/2017 9:46 PM, [hidden email] wrote:
> > hy!
> >
> > i am currently trying to somehow make a mouse work on the vic20, and while
> > doing that i wondered why a 1351 would not work _at all_ - ie the paddle
> > values would not change at all. that indicates that the ADC in the VIC
> > works fundamently differently to what the SID does - does anyone have an
> > idea what exactly that would be?
>
> I remember working on my PSXJoy AVR code to support the VIC-20, and as I
> recall, the VIC-I uses a 1024 cycle sampling period, but I believe it
> only counts for 256 cycles.

mmmh there must be something else that is different - if that'd be the only
difference the 1351 should still produce *some* values, right?

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

Of course, what I really want is total world domination.
<Linus Torvalds>



       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Jim Brain
On 4/27/2017 1:02 AM, [hidden email] wrote:

mmmh there must be something else that is different - if that'd be the only 
difference the 1351 should still produce *some* values, right?


Since I didn't want to promote bad information, I fired up the scope.

It looks like it uses the same 512 cycles (506uS per ADC cycle, according to my NTSC VIC-20), but holds the line low only for 64uS, and then releases the line for the remaining 448uS.

The 64, on the other hand, drags the line low for 256 cycles, and then releases it for 256 cycles.

The mouse operates by taking the value it wishes to send, adds 256 to it, waits for that falling edge of POTX, waits that many 1uS cycles, and then pulls the line high.  Lather, rinse, repeat.

The ADC has to start sampling the comparator immediately after it releases the line.    Assuming the VIC samples 256 cycles, it must sample from 64uS to 319uS, while the 64 samples from 256 to 511uS.  Of the 64 256-511uS, the 1351 only starts pulling the line hi at 256+64uS = 320uS. Thus, the 1351 never pulls the line high at any time the VIC-20 ADCs are scanning the line. 

Reference: http://www.zimmers.net/anonftp/pub/cbm/documents/projects/interfaces/mouse/Mouse.html

Jim


-- 
Jim Brain
[hidden email] 
www.jbrain.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Groepaz
On Thursday 27 April 2017, 01:46:35 Jim Brain <[hidden email]> wrote:

> On 4/27/2017 1:02 AM, [hidden email] wrote:
> > mmmh there must be something else that is different - if that'd be the
> > only
> > difference the 1351 should still produce *some* values, right?
>
> Since I didn't want to promote bad information, I fired up the scope.
>
> It looks like it uses the same 512 cycles (506uS per ADC cycle,
> according to my NTSC VIC-20), but holds the line low only for 64uS, and
> then releases the line for the remaining 448uS.
>
> The 64, on the other hand, drags the line low for 256 cycles, and then
> releases it for 256 cycles.
>
> The mouse operates by taking the value it wishes to send, adds 256 to
> it, waits for that falling edge of POTX, waits that many 1uS cycles, and
> then pulls the line high.  Lather, rinse, repeat.
>
> The ADC has to start sampling the comparator immediately after it
> releases the line.    Assuming the VIC samples 256 cycles, it must
> sample from 64uS to 319uS, while the 64 samples from 256 to 511uS.  Of
> the 64 256-511uS, the 1351 only starts pulling the line hi at 256+64uS =
> 320uS. Thus, the 1351 never pulls the line high at any time the VIC-20
> ADCs are scanning the line.

aaah i see. that makes sense. thank you!

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

Usability:Simplify the Solution  Design:Simplify the Problem



       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Torsten Kracke
You can use an Amiga-mouse on the VIC20 though, see here:

http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?p=56063#p56063

Am 27.04.2017 um 12:15 schrieb [hidden email]:

> On Thursday 27 April 2017, 01:46:35 Jim Brain <[hidden email]> wrote:
>> On 4/27/2017 1:02 AM, [hidden email] wrote:
>>> mmmh there must be something else that is different - if that'd be the
>>> only
>>> difference the 1351 should still produce *some* values, right?
>>
>> Since I didn't want to promote bad information, I fired up the scope.
>>
>> It looks like it uses the same 512 cycles (506uS per ADC cycle,
>> according to my NTSC VIC-20), but holds the line low only for 64uS, and
>> then releases the line for the remaining 448uS.
>>
>> The 64, on the other hand, drags the line low for 256 cycles, and then
>> releases it for 256 cycles.
>>
>> The mouse operates by taking the value it wishes to send, adds 256 to
>> it, waits for that falling edge of POTX, waits that many 1uS cycles, and
>> then pulls the line high.  Lather, rinse, repeat.
>>
>> The ADC has to start sampling the comparator immediately after it
>> releases the line.    Assuming the VIC samples 256 cycles, it must
>> sample from 64uS to 319uS, while the 64 samples from 256 to 511uS.  Of
>> the 64 256-511uS, the 1351 only starts pulling the line hi at 256+64uS =
>> 320uS. Thus, the 1351 never pulls the line high at any time the VIC-20
>> ADCs are scanning the line.
>
> aaah i see. that makes sense. thank you!
>

       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Groepaz
On Thursday 27 April 2017, 12:31:49 Torsten Kracke <[hidden email]> wrote:
> You can use an Amiga-mouse on the VIC20 though, see here:
>
> http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?p=56063#p56063

i know - but thats not very attractive due to the very high CPU load.

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

Wenn einer mit Vergnügen zu einer Musik in Reih und Glied marschieren kann,
dann verachte ich ihn schon; er hat sein großes Gehirn nur aus Irrtum
bekommen, da für ihn das Rückenmark schon völlig genügen würde. Diesen
Schandfleck der Zivilisation sollte man so schnell wie möglich zum
Verschwinden bringen, Heldentum auf Kommando, sinnlose Gewalt und die leidige
Vaterländerei, wie glühend hasse ich sie, wie gemein und verächtlich erscheint
mir der Krieg; ich möchte mich lieber in Stücke schlagen lassen, als mich an
einem so elenden Tun beteiligen! Töten im Krieg ist nach meiner Auffassung um
nichts besser, als gewöhnlicher Mord.
<Albert Einstein>



       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

traymond
Can you put the 1351 in Joystick mode for use on a VIC-20?
But the way I understand that even that mode wouldn't work on a VIC-20
as you mentioned because of the POT X in the SID.
I think I saw a video on utube where a guy was using the 1351 in joystick mode plugged into 
An Atari 2600?

Terry Raymond

On Apr 27, 2017 4:55 AM, <[hidden email]> wrote:
On Thursday 27 April 2017, 12:31:49 Torsten Kracke <[hidden email]> wrote:
> You can use an Amiga-mouse on the VIC20 though, see here:
>
> http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?p=56063#p56063

i know - but thats not very attractive due to the very high CPU load.

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

Wenn einer mit Vergnügen zu einer Musik in Reih und Glied marschieren kann,
dann verachte ich ihn schon; er hat sein großes Gehirn nur aus Irrtum
bekommen, da für ihn das Rückenmark schon völlig genügen würde. Diesen
Schandfleck der Zivilisation sollte man so schnell wie möglich zum
Verschwinden bringen, Heldentum auf Kommando, sinnlose Gewalt und die leidige
Vaterländerei, wie glühend hasse ich sie, wie gemein und verächtlich erscheint
mir der Krieg; ich möchte mich lieber in Stücke schlagen lassen, als mich an
einem so elenden Tun beteiligen! Töten im Krieg ist nach meiner Auffassung um
nichts besser, als gewöhnlicher Mord.
<Albert Einstein>



       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Jim Brain
On 4/27/2017 12:41 PM, Terry Raymond wrote:
> Can you put the 1351 in Joystick mode for use on a VIC-20?
I see no reason why not, but go ahead and try it.

Jim


       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

traymond
Hey Jim I was only trying to add to the conversation excuse me!!!!!!!

On Apr 27, 2017 11:51 AM, "Jim Brain" <[hidden email]> wrote:
On 4/27/2017 12:41 PM, Terry Raymond wrote:
Can you put the 1351 in Joystick mode for use on a VIC-20?
I see no reason why not, but go ahead and try it.

Jim


      Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 1351 mouse and the VIC20

Groepaz
In reply to this post by traymond
On Thursday 27 April 2017, 11:41:13 Terry Raymond <[hidden email]>
wrote:
> Can you put the 1351 in Joystick mode for use on a VIC-20?

sure, that works fine

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

...the harm was done: the topic became known as "computer science"---which,
actually, is like referring to surgery as "knife science"---and it was firmly
implanted in people's minds that computing science is about machines and their
peripheral equipment.
<Edsgar Dijkstra>



       Message was sent through the cbm-hackers mailing list
Loading...