6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 06, 2024 8:24 pm

All times are UTC




Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Sat Sep 19, 2020 1:32 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1001
Location: Canada
Chromatix wrote:
Out of reset, you need ROM at the top of Bank 0 to provide a vector and a handler routine. That's no different from a 6502. So that doesn't seem to work if you're only decoding with A22/23, since you have all RAM in Bank 0, and the ROM is all in high banks.

You're right! I should read the spec sheet once in a while, eh?

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 19, 2020 1:36 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1001
Location: Canada
Chromatix wrote:
I promised diagrams, so…


Nice!

Just one thought though, is it really a computer if it has no I/O?

Just throw in one more chip, call it 11 and have something that is useful, maybe?

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 19, 2020 2:47 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8432
Location: Southern California
BillO wrote:
Just one thought though, is it really a computer if it has no I/O?

I once had a boss who wanted to save money and prune things unreasonably, so we joked that we could eliminate the I/O, and that it would have the benefit and cost savings that without I/O, the customer would never notice any bugs.

_________________
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: Sat Sep 19, 2020 4:10 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1001
Location: Canada
GARTHWILSON wrote:
BillO wrote:
Just one thought though, is it really a computer if it has no I/O?

I once had a boss who wanted to save money and prune things unreasonably, so we joked that we could eliminate the I/O, and that it would have the benefit and cost savings that without I/O, the customer would never notice any bugs.

LOL!

That would definitely cut down on the support calls ...

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 19, 2020 5:06 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3353
Location: Ontario, Canada
BillO wrote:
LOL!

That would definitely cut down on the support calls ...

Yup -- it breaks the cycle in TWO places! :idea:

No way for garbage to go in, and no way for garbage to get out! :mrgreen:

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 19, 2020 5:28 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10799
Location: England
I can't resist mentioning H G Muller's 'matchbox' chess computer, battery powered, '816 based, no ROM, fits in a matchbox and plays chess:
Image
It looks pretty minimal. I think the program is downloaded into RAM using a ROM in the socket, then retained on battery power.


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 19, 2020 6:18 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Dr Jefyll wrote:
Chromatix wrote:
If we discard the handling of VDA, VPA [...]
Sounds to me like a reasonable option, given that many I/O devices have no need for protection against spurious reads.

