4

I need to display HGR page 1 ($2000 to $3FFF) located in AUX memory (not in MAIN memory). According to the "Apple IIc Reference Manual - Volume 1", page 45, I must first turn 80Store on by writing to the address $C001, then read the address "page 2" ($CO55). I understand this should display HGR1X (hires graphic in AUX memory). The following code is an example, but it does not work: page 1 in main memory is still displayed :

    org $8000
    lda $C052       ; mixoff
    lda $C050       ; graphics
    lda $C057       ; hires
    sta $C001       ; 80strore
    lda $C054       ; page1 : display page1 ($2000 to $3FFF) in main memory
                    ; it works.
    jsr rdkey       ; wait key from user
    lda $C055       ; page2 : HGR1X in AUX memory should be displayed now.
                    ; it doesn't work, main memory HGR page is still on screen.
    rts     

What's wrong in that code? Can you provide a very simple example of code that allows to display the HGR page 1 in AUX memory? Same question with page 2 in AUX memory ($4000 to $5FFF).

My goal is to create an animation showing alternately HGR page 1 and 2 in the main memory and in the auxiliary memory, by going instantly between these 4 pages.

5

(From memory, don't have the manuals at hand)

IIRC, there are not four pages, but 'only' two.

Using AUX memory does not give additional pages, but expands HGR into DHGR.


According to the "Apple IIc Reference Manual - Volume 1", page 45,

First of, when checking manuals, make sure to use the one referring to the computer you're using, As there are subtile differences between the models. Usually not much, but they may be important when exprlorring the fringes.

I must first turn 80Store on by writing to the address $C001, then read the address "page 2" ($CO55). I understand this should display HGR1X (hires graphic in AUX memory).

No, these settings do not define what page is displayed, but what page is mapped within the 6502's address space.

Display always used main memory to display either page. For the video logic pages in AUX memory aren't independent pages, but extensions to either the main page. Flipping AN3 ($C05E) makes it reading an additional byte from the same address in AUX memory in parallel to double the display data, turning HGR into DHGR (and 40 col into 80).

My goal is to create an animation showing alternately HGR page 1 and 2 in the main memory and in the auxiliary memory, by going instantly between these 4 pages.

Sorry to disappoint you, but won't work, as there is only one pair of pages.

4
  • Very clear answer. So if I want to work in HGR (and not in DHGR), pages 1 and 2 in AUX memory are useless for display. So, I don't quite understand the use of 80Strore on, combined with the Page1 and Page2 switches. – bruno185 Apr 21 at 11:33
  • 1
    @bruno185 It defines mapping of display pages into address space. First, there is no page 1 switch, only a page 2 on/off - sounds the same, but is an important semantic. 80Store enables the mapping of AUX display pages into address space. When set, PAGE2 defines if text page is mapped from main or AUX.With HIGRES on it does the same but for $2000. It's a bit of a dance, in part for compatibility, but as well to allow usage szenarios in BASIC. There is an Apple Technote for the IIe with nice pictures somewhere. – Raffzahn Apr 21 at 11:48
  • 1
    @bruno185: To confirm what Raffzahn said above, when 80STORE is enabled the PAGE2 switch is used to select access to AUX or MAIN memory. From the technote he mentions: "When 80STORE is on, and if the HIRES switch is also on, then the PAGE2 switch selects the memory bank (auxiliary or motherboard) for accesses to a memory location within the range $2000 through 3FFF." – Nick Westgate Apr 21 at 12:28
  • 80STORE+PAGE2 makes some things easier. If you're running code in MAIN and toggle RAMRDON to read from the hires page, your code banks out and boom! So one approach is to duplicate your code to both MAIN and AUX; another is to put your code somewhere that doesn't bank out (ZP/Stack/LC). Instead, if you use 80STORE+PAGE2 then only text+hires page1 banks out, so your code can reside happily in MAIN. – Joshua Bell Apr 27 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.