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

Forums > C64 Coding > Help the old brain cells
2018-03-01 18:30

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


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

Registered: Apr 2008
Posts: 280

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

Registered: Feb 2003
Posts: 318
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

Registered: Feb 2003
Posts: 318
"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

Registered: Aug 2002
Posts: 81
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
Users Online
Guests online: 20
Top Demos
1 Uncensored  (9.7)
2 Unboxed  (9.7)
3 Comaland 100%  (9.7)
4 Edge of Disgrace  (9.7)
5 Coma Light 13  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 Wonderland XII  (9.6)
9 C=Bit 18  (9.6)
10 X Marks the Spot  (9.5)
Top onefile Demos
1 Smile to the Sky  (9.6)
2 Daah, Those Acid Pil..  (9.5)
3 Dawnfall V1.1  (9.4)
4 FMX Music Demo  (9.4)
5 Crystal Gazer  (9.4)
6 Pandemoniac Part 2 o..  (9.4)
7 Arok 20 Invitation  (9.4)
8 Official X2018 Report  (9.4)
9 Rewind  (9.4)
10 Party Horse  (9.3)
Top Groups
1 PriorArt  (9.8)
2 Performers  (9.5)
3 Oxyron  (9.4)
4 Booze Design  (9.4)
5 Censor Design  (9.3)
Top Mega Swappers
1 Aslive  (9.4)
2 R.C.S.  (9.3)
3 Dishy  (9.2)
4 Nightshade  (9.1)
5 Calypso  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.05 sec.