Being able to copy between both video RAMs in one page refresh seemed to be simple, but as usual everything takes longer. I had to replace the control logic with one more GAL - and naturally if a board is already so messy a small change can have unexpected side consequences - in this case a hunt over several days which wire I accidentally moved. Here is the final schematic: And the source code for the GAL:
Code: Select all
Name video_control ;
PartNo 00 ;
Date 4/24/2021 ;
Revision 01 ;
Designer Engineer ;
Company private ;
Assembly None ;
Location ;
Device g22v10 ;
/* *************** INPUT PINS *********************/
PIN 1 = !CPU_VIDA ; /* */
PIN 2 = !CLK_VIDA ; /* */
PIN 3 = !CPU_VIDB ; /* */
PIN 4 = !CLK_VIDB ; /* */
PIN 5 = !COPY ; /* */
PIN 6 = !EXT_VIDA ; /* */
PIN 7 = !EXT_VIDB ; /* */
PIN 8 = !spare ; /* */
PIN 9 = !WR_CPU ; /* */
PIN 10 = !VIDRAM ; /* */
PIN 11 = !WR_CLK ; /* */
PIN 13 = !WR_EXTA ; /* */
PIN 14 = !WR_EXTB ; /* */
/* *************** OUTPUT PINS *********************/
PIN 16 = !COPY_AB ; /* */
PIN 17 = DIR_AB ; /* */
PIN 18 = !VIDB_cnt ; /* */
PIN 19 = !VIDB_RW ; /* */
PIN 20 = !VIDB_CS ; /* */
PIN 21 = !VIDA_cnt ; /* */
PIN 22 = !VIDA_RW ; /* */
PIN 23 = !VIDA_CS ; /* */
VIDA_CS = !CPU_VIDA
# VIDRAM ;
VIDB_CS = !CPU_VIDB
# VIDRAM ;
VIDA_RW = CPU_VIDA & WR_CPU /* write under CPU control */
# EXT_VIDA & WR_EXTA /* write under external control */
# COPY_AB & CLK_VIDB & WR_CLK; /* write if copy enabled */
VIDB_RW = CPU_VIDB & WR_CPU
# EXT_VIDB & WR_EXTB
# COPY_AB & CLK_VIDA & WR_CLK;
COPY_AB = COPY;
DIR_AB = !CLK_VIDA;
VIDA_cnt = CLK_VIDA # COPY_AB ;
VIDB_cnt = CLK_VIDB # COPY_AB ;