V2RetroComputing / analog

∀2 Analog VGA card for the Apple II computer line
MIT License
125 stars 18 forks source link

PLD questions #28

Closed rallepalaveev closed 9 months ago

rallepalaveev commented 9 months ago

Hi,

I have redesigned the schematic with 22V10 PLD and now there are enough pins to fully decode address $CFFF to switch off AUX memory. The code is shown below.

I have the following questions:

In this case, when using all 11 address bits plus IOStrobe, is [BSEL3..0]:'b'101X needed anymore? I think not as it was used with the 16V8 to decode $CFxx with IOStrobe and A8-A10. What is the purpose of disabling EXTENABLE by [BSEL3..0]:'b'0111? Is this something that the Pico FW drives? When is it used? Looks like when the Pico reads the high byte of the address (A8-A15)?

PIN [1..11] = [A0..A10]; PIN 13 = !IOSEL; PIN 14 = !DEVSEL; PIN 15 = !SEL; PIN 16 = !RESET; PIN 17 = !IOSTR; PIN [18..21] = [BSEL3..0]; PIN 22 = EXTENBL; PIN 23 = EXTDSBL; EXTOFF = IOSTR & [A10..0]:'b'11111111111 & [BSEL3..0]:'b'101X; EXTDSBL = !(EXTENBL # IOSEL); EXTENBL = !(EXTDSBL # RESET # EXTOFF # [BSEL3..0]:'b'0111); EXTSEL = EXTENBL & IOSTR; SEL = DEVSEL # IOSEL # EXTSEL;

dkgrizzly commented 9 months ago

The [BSEL3..0]:'b'101X term was there for a couple reasons, to make sure the C8XX output stayed active through the LSB being read by the PICO, and to give it time to stabilize before acting on it. Without some qualifying term, the window could be disabled by transitioning bus states between the 6502 and the video circuit driving the address bus. So [BSEL3..0]:'b'0111 was a way to force the ext rom to be disabled if the card saw I/O in another one of the CnXX areas, but I don't believe I ever implemented the PICO side for that. It may be possible to make a term that checks for $C0XX-$C7XX and'ed with SEL The choice of 0111 was because it is a state that normally would not be used, since the PICO doesn't drive the address bus, and shouldn't show up as a transition state between data writes and address reads because of the order the PICO drives the bus translation chips.