It would be nice if someone has a complete description of the contents of a .e4b file so I can check stuff. However I have looked at contents of the sample area of the preset ROM and here are some observations:
Here is a ys_1 record from the preset ROM. This is the second sample record (since the first one is a NULL sample full of no information).
The other sample records appear similar.
000090 : � � � � � � � � � � � � �; � � � � � � � 0x79 0x73 0x5F 0x31 0x00 0x00 0x00 0x40 � � � � � � �ys_1...@
000098 : 0x00 0x02 0x00 0x00 0x4F 0x70 0x20 0x42 0x44 0x20 0x6B 0x31 0x20 0x33 0x2E 0x4C � � �....Op BD k1 3.L
0000A0 : 0x65 0x31 0x20 0x20 0x00 0x04 0x4B 0x8B 0x00 0x04 0x4B 0x5D 0x00 0x04 0xF9 0xCC � � e1 �..K...K]....
0000A8 : 0x00 0x04 0x4B 0x5D 0x00 0x04 0x4B 0x90 0x00 0x04 0x4B 0x62 0x00 0x04 0xF9 0xC7 � � �..K]..K...Kb....
0000B0 : 0x00 0x04 0x4B 0x5D 0xFF 0x5D 0x09 0x09 � � � � � � � � � � � � � � � � � � � � � �..K].]..
0x79735F31 � � � � � � � � � �= sample header - ys_1
0x00000040� = header size
0x0002 � �� = sample number 2
0x0000 � � � � � � � � � � � �= ????
0x00044B8B � � � � � � � � � �= location of start of sample
0x00044B5D � � � � � � � � � �= pointer to name of sample
0x0004F9CC �; � � � � � � � � � �= location of loop or end point
0x00044B5D � � � � � � � � � �= pointer to name of sample�
0x00044B90 � � � � � � � � � �= location of start of sample
0x00044B62 � � � �; � � � � � � �= pointer midway through name
0x0004F9C7 � � � � � � � � � �= location of loop or end point
0x00044B5D � � � � � � � � � �= pointer to name of sample
0xFF5D � � � � � � � � � � � �= ???? (0x0001 in other records)
0x0909 � � � � � � � � � � �= end record
There is an id header, followed by a size (including the header). Then the sample number followed by a 16 bit value of unknown use. Next is a 16 character string being the name. After that is �four pointer pairs.
The pointers are word (16-bit) pointers into the main ROM - so the addresses match the 16-bit addresses already in the text file. The pointers appear to be in pairs - a pointer into the sample followed by one which points to the name. The name pointer of the third pair points midway through the name. I don't understand why there are four and why they have slightly different values.
there are two which point to the beginning and two which point near the end. That may be for stereo samples. Alternatively a sample would typically be start, stop and loop positions. (so the sound loops from the loop position each time it gets to the end. Alternatively if could be start, loop end, loop start and end. (so the sound goes from start to loop end, then back to the loop start and then to the end for release). Not sure what is right (without knowing the .e4b file format).
