One question more: Why the different triggering(positive or negative) of the two mouses?
Can be because the resting state of the pin6 of the C64 Joystick port is +5v, an then the active state is 0v. Much like the resting state of the
RTS signal is +12v.
----------------------------------------------------
Now I want to explain the modifications I've made to NYYRIKKI's script to work with the Enterprise+Boxsoft.
Here you can download the script and instructions.
His project lets the user to simulate various legacy devices on the MSX computer with a standard PS/2 mouse: mouse, extended mouse, extended mouse + joystick, Joystick, trackbal, and touchpad. Obviously only mouse simulation is important for us. Also the script has an option to transfer a program from PC-side to the MSX, but it can´t work on the Enterprise without re-writing the resident program.
First change:
void sendMSX(char c)
// Optimized for Atmel328
// NOTE: Fixed pins!
{
while (digitalRead(JoyPin8)==LOW) {if (millis()>time) return;};
DDRD = ((DDRD & 195)|((~ (c>>2)) & 60));
while (digitalRead(JoyPin8)==HIGH) {if (millis()>time) return;};
DDRD = ((DDRD & 195)|((~ (c<<2)) & 60));
}To:
void sendMSX(char c)
// Optimized for Atmel328
// NOTE: Fixed pins!
{
while (digitalRead(JoyPin8)==HIGH) {if (millis()>time) return;};
DDRD = ((DDRD & 195)|((~ (c>>2)) & 60));
while (digitalRead(JoyPin8)==LOW) {if (millis()>time) return;};
DDRD = ((DDRD & 195)|((~ (c<<2)) & 60));
}Second change:
*/
void JoyHigh()
// Optimized for Atmel328
// NOTE: Fixed pins!
{
DDRD=(DDRD & 195);
}To:
*/
void JoyHigh()
// Optimized for Atmel328
// NOTE: Fixed pins!
{
DDRD=(DDRD & 255);
}The first change is to match the negative triggering of the Neos, and the second is to leave the pins of the port in its rest state. If you leave it with 195 decimal, the buttons are always pressed.... But if you leave at 0 then the pointer always goes up.