[Coco] Emulator
Wayne Campbell
asa.rand at yahoo.com
Mon Sep 7 12:27:34 EDT 2009
I just woke, so I'm not quite in the code-mode yet. However, I've been thinking alot about this. As I've said in other posts, I can't be sure if what I'm seeing is "normal", or if it is something being miscalculated in the emulator (first step), something miscalculated by NitrOS-9 (second step), or if it's Basic09 (third step). I know that mfree from the command line shows me memory allocations all the way up to 512K (the ram setting in the emulator for the 6809 CoCo3 roms I have). As I recall, the original OS-9 Level II displayed memory allocations up to the 64K limit. Everything above that was in a separate line, as a single block.
Basic09 had approximately 40K of workspace in the original version under Level II. Once you got to about 36-38K, you would start to encounter 43 errors (unknown procedure) when running external machine language subroutines, like Inkey or SysCall. If I open the Basic09 I'm using under NitrOS-9 with over 23K, nothing runs and I get constant 43 errors.
The 6809/6309 is a 8-bit processor. It cannot, by itself, see more than one 64K "page" of memory at a time. The GIME (MMU), allowed multiple pages to exist, and swapped them in and out of the processor's "view". This means all other pages are suspended while the processor deals with the current page. OS-9 allows users to access the other pages through the use of processes, allowing the other pages to get in a clock cycle. This way the other processes can continue running in the background.
You still cannot allow a program to be larger than it's workspace size. You have to break up the program into pieces, and give each piece a separate page to run in. I never got that far in my programming, though I got close with the original DCom.
Wayne
________________________________
From: Aaron Wolfe <aawolfe at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Sunday, September 6, 2009 10:10:37 PM
Subject: Re: [Coco] Emulator
>
Can you please give specific examples of this? Are you sure you
haven't confused MESS with Nitros9? I can't see how an emulator could
cause this, but I want to understand if this is indeed the case.
>
Here is a quote from the Nitros9 documentation that I believe may be relevant:
NitrOS-9 Level 2 Memory Specifics
Because NitrOS-9 Level 2 utilizes the Memory Management Unit (MMU)
component of the Color Computer 3, up to 2MB of memory can be supported.
However, each process is still limited to a maximum of 64K of RAM.
Even with this limitation, there is a significant advantage over
NitrOS-9 Level 1.
Every process has its own 64K “playground.” Even the operating system itself
has its own 64K area. This means that programs do not have to share a single
64K block with each other or the system. Consequently, larger programs are
possible under NitrOS-9 Level 2.
These 64K areas are made up of 8K blocks, the size that is imposed by the MMU
found in the Color Computer 3. NitrOS-9 Level 2 assembles a number of these
8K blocks to provide every process (including the system) its own 64K working
area.
More information about the Coco
mailing list