The Sinister Hall
On Black Malta, one resident vanishes every year, and nobody knows where they go. This year it is you. The Forces of Evil carry you off to the Sinister Hall, a place that exists only on the life force of the person it holds, and that lasts a year. The Forces of Good have given you a saber and one chance: fight your way through ten levels of the Hall and get home.
The game was written at the end of 1993 for the Soviet Elektronika MK-52 and MK-61 by Evgeny Vek, as one of the Good and Evil series (see also Twin Peaks), and was published in the magazine BLIC in 1994. The MK-52/61 listing below is his program. The HP-15C version is a re-implementation of its rules, not a translation: the original drives the game with the angle-mode switch and draws its picture with hidden digits, and the HP-15C has neither.
Ported game. The Sinister Hall is not an HP game. It was written in 1993 by Evgeny Vek (Lord_BSS) for the Soviet Elektronika MK-52 and MK-61, and this page is based on his work. The MK listing below is his program as he published it, and the original page, in Russian, is at lordbss.narod.ru/pmk65.html. The HP-15C version follows his rules, which were worked out by running his program on an emulator, but the program itself is new, and it is not endorsed by him.
How a game goes
Each level is a corridor of eight squares, numbered 0 to 7. You start on square 0 at the right-hand end and the portal to the next level is on square 7, at the left-hand end. Before you stands a monster and a witch, each on a random square from 1 to 6, and two barriers, also on random squares from 1 to 6: a low one that stops the monster and a high one that stops the witch.
- You move. Each turn you step left (towards the portal), stay put, or step right. You cannot step off the start.
- Square 7 ends the level. Reach it and you are through, whatever is behind you. Clear the tenth level and you are home.
- The monster moves, then the witch. Each takes one step towards you, unless the square it would step onto holds its own barrier, in which case it stays where it is. The monster’s barrier does nothing to the witch, and the witch’s nothing to the monster.
- If one of them is on your square, it attacks. That can be because it was already there, or because it has just stepped onto you.
- The attack is a short fight of strike frames. The monster attacks three times and the witch five. For each one the enemy lunges from a random square. When it is next to you or on top of you you must strike towards it, and when it is further away you do nothing. Strike the wrong way, or too late, and the game is over.
The enemies never give up and do not die. After a fight the enemy is still on your square, and when you step away it follows and attacks again. The only way to shake one off is to put its own barrier between you and it: an enemy can never step onto its barrier’s square, so it waits on the near side while you stay on the far one.
Playing on the HP-15C
Key in the program, then:
- Seed the random generator once: type any number, then STO RAN#.
- Press f A. The program stops on the video, which shows the whole corridor. The number of levels left is in Y: x<>y shows it, and x<>y again puts the video back.
- Type your move and press R/S: 1 step left, 2 stay, 3 step right.
- If the display shows −1.00 or −2.00, you are under attack, by the monster or by the witch. Get ready, then press R/S: the strike frames start at once.
- In a fight, frame after frame flashes by on the display, each for about a second. When the enemy is next to you or on top of you, press R/S while the frame is showing, type the direction of your strike, 1 left, 2 ahead or 3 right, and press R/S again. When the enemy is further away you need do nothing.
- Error 0 means you lost. 95.00 means you made it home.
Reading the video
The video is an eight-digit number, one digit per square, with square 7 on the left and square 0 on the right, as in the corridor. Each digit adds up what is on the square:
| Digit | On the square |
|---|---|
| 8 | The portal, always on square 7 |
| 4 | You |
| 2 | The witch |
| 1 | The monster |
A 5 is you and the monster on one square, a 6 is you and the witch, a 3 the monster and the witch, and a 7 all three. A 0 is an empty square. The two decimals are the barriers, the low one first and then the high one. The 15C puts a comma after every three digits; they are not squares. The video 80,102,004.22 reads: portal on 7, monster on 5, witch on 3, you on 0, and both barriers on square 2. The monster’s barrier is on 2, so the monster can walk from 5 down to 3, but no further.
Reading a strike frame
A frame is a corridor with you in the middle, on square 3, shown as a 4, and the enemy somewhere on squares 1 to 6, shown as a 1 for the monster and a 2 for the witch. The two decimals count the frames still to come, including this one.
| Frame | The enemy is | You |
|---|---|---|
| 80,014,000.03 | on square 4, just to your left | strike left, 1 |
| 80,005,000.03 | on your square (5 = you + monster) | strike ahead, 2 |
| 80,004,100.03 | on square 2, just to your right | strike right, 3 |
| any other | two or more squares away | nothing |
These are monster frames. The witch’s frames show a 2 where the monster’s show a 1, and count down from 5.
Press R/S only while a frame is on screen. If you stop the program between frames, it may come out of step.
Playing on the MK-52 / MK-61
Key in the program in program mode (F PRG), switch to run mode (F AVT), key in the register setup, and start with GOTO 33 R/S. The calculator’s RAD/GRD/DEG switch is the control: Р is left, ГРД is ahead and Г is right. The original’s own instructions:
- The video is shown in X and the number of levels left in Y. It reads like the HP-15C’s, but in the symbols the MK can spell out with its hidden digits: 8 on the far left is the portal, E the monster, C the witch, L the low barrier, Г the high barrier, and – you. Two things on one square merge into another symbol: the original’s table of mergers is a XOR of the objects’ weights (E 1, Г 2, C 3, L 4, you 5), so for example the monster and the witch together look like a Г, and both barriers together like a 9.
- Set the switch for your move and press R/S: left (Р) steps towards the portal and Г steps back.
- –E–C–97 is the danger signal: look at RA. 3 is the monster and 5 the witch. Check that your saber is sharp, and press R/S.
- Now the video flickers, and you must work the switch quickly. Strike left (Р) or right (Г) at an enemy next to you, and ahead (ГРД) when L or 9 flashes in the middle of the picture. Hold the switch until the strike is done, at least five seconds before the long pause.
- ЕГГОГ (the MK’s “error” message) means you lost. If you press В/О, then ПП, then F ПРГ, the step is 44 if the monster killed you, and 01 if the witch did.
- end–95 means you got home.
Reading the MK listing
The listing is the author’s table, one line per program step, with the step number on the left. Cells that are Cyrillic are the Russian key labels; the comment gives the English name.
| Russian | English | Russian | English |
|---|---|---|---|
| Пх n | RCL n | БП | GOTO |
| хП n | STO n | ПП | GSB |
| С/П | R/S | В/О | RTN |
| ВП | EEX | /–/ | CHS |
| ↔ | x<>y | Сх | CLX |
| F Вх | LASTX | F10х | 10^x |
| FL0 to FL3 | decrement and loop on R0 to R3 | Fsin | SIN |
| К {x} | FRAC | К [x] | INT |
| К ЗН | SIGN | К ИНВ | invert the digits |
| К ∨, К ⊕ | OR, XOR of the digits | К СЧ | random number |
| К БП, К ПП, К Пх, К хП | indirect GOTO, GSB, RCL, STO | К x=0 | indirect test |
The conditional jumps (F x≠0, F x=0) take the next step as their address, and the MK jumps when
the condition is false.
Two things in the listing are not typos. First, the registers RD and RE hold hidden-digit
numbers that serve twice: shown, they are the texts –E–C–97 and end–95, and the last two digits of each are
also the addresses 97 and 95 that К ПП Д and К x=0 Е jump to. Second, step 94 К – is not a documented
instruction: it halts the program with ЕГГОГ. It is what a wrong strike runs into.
HP-15C port
Numbered as the HP-15C numbers its program lines: every digit, decimal point and EEX is a line of its own, 197 in all. Run it with f A.
001LBL A ; new game: FIX 2, ten levels
002FIX 2
0031
0040
005STO 0
006GSB 2
007GTO 1
008LBL 2 ; subroutine: new level, hero on square 0, four random squares 1-6
0090
010STO 1
011GSB 0
012STO 2 ; monster
013GSB 0
014STO 3 ; witch
015GSB 0
016STO 4 ; low barrier, stops the monster
017GSB 0
018STO 5 ; high barrier, stops the witch
019RTN
020LBL 0 ; subroutine: random square 1-6
021RAN#
0226
023×
024INT
0251
026+
027RTN
028LBL 1 ; the video: one digit a square, square 7 on the left. Hero 4 + witch 2 + monster 1, portal 8. The decimals are the barriers
029RCL 0
0308
031EEX
0327
033RCL 1
03410^x
0354
036×
037+
038RCL 2
03910^x
040+
041RCL 3
04210^x
0432
044×
045+
046RCL 4
0471
0480
049÷
050+
051RCL 5
0521
0530
0540
055÷
056+
057R/S ; type 1 left, 2 stay or 3 right, then R/S
058STO 9
0591
060x=y?
061GTO 5
062RCL 9
0633
064x=y?
065GTO 6
066GTO 4
067LBL 5 ; step left, towards the portal
0681
069STO+ 1
070GTO 4
071LBL 6 ; step right, but not off the start
072RCL 1
073x=0?
074GTO 4
0751
076STO− 1
077LBL 4 ; portal reached? otherwise the monster moves, then the witch
078RCL 1
0797
080x=y?
081GTO 8
082RCL 2
083STO 6
084RCL 4
085STO 7
0863
087STO 8
088GSB 3
089RCL 6
090STO 2
091RCL 3
092STO 6
093RCL 5
094STO 7
0955
096STO 8
097GSB 3
098RCL 6
099STO 3
100GTO 1
101LBL 8 ; level cleared
1021
103STO− 0
104RCL 0
105x=0?
106GTO 9
107GSB 2
108GTO 1
109LBL 9 ; all ten cleared: you are home
1109
1115
112R/S
113LBL 3 ; subroutine: one enemy's move. R6 its square, R7 its barrier, R8 its strikes
114RCL 1
115RCL 6
116x=y?
117GTO .0
118x<y?
119GTO .1
1201
121CHS
122GTO .2
123LBL .1
1241
125LBL .2 ; step one square towards the hero, unless the barrier is there
126RCL 6
127+
128RCL 7
129x=y?
130RTN
131x<>y
132STO 6
133RCL 1
134x=y?
135GTO .0
136RTN
137LBL .0 ; the attack: -1 monster, -2 witch, then R/S starts the strike frames
138RCL 8
1392
140÷
141INT
142STO .1
143CHS
144R/S
145LBL .3 ; a frame: hero on square 3, the enemy on a random square 1-6, strikes left in the decimals. Press R/S while it shows
146GSB 0
147STO 9
1488
149EEX
1507
1514
152EEX
1533
154+
155RCL .1
156RCL 9
15710^x
158×
159+
160RCL 8
1611
1620
1630
164÷
165+
166STO .2
167PSE
168RCL .2
169x=y?
170GTO .4
171x<>y
172GTO .5
173LBL .4 ; no key typed
1740
175LBL .5 ; the key: 1 strike left, 2 ahead, 3 right. Needed only when the enemy is on square 2, 3 or 4
176STO .3
177RCL 9
1783
179−
180ABS
1811
182x<y?
183GTO .6
184RCL 9
185RCL .3
186+
1875
188x=y?
189GTO .6
1901
191ENTER
1920
193÷
194LBL .6 ; next frame, or the enemy gives up
195DSE 8
196GTO .3
197RTN
Elektronika MK-52 / MK-61 original program
The author's own program, step for step as published. Start it with GOTO 33 R/S.
00В/О ; RTN: an empty return stack lands here, and execution carries on at 01
015
02хП1 ; R1 = 5 objects to draw on the video row
038
04хП2 ; R2 = 8: the pointer for К Пх 2, which counts it down before each use
05Кинв ; K INV: a blank row to draw on
06КПх2 ; RCL (R2): the next object's square, in turn R7 hero, R6 low barrier, R5 witch, R4 high barrier, R3 monster
07F10х ; 10^x
08Пх1 ; RCL 1: its weight, 5 for the hero down to 1 for the monster
09х
10Пх9 ; RCL 9: 10^7, the 8 on the left
11+
12К⊕ ; K XOR: draw it. Objects on one square merge into another symbol
13FL1 ; next object
1406
15Пх0 ; RCL 0: levels left
16↔ ; the row in X, the levels in Y
17С/П ; show the row. Set the switch, then R/S
18Пх9 ; RCL 9: 10^7
19Fsin ; sin of it: positive in RAD, zero in GRAD, negative in DEG
20Кзн ; SIGN: +1 left (Р), 0 ahead (ГРД), -1 right (Г)
21Пх7 ; RCL 7: the hero's square
22+
23хП7 ; R7: the hero has moved
247
25хП1 ; R1 = 7: the pointer for the next layout
26– ; hero − 7
27Kx=oВ ; if the hero is not on square 7, jump to RB = 40: the enemies move
28FL0 ; on square 7: one level fewer
2932 ; levels left: on to 32
30ПхЕ ; none left: RCL E
31С/П ; end-95: you are home
32хП7 ; R7 = 0: the hero back at the start
334 ; start here with GOTO 33
34хП2 ; R2 = 4 squares to lay out
35КППД ; GSB (RD) = 97: a random square 1-6
36КхП1 ; STO (R1): into R6, R5, R4, R3 in turn
37FL2 ; four times
3835
39В/О ; back to the top, to draw the row
40Пх6 ; the monster's turn: its barrier, the low one
413 ; the monster is R3
42ПП ; call 46 for the monster
4346
44Пх4 ; the witch's turn: her barrier, the high one (a monster's death ends at 44)
455 ; the witch is R5; carries on into 46
46хП2 ; R2 = 3 or 5: the number of strikes
47хПА ; RA = 3 or 5: who it is
48↔ ; the barrier to X
49Пх7 ; the hero's square
50КПхА ; RCL (RA): the enemy's square
51– ; hero − enemy
52Fx≠o ; on the same square: jump to 64, the attack
5364
54Кзн ; which way the hero lies
55КПхА ; the enemy's square
56+ ; one step towards the hero
57– ; barrier − the new square
58Kx≠o9 ; the barrier is there: jump to R9, whose last two digits are 00: the enemy stays put
59FВх ; the new square again
60КхПА ; STO (RA): the enemy moves
61Пх7 ; the hero's square
62–
63Kx=o9 ; not on the hero: jump to 00 again, the turn is over
64ПхД ; RCL D: the danger text, -E-C-97
65С/П ; show it. RA = 3 the monster, 5 the witch. R/S starts the strike frames
66КППД ; a random square 1-6 for the enemy in this frame
67хП1 ; R1
68F10х ; 10^x
69Пх9 ; 10^7
70+
71ПхА ; 3 or 5
722
73– ; 1 for the monster, 3 for the witch
74х ; the enemy's symbol on its square
75Пх8 ; RCL 8: the frame's backdrop, a – on the hero's square
76К⊕ ; draw the enemy
77В↑ ; the frame fills the stack, so it stays on show
78В↑
79В↑
80В↑
81Пх1 ; the enemy's square
823
83– ; square − 3
84Кзн
85FВх
86– ; zero only for squares 2, 3 and 4: close enough to strike
87Kx=oЕ ; any other square: jump to 95, no strike needed
88FВх ; square − 3: -1 right, 0 ahead, +1 left
89Пх9
90Fsin
91Кзн ; the switch: +1 Р, 0 ГРД, -1 Г
92–
93Kx≠oЕ ; the switch is right: jump to 95
94К– ; wrong: this step halts with ЕГГОГ
95FL2 ; next frame
9666
97ПхС ; RCL C: the random seed
98В↑
99Ксч ; K RND
A0хПС ; STO C
A17
A2х
A3К[х] ; INT: 0 to 6
A4Kx≠oД ; zero: jump to RD = 97 and draw again. Otherwise falls off the end, into 00, and returns
Run this after keying in the program and before the first game. Two of the constants are hidden-code numbers that the program uses as on-screen text and as jump addresses.
10 ; the number of levels
хП0 ; R0
7
хП1 ; R1
Сх
хП7 ; R7 = 0: the hero's square
50005
Кинв ; K INV: hidden digits for the frame's backdrop
хП8 ; R8
7
F10х
хП9 ; R9 = 10^7
40
хПВ ; RB = 40: where the enemies' turn starts
0,12345 ; any number from 0 to 1: the random seed
хПС ; RC
888888 ; the next two stores build texts that double as jump addresses
В↑
66531295
К∨ ; written "KV" on the original page
К{x}
ВП
7
хПЕ ; RE shows the winning text, and its last two digits, 95, are the address of step 95
55153568
Кинв
К{x}
ВП
7
хПД ; RD shows the danger text, and its last two digits, 97, are the address of step 97
Original game by Evgeny Vek (Lord_BSS), 1993. Source page.