| |
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.... |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
Try my tool:
GFX Transformer 1.0
This automatically corrects the bitmap. |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
i believe there are a thousands of things like that,
iam now proud to tell you that i have HAND CONVERTED everey wrong char in that piccy, next one to come is a multicolor bitmap, so, if displaying a multicolor image i just have to save the memory areas $0400 - $07f8 ? for the colors, and usually $2000-$4000 for the image data ?
btw which registers must be switched on in the vic for mc bitmap mode ? |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Another easy way to convert a charset is to write your own converter. In Kick Assembler this can be done in only a couple of lines. Here is how to do:
1) First organize your letters in the right order according to the PETSCII format in a grahics program like photoshop and saved it in the file 2x2char.gif. See it here http://www.6581.dk/2x2char.gif
2) Write the converter in Kick Assembler:
.pc = $3800
.var charsetPic = LoadPicture("2x2char.gif", List().add($000000, $ffffff))
.function picToCharset(byteNo, picture) {
.var ypos = [byteNo&7] + 8*[[byteNo>>9]&1]
.var xpos = 2*[[byteNo>>3]&$3f] + [[byteNo>>10]&1]
.return picture.getSinglecolorByte(xpos,ypos)
}
.fill $800, picToCharset(i,charsetPic)
3) Now assemble the program and you now have a converted charset that can be used in a scroll as it's done here http://www.6581.dk/2x2scroll.prg
If you insist on converting from some kind of c64 bitmap format instead of gif then use the LoadBinary function instead of the LoadPicture function (Fx. LoadBinary("koalapic.prg", BF_KOALA)) and access the bitmap data via. the getBitmap function. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
dd00 - videobank (=3, first bank)
d018 - videoram and bitmap ($18, videoram at $0400, bitmap at $2000)
d016 - enable multicolor (=usually $d8)
d011 - enable bitmap mode (=$3b)
for the colors in mc the videoram and the colorram (at $d800) is used (and background color in d021 ofcourse) |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
There is a bug in csdb.. Dont know why but it keep repeating the last of the message no matter how much I edit it :( It also cut some of the last part.. so basicly ignore whats after point 3 |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
ok, finished with converting this font, now i have a picture, register $d018 says $79 color data at $2400 and image data at $2000 if someone is awake at 0300 please contact me
register $dd00 contains value $c6 |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
juppi image is making no problems any more ... ;) |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
i am a bit stupid, where to store the image 3rd color ? somewhere $fff ? |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
My guess is $d800 (and the next 40x25 bytes).
|
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
everything is fine now, today is the day when i will release my first demo ever! gfx by ptoing sfx by rio and code by me! |
Previous - 1 | 2 | 3 | 4 - Next |