@nataliapc/mcp-openmsx 1.2.10 → 1.2.12

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 (60) hide show
  1. package/README.md +20 -2
  2. package/dist/chunker.js +187 -0
  3. package/dist/embedder.js +250 -0
  4. package/dist/server.js +6 -1
  5. package/dist/server_tools.js +6 -5
  6. package/dist/vectordb.js +94 -35
  7. package/package.json +4 -8
  8. package/resources/audio/chipsfmpacpr1_en.md +209 -0
  9. package/resources/audio/chipsfmpacpr2_en.md +170 -0
  10. package/resources/audio/toc.json +12 -0
  11. package/resources/book--msx-top-secret-3/MTS3-Appendix-English-Upd2.pdf +0 -0
  12. package/resources/book--msx-top-secret-3/MTS3-Complete-English.pdf +0 -0
  13. package/resources/book--msx-top-secret-3/mts3-appendix-english-upd2.md +25863 -0
  14. package/resources/book--msx-top-secret-3/mts3-complete-english.md +44895 -0
  15. package/resources/book--msx2-technical-handbook/toc.json +1 -1
  16. package/resources/book--the-msx-red-book/Chapter1_Programmable_Peripheral_Interface.md +112 -0
  17. package/resources/book--the-msx-red-book/Chapter2_Video_Display_Processor.md +308 -0
  18. package/resources/book--the-msx-red-book/Chapter3_Programmable_Sound_Generator.md +168 -0
  19. package/resources/book--the-msx-red-book/Chapter4_ROM_BIOS.md +2528 -0
  20. package/resources/book--the-msx-red-book/Chapter5_ROM_BASIC_Interpreter.md +3975 -0
  21. package/resources/book--the-msx-red-book/Chapter6_Memory_Map.md +1963 -0
  22. package/resources/book--the-msx-red-book/Chapter7_Machine_Code_Programs.md +1238 -0
  23. package/resources/book--the-msx-red-book/Introduction.md +104 -0
  24. package/resources/book--the-msx-red-book/toc.json +38 -3
  25. package/resources/processors/toc.json +3 -3
  26. package/resources/processors/z80-undocumented.md +141 -0
  27. package/resources/programming/asm_develop_a_program_in_cartridge_rom.md +1881 -0
  28. package/resources/programming/toc.json +6 -0
  29. package/resources/sdcc/1_Introduction.md +199 -0
  30. package/resources/sdcc/2_Installing_SDCC.md +533 -0
  31. package/resources/sdcc/3_Using_SDCC.md +1758 -0
  32. package/resources/sdcc/4_Notes_on_supported_Processors.md +1638 -0
  33. package/resources/sdcc/5_Debugging.md +210 -0
  34. package/resources/sdcc/6_Tips_and_Support.md +258 -0
  35. package/resources/sdcc/7_SDCC_Technical_Data.md +489 -0
  36. package/resources/sdcc/8_Compiler_internals.md +477 -0
  37. package/resources/sdcc/toc.json +44 -2
  38. package/resources/system/how_to_detect_ram.md +14 -0
  39. package/resources/system/mrc_wiki_megarom_mappers.md +533 -0
  40. package/resources/system/the_memory.md +118 -0
  41. package/resources/system/toc.json +18 -0
  42. package/vector-db/__manifest/_transactions/0-675ee228-bffb-4636-80e5-cdfde25cc4fe.txn +2 -0
  43. package/vector-db/__manifest/_versions/18446744073709551614.manifest +0 -0
  44. package/vector-db/__manifest/_versions/latest_version_hint.json +1 -0
  45. package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/metadata.lance +0 -0
  46. package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_docs.lance +0 -0
  47. package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_invert.lance +0 -0
  48. package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_tokens.lance +0 -0
  49. package/vector-db/msxdocs.lance/_transactions/0-dd155672-40e6-4c6a-942f-7fcbe8c3dbd0.txn +0 -0
  50. package/vector-db/msxdocs.lance/_transactions/1-e7230cbd-ce8e-465c-9b85-b91443862427.txn +0 -0
  51. package/vector-db/msxdocs.lance/_versions/18446744073709551613.manifest +0 -0
  52. package/vector-db/msxdocs.lance/_versions/18446744073709551614.manifest +0 -0
  53. package/vector-db/msxdocs.lance/_versions/latest_version_hint.json +1 -0
  54. package/vector-db/msxdocs.lance/data/000100110110001011110001fc578141d296825d0bea11c95d.lance +0 -0
  55. package/resources/book--the-msx-red-book/the_msx_red_book.md +0 -10349
  56. package/resources/processors/z80-undocumented.tex +0 -5617
  57. package/resources/sdcc/lyx2md.py +0 -745
  58. package/resources/sdcc/sdccman.lyx +0 -81574
  59. package/resources/sdcc/sdccman.md +0 -5557
  60. package/vector-db/index.json +0 -1
