Post Reply 
Raw files for these HP 67 program listings ?
09-08-2016, 01:00 PM
Post: #61
RE: Raw files for these HP 67 program listings ?
Angel, we don't want multiple versions of the rom. Honest! We just want to work on these old programs a bit to make them more efficient...it's in our RPN programming blood of course to do so. :-)

Give us a little bit of time and then we will have better programs to drop in.
Find all posts by this user
Quote this message in a reply
09-08-2016, 06:39 PM
Post: #62
RE: Raw files for these HP 67 program listings ?
(08-30-2016 06:13 PM)Gene Wrote:  Any helpers out there to get these .raw files put together? The links below include the listings. If you do one, please post a link to the .raw file and let us know so no duplicate work is done.

I now would like to convert the Tic-Tac-Toe game, but there are two problems that also apply to other programs:

First, the listings only contain XROM codes, not the actual names of the 67/97 commands. OK, this can be solved as the museum has a page that translates between all relevant XROM codes and the respective command name. But what I really miss is a description of how the programs are supposed to work. What does the user enter, what key are pressed and what is the result, preferably with an example. I admit I have no idea how Tic-Tac-Toe (and most other games that wait for translation) is intended to work. Jive Turkey, the One-armed-bandit and the Moon lander were easy, but others are not.

Gene, can you help me help you?

Dieter
Find all posts by this user
Quote this message in a reply
09-08-2016, 07:04 PM
Post: #63
RE: Raw files for these HP 67 program listings ?
Sure thing!

HP-67 Games Pac manual with listings

HP-67 Games of Chance solutions book with listings

HP-67 Games Solutions book with listings

Each of those has the program listings and some examples. That's what I've been gathering to check them out with.
Find all posts by this user
Quote this message in a reply
09-08-2016, 10:18 PM
Post: #64
RE: Raw files for these HP 67 program listings ?
(09-08-2016 07:04 PM)Gene Wrote:  Sure thing!

Thank you very much.

Here is a first result: Tic-Tac-Toe. It now runs on SIZE 013, labels were renumbered to 01...08, and some slight changes were applied:

- XEQ"TTT" directly starts the initialization routine. But XEQ a resp. "Shift A", as mentioned in the manual, can be used as well.

- The original program in the Games Pac seems to have a bug, I think there is a "+" missing between line 013 and 014. This way the first move of the '67 is displayed as 0.010 000 000 instead of 2.010 000 000. This has been fixed.

- The program counts the moves (67 / user) starting at 0. I changed this so that the program starts with 1. So if you run the example from the Games Pac manual it will show the first move as 1.000 1.000 1.010.

- The print commands showing the board have been changed to VIEW + PSE which gives the user enough time to review the board, and it usually will also print if a printer is connected.

- Added feature: if the user does not enter a move (or zero or a negative one) the board is re-displayed. So if you missed the board display you can have it repeated this way.

The program now requires 240 bytes. I am sure that a thorough analysis may reduce the size further since some parts of the code are the same for the first move and for the 2nd/3rd/4th etc. The one or other improvement was already included, but I think there still is room for more of this.

As usual here is a listing and a .raw file.

Dieter

.zip  TTT.zip (Size: 1,014 bytes / Downloads: 5)
Find all posts by this user
Quote this message in a reply
09-09-2016, 02:56 AM
Post: #65
RE: Raw files for these HP 67 program listings ?
Delete step 127 RTN

Synthetics for lines 98 (E6), 100 (E3) save a byte each.

That's 3 bytes, but of course, line 21 eats 12 bytes total. Maybe "TTT" ? :-) Saves 8 bytes.
Find all posts by this user
Quote this message in a reply
09-09-2016, 12:18 PM
Post: #66
RE: Raw files for these HP 67 program listings ?
(09-09-2016 02:56 AM)Gene Wrote:  Delete step 127 RTN
Synthetics for lines 98 (E6), 100 (E3) save a byte each.

No sythetics required: read a 67/97 card with containing the steps EEX 3 and the 41 card reader seems to translate this to "E3" instead of "1E3". You can also see this in the hpmuseum listing of the program which (essentially) seems to show the result of reading the 67 card into a 41. And hp41uc also translates such a line in a text file to "E3" resp. "E6". In this case I admit I even added back the leading 1. ;-)

(09-09-2016 02:56 AM)Gene Wrote:  That's 3 bytes, but of course, line 21 eats 12 bytes total. Maybe "TTT" ? :-) Saves 8 bytes.

You can even omit the complete "TIC-TAC-TOE" prompt. Unlike other programs where certain settings are initialized by the 67 card reader so that in the 41 version a separate init routine makes sense, the TTT initialization routine has to be run anyway (either by XEQ"TTT" or XEQ a). ;-)

