Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user eightbitswide ! (Registered 2024-12-24) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > bitmap display/extraction
2006-08-11 02:42
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....
 
2006-08-11 18:57
Graham
Account closed

Registered: Dec 2002
Posts: 990
Try my tool:

GFX Transformer 1.0

This automatically corrects the bitmap.
2006-08-11 19:53
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 ?
2006-08-11 20:32
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.
2006-08-11 20:35
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)
2006-08-11 20:36
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
2006-08-12 00:52
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
2006-08-12 01:21
Trifox
Account closed

Registered: Mar 2006
Posts: 108
juppi image is making no problems any more ... ;)
2006-08-12 01:36
Trifox
Account closed

Registered: Mar 2006
Posts: 108
i am a bit stupid, where to store the image 3rd color ? somewhere $fff ?
2006-08-12 06:13
Slammer

Registered: Feb 2004
Posts: 416
My guess is $d800 (and the next 40x25 bytes).

2006-08-12 11:42
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
slimeysmine
Guests online: 93
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 X-Mas Demo 2024  (9.5)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.