Me: Working on adding expansion disk support to this game and I'm going insane. Three bit-identical disk images give different but consistent errors.

You: What?

Me: [loading a pistol] emulators haunted

#Amiga #RetroDev

It works fine on Amiberry, but on FSUAE I get different errors depending on the KS and name of the ADF(!) (not the disk label).

It goes between working, Lock() failing, and a validation error, depending on the setup. But it's consistent for each KS+ADF combo.

I tried remaking the images and moving them to other directories but the problems remained the same.

Super. Weird.

@nivrig This is likely caused by disk image caching. The old, cached image is used unless if you rename the file, or if you replace the original file the changed file + cache will result in corruption.

In short: FS-UAE doesn't write to the original ADF file, but maintains "overlay" where the changes are written to. Thus any changes you've made will be lost if you just assume they're written to the adf and copy the file.

Where things to terribly wrong is when you replace the original ADF with a different one: Then the overlay applied on top of it will result in corrupt data.

This is totally insane and highly confusing (at least to me). It always gets people until they learn about it:

https://fs-uae.net/docs/floppy-disk-images/

Adding "writable_floppy_images = 1" to the configuration file will make FS-UAE write back to the adf, as one would expect.

Floppy disk images

The cross-platform Amiga emulator for Windows, macOS and Linux, with a particular focus on games. A user-friendly and database driven launcher, and an arcade mode frontend is also available.

FS-UAE
@harrysintonen Yeah, good shout. I had that set (I've run into it before!) but I deleted the FSUAE cache directory and it seems to be behaving better now.