Opened 20 years ago

Closed 17 years ago

Last modified 5 years ago

#7365 closed feature request (fixed)

SIMON1: Add support for Amiga versions

Reported by: SF/alfm64 Owned by: Kirben
Priority: normal Component: Engine: AGOS
Version: Keywords:
Cc: Game: Simon the Sorcerer 1

Description

In the new ScummVM 0.6.0, the Amiga versions of Simon The Sorcerer 1, Floppy and CD32, have the graphics completly corrupted. Check the atached snapshot.

Ticket imported from: #932499. Ticket imported from: feature-requests/181.

Attachments (6)

Simon The Sorcerer 1.jpg (96.0 KB ) - added by SF/alfm64 20 years ago.
Snapshot of Simon The Sorcerer 1 Talkie Amiga CD32 on ScummVM 0.6.0
agos_simon1_amiga.diff (15.2 KB ) - added by cyxx 17 years ago.
simon1 amiga demo bitplane graphics display
alternative.diff (16.0 KB ) - added by Kirben 17 years ago.
Alternative patch
outside.jpg (77.5 KB ) - added by Kirben 17 years ago.
Example of glitches in AGA/CD32 versions
wip.diff (22.0 KB ) - added by Kirben 17 years ago.
Convert images when drawing
wip-2.diff (21.6 KB ) - added by cyxx 17 years ago.
Convert images when drawing

Download all attachments as: .zip

Change History (32)

by SF/alfm64, 20 years ago

Attachment: Simon The Sorcerer 1.jpg added

Snapshot of Simon The Sorcerer 1 Talkie Amiga CD32 on ScummVM 0.6.0

comment:1 by SF/alfm64, 20 years ago

Summary: Simon The Sorcerer 1 Talkie (Amiga CD32)Simon The Sorcerer 1 Talkie (Amiga CD32) graphics

comment:2 by SF/alfm64, 20 years ago

Summary: Simon The Sorcerer 1 Talkie (Amiga CD32) graphicsSimon The Sorcerer 1 Talkie (Amiga CD32) graphics corrupted

comment:3 by Kirben, 20 years ago

Yes a known issue which is mentioned on compatibility pages. The Amiga versions use a completely different drawing method for main graphics and it is unlikely to be fixed anytime soon.

comment:4 by fingolfin, 19 years ago

Summary: Simon The Sorcerer 1 Talkie (Amiga CD32) graphics corruptedSIMON1TALKIE (Amiga CD32): graphics corrupted

comment:5 by fingolfin, 19 years ago

Component: Engine: AGOSEngine: AGI
Game: Simon the Sorcerer 2Space Quest 2

comment:6 by fingolfin, 19 years ago

Owner: set to Kirben

comment:7 by fingolfin, 19 years ago

I don't see this mentioned explicitly on the compatibility page; but it does say that only windows and dos are supported.

I recommend that this item either be moved to the feature requests section, or closed. Kirben?

comment:8 by Kirben, 19 years ago

The Amiga versions of Simon the Sorcerer 1 were listed separately on the compatbility list in the past. I removed the targets from the compatbility list, since it was pointless to continue listing them. No progress has been made on Amiga graphics and I doubt there will be any progress anytime soon either.

I left the bug report open, only to prevent more bug reports about the issue.

comment:9 by fingolfin, 19 years ago

Component: Engine: AGI
Game: Space Quest 2
Owner: Kirben removed
Summary: SIMON1TALKIE (Amiga CD32): graphics corruptedSIMON1TALKIE: Add support for Amiga/CD32 version

comment:10 by SF/timofonic, 19 years ago

It could be really nice if is supported, I like the amiga music of this game because it uses samples, you know the magic of the nice Paula ;)

Maybe some amiga programmer can help on this?

comment:11 by Kirben, 18 years ago

For reference: The Amiga versions of Simon the Sorcerer 1 used planar RLE graphics, so would need to add Amiga specific versions of the code used to unpack and display the graphics. Specifically the code of vc10_depackColumn() and drawImages () in engines/simon/vga.cpp of the ScummVM source code.

comment:12 by Kirben, 18 years ago

Summary: SIMON1TALKIE: Add support for Amiga/CD32 versionSIMON1: Add support for Amiga versions

comment:13 by fingolfin, 17 years ago

Owner: set to Kirben

comment:14 by fingolfin, 17 years ago

I saw some progress on support for amiga graphics in SVN.... Does this affect this FR?

comment:15 by Kirben, 17 years ago

The graphics format of images in Amiga verisons are converted by ScummVM SVN, to match the image format used by PC versions.

But all uncompressed images are still corrupted under ScummVM, And I'm not sure why at the moment.

by cyxx, 17 years ago

Attachment: agos_simon1_amiga.diff added

