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 - GG Putt & Putter - Passwords, passwords everywhere!

Reply to topic
Author Message
  • Joined: 16 May 2002
  • Posts: 1183
  • Location: italy
Reply with quote
GG Putt & Putter - Passwords, passwords everywhere!
Post Posted: Sun Mar 06, 2011 1:16 am
Last edited by Tom on Sun Mar 06, 2011 12:56 pm; edited 1 time in total
So I randomly opened Putt & Putter's rom and it turns out that there is a list of passwords stored as plain ascii text inside it. How nice of them!
Note that it's not a list of level passwords, as that's in my post below. It's a list of cheat codes to say so.
Aside from the usual PUTT (enables Master mode), there are several I didn't know about:
- STAGE (enables stage select)
- STOP (if you press 1 while the ball is rolling, it stops, even on slopes and moving floors, it's amazing)
- SEGA (goes back to the sega screen, useless)
- RESET (resets the game, kinda useless)
There seems to be a few more, including MOVE (which supposedly is a "map check") and GOLF (which supposedly enables a "pro mode"), but these don't work.

Also: keeping 1 or 2 pressed when you press start at the introductory animation unlocks a configuration (actually: configlation) menu with a sound test. Which means a vgm pack might be on its way... :)


I'll keep on looking inside the rom to see if I can find the level data, this is the kind of game which deserves a level editor. Because of this I'm not sure if I posted this message in the correct section :|

EDIT: I figured out the formula for the level passwords. See below.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13435
  • Location: London
Reply with quote
Post Posted: Sun Mar 06, 2011 9:51 am
Can you add them here?

http://www.smspower.org/Cheats/PuttAndPutter-GG

It looks like none of this is in the SMS version...
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1183
  • Location: italy
