Login
Back to forumSee the full topicGo to last reply

Posted By

IstvanV
on 2011-04-08
09:26:44
 Re: Converting gfx made on PC

More on the Multi Botticelli format: to save in this format, select any of the "raw PRG" options, and set the compression level to 0; it loads to $7800-$9F3F, that is why the image data needs to be relocated to $1800 to make it visible with a simple GRAPHIC 3 or 4 command in BASIC. Also, the $FF15 color is stored at $7BFF, and the $FF16 color is at $7BFE, but the upper and lower 4 bits are swapped, so if the stored value is $67 for example, then you need to write $76 to the color register.
As mentioned by Luca, you can load the file to any address when using YAPE; with plus4emu, use the monitor in the debugger to load to $1800: the command L "" 1800 will show a dialog to select the file to be loaded (alternatively, you can specify a file name, which will be searched in the directory set with Alt+Q). Here is a simple BASIC program that loads an image file and sets the colors:

10 graphic 4
20 open 1,8,0,"test"
30 get#1,a$:get#1,a$
40 for i=6144 to 16190 step 2:get#1,a$,b$:poke i,asc(a$):poke i+1,asc(b$):next
50 close 1
60 color 0,(peek(7167) and 240)/16+1,peek(7167) and 7
70 color 3,(peek(7166) and 240)/16+1,peek(7166) and 7


It can easily be tested with IEC drive emulation, although the program is rather slow.

Of course, it is also possible to set the address of the bitmap and attribute data with TED:
$FF12 = bitmap_address / $2000 * 8
$FF14 = attribute_address AND $F8
This BASIC program displays a Multi Botticelli format image loaded to the default address ($7800):

10 poke 65286,59
20 poke 65287,24
30 poke 65298,32
40 poke 65300,120
50 color 0,(peek(31743) and 240)/16+1,peek(31743) and 7
60 color 3,(peek(31742) and 240)/16+1,peek(31742) and 7




Back to top


Copyright © Plus/4 World Team, 2001-2024