Skip to content

Instantly share code, notes, and snippets.

@mbamac
Last active Apr 10, 2017
Embed
What would you like to do?
address decoder for 6502 homebrew computer
Name address-decoder-16v8-2 ;
PartNo 00 ;
Date 2017-02-05 ;
Revision 01 ;
Designer Maciej Bartosiak ;
Company m ;
Assembly None ;
Location ;
Device g16v8a;
/* *************** INPUT PINS *********************/
pin 1 = PHI2; /* clock PHI2 */
pin 2 = RW; /* RW signala from 65c02 */
pin [3..7] = [A15..A11];
/* *************** OUTPUT PINS *********************/
pin 14 = !RAM_1 ; /* RAM_1 0000-7FFF 0... .... .... 32K */
pin 13 = !RAM_2 ; /* RAM_2 8000-BFFF 10.. .... .... 16K */
pin 15 = LCD ; /* LCD C000-CFFF 1100 .... .... 4K */
pin 16 = !VIA_1 ; /* VIA_1 D000-D7FF 1101 0... .... 2K */
pin 17 = !VIA_2 ; /* VIA_2 D800-DFFF 1101 1... .... 2K. */
pin 18 = !ROM ; /* ROM E000-FFFF 111. .... .... 8K */
pin 19 = !OE ;
/* *************** LOGIC ***************************/
OE = RW;
RAM_1 = !A15 & PHI2;
RAM_2 = A15 & !A14 & PHI2;
IO_SP = A15 & A14 & !A13;
LCD = IO_SP & !A12 & !A11 & PHI2;
VIA_1 = IO_SP & A12 & !A11;
VIA_2 = IO_SP & A12 & A11;
ROM = A15 & A14 & A13;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment