VOGONS

Common searches


Mobil 1 Rally Championship .SQ Ordnance Survey image extraction?

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by notindeed

User metadata
Rank Newbie
Rank
Newbie

Sorry if this is the wrong forum, i didn't really know which one was appropriate for this.

This game has a display that shows you an ordnance survey map of where you are in the rally stage while you are driving it, like this:

77484-mobil-1-rally-championship-windows-screenshot-something-is.jpg

I had a look in the game data and i am guessing that the picture information is perhaps stored in the "maps" folder.
It has some weird .SQ file extension

Then there is the "levels" folder which i assume contains the actual 3d meshes for the level stages themselves.
Interestingly, they are also .SQ files, with another file with them.

I am guessing that both of these files interact with one another and that the map files contain more data than just the image, as there needs to be some kind of image / coordinate system so that the ordnance survey map can be scrolled and aligned with your position as you travel through the level.

Looking at the two files in a hex editor, the map files seem to be SQSM and the level (3d mesh) files seem to be SQSL.

I don't know how to extract the image data from the SQSM file - at least i assume it is in that file.
I don't think the map (SQSM) and localdat files are compressed - they have a reasonable amount of padded blank space of just 0s but the CDAT00C (SQSL) files seem like they probably are.
I am guessing the information required is in the map files though.

The game generally uses .PCX image files for most textures and things if that helps. I would assume that the maps are in this format. It does also use pngs in some cases but those are more for menu splash screens.

I have attached 2 samples of the shortest (and therefore smallest) map files.
I have also included screens of the stage overview, so you can get a lower resolution preview of the maps.

Another reason why i think that the images are in the map SQ files and not the level ones is that level 33 doubles back on itself, which would make the image file of the map smaller, but the overall level file would be longer than others as the stage distance is longer so requires more 3d data in comparison to other files with a shorter stage length that do not double back (which would save image space).

The only thing i can find online is this: http://www.racedepartment.com/threads/sq-file … hip-2000.11174/
However, they only seem interested in the actual level meshes, and plus there is not really any information so that doesn't help.
In regards to that someone said:

Sorry for such a massive bump, hope it's allowed since it's relevant. The SQ files are most likely for "Sequence". These files are compiled versions of SQSL (Sequence Source Level [afaik]). SQSL files can be found in SRCLEVELS in the demo versions, which suggests they've been edited for the demos.

but firstly, that's about the other kind of file and also it doesn't really tell me anything as searching for what he mentioned pulls up nothing. I don't really get what he's talking about, it seems a bit handwavey.

So, does anyone have any ideas? 😀

Sorry to ask, just that i have no idea or experience trying to extract things from binary content, let alone unknown filetypes 😳

Hopefully it's not as difficult as it may seem at first! 😁

Attachments

  • Filename
    m1rc_map_sample.7z
    File size
    1.23 MiB
    Downloads
    37 downloads
    File license
    Fair use/fair dealing exception

Reply 2 of 8, by notindeed

User metadata
Rank Newbie
Rank
Newbie

I wanted to plot them on google maps / earth.

I actually started doing this before, using the smaller preview images. The problem is they are not high resolution enough to see all of the road names, so it can be hard to find them.

You actually find that a lot of the road on google maps / earth have street view data for them.

Also, i just wanted to see the actual images rather than only being able to see a tiny portion of it at one time, in your "radar".

I thought it would be an interesting project :$

On a side note, people have already extracted the meshes themselves and some even are converting some to Richard Burns Rally to make stages on. However, the stages in the game aren't quite the same as real life - they changed them etc. For example, on Clocaenog Mid, the first stage of the game, the in game stage has twisty chicanes in the roads towards the end, but looking at the ordnance survey map and the real roads on google maps, you can see that it doesn't in real life.

Mind you they were working under lots of limitations with hardware then too.

But yer, i am just interested to see what they look like really, and just to understand the file format and everything. A first step into understand binary files hahaha. Maybe not the easiest one 😳

