8.2

AUXILIARY MEMORY MANAGEMENT

A $0 written to $C07X selects the //c’s own auxiliary 64K memory. Values $9 to sET written to $C07X also select auxiliary hank $0.

Under program control, the last 64K bank selected will remain enabled as auxiliary memory until another bank is selected.

PROGRAMMING GUIDELINES

The following programming guides will will help you in writing your own software to effectively use the card’s memory. These guides are not comprehensive but should cover the most common questions you may have regarding card programming.

Softeswitch Selection

As previously explained, writing a value associated with a MultiRam C 64K auxiliary memory bank to any of the $C070 to $CO7F memory locations causes that 64K memory bank to be selected as the auxiliary bank. As Figure 8.1 shows, writing a SO to $C07X selects 64K bank 0, the //c’s own 64K auxiliary memory bank. Figure 8.2 shows bank 4 selected when a $4 is written to $CO7X.

Writing anything to the $C07X locations also causes the Apple a game paddle timers to be activated. If you are writing a program using a joystick, game paddle or other device attached to the game controller port, you should read the $CO7X address with a LDA, LDX, LDY instruction if you only intend to trigger the timer for the joystick. If you write to the $C07X register with a STA, STX, or STY instruction, you may switch to an undesired auxiliary bank. Also, remember that the paddle timer must time out before you can use the $C07x address again. Allow 3 to 4 milliseconds to elapse before you use $C07X again.

You should not write to $C070, $C077, $C07E, and $C07F as theme switches perform video related operations on the //c. Writing to any other location such as SCUll, $C073, or $0078 should cause no problems.

As previously mentioned, a $0 written to $C07X selects the //c’s own auxiliary 64K memory. Values $9 to $FF written to $C07X also select auxiliary bank $0 (not true with MultiRam //e and MultiRam RGB memory cards discussed later).

Under program control, the last 64K bank selected will remain enabled as auxiliary memory until another bank is selected.