Thunderforge / scummvm-issues

ScummVM main repository
https://www.scummvm.org
GNU General Public License v3.0
0 stars 0 forks source link

AGS: Can't start a games on BIG-Endian/AmigaOS4 : Unalbe to load the room file 'room74.crm'. #16

Open Thunderforge opened 2 years ago

Thunderforge commented 2 years ago

For example i tried Space Quest IV.5, on both win32 and amigaos4 : on win32 it starts fine, on AmigaOS4 it bring such an output:

Running Space Quest IV.5 - Roger Wilco And The Voyage Home
SQ4,5.exe: 5cd8db602cedc8f04cd3ca290a4a2693, 6886082 bytes.
WARNING: TODO: SetCurrentDirectory: Work:games/Scumm_my/games/Space Quest IV.5 Roger Wilco And The Voyage Home/!
Initializing backend libs
Initializing game data
Located game data pak: SQ4,5.exe
Opened game data file: ac2game.dta
Game data version: 32
Compiled with: 2.72
Startup directory: Work:games/Scumm_my/games/Space Quest IV.5 Roger Wilco And The Voyage Home/
Data directory: ./
Setting up game configuration
WARNING: AmigaOSFilesystemNode::createDirectory() -> Not supported!
Voice pack found: speech.vox
music.vox found and initialized.
Initializing TTF renderer
Initializing mouse: number of buttons reported is 3
Install timer
Initialize legacy path finder library
Game title: 'Space Quest 4.5'
Game GUI version: 115
WARNING: font 'agsfnt2.wfn' has mistakes in data format, some characters may be displayed incorrectly
WARNING: font 'agsfnt3.wfn' has mistakes in data format, some characters may be displayed incorrectly
WARNING: font 'agsfnt4.wfn' has mistakes in data format, some characters may be displayed incorrectly
WARNING: font 'agsfnt5.wfn' has mistakes in data format, some characters may be displayed incorrectly
Checking for disk space
Game native resolution: 640 x 480 (16 bit) letterbox-by-design
Graphic settings: driver: OGL, windowed: no, screen size: 0 x 0, game scale: proportional
Requested graphics driver 'OGL' not found, will try existing drivers instead
WARNING: movement control not supported, mouse control can't be enabled!
Mouse speed control: disabled, unit: 1.000000, user value: 1.000000
Setting up window
Initialize sprites
Engine initialization complete
Starting game
WARNING: channel 2 - same clip assigned
Unable to load the room file 'room74.crm'.
There was an error reading room data..
Block data overlapping.
Block: 'Main', expected to end at offset: 30788, finished reading at 33085..!
Debugger started, type 'exit' to return to the game.
Type 'help' to see a little list of commands and variables.
ERROR: Unable to load the room file 'room74.crm'.
There was an error reading room data..
Block data overlapping.
Block: 'Main', expected to end at offset: 30788, finished reading at 33085..!

It does not matter if i use Opengl, OpengGLWithShaders or Software renders, all the same.

Which point out that it can be Endian issues (especially that phrase Block: 'Main', expected to end at offset: 30788, finished reading at 33085..! sounds like bad reading from/to memory)

Thunderforge commented 2 years ago

I can't reproduce the room74.crm error on my old PowerBook G4 (big-endian too). It's incredibly slow (well, it's a debug build without optimizations) but the game looks playable.

However, it does crash when I quit the game to return to the launcher. It also crashes when loading a savegame I've made in the first scene. It looks like it always produces corrupted saves there.

Attaching some GDB logs below (gzip'd, since Trac issues slow down when I attach big .txt files to them).

Thunderforge commented 2 years ago

crash on big-endian ppc32 when quitting the game during the intro to return to the launcher sq45_powerpc_crash_quitting.txt.gz

Thunderforge commented 2 years ago

crash on big-endian ppc32 when loading the sq45.000 save created on the same machine

sq45_powerpc_crash_loading_savegame.txt.gz

Thunderforge commented 2 years ago

gzip'd savegame which causes the crash. May have been corrupted when written from big-endian? sq45.000.gz