The C16 - a Ferrari with no tires ?

Discussions for CBM PET, VIC-20, SX64, C16/+4 and Commodore 128 systems
User avatar
Gyro Gearloose
Member
Member
Posts: 237
Joined: Sun Nov 15, 2015 5:20 am
Contact:

Re: The C16 - a Ferrari with no tires ?

Post by Gyro Gearloose » Fri Nov 08, 2019 2:30 am

eslapion wrote:
Fri Nov 08, 2019 2:08 am
I still have a VIC-20 with a 'bi-color' keyboard...
IIRC Addison's sold C16 keyboard mechanisms back in the day when they weren't a Dollarama.


The price one pays for pursuing any profession, or calling, is an intimate knowledge of its ugly side.

User avatar
eslapion
Member
Member
Posts: 867
Joined: Mon Jul 20, 2015 10:11 am
Location: Canada
Contact:

Re: The C16 - a Ferrari with no tires ?

Post by eslapion » Fri Nov 08, 2019 8:45 am

Gyro Gearloose wrote:
Fri Nov 08, 2019 2:30 am
... when they weren't a Dollarama.
What category does a 'store' fit in when they sell 30 y.o. electromechanical parts in worn out beer bottle crates ? :lol:
Wealth, like happiness, is never attained directly. It comes as a by-product of providing a useful service. -Harland D. Sanders

User avatar
Gyro Gearloose
Member
Member
Posts: 237
Joined: Sun Nov 15, 2015 5:20 am
Contact:

Re: The C16 - a Ferrari with no tires ?

Post by Gyro Gearloose » Fri Nov 08, 2019 1:33 pm

"fun"
The price one pays for pursuing any profession, or calling, is an intimate knowledge of its ugly side.

User avatar
Gyro Gearloose
Member
Member
Posts: 237
Joined: Sun Nov 15, 2015 5:20 am
Contact:

Re: The C16 - a Ferrari with no tires ?

Post by Gyro Gearloose » Sat Nov 09, 2019 1:44 am

An odd thing I noticed is that C16s are more expensive that plus/4s on eBay...
The price one pays for pursuing any profession, or calling, is an intimate knowledge of its ugly side.

User avatar
eslapion
Member
Member
Posts: 867
Joined: Mon Jul 20, 2015 10:11 am
Location: Canada
Contact:

Re: The C16 - a Ferrari with no tires ?

Post by eslapion » Mon Dec 09, 2019 1:19 pm

Well, I did my part for the C16 with the Saruman-TED 64k expansion.

There are many nice software which will work only on a Plus/4 or C16 with expansion nowadays. I was browsing through Psytronik's stuff yesterday.

Look at this guy which is available for free... https://psytronik.itch.io/slipstream
Wealth, like happiness, is never attained directly. It comes as a by-product of providing a useful service. -Harland D. Sanders

User avatar
eslapion
Member
Member
Posts: 867
Joined: Mon Jul 20, 2015 10:11 am
Location: Canada
Contact:

Re: The C16 - a Ferrari with no tires ?

Post by eslapion » Thu Dec 12, 2019 2:25 pm

There is something incredibly fishy about the way TED machines access RAM and it causes weird problems.

Here is a (translated) copy of an e-mail I have sent to another engineer...

The CPU has the bus when CLK is HIGH and the TED has the bus when CLK is LOW. The problem arises at the end of the CPU access to the DRAM so CLK = 1 and CAS = 0.

1. Access to RAM is confirmed only when CAS = 0 because RAS = 0 means either the low addresses are on the bus or a row # to refresh for the DRAM refresh cycle. RAS = 0 becomes irrelevant for static RAM that is connected to the non-multiplexed address bus.

2. When the TED has the BUS it only makes READs so if CLK = 0 then it is absolutely necessary that R/!W = 1.

3. When the CPU has the BUS, it can do READ or WRITE but because of the way the DRAM is handled in this machine, during a WRITE, CAS and R/!W line stay LOW after CLK goes from 1 to 0. So, then, there is a condition that is normally impossible; CAS = 0 and CLK = 0 and R /!W = 0 This condition is equivalent to doing a WRITE when the TED has the bus.

4. At that instant, address lines A0-A7 start to change because refresh cycles arrive 200ns later. The DRAM is not affected because of its multiplexed bus that 'latches' the low address lines at the beginning of the DRAM access cycle. On the other hand the static RAM, especially if it is fast, will see this change of addresses and start writing the data it reads on the data bus to this new address which is a mixture (A0-7) of the row to be refreshed at the next RAS = 0 and the still valid addresses present on A8 to A15.

So, the truth table for the !CS of the static RAM according to the CAS, CLK and R/!W entries should be as follows:

Code: Select all

CAS | CLK |R/!W | !CS
----+-----+-----+----
1   | X   | X   | 1   <- CAS is high so no access no matter the values of CLK and R/!W
0   | 1   | 1   | 0   <- CAS confirms CPU READ RAM access
0   | 1   | 0   | 0   <- CAS confirms CPU WRITE RAM access - It is in the few ns following this condition that there is a bug
0   | 0   | 1   | 0   <- CAS confirms TED READ RAM access
0   | 0   | 0   | 1   <- CAS confirms TED WRITE RAM access which is impossible - this 'anomaly' lasts 90ns after every CPU writes. 
I will include a few scope captures to make this more clear. Presently, on SaRuMan-TED, the solution to this problem is to have a falling edge detector between the CLK signal from the TED and the CE2 input on the SRAM IC. Upon every falling edge of CLK, CE2 receives a low pulse of 200ns which terminates access to the SRAM whether the ending CPU half cycle was a READ or WRITE.

It's truly as if the people who designed this machine purposely made it very complicated to add memory. Adding DRAM can almost only be done by making mods on the board even when using a cartridge. Using SRAM requires needlessly complicated timing tricks.
Wealth, like happiness, is never attained directly. It comes as a by-product of providing a useful service. -Harland D. Sanders

User avatar
eslapion
Member
Member
Posts: 867
Joined: Mon Jul 20, 2015 10:11 am
Location: Canada
Contact:

Re: The C16 - a Ferrari with no tires ?

Post by eslapion » Thu Dec 12, 2019 5:52 pm

The absolute Whiskey Tango Foxtrot moment...
CAS and R///!W overstretch into the TED access time
CAS and R///!W overstretch into the TED access time
What you see above is CAS going low to confirm an access to RAM by the CPU but it is still low when CLK goes low to signal it's time for the TED to have control of the bus. Worst, R/!W stays low too even longer when the TED can NEVER write to memory. A genuinely stupid way of working.
Wealth, like happiness, is never attained directly. It comes as a by-product of providing a useful service. -Harland D. Sanders

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 1 guest