Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.
LGB edited this page Apr 15, 2016 · 4 revisions

RAM configuration in Xep128

Enterprise-128 has a quite well designed memory mapping scheme. Z80 CPU has 64K of address space, it's divided into four 16K long spaces, called pages (0-3). The address space of the computer itself (both ROM/RAM and not used area, mixed) is divided into 256 also 16K sized entities, called segments (0-255). You can map any of the 256 segments into any of the four pages of Z80. Also note, that Nick (the video chip) always sees its own 64K VRAM (video RAM) regardless of the mapping for the CPU. From the view point of the CPU, VRAM is consist of segments 0xFC - 0xFF.

About the possibilities see the following chapters or the syntax description at the end of this page.

Simple memory configuration

Xep128 always allocates 64K VRAM, you can't override that. Though extra RAM can be used. In case of stock 128 machine, the RAM expansion is "below" the VRAM, 64K (so 128K in total). You can emulate this, or any other size memory with a simple (decimal) numeric option, telling the total RAM size. It's always meant with the VRAM (64K) included though (that also means, you can't use option smaller than 64).

Complex memory configuration

If the simple memory configuration does not suit you, you can use the complex one. Here you must specify RAM segments by yourself, always using hex numbers (though without the 0x prefix). Segment description must be prefixed with '@' to indicate the complex method. This means a single @ at the first character in the option, of course you don't need to repeat it before each segment/range! The syntax is list of segments or segment ranges, separated by ",". A segment range is the starting and ending segment, separated by "-". Numbers are in hex, and should be always two digits. Example: @F0,F3-F5.

SRAM segments

SRAM segments are the very same as RAM segments from the view point of the emulated machine. They can be signaled with the '=' prefix, let it be a single segment, or a segment range. Example: @F0,=F1,F3-F5 (here, only segment 0xF1 is an SRAM segment, that is: put '=' before the SRAM segment/range you want to define, even at multiple places). The special thing with SRAM segments, that they are tried to be loaded from disk on Xep128 startup, and also they are tried to be saved on exit. The intent with these kind of RAM segments to emulate machine with battery-backed RAM, so the content of this RAM won't be lost. Content load/save are stored in the preference directory, with file names like sram-XX.seg, where XX is the segment number in hex. All configured SRAM segments stored in a separated file.

Summary of syntax, comments

Some examples, and comments:

  • Configuring RAM from command line: -ram 128 or -ram @F1,=F2,F3-F5
  • Configuring in a config file: ram = 128 or ram = @F1,=F2,F3-F5
  • Configuring via :XEP command: :XEP RAM !128 or :XEP RAM !@F1,=F2,F3-F5
  • From console (windos), the same with :XEP just without the :XEP part of course
  • :XEP syntax needs the '!' as well for "safety" reason (not to reconfigure your system without will)
  • Run-time configuration via :XEP RAM causes the emulated Enterprise to reboot
  • Current memory configuration can be inspected with :XEP RAM without any additional parameters, or in the console (window) with just saying ram