rrwood@lotus.waterloo.edu (Roy Wood) (12/12/89)
I've been fiddling about with the bank selectable memory in my 130XE, and I've been having a bit of a problem. It's easy enough to swap in and out the bank at $4000-$7FFF, but I'm having trouble with the memory under the ROMs. Bit zero of $D301 controls whether the upper 16k of the machine is ROM or RAM, and I can turn it off and on without any problem. However, I tried to do the following: 1) copy the ROMs down to lower memory. 2) swap out the ROMs for RAM. 3) copy the "ROMs" from low memory back to their original position, and thus have the OS completely in RAM. I took care to mask out all the interrupts I could think of (SEI, POKMSK at $10 and it equivalent hardware register, plus the NMI hardware register). Unfortunately, the machine still hangs. The screen goes futzy, as if the character set has been redefined as garbage, and there's no response to keystrokes. (Reset brings it back) By the apparent character set mixup, it seems that the hardware is not addressing the RAM correctly, or something like that. Any ideas? Also, what is the second-highest bit in $D301 for? I know the highest-bit (bit 7) is for masking in/out the self-test ROM, but what is bit 6 for? Does anyone have a copy of Mapping the Atari, so they could look this up? (I have a downloaded file version of Mapping the Atari, but it's not very complete.) Thanks... -Roy Wood (rrwood@lotus.waterloo.edu)
norlin@uokmax.ecn.uoknor.edu (NARC ONE) (12/12/89)
In article <19168@watdragon.waterloo.edu> rrwood@lotus.waterloo.edu (Roy Wood) writes: > Bit zero of $D301 controls whether the upper 16k of the machine is >ROM or RAM, and I can turn it off and on without any problem. However, >I tried to do the following: > >1) copy the ROMs down to lower memory. >2) swap out the ROMs for RAM. >3) copy the "ROMs" from low memory back to their original position, > and thus have the OS completely in RAM. > >I took care to mask out all the interrupts I could think of (SEI, POKMSK at >$10 and it equivalent hardware register, plus the NMI hardware register). Hm, there was an article in ANALOG about 2/3 years ago that did this very thing. I remember typing in the source code, and it worked. Are you sure that you disabled NMI's by setting $D40E to zero? Also, as I seem to recall (though I'm not sure), you may need to JMP to $E454 to continue where you left off instead of just switching the O.S. back in. >(I have a downloaded file version of Mapping the Atari, but it's not very >complete.) Wow! I can hardly find the book version, and have never heard of a file version. Could you post/email? >Thanks... > >-Roy Wood (rrwood@lotus.waterloo.edu) -- Norman Lin This is my humble signature file.
dcfs018@antares.Concordia.ca ( STEPHAN BOHM ) (12/13/89)
In article <19168@watdragon.waterloo.edu> rrwood@lotus.waterloo.edu (Roy Wood) writes: >I've been fiddling about with the bank selectable memory in my 130XE, and [...] >1) copy the ROMs down to lower memory. >2) swap out the ROMs for RAM. >3) copy the "ROMs" from low memory back to their original position, > and thus have the OS completely in RAM. > >I took care to mask out all the interrupts I could think of (SEI, POKMSK at >$10 and it equivalent hardware register, plus the NMI hardware register). >Unfortunately, the machine still hangs. The screen goes futzy, as if the >character set has been redefined as garbage, and there's no response to >keystrokes. (Reset brings it back) By the apparent character set mixup, >it seems that the hardware is not addressing the RAM correctly, or something >like that. > >Any ideas? Did you skip $D000-$D7FF when you copied ROM ($C000-$FFFF) to RAM? Did you take care not to alter the other bits in $D301 (so as not to switch BASIC in or out)? Did you make sure address 106 had the right value (this usually has the value $C0 when no cartridge is plugged in, but if you kick out the OS ROM, the OS might think that everything up to $FFFF is RAM and thus PEEK(106) will be too high and it will set up screen memory at a very high address, wiping out the OS). >Also, what is the second-highest bit in $D301 for? I know the highest-bit >(bit 7) is for masking in/out the self-test ROM, but what is bit 6 for? It's marked 'reserved' but RAM upgrades use it for bank switching. Thus you should leave that bit as is, because otherwise you may interfere with ramdisk handlers and whatever other software uses it (like wordprocessors and spreadsheets, for example). Jean Goulet Electrical Engineering Class of '89 Concordia University Montreal, Canada