6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 14, 2024 1:58 pm

All times are UTC




Post new topic Reply to topic  [ 133 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next
Author Message
PostPosted: Tue Oct 08, 2013 4:56 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8484
Location: Midwestern USA
whartung wrote:
So, has any one given any thoughts to a 65816 memory map, considering the CPU vectors are at the top of the first data bank.

Lot of talk about a 6502 8 Bit map, but, what were you thinking BDD for v2.0 with 4MB of RAM? Were you planning on leaving Bank 0 alone, or solely for the supervisor, and load all of the user space above it?

Here's what I'm working toward in POC V2.

The primary goal is to create a "protected mode" hardware environment, in which memory protection and bank $00 remapping rules would allow the execution of a preemptive multitasking kernel. There will also be a "real mode" environment, in which no restrictions whatsoever would exist on accesses to RAM, ROM and I/O. Real mode would be used by anyone wanting to run a real-time environment, like what Garth does with his workbench unit, where hardware access and interrupt response must be as quick as possible.

At power-on or following a hard reset, the default configuration will be real mode, in which no memory protection exists, and I/O and high ROM are mapped in. After an OS kernel has been loaded it will be able to change configuration from real to protected mode. As soon as that happens, the characteristics of the system will change and the following features will be enabled. All of this will be via some CPLD trickery, part of which I have already worked out and simulated.

When operating in protected mode, the system will have a user mode and a supervisor mode. User mode is what ordinary processes (e.g., a text editor, an instance of BASIC running, etc.) will see, whereas the operating system kernel will see the supervisor mode. I modeled some aspects of this feature after what is supported by the Motorola 68K family.

All user mode processes will be confined to one non-zero RAM bank and will not be able to access any other bank except via kernel calls. As all user mode processes will run in a non-zero bank, each such process will have 64KB of contiguous space for code, data, direct page (DP) and a stack. If the architect of the OS kernel wants to do so, he could arrange to provide access to RAM outside of the process' bank, in a fashion that would mimic the UNIX/Linux sbrk kernel call. Such an arrangement would be very useful with EhBASIC, for example, as it could be arranged for the interpreter to run in one bank with its own DP and stack, using its data space to load BASIC program text. Another bank, made available by the kernel, would be where variables would be stored—and accessed via [DP] and [DP],Y addressing, which support cross-bank transfers.

Supervisor mode will allow the OS kernel to get unrestricted to the entire address space, including the I/O block and the hardware management "unit" (HMU, discussed below), both of which will appear in bank $00. The implication, of course, is that when operating in protected mode, user mode processes will be prohibited from touching the hardware and possibly causing fatality. User mode processes will have to make defined kernel calls to carry out I/O.

In user mode, any direct page (DP) or stack access will be transparently mapped to the corresponding address in the in-context user mode bank, not bank $00, without the MPU being aware of anything unusual going on. In other words, if the currently-executing user mode process is running in bank $3A, the stack pointer is currently at $FFFF and the user mode process pushes a word, the word will be found at $3AFFFE-$3AFFFF, not $00FFFE-$00FFFF. Similarly, the instruction LDA $7F would actually get a byte (or word) from $3A007F, not $00007F. The result will be that individual processes will not have to share bank $00 for DP and stack space, thus solving part of the puzzle of how to keep user mode processes out of each others' way.

An interrupt (including BRK and COP) will cause a hardware context change from user mode to supervisor mode, but will not automatically turn off the bank $00 remapping feature. Hence the register pushes that occur during the early part of an interrupt service routine (ISR) will be to the user mode process' stack. Later on, the ISR can turn off bank $00 remapping so the kernel can access its private DP and stack in bank $00 for internal processing purposes. When a return to user mode was to be made, the bank $00 remapping would be re-enabled so the register values that were pushed to the user mode stack could be restored. The context switch back to user mode would be triggered when the RTI instruction is executed.

The HMU will be a virtual device inside the glue logic CPLD (see below drawings for architecture, etc.) responsible for enforcing protected mode hardware access rules. The HMU will be where various combinations of RAM, ROM and I/O can be made to appear in bank $00, bank $00 remapping can be controlled, interrupt status detected, etc. As supervisor mode is the only mode in which the HMU can be accessed when hardware protection has been enabled, a rogue user mode process will not be able to get to the HMU and wreak havoc.

This is only a summary. Obviously, there is more to it, but you should be able to get the basic idea.

Attachment:
File comment: POC V2 Architecture
poc_v2_p1.gif
poc_v2_p1.gif [ 69.18 KiB | Viewed 829 times ]
Attachment:
File comment: POC V2 Memory Map
poc_v2_p2.gif
poc_v2_p2.gif [ 155.44 KiB | Viewed 829 times ]
Attachment:
File comment: POC V2 I/O Map
poc_v2_p3.gif
poc_v2_p3.gif [ 67.24 KiB | Viewed 829 times ]
Attachment:
File comment: POC V2 Hardware Management "Unit"
poc_v2_p4.gif
poc_v2_p4.gif [ 145.55 KiB | Viewed 829 times ]

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 4:58 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8484
Location: Midwestern USA
clockpulse wrote:
I usually just let the I/O decoding appear in all 256 banks. It does waste a 2k or 4k block in each bank but it make access of IO from each bank much easier.

That would be good in a real-time environment, but would pose problems where a kernel is controlling the system. I don't think you'd want programs randomly touching I/O hardware.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 5:36 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8484
Location: Midwestern USA
nyef wrote:
The RESET sequence would basically be CLC, XCE, JML to ROM space...

Here's how I do the first steps in the POC V1.1's reset code:

Code:
;================================================================================
;
;hrst: HARD SYSTEM RESET
;
hrst     sei                   ;no IRQs during 1st stage POST
         cld                   ;ensure binary mode
         sec                   ;select emulation mode to...
         xce                   ;default DB, DP & PB &...
         clc                   ;register widths
         xce                   ;return to & stay in native mode

Note that I temporarily put the '816 into emulation mode to default some registers, saving me the chore (and some code space) of having to "manually" doing so.

In POC V2, following the above steps, reset will shadow the BIOS ROM (high ROM at $00E000-$00FFFF) to RAM, switch off the ROM and then continue execution in RAM. So the above code would continue as follows:

Code:
;
;
;   shadow the BIOS...
;
         longr                 ;16 bit registers
         lda #romsiz-1         ;$1FFF, size of ROM space -1
         ldx #romhi            ;$E000, HIROM start
         txy                   ;$E000, upper RAM block (URB) start
         mvn 0,0               ;copy ROM to URB; takes 57,344 clock cycles
         shortr                ;8 bit registers
         lda #%00100000        ;HIROM control bit
         trb hmu_mcfg          ;expose URB
         lda somebyte          ;this instruction executed from URB
   ...reset continues...

As ROM and I/O will have to be wait-stated to reliably support speeds above 10 MHz, there's a potential performance gain to be had by shadowing the BIOS (I/O, of course, has to be wait-stated at all times).

The above could be altered to copy the BIOS to anywhere in RAM desired, followed by a long jump (JML) to the RAM copy.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 6:00 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8540
Location: Southern California
I take it then that you're calling hrst from software, since using the RST\ input would do most of those things automatically as part of the reset sequence.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 6:04 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8484
Location: Midwestern USA
GARTHWILSON wrote:
I take it then that you're calling hrst from software, since using the RST\ input would do most of those things automatically as part of the reset sequence.

Actually, the hardware vector at $00FFFC points to HRST, but I did it the way I did so jumping to HRST from other code would produce a known starting point. Note that a hard reset doesn't affect the LSB of SP.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 11:50 am 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
@BigDumbDinosaur

Thank you for all the background information and the schematics, I appreciate it.
I don’t know that much about the differences in the 74xx logic families. But it’s a bit clearer now.

I’ve read a great deal on your website, and according to your schematics, it isn’t that much different from a “classic 8-bit” design. How does the glue logic with the 74 574 (or 74 273 ?) look like to connect and enable all the address lines?



BigDumbDinosaur wrote:
What are you going to use to read a keyboard?

At first I’ll use the 6551 and a terminal program. Later an AVR to provide PS/2 keyboard input, together with clock, single step, reset etc.


Regarding the SID, I would be perfectly satisfied with the following:

A counter (‘293) provides 8, 4, 2 and 1 MHz. from a 16MHz. oscillator. A latch determines which of them will be selected as PHI2 system clock.

The SID will be connected through two 74AC245. One for the data lines and one for the 5 address lines. (and perhaps a signal which is needed to cut off) If the system clock > 1MHz., the bus lines will be in 3-state. Cutting off the SID completely from the system. Otherwise, the ‘245 provides the bus driver you mentioned which is needed for connecting NMOS to CMOS.
So I won’t be able to use the SID if the system clock <> 1MHz.

BigDumbDinosaur wrote:
Trying to incorporate too many features and/or an idiosyncratic memory map into the design almost guarantees that the unit with be DOA on first power-up and difficult to debug. In other words, it's best to learn how to pilot a single-engine light plane before stepping into the cockpit of a 747 or A380.


I agree, that’s why I build my first system with RAM:$0000-$7FFF I/O:$8000-$BFFF and ROM:$C000-$FFFF on breadboard.

Question is:

A. should I build the this breadboard version on PCB first (without bank switching, SID’s or even VIA’s), before I start with an ‘816 design?

B. Or buy a set of WDC chips (with the ‘816) and built the same as A. The design would be a little different regarding the control bus signals and system clock.

C. I buy a set of WDC chips (with the ‘816) and built the same as A. including the 628512 and a 29F010 and the ability to access the extra memory.


I strongly tend to do A. Regarding that I have all the components to build at least three of them. That way I can practice with EAGLE and etching the PCB first.

In all three cases I will include a bus connector. At first I wanted to use a backplane, but it seems to be better (and probably less work) to use a “sandwich” approach.

I’ve started a new topic in finding any WDC chips.
viewtopic.php?f=4&t=2717

BigEd wrote:
The important thing about the 816 is that it's almost pin-compatible and it boots into a 6502 mode.

I'd advise against increasing the scope of your project to accommodate all the features of the 816 - it's the kind of thing which gets in the way of finishing anything (or even starting anything)

So, by all means buy the 816, but do build an 8-bit system first! And stick to 8-bit software, until you have something running.


Well, I have all the time, so I’ll take it slow. And before I build something on PCB, my intention is to post the schematics first. And if possible try it on breadboard first. I’ve experienced enough trouble altering or fixing things on a supposed to be “ready” circuit.

_________________
Marco


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 3:45 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8540
Location: Southern California
Quote:
In all three cases I will include a bus connector. At first I wanted to use a backplane, but it seems to be better (and probably less work) to use a “sandwich” approach.

See why I usually advise against that, at http://wilsonminesco.com/6502primer/ExpBusIntrfc.html, and what methods to use as a replacement.

I was just looking at the 6582 SID data sheet to see if what I suspected is true, and it is. The SID depends on a constant phase-2 frequency to produce its frequencies for the signal generators; IOW, phase 2 is not just use to coordinate reads and writes, but must remain consistent even when not reading and writing. That pretty much limits the entire system to 1MHz in applications using the SID (but you could go higher in applications that don't use it).

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 5:56 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8484
Location: Midwestern USA
lordbubsy wrote:
I don’t know that much about the differences in the 74xx logic families. But it’s a bit clearer now.

Logic falls into two broad classes: TTL (which descriptive name is a bit of a misnomer, but widely accepted) and CMOS.

The grandaddy of TTL logic is the (still available) 74-series, the ancestral device being the 7400 quad NAND gate, which I first encountered c. 1967. 74-series logic (also 54-series, which is essentially the military equivalent of 74) has pretty good switching speed but high power consumption. The desire to improve switching speed led to the development of the 74S (S = Schottky) series, which used Schottky diodes to clamp the inputs to reduce state transition time. However, power consumption was higher than plain 74 logic. The latter issue eventually lead to the development of several other logic families, the most familiar being 74LS (LS = low power Schottky), which was the standard for many years. The "low power" monicker was relative to 74S—74LS is still pretty power-hungry by current standards.

CMOS logic was almost developed in parallel with TTL, the first devices being the CD4000 series from RCA in the late 1960s. 4000 devices, which are still made, can operate over a wider range of voltages (up to 15 volts, making them suitable for automotive applications), use significantly less power than 74LS and have better noise immunity, but have mediocre switching performance. You wouldn't want to build a computer around 4000—series logic.

CMOS development eventually caught up with and surpassed 74LS in all respects. 74C (C = CMOS) followed on the heels of 74LS, but was markedly slower than the latter. 74HC (high speed CMOS) combines the switching speed of 74LS with the reduced power consumption and noise immunity of CMOS. 74AC (advanced CMOS) further improves switching speed, making 74AC as much as five times as fast as some 74LS equivalents and typically twice as fast as 74HC equivalents. The fastest discrete logic that is readily available is 74ABT (ABT = advanced BiCMOS), with some gates (e.g., 74ABT00) operating as fast as 2.5ns at 25° C on 5 volts).

Devices that have T in the part number, such as 74ACT00, have TTL-compatible inputs, allowing them to be used as replacements for 74LS devices. Excepting 74ABT logic, you wouldn't use 74HCT or 74ACT devices in a new design unless a TTL device is driving a CMOS device. All CMOS devices have higher fanout (output drive strength) than equivalent 74LS devices, which becomes an important feature if a lot of hardware is connected to the same buses. As more hardware gets attached, bus loading (and parasitic capacitance) increases and may result in a DOA circuit if the device driving the bus(es) can't source or sink the bus(es) to the appropriate levels. Succinctly stated, 74LS should not be used in new designs unless no alternative exists.

Quote:
I’ve read a great deal on your website, and according to your schematics, it isn’t that much different from a “classic 8-bit” design.

That's correct, and I say as much in the narratives. I intentionally started out simple to avoid a DOA design.

Quote:
How does the glue logic with the 74 574 (or 74 273 ?) look like to connect and enable all the address lines?

You'd use a 74ABT573 or 74AC573 to latch A16-A23. WDC shows such an arrangement on page 46 of the 65C816 data sheet, but as drawn it has defects because it fails to account for the 65C816's VDA (Valid Data Address) and VPA (Valid Program Address) outputs, which indicate when addresses are valid. Failure to include VDA and VPA in the logic design can result in false bus accesses that may corrupt RAM and/or upset some I/O hardware (I discuss this on my POC website).

The data bus transceiver (74xx245) is optional—its functionality as a bus isolation device when Ø2 is low can be supplanted in most cases with simple gating. Bus transceivers, as a fairly general rule, are only needed when a lot of hardware is connected. That wouldn't be the case in a first-time (or even second-time) effort.

Quote:
Quote:
What are you going to use to read a keyboard?

At first I’ll use the 6551 and a terminal program. Later an AVR to provide PS/2 keyboard input, together with clock, single step, reset etc.

If you scrounge around, you may be able to find a retired dumb terminal like a WYSE 60 (hundreds of thousands of them were sold and many are still around) or a DEC VT-100 and attach it to your creation. That's what I did with mine and it was more convenient than running a terminal emulator on another computer.

Using an AVR for a PS/2 keyboard input sounds good, but I question using it as a reset and clock source. Your best bet for a clock source is a TTL can oscillator, optionally driving a flip-flop (the method I used—sharpens the waveform and assures a true 50 percent duty cycle), and mounted as physically close to the MPU as possible. The quality of the clock signal is very important, in that an asymmetric signal can result in timing issues that are not readily debugged. You won't have control over clock symmetry if you derive Ø2 directly from an AVR. If you're looking to have several Ø2 frequencies, you could use the can oscillator with cascaded flops—the 74AC74 I used has two flops per package—and just use a jumpers to tap into the cascade at the desired point.

The easiest way to generate a proper reset signal is with a Dallas DS1813 econo-reset, which reacts both to the rise and fall of Vcc and the grounding of the reset line by a push button. The DS1813 holds the '816's RESETB input low until Vcc has reached about 4.6 volts (DS1813-5), at which time a 150ms timer starts. When the timer expires, RESETB will be released and the '816 will go to work. The result is Vcc has plenty of time to stabilize before the '816 comes to life. Grounding the reset line will reset the 150ms timer, so you don't have to worry about debouncing the reset push button.

Quote:
Regarding the SID, I would be perfectly satisfied with the following:

A counter (‘293) provides 8, 4, 2 and 1 MHz. from a 16MHz. oscillator. A latch determines which of them will be selected as PHI2 system clock.

The 74LS293 (I couldn't find it in any other logic family) isn't a good choice, as it has way too much cumulative prop time. You'd have to drive the SID off the "Qd" output to achieve what you want, which output lags the master clock input by some 46ns (average). Unless the MPU were attached to "Qd" as well, the SID's Ø2 clock would be far out of phase with the MPU's Ø2 clock and timing would be completely in the toilet. I can't see how this would possibly work.

I already mentioned this, as did Garth. Not only does the SID's clock have to be a fixed 1 MHz, it must be phase-locked to the MPU's Ø2 clock, meaning both must be high at the same time if I/O timing is to succeed. The SID's Ø2 signal would have to be powers-of-2 submultiples of the MPU's Ø2 clock, derived from a clock generator in which worse-case prop time from master clock to SID's Ø2 input is a vanishingly small number of nanoseconds. I can see doing this with cascaded flops—real fast ones, preferably inside a CPLD. The alternative would be with four 74ABT74 flops (fastest discrete ones available—two per package), which would still worst-case produce as much as a 17ns phase shift from clock source to SID. A CPLD could achieve an effective zero phase shift, since all prop times are rated pin-to-pin, which means the internal prop time from clock input to either of the clock outputs in question would be the same.

You'd also have wait-state access to the SID, with the number of wait-states being equal to MHz-1, where MHz is the MPU's Ø2 frequency (assuming the MPU's Ø2 frequency will never be less than 1). I may be wrong, but I don't think there's really another reasonably simple way to do this.

Quote:
The SID will be connected through two 74AC245. One for the data lines and one for the 5 address lines. (and perhaps a signal which is needed to cut off)

That seems reasonable.

Quote:
If the system clock > 1MHz., the bus lines will be in 3-state. Cutting off the SID completely from the system. Otherwise, the ‘245 provides the bus driver you mentioned which is needed for connecting NMOS to CMOS.

You should tri-state the bus driver at all times when the SID isn't being accessed—your I/O decoding logic would take care of that. It's something that is independent of the Ø2 clock. In fact, address decoding of any kind should be not qualified by Ø2. This is especially important with the WDC peripheral devices (65C22, 65C51, etc.), which require that the chip selects be valid before the rise of Ø2. It's likely that the SID has a similar requirement, but not having seen a data sheet for it in many years, I can't vouch for that.

Quote:
So I won’t be able to use the SID if the system clock <> 1MHz.

You can if you're willing to generate phase-locked clocks and wait-state SID accesses.

I understand why you'd like to use the SID, but think it's more trouble than it's worth (plus I'd be leery of designing around a device that hasn't been manufactured in decades).

Quote:
BigDumbDinosaur wrote:
Trying to incorporate too many features and/or an idiosyncratic memory map into the design almost guarantees that the unit with be DOA on first power-up and difficult to debug. In other words, it's best to learn how to pilot a single-engine light plane before stepping into the cockpit of a 747 or A380.

I agree, that’s why I build my first system with RAM:$0000-$7FFF I/O:$8000-$BFFF and ROM:$C000-$FFFF on breadboard.

Question is:

A. should I build the this breadboard version on PCB first (without bank switching, SID’s or even VIA’s), before I start with an ‘816 design?

I'd consider doing your next design in wire-wrap, and later when you are more confident of your design skills, on a PCB. Breadboard is notoriously unreliable at clock speeds slightly higher than those of a cheap pocket calculator. Those long wires throw all sorts of reactance (especially inductance) into the circuit, making for distorted waveforms and very sloppy timing. A good wire-wrap unit can be run quite fast. I've seen WW hobby units run at 8 MHz.

Quote:
B. Or buy a set of WDC chips (with the ‘816) and built the same as A. The design would be a little different regarding the control bus signals and system clock.

My approach would be to build a 64KB system with the '816 and immediately get familiar with it. The circuitry is very similar to that of a 65C02. The refinements needed to address more RAM add somewhat to the complexity and to potential timing problems. It's best not to take too big a leap with this.

Quote:
C. I buy a set of WDC chips (with the ‘816) and built the same as A. including the 628512 and a 29F010 and the ability to access the extra memory.

That's too much like trying to pilot the 747 with no prior experience. :)

Quote:
In all three cases I will include a bus connector. At first I wanted to use a backplane, but it seems to be better (and probably less work) to use a “sandwich” approach.

Not recommended. Going off-board with the buses drastically limits performance due to all the loading. Garth discusses going off-board with the buses at this page (see item #2).

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 08, 2013 7:58 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
(I found Sam posting about using VP to pull the vectors from ROM - an idea re-mentioned recently - which is about as temporary an overlay as you can get, except you still land in Bank 0 so you have to do something... See viewtopic.php?p=7093#p7093 )

My view of 816 system design is that Bank 0 is special: it's not necessarily dedicated to the OS and the page 0 and stacks of user processes, but it's a good place for those, and for the i/o region and the boot ROM. Then Banks 1 up to the top of RAM would be... RAM. If you put i/o in the upper banks, then you don't have a single large space to divvy up between user tasks. If those tasks use 3-byte pointers, they can view the RAM as contiguous, ignoring the bank divisions. At least, they can do that for data purposes. Code can't avoid seeing the 64k boundaries because the PC always wraps.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 09, 2013 2:08 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8484
Location: Midwestern USA
BigEd wrote:
(I found Sam posting about using VP to pull the vectors from ROM - an idea re-mentioned recently - which is about as temporary an overlay as you can get, except you still land in Bank 0 so you have to do something... See viewtopic.php?p=7093#p7093 )

There has to be a little bit of code in bank $00 to pick up the interrupt, but you could JML out of the bank if you had the rest of the ISR elsewhere.

Quote:
My view of 816 system design is that Bank 0 is special: it's not necessarily dedicated to the OS and the page 0 and stacks of user processes, but it's a good place for those, and for the i/o region and the boot ROM. Then Banks 1 up to the top of RAM would be... RAM. If you put i/o in the upper banks, then you don't have a single large space to divvy up between user tasks. If those tasks use 3-byte pointers, they can view the RAM as contiguous, ignoring the bank divisions. At least, they can do that for data purposes. Code can't avoid seeing the 64k boundaries because the PC always wraps.

That's the way I plan to do it. RAM from $010000 upwards is contiguous, and should stay that way.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 09, 2013 6:23 pm 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
To summarize your advices let’s see if I get this all straight:

Taking your POC1.1 as a reference design.
• The whole system should be on one board.
• I/O should be planned upfront.
• If I use AC logic, 8 MHz should be obtainable.
• First version should be within 64k addressing space.
• Using a 16k EPROM and 32k RAM.
• Preferably starting with the 65C816.
• One or two ACIA’s W65C51N.
• One to three VIA’s W65C22S.
• Apparently the SID doesn’t really fit into such a system with several Megahertz. Especially not for a starter project. It clearly belongs the old NMOS / 1MHz. era like the VIC-20 and C64...


Quote:
If you scrounge around, you may be able to find a retired dumb terminal like a WYSE 60
Actually I thought they were ancient history, but I believe you’ve purchased a Boundless ADDS 4000/260 LFC terminal. That would be much more appealing to me. I still have and use CRT’s, so such a compact little box would fit nicely.

Let me also summarize what I intended to do,
I wanted to create an expandable modular computer:

The first board should contain
• An NMOS 6502 1 MHz.
• ‘245 bus drivers
• RAM / ROM
• Glue logic
• One ACIA for terminal
• ATmega for several controls
• A bus connector

The second board should contain
• A second ACIA
• Two or three VIA’s
• Daryl’s 65SPI

Further boards could contain
• Gameduino (SPI)
• Daryl’s Compact Flash SPI-IDE Interface including the DS1302 RTC
• Daryl’s P/S2 keyboard interface
• 2 SID’s

First I liked the Veronica approach with the ISA connectors. But after snooping at this forum I decided to take Daryl Rictor’s SBC-2 as reference.
I had all the parts in old NMOS versions except for the ACIA and bought some on eBay.

I understand your objections and do respect your knowledge and experience, even worse, I really enjoy all the extra information.
However, a modular approach looks far more attracting to me. To start with a base, and while learning, expand on that. Eventually getting a far more complex result than I could design at once. Al be it at 1 MHz.

I guess your POC V1.1 and Garth’s Workbench computer are all about performance and effectiveness in hardware / software resources. I’ll keep on reading till I do understand.

_________________
Marco


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 09, 2013 6:51 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Quote:
However, a modular approach looks far more attracting to me. To start with a base, and while learning, expand on that. Eventually getting a far more complex result than I could design at once. Al be it at 1 MHz.

Sounds like a good plan. A 1 MHz modular system is great for learning and experimenting, and it will have more power than the computer that guided Armstrong to the moon.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 09, 2013 7:42 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8540
Location: Southern California
lordbubsy wrote:
To summarize your advices let’s see if I get this all straight:

Taking your POC1.1 as a reference design.
• The whole system should be on one board.

I've read all the POC material but not very recently. I'm sure the idea however is that the processor's own buses be kept on the board, and you can still have other stuff that's not on the board but it goes through I/O ICs.

related:
Quote:
However, a modular approach looks far more attracting to me.

You can still leave room on the same board to add more things later.

Quote:
• I/O should be planned upfront.

...as much as possible; but there will always be things you didn't think of initially. The solution is to make it as flexible as you can so unforseen things can later be accommodated without starting over.


Quote:
The first board should contain
• An NMOS 6502 1 MHz.
• ‘245 bus drivers

That depends on how much you want to connect. If it's just a few things, you may not need them; but the NMOS 6502's outputs were weak compared to the CMOS. To make things worse, the NMOS days were also the TTL & LSTTL days, so DC loading was heavier when the processor's output drivers were weaker. Now we have stronger drivers and yet lighter loads. I have tested Rockwell and WDC 65c22 outputs here, and they are many times as strong as the data sheet says, and I believe the processor has the same output circuits. In my experiment, WDC's outputs were able to pull to within 0.8V of the rail with a 220-ohm resistor to the opposite rail, and give 50mA into a dead short. Rockwell's could pull down with 100mA, but could not pull up as hard, not being symmetrical like WDC's.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 09, 2013 9:02 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8484
Location: Midwestern USA
lordbubsy wrote:
To summarize your advices let’s see if I get this all straight:

Taking your POC1.1 as a reference design.
• The whole system should be on one board.

Ideally. However, when I decided I wanted to implement SCSI I had to create a host adapter that could plug into the watchdog socket. That arrangement constituted taking the MPU buses off-board, and the effect on performance was evident.

Quote:
• I/O should be planned upfront.

As Garth noted, as much as possible.

Quote:
• If I use AC logic, 8 MHz should be obtainable.

Yes, as long as your construction is tight (wire-wrap or a PCB) and you don't get too much bus loading. There are other factors that can limit performance, however, so the use of 74AC logic is only part of the picture.

Quote:
• First version should be within 64k addressing space.

Correct. It'll be easier for you to work out efficient address decoding.

Quote:
• Using a 16k EPROM and 32k RAM.

Sounds good. You can jam a lot of code into a 16KB ROM address space. Incidentally, EPROMs down to 55ns are obtainable from Jameco. Order their part number 266079, which will be a 27C256 UV-erasable EPROM with a 55ns access time. You only need to decode the first 16KB to use it (I only use 8KB in POC V1.1).

Quote:
• Preferably starting with the 65C816.

That's what I did and I didn't regret it. Once you get your system running and get itchy with the assembler, you'll want to try your hand at 16 bit computing. It's amazing how efficient some code gets when you can work with 16 bits per operation.

Quote:
• One or two ACIA’s W65C51N.

One 65C51N. If you are going to provide the unit with two TIA-232 ports right out of the gate (no pun intended) use of a dual channel UART (e.g., an NXP 26C92) would be more efficient from a hardware decoding standpoint and would consume less board real estate. Also, the 6551 has had a long history of problems. I don't disguise the fact that I don't like the device. :lol:

Quote:
• One to three VIA’s W65C22S.

That's a lot of I/O. Do you think you'll ever use all of it? Remember, this is supposed to be a first-time build.

Speaking of VIAs, the PLCC package takes up considerably less board space than the PDIP-40 version. If you decide to go with a PCB, consider PLCC, as you'll achieve a tighter layout. If you decide to wire-wrap, it will all depend on whether you can obtain PLCC wire-wrap sockets at reasonable prices (they are available but I don't recall where). The same applies to the 65C816 and the 65C51.

Quote:
• Apparently the SID doesn’t really fit into such a system with several Megahertz. Especially not for a starter project. It clearly belongs the old NMOS / 1MHz. era like the VIC-20 and C64...

It could be made to work, but not without quite a bit of hardware trickery. You'd have to weigh benefit against hardware "cost." It's certainly not something that should be considered in a first-time build.

All-in-all, a good summary.

Quote:
Quote:
If you scrounge around, you may be able to find a retired dumb terminal like a WYSE 60
Actually I thought they were ancient history, but I believe you’ve purchased a Boundless ADDS 4000/260 LFC terminal. That would be much more appealing to me. I still have and use CRT’s, so such a compact little box would fit nicely.

Correct on the 4000/260, which I have running in WYSE 325 emulation. The 325 is the color version of the best-selling WYSE 60, combining the latter's features with RGBI color. The 4000/260 operates with a standard PS/2 keyboard (or an ANSI keyboard if one can be found) and standard VGA monitor. I have a gently used Viewsonic VA703b (17 inch LCD) attached

Quote:
Let me also summarize what I intended to do,
I wanted to create an expandable modular computer:...I understand your objections and do respect your knowledge and experience, even worse, I really enjoy all the extra information.
However, a modular approach looks far more attracting to me. To start with a base, and while learning, expand on that. Eventually getting a far more complex result than I could design at once. Al be it at 1 MHz.

I guess your POC V1.1 and Garth’s Workbench computer are all about performance and effectiveness in hardware / software resources. I’ll keep on reading till I do understand.

Garth's approach was clearly about achieving high performance in I/O and interrupt processing. As he notes on his website, his WB unit is not meant for direct human interaction—and he didn't wire in any "human interface" features. My approach is geared to human interaction and general purpose usage (I can run interactive programs on it without having to attach it to another computer), with performance being a secondary but important consideration. I say as much on my POC website:

    That POC V1 is a "proof-of-concept" design dictated just how complicated it had to be. I had to avoid concocting too ambitious a design, as debugging an overly-complex unit would be difficult with the resources available to me, although since I started I have acquired better test equipment to diagnose hardware issues. On the other hand, this first design did have to be capable of doing more than merely using electricity and scribbling some text on a display screen. Yet another wish was to get the unit to be stable with an 8 MHz Ø2 clock.

(Emphasis added.) That POC V1.0 was able to function at 12.5 MHz prior to the introduction of SCSI (and the resultant bus loading imposed by the host adapter) was a pleasant surprise, but was not a design goal.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 09, 2013 9:40 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8540
Location: Southern California
Quote:
Garth's approach was clearly about achieving high performance in I/O and interrupt processing. As he notes on his website, his WB unit is not meant for direct human interaction—and he didn't wire in any "human interface" features.

Mostly true. I use the PC for software development for it, a dependency that I would eventually like to break, probably by having two computers in the same unit, one for human interface and mass storage, and the other one dedicated to the workbench work and not being constantly interrupted by things like keyboard typing and other human interaction. The workbench computer has a 1-line, 16-character intelligent LCD, and a connector to externally connect a bigger one, say 4x40, which I don't normally do. It also has a 5-key keypad which is not suitable for typing but is suitable for chosing menu items. I have a PS/2 interface on it which I have never written the software for. My workbench doesn't look as bad as the picture recently posted, but even a laptop would take too much space, so I want the workbench computer to be rather small. The PC that hosts it is on another desk, linked by a serial cable. There's a tiny printer at the workbench, and the bigger one is on another desk.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 133 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron