Jump to content
IGNORED

Atari ST mouse as controller


MemberAtarian

Recommended Posts

Hi guys. I just realized this week that you can use the ST Mouse with the VCS and I was amazed, so I got one and started coded (I use bB). I disassembled the mouse, so I could figure out how it determinates movement of the ball.

 

So the joy0up and joy0down are the horizontal way of movement, so let's take the example. I understand that there is a rotation, for one way, it's 00 >> 01 >> 11 >>10 and 00 >> 10 >> 11 >> 01 for the other direction.

 

So I made my code:

if !joy0up && !joy0down && !a{0} && !a{1}  then a{0} = 0: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir
 if !joy0up && !joy0down && a{0} && !a{1}  then a{0} = 0: a{1} = 0: a{2} = 1  : goto Dir
 if !joy0up && !joy0down && !a{0} && a{1}  then a{0} = 0: a{1} = 0: a{3} = 1  : goto Dir

 if joy0up && !joy0down && a{0} && !a{1} then a{0} = 1: a{1} = 0: a{2} = 0 : a{3} = 0  : goto Dir
 if joy0up && !joy0down && a{0} && a{1} then a{0} = 1: a{1} = 0: a{2} = 1 : goto Dir
 if joy0up && !joy0down && !a{0} && !a{1} then a{0} = 1: a{1} = 0: a{3} = 1 : goto Dir

 if joy0up && joy0down && a{0} && a{1}  then a{0} = 1: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir
 if joy0up && joy0down && !a{0} && a{1} then a{0} = 1: a{1} = 1: a{2} = 1 : goto Dir
 if joy0up && joy0down && a{0} && !a{1} then a{0} = 1: a{1} = 1: a{3} = 1 : goto Dir

 if !joy0up && joy0down && !a{0} && a{1} then a{0} = 0: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir
 if !joy0up && joy0down && !a{0} && !a{1} then a{0} = 0: a{1} = 1: a{2} = 1 : goto Dir
 if !joy0up && joy0down && a{0} && a{1} then a{0} = 0: a{1} = 1: a{3} = 1 : goto Dir

Dir
 if player0x>15 &&  a{3} then player0x=player0x-1
 if player0x<138 && a{2} then player0x=player0x+1

So joy0up sets a{0} and joy0down set a{1}, if it's the same as it was in the previous turn, there is no movement, if it's changed, depending on that rotation, the cursor have to move. I would do the same with the vertical movement.
This could work, but it only does if you are really careful with moving the mouse, else, it nudges back and forth. Can you tell we what I should change?

 

  • Like 1
Link to comment
Share on other sites


  rem batari Basic Program
 rem created 2018.10.05. 20:28:39 by Visual bB Version 1.0.0.568
 set romsize=4k
 set tv = ntsc
 player0x=70: player0y=60
Arrow
 player0:
 %000110
 %101110
 %111100
 %111111
 %111110
 %111100
 %111000
 %110000
 %100000
end
 if player0x<15 then player0x=15
 if player0x>138 then player0x=138
 if player0y<10 then player0y=10
 if player0y>88 then player0y=88


SSSS
 if !joy0up && !joy0down  then goto Dir1
 if joy0up && !joy0down then goto Dir2
 if joy0up && joy0down then goto Dir3
 if !joy0up && joy0down then goto Dir4


Dir1
  if !a{0} && !a{1}  then a{0} = 0: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir
  if a{0} && !a{1}  then a{0} = 0: a{1} = 0: a{2} = 1 : a{3} = 0 : goto Dir
  if !a{0} && a{1}  then a{0} = 0: a{1} = 0: a{2} = 1 : a{3} = 1 : goto Dir
  if a{0} && a{1}  then a{0} = 0: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir
Dir2
 if a{0} && !a{1} then a{0} = 1: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir
 if a{0} && a{1} then a{0} = 1: a{1} = 0: a{2} = 1 : a{3} = 0 : goto Dir
 if !a{0} && !a{1} then a{0} = 1: a{1} = 0: a{2} = 1 : a{3} = 1 : goto Dir
 if !a{0} && a{1} then a{0} = 1: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir
Dir3


 if a{0} && a{1}  then a{0} = 1: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir
 if !a{0} && a{1} then a{0} = 1: a{1} = 1: a{2} = 1 : a{3} = 0 : goto Dir
 if a{0} && !a{1} then a{0} = 1: a{1} = 1: a{2} = 1 : a{3} = 1 : goto Dir
 if !a{0} && !a{1}  then a{0} = 1: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir
Dir4


 if !a{0} && a{1} then a{0} = 0: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir
 if !a{0} && !a{1} then a{0} = 0: a{1} = 1: a{2} = 1 : a{3} = 0 : goto Dir
 if a{0} && a{1} then a{0} = 0: a{1} = 1: a{2} = 1 : a{3} = 1 : goto Dir
 if a{0} && !a{1} then a{0} = 0: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir
Dir
 if player0x>16 &&  a{2} &&  a{3} then player0x=player0x-2
 if player0x<137 &&  a{2} &&  !a{3} then player0x=player0x+2


 if !joy0left && !joy0right  then goto Dir5
 if joy0left && !joy0right then goto Dir6
 if joy0left && joy0right then goto Dir7
 if !joy0left && joy0right then goto Dir8


