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 > CSDb Entries > Release id #252079 : Edison 2025 Invite
2025-04-25 09:56
trident

Registered: May 2002
Posts: 101
Release id #252079 : Edison 2025 Invite

Quoting trident

* the bitmap squeezer in the first part uses screen mode that has previously been used in pernod's bitmap squeezer from Codeboys & Endians . the screen is laid out in this pattern:
+--------------------------------------------+ \
| First char line of bitmap 0 (0-7 pixels) | |
+--------------------------------------------+ |
| First char line of bitmap 1 (0-7 pixels) | |
+--------------------------------------------+ |
| First char line of bitmap 2 (0-7 pixels) | |
+--------------------------------------------+ > Chunk 0 with shared $d800 colors: $d800 - $d827
| First char line of bitmap 3 (0-7 pixels) | |
+--------------------------------------------+ |
| First char line of bitmap 4 (0-7 pixels) | |
+--------------------------------------------+ |
| First char line of bitmap 5 (8 pixels) | /
+--------------------------------------------+ \
| Second char line of bitmap 0 (0-7 pixels) | |
+--------------------------------------------+ |
| Second char line of bitmap 1 (0-7 pixels) | |
+--------------------------------------------+ |
| Second char line of bitmap 2 (0-7 pixels) | |
+--------------------------------------------+ > Chunk 1 with shared $d800 colors: $d828 - $d84f
| Second char line of bitmap 3 (0-7 pixels) | |
+--------------------------------------------+ |
| Second char line of bitmap 4 (0-7 pixels) | |
+--------------------------------------------+ |
| Second char line of bitmap 5 (8 pixels) | /
+--------------------------------------------+
| Third char line of bitmap 0 (0-7 pixels) | \
+--------------------------------------------+ |
| ... | :

this is achieved by creating a badline condition every 1-7 pixels and setting $dd00/$d018 appropriately. after 5 of these, we do not trigger a new badline condition, but wait for 8 rasterlines. this will cause the vic chip to move on to the next char line of data. char lines that are 0 pixels high are skipped.

the memory layout looks like this:
+-------------------------------------------------------+
| $2000: bitmap 0 | $3c00 screen 0 |
+-------------------------------------------------------+
| $4000: bitmap 1 | $5c00 screen 1 |
+-------------------------------------------------------+
| $6000: bitmap 2 | $7c00 screen 2 |
+-------------------------------------------------------+
| $a000: bitmap 3 | $bc00 screen 3 |
+-------------------------------------------------------+
| $c000: bitmap 4 | $dc00 screen 4 |
+-------------------------------------------------------+
| $e000: bitmap 5 | $fc00 screen 5 |
+-------------------------------------------------------+

the effect of this is that each charline is stretched out over chunks that are a maximum of 43 pixels high.

the picture is spread out over 6 different bitmaps, with 7 pixels of bitmap data in each bitmap, except for the last bitmap that has 8 pixels of bitmap data per charline. each of these 7 pixel or 8 pixel charlines can have their own screen colors, but the $d800 colors are the same for each chunk. because of these novel color restrictions, the picture must be tailored specifically for this screen mode.

we can now control the height of each of these chunks by changing how often we trigger the badline conditions. a chunk can be as small as 8 pixels high and as large as 43 pixels high. but because the last char line of each chunk always must be 8 pixels high, there are very visible visual artifacts in the lower ranges.

we can also scroll the screen up and down easily by either doing a linecrunch or an fld. no data copying is needed.

as can be seen in the memory layout, we are using a portion of the bitmap memory for the color screens. this allows us to use the full 6 bitmaps, except for the last 4 char lines of each picture. in total, this allows to use a maximum of 21 * (5 * 7 + 8) = 903 pixels for the picture.

(if we were to avoid using that portion of the bitmap memory for the screen, we would have to use the last 4 char lines of each bitmap too, but this would have allowed us to use only 4 bitmaps in total. the total height of this would be 4 * (3 * 7 + 8) = 725 pixels. it would also limit the amount of squeeze that we could achieve.)

in this demo, the picture uses only 400 lines and only 3 bitmap areas are used.


Quoting Digger

Thx for the explanation Adam. So it’s like line doubling but for bitmap, right?


Yes, it is a little like line doubling but for bitmap - the result is similar in that it give you a way to repeat the same pixels on the screen. But it is also different in that the badline will re-read the color data every time. Plus you can vary the number of rasterlines between each repetition.

So just to recap: line doubling is the technique where you manipulate the VIC chip to re-display the previously displayed character data, without the VIC doing another badline. This trick is done by setting $d011 to a badline condition between cycles 54 and 57 on the last line of the character. The VIC chip will then simply re-display the previously read character data on the following 8 lines, and no badline is done. In char mode, this will cause a re-display of the previous char line. But it will still advance the bitmap data pointer, so in bitmap mode, it will only re-display the previous colors, but keep displaying new bitmap data. Thus this technique cannot be used to re-display data in bitmap mode.

So in bitmap mode, if we want to re-display data, we need to trigger a new badline. This will cause the bitmap pointer to be restarted at line 0 of its previously read character. (This is true in char mode too btw, and is the basis of the Graham zoomer trick, among others.) And this needs to be done after a maximum of 7 rasterlines, not 8.
2025-04-25 15:40
Jetboy

Registered: Jul 2006
Posts: 354
It's getting clear or at least clearer, thank you!
But i'm still not sure if i grasp it fully. I guess i need to go back to assembler and it will all fit in place after some tries.
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
Fabu
csabanw
algorithm
Viti/Hokuto Force
Quetzal/Chrome
Guests online: 98
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.6)
4 Coma Light 13  (9.6)
5 Codeboys & Endians  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Comaland 100%  (9.6)
9 What Is The Matrix 2  (9.6)
10 Uncensored  (9.6)
Top onefile Demos
1 Scan and Spin  (10)
2 At the Cinema  (9.8)
3 Nine  (9.8)
4 Layers  (9.6)
5 Cubic Dream  (9.6)
6 Party Elk 2  (9.6)
7 Datastiltje 2014 Win..  (9.5)
8 Copper Booze  (9.5)
9 Onscreen 5k  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Artline Designs  (9.4)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Archmage  (9.7)
2 Mirage  (9.7)
3 Sulevi  (9.6)
4 Carrion  (9.6)
5 Pal  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.147 sec.