Chunky Screen compressor V1.5 For the 48K Sinclair Spectrum Written by Matthew 'MatGubbins' Carrier. November/December 2016 This program can be used 'as is'. It shouldn't screw up files on your computer, please use a backup of that important screen picture before using this program incase the emulator program overwrites or makes a pigs ear of everything (it has been known). Don't coming running to me if something stupid happens either. What does it do? It will convert a nice chunky ROM picture with colour to a stand alone file, either uncompressed or will try and compress both the chunky data and colour data so that the byte size is smaller. Uncompressed: As it is, stored as 768 bytes of chunky followed by 768 bytes of colour data. Compressed ver 1: Compresses the 768 chunky data by half, the 768 bytes of colour data are stored as normal. Compressed ver 2: Compresses the 768 chunky data by half and then tries to compress the colour data. As with all compression, it might become larger than it should - this is usually due to large amounts of changing the colour (changing colours every square). If you can optomize the colour usage within your screen then it can help - it takes a lot of planning to save those bytes. How do I use it? Have a chunky screen$ ready, this can be saved from Melbourne Draw or saved as a SCREEN$ from your BASIC program. Yes, you can use the bottom 2 lines with chunky graphics! - Make sure that the chunky screen is just chunky, don't have any stray pixels or text on the screen as it will cause stray chunky blocks to appear. Load in the Chunky Screen Compressor then have your SCREEN$ .tap file ready (if you are doing all this in an emulator then please learn how to select, load and save .tap files in that emulator, they are all different and a pain to do). Select the .tap file of your chunky SCREEN$ and load it into the Chunky Screen Compressor. Once it has loaded it will automatically compress the image and give some information on the screen on byte size. Make a note of the byte size as you will need this figure handy for when you save the data from within your own program. The byte size is the expander/decompress routine plus the data added together. Press 1,2 or 3 to save the file to a new .tap file Press 0 to change the ink/paper colours when the screen is drawn - before the colour is added. Using a compressed file in your own program - BASIC - it can be used wherever you want (best bung it up high in memory so that it doesn't clash with your program) CLEAR 49999 LOAD "" CODE 50000 and within your program just put RANDOMIZE USR 50000 and it will print the image to the screen. !! Remember to save the code after your basic program on the tape!!! Hints and tips. After the screen has been displayed it is best to use PRINT AT 0,0;"HELLO" print onto the screen, if you use PRINT "HELLO" it it will give a 5: OUT OF SCREEN error. - MACHINE CODE- it can be used wherever you want, for example, bung it in at 50000 LD BC,50000 CALL 50000 and that is it. - Notes and other caboodles- The unpacking routine uses the Spectrum ROM routine to print the ROM chunky graphics on the screen, it also messes with a few system variables to get the best use of lines being printed. These are returned to normal afterwards. The screen is slow at printing - it's using the Spectrum ROM routine, so give it time (it'll take about 1 second to draw the screen) then splash the colour on top. The compressed chunky routines are faster, but they store the data in a different way. The results of Chunky Screen Compressor are free to use in your own program, if you want to bung a credit in the scroller then that is up to you. Have fun with it.