[Coco] ML Question: MMU Block Switching

William Mikrut wmikrut72 at gmail.com
Mon Feb 16 23:23:31 EST 2015


Ahhh.... FF9D and FF9E.

I can find plenty of documentation that specifies what this offset should
be for video ram.
When I read several articles on these registers, I find that this is
MSB/LSB format.

The reason I was swapping in page #36 was to be able to access the Hires
mem locations $6C000-$6DFFF through $2000-3FFF.

Is there a way to set these registers to it allows me to access that Hiram
location directly from local addressing (meaning within the 64K Address
space) without the need to swap blocks?

I can see setting $FF9D/$FF9E with $C0/$00 -- but how would it know it was
in the $60000 range?


   1.



On Mon, Feb 16, 2015 at 7:27 PM, Robert Gault <robert.gault at att.net> wrote:

> William Mikrut wrote:
>
>> I do have a another ML question about memory block switching.
>> When processing I will have a controlling program setup at $1200
>>
>>          orcc     #$50    Interrupts off
>> lda $ffa1     Load current page
>> anda   #63
>> pshs a           Push for later
>> lda #$36 Map in Hi-res Text
>> sta $ffa1     Tell MMU to switch page
>> andcc  #$ef      Interrupts on
>>
>> Now I can manipulate data in $2000-$3FFF and essentially display text on
>> the hi-res text screen.
>>
>> When I am done and ending the program I cleanup with this:
>>          orcc #$50
>> puls a
>> sta $ffa1
>> andcc  #$ef
>>
>> Is there any reason that would cause a program fault while my lower memory
>> program is operating and the MMU is set to map in page 36 to $2000-$3FFF?
>>
>> My lower memory program is no where near $2000 in ending size.
>>
>>
> Normally you would want andcc #$af since you disabled both FIRQ and IRQ
> with orcc #$50  where $50=%01010000.
>
> If you have already turned on the Hi-res text screen via Basic, the above
> would work. As an alternative, you could use the default MMU value for
> $FFA1 and point the Hi-res text screen to $72000 using the registers
> $FF9D-$FF9E.
>
> Actually you will need to post all of your program for us to tell what
> problems might arise. :)
>
> Robert
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list