simon1 amiga demo bitplane graphics display

comment:16 by cyxx, 17 years ago

In the amiga demo version of simon1, it seems all the graphics have a 5 bits depth (they use 5 bitplanes instead of 4). I don't know about any other versions (CD32 ?).

Attached a patch as a kind of "proof of concept" : in the previous code, graphics files were loaded, then planar to bitmap conversion was performed, then bitmap was compressed to the format used by PC versions. My patch removes that recompression stage, this allows to simplify the code a lot and I only had to change one function to be able to display the amiga graphics. As I don't know anything about AGOS, it's possible this may cause issues.

So, the attached patch allows the graphics of the amiga version to get displayed (palette glitches remain); but the code is very ugly and need cleanup and optimization (I am pretty sure it could be possible to use less temporary memory buffers). I can continue the cleanup if there's interest.

File Added: agos_simon1_amiga.diff

by Kirben, 17 years ago

Attachment: alternative.diff added

Alternative patch

comment:17 by Kirben, 17 years ago

There were several Amiga releases of Simon the Sorcerer 1: Original release, which used 32 color graphics (Which demo was based off) AGA release, which used 256 color graphics. CD32 release, basically the AGA release, with added sound effects and speech.

The graphics decoding for 5 bitplanes, should be limited to the games with the 'GF_32COLOR' feature flag.

The patch fixed the graphics glitches in original release and demo. It doesn't seem stable though, since introduction of full version crashes part way.

The only remaining glitches, seems to be the lack of text, which is handled by renderStringAmiga() of charset.cpp.

There are similar glitches in the AGA and CD32 releases, maybe they require the use of 8 bitplanes, for the 256 color graphics? see attached imges.

I attached updated patch too, with minor changes to prevent breakage in other games. File Added: alternative.diff

by Kirben, 17 years ago

Attachment: outside.jpg added

Example of glitches in AGA/CD32 versions

comment:18 by Kirben, 17 years ago

File Added: outside.jpg

comment:19 by cyxx, 17 years ago

> The patch fixed the graphics glitches in original release and > demo. It doesn't seem stable though, since introduction of > full version crashes part way.

Yes, it isn't stable. Memory allocations in res_ami.cpp should be checked (actually, the conversion routines needs cleanup and optimizations).

> The only remaining glitches, seems to be the lack of text, > which is handled by renderStringAmiga() of charset.cpp.

Looks like what renderStringAmiga() does building a planar sprite with the specified color and we're trying to display it as non-planar data later on.

> There are similar glitches in the AGA and CD32 releases, > maybe they require the use of 8 bitplanes, for the 256 color > graphics? see attached imges.

Yes, quite probably since the AGA chipset had only planar (ie. no bitmap) video modes for displaying 8 bits colors.

What about the fact that I removed the recompression stage in res_ami.cpp (and updated the flags in vc10_draw()). Does it likely to cause problems later on in the engine ?

comment:20 by Kirben, 17 years ago

> What about the fact that I removed the recompression stage in res_ami.cpp > (and updated the flags in vc10_draw()). Does it likely to cause problems > later on in the engine ?

No, as there are already drawing methods for handing compressed and uncompressed data.

Look at the else sections of the various kDFCompressed checks through drawImages_*() functions.

comment:21 by Kirben, 17 years ago

An update, looking closer at AGA/CD32 versions, they use a mix of 4 and 5 bitplanes per image, with the usual palette adjust (from state.palette). 5 planes are used for the backgrounds and maybe charactors too.

I'm not sure how to detect the amount of bitplanes for each image though.

by Kirben, 17 years ago

Attachment: wip.diff added

Convert images when drawing

comment:22 by Kirben, 17 years ago

File Added: wip.diff

by cyxx, 17 years ago

Attachment: wip-2.diff added

Convert images when drawing

comment:23 by cyxx, 17 years ago

I updated your patch and cleaned up a little more the planar -> bitmap conversion functions. I also fixed images in Elvira1 and bad flipped sprites in Simon1 (this was due to _videoBuf1 used twice : in convertclip and vc10_clip).

Regarding renderStringAmiga, I dumped the contents of vpe->vgaFile2 under simon1demo, its 5024 bytes, but the last 5000 bytes are filled with 0. I guess that's why there's no output. File Added: wip-2.diff

comment:24 by Kirben, 17 years ago

Resolution: fixed
Status: newclosed

comment:25 by Kirben, 17 years ago

The Amiga versions of Simon the Sorcerer 1 work quite well under ScummVM now, so closing this item.

There are still masking issues in AGA/CD32 versions and palette glitches in OCS version, but those are minor issues and the games would be completable now.

comment:26 by digitall, 5 years ago

Component: Engine: AGOS
Game: Simon the Sorcerer 1
Note: See TracTickets for help on using tickets.