home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Der Mediaplex Sampler - Die 6 von Plex
/
6_v_plex.zip
/
6_v_plex
/
DISK3
/
DFUE_100
/
FAMISRC.ZIP
/
GIF2SOPT.ZIP
/
GIF2SOPT.DOC
next >
Wrap
Text File
|
1993-11-24
|
5KB
|
112 lines
GIF2SOPT (GIF To Super OPTimised)
_________________________________
GIF2SOPT lets you convert 16 or 256 colour .GIF files into fully optimised
SNES format data (either 16 colours-per-char or 256 colours-per-char
data depending upon how many colours in the source image).
First off you'll need a 16 or 256 colour .GIF file. The program will
generate a 32x32 character SNES screen, ie. 256x256 pixels. Don't worry
if your .GIF is a different size to this; if it's too small the missing
pixels will be blanked, if it's too big the extra pixels will be ignored.
Once you have your .GIF file you'll need to run up GIF2SOPT, simply
type...
GIF2SOPT<enter>
You'll then be prompted to enter the name of your .GIF file.
GIF Filename >MYPIC.GIF<enter>
Note that if you don't specify a filename extension, .GIF will be
assumed. Then there'll be a short delay (it's short on a 33Mhz 486
anyway - I don't know what it'll be like on slower machines) while
GIF2SOPT converts the picture into tile data and then optimises these
tiles. During optimisation any duplicate tiles and tiles which are
the same as h/v flipped versions of other tiles will be removed. Once
this is done, you'll be told how many tiles have been optimised out
and how many different tiles there are in the picture.
<n> tiles have been optimised
<m> tiles in picture
Next you'll be prompted to enter the filename into which the screen
map data will be stored. As a 32x32 screen is generated, this file
will be 2048 bytes long (as each character requires 2 bytes). In your
SNES program you can copy this data straight into VRAM.
MAP filename >MYPIC.MAP<enter>
Again, if you don't specify a filename extension, .MAP will be
assumed. Also, if you simply enter ".<enter>" then the .GIF filename
will be used with the .MAP extension. Once you've entered the filename,
if the picture's a 16 colour image you'll be prompted to enter the
palette number which all the characters in the screen map data will use.
Palette (1..8) >1<enter>
In 16 colours-per-character mode on the SNES, each character can use
any one of 8 colour palettes. You'll obviously need to set the colours
in the appropriate colour palette (ie. if you specify palette 1 in
GIF2SOPT you'll need to set the colours in palette 1, if you specify
palette 2 you'll need to set the colours in palette 2 etc...).
Once the .MAP file has been saved you'll be prompted to enter the
filename into which the colour data will be stored. For a 16 colour
images this file will be 32 bytes long, for a 256 colour images this will
be 512 bytes long (as each colour requires 2 bytes). The colour data is
saved in the RGB format required by the SNES hence you can copy the data
straight to CGRAM.
COL filename >.<enter>
Again, if you don't specify a filename extension, .COL will be
assumed. Also, if you simply enter ".<enter>" then the .GIF filename
will be used with the .COL extension (as shown in the example above -
this actually generates the file MYPIC.COL).
Finally you'll be prompted to enter the filename into which the tile
data will be stored.
SET filename >MYPIC<enter>
Again, if you don't specify a filename extension, .SET will be assumed
(as shown in the example above - this actually generates the file
MYPIC.SET). Also, if you simply enter ".<enter>" then the .GIF filename
will be used with the .SET extension. The size of this file will depend on
the number of tiles in the picture (32 bytes per tile for 16 colour images,
64 bytes per tile for 256 colour images). In your SNES program you can copy
this data straight into VRAM.
That's all there is to it really. There are some command line options
which disable generation of any of the files...
-s ... doesn't generate screen .MAP data
-c ... doesn't generate colour palette .COL data
-t ... doesn't generate tile .SET data
Eg.
GIF2SOPT -s -t<enter> ... will generate a .COL file only.
You should also find the following files included which demonstrate
how to use the data generated from GIF2SOPT.
MYPIC.GIF a 256 colour picture
MYPIC.MAP }
MYPIC.COL } generated by GIF2SOPT
MYPIC.SET }
TEST.SRC example source code
TEST.SMC executable
TEST.SRC is some source code which simply displays the picture. I use
my own assembler on the PC (which hasn't been made available) so it
may require some slight syntax changes to get it to assemble under
other assemblers.
That's all folks.
Paul.