Welcome, Guest. Please login or register.


Author Topic: EnterMice (Joy & PS/2 mouse interface) (Read 235063 times)

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #165 on: 2015.August.20. 21:14:21 »
In this case it is sufficient to remap the connections in the PLD.
It remains to support the multiplexing of signals from the controller Sega. It can be done in software.

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #166 on: 2015.August.20. 21:40:13 »
Quote
In this case it is sufficient to remap the connections in the PLD.
It remains to support the multiplexing of signals from the controller Sega. It can be done in software.

So, let see, whether I understand well ...


That would be possible (with software), the device would have "input modes", switching with the switches, or switching with replacing the whole (or part) of it's firmware,

and these input modes would be like "commodore/atari", "sega megadrive", "NES", etc,
and these "modes" would give a meaning to the given d-sub on the EnterMice,

for example "commodore/atari" would mean a standard c64 joy pinout and protocoll (and in this case there is no need any other converter cable between the EnterMice and the c64 joy),

and "sega megadrive" mode would mean a megadrive controller protocol on a pinout declared by the firmware of the EnterMice ... and in this case, we would have to use an other pinout converter cable between the EnterMice and the megadrive controller ...

It would be so great !
Because the most joys are c64/atari type ones, and those would not require other cables,
but if someone would like to use controllers with many buttons and not c64/atari type ones,
it would be easy too, because only require a cable which consists of only standard parts from the shops.


If I understand well ... I can barely wait to use this ... :)
Z80 System

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #167 on: 2015.August.20. 21:45:03 »
EnterMice has two joystick ports. One may works in Atari mode, second may be configured to a Sega controller.
Of course, in the latter case through the "twister-cable".
« Last Edit: 2015.August.20. 21:48:13 by pear »

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #168 on: 2015.August.20. 22:02:33 »
Quote
EnterMice has two joystick ports. One may works in Atari mode, second may be configured to a Sega controller.

Would it be configured by you, burned to the fw only once,
or would it be switchable by the user ?

So the limitation to only one of the joysticks probably would not be a problem, but the static behaviour maybe would ...

For example, I have a joystick like this:

joypic
NINTENDO NES CONTROLLER NI MEGASTAR SV-333

It's a 4 button joystick, and it has the NES pinout/protocoll:

http://www.mit.edu/~tarvizo/nes-controller.html
http://pinoutsguide.com/Game/snescontroller_pinout.shtml




So the mode of the custom joy port of EnterMice should be switchabe ... harder or easier, but switchable by the user ...
Z80 System

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #169 on: 2015.August.20. 23:28:18 »
Reading this web :

http://www.cs.cmu.edu/~chuck/infopg/segasix.txt

You can make an easy bridge cable that allows read all the buttons, use  Rts on the Serial port, as the Boxsoft and Entermice do, for emulate the Select signal.

But you must create the software to read it,  a game for it or convert an old one.... Even you can expand the mouse driver to read it in EXOS if you like..



 The real target of the present project was mouse connection. Standard joystick ports came later as a benefit of the necessity of correcting the signals of the Enterprise unusual control ports, just as the Boxsoft did. There are planned three buttons on each joystick port so you can directly hack a joystick. But you still need an Enterprise game that can read more than one fire button.
« Last Edit: 2015.August.20. 23:41:06 by gflorez »

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #170 on: 2015.August.20. 23:53:12 »
Quote
The real target of the present project was mouse connection.

Yes, of course, mouse is the most important feature of the EnterMice.

My questions were only targeting what will be possible above the mouse + 2 x c64/atari joy,
after that I saw the photos of the card, and realized how complex (seems to me) thing it will be ...

Quote
There are planned three buttons on each joystick port so you can directly hack a joystick.

Yes, I can hack my joysticks even directly to the enterprise,
but these joysticks usually can do more things (auto fire, electronic direction mapping with switches, and such ...),
so if I want not only "switches" but the whole electronic functionality of the joysticks,
in that case the "rewiring" of the joystick is not a trivial thing for sure.

So if this thing could solve the problem without hacking the joys (controllers), that would be cool.

Quote
But you still need an Enterprise game that can read more than a fire button.

Yes, I thought of games like batman and head over heels and such ...
These have multiple action functions and can configure the controls by wish ...
Probably noone tried those games with joysticks with multiple buttons,
but these scan ext1 and ext2 correctly at configuration,
and I hope they scan and handle all of the inputs of the EP ...

Moreover I have plans with multiple buttons, too.
« Last Edit: 2015.August.21. 00:08:12 by Z80System »
Z80 System

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #171 on: 2015.August.21. 00:13:51 »
I think is better to modify your Arduino keyboard project to  assign the auxiliary keyboard keys on a game, to a button on a joystick. Almost every game have an internal joystick mode. Space is Fire1, but as you say, some programs or games need more buttons that are assigned to a key.

You can do an Arduino script to assign the convenient keys to the spare fire buttons before playing a game.

--------

The real posibilities of the controler ports have been undocumented, so I doubt  that  a game or programm scanned that hidden buttons. The only one was the Boxsoft driver.
« Last Edit: 2015.August.21. 00:28:31 by gflorez »

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #172 on: 2015.August.21. 00:51:04 »
Autofire inside a standard  joystick will work because now the common  of the buttons will be ground.

Entermice is above all simplicity, it is highly complex  inside but  will have almost "plug&play" use.….

It is targeted to all users, not only to technicians.

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #173 on: 2015.August.21. 06:22:47 »
The real target of the present project was mouse connection. Standard joystick ports came later as a benefit of the necessity of correcting the signals of the Enterprise unusual control ports, just as the Boxsoft did. There are planned three buttons on each joystick port so you can directly hack a joystick. But you still need an Enterprise game that can read more than one fire button.
You're right. We should not depart from the basic requirements.
But the new ideas should save it for later.
On next time.

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #174 on: 2015.August.23. 12:46:01 »
The first tests.
The main thing - EP survived connection with EnterMice ;)
Mechanically, the interface is held firmly in place. It is even better than I expected (video).
When you try to pull the plug from the port Joy2, slid out the RS-423. But nothing happened, the computer does not hang neither not restarted (see the second video).
Lines K and L are flying, because there is no MCU in socket and there is no fixed condition.
Something is still wrong with the port Joy2 towards the "right". Somewhere is an error in the PLD matrix, or is also influenced by the absence of the MCU. I have to check it out.
Access to the reset button is not hindered.
The printer port remains available :)
« Last Edit: 2015.August.23. 13:53:52 by pear »

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #175 on: 2015.August.23. 13:35:34 »
Looks and sounds cool!


And probably you already thought of these, and there are reasons of the current form of the EnterMice (for example, price, producing speed, etc.),
but if there will be a next iteration of this card, probably would be good:

- the printer port would be taken by the EnterMice as well, but there would be a more "standard" socket for the printer connector on EnterMice, just like in the case of the joysticks. standard means here "we can buy at shops". It would be a connector converter only, saving the user to bother with edge connectors when using the printer port.

- the size of the panel would not be higher than the EP itself ... probably this vertical layout is better than the horizontal one would be (smaller place taking), but it depends on the user's wish. maybe a sandwitch like layout, with (for example) two panels could achive both: to be equal in heght to the EP and not so much place taking behind the EP.

- PS/2 connector would stand in a direction like joy connectors stands ... for the "uniformity" and leaving the reset button absolutely free.

- maybe one dedicated connector for serial too, maybe with a switch disconnecting the mouse function from that.

- all of this is in a block like casing, passing only a box to the backside of the EP ... :)


Okay, do not hate me, please ! I promise I will like EnterMice in this form in what it currenty exists, too. :)

But dreaming is good ... :)

On the hungarian side, nowdays, I always cry for a hardware snapshot device.
I would like it (to be existing) to save the current state of the EP hw (memory and other hw registers) to the SD card of the EP for savegame slots.

So be brave, I can (only) think big ! :)


Turning back to the point: with the above things the EnterMice would simply change the part of the "backpanel" of the EP, changing every connector to a much better one in functionality and in physical form, too.
« Last Edit: 2015.August.23. 13:50:21 by Z80System »
Z80 System

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #176 on: 2015.August.23. 13:51:38 »
Ideas - a good thing.
But keep calm.
I still do not know whether what I've done is correctly working, and you already want to modify :)

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #177 on: 2015.August.23. 13:58:49 »
Quote
But keep calm.

Okay, okay. Sorry for me ... :)

Quote
I still do not know whether what I've done is correctly working

Yes, it is just like I used to be ...

