Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - JP Sports pad

Reply to topic
Author Message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
JP Sports pad
Post Posted: Tue Apr 16, 2019 11:50 am
Last edited by wasup on Fri Apr 26, 2019 12:05 am; edited 2 times in total
Ive got a dead sports pad that im trying to repair. I got it cheap off ebay in the hope it was just a broken cord but its looking like the micro on it is dead instead. Im wondering about programming a modern part to replace it with but don't quote understand how its meant to function.

There are a few old posts that refer to "the official documentation" for the sports pad. Is some one able to point me to this?
It was linked in one post to "Development/SMSOfficalDocs" but the content is no longer there.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Tue Apr 16, 2019 12:01 pm
I see it at http://www.smspower.org/Development/SMSOfficialDocs .
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Apr 16, 2019 12:12 pm
Excellent, thanks a heap!
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Apr 23, 2019 10:46 am
Following the description in the docs.. something doesn't add up. Im assuming its talking about the US version of the sports pad, not the JP one as the MkIII has TH tied to ground and the JP master system don't have the ability of output on TH. There is a connection to TH on the micro inside the JP sports pad, so im not sure what its expecting to see. Im wondering if the JP one self clocks like the paddle controller, which would make sense given the console carnt clock it.

My scope is down at work so i carnt have a decent look at what is going on right now but as a sneaky test i tried using the "pad test" that sverx made to see if anything is happening. The buttons all cycle at a fairly rapid rate. Interesting enough, some of the extra mega drive controller buttons cycle too. That sort of proves that something is happening.

Here is a video of that. https://youtu.be/2rdhJWIYiF0

On another note, ive brought a couple of US sports pads off ebay to have a look at too. Once they turn up i should be able to compare them and find out what the differences are.
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Fri Apr 26, 2019 12:19 am
I had a quick play with this again last night and found a few things out. The TH pin going to the sports pad needs to be grounded before any data is output on the up/down/left/right pins. This is inline with the MkIII configuration as it doesnt have TH and is internally tied to ground. It seems to be using TL or TR (didnt take note of which input was which on my logic analiser) to send out the clock pulses which indicate which 4 bit data block is being sent, instead of using TH like the paddle controller does. Buttons 1 and 2 are also encoded within the data some how. I didnt have time to look into it properly but will spend a bit of time having a closer look soon and see if i can work that out.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Fri Apr 26, 2019 12:45 am
Yeah, the Japanese Sports Pad must be analogous to the paddle in that it serialises the data unidirectionally due to the lack of outputs.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Fri Apr 26, 2019 1:08 am
Assuming it is infact actually working correctly ive yet to find a game that works with it. Ive got a MkIII copy of sports pad soccor that came with it but that doesnt seem to detect it. I might see if i can find a dump of that and decompile it and see what checks are happening during startup.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Fri Apr 26, 2019 1:52 am
It's possible the timing is out of spec due to elderly capacitors.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Fri Apr 26, 2019 2:20 am
It only had 2 in it.. which were for power supply filtering so shouldnt really effect timing but I did change them anyway. The oscillator has 5mhz on it and thats bang on acording to my scope. It might be to do with how im running the game as im having to use sms boot on a card and switch controllers before it runs. Might try it on a bios modded system with fm and region and see if that works. If it does then im just failing what ever checking its doing to determine the region/controller type.
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Mon Apr 29, 2019 8:58 am
Last edited by wasup on Mon Apr 29, 2019 9:20 am; edited 1 time in total
Just had a look at this on my logic analyzer. It seems to output data in a similar method as the JP paddle controller. Its obviously got X and Y data but also has data for buttons 1 and 2, so there are 5 lots of 4 bit data blocks that are output.

It takes roughly 2.5 seconds from power up before anything is output. Pin 7 on the controller connector must be low for data to be output.

It follows this format...

TL is low for ~38uS and bits 7, 6, 5 and 4 for the X axis are output.
TL is high for ~50uS and bits 3, 2, 1 and 0 for the X axis are output.
TL is low for ~38us and bits 7, 6, 5 and 4 for the Y axis are output.
TL is high for ~50us and bits 3, 2, 1 and 0 for the Y axis are output.
TL remains high for another ~50uS and TR goes high for ~50uS and outputs 4 bits to represent the button states.
TL and TR both go low and the cycle repeats.

The X and Y data is a count from 0 to 254. Moving forward increases the count, moving backwards decreases the count. It wraps from 254 to 0 and vice versa. The count is an absolute count and remains if no movement is detected.

