Jump to content
IGNORED

U1MB PORTB bits configuration.


Recommended Posts

Thanks FJC, I wasn't aware that Altirra's docs are so complete. But it doesn't tell clearly how to use it.

 

I remember that there was a simple formula for 130xe bank switching: 129+mode*16+bank*4

where bits 2-3 defined bank number and bits 4-5 the mode.

 

Now let's say for a 320kb rambo: if both Antic and CPU are on all the time, does it mean that mode will be always 0

and bank is switched simply by setting portb a value of 129+bank*4?

 

For 576k and 1088k modes it must be a bit more complicated :)

Link to comment
Share on other sites

Ok, found this in Atari Magazine and the explanation from chapter 3.5 of Altirra

manual seems clear now:

 

Memory Location 54017 (130XE Only)

 

Bit Position Function

0

If 1, enable OS ROM, disable RAM from $C000-$FFFF (default)

If 0, disable OS ROM, enable RAM from $C000-$FFFF

1

If 0, enable BASIC ROM at $A000-$BFFF (default)*

If 1, disable BASIC ROM, enable RAM at $A000-$BFFF

2-3

If 00 (decimal 0), switch first 16K bank of extra 64K into $4000-$7FFF

If 01 (decimal 4), switch second 16K bank of extra 64K into $4000-$7FFF

If 10 (decimal 8), switch third 16K bank of extra 64K into $4000-$7FFF

If 11 (decimal 12), switch fourth 16K bank of extra 64K into $4000-$7FFF

4

If 1, deny 6502 access to extra bank (default)

If 0, allow 6502 access to extra bank

5

If 1, deny ANTIC access to extra bank (default)

If 0, allow ANTIC access to extra bank

6

Not presently used. Default = 1

7

If 1, disable self-test ROM, enable RAM at $5000-$57FF (default after powerup)

If 0, enable self-test ROM, disable RAM at $5000-$57FF

 

But if I understand correctly, there is no mode available in U1MB where Antic

has access to banked memory? Do I get it right?

Edited by greblus
Link to comment
Share on other sites

Ok, I got it wrong (many times :)) but found one good explanation of all memory upgrades in polish:

 

www.atari.apox.pl/art,47,rozszerzenia-pamieci.html

 

(host is down, got it from google cache)

 

So below is my interpretation followed an example in Action.

 

Atari memory extensions:

 

PORT B it's a group of memory extensions based and named after $d301 PORTB control register. These extensions work with 16kb switchable banks mapped in the address area $4000-$7fff, same as in Axlon extension.

 

* 130XE - in standard configuration Atari 130XE has 4 additional banks, selectable using bits 2 and 3 of the PORT B register. If bit 4 is set to 0 6502 will have access to the additional bank, if bit 4 is set to 1 CPU will access main memory. Bit 5 is controlling access of the Antic processor, thus an independent access of 6502 or Antic is possible.

 

* 192kB - extension similar to 130XE described above, but the bank number is defined by bits 2, 3 and 6, so up to 8 banks can be selected (what means +128kB of banked memory)

 

* TOMS 256kB, 256kB/ 320kB RAMBO - in this extension bit 4 controls access of both 6502 and Antic at the same time. Bit 5 is an additional bit allowing to select banks, so bits 2,3,5 and 6 make 16 banks available (+256kB RAM).

 

* 576kB RAMBO/320kB Compy Shop - in these extensions bit 7 which was normally used to enable or disable Self Test plays a double role: if bit 4 is set to 1 it works as in stock configuration. If set to 0 it is an additional bit used for bank selection, so bits 2,3,6,7 allow to select 16 banks, in case of RAMBO 576kB bit 5 was another bit used for bank selection, what resulted in 32 banks available and finally in Compy Shop bit 5 allows to control Antic access.

 

* 1088kB RAMBO/576kB Compy Shop - extensions similar to 576kB RAMBO/320kB Compy Shop but there is an additional bit 1 used for banks selection if bit 4 is set to 0 (if bit 4 = 1 bit 1 works as in stock config). Bits 1, 7, 6, 2, 3, 5 are used for selection of one of 32 banks (+512kB) in 576kB Compy Shop.

 

Now very simple (and suboptimal) Action! example: writing 10 bytes with bank number to first 10 banks of Rambo 320kb extension, hope it makes it even clearer:

 

; 7 6 5 4 3 2 1 0 bit no

;

; 1 0 0 0 0 0 1 1 : 131

; 1 0 0 0 0 1 1 1 : 135

; 1 0 0 0 1 0 1 1 : 139

; 1 0 0 0 1 1 1 1 : 143

; 1 0 1 0 0 0 1 1 : 163

; 1 0 1 0 0 1 1 1 : 167

; 1 0 1 0 1 0 1 1 : 171

; 1 0 1 0 1 1 1 1 : 175

; 1 1 0 0 0 0 1 1 : 195

; 1 1 0 0 1 0 1 1 : 203

 

; bits 2356 define bank no, bit 4 allows CPU and ANTIC access

 

proc main()

 

byte array pb = [131 135 139 143 163 167 171 175 195 203]

 

card portb=54017

int i,j

byte pointer ptr

 

for i=0 to 9 do

portb=pb(i)

ptr=$4000

for j=0 to 9 do

ptr^=i

ptr==+1

od

od

 

for i=0 to 9 do

portb=pb(i)

ptr=$4000

printf("Bank %I%E", i)

for j=0 to 9 do

printf("%I", ptr^)

ptr==+1

od

printe()

od

 

do od

return

 

 

  • Like 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...