Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #5914
| From | ol.sc@web.de (Oliver Schmidt) |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Innovative(?) use of 80STOREON |
| Date | 2021-12-08 23:21 +0000 |
| Message-ID | <sorem7$1lf$1@solani.org> (permalink) |
Hi, I've never seen the ideas below presented before. I'm wondering if they are considered too obvious to be mentioned or if something is wrong about them - or if they are actually innovative... TL;DR Set 80STOREON and HIRESON, but don't use it for DHGR. Eversince the //e AUXMEM layout was introduced, people were unhappy with it. According to my understanding the primary concern is that AUXMEM is "all or nothing". You usually want some part of your address space being switched and some part being fixed. The fixed memory contains the main routine of the program while the switched memory contains the sub routines. Okay, AUXMEM comes with the ALTZP feature, but beside the zero page and the stack the only memory not switched is the language card. However, the MAIN language card is used by ProDOS and access to the AUX language card can't be combined with access to the MAIN "base" memory. So all in all, ALTZP is pretty much useless. Entrance 80STOREON: The innovative(?) approach is setting hires mode (HIRESON) to make 80STOREON act on the address space $2000-$4000 but staying in text mode (TEXTON). This allows for both setups: 1. MAIN: $800-$2000, AUX: $2000-$4000, MAIN: $4000-$BF00 2. AUX: $800-$2000, MAIN: $2000-$4000, AUX: $4000-$BF00 So one can a) use $2000-$4000 as rather small fixed memory and switch $800-$2000/$4000-$BF00. b) use $800-$2000/$4000-$BF00 as pretty large fixed memory and switch only $2000-$4000. Especially option a) is very attractive - of course for text based programs only. Notes: 1. The setups described here don't preclude 80 column text in any way. 2. For a more sophisticated program it's of course possible to consider both memory areas ($800-$2000/$4000-$BF00 as well as $2000-$4000) as switched. It can always use "the other" memory area as trampoline. So far so good, but there's also something in there for graphics programs: Again setting 80STOREON with HIRESON, but this time with TEXTOFF. However, the innovative(?) idea is here to _not_ activate DHGR, but stay with HGR (80COLOFF). This allows for two interesting setups: 1. Don't bother with memory switching for parts of the program code at all. Just enjoy the contiguous memory area $800-$BF00, which is especially useful for high level language tool chains not optimized for the Apple II memory layout. Only the actual graphics code needs to be aware of memory switching - and needs to be located outside of $2000-$4000. Simply copy the program code at $2000-$4000 from MAIN to AUX using AUXMOVE after loading the program before accessing the hires video RAM. There's no need to touch RAMRDOFF, RAMDRON, RAMWRTOFF or RAMWRTON. Just make sure to have PAGE2ON on during normal program operation and temporarily set PAGE2OFF for hires video RAM access. Note: The rest of AUX may still be used as /RAM disk: Instead of using AUXMOVE, just use ProDOS to save the program code at $2000-$4000 to the otherwise empty /RAM disk. The file is guaranteed to be placed at $2000-$4000 in AUX. 2. In general like 1.), but use AUX $2000-$4000 as trampoline to switch $800-$2000/$4000-$BF00 between MAIN and AUX. The code accessing the hires video RAM can be located in either MAIN or AUX. That's all. Regards, Oliver
Back to comp.sys.apple2.programmer | Previous | Next — Next in thread | Find similar
Innovative(?) use of 80STOREON ol.sc@web.de (Oliver Schmidt) - 2021-12-08 23:21 +0000
Re: Innovative(?) use of 80STOREON I am Rob <gids.rs@sasktel.net> - 2021-12-08 19:58 -0800
Re: Innovative(?) use of 80STOREON ol.sc@web.de (Oliver Schmidt) - 2021-12-10 20:57 +0000
Re: Innovative(?) use of 80STOREON qkumba <peter.ferrie@gmail.com> - 2021-12-11 16:11 -0800
Re: Innovative(?) use of 80STOREON Oliver Schmidt <ol.sc@web.de> - 2021-12-12 10:43 +0000
Re: Innovative(?) use of 80STOREON Hugh Hood <hughhood@earthlink.net> - 2021-12-12 10:57 -0600
csiph-web