Anyone good at guessing filenames?

Discuss classic and favorite computer or console games here.
User avatar
Malvineous
Shikadi Webmaster
Posts: 382
Joined: Wed Oct 31, 2007 21:48
Location: Brisbane, Australia
Contact:

Post by Malvineous »

Fair enough. I think I've worked out the format (uint16le width, uint16le height, followed by data split into four planes, of sorts.) I'll see if I can write a converter now and post some images on that page.
User avatar
Malvineous
Shikadi Webmaster
Posts: 382
Joined: Wed Oct 31, 2007 21:48
Location: Brisbane, Australia
Contact:

Post by Malvineous »

Ok, I've got a working converter for .scr and .gra files. a0f is not a normal .gra file. *font.gra are all in a different format to the other .gra files, and these match a0f. So a0f is definitely a font, and probably ends in "font.gra" like the others. 266b and 9c7b are also .gra font files.

Despite the file size difference, dc79 appears to be in .omp format.
User avatar
lemm
Blorb
Posts: 696
Joined: Fri Jul 03, 2009 10:18
Location: canada lol

Post by lemm »

SCRFONT.GRA
SFONTWX5.GRA
SCQOMFNT.GRA
SFOCGFNT.GRA

all match a0f. SCRFONT.GRA seems like the most likely one.
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

I wonder if the font format is similar to JJ's .0FN format?
What you really need, not what you think you ought to want.
User avatar
Malvineous
Shikadi Webmaster
Posts: 382
Joined: Wed Oct 31, 2007 21:48
Location: Brisbane, Australia
Contact:

Post by Malvineous »

Unfortunately not, according to the ModdingWiki page for the JJ font format. VGFM seems to have a mishmash of various formats, many of which overlap and seem redundant, perhaps even deliberately obtuse, and so far, all of which are unique. For example:
  • One 320x200 8-bit VGA image is standard, but the palette is 24-bit RGB (0-255) instead of 18-bit (0-63) like all other VGA games
  • The other 320x200 images are stored in a kind of planar arrangement (similar to EGA graphics) where the image is split into four 80x200 pictures, with the first one storing X columns 0, 4, 8, etc, the second picture storing columns 1, 5, 9, etc, etc.
  • In some weird attempt at reducing the file size, the tileset format does not store bytes, but instead stores a two-byte codeword that, via a lookup table, expands into four pixels. This halves the space needed to store the tiles, except that there's a massive lookup table on the end that brings the file size pretty much up to where it would've been without this weird complicated system
  • Perhaps realising this, the font .gra files discussed above are in a different tileset format, which does not use a lookup table but is otherwise much the same
  • Then of course the point of this thread, the .lbr format uses hashes instead of filenames
  • And the music format is standard MIDI with a special header, *except* one particular MIDI event is only one byte long instead of the normal two, so the data cannot be played by a standard MIDI player
It looks like the game had a number of design changes during development with lots of leftover bits and pieces, which makes sense given the number of files inside the .lbr which don't seem to be used, not to mention all the references to Jill of the Jungle that weren't taken out...
Calvero
Vortininja
Posts: 98
Joined: Tue Jan 29, 2008 15:31

Post by Calvero »

Malvineous wrote:
  • The other 320x200 images are stored in a kind of planar arrangement (similar to EGA graphics) where the image is split into four 80x200 pictures, with the first one storing X columns 0, 4, 8, etc, the second picture storing columns 1, 5, 9, etc, etc.
That way it's easier to use with the unchained mode part of Mode X, right?
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Interesting, so the fonts aren't the same, but some of the image formats ARE similar to JJ. I know JJ's saved game format was deliberately encrypted by Arjan Brusee as a challenge to those who would mode the game, wonder if he had a hand in things here...
What you really need, not what you think you ought to want.
User avatar
Malvineous
Shikadi Webmaster
Posts: 382
Joined: Wed Oct 31, 2007 21:48
Location: Brisbane, Australia
Contact:

Post by Malvineous »

@Calvero: You'd think there'd be a reason like making it easier to work with Mode X but I've yet to find it. Mode X is true planar, where you need to combine multiple bytes to find the colour of a given pixel. The VGFM format is more akin to interlacing - in interlaced video, every second line comes from a different frame. Here, every four columns come from different images. But each pixel is one complete byte, so it's not really planar - I probably should have called it 'interlacing' as that's a more accurate term.

@Levellass: It doesn't surprise me that there are similarities to the JJ formats. Many formats among games are quite similar, mostly because they're based on things like EGA memory which is always the same. But is there some particular reason you suspect some of the JJ developers had a hand in VGFM? As far as I'm aware the only link is that it was designed as a sequel to Jill of the Jungle until Epic declined to publish it (apparently as they thought it was not polished enough, which is believable.)
Calvero
Vortininja
Posts: 98
Joined: Tue Jan 29, 2008 15:31

