fMSX .psg logged sound format

By stilton

Supporter (9)

stilton's picture

15-04-2004, 02:59

Hi everyone,

Does anyone have the specifications on this file format? I know its a dump of PSG register writes, but I need to have a more specific idea of the file structure. Any thanks would be appreciated!


Login or register to post comments

By Vincent van Dam

Hero (513)

Vincent van Dam's picture

15-04-2004, 09:42

Documentation about .psg and various other related formats can be found at:

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

15-04-2004, 18:16

I think it's just REG, DATA for all the data that's sent to the PSG. I used this once to create the Metal Gear sound (when the logo pops up) in an intro for the Future Disk. Then there's a code to mark each 'end of track' and an 'end of file' code. I don't remember the codes, but just by looking at the dump it should be obvious. I'm a bad coder, and I remember it took me about 20 minutes to rip the sound and make an MSX replayer.

Any thanks would be appreciated!
Err... Okay... Thanks!

By stilton

Supporter (9)

stilton's picture

15-04-2004, 20:07

Thanks to both of you; I think I got it now. Here's the text of the documentation at (in case anyone's interested but too lazy to go there)

Cutted from RDOSPLAY documentation (Http site in Prague, CZE)


This is log file produced by X128 (ZX Spectrum emulator) and fMSX (MSX
emulator). Every access to the AY 3-891x (Yamaha's soundchip) is stored in this
file. It's much like RAW format for adlib.
format1: [0]=db 'PSG',1ah ... file identifier
[4]=db data ... AY data
data: command or parameter command==0-15,byte ... next byte is data for
this AY register
command==0fdh ... eom (end of music)
command==0feh,byte ... multiple eoi
command==0ffh ... eoi (end of interrupt,
current data will be
send to ay-emulator)

You can also use utility PSG2.EXE to convert PSG music to another format:
format2: [0]=db 'PSG2' ... file identifier
[4]=struct data ... AY data
data: change_map (word) ... bit-map specifying which regs will be
changed in this interrupt. Order: L->R
(when 0ffffh, end of music)
map_size (byte) ... specifies how many times currently
defined map will be used (ie. how many
times will be data send in this form)
data (bytes) ... data for registers, reg. 0 comes first
After receiving all changes for current
interrupt, data are sent to ay-emu.
Map_size is decremented and when not 0,
next interrupt use same change_map as
previous one.

And, uh, thanks for the thanks ^_^ I should get more sleep or something.

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

16-04-2004, 02:56

So, I assume you have everything you need then? Let us know if it all works out okay. I don't remeber any 'command==0feh,byte ... multiple eoi' though.

By shaiwa

Champion (392)

shaiwa's picture

16-04-2004, 11:25

Some info about .psg format from fmsx-dos v1.6.
command 0ffh & 0fe,byte are used for interrupt.
for data :
0h to 0fh = psg registers
010h to 09fh = scc registers (only wave memory is dumped, anyone knows why ?)
0A0h to 0dfh = opll registers.

playing a lot with this format and implemented this dump format
in a experimental msx emulator. Also op opl1 audio can be dumped.
If there is any interest i would like to hear about it... thought i was the last one
that is using this format.

By stilton

Supporter (9)

stilton's picture

19-04-2004, 20:12

Excellent! Now I definitely have everything I need. Thanks a lot, everyone.

By First Spear

Supporter (10)

First Spear's picture

23-10-2015, 05:16

Hi. Where can I download psg2.exe today (it's 2015)? Smile


By Manuel

Ascended (19469)

Manuel's picture

23-10-2015, 07:07

What is that second format used for anyway?