Thread for 67FUN2 game rom program development
|
11-22-2016, 08:02 PM
Post: #1
|
|||
|
|||
Thread for 67FUN2 game rom program development
No, I'm not suggesting a "jump right in" approach to this, but I'm posting a candidate or two for the next effort. As time permits, optimizing these can move ahead.
Robert has a version of a game of Bowling. Not a bowling scorekeeper program, but one that allows you to bowl. Post it in this thread when you can. Here is a game I have hastily rewritten from a HP 67 User's Library program: Paper, Rock, Scissors. Goal: Choose paper, rock or scissors and try to beat the calculator. Get to a score of 10 wins first to beat it. Each win is +1. Each loss is -1. Paper is A, Rock is B and CUT (scissors is too long) is C. Obviously, the Seed? and RN routine would be modified as we did in 67FUN previously. .raw file: PRS Original program PDF - note that this has been modified already, but for reference purposes: PDF And text listing of program here: Code: 01 LBL "PRS" |
|||
11-22-2016, 10:37 PM
(This post was last modified: 11-22-2016 11:21 PM by Dieter.)
Post: #2
|
|||
|
|||
RE: Thread for 67FUN2 game rom program development
(11-22-2016 08:02 PM)Gene Wrote: Here is a game I have hastily rewritten from a HP 67 User's Library program: Paper, Rock, Scissors. How do you like the attached version? The program uses a very compact evaluation routine – no flags, no elaborate tests, and the XROM version does it in 157 bytes. PRS2a has its own seed prompt and RNG, while PRS2_XROM uses the two XROM functions of the Games ROM. Code: XEQ "PRS" SEED? The program uses a synthetic RCL d/STO d to save/restore the display setting. BTW, there also is an alternate version that displays both players in one line: Code: [B] ROCK Dieter |
|||
11-23-2016, 01:21 AM
Post: #3
|
|||
|
|||
RE: Thread for 67FUN2 game rom program development
Great, thank you.
Here are a few more to have on file here as time permits for anyone to convert to the HP 41. I'm well aware this is a LONG term effort, but just in case - :-) HP-33E Time Traveler HP-67 Catch me HP-67 Mine Field HP-67 Pegs HP-67 Othello from the museum posting HP-67 Shooting Gallery Then some .raw files we had seen before but deferred: HP-67 Wari HP-67 Roulette Bell Fruit Slot machine - another good one Here is a link to a 50MB .zip file of some HP-67 programs - some from PPC and some from the User's Library: Worth downloading... .zip of HP-67 programs |
|||
11-23-2016, 01:58 PM
(This post was last modified: 11-23-2016 02:07 PM by Dieter.)
Post: #4
|
|||
|
|||
RE: Thread for 67FUN2 game rom program development
(11-22-2016 10:37 PM)I Wrote: The program uses a very compact evaluation routine – no flags, no elaborate tests Maybe I should explain how this works. Let Paper=3, Rock=2 and Scissors=1. If a and b are the moves of the two players, then (a–b) mod 3 returns 1 or 2 if the first resp. second player wins. Zero represents a tie. This works if –2 mod 3 is evaluated as 1, like the 41 does it (on the 34s use MOD, not RMDR). On calculators without mod function you simply add 3 if a–b is negative. You can even go one step further and calculate 2x this minus 3 to get –1 or +1 for the score counter (a tie has to be handled separately). If you prefer Paper=1, Rock=2 and Scissors=3, as in the original program, simply replace a–b with b–a. Or change the logic (1 = player 1 loses, 2 = player 2 loses). So the score evaluation in PRS2a can be done in just three steps (51...53): Y and X hold the player's and HP's move, and "– 3 MOD" yields 1 (player wins) or 2 (HP wins) or 0 (a tie). In the latter case the program jumps to LBL 04, else the test whether X is 1 or 2 is done with a DSE X. This yields 0 or 1, and if it's 1, DSE tests true and jumps to LBL 05 (HP wins), else the player wins. Another elegant option could be a simple indirect jump. This method is used in the following variation of the game. Here also the original definition Paper=1, Rock=2 and Scissors=3 was used and the both players' moves are displayed in one line. Here is the listing: Code: 01 LBL "PRS" That's 161 Bytes including seed prompt, RNG and an additional restart label E. If you don't know how to enter the synthetic RCL d and STO d commands, simply replace line 18/19 with FIX 4 SF 29 and omit the RCL d in line 13. Dieter |
|||
11-23-2016, 09:18 PM
(This post was last modified: 11-24-2016 07:30 AM by Dieter.)
Post: #5
|
|||
|
|||
RE: Thread for 67FUN2 game rom program development
(11-22-2016 10:37 PM)Dieter Wrote: BTW, there also is an alternate version that displays both players in one line: The one-line display of course works best if the three symbols do not have more than six, perferably five characters so that they fit the 12-character display of the 41. I tried this with a localized version in German (with "Stein", "Papier", "Schere" – all with 5 or 6 characters) which at least fits with a colon as a separator. How would you do this in English? Maybe replace the rock with a stone and the scissors with a knife ?-) This would fit the display perfectly. BTW, in Germany this game is called "Schnick-Schnack-Schnuck". I think this sounds much more charming than "Stein, Schere, Papier". ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)