Z80 System

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14776
  • Country: hu
    • http://enterprise.iko.hu/
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #178 on: 2015.August.24. 11:04:49 »
The first tests.
The main thing - EP survived connection with EnterMice ;)
It is looks very nice!

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #179 on: 2015.August.31. 20:21:57 »
I still can not solve the problem with the signal "right" on the joystick 2.
First, it seemed to me that the cause was interference caused by the lack MCU in the socket.
Unfortunately not. After inserting the MCU, nothing has changed.
Simultaneously active signals  KB9 and Joy2_Right causes "mess" on the line KB_J (watch this).
KB_J line status is then random.
Especially for this occasion in the past week I mastered the basics of VHDL.
I rewrote the functionality of PLD schema file to the VHDL.
Code: VHDL
  1. -- Target Devices: XC9572-PC44
  2. library IEEE;
  3. use IEEE.STD_LOGIC_1164.ALL;
  4.  
  5. entity EnterMice is
  6.     Port ( KB : in  STD_LOGIC_VECTOR (9 downto 0);
  7.            J1_Fire1 : in  STD_LOGIC;
  8.            J1_Fire2 : in  STD_LOGIC;
  9.            J1_Fire3 : in  STD_LOGIC;
  10.            J1_Up : in  STD_LOGIC;
  11.            J1_Down : in  STD_LOGIC;
  12.            J1_Left : in  STD_LOGIC;
  13.            J1_Right : in  STD_LOGIC;
  14.            J2_Fire1 : in  STD_LOGIC;
  15.            J2_Fire2 : in  STD_LOGIC;
  16.            J2_Fire3 : in  STD_LOGIC;
  17.            J2_Up : in  STD_LOGIC;
  18.            J2_Down : in  STD_LOGIC;
  19.            J2_Left : in  STD_LOGIC;
  20.            J2_Right : in  STD_LOGIC;
  21.            M_Left : in  STD_LOGIC;
  22.            M_Right : in  STD_LOGIC;
  23.            M_Data : in  STD_LOGIC_VECTOR (3 downto 0);
  24.            M_JoyMode : in  STD_LOGIC; -- 0=std mouse, 1=joystick mode
  25.            KB_J : out  STD_LOGIC;
  26.            KB_K : out  STD_LOGIC;
  27.            KB_L : out  STD_LOGIC);
  28. end EnterMice;
  29.  
  30. architecture Behavioral of EnterMice is
  31.                         signal KB0 : STD_LOGIC;
  32.                         signal KB1 : STD_LOGIC;
  33.                         signal KB2 : STD_LOGIC;
  34.                         signal KB3 : STD_LOGIC;
  35.                         signal KB4 : STD_LOGIC;
  36.                         signal KB5 : STD_LOGIC;
  37.                         signal KB6 : STD_LOGIC;
  38.                         signal KB7 : STD_LOGIC;
  39.                         signal KB8 : STD_LOGIC;
  40.                         signal KB9 : STD_LOGIC;
  41. begin                                                                                          
  42.    with KB select
  43.                 KB0 <= '0' when "1111111110",
  44.                                  '1' when others;                                                                      
  45.    with KB select
  46.                 KB1 <= '0' when "1111111101",
  47.                                  '1' when others;                                                                      
  48.    with KB select
  49.                 KB2 <= '0' when "1111111011",
  50.                                  '1' when others;                                                                      
  51.    with KB select
  52.                 KB3 <= '0' when "1111110111",
  53.                                  '1' when others;                                                                      
  54.    with KB select
  55.                 KB4 <= '0' when "1111101111",
  56.                                  '1' when others;                                                                      
  57.    with KB select
  58.                 KB5 <= '0' when "1111011111",
  59.                                  '1' when others;                                                                      
  60.    with KB select
  61.                 KB6 <= '0' when "1110111111",
  62.                                  '1' when others;                                                                      
  63.    with KB select
  64.                 KB7 <= '0' when "1101111111",
  65.                                  '1' when others;                                                                      
  66.    with KB select
  67.                 KB8 <= '0' when "1011111111",
  68.                                  '1' when others;                                                                      
  69.    with KB select
  70.                 KB9 <= '0' when "0111111111",
  71.                                  '1' when others;              
  72.                                                        
  73.         -- inverted logic - 0's active
  74.         KB_J    <=      (KB5 or J2_Fire1) and                                           -- Joystick 2
  75.                                 (KB6 or J2_Up) and
  76.                                 (KB7 or J2_Down) and
  77.                                 (KB8 or J2_Left) and
  78.                                 (KB9 or J2_Right) and
  79.                                 (M_JoyMode or KB0 or J1_Fire1) and                      -- Joystick 1
  80.                                 (M_JoyMode or KB1 or J1_Up) and
  81.                                 (M_JoyMode or KB2 or J1_Down) and
  82.                                 (M_JoyMode or KB3 or J1_Left) and
  83.                                 (M_JoyMode or KB4 or J1_Right) and
  84.                                 (not M_JoyMode or KB0 or M_Left) and                    -- Mouse in joystick mode
  85.                                 (not M_JoyMode or KB1 or M_Data(0)) and
  86.                                 (not M_JoyMode or KB2 or M_Data(1)) and
  87.                                 (not M_JoyMode or KB3 or M_Data(2)) and
  88.                                 (not M_JoyMode or KB4 or M_Data(3));
  89.         KB_K    <=      (M_JoyMode or KB0 or J1_Fire2 or not M_Left) and        -- Mouse button priority
  90.                                 (M_JoyMode or KB0 or M_Left) and                        -- Mouse in standard mode
  91.                                 (M_JoyMode or KB1 or M_Data(0)) and            
  92.                                 (M_JoyMode or KB2 or M_Data(1)) and
  93.                                 (M_JoyMode or KB3 or M_Data(2)) and
  94.                                 (M_JoyMode or KB4 or M_Data(3)) and
  95.                                 (M_JoyMode or KB5 or J2_Fire2);                         -- Joystick 2
  96.         KB_L    <=      (M_JoyMode or KB0 or J1_Fire3 or not M_Right) and       -- Mouse button priority
  97.                                 (M_JoyMode or KB0 or M_Right) and
  98.                                 (M_JoyMode or KB5 or J2_Fire3);                         -- Joystick 2
  99. end Behavioral;
  100.  
  101. #PINLOCK_BEGIN
  102. NET "J1_Down"        LOC =  "S:PIN9";
  103. NET "J1_Fire1"       LOC =  "S:PIN7";
  104. NET "J1_Fire2"       LOC =  "S:PIN13";
  105. NET "J1_Fire3"       LOC =  "S:PIN11";
  106. NET "J1_Left"        LOC =  "S:PIN12";
  107. NET "J1_Right"       LOC =  "S:PIN14";
  108. NET "J1_Up"          LOC =  "S:PIN8";
  109. NET "J2_Down"        LOC =  "S:PIN44";
  110. NET "J2_Fire1"       LOC =  "S:PIN1";
  111. NET "J2_Fire2"       LOC =  "S:PIN4";
  112. NET "J2_Fire3"       LOC =  "S:PIN5";
  113. NET "J2_Left"        LOC =  "S:PIN2";
  114. NET "J2_Right"       LOC =  "S:PIN3";
  115. NET "J2_Up"          LOC =  "S:PIN42";
  116. NET "KB<0>"          LOC =  "S:PIN34";
  117. NET "KB<1>"          LOC =  "S:PIN27";
  118. NET "KB<2>"          LOC =  "S:PIN29";
  119. NET "KB<3>"          LOC =  "S:PIN26";
  120. NET "KB<4>"          LOC =  "S:PIN28";
  121. NET "KB<5>"          LOC =  "S:PIN40";
  122. NET "KB<6>"          LOC =  "S:PIN43";
  123. NET "KB<7>"          LOC =  "S:PIN39";
  124. NET "KB<8>"          LOC =  "S:PIN38";
  125. NET "KB<9>"          LOC =  "S:PIN37";
  126. NET "M_Data<0>"      LOC =  "S:PIN22";
  127. NET "M_Data<1>"      LOC =  "S:PIN20";
  128. NET "M_Data<2>"      LOC =  "S:PIN19";
  129. NET "M_Data<3>"      LOC =  "S:PIN18";
  130. NET "M_JoyMode"      LOC =  "S:PIN6";
  131. NET "M_Left"         LOC =  "S:PIN25";
  132. NET "M_Right"        LOC =  "S:PIN24";
  133. NET "KB_J"           LOC =  "S:PIN33";
  134. NET "KB_K"           LOC =  "S:PIN36";
  135. NET "KB_L"           LOC =  "S:PIN35";
  136. #PINLOCK_END
The only I thing gained, so much that the generated output file consumes fewer resources of PLD.
However it behaves identically.
I've added a full line decoding KB0..KB9, even though, theoretically, always only one of them at a time is 0s.
I checked the PCB. There is no short circuits. Swapped the PLD, because I thought maybe I came across damaged. That wasn't it.

What am I doing wrong ? What is wrong?
Help please :oops:

PS. I swapped also a whole EP. Did not help.
« Last Edit: 2015.September.01. 10:04:22 by pear »