6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Oct 07, 2024 3:26 pm

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:22 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
13) MA8

MA0..8 is the (multiplexed) address bus from the 8726 to the DRAMs.

MA0..8 drivers have identical chip layout, so we just focus on MA8.

Drivers have output FETs switching non_overlapping to GND\VCC
it's a variation of the driver we already had in "5) rw" (no output enable),
making creative use of a RS flipflop built from two NOR gates.

;---

At the inputs of the MA8 driver, we have three switches.
MA_lo (high active) controls the switch which places AM16 on MA8 during DRAM RAS.
MA_hi (active high) cotrols the switch which places AM17 on MA8 during DRAM CAS.
MA_refresh just places high on MA8 during DRAM refresh, because the refresh counter has only 8 Bits.

MA0..7 also have three switches each at the inputs:
MA_lo controls the switches which place AM0..7 on MA0..7, the low part of the address during DRAM RAS.
MA_hi controls the switches which place AM8..15 on MA8..15, the high part of the address during DRAM CAS.
MA_refresh controls the switches which place the refresh counter outputs RA0..7 on MA0..7 during DRAM refresh.

MA_lo, MA_hi, MA_refresh are generated in "21 RAS_CAS_logic".

;---

//Side note: AM0..8 is "multiplexed address", MA0..18 is "address to be multiplexed", don't mix that up.

Attachment:
si8726_13_ma8.png
si8726_13_ma8.png [ 70.19 KiB | Viewed 642 times ]

Attachment:
8726_13_ma8.png
8726_13_ma8.png [ 94.38 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:23 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
14) TEST#

When TEST# is low, the refresh counter and the prescaler for the refresh counter are cleared,
maybe for testing the chip at the factory.

The TEST# pad has a nice ca. 4kOhm pullup resistor (FET) to VCC attached to it.

TEST# (low active) goes through an inverting super buffer and becomes TEST (high active),
then goes to "22) refresh counter".

Attachment:
si8726_14_test.png
si8726_14_test.png [ 15.69 KiB | Viewed 642 times ]

Attachment:
8726_14_test.png
8726_14_test.png [ 17.49 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:24 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
15) ROMSEL#

ROMSEL# (low active) is an output signal for selecting an external ROM.

;---

Short story:

ROMSEL# = ROMH# AND ROML#.

;---

Long story:

ROMH# and ROML# go through inverting super buffers into a NOR gate.
The output of the NOR gate controls a non_inverting driver and becomes ROMSEL#.

//Hint: when inverting inputs and output of an OR gate, it becomes an AND gate.

Attachment:
si8726_15_romsel.png
si8726_15_romsel.png [ 82.17 KiB | Viewed 642 times ]

Attachment:
8726_15_romsel.png
8726_15_romsel.png [ 65.6 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:25 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
16) A0

Address bus A0..4 between C64\C128 and 8726 is bidirectional.

A0..4 drivers\buffers have identical chip layout, so we just focus on A0.

;---

On the input side:
A0 (high active) goes through two inverting super buffers, and becomes A0i (high active).
A0 (high active) also goes through an inverting and a non_inverting super buffer, and becomes A0i# (low active).

A0i and A0i# are feeding the NOR gates which do the address recoding for reading/writing the 8726 registers,
same thing for A1i..A4i and A1i#..A4i#.

We have a big 16 input NOR gate (checking the C64\C128 address bus for $FF00) which consists of a pullup FET to VCC,
and a metal trace which passes by all of the A0..15 drivers\buffers.
The A0 driver\buffer has a FET which switches said metal trace to GND if A0i is high, same thing for A1..4.

For more details about $FF00 detection, see "20) A0..15 NOR".

;---

On the output side, we have a non_inverting driver, fed by A0o, controlled by OE_RW (high active).
Drivers have output FETs switching non_overlapping to GND\VCC, making creative use of a RS flipflop built from two NOR gates.
The circuitry is a variation of the R/W# driver we already had in "5) rw".

OE_RW is generated in "2) BA".