Reply with quote
Post Posted: Sun Mar 06, 2011 12:53 pm
Ok I will add those, but first I would like to come up with a decent presentation for the level passwords since I figured out their format.
Basically they're all made up by 5 letters, which I'll label like this: 1 2 3 4 5. They store three informations: beginner / master mode, hole number, balls left. Then I noticed there are two password for each [mode, hole, balls] combination, which was probably done to attempt to obfuscate them to an extent. However both variations are pretty simple.
First of all, the balls. They can range from 0 to 99 (soft limited, the game itself can go beyond 99 (though displaying only 00 instead of 100, it will keep counting just fine) and give you passwords for 100+ balls, but once those passwords are entered they're rendered as invalid). The number of balls is converted to a hex number, and its two digits are stored separately, but "as is", in letters 4 and 5. By "as is" I mean that you assume A = 0, B = 1, C = 2, ..., and you count upwards. However as I said this can be obfuscated in two ways. In the first way, letter 5 starts from K and not from A. In the second way, letter 4 starts from K and not from A. So 00 is never AA, and never KK.

Meaning that:
00 balls is rendered as AK or as KA
01 balls = AL or KB
02 = AM or KC
03 = AN or KD
...
15 ($0F) = AZ or KP
16 ($10) = BK or LA
...
32 ($20) = CK or MA
48 ($30) = DK or NA
64 ($40) = EK or OA
80 ($50) = FK or PA
96 ($60) = GK or QA
99 ($63) = GN or QD (as you can see, $03 = AN/KD and $63 = GN/QD. The N and the D prove the hex digits (in this case "3") are stored separately).

The third letter is the level number, simple as that. Once again, obfuscated. In the first way, K = 1, and in the second way, A = 1. Trivia: the game itself won't give you passwords for level 1, though they will be valid once entered. So you can start level 1 with 99 balls if you want. On the other hand, you can enter a password only for a level every three, meaning that you can only have passwords for levels 1, 4, 7, 10, 13, and 16. A seemingly well-formed password for other levels will be rejected.

Meaning that the hole number is stored like this:
1 K or A
4 N or D
7 Q or G
10 T or J
13 W or M
16 Z or P

The second letter is the game mode.
Beginner is stored as A or K.
Master is stored as B or L.

The first letter is a checksum of some sort. It can assume 8 (K, M, O, Q, S, U, W, Y) + 8 (B, D, F, H, J, L, N, P) possible values and it depends on [how much the other 4 letters are higher than the base letter] * 2. Basically each time you add 1 somewhere, you add 2 to the checksum.

For example:
?AKAK is the password for beginner hole 1 with 00 balls. What should we put as checksum? Let's count how much the letters are higher than the base letters. K - K = 0, A - A = 0. Let's multiply that by 2, so still 0. Then the checksum is K and the password is KAKAK.
?KAKA is the password for beginner hole 1 with 00 balls. As above, A - A = 0, K - K = 0, 0 * 2 = 0. The checksum is B and the password is BKAKA.

Another example:
?BZGN is the password for master hole 16 with 99 balls. Let's find out the checksum. N - K = 3, G - A = 6, Z - K = 15, B - A = 1. 3 + 6 + 15 + 1 = 25, and 25 * 2 = 50. 50 MOD 16 = 2. K + 2 = M.
The password is MBZGN. Have fun with it.
Likewise, ?LPQD. The checksum is still 2 of course, and B + 2 = D, so DLPQD.

If someone whose primary language is English wants to rewrite this text in a better form, be my guest :P
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1183
  • Location: italy
Reply with quote
Post Posted: Sun Mar 06, 2011 6:20 pm
:D

You can download it from the attachments below. It requires MSVBVM50.DLL and FM20.DLL
I apologise for using FM20.DLL which isn't redistributable, believe me when I say that I hate to use these überprotected libraries, but the regular combobox wasn't working correctly so I had to use this one for the first time in my life. Google for it, there are thousands of websites with lists of DLLs.

I can upload the .vbp and the .frm files if you want, though the only routine of real interest if you want to port it to other languages / platforms is this one (given that you have 4 comboboxes with the same values and indexes as my ones):
DefByte B
Private Sub ComboBox1_Change(Index As Integer)
b2 = ComboBox1(0).ListIndex
b3 = Val(ComboBox1(1).Text) - 1
b4 = ComboBox1(2).ListIndex \ 16
b5 = ComboBox1(2).ListIndex And 15
b1 = ((b2 + b3 + b4 + b5) * 2) Mod 16
Select Case ComboBox1(3).ListIndex
Case Is = 0
Label1.Caption = Chr$(b1 + 75) + Chr$(b2 + 65) + Chr$(b3 + 75) + Chr$(b4 + 65) + Chr$(b5 + 75)
Case Is = 1
Label1.Caption = Chr$(b1 + 66) + Chr$(b2 + 75) + Chr$(b3 + 65) + Chr$(b4 + 75) + Chr$(b5 + 65)
End Select
End Sub

Putter.rar (12.12 KB)
Putt & Putter (Game Gear) Password Generator - Windows 32-bit Executable

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13435
  • Location: London
Reply with quote
Post Posted: Mon Mar 07, 2011 9:38 am
I'll try to write up a Javascript version so I can add it to the site...
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13435
  • Location: London
Reply with quote
Post Posted: Mon Mar 07, 2011 3:17 pm
...done:

http://www.smspower.org/uploads/Cheats/PuttAndPutter-GG-PasswordGenerator.html

...it goes both ways, too.

Regarding the extra passwords:

*GOLF: This can't be entered, because of the asterisk, but if you force it through (edit the ROM or RAM), you do get "Pro" mode, which is using junk data so you get a bunch of other courses and some screwy background colours.

"MOVE ", " PASS", " LIST", "ZERO " (leading/trailing spaces may be important?): some seem to depend on some other flags in RAM, so they need some more research. Bypassing the flag check for LIST makes it list the cheat passwords:

[PUTT ] MASTER MODE
[STAGE] HOLE SELECT
[MOVE ]    MAP CHECK
[STOP ] BALL STOP
[RESET] RESET
[SEGA ] SEGA LOGO
[ZERO ] ZERO CUT

(I can't post a screenshot from here...)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13435
  • Location: London
Reply with quote
Post Posted: Mon Mar 07, 2011 10:15 pm
...and I figured out all the rest of the passwords now, except for ZERO which seems to do nothing (?). They're all at http://www.smspower.org/Cheats/PuttAndPutter-GG with some screenshots too.

The Pro mode is all hole repeats (confirmed using the stage select), but only goes up to hole 9. The ending is then as normal.
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1183
  • Location: italy
Reply with quote
Post Posted: Mon Mar 07, 2011 11:20 pm
The configuration menu seems rather different than the one I get, are we using the same rom?
Mine has a CRC32 of 407AC070.

Anyway, nice work, Maxim. As always :)

I will still look into cracking the level format to see if I can make a level editor or something eventually.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13435
  • Location: London
Reply with quote
Post Posted: Tue Mar 08, 2011 9:05 am
The Export release has the Engrish corrected. A level editor would be awesome but a lot more work :)
  View user's profile Send private message Visit poster's website
  • Joined: 08 Apr 2005
  • Posts: 388
  • Location: Netherlands
Reply with quote
Post Posted: Wed Mar 09, 2011 3:08 pm
Great work, Tom! I always love Putt & Putter (both versions). A level editor would be even better (I'd love to do a level/course pack)
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!