(HP32SII) Mastermind game based on HP-41 version by Wouter Peters
|
02-17-2024, 08:01 PM
Post: #1
|
|||
|
|||
(HP32SII) Mastermind game based on HP-41 version by Wouter Peters
Hi all,
starting from the Mastermind game for HP-41 created by Wouter Peters and posted in HP Museum at the following link: https://www.hpmuseum.org/software/41/41master.htm I've translated and adapted it to HP-32SII calculator. The resulting game is simpler due to the limited features of HP-32SII with respect to HP-41 (no sound, no printer, less memory, etc.) Below the program. Best regards, Davide M01 LBL M CK=B5C3 9 M02 CLVARS M03 SF 10 M04 FIX 0 M05 4 M06 STO J A01 LBL A CK=B6CF 19,5 A02 RANDOM A03 6 A04 * A05 IP A06 1 A07 + A08 RCL J A09 STO i A10 x<>y A11 STO (i) A12 DSE J A13 GTO A B01 LBL B CK=4F2F 53 B02 INPUT Z B03 1E4 B04 / B05 X^2 B06 XEQ Y B07 STO E B08 XEQ Y B09 STO F B10 XEQ Y B11 STO G B12 XEQ Y B13 STO H B14 RCL A B15 STO K B16 RCL B B17 STO L B18 RCL C B19 STO M B20 RCL D B21 STO N B22 5 B23 STO O B24 11 B25 STO P B26 4 B27 STO J B28 STO R B29 STO Q B30 STO- Q C01 LBL C CK=9E91 22,5 C02 RCL O C03 STO i C04 RCL (i) C05 RCL P C06 STO i C07 x<>y C08 RCL (i) C09 X=Y? C10 GTO D C11 1 C12 STO+ P C13 DSE J C14 GTO C C15 GTO E D01 LBL D CK=3131 12 D02 ISG Q D03 STO X D04 PI D05 RCL P D06 STO i D07 x<>y D08 STO (i) E01 LBL E CK=40E1 70,5 E02 1 E03 STO+ O E04 11 E05 STO P E06 4 E07 STO J E08 DSE R E09 GTO C E10 STO I E11 STO- I E12 RCL A E13 RCL E E14 x=y? E15 ISG I E16 STO X E17 RCL B E18 RCL F E19 x=y? E20 ISG I E21 STO X E22 RCL C E23 RCL G E24 x=y? E25 ISG I E26 STO X E27 RCL D E28 RCL H E29 x=y? E30 ISG I E31 STO X E32 RCL I E33 4 E34 X=y? E35 GTO J E36 “BL” [Note: to be inserted as equation with EQN] E37 RCL I E38 STOP E39 “WH” [Note: to be inserted as equation with EQN] E40 STO- Q E41 RCL Q E42 STOP E43 GTO B J01 LBL J CK=AE2E 15 J02 "RIGHT" [Note: to be inserted as equation with EQN] J03 CF 10 J04 ALL J05 RTN Y01 LBL Y CK=EA78 10,5 Y02 LAST x Y03 FP Y04 10 Y05 * Y06 IP Y07 RTN |
|||
02-17-2024, 09:23 PM
(This post was last modified: 02-17-2024 09:32 PM by Johnh.)
Post: #2
|
|||
|
|||
RE: (HP32SII) Mastermind game based on HP-41 version by Wouter Peters
Nice work! Mastermind is a great logic game and very suitable for coding. I'm not familiar with Hp32 code, but it looks like it wouldn't be too hard to bring it forward to other models such as Hp35s?
I used to play it as a board game in the '70's when it was very popular, but we dont seem to hear of it much these days. The link in the post above explains it. I wrote a program for it on a TI58, in 1979, and I still have it written out in pencil. Also, far more crazy, I built a machine to play it in 1977. It used a Sinclair Cambridge calculator (a basic 4-function calc), wired with an umbilical cord of wires to supply power and engage each key. That went to a hardwired logic circuit of TTL chips to feed it key strokes in sequence and display the results. Pointless fun for a young nerd! |
|||
02-18-2024, 12:47 PM
Post: #3
|
|||
|
|||
RE: (HP32SII) Mastermind game based on HP-41 version by Wouter Peters
(02-17-2024 09:23 PM)Johnh Wrote: Nice work! Mastermind is a great logic game and very suitable for coding. I'm not familiar with Hp32 code, but it looks like it wouldn't be too hard to bring it forward to other models such as Hp35s? Yes, I think it should be translated without any particular issue also for other programmable calculators; the only "special" programming technique involved, I guess, it's the usage indirect store and recall functions, which on HP-41 I've understood it can be done with any register while for example on HP-32SII you can only do it with one specific register (the "i"), so you've to deal with this limitation (and the limited memory!). On the other side HP-32SII has a built in Random number generator so I've been able a whole routine in the original version for HP-41 with just command (1.5 byte instead of 10 bytes I guess). Yes, me too I've spent a lot of time playing with Mastermind tabletop version of the game with my family in my youth. As you said, I've never seen it around in these days, it's a pity since it's a really funny game. What you did with the Sinclair Cambridge I bet it has been a lot of fun too! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)