• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Arcade Adapter for Mac*Man

Arbee

Well-known member
Yes, because the pinout for a mouse is using quadrature, not separate up, down, left and right pins. So just sending a pulse in on one of the wires will not actually achieve very much except maybe a single-pixel twitch in one axis.
I wouldn't be entirely surprised if the adaptor just connected up/down to the quadrature pulse and sign inputs on one axis, and left/right to the same things on the other. Then connect the button to the mouse button. Until an adapter turns up and can be traced out that's just speculation though.
 

cheesestraws

Well-known member
I wouldn't be entirely surprised if the adaptor just connected up/down to the quadrature pulse and sign inputs on one axis, and left/right to the same things on the other. Then connect the button to the mouse button. Until an adapter turns up and can be traced out that's just speculation though.

Yup - but my point was more if it did that, it wouldn't make the joystick work as a mouse, like @Tonust was thinking it might, and the software would have to read it differently from the mouse. I'd agree with you about how it's probably wired, but I too am just speculating.
 

Tonust

Member
No, all of the code is on the Arduino. The Mac just sees it as a normal mouse.

But that doesn't help with the macman thing, I'm afraid
Hello

I just finished the connections and I'm trying to modify your program to take into account that I have 4 switches and not 2 potentiometers.

I manage to move the mouse in all directions but it moves very slowly. Horrible!
How can I change the default speed?

Thank you again for your help. I can't wait to test with some games. 🥳
 

cheesestraws

Well-known member
I manage to move the mouse in all directions but it moves very slowly. Horrible!
How can I change the default speed?

How have you adapted the program? Did you just swap analogueRead out for digitalRead? If so, the easiest way is probably to multiply the output from digitalRead by something - so line 27 would become something like

C:
return analogueValueIsStill(digitalRead(xDigital) * 256);

and change the other lines accordingly. Tweak the constant until you get a speed you like.
 

Tonust

Member
I just finalized the adapter. It allows you to connect old Atari joysticks from the 80s. I don't despair of being able to play Macman with it one day. For now I'm already enjoying Arkanoid!!! Thank you again for your help.IMG_0772.jpegIMG_0771.jpeg
 

Tonust

Member
That's a very professional looking little box. Well done!



I bet the macman adapter is doing something really simple. I just have no idea what it is.
Me too, maybe the joystick centers itself when plugged in with the official adapter?
I'm going to continue to dig into the subject on the software side...
 

SuperSVGA

Well-known member
I'm going to continue to dig into the subject on the software side...
I wish you luck, I may be wrong but on first glance at the code it looks like they went through a lot of effort to obfuscate things. Guess they really didn't want their code/hardware cloned.

I may see if I can take some of it apart and post here.
 

Tonust

Member
I wish you luck, I may be wrong but on first glance at the code it looks like they went through a lot of effort to obfuscate things. Guess they really didn't want their code/hardware cloned.

I may see if I can take some of it apart and post here.
it will be so great !!

another idea: press all the buttons simultaneously:
-high
-down
-LEFT
-RIGHT
--> which is not possible to do with a joystick or a mouse

I'm going to make a second test arduino with several combinations to see
 

SuperSVGA

Well-known member
I think I see the check, though I'm not entirely certain. It looks like it's using the mouse button line by setting it as an output and asserting it for ~1ms, then switching back to input, checking to see if the mouse button is still asserted after ~7us, and then checks to make sure it's not asserted after ~13us.
I have a suspicion that they have a 10us delay line or something on the mouse button, both not enough to be noticeable in game and also too precise for a human to perform by hand.
 

cheesestraws

Well-known member
Hmmmm, so you could probably stick an RC timer across the mouse button line and it might work? This reminds me weirdly of how MAU detection works on some Acorns, and I'm pretty sure I used an RC timer to do that...
 
Last edited:

SuperSVGA

Well-known member
Hmmmm, so you could probably stick an RC timer across the mouse button line and it might work? This reminds me weirdly of how MAU detection works on some Acorns, and I'm pretty sure I used an RC timer to do that...
I think that might work, maybe something like 10nF/1000Ω, though the mouse button is active low but I assume the timings will still work the same...

Here's most of the driver. I tried to comment and refactor most of it to make it much more readable. Most of the interesting stuff is down towards the bottom.
 

Attachments

  • JoyJDVR.asm.zip
    4.2 KB · Views: 6

Tonust

Member
awesome !!! thanks to you.
I looked at the code. Maybe it will be easier to crack the game to delete the check :ROFLMAO:

I have the impression that the adapter sold with Macman does not convert the signal received, it is the drivers integrated into the Macman game which does it. In other words, the Arduino program code would also need to be modified. We would no longer need to convert the received signal but simply to reproduce the detection key.
the ATARI JOY :
1 IN Up
2 IN Down
3 IN Left
4 IN Right

the MAC MOUSE :
4 X2 IN Horizontal movement line (connected to VIA PB4 line)
5 X1 IN Horizontal movement line (connected to SCC DCDA-line)
8 Y2 IN Vertical movement line (connected to VIA PB5 line)
9 Y1 IN Vertical movement line (connected to SCC DCDB-line)

the macman GAME :

JoyJDVR_FUN4:
lea DAT2,A0
move.w #$1,DAT3
move.w MouseInterruptState,D0 ; Get mouse interrupt variable
bne.w .L6 ; If mouse interrupts are disabled
movea.l SCCRd,A0 ; Load SCC base read address (replaced in usage for readability)
movea.l VIA,A1 ; Load VIA base address (replaced in usage for readability)
jsr JoyJDVR_GetMouse
andi.w #%1111,D0
bne.w .Exit ; Exit if direction buttons pressed
btst.b #vSW,(VIA) ; Check mouse button state
beq.w .Exit ; Exit if button is pressed
move.b (vDIRB+VIA),D0 ; Get current VIA direction
ori.b #%1000,D0 ; Set mouse button as output
move.b D0,(vDIRB+VIA) ; Set VIA direction
move.b (VIA),D0 ; Get VIA buffer
andi.b #%11110111,D0 ; Set bit 3 (mouse button) low
move.b D0,(VIA) ; Set VIA buffer
move.w #800,D0 ; Set loop counter to ~1ms
.L1:
dbf D0,.L1 ; Delay loop
move.b (vDIRB+VIA),D0 ; Get current VIA direction
andi.b #%11110111,D0 ; Set mouse button as input
move.b D0,(vDIRB+VIA) ; Set VIA direction
moveq #50,D0 ; Set loop counter to ~6.25us
.L2:
dbf D0,.L2 ; Delay loop
btst.b #vSW,(VIA) ; Check mouse button state
bne.w .Exit ; Exit if button is not pressed
moveq #100,D0 ; Set loop counter to ~12.5us
.L3:
dbf D0,.L3 ; Delay loop
btst.b #vSW,(VIA) ; Check mouse button state
beq.w .Exit ; Exit if button is pressed
lea DAT23,A2
cmpi.w #$4,(A2)
blt.w .L4
jsr DisableMouseInterrupt


what the role of 10nF/1000Ω ? and how to solder it to the input button ?
For RC timer I must use micros() ? When I connect the Joystick the input button is HIGH, the Arduino program wait approximately 1ms and press the button during 10us ?

Quite a challenge !:cool:
 

Attachments

  • 1707134572063.png
    1707134572063.png
    312 bytes · Views: 5

Tonust

Member
Arcade Adapter/Mac Man 1.1

Joystick adapter and arcade game. Pros:

Opens a new market for joystick-compatible soft-
ivarei easy to use: good graphics and speed. Cons:
Game lacks originality and variety\ List price:
$29. Requires: Arcade Adapter, 128K; Mac Man,
512K: joystick. Copy protection: None.

When it comes to speed and graph-
ics, Nuvo Lab.s’ Mac :Man leaves
most Pac Man replicas in the dust.

It doe.sn’t measure up to arcade standards for
color and flashing lights, but it does t^ike full
advantage of the Macintosh's ability to pro-
duce slick animation and imagery.

Grab Your Joystick

This package includes a joystick
adapter that you plug into the Mac s mouse
port. You can attach any Atari-type joystick
to Arcade Adapter; I tried both the Wico
Command Control and Atari Standard
joysticks. Many games benefit from replac-
ing the mou.se with a joystick, and a few;
because of .special design features, un-
dergo a quantum leap in quality. Vov Mac
Man, the stick is e.ssential; the game won’t
run with the mouse, and using the key-
board is hopelessly aw-kw ard.

Arcade Adapter gives the Mac easy ac-
cess to joystick-compatible software (docu-
mentation refers you to the Adapter Inii
File for po.ssible use with other programs).
Nuvo Labs and other companies plan to de-
velop more programs that will w-ork with
the adapter.

Gulp!

Mac Man's mi.ssion is to eat his way-
through a maze of tiny apples while avoid-
ing marauding PC creatures. You control
the mad gulper’s movements through the
maze by maneuvering your joystick in four
directions. You score points for each apple
you devour and earn extra points for di-
gesting various prizes that appear ran-
domly. If you’re caught by an evil PC, it
gobbles you up; how-ever, if you sw'alkm* a
large energy-apple, you can temporarily
turn the tables on your attackers and gain
more points.

Rascals in a Maze

In Mac Man, )'o// travel through a maze, eating
apples and avoiding bad-guy PCs. The Arcade
Adapter bundled with the game lets you control
the action with a joystick.

You can choose to play with up to five
Mac Men for each game. The first few
mazes are quite easy to negotiate. When
you successfully complete a maze, the pro-
gram produces a more advanced one, up to
a limit of 16.

Mac Man's features include comic- re-
lief interludes between mazes, automatic
score keeping, speed and acceleration set-
tings, volume control, four difficulty levels,
and a choice of one or mo players. Sharp,
seamlessly animated graphics depict a
bird’s-eye view of the Mac Man universe
with artful charm (see “Rascals in a
Maze”).

The total effect breathes new life into
a prototype that remains legendary among
video games. PacMan is alive and well on
the Wixc.-Jobn DiPrete


> the only version of Macman still found is version 0.9 beta
> driver disk not found
 
Last edited:

Tonust

Member
Hello,

I'm still working on it but I had less time to look into the issue. After the ATARI joystick cable, I found an old amiga kraft joystick on ebay that I repaired (axis problem), modify the power supply of the potentiometers to make it compatible with my Arduino board and my Macintosh plus.

I'm finally done!!

next step, try to make macman working with my new joystick Atari
 

Attachments

  • IMG_1020.jpeg
    IMG_1020.jpeg
    2.1 MB · Views: 4
Top