@nataliapc/mcp-openmsx 1.1.15 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/README.md +84 -37
  2. package/dist/server.js +101 -40
  3. package/dist/utils.js +42 -2
  4. package/dist/vectordb.js +61 -0
  5. package/package.json +8 -3
  6. package/resources/audio/msx-midi.md +872 -0
  7. package/resources/audio/psg_registers.md +281 -0
  8. package/resources/audio/sound_cartridge_scc.md +123 -0
  9. package/resources/audio/sound_cartridge_scci.md +250 -0
  10. package/resources/audio/toc.json +8 -4
  11. package/resources/book--msx2-technical-handbook/toc.json +1 -1
  12. package/resources/msx-dos/MSX-DOS_2_Environment_Variables.md +1368 -0
  13. package/resources/msx-dos/MSX-DOS_File_extensions.md +154 -0
  14. package/resources/msx-dos/toc.json +13 -0
  15. package/resources/msx-unapi/toc.json +2 -2
  16. package/resources/others/keyboard_matrices.md +243 -0
  17. package/resources/others/toc.json +6 -0
  18. package/resources/programming/asm_callbios.md +79 -0
  19. package/resources/programming/asm_docopy.md +115 -0
  20. package/resources/programming/asm_fast_loops.md +200 -0
  21. package/resources/programming/asm_getslot.md +143 -0
  22. package/resources/programming/asm_interrupts.md +202 -0
  23. package/resources/programming/asm_load_screen.md +240 -0
  24. package/resources/programming/asm_mult_div_shifts.md +487 -0
  25. package/resources/programming/asm_raminpage1.md +56 -0
  26. package/resources/programming/asm_vdp_detection.md +78 -0
  27. package/resources/programming/asm_vdp_routines.md +343 -0
  28. package/resources/programming/asm_z80_routines_collection.md +810 -0
  29. package/resources/programming/basic_wiki/ABS().md +36 -0
  30. package/resources/programming/basic_wiki/AND.md +71 -0
  31. package/resources/programming/basic_wiki/ASC().md +38 -0
  32. package/resources/programming/basic_wiki/ATN().md +36 -0
  33. package/resources/programming/basic_wiki/AUTO.md +39 -0
  34. package/resources/programming/basic_wiki/BASE().md +147 -0
  35. package/resources/programming/basic_wiki/BEEP.md +27 -0
  36. package/resources/programming/basic_wiki/BIN$().md +36 -0
  37. package/resources/programming/basic_wiki/BLOAD.md +63 -0
  38. package/resources/programming/basic_wiki/BSAVE.md +61 -0
  39. package/resources/programming/basic_wiki/CALL.md +391 -0
  40. package/resources/programming/basic_wiki/CALL_ADJUST.md +40 -0
  41. package/resources/programming/basic_wiki/CALL_IMPOSE.md +28 -0
  42. package/resources/programming/basic_wiki/CALL_OPTIONS.md +26 -0
  43. package/resources/programming/basic_wiki/CALL_PAUSE.md +119 -0
  44. package/resources/programming/basic_wiki/CALL_PCMPLAY.md +60 -0
  45. package/resources/programming/basic_wiki/CALL_PCMREC.md +70 -0
  46. package/resources/programming/basic_wiki/CDBL().md +36 -0
  47. package/resources/programming/basic_wiki/CHR$().md +51 -0
  48. package/resources/programming/basic_wiki/CINT().md +36 -0
  49. package/resources/programming/basic_wiki/CIRCLE.md +51 -0
  50. package/resources/programming/basic_wiki/CLEAR.md +39 -0
  51. package/resources/programming/basic_wiki/CLOAD.md +27 -0
  52. package/resources/programming/basic_wiki/CLOAD?.md +31 -0
  53. package/resources/programming/basic_wiki/CLOSE.md +44 -0
  54. package/resources/programming/basic_wiki/CLS.md +51 -0
  55. package/resources/programming/basic_wiki/COLOR.md +143 -0
  56. package/resources/programming/basic_wiki/COLOR=.md +93 -0
  57. package/resources/programming/basic_wiki/COLOR_SPRITE$().md +83 -0
  58. package/resources/programming/basic_wiki/COLOR_SPRITE().md +85 -0
  59. package/resources/programming/basic_wiki/CONT.md +23 -0
  60. package/resources/programming/basic_wiki/COPY.md +215 -0
  61. package/resources/programming/basic_wiki/COPY_SCREEN.md +61 -0
  62. package/resources/programming/basic_wiki/COS().md +37 -0
  63. package/resources/programming/basic_wiki/CSAVE.md +35 -0
  64. package/resources/programming/basic_wiki/CSNG().md +36 -0
  65. package/resources/programming/basic_wiki/CSRLIN.md +33 -0
  66. package/resources/programming/basic_wiki/DATA.md +47 -0
  67. package/resources/programming/basic_wiki/DEFDBL.md +40 -0
  68. package/resources/programming/basic_wiki/DEFINT.md +40 -0
  69. package/resources/programming/basic_wiki/DEFSNG.md +40 -0
  70. package/resources/programming/basic_wiki/DEFSTR.md +40 -0
  71. package/resources/programming/basic_wiki/DEF_FN.md +49 -0
  72. package/resources/programming/basic_wiki/DEF_USR.md +33 -0
  73. package/resources/programming/basic_wiki/DELETE.md +49 -0
  74. package/resources/programming/basic_wiki/DIM.md +59 -0
  75. package/resources/programming/basic_wiki/DRAW.md +77 -0
  76. package/resources/programming/basic_wiki/ELSE.md +45 -0
  77. package/resources/programming/basic_wiki/END.md +32 -0
  78. package/resources/programming/basic_wiki/EOF().md +36 -0
  79. package/resources/programming/basic_wiki/EQV.md +76 -0
  80. package/resources/programming/basic_wiki/ERASE.md +35 -0
  81. package/resources/programming/basic_wiki/ERL.md +34 -0
  82. package/resources/programming/basic_wiki/ERR.md +143 -0
  83. package/resources/programming/basic_wiki/ERROR.md +145 -0
  84. package/resources/programming/basic_wiki/EXP().md +38 -0
  85. package/resources/programming/basic_wiki/FIELD.md +48 -0
  86. package/resources/programming/basic_wiki/FIX().md +44 -0
  87. package/resources/programming/basic_wiki/FN.md +61 -0
  88. package/resources/programming/basic_wiki/FOR...NEXT.md +80 -0
  89. package/resources/programming/basic_wiki/FRE().md +66 -0
  90. package/resources/programming/basic_wiki/GET_DATE.md +60 -0
  91. package/resources/programming/basic_wiki/GET_TIME.md +34 -0
  92. package/resources/programming/basic_wiki/GOSUB.md +41 -0
  93. package/resources/programming/basic_wiki/GOTO.md +41 -0
  94. package/resources/programming/basic_wiki/HEX$().md +36 -0
  95. package/resources/programming/basic_wiki/IF...GOTO...ELSE.md +55 -0
  96. package/resources/programming/basic_wiki/IF...THEN...ELSE.md +50 -0
  97. package/resources/programming/basic_wiki/IMP.md +83 -0
  98. package/resources/programming/basic_wiki/INKEY$.md +65 -0
  99. package/resources/programming/basic_wiki/INP().md +33 -0
  100. package/resources/programming/basic_wiki/INPUT$().md +51 -0
  101. package/resources/programming/basic_wiki/INPUT.md +93 -0
  102. package/resources/programming/basic_wiki/INSTR().md +44 -0
  103. package/resources/programming/basic_wiki/INT().md +44 -0
  104. package/resources/programming/basic_wiki/INTERVAL.md +57 -0
  105. package/resources/programming/basic_wiki/KEY().md +51 -0
  106. package/resources/programming/basic_wiki/KEY.md +254 -0
  107. package/resources/programming/basic_wiki/LEFT$().md +39 -0
  108. package/resources/programming/basic_wiki/LEN().md +36 -0
  109. package/resources/programming/basic_wiki/LET.md +68 -0
  110. package/resources/programming/basic_wiki/LINE.md +74 -0
  111. package/resources/programming/basic_wiki/LINE_INPUT.md +79 -0
  112. package/resources/programming/basic_wiki/LIST.md +58 -0
  113. package/resources/programming/basic_wiki/LLIST.md +43 -0
  114. package/resources/programming/basic_wiki/LOAD.md +56 -0
  115. package/resources/programming/basic_wiki/LOCATE.md +67 -0
  116. package/resources/programming/basic_wiki/LOG().md +36 -0
  117. package/resources/programming/basic_wiki/LPOS().md +31 -0
  118. package/resources/programming/basic_wiki/LPRINT.md +46 -0
  119. package/resources/programming/basic_wiki/MAXFILES.md +39 -0
  120. package/resources/programming/basic_wiki/MERGE.md +54 -0
  121. package/resources/programming/basic_wiki/MID$().md +72 -0
  122. package/resources/programming/basic_wiki/MOD.md +39 -0
  123. package/resources/programming/basic_wiki/MOTOR.md +46 -0
  124. package/resources/programming/basic_wiki/NEW.md +27 -0
  125. package/resources/programming/basic_wiki/NOT.md +61 -0
  126. package/resources/programming/basic_wiki/OCT$().md +36 -0
  127. package/resources/programming/basic_wiki/ON...GOSUB.md +45 -0
  128. package/resources/programming/basic_wiki/ON...GOTO.md +42 -0
  129. package/resources/programming/basic_wiki/ON_ERROR_GOTO.md +61 -0
  130. package/resources/programming/basic_wiki/ON_INTERVAL_GOSUB.md +54 -0
  131. package/resources/programming/basic_wiki/ON_KEY_GOSUB.md +56 -0
  132. package/resources/programming/basic_wiki/ON_SPRITE_GOSUB.md +41 -0
  133. package/resources/programming/basic_wiki/ON_STOP_GOSUB.md +56 -0
  134. package/resources/programming/basic_wiki/ON_STRIG_GOSUB.md +70 -0
  135. package/resources/programming/basic_wiki/OPEN.md +103 -0
  136. package/resources/programming/basic_wiki/OR.md +75 -0
  137. package/resources/programming/basic_wiki/OUT.md +35 -0
  138. package/resources/programming/basic_wiki/PAD().md +110 -0
  139. package/resources/programming/basic_wiki/PAINT.md +66 -0
  140. package/resources/programming/basic_wiki/PDL().md +53 -0
  141. package/resources/programming/basic_wiki/PEEK().md +44 -0
  142. package/resources/programming/basic_wiki/PLAY().md +58 -0
  143. package/resources/programming/basic_wiki/PLAY.md +196 -0
  144. package/resources/programming/basic_wiki/POINT.md +52 -0
  145. package/resources/programming/basic_wiki/POKE.md +51 -0
  146. package/resources/programming/basic_wiki/POS().md +36 -0
  147. package/resources/programming/basic_wiki/PRESET.md +61 -0
  148. package/resources/programming/basic_wiki/PRINT.md +179 -0
  149. package/resources/programming/basic_wiki/PSET.md +82 -0
  150. package/resources/programming/basic_wiki/PUT_KANJI.md +93 -0
  151. package/resources/programming/basic_wiki/PUT_SPRITE.md +143 -0
  152. package/resources/programming/basic_wiki/READ.md +45 -0
  153. package/resources/programming/basic_wiki/REM.md +42 -0
  154. package/resources/programming/basic_wiki/RENUM.md +78 -0
  155. package/resources/programming/basic_wiki/RESTORE.md +52 -0
  156. package/resources/programming/basic_wiki/RESUME.md +45 -0
  157. package/resources/programming/basic_wiki/RETURN.md +47 -0
  158. package/resources/programming/basic_wiki/RIGHT$().md +39 -0
  159. package/resources/programming/basic_wiki/RND().md +51 -0
  160. package/resources/programming/basic_wiki/RUN.md +56 -0
  161. package/resources/programming/basic_wiki/SAVE.md +65 -0
  162. package/resources/programming/basic_wiki/SCREEN.md +164 -0
  163. package/resources/programming/basic_wiki/SET_ADJUST.md +66 -0
  164. package/resources/programming/basic_wiki/SET_BEEP.md +76 -0
  165. package/resources/programming/basic_wiki/SET_DATE.md +103 -0
  166. package/resources/programming/basic_wiki/SET_PAGE.md +52 -0
  167. package/resources/programming/basic_wiki/SET_PASSWORD.md +75 -0
  168. package/resources/programming/basic_wiki/SET_PROMPT.md +61 -0
  169. package/resources/programming/basic_wiki/SET_SCREEN.md +100 -0
  170. package/resources/programming/basic_wiki/SET_SCROLL.md +55 -0
  171. package/resources/programming/basic_wiki/SET_TIME.md +83 -0
  172. package/resources/programming/basic_wiki/SET_TITLE.md +87 -0
  173. package/resources/programming/basic_wiki/SET_VIDEO.md +49 -0
  174. package/resources/programming/basic_wiki/SGN().md +38 -0
  175. package/resources/programming/basic_wiki/SIN().md +36 -0
  176. package/resources/programming/basic_wiki/SOUND.md +188 -0
  177. package/resources/programming/basic_wiki/SPACE$().md +38 -0
  178. package/resources/programming/basic_wiki/SPC().md +34 -0
  179. package/resources/programming/basic_wiki/SPRITE$().md +50 -0
  180. package/resources/programming/basic_wiki/SPRITE.md +31 -0
  181. package/resources/programming/basic_wiki/SQR().md +32 -0
  182. package/resources/programming/basic_wiki/STICK().md +70 -0
  183. package/resources/programming/basic_wiki/STOP.md +70 -0
  184. package/resources/programming/basic_wiki/STR$().md +37 -0
  185. package/resources/programming/basic_wiki/STRIG().md +82 -0
  186. package/resources/programming/basic_wiki/STRING$().md +42 -0
  187. package/resources/programming/basic_wiki/SWAP.md +62 -0
  188. package/resources/programming/basic_wiki/TAB().md +38 -0
  189. package/resources/programming/basic_wiki/TAN().md +36 -0
  190. package/resources/programming/basic_wiki/TIME.md +59 -0
  191. package/resources/programming/basic_wiki/TROFF.md +21 -0
  192. package/resources/programming/basic_wiki/TRON.md +39 -0
  193. package/resources/programming/basic_wiki/USR().md +66 -0
  194. package/resources/programming/basic_wiki/VAL().md +36 -0
  195. package/resources/programming/basic_wiki/VARPTR().md +50 -0
  196. package/resources/programming/basic_wiki/VDP().md +103 -0
  197. package/resources/programming/basic_wiki/VPEEK().md +46 -0
  198. package/resources/programming/basic_wiki/VPOKE.md +48 -0
  199. package/resources/programming/basic_wiki/WAIT.md +38 -0
  200. package/resources/programming/basic_wiki/WIDTH.md +76 -0
  201. package/resources/programming/basic_wiki/XOR.md +72 -0
  202. package/resources/programming/basic_wiki/_toc.json +871 -0
  203. package/resources/programming/dos_error_handling.md +85 -0
  204. package/resources/programming/toc.json +51 -36
  205. package/resources/programming/vdp_commands_speed.md +147 -0
  206. package/resources/programming/vdp_programming_faq.md +55 -0
  207. package/resources/programming/vdp_programming_tutorial.md +390 -0
  208. package/resources/programming/vdp_screensplit_programming_guide.md +166 -0
  209. package/resources/programming/vdp_scrolling_on_msx.md +124 -0
  210. package/resources/programming/vdp_the_yjk_screen_modes.md +227 -0
  211. package/resources/programming/vdp_v9938_vram_timings.md +539 -0
  212. package/resources/programming/vdp_v9938_vram_timings_part_2.md +281 -0
  213. package/resources/sdcc/toc.json +1 -1
  214. package/vector-db/index.json +1 -0
  215. /package/resources/msx-unapi/{Ethernet_UNAPI_specification_1.1.md → Ethernet_UNAPI_specification_1_1.md} +0 -0
  216. /package/resources/msx-unapi/{MSX_UNAPI_specification_1.1.md → MSX_UNAPI_specification_1_1.md} +0 -0