A0o is generated in "24) A0..15 address couter", that's the DMA address when the 8726 reads/writes C64\C128 memory.

Attachment:
si8726_16_a0.png
si8726_16_a0.png [ 68.7 KiB | Viewed 642 times ]

Attachment:
8726_16_a0.png
8726_16_a0.png [ 93.63 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:27 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
17a) A5

Pretty much like what we had in "16) A0",
except that the input side is less circuitry:

A5 goes through two inverting super buffers,
then drives a FET which switches the metal trace of the A0..15 NOR to GND if A5 is high.

A5..7 drivers\buffers have identical chip layout.

Attachment:
si8726_17a_a5.png
si8726_17a_a5.png [ 61.61 KiB | Viewed 642 times ]

;===

17b) A8

Pretty much like what we had in "17a) A5",
except that the input side is a little bit different:

A8 only goes through _one_ inverting super buffer,
then drives a FET which switches the metal trace of the A0..15 NOR to GND if A5 is low.

A8..15 drivers\buffers have identical chip layout.

Attachment:
si8726_17b_a8.png
si8726_17b_a8.png [ 58.16 KiB | Viewed 642 times ]

Attachment:
8726_17_a5.png
8726_17_a5.png [ 108.17 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:29 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
18) D0

D0..D7 is the C64\C128 data bus.

D0io..D7io is the bidirectional data bus inside the 8726 related to D0..7.

D0..7 drivers\buffers have identical chip layout, so we just focus on D0.

;---

On the input side, D0 is sampled with a transparent latch during PHI2.

The output of the latch is placed on the D0io bus by a non_inverting buffer
controlled by OE_DI# (low active), which is generated in "3) CS#".

;---

On the output side, we have a non_inverting driver fed by D0io, driving D0,
controlled by OE_D (high active), which is generated in "3) CS#".

Drivers have output FETs switching non_overlapping to GND\VCC
it's a variation of the driver we already had in "5) rw",
making creative use of a RS flipflop built from two NOR gates.

Attachment:
si8726_18_d0.png
si8726_18_d0.png [ 72.79 KiB | Viewed 642 times ]

Attachment:
8726_18_d0.png
8726_18_d0.png [ 131.5 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:30 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
19) bias

RC ring oscillator, driver, capacitor, rectifier diodes.

Pretty much standard,
and for just understanding how the chip works from the logic design point of view,
we safely can ignore it.

Attachment:
si8726_19_bias.png
si8726_19_bias.png [ 30.49 KiB | Viewed 642 times ]

Attachment:
8726_19_bias.png
8726_19_bias.png [ 43.66 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:33 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
20) A0..A15 NOR

First, we have a 16 input NOR gate, which gives out high on C64is$FF00 (high active) if A0..15 is $FF00.

Basically said NOR gate is a metal trace which passes by all of the A0..A15 drivers\buffers.
North of the A0 driver\buffer, a ca. 10kOhms pullup resistor (FET) ties said metal trace to VCC.

Attachment:
si8726_20_A0_A15_NOR_pullup.png
si8726_20_A0_A15_NOR_pullup.png [ 4.78 KiB | Viewed 642 times ]

Each of the A0..7 buffers contains a FET switching said metal trace to GND if a A0..7 address line is not low.
Each of the A8..15 buffers contain a FET switching said metal trace to GND if a A8..15 address line is not high.

;---

Second, we have a lump of logic at the West side of the chip, "between" D0 pad and A15 pad.

C64is$FF00 goes through an inverter, then into a NOR gate together with R/Wi# (which is low when the 6510 does a memory write).
The output of that NOR gate (which goes high when there is a 6510 write to $FF00) is sampled by a transparent latch during PHI2.
The output of said latch goes through an inverter, is sampled by another transparent latch during PHI1,
goes through a non_inverting super buffer and becomes C64was$FF00w.

So if there was a 6510 write to $00FF in the previous PHI2_in cycle,
C64was$FF00w (high active) goes high in the current PHI2_in cycle.

