Skip to content

Shell memory layout

sy2002 edited this page Jun 6, 2023 · 4 revisions

Since QNICE does not offer a dynamic memory management system, the Shell uses a hard-coded memory layout to perform its duties. This memory layout seeks a balance between three conflictive goals:

  1. When browsing for files (such as games, programs, ROMs, cartridges, etc.): Display as many files and subfolders within a given folder as possible. The memory is needed for displaying the directory entries in an alphabetically ordered fashion.
  2. When browsing through deeply structured libraries of files, make sure that the file browser remembers all the subfolders so that as soon as you start to "climb up" the directory-tree again (i.e. leave a subdirectory) the file-browser continues where you left off.
  3. Have an On Screen Menu with as many menu items and sub-menus as possible.

You can configure the memory layout in m2m-rom.asm. Go to the section that is called Heap and Stack and locate the following constants:

MENU_HEAP_SIZE
HEAP_SIZE
STACK_SIZE
B_STACK_SIZE