TenPinSolitaire

From ThorxWiki
(Difference between revisions)
Jump to: navigation, search
m (link fix)
(first writeup, seso, unfinished)
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
My [[PalmPilot]] has this nifty and addictive game called [[TenPin]] Solitaire.
+
My PalmPilot has this nifty and addictive game called TenPin Solitaire.
   
 
It runs like this: you are presented with:
 
It runs like this: you are presented with:
Line 12: Line 12:
 
----
 
----
   
Now, being the happy little hacker wannabe that I am, I found recently that I have a hex editor on my pilot - and of course, the [[TenPin]] db is a nice little 240byte memory dump of the current game state and highscore table.
+
Now, being the happy little hacker wannabe that I am, I found recently that I have a hex editor on my pilot - and of course, the TenPin db is a nice little 240byte memory dump of the current game state and highscore table.
   
 
Now if we assume that the aim of the game is to get the highest possible score, then is the method really relevant? *grins*
 
Now if we assume that the aim of the game is to get the highest possible score, then is the method really relevant? *grins*
Line 19: Line 19:
   
 
Notes
 
Notes
* Many values seem to be stored in 16bit segments - given the [[[PalmPilot]]|Palm IIIxe] that I have runs on a 16bit dragonball CPU, this makes sense. Word. :)
+
* Many values seem to be stored in 16bit segments - given the PalmIIIxe that I have runs on a 16bit dragonball CPU, this makes sense. Word. :)
* The memory dump given in the example below is of a completed game as follows:
 
 
. (_) (_) (_) (_) [-] [-] [1]
 
. [-] [4]
 
. (_) (7) (_) [0]
 
.
 
. (_) (_)
 
. (*)
 
. (_)
 
.
 
. 7- 6/ X_ X_ 9-
 
. 7 27 56 75 84
 
.
 
. X_ 9/ 32 9- 9/9
 
. 104 117 122 131 150
 
   
 
Bytes 00-19 - 10 words containing 1bit toggles of the visibility of the 10 pins
 
Bytes 00-19 - 10 words containing 1bit toggles of the visibility of the 10 pins
000: 00 00 00 00 00 00 00 00
+
00 01 00 01 00 01 00 01
008: 00 00 00 '''01''' 00 00 00 00 Here you see that the sixth pin is visible
+
00 01 00 01 00 01 00 01
016: 00 00 00 00
+
00 01 00 01
   
 
Bytes 20-39 - 10 words containing the values on pins - left to right, back row first
 
Bytes 20-39 - 10 words containing the values on pins - left to right, back row first
00 02 00 05
+
00 00 00 00
024: 00 00 00 08 00 06 00 07
+
00 00 00 00 00 00 00 00
032: 00 09 00 01 00 03 00 03
+
00 00 00 00 00 00 00 00
 
Bytes 40-59 - 10 words containing the values on cards - back to front, left row first
 
040: 00 04 00 08 00 00 00 07
 
048: 00 06 00 02 00 04 00 05
 
056: 00 01 00 09
 
 
Bytes 60-65 - 3 words containing the count of cards on each of the three stacks of cards
 
00 03 00 02
 
064: 00 01
 
   
Bytes 66-83 - unknown, though I have some guesses
 
00 01 00 04 00 00
 
072: 00 00 00 00 00 01 00 01
 
080: 00 0A 00 01
 
From observation, I'm guessing these for the bytes
 
* 67,69,71: The positional values of the last selected pins (values 0 - 9)
 
* 73: no idea. has been 0 or 1 on every observation
 
* 75: no idea, has been 0 or 1 on every observation
 
* 77: Current ball number in play (can only be either 0, 1 or 2)
 
* 79: no idea. Has been 0 on every observation
 
* 81: Count of completed frames (normally 0 - 9, but value 0A means 10 frames completed and that we are then on the eleventh)
 
* 83: Game over toggle. 0=game in progress, 1=gameover
 
