Page 2 of 5

Posted: Sun Jan 24, 2010 9:57 am
by Unseen
carlsson wrote:TNT has written his own Z-machine interpreter which runs on PET, VIC-20 and so on.
Oh, neat.

In that case you could just send "CD_" (left arrow) and "CD:<name_of_disk2.d64>" to the drive, the button does basically the same but with less choice which file to change into.

Posted: Mon Jan 25, 2010 2:07 am
by orion70
OK thanks Unseen - but the problem is: once you load the Z-machine, you can't exit to BASIC, but you have to swap disks and load the story disk from the Z-Loader menu. This is the problem with Infocom adventures on *.d64. :cry:

Posted: Mon Jan 25, 2010 2:34 am
by carlsson
Is it at all possible that the sd2iec/uIEC could emulate two drives in one device, i.e. 0: and 1: ? If so, it could've been setup with game disk into 0 and save disk into 1. It would be quite natural on a PET but unusual on a VIC.

Posted: Mon Jan 25, 2010 7:59 am
by Mike
Orion70 provided me with enough information, so I could make sure, that the method I described above would work:

The game disc data is mirrored in a CBM partition on a *.d81 file, and the interpreter itself is copied over as regular file. As far as the standard U1/U2 commands are concerned, they access the data on the CBM partition as if it were on a 1541: the track/sector range on a 1581 is 80 tracks@40 sectors, a superset of the 1541 track/sector layout with 35 tracks (@ 21 sectors, max.). And the CBM partition simply allocates the first 35 tracks for this to work.

Orion70, and/or TNT surely will disclose further details in due time.

Posted: Mon Jan 25, 2010 9:35 am
by Unseen
orion70 wrote:OK thanks Unseen - but the problem is: once you load the Z-machine, you can't exit to BASIC, but you have to swap disks and load the story disk from the Z-Loader menu. This is the problem with Infocom adventures on *.d64. :cry:
Now guess why the firmware supports two "disk change" buttons which walk the list of disk images (AUTOSWAP.LST by default, can be overridden with XS:<filename>) forward and backward...
carlsson wrote:Is it at all possible that the sd2iec/uIEC could emulate two drives in one device, i.e. 0: and 1: ? If so, it could've been setup with game disk into 0 and save disk into 1. It would be quite natural on a PET but unusual on a VIC.
They already do, in a way similiar to the CMD drives. If you have more than one partition on your storage medium (SD/CF card, IDE drive) they will show up as 1:, 2: and so on. If you have more than one medium (for example two drives on a uIEC/CF) the partitions of the second medium will follow the ones of the first. 0: points to 1: by default but can be moved to any other number with "C-P<number>", which is quite useful when you're dealing with software that doesn't send a device at all or always adds 0:.

Posted: Mon Jan 25, 2010 9:47 am
by orion70
Unseen wrote:
orion70 wrote:OK thanks Unseen - but the problem is: once you load the Z-machine, you can't exit to BASIC, but you have to swap disks and load the story disk from the Z-Loader menu. This is the problem with Infocom adventures on *.d64. :cry:
Now guess why the firmware supports two "disk change" buttons which walk the list of disk images (AUTOSWAP.LST by default, can be overridden with XS:<filename>) forward and backward...
Me stupid! I didn't think I was going to need them :evil: .
Hope the *.d81 will eventually get rid of this problem.

Posted: Tue Jan 26, 2010 3:50 pm
by TNT
Mike wrote:Orion70 provided me with enough information, so I could make sure, that the method I described above would work:

The game disc data is mirrored in a CBM partition on a *.d81 file, and the interpreter itself is copied over as regular file.
...
That alone does not do much good as far as saving is concerned, as save state would still overwrite z-machine data. If interpreter knows it's running from 1581 it can use 40 sectors / track and have plenty of room for saves.

(sorry about polluting this thread with discussion belonging here)

edit: to get this post somewhat hardware-related... I'm planning to mount activity LEDs on small switches - that way I don't need to drill additional holes for disk change buttons. Whether I can attach them securely to the case remains to be seen.

Posted: Tue Jan 26, 2010 4:12 pm
by Mike
In an earlier posting you wrote:
TNT wrote:Because Infocom games don't usually have enough space for save files on data disk, and I guess most FE3 owners have not installed disk change buttons.
... from which I inferred, that the save file should have been a regular one, present in the directory, and allocated via BAM.

