vbasic_tutorial
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| vbasic_tutorial [2020/10/12 09:30] – [Transferring VASYL data] silverdr | vbasic_tutorial [2022/12/04 12:01] (current) – [Transferring VASYL data] silverdr | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| * general BASIC programming at somewhat lower level((Mandatory for sound and graphics)), where the built-in programming aids like full support for haxadecimal numbers, 16-bit PEEKs and POKEs, as well as LO/HI functions come in very much handy. Even without BeamRacer installed | * general BASIC programming at somewhat lower level((Mandatory for sound and graphics)), where the built-in programming aids like full support for haxadecimal numbers, 16-bit PEEKs and POKEs, as well as LO/HI functions come in very much handy. Even without BeamRacer installed | ||
| - | * adding stunning visual effects to BASIC programs thanks to full VASYL assembly support((Obviously requires BeamRacer expansion installed in order to see them inaction)) | + | * adding stunning visual effects to BASIC programs thanks to full VASYL assembly support((Obviously requires BeamRacer expansion installed in order to see them in action)) |
| * rapid prototyping of timing-sensitive visual effects for award winning demos or games, testing which would normally require a lot of boilerplate code | * rapid prototyping of timing-sensitive visual effects for award winning demos or games, testing which would normally require a lot of boilerplate code | ||
| * verification and debugging of VASYL programs thanks to built-in VASYL memory monitor/ | * verification and debugging of VASYL programs thanks to built-in VASYL memory monitor/ | ||
| Line 33: | Line 33: | ||
| > But why not to simply issue a '' | > But why not to simply issue a '' | ||
| - | Please note that the '' | + | Please note that the '' |
| ==== Parallelism ==== | ==== Parallelism ==== | ||
| Line 44: | Line 44: | ||
| * VIC registers | * VIC registers | ||
| * turn off displaylist processing with a '' | * turn off displaylist processing with a '' | ||
| - | * keep eye on potential parallel use of VASYL '' | + | * keep a close eye on potential parallel use of VASYL '' |
| The least error-prone approach is to set the displaylist and other VASYL memory data in their entireties, before starting displaylist processing with '' | The least error-prone approach is to set the displaylist and other VASYL memory data in their entireties, before starting displaylist processing with '' | ||
| Line 73: | Line 73: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| - | + | This lines numbering scheme is of course | |
| - | Obviously this lines numbering scheme is just an example of the author' | + | |
| - initialise things upfront | - initialise things upfront | ||
| - never forget to configure the " | - never forget to configure the " | ||
| - never forget to close the displaylist off with a '' | - never forget to close the displaylist off with a '' | ||
| - | - actually starting displaylist processing may help in some cases ;-) | + | - actually starting displaylist processing |
| ===== Common patterns ===== | ===== Common patterns ===== | ||
| Line 103: | Line 102: | ||
| </ | </ | ||
| - | Here above lines 110 to 999, when executed, will assemble and store our displaylist in VASYL memory starting at address $0000. The same approach works well for much larger programs too. | + | Here above lines 110 to 999, when executed, will assemble and store our displaylist in VASYL memory starting at address $0000. The same approach works well for much larger programs too but displaylist programs can also be prepared separately and stored/ |
| ==== Transferring VASYL data ==== | ==== Transferring VASYL data ==== | ||
| Line 162: | Line 161: | ||
| </ | </ | ||
| - | sends another dataset $1F00 thereto. | + | sends another dataset $1F00 thereto. |
| + | |||
| + | * decimal numbers ranging from '' | ||
| + | * hexadecimal numbers ranging from '' | ||
| + | * [[wp> | ||
| Using '' | Using '' | ||
| Line 223: | Line 226: | ||
| > OK but what if my data is larger than the 4KiB available at 49152?? | > OK but what if my data is larger than the 4KiB available at 49152?? | ||
| - | The answer is either you find a buffer large enough to hold all your data at once or you need to '' | + | The answer is either you find a buffer large enough to hold all your data at once or you need to '' |
| > But wouldn' | > But wouldn' | ||
| Line 233: | Line 236: | ||
| - adapt the way you handle data transfer to VASYL memory to the amount of data you need to move there | - adapt the way you handle data transfer to VASYL memory to the amount of data you need to move there | ||
| - | - it does not pay to '' | + | - it does not pay to '' |
| - when dealing with large amounts of data, the most efficient way is to '' | - when dealing with large amounts of data, the most efficient way is to '' | ||
| - steer clear of using memory areas other than the 4KiB of free RAM available at $c000. You'll thank me once we meet :-) | - steer clear of using memory areas other than the 4KiB of free RAM available at $c000. You'll thank me once we meet :-) | ||
| Line 290: | Line 293: | ||
| 5603 REM **************************** | 5603 REM **************************** | ||
| 5610 PRINT " | 5610 PRINT " | ||
| - | 5620 VCFG1,$E000,1 : REM $E000 | + | 5620 VCFG 1,$E000,1 : REM $E000 |
| - | 5630 VCFG2,$E000,1 : REM KERNAL ROM | + | 5630 VCFG 2,$E000,1 : REM KERNAL ROM |
| 5640 COPY #1,#2,$2000 | 5640 COPY #1,#2,$2000 | ||
| - | 5650 VCFG1,$E000,1 : REM $E000 | + | 5650 VCFG 1,$E000,1 : REM $E000 |
| - | 5660 VCFG2,$E000,1 : REM KERNAL ROM | + | 5660 VCFG 2,$E000,1 : REM KERNAL ROM |
| 5670 COPY #2,#1,$2000 | 5670 COPY #2,#1,$2000 | ||
| 5680 POKE $E882,$11 : REM PATCH SCROLL | 5680 POKE $E882,$11 : REM PATCH SCROLL | ||
| - | 5690 POKE1,53: REM SWITCH TO RAM KERNAL | + | 5690 POKE 1,53: REM SWITCH TO RAM KERNAL |
| 5700 RETURN | 5700 RETURN | ||
| </ | </ | ||
| Line 305: | Line 308: | ||
| === VDATA revisited === | === VDATA revisited === | ||
| - | In previous sections we discussed how easy and efficient it is to configure a " | + | In previous sections we discussed how easy and efficient it is to configure a " |
| < | < | ||
| Line 351: | Line 354: | ||
| Here we have a relatively small dataset so the difference is adequately small too. But the more data you need to process, the more clearly pronounced the difference becomes. | Here we have a relatively small dataset so the difference is adequately small too. But the more data you need to process, the more clearly pronounced the difference becomes. | ||
| + | TBC | ||
vbasic_tutorial.1602520253.txt.gz · Last modified: 2020/10/12 09:30 by silverdr