Individual Computers logo and link back to main site
Micromys V3 online manual
Click here to go back to the main manual page.

both DIP switches on Put both DIP switches to the ON position for the 1351 emulation mode. This will let Micromys V3 emulate the Commodore 1351 mouse that was popular for the C64. Programs like GEOS, Pagefox, GoDot and Mr.Mouse will work. This is the setting that Prophet64 and MSSIAH users should choose.
Joystick emulation mode
Just like on the original Commodore 1351 mouse, Micromys V3 can emulate a joystick if it's set to C64/1351 mode (both DIP switches ON). To enter this mode, hold down the right mouse button during power-on. Any mouse movement is now translated into joystick signals, so any software that can be controlled with a joystick can now be controlled with a mouse. The left mouse button will be translated to the firebutton of the emulated joystick. Wheel movements, middle and right mouse buttons will be ignored in this mode.
note: Today's optical mice are doing a self-test on power-up and do not pass on a mouse button that is pressed during power-on. This will probably prevent many mouse types from being used as a joystick with Micromys V3. Since a mouse is not a good joystick replacement anyway, we don't think that this is a major drawback. For the best gaming feeling, we recommend a Competition Pro Retro joystick.

programming C64 software that uses the mouse
The current mouse position can be taken from the SID registers $D419 (X-value) and $D41A (y-value). However, these values are not absolute, but relative movements of the mouse. You need to store the current state of the register, delay a certain amount of time and re-read the register. This is preferrably done in an IRQ routine. The difference between the two values gives an indication of the mouse movement during the delay interval. We won't go into detail about this here, as there's other literature available about 1351 mouse programming that applies 100% to Micromys V3 as well.

additional signals in 1351 mode
Micromys V3 will not only translate the left and right mouse buttons, but also wheel movements and the middle mouse button to the C64. This is done using the joystick direction lines that are normally not used by the original 1351 mouse. If the wheel is not moved or pressed, the nomally-unused signals remain untouched, so full compatibility to the original 1351 mouse is still given. The following description gives some idea from a programmer's point of view.

Bit 7 6 5 4 3 2 1 0
function -- -- -- LMB DN UP MMB RMB

This bit layout is valid for both control ports. Port 1 is located at CIA address $DC01, and port 2 is located at CIA address $DC00. Bits 7, 6 and 5 are unused and should be masked out. All five signals are active-low:

LMB stands for left mouse button
RMB stands for right mouse button
MMB stands for middle mouse button
UP is the scrollwheel-flag for up-movements
DN is the scrollwheel-flag for down-movments

If a button is pressed, it will be represented as a 0 in the corresponding bit. If it is released, the corresponding bit will be 1.

If the wheel is moved up or down, a sequence of pulses appears on the UP or DN bits of the above port registers. The number of pulses is exactly the number of increments that the wheel has been moved. The following picture illustrates two pulses for a wheel movement of two clicks:

timing diagram for two wheel pulses

The idle state of the UP and DN bits is 1, and the pulses bring the bit to zero for a period of 50ms. The time between two pulses is also about 50ms. The time may vary by about 4%, mainly caused by different timings between PAL and NTSC machines (Micromys V3 takes a timebase from the potentiometer conversion rate, which is affected by the different clock speeds of the different C64 video norms). This also means that you don't need to tweak your code to run on NTSC and PAL - with changing C64 timing, the Micromys V3 timing will automatically adapt. The number of CPU cycles between low-pulses is the same on PAL and NTSC machines.
Sampling the UP and DN bits should be done at a rate of at least 45ms in order not to miss a pulse. You should count the number of high-to-low changes, but not the static signal in the UP and DN bits. If you link your wheel-routine with the system timer interrupt (Jiffy IRQ), the sampling rate will be high enough, as the interrupt occurs every 17ms (60Hz). Other interrupt sources like a raster-IRQ are also possible, as even a PAL raster IRQ comes at a rate of 50Hz (20ms).

This part of the manual also applies to the old Micromys, originally developed by Marko Herold, who sold the design to us. The difference to the older hardware is the absence of DIP switches and therefore the absence of Amiga- and Atari modes. The C64 / 1351 emulation mode is identical to Micromys V1, so any software that you write for the C64 will also work with the existing customer base. We're happy to answer any support questions, including code review and cross-testing with the old Micromys model and the original 1351 mouse. Let us know if we should update the list of programs on this site with a link to your software!

Click here to go back to the main manual page.

individual Computers Jens Schönfeld GmbH
Im Zemmer 6 | 52152 Woffelsbach | Impressum

webdesign by [ no hype ] communications 2000