Dir5
  if !a{4} && !a{5}  then a{4} = 0: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX
  if a{4} && !a{5}  then a{4} = 0: a{5} = 0: a{6} = 1 : a{7} = 0 : goto DirX
  if !a{4} && a{5}  then a{4} = 0: a{5} = 0: a{6} = 1 : a{7} = 1 : goto DirX
  if a{4} && a{5}  then a{4} = 0: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX
Dir6
 if a{4} && !a{5} then a{4} = 1: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX
 if a{4} && a{5} then a{4} = 1: a{5} = 0: a{6} = 1 : a{7} = 0 : goto DirX
 if !a{4} && !a{5} then a{4} = 1: a{5} = 0: a{6} = 1 : a{7} = 1 : goto DirX
 if !a{4} && a{5} then a{4} = 1: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX
Dir7


 if a{4} && a{5}  then a{4} = 1: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX
 if !a{4} && a{5} then a{4} = 1: a{5} = 1: a{6} = 1 : a{7} = 0 : goto DirX
 if a{4} && !a{5} then a{4} = 1: a{5} = 1: a{6} = 1 : a{7} = 1 : goto DirX
 if !a{4} && !a{5}  then a{4} = 1: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX
Dir8


 if !a{4} && a{5} then a{4} = 0: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX
 if !a{4} && !a{5} then a{4} = 0: a{5} = 1: a{6} = 1 : a{7} = 0 : goto DirX
 if a{4} && a{5} then a{4} = 0: a{5} = 1: a{6} = 1 : a{7} = 1 : goto DirX
 if a{4} && !a{5} then a{4} = 0: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX
DirX
 if player0y>11 &&  a{6} &&  a{7} then player0y=player0y-2
 if player0y<87 &&  a{6} &&  !a{7} then player0y=player0y+2






 if joy0fire then COLUBK=$1e: COLUP0=$00 else COLUBK=$80: COLUP0=$0e
 if b{0} then return
 PF0=%11111111
 b{0} =1
 drawscreen
 b{0} =0
 goto Arrow


 vblank
 goto SSSS

Okay, I scan the mouse in vblank as well, now it's a lot better! The only problem I can't do it during drawscreen without hacking the kernel assembly.

 

Edited by MemberAtarian
  • Like 4
Link to comment
Share on other sites

Playing Missile Command would be interesting with a mouse. Also, have you thought about trying a PC mouse with a PC to ST adapter?

 

If you do a search on the forum, you'll see both of these have been done, plus a lot more. Not being snotty, just no time to hunt down links tonight. right now.

Link to comment
Share on other sites

 

ok

http://atariage.com/forums/topic/243453-atari-2600-trak-ball-games/?fromsearch=1

 

I guess it is a little confusing because, for some historical reasons, TB and cx80 may refer to the ST mouse and a small number of cx80s while TB and cx22 may refer to the standard cx22 and most cx80 trackballs.

 

You can find info about the TOM2 usb to Atari adapter by searching TOM2 in the overall 2600 forum.

 

Im not sure I would recommend the Tom2 it seemed to have some issues for multiple people, especially with firmware updates, that made some controllers unusable, although I dont think they affected mouse operation.

Link to comment
Share on other sites

 

ok

 

Sorry, major pain when you only have your phone. Now I have the computer. Actually try here for the TOM2 with usb mouse:

 

http://atariage.com/forums/topic/271113-tom-rev2-usb-to-db9-converter-review-for-xegs-800xl-2600-and-7800/?p=3870385

 

and here, for its updating issues:

http://atariage.com/forums/topic/268147-use-usb-gamepad-on-atari-2600/page-2?hl=%2Btom2&do=findComment&comment=3873032

 

There are a couple others, the Rhys MkII from the Amigastore, and Retrofun, Retrocable on eBay. There also another one on eBay from Norway.

https://www.ebay.com/itm/Amiga-Atari-PS2-mouse-Adapter-USB-version/263927878152?hash=item3d7353d208:g:uPwAAOSwY3tbTdIH:rk:6:pf:0

and Greece:

https://www.ebay.com/itm/Amiga-usb-PS-2-mouse-adapter/153210575505?hash=item23ac0fda91:g:Ki4AAOSwi3ta4ZOW:rk:6:pf:0

 

I'm not sure how any of these stack up.

 

The nice thing about the TOM+, although it may have the same issues as the TOM2, is that you can switch between mouse and joystick without unplugging them.

Link to comment
Share on other sites

 

ok

 

 

http://atariage.com/forums/topic/243453-atari-2600-trak-ball-games/?fromsearch=1

 

I guess it is a little confusing because, for some historical reasons, TB and cx80 may refer to the ST mouse and a small number of cx80s while TB and cx22 may refer to the standard cx22 and most cx80 trackballs.

 

You can find info about the TOM2 usb to Atari adapter by searching TOM2 in the overall 2600 forum.

 

Im not sure I would recommend the Tom2 it seemed to have some issues for multiple people, especially with firmware updates, that made some controllers unusable, although I dont think they affected mouse operation.

BTW, the zip files just say TB on them, but they have hacks for cx22/80, ST mouse (as CX80) and Amiga mouse in the zip file. Way back when, when Stella or Stelladaptor was first being set up, the designer had a cx80 that was modified to behave as an ST mouse. Thinking this was the norm, this ST mouse configuration became know as "cx80" in Stella, the Stella-daptor and, for consistency, I suppose, the 2600-daptor. Quite a few cx80's, although a small percentage overall, had been modified to act like ST mice in the 80s and 90s at some uncertain point in the manufacturing/retail/customer continuum. Apparently, in some regions of Europe, cx80s modified to act like ST mice were the norm.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...