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 >
Text File  |  1993-11-18  |  5KB  |  115 lines

  1.                       PCX2SOPT (PCX To Super OPTimised)
  2.                       _________________________________
  3.  
  4. PCX2SOPT lets you convert 16 colour .PCX files into fully optimised
  5. SNES format data. Sorry if a lot of what follows is obvious, but it's
  6. probably better to have too much info than not enough.
  7.  
  8. First off you'll need a 16 colour .PCX file. The program will generate
  9. a 32x32 character SNES screen, ie. 256x256 pixels. Don't worry if your 
  10. .PCX is a different size to this; if it's too small the missing pixels 
  11. will be blanked, if it's too big the extra pixels will be ignored.
  12.  
  13. Once you have your .PCX file you'll need to run up PCX2SOPT, simply 
  14. type...
  15.  
  16.     PCX2SOPT<enter>
  17.  
  18. You'll then be prompted to enter the name of your .PCX file.
  19.  
  20.     PCX Filename >MYPIC.PCX<enter>
  21.  
  22. Note that if you don't specify a filename extension, .PCX will be 
  23. assumed. Then there'll be a short delay (it's short on a 33Mhz 486
  24. anyway - I don't know what it'll be like on slower machines) while 
  25. PCX2SOPT converts the picture into tile data and then optimises these 
  26. tiles. During optimisation any duplicate tiles and tiles which are 
  27. the same as h/v flipped versions of other tiles will be removed. Once 
  28. this is done, you'll be told how many tiles have been optimised out 
  29. and how many different tiles there are in the picture.
  30.  
  31.     <n> tiles have been optimised
  32.     <m> tiles in picture
  33.  
  34. Next you'll be prompted to enter the filename into which the screen
  35. map data will be stored. As a 32x32 screen is generated, this file
  36. will be 2048 bytes long (as each character requires 2 bytes). In your
  37. SNES program you can copy this data straight into VRAM.
  38.  
  39.     MAP filename >MYPIC.MAP<enter>
  40.  
  41. Again, if you don't specify a filename extension, .MAP will be 
  42. assumed. Also, if you simply enter ".<enter>" then the .PCX filename
  43. will be used with the .MAP extension. Once you've entered the filename,
  44. you'll be prompted to enter the palette number which all the characters
  45. in the screen map data will use.
  46.  
  47.     Palette (1..8) >1<enter>
  48.  
  49. In 16 colours-per-character mode on the SNES, each character can use
  50. any one of 8 colour palettes. You'll obviously need to set the colours
  51. in the appropriate colour palette (ie. if you specify palette 1 in
  52. PCX2SOPT you'll need to set the colours in palette 1, if you specify
  53. palette 2 you'll need to set the colours in palette 2 etc...).
  54.  
  55. Once the .MAP file has been saved you'll be prompted to enter the 
  56. filename into which the colour data will be stored. As there are
  57. 16 colours, this file will be 32 bytes long (as each colour requires
  58. 2 bytes). The colour data is saved in the RGB format required by the
  59. SNES hence you can copy the data straight to CGRAM.
  60.  
  61.     COL filename >.<enter>
  62.  
  63. Again, if you don't specify a filename extension, .COL will be 
  64. assumed. Also, if you simply enter ".<enter>" then the .PCX filename
  65. will be used with the .COL extension (as shown in the example above -
  66. this actually generates the file MYPIC.COL).
  67.  
  68. Finally (there's nothing to it really - it's just my explanation that
  69. makes it seem so long-winded) you'll be prompted to enter the filename
  70. into which the tile data will be stored.
  71.  
  72.     SET filename >MYPIC<enter>
  73.  
  74. Again, if you don't specify a filename extension, .SET will be assumed
  75. (as shown in the example above - this actually generates the file 
  76. MYPIC.SET). Also, if you simply enter ".<enter>" then the .PCX filename 
  77. will be used with the .SET extension. The size of this file will depend on 
  78. the number of tiles in the picture (32 bytes per tile). In your SNES program 
  79. you can copy this data straight into VRAM.
  80.  
  81. That's all there is to it really. There are some command line options
  82. which disable generation of any of the files...
  83.  
  84.     -s ... doesn't generate screen .MAP data
  85.  
  86.     -c ... doesn't generate colour palette .COL data
  87.  
  88.     -t ... doesn't generate tile .SET data
  89.  
  90. Eg. 
  91.     PCX2SOPT -s -t<enter> ... will generate a .COL file only.
  92.  
  93. You should also find the following files included which demonstrate
  94. how to use the data generated from PCX2SOPT.
  95.  
  96.     MYPIC.PCX a 16 colour picture
  97.     MYPIC.MAP }
  98.     MYPIC.COL } generated by PCX2SOPT
  99.     MYPIC.SET }
  100.     TEST.SRC  example source code
  101.     TEST.SMC  executable
  102.  
  103. TEST.SRC is some source code which simply displays the picture. I use
  104. my own assembler on the PC (which hasn't been made available) so it 
  105. may require some slight syntax changes to get it to assemble under 
  106. other assemblers.
  107.  
  108. Well, that's about it then. I've also written tools which do the same 
  109. thing with 16 and 256 colour .GIF files, so let me know if you're 
  110. interested.
  111.  
  112. Have fun.
  113.  
  114. Paul.
  115.