Harry Potter Posted June 12, 2023 Share Posted June 12, 2023 Hi! I like my Cubbyhole optimization technique and am looking for more memory holes in the Atari8 series of computers into which to stuff code and data. I am aware of two memory areas, and the portion of one program's config file for cc65 that uses the memory areas follows: # Aux. mem buffers #Printer buffer, not used if not using the printer. Too small for loaded #data. PRNBUF_: start = $03C0, size = $0028; #Tape buffer, Unused data and BASIC FP, not used by cc65. 771 bytes XBUF_: file = "xbuf1.bin", define = yes, start = $03FD, size = $0303; #Code used for loading MEM.SAV, shouldn't be needed by a cc65 program. #MEMSAVM_: file = "memx1.bin", define = yes, start = $15A4, size = $015C, optional = yes; #Same as above, except overwriting related data. #Use instead if necessary. 1090 bytes MEMSAVM_: file = "memx1.bin", start = $15A4, size = $0442; I am looking for other areas and may use some OS variables for other things. I have the Mapping the Atari e-text but am looking for something small and simple that just lists each address and a short description of it. I have such for CBM computers but not the Atari8 systems. BTW, I'd like one for the Apple2 as well. Thank you. Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 13, 2023 Share Posted June 13, 2023 Certain bytes/areas in lower page 0 though usage differs among OSes and it's mostly wiped on warmstart. A few bytes in upper page 0 depending on what language processor if any is used. Most/all of the FP variable area if that's not in use or practically all of it if you can tolerate it being altered. Potentially a fair chunk of the stack but the risk is there of it being wiped. Possibly some page 2 $247-$24D, $24E-$26A though it's wiped on warmstart and could be used by 3rd party OSes and/or Dos or language processors. IOCBs $340-$3BF are 16 bytes each - #0 is used for E: by the OS but potentially some or all could be used if CIO isn't being used, wiped by warmstart. $3ED-$3F7 - spare but possibly taken by other OS/Dos/language. $3FD-$47F - cassette buffer. $480-$57F - line buffer for Basic but otherwise spare. $580-$5FF - buffer for E: input - can be used if E: not in use. Other - assorted single/multiple areas where usage case might be only for E: or S: or other OS components. But they're generally in non contiguous arrangement, usage case can vary among OSes and there can be risk associated with using them. I wrote a 5 sector games binary loader menu in the 80s - it loaded in low memory then relocated sections to the IOCBs and other low memory to increase the chance of low memory loading games to work. Doing so can have benefits but makes debugging a bit harder. Quote Link to comment Share on other sites More sharing options...
+David_P Posted June 13, 2023 Share Posted June 13, 2023 What is your target system and operating system? Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 13, 2023 Author Share Posted June 13, 2023 My target system is the 8-bit Ataris, both 800 and XL, but my MemXAtari library, when used, seems to work only on the Atari 1200XE. I am using Dir2Atr to create my disk images, and I believe my OS files are for DOS 2.0 but am open to other OSes. Rybags: I thank you for the info. It should be useful. BTW: what is the device E:? Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 13, 2023 Share Posted June 13, 2023 E: is Editor, aka the default text screen. Re compatibility - I'd be aiming for total compatibility. With the range of custom OSes and system modifications around there's potentially thousands of possible configurations. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted June 13, 2023 Share Posted June 13, 2023 2 hours ago, Harry Potter said: what is the device E: If you don't know that, you should really go back to basics with the Atari 8 bits, it's rather fundamental as are all the other devices S, P, D, R etc. etc. 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 13, 2023 Share Posted June 13, 2023 Not necessarily. For applications, probably. For demos and graphical games you tend not to use much of the OS other than the VBlank processor. Quote Link to comment Share on other sites More sharing options...
+David_P Posted June 13, 2023 Share Posted June 13, 2023 2 hours ago, Harry Potter said: My target system is the 8-bit Ataris, both 800 and XL, but my MemXAtari library, when used, seems to work only on the Atari 1200XE. I am using Dir2Atr to create my disk images, and I believe my OS files are for DOS 2.0 but am open to other OSes. Rybags: I thank you for the info. It should be useful. BTW: what is the device E:? So a system with 48K RAM. For DOS 2.0S, are you using the default configuration, or are you adding additional drives and additional files (which affects the low memory)? If your system only operates on XL/SE series computers, that suggests that it's actually using the 16K (well, 14K) RAM under the OS, meaning that the 400 and 800 will not work. Does your compiler use RAM under ROM? If you want additional RAM free, look for Mr Atari's LiteDOS, a DOS 2.0 / MyDOS compatible DOS that will free up an additional 4K of RAM. 1 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 13, 2023 Author Share Posted June 13, 2023 Well, I'm believe I'm using the default settings with Dir2Atr and the startup files I supplied with my text adventure codes and my MemXAtari memory configurations. The same with AtaSimpleIO. Also, I'm not loading any other device drivers in my configs. I'm using cc65 to compile my programs. I plan to remove the extra memory areas from MemXAtari's and my text adventure codes' extra memory areas, create other configs with the memory areas suitable for other OSes and make them options. I should've understood this before, as everybody here has been telling me this. What other DOSes should I support? Where can I find them and their docs? BTW, AtaSimpleIO only uses OS functions independent from the current DOS and so should be implementable on most DOSes with just a small modification to the crt0.s file. AtaDisk65 doesn't use extra memory and should be compatible with most DOSes, as the services it supports are likely to be in most DOSes. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 14, 2023 Author Share Posted June 14, 2023 I can extend in my configs the bottom of the XBUF_ memory area by 16 bytes. That area overwrites the tape buffer and some BASIC data. I can also create a memory area from $247 to $26A for bss data like I did for the printer buffer. Thank you for the information. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 14, 2023 Author Share Posted June 14, 2023 I'm updating some cc65 Atari configs now. For what purpose is the section of the Atari's memory between $247 and $26A used? I want to know what to call this section of memory. Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 14, 2023 Share Posted June 14, 2023 400/800 I'm fairly sure was all unassigned. $24E-$26A I have as reserved for future OS use. $247-$24D are in use by the XL OS - stuff like PBI and relocatable handlers I'm reasonably sure that altering some locations, possibly 247-248, can cause unstable operation or lockup. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 14, 2023 Author Share Posted June 14, 2023 Thank you, again. BTW, should I publish some extra cc65/Atari memory configurations with my extra memory areas online? They work best with AtaDisk65, but I really should load them in the .xex file instead of separately through extra loads, as it will require less memory.. Quote Link to comment Share on other sites More sharing options...
phaeron Posted June 14, 2023 Share Posted June 14, 2023 4 hours ago, Rybags said: $24E-$26A I have as reserved for future OS use. $24E-26A are used by the 1400XL/1450XLD PBI voice/modem/disk handlers, and by drac030's 65C816 OS for native mode vectors. 1 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted June 14, 2023 Share Posted June 14, 2023 $0254 is used for the internal parallel device IRQ mask. I've used $024E, $24F, and $250 for the CX85 numeric keypad. I wasn't aware of the 65C816 native mode vectors. Is this listed somewhere so I can avoid conflicts with my OS changes? Thanks! Quote Link to comment Share on other sites More sharing options...
phaeron Posted June 15, 2023 Share Posted June 15, 2023 6 hours ago, reifsnyderb said: $0254 is used for the internal parallel device IRQ mask. I've used $024E, $24F, and $250 for the CX85 numeric keypad. I wasn't aware of the 65C816 native mode vectors. Is this listed somewhere so I can avoid conflicts with my OS changes? Yes, it's of course unofficial and specific to that 65C816 OS, but it's extensively well documented: http://drac030.krap.pl/en-specyfikacja.php 1 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 17, 2023 Author Share Posted June 17, 2023 I have some extra memory configurations for cc65 and Atari8 targets to make available portions of low memory available to cc65/Atari8 programs. As of now, they are mainly in my text adventure codes. Also, they use AtaDisk65 functions to load data into low memory. I should include the stubs in the main file, as this will decrease overhead and make the total size a little smaller. Should I make the extra configs a separate download? If so, I will need more information on DOS memory configurations: I currently only have and know about DOS 2.0. BTW, the text adventure codes that contain the extra configs are at c65 additions - Manage /game at SourceForge.net. I just remembered: AdvSkelVic65 also has a setup for a 32k MegaCart cartridge, but that support is limited and designed specifically for AdvSkelVic65. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 21, 2023 Author Share Posted June 21, 2023 I just realized: the Atari8 32k cartridge configuration in AdvSkelVic65 actually can be used for other programs, but its setup is primarily for the text adventure. It puts all code and some data in the first 16k and extra data, such as text and databases, in the second 16k. This can be used in other programs. Quote Link to comment Share on other sites More sharing options...
sanny Posted June 24, 2023 Share Posted June 24, 2023 Blah blah blah (sorry, couldn't resist...) 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.