Now I'm getting somewhere... I have about half a schematic complete for R1, and I'll probably upload a flowchart tonight.
R1 will run on an 8-bit ISA perfboard card, which gives me access to power without needing to create a power supply, as well as a host environment I am familiar with to upload programs to RAM. The 65816 will run an EPROM monitor which polls for input/output from the PC, but can also use the on-card serial port to talk to the outside world. Serial port is interrupt-driven and will override ISA host commands. It'll be used mainly used for querying status of R1 from the '816's point-of-view, as well as file xfer in ROM monitor mode, and "free for use" otherwise. R1 will (tentatively) contain 8kB of EPROM and 16kB of SRAM. R1 can communicate using the serial port for a small terminal on an external host, or via 5 registers on the computer with the ISA card (BASE can be whatever is free in the PC map). I've modified the address space based on suggestions from the Primer and BDD to minimize the amount of address-decoding logic.
From the PC, the IO map is as follows:
- BASE Data In (Write)/Data Out (Read) (Host ISA PC uses port-mapped I/O to talk to R1)
- BASE+1 Command (Write)/Command Status (Read) (Host ISA PC send command to processor while running ROM monitor/poll routine)
- BASE+2 Control Register (controls a latch whose bits propagate to enable/disable various circuitry on the board- such as the clock/RDY (The latter is probably more kosher), debug IRQ, single step, and ROM monitor vs RAM program mode.)
What I haven't decided yet on is the following:
- Clock circuit (use the Primer? I have a 10MHz 4 pin crystal FWIW)
- Reset circuit (Probably needs to be OR'ed with the ISA reset pin)
- Single step circuit (will be enabled using a bit on the control register)
- Bus arbitration circuit (see below)
- Wait state circuit for ROM (this is the tough one- any help here to minimize glue logic is greatly appreciated).
- Minimal logic ROM/RA switcher (in RAM mode, the vectors need to be stored in RAM in case they are altered)
IO map on the '816 side isn't fully decided yet, but I want R1 to end with having a PIA, VIA, ACIA, RAM, ROM (can be swapped in/out), and '816.
I feel this should be a simple and fun project that bridges my enjoyment for programming the '816 and the ISA bus. Since I'll keep the '816 in Native Mode even without > 64kB of RAM, for slow systems like the XT, the '816 becomes a vastly superior coprocessor
. For faster systems, R1 just becomes a unique expansion, interface, and development (EID?
) environment/card.
I haven't fully decided the schematic output, but one thing that will influence my decision: Can ONE port of the PIA be used as a simple
bidirectional bus arbiter using the handshake signals- for instance, attaching the 65816 to the ISA bus. In all cases, the x86 PC takes priority in case of conflict with the 5 I/O registers. I'd like to minimize on external latches and use the PIA to its full potential.