But why do you think that we have to save as many bytes as possible? These programs go into a ROM module, the 41's RAM is not affected at all. We'll most probably end up with, say, 100 bytes ROM capacily left that are not enough for one more program but enough not to care about five bytes more or less.

Anyway, I think I'll take a closer look at TTT later, which might save more that just a few bytes.

Dieter
Find all posts by this user
Quote this message in a reply
09-09-2016, 12:35 PM
Post: #67
RE: Raw files for these HP 67 program listings ?
If we find such byte savings in each program, we might be able to fit a complete additional game into the 8K image. I had to leave out a couple of worthy possibilities.

That said, bytes spent to make the game better (output labels for one) are better than 12 bytes to say Tic-tac-toe, IMO. :-)

I appreciate all the help you guys are contributing to this. Thank you.
Find all posts by this user
Quote this message in a reply
09-09-2016, 01:47 PM (This post was last modified: 09-10-2016 06:16 AM by Dieter.)
Post: #68
RE: Raw files for these HP 67 program listings ?
(09-09-2016 12:35 PM)Gene Wrote:  If we find such byte savings in each program, we might be able to fit a complete additional game into the 8K image. I had to leave out a couple of worthy possibilities.

That said, bytes spent to make the game better (output labels for one) are better than 12 bytes to say Tic-tac-toe, IMO. :-)

OK, now there are 35 more bytes to spend: indeed the 67 version of TTT had a substantial number of steps that appear twice. Also the handling for the first and all subsequent moves can be combined. LBL d and D can be handled in one common routine as well. The program is now down to 98 steps and 205 bytes. Without the "TIC-TAC-TOE" prompt we are even below 200. ;-)

More on this later.

Dieter
Find all posts by this user
Quote this message in a reply
09-09-2016, 05:29 PM
Post: #69
RE: Raw files for these HP 67 program listings ?
Post it when you can.
Find all posts by this user
Quote this message in a reply
09-09-2016, 06:54 PM (This post was last modified: 09-09-2016 07:20 PM by Dieter.)
Post: #70
RE: Raw files for these HP 67 program listings ?
(09-09-2016 05:29 PM)Gene Wrote:  Post it when you can.

It's now down to 182 bytes in 88 lines, and SIZE 012 is sufficient. Some parts of the code have been removed because they appeared twice, more or less identically. I hope I did not throw out too much. ;-)

The attachment contains the resulting listing and raw file. I think this is close to the final version:

.zip  TTT.zip (Size: 800 bytes / Downloads: 6)

HP67/97 users: here is a listing of the streamlined version for you as well. Try it and see how it compares to the original program in the Games Pac. Hint: line 070 ff (LBL a) can be removed completely if a (single track) data card for R0...R9 is prepared. Since the remaining program (merely 69 lines) fits on a single track as well, the complete program and its data can still be stored on just one card.

For both versions:

Initialize program: XEQ "TTT" or [Shift] [A] resp. [f] [A]
Start a new game: [A]
Enter move: 1...9 [B] or [R/S]
Review board: [C]

HP67/97 listing:

Code:
001 LBL A
002 FIX
003 CLX
004 STO 0
005 STO A
006 SF 2
007 2
008 LBL 3
009 STO I
010 1
011 STO+0
012 GSB 5
013 LBL C
014 EEX
015 6
016 GSB 1
017 EEX
018 3
019 GSB 1
020 1
021 GSB 1
022 SPACE
023 RCL I
024 RCL A
025 +
026 DSP 9
027 R/S
028 LBL B
029 STO I
030 2
031 GSB 5
032 F? 2
033 GTO 2
034 RCL I
035 GSB 4
036 X=Y?
037 GSB 4
038 GTO 3
039 LBL 2
040 RCL(i)
041 STO B
042 GSB 4
043 GTO 3
044 LBL 4
045 RCL B
046 FRAC
047 1
048 0
049 *
050 STO B
051 INT
052 RTN
053 LBL 5
054 RCL I
055 10^X
056 /
057 RCL A
058 +
059 STO A
060 RTN
061 LBL 1
062 DSP 3
063 RCL A
064 *
065 FRAC
066 RCL 0
067 +
068 PAUSE / PRTX
069 RTN

070 LBL a
071 .
072 5
073 8
074 7
075 3
076 6
077 4
078 9
079 STO 1
080 .
081 5
082 8
083 9
084 1
085 4
086 6
087 7
088 STO 3
089 .
090 1
091 3
092 5
093 9
094 8
095 STO 4
096 .
097 1
098 3
099 7
100 4
101 6
102 9
103 8
104 STO 5
105 .
106 3
107 1
108 5
109 7
110 8
111 STO 6
112 .
113 1
114 3
115 5
116 8
117 9
118 STO 7
119 .
120 3
121 1
122 7
123 5
124 9
125 6
126 4
127 STO 8
128 .
129 3
130 1
131 5
132 8
133 7
134 STO 9
135 CLX
136 RTN

Dieter
Find all posts by this user
Quote this message in a reply
09-09-2016, 10:04 PM (This post was last modified: 09-10-2016 06:14 AM by Dieter.)
Post: #71
RE: Raw files for these HP 67 program listings ?
(09-09-2016 12:35 PM)Gene Wrote:  If we find such byte savings in each program, we might be able to fit a complete additional game into the 8K image. I had to leave out a couple of worthy possibilities.

OK, if you want to save some more precious bytes, here is a shorter version of Jive Turkey. It uses a less memory consuming random number generator and takes advantage of the HP41 SIGN function which makes the evaluation of the user input shorter and faster. This way the program requires just 75 bytes, also one data register is saved.

Initialize: XEQ"JT" => JIVE TURKEY
Enter percentage of true answers: [A]
Enter random seed (with fractional part) and start: [B] => 0
Enter guess: [C] => –1 or 1, or number of guesses if correct.
View number of guesses: [D]

Dieter

.zip  JT2.zip (Size: 517 bytes / Downloads: 6)
Find all posts by this user
Quote this message in a reply
09-10-2016, 03:02 AM
Post: #72
RE: Raw files for these HP 67 program listings ?
Sorry guys ... Had to unexpectedly head out of town (away from the computer) for a few days. I'll check in when I return and see if there is anything left to do. Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
09-11-2016, 06:47 AM (This post was last modified: 09-11-2016 06:49 AM by Ángel Martin.)
Post: #73
RE: Raw files for these HP 67 program listings ?
Looks like your rework efforts have paid off guys; I've managed to fit it all in the ROM images and we still have about 70 bytes left on each page.

Here's the complete package with the Excel file included, go ahead and try your new versions for accuracy.

The embedded Macro was written by Greg McClure, and it compiles a ROM file from the page you select in the control. Then you can use the MLDL2K to encapsulate those in a MOD container, easy as cakewalk.

PS. I got a notification form the forum about my PM InTray being at 100% capacity so if you sent me some I probably didn't get it; I'll try ti clean it up later today.


Attached File(s)
.zip  67GAMES.zip (Size: 331.49 KB / Downloads: 11)

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
09-11-2016, 06:34 PM (This post was last modified: 09-11-2016 06:35 PM by Dieter.)
Post: #74
RE: Raw files for these HP 67 program listings ?
(09-08-2016 01:00 PM)Gene Wrote:  Give us a little bit of time and then we will have better programs to drop in.

Here is an adaptation of the ARTL program. Gene, you have been thinking of adding labelled output, and I think this a program that would get better and much easier to use with a bit of HP41 alpha messaging. It will also display / print the original HP97 output, using VIEW and AVIEW. The PRSTK function was replaced by an alpha message if the player wins.

The attached version uses only R0...R10, so SIZE 011 is fine. It has an improved random number generator (that does not fail with a seed of 0 or less) and takes advantage of some HP41 functions like MOD. Now try it an see if you like it this way.

Dieter

.zip  ARTL.zip (Size: 1.36 KB / Downloads: 6)
Find all posts by this user
Quote this message in a reply
09-11-2016, 09:05 PM (This post was last modified: 09-11-2016 09:06 PM by Dieter.)
Post: #75
RE: Raw files for these HP 67 program listings ?
(09-09-2016 06:54 PM)Dieter Wrote:  It's now down to 182 bytes in 88 lines, and SIZE 012 is sufficient.

Here is another Tic-Tac-Toe version with the same 182 bytes, but this time SIZE 004 is all that that's required. The trick was to move the strategy-defining constants from their eight data registers directly into the code (where they occupy memory anyway). So RCL IND becomes XEQ IND. This way a separate initialization routine is no more required – simply start the game with XEQ"TTT" or [A].

Dieter

.zip  TTT_N.zip (Size: 810 bytes / Downloads: 5)
Find all posts by this user
Quote this message in a reply
09-12-2016, 07:01 PM
Post: #76
RE: Raw files for these HP 67 program listings ?
(09-05-2016 04:51 PM)Ángel Martin Wrote:  Here's the latest, with the non-Card reader version of Star Trek (despite the program name being the same). So when available, non-card reader versions are consistently used...

Thank you for that zip file including the .xls – it's an interesting look into what's going on in such a ROM module. But maybe we first should decide what programs should go into this 67 Games ROM. Some are very HP67 specific (think of those that require a data card), others have better equivalents in HP41 ROMs or solution books (e.g. Wari or Bagels).

So what are the programs this Games ROM should include? Gene has listed a few in his initial post, and in the meantime it's become more than a dozen. I am not sure which program to translate next. Maybe you two (Ángel and Gene) should say a word or two on this.

