HP Forums
67FUN rom sent to Monte - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: 67FUN rom sent to Monte (/thread-7309.html)



67FUN rom sent to Monte - Gene - 11-25-2016 09:24 PM

First, thanks to all here for their patience as we have been working on this project. I'm surprised by the view counts of the threads and can't help but wonder if many have clicked on them to hope that we had finally finished. :-)

Thanks to Dieter, Robert and all for their help.

Here it is:

67 FUN mod file

67 FUN .rom file

Code:
28 FNCTIONS                XROM #     Description
FCT:  -HP67 FUN+        XROM 23,00    Rom Header
FCT:  "1130"            XROM 23,01    Game of 11-30    
FCT:  "2636"            XROM 23,02    Game of 26 or 36    
FCT:  "ART"             XROM 23,03    Artillery game    
FCT:  "BSP"             XROM 23,04    Battleship    
FCT:  "CH"              XROM 23,05    Chess    
FCT:  "CHK"             XROM 23,06    Chuck-a-luck    
FCT:  "GOLF"            XROM 23,07    Golf    
FCT:  "JT"              XROM 23,08    Jive Turkey    
FCT:  "ML"              XROM 23,09    Moon Lander    
FCT:  "OAB"             XROM 23,10    One Arm Bandit    
FCT:  "SPW"             XROM 23,11    SpaceWar    
FCT:  "ST"              XROM 23,12    Star Trek    
FCT:  "TTT"             XROM 23,13    Tic-tac-toe    
FCT:  "AOS"             XROM 23,14    Algebraic Operating System    
FCT:  "+"               XROM 23,15     -- functions in AOS Program    
FCT:  "-"               XROM 23,16     -- functions in AOS Program    
FCT:  "*"               XROM 23,17     -- functions in AOS Program    
FCT:  "/"               XROM 23,18     -- functions in AOS Program    
FCT:  "<"               XROM 23,19     -- functions in AOS Program    
FCT:  ">"               XROM 23,20     -- functions in AOS Program    
FCT:  "="               XROM 23,21     -- functions in AOS Program    
FCT:  "YX"              XROM 23,22     -- functions in AOS Program    
FCT:  "NEG"             XROM 23,23     -- functions in AOS Program    
FCT:  "SD"              XROM 23,24    Sum of Digits game    
FCT:  "S"               XROM 23,25    Seed? Prompt Store R00 subroutine    
FCT:  "R"               XROM 23,26    Random Number Generator subroutine    
FCT:  "RF"              XROM 23,27    Reset Flags from PPC ROM


More here later on how to play them.

Game of 1130: XROM 23,01

History: This is based on the HP-65 game of Eleven-Thirty written by John Rausch. It appeared in the V2N3P28 issue of PPC Journal (March 1975).

Object: The calculator generates two random numbers between 11 and 30 and displays them as XX.YY (for example, 15.22 could be displayed). The user then places a bet that the next number is equal to or between the two numbers displayed, endpoints inclusive. You win if it is and pay if it is not. Obviously, if 13.14 is displayed, then you should probably bet $0 and so that you will lose $0. If the numbers shown are 13.16 and you bet $0, the program will say you win if the next number is 14, but you won that $0 bet nothing more.

Play:
1) XEQ 1130.
2) At SEED? Prompt, enter a value between 0 and 1, preferably at least 6 decimal digits and press R/S.
3) At POT? Prompt, enter your starting monetary amount you are playing with in the game and press R/S.
4) Calculator displays numbers in the form of XX.YY and asks you to enter a bet. Enter a value for your bet that the next number is between XX and YY and press R/S.
5) Calculator displays WIN or PAY and shows the number generated and the XX.YY range previously.
6) Press R/S to try again.
7) To check your bank at any time, press E in USER mode. Display shows POT=$ZZZ. Press A to play again.

Example game:
See Key
1) XEQ ALPHA 1130 ALPHA
2) SEED? 0.123456789 R/S
3) POT? 50 R/S
4) 24.29 BET? 10 R/S
5) WIN 28–24.29 R/S
6) 13.14 BET? 0 R/S
7) WIN 14–13.14 R/S (Note: You won $0 here)
8) 16.24 BET? 50 R/S
9) PAY 14–16.24 etc.

Specifics:
1) Program is 130 bytes long.
2) Calls XROM 23,25 (Seed? Prompt) and XROM 23,26 (Random Number Generator)
3) Uses registers 00 – 05. SIZE 006 required.
a. 00 – random number seed
b. 01 – first two digit number (XX)
c. 02 – second two digit number (YY)
d. 03 – third two digit number to see if between XX.YY
e. 04 – amount of BET
f. 05 – amount of POT
4) Labels used
a. 01 – Random number routine. Calls XROM R (23,26)
b. 02 – You lost
c. 03 – Common label to display results
d. A – Starts a new game
e. E – Displays POT

