Path: utzoo!mnetor!uunet!husc6!purdue!umd5!hans From: hans@umd5.umd.edu (Hans Breitenlohner) Newsgroups: comp.sys.atari.8bit Subject: Re: 16K cartridge - How? Message-ID: <2676@umd5.umd.edu> Date: 5 May 88 20:02:49 GMT References: <2806@bsu-cs.UUCP> Reply-To: hans@umd5 (Hans Breitenlohner) Organization: University of Maryland, College Park Lines: 81 Keywords: Cartridge 16K ROM RAM In article <2806@bsu-cs.UUCP> cfchiesa@bsu-cs.UUCP (Christopher Chiesa) writes: > >> about his experiments with ROM vs. RAM versions of cartridge code >I have several theories about this phenomenon, which I'd like to bounce off >you of the Net. > >1) Centipede is a 16K cartridge and I'm just not getting all the code. My Centipede cartridge (CXL4020) is definitely an 8k cartridge. > > > Questions: > > How do I get at the other 8K ? Is there a "switch" address in the ROM > that toggles in the second half "upon request"? Or does it appear in > some other, hidden memory block that I haven't found yet? > Standard 16k cartridges occupy memory from $8000 to $BFFF. There are two ROM enable lines on the cartridge connector, one for the block $8000-$9FFF and one for the block $A000-$BFFF. There are also separate select lines for the two banks of ROM, and only enough address lines for 8k. All this surely is a remnant from the design of the 800's memory. See "Mapping the Atari", Appendix 14, or the schematics for your system, for more detail. Then there are the bank-switched cartridges. Basic-XE, for instance, crams 16k into an 8k address space. Switching is done by addressing locations $D500-$D5FF. $Bxx addresses one block of ROM or RAM, $Axx addresses one of three blocks of ROM or RAM. (I hope I got this right, haven't actually had a chance to play with one). Your cartridge definitely is not bank-switched. >2) Centipede is an 8K cartridge but detects RAM-vs-ROM execution and bungs up > if you've moved it to RAM. > > No real proof OR disproof of this one, except that "that's something I'd > probably do if I were Atari." I would be surprised if this was the case. > > >There ARE a few places in the code where an LSR (logical shift right) is per- >formed on memory addresses WITHIN the Cartridge ROM. I haven't been able to >determine whether these operations are part of "detecting ROM vs RAM" or "swap- >ping in a second 8K". I also haven't looked at the WHOLE 8K yet, of course; >it's an ongoing effort and your responses here will be helpful in "pruning" >paths of inquiry that are in the wrong direction. > I would guess these are data areas or tables of addresses. >Chris Chiesa >-- There are other, more innocent possibilities: 1. During initialization the OS sets up numerous pointers based on the size of RAM that it finds. Addresses $6A, $2E4-$2E6 come to mind, but there may be more. To keep everything away from the cartridge code you have to set up all of these just right, or someone might trash part or your RAM. The only way to be sure you are doing it right is to paw through the OS listings, and try to duplicate whatever is done there. 2. Some OS scrolling and screen clearing routines touch memory beyond the end of the screen area. Read what "Mapping the Atari" has to say about location $6A for more details. There might be some interaction with BUG/65 and its screen handling, too. You might experiment with setting $6A (and related cells) to a value lower than $A0. Also the Centipede cartridge might have routines which are doing similar sloppy things. 3. I would also be concerned about what happens to your system (and memory contents) when you plug and unplug a cartridge while the system is running. After all, you are disturbing everybody's address and data bus when you do that. Happy hunting, Hans