Welcome, Guest. Please login or register.


Author Topic: Internal memory expansion (Read 252316 times)

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Internal memory expansion
« on: 2013.September.03. 12:26:10 »
Are the pinouts of EXP1 and EXP2 in the schematics anywhere? I looked last night and couldn't see them...

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: Internal memory expansion
« Reply #1 on: 2013.September.03. 12:28:16 »
Look at the pinouts :-)

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: Internal memory expansion
« Reply #2 on: 2013.September.03. 12:48:55 »
Damn, I should have thought of that! :oops:

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: Internal memory expansion
« Reply #3 on: 2013.September.03. 13:00:26 »
Quote from: Saint
Damn, I should have thought of that! :oops:
:-)

Are you going to build memory expansion for the spare machine?
« Last Edit: 2013.September.03. 13:30:36 by szipucsu »

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: Internal memory expansion
« Reply #4 on: 2013.September.03. 13:15:09 »
Yes, that's what I was thinking. Should be simple with an SRAM chip and a PAL for address decoding. With surface mount components it would be a tiny board, and you could have a large memory expansion (like your modified expansion card). The space above EXP2 is a bit tight though -- was hoping it could just be pin headers for both connectors. Looks like you need ribbon for EXP2, like the original memory expansion.

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: Internal memory expansion
« Reply #5 on: 2013.September.03. 18:23:57 »
So this is how I understand the memory expansion works:

MREQ is used to trigger the RAS / CAS delay capacitors to the address multiplexers when A16 is high and A17-21 are low and /RD or /WR are low. This feeds the address to the 4164 chips with suitable RAS / CAS delays. Quite neat.

So a read or write in the memory range of 0x1xxxx will access the internal memory expansion.

For a modern SRAM based memory expansion you'd just need to decode A16-A21 as you like for the SRAM size (from 0x10000 up), then enable the SRAM when MREQ is low and read or write are low.

I'm not that familiar wit the Z80, so if you could sanity check for me Zozo? :)

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: Internal memory expansion
« Reply #6 on: 2013.September.03. 18:41:37 »
Interfacing SRAM or Flash ROM are very simple task. For 512K chips enought one 74HCT138 for address decoding. A0-A18 go directly to the memory chip, A19-A21 to the 138 inputs (A-B-C). MREQ to 138 low level enable (G2A&G2B), RFSH to 138 high level enable (G1) (no access at Refresh). RD and WR to memory WE and OE. One of the 138 outputs to memory CE.
« Last Edit: 2013.September.03. 22:04:45 by Zozosoft »

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: Internal memory expansion
« Reply #7 on: 2013.September.03. 23:05:16 »
Ok, that makes sense. How does the memory mapping work from A0-A21 to segment numbers?

The internal 64K RAM expansion seems to decode A21-A16 = 000001b, or 0x1nnnn. Ah, I have that inverted because it's an active low input, so it should be 111110b? Which would be segment F8, which makes more sense... :)

So if I wanted to map 512K SRAM to an internal memory expansion which would include segments F8-FB, could I use A21-A19 = 111b and just waste 64KB of the SRAM without causing any problems?

Edit: Hmm, it looks like the /ACCESS line of the Nick drives the data bus on VRAM access. So I would need to ensure the internal RAM expansion does not drive the data bus in segments FC-FF?
« Last Edit: 2013.September.03. 23:22:54 by Saint »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: Internal memory expansion
« Reply #8 on: 2013.September.03. 23:20:56 »
Quote from: Saint
So if I wanted to map 512K SRAM to an internal memory expansion which would include segments F8-FB, could I use A21-A19 = 111b and just waste 64KB of the SRAM without causing any problems?
It mirrors the video RAM, reading can be conflicted, but as both outputs contain the same data, practically no problem. The prototype Bugtronics 512K expansion worked the same way.

The trick to decode for DC to FB can be done with some more ICs
« Last Edit: 2013.September.04. 11:38:37 by szipucsu »

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: Internal memory expansion
« Reply #9 on: 2013.September.03. 23:26:43 »
Quote from: Zozosoft
With some more ICs can do the trick to decode for DC to FB.
I'll have a think about that! :)

If you can safely drive the bus with FC-FF being a mirror, then that's a really simple address decoder. I'll see how easy a PAL would be to decode the address properly...

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: Internal memory expansion
« Reply #10 on: 2013.September.03. 23:34:38 »
Probably one additional 74HCT151 can do the trick, using similar method as the 320K modifications.

Offline Bagpuss22

  • EP fan
  • *
  • Posts: 167
  • Country: gb
Re: Internal memory expansion
« Reply #11 on: 2013.September.04. 13:38:54 »
If you are interested I have a spare official enterprise 64K expansion board.  
I was going to upgrade my EP64 but I decided to buy an EP128 instead!

Russ

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: Internal memory expansion
« Reply #12 on: 2013.September.04. 15:31:48 »
Thanks for the offer Russ, but I'm more interested in doing this for the experience of making some interesting little hardware projects! There probably wont be much (any?!) call for new RAM expansion boards for the Enterprise, but if I order some PCB's then there will be some spare I can sell to other folks with an EP. A 512KB expansion looks like it will probably cost less than £10 in components.

Offline Bagpuss22

  • EP fan
  • *
  • Posts: 167
  • Country: gb
Re: Internal memory expansion
« Reply #13 on: 2013.September.04. 17:04:59 »
No rpoblem.

That sounds good, £10!  I might be interested in something like that to upgrade my EP128!

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: Internal memory expansion
« Reply #14 on: 2013.September.04. 22:55:19 »
Quote from: Zozosoft
Probably one additional 74HCT151 can do the trick, using similar method as the 320K modifications.
I've had a look at old PAL chips and you can get GAL16V8 chips cheap from China, so I've got some of those on order. Works out about 40p a chip, which will do the whole address decode and memory access very neatly:

/CE = !(A21 & A20 & (A19 ^ (A18 & A17 & A16)) & !/MREQ & /RFSH)

Very old technology, but perfect for the job! :)