Note first post had error in table below.
But thinking ahead, I'll need to upgrade my current MMU to allow for another two address lines (EA18 & EA19.) This can easily be done with the addition of another 74LS670 chip, but what would be the best way to wire it in to the existing MMU circuit? I presume EA17, the existing ~RAM/ROM select line, would become the ~GR input for the second 670 and I'd remove the inverter to place it on EA19 coming out of the second 670 and going to ROM?
Think of what you are saying here.
Existing MMU always has some memory enabled for a memory cycle. The CS enable is just by the address lines.
The current MMU is 4 16k areas of 256K
Using Q4 of 670#1 to control -GR of 670#2
670#1 16k area 0
670#1 16k area 1
670#1 16k area 2 670#2 16k area 2 <-( left this out on first post )
670#1 16k area 3 670#2 16k area 3
OR
670#1 16k area 0
670#1 16k area 1
670#1 16k area 2 670#2 16k area 2
670#1 16k area 3 670#2 16k area 3 <-( left this out on first post )
With extra I/O input to 670#2
670#2 16k area 0 could change to 670#2 16k area 2
or
670#2 16k area 1 could change to 670#2 16k area 3
I would say this is a big fail.
You only have two address inputs from Z80 to use to select expanded memory. Each bit added to output of MMU doubles the memory size you can select a 16k area from.
========
You always need to think of big picture.
Look at this from other way, not as how many banks CP/M can use but use of your memory.
With 16k banks, 4 are used by CP/M user program
So for big picture, your problem is lack of banks in expanded memory.
A second problem is no space to put more banks in Z80 memory.
First question should be how many areas of Z80 memory can CP/M manage.
Remember that CP/M can use two modes.
Z80 does the work or DMA does the work.
DMA here can be something you write and can use more memory areas then CP/M.
For just one area managed by CP/M
CP/M will move data to common memory and then change banks and move data from common memory to new area.
DMA will be Move data at this address with a size of in bank X to
Bank Y at this address.
Need to remember that data could be in two source banks or detestation banks.
CP/M can not force a program to put the Disk I/O block all in one memory area.
With 16k banks, CP/M should know that only three can be changed and still have a common memory ares.
A CP/M program works with blocks of 128 bytes or less
CP/M storage interface can have larger sizes of blocks.
CPM will try to have all of a data block fit in one swapped area.
So two main use cases
Move a small block of data to/from user space.
Move a larger block of data to/from storage.
A large block to/from user space becomes a small block move of many blocks.
Ok time to think ahead and also do what you want.
From CP/M view,
two areas allows direct copy between areas.
Larger areas could allow CP/M to manage a larger total address space.
Areas that are outside of CP/M managed area can be storage
managed by your programming.
So think about this
Adding second 670 can give 4096k total expanded memory.
More logic will be needed for a smaller block size when using the 670's
First step could be for your current memory to act like normal memory.
To do this put a 138 in place of inverter chip select.
Before MMU you just jumper-ed UN-Used address lines to a level.
You now have a memory chip that is half RAM and half ROM.
By using A 138 to decode chip select to memory chips you could have 7 ram & one ROM of same size.
Do not use messy logic to decode memory.
Use a 138 to decode memory for each size of memory!!
You need more address lines to address more memory. Best use of added 670 is to add address lines so that each 16k area is from a larger address space.
look at how you are building now.
Putting memory on breadboard takes a lot of space and a lot of wries that can get disconnected. Most of the wires are daisy chained.
1. Look at having many 32 pin dip sockets you can plug your memory into.
For max flexibility only a few pins need to be special and not connected to daisy chain.
You need a 0.05 bus off wires ( a ribbon cable is 0.05). Three ribbon cable connectors could hold two dip sockets. Look at this to get some ideas. And you can have two more dips on other side of ribbon cable.
On a board with solder pads this is a four hole bridge of wire, top dip, bottom dip, wire , then a space and again for other side of top dip..