                            .EFE File Format
             re-produced with permission from Gary Giebler
                            by Steve Quartly
                               19/4/1992
                          steveq@DIALix.oz.au


The  .EFE file format consists of a 512 byte header and then  the  sound 
/sysex/effects/bank/song/sequence  data  etc.  In fact any of  the  file 
types on the EPS can be converted to an .EFE file.

If  you had an instrument called Jazz Bass,  154 blocks,  the  resulting 
.EFE file would be 155 blocks, the header being the extra block.

The header in the .EFE is the only thing that differs from the  original 
file off the EPS 16+ disk.  In other words,  when you write a .EFE file, 
you would write a 512 byte block to the disk containing the  information 
as shown below, then, append the sound/bank/song data etc. to the end of 
the header.

Header
------

Here is a sample header for an instrument called Jazz Bass:

All data is in hex.


000:  0D 0A 45 70 73 20 46 69 6C 65 3A 20 20 20 20 20  ..Eps File:     
010:  20 20 4A 41 5A 5A 20 42 41 53 53 20 20 20 20 20    JAZZ BASS     
020:  20 20 49 6E 73 74 72 75 6D 65 6E 74 20 20 20 0D    Instrument   .
030:  0A 1A 03 00 00 9A 00 9A 00 0F 00 00 00 00 00 00 .................
040:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .................
...
1F0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .................

As you can see,  only the first 58 bytes of the header are being used in 
the .EFE file format.

Byte offset $00 & $01, are just a CR, LF, $0D & $0A respectively.

Byte offset $02 - $11 is the ASCII data "Eps File:       ".

Byte offset $12 - $21 is the instrument name followed by 4  spaces,  in 
this  case "JAZZ BASS       ".  As the file name for an EPS file  is  12 
characters long, any unused characters are converted to spaces.

Byte  offset  $22  -  $2E  is the file  type  in  ASCII,  in  this  case 
"Instrument   ". Below is the list of ASCII strings used:

Instrument
Bank
Effect
Song/Seg
Sequence
Macro
System Ex.

Byte offset $2F & $30, are just a CR, LF, $0D & $0A respectively.

Byte offset $31, is an End of File marker (IBM), $1A.

All of the above part of the header is used only to reproduce a line  of 
text on the screen,  should the 'type' command be used on this file with 
an IBM PC.  This is handy as you can tell at a glance what sort of  file 
you are looking at, however it is not much use on any other machine.

The  next  part  of the header consists of the  data  contained  in  the 
directory  entry of a EPS file.  Refer to Transoniq Hacker  issues  #73, 
#74, #75 for more specific information.

Byte offset $32, is the file type. $03 being an instrument file.

Byte offset $33,  is the type dependent information which is reserved on 
the EPS and is generally set to $00.

Byte offset $34 & $35 is the file size in blocks,  high byte  then  low 
byte, $00 $9A being 154 (blocks).

Byte offset $36 & $37 if the number of contiguous blocks in  the  file. 
Once again high byte then low byte.

Byte offset $38 & $39 is the pointer to the first blocks location on  the 
EPS disk.

Byte offset $3A is the multi file index (for when a sound  covers  more 
than one disk.)

Byte offset $3B - $1FF is not used and are all $00.


--------------------------------------------------------------------------
                            .EDE File Format

The  .EDE  file  format  consists of a 512  byte  header  and  then  the 
entire contents of an EPS disk. 

Header
------

Here is a sample header for an EPS disk.

All data is in hex.


000:  0D 0A 45 70 73 20 44 69 73 6B 20 20 20 20 20 20  ..Eps Disk          
010:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ................     
020:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ................     
030:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ................     
040:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 0D 0A  ................     
050:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ................     
060:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ................     
070:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ................     
080:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ................     
090:  20 20 20 20 20 20 20 20 20 20 20 20 20 0D 0A 1A  ................     
0A0:  80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
0B0:  00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
0C0:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
0D0:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
0E0:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
0F0:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
100:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
110:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
120:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
130:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
140:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
150:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ................     
160:  FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00  ................     
170:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
180:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
190:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
1A0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
1B0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
1C0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
1D0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
1E0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................     
1F0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03  ................     

Byte offset $00 & $01, are just a CR, LF, $0D & $0A respectively.

Byte offset $02 - $09 is the ASCII data "Eps Disk".

Byte offset $0A - $4D are all spaces, $20.

Byte offset $4E & $4F, are just a CR, LF, $0D & $0A respectively.

Byte offset $50 - $9C are all spaces, $20.

Byte offset $9D & $9E, are just a CR, LF, $0D & $0A respectively.

Byte offset $9F, is an End of File marker (IBM), $1A.

Byte  offset $A0 - $167 is the 'skip table'.  Each BIT from byte $A0  to 
byte  $167 represents a block on the disk.  If the bit is set then  that 
sector on the EPS disk was empty ie:  full of $6DB6 data.  If it is  not 
set  then that block on the disk EPS disk had data in it.  By using  the 
skip table you can write files to disk that is a direct image of the EPS 
disk without having to write the redundant $6DB6 blocks.

In the above example,  the MSB of byte offset $A0 is set,  so block 0 on 
the EPS disk was empty ($6DB6,  this is standard for an EPS disk). Bit 7 
is 0 so then block 1 had data in it.

When writing the .EDE disk to a file,  you should examine the block,  if 
it has data,  append it to the file,  if not, set the appropriate bit in 
the skip table and then go to the next block.

Once  you have checked all blocks on the disk write the header  back  to 
the start of the file.

Byte offset $1FD contains a flag for data compression.  At this stage it 
does not exist, however if it does the byte will be something other than 
$00. Unless you are familiar with the data compression used, a .EDE file 
should not be extracted unless this byte is $00.

Byte offset $1FE & $1FF contain the type of disk that has been stored in 
this file. $00 & $03 means it is an EPS disk.