C64was$FF00w goes to the DMA start logic in "31) tapeworm from hell".

Attachment:
si8726_A0_A15_NOR.png
si8726_A0_A15_NOR.png [ 27.45 KiB | Viewed 642 times ]

Attachment:
8726_20_a0_a15_nor.png
8726_20_a0_a15_nor.png [ 64.69 KiB | Viewed 642 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:42 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
21) RAS_CAS_logic

It is located North East in the chip, close to the CAS1#,CAS0#,RAS1#,RAS0# pads.

It generates the signals for these parts, as well as the control signals for the MA0..8 multiplexers,
also it generates the signals DMA1 and OED_GATE.

8726 does DMA DRAM acceess during PHI2_in is low, and DRAM refresh during PHI2_in is high.

Note:
The VIC-II generates the PHI0 clock by dividing DotClock by 8,
the 6510 generates PHI2 (for the Expansion Port, the SID and the two 6526 chips) from PHI0.
PHI2 changes with the rising edge of the DotClock.

;---

To make it short:
anything timing related running with the dot clock (faster than PHI2_in, that is) is located in that area of the chip.

DotClk# goes into a clock generator which is built around a RS flipflop containing two NOR gates (that's standard).
That clock generator gives us two non_overlapping clock signals, Dot and Dot#.

