Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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: 11114
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
aegis/ascraeus/r3turn
Impetigo/Crescent
McMeatLoaf
Guests online: 107
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

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