News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

PCW 8256 Infocom issue with Gotek .dsk image

Started by arnuph1s, 20:12, 20 September 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnuph1s

Hello everyone. Here is a good one for you
I have a 8256 with Gotek drive and am running into issues with Infocom games. The games load and play fine. The issue is with the save/restore. I use an empty disk image to save the game to. That works fine. When I try to restore the save game it fails after I am asked to put the game disk back in. The program either restarts at the beginning of becomes corrupted. I got an actual file error on one title.

I tried save/load with some other non-Infocom titles and it works fine.

Is there a special format for save disks?
Thanks in advance.

Oh and I contacted the maker of the Gotek drive. He was very helpful. He managed to replicate the error on his Gotek and also on a PCW emulator. It would be great to figure this out as I really want to enjoy some old school adventuring! I will probably play some Magnetic Scrolls titles in the meantime as their save/load works with no issues.

GeoffB17

#1
Not sure where the problem lies with this.

There is NO special format for SAVE disks, they should be the standard format.

When you swap the disks, what do you do.   I suspect there's something to do with using a Ctrl-C to force the system to recognise the disk change.  The Joyce emulator needs this if you swap disks.   I think when I was trying to get The Pawn game working this involved disk changes and this needed a Ctrl-C but this was a while ago.  If it's real disks in a real drive things are OK, but emulation setup needs a little help to recognise that disk has been changed?

Oh, in the case of the PCW, it's actually Alt+C key to generate the Ctrl+C code required

Geoff

arnuph1s

Thanks for the suggestions. The disk mounts fine. The save game is written to it. It is read back in by the game when you restore but for some reason the data is corrupt and this is what trashes the game when you try to continue from a save. The issue only happens with Infocom games. Other games work fine. This is all being done on real iron with a Gotek. It has been tried on two different machines with their own Gotek drive. It can be replaced on an emulated 8256 as well. It has to do with the way these particular games write to/from a disk. It's so very odd.

arnuph1s

I guess no one else plays Infocom games on this machine huh? Shame as the green screen really lends itself to the classic feel of a text adventure.

GeoffB17

Sorry,

I didn't see your reply of the 21st, else I'd have asked.

When you say 'corrupted', what do you mean?   Are you referring to the disk file, i.e. the save file on the disk, or do you mean the data read from the file into RAM somewhere?

Is it possible to copy the saved file to M:, then go into the game, then load the saved file from M: - is that any different?

Also, are the disks of the same type, i.e. a 180k image (or both of a 730k image).   Not a good idea to mix image types.   Infocom don't know about the format header on the disk, their system might miss reading it.

When you say 'replaced' on an emulated system, do you mean that the same error is 'replicated'.

I don't have a Gotek, so I cannot replicate that part.   But if the emulator would do the same, I could try the same thing in Joyce, which I do have.

Geoff

arnuph1s

Thanks for the reply!


So, to explain. Both the Infocom game disk and blank save game disk are 180k images on the Gotek. You can save the game and when prompted, I switched the disk in drive A: to the blank one and once it was done, switched back to the game disk image. No issues there. I checked the blank disk in CP/M via a DIR command and the file is there. When you start the game and choose the restore command it asks for the save disk. So i switch it in and the system loads the save file. Then it asks for the game disk to be reinserted. I do that and when I try to resume the game one of several things happen depending on which Infocom game it is. Some will just restart the game like it was a new game. Some get a gibberish text, others give a file error and some just say load failed.


I tried save/load with other games such as the Pawn, Jinxter, guild of Thieves and Blackstar and all work fine. This was also tried with another gotek drive on another machine and in an emulator program. It must be the way the program writes its format that causes the issue.

GeoffB17

Hello,

I'm just trying to rule things out, and narrow down possibilities.

Did you try the suggestion re using M:?   One thing that needs to be checked is - is the saved file correct?  Maybe the save is garbage from the start, you save garbage, then reload garbage, then when you try to play again, you get problems, or the loaded garbage causes problems immed?

I have here the Amstrad version of HHGTTG, complete (even the fluff amd the microscopic space fleet).  There is a card instruction thing separate from the main manual, which is specific to HHGTTG.   The card is generic, and seems to relate to all CP/M games.   It specifically says you can save to ANY valid disk device, so it should be OK to run the game from, say, A: and save to M:, or run the game from M: (for speed) but save/restore to A:.  I have a number of the other games, the ones I've tried have worked, but I confess that I've never got far enough to try save/restore.

My understanding is that the SAVE process will write one (or more) blocks of RAM to the disk.   The RESTORE process should write that data back to the same RAM as it was read from.  If the software has read the correct RAM, I'd expect it to write it back OK, nothing should have changed otherwise.

