ericmckean / game-music-emu

Automatically exported from code.google.com/p/game-music-emu
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Adding support for PSG files #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hey guys. Some Spectrum ZX emulators (fuse for example) can log the music to 
PSG files. I've found this format explained here:

http://bulba.untergrund.net/progr_e.htm
more specifically: http://bulba.untergrund.net/PSGFormat.rar

Let me just paste it here in case the website is down:

Cutted from RDOSPLAY documentation

http://sorry.vse.cz/dimension/rdos/rdosplay   (Http site in Prague, CZE)

ú PSG

   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.

Also, there seems to be a tool called psg2ym that i haven't been able to 
download that converts from psg to ym (?) format playable by STsound

Original issue reported on code.google.com by mihai.draghicioiu@gmail.com on 17 Apr 2011 at 1:59

GoogleCodeExporter commented 9 years ago

Original comment by reilith...@gmail.com on 7 Mar 2012 at 1:48

GoogleCodeExporter commented 9 years ago
Maybe will this format become obsolete in the future, as the VGM format is 
intended to support as many soundchips as possible. See here: 
http://vgm.mdscene.net/forum/

Original comment by aurelien...@laposte.net on 30 Sep 2013 at 4:40