Of course the 6522 and 6551 are notable exceptions (and popular choices for 65xx systems), but their protection requires zero gates. Assuming the active-high Chip Select input is otherwise unused, it can simply be connected to VDA. (VPA can be ignored... unless you intend to execute I/O device's content as if it were code!)
The 28L92 would also be a good choice for an '816 based system, but it doesn't have the additional active-high select input, and I think I recall seeing in other threads that it can definitely be sensitive to spurious accesses. One solution is to only access it using instructions that have no dead cycles, which I think includes all the long addressing modes (since the carry cycles for indexing are absorbed by loading the high byte of the address). Another side benefit of mapping I/O high!

With six selectors on the '138 available for I/O (four if we reserve two of them to provide a contiguous RAM area), there is no problem whatsoever attaching, say, a 28L92 UART, a DS1511 RTC, a VIA for a local keymatrix and bit-banged SPI to a display, and still have space for additional devices without need for further decoding. Space for all these could be provided on a PCB, and the builder could assemble them in any desired order after the core.


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 19, 2020 11:45 pm 
Offline

Joined: Thu Mar 10, 2016 4:33 am
Posts: 169
Probably not in the spirit of this challenge, but I think I can reduce the chips quite a bit by making use of a 6530-004 TIM chip, this provides ROM and I/O in one package. The I/O (and here is the cheating) could be used for bank select outputs for the RAM, therefore eliminating the need for the latch on the high address bits, at the expense of eliminating many of the advantages of the 816.

The ROM should work well enough in emulation mode, and provides additional useful features such as a 300 bps serial console port.

I don’t think this would be a very usable system, but it could result in a working 65816 with as few as 5 chips.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 20, 2020 12:06 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
While sketching out the details, I found that the 28L92 has an active-high reset line, opposite to anything else in the system. As a workaround without using any extra chips, I'm wiring it up to an output on the VIA.

Meanwhile, the VIA also serves as a Mode 3 SPI master, which can be used to drive a write-only display such as the Sharp Memory LCD. It should also be straightforward to attach a keymatrix to the VIA, allowing for local input and display rather than always going through the UART.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 20, 2020 11:43 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10799
Location: England
> therefore eliminating the need for the latch on the high address bits, at the expense of eliminating many of the advantages of the 816

Subversive!


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 20, 2020 1:21 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Okay, here's what I've worked out thus far. First, the basic core:
Attachment:
minimus.png
minimus.png [ 92.65 KiB | Viewed 795 times ]

Then the peripheral devices; you can probably start with just the VIA, and add the others around it. I've left most of the external connections to the VIA and UART as exercises for the reader:
Attachment:
minimus_peripherals.png
minimus_peripherals.png [ 88.73 KiB | Viewed 795 times ]

And finally, the extra memory chips to give a 1MB contiguous RAM area:
Attachment:
minimus_memory.png
minimus_memory.png [ 49.4 KiB | Viewed 795 times ]

All of this relies on just two 74HC-series chips for glue logic, and one more as a bank address latch.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 20, 2020 7:41 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8175
Location: Midwestern USA
Chromatix wrote:
Okay, here's what I've worked out thus far. First, the basic core...All of this relies on just two 74HC-series chips for glue logic, and one more as a bank address latch.

74HC likely won't be fast enough for latching the bank logic.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 20, 2020 7:48 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
You my notice that the positive Phi2 (to the CPU) is actually delayed by one 74HC gate relative to the inverted /Phi2 sent to the latch, rather than the other way round. So as long as the clock speed is modest (as it has to be anyway with a slow EEPROM and no wait-states), 74HC *is* fast enough.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 22, 2020 4:46 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 586
Location: Michigan, USA
Sorry late to the party, guys and gals.

I have an idea though several details are yet to be worked out. How about using simple I/O address decode logic and selecting both RAM and ROM for memory operations but directing the /RD signal to only one or the other? The idea here is that a switch is set at power-up (reset) to select ROM 'read' and RAM 'write' in order to copy a ROM image into RAM, then the switch is toggled to select RAM 'read' and RAM 'write' effectively mapping ROM out of the address space. With the simple address decoding in the example drawing below, there will be four 32K ROM images spanning the 128K address space when ROM 'read' is enabled.

Another switch might be used to map an I/O block into or out of the address space. Again, the simple address decoding would place the I/O block into each 64K 'bank' but when the I/O block is turned off you have contiguous RAM memory. The example below should scale up to a 256K or 512K RAM chip, as well as a larger ROM or FLASH chip.

I'm not familiar with 65C816 and what it takes to qualify RAM 'read' or 'write' operations. I'm also not exactly sure how to take advantage of the high order address lines (A21..A23) as potential triggers or inputs for the <Read> and <I/O> switches.

Stay safe. Cheerful regards, Mike, K8LH

Attachment:
65816 Shadow ROM 1.png
65816 Shadow ROM 1.png [ 333.05 KiB | Viewed 725 times ]


Last edited by Michael on Tue Sep 22, 2020 3:09 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 22, 2020 7:25 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
At the basic level, you can interface the '816 like a 6502, relying on just Phi2 and R/W as control signals. The wrinkles are that A16-23 (the bank address) are multiplexed onto D0-7, so you have to latch them during Phi1 in order to make use of them during Phi2, and that VDA and VPA indicate Valid Data Address and Valid Program Address respectively; if both are high simultaneously, that's a replacement for the SYNC signal. In short, if VDA and VPA are both low then it is desirable to deselect all devices, as it's an internal-operation cycle. Finally, if RDY is low (typically due to wait states) then the bank address must not be latched because the data bus remains in data mode.

All of this is handled appropriately by the circuits I've posted, which you may want to review. With two glue-logic chips and an octal latch, you can have a minimal interface and address decoding which assumes that there are no wait-states (and does not provide any), and does not fully handle VDA and VPA (so every memory cycle is assumed to be valid, except that the VIA is qualified by VDA). With four glue-logic chips and an octal latch, you can have full handling of VDA, VPA and RDY, together with a trick that maps out the ROM when the CPU leaves Emulation mode for Native mode (using the fact that the '816 conveniently presents the E, M and X flag bits on output pins).


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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: