funkheld wrote: ↑Fri Mar 22, 2024 7:13 pm
Hi good afternoon.
what is bitmap level 0 and bitmap level 1 please?
How can you make bitmap level 1 transparent to bitmap level 0 in the graphic, no tiles?
you write, 2 bitmap levels can be created with 320x240x4bpp graphics.
that is very, very interesting.
how does that work please?
Thanks.
greeting
Funkheld,
Layer0 ... configure as some bitmap format.. let's say we make it 320px wide, 4bpp starting at 0:$0000 in VRAM.
240x320x4bits = 37.5KB ... OK, we still have VRAM left to play with...
Layer1... we'll configure it starting at 1:$0000 in VRAM, for simplicity... so there is 64K-37.5K = 26.5K between these bitmaps
And following layer1 bitmap would be about 25K of VRAM... before we knock into PSG,palette,and sprite attributes (which are fixed at the end of VRAM )
So... we have NO tile layer... any text or other things would need to be done using sprites or drawn to a bitmap layer... but...
Layer0 - color 0 on this layer will always end up being the background screen color.. so layer0 really has 16 colors it could use..
Layer1 - color 0 on this layer is transparent.. so only 15 colors can really be used on this layer..
I don't see a good use case for this configuration, but .... playing a little what-if here...
Layer1 doesn't HAVE to be 4bit... the bitmap modes can be configured to 1bpp or 2bpp ... so maybe Layer0 is a map of the world or something.. maybe it is 256 color and Layer1 is only 1bit/2bit ...
but one potential usecase could be to draw something like a map of the world onto Layer0.. "full screen" 320x240 say... it won't be able to scroll but it fits our need at the moment..
And layer0 was used to draw lines or something... like we want Layer0 to be a bitmap because it simplifies copying sections to it and drawing at random pixels...
But we also want Layer1 to be a bitmap so that we can plot points or whatever, and then be able to _erase_ them without affecting the underlying layer0 ... like I was thinking, Layer0 is a map of the world, and then layer1 we are drawing lines like maybe where planes are flying to or something.. and when we want to update the lines, we have to clear the screen and start all over, but we don't want to have to copy the world map...
this _could_ be very useful i you consider that there is 128 sprites and each is up to 64x64... and you can always put sprites side-by-side on a line and they will render OK.. at 320px wide screen, you will only have issues with some sprites not being drawn if you pile a lot of them onto a single line.
128 sprites.. let's say we place 128 4bit 8x8 sprite 'tiles' into VRAM in-between our bitmap layers... is only 4K worth of sprites graphics.. 128 sprites would be enough for uppercase and lowercase english alphabet , numbers, symbols, and some nice-to-haves...
so 1 sprite taken to be a mouse cursor or something, we could write up to 127 characters onto this screen... or we could use scraps of whatever space we have left still in VRAM to create 16x16 or 32x32 or even 64x64 sprites to group letters together.. like maybe take 1 sprite as 32x8 and it is the just the word 'stop' ..
now to bring this all together...
we have Layer0 that is 4bit bitmap 320x240 that we draw these beautiful but expensive world map on.
then Layer1 is also 4bit bitmap 320x240 that we are doodling lines and whatever onto that... things that we'll change more often than we would the map, certainly..
and then the rest of VRAM and using the sprites we can _still_ have mouse cursor, text, and UI elements...
Vera Victoria!
(Which apparently is Latin for "True Victory!" ... )