| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
bitmap display/extraction
hi all, i have a severe problem, i have some pictures, they are mulcticolor only, so it should be easy to extract the image data from it, can anyone point me to a description of those .prg multicolor images?
btw. i have a font/charset ( 2x2) in png format, what is the easiest/fastest way to get a c64 charset from it? i would not like to write a converter for this .,..
can there be a program wich outputs the bytes (valued 0..3 so, to bits a pixel) only????
time is runing out... |
|
... 22 posts hidden. Click here to view all posts.... |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
ok, thank you for reply, at first i have a hires picture, 320x200 pixel big, ( only used some pixels for chars) now i want to extract this image, is it right that this hires pic is located from $0400-somewhere? where 8 consecutive bits form a 8x8 pixel block on screen ? so all i have to do is to read 8 bytes and put them in my char memory ... ;)? correct me if iam wrong ... i think i will load such a prg file at the tail of my asm proggy, and search for the data area, i hope it is a connected block of memory ... |
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
What was used to create the images? If you don't know then do you know the file size?
Most bitmap gfx editors store the bitmap data then the colour data. When testing I would often load the file to $2000 (8192) then change the VIC screen/charset point to use that as the bitmap or charset (poke 53272,24 or something). poke 53269,59 and you'll sort of see it.
If you load a font in to $2000 you'll see how the first 8 bytes = character $00, the next 8 bytes loaded are for character $01 etc. The 8 bytes are arranged so the first byte = first line at the top, bext byte = next line down until you get your 8 pixel height (so 8 bytes = 1 character). |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
here is the charset picture, created with congo ... i need urgent help with that gfx stuff, cause i would like to release a demo tomorrow, text output is fine already, all i need is this )=/$()=/$(=)/ 2x2 charset, beside of that i would like to extract a picture from a multicolor image
this one is the 2x2 font as hires picture
http://www.fractalmovies.com/c64/charset.prg
|
| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
Quoting trifoxat first i have a hires picture, 320x200 pixel big, ( only used some pixels for chars) now i want to extract this image, is it right that this hires pic is located from $0400-somewhere?
NO! Without knowing the programm which created the file or knowing (figuring out) the fileformat, you can never be sure where the image data resides in the file.
AND... For Hires bitmaps, it works in an otherway then MultiCol bitmaps.
1. You don't have additional color data at $d800
2. You don't use $d021 (screen background color)
So, in other words... You have only two data banks in your hires file.
1. Charscreen data (colors in high and low nybles)
2. Bitmap data
Charscreen data is $3e8 bytes long
Bitmap data is $1f40 bytes long
So, if your file-size (in bytes) is 9002 ($232a), try to cut-up your .prg file like this:
2 bytes for mem address
$3e8 byes charscreen data
$1f40 bytes bitmap data
or like this
2 bytes for mem address
$1f40 bytes bitmap data
$3e8 byes charscreen data
If your size (in bytes) is more like 9218 ($2402), try to cut-up your .prg like this:
2 bytes for mem address
$400 byes charscreen data
$2000 bytes bitmap data
or like this
2 bytes for mem address
$2000 bytes bitmap data
$400 byes charscreen data
|
| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
Quoting trifoxthis one is the 2x2 font as hires picture
http://www.fractalmovies.com/c64/charset.prg
When you load this image and press space and the chars are beeing displayed...
your colordata is at $0400
your bitmap data is at $2000
Just open it in Vice and use monitor to write $2000 to $3f40 to file..
But then still... It's going to be a bitch to use this bitmap data straight up as a charset, coz the parts of the chars aren't well sorted.
|
| |
enthusi
Registered: May 2004 Posts: 677 |
An also common yet a bit wasty format is coloram at $5c00 and bitmap data at $6000. The Hires-Ed I use uses that. |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
okay thank you for that explanation, i will try it out ... resorting the chars is then my problem, but if i got them, it should be no problem anymore .... |
| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
Quote: okay thank you for that explanation, i will try it out ... resorting the chars is then my problem, but if i got them, it should be no problem anymore ....
K, try to resort them in a way that you don't use more then $800 bytes for the bitmap data. That way you make sure that you can use it as a charset...
Then you'll have to save it from $2000 to $2800 ;-) |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
hi, i stepped over this tool
PicChar v0.1
has anyone used it before ? how is the input format of this tool, there is no comment about accepted input formats, it seems that it rads just any type of file, but i am not sure in which format i have to use so that i can get what i want ... ;( |
| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
POST FROM PRIVATE MESSAGE
>> Well..?
>> Did that solve your problem?
>>
>
> i am coming closer to what i want to achieve, the $d018 register reads value $19 so, what parts do i need to extract?
>
> $d018 has value $19
>
> so, screen mem is $0400 - $07f8 what data is stored there ? only color data ? that would explain why all have the same value ....
>
> but i am used to $18 value in register $d018 ...
He he... If you're busy with the chars, just see forum posts... It'll guide you...
Let me explain $d018:
bit 0: uppercase/lowercase charset
bit 1-3: charset/bitmap address
bit 4-7: charscreen address
The real possition in mem depends on the first two bits (0-1) of $dd00. This register is for the VIC bank...
possible VIC banks are:
$0000
$4000
$8000
$c000
Witin one of these VIC banks you'll find a charset/bitmap address:
bit 1-3:
000: VICBank + $0000
001: VICBank + $0800
010: VICBank + $1000
011: VICBank + $1800
100: VICBank + $2000
101: VICBank + $2800
110: VICBank + $3000
111: VICBank + $3800
Note: When used in a normal manner, bitmaps only use 000 ($0000) or 100 ($2000) to show bitmap data
Within the same manner you can use the bits 4-7 for calculating the charscreen address.
|
Previous - 1 | 2 | 3 | 4 - Next |