To install Extractor into the desktop, double-click on the '!Extractor' application. Extractor should appear on the right-hand side of the desktop ready for use.
We now need some sprites to extract from. I have included some example sprites on the disc, to load these into Extractor:
- open the 'Examples' directory,
- drag the sprite file 'EG Sprs' to the Extractor desktop icon.
You will now be presented with two windows, the one on the left is a list of the currently defined extraction instructions (of which there will be 1), and one on the right displays the sprite which the extraction instruction concerns (which will be the first sprite in the sprite file, called "sphere"). When you first load a sprite file into Extractor it will always set up one extraction instruction to extract the whole of the first sprite in the file. Any sprite files loaded into Extractor after this will be merged with the other sprites already in memory, unless Extractors' memory has been cleared (clearing the memory resets everything as if Extractor had just been loaded). Also, If a file contains sprites from modes other than 9, 12, 13 and 15 then they will not be loaded into Extractor and you will be told so.
When merging sprite files, if there is a sprite in each file with the same name then any extraction instructions concerning this sprite will be set to extract the whole of the new sprite. This could well cause ambiguous flaws in the raw data extracted if not taken into account. Furthur to this, because of a bug in Extractor, if there is a common sprite in the two files, and the new version is in a screen mode that Extractor cannot use (ie not 9, 12, 13 or 15), then both copies of the sprite will be lost. This means that any extraction instructions concerning this sprite will be defined ambigiously, possibly causing a fatal error in Extractor. This will cause any unsaved data in Extractor to be lost. Only Extractor will be affected by this, and the rest of the desktop will be fine.
The processing of sprites from Acorn format to raw screen data format uses an inbetween stage, called a grab or extract list. This can be saved to make alteration of the raw output easier. The files contain both the sprites as well as the list of extraction instructions.
In the remainder of this chapter I aim to show you how to create and save an extract list. This will then be use to create a raw data file containing two sprites (called 'sphere' and 'acorn') which can be displayed using a machine code routine. To do the we will first need two extraction instructions, one for each sprite. There are two ways to do this, either insert an extraction instruction or add an extraction instruction to the bottom of the list. The latter will be used here and the former will be explained in chapter 6.
Using the part of the menu structure below, selecting "Add to List".
Extract ⇨ Manual ⇨ Add to List.
You should now have 2 extraction instruction both set to extract the whole of the sprite "sphere" twice, so now we need to alter the second extraction instruction to specify the sprite "acorn". This uses this part of the menu structure:
Extract ⇨ Manual ⇨ Sprite ⇨ Select ⇨ € sphere
acorn.
landscape
The second extraction instruction is already selected (to select an extraction instruction simply click in the list window on the one you want), so all we need to do is to select a different sprite using this part of the menu. It is a list of all the sprites in memory (i.e. in the file 'EG Sprs') and you should select "acorn" from this list. Please note that it may take a short time for the sprite list to pop up on older machines when you have a lot of sprites in memory.
When you select a sprite the section to be extracted will be set to the boundaries of the sprite (the section to be extracted is shown on the sprite in the sprite display window as a box which inverts the colour of the sprite along it's edges).
Everything is ready to extract the raw sprite data, so we now need to save the Extract List file to avoid having to go through this process again. This is done as follows. First, open the 'Examples' directory, then open the save box on this point on the menu:
Save ⇨ Grab List ⇨ {Save Box}.
Replace the filename 'ExtrctFile' on the save window in the menu structure with the filename 'EGChptr2' and drag the file icon to the open 'Examples' directory to save it. Just to prove it works, select 'Clear' from the main menu to remove all trace of the file from memory and then double-click on the file you have just saved to reload it into extractor and, as if by magic, all will be fine and dandy once more.
Before we get on to saving the raw data, I wish to explain some things about the sprites held in memory and in the Extract List file. The file contains all the sprites which are in memory which are all the sprites from the file 'EG Sprs', but the 2 extraction instructions only concern 2 of the sprites in this file. So to save disc space or just to keep things tidy you can delete the sprites not used be the extraction instructions. This can be done in two ways:
- Use the sprite-delete-specific menu part (see below) to select the names of the sprites to delete from the list of sprite names (if you select a sprite that is used in an extraction instruction then the sprite cannot be delete and an error tell you so).
- Use the sprite-delete-unused menu part (see below) which will remove all the sprites from memory that are not used in any extraction instructions.
Extract ⇨ Manual ⇨ Sprite ⇨ Delete ⇨ Unused.
Now back to the example for this chapter and saving the raw data.
Save ⇨ Extracted ⇨ Save File ⇨ {save box}.
Making sure the 'Examples' directory is open and visible, replace the filename 'RawSprite' with the filename 'RawDC2' and drag the file icon to the 'Examples' directory. Now the screen will blank out, next the first extraction instruction's sprite will be plotted in the bottom left corner of the screen, then the screen data will be extracted and then it will be saved to disc. This process is then repeated for each extraction instruction (twice, in this case) and then you are returned to the desktop, with the raw data saved. To see the fruits of your work, double-click on the '!Chptr2EG' application to see the sprites displayed from machine code.
I should point out that Extractor can only hold up to 256 extraction instructions and 256 sprites in memory. Any more than those will cause an error.