User Tools

Site Tools


sd:sd-8516_stellar_basic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sd:sd-8516_stellar_basic [2026/03/31 07:17] appledogsd:sd-8516_stellar_basic [2026/04/05 14:18] (current) appledog
Line 240: Line 240:
  
 VSTART will resume regular video chip scans of the framebuffer to video memory. VSTART will resume regular video chip scans of the framebuffer to video memory.
 +
 +=== Mode 4
 +Mode 4 is a 256x224 "Famous Console" inspired mode. Here's a demo program:
 +
 +<codify>
 +    10 MODE 4
 +    20 FOR C = 0 TO 15
 +    30 RECT C * 16, 0, C * 16 + 15, 223, C, 1
 +    40 NEXT C
 +    50 LINE 0, 0, 223, 223, 3
 +    60 INPUT "PRESS ENTER"; A$
 +    70 MODE 1
 +</codify>
 +
 +As you can see, it's pretty much more of the same, but you may prefer the aspect ratio for classic 8bit and 16bit console games.
 +
 +=== Mode 8
 +Mode 8 is a 128x128 "Ersatz-8" inspired mode.
 +
 +<codify>
 +    10 MODE 8
 +    20 FOR C = 0 TO 15
 +    30 RECT C * 8, 0, C * 8 + 7, 127, C, 1
 +    40 NEXT C
 +    50 LINE 0, 0, 127, 127, 3
 +    60 INPUT "PRESS ENTER"; A$
 +    70 MODE 1
 +</codify>
 +
 +As you can see, it's pretty much more of the same, but you may prefer this aspect ratio for classic "ersatz retro" games.
 +
  
 == Music == Music
Line 379: Line 410:
 === Further Study === Further Study
 If you wish to learn more about how the MML system works under the hood, please refer to the Programmer's Reference Guide [[Appendix 5 Sound System]]. If you wish to learn more about how the MML system works under the hood, please refer to the Programmer's Reference Guide [[Appendix 5 Sound System]].
- 
-== Dictionary 
- 
- 
-=== FREE() 
-This is like MEM in that it calculates the free space in bank 0 between the end of the BASIC program and VARTOP, however it returns it as an integer. Be careful because in BASIC integers are signed. So read the number like this; when it is negative, this shows how much space has been used (the zero page is reserved so it always shows -256 at start). When it is positive, then it shows how much space is left. 
- 
-Also see: MEM 
- 
-=== MEM 
-This command calculates the free space in bank 0 between the end of the BASIC program and VARTOP, which roughly estimates how much free space you have left in bank 0 for BASIC. 
- 
-Also see: FREE() 
- 
-=== PRINT 
-This command prints a number, expression, variable or string. Examples: 
- 
-    PRINT "HELLO WORLD!" 
-    PRINT A$ 
-    PRINT ASC("*") 
-    PRINT 5 
  
 == Benchmarking your Code == Benchmarking your Code
Line 420: Line 430:
  
 The memory location $EF06 is the second byte of the hardware clock, which ticks once every .256 seconds. it's a bit rough but if you need a simple timer you can do something like this. On my computer this returns 14, which indicates 7000/(14*.256) or 1,953 BASIC lines per second. Of course, we already have the WAIT command so this is not useful for waiting on time; but rather it can be used to measure approximately how long something took. The memory location $EF06 is the second byte of the hardware clock, which ticks once every .256 seconds. it's a bit rough but if you need a simple timer you can do something like this. On my computer this returns 14, which indicates 7000/(14*.256) or 1,953 BASIC lines per second. Of course, we already have the WAIT command so this is not useful for waiting on time; but rather it can be used to measure approximately how long something took.
 +
 +
 +== Dictionary
 +=== FREE()
 +This is like MEM in that it calculates the free space in bank 0 between the end of the BASIC program and VARTOP, however it returns it as an integer. Be careful because in BASIC integers are signed. So read the number like this; when it is negative, this shows how much space has been used (the zero page is reserved so it always shows -256 at start). When it is positive, then it shows how much space is left.
 +
 +Also see: MEM
 +
 +=== MEM
 +This command calculates the free space in bank 0 between the end of the BASIC program and VARTOP, which roughly estimates how much free space you have left in bank 0 for BASIC.
 +
 +Also see: FREE()
 +
 +=== PRINT
 +This command prints a number, expression, variable or string. Examples:
 +
 +    PRINT "HELLO WORLD!"
 +    PRINT A$
 +    PRINT ASC("*")
 +    PRINT 5
sd/sd-8516_stellar_basic.1774941462.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki