4K HP 67 Games rom attached for testing
|
10-24-2016, 06:54 PM
Post: #1
|
|||
|
|||
4K HP 67 Games rom attached for testing
Thanks to Angel and a bit of editing, here is a 4K first stab at an HP 67 to HP 41 games rom.
This is only 4K and had several items cut. Partly this is to get rid of some games that were going to be tough to play (Dog race is one). The other reason is that we are all busy and I'm not sure how much more effort we can bring to bear on this project. I'm considering asking Angel (and the community here) about two 4K roms eventually with HP 67 games on it. If that sounds ok, then this is the first. It **does** still require the card reader rom to be plugged in (really or virtually). This includes the updated games people in the previous thread adapted (thank you!) and a couple that are direct translations. Thoughts? Is this good to go for a first 4K entry and maybe another 4K to come ? Contents: Code: -XROM----ADDR--FUNCTION -------------- Link to 4K .rom file: .rom file Link to 4K .mod file: .mod file |
|||
10-25-2016, 05:54 AM
Post: #2
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-24-2016 06:54 PM)Gene Wrote: It **does** still require the card reader rom to be plugged in (really or virtually). IMHO this is a no-go for an HP41 ROM module. There should, or even must not be any dependencies from other modules. The programs I worked on do not use any of the 67 compatibility functions, and IIRC for the ones done by RpbertM at least one version without these functions has been posted. I think all remaining cases where these 67 functions are still included can be recoded to run on a regular 41. Which programs are affected? Dieter |
|||
10-25-2016, 06:10 AM
Post: #3
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-25-2016 05:54 AM)Dieter Wrote: IMHO this is a no-go for an HP41 ROM module. There should, or even must not be any dependencies from other modules. While this stance has merit in the case of HP-67 compatible functions, I don't agree with the idea as a blank statement. Those "self-contained" modules tend to have lost of code repetitions to remove the dependencies, eating up lots of ROM space - not used for more advanced features. Take for instance the Library#4, used by half a dozen of other modules - or the SandMath , required by several programs in the SandMatrix. Each builds up on the previous one, and the final result is greater than the sum of its parts. Back to the 67 Games - two 4k ROMS or one 8k-ROM? Both scenarios are possible... "To live or die by your own sword one must first learn to wield it aptly." |
|||
10-25-2016, 10:28 AM
Post: #4
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
I am going through the programs and testing them now. CH67 (chess) for example requires card reader functions. It uses a 7DSP1 to set fix 1 and then 7DSP9 to set fix 9. It also uses 7P<>S a lot to recall memories 10, 11, 12, etc. in this form: 7P<>S RCL 1 7P<>S. Easy to fix, but still there for now. It also ends with two steps RTN and END. The 2nd to last step is unneeded. :-)
I'll post more here. I'm tending toward two 4K roms because the effort/enthusiasm to keep recoding these will tend to fall off and I'd like to get a 4K done and then perhaps another 4K one done. I'm already pushing things here by begging Angel :-) for help making the rom and then again with begging for help coding/testing these. Let's see if a 4K no dependency rom can be done. Otherwise, this 4K rom will plug into 4L and the card reader rom into 4U and the 41CL will churn right along. |
|||
10-25-2016, 06:25 PM
(This post was last modified: 10-25-2016 08:58 PM by Dieter.)
Post: #5
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-25-2016 10:28 AM)Gene Wrote: I am going through the programs and testing them now. CH67 (chess) for example requires card reader functions. It uses a 7DSP1 to set fix 1 and then 7DSP9 to set fix 9. It also uses 7P<>S a lot to recall memories 10, 11, 12, etc. in this form: 7P<>S RCL 1 7P<>S. Easy to fix, but still there for now. It also ends with two steps RTN and END. The 2nd to last step is unneeded. :-) Gene, the chess.zip file RobertM attached to this message includes both CH67.TXT (requiring 67 compatibilitiy functions) as well as a "41-only" CH.TXT program. The latter is even shorter. Why didn't you take this one for your module? Yes, the final RTN may be removed, and replacing the one or other "0" with a CLX or maybe CLST saves even more bytes. Also the complete initialization routine at LBL 14 may move up to step 05, saving one LBL, one RTN and one XEQ. #-) The program can be modified further so that it requires much less memory. Most data registers are called only once or twice, so that the pre-stored constants can be inserted directly into the code instead of occupying a whole data register. This means something like SIZE 003 instead of SIZE 026. It also means that the initialization routine can be omitted. I think I'll try a modification of Robert's CH.TXT program and see what I get. Addendum: OK, here is a streamlined version. It only requires one single data register (00) for the move counter, and the raw file has 380 bytes (before: 446). Cave: I did not do any tests except the example given in the original thread (which runs fine, taking into account Robert's correction of the final move). Please try it and see if it works correctly. Dieter CH_41.zip (Size: 1.21 KB / Downloads: 4) |
|||
10-25-2016, 08:40 PM
Post: #6
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Thanks Dieter! I don't know why it was grabbed incorrectly.
I'll make sure it gets sent off to Angel. Here are links to two more in the .rom that I have removed the card reader dependency. Chuckaluck: .raw file Battleship: .raw file These have a bit of ALPHA prompting which I like and no card reader dependency. |
|||
10-25-2016, 08:55 PM
(This post was last modified: 10-26-2016 12:09 PM by Dieter.)
Post: #7
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-25-2016 08:40 PM)Gene Wrote: These have a bit of ALPHA prompting which I like and no card reader dependency. What about Alpha output for chess? I tried a very simple version that requires just a few more bytes and returns an output like... 6 537 ++ ...showing the move counter, move and check(mate). But of course we can do much better on the '41. ;-) Dieter |
|||
10-25-2016, 08:58 PM
Post: #8
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Put ALPHA into the chess file you provided and we will take it.
Of the programs in the first version of the rom, these three are still 67 dependent: G2636 GOLF67 FLLW67 I will work on the G2636 first. |
|||
10-26-2016, 12:08 PM
(This post was last modified: 10-26-2016 01:22 PM by Dieter.)
Post: #9
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-25-2016 08:58 PM)Gene Wrote: Put ALPHA into the chess file you provided and we will take it. The simple version – cf. the posted sample output – is easy, this one is already running. But what about something more legible, closer to standard chess notation? I admit I do not quite understand how the output of the HP67 chess program is supposed to be read. The original program and its instructions are here. I read the explanation of the white move display several times but I still don't get it, especially the two-digit column of the white piece. The text says "that's confusing (and it is complicated)", and obviously it is. I would like to translate this to something more readable. But for this I have to know how to read the confusing HP67 output. Maybe someone can explain this to me. Edit: I now begin to understand how it works. The problem seems to be the old descriptive chess notation as it was used in the UK and US some decades ago. I think I will translate the whole program to something more common, close to today's Algebraic notation. For instance instead of "1523" = P-QN3 in descriptive notation the output will be "P-B3" or "P-23". Dieter |
|||
10-26-2016, 05:21 PM
Post: #10
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Could someone email me the PDF of the HP 67/97 standard pac manual ? I need the documentation in particular for the Follow Me program with the examples.
ty |
|||
10-26-2016, 06:59 PM
Post: #11
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Got it thanks!
|
|||
10-26-2016, 07:45 PM
(This post was last modified: 10-26-2016 07:51 PM by Dieter.)
Post: #12
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-26-2016 12:08 PM)Dieter Wrote: Edit: I now begin to understand how it works. The problem seems to be the old descriptive chess notation as it was used in the UK and US some decades ago. I think I will translate the whole program to something more common, close to today's Algebraic notation. For instance instead of "1523" = P-QN3 in descriptive notation the output will be "P-B3" or "P-23". It's not as simple as I expected. The reason for this is the possible ambiguity in the descriptive notation. A move coded "524" means Q-N4, but this may mean either B4 or G4 on the chess board. Within the game it may be clear which alternative is meant (because only one of the two moves is possible), but this cannot be directly translated beforehand into the common Algebraic notation. At least not without a *very* thorough analysis of the inner workings of the program. So I decided to leave it as it is and adjust only the output routine. The result is attached – please do your own tests and see if everything works correctly. Here is the output for the sample game given with the original HP67 listing. Code: [XEQ] "CH" You will note two issues here: First, there is a check condition already in the third move (black King is on F7 and white Queen on D7), but this does not show up in the output (neither in the original 67 program nor in this 41 version). And second, the last move is ambiguous, it may mean both Q-QB7 and Q-KB7 (which is the intended move). Anyway, here's another zip file. It includes two synthetic commands (RCL d and STO d) to save and restore the display mode settings. Feel free to do your own tests and/or post an improved version. Dieter CH_41c.zip (Size: 1.45 KB / Downloads: 4) N.B.: The linked website with the original program returns –322 (=B-N2) as the final move. This seems to be an error, as already reported before. It is returned if the user forgot to enter his final move. ;-) |
|||
10-26-2016, 09:13 PM
Post: #13
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Actually the linked website is my old website, and although I have more than enough typos, the -322 shown on the website is the actual result shown in the original write-up in the PPC Journal V7N6P19.
:-) Thanks for doing this. I'll make sure it is put in as the replacement program. |
|||
10-26-2016, 10:37 PM
(This post was last modified: 10-26-2016 10:56 PM by Gene.)
Post: #14
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
I have a version of FLLW67 that does not use card reader functions now and a version of GOLF67 that does not use the card reader functions.
Anyone want to take on G2636 and get it running without card reader functions? One more to go! Note: The G2636 program has a couple of steps that are tough for me to think through how to translate. They show in steps 38-45: RCL 01 33 X<=Y? 7ISZ 7 - X<=y? 7ISZ So if the first X<=Y? instruction is true, it wants to add 1 to memory register 25 and skip if the contents are equal to zero. My confusion is that the HP 41 equivalent is ISG. Increment and skip if GREATER than zero. In this circumstance, the HP 67 would skip the next step ONLY if memory 25 were 0, which it is not. So the HP 67 code is merely adding 1 to register 25. On the HP 41 not using the card reader translator function, it would add 1 to memory 25 and then almost certainly skip the next step if register 25 held 5, 10 or 15 as its value. The alternative of 1 ST+25 isn't good here since it disturbs the stack. So hmm.... suggestions? |
|||
10-27-2016, 12:30 PM
(This post was last modified: 10-27-2016 01:09 PM by Dieter.)
Post: #15
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-26-2016 10:37 PM)Gene Wrote: Note: The G2636 program has a couple of steps that are tough for me to think through how to translate. They show in steps 38-45: Although it is true that ISZ skips if register I is zero after the increment, I have never seen this used in a real-world HP67/97 program. And it's the same here: the I-register is never zero, and ISZ is used as a simple increment function, like in all other programs I've seen yet. And that's what you also said: Quote:In this circumstance, the HP 67 would skip the next step ONLY if memory 25 were 0, which it is not. So the HP 67 code is merely adding 1 to register 25. Right. So on an HP41 you can try this: Code: RCL 01 You should be able to use a lower register number instead of 25 since the program uses only registers 0...5 and then A, B, E and I. Turn the latter four into 6, 7, 8 and 9 and you're done. This way the ISZ becomes ISG 09. At LBL 2 (step 075 of the original program) register I is set to 0.5. Unlike the 67/97, the HP41 ISG and DSE commands use the fractional part to control the loop counter's increment and final value. But this does not harm here since the increment is still interpreted as 1 and the final value against which the counter is checked is set to 500. I do not think that this value is ever reached: within the program the counter is set to 0.5 or 1 and then incremented by 1. After all this value is the amount the player wins, and that's something between 0 and 2 $. (10-26-2016 10:37 PM)Gene Wrote: On the HP 41 not using the card reader translator function, it would add 1 to memory 25 and then almost certainly skip the next step if register 25 held 5, 10 or 15 as its value. ?!? Why should ISG kip if the register is 5, 10 or 15? (10-26-2016 10:37 PM)Gene Wrote: The alternative of 1 ST+25 isn't good here since it disturbs the stack. As far as I can see there is always as least one stack level left. So ln really desperate cases you could do this: Code: RCL 01 The second LBL 99 version is more elegant but requires x>=0. And finally here's a completely different approach. The mentioned program part adds 1 to register I if R1 is at least 26, and it adds 2 if it is 33 or more. Here my favorite solution would be this: Code: RCL 01 Or, even better, rewrite the complete evaluation routine from step 038 to 062 of the original program. That's a clean solution that can be done without any ISZs. Maybe I'll try this later today or at the weekend. Dieter |
|||
10-27-2016, 02:56 PM
Post: #16
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Thanks for the hints Dieter!
"?!? Why should ISG kip if the register is 5, 10 or 15?" If the register held 5.000, then ISG would make it 6.000 and since 6 is greater than the 000 piece, it would skip the next step ? |
|||
10-27-2016, 05:56 PM
(This post was last modified: 10-27-2016 06:15 PM by Dieter.)
Post: #17
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-27-2016 02:56 PM)Gene Wrote: "?!? Why should ISG kip if the register is 5, 10 or 15?" Sure, but this happens with any (integer) number, not just with 5, 10 or 15. ;-) That's why you add a dummy instruction after ISG, in the above example that's the lines with LBL 10. BTW, I just got a "26" version running. I think it works fine. If you (or someone else) wants to try it, here it is. It uses R00-01 and 06-09, the "36" program will also use 02-05. Now please try it and and see if you like it. I added some Alpha prompts and labels. Simply XEQ "G26" and provide a random seed if you like. Then enter your number (1..6) and press [R/S] or [A]. Dieter G26.zip (Size: 825 bytes / Downloads: 2) |
|||
10-27-2016, 09:29 PM
Post: #18
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Agreed. I had just picked 5, 10, 15 as examples.
I am attaching my G2636 raw file as well. Try mine and see if you like it and I'll do the same with yours. :-) |
|||
10-27-2016, 09:39 PM
(This post was last modified: 10-27-2016 09:43 PM by Dieter.)
Post: #19
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
(10-27-2016 09:29 PM)Gene Wrote: I am attaching my G2636 raw file as well. Try mine and see if you like it and I'll do the same with yours. :-) I finished my version just a few minutes ago. I think I'll do some tests before I post the raw file. It includes Alpha output and some changes due to differences between the 67 and 41 (e.g. CLX and CHS during PSE does not work on a 41). Dieter |
|||
10-27-2016, 10:16 PM
Post: #20
|
|||
|
|||
RE: 4K HP 67 Games rom attached for testing
Agreed on the CHS.
What I did was make it a test for X=0? so that to take another number, the user presses the decimal point during the PSE. Required a little bit of coding, but... take a look. I in no way claim my version is great - not at all. :-) I did it on an airplane today. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)