Open aitap opened 5 years ago
This is a known issue. Some of AD's bsp files are misaligned due to the use of a buggy map compiler that padded the lumps incorrectly, and will cause this sort of problem for any quake engine running those maps on anything other than x86.
QSS detects the misalignment, but currently takes no action other than to warn (now hidden as a developer print, because everyone was just ignoring it anyway). As this is something that really should be fixed in Quakespasm rather than just QSS, I'm going to wait for ericw's guidance on this one (even if he simply tells me to work around it myself).
FTE also detects the misalignment and throws lots of ram at the problem to realign the bsp in memory, which is generally not what you want on eg an rpi, but should otherwise work. It is also capable of using the same network protocol as QSS.
On Sat, 01 Sep 2018 22:11:17 -0700 Shpoike notifications@github.com wrote:
This is a known issue. Some of AD's bsp files are misaligned due to the use of a buggy map compiler that padded the lumps incorrectly, and will cause this sort of problem for any quake engine running those maps on anything other than x86.
Thank you for the explanation!
FTE also detects the misalignment and throws lots of ram at the problem to realign the bsp in memory, which is generally not what you want on eg an rpi, but should otherwise work. It is also capable of using the same network protocol as QSS.
Great! I'll try FTE next time I want to run Quake on ARM.
-- Best regards, Ivan
Yeah, I'd like to fix/workaround it in upsteam Quakespasm at some point.
FTE also detects the misalignment and throws lots of ram at the problem to realign the bsp in memory, which is generally not what you want on eg an rpi, but should otherwise work.
Possibly a more invasive but no extra ram use fix could be:
float LittleFloatUnaligned(const char* in)
{
float temp;
memcpy(&temp, in, 4);
return LittleFloat(temp);
}
and then replacing LittleFloat(in->foo)
with LittleFloatUnaligned(&in->foo)
... it'd be more invasive though. would also need to look out for stuff like
// swap all the lumps
mod_base = (byte *)header;
for (i = 0; i < (int) sizeof(dheader_t) / 4; i++)
((int *)header)[i] = LittleLong ( ((int *)header)[i]);
If you just want to avoid extra memory usage, then you can memmove the file into the storage currently used by the file's header (note: needs to be done in descending file order rather than lump order). You'll get enough space for the needed padding that way, but does mean you would have to make a copy of the header on the stack however.
The alternative is to read each lump as if it were a network message. You'd need to read each lump's fields in order, but on the plus side removal of the dfoo_t structs would make handling of different bsp29/bsp2/2psb lumps a little bit cleaner.
Hi!
I wanted to run a little test using a headless ARM computer I have as a dedicated server. When running version
0.92.1-275-g2ac22f6c
with-game ad
, the game crashes with the following backtrace:I think that the crash was not present in the original
quakespasm-0.93.1.tar.gz
, but I'm not sure because I had quickly removed it, having found the networked gameplay very jerky (with packet loss icon flashing all the time).There is no crash if I start vanilla Quake and play it for a while.