2

Well, I've downloaded an old non-English textual adventure, which of course, "for the sake of professionalism" have list disabled. Even after entering pokes for enabling "run-stop/restore" and for enabling "list" it continually questions for an input (in-game). I've tried to enter listing even on starting screen but it regards an emulated "run/stop-restore" just as any other button. "press any key" (just in our language...) .

Link with downloadable .prg:

http://retrospec.sgn.net/users/tomcat/yu/C64/MiscGames/Html/BezMilosti.php

P.S.: Because of auto-loading of .prg format when dragged over screen in V.I.C.E I've even made a new .d64 disk and as such, provoked the infamous "Loading. Ready." state. From that place I've entered pokes indeed.

P.S. 2: I've posted a theme and thread about this problem under "scene" category on "lemon", the top-ranked site dedicated to commodore:

*edit (importing of the link):

https://www.lemon64.com/forum/viewtopic.php?t=69043

3
  • 2
    Wouldn't it be easier to just load the game into VICE, dump the memory image, find the BASIC program in RAM, and de-tokenize it?
    – Cactus
    Sep 14, 2018 at 2:28
  • 1
    It would help us a lot if you phrased your request as a question. For example, are you asking if it can be listed, how it can be listed, or to simply show you the listing?
    – DrSheldon
    Sep 14, 2018 at 4:51
  • I can't rephraze it without significantly changing a meaning...
    – perpetuum
    Sep 22, 2018 at 14:22

2 Answers 2

9

Those programs aren't BASIC*. Detokeninzing them with petcat produces:

$ petcat bez\ milosti-inst.prg 


;bez milosti-inst.prg ==0801==
 1991 sys2065 tmc

$ petcat bez\ milosti.prg 


;bez milosti.prg ==0801==
 1987 sys2065 fbg

So each of those prg files contains only one line of BASIC code: a sys instruction that jumps into the machine code part of the program.


* or if they were originally written in BASIC they were compiled, and so the original source/tokens have been replaced by machine code

1
  • Thanx a lot for a link & info...
    – perpetuum
    Sep 22, 2018 at 14:23
4

Laurence Gosalves's answer is correct insofar as your game, Bez Milosti, is concerned, since it looks like the game is written either in machine language or in compiled BASIC. However, not all text adventures which, when listed, simply show an SYS command, are like this. Sometimes the game really is distributed as interpreted BASIC, the source code for which is initially hidden but gets decrypted or decompressed by a short machine-language routine.

You can verify this for a given game by LOADing (but not RUNning) it, LISTing it, and then using a machine-language monitor (such as the one built into VICE) to disassemble the memory starting at the SYS address. Or, even if (like me) you're not adept at reading 6502 assembly language, you can try RUNning the game and then dumping memory at $0801, which is the start of BASIC. If you see what looks like variable names and the contents of strings or REMarks, then the game is indeed decrypted or decompressed BASIC. At this point you can use the monitor to re-enable the RUN/STOP key (> 0328 ED in the VICE monitor), use that key to stop the program, and then LIST or SAVE it to disk. (Note that many such programs also disable the LIST command, so you may need to first re-enable it with > 0307 A7 from the monitor or POKE 775,167 from BASIC.)

An example of a commercially distributed BASIC game that uses this compression technique is Tombs of Xeiops. If you LIST the game after LOADing, all you see is this:

239 SYS2061

However, after running the game, and then re-enabling RUN/STOP and LIST via the VICE monitor, the game can be stopped and listed:

BREAK IN 3054
READY.
LIST

1 GOSUB 3150:CR$=CHR$(13):CP=1
2 GOSUB 2230:VA$="IT LOOKS VALUABLE TO ME":FC$="THE CAT IS FRIGHTENED"
3 I1$="YOU NEED A DIRECT OBJECT":S3$="I DON'T KNOW THAT WORD"
4 S1$="I CAN'T SEE IT HERE":IM$="THAT'S IMPOSSIBLE":WD$="IT IS NOW PITCH DARK"
5 W1$="THE LIZARD SEES THE CAT AND FLEES":SR$="A SILKEN BELT FALLS AT YOUR FEET"
6 GOSUB 5000
7 IFKTTHENOB%(29,0)=CP:IFCP=6THENKT=0
8 IFKTTHENPRINT"{DOWN}THE WATCHER OF THE TOMBS FOLLOWS YOU"
10 GOSUB 390
11 IFN1$="DESERT"ORN1$="SAND"THENPRINT"IT'S JUST A LOT OF SAND":GOTO10
⋮

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.