Program Listing:

Code:
01 LBL "1130" 
 02 XROM 23,25 
 03 "POT?" 
 04 PROMPT 
 05 STO 05 
 06 LBL A 
 07 XEQ 01 
 08 STO 01 
 09 XEQ 01 
 10 STO 02 
 11 RCL 01 
 12 X<=Y? 
 13 X<>Y 
 14 STO 02 
 15 X<>Y 
 16 STO 01 
 17 X<>Y 
 18  E2 
 19 / 
 20 + 
 21 CLA 
 22 FIX 02 
 23 ARCL X 
 24 >" BET?" 
 25 PROMPT 
 26 STO 04 
 27 FIX 00 
 28 CF 29 
 29 XEQ 01 
 30 STO 03 
 31 RCL 01 
 32 X>Y? 
 33 GTO 02 
 34 RDN 
 35 RCL 02 
 36 X<Y? 
 37 GTO 02 
 38 RCL 04 
 39 ST+ 05 
 40 "WIN " 
 41 GTO 03 
 42 LBL 02 
 43 RCL 04 
 44 ST- 05 
 45 "PAY " 
 46 LBL 03 
 47 ARCL 03 
 48 >"-" 
 49 ARCL 01 
 50 >"." 
 51 ARCL 02 
 52 PROMPT 
 53 GTO A 
 54 LBL 01 
 55 XROM 23,26 
 56 20 
 57 * 
 58 11 
 59 + 
 60 INT 
 61 RTN 
 62 LBL E 
 63 "POT=$" 
 64 ARCL 05 
 65 AVIEW 
 66 END


Game of 2636:

History: This is based on the game of Twenty-six or Thirty-six from the HP 67/97 Users’ Library Solutions Book Games of Chance, page 6. Originally written by Matthew Bishop.

Object:
Game of 26:
You choose a number from 1 to 6 as your number and pay $0.25 to play. The calculator then rolls 10 dice 13 times for a total of 130 numbers of 1 to 6. If your number appears 11 or fewer times, then you win a dollar. If it appears exactly 13 times, then you win $0.50. If it appears 26 or more times, you win $1. If it appears 33 or more times, you win $2. (Note: If your number appears 28 times, you win $1, if it appears 35 times, you win $2 total).

Game of 36: Place a bet (deducted from your account). Player continues to roll dice until he decides to stop or the sum or all numbers rolled exceeds 36 automatically losing. When the first player is done, if his total is 36 or less, the second rolls, following the same procedure. If the second player stops before his or its total exceeds 36, the totals are compared. Whoever comes closes to 36, wins. On a tie, you get your bet back. The calculator will match your bet (winner gets total bet by both players); it uses a simple strategy to decide when to stop rolling dice.

Play:
1) XEQ 2636.
2) At SEED? Prompt, enter a value between 0 and 1, preferably at least 6 decimal digits and press R/S.

3) To play 26, key in die you choose (1-6) and press A.
4) Display pauses and displays a sequence of 10 digit random numbers (13 times).
5) The number of times your number occurs is displayed, followed by the amount you won or lost, followed by your total monetary position. To play again, go back to step 3.

6) To play 36, decide if you wish to go first or you want the calculator to go first.
7) If you wish to go first, enter your bet and press B and the calculator will roll your dice. If you wish to let the calculator go first, enter your bet and press C.
8) The calculator will display your total points and show HP’s points.
9) Continue to let the program run until you wish to stop accumulating your points. If you do not stop before your total goes over 36, then you automatically lose.
10) When you wish to stop, press the decimal point and the calculator will begin accumulating points.
11) If the calculator goes over 36 before it stops, you automatically win.
12) If the calculator stops with its total under 36, the winner is whoever is closer to 36.
13) Go to step 6 to play again.


Example game of 26:
See Key
1) XEQ ALPHA 2636 ALPHA
2) SEED? 0.123456789 R/S
3) BANK=$0.00 6 A (Note: Choose the number 6 and play the game of 26)
4) 5662125224
6411215332

5136614123
27 TIMES
WIN $1.00
BANK=$0.75

5) WIN 28–24.29 R/S
6) 13.14 BET? 0 R/S
7) WIN 14–13.14 R/S (Note: You won $0 here)

