From f6dc1ad1f894f7617477d09d87ad7bbd03acff8f Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 14 Apr 2023 23:08:59 +0300 Subject: Add PPU and relevant memories --- digital/atk16.dig | 100 +++- digital/atk16_ppu.dig | 1031 ++++++++++++++++++++++++++--------------- digital/atk16_ppu_palette.dig | 225 +++++++++ 3 files changed, 964 insertions(+), 392 deletions(-) create mode 100644 digital/atk16_ppu_palette.dig (limited to 'digital') diff --git a/digital/atk16.dig b/digital/atk16.dig index f79e909..1b9dcc5 100644 --- a/digital/atk16.dig +++ b/digital/atk16.dig @@ -1272,20 +1272,6 @@ - - Tunnel - - - rotation - - - - NetName - CLK - - - - Tunnel @@ -1409,6 +1395,76 @@ + + Tunnel + + + rotation + + + + NetName + CLK + + + + + + Tunnel + + + rotation + + + + NetName + MMIO_IE + + + + + + Tunnel + + + rotation + + + + NetName + MMIO_S + + + + + + Tunnel + + + rotation + + + + NetName + MMIO_OE + + + + + + Tunnel + + + rotation + + + + NetName + DBUS + + + + @@ -1603,6 +1659,10 @@ + + + + @@ -1791,6 +1851,10 @@ + + + + @@ -1823,6 +1887,10 @@ + + + + @@ -1971,6 +2039,10 @@ + + + + diff --git a/digital/atk16_ppu.dig b/digital/atk16_ppu.dig index 17b9447..8f373a3 100644 --- a/digital/atk16_ppu.dig +++ b/digital/atk16_ppu.dig @@ -84,14 +84,14 @@ 10 - + Const Value - 523 + 113 Bits @@ -102,44 +102,338 @@ dec - + - Counter + Comparator Bits 10 - + - VDD + Const + + + Value + 16 + + + Bits + 10 + + + intFormat + dec + + + + + + NAnd + + + + + Tunnel + + + NetName + HSYNC + + + + + + In + + + Description + Pixel clock + + + Label + PCLK + + + + + + Tunnel + + + NetName + PCLK + + + + + + In + + + Description + CPU clock + + + Label + CLK + + + + + + Tunnel + + + NetName + CLK + + + + + + RAMDualPort + + + AddrBits + 11 + + + Label + SPRITE MEM + + + Bits + 16 + + + + + + Text + + + Description + (8 pixels wide x 8 pixels tall + 12 bit X + 12 bit Y + 8 bit priority) +x 21 sprites +< 2**11 = 2048 words + + + + + + Text + + + Description + 2**11 selector addresses for +sprite mem, starting from 0x0800 + + + + + + In + + + Label + MMIO_IE + + + + + + In + + + Label + MMIO_OE + + + + + + Tunnel rotation - + + + + NetName + CLK - + - Comparator + In + + Description + Data bus + + + Label + DBUS + Bits - 10 + 16 - + + + + Tunnel + + + NetName + DBUS + + + + + + Tunnel + + + rotation + + + + NetName + DBUS + + + + + + Tunnel + + + rotation + + + + NetName + SMEMBUS + + + + + + In + + + Description + MMI/O selector + + + Label + MMIO_S + + + Bits + 13 + + + + + + Splitter + + + Input Splitting + 13 + + + Output Splitting + 11,1,1 + + + + + + And + + + inverterConfig + + In_2 + + + + + + + Tunnel + + + NetName + SMEMBUS + + + + + + Multiplexer + + + Bits + 11 + + + + + + Tunnel + + + rotation + + + + NetName + SM_QUERY + + + + + + Tunnel + + + rotation + + + + NetName + SM_QUERY + + + + + + Ground + + + Bits + 11 + + + Const Value - 488 + 160 Bits @@ -150,7 +444,22 @@ dec - + + + + Sub + + + Bits + 10 + + + + + + Ground + + Comparator @@ -160,14 +469,14 @@ 10 - + Const Value - 751 + 523 Bits @@ -178,7 +487,27 @@ dec - + + + + Counter + + + Bits + 10 + + + + + + VDD + + + rotation + + + + Comparator @@ -188,14 +517,14 @@ 10 - + Const Value - 654 + 10 Bits @@ -206,7 +535,7 @@ dec - + Comparator @@ -216,14 +545,14 @@ 10 - + Const Value - 491 + 13 Bits @@ -234,42 +563,27 @@ dec - - - - Tunnel - - - NetName - VSYNC - - - - - - NAnd - - + Tunnel NetName - HSYNC + VSYNC - + NAnd - + VGA - + Tunnel @@ -283,7 +597,7 @@ PCLK - + Tunnel @@ -297,7 +611,7 @@ HSYNC - + Tunnel @@ -311,7 +625,7 @@ VSYNC - + Tunnel @@ -325,7 +639,7 @@ PR - + Tunnel @@ -339,7 +653,7 @@ PG - + Tunnel @@ -353,292 +667,230 @@ PB - - - - In - - - Description - Pixel clock - - - Label - PCLK - - - - - - Tunnel - - - NetName - PCLK - - - + - Add + Const - Bits - 10 + Value + 45 - - - - - Const - Bits 10 - - - - - In - - - Description - CPU clock - - Label - CLK + intFormat + dec - + - Tunnel + Sub - NetName - CLK + Bits + 10 - + Ground - + - BarrelShifter + Splitter - Bits - 10 + Input Splitting + 10 - direction - right + Output Splitting + 9,1 - + - Const + Tunnel - Bits - 4 + NetName + Y - + - BarrelShifter + Splitter - Bits - 10 + Input Splitting + 10 - direction - right + Output Splitting + 9,1 - + - Const + Tunnel - Bits - 4 + NetName + X - + - Splitter + Text - Input Splitting - 10 - - - Output Splitting - 2,8 + Description + Div 2 - + - Splitter + Text - Input Splitting - 10 - - - Output Splitting - 1,9 + Description + Div 2 - + - Out + RAMDualPort - Description - Index of next scanline + AddrBits + 9 Label - SCANLINE + SCAN BUFFER Bits - 9 + 4 - + - Register + Tunnel - Label - VWORD + rotation + - Bits - 16 + NetName + X - + - Const + Ground - - Value - 16927 - Bits - 16 - - - intFormat - hex + 4 - + - VDD - - - rotation - - - - + Ground + + - Tunnel - - - rotation - - - - NetName - CLK - - - + Ground + + + + + Ground + + Splitter + + mirror + true + Input Splitting - 16 + 4 Output Splitting - 4*4 + 1*4 - + - Multiplexer + atk16_ppu_palette.dig + + + + + Splitter - Selector Bits - 2 + Input Splitting + 1,1 - Bits - 4 + Output Splitting + 2 - + Splitter Input Splitting - 4 + 1,1 Output Splitting - 1*4 + 2 - + - Tunnel + Splitter - NetName - PG + Input Splitting + 1,1 - - - - - Tunnel - - NetName - PB + Output Splitting + 2 - + Tunnel @@ -648,60 +900,27 @@ PR - - - - Add - - - Bits - 2 - - - - - - Ground - - - - - Splitter - - - Input Splitting - 10 - - - Output Splitting - 2,8 - - - + Tunnel NetName - SCAN_L2 + PG - + Tunnel - - rotation - - NetName - SCAN_L2 + PB - + @@ -726,69 +945,93 @@ - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + @@ -810,60 +1053,56 @@ - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -873,13 +1112,17 @@ + + + + - - + + @@ -889,89 +1132,101 @@ + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -981,6 +1236,14 @@ + + + + + + + + @@ -990,88 +1253,100 @@ - - + + + + + + + + + + - + - - + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/digital/atk16_ppu_palette.dig b/digital/atk16_ppu_palette.dig new file mode 100644 index 0000000..40101b7 --- /dev/null +++ b/digital/atk16_ppu_palette.dig @@ -0,0 +1,225 @@ + + + 2 + + + romContent + + + + + + Width + 6 + + + + + Out + + + Label + YR1 + + + Inputs + 1 + + + + + + Out + + + Label + YR0 + + + Inputs + 1 + + + + + + Out + + + Label + YG1 + + + Inputs + 1 + + + + + + Out + + + Label + YG0 + + + Inputs + 1 + + + + + + Out + + + Label + YB1 + + + Inputs + 1 + + + + + + Out + + + Label + YB0 + + + Inputs + 1 + + + + + + In + + + rotation + + + + Label + R0 + + + + + + In + + + rotation + + + + Label + G1 + + + + + + In + + + rotation + + + + Label + G0 + + + + + + In + + + rotation + + + + Label + B0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.3