[Coco] CoCo Questions
Robert Gault
robert.gault at worldnet.att.net
Sun Oct 29 09:45:07 EST 2006
Phill Harvey-Smith wrote:
> Robert Gault wrote:
>
>> Phill Harvey-Smith wrote:
>>
>>> <snip>
>>>
>>> Well You could have a small copying routine in ram that would
>>> disable interrupts, and then switch to map type 1 whilst copying,
>>> as then the other 32K would appear in the 32K-64K region, and could
>>> therefore be accessed at the same time, I would not have thought
>>> that this would have been too hard to arrange.
>>>
>>
>> That won't work if you are using page swapping because the only RAM
>> available is the lower 32K and your ml program will get swapped out
>> along with any data it stored.
>
>
> Humm, that's not how I read the SAM data sheet, the way I read it in map
> type 0 the page switch register controls which block of 32K will appear
> in the 0-32K region, so setting it to 0 maps in the bottom 32K, setting
> it to 1 maps in the top. However in map type 1, this is disabled and we
> have a linear 64K. So to swap data between pages you would need a small
> ml program in each page to actually do the page flipping, but once in
> map type 1 you would have access to both pages, though your second page
> would of course be at 32K-64K, so your code would have to be position
> independent....but I never said it would be trivial :)
>
>> In my opinion, programs of this type only became practical on the
>> Coco3 where the swapping routines could be in constant DRAM and there
>> was 512K RAM to play with.
>
>
> Yes having paged RAM cirtainly would make things easier :)
>
> Phill.
>
What you've said is correct and not really different from what I've
said. We've just drawn different conclusions.
The problem is that for Basic to run, you must either be in RAM/ROM mode
or be in all RAM mode with the ROM copied into RAM. Clearly the latter
can't be used along with page swapping. For the former to work, you
would need an ml program with a copy in each page. The program would
need to determine which copy it was by going to all RAM mode and getting
its location upper or lower 32K. Once it knows which page it is in, it
would know which direction to move the Basic variables so two separate
Basic programs could communicate.
The above is theoretically possible but there is very little free memory
in low RAM not already dedicated to Basic or Basic programs. Maybe you
could squeeze the needed code into the cassette buffer but one way or
another some function of Basic would be compromised.
It is hard to see what would be gained by the exercise over just using
Disk Basic, except for the challenge of doing it. You can easily write
Disk Basic programs so they call each other and communicate with each other.
More information about the Coco
mailing list