Post Reply 
HP41: Updated RUBIK's / CHESS modules
10-18-2015, 06:45 AM (This post was last modified: 10-18-2015 06:46 AM by Ángel Martin.)
Post: #1
HP41: Updated RUBIK's / CHESS modules
Members of the archaeological SW society, you are in luck: an updated version of the Chess/Rubik Module is available, with the following changes:

1. now there are two separate modules for CHESS (8k) and RUBIK (4k)
2. added Valentin Albillo's MiniChess and Paul Dale's SCHESS - plus other game boards to the CHESS module
3. X-Memory support in the Rubik's ROM to store/recall cube configurations
3. New MCODE function in the RUBIK's ROM to input the row colors using prompts. Only takes the valid choices for input (R,G,B,Y,O,W) so you can't mistype things.

Soon at a TOS near you... And don' t forget to check out the new additions to the Module list, such as:

a. POKER ROM (4k)
b. TIDES ROM (4k), with its US Ports Database companion Module (8k)
c. HP Calendars Solution Book ROM
d. 41 SWAP Disks Vol.2 ROM (good luck with the instructions ;-)

Cheers,
'AM
Find all posts by this user
Quote this message in a reply
10-18-2015, 08:36 AM
Post: #2
RE: HP41: Updated RUBIK's / CHESS modules
SCHESS is a direct port of one of Valentin's earlier programs.

The only calculator chess program I've written was for the 28S.


- Pauli
Find all posts by this user
Quote this message in a reply
10-18-2015, 08:24 PM
Post: #3
RE: HP41: Updated RUBIK's / CHESS modules
(10-18-2015 08:36 AM)Paul Dale Wrote:  SCHESS is a direct port of one of Valentin's earlier programs.
The only calculator chess program I've written was for the 28S.
- Pauli

thanks for the clarification. This is where I got it from, which shows your name as contributor:
http://www.hpmuseum.org/software/41/41smpche.htm
Find all posts by this user
Quote this message in a reply
10-19-2015, 07:20 AM
Post: #4
RE: HP41: Updated RUBIK's / CHESS modules
(10-18-2015 08:36 AM)Paul Dale Wrote:  The only calculator chess program I've written was for the 28S.


- Pauli

Is it possible to convert your chess program for WP 34S?Wink
Find all posts by this user
Quote this message in a reply
10-19-2015, 08:02 AM
Post: #5
RE: HP41: Updated RUBIK's / CHESS modules
I doubt it. The 34S display isn't up to the task.

The 34S possibly has enough program memory in flash to do a chess program, but it would be difficult.

Adding a CHESS command to the 34S firmware would be faster and easier Smile


- Pauli
Find all posts by this user
Quote this message in a reply
10-27-2015, 01:15 AM
Post: #6
RE: HP41: Updated RUBIK's / CHESS modules
(10-18-2015 06:45 AM)Ángel Martin Wrote:  Soon at a TOS near you...

They are now available! 8-)
Find all posts by this user
Quote this message in a reply
10-29-2015, 06:28 AM
Post: #7
RE: HP41: Updated RUBIK's / CHESS modules
(10-27-2015 01:15 AM)Sylvain Cote Wrote:  
(10-18-2015 06:45 AM)Ángel Martin Wrote:  Soon at a TOS near you...

They are now available! 8-)

And a new QRG for RUBIK's is also there too.
Find all posts by this user
Quote this message in a reply
12-24-2017, 08:41 AM
Post: #8
RE: HP41: Updated RUBIK's / CHESS modules
I downloaded the only "CHESS MODULE" that was found on TOS.
and am trying to run it in the v41 emulator.

I started the game with XEQ 'CHESS'

