]> granicus.if.org Git - file/commitdiff
more magic.
authorChristos Zoulas <christos@zoulas.com>
Wed, 14 Aug 2013 09:01:45 +0000 (09:01 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 14 Aug 2013 09:01:45 +0000 (09:01 +0000)
magic/Magdir/audio
magic/Magdir/msx [new file with mode: 0644]
magic/Magdir/symbos [new file with mode: 0644]
magic/Makefile.am

index ebe6f09a3e4759ffd8e062747468f8b85bbb2e6b..f864e084611fa3cae7c573ec1715c97293ea43e4 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: audio,v 1.66 2013/02/06 14:18:52 christos Exp $
+# $File: audio,v 1.67 2013/08/14 09:01:45 christos Exp $
 # audio:  file(1) magic for sound formats (see also "iff")
 #
 # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
 # URL:  http://wiki.multimedia.cx/index.php?title=WavPack
 # From: Mike Melanson <mike@multimedia.cx>
 0      string  wvpk    WavPack Lossless Audio
+
+# From Fábio R. Schmidlin <frs@pop.com.br>
+# VGM music file
+0      string          Vgm\ 
+>9     ubyte           >0      VGM Video Game Music dump v
+>>9    ubyte/16        >0      \b%d
+>>9    ubyte&0x0F      x       \b%d
+>>8    ubyte/16        x       \b.%d
+>>8    ubyte&0x0F      >0      \b%d
+#Get soundchips
+>>8    ubyte           x       \b, soundchip(s)=
+>>0x0C ulelong         >0      SN76489,
+>>0x10 ulelong         >0      YM2413,
+>>0x2C ulelong         >0      YM2612,
+>>0x30 ulelong         >0      YM2151,
+>>0x38 ulelong         >0      Sega PCM,
+>>0x34 ulelong         >0xC
+>>>0x40        ulelong         >0      RF5C68,
+>>0x34 ulelong         >0x10
+>>>0x44        ulelong         >0      YM2203,
+>>0x34 ulelong         >0x14
+>>>0x48        ulelong         >0      YM2608,
+>>0x34 ulelong         >0x18
+>>>0x4C        lelong          >0      YM2610,
+>>>0x4C        lelong          <0      YM2610B,
+>>0x34 ulelong         >0x1C
+>>>0x50        ulelong         >0      YM3812,
+>>0x34 ulelong         >0x20
+>>>0x54        ulelong         >0      YM3526,
+>>0x34 ulelong         >0x24
+>>>0x58        ulelong         >0      Y8950,
+>>0x34 ulelong         >0x28
+>>>0x5C        ulelong         >0      YMF262,
+>>0x34 ulelong         >0x2C
+>>>0x60        ulelong         >0      YMF278B,
+>>0x34 ulelong         >0x30
+>>>0x64        ulelong         >0      YMF271,
+>>0x34 ulelong         >0x34
+>>>0x68        ulelong         >0      YMZ280B,
+>>0x34 ulelong         >0x38
+>>>0x6C        ulelong         >0      RF5C164,
+>>0x34 ulelong         >0x3C
+>>>0x70        ulelong         >0      PWM,
+>>0x34 ulelong         >0x40
+>>>0x74        ulelong         >0
+>>>>0x78 ubyte         0x00    AY-3-8910,
+>>>>0x78 ubyte         0x01    AY-3-8912,
+>>>>0x78 ubyte         0x02    AY-3-8913,
+>>>>0x78 ubyte         0x03    AY-3-8930,
+>>>>0x78 ubyte         0x10    YM2149,
+>>>>0x78 ubyte         0x11    YM3439,
+
+
diff --git a/magic/Magdir/msx b/magic/Magdir/msx
new file mode 100644 (file)
index 0000000..b9c8c0c
--- /dev/null
@@ -0,0 +1,227 @@
+
+#------------------------------------------------------------------------------
+# msx:  file(1) magic for the MSX Home Computer
+# Fábio R. Schmidlin <frs@pop.com.br>
+
+
+
+############## MSX Music file formats ##############
+
+
+# Gigamix MGSDRV music file
+0      string          MGS     MSX Gigamix MGSDRV music file, 
+>3     byte            x       \bv%c
+>4     byte            x       \b.%c
+>5     byte            x       \b%c
+>8     string          >\0     \b, title: %s
+
+# KSS music file
+0      string          KSCC    KSS music file v1.03
+>0xF   byte&0x02       0       \b, soundchips: AY-3-8910, SCC(+)
+>0xF   byte&0x02       2       \b, soundchip(s): SN76489
+>>0xF  byte&0x04       4       stereo
+>0xF   byte&0x01       1       \b, YM2413
+>0xF   byte&0x08       8       \b, Y8950
+
+0      string          KSSX    KSS music file v1.20
+>0xF   byte&0x40       0x00    \b, 60Hz
+>0xF   byte&0x40       0x40    \b, 50Hz
+>0xF   byte&0x02       0       \b, soundchips: AY-3-8910, SCC(+)
+>0xF   byte&0x02       0x02    \b, soundchips: SN76489
+>>0xF  byte&0x04       0x04    stereo
+>0xF   byte&0x01       0x01    \b, 
+>>0xF  byte&0x18       0x00    \bYM2413
+>>0xF  byte&0x18       0x08    \bYM2413, Y8950
+>>0xF  byte&0x18       0x18    \bYM2413+Y8950 pseudostereo
+>0xF   byte&0x18       0x10    \b, Majyutsushi DAC
+
+# Moonblaster for Moonsound
+0      string          MBMS    MSX Moonblaster for MoonSound music
+
+# Music Player K-kaz
+0      string          MPK     MSX Music Player K-kaz song
+>3     byte            x       v%c
+>4     byte            x       \b.%c
+>5     byte            x       \b%c
+
+# I don't know why these don't work
+#0     search/0xFFFF   \r\n.FM9
+#>0    search/0xFFFF   \r\n#FORMAT     MSX Music Player K-kaz source MML file
+#0     search/0xFFFF   \r\nFM1\ \=
+#>0    search/0xFFFF   \r\nPSG1\=
+#>>0   search/0xFFFF   \r\nSCC1\=              MSX MuSiCa MML source file
+
+
+# OPX Music file
+0x7B   beshort         0x0d0a
+>0x7D  byte            0x1a            MSX OPX Music file
+>>0x86 byte            0               v1.5
+>>0x86 byte            1               v2.4
+>>0    string          >\32            \b, title: %s
+
+# SCMD music file
+0x8B   string          SCMD            MSX SCMD Music file
+>0x8F  string          >\0             \b, title: %s
+
+0      search/0xFFFF   \r\n@title
+>&0    search/0xFFFF   \r\n@m=[        MSX SCMD source MML file
+
+
+############## MSX image file formats ##############
+
+# MSX raw VRAM dump
+0      ubyte           0xFE
+>1     uleshort                0
+>>5    uleshort                0
+>>>3   uleshort                0x37FF          MSX SC2/GRP raw image
+>>>3   uleshort                0x6A00          MSX Graph Saurus SR5 raw image
+>>>3   uleshort                >0x769E
+>>>>3  uleshort                <0x8000         MSX GE5/GE6 raw image
+>>>>>3 uleshort                0x7FFF          \b, with sprite patterns
+>>>3   uleshort                0xD3FF          MSX screen 7-12 raw image
+>>>3   uleshort                0xD400          MSX Graph Saurus SR7/SR8/SRS raw image
+
+# Graph Saurus compressed images
+0      ubyte           0xFD
+>1     uleshort                0
+>>5    uleshort                0
+>>>3   uleshort                >0x013D         MSX Graph Saurus compressed image
+
+# Maki-chan Graphic format
+0      string          MAKI02\ \       Maki-chan image,
+>8     byte            x               system ID: %c
+>9     byte            x               \b%c
+>10    byte            x               \b%c
+>11    byte            x               \b%c,
+>13    search/0x200    \x1A
+# >>&3 ubyte           0               , video mode: PC-98 400 lines, 16 analog colors
+# >>&3 ubyte           1               , video mode: MSX SC7, 16 analog colors
+# >>&3 ubyte           2               , video mode: VM-98 400 lines, 8 analog colors
+# >>&3 ubyte           3               , video mode: PC-88 analog, 200 lines, 8 analog colors
+# >>&3 ubyte           4               , video mode: 400 lines, 16 digital colors
+# >>&3 ubyte           5               , video mode: 200 lines, 16 digital colors
+# >>&3 ubyte           6               , video mode: old PC-98 digital 400 lines, 8 colors
+# >>&3 ubyte           7               , video mode: PC-88 400 lines, 8 digital colors
+>>&8   uleshort+1      x               %dx
+>>&10  uleshort+1      x               \b%d,
+>>&3   ubyte&0x82      0x80            256 colors
+>>&3   ubyte&0x82      0x00            16 colors
+>>&3   ubyte&0x82      0x01            8 colors
+>>&3   ubyte&0x04      4               digital
+>>&3   ubyte&0x04      0               analog
+>>&3   ubyte&0x01      1               \b, 2:1 dot aspect ratio
+
+
+# Japanese PIC file
+0      string          PIC\x1A         Japanese PIC image file
+
+# MSX G9B image file
+0      string          G9B
+>3     uleshort        >10
+>>5    ubyte           >0              MSX G9B image, depth=%d
+>>>8   uleshort        x               \b, %dx
+>>>10  uleshort        x               \b%d
+>>>5   ubyte           <9
+>>>>6  ubyte           0
+>>>>>7 ubyte           x               \b, codec=%d RGB color palettes
+>>>>6  ubyte           64              \b, codec=RGB fixed color
+>>>>6  ubyte           128             \b, codec=YJK
+>>>>6  ubyte           192             \b, codec=YUV
+>>>5   ubyte           >8              codec=RGB fixed color
+>>>12  ubyte           0               \b, raw
+>>>12  ubyte           1               \b, bitbuster compression
+
+
+
+############## Other MSX file formats ##############
+
+# MSX ROMs
+0      string          AB
+>2     uleshort        0x0010                  MSX ROM
+>>2    uleshort        x                       \b, init=0x%4x
+>>4    uleshort        >0                      \b, stat=0x%4x
+>>6    uleshort        >0                      \b, dev=0x%4x
+>>8    uleshort        >0                      \b, bas=0x%4x
+>2     uleshort        0x4010                  MSX ROM
+>>2    uleshort        x                       \b, init=0x%04x
+>>4    uleshort        >0                      \b, stat=0x%04x
+>>6    uleshort        >0                      \b, dev=0x%04x
+>>8    uleshort        >0                      \b, bas=0x%04x
+>2     uleshort        0x8010                  MSX ROM
+>>2    uleshort        x                       \b, init=0x%04x
+>>4    uleshort        >0                      \b, stat=0x%04x
+>>6    uleshort        >0                      \b, dev=0x%04x
+>>8    uleshort        >0                      \b, bas=0x%04x
+
+0      string          AB
+#>2    string          5JSuperLAYDOCK          MSX Super Laydock ROM
+#>3    string          @HYDLIDE3MSX            MSX Hydlide-3 ROM
+#>3    string          @3\x80IA862             Golvellius MSX1 ROM
+>2     uleshort        >10
+>>10   string          \0\0\0\0\0\0            MSX ROM
+>>>0x10        string          YZ\0\0\0\0              Konami Game Master 2 MSX ROM
+>>>0x10        string          CD                      \b, Konami RC-
+>>>>0x12       ubyte           x                       \b%d
+>>>>0x13       ubyte/16        x                       \b%d
+>>>>0x13       ubyte&0xF       x                       \b%d
+>>>0x10        string          EF                      \b, Konami RC-
+>>>>0x12       ubyte           x                       \b%d
+>>>>0x13       ubyte/16        x                       \b%d
+>>>>0x13       ubyte&0xF       x                       \b%d
+>>>2   uleshort        x                       \b, init=0x%04x
+>>>4   uleshort        >0                      \b, stat=0x%04x
+>>>6   uleshort        >0                      \b, dev=0x%04x
+>>>8   uleshort        >0                      \b, bas=0x%04x
+>2     uleshort        0
+>>4    uleshort        0
+>>>6   uleshort        0
+>>>>8  uleshort        >0                      MSX BASIC program in ROM, bas=0x%04x
+
+0x4000 string          AB
+>0x4002        uleshort        >0x4010
+>>0x400A       string          \0\0\0\0\0\0    MSX MegaROM with nonstandard page order
+>>0x4002       uleshort        x                       \b, init=0x%04x
+>>0x4004       uleshort        >0                      \b, stat=0x%04x
+>>0x4006       uleshort        >0                      \b, dev=0x%04x
+>>0x4008       uleshort        >0                      \b, bas=0x%04x
+
+0x8000 string          AB
+>0x8002        uleshort        >0x4010
+>>0x800A       string          \0\0\0\0\0\0    MSX MegaROM with nonstandard page order
+>>0x8002       uleshort        x                       \b, init=0x%04x
+>>0x8004       uleshort        >0                      \b, stat=0x%04x
+>>0x8006       uleshort        >0                      \b, dev=0x%04x
+>>0x8008       uleshort        >0                      \b, bas=0x%04x
+
+
+0x3C000        string          AB
+>0x3C008       string          \0\0\0\0\0\0\0\0        MSX MegaROM with nonstandard page order
+>>0x3C002      uleshort        x                       \b, init=0x%04x
+>>0x3C004      uleshort        >0                      \b, stat=0x%04x
+>>0x3C006      uleshort        >0                      \b, dev=0x%04x
+>>0x3C008      uleshort        >0                      \b, bas=0x%04x
+
+# MSX BIN file
+#0     byte            0xFE
+#>1    uleshort        >0x8000
+#>>3   uleshort        >0x8004
+#>>>5  uleshort        >0x8000                 MSX BIN file
+
+# MSX-BASIC file
+0      byte            0xFF
+>3     uleshort        0x000A
+>>1    uleshort        >0x8000                 MSX-BASIC program
+
+# Mega-Assembler file
+0      byte            0xFE
+>1     uleshort        0x0001
+>>5    uleshort        0xffff
+>>>6   byte            0x0A            MSX Mega-Assembler source
+
+# Execrom Patchfile
+0      string          ExecROM\ patchfile\x1A  MSX ExecROM patchfile
+>0x12  ubyte/16        x               v%d
+>0x12  ubyte&0xF       x               \b.%d
+>0x13  ubyte           x               \b, contains %d patches
+
+
diff --git a/magic/Magdir/symbos b/magic/Magdir/symbos
new file mode 100644 (file)
index 0000000..c6a4480
--- /dev/null
@@ -0,0 +1,42 @@
+
+#------------------------------------------------------------------------------
+# msx:  file(1) magic for the SymbOS operating system
+# http://www.symbos.de
+# Fábio R. Schmidlin <frs@pop.com.br>
+
+# SymbOS EXE file
+0x30   string          SymExe          SymbOS executable
+>0x36  ubyte           x               v%c
+>0x37  ubyte           x               \b.%c
+>0xF   string          x               \b, name: %s
+
+# SymbOS DOX document
+0      string          INFOq\0         SymbOS DOX document
+
+# Symbos driver
+0      string          SMD1            SymbOS driver
+>19    byte            x               \b, name: %c
+>20    byte            x               \b%c
+>21    byte            x               \b%c
+>22    byte            x               \b%c
+>23    byte            x               \b%c
+>24    byte            x               \b%c
+>25    byte            x               \b%c
+>26    byte            x               \b%c
+>27    byte            x               \b%c
+>28    byte            x               \b%c
+>29    byte            x               \b%c
+>30    byte            x               \b%c
+>31    byte            x               \b%c
+
+# Symbos video
+0      string          SymVid          SymbOS video
+>6     ubyte           x               v%c
+>7     ubyte           x               \b.%c
+
+# Soundtrakker 128 ST2 music
+0      byte            0
+>0xC   string          \x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x40\x00        Soundtrakker 128 ST2 music,
+>>1    string          x               name: %s
+
+
index c055576758c8b67ce573edaff6e6fd09e51d879d..e708da3ed57a6907ec4bebe495b2dd99b6125490 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $File: Makefile.am,v 1.90 2013/04/02 16:25:04 christos Exp $
+# $File: Makefile.am,v 1.91 2013/08/14 09:01:45 christos Exp $
 #
 MAGIC_FRAGMENT_BASE = Magdir
 MAGIC_DIR = $(top_srcdir)/magic
@@ -150,6 +150,7 @@ $(MAGIC_FRAGMENT_DIR)/motorola \
 $(MAGIC_FRAGMENT_DIR)/mozilla \
 $(MAGIC_FRAGMENT_DIR)/msdos \
 $(MAGIC_FRAGMENT_DIR)/msooxml \
+$(MAGIC_FRAGMENT_DIR)/msx \
 $(MAGIC_FRAGMENT_DIR)/msvc \
 $(MAGIC_FRAGMENT_DIR)/mup \
 $(MAGIC_FRAGMENT_DIR)/music \
@@ -217,6 +218,7 @@ $(MAGIC_FRAGMENT_DIR)/sql \
 $(MAGIC_FRAGMENT_DIR)/ssh \
 $(MAGIC_FRAGMENT_DIR)/ssl \
 $(MAGIC_FRAGMENT_DIR)/sun \
+$(MAGIC_FRAGMENT_DIR)/symbos \
 $(MAGIC_FRAGMENT_DIR)/sysex \
 $(MAGIC_FRAGMENT_DIR)/tcl \
 $(MAGIC_FRAGMENT_DIR)/teapot \