base:demo_programming
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
base:demo_programming [2018-11-10 23:45] – Spelling bepp | base:demo_programming [2022-03-15 19:00] (current) – [Rasterbars] erhan | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Demo Coding ====== | ====== Demo Coding ====== | ||
+ | |||
+ | This page is devoted specifically to demo effects and tutorials on how to make demos. More general graphics coding is instead covered in the [[base: | ||
- | This section contain material related to demo coding. General VIC programming is not available on this page. Instead it is devoted to coding specific demo effects and tutorials on how to make demos specifically (rather than coding in general). General drawing, non-specific to demo coding, is also on the general VIC page instead. | + | To provide |
- | + | ||
- | To give an example: Opening the border is commonly made in demo parts, but simply opening the border does not constitute a demo effect in itself (at least not during the last 20 years). | + | |
===== General Information and Tutorials ===== | ===== General Information and Tutorials ===== | ||
* [[demo coding introduction|An Introduction to Programming C-64 Demos]] - Puterman/ | * [[demo coding introduction|An Introduction to Programming C-64 Demos]] - Puterman/ | ||
* [[Demo world records and world firsts]] - Who broke what record? Who invented effect X first? When? In what demo? | * [[Demo world records and world firsts]] - Who broke what record? Who invented effect X first? When? In what demo? | ||
- | * [[Speeding up and optimising demo routines]] - by conrad | + | |
====== Effects ====== | ====== Effects ====== | ||
Many demo effects depend on precise timing. Therefore it might be useful to have a look on the [[base: | Many demo effects depend on precise timing. Therefore it might be useful to have a look on the [[base: | ||
- | |||
- | ==== Horizontal Rastersplits ==== | ||
- | Very basic rastersplitting can be done by waiting for a certain rasterline an then switch some VIC register. | ||
- | The display has 312 rasterlines at max but the VIC rasterline register ($d012) has only a range of 0 to 255. | ||
- | Therefore bit 7 of $d011 indicates if the rasterline is <256 or >255. Now the questions arises how to wait for a certain rasterline in the whole range without the preassumption of beeing in rasterline x when the wait routine is called. | ||
- | Here is a diagram which examples the situation: | ||
- | |||
- | {{{{: | ||
- | |||
- | Dependent of which rasterline you're currently in, you can simply compare $d012 with the desired rasterline or you must first wait for bit 7 of $d011 to attain the right value and then wait again for the desired line. Even more, retrace has to be taken into account, too. | ||
- | |||
- | In total you have to consider 6 different cases: | ||
- | |||
- | //being in rasterline 0-255 and// | ||
- | * waiting for a rasterline < $d012 -> wait for bit 7 of $d011 to switch to 1 and back to 0 and then wait for lowbyte | ||
- | * waiting for rasterline > $d012 but < 256 -> simply wait on lowbyte to match | ||
- | * waiting for a rasterline > $d012 but > 255 -> wait for set bit 7 of $d011 and then wait for lowbyte to match | ||
- | * | ||
- | //being in rasterline 256+ and// | ||
- | * waiting for a rasterline < $d012 and < 256 -> wait for unset bit 7 of $d011 and then wait for lowb | ||
- | * waiting for rasterline < $d012 but > 256 -> wait for unset bit 7 of $d011, then set bit7 of $d011 and then on lowbyte | ||
- | * waiting for a rasterline > $d012 -> simply wait for lowbyte to match | ||
- | |||
- | < | ||
- | |||
- | waitrasterline: | ||
- | cpx #0 | ||
- | beq wait0To255 | ||
- | ;from here on we wait for a rasterline > 255 | ||
- | bit $d011 | ||
- | bpl *-3 | ||
- | ; | ||
- | cmp $d012 | ||
- | bcs waitMatchingD012 | ||
- | bit $d011 | ||
- | bmi *-3 | ||
- | bit $d011 | ||
- | bpl *-3 | ||
- | bmi waitMatchingD012 | ||
- | wait0To255: | ||
- | bit $d011 | ||
- | bmi *-3 | ||
- | ; | ||
- | cmp $d012 | ||
- | bcs waitMatchingD012 | ||
- | bit $d011 | ||
- | bpl *-3 | ||
- | bit $d011 | ||
- | bmi *-3 | ||
- | waitMatchingD012: | ||
- | cmp $d012 | ||
- | bne waitMatchingD012 | ||
- | rts | ||
- | </ | ||
Line 76: | Line 21: | ||
* [[Rasterbars with screen on|Rasterbars 2 source]] - by Bitbreaker | * [[Rasterbars with screen on|Rasterbars 2 source]] - by Bitbreaker | ||
* [[Rasterbars small source|Rasterbars 3 source]] - by Graham | * [[Rasterbars small source|Rasterbars 3 source]] - by Graham | ||
+ | * [[Rasterbars 4 source]] - by Erhan | ||
* [[Rasterbars Flash screen effect|Rasterbar Flasher source]] - Flash Screen effect by Wozza/ | * [[Rasterbars Flash screen effect|Rasterbar Flasher source]] - Flash Screen effect by Wozza/ | ||
+ | * [[Horizontal Raster Split|Horizontal Raster Split]] - Monte Carlos | ||
+ | * [[Overlapping Raster Bars]] by Richard | ||
===== Scrolling text ===== | ===== Scrolling text ===== | ||
Line 85: | Line 33: | ||
* 1 char sized scrollers: | * 1 char sized scrollers: | ||
* [[1X1 Scrolling message|Scroll text]] - by Vai/Slash Design | * [[1X1 Scrolling message|Scroll text]] - by Vai/Slash Design | ||
- | * [[acme_1x1_scroll|Scroll text]] - By Richard | + | * [[acme_1x1_scroll|Scroll text]] - By Richard/TND |
* [[1x1_scroll|Scroll text]] - variable speed and direction, by Groepaz/ | * [[1x1_scroll|Scroll text]] - variable speed and direction, by Groepaz/ | ||
+ | * [[1x1 upscroll]] - the basics - by Richard/TND | ||
+ | |||
+ | * 2 char sized scrollers: | ||
+ | * [[2x2 upscroll with space linefeed]] by Richard/TND | ||
* Zoom chars 8x: | * Zoom chars 8x: | ||
Line 93: | Line 45: | ||
* Sprite scroller: | * Sprite scroller: | ||
- | * [[Scrolltext using Sprites]] - by Testicle | + | * [[Scrolltext using Sprites]] - a ROL-scroll, |
+ | * [[Waving sprite scroll]] - A letter per sprite with a sine move, by Mace | ||
* Perspective Scroller | * Perspective Scroller | ||
Line 146: | Line 99: | ||
* [[8 Sprite starfield]] - by Richard Bayliss | * [[8 Sprite starfield]] - by Richard Bayliss | ||
* [[ROL Starfield using $d018]] - by Richard Bayliss | * [[ROL Starfield using $d018]] - by Richard Bayliss | ||
+ | * [[base: | ||
===== 2nd Line FLI ===== | ===== 2nd Line FLI ===== | ||
* [[Twisters, x-rotators and waving carpets]] - Bitbreaker/ | * [[Twisters, x-rotators and waving carpets]] - Bitbreaker/ |
base/demo_programming.1541889904.txt.gz · Last modified: 2018-11-10 23:45 by bepp