ioan-chera / eureka-editor

Eureka is a cross-platform map editor for the DOOM engine games.
http://eureka-editor.sourceforge.net/
64 stars 12 forks source link

Raspberry pi 64 bit unable to load WAD files #137

Open kezzico opened 1 year ago

kezzico commented 1 year ago

Hi,

I have a build of 1.27b. My work station is a pi400 with buster 64bit.

Loading with doom2.wad (md5sum 25e1459ca71d321525f84628f45ca8cd

Eureka produces the error

Opening WAD file: /opt/retropie/configs/ports/doom/doom2.wad
Bad WAD header, too many entries (1728774144)
Closing WAD file: /opt/retropie/configs/ports/doom/doom2.wad
Open wad failed (reading directory)

diving into the code of Wad_file::ReadDirectory, I see that dir_count is expected to be less than 32000.

The value for dir_count originates from a call to LE_S32 in sys_endian.h

My assumption here is that this is not tested on 64 bit raspberry pi and that the output from LE_S32 needs to be tweaked some how to account for my emerging use case.

Please help 😵‍💫

kezzico commented 1 year ago

got it working

added this to the top of src/sys_endian.h

#define __LITTLE_ENDIAN__ 1

then rebuild

make clean
make

everything seems to be working fine now

steve-ttt commented 1 month ago

thanks for the post this saved me hours