Opened 13 years ago

Closed 13 years ago

Last modified 12 months ago

#8576 closed patch

Support for Mac Broken Sword 1

Reported by: criezy Owned by: sev-
Priority: normal Component: Engine: Sword1
Keywords: Cc:
Game: Broken Sword 1

Description

This patch add the support to the mac version of Broken Sword 1. It adds
the mac BS1 game detection code and byte swap for some of the
resources. Note that the mac cluster files mainly use the big endian bytes
order, but some of the resources are stored in little endian (e.g. mouse
cursor or data for router).
All the byte order conversions are now done by functions in the ResMan
class, except when dealing with the static resources (from staticres.cpp)
that are always in little endian format.
I have tested both the mac and PC version with french voice and french or
english subtitle on a little endian computer. Hopefully I did not break
anything, but I am not completly sure that BS1 mac will work with
ScummVM on a big endian computer.

Support for the mac music file (in AIFF format) is not implemented.

Ticket imported from: #1571787. Ticket imported from: patches/681.

Attachments (2)

mac_bs1.patch (67.8 KB ) - added by criezy 13 years ago.
Patch to support Mac BS1 game
ScummVM_BS1_mac_graphical_glitch_paris.png (314.1 KB ) - added by criezy 13 years ago.

Download all attachments as: .zip

Change History (15)

by criezy, 13 years ago

Attachment: mac_bs1.patch added

Patch to support Mac BS1 game

comment:1 by sev-, 13 years ago

The patch looks ok to me. I don't have Mac version neither
full game nor demo to test, but at least PC versions aren't
broken.

comment:2 by sev-, 13 years ago

Besides, can you put the demo somewhere online at least for
a short period of time? Or come to IRC and DCC to some of
the devs? I couldn't find it anywhere, at least easily.

comment:3 by criezy, 13 years ago

The demo probably does not exist. When working on the game detection code I
though I remember playing the demo a long time ago before buying the game.
And I also tough it would be easier to remove the mac demo detection code than
to add it latter. Since then I had a look in my old CDs collection and did not find
it. Nor did I find any mention to it on the internet.

comment:4 by fingolfin, 13 years ago

We could try to ask the Revolution guys, maybe they would at least know
whether such a demo ever existed?

comment:5 by fingolfin, 13 years ago

I briefly tried this patch on my (big endian) PowerBook under OS X, and BS1 (PC
version) seemed to work fine there, too. Well I didn't do much more than walking
around a bit in the first two scenes... Anything specific I should have tried to
trigger potential problems?

comment:6 by criezy, 13 years ago

The two points of the modified code on which I had some doubts concern the
mouse cursor creation and the route finder. The first one would probably
cause the game to crash right at the beginning and the second one would
cause some problem when walking. So you would probably have noticed them
if there were important bugs remaining in this code.

On my side I have now played two third of the game with the mac version
(and music re-encoded in ogg) on an intel mac and encountered only small
issues. Most of them where present in the original game. The only issues that
I do not remember from the original game concern background colors in
some places: when George enter or leaves Nico's flat, the color in the door
opening is bright red (see attached file). I do not remember what the color
was in the original game, but I do not expect it to be this one. I had a similar
problem in Syria as well (at the bull's head location, with the sky being green).

I also had a llok at the music files, and it seems to be AIFC (a variant of AIFF ?)

comment:7 by fingolfin, 13 years ago

AIFC is indeed a compressed AIFF variant. There are plenty of docs for that on
the internet, just google.

See also <http://developer.apple.com/documentation/QuickTime/INMAC/
SOUND/imsoundmgr.2c.htm>

comment:8 by sev-, 13 years ago

Max, if you have no objections, I would commit this patch to
SVN.

criezy, may you send me couple of those files in AIFC
format, so I could add support for them in ScummVM?

comment:9 by fingolfin, 13 years ago

No objections.

comment:10 by sev-, 13 years ago

I commented out Mac Demo detection until at least someone
will confirm that it exists and works with current code.
Otherwise the patch was committed as is, thank you for it.
I'm still waiting for AIFC files.

comment:11 by sev-, 13 years ago

Owner: set to sev-
Status: newclosed

comment:12 by criezy, 13 years ago

Sorry for the delay, I am just comming back from an oversea seminnar.
I can confirm that the mac version is completable and I didn't have any crashes.

Sev, for the AIFC files do you want me to send them to your adress at users.sourceforge.net ?
I am not sure if I can attach the files to this thread as there is probably some copyright on them.

comment:13 by digitall, 12 months ago

Component: Engine: Sword1
Game: Broken Sword 1
Note: See TracTickets for help on using tickets.