Repository navigation
v0.1.0
·
96 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
Added
dade sopranosgroup for The Sopranos: Road to Respect (PlayStation 2). Oneunpackcommand takes the disc apart and converts everything it recognises. The argument may be a disc image, a directory searched recursively for.FSarchives however they are cased, or any number of archives given directly. Each archive is unpacked into a directory titled after it with the region suffix dropped, andDATA_P.FStherefore becomesdata. With--convert, the.LVLcontainers are split first and the assets inside them are converted by the same pass..TEX2texture banks become PNG with PlayStation 2 alpha rescaled to0..255,.SGP2prop libraries yield the PNGs they embed,.MSHand.MSBsound banks yield one WAV per sound,.MIHand.MIBmusic streams become WAV de-interleaved back to stereo, and.VO2dialogue becomes WAV stitched from itsAUDOblocks. The retail disc converts clean.--ignore-failureslogs and skips an asset that will not convert rather than stopping.- A Sopranos level is written as a
.glbwith its props placed in it, alongside OBJ and MTL. Props are read from the.SGP2libraries belonging to the level, and each is positioned and turned according to the.OLVfile that records where the prop stands. A character with interchangeable wardrobe pieces is given one piece of each kind rather than all of them at once. dade maxpaynegroup for Max Payne and Max Payne 2 (PC).ras-listandras-extractread the RAS (Remedy Archive System) containers both games load everything from. A source may be a.rasarchive, a.mpmmod package, a directory searched recursively, an InstallShieldDATA1.CAB, an ISO, the.cueof a cue/bin pair, or a bare.bin. A raw BIN with no cue sheet is unwrapped by its sector sync patterns, and a rip that lost its cue still reads. Every member is LZSS-compressed and the archive tables are encrypted, both handled transparently, and--rawretains theRA->andRC->wrappers. Members are stored back to back with no offset field, and the directory therefore doubles as an integrity check.ras-listreports an archive asintactwhen the header, both tables, and every stored size account for the file exactly.- Both
dade maxpaynearchive commands take as many sources as a game shipped discs. A retail disc needs two routes at once. The level archives sit loose on the disc while the shared game database is insideDATA1.CABand is unpacked withunshield, and a cabinet is skipped with a warning whenunshieldis missing. A cabinet does not have to fit on one disc. Max Payne 2 splits its cabinet acrossdata1.cab,data1.hdr, anddata2.cabon the install disc anddata3.cabon the play disc, and the parts are gathered from every source given before the cabinet is unpacked once. The discs may therefore be given in any order and in whatever mixture of formats they were ripped to. dade maxpayne inspect-tagsdecodes the taggedR_MemoryFilestream that every custom asset is built from, identifying each value's type. The walk stops where a level exits tagged territory, at the point its first untagged string begins.dade maxpayne ldb2glbconverts levels to binary glTF, one.glbper.ldb, in parallel across every core, anddade maxpayne ldb-textureswrites a level's embedded images out on their own. Each.glbincludes the level's architecture, its props, the game's texture coordinates, and every embedded image. Both games are read, and the game a level came from does not have to be given. A Max Payne 2 level opens withLDB2and is recognised by it. Pass--databaseand the NPCs and pickups are drawn with their models, read from the first game'sskinsandlevel_itemsdirectories; without--databasethey are written as empty nodes with names.- Every clip a prop can play (a door swinging either way, a lift rising, a fan turning) comes out as a glTF animation with a name, and a viewer can list and play the animations. A level stores a clip as two poses and two curves, one giving the distance travelled in world units and the other how far the prop has turned. Both are baked into keyframes on the way out, and a clip that moves nothing is dropped.
- The baked lighting, the sky, and the decal layering are all written out. Each level's atlases are embedded, each face identifies the atlas that lights it, the second coordinate set addresses the atlas, and the lightmap goes in glTF's occlusion slot, the closest the format has to a lightmap. A level's
skyboxfaces get a flat unlit colour and close the level off wherever it opens to the air, and omitting them would put a hole through every street. Graffiti, signage, and switchable surfaces are lifted about eight millimetres along the face normal. A level places each of these surfaces in exactly the plane of what it covers, and nothing in the file marks which is which. dade.maxpayne.ldb2reads Max Payne 2 levels as a separate reader feeding the same exporter. The sequel retains the tagged stream and the archives and rearranges everything above them. Its strings live in one pool addressed by byte offset, its textures are DDS in five groups rather than one, its vertices are packed float arrays behind a sixteen-bit index buffer, and its collision is Havok. A room includes the transform that puts it in the world. The first game deferred placement to the exit graph, and a room had to be assembled by walking the graph. Geometry an artist placed more than once is written once and referred to afterwards. The sequel also states each surface's draw order, and its decals are therefore lifted from what the level records rather than from the geometry.dade rbplus sitebuilds a browsable, static site from a collection of.rbtune packages. It writes every tune's charts as JSON and ships a React page that draws them in the browser. The result can be served from anywhere, GitHub Pages included. Tunes are grouped by artist and title and can be filed A-Z or by gojūon row, and the search matches the Hepburn romanisation of a kana reading. A Japanese title therefore resolves from a Latin keyboard. Pass--basefor a project site served from a sub-path.--basealso writes a404.html, and a link to one tune opens it directly.- A package with only a basic chart, its medium and hard entries empty, is recognised as an extend note, a SPECIAL chart sold for a tune that already exists.
dade rbplus sitefiles it under the tune it extends, worked out from the numbering, rather than listing it separately. - The
dade rbplus siteoutput is an installable app. It ships a web app manifest, a service worker, and icons. A browser therefore offers to install it and opens an already-seen tune offline. The manifest's addresses are relative, and it installs the same from a dedicated domain or from a--basesub-path. dade rbplus dump-chart --flipdraws the chart with time running downward, the way the notes fall down the screen.dade xg2 xg1-to-glb,dade xg2 xg2-to-glb, anddade xg2 xg2-pc-to-glbconvert Extreme-G and Extreme-G 2 levels, models, and track objects to binary glTF. A level is not a display list. It is an LZHUF-compressed bytecode that the loader at0x8004FDB8walks once to build the display lists the hardware then draws, and the geometry therefore comes out by running the same interpreter, dispatched through the jump table at0x8004BA98. Every opcode is decoded whether or not it includes geometry. Each consumes a fixed number of bytes, and skipping one by the wrong amount desynchronises everything after it. Extreme-G 2's dialect has twenty opcodes rather than fifteen and a visibility byte in front of every triangle, and the Windows port's tracks are the console's levels with their multi-byte fields swapped. One interpreter therefore serves all three builds. Models are ordinary display lists and are read straight off. A track's power-up pads and flame columns are placed from the entity stream the track region's+0x40pointer identifies, their models read from a second code segment the ROM stores compressed. The port's bikes are not converted. They take their vertices from segment 8. The engine fills segment 8 at run time, and the vertices are not in the game's files at all.dade xg2 xg2-to-glbalso writes eachBMCmotion clip as an animation. The skeleton the clips drive has no separate file. It is a region inside every rider model, identified by the seventh of the eight segment pointers in the model's header, and its 27 bones have 61 degrees of freedom. With the root's six, the degrees of freedom are exactly the 67 curves every clip has. A curve is a binary angle, a full turn to 65536. Anatomy confirms the scale rather than assumption. Across the seventeen clips, the scale bends the knees 130 and 122 degrees and the elbows 136 and 145, against roughly 135 and 150 for a real rider.- The LZHUF (
LHUF/HUFF) codec is implemented, and the archive entries that used to be dropped now decode. It was a placeholder that raised, and everyLHUFentry was logged and skipped.dade xg2 extract-xg1wrote its level containers as raw compressed slices and skipped the texture banks altogether, and both now come out decoded, the banks as PNG. It is the Okumura and Yoshizaki lineage, with the ring buffer zero-filled rather than space-filled and the decompressed size taken from the archive header rather than from a prefix on the stream, both as the game's decompressor atFUN_80057698does it. - The
dade xg2commands that take the Windows port'sDATA1directory (extract-xg2-pc,xg2-pc-to-glb, andmontage-pc) now also accept the disc it came on, as an ISO image or as the.cueor.binof a cue/bin pair. The disc is extracted to a temporary directory and read from there. File names are matched without regard to case. ISO 9660 stores them upper-cased where an installation stores them lower-cased. - An N64 ROM is accepted in any of the three byte orders, and is put into big-endian order before anything reads it. A
.v64has each halfword swapped and an.n64each word reversed. Every offset in the package is a big-endian.z64offset, and a wrongly ordered image would not have failed loudly. It would have decompressed into noise.
Changed
- The
BMCentries in the Extreme-G 2mfsarchive are skeletal motion clips rather than sound effects, and are no longer decoded to WAV as eight-bit differential PCM. Each takes the name of a skeleton file (man2sk.asfthirteen times,ivask.bsfthree times, andalbeanosk.bsonce), and all seventeen parse to exactly 67 channels and consume every byte. They are written out as they stand, described in the manifest by their channel and frame counts, and converted to animations bydade xg2 xg2-to-glb. Files in themfsoutput take the formanim%03d_*rather thanaud%03d_*. dade sopranos unpack --converttakes a texture's blend mode from byte0x1Bof its record rather than guessing it from the texture's file name. Cutout, blended, additive, and subtractive surfaces are therefore recognised outright. The byte is what the engine turns into a surface's GSTEST_1andALPHA_1pair, and across all 133 levels the byte marks additive exactly the 171add_textures and subtractive exactly the 262sub_ones, with nothing else in either group. AMASKmaterial now uses the console's alpha cutoff,ATSTGEQUALwithAREF8 on the PS2's 0..128 alpha scale.- A Sopranos surface whose cooked mode is ambiguous is drawn the way its render pass is drawn. The level partitions its material records between passes with prefix sums, the engine blends passes 2 and 6 and draws every other pass opaque, and a level fills only passes 1 and 2. Pass 2 is therefore the decal pass: shadows, stains, ivy, and road detail. The baked shadow decals are no longer picked out by their all-black vertex colour and given a black material at a fixed partial alpha.
- A Sopranos wardrobe piece is grouped the way a character wears it. An
_s0shading suffix and a_Face_0suffix each mark a variant of one piece rather than a separate piece, and*HEAD8_s0_Face_0and*HEAD9_Face_0are therefore one head rather than two worn at once. Headwear and eyewear each resolve to one key however the pieces are titled, and a dock hand's bandana, skull cap, and cap are one hat rather than three stacked on one head.
Fixed
dade maxpayne ldb2glbplaces a Max Payne 2 prop on its centre. A dynamic mesh writes its vertices about their midpoint rather than about the state machine that places it, and the midpoint the mesh container states ahead of its batches is the gap between the two. Reading the midpoint as part of the prop's bounding box offset every prop by it.10_Police_Station's vending machine had its front panel a tenth of a unit out of the recess it closes, and a cell door hung 1.5 units above the floor. Of the police station's 48 standing props, 4 met their floor exactly before and 36 do now. The correction applies to a prop's clips as well. They pose the same geometry.- A Max Payne 2 prop animation is paced by the times its curves state. The second game writes a time with every sample and rarely spaces them evenly (of the 2454 curves in the first six levels, 898 are uneven), and the times were being discarded for an even spread. The curve is also a Catmull-Rom spline rather than a straight line between samples, and it is now read as a spline. Against the game's evaluation, the worst clip of the first five levels was 0.85 of its motion out of step and is now 0.06, and the average is 0.002 rather than 0.114.
Removed
dade rbplus dump-chart --imageno longer writes an HTML page.dade rbplus sitebuilds a browsable site for a whole collection instead..pngand.svgare unchanged.dade xg2 extract-xg2 -r/--rateis gone. TheBMCentries whose playback rate it set are not audio.
Full Changelog: v0.0.2...v0.1.0