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: 142
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: 452
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: 520
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: 520
"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: 142
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
Mike
Rub_0201
DnP
Didi/Laxity
visionvortex
Guests online: 81
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Party Elk 2  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (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 Triad  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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