The 4 data bits for the bottons are..

bit 3 is always 0
bit 2 is always 1
bit 1 = button 2
bit 0 = button 1

Pressed = 0, not pressed = 1.


So... Im assuming this controller is actually functioning as intended. Not sure if the timing is correct but don't have another one to compare it against.
Capture.PNG (89.54 KB)
Button data
Capture.PNG
Capture X.PNG (91.82 KB)
X data
Capture X.PNG
Capture Y.PNG (89.83 KB)
Y data
Capture Y.PNG

  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Mon Apr 29, 2019 9:18 am
Alright.. just tried this on a modified sms2 with a JP bios and it seems to kind of work. The sensitivity is rubbish at best, so possibly the timing is actually out.

Does the MkIII run at the same cpu clock speed as a master system?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Mon Apr 29, 2019 11:53 am
Last edited by Maxim on Tue Apr 30, 2019 5:39 am; edited 1 time in total
Yes, it's the same speed. The general issue with sports pads is apparently that the ball doesn't grip the rollers properly and thus movement is under registered.

It's odd that it wraps at 254, does it ever produce odd values (LSB set)?
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Mon Apr 29, 2019 11:01 pm
Ok.. i was wrong and it does go to 255 before wrapping. I was powering it up, which gives a 0 count, then rolling it backwards untill the count changed. Its got 2 IR gates that are slightly offset from each other so that it can detect movement and also direction depending on which one triggers first. Given this, it needs 2 pulses initally to register movement and direction, once moving it will count every pulse. So the test i was doing was actually showing 2 pulses, hence jumping to 245 instead of 255.

Its constructed a little differently than the US one, and i dont believe slippage is the issue.. ill put up some pictures later on when im home
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Apr 30, 2019 8:34 am
Here are some pictures of the JP sports pads, both inside and outside.

The encoder wheels on this contact the ball directly and are made from a steel circular ring with holes around it. The holes create the paths that block and unblock the light beams on the IR gates. There is a bearing with a small shaft through it that sits in the middle of this, so it spins very freely.

Ive seen a few pictures of the US version and its constructed more like a traditional ball mouse with thin plastic shafts that have an encoder wheel on the end. The ball makes contact with the thin shaft and is more prone to dirt build up, likely causing slippage.
10.jpg (145 KB)
10.jpg
9.jpg (135.35 KB)
9.jpg
8.jpg (116.62 KB)
8.jpg
7.jpg (304.71 KB)
7.jpg
6.jpg (67.84 KB)
6.jpg
5.jpg (225.02 KB)
5.jpg
4.jpg (237.54 KB)
4.jpg
3.jpg (209.12 KB)
3.jpg
2.jpg (152.34 KB)
2.jpg
1.jpg (238.05 KB)
1.jpg

  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Tue Apr 30, 2019 7:55 pm
Surprising that it's so different, also presumably the ball mouse style shafts on the export version act to generate "ticks" for smaller angular movements.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Apr 30, 2019 8:30 pm
Once the US version i got off ebay arrives ill pop it open and post some new comparision pictures.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Wed May 01, 2019 9:05 pm
I've started disassembling Sports Pad Soccer (JP) and it does something very odd - it only uses the JP sports pad reading code if it detects it is running on a unit without the FM unit mixing control, which I think means a Mark III. If it is able to read and write bit 1 of port $f2 then it will use the export sports pad reading code - which I'm fairly sure won't work on a Japanese SMS (maybe causing someone to think it is not working and sell it on eBay?).

On your modded SMS2 I think it should work as intended (no FM unit -> Japanese paddle code).

Meka actually patches the game to force it to always use the export paddle, I guess because it doesn't emulate the Japanese variant.

The code seems to exactly match your description. The transition of TR from low to high is used to synchronise it to the data cycle. It has some attempts to break the polling loops rather than get stuck forever if the pad is not present.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Wed May 01, 2019 10:26 pm
Well thats interesting and it does fit. Given TH has to be low for it to output data.. only a MkIII is wired that way, as it doesnt have the TH input. A JP master system has a pullup resistor on TH as its used as an input, so it wont work anyway. Given this, i suspect your right and it was probably only tested on a JP master system and assumed to be faulty. Interestingly ive seen pictures of the box it comes in and nothing is mentioned about it being for a MkIII only.