As the game disc data of the *.d64 is transferred into a CBM partition, it is not affected by regular files, and also survives a validate.
That alone does not do much good as far as saving is concerned, as save state would still overwrite z-machine data.
If that still doesn't help because even the save disc data is done with direct access, I'd assume a more fundamental design issue in your interpreter, and/or raise the question why you didn't settle on a bigger format (*.d71 or *.d81) in the first place.
(sorry about polluting this thread with discussion belonging here)
Granted. Even though the topic deviation arose as orion70 asked how to use your Z-code interpreter without the necessity to swap disks in the FE3. Sorry I couldn't be more helpful in this regard.

Posted: Wed Jan 27, 2010 1:51 am
by TNT
Mike wrote:Iwhy you didn't settle on a bigger format (*.d71 or *.d81) in the first place.
To keep it usable on real hardware if someone wishes to have an ultimate oldschool-experience.

Posted: Wed Jan 27, 2010 2:25 am
by orion70
FE3 + VIC-20 is a real hardware experience, indeed :D .

That's why I ask TNT now: given that I provided Mike with enough info to produce a *.d81 version of Infocom adventures, which includes both the interpreter AND the story disk, would it be a big issue for you to modify the engine, so that games can be saved without direct access to the disk?

See guys, we're now just a single step away from a great achievement, and it would be usable BOTH in FE3 and emulation. Plus, in the same way, this structure and plenty of room in a *.d81 could eventually lead to graphic/text adventures... :wink:

Posted: Wed Jan 27, 2010 3:29 am
by Pedro Lambrini
So, to continue the OT, can I ask some ignorant questions? When reading the above few posts it sounds to me like the Infocom interpreter and games is both close to working and not really there yet?!? How close is this to being fully functional? And if it's close are there any caveats as to using it? Also, what are the game limits??

The reason I ask is because I bought a FE3 solely in the hope that this comes out. Spending £70 to play Infocom adventures on my Vic is well worth it! :wink:

Posted: Wed Jan 27, 2010 6:07 am
by orion70
Pedro Lambrini wrote:The reason I ask is because I bought a FE3 solely in the hope that this comes out. Spending £70 to play Infocom adventures on my Vic is well worth it! :wink:
I'm happy you're such an Infocom fan! :D

I can answer to your questions from my own point of view, i.e. the one of a game tester and final user. The goals accomplished to this point are:

1) TNT has done a great job in creating the Infocom interpreter ("Z-Machine", ZM) for the VIC-20, and adapting the adventure disks to be read from it.
2) The ZM and the adventure are placed in two different disks (or *.d64s, if you prefer).
3) Once you run the ZM, you have to choose the desired number of columns and rows, the colours of border, text and background, switch to the adventure disk ("story disk"), and press RETURN.
4) You can now enjoy your Infocom adventure. Most adventures of the first and second generation have been translated this way; others are simply too big to fit into a VIC story disk (e.g. Sherlock, unfortunately).
5) I tested almost every single adventure of the 24 (!) available, and found no problems, except for Seastalker which had an ASCII map not correctly dispalyed, requiring a patch. The patched adventure works flawlessly now.
6) If you want, you already can play them on real hardware, creating the physical disks and swapping between them with the 1541.
7) The problem with FE3 is: if you don't have the switch disk buttons, you simply can't swap between the ZM and the story disk.
8 ) To circumvent this issue, Mike produced a version of the adventures in which the ZM and the story disk reside both on the same *.d81 image, readable by the FE3.
9) Unfortunately, as the savegame function accesses directly the story disk, it corrupts the whole contents of the *.d81 disk (this point is not so clear for me :? ).
10) Producing a ZM which can save games without direct access seems to be quite difficult, and I asked TNT to which point this means re-writing the engine from scratch.

Summary: you reallly can play Infocom adventures on diskettes with a real VIC, or using either D64s or D81s in VICE; and even play them with a real VIC with FE3, but to this point of development you can't save games.

Hope this helps. :wink:

Posted: Wed Jan 27, 2010 6:28 am
by Diddl
Small question:

why not solder this disk change buttons at FE3? :?:



The firmware is a normal SD2IEC firmware and Disk change is supported.


The reason we don't have this two switch on our FE3 is simply, we (the FE3 team) doesn't know it is nessecary on a VIC. I believd all games for VIC fit on a single disk.

Posted: Wed Jan 27, 2010 7:34 am
by orion70
Because the cart is done and closed :mrgreen: and my friend and I are too lazy to 1) open it up, 2) solder the buttons and 3) modify the plastic for buttons to fit into!

My philosophy: why perform risky hardware changes, when you can obtain the same result with software changes? :P

Posted: Wed Jan 27, 2010 4:06 pm
by TNT
OTOH: why change software and risk adding new bugs when there is a tested hardware solution?