+MrFish Posted December 29, 2020 Share Posted December 29, 2020 There's also this Atari BASIC machine language subroutine that was published in Compute magazine. It doesn't include the source code, but it could be disassembled easily enough. Access - 130XE Banked RAM.txt Quote Link to comment Share on other sites More sharing options...
rsh Posted December 29, 2020 Share Posted December 29, 2020 1 hour ago, rsh said: Yep PORTB magic! ... I would be interested in looking at that same basic program as well. Do you remember what/where I could get it. I found a page but can't seem to find the full code behind it. I found it https://archive.org/details/1985-11-anticmagazine/page/n55/mode/2up In the text of the mag. Interesting thing is it seems to be switching modes as well as banks. Not sure why it does this yet (see below). There are 4 modes to toggle for extended Ram. I'm thinking the "extend" command in Basic XE put's you in: "CPU extended RAM mode" and automatically moves your program in to secondary bank area. (referenced modes here https://www.atariarchives.org/mapping/appendix16.php ) MODE BANK No. 6502 ANTIC No. Address 0 Extd Extd 0 $0000-$3FFF 1 Main Exd 1 $4000-$7FFF 2 Extd Main 2 $8000-$BFFF 3 Main Main 3 $C000-$FFFF POKE 54017, 193 + (MODE * 16) + (BANK * 4) The above program is doing this: Bank 0 or (1 in program): POKE 54017, 193 + (1 * 16) + (0 *4) = POKE 54017, 209 Mode (extd/extd) Bank 1 or (2 in program): POKE 54017, 193 + (1 * 16) + (1 *4) = POKE 54017, 213 " Bank 2 or (3 in program): POKE 54017, 193 + (1 * 16) + (2 *4) = POKE 54017, 217 " Bank 3 or (Main in program): POKE 54017, 193 + (3 * 16) + (3 *4) = POKE 54017, 253 Mode (main/main) I believe Basic XE uses this mode: Poke 54017,193 (to start, the move and bput/bget commands must set the Bank and buffer bank data for read/write) 1 Main Exd 1 $4000-$7FFF CPU extended RAM mode The question now is which mode to pick for ACTION! .. I will try and copy Basic XE's mode and usage and maybe implement the video extended RAM mode (this is like a giant video ram disk) both would solve my problem. Quote Link to comment Share on other sites More sharing options...
rsh Posted December 29, 2020 Share Posted December 29, 2020 (edited) 2 hours ago, MrFish said: There's also this Atari BASIC machine language subroutine that was published in Compute magazine. It doesn't include the source code, but it could be disassembled easily enough. Access - 130XE Banked RAM.txt 9.24 kB · 2 downloads Nice! This is cool it says you access all 65K without having to worry about the 16K bank limit. I wonder if it will split read/write across banks as well. Can I shove that in to ACTION! lol not sure but seems to be very clean. Thanks! Edited December 29, 2020 by rsh Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 29, 2020 Share Posted December 29, 2020 24 minutes ago, rsh said: Nice! This is cool it says you access all 65K without having to worry about the 16K bank limit. I wonder if it will split read/write across banks as well. Can I shove that in to ACTION! lol not sure but seems to be very clean. Thanks! I've used this for years in Turbo-BASIC XL programs. It works great and is also relocatable (just don't relocate to an area of RAM in the banking window!) Yes, it will read/write across banks. You don't have to concern yourself with banks when using it. It just treats extended RAM as one giant array of 64k bytes (0 to 65535), from the user side. 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.