"Fossies" - the Fresh Open Source Software Archive

Member "file-5.35/magic/Magdir/pc98" (17 Mar 2017, 2789 Bytes) of package /linux/misc/file-5.35.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #------------------------------------------------------------------------------
    2 # pc98:  file(1) magic for the MSX Home Computer
    3 # v1.0
    4 # Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net>
    5 
    6 # Maki-chan v1 Graphic format
    7 # The image resolution should be X=(44.L - 40.L) and Y=(46.L - 42.L), but I couldn't find a way to do so
    8 # http://www.jisyo.com/viewer/faq/maki_tech.htm
    9 0	string/b		MAKI01 	Maki-chan v1.
   10 >6	ubyte|0x20	x		\b%c image
   11 >8	ubelong		>0x40404040	\b, system ID:
   12 >>8	byte		x		%c
   13 >>9	byte		x		\b%c
   14 >>10	byte		x		\b%c
   15 >>11	byte		x		\b%c
   16 >44	ubeshort	x		\b, %dx
   17 >46	ubeshort	x		\b%d
   18 >38	ubeshort&2	0		\b, 16 paletted RGB colors
   19 >38	ubeshort&2	2		\b, 8 fixed RGB colors
   20 >38	ubeshort&1	1		\b, 2:1 dot aspect ratio
   21 
   22 # Maki-chan v2 Graphic format
   23 # http://www.jisyo.com/viewer/faq/mag_tech.htm
   24 # http://mooncore.eu/bunny/txt/makichan.htm
   25 # http://metanest.jp/mag/mag.xhtml
   26 0	string/b		MAKI02\ \ 	Maki-chan v2 image,
   27 >8	byte		x		system ID: %c
   28 >9	byte		x		\b%c
   29 >10	byte		x		\b%c
   30 >11	byte		x		\b%c,
   31 >13	search/0x200	\x1A
   32 #Maki-chan video modes are a bit messy and seems to have been expanded over the years without too much planing:
   33 #1) When offset1(ubeshort) !=0x0344:
   34 # 1.1) And  offset3(ubyte).b7=0:
   35 # - b0=pixel aspect ratio: 1=2:1   (note: this ignores that the machine's 1:1 pixel aspect ratio isn't really 1:1)
   36 # - b1=number of colors: 0=16 colors, 1=8 colors
   37 # - b2=Palette or fixed colors flag (called "analog" and "digital" in the doc): 0=Paletted, 1=Fixed colors encoded directly in the pixel data
   38 # 1.2) And  offset3(ubyte).B7=1:
   39 # - b0=256 paletted colors
   40 # - b1=256 fixed colors using the MSX SCR8 palette
   41 #2) When offset1(ubeshort) =0x0344:
   42 # - 256x212 image with 19268 YJK colors. The usual resolution and color information fields from the file must be ignored
   43 >>&1	ubeshort	0x0344		256x212, 19268 fixed YJK colors
   44 >>&1	ubeshort	!0x0344
   45 >>>&5	uleshort+1	x		%dx
   46 >>>&7	uleshort+1	x		\b%d,
   47 >>>&0	ubyte&0x86	0x00		16 paletted RGB colors
   48 >>>&0	ubyte&0x86	0x02		8 paletted RGB colors
   49 >>>&0	ubyte&0x86	0x04		16 fixed RGB colors
   50 >>>&0	ubyte&0x86	0x06		8 fixed RGB colors
   51 >>>&0	ubyte&0x81	0x80		256 paletted RGB colors
   52 >>>&0	ubyte&0x81	0x81		256 fixed MSX-SCR8 colors
   53 >>>&0	ubyte&0x01	1		\b, 2:1 dot aspect ratio
   54 
   55 # XLD4 (Q4) picture
   56 11	string/b	MAJYO		XLD4(Q4) picture
   57 
   58 # Yanagisawa Pi picture
   59 #0	string		Pi\x1A\0	Yanagisawa Pi picture
   60 #>3	search/0x200	\x04
   61 0	string		Pi
   62 >2	search/0x200	\x1A
   63 >>&0	ubyte		0
   64 >>>&3	ubyte		4		Yanagisawa Pi 16 color picture,
   65 >>>&4	byte		x		system ID: %c
   66 >>>&5	byte		x		\b%c
   67 >>>&6	byte		x		\b%c
   68 >>>&7	byte		x		\b%c,
   69 >>>&10	ubeshort	x		%dx
   70 >>>&12	ubeshort	x		\b%d
   71 >>>&3	ubyte		8		Yanagisawa Pi 256 color picture
   72 >>>&4	byte		x		system ID: %c
   73 >>>&5	byte		x		\b%c
   74 >>>&6	byte		x		\b%c
   75 >>>&7	byte		x		\b%c,
   76 >>>&10	ubeshort	x		%dx
   77 >>>&12	ubeshort	x		\b%d