; 2022-04-17 ; First draft conversion of original equations ; into a hopefully clearer form. ; ; Not tested yet. ; ; Pure combinatorial logic. ; Could be done in a PAL20L10. ; ; Will need testing by comparing the outputs ; of the two methods. ; ; MINI CORTEX GLUE LOGIC CHIP GLUE G22V10 /MEMEN =1 /WE =2 /DBIN =3 /is_00xx_or_FExx =4 RA15 =5 AB7 =6 AB6 =7 /ROMEN =8 /CRUCLK =9 USER =10 PROTECT =11 /CSW =14 /CSR =15 /FLAGSEL =16 WAIT =17 /9902SEL =18 /PWE =19 /MAPSEL =20 /CFSEL =21 /RAMSEL =22 /ROMSEL =23 EQUATIONS ; aliases write = we read = dbin ; Intermediate terms: is_00xx = is_00xx_or_FExx * /ra15 ; in lower 32k is_FExx = is_00xx_or_FExx * ra15 ; in upper 32k ; 9902_space = is_00xx * /ab7 * /ab6 ; 0000 FLAG_space = is_00xx * /ab7 * ab6 ; 0040 CF_space = is_FExx * /ab7 * /ab6 ; FE00 MAP_space = is_FExx * /ab7 * ab6 ; FE40 CS_space = is_FExx * ab7 * /ab6 ; FE80 ; pin definitions ROMSEL = memen * romen * /ra15 ; in lower 32k if enabled RAMSEL = memen * /romen * /ra15 ; in lower 32k if ROM disabled or memen * /romen * ra15 ; in upper 32k or memen * /romen * we * /is_00xx_or_FExx ; exclude writing to "io hole" FLAGSEL = cruclk * FLAG_space 9902SEL = /memen * 9902_space * /user CFSEL = memen * CF_space * /user MAPSEL = memen * MAP_space * /user CSW = memen * CS_space * /user * write CSR = memen * CS_space * /user * read PWE = we * PROTECT or /MAPSEL WAIT = ROMSEL or CFSEL