@@ -0,0 +1,36 @@
1
+ # ABS()
2
+
3
+ ## Effect
4
+
5
+ Returns the absolute value of a value.
6
+
7
+ ## Syntax
8
+
9
+ `ABS (<Expression>)`
10
+
11
+ # Parameter
12
+
13
+ `<Expression>` can be a value, a numeric variable or an mathematical expression.
14
+
15
+ ## Example
16
+
17
+ ```basic
18
+ 10 PRINT "The absolute value of 5 is ";ABS(5)
19
+ 20 PRINT "The absolute value of -1.23 is ";ABS(-1.23)
20
+
21
+ RUN
22
+ The absolute value of 5 is 5
23
+ The absolute value of -1.23 is 1.23
24
+ ```
25
+
26
+ ## Related to
27
+
28
+ `INT()`, `FIX()`, `SGN()`
29
+
30
+ ## Compatibility
31
+
32
+ MSX-BASIC 1.0 or higher
33
+
34
+ ## Source
35
+
36
+ Retrieved from "https://www.msx.org/wiki/ABS()"
@@ -0,0 +1,71 @@
1
+ # AND
2
+
3
+ ## Effect
4
+
5
+ Performs a bitwise AND-operation (logical conjunction) between two expressions.
6
+ The bit is set if both bits are set. For each bit, the results are:
7
+ ```
8
+ 0 AND 0 = 0
9
+ 0 AND 1 = 0
10
+ 1 AND 0 = 0
11
+ 1 AND 1 = 1
12
+ ```
13
+ The AND-operation is often used to "mask" one or more bits.
14
+
15
+ ## Syntax
16
+ `<Value> AND <Value>`
17
+
18
+ ## Parameter
19
+
20
+ `<Value>` is a value between -32768 and 32767. It can also be a numeric variable, an mathematical expression or expression from a condition.
21
+
22
+ Notes:
23
+ - If you use binary expressions, it is best to put the first expression in parenthesis to avoid the bug in interpreter that causes a syntax error. This problem does not happen with decimal, hexadecimal or octal expressions.
24
+ - When the expression is performed in a condition (`IF...THEN...ELSE` or `IF...GOTO...ELSE`), if the result of the whole expression is zero the value is taken as false, otherwise it's taken as true.
25
+
26
+ ## Examples
27
+
28
+ ```basic
29
+ PRINT 15 AND 11
30
+ 11
31
+ ```
32
+ Binary explanation:
33
+ ```
34
+ 1111
35
+ 1011 AND
36
+ ----
37
+ 1011
38
+ ```
39
+
40
+ ```basic
41
+ PRINT 6 AND 13
42
+ 4
43
+ ```
44
+ Binary explanation:
45
+ ```
46
+ 0110
47
+ 1101 AND
48
+ ----
49
+ 0100
50
+ ```
51
+
52
+ ```basic
53
+ PRINT &B00001111 AND &B11110001
54
+ 15
55
+ Syntax error
56
+ Ok
57
+ PRINT (&B00001111) AND &B11110001
58
+ 1
59
+ ```
60
+
61
+ ## Related to
62
+
63
+ `EQV`, `IMP`, `MOD`, `NOT`, `OR`, `XOR`
64
+
65
+ ## Compatibility
66
+
67
+ MSX-BASIC 1.0 or higher
68
+
69
+ ## Source
70
+
71
+ Retrieved from "https://www.msx.org/wiki/AND"
@@ -0,0 +1,38 @@
1
+ # ASC()
2
+
3
+ ## Effect
4
+
5
+ Returns the ASCII value of a character.
6
+
7
+ _Remark: It will always return the value 1 for the characters 0 to 31 without giving the second value associated to these characters._
8
+
9
+ ## Syntax
10
+
11
+ `ASC(<Character>)`
12
+
13
+ # Parameter
14
+
15
+ `<Character>` is a character between quotation mark. It can also be a string or an alphanumeric variable but only the 1st character will be taken into account.
16
+
17
+ ## Example
18
+
19
+ ```basic
20
+ 10 PRINT "The ASCII value of B is ";ASC("B")
21
+ 20 PRINT "The ASCII value of MSX is ";ASC("MSX")
22
+  
23
+ RUN
24
+ The ASCII value of B is 66
25
+ The ASCII value of MSX is 77
26
+ ```
27
+
28
+ ## Related to
29
+
30
+ `CHR$()`, `STRING$()`
31
+
32
+ ## Compatibility
33
+
34
+ MSX-BASIC 1.0 or higher
35
+
36
+ ## Source
37
+
38
+ Retrieved from "https://www.msx.org/wiki/ASC()"
@@ -0,0 +1,36 @@
1
+ # ATN()
2
+
3
+ ## Effect
4
+
5
+ Returns the arctangent of a variable.
6
+
7
+ ## Syntax
8
+
9
+ `ATN(<Number>)`
10
+
11
+ ## Parameter
12
+
13
+ `<Number>` can be a value, a numeric variable or an expression.
14
+
15
+ ## Example
16
+
17
+ ```basic
18
+ 10 PRINT "The arctangent of 1 is ";ATN(1)
19
+ 20 PRINT "The arctangent of -1.23 is ";ATN(-1.23)
20
+  
21
+ RUN
22
+ The arctangent of 1 is .78539816339745
23
+ The arctangent of -1.23 is .88817377437769
24
+ ```
25
+
26
+ ## Related to
27
+
28
+ `COS()`, `SIN()`, `TAN()`
29
+
30
+ ## Compatibility
31
+
32
+ MSX-BASIC 1.0 or higher
33
+
34
+ ## Source
35
+
36
+ Retrieved from "https://www.msx.org/wiki/ATN()"
@@ -0,0 +1,39 @@
1
+ # AUTO
2
+
3
+ ## Effect
4
+
5
+ Starts automatic line numbering.
6
+
7
+ This instruction is useful when you program a game or application in MSX-BASIC. A `*` (asterisk) character will indicate that a line number is already in use.
8
+
9
+ You can stop this operation mode by pressing `CTRL`+`C`.
10
+
11
+ ## Syntax
12
+
13
+ `AUTO <LineStart>,<Increment>`
14
+
15
+ _Note: Each parameter is optional except the last specified. Do not put a comma after this parameter._
16
+
17
+ ## Parameters
18
+
19
+ `<LineStart>` is a line number between 0 and 65529. (10 by default)
20
+
21
+ `<Increment>` is a number between 0 and 65529. When it is not specified, the lines of your program will be incremented in steps of 10.
22
+
23
+ ## Example
24
+
25
+ ```basic
26
+ AUTO 100,20
27
+ ```
28
+
29
+ ## Related to
30
+
31
+ `DELETE`, `LIST`, `LLIST`, `RENUM`
32
+
33
+ ## Compatibility
34
+
35
+ MSX-BASIC 1.0 or higher
36
+
37
+ ## Source
38
+
39
+ Retrieved from "https://www.msx.org/wiki/AUTO"
@@ -0,0 +1,147 @@
1
+ # BASE()
2
+
3
+ ## Effect
4
+
5
+ This instruction can be used in:
6
+
7
+ - reading mode for all supported screen modes : it returns then the first VRAM address for a specific purpose. In SCREEN 5 to 8 and 10 to 12, you'll get the offset value from the starting address of the active page (see SET PAGE).
8
+ - writing mode, which works only for table numbers from 0 to 19, corresponding to SCREEN 0 to 3 : it allows then to change the first VRAM address for a specific purpose. VDP registers will be updated automatically. The value should be possible for VDP to implement and must be less than `&H4000` otherwise Illegal function call-error will be generated.
9
+
10
+ _Notes: A change in table numbers from 10 to 14 for `SCREEN 2` will also change the corresponding VRAM address for `SCREEN 4`._
11
+
12
+ ## Syntax
13
+
14
+ `BASE(<TableNumber>)`
15
+
16
+ ## Parameter
17
+
18
+ `<TableNumber>` that returns corresponding VRAM address can be calculated with formula 5 * SCREEN MODE + PURPOSE. All the practically usable values are listed in a table below (for most screens, the type column contains the names of these screens for the VDP).
19
+
20
+ |MSX|SCREEN|Type|Name Table|Color Table|Pattern Table|Sprite Attribute Table|Sprite Pattern Table|
21
+ |:--|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
22
+ |MSX|0|Text 1/2|0|-|2|-|-|
23
+ |MSX|1|Text <sup>(*)</sup>Graphic 1|5|6|7|8|9|
24
+ |MSX|2|Graphic 2|10|11|12|13|14|
25
+ |MSX|3|Graphic<br>Multicolor|15|-|17|18|19|
26
+ |MSX2|4|Graphic 3|20|21|22|23|24|
27
+ |MSX2|5|Graphic 4|25|-|-|28|29|
28
+ |MSX2|6|Graphic 5|30|-|-|33|34|
29
+ |MSX2|7|Graphic 6|35|-|-|38|39|
30
+ |MSX2|8|Graphic 7|40|-|-|43|44|
31
+ |MSX2|9|Text <sup>(**)</sup>|-|-|-|-|-|
32
+ |MSX2+|10|Graphic 7|50|-|-|53|54|
33
+ |MSX2+|11|Graphic 7|55|-|-|58|59|
34
+ |MSX2+|12|Graphic 7|60|-|-|63|64|
35
+
36
+
37
+ _<sup>(*)</sup> SCREEN 1 is a text screen, but the charset can be filled with game graphics and sprites can also be used._
38
+ _<sup>(**)</sup> SCREEN 9 is a text screen, initially conceived for Korean characters, and using graphic mode SCREEN 5 or SCREEN 6._
39
+
40
+ The Sprite Color Table, available only on MSX2 and higher and used for the sprites type 2 on screens 4 to 8 and 10 to 12 is located "strictly above" the sprite attribute table, having base address of sprite attribute table minus 512 (200 in hexadecimal).
41
+
42
+ ## Examples
43
+
44
+ ```basic
45
+ PRINT BASE(2)
46
+ 2048
47
+ ```
48
+
49
+ ```basic
50
+ 10 SC=PEEK(&amp;HFCAF) ' Current screen mode (= 0/1 for text)
51
+ 11 A=ASC("!")*8+BASE(SC*5+2) ' VRAM address for "!"-font outlook
52
+ 12 FOR I=0 TO 7:READ D$:VPOKEA+I,VAL("&amp;B"+D$):NEXT I
53
+ 13 'New look (Note: Two last columns are not in use in screen 0)
54
+ 14 DATA 00110000
55
+ 15 DATA 01111000
56
+ 16 DATA 01111000
57
+ 17 DATA 00110000
58
+ 18 DATA 00000000
59
+ 19 DATA 00110000
60
+ 20 DATA 00110000
61
+ 21 DATA 00000000
62
+ ```
63
+
64
+ ```basic
65
+ 10 COLOR 15,4,7: KEYOFF
66
+ 20 BASE(5)=BASE(6)
67
+ 30 SCREEN 1
68
+ 40 FOR I = 0 TO 38
69
+ 50 PRINT"A TEST OF THE BASE COMMAND"
70
+ 60 FOR J = 0 TO 100
71
+ 70 NEXT J
72
+ 80 NEXT I
73
+ 90 LIST
74
+ 100 END
75
+ ```
76
+
77
+ ## Returned default values (after boot)
78
+
79
+ ### Name Table
80
+
81
+ |SCREEN|Decimal|Hexadecimal|
82
+ |:-:|--:|:-:|
83
+ |0|0|0000|
84
+ |1-2|6144|1800|
85
+ |3|2048|0800|
86
+ |4|6144|1800|
87
+ |5-8|0|0000|
88
+ |10-12|0|0000|
89
+
90
+ ### Color Table
91
+
92
+ |SCREEN|Decimal|Hexadecimal|
93
+ |:-:|--:|:-:|
94
+ |1-2|8192|2000|
95
+ |4|8192|2000|
96
+
97
+ ### Pattern Table
98
+
99
+ |SCREEN|Decimal|Hexadecimal|
100
+ |:-:|--:|:-:|
101
+ |0|2048|0800|
102
+ |1-4|0|0000|
103
+
104
+ ### Sprite Attribute Table
105
+
106
+ |SCREEN|Decimal|Hexadecimal|
107
+ |:-:|--:|:-:|
108
+ |1-3|6912|1B00|
109
+ |4|7680|1E00|
110
+ |5-6|30208|7600|
111
+ |7-8|64000|FA00|
112
+ |10-12|64000|FA00|
113
+
114
+ ### Sprite Pattern Table
115
+
116
+ |SCREEN|Decimal|Hexadecimal|
117
+ |:-:|--:|:-:|
118
+ |1-4|14336|3800|
119
+ |5-6|30720|7800|
120
+ |7-8|61440|F000|
121
+ |10-12|61440|F000|
122
+
123
+ ### Sprite Color Table
124
+
125
+ |SCREEN|Decimal|Hexadecimal|
126
+ |:-:|--:|:-:|
127
+ |4|7168|1C00|
128
+ |5-6|29696|7400|
129
+ |7-8|63488|F800|
130
+ |10-12|63488|F800|
131
+
132
+ ## References
133
+
134
+ - VDP Ports
135
+ - VDP Registers
136
+
137
+ ## Related to
138
+
139
+ `SCREEN`, `SET PAGE`, `VDP()`, `VPOKE`, `VPEEK`
140
+
141
+ ## Compatibility
142
+
143
+ MSX-BASIC 1.0 or higher
144
+
145
+ ## Source
146
+
147
+ Retrieved from "https://www.msx.org/wiki/BASE()"
@@ -0,0 +1,27 @@
1
+ # BEEP
2
+
3
+ ## Effect
4
+
5
+ Lets the PSG produce a simple 'beep' sound:
6
+ - On MSX1 this is plain note E on octave 6 (1316Hz) with volume 7.
7
+ - On MSX2 and higher, different volumes and more complex 'beep' sounds can be selected with `SET BEEP`.
8
+
9
+ _Notes:_
10
+ - `BEEP` can be replaced by `PRINT CHR$(7);`
11
+ - If you're playing around with the `SOUND` instruction and have some very irritating sounds playing, the quickest and easiest way to silence all 3 PSG channels (without resetting your MSX) is to hit `CTRL`+`G` that produces the 'beep' sound.
12
+
13
+ ## Syntax
14
+
15
+ `BEEP`
16
+
17
+ ## Related to
18
+
19
+ `CHR$()`, `SET BEEP`, `SOUND`
20
+
21
+ ## Compatibility
22
+
23
+ MSX-BASIC 1.0 or higher
24
+
25
+ ## Source
26
+
27
+ Retrieved from "https://www.msx.org/wiki/BEEP"
@@ -0,0 +1,36 @@
1
+ # BIN$()
2
+
3
+ ## Effect
4
+
5
+ Returns a string with the binary representation of a value.
6
+
7
+ ## Syntax
8
+
9
+ `BIN$(<Value>)`
10
+
11
+ ## Parameter
12
+
13
+ `<Value>` must be an expression, a numeric variable or a value between -32768 and 65535. A single or double precision value can be used but digits after the decimal point will be ignored.
14
+
15
+ ## Example
16
+
17
+ ```basic
18
+ 10 PRINT "The binary representation of 8 is ";BIN$(8)
19
+ 20 PRINT "The binary representation of 127 is ";BIN$(127)
20
+
21
+ RUN
22
+ The binary representation of 8 is 1000
23
+ The binary representation of 127 is 11011
24
+ ```
25
+
26
+ ## Related to
27
+
28
+ `HEX$`, `OCT$`
29
+
30
+ ## Compatibility
31
+
32
+ MSX-BASIC 1.0 or higher
33
+
34
+ ## Source
35
+
36
+ Retrieved from "https://www.msx.org/wiki/BIN$()"
@@ -0,0 +1,63 @@
1
+ # BLOAD
2
+
3
+ ## Effect
4
+
5
+ Loads binary code from the specified device and/or filename.
6
+
7
+ ## Syntaxes
8
+
9
+ `BLOAD "<Device>:<Path>\<Filename>",R,<Offset>`
10
+
11
+ `BLOAD "<Device>:<Path>\<Filename>",S,<Offset>`
12
+
13
+ _Notes:_
14
+ - Character backslash `\` serves as a separator between the folders and the file name. You don't have to put it after the colon of the device name.
15
+ - Character backslash is replaced by the character yen `¥` on Japanese MSX or the character won `₩` on Korean MSX.
16
+ - Parameters can not end with a comma alone.
17
+
18
+ ## Parameters
19
+
20
+ `<Device>` is device name to indicate the device to use. Here are the useful devices for BLOAD:
21
+
22
+ |Device type|Device name|Remark|
23
+ |---|---|---|
24
+ |Disk drive|A, B, C, D, E, F, G, H|A floppy disk interface can control up to 2 drives.|
25
+ |Data recorder|CAS|Not available on MSX turbo R|
26
+
27
+ By default, the loading will be made from tape on a system without any disk drive, from the current active drive (generally drive A) in the other cases.
28
+
29
+ `<Path>` is used to specify the location in folders of file to be used in the copying operation. Each folder name in path are separate by a backslash `\`. This parameter is only available under MSX-DOS 2 / Nextor.
30
+
31
+ `<Filename>` is the name of the binary file to load. It needs to be specified if the file is on disk or memory disk. If you use a tape and don't indicate the file name, BLOAD will load the first binary file found on tape.
32
+
33
+ When the file is saved on tape the format of file name is case sensitive and limited to 6 characters without extension. If another device is used, then the format is 8 characters followed by a point and an extension with 3 characters. (Not case sensitive).
34
+
35
+ `R` parameter is used to run automatically the binary code contained in the loaded file.
36
+
37
+ `S` parameter is used to load the contents to VRAM (only from disk) - This can be done in any screen mode but only the active pages are valid when the screen mode is higher than 4.
38
+
39
+ `<Offset>` indicates the program will be loaded at &lt;StartAddress&gt; + &lt;Offset&gt;. This parameter also affects the execution address.
40
+
41
+ ## Examples
42
+
43
+ ```basic
44
+ BLOAD "CAS:test",R,&H20
45
+ ```
46
+ ```basic
47
+ BLOAD "A:TEST.BIN",R
48
+ ```
49
+ ```basic
50
+ BLOAD "PICTURE.SC2",S
51
+ ```
52
+
53
+ ## Related to
54
+
55
+ `BSAVE`
56
+
57
+ ## Compatibility
58
+
59
+ MSX-BASIC 1.0 or higher
60
+
61
+ ## Source
62
+
63
+ Retrieved from "https://www.msx.org/wiki/BLOAD"
@@ -0,0 +1,61 @@
1
+ # BSAVE
2
+
3
+ ## Effect
4
+
5
+ Saves a specified area of memory to the specified device and/or file name.
6
+
7
+ ## Syntaxes
8
+
9
+ `BSAVE "<Device>:<Path>\<Filename>",<StartAddress>,<EndAddress>,<ExecutionAddress>`
10
+
11
+ `BSAVE "<Device>:\<Path>\<Filename>",<StartAddress>,<EndAddress>,S`
12
+
13
+ _Notes:_
14
+ - Character backslash `\` serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name.
15
+ - Character backslash is replaced by the character yen `¥` on Japanese MSX or the character won `₩` on Korean MSX.
16
+ - Parameters can not end with a comma alone.
17
+
18
+ ## Parameters
19
+
20
+ `<Device>` is device name to indicate the device to use. Here are the useful devices for BSAVE:
21
+
22
+ |Device type|Device name|Remark|
23
+ |---|---|---|
24
+ |Disk drive|A, B, C, D, E, F, G, H|A floppy disk interface can control up to 2 drives.|
25
+ |Data recorder|CAS|Not available on MSX turbo R|
26
+
27
+ By default, the saving will be made to tape on a system without any disk drive, to the current active drive (generally drive A:) in the other cases.
28
+
29
+ `<Path>` is used to specify the location in folders of file to be used in the copying operation. Each folder name in path are separate by a backslash `\`. This parameter is only available under MSX-DOS 2 / Nextor.
30
+
31
+ `<Filename>` is the name of binary file to save. When the file is saved on tape the format of file name is case sensitive and limited to 6 characters without extension. If another device is used, then the format is 8 characters followed by a point and an extension with 3 characters. (Not case sensitive).
32
+
33
+ `<StartAddress>` and `<EndAddress>` are used to specify the area of the computer RAM (or VRAM).
34
+
35
+ `<ExecutionAddress>` is the address at which the saved code should start, when loaded with `BLOAD` `,R`. By default the start address is set.
36
+
37
+ The parameter `S` is used to save the contents of VRAM (only to disk) - This can be done in any screen mode but only the active pages are valid when the screen mode is higher than 4.
38
+
39
+ ## Examples
40
+
41
+ ```basic
42
+ BSAVE "CAS:test",&amp;HC000,&amp;HD0FF,&amp;HC020
43
+ ```
44
+ ```basic
45
+ BSAVE "A:TEST.BIN",&amp;HC000,&amp;HD0FF,&amp;HC020
46
+ ```
47
+ ```basic
48
+ BSAVE "PICTURE.SC2",&amp;H0,&amp;H3FFF,S
49
+ ```
50
+
51
+ ## Related to
52
+
53
+ `BLOAD`
54
+
55
+ ## Compatibility
56
+
57
+ MSX-BASIC 1.0 or higher
58
+
59
+ ## Source
60
+
61
+ Retrieved from "https://www.msx.org/wiki/BSAVE"