NEED HELP: Joystick Shield + Mach III + Virtual ][ emulator + M1 Mac

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
I posted about this over at the Apple II Enthusiasts group on FaceBook, and I also sent Henry of ReactiveMicro an email, but thus far I've not been able to determine the cause of the problem I am having, which I described in detail in the following unlisted video on YouTube...


PROBLEM QUICK SUMMARY:

1667528832682.png

As you can see, holding the stick down all the way to the bottom and right makes the crosshairs only go part way down and to the right. And yet, when I first connect the joystick to the Mac, the crosshairs are no where close to being centered, but then it seems to auto-calibrate a bit when I move the stick, which restricts how far down and to the right it goes. Interestingly, if you watch my video above, you can see that after a bit of testing I disconnect and reconnect the Mach III, and then suddenly it starts going all the way to the right, but it never goes all the way to the bottom.

There are no settings for the Joystick Shield. You just plug it into the Mac and it works. That's it.

Keep in mind that this is the same joystick I needed to add two capacitors to for it to extend all the way to the right and bottom (255,255) for use with my Apple IIe Card, as shown in this segment of my IIe Card video here...


Basically, I am posting about this in hopes that someone among you have the same exact setup as I do...
  1. Modern Mac
  2. Mach III joystick
  3. Virtual ][
  4. Joystick Shield adapter
I would like to hear if I am truly the lone person on this planet with this problem. I doubt it, but thus far, I've not come across anyone with my same setup, and so if you are using the Joystick Shield with a different kind of computer and/or emulator, that is different enough to where it really doesn't cast much light at all on what I'm seeing.

Anyway, fingers cross that someone out there with my same setup will chime in!

🤞

 

skate323k137

Tinkerer
Mar 7, 2022
130
103
43
Well sir, I probably have the same or similar enough setup. I have several mach CH series joysticks, a modern mac, and a joystick shield adapter. Firing up Virtual II shouldn't be a huge issue. I am not sure -when- i'll have time to do this, but if I get a chance sooner than later I'll certainly follow up with my findings.
 
  • Love
Reactions: JDW

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
Well sir, I probably have the same or similar enough setup. I have several mach CH series joysticks, a modern mac, and a joystick shield adapter. Firing up Virtual II shouldn't be a huge issue. I am not sure -when- i'll have time to do this, but if I get a chance sooner than later I'll certainly follow up with my findings.
You are the first person who has told me you have a similar setup, and I truly look forward to the result of your test.

Please note that you can download MECC Computer Inspector, which has the same joystick calibration program that I use here:

ComputerInspector (MECC 1.0).dsk
 
  • Like
Reactions: skate323k137

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
I received an email from Henry at ReactiveMicro. He said he sees the same issue as me! But he also said he is using Windows and said there is a "Game Controller Calibration" control panel he can use.

1667612964024.png


I cannot use that on my Mac. I don't have a Windows machine. MacOS doesn't have anything like that.

I failed to get any 3rd party utility to work. Specifically...
  • Ysflight: doesn’t work at all on modern MacOS
  • USB Overdrive 5.1: sees my Mach III joystick only in MacOS Monterey, not Ventura, but I don't see any means to "calibrate"
  • Joystick & Gamepad Tester: can’t see my Mach III while connected via Joystick Shield

By the way, when using USB Overdrive 5.1 on MacOS Monterey on an M1 Mac, before I connect the Joystick via Joystick Shield (USB), I only see "Headset" but after connecting, I see 4 entries labeled "Teensy"...

1667613575890.png 1667613604346.png

Why 4 and not 1? It doesn't matter since USB Overdrive cannot help me calibrate the joystick, but it does have me curious.

Henry said he found something in the firmware that was set wrong. He made a change that fixed things on his end. He sent me this HEX file. Sadly, I have no idea how to program it to the Joystick Shield. Henry told me about the "Macintosh Complete Software" download here:
https://www.pjrc.com/teensy/td_download.html

I don't know how to use that to program the HEX file to the Joystick Shield. Do any of you? The software looks like this...

1667613251512.png

I just don’t know what sequence of menu commands I need to use to flash the HEX file. Indeed, I can’t even open the HEX file via the Open command…

1667613286430.png


The HEX file is grayed out which means I cannot open it using the Open command…

1667613304553.png


Is it even possible to flash firmware to the Joystick Shield without a special programmer? In other words, can I just connect the Joystick Shield with Mach III attached to my modern Mac via USB and flash a HEX file to it? If so, can someone provide me with a step-by-step?
 
  • Like
Reactions: skate323k137

skate323k137

Tinkerer
Mar 7, 2022
130
103
43
Nice! Glad there is at least progress.

I've flashed some teensy controllers before but it's been forever. I'm doing family stuff this weekend but if nobody beats me to it I'll be sure to follow up.
 

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
After much testing with Henry at my side, I finally found a solution on my own. I had a suspicion all along this might be the root cause, and now I have confirmed it.

CAPACITORS!​


While doing research for my two videos on the Apple IIe Card, I was advised by the Apple II experts to add capacitors to my CH Products Mach III Joystick for reasons I explained in detail in the video I linked for you in my opening post. That 2nF Mylar/Polyester cap on the X-axis POT and the 10nF ceramic disk cap on the Y-axis POT worked to get my Mach III joystick to reach 255,255 when used with my Apple IIe Card inside my Color Classic Mystic. Sadly, when I later bought the Joystick Shield so as to use that same Mach III joystick with my modern Macs running the Virtual ][ emulator, the joystick would not reach to 255 in the downward Y-axis direction, not even with revised firmware from Henry.

After a heck of a lot of testing and consultations with many people who had no idea what was wrong, I decided to remove both capacitors. Huge difference!
  • x=0,y=0 (crosshairs in upper left corner) — always worked
  • x=240, y=0 (crosshairs in upper right corner) — worked with caps installed
  • x=251, y=251 (crosshairs in bottom right corner) — only with caps removed
  • x=0, y=243 (crosshairs in bottom left corner) — only with caps removed
Since I never had a major issue with the X-axis, I re-soldered the 2nF Mylar cap back to the X-axis POT, which yielded this data in Virtual ][...
  • x=0,y=0 (crosshairs in upper left corner)
  • x=250, y=0 (crosshairs in upper right corner)
  • x=254, y=253 (crosshairs in bottom right corner)
  • x=0, y=244 (crosshairs in bottom left corner)
So I have left the Mylar cap connected for now. KARATEKA is now playable such that lower kicks and punches work.

Further experimentation will require that I purchase a range of Mylar capacitor values of 2nF to 10nF to see if that specific capacitor type (as opposed to ceramic disk) will allow me to leave that cap on the Y-axis so my Mach III joystick will then work perfectly with the Apple IIe Card and Virtual ][ on a modern Mac.

I just purchased this Mylar capacitor kit.
 

skate323k137

Tinkerer
Mar 7, 2022
130
103
43
Glad to hear!

Pergaps consider an adjustable "trimmer" cap? Might save you some work and would leave an adjustment point.
 

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
Glad to hear!

Pergaps consider an adjustable "trimmer" cap? Might save you some work and would leave an adjustment point.
I pondered drilling a hole in the joystick to do just that, but my hope is that the problem was merely my use of a ceramic disk capacitor which Joystick Shield doesn't like. Or maybe 10nF was too much for Joystick Shield whereas 2nF is not? Because like I said, the 2nF cap seems to be fine with Joystick Shield. I will know when my Mylar cap kit arrives, hopefully tomorrow.
 

François

Tinkerer
Aug 9, 2022
89
39
18
France
The problem may be related to how the joystick position is measured, depending on the hardware. On an actual Apple II it’s measured by a timer circuit (based on a NE555), and that allow the capacitor hack. (same capacitor hack to use common potentiometers, instead of the impossible to find 150kΩ potentiometers of the original joystick)
 

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
Bad news. :cry:

My Mylar cap kit arrived. The good news is that instead of the 10nF ceramic cap I had installed before, I found that a 3.3nF Mylar was adequate to calibrate the Mach III joystick with my Apple IIe Card installed in my Color Classic Mystic (along with the 2nF Mylar I had already installed), such that the crosshairs center fine and reaches 255,255 when I move the stick down and to the right all the way. Karateka and all other games using a joystick work perfectly!

However, I spent a half hour trying in vain to get the Joystick Shield to calibrate. It just won't. I plugged it in and disconnected it and replugged it multiple times, which triggers auto-calibrate each time. And yes, I am turning both of the twistable dials atop the joystick too. I can get it to reach 255,255, but to achieve that, the crosshairs won't center. The crosshairs are sitting to the right of the center point. And when I twist the dials to horizontally move those crosshairs back to the left, just as it starts to reach the center, the crosshairs suddenly pop to the left too much, and then the farthest the crosshairs will go to the right after that is barely half way across. The sudden popping to the left is clearly the Joystick Shields firmware doing something that is beyond my control.

The auto-calibration code inside the Joystick Shield does not like it when I add two capacitors, which is really sad because the only way to get the crosshairs to reach 255,255 when using the IIe Card (which has circuitry like a real Apple II), is to add the two small capacitors like I did. Sure, I can remove the 3.3nF Mylar and leave the 2nF Mylar installed, and Joystick Shield seems to work with that, but that won't allow the joystick to calibrate when I use it with the Apple IIe Card!

I suppose Joystick Shield is fine for people who have multiple joysticks, but I only have the one joystick. And honestly, I had to pay $124 for it, plus the cost of the Joystick Shield, so I'm not inclined to buy another joystick only to use with the Joystick Shield. It's really quite unfortunate because the Virtual ][ emulator is pretty awesome when it comes to enhanced audio that the Apple IIe Card cannot provide, and yet, many games for the Apple ][ require a joystick to function.
 

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
Perhaps consider an adjustable "trimmer" cap?
That would be the only solution, which would allow me to sever the 3.3nF cap, allowing the Mach III to work with Joystick Shield. But the method of severing that cap only makes practical sense if I drill a hole in my Mach III joystick. And while I've never considered myself a "purist" when it comes to mods, I'm not sure if I want to drill holes in it to install a slide switch, especially because a switch would stick out, and I could feel that while holding the joystick, possibly flipping it by accident too.

It's a real bother to open the Mach III. The manufacturer hid all 4 super-long screws under the rubber feet! Each time you remove the feet, you risk not being able to affix them back again. You wear down the adhesive even by pulling the feet off 1 time. And yes, rubber feet are necessary to keep the joystick mounted on a slick table. And no, putting the feet outside the sunken round holes isn't practical because the feet would slide around and eventually come off. The feet are only secure while sunken into those 4 holes, but those holes are where the screws are located!

1667785422217.png
 

retr01

Senior Tinkerer
Jun 6, 2022
2,473
1
793
113
Utah, USA
retr01.com
Hey @JDW, wow, that is a challenge! 😲

I was thinking about your joystick shield - can you point out precisely what it is? When I Google for a joystick shield, I get a bunch of different joystick shields. Which one do you have?

Is it like an adapter from the joystick port to the USB connection?

The other thing I am thinking about is how the joystick shield handles the signal frequencies from the joystick and outputs via USB. I am wondering whether the signal is being mucked up that either the USB output is truncating or the emulator is getting something cut off so that you end up with numbers less than 255 for the X or Y position. Why is it necessary to mess around with the joystick's components when it could be a problem with the joystick shield?

It seems that after you "upgraded" the joystick, so it was more precise on the Apple IIe Card and then on the emulator on your modern Mac, it's not going all the way to 255 for X or Y?

Another thing - is the ROM used by Virtual ][ differing from the ROM on the Apple IIe Card in respect of the game port/joystick port?
 

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
I was thinking about your joystick shield - can you point out precisely what it is?
This product:

The name is very strange. I have no idea why a Joystick needs a Star Trek type Shield around it. Speaking of which, there is no plastic case for it either. And it was only after I posted about that fact on FaceBook that a kind person created this 3D printable enclosure, which in my opinion is the very SHIELD that PCB needs!

Why is it necessary to mess around with the joystick's components when it could be a problem with the joystick shield?
I exchanged many emails with Henry at ReactiveMicro about that and confirmed that it is technically not a defect with the Joystick Shield. He said he would update the product page to mention it isn't compatible with capacitor hacks. That's the best he could do.

On the technical side, as my eyes see it, the Joystick Shield is reading joysticks differently than a regular Apple IIe would. I suppose one could say the same about the Apple IIe Card too, insofar as I had to add those 2 silly caps to calibrate it with the IIe Card. But at least the IIe Card and the real IIe are not too dissimilar. But the Joystick Shield is very different from the joystick input of a real Apple II, despite the fact it was created specifically for matching Apple II joysticks with a modern computer for the purpose of playing Apple II games in an emulator like Virtual ][.

It seems that after you "upgraded" the joystick, so it was more precise on the Apple IIe Card and then on the emulator on your modern Mac, it's not going all the way to 255 for X or Y?
I show you all the details from the 33:05 timestamp in my IIe Card Part II video here:


is the ROM used by Virtual ][ differing from the ROM on the Apple IIe Card in respect of the game port/joystick port?
Not to my knowledge, no. But remember that what we are dealing with here is the electronics on the real IIe and IIe Card which connects to the Joystick. That is separate from the ROM. Naturally, that circuitry isn't available on modern computers, so the Joystick Shield tries to simulate that interface circuitry. Sadly, because it is implemented differently from the joystick circuitry on a real IIe or IIe Card, as I said before, the two capacitors create issues for the Joystick Shield such that it becomes impossible to calibrate the Mach III unless I remove the 3.3nF capacitor. If I remove that cap, it works with Joystick shield, but then I cannot get the crosshairs to go all the way down to 255 when I later connect it to my Apple IIe Card.

Having two joysticks, one modded with 2 caps and the other unmodded would be a work-around, but like I said, I don't want to spend another $125 on a joystick (which includes shipping to Japan, mind you). I like to fiddle with Apple II stuff, but I'm not enough of a hardcore Apple II fan to justify the added expense.
 

retr01

Senior Tinkerer
Jun 6, 2022
2,473
1
793
113
Utah, USA
retr01.com
Thank you, @JDW, for explaining. Now I understand. :)

