This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mozaic [2025/03/17 21:47] – Yuki | mozaic [2025/03/20 01:28] (current) – Yuki | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Mozaïc ====== | ====== Mozaïc ====== | ||
- | [[https:// | + | Some game distributed with lottery tickets from Loto-Québec |
+ | |||
+ | Download: [[https:// | ||
+ | |||
+ | See also: [[https:// | ||
===== Install on Wine ===== | ===== Install on Wine ===== | ||
- | This game makes heavy use of the Indeo 5 codec so make sure to install it. Ideally, use a 32-bit prefix and pretend you're Windows XP or 98. | + | This game makes heavy use of Indeo 5 and other DirectShow codecs |
<code bash> | <code bash> | ||
+ | # mount the ISO | ||
+ | # the game won't run without it | ||
+ | sudo mount MOZAIC.iso /mnt/cdrom | ||
+ | |||
+ | # create a new 32-bit prefix | ||
+ | # it currently won't work in a 64-bit prefix due to the codecs | ||
+ | # also make sure the CD-ROM is detected as such | ||
export WINEARCH=win32 | export WINEARCH=win32 | ||
export WINEPREFIX=~/ | export WINEPREFIX=~/ | ||
- | winetricks -q icodecs | + | winecfg |
+ | |||
+ | # install the codecs | ||
+ | winetricks -q allcodecs | ||
+ | |||
+ | # install and run the game (also make sure $WINEPREFIX is set) | ||
wine / | wine / | ||
</ | </ | ||
+ | |||
+ | The installation may fail because you have an '' | ||
===== PAK file format ===== | ===== PAK file format ===== | ||
- | Data is in little-endian. Similar to Quake. | + | Data is in little-endian. |
^Nom^Type^Offset^Size^Notes^ | ^Nom^Type^Offset^Size^Notes^ | ||
|magic|string|0|4 bytes|" | |magic|string|0|4 bytes|" | ||
|size|u32|4|4 bytes|Number of entries| | |size|u32|4|4 bytes|Number of entries| | ||
- | |???| |8|32 bytes|Unknown| | + | |???| |8|32 bytes|Seems unused, can be used as a comment field| |
|filelist|File|40|size * (12 + name)| | | |filelist|File|40|size * (12 + name)| | | ||
Line 29: | Line 47: | ||
|filesize|u32|0|4 bytes| | | |filesize|u32|0|4 bytes| | | ||
|offset|u32|4|4 bytes|Byte offset from the beginning of the file| | |offset|u32|4|4 bytes|Byte offset from the beginning of the file| | ||
- | |??? | + | |??? |
|name|Null-terminated string|12| |File path and name| | |name|Null-terminated string|12| |File path and name| | ||
Line 50: | Line 68: | ||
File filelist[size] @ 40; | File filelist[size] @ 40; | ||
</ | </ | ||
+ | |||
+ | ===== Tools ===== | ||
+ | |||
+ | < | ||
+ | <code javascript extractpak.js> | ||
+ | const fs = require(' | ||
+ | const path = require(' | ||
+ | |||
+ | if(process.argv.length < 3) | ||
+ | { | ||
+ | console.log(" | ||
+ | process.exit(1); | ||
+ | } | ||
+ | |||
+ | var f = fs.readFileSync(process.argv[2]); | ||
+ | |||
+ | var magic = f.toString(' | ||
+ | if(magic != " | ||
+ | { | ||
+ | console.log(" | ||
+ | process.exit(1); | ||
+ | } | ||
+ | |||
+ | var size = f.readUInt32LE(4); | ||
+ | var offset = 40; | ||
+ | |||
+ | for(var i = 0; i < size; i++) | ||
+ | { | ||
+ | var filesize = f.readUint32LE(offset); | ||
+ | var fileoffset = f.readUint32LE(offset); | ||
+ | var mystery = f.readUint32LE(offset); | ||
+ | var next = f.indexOf(0, | ||
+ | var name = f.toString(' | ||
+ | offset = next+1; | ||
+ | console.log(" | ||
+ | |||
+ | fs.mkdirSync(path.dirname(name), | ||
+ | var data = fs.createWriteStream(name, | ||
+ | data.end(f.slice(fileoffset, | ||
+ | } | ||
+ | </ | ||
+ | < | ||
+ | |||
+ | [[https:// |