I managed to understand the PCX format of the normal ingame textures but the binary glob at the end of these SQ map files doesn't seem to be that. I thought it might be a load of fixed size "squares" of PCX data that it goes to, and it doesn't need a header for it because it knows that they are all a set dimension etc etc. But then looking at the glob it doesn't look like PCX to me.
So i don't know, maybe it is archived or compressed or compiled in some weird way.

There are some patterns i have noticed with the rest of the data in the file but i don't know what they mean and anyway i assume they are just linked to mapping the images to the coordinates of the stage meshes themselves.

From the readme of the mesh extractor tool i found, you have to run it while running the game, which makes me think that the SQSM files at least are encrypted in some way or at least archived in a way that the modders didn't understand so they got a tool to read them out of memory instead. If it's similar for SQSL files then i guess my approach at trying to work with the SQ (SQSL) file itself might be fruitless.
The problem is, i don't know any tools about spying on the memory of the game in order to try and do the same thing but for this image data.
Even more, i wouldn't have the faintest idea about using them.
I would try and contact the person that made the extractor but i don't know where to contact them, i don't really know the main "hub" for the RBR community and also another person i asked said that they left the scene anyway and they don't know how to contact them.

I can post some findings though if anyone is interested - the problem is i have no experience in this stuff and i don't know what it means even though i found some patterns.

On a side note, i always wanted to find a way to add a cockpit view to the MFHothatch cheat car - the cheat cars don't have cockpits but this car should have as it was the Toyota Corolla in game but they had to change the texture and remove it due to licensing issues. However if you look at the textures, you can find cockpit textures for the Corolla. So i always wondered if it would be possible to hack the game to add it in, or if the implementation for that vehicle was removed entirely rather than disabled.

Thanks!

Reply 4 of 8, by notindeed

User metadata
Rank Newbie
Rank
Newbie

Yer i am thinking it probably is too.

In the exe there is mention of maps\source\ PCX files so where they are fully compressed / encrypted / just split into smaller X*X chunks or whatever i dunno.

What do you suggest using to debug or dissassemble?

Looking at the EXE, there is a part in it that references SQSL and SQSM so maybe that would show how it reads them

Reply 5 of 8, by VirtuaIceMan

User metadata
Rank Oldbie
Rank
Oldbie

There's a full map of each stage on the stage selection screen, so you might be able to find where they are (to a degree) that way.

For example Manx Rally Marine Drive stage: https://www.youtube.com/watch?v=0T46f6ZimG0

Starts here: https://www.google.co.uk/maps/@54.1409925,-4. … !8i6656!6m1!1e1

My PC spec: Win10 64bit, i7-4970K (not overclocked), KFA2 GeForce RTX 2070 SUPER, Creative Soundblaster ZXr, 16GB RAM, Asus Z97-A motherboard, NZXT 410 case, ROG Swift GSYNC monitor

Reply 6 of 8, by SpartaX18

User metadata
Rank Newbie
Rank
Newbie

Greetings, guys!

Awesome idea there! I totally dig it. I would love to help, but i'm green at this stuff, haha. I've tried decrypting the files once, but the farthest i've gotten is the sprites/textures... (told'ya) Nevertheless, maybe if i study some of this whole black magic, i may be able to help somehow. As for now, i'm just a plain fan of this game who likes seeing stuff like this happen.

|Warning: shameless self-advertisement ahead.|

As for now, i just want to say it's awesome that people still contribute to this game. I wanted to throw my two cents and created a fan-forum solely revolving around this game (http://rc2000.fanbb.net/), but well, i guess 5 people in over a month isn't a great forecast :V

I hope i won't get killed for making my first post completely unhelpful, nearly fully off-topic, and containing a self-ad (even though i know i deserve it)... Oh well...!
Ugh, i'm so dead :I

Reply 7 of 8, by Stiletto

User metadata
Rank l33t
Rank
l33t
SpartaX18 wrote:

I hope i won't get killed for making my first post completely unhelpful, nearly fully off-topic, and containing a self-ad (even though i know i deserve it)... Oh well...!
Ugh, i'm so dead :I

Nah, just one of these:
tumblr_lkdr0omfvq1qf7p0ro1_400.gif

😉

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto