Name Piasw; Partno TBD; Date 03/02/95; Revision 01; Designer Peter; Company N/A; Assembly Atari800; Location Q101; Device p16l8; /******************************************************************/ /* */ /* This file contains the logic to handle the PIA switching. */ /* */ /* Removed from 'mapper.pld', since a EP900 is slight overkill */ /* for just this function. */ /* */ /******************************************************************/ /* Allowable Target Device Types: PAL16L8 */ /******************************************************************/ /** Inputs **/ Pin 1 = !piaCS; /* Original CS from decode ($D300-D3FF) */ Pin 2 = A2; /* Used to select which PIA is in use */ Pin 3 = A0; /* Used to indicate which port is being accessed */ Pin 4 = CB2_a; /* CB2 from original PIA */ Pin 5 = CB2_b; /* CB2 from second PIA */ Pin 6 = !os800; /* Pull low for 800 OS mode */ /** Outputs **/ Pin 13 = !PIA1_cs; /* Output to original PIA (Joy ports) */ Pin 14 = !PIA2_cs; /* Output to new PIA (bank switch) */ Pin 15 = CB2_out; /* The replacement CB2 sig (SIO /command) */ /** Logic Equations **/ /* Select the correct CB2 signal, depending on mode */ CB2_out = (CB2_a & os800) # (CB2_b & !os800); /* Generate the PIA chip selects */ /* This is the on-board PIA */ PIA1_cs = piaCS & ((os800 & !A2) # (!os800 & ((A2 & A0) # (!A2 & !A0)))); /* This is the additional PIA */ PIA2_cs = piaCS & ((os800 & A2) # (!os800 & ((!A2 & A0) # (A2 & !A0))));