Slam!
- AutoAdmin
- Forum Administrator
- Posts: 616
- Joined: July 26th, 2005, 5:01 pm
- Contact:
- DOSGuy
- Website Administrator
- Posts: 1063
- Joined: September 2nd, 2005, 8:28 pm
- Contact:
Re: Slam!
I remember having a problem where, if I tried to slam the puck really hard, the paddle would get more than half way through the puck before the collision was detected, causing the puck to shoot backwards out of it, into my own net!
It's also quite possible to knock the puck off of the table by slamming it into a corner. The game isn't programmed to get it back!
It's also quite possible to knock the puck off of the table by slamming it into a corner. The game isn't programmed to get it back!
Today entirely the maniac there is no excuse with the article.
- DOSGuy
- Website Administrator
- Posts: 1063
- Joined: September 2nd, 2005, 8:28 pm
- Contact:
- DOSGuy
- Website Administrator
- Posts: 1063
- Joined: September 2nd, 2005, 8:28 pm
- Contact:
Re: Slam!
That's the shareware version still. Robert Epps gave me permission to declare the game freeware in an email. I asked about getting a code to disable the nag screen, but he says the source code is probably on a 5.25" floppy disk that's not conveniently accessible. Hopefully that will happen in the future, but don't hold your breath.
Today entirely the maniac there is no excuse with the article.
-
- Less than a nibble
- Posts: 12
- Joined: June 23rd, 2008, 12:11 am
Re: Slam!
I used to play Slam! a fair amount, so I decided that instead of hacking the EXE, I'd decode the registration routine. I found it to be quite an interesting system.
Working Registration Codes:
0004400531700101
4040010531000071
1212414271771111
Creating More Codes:
A successful registration code is as follows:
Order Table:
0123456789ABCDEF
Multiplication Table
1 * 6 * B * C
+
3 * 4 * A * D
+
7 * 8 * 9 * F
+
0 * 2 * 5 * E
Mod (Calc.exe, scientific mode)
500
=
127 (7F hex)
so...
70 hex (112) =
4 / 4 / 7
4 * 4 * 7 * 1
0F hex (15) =
5 / 3
5 * 3 * 1 * 1
0s for the unused sections, though anything multiplied by 0 is 0, so that gives a lot of room for dummy data. No need when the calculation for it is above.
Used as a test to see if I'd really gotten it all right...
2 * 4 * 7 * 1
2 * 4 * 7 * 1
2 * 7 * 1 * 1
1 * 1 * 1 * 1
Working Registration Codes:
0004400531700101
4040010531000071
1212414271771111
Creating More Codes:
A successful registration code is as follows:
Order Table:
0123456789ABCDEF
Multiplication Table
1 * 6 * B * C
+
3 * 4 * A * D
+
7 * 8 * 9 * F
+
0 * 2 * 5 * E
Mod (Calc.exe, scientific mode)
500
=
127 (7F hex)
so...
70 hex (112) =
4 / 4 / 7
4 * 4 * 7 * 1
0F hex (15) =
5 / 3
5 * 3 * 1 * 1
0s for the unused sections, though anything multiplied by 0 is 0, so that gives a lot of room for dummy data. No need when the calculation for it is above.
Used as a test to see if I'd really gotten it all right...
2 * 4 * 7 * 1
2 * 4 * 7 * 1
2 * 7 * 1 * 1
1 * 1 * 1 * 1
- DOSGuy
- Website Administrator
- Posts: 1063
- Joined: September 2nd, 2005, 8:28 pm
- Contact:
Re: Slam!
Nice work! So to be a valid code, it has to be a 16 digit number that passes the equation:
((1st * 3rd * 6th * 15th) + (2nd * 7th * 12th * 13th) + (4th * 5th * 11th * 14th) + (8th * 9th * 10th * 16th)) mod 500 = 127.
Useless trivia: 127 was presumably chosen because it is the largest number that can fit in a signed 8-bit variable. In binary it would be 01111111. 11111111 would be a negative number because the highest order digit in a signed variable represents whether the number is positive or negative (0 = positive, 1 = negative). If the "sign bit" is 1, then everything is flipped for the rest of the byte, making 0s worth 1 and 1s worth 0, so 11111111 = -1. The system is called "two's complement", and it's the most logical system for computers to understand.
So, there are ten quadrillion numbers that can be tested and, at first glance, theoretically only about 1/500th of all numbers would come out to 127 when mod 500 is applied (the remainder must be 127 when the number is divided by 500). That's a simplistic analysis because there's a lot of math that goes on before the mod 500 occurs.
I'm fascinated by numbers and wanted to know how many valid codes there are. I wrote a program to brute force test every number for validity, and confirmed that it was producing valid codes. It would take forever to find every valid code, but I did test it using only codes where every number was between 0 and 4. There are 5^16 numbers in that range (152 billion numbers), of which 24 876 192 were valid codes (1 out of 6134). It took about 20 minutes to run. At that rate, it would take 2.5 years to find all of them. This tells us very little about how many valid codes there are, because codes with larger numbers are more likely to be valid, since anything times 0 is 0. When I performed the same test using only numbers between 5 and 9, which is also a 5^16 range, it found 189 157 400 valid codes (1 out of 806) and it took 23 minutes. At that rate it would take 2.9 years to find them all. There's surely a more intelligent way of looking for them than brute force, but brute force is always the easiest to program.
A given code is far more likely to be valid if there's a good mix of numbers, rather than the 0-4 and 5-9 experiments I did, so it's still possible that the overall odds of a code being valid are 1 in 500, which means you would have a decent chance of guessing a code if you knew that the codes were 16 digits (which you would have no way of knowing). Incidentally, the smallest valid code is 0001100117800809 and the largest is 9999999999983999.
((1st * 3rd * 6th * 15th) + (2nd * 7th * 12th * 13th) + (4th * 5th * 11th * 14th) + (8th * 9th * 10th * 16th)) mod 500 = 127.
Useless trivia: 127 was presumably chosen because it is the largest number that can fit in a signed 8-bit variable. In binary it would be 01111111. 11111111 would be a negative number because the highest order digit in a signed variable represents whether the number is positive or negative (0 = positive, 1 = negative). If the "sign bit" is 1, then everything is flipped for the rest of the byte, making 0s worth 1 and 1s worth 0, so 11111111 = -1. The system is called "two's complement", and it's the most logical system for computers to understand.
So, there are ten quadrillion numbers that can be tested and, at first glance, theoretically only about 1/500th of all numbers would come out to 127 when mod 500 is applied (the remainder must be 127 when the number is divided by 500). That's a simplistic analysis because there's a lot of math that goes on before the mod 500 occurs.
I'm fascinated by numbers and wanted to know how many valid codes there are. I wrote a program to brute force test every number for validity, and confirmed that it was producing valid codes. It would take forever to find every valid code, but I did test it using only codes where every number was between 0 and 4. There are 5^16 numbers in that range (152 billion numbers), of which 24 876 192 were valid codes (1 out of 6134). It took about 20 minutes to run. At that rate, it would take 2.5 years to find all of them. This tells us very little about how many valid codes there are, because codes with larger numbers are more likely to be valid, since anything times 0 is 0. When I performed the same test using only numbers between 5 and 9, which is also a 5^16 range, it found 189 157 400 valid codes (1 out of 806) and it took 23 minutes. At that rate it would take 2.9 years to find them all. There's surely a more intelligent way of looking for them than brute force, but brute force is always the easiest to program.
A given code is far more likely to be valid if there's a good mix of numbers, rather than the 0-4 and 5-9 experiments I did, so it's still possible that the overall odds of a code being valid are 1 in 500, which means you would have a decent chance of guessing a code if you knew that the codes were 16 digits (which you would have no way of knowing). Incidentally, the smallest valid code is 0001100117800809 and the largest is 9999999999983999.
Today entirely the maniac there is no excuse with the article.
-
- Classic Game Author
- Posts: 1
- Joined: June 24th, 2008, 5:03 pm
Re: Slam!
Hi, I'm the original author of this game (and another Windows game called "Alien Force"). I'm sorry about the stupid nag window - if I ever find the source code I'll put it up so you guys can hack it all you want. I have the code on a big old 5" hard drive that I can't currently connect to anything (and probably an equally useless 5" floppy somewhere as well).
- DOSGuy
- Website Administrator
- Posts: 1063
- Joined: September 2nd, 2005, 8:28 pm
- Contact:
Re: Slam!
It's great to have you here, Mr. Epps!
I'm a long way from where you are, but if all else fails, I have the tools to read old hard drives and floppy disks. I collected a box full of 5.25" floppy disk drives when I realized that they were disappearing and I still have one in my main computer (the BIOS only allows one floppy drive, so I have to switch between using the 3.5" and 5.25" drives), and I have a CatWeasel IV for reading disks in any format and recovering data from unreadable disks. As for old hard drives, those usually don't work on modern computers because the BIOS won't support them. I have a 486 that can read really old hard drives, and I'm using a Compact Flash-to-IDE adapter to use a CF card as hard drive. I can copy the data off of any old hard drive to the CF card, then pop it out and put it in the card reader on my main computer. Basically, I'm equipped to recover data from anything.
I'm a long way from where you are, but if all else fails, I have the tools to read old hard drives and floppy disks. I collected a box full of 5.25" floppy disk drives when I realized that they were disappearing and I still have one in my main computer (the BIOS only allows one floppy drive, so I have to switch between using the 3.5" and 5.25" drives), and I have a CatWeasel IV for reading disks in any format and recovering data from unreadable disks. As for old hard drives, those usually don't work on modern computers because the BIOS won't support them. I have a 486 that can read really old hard drives, and I'm using a Compact Flash-to-IDE adapter to use a CF card as hard drive. I can copy the data off of any old hard drive to the CF card, then pop it out and put it in the card reader on my main computer. Basically, I'm equipped to recover data from anything.
Today entirely the maniac there is no excuse with the article.
- leilei
- File Contributor
- Posts: 465
- Joined: August 16th, 2007, 2:45 pm
Re: Slam!
Not in my case, I tried to recover a 7mb hd in my high-end computer the other day, the drive showed up and was accessible immediatelyDOSGuy wrote:As for old hard drives, those usually don't work on modern computers because the BIOS won't support them.
But yeah 5" floppy drives can be a pain to access. You'd practically have to build a 486 computer with an appropriate floppy controller for that task.
-
- Less than a nibble
- Posts: 12
- Joined: June 23rd, 2008, 12:11 am
Re: Slam!
I was looking through the source a bit more, and found out there actually IS a way to change the number of points before the game ends.
Open the file "C:\windows\wslam.ini" after running and closing wslam.exe at least once.
At the end of the file, make a new line, and put this there:
PointsToWin=11
11 is the default number. Change it to whatever number you feel like.
I also found a variable called "TimeIncrement". It defaults to 0, and doesn't have any apparent function from seeing it's effect on the game.
Color Settings Possible(A few can't actually be set from the game):
TopWallColor
InsideLRWallColor
InsideRearWallColor
TableSurfaceColor
TableEdgeColor
TableLineColor
FaceColor
PuckColor
PaddleColor
ScoreColor
BackgroundColor
Enjoy the stuffs.
Open the file "C:\windows\wslam.ini" after running and closing wslam.exe at least once.
At the end of the file, make a new line, and put this there:
PointsToWin=11
11 is the default number. Change it to whatever number you feel like.
I also found a variable called "TimeIncrement". It defaults to 0, and doesn't have any apparent function from seeing it's effect on the game.
Color Settings Possible(A few can't actually be set from the game):
TopWallColor
InsideLRWallColor
InsideRearWallColor
TableSurfaceColor
TableEdgeColor
TableLineColor
FaceColor
PuckColor
PaddleColor
ScoreColor
BackgroundColor
Enjoy the stuffs.
- DOSGuy
- Website Administrator
- Posts: 1063
- Joined: September 2nd, 2005, 8:28 pm
- Contact:
Re: Slam!
That is incredibly cool. I have to try this out to find out what happens when you set the number higher. There's only so much room on the side of the board to keep track of the score.
It turns out that 57 points will fit on the frame, after which point the score dots will appear in the space beyond the board. For the human, a 58th point can be seen before the points go beyond the top of the screen, while the computer can fit a 59th point before his 60th goes off the bottom of the screen.
It turns out that 57 points will fit on the frame, after which point the score dots will appear in the space beyond the board. For the human, a 58th point can be seen before the points go beyond the top of the screen, while the computer can fit a 59th point before his 60th goes off the bottom of the screen.
Today entirely the maniac there is no excuse with the article.