News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Fran123

selecting ram bank

Started by Fran123, 21:49, 09 June 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fran123

I have a question about the addressing of the memory banks

On a cpc6128 the combinations are as follows:

-Address- 0 1 2 3 4 5 6 7
0000-3FFF RAM_0 RAM_0 RAM_4 RAM_0 RAM_0 RAM_0 RAM_0 RAM_0
4000-7FFF RAM_1 RAM_1 RAM_5 RAM_3 RAM_4 RAM_5 RAM_6 RAM_7
8000-BFFF RAM_2 RAM_2 RAM_6 RAM_2 RAM_2 RAM_2 RAM_2 RAM_2
C000-FFFF RAM_3 RAM_7 RAM_7 RAM_7 RAM_3 RAM_3 RAM_3 RAM_3

understanding that the banks are distributed as follows:

0..64k RAM_0 RAM_1 RAM_2 RAM_3
64..128k RAM_4 RAM_5 RAM_6 RAM_7

If I want to use configuration C2 (page 0, combination 2) I will have:
RAM_4 RAM_5 RAM_6 RAM_7

where the formula for each bank is:
bank 1= page*4+4 (0*4+4)=4
bank 2= page*4+5 (0*4+5)=5
bank 3= page*4+6 (0*4+6)=6
bank 4= page*4+7 (0*4+7)=7

but if I have 8 pages of 64k (512K)

page 1 0..64k RAM_0 RAM_1 RAM_2 RAM_3
page 2 64..128k RAM_4 RAM_5 RAM_6 RAM_7
page 3 128..192k RAM_8 RAM_9 RAM_10 RAM_11
page 4 192..256k RAM_12 RAM_13 RAM_14 RAM_15
page 5 256..320k RAM_16 RAM_17 RAM_18 RAM_19
page 6 320..384k RAM_20 RAM_21 RAM_22 RAM_23
page 7 384..448k RAM_24 RAM_25 RAM_26 RAM_27
page 8 448..512k RAM_28 RAM_29 RAM_30 RAM_31


How is the memory configured with the FA combination (seventh page and third combination)?
because in this case the fourth bank would be 7*4+7 = 35

Thank you!

lightforce6128

I had a look here: https://www.cpcwiki.eu/index.php/PAL16L8#PAL_MMR_register

Combination FA is the second row in the diagram (fourth row with headlines). So this should be:
RAM_0  RAM_1  RAM_2  RAM_27

But this is only theoretical. I do not have experience with more than 128K on the CPC. Maybe somebody else can confirm?

McArti0

the formula for each bank is:
Setting = #C0 + Page * 8 + 4..7
Because bit2 does not change the page number but exists and changes the configuration within the page.
The page number selection starts with bit 3 with weight 8. Each page has 8 configurations but only 4 banks of ..16kB each
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
One chip driver for 512kB(to640) extRAM 6128
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

Powered by SMFPacks Menu Editor Mod