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 > Help the old brain cells
2018-03-01 18:30
Case

Registered: Aug 2002
Posts: 138
Help the old brain cells

Hi,

I have recently been asked to do some code for a small project the bulk of which is displaying 4 bitmaps one after the other in a loop whilst playing some music.

I was wondering if i could pack the 4 bitmap files, store them in memory until needed and then just depack as required and if this can be done, can anyone help nudge my old brain cells with some pointers.

i am using kickass 4.19 along with relaunch and having fun.
2018-03-01 19:10
Mixer

Registered: Apr 2008
Posts: 422
void*

Depends on many things, but for example a hiress full bitmap is 8000 bytes. Your 4 bitmaps x 8000 = 32000 bytes + possible screen/colormaps another 1000-2000 bytes each x 4is 4000-8000 bytes.

You need 8192+1024 bytes of one bank for showing the graphics.

So we are at 32000+8000+8192+1024 which is 49216, which is less than 65536, so there is room for music.

So all in all you could fit it all in memory even without compressing.
2018-03-01 21:00
Smasher

Registered: Feb 2003
Posts: 512
Hello Case! this one uses 4 bitmaps packed in a single prg: Meet Us at the Zoo!
I've uploaded the source files (100% spaghetti coding, almost no comments, ehm...). I hope they can be useful for you. if you have questions just ask.
the compiled prg is 250 blocks, so you need to pack it first or use a cartridge that handles memory till $ffxx.
2018-03-01 21:04
Smasher

Registered: Feb 2003
Posts: 512
"4 bitmaps packed" means that the 4 bitmaps stay all in a single file, one in each vic bank. packed doesn't mean pre-crunched, ok? sorry for the confusion.
2018-03-03 09:59
Case

Registered: Aug 2002
Posts: 138
thanks for all replies.

it is 4 koala bitmaps, i would have used one per bank as this is the easiest way however the music is sitting in one of the banks and this cannot be changed.

i was hopeing that i could pack the pictures using maybe a level packer and then using a lookup table pick the 1 i want and depack it, display it and then move onto the next one.
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
Krill/Plush
serato/Finnish Gold
Apollyon/ALD
SplAtterpunk
Xiny6581/Dees Produc..
rexbeng
Guests online: 115
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 Bromance  (9.6)
10 Memento Mori  (9.6)
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 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (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 Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Stinsen  (9.6)
4 Mutetus  (9.6)
5 Linus  (9.6)

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