From theom+news@chiark.greenend.org.uk Thu Aug 14 10:00:47 2003 Path: ewrotcd!not-for-mail From: Theo Markettos Newsgroups: comp.sys.acorn.misc Subject: Re: couple of A5000 questions (RO3.11 + memory hacking)... Date: 14 Aug 2003 09:59:28 +0100 (BST) Organization: Linux Unlimited Lines: 55 Sender: Theo Markettos Message-ID: References: <20030812210032.36b409c4.spyro@f2s.com> <20030813095928.00d0d533.spyro@f2s.com> NNTP-Posting-Host: chiark.greenend.org.uk User-Agent: tin/1.5.10-20011117 ("Darkcell") (UNIX) (Linux/2.2.25 (i686)) Originator: theom@chiark.greenend.org.uk ([193.201.200.170]) Xref: news.chiark.greenend.org.uk comp.sys.acorn.misc:129405 Chris Smith wrote: > Theo Markettos wrote: > >> I have a Drawfile with the relevant bit of A540 logic in it if >> anyone's interested... > > Very interested. Can you pop it in an email ;-) It can now be found at http://www.markettos.org.uk/riscos/docs/a540mem.gif The chip is a PAL. Here is what I can dredge up from my memory about it: Essentially the circuit multiplexes the slave MEMC. Physical memory lives at 0x2000000 to 0x3000000. So the first (master) MEMC occupies physical memory from 0x2000000 to 0x2400000 and the first slave from 0x2400000 to 0x2800000. When the circuit tries to access memory between 0x2800000 and 0x2C00000, it uses A22 to the second slave as an enable line - when high, the second slave thinks it is the first slave and is activated. When low, the 2nd slave thinks the master MEMC is being accessed and is not active. So the logic for A22w/x/y/z is something like: physmem = (A25 & !A24) A22w (master MEMC) = !(physmem & !A22 & !A23) (active low) A22x (1st slave) = (physmem & A22 & !A23) (active high) A22y (2nd slave) = (physmem & !A22 & A23) (a.h) A22z (3rd slave) = (physmem & A22 & A23) (a.h) A7 is for the logical-physical address translators. When accessing them, A7 denotes whether to write into the master or slave MEMC table. My memory is bad on this, but what I _think_ happens is that bit 12 of the translator (supplied in A12) is used to extend the physical page number in A0-A7 and so multiplex onto A7: l2p = (A25 & A24 & A23) A7w = !(l2p & !A7 & !A12) A7x = (l2p & A7 & !A12) A7y = (l2p & !A7 & A12) A7z = (l2p & A7 & A12) I _think_ that's all there is in the PAL. I'm not sure whether the nR/W line affects things though. This probably doesn't make much sense without the MEMC databook - I can scan bits if anyone's interested... Theo -- Theo Markettos theo@markettos.org.uk Liphook, Hampshire, UK theom@chiark.greenend.org.uk http://www.markettos.org.uk/