The Forum is up for sale: XeNTaX Forum looking for new owner

writing a .bms for a frreware 3d game: magic pets

Read or post about compression. And decompression. Or ask questions how to decompress your files.
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

i tried to wrote a script for a simple 3d game:
http://www.gametop.com/download-free-games/magic-pets/
when i open the data.000 archive in hex editor i saw

Code: Select all

PK

Code: Select all

   0: 080 075 003 004 010 000 000 000 000 000 033 148 060 053 000 000  PK........!”<5.. 
  16: 000 000 000 000 000 000 000 000 000 000 005 000 000 000 070 111  ..............Fo 
  32: 110 116 047 080 075 003 004 010 000 000 000 000 000 202 129 076  nt/PK........ʁL 
  48: 049 182 223 173 206 101 017 000 000 101 017 000 000 013 000 000  1¶ß­Îe...e...... 
  64: 000 070 111 110 116 047 098 105 103 046 102 111 110 116 115 099  .Font/big.fontsc 
  80: 097 108 101 032 048 046 055 013 010 097 099 116 105 118 101 108  ale 0.7..activel 
  96: 101 116 116 101 114 115 013 010 123 032 013 010 045 049 032 045  etters..{ ..-1 - 
 112: 049 032 045 049 032 045 049 032 045 049 032 045 049 032 045 049  1 -1 -1 -1 -1 -1 
 128: 032 045 049 032 013 010 045 049 032 045 049 032 045 049 032 045   -1 ..-1 -1 -1 - 
 144: 049 032 045 049 032 045 049 032 045 049 032 045 049 032 013 010  1 -1 -1 -1 -1 .. 
 160: 045 049 032 045 049 032 045 049 032 045 049 032 048 032 049 032  -1 -1 -1 -1 0 1  
 176: 050 032 051 032 013 010 052 032 053 032 054 032 055 032 056 032  2 3 ..4 5 6 7 8  
 192: 057 032 049 048 032 049 049 032 013 010 049 050 032 049 051 032  9 10 11 ..12 13  
 208: 049 052 032 049 053 032 049 054 032 049 055 032 049 056 032 049  14 15 16 17 18 1 
indeed it is a zip compressed method !
and immediatly i excute an zip binary tempelate on it , you see the conclude on screenshot !
they are imperfect zips ! because when i trimed one of them and save it as zip , it was damaged !
so that , i confused for writing .bms , i hope teachers guide me at this condition ?
sincerely :hippy:
You do not have the required permissions to view the files attached to this post.
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

excuse me all !
i am so foolish ! :tard:
the archive opened by winrar !
i sorry that i released a useless topic :bbat:
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

i will choose another game for this topic
the reason of this mistake is that i swamped on applying a comtype command for this pak and i forgot to did a simple rename test !!!!!!!
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by aluigi »

usually it's not needed to rename the files, just open them directly with 7-zip and if they are a known compressed format the job is done (like in this case)
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

hi all , again
when i survey net to find an archive for BMS exercise , i encounterd an attractive screen saver !
and tried to discover some codes !
this screen saver contains archives with .3dr extension !
each Actor of screen saver has a 3dr pack !
in fact each pack contains : 360 degree camera scaned images of the actress ! that compressed in some ways that i can't understand :?:
after instaling of screen saver you will find this packs at <system32>
http://www.anything3d.com/product/softw ... index.php3
i showd my progress in this binary template :

Code: Select all

struct HEADER {
char key[10];
unsigned int offset;
unsigned int frames;
unsigned int block;
unsigned int ukn1;
unsigned int ukn2;
unsigned int ukn3;
unsigned int ukn4;
unsigned int w;
unsigned int h;
unsigned int ukn5;
unsigned int ukn6;           
} header;
struct fra {
struct pat {
char rgb[3];
}pattern[header.block];
}frame[header.frames];
you can download a sample 3dr from :
http://filekeeper.org/download/shared/Vika.zip
----------------------------------------------
I hope masters show me how should judge at this condition ?
----------------------------------------------
sincerely :hippy:
Last edited by shekofte on Mon Jun 22, 2009 10:40 am, edited 1 time in total.
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by aluigi »

the following is the BMS script for extracting the 3dr files with quickbms:

Code: Select all

goto -4
idstring "3DR\0"
goto -12
savepos MAX_OFFSET

get INFO_OFFSET long
math INFO_OFFSET *= -1
goto INFO_OFFSET
savepos INFO_OFFSET

set FILES long MAX_OFFSET
math FILES -= INFO_OFFSET
math FILES /= 4

get OFFSET long
for i = 1 <= FILES
    if i == FILES
        set NEXT_OFFSET long MAX_OFFSET
    else
        get NEXT_OFFSET long
    endif

    set SIZE long NEXT_OFFSET
    math SIZE -= OFFSET

    log "" OFFSET SIZE

    set OFFSET long NEXT_OFFSET
next i
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

bugtest you are very wonderful :woah:
how you could recognize the structure , rapidly ?
:eek:
sincerely , brilliant bugtest
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by aluigi »

the archive begins directly with a bitmap file so the only other location where was possible to find the index table was at the end.
so here we find the size of the index (which includes also this 12 bytes header), a number which I have not verified and the "3DR\0" signature.
figuring the index was easy because they contain only the offsets of the files, indeed I found them simply searching the offset of the second bitmap inside the whole archive and it confirmed the offset-only table theory.
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

they are jfif image sequence
this is the first time , i encounter with this file format !
APPLAUD :bravo: :bravo: :bravo: :bravo:
Last edited by shekofte on Mon Jun 22, 2009 10:38 am, edited 1 time in total.
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by Mr.Mouse »

Hey shekofte, where are the other pictures? :D 8)
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

excuse me boss , whether i had vandalism here ?
are you angry from me ?
i assumed they are common !
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

@bugtest ,forgive me too ,computer is not my main job , it is only a gamble for me, web is a great delight and i am a little playful
i see you ,like a friend on the other half of world , i never forget your donations and the time spended for me
i dont know how you see me ,but like it i annoied you in a reverse way !
anyway , i should be careful on this community :bbat:
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by aluigi »

personally I like to figure the formats of the games so everything is positive when there are new formats to reverse and (most important) I figure them and moreover correctly :)
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by Mr.Mouse »

shekofte wrote:excuse me boss , whether i had vandalism here ?
are you angry from me ?
i assumed they are common !
Huh? No, I am not angry. Not at all! I was just wondering why you stopped posting those pictures. You were just getting to the good part :). I was joking. ;)
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

the structure that applied in these two game are the same :
http://www.gametop.com/download-free-games/city-racing/
http://www.gametop.com/download-free-ga ... ro-racing/
Image

the offset and size of each file in the .pak archive keeped in its corresponding .hdr header file !
how is the routine when we must write a BMS for pair files (like this case) ?

Image
BLUE : fixed characters
GOLD : unknown
GREEN : size
RED : offset
-----------------
i attached one of headers !
thanks dear for your guides :bleh:
You do not have the required permissions to view the files attached to this post.
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
Post Reply