base:demo_programming
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
base:demo_programming [2017-04-30 18:01] – [Horizontal Rastersplits] monte_carlos | base:demo_programming [2018-11-10 23:45] – [Horizontal Rastersplits] bepp | ||
---|---|---|---|
Line 22: | Line 22: | ||
{{{{: | {{{{: | ||
- | Dependent of which rasterline | + | Dependent of which rasterline |
- | In total you have to consider 6 different cases. | + | 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 63: | Line 105: | ||
- | ===== 3D DOT SCROLL | + | ===== 3D dot scroll |
* [[3D Dot Scroll]] - by wegi /Black Sun/ | * [[3D Dot Scroll]] - by wegi /Black Sun/ | ||
base/demo_programming.txt · Last modified: 2022-03-15 19:00 by erhan