Jump to content
IGNORED

How to use the other 64kb in a 128kb setup?


Recommended Posts

I think it will depend on what you want to put in the extra 64K, if graphics, then it's fairly easy

you just need to keep track of which screen/data is where and in which bank.

 

If it's code, you have to be a bit more careful, you would need to switch to the appropriate

bank, jmp/jsr to your code and on exit, switch the bank back,.

 

You couldn't put any code that uses VBI's or DLI's there, also any VBI's/DLI's that run normally could not

have any code in the $4000-$7FFF window unless you turn all interrupts off while the bank is switched.. 

  • Thanks 1
Link to comment
Share on other sites

You can find information on PORTB banking with separate ANTIC access in many places, but for an official source, check Appendix H of the Atari 130XE Owner's Manual. The main thing this will tell you that some other places might not is that you should keep bits 6 and 7 high by default.

 

ANTIC and the CPU can only access different banks in that the extended memory window can be conditionally enabled for only one of them. There is only one set of bank selection bits and so it isn't possible to point the two at different extended memory banks simultaneously. IOW, if ANTIC is accessing extended bank 2 at $4000-7FFF, the CPU can only either also access that same bank or $4000-7FFF in main memory.

 

  • Thanks 1
Link to comment
Share on other sites

Not sure about 130XE having the first "official" banking.  Maybe in a "from the factory" sense.

There were 64K expansions for the 800 that allowed the 4K at $C000 to select one of 4 banks.

I think they even had 16K bankable at $4000 in similar fashion to the XE, well before the XE came out.

And no doubt, there were probably expansions for the Apple II that had bankable Ram.

  • Like 2
Link to comment
Share on other sites

2 minutes ago, Rybags said:

Not sure about 130XE having the first "official" banking.  Maybe in a "from the factory" sense.

There were 64K expansions for the 800 that allowed the 4K at $C000 to select one of 4 banks.

I think they even had 16K bankable at $4000 in similar fashion to the XE, well before the XE came out.

And no doubt, there were probably expansions for the Apple II that had bankable Ram.

It's part of a text that lists mem upgrades for the Atari 8-bit series. So it surely means Atari ones. 
Sorry for not posting the context... ;)

Link to comment
Share on other sites

Method's I've used is to create the data and save it to disk, then load the data from disk into the bank(s) as required, you can then switch banks in your program.

As it's not program data, then no "org" is needed, although the compiler will probably want one..

 

I would use a separate program to create the data then save it to disk.

 

 

  • Thanks 1
Link to comment
Share on other sites

I have a demo written in cc65 that uses the banked memory, each bank has 4 screens of data and I use 19 banks (U1M installed)

but the first banks I use are the 130XE extended memory banks, the values required for PORTB are:- $FF,$E3,$E7,$EB,$EF

$FF is the main RAM the others are the banks.

 

The program reads the screen data from disk into the banks at runtime.

 

This is the result, you will need a U1M though to use this as the data file is quite big.

 

The program DRAWSTAR.XEX shows the screens being created before the animation, it does take a while to run.

 

The program DRAWREAD.XEX reads the screen data from disk, the file SCREENS.IMG needs to be in the

same directory as the .XEX, this is much faster as all it needs to do is read the data from disk into the banks

before the animation.

 

DRAWSTAR.XEX DRAWREAD.XEX SCREENS.IMG

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 12/13/2023 at 5:09 AM, TGB1718 said:

You couldn't put any code that uses VBI's or DLI's there, also any VBI's/DLI's that run normally could not

have any code in the $4000-$7FFF window unless you turn all interrupts off while the bank is switched.. 

Unless you copy relevant VBI/DLI stuff to each page right?  That would work right?

Link to comment
Share on other sites

I've used a system similar to what's been mentioned above. With CC65, I used the linker config to setup named code banks (bank1, bank2, etc.,) all at $4000, and used segment names to organize code and data into each one, each in it's own file. Then I had a small loader function that would load the banks one by one, flipping banks as necessary. I also had a table of metadata about the bank locations of various functions and data, and a function caller that would change bank as necessary, and call the function. It's much better to organize groups of related functionality so that most of the calls are within the same bank. Even duplicating sets of functions, for instance, utility functions across the banks can help a lot with the switching overhead.

  • Thanks 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...