QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Doubts, help and support about QuickBMS and other game research tools
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by AnonBaiter »

Excuse me, how are "lzo1x" and "lzo2a" highlighed as bold blue on notepad++(by using quickbms language that was imported from the program) while "xmemdecompress" are highlighted as just plain blue?
Image
Or maybe it's just me being an idiot.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by aluigi »

Fixed.
It was an old version of the file dated 31 May 2015 that additionally didn't contain these important lzo* :)
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by AnonBaiter »

Thanks for the fix.

Anyway, I know this thread is not about "games" but since this is also about compression issues I feel no other thread fits than this one.

So, I had to modify your assassins_creed2.bms script just to see if it works with the extracted files of Assassin's Creed. One file in particular from the Xbox 360 version of the game refuses to work.

Code: Select all

  offset   filesize   filename
--------------------------------------
  00000000 714        Map_Menu_0

-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode      80000001 guard page violation
*EH* ExceptionFlags     00000000
*EH* ExceptionAddress   00829c87
                        00400000 + 00429c87 quickbms.exe
*EH* NumberParameters   00000002
*EH*                    00000000
*EH*                    0b195001

Last script line before the error or that produced the error:
  63  clog MEMORY_FILE OFFSET ZSIZE SIZE
I had attached the file and the modified script in question.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by aluigi »

I don't know.
The first file (0x00000019: 0x00000229 -> 0x000002ca) was correctly decompressed, no idea why there are problems with the chunks of the second one (0x0000047b: 0x00002d8a -> 0x00008000), everything is correct as far as I can see except for the data of the second file that (at a first look) doesn't seem xmem.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by AnonBaiter »

Yeah I thought so too.
However, in the decrypted binary executable of the Xbox 360 version of the game, I found three strings that indicate these compression algorithms:

Code: Select all

LZX
LZO2A
LZO1X_999
LZO1X_1
One of them isn`t even supported on quickbms(lzo1x_999), while my guess is that lzo1x_1 might be the same as lzo1x.
These are just clues I`ve gotten anyway. Perhaps you might have better luck than me in figuring out the compression algorithm used on that file.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by aluigi »

LZX: it's xmemdecompress (Microsoft LZX)
LZO2A: lzo2a
LZO1X_999: it's the recompression algorithm of lzo1x, it's the same used by quickbms with comtype lzo1x_compress
LZO1X_1: lzo1x
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by AnonBaiter »

Huh.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by AnonBaiter »

Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by Savage »

Today i got a message in Linux that xmemcompress is only supported in windows, is possible to fix it?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by aluigi »

Unfortunately I can't help with that because it's an API of the XboxSDK for Win32 that can't be used on Linux.
As far as I know there are no open source versions of xmemdecompress, in the past I already checked some "supposedly working" codes and they failed in misery, so you can save your time instead of searching :)
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by Savage »

Oh..well thanks anyway :D, wine works great with the quickbms
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by chrrox »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by aluigi »

lzxd is already available in quickbms in the compression/unmspack.c but it uses the hardcoded window_bits 21 (lzxcab) and 16 (lzxchm), while apparently it needs 17 for xmem.
Added in my TODO the possibilty to specify arbitrary arguments to pass to the decompressor.
Nameless
Posts: 25
Joined: Tue Dec 20, 2016 8:18 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by Nameless »

Thank you for implementing labels, but looks like I found bug. If labels used in the function then it causes script to loop endlessly. Here is example:

Code: Select all

debug
callfunction INSIDE

startfunction INSIDE
set CHECK byte 0
print "000"
test:
if CHECK = 4
   continue end
endif
print "AAA"
continue test2
print "BBB"
label test2
print "CCC"
math CHECK + 1
continue test
end:
endfunction
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by aluigi »

I can only suggest you to replace continue with break and check if something changes but in any case everything worked correctly in my tests (that involved also functions) and there will be no updates for this (so called) feature in future.
Nameless
Posts: 25
Joined: Tue Dec 20, 2016 8:18 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by Nameless »

Break has the same effect.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by AnonBaiter »

aluigi wrote:lzxd is already available in quickbms in the compression/unmspack.c but it uses the hardcoded window_bits 21 (lzxcab) and 16 (lzxchm), while apparently it needs 17 for xmem.
Added in my TODO the possibilty to specify arbitrary arguments to pass to the decompressor.
Does that mean the issue I`m having with the Xbox 360 version of Assassin`s Creed(by using my scimitar_compressed.bms script, no less) will be eventually "fixed"?
SkullKid2000
Posts: 1
Joined: Fri Apr 07, 2017 11:39 am

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by SkullKid2000 »

I get a "rnc_packed_crc_error" when trying to use the robotwarsed.bms script with QuickBMS 0.8.0. 0.7.7 works just fine, though, so I'll stick with that until Luigi fixes this :)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by aluigi »

Thanks for the report, I "touched" the rnc code just in 0.8.0 and apparently I forgot to disable the rnc check... oh well it happens
GenEric
Posts: 2
Joined: Sat Apr 29, 2017 4:24 pm

Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Post by GenEric »

Hey, just got a memory allocation error from the Zero Escape: The Nonary Games script. Let me know if you need any further details. Just looking to get the whole thing unpacked.

http://i.imgur.com/vAxdDvO.png

The assets unpacked so far have been hugely helpful, so thanks for this.