Example game of 36:
See Key
1) XEQ ALPHA 2636 ALPHA
2) SEED? 0.123456789 R/S
3) BANK=$0.00 5 B (Note: Bet $5 and go first in a game of 36)
4) You-5 HP-0
You-11 HP-0
You-17 HP-0
You-19 HP-0
You-20 HP-0
You-22 HP-0
You-27 HP-0
You-29 HP-0
You-31 HP-0
You-35 HP-0 Press . quickly (The decimal point)
You-35 HP-6
You-35 HP-10
You-35 HP-11
You-35 HP-12
You-35 HP-14
You-35 HP-15
You-35 HP-20
You-35 HP-23
You-35 HP-26
You-35 HP-28
You-35 HP-30
You-35 HP-35
WIN $0 (Note:A tie game)
BANK=$0.00

Specifics:
1) Program is 297 bytes long.
2) Calls XROM 23,25 (Seed? Prompt) and XROM 23,26 (Random Number Generator)
3) Uses registers 00 – 05. SIZE 006 required.
a. 00 – random number seed
b. 01 – Bank $
c. 02 – times your die occurred in game of 26.
d. 03 – Your score in 36.
e. 04 – HP’s score in 36.
f. 05 – amount of BET
4) Labels used
a. 00 –
b. 01 – Random number routine. Calls XROM R (23,26)
c. 02 – You lost
d. 03 – Common label to display results
e. 06
f. 07
g. 08
h. 09
i. 77
j. 88
k. 99 – Random number generator
l. A – Starts a new game of 26
m. B – Starts a new game of 36 – human first
n. C – Starts a new game of 36 – HP first
o. D – Displays BANK amount.

Program Listing:
Code:
 01 LBL "2636" 
 02 XROM 23,25 
 03 CLX 
 04 STO 01 
 05 GTO D 
 06 LBL 01 
 07 10 
 08 STO 04 
 09 CLX 
 10 LBL 02 
 11 10 
 12 * 
 13 XEQ 99 
 14 RCL 05 
 15 X=Y? 
 16 ISG 02 
 17 LBL 00 
 18 RDN 
 19 + 
 20 DSE 04 
 21 GTO 02 
 22 FIX 00 
 23 CF 29 
 24 VIEW X 
 25 DSE 03 
 26 GTO 01 
 27 PSE 
 28 PSE 
 29 " " 
 30 ARCL 02 
 31 >" TIMES" 
 32 AVIEW 
 33 PSE 
 34 1 
 35 STO 05 
 36 15 
 37 RCL 02 
 38 11 
 39 - 
 40 X<Y? 
 41 X<=0? 
 42 GTO 03 
 43 2 
 44 - 
 45 ABS 
 46 .5 
 47 X<Y? 
 48 INT 
 49 STO 05 
 50 GTO 88 
 51 LBL 03 
 52 22 
 53 X<=Y? 
 54 ISG 05 
 55 LBL 88 
 56 RCL 05 
 57 ST+ 01 
 58 FIX 02 
 59 "WIN $" 
 60 X<0? 
 61 "PAY $" 
 62 ABS 
 63 ARCL X 
 64 AVIEW 
 65 PSE 
 66 LBL D 
 67 CF 01 
 68 SF 27 
 69 FIX 02 
 70 RCL 01 
 71 "BANK=$" 
 72 ARCL 01 
 73 AVIEW 
 74 RTN 
 75 LBL A 
 76 STO 05 
 77 .25 
 78 ST- 01 
 79 13 
 80 STO 03 
 81 CLX 
 82 STO 02 
 83 GTO 01 
 84 LBL B 
 85 SF 01 
 86 CHS 
 87 GTO 07 
 88 LBL C 
 89 CF 01 
 90 LBL 07 
 91 STO 05 
 92 CLX 
 93 STO 04 
 94 STO 03 
 95 9 
 96 STO 02 
 97 FS? 01 
 98 DSE 02 
 99 CF 00 
100 FIX 00 
101 CF 29 
102 XEQ IND 02 
103 FS?C 00 
104 GTO 88 
105 17 
106 ST- 02 
107 XEQ IND 02 
108 RCL 05 
109 CHS 
110 STO 05 
111 FS?C 00 
112 GTO 88 
113 RCL 03 
114 RCL 04 
115 - 
116 X!=0? 
117 SIGN 
118 RCL 05 
119 ABS 
120 * 
121 STO 05 
122 GTO 88 
123 LBL 08 
124 3 
125 XEQ 77 
126 X>0? 
127 FS? 00 
128 RTN 
129 GTO 08 
130 LBL 09 
131 4 
132 XEQ 77 
133 FS? 00 
134 RTN 
135 RCL 03 
136 RCL 04 
137 FS? 01 
138 X=Y? 
139 GTO 06 
140 X<Y? 
141 GTO 09 
142 RTN 
143 LBL 06 
144 33 
145 RCL 04 
146 X<=Y? 
147 GTO 09 
148 RTN 
149 LBL 77 
150 XEQ 99 
151 ST+ IND Y 
152 36 
153 RCL IND Z 
154 X>Y? 
155 SF 00 
156 "YOU-" 
157 ARCL 03 
158 >" HP-" 
159 ARCL 04 
160 AVIEW 
161 PSE 
162 RTN 
163 LBL 99 
164 XROM 23,26 
165 6 
166 * 
167 INT 
168 1 
169 + 
170 END



RE: 67FUN rom sent to Monte - Dieter - 11-27-2016 07:43 PM

(11-25-2016 09:24 PM)Gene Wrote:  Here it is:

I see you added some documentation for the 1130 and 26/36 games. Maybe this deserves a separate PDF, a kind of equivalent to the Games Pac manual. ;-)

A few remarks:

(11-25-2016 09:24 PM)Gene Wrote:  2) At SEED? Prompt, enter a value between 0 and 1, preferably at least 6 decimal digits and press R/S.

The seed does not have to be between 0 and 1, it does not even have to be positive as an ABS FRC sequence makes sure that only the absolute fractional part is stored. If's fine if the user enters any number with a fractional part. He does not even have to enter anything – if he does so the previous seed is used. Also 6, 7 or more decimals are not better than one single digit – the used RNG will generate one million distinct numbers from any seed up to 6 digits long.

BTW, there is a reason why some seeds with "too many" decimals may cause problems. If the resulting first random number is 0,99999 99999 and this is multiplied by something like 3 or 5 the result may round to exactly 3 and 5 so that the usual "INT 1 +" will yield 4 resp. 6. This usually does not happen as the RNG procudes six-digit random numbers, but if the user enters a "dangerous" seed... So the intial seed should be a number with an up to 9-digit fractional part.

Note: the mentioned problem may occur if a random integer between 1 and 2...5 is generated. So rolling a die (1...6) is safe. ;-) The only program that may be affected is the PRS program where a value between 1 and 3 is generated.

(11-25-2016 09:24 PM)Gene Wrote:  10) When you wish to stop, press the decimal point and the calculator will begin accumulating points.
...
You-35 HP-0 Press . quickly (The decimal point)
...

At this point you may press either "0" or "." – boths enters a zero.

(11-25-2016 09:24 PM)Gene Wrote:  Example game of 26:
...
BANK=$0.75

5) WIN 28–24.29 R/S
6) 13.14 BET? 0 R/S
7) WIN 14–13.14 R/S (Note: You won $0 here)

The last lines seem to be left over from the 1130 example. ;-)

Dieter


RE: 67FUN rom sent to Monte - Gene - 11-27-2016 09:45 PM

Yes, a PDF eventually!

I will be glad to create a shell document for the remaining programs and perhaps we can collaborate on the final result?


RE: 67FUN rom sent to Monte - Dieter - 11-28-2016 07:27 PM

(11-27-2016 09:45 PM)Gene Wrote:  Yes, a PDF eventually!

I will be glad to create a shell document for the remaining programs and perhaps we can collaborate on the final result?

Gene, I fear you will have to provide more that just a shell. At least if the PDF is written in English – German is another case. ;-) I'll be glad to offer what I can do here, but I think that's not much.

I also think the PDF should contain some pictures or illustrations for each program, similar to the original HP manuals. Maybe we have someone here that can do something like this...

Dieter


RE: 67FUN rom sent to Monte - Gene - 11-28-2016 07:34 PM

I'm thinking more of the details of some of the programs, especially the ones you wrote or modified...such as register usage - what the memories contain... label usage - LBL 01 is for XYZ, etc.

I can handle the sample games, listings, etc. It's the technical details that I could use help with.


RE: 67FUN rom sent to Monte - Dieter - 11-28-2016 08:29 PM

(11-28-2016 07:34 PM)Gene Wrote:  I'm thinking more of the details of some of the programs, especially the ones you wrote or modified...such as register usage - what the memories contain... label usage - LBL 01 is for XYZ, etc.

I can handle the sample games, listings, etc. It's the technical details that I could use help with.

Some programs have been more or less completely rewritten, others only have been modified. Of course I know the former better than the latter, but I think I can provide some of these "technical details".

Dieter