Posts from 2008

Deconstruction part 2

Attacking those "random" files a couple of days ago provided enough of a challenge to keep me interested for a few hours, especially as it seemed like I was treading new ground in terms of spec'ing out previously unexplored file formats. It turned out that the files had already been mapped and successfully decompressed and the only thing left to do was build an unpacker which was in the pipeline. It seemed my work wasn't exactly fruitless but other, probably smarter people had everything under control. I wasn't about to let that stop me though.

Note (2008-01-11): The full (official?) SDK for this file format has been located which includes both a packer and an unpacker as well as other tools I'm sure are useful for working on the file format. The full name of the file format is "Yaneurao" with the SDK going by the nomenclature of "yaneSDK" which is the stem for the file format signature of "yanepkDx". There is already a .NET version of the SDK so if you're interested in my deconstruction process then read on, otherwise I would recommend using the official/fully-featured SDKs.

Then, in that moment of lucid elation, I realised exactly what was going wrong.

The compression format was identified as LZSS and reading through several sites revealed that some of the data I had initially spotted but attributed to SHIFT JIS (or at one point a Unicode Byte Order Marker, perfect for a non-Unicode file) were the tell-tale signatures of LZSS; the gradual degradation into junk data was also typical of the algorithm as the further into the file the stream progresses, the more back references are present.

yanePkDX
While I hadn't heard of LZSS, it came as no surprise that it was a modified version of LZ77 which I had come across before though never toyed with. Having to dig through a dense PDF was not my idea of fun and my university days had proven that reading academic proofs rarely lead to workable implementations for me so I searched for a ready-made PHP version which (for reasons which will soon become glaringly apparent) didn't prove fruitful. After coming up against dead-ends with other languages I settled on the defacto C version which seemed most other versions I found were based off.

Read the rest of this entry

Minami-ke

Having a character in a series attempt to win an argument using squirrels seems like it would go down well around these parts; thankfully squirrel related tomfoolery is not all Minami-ke has to offer as it manages to break out of its well trodden, all-girl-school-comedy premise and develop into a raucous look at the life of a family of oddities and the selection of characters which get pulled into their orbit.

Characters, situations and comedy are stitched together so deftly that it's hard to think of Minami-ke as a series at all

The first season of Minami-ke seems to constantly better itself by proving time and time again that it will not beat a dead horse, providing capricious situations that seem patently obvious when shown, but on reflection take on Rube Goldberg-esque set up. For instance: Makoto, a typically brash and uninteresting character whose only lot in life seems to be to provide a catalyst for Chiaki's deadpan cynicism, add in the desire to visit the Minami household without incurring special kinds of wrath, mix in some typical gender-bending and atypical cross-dressing, sprinkle in some adoration for Haruka and the result is something that never seems anything less than hilarious. Time and time again the off-the-wall comedy provides sporadic moments of howling laughter buffered by constant amusement with a boy with a propensity for loosening his shirt and sparkling to the trio of straight-faced brothers who also share the name Minami.

Read the rest of this entry

Deconstruction

Out of curiosity and a favour to someone, I decided to take a look at some random .dat files that were ripe for the translating; what ensued was a morning of head scratching, hex scrying and using some of the lesser used PHP functions.

Sample File 1, Sample File 2, Sample File 3

All screenshots taken from data1.dat, sample file 1 and the window is resized for the most appropriate screenshot rather than general workability.

so garbled that it sent a few hundred bell tones to my computer speaker

First thing I did was to crank open the lovely XVI32 hex editor and have a look at the sample files provided, their .dat extension more or less indicated they were a proprietary format and were unlikely to relinquish their secrets easily. What was known was that the files contained a header portion, a bundle of XML files in a contiguous stream and a lot of junk data. The XML files could be seen and their encoding was stated as SHIFT JIS and, after cursing its existence, I attributed the junk data to that which seemed like a good place to start.

01
The first eight bytes seemed to be a file signature, but Google searches for all or parts of the signature were fruitless which meant it was time to pick things apart.

02
The next four bytes were different for each file and at first I thought it was part of the block format that made up the header part of the file but the section repetition for the header block didn't match up so after converting it to a variety of different number formats (I'm no hex wizard and I originally thought it was only a two byte short rather than a four byte integer or long) and assumed it was an unisgned long (32 bits) in Little Endian order.

Read the rest of this entry

ef - a tale of memories

Given such an auspicious and confusing opening three episodes, it would have been easy for ef to fall into obscurity and abstraction with deep symbolism and obscured plot; thankfully this is not the case and the series manages to make the absurdly stylistic symbolism part of itself while still a sometimes unique, not wholly original story which ends well at a petite twelve episodes.

the grayscale visions of Hiro, the stained glass technicolour of Chihiro and the sunset beaches for everyone

In between the astounding opening and changing ending are two stories: one about a high school boy trying to find colour in his world while trying to deal with the affections of two girls, one overt and another covert; the other is about a girl whose memory lasts only a scant thirteen hours before events begin slipping away and her relationship with a boy she meets at an abandoned train station. The plot may sound akin to an atypical dating-sim territory but the storytelling is first rate and deftly draws one into the world and its characters. The supernatural elements that nagged the opening episodes are present but downplayed; the ephemeral figure of a long haired woman who imparts advice to all of the central characters and then vanishes is never explained even slightly, the same with the silent, world weary caretaker of the memory-challenged protagonist. The only time these elements are brought to the fore is in the final moments of the series, hinting more at a desire for a second season rather than anything that would affect the first.

Read the rest of this entry

Day 14 - King, Kidnap and Keen

With no death dreams that night I woke up refreshed and ready for the 9am breakfast in which the flies from yesterday had informed their kin which made it very tedious trying to eat. Showering and getting dressed, Matt was suffering from lack of sleep (possibly still catching up with him from Trinidad) so we hung about in the microclimate of the room while we planned out the day. Finding out that there was actually very little interesting to do in Havana, we decided to head towards the Plaza Vieja which, according to the Lonely Planet guide, had some neat curios hidden away.

Read the rest of this entry