A falling edge detector (clocked by Dot\Dot#) sets a two Bit counter (clocked by Dot\Dot#) to $01 after the falling edge of PHI1.
;
Bit 0 of the counter goes through an inverter, and becomes OED_GATE.
Bit 0 also enters another clock generator (synchronized with Dot#) (another RS flipflop containing two NOR gates),
which gives us the two non_overlapping clock signals OEDG and OEDG#.
;
Bit 1 gives us the signal DMA1.

We have two rising edge detectors (clocked with OEDG\OEDG#), scanning the refresh0 and refresh1 signals from "22) refresh counter",
generating RAS0o# and RAS1o# for DRAM refresh.
Note, that refresh0 and refresh1 never are high at the same moment.

We have a falling edge detector (clocked with OEDG\OEDG#), which scans PHI2 (synchronized with OED_GATE),
generating RAS0o# and RAS1o# during DMA (when DMAo# is low) according to the two bank select signals
AM_bank0 and AM_bank1 [see "26) bank select logic"].
Note, that AM_bank0 and AM_bank1 never are high at the same moment.

The multiplexer for AM0..8 [see "13) MA8"] sets AM_refresh to high by default, what turns AM_lo and AM_high to low,
so that AM0..8 are fed by the DRAM refresh counter.

If there is an active DMA (DMAo# is low), some timing circuity fed by PHI2 turns AM_refresh low,
and sets MA_lo as well as MA_high to high in the right moment, making sure that the lower/higher part of the AM0..17 address
is passed through MA0..8 to the DRAMs according to the RAS#\CAS# sequence.

Said timing circuitry also enables CAS0o# and CAS1o# according to the bank select signals AM_bank0 and AM_bank1
(which are synchronized with OED_GATE).

;---

The RAS_CAS_logic is quite a tapeworm, and it doesn't fit on the screen.
For navigating it, my orientation when starting to dissect it was the shape of the diffusion GND polygons in the East of the RAS_CAS_logic,
so the odd red pattern in the first two schematics is a simplified form of that shape.

Frank and me checked twice, if the polygonized picture really matches the microscopic picture of the silicon,
and to us it does.

Attachment:
si8726_21_ras_cas.png
si8726_21_ras_cas.png [ 292.22 KiB | Viewed 641 times ]

Attachment:
si8726_21_ras_cas_gates.png
si8726_21_ras_cas_gates.png [ 394.89 KiB | Viewed 641 times ]

Attachment:
8726_21_ras_cas_logic_part1.png
8726_21_ras_cas_logic_part1.png [ 516.45 KiB | Viewed 641 times ]

Attachment:
8726_21_ras_cas_logic_part2.png
8726_21_ras_cas_logic_part2.png [ 147.59 KiB | Viewed 641 times ]


;===

To be on the safe side, Frank kindly did a simulation of my simplified RAS_CAS_logic,
and to me and Frank the results of the simulation seems to match the oscilloscope pictures.

Attachment:
ras_cas_simulation.png
ras_cas_simulation.png [ 51.73 KiB | Viewed 641 times ]


Those want to know more in detail can view the simulation results with GTKWave:

Attachment:
simulation_results.zip [1.02 MiB]
Downloaded 29 times


;===

Now for some oscilloscope pictures which Frank had made from a working 8726 chip:

Attachment:
phi2_dotclk.png
phi2_dotclk.png [ 112.34 KiB | Viewed 641 times ]

Attachment:
ras_cas.png
ras_cas.png [ 72.35 KiB | Viewed 641 times ]

Attachment:
RAS0_refresh_only.png
RAS0_refresh_only.png [ 83.1 KiB | Viewed 641 times ]

Attachment:
refresh_Bank0.png
refresh_Bank0.png [ 73.13 KiB | Viewed 641 times ]

Attachment:
Access_Bank0_DOTCLK.png
Access_Bank0_DOTCLK.png [ 59.56 KiB | Viewed 641 times ]

Attachment:
Access_Bank0_DOTCLK_PHI2_RAS1_refresh.png
Access_Bank0_DOTCLK_PHI2_RAS1_refresh.png [ 69.27 KiB | Viewed 641 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:44 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
22) refresh counter.

We have a 4 Bit prescaler, running at PHI2_in speed.
It features the usual inverting\non_inverting ripple carry mechanism,
but the counter Bits are stored in inverted form.

A NOR gate detects, if the prescaler reached 15.
The output of the NOR gate goes into sort of a shift register (clocked with PHI1\PHI2),
with some edge detectors attached to it.

The sequence goes like this:
When the prescaler reached 15,
in the next PHI2_in cycle it is set to 0, and refresh0 goes high.
In the following PHI2_in cycle, refresh0 goes low, and refresh1 goes high.
In the PHI2_in cycle after that, refresh1 goes low, and the refresh counter increments.

In "21) RAS_CAS_logic", the RAS0o# and RAS1o# signals for DRAM refresh
are generated from refresh0 and refresh1.

The refresh counter is pretty much standard,
except that TEST clears the refresh counter and the prescaler.

//I think that the TEST signal was used for testing the chip at the factory.

Attachment:
si8726_22_refresh_counter.png
si8726_22_refresh_counter.png [ 172.54 KiB | Viewed 641 times ]

Attachment:
si8726_22_refresh_counter_bits.png
si8726_22_refresh_counter_bits.png [ 180.08 KiB | Viewed 641 times ]

Attachment:
8726_22_refresh_counter.png
8726_22_refresh_counter.png [ 425.1 KiB | Viewed 463 times ]


Last edited by ttlworks on Fri Jul 29, 2022 6:14 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:46 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
23a) D<>DD transfer latch

D0io..D7io is the internal data bus which is related to C64\C128 memory data.
DD0io..DDiio is the internal data bus which is related to the REU DRAM data (DRAM chips attached to the 8726, that is).

When moving/swapping/comparing data between C64\C128 memory and REU DRAM memory,
D<>DD transfer latch does temporarily store that data,
also it contains the comparator.

DRAM data access happens during PHI2_in is low,
and C64\C128 data is valid during PHI2_in... if the VIC-II inside the C64\C128 allows this, of course.

Actually, there are two latches, one for D>DD transfer, the other for DD>D transfer.

Compare is done with one XOR gate per Bit.
The XOR gates feed an 8 input NOR gate, which gives out EMP_EQ (high active) high
if the contants of both latches are equal.

Note, that CLR_TF clears the latches after a DMA is completed.

Attachment:
si8726_23a_transfer_latch.png
si8726_23a_transfer_latch.png [ 35.39 KiB | Viewed 641 times ]


;---

23b) compare logic

Compare logic is located East of the D<>DD transfer latch.

Basically, the comparator output has to be ignored if there is no DMA active,
OR if the VIC-II has taken over the bus (holding/disrupting a DMA sequence),
OR if the 8726 Register $01 is not set to VERIFY mode (for comparing a block of data).

If the comparator output is not ignored, then a compare error will set Bit 5 in status Register $00,
and CMP_ERR# tells the DMA control circuitry in "31) tapeworm from hell" that there was a compare error,
to stop comparing, and to abort the DMA sequence.

Attachment:
si8726_23b_compare_logic.png
si8726_23b_compare_logic.png [ 32.38 KiB | Viewed 641 times ]

Attachment:
8726_23_transfer_latch.png
8726_23_transfer_latch.png [ 335.39 KiB | Viewed 641 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:49 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
24) A0..15 address counter

It is located South west in the chip, close to the A0..15 pads.

And it generates A0..15 for C64\C128 memory access.

We have two 8 Bit Registers for C64\C128 memory address,
Register $02 for A0..7, Register $03 for A8..15.
Registers are cleared during RESET.

When the 6510 writes one of these registers, or when there is a RESET,
the contents of both registers are transferred into the A0..15 counter.

When the 6510 reads one of these registers,
it actuall reads the contents of the A0..15 counter.

;---

Special case:
If RELOAD is enabled (Bit 5 in command Register $01 is set),
the contents of the $02 and $03 Registers are reloaded
into the A0..15 counter after completion of a DMA sequence.

To be more precise:
Register $01 Bit 5 goes into "31) tapeworm from hell",
which generates the UPDATE signal, telling the counter control circuitry
to reload the 16 Bit counter from the $02 and $03 Registers.

;---

A0..15 counter features the usual inverting\non_inverting ripple carry,
plus an 8 Bit carry lookahead mechanism.

Counter Bits change with PHI2.

"31) tapeworm from hell" enables counting with the cntA_CEN# signal (low active).
If cntA_CEN# is low, A0..15 counter increments.

Attachment:
si8726_24_a0_a15_counter.png
si8726_24_a0_a15_counter.png [ 271.13 KiB | Viewed 639 times ]

Attachment:
si8726_24_a6_a7_counter.png
si8726_24_a6_a7_counter.png [ 58.34 KiB | Viewed 639 times ]

Attachment:
si8726_24_control_west.png
si8726_24_control_west.png [ 48.47 KiB | Viewed 639 times ]

Attachment:
si8726_24_control_east.png
si8726_24_control_east.png [ 49.99 KiB | Viewed 639 times ]

Attachment:
8726_24_a0_a15_address_counter.png
8726_24_a0_a15_address_counter.png [ 444.74 KiB | Viewed 639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:52 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
25) transfer counter, N0..15

It is located East of the "24) A0..15 address counter",
and it contains the number of Bytes to be transferred during a DMA sequence.
Means, it's a down counter.
Besides that, the game is somewhat similar to what we had in the A0..15 address counter.

We have two 8 Bit Registers for the amount of Bytes remaining to be transferred,
Register $07 for N0..7, Register $08 for N8..15.
Registers are set to -1 during RESET.

When the 6510 writes one of these registers, or when there is a RESET,
the contents of both registers are transferred into the transfer counter.

When the 6510 reads one of these registers,
it actuall reads the contents of the transfer counter.

;---

Special case:
If RELOAD is enabled (Bit 5 in command Register $01 is set),
the contents of the $07 and $08 Registers are reloaded
into the transfer counter after completion of a DMA sequence.

To be more precise:
Register $01 Bit 5 goes into "31) tapeworm from hell",
which generates the UPDATE signal, telling the counter control circuitry
to reload the 16 Bit counter from the $07 and $08 Registers.

;---

Transfer counter features the usual inverting\non_inverting ripple carry,
plus an 8 Bit carry lookahead mechanism.

Also, we have NOR gates and two NAND gates, which tell "31) tapeworm from hell",
that only two Bytes (cntN_is$0002#, low active) are remaining to be transferred by DMA,
or that only one Byte (cntN_is$0001#, low active) is remaining to be transferred by DMA.

//You probably don't want to transfer just one or two Bytes of data per DMA, do you ?

Counter Bits change with PHI2.

"31) tapeworm from hell" enables counting with the cntN_CEN# signal (low active).
If cntN_CEN# is low, the transfer counter decrements.

Attachment:
si8726_25_n0_n15_counter.png
si8726_25_n0_n15_counter.png [ 256.98 KiB | Viewed 639 times ]

Attachment:
si8726_25_n0_n1_counter.png
si8726_25_n0_n1_counter.png [ 54.03 KiB | Viewed 639 times ]

Attachment:
si8726_25_control_west.png
si8726_25_control_west.png [ 42.75 KiB | Viewed 639 times ]

Attachment:
si8726_25_control_east.png
si8726_25_control_east.png [ 45.86 KiB | Viewed 639 times ]

Attachment:
si8726_25_control_north.png
si8726_25_control_north.png [ 17.17 KiB | Viewed 639 times ]

Attachment:
8726_25_transfer_counter.png
8726_25_transfer_counter.png [ 510.7 KiB | Viewed 639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:55 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
26) AM0..18 address counter

It breaks into two parts:
AM0..15 counter is located East from "25) transfer counter", not far from the MA0..7 pads.
AM16..18 counter is located East from the status Register $00, not far from the MA8 pad.

It generates the address for the REU DRAM, and selects one of the two DRAM banks.

;===

For the AM0..15 counter, the game is pretty similar to what we had in "24) A0..15 address counter".

We have two 8 Bit Registers: Register $04 for AM0..7, Register $05 for AM8..15.
Registers are cleared during RESET.

When the 6510 writes one of these registers, or when there is a RESET,
the contents of both registers are transferred into the AM0..15 counter.

When the 6510 reads one of these registers,
it actuall reads the contents of the AM0..15 counter.

;---

Special case:
If RELOAD is enabled (Bit 5 in command Register $01 is set),
the contents of the $04 and $05 Registers are reloaded
into the AM0..15 counter after completion of a DMA sequence.

To be more precise:
Register $01 Bit 5 goes into "31) tapeworm from hell",
which generates the UPDATE signal, telling the counter control circuitry
to reload the 16 Bit counter from the $04 and $05 Registers.

;---

A0..15 counter features the usual inverting\non_inverting ripple carry,
plus an 8 Bit carry lookahead mechanism that enables incrementing Bit 8..15 if there was an overflow in Bit 0..7,
enabling _another_ 8 Bit carry lookahead mechanism that increments Bit16..18 if there was an overflow in Bit 0..15.

Counter Bits change with PHI2.

"31) tapeworm from hell" enables counting with the cntAM_CEN# signal (low active).
If cntAM_CEN# is low, AM0..15 counter increments.

Attachment:
si8726_26_am0_am15_counter.png
si8726_26_am0_am15_counter.png [ 264.25 KiB | Viewed 637 times ]

Attachment:
si8726_26_control_west.png
si8726_26_control_west.png [ 57.18 KiB | Viewed 637 times ]

Attachment:
si8726_26_control_east.png
si8726_26_control_east.png [ 45.02 KiB | Viewed 637 times ]


;===

For the AM16..18 counter (that's three Bits), the game is a little bit different.

We have one 3 Bit Register: Register $06 for AM16..18.
Register is cleared during RESET.

When the 6510 writes Register $06, or when there is a RESET,
the contents of Register $06 are transferred into the AM16..18 counter.

When the 6510 reads Register $06,
it actuall reads the contents of the AM16..18 counter.

;---

Special case:
If RELOAD is enabled (Bit 5 in command Register $01 is set),
the contents of the $06 Registers are reloaded into the AM16..18 counter
after completion of a DMA sequence.

To be more precise:
Register $01 Bit 5 goes into "31) tapeworm from hell",
which generates the UPDATE signal, telling the counter control circuitry
to reload the 3 Bit counter from the $06 Registers.

;---

AM16..18 counter features the usual inverting\non_inverting ripple carry,
counter Bits change with PHI2.

Attachment:
si8726_am16_am18_counter.png
si8726_am16_am18_counter.png [ 166.5 KiB | Viewed 637 times ]


;===

Now for the DRAM bank select logic attached to the AM16..18 counter.
For AM16 and AM17, it reads the buffered counter outputs.
For Bit 18, it directly and unbuffered taps into the AM18 counter Bit.

BS (high active) goes through an inverting super buffer and becomes BS# (low active),
defining the size of the two DRAM banks attached to the 8726 inside the REU,
see "9) BS".

Note, that we are just talking about the configuration of the 8726 bank select logic here,
not about the _real_ size of a DRAM bank which physically is attached to the 8726.

;---

BS=low (BS#=high): two banks with 256kB of DRAM each.

if AM18=0, AM_bank1 goes high, selecting DRAM bank1.
if AM18=1, AM_bank0 goes high, selecting DRAM bank0.

Also, if the AM16..18 counter was 7 and rolls over to 0,
it is cleared by AMB_CLR (to me, this looks redundant).

;---

BS=high (BS#=low): two banks with 64kB of DRAM each.

if AM16=0, AM_bank0 goes high, selecting DRAM bank0.
if AM16=1, AM_bank1 goes high, selecting DRAM bank1.

Attachment:
8726_26_am_0_18_address_counter.png
8726_26_am_0_18_address_counter.png [ 404.26 KiB | Viewed 637 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:57 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
27) Register $01

Located between A14 pad and MA8 pad, East of the A14 pad.

Command register $01:
Bit 0..1: transfer type. $0=C64>REU, $1=REU>C64, $2=SWAP, $3=VERIFY.
Bit 2..3: present, but unused.
Bit 4: 1=disable $FF00w decode.
Bit 5: 1=enable AUTOLOAD. //enable reloading counters from Registers after completion of DMA sequence
Bit 6: present, but unused.
Bit 7: EXECUTE, 1=initiate DMA transfer per current config.

Circuitry for the Register Bits is pretty much standard.

A RESET sets Bit 4, and clears all of the other Bits.

Bit 4 is set and Bit 7 is cleared with CLR_TF (high active) after completion of a DMA sequence.
CLR_TF is generated in "31) tapeworm from hell".


Bit 5 and Bit 7 are sampled with PHI1 in transparent latches
before they go in low active form into "31) tapeworm from hell":
R$01.Q5# and R$01.Q7.


Bit 4 is sampled with PHI1 in a transparent latch and goes into "31) tapeworm from hell" as R$01.Q4 (high active),
and there is an edge detector (clocked with PHI2) attached to R$01.Q4, generating R$01.Q42#.
;
My guess is, that it goes like this:
If Bit 4 is cleared, setting Bit 7 instantly initiates DMA transfer.
If Bit 4 is set, setting Bit 7 makes the 8726 wait until the 6510 writes $FF00, than a DMA transfer is initiated.
The edge detector seems to block the $FF00 detection from the previous PHI2_in cycle when Bit 4 goes from low to high.


Bit 0 and Bit 1 go into a 2 Bit decoder (think of 74138 or 74139), which tells "31) tapeworm from hell" what to do:
R$01.Y0 (high active) =high: C64>REU
R$01.Y1 (high active) =high: REU>C64
R$01.Y2 (high active) =high: SWAP
R$01.Y3 (high active) =high: VERIFY
//only one of these 4 signals can be high at a time.

Attachment:
si8726_27_register_$01.png
si8726_27_register_$01.png [ 183.18 KiB | Viewed 637 times ]

Attachment:
8726_27_register_$01.png
8726_27_register_$01.png [ 292.22 KiB | Viewed 637 times ]


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

All times are UTC


Who is online

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