Post by Calvero »

Here's a small Qbasic program that will show the episode selection screen:

Code: Select all

DEFINT A-Z
DIM b AS STRING * 1

SCREEN 13
DEF SEG = &HA000
OUT &H3C4, &H4: OUT &H3C5, &H6
OUT &H3D4, &H14: OUT &H3D5, &H0
OUT &H3D4, &H17: OUT &H3D5, &HE3

OUT &H3C4, &H2: OUT &H3C5, &HFF
FOR i = 0 TO 15999
   POKE i, 0
NEXT i


OPEN "episode.pal" FOR BINARY AS #1
OUT &H3C8, 0
FOR i = 1 TO 768
   GET #1, , b
   OUT &H3C9, ASC(b) \ 4
NEXT i
CLOSE #1


OPEN "episode.scr" FOR BINARY AS #1

FOR p = 0 TO 3
   OUT &H3C4, &H2
   OUT &H3C5, 2 ^ p
   FOR i = 0 TO 15999
      GET #1, , b
      POKE i, ASC(b)
   NEXT i
NEXT p

DEF SEG
CLOSE #1
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Malvineous wrote:@Levellass: It doesn't surprise me that there are similarities to the JJ formats. Many formats among games are quite similar, mostly because they're based on things like EGA memory which is always the same. But is there some particular reason you suspect some of the JJ developers had a hand in VGFM? As far as I'm aware the only link is that it was designed as a sequel to Jill of the Jungle until Epic declined to publish it (apparently as they thought it was not polished enough, which is believable.)
A lot of Epic's games were cobbled together by teams of people who would then be reassigned to other games. They would thus often recycle or borrow things that worked from other games instead of taking time to reinvent the wheel.

As a side effect this often gave the formats a somewhat cobbled-together feel (Check out Jazz's level format for example!) This means that I have oft seen the signature of one developer on multiple games. (The division of an image into columns is one example.)
What you really need, not what you think you ought to want.
User avatar
Malvineous
Shikadi Webmaster
Posts: 382
Joined: Wed Oct 31, 2007 21:48
Location: Brisbane, Australia
Contact:

Post by Malvineous »

I've seen a similar thing, e.g. Xargon being built on top of the Jill of the Jungle codebase, but I was just surprised in this case because I thought VGFM was developed independently and then Epic was approached afterwards to publish it, and they declined.

But again I guess some similarity is due to everything using the same video modes, sound cards, etc. so in the end the formats all have to end up much the same.

@Calvero: Interesting - any idea why this mode would be preferable to the normal linear video mode?
Calvero
Vortininja
Posts: 98
Joined: Tue Jan 29, 2008 15:31

Post by Calvero »

I'll just copy-paste some text from Wikipedia - Mode X:
The main uses of the extra memory are:
  • Double buffering and triple buffering for flicker free animation
  • Smooth hardware scrolling of the video display window
  • Graphics stored in 'off-screen' VRAM can quickly be moved around in VRAM using the VGA latches
  • Planar mode allows up to 4 adjoining pixels to be modified in one byte write operation, which is ideal for solid filling of objects such as polygons, rectangles, lines, etc.
  • Screen splitting, where one part of the display is taken from one area of memory and the other from a different area, which is ideal for status displays in games that utilise smooth hardware scrolling
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

I've seen a similar thing, e.g. Xargon being built on top of the Jill of the Jungle codebase, but I was just surprised in this case because I thought VGFM was developed independently and then Epic was approached afterwards to publish it, and they declined.
Very true, but you'd be amazed at how people move around, especially I;d imagine when they're doing a sequel to a previous Epic game. I got a program (But not a method) to decompress Keen Dream's title screens from an Epic guy (Not gonna say who.) who had (according to him) borrowed it from someone who was at Softdisk and used it to compress all the B800 screens in his program.
What you really need, not what you think you ought to want.
User avatar
Malvineous
Shikadi Webmaster
Posts: 382
Joined: Wed Oct 31, 2007 21:48
Location: Brisbane, Australia
Contact:

Post by Malvineous »

Hmm that's true, I guess the industry was even smaller back then and there weren't so many issues about sharing code. Shame nobody seems to have kept much code from back then, given the tiny number of source code releases compared to the number of games.

@Calvero: From my reading, "mode X" can refer to a bunch of different modes with varying characteristics. I was just wondering specifically what the benefit was from the interlaced method, since you seem to be pretty familiar with it. I can't see any reason why updating one byte to change one pixel would be better if those pixels were four apart or one apart...unless you don't get a choice, and all mode X variations require the images in this arrangement?
Calvero
Vortininja
Posts: 98
Joined: Tue Jan 29, 2008 15:31

Post by Calvero »

That's right, you don't get a choice.
Post Reply