======================================================================= SINGLE SPRITE DISPLAY PROGRAM ======================================================================= This document has been prepared to accompany the 'Single Sprite Display Program'. Its aim is to provide information on how to use your own sprite with the program supplied in the file sprite.zip. The author realises that this document will probably not be of much use to many Yaroze users, but there may be somebody out there who needs it. ========================== DISPLAYING YOUR OWN SPRITE ========================== The following 13 steps will take you through the process of creating, and then displaying, your own sprite onto the PlayStation screen. 1) The first thing to do is to create the image you want to use as a sprite. To do this, open up your prefered PC paint package (like Microsoft Paint, or PaintShop Pro), and either draw a new image or open up a picture you have already drawn. 2) Please note that the maximum size of a single PlaySatation sprite is 320*240 pixels, that is 320 pixels horizontally by 240 pixels vertically. When you consider that most PC's use a screen resolution of 800*600 pixels, you can see that the image you are creating cannot be very big. When you see your sprite running through the PlayStation you will be surprised at the size difference between the PC monitor and TV screen version. So Remember, keep your work of art on the small side. Step number 6 tells you how to check the size of your picture. 3) Once your masterpiece has been created, you must save the image as one of the following file types: - BMP file (*.bmp) - TIM file (*.tim) - PICT file (*.pic or *.pct) - RGB file (*.raw or *.rgb) - RSD file (*.rsd) 4) Now open the program called TIM Utility. It is part of the software Sony provided you with on the PC CD. If you cannot find it, you can download the latest version from the SCEE Yaroze web site (www.netyaroze-europe.com) in the tools/2D section, if my memory serves me correctly. 5) Once you have located and opened this program, click on the 'File' tab, and select 'Open'. Locate your image using the box that appears on screen and once found double-click on it. You will be presented with a veritable screen full of options. 6) The first thing to do when you have reached this screen is to check that your sprite is an appropriate size. As mentioned above, the maximum size a single PlayStation sprite can be is 320*240 pixels, that's 320 in width, 240 in height. On the option screen now presented to you in the TIM Utility program, the second section along from the left, entitled 'size', provides the size of your image file. Make sure that the width and height figures are lower, or equal to, the maximum size vales previously mentioned. If either of the values for your image is larger than those above, you will have to head back into your paint package and shrink the image in the required direction. You will have to repeat the above steps until your sprite is small enough. Have a read of the document entitled 'Displaying a Sprite' if you are unsure as to the reasons behind this. It is available from the web site address given at the bottom of this page. 7) Once you have achieved the right size you should set the desired quality of your image. This is done via the set of options located to the right of the 'size' section, called 'bit depth'. The available options are 4, 8, 16, or 24, with the higher value being the better quality. However, try to avoid choosing 24, as this takes up far too much PlayStation memory and the author of this document does not believe the code provided can handle it. By all means feel free to give it a try, but if it doesn't work, you know what is wrong. 16 is the best option to select. Click on the 'Preview' button to have a look at your image with any of these colour options. 8) Once this is done, look below the 'size' option box and you will see a box entitled 'image org'. This is used to specify the position where your image will be stored in the PlayStation's graphics memory. For the purpose of this tutorial enter the value '320' next to the X, and leave '0' next to the Y. For more information on this see the 'Displaying a Sprite' technical document available from the web address below. 9) Now, whether or not this step needs to be done depends on the value you selected in step 7. If you selected 16 or 24, you can move on to step 10. If not, then read on. Below the box where you have just entered the value '320', you should see a box titled 'Palette org', which is used to specify the position in the PlayStation's graphics memory where the Colour Look Up Table (CLUT) for you image is stored. For the purpose of this tutorial, enter the value '320' next to the X and '240' next to the Y. However, please note that this does not always have to be done. Again, if you would like to know more about this, please consult the 'Displaying a Sprite' tutorial available from the web address at the bottom of this page. 10) Once all of the above has been done, click on the 'Convert' button located towards the right of the screen. You will be asked where you want to save the converted file on your hard disk. Select the directory where the code is located that came in this zip file, and give your sprite a name with less than eight characters and the .tim extension, for example 'graphic.tim'. You can then save your converted sprite. Images must be saved with the '.tim' extension because this is the only type of 2D graphic that the PlayStation can read and subsequently use. 11) When this has been done you can close the TIM Utility program, as your sprite has now been created. 12) All that is left to do now is to alter the batch file that will load your sprite, and the program, into the PlayStation. To do this, locate the directory where the contents of this zip file are located, which is also where you just saved your sprite. Now, find the file named 'batch.bat'. Once you have found it, open a text editor and then open this file. You should see three lines of text, but it is only the first line that you are interested in. Where you see the text 'anna.tim', delete this and replace it with the name of your sprite, eg. 'graphic.tim'. Once you have done this save the file, keeping the same name. 13) Now all you have to do is to run the program using this batch file to load it into the PlayStation. Consult the file 'Readme.txt' that came with this zip file for details on how to do this. Once you have loaded the program, you will see the glorious sight of your sprite displayed onto the PlayStation screen. What a joy to behold. I hope this short document has proved to be of some use to you. My reason for writing it is simply because I know how much trouble I went through in order to learn how to display a single sprite. Many times did I get it wrong before finally getting it right. I just wish I could have had a document like this when I was starting out. If this was of no help to you at all, I am sorry. =============== CONTACT DETAILS =============== If you have any comments, problems, or suggestions regarding the program or this text document, please feel free to e-mail me at the following address: stevenlewis@birminghamhome.freeserve.co.uk ======================================================================= Downloaded From: STEVE'S YAROZE SITE http://www.netyaroze-europe.com/~slewis/ =======================================================================