I'll try some things here.   Using the real PCW, save at a specific point.   Then do the same thing on Joyce.   Compare the two .SAV files, see if there are any differences.   There should NOT be.

Geoff

arnuph1s

Thank you for the helpful response!


So I saved to M:
used PIP to move the file to a 180k blank disc image
Restored from said image.
Worked fine.


So it's something in the way it writes that throws the Gotek off I am guessing.


But at least this is a workaround.


Thanks again.

GeoffB17

Well, interesting that that worked - or at least helped.

I'was playing with my HHGTTG last night, on the 'real' PCW, and with an image of SORCERER on Joyce (emulator).

The game on the PCW worked fine, saved/loaded OK, dir afterwards fine.

The game on Joyce was misbehaving, somewhat like you describe.  Trying to work out what/why.

As far as I can tell, the saved file is normal/correct, the save/restore CAN work OK, other damage permitting.

BUT, when the file is saved, the process seems to corrupt the .COM file.   To what extent seems to depend on the other files on the disk.

Hence I had a seriously damaged SORCERER.COM file, that was showing as 2k instead of 12k, but it still worked and started the game again and did a restore.   No doubt it would have crashed in due course.   Other files on the disk were also damaged, but NOT the .DAT file (as far as I could tell).

I will try more things.   It is a BIG help that the problem is happening here.

Some possibilities, I need to check the disk format and ensure everything is correct.   I'm wondering about some of the details I get.  On a CF2 disk, I'm pretty sure the Allocation Block size should be 1k, but it seems to be 2k.

The other thing is - sabotage.  Yes!  I'm not sure that what is happening is accidental, it's just too specific.   It's like the game is deciding it's a pirate copy and is messing intentionally.   So how is it deciding, and what can we do about it?

What files are on your disk, and what order are they in?   I suspect that the files should be the .COM file, then the .DAT file, and then any .SAV files.   I've done multiple .SAV files on the same disk, no problems.

First, can you send my a copy of your image .DSK file, so I can look at the data in the directory area, and the format header (XDPB) info in the first sector of the first track.

Can you copy all the files off your image, then delete everything.   Then copy the files back one-by-one, .COM, then .DAT, then any .SAV - ideally nothing else.   See if that then behaves?

Geoff

GeoffB17

I don't know what type of image you are using, but when I was playing SORCERER, the disk image was a CPC System format, not a PCW format.   These are very similar.   When I transferred the files to a correct PCW format .DSK file, this seems to have stopped the problems, and the SAVE process now does not cause problems.   So far!!

I suspect that when the Infocom Interpreter creates the SAVE file it must do so in a slightly non standard way, maybe doing something 'direct-to-disk' and this causes problems if the format isn't EXACTLY what it thought it was.   The PCW format and the CPC System format may be sufficiently different to cause a problem.   The PCW NORMALLY can handle the CPC System and Data formats OK, if given chance, but the disk swap process may interfere with this.   The swap may be happening totally INSIDE the program, so CP/M never gets a chance to recognise the disk change (and maybe the format change).

Anyway, I suggest that you ensure that a blank image is PCW format, and you copy the game files to it.   I guess the order of the files doesn't matter.  If you want to use a data disk for saved files, ensure that that too is PCW format, and not CPC format.   Then you should be OK.  There should be enough space on the disk for at least a couple of save files though.

I would still like to see a copy of the image you've been having problems with, this will help confirm things for sure.

Geoff

arnuph1s

Many thanks for checking into this. I will try the things suggested. In the meantime I will send you an image of one of the games I tried.


GeoffB17

Thanks for the image.

I've looked at the file.   This image is a PCW format, so that's one thing less to worry about.   It's an 'extended' image, which might be used for systems involving some sort of copy protection, but this variant isn't really required here, but I don't think this is anything to do with the problem.

I've played the image within Joyce, and it seems to be operating perfectly OK, apart from the poodle!

I've done a SAVE and RESTORE, no sign of any problem.   Files all OK.  .SAV file on the same disk as prog, so no swap necessary.

Geoff

GeoffB17

I should have added to the above,

The format for the WishBringer .DSK is more PCW like, but it is not fully PCW like.  In particular, the disk does NOT have the xDPB information, which means that the PCW may not reliably detect the disk format.   This image has been working OK for me so far, on Joyce even, and I'll try it on the real PCW but I would expect this to be OK, but I've not been trying any REAL disk swap as you seem inclined to do.

So, if this image does cause you problems, I'd suggest you follow the previous advice and create a 100% PCW image and transfer the files to that.   Try doing the same for any other image that gives the same problems.

Geoff

arnuph1s

Yes. Formatting a new disk and copying files onto it seems to have fixed the issue. Thanks again.

Powered by SMFPacks Menu Editor Mod