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
/
PCX2SOPT.ZIP
/
PCX2SOPT.DOC
< prev
next >
Wrap
Text File
|
1993-11-18
|
5KB
|
115 lines
PCX2SOPT (PCX To Super OPTimised)
_________________________________
PCX2SOPT lets you convert 16 colour .PCX files into fully optimised
SNES format data. Sorry if a lot of what follows is obvious, but it's
probably better to have too much info than not enough.
First off you'll need a 16 colour .PCX file. The program will generate
a 32x32 character SNES screen, ie. 256x256 pixels. Don't worry if your
.PCX 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 .PCX file you'll need to run up PCX2SOPT, simply
type...
PCX2SOPT<enter>
You'll then be prompted to enter the name of your .PCX file.
PCX Filename >MYPIC.PCX<enter>
Note that if you don't specify a filename extension, .PCX 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
PCX2SOPT 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 .PCX filename
will be used with the .MAP extension. Once you've entered the filename,
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
PCX2SOPT 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. As there are
16 colours, this file will be 32 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 .PCX filename
will be used with the .COL extension (as shown in the example above -
this actually generates the file MYPIC.COL).
Finally (there's nothing to it really - it's just my explanation that
makes it seem so long-winded) 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 .PCX 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). 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.
PCX2SOPT -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 PCX2SOPT.
MYPIC.PCX a 16 colour picture
MYPIC.MAP }
MYPIC.COL } generated by PCX2SOPT
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.
Well, that's about it then. I've also written tools which do the same
thing with 16 and 256 colour .GIF files, so let me know if you're
interested.
Have fun.
Paul.