@@ -0,0 +1,533 @@
1
+ # MegaROM Mappers
2
+
3
+ Source: https://www.msx.org/wiki/MegaROM_Mappers
4
+
5
+ This page was last modified 15:12, 26 May 2025 by Gdx. Based on work by Slor and Mars2000you and others.
6
+
7
+ ## Contents
8
+ 1. [Introduction](#Introduction)
9
+ 2. [Description of known ROM Mappers](#Description_of_known_ROM_Mappers)
10
+ + [2.1 ASCII 8K](#ASCII_8K)
11
+ + [2.2 ASCII 16K](#ASCII_16K)
12
+ + [2.3 Black Box, Deluxe Box and Golden Box (Zemina)](#Black_Box.2C_Deluxe_Box_and_Golden_Box_.28Zemina.29)
13
+ + [2.4 Cross Blaim (db-Soft)](#Cross_Blaim_.28db-Soft.29)
14
+ + [2.5 Dooly The Little Dinosaur](#Dooly_The_Little_Dinosaur) (Daou Infosys) / 아기공룡 둘리 (다우 정보시스템)
15
+ + [2.6 ESE-RAM (aka Mega-SRAM)](#ESE-RAM_.28aka_Mega-SRAM.29)
16
+ + [2.7 Game Master 2 (Konami)](#Game_Master_2_.28Konami.29)
17
+ + [2.8 Generic 8K](#Generic_8K)
18
+ + [2.9 Generic 16K](#Generic_16K)
19
+ + [2.10 Halnote (HAL)](#Halnote_.28HAL.29)
20
+ + [2.11 Harry Fox - The Demonic Snow Beast](#Harry_Fox_-_The_Demonic_Snow_Beast) (Micro Cabin) / は~りぃふぉっくす雪の魔王編 (マイクロキャビン)
21
+ + [2.12 Holy Quran (Al-Alamiah)](#Holy_Quran_.28Al-Alamiah.29)
22
+ + [2.13 Konami MegaROMs with SCC](#Konami_MegaROMs_with_SCC)
23
+ + [2.14 Konami MegaROMs without SCC](#Konami_MegaROMs_without_SCC)
24
+ + [2.15 Konami Sound Cartridge for Snatcher or SD Snatcher](#Konami_Sound_Cartridge_for_Snatcher_or_SD_Snatcher)
25
+ + [2.16 MegaRam DDX (Digital Design)](#MegaRam_DDX_.28Digital_Design.29)
26
+ + [2.17 MSX-DOS 2 (ASCII)](#MSX-DOS_2_.28ASCII.29)
27
+ + [2.18 Multicart 32 in 1](#Multicart_32_in_1)
28
+ + [2.19 PAC (Panasoft)](#PAC_.28Panasoft.29)
29
+ + [2.20 Play Ball (Sony)](#Play_Ball_.28Sony.29)
30
+ + [2.21 Super Altered Beast](#Super_Altered_Beast) (Clover Soft) / 슈퍼 수왕기 (크로바소프트)
31
+ + [2.22 Super Game 90](#Super_Game_90) (Unknown Publisher)
32
+ + [2.23 Super Game World 30/64/80](#Super_Game_World_30.2F64.2F80) (Screen Software)
33
+ + [2.24 Super Game World 126](#Super_Game_World_126) (Screen Software)
34
+ + [2.25 Super Lode Runner](#Super_Lode_Runner) (Irem)
35
+ + [2.26 Super Pierrot](#Super_Pierrot) (Taito - Nidecom)
36
+ + [2.27 Zemina 8k](#Zemina_8k)
37
+ + [2.28 Zemina 16k](#Zemina_16k)
38
+ 3. [Links](#Links)
39
+
40
+ ## Introduction
41
+
42
+ A MegaROM is officially a cartridge that includes ROM of at least 128 kB. This memory is addressable through the same MSX slot by dividing the ROM by segments (commonly 8 or 16 kB), in order to switch them on one or several memory pages. Segments are switched by writing generally at dedicated addresses in the slot where the cartridge is located to access the corresponding registers, but also sometime by using I/O ports. There are other methods to switch the segment but they are almost never used on MSX.
43
+
44
+ A related term is "ROM mapper". This usually refers to the *mechanism* used to switch segments, as seen from a programmer's point of view (see below). "MegaROM" usually refers to a *cartridge* that includes such a mechanism. Note this mechanism can be also used on ROM less than 128kB.
45
+
46
+ Very few exceptions aside, ROM cartridges have a power-of-2 size. Common MegaROM sizes are 1 Mbit (128 kB) or 2 Mbit (256 kB). But 4 Mbit (512 kB) and even some bigger MegaROMs exist. MegaROMs usually have a "MegaROM" symbol on the cartridge label and/or box.
47
+
48
+ There exist several different types of ROM mapper. Some common ones are:
49
+
50
+ * ASCII 8K
51
+ * ASCII 16K
52
+ * Konami without SCC
53
+ * Konami with SCC
54
+
55
+ A special type of MegaROM is Konami's Sound Custom Chip SCC. Besides a ROM mapper it also includes a sound chip. The SCC chip produces a characteristic sound, which is liked very much among MSX users.
56
+
57
+ A few MegaROM cartridges contain some battery-backed SRAM. This RAM may be used to store save-games for example. Hydlide II is an example of this.
58
+
59
+ ## Description of known ROM Mappers
60
+
61
+ Here is the description of the methods to access the registers of the MegaROM mappers known, and also some specific cartridges that use similar system.
62
+
63
+ ## ASCII 8K
64
+
65
+ Rom size can be up to 1024kB (chip LZ93A13) or 2048kB (chip M60002 or BS6101). This mapper is called ASCII8. Several makers use this Rom mapper.
66
+
67
+ | Page (8kB) | Switching address | Initial segment |
68
+ | --- | --- | --- |
69
+ | 4000h~5FFFh (mirror: C000h~DFFFh) | 6000h (mirrors: 6001h~67FFh) | 0 |
70
+ | 6000h~7FFFh (mirror: E000h~FFFFh) | 6800h (mirrors: 6801h~6FFFh) | 0 |
71
+ | 8000h~9FFFh (mirror: 0000h~1FFFh) | 7000h (mirrors: 7001h~77FFh) | 0 |
72
+ | A000h~BFFFh (mirror: 2000h~3FFFh) | 7800h (mirrors: 7801h~7FFFh) | 0 |
73
+
74
+ > **Note:** Page mirrors are not present on many cartridges.
75
+
76
+ **Value format for MegaROMs with an extra SRAM**
77
+
78
+ ASCII8 mappers with an SRAM are called ASCII8SRAM2, ASCII8SRAM8 or ASCII8SRAM32 depending the SRAM size. They are also called KoeiSRAM2, KoeiSRAM8 or KoeiSRAM32 respectively by mistake. There is a bit to select the SRAM which is among the most significant bits higher than those used to select the segment. It depends on hardware connections to the pins /OE0 to /OE3 of the mapper chip. So the SRAM size can vary theoretically between 1KB and 1024KB.
79
+
80
+ Here are some examples.
81
+
82
+ Xanadu (8kB SRAM):
83
+ - Bits 0~4 = Segment number (bits 1~6 are ignored in SRAM mode)
84
+ - Bit 5 = 1 to select the SRAM (writable on page the page 8000h~BFFFh only)
85
+ - Bits 6~7 = Unused
86
+
87
+ Royal Blood & Wizardry (8kB SRAM):
88
+ - Bits 0~6 = Segment number (bits 1~6 are ignored in SRAM mode)
89
+ - Bit 7 = 1 to select the SRAM (writable on the page 8000h~BFFFh only)
90
+
91
+ MSX-Write II (32kB SRAM):
92
+ - Bits 0~6 = Segment number (bits 3~6 are ignored in SRAM mode)
93
+ - Bit 7 = 1 to select the SRAM (writable on the page 8000h~BFFFh only)
94
+
95
+ ESE-RAM (DIY cartridge called also Mega-SRAM that only contains SRAM):
96
+ - Bits 0~6 = Segment number (bit 6 avalaible with chip M60002 only)
97
+ - Bit 7 = 1 to select the SRAM. (writable on the page 8000h~BFFFh only, see also ESE-RAM mapper.
98
+
99
+ ## ASCII 16K
100
+
101
+ Rom size can be up to 2048kB (chip LZ93A13) or 2048kB (chip M60002 or BS6101). This mapper is called ASCII16. Several makers use this Rom mapper.
102
+
103
+ | Page (16kB) | Switching address | Initial segment |
104
+ | --- | --- | --- |
105
+ | 4000h~7FFFh (mirror: C000h~FFFFh) | 6000h (mirrors: 6001h~67FFh) | 0 (0Fh for R-Type) |
106
+ | 8000h~BFFFh (mirror: 0000h~3FFFh) | 7000h (mirrors: 7001h~77FFh) | 0 |
107
+
108
+ > **Notes:** R-Type (384kB) uses same mapper but the segment 0Fh remains fixed on page 4000h~7FFFh. In addition, the segment 0Fh is same as 17h (the last segment). Page mirrors are not present on many cartridges.
109
+
110
+ **Value format for MegaROMs with an extra SRAM**
111
+
112
+ ASCII16 mappers with an SRAM are called ASCII16SRAM2 or ASCII16SRAM8 depending the SRAM size. There is a bit to select the SRAM which is among the most significant bits higher than those used to select the segment. It depends on hardware connections to the pins /OE0 to /OE3 of the mapper chip. So the SRAM size can vary theoretically between 1KB and 2048KB.
113
+
114
+ Here are some examples.
115
+
116
+ Hydlide 2 (2kB SRAM):
117
+ - Bits 0~3 = Segment number (bit 1~3 are ignored in SRAM mode)
118
+ - Bit 4 = 1 to select the SRAM (writable on page 8000h~BFFFh only)
119
+ - Bits 5~7 = Unused
120
+
121
+ ESE-RAM (DIY cartridge called also Mega-SRAM that only contains SRAM):
122
+ - Bits 0~6 = Segment number
123
+ - Bit 7 = Enable writing. (writable on page 8000h~BFFFh only)
124
+
125
+ ## Black Box, Deluxe Box and Golden Box
126
+
127
+ These Korean cartridges are Megarams of 128kB to 2048kB RAM. The cartridges have two mappers switchable by writing to I/O port 0Fh.
128
+
129
+ | | | | | | | |
130
+ | --- | --- | --- | --- | --- | --- | --- |
131
+ | Mode 8K | | | | Mode 16K | | |
132
+ | Page (8kB) | Switching address | Initial segment | Page (16kB) | Switching address | Initial segment |
133
+ | 4000h~5FFFh | 4000h | 0 | | 4000h~7FFFh | 4000h | 0 |
134
+ | 6000h~7FFFh | 4001h | 0 |
135
+ | 8000h~BFFFh | 4002h | 0 | 8000h~9FFFh | 4001h | 0 |
136
+ | A000h~BFFFh | 4003h | 0 |
137
+
138
+ **Format of value to write to the port 0Fh:**
139
+ - Bit 0~4 = Unused.
140
+ - Bit 4~5 = 01 to enable witting, 10 to write protect (initial status).
141
+ - Bit 6~7 = 01 to select 16K mode, 10 to select 8K mode (initial status).
142
+
143
+ ## Cross Blaim
144
+
145
+ Rom size is only 64kB.
146
+
147
+ | Page (16kB) | Switching addresses | Initial segment |
148
+ | --- | --- | --- |
149
+ | 4000h~7FFFh | None | Always 0 |
150
+ | 8000h~BFFFh | 4045h | 0 |
151
+
152
+ ## Dooly The Little Dinosaur
153
+
154
+ Rom size is only 32kB. The Rom uses a mapper very specific not to select memory segments but for anti-piracy protection.
155
+
156
+ | Page | Switching address | Mode |
157
+ | --- | --- | --- |
158
+ | 4000h~BFFFh | 4000h (mirrors: 4001h~BFFFh) | 0 |
159
+
160
+ **Description of modes**
161
+ * In mode 0, the read value = the value at corresponding address
162
+ * In mode 1, the value = (value at address & F8h) or ((value at address x 4) & 4) or ((value at address / 2) & 3)
163
+ * In mode 4, the value = (value at address & F8h) or ((value at address / 4) & 1) or ((value at address x 2) & 6)
164
+ * In mode 3 and 7, the value = value at address 7
165
+ * In mode 2, 5 and 6,
166
+ if (the value at the address) & 7 = 1, 2 or 4 then the value = F8h
167
+ if (the value at address) & 7 = 3, 5 or 6 then if mode = 2 then the value = (value at address & F8h) or ((value at address x 4) & 4) or (((value at address / 2) & 3) xor 7)
168
+ if the mode = 5 then the value = (value at address & 7)
169
+ if the mode = 6 then the value = (value at address & F8h) or ((value at address / 4) & 1) or (((value at address x 2) & 6) xor 7)
170
+
171
+ ## ESE-RAM
172
+
173
+ There are three types of ESE-RAM, the ESE-RAM SCC, ESE-RAM ASC8 and ESE-RAM ASC16. Each have respectively the KonamiSCC, ASCII8 or ASCII16 mapper (all with mirrors!) and an additional register to enable or disable writing to SRAM.
174
+
175
+ Write control register is accessible to the address 7FFEh / 7FFFh. Only the bit 4 is used, set it for enable the SRAM writing in 4000H-7FFDH, reset it to disable the writing. (Write protected at initialization).
176
+
177
+ ## Game Master 2
178
+
179
+ Rom size is 128kB and SRAM is 8kB (2 segments of 4kB).
180
+
181
+ | Page (8kB) | Switching address | Initial segment |
182
+ | --- | --- | --- |
183
+ | 4000h~5FFFh | None | Always 0 |
184
+ | 6000h~7FFFh | 6000h (mirrors: 6001h~6FFFh) | 1 |
185
+ | 8000h~9FFFh | 8000h (mirrors: 8001h~8FFFh) | 2 |
186
+ | A000h~BFFFh | A000h (mirrors: A001h~AFFFh) | 3 |
187
+
188
+ **Value format**
189
+ - Bit 0~3 = Segment number
190
+ - Bit 4 = 1 to select the SRAM (writable on page B000h~BFFFh only)
191
+ - Bit 5 = SRAM segment select (two segments of 4kB available)
192
+ - Bit 6~7 = Unused
193
+
194
+ ## Generic 8K
195
+
196
+ This mapper is called Generic8. It is based on a mix of Konami's MegaROMs. It is used by some emulators. If you use blueMSX, you need to select the Konami Generic mapper.
197
+
198
+ | Page (8kB) | Switching address | Initial segment |
199
+ | --- | --- | --- |
200
+ | 4000h~5FFFh | 4000h (mirrors: 4001h~47FFh, 05000h~077FFh) | 0 |
201
+ | 6000h~7FFFh | 6000h (mirrors: 6001h~67FFh, 07000h~077FFh) | 1 |
202
+ | 8000h~9FFFh | 8000h (mirrors: 8001h~87FFh, 09000h~097FFh) | 2 |
203
+ | A000h~BFFFh | A000h (mirrors: A001h~A7FFh, 0B000h~0B7FFh) | 3 |
204
+
205
+ ## Generic 16K
206
+
207
+ This mapper is called Generic16. It is similar to Generic8 but with segments of 16kB. It is used by some emulators. If you use blueMSX, you need to select the MSX-DOS 2 mapper, as this emulator, contrary to openMSX, does not have a specific mapper for the real Japanese MSX-DOS 2 cartridge with extra RAM.
208
+
209
+ | Page (16kB) | Switching address | Initial segment |
210
+ | --- | --- | --- |
211
+ | 4000h~7FFFh | 4000h (mirrors: 4001h~47FFh, 05000h~077FFh, 06000h~067FFh, 07000h~077FFh) | 0 |
212
+ | 8000h~BFFFh | 8000h (mirrors: 8001h~87FFh, 09000h~097FFh, 0A000h~0A7FFh, 0B000h~0B7FFh) | 1 |
213
+
214
+ ## Halnote
215
+
216
+ Rom size is 1024kB (2 x 256kB (LH5321L7 & LH532122) + 512kB (HALOS-14)) + 16kB SRAM (AKM6264A x2)
217
+
218
+ | Page (8kB) | Switching address | Initial segment |
219
+ | --- | --- | --- |
220
+ | 4000h~5FFFh | 4FFFh | 0 |
221
+ | 6000h~7FFFh | 6FFFh | 0 |
222
+ | 8000h~9FFFh | 8FFFh | 0 |
223
+ | A000h~BFFFh | AFFFh | 0 |
224
+
225
+ **Value format**
226
+ - Bits 0~6 are used for the segment number.
227
+ - Bits 7 of the address 4FFFh is to enable the SRAM on the page 0000h~3FFFh.
228
+ - Bits 7 of the address is 6FFFh to enable MSX-JE mapper
229
+
230
+ **Segments**
231
+ - Segments 0~31 = Hanote ROM (256kB)
232
+ - Segments 32~47 = Kanji-ROM Level 1 (128kB)
233
+ - Segments 32~63 = Kanji-ROM Level 2 (128kB)
234
+ - Segments 63~127 = MSX-JE (512kB)
235
+
236
+ **Halnote's MSX-JE dictionary (80000h~FFFFFh)**
237
+
238
+ | Page (2kB) | Switching address | Initial segment |
239
+ | --- | --- | --- |
240
+ | 7000h~77FFh | 77FFh | 0 |
241
+ | 7800h~7FFFh | 7FFFh | 0 |
242
+
243
+ **Value format**
244
+ - Bits 0~7 are used for the segment number. (256 x 2048byte = 512kB)
245
+
246
+ There is also a register accessible at the address C000h to enable/disable the Kanji-ROM level 1 or 2.
247
+ - Bit 0 = Kanji-ROM level 1
248
+ - Bit 1 = Kanji-ROM level 2
249
+
250
+ ## Harry Fox - The Demonic Snow Beast
251
+
252
+ Rom size is only 64kB.
253
+
254
+ | Page (16kB) | Switching address | Initial segment |
255
+ | --- | --- | --- |
256
+ | 4000h~7FFFh | 6000h (mirrors: 6001h~6FFFh) | 0 |
257
+ | 8000h~BFFFh | 7000h (mirrors: 7001h~7FFFh) | 1 |
258
+
259
+ ## Holy Quran
260
+
261
+ Rom size is 1024kB.
262
+
263
+ | Page (8kB) | Switching address | Initial segment |
264
+ | --- | --- | --- |
265
+ | 4000h~5FFFh | 5000h (mirrors: 5001h~53FFh) | 0 |
266
+ | 6000h~7FFFh | 5400h (mirrors: 5401h~57FFh) | 0 |
267
+ | 8000h~9FFFh | 5800h (mirrors: 5801h~5BFFh) | 0 |
268
+ | A000h~BFFFh | 5C00h (mirrors: 5C01h~5FFFh) | 0 |
269
+
270
+ ## Konami MegaROMs with SCC
271
+
272
+ Konami game cartridges with an extra sound chip called SCC. They are usable by selecting the segment 3Fh on the page 2 (8000h-9FFFh).
273
+
274
+ | Page (8kB) | Switching address | Initial segment |
275
+ | --- | --- | --- |
276
+ | 4000h~5FFFh (mirror: C000h~DFFFh) | 5000h (mirrors: 5001h~57FFh) | 0 |
277
+ | 6000h~7FFFh (mirror: E000h~FFFFh) | 7000h (mirrors: 7001h~77FFh) | 1 |
278
+ | 8000h~9FFFh (mirror: 0000h~1FFFh) | 9000h (mirrors: 9001h~97FFh) | 2 |
279
+ | A000h~BFFFh (mirror: 2000h~3FFFh) | B000h (mirrors: B001h~B7FFh) | 3 |
280
+
281
+ **Value format**:
282
+ - Bit 0~5 = Segment number. Set all of these bits at 9000h to enable the addresses to access to the SCC registers.
283
+ - Bit 6~7 = Unused
284
+
285
+ **Addresses to access to the SCC registers:**
286
+ - These addresses are 9800h~98FFh, and are mirrored up to 9FFFh.
287
+
288
+ | Address(es) | Desciption |
289
+ | --- | --- |
290
+ | 9800h~981Fh: | 32 bytes signed (value from -128 (80h) to 127 (7Fh)) to define the envelope (waveform) of the channel 1 |
291
+ | 9820h~983Fh: | 32 bytes signed to define the envelope of the channel 2 |
292
+ | 9840h~985Fh: | 32 bytes signed to define the envelope of the channel 3 |
293
+ | 9860h~987Fh: | 32 bytes signed to define the envelope of the channels 4 and 5 |
294
+ | 9880h~9881h\*: | Channel 1 frequency on 12bit \ |
295
+ | 9882h~9883h\*: | Channel 2 frequency on 12bit | |
296
+ | 9884h~9885h\*: | Channel 3 frequency on 12bit > Same format as for the PSG frequency (registers 0~5) |
297
+ | 9886h~9887h\*: | Channel 4 frequency on 12bit | |
298
+ | 9888h~9889h\*: | Channel 5 frequency on 12bit / |
299
+ | 988Ah\*: | Channel 1 volume (bits 4~7 are ignored) |
300
+ | 988Bh\*: | Channel 2 volume (bits 4~7 are ignored) |
301
+ | 988Ch\*: | Channel 3 volume (bits 4~7 are ignored) |
302
+ | 988Dh\*: | Channel 4 volume (bits 4~7 are ignored) |
303
+ | 988Eh\*: | Channel 5 volume (bits 4~7 are ignored) |
304
+ | 988Fh\*: | ON/OFF switch for each channel from 1 to 5 (bits 0~4 = Channels 1~5) |
305
+ | 9890h~989Fh\*: | Same as 9880h to 988Fh (mirrors) |
306
+ | 98A0h~98DFh\*: | Channel 5 envelope data (Read only) |
307
+ | 98E0h~98FFh\*: | Deformation register. (One byte only, the others are mirrors. Not used by Konami.) * Bit 0 = Set the frequency divider on 4 bits. Division ratio becomes 1/256 of the division ratio register. * Bit 0 = Set the frequency divider on 8 bits. 8-11 bits are 0. * Bit 2~4 = ? * Bit 5 = When a value is written to the division ratio register, the corresponding waveform data is replayed from the beginning. * Bit 6 = Envelope data of all channels is rotated. As for the direction, the data that was at +0 moves to +1. The rotation time is 3.58 MHz ÷ (division ratio register value + 1). The envelope data memory is write-protected for all channels. * Bit 7 = Only the envelope data of channel 4 is rotated. Only channels 4 and 5 of the envelope data are write-protected. This bit is valid only in Megarom. |
308
+
309
+ > **(\*) Writing only Note:** You can't write in the registers in RAM mode because registers can only be read in this mode.
310
+
311
+ Also see the Wiki page about the SCC.
312
+
313
+ ## Konami MegaROMs without SCC
314
+
315
+ | Page (8kB) | Switching address | Initial segment |
316
+ | --- | --- | --- |
317
+ | 4000h~5FFFh (mirror: C000h~DFFFh) | None | Always 0 |
318
+ | 6000h~7FFFh (mirror: E000h~FFFFh) | 6000h (mirrors: 6001h~7FFFh) | 1 |
319
+ | 8000h~9FFFh (mirror: 0000h~1FFFh) | 8000h (mirrors: 8001h~9FFFh) | Random |
320
+ | A000h~BFFFh (mirror: 2000h~3FFFh) | A000h (mirrors: A001h~BFFFh) | Random |
321
+
322
+ > **Notes:** Hai no Majutsushi (RC-765) has an extra 8bit digital to analog converter. Each value to be sent (8bit unsigned) must be written one by one at 5000h address (with mirrors at 5001h~5FFFh).
323
+
324
+ > Some MegaflashRom or MegaRAM use this mapper with selectable segments on page 4000h~5FFFh. These are preferable to those with a fixed page. It doesn't prevent Konami games from working.
325
+
326
+ ## Konami Sound Cartridge for Snatcher or SD Snatcher
327
+
328
+ This Sound Cartridge is a Mega-RAM of 64kB (expandable to 128kB) with a SCC+ (aka 052539 chip) compatible with the SCC. The sound cartridge for Snatcher have the segments 0~7 and the one for SD Snatcher have the segments 8~15.
329
+
330
+ | Page (8kB) | Switching address | Initial segment |
331
+ | --- | --- | --- |
332
+ | 4000h~5FFFh (mirror: C000h~DFFFh) | 5000h (mirrors: 5001h~57FFh) | 0 (Snatcher only) |
333
+ | 6000h~7FFFh (mirror: E000h~FFFFh) | 7000h (mirrors: 7001h~77FFh) | 1 (Snatcher only) |
334
+ | 8000h~9FFFh (mirror: 0000h~1FFFh) | 9000h (mirrors: 9001h~97FFh) | 2 (Snatcher only) |
335
+ | A000h~BFFFh (mirror: 2000h~3FFFh) | B000h (mirrors: B001h~B7FFh) | 3 (Snatcher only) |
336
+
337
+ **Value format**:
338
+ - Bit 0~5 = Set all of these bits at 9000h in SCC mode or B000h in SCC+ mode to enable the addresses to access to the sound chip registers.
339
+ - Bit 6~7 = Unused
340
+
341
+ **Addresses to access to the SCC+ registers:**
342
+ - These addresses are B800h~B8FFh, and are mirrored up to BFFFh.
343
+
344
+ | Address(es) | Description |
345
+ | --- | --- |
346
+ | B800h~B81Fh: | 32 bytes signed (value from -128 (80h) to 127 (7Fh)) to define the envelope form of the channel 1 |
347
+ | B820h~B83Fh: | 32 bytes signed to define the envelope form of the channel 2 |
348
+ | B840h~B85Fh: | 32 bytes signed to define the envelope form of the channel 3 |
349
+ | B860h~B87Fh: | 32 bytes signed to define the envelope form of the channel 4 |
350
+ | B880h~B89Fh: | 32 bytes signed to define the envelope form of the channel 5 |
351
+ | B8A0h~B8A1h\*: | Channel 1 frequency on 12bit \ |
352
+ | B8A2h~B8A3h\*: | Channel 2 frequency on 12bit | |
353
+ | B8A4h~B8A5h\*: | Channel 2 frequency on 12bit > Frequency = CPU frequency / (32 x (tempo + 1)) |
354
+ | B8A6h~B8A7h\*: | Channel 4 frequency on 12bit | |
355
+ | B8A8h~B8A9h\*: | Channel 5 frequency on 12bit / |
356
+ | B8AAh\*: | Channel 1 volume (bits 4~7 are ignored) |
357
+ | B8ABh\*: | Channel 2 volume (bits 4~7 are ignored) |
358
+ | B8ACh\*: | Channel 3 volume (bits 4~7 are ignored) |
359
+ | B8ADh\*: | Channel 4 volume (bits 4~7 are ignored) |
360
+ | B8AEh\*: | Channel 5 volume (bits 4~7 are ignored) |
361
+ | B8AFh\*: | On/Off switch for channels 1 to 5 (bits 0~4 = channels 1~5) |
362
+ | B8B0h~B8BFh\*: | Same as B8A0h to B8AFh |
363
+ | B8C0h~B8DFh\*: | Deformation register. (One byte only, the others are mirrors. Not used by Konami.) * Bit 0 = Set the frequency divider on 4 bits. Division ratio becomes 1/256 of the division ratio register. * Bit 0 = Set the frequency divider on 8 bits. 8-11 bits are 0. * Bit 2~4 = ? * Bit 5 = When a value is written to the division ratio register, the corresponding waveform data is replayed from the beginning. * Bit 6 = Envelope data of all channels is rotated. As for the direction, the data that was at +0 moves to +1. The rotation time is 3.58 MHz ÷ (division ratio register value + 1). The envelope data memory is write-protected for all channels. * Bit 7 = Only the envelope data of channel 4 is rotated. Only channels 4 and 5 of the envelope data are write-protected. This bit is valid only in Megarom. |
364
+ | B8E0h~B8FFh: | Not used |
365
+
366
+ **Modes select register:**
367
+ - This register is used to select the SCC or SCC+ mode as well as the RAM or ROM mode of the pages. Always accessible at the addresses below.
368
+
369
+ BFFEh/BFFFh\*:
370
+ - Bit 0 = 1 for page 4000h~5FFFh in RAM mode, 0 for ROM mode (no effect if bit 4 is set)
371
+ - Bit 1 = 1 for page 6000h~7FFFh in RAM mode, 0 for ROM mode (no effect if bit 4 is set)
372
+ - Bit 2 = 1 for page 8000h~9FFFh in RAM mode, 0 for ROM mode (no effect if bit 4 is set)
373
+ - Bit 3 = Not used
374
+ - Bit 4 = 1 to put all the pages in RAM mode, 0 to put the page A000h~BFFFh in ROM mode and others in mode determined by the bits 0~2.
375
+ - Bit 5 = 1 for SCC+ mode, 0 for SCC mode
376
+ - Bits 6~7 = Not used
377
+
378
+ > (\*) Writing only
379
+
380
+ Note: You can't write in the registers in RAM mode because registers can only be read in this mode.
381
+
382
+ See too the Wiki pages for the SCC+ and the Sound Cartridge.
383
+
384
+ ## MegaRam DDX
385
+
386
+ This is a MegaRam from Brazil, created by Ademir Carchano and cloned by several manufacturers, including DDX, and MSX users. Memory size varies from 256kB to 2048kB depending on the model (II-MEGARAM, MegaRam 2 mega, etc). DDX created the MegaRAM Disk, that has a disk Rom and allows the RAM to be used as a RAM disk.
387
+
388
+ | Page (8kB) | Switching address | Initial segment |
389
+ | --- | --- | --- |
390
+ | 4000h~5FFFh | 4000h | 0 |
391
+ | 6000h~7FFFh | 6000h | 1 |
392
+ | 8000h~9FFFh | 8000h | 2 |
393
+ | A000h~BFFFh | A000h | 3 |
394
+
395
+ A writing to I/O port 8Eh enables the Megaram. Ram is write protected, you can select segments. A reading of same port will allow writing to RAM.
396
+
397
+ ## MSX-DOS 2
398
+
399
+ | Page (16kB) | Switching address | Initial segment |
400
+ | --- | --- | --- |
401
+ | 4000h~7FFFh | 6000h or 7FFEh (v.2.20), or 7FF0h (v.2.3x of MSX turbo R) | 0 |
402
+
403
+ > **Note:** Switching addresse 6000h and 7FFEh depends on cartridge.
404
+
405
+ ## Multicart 32 in 1
406
+
407
+ This mapper is called Multicart32. It is the mapper of the Rom collection cartridges sold by Retrohard. These cartridges contain 31 pirated games stored on a flash Rom. Several cartridges contains custom games.
408
+
409
+ | Page (32kB) | Switching I/O port | Initial segment |
410
+ | --- | --- | --- |
411
+ | 4000h~BFFFh | #94 | Always 0 |
412
+
413
+ **Value format**
414
+ - Bit 0 ~ 4 = Segment number
415
+ - Bit 5 ~ 7 = Unused
416
+
417
+ > **Note:** Page 4000h~7FFFh is mirrored to C000h~FFFFh, and page 8000h~BFFFh is mirrored to 0000h~BFFFh.
418
+
419
+ ## PAC
420
+
421
+ 8kB SRAM cartridge. Same device is included in FM-PAC cartridge.
422
+
423
+ | Page (8kB) | Switching address | Initial segment |
424
+ | --- | --- | --- |
425
+ | 4000h~5FFFh | 5FFEh & 5FFFh | None |
426
+
427
+ > **Note:** Write 4Dh to 5FFEh and 69h to 5FFFh to select the SRAM. Write another value than 4Dh to 5FFEh or another value than 69h to 5FFFh to disable the SRAM. (The commonly used value is 0.) These two registers are not readable when SRAM is disabled.
428
+
429
+ ## Play Ball
430
+
431
+ This 32kB ROM does not use mapper, but some emulators have this Rom in their list of mappers to indicate it uses a DAC accessible by reads/writes to an address of the ROM. A write to BFFFh triggers the playback of subsequent digitized sounds.
432
+
433
+ | Access address | Effect when writing |
434
+ | --- | --- |
435
+ | BFFFh | 0 = Say "strike" 1 = Say "ball". 2 = Say "foul". 3 = Say "safe". 4 = Say "out". 5 = Play a sound used at start. 6 = Play the sound when you hit the ball with your bat. 7 = Play the sound when the ball is caught by the man behind the batter. 8 = Say "game set". 9 = Sound when the men can walk freely after the batter gets hit by the ball. 10 = Play the sound when the batter gets hit by the ball. |
436
+
437
+ > **Note:** Bit 0 is set during digitized sound playback.
438
+
439
+ ## Super Altered Beast
440
+
441
+ Rom size is only 64kB.
442
+
443
+ | Page (16kB) | Switching address | Initial segment |
444
+ | --- | --- | --- |
445
+ | 4000h~7FFFh | None | Always 0 |
446
+ | 8000h~BFFFh | 8000h | ? |
447
+
448
+ **Value format**
449
+ - Bit 0 = Unused
450
+ - Bit 1 ~ 3 = Segment number
451
+ - Bit 4 ~ 7 = Unused
452
+
453
+ ## Super Game 90
454
+
455
+ MegaRom released in Korea. Rom size is 1024kB. It contains several hacked games. Switching segment must be specified to I/O port 77h, Switching address is not used.
456
+
457
+ | Page (8kB or 16kB) | Switching I/O port | Initial segment |
458
+ | --- | --- | --- |
459
+ | 4000h~7FFFh | 77h | 0 |
460
+ | 8000h~BFFFh | 77h | 0 |
461
+
462
+ **Value format**
463
+ - Bit 0 ~ 5 = 16kB segment number
464
+ - Bit 6 = If set, the first 8kB of specified segment will be swapped with second part of 8K on page 8000h~BFFFh. This bit is ignored when the bit 7 is set.
465
+ - Bit 7 = If reseted, the specified segment will be mirrored on page 8000h~BFFFh otherwise it's the next segment.
466
+
467
+ > **Note:** This mapper is also called "Zemina 90 in 1" by mistake. This is not Zemina's cartridge.
468
+
469
+ ## Super Game World 30/64/80
470
+
471
+ This mapper is used for some MegaRoms containing several hacked games. It's same mapper as Golden Box in mode 8k.
472
+
473
+ | Page (8kB) | Switching address | Initial segment |
474
+ | --- | --- | --- |
475
+ | 4000h~5FFFh | 4000h | 0 |
476
+ | 6000h~7FFFh | 4001h | 0 |
477
+ | 8000h~9FFFh | 4002h | 0 |
478
+ | A000h~BFFFh | 4003h | 0 |
479
+
480
+ ## Super Game World 126
481
+
482
+ This mapper is used for a MegaRoms of 2048kB that containing several hacked games. It's same mapper as Golden Box in mode 16k.
483
+
484
+ | Page (16kB) | Switching address | Initial segment |
485
+ | --- | --- | --- |
486
+ | 4000h~7FFFh | 4000h | 0 |
487
+ | 8000h~BFFFh | 4001h | 0 |
488
+
489
+ ## Super Lode Runner
490
+
491
+ Rom size is 128kB.
492
+
493
+ | Page (16kB) | Switching address | Initial segment |
494
+ | --- | --- | --- |
495
+ | 8000h~BFFFh | 0000h (mirrors: 0001h~3FFFh) (no need to select the slot!) | 0 |
496
+
497
+ > **Note:** Switching address mirrors cause issue on a real MSX turbo R.
498
+
499
+ ## Super Pierrot
500
+
501
+ Rom size is 128kB.
502
+
503
+ | Page (16kB) | Switching address | Initial segment |
504
+ | --- | --- | --- |
505
+ | 4000h~7FFFh | 4000h (mirrors: 4001h~4FFFh, 6000h~6FFFh, 8000h~8FFFh, A000h~AFFFh) | 0 |
506
+ | 8000h~BFFFh | 5000h (mirrors: 5001h~5FFFh, 7000h~7FFFh, 9000h~9FFFh, B000h~BFFFh) | 0 |
507
+
508
+ > **Note:** This is a mapper close to the ASCII16 mapper found in some emulators. However bsittler has confirmed that there are cartridges with the ASCII16 mapper in the thread here (https://www.msx.org/forum/semi-msx-talk/emulation/super-pierrot-mapper).
509
+
510
+ ## Zemina 8k
511
+
512
+ Used for several MegaRoms released in Korea by Zemina. This mapper is called Zemina8. It is similar to Konami's MegaROMs without SCC.
513
+
514
+ | Page (8kB) | Switching address | Initial segment |
515
+ | --- | --- | --- |
516
+ | 4000h~5FFFh (mirror: C000h~DFFFh) | 4000h (mirrors: 4001h~5FFFh) | 0 |
517
+ | 6000h~7FFFh (mirror: E000h~FFFFh) | 6000h (mirrors: 6001h~7FFFh) | 1 |
518
+ | 8000h~9FFFh (mirror: 0000h~1FFFh) | 8000h (mirrors: 8001h~9FFFh) | 2 |
519
+ | A000h~BFFFh (mirror: 2000h~3FFFh) | A000h (mirrors: A001h~BFFFh) | 3 |
520
+
521
+ ## Zemina 16k
522
+
523
+ Used for some MegaRoms released in Korea by Zemina and a few Korean users. This mapper is called Zemina16.
524
+
525
+ | Page (16kB) | Switching address | Initial segment |
526
+ | --- | --- | --- |
527
+ | 4000h~7FFFh (mirror: C000h~FFFFh) | 4000h (mirrors: 4001h~7FFFh) | 0 |
528
+ | 8000h~BFFFh (mirror: 0000h~7FFFh) | 8000h (mirrors: 8001h~BFFFh) | 1 |
529
+
530
+ # Links
531
+
532
+ * [Programming info by Bifi](http://bifi.msxnet.org/msxnet/tech/megaroms.html).
533
+ * [MegaRoms Database by Gigamix](http://gigamix.hatenablog.com/entry/rom/). (MegaRoms list in Japanese with description of the components to make a ESE-RAM or MegaFlashRom).
@@ -0,0 +1,118 @@
1
+ # The Memory
2
+
3
+ This page was last modified 09:04, 4 March 2024 by Gdx. Based on work by Mars2000you and Rolandve and others.
4
+
5
+ Source: https://www.msx.org/wiki/The_Memory
6
+
7
+ ## The RAM without disk installed
8
+
9
+ Memory of an MSX computer is composed of RAM and ROM. Z80 can only handle up to 64kB because it has only 16 addressing pins (for 16 bits) but MSX computers use two systems that allow to switch 16kB on four fixed areas. These areas are called "pages". The first is the slots system. It has appeared since the first generation of MSX computers. The second system is the Memory Mapper. It has appeared since the MSX2 in option. This system was designed to extend the RAM.
10
+
11
+ When the MSX starts up, the CPU executes the initialization routine in the Main-ROM at address 0000h (slot 0 or 0-0) and scans the primary and secondary slots as shown in the figure below. In the example (0-0) the first 0 is the primary slot, the second 0 is the secundary slot)
12
+
13
+ So, the first page of RAM found in a slot will be selected as Main-RAM.
14
+
15
+ An MSX computer must have at least 8kB of RAM, this is the upper E000h ~ FFFFh. This area is scanned if no 16kB page is found in the slots.
16
+
17
+ > **Notes:**
18
+ > * On MSX1/2/2+ the main RAM is detected as described above. Memory mappers are not taken into account.
19
+ > * On MSX turbo R, the internal RAM is selected by default because it can be accessed at a much higher speed in R800 mode.
20
+
21
+ Next, the MSX2/MSX2+ system searches for the Sub-ROM (It searches for the characters "CD" at 0000h in each slot and makes an inter-slot call at 0102h when found). This step is not performed on MSX Turbo R because the Sub-ROM is directly called.
22
+
23
+ Then, the system searches for the executable ROMs (it searches for the characters "AB" at 4000h and 8000h in each slot and when found it makes an inter-slot call at the address specified in INIT). See "Develop a program in cartridge ROM" for details.)
24
+
25
+ ## The RAM with disks installed
26
+
27
+ When disks are present, the reset routine of Disk-ROM stores current selected slots of page 0 and 1 at F341h and F342h, then scans the slots on 0000h~3FFFh and 4000h~7FFFh pages to find the remain 32kB in the same way as indicated above. Found slots of RAM for pages 2 and 3 are stored at F343h and F344h.
28
+
29
+ If Disk-ROM is the v2.20 or newer, the first bigger memory mapper is selected on each page, except on MSX turbo R that selects its internal memory.
30
+
31
+ With the Disk-ROM v2.30 or newer, if we force the DOS1 mode by holding the '1' key during start up or boot DOS1 then the main RAM is detected as described above on pages 0 and 1 (0000h~7FFFh). MSX turbo R selects the Z80 mode and internal RAM is selected on the two upper pages only.
32
+
33
+ When system starts in Basic, memory map is like below.
34
+
35
+ **Default memory map under BASIC environment:**
36
+
37
+ ```
38
+ / +----------------------------+ FFFFh
39
+ | | Variables, hooks and |
40
+ | | system work area |
41
+ | +----------------------------+ F380h \
42
+ | | Variables and work area | | Fixed area of the
43
+ | | for MSX-DOS and Disk-BASIC | | disks communication
44
+ | +----------------------------+ F1C9h /
45
+ | | Area for machine language |
46
+ | | routines |
47
+ | +----------------------------+ HIMEM (FC4Ah)
48
+ Main-RAM | | Work area for disks |
49
+ | +----------------------------+ MEMSIZ (F672h)
50
+ | | Character strings |
51
+ | +----------------------------+ DSKTOP (F674h)
52
+ | | Stack |
53
+ | +----------------------------+ Register SP
54
+ | | Free RAM available for |
55
+ | | BASIC programs |
56
+ \ +----------------------------+ BOTTOM (FC48h)
57
+ | X X X X X X X X X X X X X |
58
+ / +----------------------------+ 7FFFh
59
+ | | Main BIOS routines and |
60
+ | | BASIC interpreter |
61
+ Main-ROM | +----------------------------+ 01B6h
62
+ | | Table of jumps to main |
63
+ | | BIOS |
64
+ \ +----------------------------+ 0000h
65
+ ```
66
+
67
+ The memory map shows that the MSX only selects the upper part of the Main-Ram up to halfway. Available RAM for the users begins at address 0E000h on MSX computers with 8kB or 0C000h with 16kB. It begins at address 08000h on all other MSXs. This address is indicated by the BOTTOM (0FC48h) system variable. To find out the end of RAM available, read the MEMSIZ (0F672h) variable.
68
+
69
+ CLEAR instruction of the basic makes it possible to create a “protected” area above that of working disks in order to place our own routines in machine language there. HIMEM (0FC4Ah) is specified by the second parameter of the CLEAR statement and the size of the variable area between MEMSIZ (0F672h) and DSKTOP (0F674h) is defined by the first parameter. At initialization, the area for machine language routines has a size of 0 bytes.
70
+
71
+ On MSX with more than 32kB RAM, it is necessary to manipulate the Slots to access the rest of the RAM which is inaccessible to the Basic.
72
+
73
+ **Memory map under MSX-DOS environment:**
74
+
75
+ ```
76
+ +----------------------------+ FFFFh
77
+ | Variables, hooks and |
78
+ | system work area |
79
+ +----------------------------+ F380h
80
+ | Variables and work area |
81
+ | for MSX-DOS and Disk-BASIC |
82
+ +----------------------------+ F1C9h
83
+ | Dinamic disk work area |
84
+ +----------------------------+
85
+ |Sector buffer to read/write |
86
+ +----------------------------+
87
+ | Sector I/O |
88
+ +----------------------------+
89
+ | Files buffers |
90
+ +----------------------------+
91
+ | FAT buffers |
92
+ +----------------------------+
93
+ | MSX-DOS.SYS | Address specified at 0006h
94
+ +----------------------------+ <-- during command execution
95
+ | Stack |
96
+ +----------------------------+ SP Register
97
+ | |
98
+ | Free area (TPA) |
99
+ | |
100
+ +----------------------------+ 0100h
101
+ | System scratch area |
102
+ +----------------------------+ 0000h
103
+ ```
104
+
105
+ External commands are loaded and executed at 0100h. To use the prompt, when a command is not being executed, COMMAND.COM or COMMAND2.COM is loaded at 0100h.
106
+
107
+ ## The ROMs
108
+
109
+ MSX computers have the following standard ROMs:
110
+
111
+ * Main-ROM that contains the BIOS and the MSX-BASIC interpreter. (MSX1~)
112
+ * Sub-ROM that contains new MSX-BASIC instructions and the BIOS for new devices added by MSX2. (MSX2~)
113
+ * Disk-ROM that contains the Disk-ROM BIOS and Disk BASIC. (MSX turbo R) (optional for previous generations)
114
+ * MSX-MUSIC that contains the FM-BIOS and MSX-MUSIC BASIC. (MSX turbo R) (optional for previous generations)
115
+
116
+ Even other ROM sizes can be 2K, 4k, 8K, etc. the slots system divides the memory into 16kB pages, and a page can be selected on four pages by writing the page number to the slot registers. A ROM is auto-executed at MSX start up if the characters "AB" are found at the address 4000h or 8000h. (See ROM header for details).
117
+
118
+ ROMs size can be expanded by a not standardised system called Megarom. There are also Megaram mappers available, which are similar but use a MegaROM mapper type. But these are mostly meant for playing cracked ROM games. (See ROM mappers)