1282e23f0SXin LI#------------------------------------------------------------------------------ 2282e23f0SXin LI# pc98: file(1) magic for the MSX Home Computer 3282e23f0SXin LI# v1.0 4282e23f0SXin LI# Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net> 5282e23f0SXin LI 6282e23f0SXin LI# Maki-chan v1 Graphic format 7282e23f0SXin LI# 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 8282e23f0SXin LI# http://www.jisyo.com/viewer/faq/maki_tech.htm 9282e23f0SXin LI0 string/b MAKI01 Maki-chan v1. 10282e23f0SXin LI>6 ubyte|0x20 x \b%c image 11282e23f0SXin LI>8 ubelong >0x40404040 \b, system ID: 12282e23f0SXin LI>>8 byte x %c 13282e23f0SXin LI>>9 byte x \b%c 14282e23f0SXin LI>>10 byte x \b%c 15282e23f0SXin LI>>11 byte x \b%c 16282e23f0SXin LI>44 ubeshort x \b, %dx 17282e23f0SXin LI>46 ubeshort x \b%d 18282e23f0SXin LI>38 ubeshort&2 0 \b, 16 paletted RGB colors 19282e23f0SXin LI>38 ubeshort&2 2 \b, 8 fixed RGB colors 20282e23f0SXin LI>38 ubeshort&1 1 \b, 2:1 dot aspect ratio 21282e23f0SXin LI 22282e23f0SXin LI# Maki-chan v2 Graphic format 23282e23f0SXin LI# http://www.jisyo.com/viewer/faq/mag_tech.htm 24*48c779cdSXin LI# https://mooncore.eu/bunny/txt/makichan.htm 25282e23f0SXin LI# http://metanest.jp/mag/mag.xhtml 26282e23f0SXin LI0 string/b MAKI02\ \ Maki-chan v2 image, 27282e23f0SXin LI>8 byte x system ID: %c 28282e23f0SXin LI>9 byte x \b%c 29282e23f0SXin LI>10 byte x \b%c 30282e23f0SXin LI>11 byte x \b%c, 31282e23f0SXin LI>13 search/0x200 \x1A 32282e23f0SXin LI#Maki-chan video modes are a bit messy and seems to have been expanded over the years without too much planing: 33282e23f0SXin LI#1) When offset1(ubeshort) !=0x0344: 34282e23f0SXin LI# 1.1) And offset3(ubyte).b7=0: 35282e23f0SXin LI# - b0=pixel aspect ratio: 1=2:1 (note: this ignores that the machine's 1:1 pixel aspect ratio isn't really 1:1) 36282e23f0SXin LI# - b1=number of colors: 0=16 colors, 1=8 colors 37282e23f0SXin LI# - b2=Palette or fixed colors flag (called "analog" and "digital" in the doc): 0=Paletted, 1=Fixed colors encoded directly in the pixel data 38282e23f0SXin LI# 1.2) And offset3(ubyte).B7=1: 39282e23f0SXin LI# - b0=256 paletted colors 40282e23f0SXin LI# - b1=256 fixed colors using the MSX SCR8 palette 41282e23f0SXin LI#2) When offset1(ubeshort) =0x0344: 42282e23f0SXin LI# - 256x212 image with 19268 YJK colors. The usual resolution and color information fields from the file must be ignored 43282e23f0SXin LI>>&1 ubeshort 0x0344 256x212, 19268 fixed YJK colors 44282e23f0SXin LI>>&1 ubeshort !0x0344 45282e23f0SXin LI>>>&5 uleshort+1 x %dx 46282e23f0SXin LI>>>&7 uleshort+1 x \b%d, 47282e23f0SXin LI>>>&0 ubyte&0x86 0x00 16 paletted RGB colors 48282e23f0SXin LI>>>&0 ubyte&0x86 0x02 8 paletted RGB colors 49282e23f0SXin LI>>>&0 ubyte&0x86 0x04 16 fixed RGB colors 50282e23f0SXin LI>>>&0 ubyte&0x86 0x06 8 fixed RGB colors 51282e23f0SXin LI>>>&0 ubyte&0x81 0x80 256 paletted RGB colors 52282e23f0SXin LI>>>&0 ubyte&0x81 0x81 256 fixed MSX-SCR8 colors 53282e23f0SXin LI>>>&0 ubyte&0x01 1 \b, 2:1 dot aspect ratio 54282e23f0SXin LI 55282e23f0SXin LI# XLD4 (Q4) picture 56282e23f0SXin LI11 string/b MAJYO XLD4(Q4) picture 57282e23f0SXin LI 58282e23f0SXin LI# Yanagisawa Pi picture 59282e23f0SXin LI#0 string Pi\x1A\0 Yanagisawa Pi picture 60282e23f0SXin LI#>3 search/0x200 \x04 61282e23f0SXin LI0 string Pi 62282e23f0SXin LI>2 search/0x200 \x1A 63282e23f0SXin LI>>&0 ubyte 0 64282e23f0SXin LI>>>&3 ubyte 4 Yanagisawa Pi 16 color picture, 65282e23f0SXin LI>>>&4 byte x system ID: %c 66282e23f0SXin LI>>>&5 byte x \b%c 67282e23f0SXin LI>>>&6 byte x \b%c 68282e23f0SXin LI>>>&7 byte x \b%c, 69282e23f0SXin LI>>>&10 ubeshort x %dx 70282e23f0SXin LI>>>&12 ubeshort x \b%d 71282e23f0SXin LI>>>&3 ubyte 8 Yanagisawa Pi 256 color picture 72282e23f0SXin LI>>>&4 byte x system ID: %c 73282e23f0SXin LI>>>&5 byte x \b%c 74282e23f0SXin LI>>>&6 byte x \b%c 75282e23f0SXin LI>>>&7 byte x \b%c, 76282e23f0SXin LI>>>&10 ubeshort x %dx 77282e23f0SXin LI>>>&12 ubeshort x \b%d 78