I'd vaguelly assume that 73 and 75 are values for 'how many cards selected' and 'what stack the last card selected was from' to allow for an undo option (79 would also have to be a toggle to say 'undo permissable' - ie, 'no new pins chosen since last card removed' flag). If nothing else, then 73 or 75 should at least be the count of cards selected, since that information is definately stored!)
 
   
Bytes 84-155 - 3 words containing frame information, repeated 12 (though surely only 11 are needed?) times.
+
00 00 00 00 00 00 00 00
* First word - pins struck on first ball
+
00 00 00 00 00 00 00 00
* Second word - pins struck on second ball
+
00 00 00 00 00 00 00 00
* Third word - score added on this frame
+
00 00 00 00 00 00 00 00
00 '''07''' 00 '''00''' Frame 1: 7,0
+
00 00 00 00 00 00 00 00
088: 00 07 00 '''06''' 00 '''04''' 00 14 Frame 2: 6,4
+
00 00 00 00 00 00 00 00
096: 00 '''0A''' 00 00 00 1D 00 '''0A''' Frame 3: 10 Frame 4: 10
+
00 00 00 00 00 00 00 00
104: 00 00 00 13 00 '''09''' 00 '''00''' Frame 5: 9,0
+
00 00 00 00 00 00 00 00
112: 00 09 00 '''0A''' 00 00 00 14 Frame 6: 10
+
00 00 00 00 00 00 00 00
120: 00 '''09''' 00 '''01''' 00 0D 00 '''03''' Frame 7: 9,1 Frame 8: 3,2
+
00 00 00 00 00 00 00 00
128: 00 '''02''' 00 05 00 '''09''' 00 '''00''' Frame 9: 9,0
+
00 00 00 00 00 00 00 00
136: 00 09 00 '''09''' 00 '''01''' 00 13 Frame 10: 9,1
+
00 00 00 00 00 00 00 00
144: 00 '''09''' 00 00 00 09 00 63 Frame 11: 9
+
00 00 00 00 00 00 00 00
152: 00 63 00 63 Space for a 12th frame?
+
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
  +
00 00 00 00 00 00 00 00
   
'''todo: finish hexdump transcribing from here down'''
 
   
Bytes 156-215 - High score table - names: 10 bytes for names (6 bytes for name, then '21 21 00 00' as seperator), 6 fields total.
 
4E 65 6D 6F Nemo
 
160: 00 00 21 21 00 00 74 65 !! te
 
168: 72 72 69 00 21 21 00 00 rri !!
 
176: 4E 65 6D 6F 00 00 21 21 Nemo !!
 
184: 00 00 74 65 72 72 69 00 terri
 
192: 21 21 00 00 54 65 72 72 !! Terr
 
200: 69 00 21 21 00 00 4E 65 i !! Ne
 
208: 6D 6F 00 00 21 21 00 0C mo !! Note that the table ends with 0C
 
   
Bytes 216-239 - High score table - scores: 4bytes for score value, 6 fields.
 
216: 00 00 00 AB 00 00 00 A9 High scores of 171, 169
 
224: 00 00 00 A8 00 00 00 A7 168, 167
 
232: 00 00 00 A4 00 00 00 A2 164, 162
 
   
 
----
 
----
Line 81: Line 54:
 
Links:
 
Links:
   
* [[TenPin]] Solitaire
+
* TenPin Solitaire
* [[FileZ]] (hex editor)
+
* FilezZ (hex editor)

Revision as of 13:53, 17 December 2003

My PalmPilot has this nifty and addictive game called TenPin Solitaire.

It runs like this: you are presented with:

  • 10 pins, with numbers 0-9 on them.
  • 10 cards numbered 0-9, in three stacks (with 5, 3 and 2 cards in the stacks).

On your first 'bowl', you get the 10 cards. The aim is to select pins (up to three, must be adjacent, may not select from back row on the first selection set) that add up to a card value (mod 10: so 7+7 = 14 = select card 4). The selected pins and card vanish. Repeat. For the second bowl, the top card on each stack is removed, revealing (hopefully) new values beneath to continue.

The pin and card values appear to be chosen randomly. There is no guarantee made that a strike or spare is possible every turn.


Now, being the happy little hacker wannabe that I am, I found recently that I have a hex editor on my pilot - and of course, the TenPin db is a nice little 240byte memory dump of the current game state and highscore table.

Now if we assume that the aim of the game is to get the highest possible score, then is the method really relevant? *grins*

Anyways, here is my analysis of the memory dump...

Notes

  • Many values seem to be stored in 16bit segments - given the PalmIIIxe that I have runs on a 16bit dragonball CPU, this makes sense. Word. :)

Bytes 00-19 - 10 words containing 1bit toggles of the visibility of the 10 pins

00 01 00 01 00 01 00 01
00 01 00 01 00 01 00 01
00 01 00 01

Bytes 20-39 - 10 words containing the values on pins - left to right, back row first

            00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00


00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00




Links:

  • TenPin Solitaire
  • FilezZ (hex editor)
Personal tools
Namespaces

Variants
Actions
Navigation
meta navigation
More thorx
Tools