macemu icon indicating copy to clipboard operation
macemu copied to clipboard

Weird freezing with Circle of Blood CD on Linux

Open Grieverheart opened this issue 1 year ago • 9 comments

On Linux, I mount https://macintoshgarden.org/games/broken-sword-the-shadow-of-the-templarscircle-of-blood as a cdrom. Then copy the installation executable to the desktop, and run the installer on the desktop, after which Basilisk II hangs. This is with the commits of 8th of October. Checked with gdb, and Basilisk II is in an infinite loop running opcode 0x0. Not sure how it gets there. The weird part is that I had a similar issue on Mac. Then I deleted BasiliskII.app and re-downloaded it, and after running it again, it was not hanging anymore...

Note that this is with a Quadra 950 ROM, with a 68040 cpu.

Another issue is that I don't have a physical cdrom on my PC, so /dev/cdrom does not exist. That means I cannot drag and drop a cd rom image because there is no drive already (drives.empty()).

Grieverheart avatar Oct 09 '23 18:10 Grieverheart

Then I deleted BasiliskII.app and re-downloaded it, and after running it again, it was not hanging anymore...

Nothing can be done without reproducibility.

Another issue is that I don't have a physical cdrom on my PC, so /dev/cdrom does not exist. That means I cannot drag and drop a cd rom image because there is no drive already (drives.empty()).

Drop mounting is possible even without an optical drive.

kanjitalk755 avatar Oct 10 '23 06:10 kanjitalk755

Nothing can be done without reproducibility.

Did you try to reproduce on Linux?

Drop mounting is possible even without an optical drive.

It's not working for me. When it reaches this line if (!drives.empty()) { in CDROMDrop, the drives are empty. Why does this fail? It tries to add this PrefsAddString("cdrom", "/dev/cdrom");, but Basilisk fails to open /dev/cdrom.

Maybe worth noting that I'm using Arch Linux.

Grieverheart avatar Oct 10 '23 06:10 Grieverheart

Possibly related, but on Linux, when I expand something on the desktop with Stuffit, the expanded folder does not appear on the desktop until I restart.

Grieverheart avatar Oct 10 '23 07:10 Grieverheart

Also, not sure if it helps, but here are all the opcodes it ran before running into the 0x0 opcode. Left column is pc_p, and right column is the opcode. opcodes.txt

Grieverheart avatar Oct 10 '23 08:10 Grieverheart

Another update: On windows it worked fine. I installed it and copied the dsk to Linux. On Linux starting game, but freezes nearly immediately.

Grieverheart avatar Oct 10 '23 11:10 Grieverheart

Did you try to reproduce on Linux?

I tried it on Debian 12. Then, I fell into an infinite loop with pc=0xc0,instruction=0x0208. The UAE CPU core seems to operate differently under Linux, but it's difficult to debug it.

It's not working for me.

Working well under Debian.

kanjitalk755 avatar Oct 10 '23 13:10 kanjitalk755

The UAE CPU core seems to operate differently under Linux, but it's difficult to debug it.

I see, didn't know Basilisk uses the UAE 68k implementation. So then it is a bug in UAE's implementation? By the way, I moved the same disk image with the installation to a Mac, and the Mac would also freeze when the game starts. Again, I deleted the BasiliskII.app, unzipped a fresh one and the problem disappeared. The funny thing is, that I also have a BasiliskII in a different location, which I compiled myself, but this fixes both! What could cause such weird behaviour?

Is this something you think you are going to work on?

Working well under Debian.

Do you have a physical cd-rom drive on your PC? I had the same issue under Windows. If no cdrom is already mounted, drop mounting does not work on Windows either.

Grieverheart avatar Oct 10 '23 14:10 Grieverheart

So then it is a bug in UAE's implementation?

Certainly, the problem isn't necessarily within the UAE core, but it's also difficult to pinpoint.

What could cause such weird behaviour?

I don't know because I have never encountered such a phenomenon.

Is this something you think you are going to work on?

I might debug if I find any clues.

Do you have a physical cd-rom drive on your PC?

The reason why it was okay even without a CDROM drive was because there was the following line in .basilisk_ii_prefs.

cdrom /dev/poll/cdrom

kanjitalk755 avatar Oct 11 '23 01:10 kanjitalk755

I somehow got the game to work on Basilisk II. On the Prefs file, add this line cdrom C:\whereever your cd image is located\Broken Sword.iso I did notice that Basilisk II crashed when I set the iso as a disk drive instead of a cd drive when running the installer, but it seemed to work fine if the iso was set as a cd drive And I made sure to set the installer at minimum so I don't have to switch disks My computer also doesn't have a CD drive and it works fine bandicam 2023-11-23 16-02-57-446 bandicam 2023-11-23 16-04-39-056

ualaa1 avatar Nov 24 '23 00:11 ualaa1