Join also our Discord channel! Click here.

Knowledge Adventure .bal files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
HeadsetGuy
beginner
Posts: 21
Joined: Thu Feb 16, 2017 3:51 pm
Been thanked: 1 time

Knowledge Adventure .bal files

Post by HeadsetGuy » Wed Mar 01, 2017 9:30 pm

These are *.bal files, used in games from Knowledge Adventure. These particular ones are from JumpStart 1st Grade Math. Looking at them, I think they contain sound, but they're either encrypted or compressed. They also don't have a signature in the header.

MEGA link: https://mega.nz/#!DkgViIIY!RI2QuxhKl5gl ... T0zQ7URy_Q

WRS
ultra-veteran
ultra-veteran
Posts: 601
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 133 times

Re: Knowledge Adventure .bal files

Post by WRS » Fri Mar 03, 2017 10:04 pm

very rusty at the moment. heres a start:

Code: Select all

//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//
// File:
// Author:
// Revision:
// Purpose:
//--------------------------------------

uint num;
uint stub;

enum <int>EntryType
{
  Invalid = -1,
  Unknown = 0,
  File = 0xb0,
};

struct File
{
  EntryType a;
  int b,c,d;
  uint nameoff;
};

File f[num];

local int POOL_POS = FTell();
struct pool
{
string i;
} strs[1+num] <optimize=false>;

local int i;

for(i=0;i<num;++i)
{
  Printf("%s == %s\n", EnumToString(f[i].a), ReadString(POOL_POS+f[i].nameoff) );

}
Useful tool links:

HeadsetGuy
beginner
Posts: 21
Joined: Thu Feb 16, 2017 3:51 pm
Been thanked: 1 time

Re: Knowledge Adventure .bal files

Post by HeadsetGuy » Fri Feb 16, 2018 4:09 pm

Took me long enough, but here's what I've figured out so far:

Code: Select all

uint32 {4}  - number of files (+2)
byte {8}    - padding
uint32 {4}  - archive size (-4)
uint32 {4}  - unknown (0x8000)
byte {4}    - padding
uint32 {4}  - unknown (2)
byte {8}    - padding (if divided into two ints, -1 followed by 0)
uint32 {4}  - unknown (0x8000 again)
byte {4}    - padding

// offsets table
// for each file
   uint32 {4}  - unknown
   uint32 {4}  - file offset
   uint32 {4}  - file size
   byte {8}    - padding

// name table - names vary in length; table goes until first offset
The offset for the first file repeats three times in many of these, leading me to believe that those "files" are just empty. I still can't figure out how to get any sound out of the .SND files, though...

Puterboy1
mega-veteran
mega-veteran
Posts: 173
Joined: Fri Mar 02, 2018 3:05 am
Been thanked: 6 times

Re: Knowledge Adventure .bal files

Post by Puterboy1 » Tue May 22, 2018 11:22 pm

HeadsetGuy wrote:Took me long enough, but here's what I've figured out so far:

Code: Select all

uint32 {4}  - number of files (+2)
byte {8}    - padding
uint32 {4}  - archive size (-4)
uint32 {4}  - unknown (0x8000)
byte {4}    - padding
uint32 {4}  - unknown (2)
byte {8}    - padding (if divided into two ints, -1 followed by 0)
uint32 {4}  - unknown (0x8000 again)
byte {4}    - padding

// offsets table
// for each file
   uint32 {4}  - unknown
   uint32 {4}  - file offset
   uint32 {4}  - file size
   byte {8}    - padding

// name table - names vary in length; table goes until first offset
The offset for the first file repeats three times in many of these, leading me to believe that those "files" are just empty. I still can't figure out how to get any sound out of the .SND files, though...
Did you try Audacity for the .SND files?

HeadsetGuy
beginner
Posts: 21
Joined: Thu Feb 16, 2017 3:51 pm
Been thanked: 1 time

Re: Knowledge Adventure .bal files

Post by HeadsetGuy » Wed May 23, 2018 3:51 pm

Puterboy1 wrote:Did you try Audacity for the .SND files?
Yes I did. It doesn't sound like anything. Clearly it's supposed to be a sound file (the header is "KA Sound File", for crying out loud), so I'm guessing it's some kind of encoding/compression.

HeadsetGuy
beginner
Posts: 21
Joined: Thu Feb 16, 2017 3:51 pm
Been thanked: 1 time

Re: Knowledge Adventure .bal files

Post by HeadsetGuy » Sat Dec 22, 2018 8:43 pm

Hi all. It's been a long time, but I've figured out the structure.

Code: Select all

// for each directory
uint32 {4}  - number of entries
// for each entry
   uint32 {4}  - offset of file or directory name (relative to first entry in name table)
   uint32 {4}  - offset of file or directory
   uint32 {4}  - size of file or directory
   uint32 {4}  - boolean: is directory (0x8000 for true, 0 for false)
   byte {4}    - padding

// name table
uint32 {4}  - length of name table
// for each entry
   string      - name of file or directory

// begin file data
// begin next directory (if applicable)
Is there a way to use MultiEx to work with directories when organized like this?

EDIT: I almost forgot--if it contains the directories "." and "..", that's current directory and previous directory, respectively; I've found this generally means there's only one directory in the archive. The ".." directory will also have an offset of -1 (that's where the 0xFFFFFFFF came from) and a size of 0.

Post Reply