An analysis on the game "The Labyrinth Of Minoas"
An analysis on the game "The Labyrinth Of Minoas"
I stumbled upon the game "Labyrinth of Minos" 3 days ago, and I spent like 20 hours trying to figure out what is going on. It is the most interesting game written in basic I have ever seen in my life. PHP, python & html are the languages that I am mostly familiar with. I never imagined that I will encounter something written in Basic that I won't be able to understand. This game's code is extremely interesting.
I did some comments for future enthusiasts that are interested coping up with that particular code. I tried make it a bit easier for them, than it was for me. The first time I looked at the code, I felt like I have an IQ of 50. Suddenly my protective walls of egoism fell down like dominos. Perhaps I am indeed stupid, to me this was not so easy to decode. I literally spent 2 full days on it.
I attached my commentary file and I have few questions which XavSnap could answer in public if he is kind enough.
1) Why 128 means a black dot and 0 means white dot? Because in 8-bit a black square has all "1s" ? 11111111 = 128 and 00000000 = 0 ?
2) On line 1030 we see "run 3". What's the difference between "GOTO 3" and "RUN 3" ?
3) 7000 LET P=PEEK 16396+PEEK 16397*256+26
Is that a specific location of a pixel on our screen? Are those are coordinates of the X and Y registers ?
4) 7240 IF (INKEY$="A" OR INKEY$="7") AND (PEEK(P+D)=0 OR PEEK(P+D)=56) THEN GOTO 8000
5775 IF A=56 THEN GOTO 1000
There are 2 times that we see A=56 in the code but A never gets that value. A is either 0 or 128. What is the meaning of 56 and how could A be equal to 56?
5) D variable is orientation. How is better to imagine the D, perhaps like this?
_____|-33
_____|
-1------------1
_____|
_____|33
6) What is this line doing?
7220 POKE (P+34),42
7) 7237 IF INKEY$="P" THEN POKE P,CODE"%o"
7238 IF PEEK P=CODE"%o" THEN LET S=S-40
When we press P during the game, it shows up our (P)ointer on the map for a glance. The question is, after we release the button P why does the spot get white and doesn't remain black? I mean, why unPEEKING occurs instantly? How is possible the PEEK to last only for as long as you hold the key P, while POKE is permanent!?
I did some comments for future enthusiasts that are interested coping up with that particular code. I tried make it a bit easier for them, than it was for me. The first time I looked at the code, I felt like I have an IQ of 50. Suddenly my protective walls of egoism fell down like dominos. Perhaps I am indeed stupid, to me this was not so easy to decode. I literally spent 2 full days on it.
I attached my commentary file and I have few questions which XavSnap could answer in public if he is kind enough.
1) Why 128 means a black dot and 0 means white dot? Because in 8-bit a black square has all "1s" ? 11111111 = 128 and 00000000 = 0 ?
2) On line 1030 we see "run 3". What's the difference between "GOTO 3" and "RUN 3" ?
3) 7000 LET P=PEEK 16396+PEEK 16397*256+26
Is that a specific location of a pixel on our screen? Are those are coordinates of the X and Y registers ?
4) 7240 IF (INKEY$="A" OR INKEY$="7") AND (PEEK(P+D)=0 OR PEEK(P+D)=56) THEN GOTO 8000
5775 IF A=56 THEN GOTO 1000
There are 2 times that we see A=56 in the code but A never gets that value. A is either 0 or 128. What is the meaning of 56 and how could A be equal to 56?
5) D variable is orientation. How is better to imagine the D, perhaps like this?
_____|-33
_____|
-1------------1
_____|
_____|33
6) What is this line doing?
7220 POKE (P+34),42
7) 7237 IF INKEY$="P" THEN POKE P,CODE"%o"
7238 IF PEEK P=CODE"%o" THEN LET S=S-40
When we press P during the game, it shows up our (P)ointer on the map for a glance. The question is, after we release the button P why does the spot get white and doesn't remain black? I mean, why unPEEKING occurs instantly? How is possible the PEEK to last only for as long as you hold the key P, while POKE is permanent!?
- Attachments
-
- minos_simplified_angelos.txt
- (18.95 KiB) Downloaded 57 times
Last edited by xubuntu on Sun Mar 19, 2023 3:58 pm, edited 1 time in total.
Our music sent up to God.
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
Re: An analysis on the game "The Labyrinth Of Minoas"
character 0 is a space and character 128 is an inverted space, hence a full block
character 56 is an S
character 56 is an S
Re: An analysis on the game "The Labyrinth Of Minoas"
hm so it checks if character is S which means we are at the end of the labyrinth or else if peak = code"s", interesting
so 1) and 4) answered by doctor bleep.
xavsnap you have only 5 questions to answer
so 1) and 4) answered by doctor bleep.
xavsnap you have only 5 questions to answer
Our music sent up to God.
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
- 1024MAK
- Posts: 5145
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: An analysis on the game "The Labyrinth Of Minoas"
RUN x instead of GO TO x (or GOTO x) clears all variables. Unlike GO TO.
The address held in 16396 & 16397 is the address in memory (a pointer) where the display file starts known as “D_FILE”. Hence variable P ends up pointing to the start of the screen display in RAM. See chapter 27 in the manual.
If P at this point still holds the start address of screen display (display file) in RAM, then this is putting the character for code 42, “E” 34 bytes from the start. As each line is 32 characters plus an “end of line code” (making the total length of a line in RAM to be 33 bytes), it’s going on the second line down. Note, this assumes that the display file is in an expanded state, that is that the ZX81 has more than approximately 3k bytes of RAM.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: An analysis on the game "The Labyrinth Of Minoas"
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm INTERESTING.......
So it's this E on the map. And there is the "S" previously mentioned by doctor bleep.
Question 3 remains unanswered though. How does this line actually affect the game, what is its purpose. What is the +26 doing there? Just setting the P on place? 26 places after the initial spot of d_file? Yes perhaps it's just the initiation of the P on the map.
Questions 5 & 7 remain unanswered. xavsnap where you ?? There is no escape from me.
So it's this E on the map. And there is the "S" previously mentioned by doctor bleep.
Question 3 remains unanswered though. How does this line actually affect the game, what is its purpose. What is the +26 doing there? Just setting the P on place? 26 places after the initial spot of d_file? Yes perhaps it's just the initiation of the P on the map.
Questions 5 & 7 remain unanswered. xavsnap where you ?? There is no escape from me.
Our music sent up to God.
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
Re: An analysis on the game "The Labyrinth Of Minoas"
7) cleared by
7275 POKE P,0
7275 POKE P,0
Re: An analysis on the game "The Labyrinth Of Minoas"
hm very nice!
One may wonder.... What was stupid me figuring out for 2 days.. I didn't figure anything out by myself..
One may wonder.... What was stupid me figuring out for 2 days.. I didn't figure anything out by myself..
Our music sent up to God.
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
Partituræ Immortales | Ghost Label records | Spotify Playlist Curators | Artists' Database
Re: An analysis on the game "The Labyrinth Of Minoas"
"E"= Entrée (Entrance)
"S"= Sortie (Exit)
5) >>> Yes, it rotates Right> -33,1,+33,-1... Left> -33,-1,+33,1 (-33 is the North/Up)
D value is use to move the player to the D_file cursor.
A,B,C is used to test the point of view (left/front/right) walls to display the right picture.
ABS function is the abscise from a value ABS(D)=D, ABS(-D)=D
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
- 1024MAK
- Posts: 5145
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: An analysis on the game "The Labyrinth Of Minoas"
ABS is short for absolute, it removes the sign.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: An analysis on the game "The Labyrinth Of Minoas"
Sorry, yes it's absolute !
Not abstract, absolutely absent abs (abdominals) or ABS breaks.
Thanks Mark.
Not abstract, absolutely absent abs (abdominals) or ABS breaks.
Thanks Mark.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)