Les cavernes -- TRS-80 Pocket Computer

Games for Spectrum, C64, Amstrad, Amiga, Apple ][ and the rest of the 8-bit and 16-bit platforms. Pleas for help, puzzles, bug reports etc.

Moderator: Alastair

Post Reply
Message
Author
User avatar
auraes
Posts: 148
Joined: Sun Jul 12, 2015 6:13 am
Location: France
Contact:

Les cavernes -- TRS-80 Pocket Computer

#1 Post by auraes » Tue Aug 03, 2021 12:56 pm

A tiny game found in the French magazine Trace with an esoteric and unreadable source code, but which may be of interest to jgerrie.
I made a transcription of the article, but there might be some mistakes in the listing.
Attachments
trace_listing.zip
(3.5 KiB) Downloaded 48 times

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#2 Post by jgerrie » Tue Aug 03, 2021 5:59 pm

Thank you. I will add it to my projects and repost here any discoveries.

JIm

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#3 Post by jgerrie » Tue Aug 03, 2021 6:27 pm

What a fascinating program. From my meagre French, I think I can read that it uses a special method of entering the list of descriptions into variable memory (rather than by traditional READ/DATA statement approach), so as to conserves memory. The main program itself is highly condensed using every trick possible in pocket TRS-80 Basic. All this to shoe-horn an text adventure game into 4K. So cool. I'll try to get it to work in the 4K space of the unexpanded TRS-80 MC-10.

User avatar
auraes
Posts: 148
Joined: Sun Jul 12, 2015 6:13 am
Location: France
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#4 Post by auraes » Wed Aug 04, 2021 5:18 am

I have retyped the text so that you can easily translate it with DeepL or whatever.
I wonder if there is a problem with 'gosub' and goto' because once you get to line 100 it seems impossible to get out since it is followed by a goto 100:

Code: Select all

100: INPUT "ORDER",G
110: GOTO 100
I suppose also that F=4F must be interpreted as F=4*F ?

The link for the original source code in TRACE magazine, page 62 to 63:
https://www.abandonware-magazines.org/a ... &album=oui

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#5 Post by jgerrie » Fri Aug 06, 2021 5:12 am

Auras,

4F looks like a hexadecimal number? But it could be some kind of shorthand notation for multiplication. Will have to search out a manual for the pocket computer.
79?

User avatar
auraes
Posts: 148
Joined: Sun Jul 12, 2015 6:13 am
Location: France
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#6 Post by auraes » Sat Aug 07, 2021 5:38 am

I don't think it's a hexadecimal number because what would be the point of entering a value for F from 0 to 5 if it's then going to be assigned the value 4F? There is also a 15G.
About the infinite loop, I suppose that we get out of it by pressing one of the programmable keys (keyboard hardware interrupt). For example, pressing "SHFT J" connects to label "J" and displays the contents of the inventory.

Code: Select all

100: INPUT "ORDRE",G
110: GOTO 100

Code: Select all

210: "J" I=0 : PRINT "VOUS AVEZ": FOR G=12 TO 21: IF A(G)=0 LET H=G-11 : PRINT "L-ANNEAU #"; H : I=1
220: NEXT G : IF I=0 PRINT "RIEN"
225: GOTO 100
There is probably an error on line 180 that should end with a return and not a goto 100.

Code: Select all

180: FOR G=1 TO 2 : C=C-4+A(68) : E=C+D : GOSUB "R" : A(G)=E : NEXT G : GOSUB 35 : GOTO 100
There is also the variable B which is used, but is not set anywhere!

So many mysteries in so few lines of code...

User avatar
Strident
Posts: 1001
Joined: Fri Aug 12, 2011 2:57 pm

Re: Les cavernes -- TRS-80 Pocket Computer

#7 Post by Strident » Sat Aug 07, 2021 11:10 am

Did the magazine ever publish corrections for their listings in future issues?

User avatar
auraes
Posts: 148
Joined: Sun Jul 12, 2015 6:13 am
Location: France
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#8 Post by auraes » Sat Aug 07, 2021 2:07 pm

I haven't seen any corrections in subsequent issues. I'd have to look more closely in the letters from readers and other scraps of code lying around.

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#9 Post by jgerrie » Sat Aug 14, 2021 3:27 am

auraes,

Yes the hex hypothesis doesn't make sense if it's a memory saving measure. I'll have to dig into the intricacies of the language a bit more. Thanks for the bug warnings. It's going to be more complex than I thought. I'll get to it eventually.

Jim

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#10 Post by jgerrie » Sat Sep 11, 2021 3:48 am

This code is seriously messed up.

User avatar
auraes
Posts: 148
Joined: Sun Jul 12, 2015 6:13 am
Location: France
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#11 Post by auraes » Sat Sep 11, 2021 6:26 am

I had tried to reproduce the code with PureBasic, but I had misunderstood the memory management of the Pocket: I did not understand, for example, why the variable B was not initialized when in fact it can be indirectly initialized by A(2).

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#12 Post by jgerrie » Sat Sep 11, 2021 9:49 pm

Weird. So single numeric variables like A equate to ordered array instances?
A(1) = A
A(2) = B?
A(3) = C?

Or some such?

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#13 Post by jgerrie » Sun Sep 12, 2021 2:01 am

Thanks Auraes. I've made some progress converting the program to Micro Color Basic:
https://github.com/jggames/trs80mc10/tr ... s/Cavernes
The problem is that the game seems very difficult and the map seems arbitrary. Not sure if there are still bugs in it, that I have somehow missed. Not sure how its supposed to be won.
cavernes.png
cavernes.png (3.41 KiB) Viewed 1765 times

User avatar
jgerrie
Posts: 280
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#14 Post by jgerrie » Sun Sep 12, 2021 2:18 am

Anyone interested can try playing the game here:
http://faculty.cbu.ca/jgerrie/MC10/JG_MC_Ports2.html

Select CAVERNES from the Cassette menu. It can be a little tricky sometimes selecting it. Then type RUN in the main emulator screen and hit Enter.

The commands are
RESTART
N
E
S
W
GET
INVENT
KILL
QUIT

User avatar
auraes
Posts: 148
Joined: Sun Jul 12, 2015 6:13 am
Location: France
Contact:

Re: Les cavernes -- TRS-80 Pocket Computer

#15 Post by auraes » Sun Sep 12, 2021 6:45 am

Great work!
jgerrie wrote:
Sun Sep 12, 2021 2:18 am
The commands are
Missing LOOK.
jgerrie wrote:
Sun Sep 12, 2021 2:18 am
Not sure how its supposed to be won
It is specified that the goal of the game is to find the 10 rings. Each ring allows you to kill a specific monster.
jgerrie wrote:
Sun Sep 12, 2021 2:18 am
So single numeric variables like A equate to ordered array instances?
if I understood correctly: https://archive.org/details/trs80-pc1-m ... 7/mode/2up, pages 46-47.

Post Reply