| |
Krill
Registered: Apr 2002 Posts: 2980 |
Looking for a specific obscure ancient demo with a very interesting bitmap stretcher
... which DeeKay (are you reading this?) once showed me. It features a bitmap stretcher which has been baffling him as it has baffled me, as it seemed to be able to stretch every line (not just the badlines) but still showed a bitmap that was around 20 or more char rows high and colourful (not just 3+1 colours). The stretching patterns seemed a little weird, so there might be a connection to this feat.
It must have been from around 1988-1990 (yes, i know, there's a shitload of obscure demos from that era) and is on CSDb.
I've wanted to take a closer look at the code ever since, but alas, failed to re-locate the demo. |
|
| |
HCL
Registered: Feb 2003 Posts: 728 |
Crest made one (Crossbow of course).. but i can't remember which demo it was. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Pretty sure it wasn't a Crest demo, that wouldn't have made DK bat an eyelid. :D |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Maybe this one then.. Partysqueezer+. Check the end part. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Oh yeah, that's probably it!
I'm torn between "Exactly this!" and "Hmm, i remember it being a little different", but that's quite normal with these things.
Thanks! :) (That was quick.) |
| |
Trash
Registered: Jan 2002 Posts: 122 |
If I remember correctly one of the demos (from that time period) made by Megastyle contains a similar effect... |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Nice!
At a guess I'd assume there are eight half-height bitmaps scattered across the four banks, each containing duplicates of lines j+8n of the source, where j is the bitmap number.. but as to how to increment row pointer by 40 only when required, while still displaying a full 40 chars wide, my d011 fu falls short.
(trivial if it had only been a 37 character wide image of course :) ) |
| |
lft
Registered: Jul 2007 Posts: 369 |
Here's my theory, based on looking briefly at the code and then making educated guesses: Each row of the picture (8 lines of bitmap data, one row of VM and colour RAM) is handled in turn. It can be displayed normally, occuping 8 rasterlines, or it can be stretched to any height.
The row is stored in eight versions, in separate banks. Each version contains the 8 lines, rotated vertically by a fixed amount. Thus, regardless of the value of RC, it is always possible to select a bank that displays any desired line of graphics from the current row.
RC remains 0 while stretching, and is then allowed to proceed all the way to 7. The correct bank is selected for each rasterline, based on the value of RC and the desired line of graphics.
Is this really an unusual way of stretching bitmaps? |
| |
lft
Registered: Jul 2007 Posts: 369 |
Scratch the vertical rotation, by the way. It's easier to just keep eight copies of line #0 in bank #0, eight copies of line #1 in bank #1 etc. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Quoting lft It's easier to just keep eight copies of line #0 in bank #0, eight copies of line #1 in bank #1 etc.
Yes, that is what I meant; I just didn't put it very well.
The part that loses me is where they do stretching without initiating three-cycles-late DMA... |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting ChristopherJamThe part that loses me is where they do stretching without initiating three-cycles-late DMA... Without having studied the code thoroughly yet:
TL;DR: Why issue late FLI DMA if normal DMA is done automatically after 7 rasterlines of non-stretch? :)
Once you can select arbitrary bitmap lines on a badline, can't you stop stretching 7 lines before the intended pointer increase by 40/320, and do the $d018/$dd00 updates for the remaining 7 rasterlines of the current char row without $d011 hammering, then let the pointer increase and have normal badline DMA, then stretch that badline again? |
... 4 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |