@nataliapc/mcp-openmsx 1.2.11 → 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.
- package/package.json +1 -1
- package/resources/book--msx-top-secret-3/mts3-appendix-english-upd2.md +25863 -0
- package/resources/book--msx-top-secret-3/mts3-complete-english.md +44895 -0
- package/resources/programming/asm_develop_a_program_in_cartridge_rom.md +1881 -0
- package/resources/programming/toc.json +6 -0
- package/resources/system/how_to_detect_ram.md +14 -0
- package/resources/system/mrc_wiki_megarom_mappers.md +533 -0
- package/resources/system/the_memory.md +118 -0
- package/resources/system/toc.json +18 -0
- package/vector-db/__manifest/_transactions/0-675ee228-bffb-4636-80e5-cdfde25cc4fe.txn +2 -0
- package/vector-db/__manifest/_versions/18446744073709551614.manifest +0 -0
- package/vector-db/__manifest/_versions/latest_version_hint.json +1 -0
- package/vector-db/msxdocs.lance/_indices/{4d3bd360-e3c6-408d-b0ff-a4d6bd9580cb → 37194b01-2a25-40d1-ac38-7fbe254df5ea}/metadata.lance +0 -0
- package/vector-db/msxdocs.lance/_indices/{4d3bd360-e3c6-408d-b0ff-a4d6bd9580cb/part_0_docs.lance → 37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_docs.lance} +0 -0
- package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_invert.lance +0 -0
- package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_tokens.lance +0 -0
- package/vector-db/msxdocs.lance/_transactions/0-dd155672-40e6-4c6a-942f-7fcbe8c3dbd0.txn +0 -0
- package/vector-db/msxdocs.lance/_transactions/1-e7230cbd-ce8e-465c-9b85-b91443862427.txn +0 -0
- package/vector-db/msxdocs.lance/_versions/18446744073709551613.manifest +0 -0
- package/vector-db/msxdocs.lance/_versions/18446744073709551614.manifest +0 -0
- package/vector-db/msxdocs.lance/data/{110001110001011010001000876c134b8296fbc47762d1e1ab.lance → 000100110110001011110001fc578141d296825d0bea11c95d.lance} +0 -0
- package/vector-db/msxdocs.lance/_indices/4d3bd360-e3c6-408d-b0ff-a4d6bd9580cb/part_0_invert.lance +0 -0
- package/vector-db/msxdocs.lance/_indices/4d3bd360-e3c6-408d-b0ff-a4d6bd9580cb/part_0_tokens.lance +0 -0
- package/vector-db/msxdocs.lance/_transactions/0-6f47c9fc-3657-40f0-9dd4-c7226b2a4805.txn +0 -0
- package/vector-db/msxdocs.lance/_transactions/1-2bb7426e-a4b0-40ea-9a58-00c4985fc6a9.txn +0 -0
|
@@ -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)
|
|
@@ -8,11 +8,29 @@
|
|
|
8
8
|
"external_url": "https://map.grauw.nl/resources/msx_io_ports.php",
|
|
9
9
|
"description": "This comprehensive reference document provides a complete mapping of MSX computer I/O ports (#00-#FF) and memory-mapped I/O areas, detailing hardware interfaces for audio (PSG, MSX-AUDIO, MIDI), video (VDP, Graphics9000), storage (FDC, cartridges, tapes), communication (RS232, modems, Ethernet), input devices (keyboard, joysticks), system control (PPI, memory mappers, slot selection), and various peripherals across different MSX generations (MSX1, MSX2, MSX2+, turboR). It includes specific register descriptions, bit mappings, programming examples, and compatibility notes for both built-in and expansion devices, making it an essential reference for MSX programming, debugging, hardware interfacing, and emulation development."
|
|
10
10
|
},
|
|
11
|
+
{
|
|
12
|
+
"title": "The Memory",
|
|
13
|
+
"uri": "msxdocs://system/the_memory",
|
|
14
|
+
"external_url": "https://www.msx.org/wiki/The_Memory",
|
|
15
|
+
"description": "Comprehensive guide to the MSX memory architecture covering the slot system, Memory Mapper, RAM detection order at boot (with and without disk), and memory maps for BASIC and MSX-DOS environments. Explains page switching, Main-ROM/Sub-ROM initialization sequence, system variables BOTTOM/MEMSIZ/HIMEM, and differences across MSX1/2/2+/turboR."
|
|
16
|
+
},
|
|
11
17
|
{
|
|
12
18
|
"title": "MSX System Variables",
|
|
13
19
|
"uri": "https://map.grauw.nl/resources/msxsystemvars.php",
|
|
14
20
|
"external_url": "https://map.grauw.nl/resources/msxsystemvars.php",
|
|
15
21
|
"description": "This webpage provides an official and detailed overview of MSX system variables, including their memory addresses, lengths, and descriptions. It lists variables such as the base address of the MSX character set, VDP data ports, ROM version information, and MSX version number, among others. This resource is essential for developers and emulator authors who need to understand or manipulate the internal state and hardware configuration of MSX computers, supporting accurate software development and system emulation."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"title": "How to detect RAM",
|
|
25
|
+
"uri": "msxdocs://system/how_to_detect_ram",
|
|
26
|
+
"external_url": "https://www.msx.org/wiki/How_to_detect_the_RAM",
|
|
27
|
+
"description": "Guide for detecting the main RAM slot ID in MSX systems. Explains how to read the RAM slot addresses from system variables F341h–F344h (pages 0000h–FFFFh) when a disk system is present."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "MegaROM Mappers",
|
|
31
|
+
"uri": "msxdocs://system/mrc_wiki_megarom_mappers",
|
|
32
|
+
"external_url": "https://www.msx.org/wiki/MegaROM_Mappers",
|
|
33
|
+
"description": "Reference for MSX MegaROM cartridge mappers — cartridges with 128KB or more of ROM switched via segments of 8KB or 16KB. Documents 28 known mapper types including ASCII 8K/16K, Konami with/without SCC, Game Master 2, ESE-RAM, MSX-DOS 2, and various third-party mappers, with register addresses, segment switching mechanisms, and memory page layouts."
|
|
16
34
|
}
|
|
17
35
|
]
|
|
18
36
|
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1}
|
|
index afe5e0b..e5e97f8 100644
|
|
|
Binary file
|
|
index 18b706a..8e6ef25 100644
|
|
|
Binary file
|
package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_invert.lance
ADDED
|
Binary file
|
package/vector-db/msxdocs.lance/_indices/37194b01-2a25-40d1-ac38-7fbe254df5ea/part_2_tokens.lance
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
index 53ffecf..b911d49 100644
|
|
|
Binary file
|
package/vector-db/msxdocs.lance/_indices/4d3bd360-e3c6-408d-b0ff-a4d6bd9580cb/part_0_invert.lance
DELETED
|
Binary file
|
package/vector-db/msxdocs.lance/_indices/4d3bd360-e3c6-408d-b0ff-a4d6bd9580cb/part_0_tokens.lance
DELETED
|
Binary file
|
|
Binary file
|