Hi Matt, What I have is reference to the Zram 2c card. AFAIK, the info is the same for all Applied aux memory cards. First, Applied cards work by using a bank select switch at $c073 and then using the standard Apple aux bank routines. Basically, you select the bank you want then treat it like it's the aux 64k bank of ram. Some things to keep in mind, not all cards have the full compliment of ram and this should be checked by your program. There are multiple interrupt vectors and routines which use aux memory should be prepared to disable or deal with them. It is recommended that interrupts be disabled in programs not requiring their use. You select on of 16 valid bank numbers into the bank select registers. Data transfers between banks of auxiliary memory must done in two stages. First swap from the original page to main ram then switch banks and transfer the data to the new bank. Bank zero always contains the 80 column display and graphics data for DHR and must be active whenever the program updates the display screen. The bank select register is shared with the system. Writing to the register will trigger the [addle strobe. To insure proper paddle reads you must wait at least 3 milliseconds after changing banks. All programs should start by initializing the bank register to zero. The software should be able to handle a reset by storing a zero in the bank register. This sample intercepts the reset soft vector at $3f2-$3f3 and changes it to point to the new reset vector. Code taken from zram manual. *store off old reset vector lda $3f2 sta $300 lda $3f3 sta $301 *set reset vector to point to $302 lda #$02 sta $3f2 lda #$03 sta $3f3 eor #$a5 sta $3f4 *reset routine lda #$a9 ;lda #0 sta $302 lda #$0 sta $303 lda #$8d ;sta $c073 sta $304 lda #$73 sta $305 lda #$c0 sta $306 lda #$6c ;jmp ($300) sta $307 lda #$00 sta $308 lda #$30 sta $309 The next sample will find all valid banks and store the results in the bank table. Sorry about the formatting, hope this is readable. banksel equ $c073 maxmem equ 3*16 *write bank number to each bank sta $c009 ;store in alt zp ldy #$7f ;valid banks range $00-$7f findbanks sty banksel sty $00 ;first test tya eor #$ff sta $01 ;second test dey bpl findbanks *read them back to find valid banks and save in table lda #$00 tay tax findthem sty banksel sta banksel+3 cpy $00 bne notone tya eor #$ff cmp #$01 bne notone inx tya sta banktbl,x ;save valid bank cpx #maxmem bcs done notone iny bpl findthem *ending routine done lda #$00 ;reset to video bank sta banksel sta $c008 stx banktbl ;size of ramcard lda #$ff sta banktbl+1,x ;mark end of table jmp continue banktbl ds maxmem+2 continue equ * This basic info should help get you started. You may find it better to use Prodos and a ramdisk for a more standard method of using extra memory. -- Cheers and best wishes, Phoenyx Have you fed your Apple today? Phoenyx's Pages are back online... It seems the ZIP.TO link was down for a while. It is now working again. This is the preferred link to my site. You may also use the direct link. http://zip.to/Phoenyx_A2 http://www.tinyangeldesigns.com/Apple2 Matt Jenkins wrote: > Phoenyx wrote: > > > > What I have is reference to the Zram 2c card. AFAIK, the info is > > the same for all Applied aux memory cards. > > I hope so - I'd hate to see what I'm working on not work in a //c. > On a similar note, does the //GS use the same system in emulation > mode ? Partly. The IIgs does emulate auxiliary memory, but only a single bank. Don't try to use $C073 as a bank select register - it is code in the IIgs (part of the interrupt handler). The IIgs can directly address its entire 16 MB address space by using long addressing modes, which are available in both native and emulation mode, so it doesn't need bank switching, except for compatibility with 8-bit machines. > OK - I thought it'd be this simple. I think I'll still need the //e > technical reference to find out more about interrupts etc. in aux. > memory. Oh, do the same trick and limitations apply when using > the auxiliary bank "language card" as they do with aux. bank 0 ? I'm not quite sure what you're referring to here, so I'll provide too much information. :-) I see you already know about RAMRD/RAMWR, and presumably you know about 80STORE. There is one more softswitch of relevance here: AUXZP Selects main or auxiliary memory for both reading and writing in $0000-$01FF (zero page and stack) and $D000-$FFFF (language card). The AUXMOVE and XFER routines in page 3 only deal with the AUXRD and AUXWR switches, i.e. they can only handle the main 48K area. You have to use your own code to handle auxiliary zero page, stack and the language card area. If you are dealing with a multi-bank card, $C073 selects the active RAM bank for all of auxiliary memory. If you switch ZP/stack/language card to auxiliary memory, then you may have to deal with the interrupt vectors ($FFFA to $FFFF). A multi-bank version extends the problem to other banks as well. Note that the IIgs always fetches its vectors from ROM, so you only have to deal with this on the IIe and IIc. There are also conventions for dealing with the stack pointer in main and auxiliary memory. The two stacks are supposed to be independent, and the stack pointers and supposed to be saved and loaded in memory locations $0100 and $0101 in auxiliary memory (I'd have to dig out a manual to confirm which way around they go). There are no conventions that I know of for dealing with stacks in multi-bank auxiliary slot RAM cards. -- David Empson dempson@actrix.gen.nz Snail mail: P O Box 27-103, Wellington, New Zealand