Dieter
Find all posts by this user
Quote this message in a reply
09-12-2016, 08:16 PM
Post: #77
RE: Raw files for these HP 67 program listings ?
Ok, here we go. These should be included. I have put a 1, 2, or 3 by the game to indicate my semi-arbitrary ranking of include 1’s first, then 2’s, etc. Feel free to disagree with my 1, 2, 3 rankings. :-)

3 - ARTL67 – artillery game
1 - BFRUIT – bell fruit slot machine game from PPC Journal. Only one slot machine needed. Which one? The OB below ?
1 - BJ - Blackjack
2 - BTLSHP – Battleship game
1 - CH67 - Chess
2 - CHKLCK – Chuckaluck game
2 - FLLW67 – Follow me from the HP 67 standard pac
3 - FTBALL – American football game
2 - G2636 – Game of 26/36
1 - GOLF67 - Golf
3 - HORSE – Horse race
1 - JT – Jive Turkey
1 - LAND67 – Lunar Lander
1 - OB – One armed bandit - Only one slot machine needed.
3 - PIG
2 - RCTK67
3 - RISK
3 - ROULET – Roulette wheel
1 - SLMC67 – Slot machine 67. Only one slot machine needed.
1 - SPW67A – Spacewar Card A
1 - SPW67B – Spacewar Card B – this should really be combined with A in one file.
1 - ST67 – Star Trek
1 - TTT – Tic Tac Toe
3 - WARI67 – Wari game

These should be added:
1 - Pinball Wizard. This one needs to be keyed in.

These can go. Delete them.
4 - BJCK67 – Older version of blackjack. Modified version included above so this can go.
4 – DOGA – Dog race Card A
4 – DOGB – Dog race Card B
4 - BAGL67 – Bagels. Nothing wrong with it, but there are good bagel games for the 41 already.
Find all posts by this user
Quote this message in a reply
09-12-2016, 08:51 PM (This post was last modified: 09-12-2016 09:02 PM by Dieter.)
Post: #78
RE: Raw files for these HP 67 program listings ?
(09-12-2016 08:16 PM)Gene Wrote:  Ok, here we go. These should be included. I have put a 1, 2, or 3 by the game to indicate my semi-arbitrary ranking of include 1’s first, then 2’s, etc. Feel free to disagree with my 1, 2, 3 rankings. :-)

So let's take a look at the 1-ranked programs first.

> 1 - BFRUIT – bell fruit slot machine game from PPC Journal.
> Only one slot machine needed. Which one? The OB below ?

Just tell us which one you prefer.

> 1 - BJ - Blackjack

Blackjack is already available in the HP41 standard Pac. Do you like the 67 version better?

> 1 - CH67 - Chess

This was done by RobertM.

> 1 - GOLF67 - Golf

This is included in Ángel's ROM file but it's a 1:1 translation of the 67 code and requires a card reader. I think that's what I'll try next.
BTW, in your initial post you linked to a short 99-step program. I assume you would like to have the Games Pac version translated, i.e. this one.

> 1 - JT – Jive Turkey
> 1 - LAND67 – Lunar Lander
> 1 - OB – One armed bandit - Only one slot machine needed.

All three already done.

> 1 - SLMC67 – Slot machine 67. Only one slot machine needed.
> 1 - SPW67A – Spacewar Card A
> 1 - SPW67B – Spacewar Card B – this should really be combined with A in one file.
> 1 - ST67 – Star Trek

Later. ;-)

> 1 - TTT – Tic Tac Toe

Done.

> 1 - Pinball Wizard. This one needs to be keyed in.

So it looks like Golf is next. The Games Pac version.

Dieter
Find all posts by this user
Quote this message in a reply
09-12-2016, 11:48 PM
Post: #79
RE: Raw files for these HP 67 program listings ?
1) Look over the shorter 99 step Golf program from the PPC Journal author. Let's see if it might not be better anyway.

2) Let's go for OB for the slot machine.

3) Let's keep a BJ from the HP 67

4) I will try to work on the Star Trek 67 game.
Find all posts by this user
Quote this message in a reply
09-13-2016, 08:33 PM
Post: #80
RE: Raw files for these HP 67 program listings ?
(09-12-2016 11:48 PM)Gene Wrote:  1) Look over the shorter 99 step Golf program from the PPC Journal author.

That's trivial. The program can be used virtually 1:1 on the 41. I have a HP41 listing and raw file, but I'm not sure if the program works correctly. In some cases a shot does not seem to approach the hole, instead it moves the ball further away from it. #-)

(09-12-2016 11:48 PM)Gene Wrote:  Let's see if it might not be better anyway.

The Games Pac version sure is much, much more sophisticated. Maybe a bit too sophisticated for the limited memory of the 67/97 (some actions require the user to store values manually in certain registers). But changing this would come close to a more or less rewritten version for the 41.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)