cjs wrote:
Quote:
The /SEL line "outsources" part if the detection process to the main board.
If all you're looking for is to let some boards that do decoding put their decoded selects out on to the bus, read though the previous posts in this dicussion: that's exactly what we plan to do. In fact, some people are already doing this; we just intend to formalize it a bit more. So no fear there.
Yes that's about it. A line that puts a decoded address space on the bus, and that is used by e.g. I/O boards is it.
For example if a /SEL line that decodes a 2k or 4k I/O space, and I/O boards use it, they need just a single '688 to decode 16 bytes of I/O address space, to not collide with other I/O boards.
Similar to what I did here
http://www.6502.org/users/andre/csa/bus-1.1.htmlQuote:
But you seem to keep bringing (perhaps unwittingly) timing into this discussion. Pardon me if I'm misintepreting you and you're not, but if you are, keep in mind that the address mapping selects will NOT be usable for any timing purposes, just as the address bus itself is not. You'll need to use Φ2 for anything related to timing, just as usual.
I think this is a misunderstanding. 6502 busses use Phi2, no way around it.
Quote:
fachat wrote:
But how is a chip selected? It detects the right value on the address lines.
Right, but that's nothing to do with timing and
cannot be used for any sort of timing. The 6502 has full control of the address bus at all times (unless you put a tri-state buffer in front of it to let you cut it off), and you must never assume that the timing of any signal change on the address bus means anything. The same goes for other non-clock lines, too, which is why all writes should always be qualified with Φ2.
Quote:
The z80 sytems IIRC have separate /rd and /wr lines on the bus. Those incorporate the equivalentof the r/-w and phi2 lines of the 6502 - but they can also be qualified with address selection. Not sure it does on RC2014 though.
Yes, as you point out, /RD and /WR are different because they include timing information, unlike RWB or the address bus from either CPU. (Perhaps this is why you sound to me like you're talking about timing.) And being separate signals they also incorporate "enable" communication (unlike RWB) and so could be manipulated by the CPU board not to assert on the bus while at the same time asserting for local peripherals on the CPU board (based on address or anything else). But I don't see anything like that appearing in RC6502 bus or variants of it, that's just too alien to how the Motorola-style buses work. If you wanted to do something like that, it would probably make more sense to put your 6502 on RC2014 bus.
I think we need to look at different types of boards to see the different requirements for an interface
- A CPU board typically provides timing, direction of data transfer, and address lines
- An I/O board uses the timing, direction, and address lines to do the transfer
A "select" line is a kind of "abbreviation", in that it selects a limited range of addresses, using the address lines.
Now, let's look at different types of busses, and how they implement the four qualities timing, direction, address, and selection. In the following table I've added my CS/A bus (linked above) to give an impression of what I also imagine for RC6502:
Code:
Bus: RC6502 CS/A Z80/RC2014
----------------------------------------------
Timing: Phi2 Phi2 /RD+/WR
Direction: r/w r/w /RD+/WR
Address A0-15 A0-11/19 A0-15
Select: - /IOSEL -
The RC2014 bus has only /RD and /WR. They transport timing and direction. Address lines provide addresses. There is no select line, so every board has to provide an own selection circuit using all 16 address bits. However, if just using an I/O board, the selection could be merged into the /RD and /WR lines easily, by ORing /RD and /WR with a /SEL line.
The CS/A bus has the 6502-specific clock Phi2, the r/-w line to tell the direction, and a select line /IOSEL. Here, an I/O board only needs to check the lower 11 address lines, which makes for a simpler circuit. Also, the I/O boards can be mapped to different addresses depending on whether the CPU board (or any other board that is defined to provide it) decodes the /IOSEL line. I used this for example to provide different "personalities" for the machines using this bus, e.g. a 4032 PET that has I/O on $e800-$efff, and a VC1581 disk drive that has I/O in other areas.
The RC6502 as I see it so far, only has Phi2, r/-w, and address lines. An I/O board needs to decode all 16 address lines to select e.g. a single register. That requires are larger detection circuit. However, an I/O board for RC6502 without an /IOSEL can not have I/O mapped to other addresses easily, and it cannot be folded into the Phi2 or r/-w lines. Well, you could probably fold it into phi2 (phi2 -> phi2 and IOSEL), but that may wreak havoc on e.g. a VIA timer.
Quote:
Quote:
But even in a 6502 system like RC6502 this /sel line could mask the bogus read (+writes on the NMOS part) of the 6502, that you'd otherwise have to deal with.
Yeah, it
could, but then you put a huge implementation burden on everybody making boards that drive that line to implement the timing for it correctly, and all old RC6502 CPU boards need non-trivial modifications to do this, if it can be done at all. If you're going to go that route, I'd say you're making a new bus.
/sel does not need to have timing quality (in the meaning as above) - it's just decoded address lines. You could just have a "personality" board that has some ROM, and decodes an I/O window in that ROM to be used for I/O and selects /IOSEL in that area. And then provide different "personality" boards for the different systems you want to "emulate". Or use a jumper on the ROM board (or ROM/RAM board).
I don't think we're even far apart in the end. I'm just arguing for an /IOSEL line that I/O boards should incorporate into their address decoding logic. Because, IMHO it's just only advantages (except the one bus line used).
André
_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content:
http://6502.org/users/andre/