Let's see if anyone can provide feedback using the joystick shield from RetroActive Micro (RM) with an Apple II joystick that is not modified and how it calibrates. I could try it out, but I'd have to get this and get the joystick. 😏
 

skate323k137

Tinkerer
Mar 7, 2022
130
103
43
I have a couple Mach II's I believe that are both apple native. Many of my CH joysticks are PC ones with adapters but I don't want 2 adapters in the chain. I'll see if I can find a moment tomorrow to mess with it.
 
  • Like
Reactions: retr01

JDW

Administrator
Staff member
Founder
Sep 2, 2021
1,547
1,353
113
53
Japan
youtube.com
@skate323k137
Joysticks without any capacitors inside work fine with the Joystick Shield. But if you're like me an only have one joystick that you use primarily with the IIe Card, that forces you to add capacitors so the stick reaches 255,255. But when you add the caps, then Joystick Shield cannot calibrate the joystick anymore. That's the problem I'm having.
 

skate323k137

Tinkerer
Mar 7, 2022
130
103
43
@skate323k137
Joysticks without any capacitors inside work fine with the Joystick Shield. But if you're like me an only have one joystick that you use primarily with the IIe Card, that forces you to add capacitors so the stick reaches 255,255. But when you add the caps, then Joystick Shield cannot calibrate the joystick anymore. That's the problem I'm having.
Understood. Ideally I want to find one of mine that calibrates fine on the Joystick shield, and then move it over to a real IIe and see what the numbers look like.
 
  • Like
Reactions: JDW and retr01

retr01

Senior Tinkerer
Jun 6, 2022
2,473
1
793
113
Utah, USA
retr01.com
When you add the caps, then Joystick Shield cannot calibrate the joystick anymore. That's the problem I'm having.

Hmmm. I wonder if there is firmware that some code lines can be adjusted on RM's Joystick Shield? 🤨

For example, if the Joystick Shield detects that it is not reading up to 255,255, compensate so that it sends up to 255,255 out via USB to the modern computer. 🤓
 
  • Like
Reactions: skate323k137