Author Topic: PES File Format  (Read 4123 times)

w4kfu

  • Newbie
  • *
  • Posts: 9
    • View Profile
PES File Format
« on: March 25, 2013, 08:35:41 PM »
So I started reverse the real "game.exe", and found that restunts don't know how to handle this type of files (*.PES)
This file format use a common scheme used in image file compression, first pass is huffman decompression, then RLE decompression.
After they do an "unflip" on pixels for some images, and expand image data to 8bits. After all this, we can extract easily image like follow :

Image gallery for the file SCRED.PES : http://w4kfu.com/misc/stunts/SDCRED_gallery/

Image gallery for the file SDTEDIT.PES : http://w4kfu.com/misc/stunts/SDTEDIT_gallery/

dstien will add my work to stressed and restunts as soon as possible.
« Last Edit: March 25, 2013, 08:42:53 PM by w4kfu »

dreadnaut

  • Corner Controller
  • ***
  • Posts: 1260
    • View Profile
    • chezDreadnaut
Re: PES File Format
« Reply #1 on: March 25, 2013, 09:35:45 PM »
Track item masks, that's nice! Thanks!

Although there are some artifacts left. E.g., this image should be a brown windmill, like the one in this palette:
« Last Edit: March 25, 2013, 09:40:36 PM by dreadnaut »

w4kfu

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: PES File Format
« Reply #2 on: March 25, 2013, 11:10:34 PM »
You are right, and it is now fix :)

Duplode

  • Lives on Stunts
  • ******
  • Posts: 4000
  • Fear is your only god on the radio
    • View Profile
    • The Southern Cross Stunts Trophy
Re: PES File Format
« Reply #3 on: March 26, 2013, 05:08:38 AM »
Excellent! :) ESH icons were the main data formats yet to be described. Only a fuller account of music and sound effect data is missing now, IIRC. To point out one low-hanging fruit: as the track element to editor selection grid correspondence is defined by pbox in TEDIT.RES, being able to edit the icons makes it possible to add the ghost cars (like the one available in Track Blaster) to the regular editor's palette.

dstien

  • Stunts Master
  • *
  • Posts: 160
    • View Profile
    • Stunts Tools
Re: PES File Format
« Reply #4 on: March 30, 2013, 10:13:31 PM »
Beyond excellent! ;D
7 related functions now ported in restunts.

arturbmallmann

  • Stunts Addict
  • *
  • Posts: 28
    • View Profile
Re: PES File Format
« Reply #5 on: March 08, 2017, 11:00:40 PM »
I know I'm digging up this post, but it costed to me to found where was the information about what kind of decompression was necessary to open the files. I think would be interesting that someone put this information on the Stunts Wiki(If already was there, sorry, but I don`t found it there).

Duplode

  • Lives on Stunts
  • ******
  • Posts: 4000
  • Fear is your only god on the radio
    • View Profile
    • The Southern Cross Stunts Trophy
Re: PES File Format
« Reply #6 on: March 09, 2017, 02:15:45 AM »
I know I'm digging up this post, but it costed to me to found where was the information about what kind of decompression was necessary to open the files. I think would be interesting that someone put this information on the Stunts Wiki(If already was there, sorry, but I don`t found it there).

Indeed, that should be documented -- as a section in Resource file format, or perhaps in a separate article to also cover compression in the executable.

Daniel3D

  • Corkscrew Cad
  • ***
  • Posts: 1003
    • View Profile
Re: PES File Format
« Reply #7 on: November 23, 2021, 10:52:24 PM »
dstien will add my work to stressed and restunts as soon as possible.
I can't really open the files with stressed, am I correct in assuming this was not added? Or do I need to open the chunk as something different than Bitmap.
PES and ESH seem to be supported.
Ever tried, ever failed. Try again, fail better.

Currently running 19 separate instances of Stunts or 4D Sports Driving.
---------
Stunts resources.
https://mega.nz/folder/JM8HQI5a#mH5ZBNwXC0eEBmockWo50A

Daniel3D

  • Corkscrew Cad
  • ***
  • Posts: 1003
    • View Profile
Re: PES File Format
« Reply #8 on: November 25, 2021, 03:16:14 PM »
I googled a bit and found w4kfu his Git.

https://github.com/w4kfu/Stunts

After reading his documentation, I realized that Samuel (w4kfu) did manage to unpack the pes files and extract the images, but his tool is unable to reverse it.
So PES (esh) files can not be modded yet.

That is unfortunate for me because I thought of altering some scenery for the Ferrari edition (tribune and pit lane boxes in expense of joe's diner and the garage)
and the tile images of the track editor are in a PES file.
« Last Edit: November 25, 2021, 03:38:52 PM by Daniel3D »
Ever tried, ever failed. Try again, fail better.

Currently running 19 separate instances of Stunts or 4D Sports Driving.
---------
Stunts resources.
https://mega.nz/folder/JM8HQI5a#mH5ZBNwXC0eEBmockWo50A