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


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

Registered: Aug 2002
Posts: 80
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: 269
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
ZeSmasher

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

Registered: Feb 2003
Posts: 298
"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: 80
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
LDX#40
Didi/Laxity
JCH/Vibrants
Dymo/G★P
Icon/TRIAD
blendo75
Guests online: 53
Top Demos
1 Uncensored  (9.7)
2 Comaland 100%  (9.7)
3 Edge of Disgrace  (9.7)
4 Coma Light 13  (9.6)
5 The Shores of Reflec..  (9.6)
6 Wonderland XII  (9.6)
7 We Come in Peace  (9.6)
8 Lunatico  (9.6)
9 Incoherent Nightmare  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 FMX Music Demo  (9.6)
2 Party Horse  (9.6)
3 Daah, Those Acid Pil..  (9.5)
4 Pandemoniac Part 2 o..  (9.5)
5 Arok 20 Invitation  (9.5)
6 Treu Love [reu]  (9.5)
7 Merry Xmas 2017  (9.4)
8 Dawnfall V1.1  (9.4)
9 In Memoriam BHF  (9.4)
10 Dawnfall  (9.4)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.4)
4 Finnish Gold  (9.4)
5 Crest  (9.3)
Top Hardware-Gurus
1 Soci  (9.9)
2 Wiesel  (9.9)
3 Grue  (9.8)
4 Zer0-X  (9.8)
5 Lemming  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2018
Page generated in: 0.049 sec.