The program seems to work (haven't finished a complete game yet), but the pdf mentions that there are options when it is my move :

But the only option I seem to have is entering a *move*.

I'm interested in knowing how to :
"- Check the board in order to know what piece is where"

Also curiously, the V41 emulator always indicates that it is in PRGM mode (though it does accept "move inputs".

Perhaps, because (as the pdf notes), the program is using "synthetic" instructions ?

Any info appreciated.

Mike
Find all posts by this user
Quote this message in a reply
12-25-2017, 08:34 AM (This post was last modified: 12-25-2017 08:41 AM by Ángel Martin.)
Post: #9
RE: HP41: Updated RUBIK's / CHESS modules
(12-24-2017 08:41 AM)mstram Wrote:  The program seems to work (haven't finished a complete game yet), but the pdf mentions that there are options when it is my move :

But the only option I seem to have is entering a *move*.

I'm interested in knowing how to :
"- Check the board in order to know what piece is where"

Also curiously, the V41 emulator always indicates that it is in PRGM mode (though it does accept "move inputs".

It's been i while since I looked into this one, so I'm very rusty... I assume by "the pdf" you're referring to the "CH136 User Guide", written by Claude Roeltgen - the author of the original CH136 program.

I believe the options are to the game level (1,2,3, or 4 in order of difficulty) and the color of your pieces (black or white). Both are prompted for if you start the game using the "CHESS" main program. Or you can change them *before* starting the game using the dedicated subroutines, "COLOR" and "LEVEL".

The Chess ROM has a modified version with some slight changes in the way the moves are entered. I added a new MCODE function for the prompt, which is meant to be entered in board from-to coordinates such as "E2-E4" (no hyphen needed).

While the prompt is up you cannot change the level options though, only characters are allowed, without access to the CF/SF functions for the settings.

Unfortunately there's no "piece map/location" routine, so the game relies on your taking good note of the actual piece movements - basically you need to have a real chess game aside and mode the pieces along.

I guess there should be possible to write a routine to read the data registers and show the board, basically the inverse of the "BOARD" program which is used to enter a custom board configuration for problem-solving cases. This one uses a sequential list of position prompts, from A1 to H8, asking for the piece to enter in it... then asks for other game parameters such as how many moves have elapsed, whether or not castle has happened, and who's turn is next.

Sounds like a doable challenge, I'll look at the code for clues and see if I can jive something up.

HTH.

ÁM
Find all posts by this user
Quote this message in a reply
12-25-2017, 12:43 PM (This post was last modified: 12-25-2017 01:45 PM by mstram.)
Post: #10
RE: HP41: Updated RUBIK's / CHESS modules
Angel, Thanks for your reply.

Ok, at least now I won't be looking for something that isn't there Wink

Do you know if the chess.rom can be loaded into the emu41 emulator ?

*EDIT*

Yes it can, I figured it out Wink

Used the CLBIN41.EXE on CHESS.ROM and AUXFNS.ROM
Then added them to emu41.ini :
11 4 chess.bin
12 4 auxfns.bin



Mike
Find all posts by this user
Quote this message in a reply
12-28-2017, 07:46 AM (This post was last modified: 12-28-2017 07:54 AM by Ángel Martin.)
Post: #11
RE: HP41: Updated RUBIK's / CHESS modules
(12-25-2017 12:43 PM)mstram Wrote:  Angel, Thanks for your reply.
Ok, at least now I won't be looking for something that isn't there Wink
Mike

Glad you figured out the emu41 part, I really have no clue how to do that... I only use V41 as emulator.

Here's a quick & dirty SHOW routine to view the board configuration at any given time. The main issue is that you cannot really use it during the game because it overwrites R00 and the stack; so it's of limited interest.

The routine lists all the 64 board squares in algebraic notation, adding the piece name and the color if a piece is there, or "EMPTY" otherwise. The color depends on whether HP plays white or black, as determined by flag 04.

Code:
1    LBL "SHOW"
2    21,084
3    STO 00
4    LBL 10
5    XEQ 00
6    ISG 00
7    GTO 10
8    RTN
9    LBL 00
10    CLA 
11    RCL 00
12    INT
13    20
14    -
15    8
16    MOD
17    X=0?
18    8
19    FC? 04
20    9
21    FC? 04
22    -
23    ABS
24    64
25    +
26    XTOA
27    RCL 00
28    INT
29    21
30    -
31    8
32    /
33    INT
34    E
35    +
36    FC? 04
37    9
38    FC? 04
39    -
40    ABS
41    ARCLI
42    "|- : "
43    RCL IND 00
44    INT
45    SF 25
46    GTO IND X
47    LBL 00
48    "|-EMPTY"
49    AVIEW
50    RTN
51    LBL 01
52    LBL 11
53    "|-PAWN"
54    GTO 00
55    LBL 02
56    LBL 12
57    "|-KNIGHT"
58    GTO 00
59    LBL 03
60    LBL 13
61    "|-BISHOP"
62    GTO 00
63    LBL 05
64    LBL 15
65    "|-ROOK"
66    GTO 00
67    LBL 08
68    LBL 18
69    "|-QUEEN"
70    GTO 00
71    LBL 09
72    LBL 19
73    "|-KING"
74    LBL 00
75    CF 25
76    CLX
77    10
78    "|- - "
79    FS? 04
80    GTO 00
81    X>Y?
82    "|-W"
83    X<Y?
84    "|-B"
85    AVIEW
86    RTN
87    LBL 00
88    X>Y?
89    "|-B"
90    X<Y?
91    "|-W"
92    AVIEW
93    END

I've made some tweaks to the CHESS ROM to make the prompting more intuitive, will post the updated ROM image in a coupe of days. I could add this SHOW routine if something else gets removed, it's packed as it is...

PS. ARCLI in line 41 is included in the OS/X, and can be replaced with FIX 0, ARCL X

PSS. "|-" is the append sign.
Find all posts by this user
Quote this message in a reply
12-28-2017, 10:23 AM (This post was last modified: 12-28-2017 10:23 AM by ggauny@live.fr.)
Post: #12
RE: HP41: Updated RUBIK's / CHESS modules
Quote:Soon at a TOS near you...

How can-I find this TOS ?

Thank you.

Gérard.
Find all posts by this user
Quote this message in a reply
12-28-2017, 10:41 AM (This post was last modified: 12-28-2017 10:42 AM by salvomic.)
Post: #13
RE: HP41: Updated RUBIK's / CHESS modules
(12-28-2017 10:23 AM)ggauny@live.fr Wrote:  How can-I find this TOS ?

Thank you.

at The Other Site, I think, at some ...bay ;-) Smile

Isn't it?

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
12-28-2017, 10:51 AM
Post: #14
RE: HP41: Updated RUBIK's / CHESS modules
Thanks for that !

I got it running in V41 using Leo Duran's converter to a RAW file, on V41.

Now trying to figure out how to get it running on EMu41, which has a "printer"

The converter complained about : ARCLI
I changed it to FIX 0, ARCL X

On a related note, how do I use the BOARD routine ?

I start it with BOARD, it prompts with WHITE ?

I have no idea what to reply there, so just pressed R/S,

Then it seems to move through the whole board sequentially.

is there a way to input a random square ?

Mike
Find all posts by this user
Quote this message in a reply
12-28-2017, 11:41 AM
Post: #15
RE: HP41: Updated RUBIK's / CHESS modules
(12-28-2017 10:41 AM)salvomic Wrote:  
(12-28-2017 10:23 AM)ggauny@live.fr Wrote:  How can-I find this TOS ?

Thank you.

at The Other Site, I think, at some ...bay ;-) Smile

Isn't it?

The Other Site is not a bay.

Now, really, could we stop using TOS? Otherwise this same question will keep coming again and again.

And now punish me, since I broke the law.

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
12-28-2017, 11:52 AM
Post: #16
RE: HP41: Updated RUBIK's / CHESS modules
(12-28-2017 07:46 AM)Ángel Martin Wrote:  Here's a quick & dirty SHOW routine to view the board configuration at any given time. The main issue is that you cannot really use it during the game because it overwrites R00 and the stack; so it's of limited interest.

The routine lists all the 64 board squares in algebraic notation, adding the piece name and the color if a piece is there, or "EMPTY" otherwise. The color depends on whether HP plays white or black, as determined by flag 04.

Code:
1    LBL "SHOW"
2    21,084
3    STO 00
4    LBL 10
5    XEQ 00
6    ISG 00
7    GTO 10
8    RTN
9    LBL 00
10    CLA 
11    RCL 00
12    INT
13    20
14    -
15    8
16    MOD
17    X=0?
18    8
19    FC? 04
20    9
21    FC? 04
22    -
23    ABS
24    64
25    +
26    XTOA
27    RCL 00
28    INT
29    21
30    -
31    8
32    /
33    INT
34    E
35    +
36    FC? 04
37    9
38    FC? 04
39    -
40    ABS
41    ARCLI
42    "|- : "
43    RCL IND 00
44    INT
45    SF 25
46    GTO IND X
47    LBL 00
48    "|-EMPTY"
49    AVIEW
50    RTN
51    LBL 01
52    LBL 11
53    "|-PAWN"
54    GTO 00
55    LBL 02
56    LBL 12
57    "|-KNIGHT"
58    GTO 00
59    LBL 03
60    LBL 13
61    "|-BISHOP"
62    GTO 00
63    LBL 05
64    LBL 15
65    "|-ROOK"
66    GTO 00
67    LBL 08
68    LBL 18
69    "|-QUEEN"
70    GTO 00
71    LBL 09
72    LBL 19
73    "|-KING"
74    LBL 00
75    CF 25
76    CLX
77    10
78    "|- - "
79    FS? 04
80    GTO 00
81    X>Y?
82    "|-W"
83    X<Y?
84    "|-B"
85    AVIEW
86    RTN
87    LBL 00
88    X>Y?
89    "|-B"
90    X<Y?
91    "|-W"
92    AVIEW
93    END

I've made some tweaks to the CHESS ROM to make the prompting more intuitive, will post the updated ROM image in a coupe of days. I could add this SHOW routine if something else gets removed, it's packed as it is...

PS. ARCLI in line 41 is included in the OS/X, and can be replaced with FIX 0, ARCL X

PSS. "|-" is the append sign.

Well since the program is not that long, I started typing it into emu41.

What key do I press for line 34 E ?
Find all posts by this user
Quote this message in a reply
12-28-2017, 11:54 AM
Post: #17
RE: HP41: Updated RUBIK's / CHESS modules
(12-28-2017 11:41 AM)Massimo Gnerucci Wrote:  The Other Site is not a bay.

Now, really, could we stop using TOS? Otherwise this same question will keep coming again and again.

And now punish me, since I broke the law.

Sorry, I misunderstood...
thank you for info and I agree with you, as "TOS" drives us off the road Smile

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
12-28-2017, 11:56 AM
Post: #18
RE: HP41: Updated RUBIK's / CHESS modules
(12-28-2017 11:52 AM)mstram Wrote:  What key do I press for line 34 E ?

A simple 1 will do.

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
12-28-2017, 12:24 PM
Post: #19
RE: HP41: Updated RUBIK's / CHESS modules
(12-28-2017 07:46 AM)Ángel Martin Wrote:  Here's a quick & dirty SHOW routine to view the board configuration at any given time. The main issue is that you cannot really use it during the game because it overwrites R00 and the stack; so it's of limited interest.

The routine lists all the 64 board squares in algebraic notation, adding the piece name and the color if a piece is there, or "EMPTY" otherwise. The color depends on whether HP plays white or black, as determined by flag 04.

Code:
1    LBL "SHOW"
2    21,084
3    STO 00
4    LBL 10
5    XEQ 00
6    ISG 00
7    GTO 10
8    RTN
......

It looks like you are XEQ'ing some internal routine in the chess module ?( 21,084).

What does that routine do ?

Is it the code at 651D ?
(I used the V41 edit /info command on the chess module, routine 21 shows 651D)

Mike

p.s. Do you have commented source for the chess module .. that you'd like to share ? Smile
Find all posts by this user
Quote this message in a reply
12-28-2017, 12:41 PM (This post was last modified: 12-28-2017 12:42 PM by Ángel Martin.)
Post: #20
RE: HP41: Updated RUBIK's / CHESS modules
(12-28-2017 12:24 PM)mstram Wrote:  It looks like you are XEQ'ing some internal routine in the chess module ?( 21,084).

What does that routine do ?

Is it the code at 651D ?
(I used the V41 edit /info command on the chess module, routine 21 shows 651D)

Mike

p.s. Do you have commented source for the chess module .. that you'd like to share ? Smile

There's nothing fancy about that, 21,084 is just a standard decimal number that defines the data registers range used by the routine. These are where the chess pieces information is stored.

The source code is a long story; I purchased the program in 1982 on private magnetic cards, so it's not open code. What made it very tricky to decode was the fact that it was a LABEL-less program, i.e. must of the GTO/XEQ were pre-compiled so LBL statements were not required. This caused a lot of havoc trying to get it into a ROM format, with proper labels, etc.

The programs in the ROM are not private so you can see the code. You can also COPY them to RAM but as they're very long I don't recommend you do that.

I'll post the updated ROM image in a couple of days, need to do some testing first.

Çheers,
ÁM
Find all posts by this user
Quote this message in a reply
Post Reply 




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