Opened 13 years ago

Closed 12 years ago

Last modified 10 years ago

#3198 closed defect (wontfix)

FREDDI 1: DUTCH MAC version crashes on startup

Reported by: SF/daniel9 Owned by: sev-
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Freddi Fish 1

Description

I was testing FREDDI 1 Dutch Mac version. It is recognized when added to ScummVM, but it crashes on startup.
The PC version from the same CD does work correctly.

Transcript from my console:
[XXX:ScummVM 0.10.0SVN 15-4-2007.app/Contents/MacOS] d% ./scummvm
Using configuration file: /Users/d/Library/Preferences/ScummVM Preferences
Looking for freddi
Trying to start game 'Freddi Fish 1: The Case of the Missing Kelp Seeds'
(0:1:0x3C): Resource fork is missing in file 'Freddi'!
[XXX:ScummVM 0.10.0SVN 15-4-2007.app/Contents/MacOS] d%

Just in case I will give the MD5 codes of all files in the Freddi 1 directory:
cb662e3aa7f939e326c21bc4af4dab1a Freddi
6d1baa1065ac5f7b210be8ebe4235e49 Freddi (0)
df912cb5c96190d65dd7be3e9e3dc412 Freddi (1)
ea018e8f8af0a452cd88a8219ca7260b Freddi (2)
6daf76c1fe724ce6bf2e4c5175f39352 Freddi (3)
8e27aebf6d89f8576a08b58e216a6a90 Freddi (4)
e17f49df1f58f8374351a0adb74df174 Game
a94984437a9a5856af44a8c94acda122 Install info

As I don't know which are used for what...

I am testing on a G4 PPC Mac running OS X 10.4.9 and ScummVM 0.10.0SVN 15-4-2007

Ticket imported from: #1723041. Ticket imported from: bugs/3198.

Change History (7)

comment:1 by sev-, 13 years ago

There are no difference between PC and Mac version of same HE game if both versions come from same CD. As of this error message, you need to write that file in MacBinary format. I don't know how to do it in Mac.

I.e. the problem is that ScummVM needs access to cursor graphics which is stored in resource fork in main game executable. Natively under MacOS afaik there are special file functions to access that data. We rely on MacBinary format.

comment:2 by sev-, 13 years ago

Owner: set to sev-
Resolution: wontfix
Status: newclosed

comment:3 by SF/daniel9, 13 years ago

I tried to understand your comment, but I am not sure I did.
As far as I know, the original files from the CD are completely copied, with the data & resource forks. Under OS9, these gamefiles in fact works on this computer. So all data is available to the OS, but maybe not to ScummVM as you suggested.

I have read the FAQ about using MAC games on other systems. Accessing the CD is not my problem & conversion of data files is only needed up to version 0.7.0 of ScummVM. Nothing talks about having the files in MacBinary format.

I don't want to annoy anybody, but I try to understand why it is possible to play the Windows version without any problem & the Mac version from the same CD doesn't.

comment:4 by SF/daniel9, 13 years ago

Status: closednew

comment:5 by sev-, 12 years ago

Status: newclosed

comment:6 by sev-, 12 years ago

The reason of the problem is this:

1. Windows knows nothing about resource forks
2. Thus to read that data on Windows, MacBinary format was invented which in fact a container, containing all forks from HPFS filesystem
3. MacOS treats resource forks as special shadowed portion of the file
4. Thus, under MacOS special methods (from programmer's point of view) should be used to access that data. We do not use that.

Thus, both under MacOS and Windows you should supply main game executable in MacBinary format in order to let ScummVM recognize it and extract cursors data.

I am not aware about such program under MacOS, but I am sure it exists, perhaps it is StuffIt, which can creat archives of files with both data and resource forks. Under Windows HFS Explorer can do that.

Again, there are no differences between MacOS and Windows versions of same HE game. I.e. the datafiles match 1:1 (check it by yourself). Only differences are those cursors and file names. Under MacOS cursors are stored in main game executable's resource fork, in Windows version they are stored in .HE3 file which in fact is also Windows executable, containing only resources (in Windows terms).

To conclude this all, I recommend you either to play with StuffIt and Co (until you get file which will start with "0x00 0x06 'F' 'r' 'e' 'd' 'd' 'i' 0x00 0x00" or something like that. Or better I highly recommend you to abandon it and play Windows version.

However, if you'll succeed with resource fork, I'd like to ask you to tell us how'd you do that, so we could include it in our guide on Wiki.

comment:7 by SF/mthreepwood, 10 years ago

I'm a bit late to this party, but here's my two cents anyway:

The current Mac resource fork code in the SCUMM engine can handle both raw and MacBinary formats of the resource fork (It tries MacBinary first, and then defaults to raw). As sev, said the problem is accessing the resource fork.

Now, we should be able to access it via "<filename>/..namedfork/rsrc". However, ScummVM does not pick up on that file at this time. It should be possible to add a "#ifdef MACOSX" to pick up on these files in the directory we're looking at. I might take a look at this in the future as there are other games that will require this (such as SCI1.1/SCI32 Mac games). However, someone with deeper knowledge of ScummVM's fs code might be able to do a better job than myself.

Note: See TracTickets for help on using tickets.