Ill try running it on my sms2 with fm enabled later on and confirm if it stops working. It definately didnt care if the region was JP or Export but i didnt try with FM enabled.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Thu May 02, 2019 8:47 am
I think the Japanese Master System still lacks the ability to output on the controller ports - it's used for region detection, they even had to deal with that on the Japanese Power Base Converter to make sure games would boot to the Japanese mode. However at http://www.smspower.org/forums/15109-3155297AndMoreJapaneseMSStuffPinout it says you can output on TH and TR, but you can't read back TH.

More notes on Sports Pad Soccer:

* It does not disable the I/O chip with port $3E. Some forum threads suggest that you get the controller ports ANDed together with the FM control register in this case. This would mean the current state of the sports pad at the time would affect the result - it could end up using either paddle reading routine, and it could also disable sound entirely.
* The behaviour of port $f2 needs some more investigation work on Japanese hardware. The code here suggests the low three bits are meaningful, and probably at least two of the bits can be read back. My theory is that it's a difference between the JSMS (supporting audio mixing) and the Mark III (only enabling one sound chip at a time), but that's not certain.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Thu May 02, 2019 8:01 pm
Thats an interestimg read. Does jp sports pad soccer write to port $3f at all during the system detection? Or as part of the jp pad reading code?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Fri May 03, 2019 3:19 am
No, it seems not to do region detection at all.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2527
Reply with quote
Post Posted: Fri May 03, 2019 9:45 am
wasup wrote
My scope is down at work so i carnt have a decent look at what is going on right now but as a sneaky test i tried using the "pad test" that sverx made to see if anything is happening. The buttons all cycle at a fairly rapid rate. Interesting enough, some of the extra mega drive controller buttons cycle too.


Don't know how, but I had missed this topic.
The pad tests shows that the pad is detected as a MegaDrive one, as it sometimes read both left and right pressed at the same time, which can't happen on an SMS pad, and it's reading then 'A' and 'Start' MD buttons status (the same bits used by SMS '1/Start' and '2' buttons).
Interestingly, it seems it never flashes the other MD buttons 'X','Y','Z' and 'Mode', so it means it's never reading the four directions buttons pressed at the same time (which means all of them are never zero).

Info on reading the MD pad is here (and still somewhat wrong)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12962
  • Location: London
Reply with quote
Post Posted: Fri May 03, 2019 10:54 am
If you move the ball to the right position you can get zeroes on all four bits.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Sat May 04, 2019 1:30 am
sverx wrote
Interestingly, it seems it never flashes the other MD buttons 'X','Y','Z' and 'Mode', so it means it's never reading the four directions buttons pressed at the same time (which means all of them are never zero).

Info on reading the MD pad is here (and still somewhat wrong)


Looking at the way that works.. x, y and z are read with TH high. The JP sports pad only putouts data with TH low.. so the data lines will be presumabily high impedance or tied high with pullups during those reads
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Mon May 06, 2019 9:02 am
The US sports pads i got off ebay turned up today. I got 2 of them as "un-tested". One works, the other doesn't.

In "Control" mode it emulates a normal controller. It seems fairly responsive in this mode. In "sports" mode it works as a sports pad in games that support it. It seems fairly unresponsive and slow in this mode, much the same as the JP one i have. The rollers definitely rotate properly, so its not slippage thats causing it to be unresponsive. That said, i don't have a responsive pad to compare it too.. so aren't able to look into that any further.

The construction of the US one is a little different to the JP one. This is more like a traditional ball mouse. I thought the rollers were plastic in the pictures ive seen but they are all metal. They have a ball bearing at each end, so rotate pretty freely too. They have a metal encoder wheel screwed onto the end of the shaft that breaks the IR light gates. This particular unit has a 2 board and multi chip solution. The one i saw pictures of had a single board and single chip solution. Possibly this one is an earlier version?
1.jpg (187.14 KB)
1.jpg
2.jpg (181.63 KB)
2.jpg
3.jpg (211.12 KB)
3.jpg
4.jpg (251.25 KB)
4.jpg
5.jpg (286.14 KB)
5.jpg
6.jpg (239.68 KB)
6.jpg
7.jpg (168.86 KB)
7.jpg
8.jpg (109.91 KB)
8.jpg
9.jpg (205.04 KB)
9.jpg
10.jpg (30.16 KB)
10.jpg
11.jpg (65.45 KB)
11.jpg

  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 273
  • Location: Auckland - NZ
Reply with quote
Post Posted: Mon May 06, 2019 9:17 am
A quick google search found the one i saw pictures of previously. Here is the single board it has. The rest was much the same.
115.PNG (964.58 KB)
115.PNG

  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!