Darkcode1 wrote: > I have an enhanced apple ][e with 128k ram and after reading through some > old nibble magazines of mine, i stumbled across this confusing bit of > information: > > It seems in the apple ][e, memory from $d000-$dfff has two banks where as > memory from $e000-$ffff has only one, but what happens when there is a > memory card installed? If you have a 128K Apple IIe, there are actually five banks of memory in the $D000-$DFFF area: - ROM - Main memory language card bank 1 - Main memory language card bank 2 - Auxiliary memory language card bank 1 - Auxiliary memory language card bank 2 There are three banks in the $E000-$FFFF area: ROM, main language card and auxiliary language card. The auxiliary memory in the IIe (64K memory expansion card) mirrors the main memory for the most part. You have 48KB of RAM from $0000-$BFFF and a further 16KB in $D000-$FFFF, with two 4KB banks in $D000-$DFFF. There are three main sets of soft switches which deal with auxiliary memory: - RDMAIN/RDAUX and WRMAIN/WRAUX select main or auxiliary memory for reading or writing the $0200-$BFFF area (independent control of read and write bank select). - MAINZP/AUXZP selects main or auxiliary memory for the $0000-$01FF and $D000-$FFFF areas (one switch affecting both read and write bank select). The traditional language card switches ($C080-$C083 and $C088-$C08B) are independent of the main/aux bank select. You can read from ROM or RAM, and optionally write enable the RAM. Any access to RAM will refer to main or auxiliary RAM according to the MAINZP/AUXZP switch. - The 80STORE switch determines whether the PAGE1/PAGE2 switch is used to select a displayed video page or whether it is used to bank switch text page 1 ($0400-$07FF) between main and auxiliary memory. The AN3 (annunciator 3) switch also plays a role here, determining whether 80STORE also affects hi-res page 1 ($2000-$3FFF). I think that the HIRES switch must also be enabled for this, but I'd have to refer to documentation to confirm this. If you have a multi-bank auxiliary slot RAM card (such as a RamWorks) there is an additional register, usually at $C073, which selects a bank on the card. This bank then replaces auxiliary memory in the addressing mechanisms of the IIe. I think that the 80-column video buffers only exist in bank 0 of a multi-bank auxiliary slot card. > I'm use to using the apple ][+ with language card...so, could somebody > please explain > all the memory bank switching and all the new I/O soft switches in the ][e. There are a lot of new soft switches: the IIe has every location in $C000-$C01F used for something (in addition to the keyboard functions which affect all these locations). The $C000-$C00F switches are write-only (reading gives you the keyboard latch). The $C010-$C01F switches are read-only, and only bit 7 is significant (bits 0-6 are the last key value). $C000-$C00F READ Keyboard buffer and latch flag in bit 7 (as ][/][+) $C000 WRITE 80STORE OFF $C001 WRITE 80STORE ON $C002 WRITE RDMAIN $C003 WRITE RDAUX $C004 WRITE WRMAIN $C005 WRITE WRAUX $C006 WRITE SLOTCXROM $C007 WRITE INTCXROM $C008 WRITE MAINZP $C009 WRITE AUXZP $C00A WRITE INTC3ROM $C00B WRITE SLOTC3ROM $C00C WRITE 80VID OFF $C00D WRITE 80VID ON $C00E WRITE PRICHARSET $C00F WRITE ALTCHARSET $C010-$C01F WRITE Reset keyboard latch $C010 READ Keyboard buffer, any-key-down flag in bit 7, reset latch $C011 READ RDLC2 Read language card bank 2 enable $C012 READ RDLCRD Read language card read enable $C013 READ RDRAMRD Read main/aux read select $C014 READ RDRAMWR Read main/aux write select $C015 READ RDCXROM Read slot/internal CX ROM select $C016 READ RDAUXZP Read main/aux zero page and language card select $C017 READ RDC3ROM Read slot/internal C3 ROM select $C018 READ RD80STO Read 80-column store enable $C019 READ RDVBL Read vertical blanking $C01A READ RDTXT Read text/graphics enable $C01B READ RDMIX Read full/mixed screen select $C01C READ RDP2 Read page1/page2 select $C01D READ RDHIRES Read hires/lores select $C01E READ RDCHARSET Read primary/alternate character set select $C01F READ RD80VID Read 80-column video enable The SLOTCX/INTCX switch determines whether $C100-$C2FF and $C400-$C7FF access slot ROM space or the internal ROM. The internal ROM contains diagnostic routines and some monitor extensions. The SLOTC3/INTC3 switch determines whether $C300-$C3FF access slot ROM space or the internal ROM. The $C800-$CFFF space is tied into this to some extent, following the normal rules for the IOSEL soft switch. The internal ROM in these areas contains the 80-column firmware. The 80-column video modes are implemented by overlaying main and auxiliary memory buffers, with the hardware reading simultaneously from main and auxiliary memory and outputting data at twice the rate. For each line, bytes alternate between main and auxiliary memory, with the first byte coming from auxiliary memory. In addition to 80-column text mode, there is a "double lo-res" mode and a "double hi-res" mode. These aren't supported by firmware in the IIe. (The IIgs does support double lo-res mode in Applesoft BASIC.) The double resolution modes have two video buffers, but it is harder to use the second page, since there are no bank switching methods to toggle the $0800-$0BFF and $4000-$5FFF areas except the RAMRD/RAMWR switch. In addition, you cannot display page 2 while the 80STORE switch is enabled, since the PAGE1/2 switch becomes a bank selector and the video hardware always displays page 1. The primary character set is the same as the ][+ with the addition of normal lower case characters: $00-$3F are inverse, $40-$7F are flashing, $80-$9B are control characters (display as normal) and $A0-$FF are normal, including lower cases. The alternate character set is used by the 80-column firmware. It disables flashing, and replaces the $60-$7F range with inverse lower case characters. The $40-$5F range have two implementations: in the original IIe they are inverse upper case (identical to $00-$1F), and in the enhanced IIe (and the IIc and IIgs) they are mousetext characters.