I.M.Meen (1995 PC/DOS) ANI format

Get your graphics formats figures out here! Got details for others? Post here!
LuigiBlood
n00b
Posts: 10
Joined: Thu Jan 28, 2010 10:26 pm
Been thanked: 3 times

Re: I.M.Meen (1995 PC/DOS) ANI format

Post by LuigiBlood » Sun Jan 31, 2010 12:11 pm

BMS Script RLE7 extractor only does extract frames.

However, about the pallette data extractor, there's two versions :
Pallette Extractor :

Code: Select all

Set Size 520
FindLoc PALoffset String "PAL data" 0
Math PALoffset += 16
log "Meen.pal" PALoffset Size
Pallette Extractor that does make a compatible pallette for CDiTool/MeenTool :

Code: Select all

Set Size 390
Math Size -= 6
Set Size2 0
FindLoc PALoffset String "PAL data" 0
Math PALoffset += 16
log "Meen-CDi.pal" PALoffset 3
Math Size += 3
append
Do
   Math PALoffset += 4
   log "Meen-CDi.pal" PALoffset 3
   Math Size2 += 3
While Size2 < Size

EDIT :

Optimized RLE7 Extractor :

Code: Select all

Set FrameSize 0
Set FrameOffset 0 # Offset Used for detecting zeroes.
Set FrameOffset2 0 #Offset2
Set FrameNum 0
Set FrameSep 6
Get Size ASIZE 0
Set NAME String "MeenFrame"
Set Zeros 0 #Used for Zeros
Set Bytes 0
Set LONGBs LONG 0
# Set EndRLEBytes LONG 0x9d080000
Set EndRLEBytes LONG 0x0000089d

FindLoc FrameOffset String "PAL data" 0
Math FrameOffset += 536
Set FrameOffset2 FrameOffset
Math EndRLEBytes = 0
Do
	GoTo FrameOffset 0 #Go To Offset
	Get Bytes Byte 0 #Get Byte Data
	Get LONGBs LONG 0 #Get Long Data
	If LONGBs = 0x0000089d then
		Set NAME2 = NAME
		Math FrameNum += 1
		String NAME2 += FrameNum
		String NAME2 += ".rle7"
		Math FrameSize += 5
		log NAME2 FrameOffset2 FrameSize
		Math FrameOffset += 2207
		Math FrameOffset += 6
		Math FrameOffset += 5
		Set FrameOffset2 FrameOffset
		Set FrameSize 0
		Set Bytes 0
		Set LONGBs 0
	Else
		Math FrameOffset += 1
		Math FrameSize += 1
	EndIf
While FrameOffset < Size
RAW Audio Extractor :

Code: Select all

Set FrameSize 0
Set FrameOffset 0 # Offset Used for detecting zeroes.
Set FrameOffset2 0 #Offset2
Set FrameNum 0
Set FrameSep 6
Set AudioSize 2205
Get Size ASIZE 0
Set NAME String "MeenFrame"
Set Zeros 0 #Used for Zeros
Set Bytes 0
Set LONGBs LONG 0
# Set EndRLEBytes LONG 0x9d080000
Set EndRLEBytes LONG 0x0000089d

FindLoc FrameOffset String "PAL data" 0
Math FrameOffset += 536
Set FrameOffset2 FrameOffset
append
Do
	GoTo FrameOffset 0 #Go To Offset
	Get Bytes Byte 0 #Get Byte Data
	Get LONGBs LONG 0 #Get Long Data
	If LONGBs = 0x0000089d then
		Math FrameOffset += 5
		Set FrameOffset2 FrameOffset
		log "MeenAudio.raw" FrameOffset2 AudioSize
		Math FrameOffset += 2205
		Math FrameOffset += 6
		Set FrameOffset2 FrameOffset
		Set FrameSize 0
		Set Bytes 0
		Set LONGBs 0
	Else
		Math FrameOffset += 1
		Math FrameSize += 1
	EndIf
While FrameOffset < Size
I.M. Meen RAW Audio to WAV (Based on RAW2WAV BMS script) :

Code: Select all

set FREQUENCY long 22050
set CHANNELS long 1
set BITS long 8

get SIZE asize
get NAME filename
string NAME += ".wav"

set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"

set RIFFSIZE long SIZE
math RIFFSIZE += 36
set BLOCKALIGN long BITS
set AVGBYTES long FREQUENCY
math BLOCKALIGN /= 8
math BLOCKALIGN *= CHANNELS
math AVGBYTES *= BLOCKALIGN

putvarchr MEMORY_FILE 4 RIFFSIZE long
putvarchr MEMORY_FILE 20 1 short          # wFormatTag: Microsoft PCM Format (0x0001)
putvarchr MEMORY_FILE 22 CHANNELS short   # wChannels
putvarchr MEMORY_FILE 24 FREQUENCY long   # dwSamplesPerSec
putvarchr MEMORY_FILE 28 AVGBYTES long    # dwAvgBytesPerSec
putvarchr MEMORY_FILE 32 BLOCKALIGN short # wBlockAlign
putvarchr MEMORY_FILE 34 BITS short       # wBitsPerSample
putvarchr MEMORY_FILE 40 SIZE long

append
log NAME 0 44 MEMORY_FILE
log NAME 0 SIZE

Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Re: I.M.Meen (1995 PC/DOS) ANI format

Post by Darkfox » Sun Jan 31, 2010 10:40 pm

Well, the one that extracts a palette compatible with CDitool/Meentool seems to output 3byte files rather than extracting a palette.

Also, the audio one works great! Does the RAW extractor take out chunks of audio from an ANI file?

LuigiBlood
n00b
Posts: 10
Joined: Thu Jan 28, 2010 10:26 pm
Been thanked: 3 times

Re: I.M.Meen (1995 PC/DOS) ANI format

Post by LuigiBlood » Mon Feb 01, 2010 7:13 am

Actually, about extracting pallette compatible with CD-iTool/MeenTool's BMS, Append mode has been used, it doesn't output some files, but it adds to the file.

The RAW Audio Extractor BMS extracts audio from ANI files.

Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Re: I.M.Meen (1995 PC/DOS) ANI format

Post by Darkfox » Tue Feb 02, 2010 12:01 am

Hey thanks, now I got it!

Post Reply