• Access to AUX mem at $D000

    From Marc Golombeck@21:1/5 to All on Sat Feb 12 09:36:36 2022
    Is there a method to access AUX mem from $D000 in 128 k Apple IIe? AUXMOVE only covers the range up to $BFFF.

    Is the area $D000-$DFFF also bank switched like the language card memory? How can that bank switching be achieved in AUX mem?

    Thx for any hints!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From qkumba@21:1/5 to All on Sat Feb 12 11:01:02 2022
    Note also that writing to $C009 enables both read and write access to $D000-FFFF (unlike $C003/C005 for the regular memory), and that $C009 switches to aux zero-page and stack, so you can't call it easily from a subroutine that doesn't also write to $
    C008 before returning.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From qkumba@21:1/5 to All on Sat Feb 12 10:58:13 2022
    writing to $C009 enables access to $D000-FFFF, then $C083 or $C08B as usual to choose the $D000 page that you want.
    write to $C008 to restore access to main $D000-FFFF.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From I am Rob@21:1/5 to Marc Golombeck on Sat Feb 12 16:29:38 2022
    On Saturday, February 12, 2022 at 11:36:37 AM UTC-6, Marc Golombeck wrote:
    Is there a method to access AUX mem from $D000 in 128 k Apple IIe? AUXMOVE only covers the range up to $BFFF.

    Is the area $D000-$DFFF also bank switched like the language card memory? How can that bank switching be achieved in AUX mem?

    Thx for any hints!


    You can copy the COPY routine at $FE2C in ROM to the lower Main 48k and use that. You can also use it to copy to both the Aux48k and the AuxLC instead of using the AUXMOVE.

    From Main memory, flip switches $C009 and $C005 to copy routines from Main and write to anywhere in Aux. This has to be done first before setting up zero-page locations $3C.42 as the AuxZP is now in effect.

    From Main you can now do a JSR $D000, or where the routine is in the AuxLC, but remember this will put the return address on the Aux stack, so you cannot flip the $C008 switch until the call is returned to Main memory.

    Your AuxLC routine should flip the $C003 switch to enable reading from the lower Aux48k, then call the Aux48k routine. Your Aux48k routine should never flip any switches to Read Main memory (either lower 48k or MainZPLC), but can flip $C004 to write to
    Main. Upon return to the AuxLC routine, it should then flip the $C002 switch to read from Lower Main48k again before returning to the Main memory routine.

    And lastly, immediately after the JSR $D000 from Main, you need to flip the $C008 switch to allow any return addresses on the Main stack and variables in MainZP to be used normally again.

    Personally, I wouldn't use the LC banks at $D000.DFFF as they still require two softswitch accesses to do a write, just like MainLC does. And you still have all of $E000.FFFF you can use without extra switching. A lot of code can be packed in the upper
    8 kb.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)