Did you know? Xentax started the Unepic SID Channel, that brings the latest music composed for the SID chip! Support us by listening and subscribing! Over 50.000 songs already there!

Jack Orlando graphics PM/PBM format?

Get your graphics formats figures out here! Got details for others? Post here!
Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Jack Orlando graphics PM/PBM format?

Post by Pejti » Fri May 07, 2021 12:27 am

Hi Guys

Is anyone tried to extract images from this game?

They are porobably stored in .PM / .PBM files.

I added examples.
I think MONEY.BM can be an object which Jack can pick up, AUTOJAC.PBM his car.
You do not have the required permissions to view the files attached to this post.

User avatar
ikskoks
Moderator
Posts: 893
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 500 times
Been thanked: 227 times
Contact:

Re: Jack Orlando graphics PM/PBM format?

Post by ikskoks » Fri May 07, 2021 8:38 pm

MONEY.BM can be easily viewed in texture finder https://i.imgur.com/Me8qdKw.png
File format is simple:
2 bytes (uint16) - width
2 bytes (uint16) - height
x bytes - image data

But AUTOJAC.PBM seems to be compressed.

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Fri May 07, 2021 10:43 pm

Thank you for fast reply. I hope PBM files will not require reverse engineering of game.

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Mon May 10, 2021 9:56 pm

Okay, now I have two files:

HYDRN_A is like BM file, so it can be viewed in TextureFinder (RGB565, 20x33, shift 4)
HYDRN_B is the same image but compressed

Question: is it possible to find out what method was used?
You do not have the required permissions to view the files attached to this post.

User avatar
ikskoks
Moderator
Posts: 893
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 500 times
Been thanked: 227 times
Contact:

Re: Jack Orlando graphics PM/PBM format?

Post by ikskoks » Mon May 10, 2021 11:10 pm

Yeah, you could try to cut those 4 bytes at the beginning with some hex editor
and then use compression scanner https://zenhax.com/viewtopic.php?t=23

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Tue May 11, 2021 2:39 am

Unfortunately this way did not bring any results but..

I found on github scummvm and there is described JackOrlando game engine and according to "graphics":

.PBM are RLE-compressed:
int16: Width in pixels.
int16: Height in pixels.
int16[]: 128-color palette.
byte[]: Row-first indices of each pixel. The first 7 bits are the index and the last bit is a RLE flag (if 1, repeat index by the value of the next byte).

Can you help me to convert it to simple BMP?

User avatar
ikskoks
Moderator
Posts: 893
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 500 times
Been thanked: 227 times
Contact:

Re: Jack Orlando graphics PM/PBM format?

Post by ikskoks » Tue May 11, 2021 10:29 pm

I have tried to make a working tool, but it seems that standard RLE implementations in Python doesn't work for me in this case.
As far as I know there are several types of RLE algorithms and the "flag" type (RLEB) needs to be used here.
You will find more info on this site https://moddingwiki.shikadi.net/wiki/RLE_Compression

I have also created a wiki article for future reference
http://wiki.xentax.com/index.php/Jack_Orlando_PM_PBM

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Wed May 12, 2021 1:45 pm

Thanky you for your time. I will read about RLEB.

User avatar
ikskoks
Moderator
Posts: 893
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 500 times
Been thanked: 227 times
Contact:

Re: Jack Orlando graphics PM/PBM format?

Post by ikskoks » Wed May 12, 2021 9:50 pm

I have made some progress on this file format. Now, pixel data can be viewed in IrfanView.
Here is how converted AUTOJAC.PBM looks like https://i.imgur.com/tZHoRXU.png

But as you can see, I am struggling with converting palette for BMP output.
Anyway, here is my code
https://github.com/bartlomiejduda/Tools ... BM_Tool.py

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Thu May 13, 2021 1:31 pm

I see that you made progress. In game car looks like this (I cut it from game screen):
https://imgur.com/a/mCrPNbD
You do not have the required permissions to view the files attached to this post.

User avatar
ikskoks
Moderator
Posts: 893
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 500 times
Been thanked: 227 times
Contact:

Re: Jack Orlando graphics PM/PBM format?

Post by ikskoks » Thu May 13, 2021 2:08 pm

Ok, so we're close. But I'm not sure how to convert 128-color palette for BMP output, I've never done something like that and I hope that someone more experienced could help with this. :)

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Thu May 13, 2021 9:22 pm

So, do you think palette colors are compressed/ in RGB565 mode? What I know that in palette colors have 3Bytes per color.

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Thu May 13, 2021 10:06 pm

I know, I can edit post, but I decided to reply. ;P

I found out how palette works. Code is in TXT file. This info is also from github, scummvm. Thanks to SupSuper.
You do not have the required permissions to view the files attached to this post.

User avatar
ikskoks
Moderator
Posts: 893
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 500 times
Been thanked: 227 times
Contact:

Re: Jack Orlando graphics PM/PBM format?

Post by ikskoks » Thu May 13, 2021 10:33 pm

According to documentation from github, this palette has 128 colors and 1 entry takes 2 bytes of space which means this should be 16-bit palette.
But as far as I know BMP needs 32-bit RGBA palette with 256 colors for 8-bit images http://wiki.xentax.com/index.php/BMP_Image
That was the conversion I failed to achieve in my script (see the code that was commented).

It may be something easy to do, but I'm not sure how to proceed on that, even with the code you have shared.
Maybe you should raise a ticket on github to ask about this case?

Pejti
n00b
Posts: 18
Joined: Wed Jan 01, 2020 4:48 am
Location: Poland, Rzeszów
Been thanked: 1 time

Re: Jack Orlando graphics PM/PBM format?

Post by Pejti » Fri May 14, 2021 2:38 pm

I don't know what more I can write. I spoke yesterday with guy which made Code which I shared but he didn't say more than we just know.

Post Reply