aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnavailableDev <ggwildplay@gmail.com>2023-04-03 10:09:40 +0200
committerUnavailableDev <ggwildplay@gmail.com>2023-04-03 10:09:40 +0200
commit05504df10934cac60b774fb10e86593ec3897510 (patch)
tree89a418bb7477904f394e460d5e661c3047117030
parent54c3e1139e3e0e328f7ce3e8a2a61b0bf530a772 (diff)
parent0a014f39c375c0cf28de70ebaab6cb0a5266f3c2 (diff)
Merge branch 'dev' of https://github.com/UnavailableDev/avans-arcade into dev
-rw-r--r--.editorconfig4
-rw-r--r--.vscode/tasks.json2
-rw-r--r--assets/ppu-level-1.svg2
-rw-r--r--assets/ppu-level-2.svg2
-rw-r--r--basys3/basys3.srcs/io.xdc12
-rw-r--r--basys3/basys3.srcs/ppu.vhd10
-rw-r--r--basys3/basys3.srcs/spi.vhd71
-rw-r--r--basys3/basys3.srcs/top.vhd164
-rw-r--r--basys3/basys3.xpr22
-rw-r--r--docs/architecture.md190
-rw-r--r--docs/hardware/.gitignore1
-rw-r--r--docs/hardware/hardware.kicad_pcb2
-rw-r--r--docs/hardware/hardware.kicad_prl77
-rw-r--r--docs/hardware/hardware.kicad_pro332
-rw-r--r--docs/hardware/hardware.kicad_sch2050
-rw-r--r--docs/ppu.drawio2
-rw-r--r--features.md73
-rw-r--r--pinout.md33
-rw-r--r--src/.gitignore3
-rw-r--r--src/demo.c215
-rw-r--r--src/engine/TODO/combat.h (renamed from src/stm32/TODO/hh_combat.h)0
-rw-r--r--src/engine/bullet.c65
-rw-r--r--src/engine/bullet.h17
-rw-r--r--src/engine/camera.c38
-rw-r--r--src/engine/camera.h6
-rw-r--r--src/engine/draw_screen.c129
-rw-r--r--src/engine/draw_screen.h34
-rw-r--r--src/engine/engine.c4
-rw-r--r--src/engine/entity.c127
-rw-r--r--src/engine/entity.h82
-rw-r--r--src/engine/level.h5
-rw-r--r--src/engine/level_const.c37
-rw-r--r--src/engine/level_const.h31
-rw-r--r--src/engine/maths.c19
-rw-r--r--src/engine/maths.h22
-rw-r--r--src/engine/player_controller.c252
-rw-r--r--src/engine/player_controller.h7
-rw-r--r--src/engine/sprite_controller.c24
-rw-r--r--src/engine/sprite_controller.h118
-rw-r--r--src/engine/title_screen.c93
-rw-r--r--src/engine/title_screen.h3
-rw-r--r--src/entity.h1
-rw-r--r--src/game_loop/game_over.c28
-rw-r--r--src/game_loop/game_over.h18
-rw-r--r--src/game_loop/gameplay.c47
-rw-r--r--src/game_loop/gameplay.h17
-rw-r--r--src/game_loop/shop.c30
-rw-r--r--src/game_loop/shop.h18
-rw-r--r--src/game_loop/starting_screen.c32
-rw-r--r--src/game_loop/starting_screen.h14
-rw-r--r--src/input.h1
-rw-r--r--src/makefile16
-rw-r--r--src/ppusim/input.c2
-rw-r--r--src/ppusim/sim.c30
-rw-r--r--src/ppusim/sim.h3
-rw-r--r--src/static/background/shop.hex331
-rw-r--r--src/static/background/shop_ext.hex459
-rw-r--r--src/static/background/tilemap.hex514
-rw-r--r--src/static/background/title_screen_icon.hex102
-rw-r--r--src/static/foreground/slime.hex24
-rw-r--r--src/static/foreground/title_screen_letteres_large.hex230
-rw-r--r--src/stm32/TODO/hh_draw_screen.h1
-rw-r--r--src/stm32/TODO/hh_entity.c41
-rw-r--r--src/stm32/TODO/hh_entity.h24
-rw-r--r--src/stm32/TODO/hh_level.h1
-rw-r--r--src/stm32/TODO/hh_rand.h1
-rw-r--r--src/stm32/TODO/maths.c10
-rw-r--r--src/stm32/TODO/maths.h16
-rw-r--r--src/stm32/TODO/player_controller.h4
-rw-r--r--src/stm32/TODO/sprite_controller.h6
-rw-r--r--src/stm32/main.c3
-rw-r--r--style.md1
-rw-r--r--test/bin/exportingPalettes.md4
-rw-r--r--test/bin/test_file_read.c46
74 files changed, 5941 insertions, 514 deletions
diff --git a/.editorconfig b/.editorconfig
index fece754..1f4a360 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -2,10 +2,10 @@ root = true
[*]
indent_style = tab
-indent_size = 2
+indent_size = 3
end_of_line = lf
insert_final_newline = true
[*.md]
indent_style = space
-indent_size = 2
+indent_size = 3
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 53a235e..8404cfa 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -54,7 +54,7 @@
"args": [ "" ],
},
"command": "make",
- "args": [ "compile_commands" ],
+ "args": [ "compile_commands.json" ],
"type": "shell"
},
{
diff --git a/assets/ppu-level-1.svg b/assets/ppu-level-1.svg
index e0d1949..6b3a2ab 100644
--- a/assets/ppu-level-1.svg
+++ b/assets/ppu-level-1.svg
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="499px" height="212px" viewBox="-0.5 -0.5 499 212" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="177" y="47" width="160" height="130" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 262px; height: 1px; padding-top: 182px; margin-left: 126px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Basys3 FPGA<br />PPU</div></div></div></foreignObject><text x="257" y="194" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Basys3 FPGA...</text></switch></g><rect x="417" y="47" width="80" height="130" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 182px; height: 1px; padding-top: 182px; margin-left: 366px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Display output<br />(VGA)</div></div></div></foreignObject><text x="457" y="194" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Display output...</text></switch></g><path d="M 137 61.97 L 167 61.97 L 170.63 61.97" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 175.88 61.97 L 168.88 65.47 L 170.63 61.97 L 168.88 58.47 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 137 121.97 L 147 121.97 L 170.63 121.97" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 175.88 121.97 L 168.88 125.47 L 170.63 121.97 L 168.88 118.47 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="56.97" y="47" width="80.03" height="130" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 182px; height: 1px; padding-top: 182px; margin-left: 6px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">STM32F091RC<br />CPU</div></div></div></foreignObject><text x="97" y="194" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">STM32F091RC...</text></switch></g><path d="M 137.5 164.03 L 137.5 160.03 L 157 160.03 L 169.5 160.03 L 169.5 156.53 L 176.5 162.03 L 169.5 167.53 L 169.5 164.03 L 157 164.03 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 169.5 160.03 L 169.5 156.53 L 176.5 162.03 L 169.5 167.53 L 169.5 164.03" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 337 112 L 413.63 112" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 112 L 412.88 113.5 L 413.63 112 L 412.88 110.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 337 62 L 357 61.97 L 357 37 L 37 37 L 37 61.97 L 50.6 61.99" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 55.85 62 L 48.85 65.49 L 50.6 61.99 L 48.86 58.49 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 337 121.97 L 397 121.97 L 413.63 121.97" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 121.97 L 412.88 123.47 L 413.63 121.97 L 412.88 120.47 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 337 72 L 367 71.97 L 367 27 L 27 27 L 27 71.97 L 50.6 71.99" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 55.85 72 L 48.85 75.49 L 50.6 71.99 L 48.86 68.49 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 51px; height: 1px; padding-top: 62px; margin-left: 179px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">RESET</div></div></div></foreignObject><text x="179" y="66" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">RESET</text></switch></g><path d="M 337 151.97 L 357 151.97 L 413.63 151.97" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 151.97 L 412.88 153.47 L 413.63 151.97 L 412.88 150.47 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 101px; height: 1px; padding-top: 142px; margin-left: 179px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VRAM-ADDR</div></div></div></foreignObject><text x="179" y="146" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VRAM-ADDR</text></switch></g><path d="M 337 162.03 L 357 162.03 L 413.63 162.03" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 162.03 L 412.88 163.53 L 413.63 162.03 L 412.88 160.53 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 101px; height: 1px; padding-top: 162px; margin-left: 179px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VRAM-DATA</div></div></div></foreignObject><text x="179" y="166" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VRAM-DATA</text></switch></g><path d="M 337 141.97 L 357 141.97 L 413.63 141.97" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 141.97 L 412.88 143.47 L 413.63 141.97 L 412.88 140.47 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 137.5 143.97 L 137.5 139.97 L 157 139.97 L 169.5 139.97 L 169.5 136.47 L 176.5 141.97 L 169.5 147.47 L 169.5 143.97 L 157 143.97 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 169.5 139.97 L 169.5 136.47 L 176.5 141.97 L 169.5 147.47 L 169.5 143.97" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 101px; height: 1px; padding-top: 122px; margin-left: 179px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VRAM-WEN</div></div></div></foreignObject><text x="179" y="126" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VRAM-WEN</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 152px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">G</div></div></div></foreignObject><text x="336" y="156" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">G</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 162px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">B</div></div></div></foreignObject><text x="336" y="166" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">B</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 142px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">R</div></div></div></foreignObject><text x="336" y="146" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">R</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 112px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">NVSYNC</div></div></div></foreignObject><text x="336" y="116" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">NVSYNC</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 122px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">NHSYNC</div></div></div></foreignObject><text x="336" y="126" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">NHSYNC</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 62px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">TVSYNC</div></div></div></foreignObject><text x="336" y="66" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">TVSYNC</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 72px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">THSYNC</div></div></div></foreignObject><text x="336" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">THSYNC</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 82px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">TVBLANK</div></div></div></foreignObject><text x="336" y="86" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">TVBLANK</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 92px; margin-left: 334px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">THBLANK</div></div></div></foreignObject><text x="336" y="96" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">THBLANK</text></switch></g><rect x="56.97" y="97" width="0.03" height="10" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 2px; height: 1px; padding-top: 102px; margin-left: 59px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">HBLANK</div></div></div></foreignObject><text x="59" y="106" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">HBLANK</text></switch></g><rect x="56.97" y="87" width="0.03" height="10" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 2px; height: 1px; padding-top: 92px; margin-left: 59px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VBLANK</div></div></div></foreignObject><text x="59" y="96" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VBLANK</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 2px; height: 1px; padding-top: 62px; margin-left: 59px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">VSYNC</div></div></div></foreignObject><text x="59" y="66" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VSYNC</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 2px; height: 1px; padding-top: 72px; margin-left: 59px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">HSYNC</div></div></div></foreignObject><text x="59" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">HSYNC</text></switch></g><path d="M 337 81.97 L 377 81.97 L 377 17 L 17 17 L 17 91.97 L 50.6 91.99" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 55.85 92 L 48.85 95.49 L 50.6 91.99 L 48.86 88.49 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 337 91.97 L 387 91.97 L 387 7 L 7 7 L 7 101.97 L 50.6 102" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 55.85 102 L 48.85 105.49 L 50.6 102 L 48.85 98.49 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="498px" height="192px" viewBox="-0.5 -0.5 498 192" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="177" y="47" width="160" height="110" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 262px; height: 1px; padding-top: 162px; margin-left: 126px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Basys3 FPGA<br />PPU</div></div></div></foreignObject><text x="257" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Basys3 FPGA...</text></switch></g><rect x="417" y="47" width="80" height="110" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 182px; height: 1px; padding-top: 162px; margin-left: 366px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Display output<br />(VGA)</div></div></div></foreignObject><text x="457" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Display output...</text></switch></g><path d="M 137 102 L 147 102 L 170.63 102" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 175.88 102 L 168.88 105.5 L 170.63 102 L 168.88 98.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="56.97" y="47" width="80.03" height="110" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 182px; height: 1px; padding-top: 162px; margin-left: 6px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">STM32F091RC<br />CPU</div></div></div></foreignObject><text x="97" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">STM32F091RC...</text></switch></g><path d="M 137.5 144 L 137.5 140 L 157 140 L 169.5 140 L 169.5 136.5 L 176.5 142 L 169.5 147.5 L 169.5 144 L 157 144 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 169.5 140 L 169.5 136.5 L 176.5 142 L 169.5 147.5 L 169.5 144" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 337 92 L 387 92 L 413.63 92" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 92 L 412.88 93.5 L 413.63 92 L 412.88 90.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 337 102 L 397 102 L 413.63 102" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 102 L 412.88 103.5 L 413.63 102 L 412.88 100.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 337 132 L 357 132 L 413.63 132" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 132 L 412.88 133.5 L 413.63 132 L 412.88 130.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 100px; height: 1px; padding-top: 122px; margin-left: 179px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VRAM-ADDR</div></div></div></foreignObject><text x="179" y="126" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VRAM-ADDR</text></switch></g><path d="M 337 142 L 357 142 L 413.63 142" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 142 L 412.88 143.5 L 413.63 142 L 412.88 140.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 100px; height: 1px; padding-top: 142px; margin-left: 179px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VRAM-DATA</div></div></div></foreignObject><text x="179" y="146" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VRAM-DATA</text></switch></g><path d="M 337 122 L 357 122 L 413.63 122" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 415.88 122 L 412.88 123.5 L 413.63 122 L 412.88 120.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 137.5 124 L 137.5 120 L 157 120 L 169.5 120 L 169.5 116.5 L 176.5 122 L 169.5 127.5 L 169.5 124 L 157 124 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 169.5 120 L 169.5 116.5 L 176.5 122 L 169.5 127.5 L 169.5 124" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 100px; height: 1px; padding-top: 102px; margin-left: 179px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VRAM-WEN</div></div></div></foreignObject><text x="179" y="106" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VRAM-WEN</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 132px; margin-left: 333px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">G</div></div></div></foreignObject><text x="335" y="136" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">G</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 142px; margin-left: 333px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">B</div></div></div></foreignObject><text x="335" y="146" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">B</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 122px; margin-left: 333px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">R</div></div></div></foreignObject><text x="335" y="126" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">R</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 92px; margin-left: 333px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">NVSYNC</div></div></div></foreignObject><text x="335" y="96" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">NVSYNC</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 102px; margin-left: 333px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">NHSYNC</div></div></div></foreignObject><text x="335" y="106" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">NHSYNC</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 62px; margin-left: 333px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">TVBLANK</div></div></div></foreignObject><text x="335" y="66" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">TVBLANK</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 2px; height: 1px; padding-top: 72px; margin-left: 333px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">THBLANK</div></div></div></foreignObject><text x="335" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">THBLANK</text></switch></g><rect x="57.03" y="67" width="0.03" height="10" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 2px; height: 1px; padding-top: 72px; margin-left: 59px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">HBLANK</div></div></div></foreignObject><text x="59" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">HBLANK</text></switch></g><rect x="57" y="57" width="0.03" height="10" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 2px; height: 1px; padding-top: 62px; margin-left: 59px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VBLANK</div></div></div></foreignObject><text x="59" y="66" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">VBLANK</text></switch></g><path d="M 337 62 L 377 62 L 377 17 L 17 17 L 17 62 L 50.63 62" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 55.88 62 L 48.88 65.5 L 50.63 62 L 48.88 58.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 337 72 L 387 72 L 387 7 L 7 7 L 7 72 L 50.66 72" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 55.91 72 L 48.91 75.5 L 50.66 72 L 48.91 68.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
diff --git a/assets/ppu-level-2.svg b/assets/ppu-level-2.svg
index a7f343f..303e95a 100644
--- a/assets/ppu-level-2.svg
+++ b/assets/ppu-level-2.svg
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="632px" height="596px" viewBox="-0.5 -0.5 632 596" style="background-color: rgb(255, 255, 255);"><defs/><g><path d="M 0 117 L 630 117" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.5" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 114px; margin-left: 628px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pipeline stage 1-2</div></div></div></foreignObject><text x="628" y="114" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="end">pipeline s...</text></switch></g><path d="M 0 357 L 630 357" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.5" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 354px; margin-left: 628px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pipeline stage 5</div></div></div></foreignObject><text x="628" y="354" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="end">pipeline s...</text></switch></g><path d="M 0 207 L 630 207" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.5" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 204px; margin-left: 628px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pipeline stage 3-4</div></div></div></foreignObject><text x="628" y="204" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="end">pipeline s...</text></switch></g><path d="M 280 107 L 280 140.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 145.88 L 276.5 138.88 L 280 140.63 L 283.5 138.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 136px; margin-left: 280px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">sprite info</div></div></div></foreignObject><text x="280" y="136" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">sprite info</text></switch></g><path d="M 339.5 172 L 339.5 182.5 L 320.5 167 L 339.5 151.5 L 339.5 162 L 350 162 L 399.5 162 L 399.5 172 L 350 172 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 172 L 339.5 182.5 L 320.5 167 L 339.5 151.5 L 339.5 162" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 167px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">TMM</div></div></div></foreignObject><text x="360" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">TMM</text></switch></g><rect x="240" y="27" width="80" height="80" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 67px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Background sprite info</div></div></div></foreignObject><text x="280" y="71" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Background sp...</text></switch></g><path d="M 190 67 L 190 140.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 190 145.88 L 186.5 138.88 L 190 140.63 L 193.5 138.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 136px; margin-left: 190px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">sprite info</div></div></div></foreignObject><text x="190" y="136" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">sprite info</text></switch></g><path d="M 70.5 172 L 70.5 162 L 110 162 L 130.5 162 L 130.5 151.5 L 149.5 167 L 130.5 182.5 L 130.5 172 L 110 172 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" stroke-dasharray="3 3" pointer-events="all"/><path d="M 130.5 162 L 130.5 151.5 L 149.5 167 L 130.5 182.5 L 130.5 172" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" stroke-dasharray="3 3" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 167px; margin-left: 110px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">TMM</div></div></div></foreignObject><text x="110" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">TMM</text></switch></g><rect x="150" y="27" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 47px; margin-left: 151px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Foreground sprite info</div></div></div></foreignObject><text x="190" y="51" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Foreground sp...</text></switch></g><path d="M 280 267 L 280 300.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 305.88 L 276.5 298.88 L 280 300.63 L 283.5 298.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 287px; margin-left: 280px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">global palette index</div></div></div></foreignObject><text x="280" y="290" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">global palette index</text></switch></g><rect x="240" y="227" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 247px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Compositor</div></div></div></foreignObject><text x="280" y="251" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Compositor</text></switch></g><path d="M 260 447 L 260 467 L 20 467 L 20 7 L 190 7 L 190 20.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 190 25.88 L 186.5 18.88 L 190 20.63 L 193.5 18.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 260 447 L 260 467 L 20 467 L 20 7 L 280 7 L 280 20.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 25.88 L 276.5 18.88 L 280 20.63 L 283.5 18.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 300 447 L 300 487 L 300 490.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 300 495.88 L 296.5 488.88 L 300 490.63 L 303.5 488.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 472px; margin-left: 300px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">VGA signal</div></div></div></foreignObject><text x="300" y="475" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">VGA signal</text></switch></g><rect x="240" y="387" width="80" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 417px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">tiny VGA signal generator</div></div></div></foreignObject><text x="280" y="421" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">tiny VGA sign...</text></switch></g><path d="M 280 347 L 280 380.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 385.88 L 276.5 378.88 L 280 380.63 L 283.5 378.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 280 347 L 280 380.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 385.88 L 276.5 378.88 L 280 380.63 L 283.5 378.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 367px; margin-left: 280px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">rgb value</div></div></div></foreignObject><text x="280" y="370" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">rgb value</text></switch></g><path d="M 339.5 332 L 339.5 342.5 L 320.5 327 L 339.5 311.5 L 339.5 322 L 360 322 L 380.5 322 L 380.5 311.5 L 399.5 327 L 380.5 342.5 L 380.5 332 L 360 332 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 332 L 339.5 342.5 L 320.5 327 L 339.5 311.5 L 339.5 322" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 380.5 322 L 380.5 311.5 L 399.5 327 L 380.5 342.5 L 380.5 332" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 327px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">PAL</div></div></div></foreignObject><text x="360" y="330" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">PAL</text></switch></g><rect x="240" y="307" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 327px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Palette lookup</div></div></div></foreignObject><text x="280" y="331" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Palette lookup</text></switch></g><path d="M 280 187 L 280 220.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 225.88 L 276.5 218.88 L 280 220.63 L 283.5 218.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 399.5 42 L 399.5 52 L 340 52 L 339.5 52 L 339.5 62.5 L 320.5 47 L 339.5 31.5 L 339.5 42 L 340 42 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 52 L 339.5 62.5 L 320.5 47 L 339.5 31.5 L 339.5 42" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 47px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">BAM</div></div></div></foreignObject><text x="360" y="50" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">BAM</text></switch></g><path d="M 339.5 92 L 339.5 102.5 L 320.5 87 L 339.5 71.5 L 339.5 82 L 360 82 L 380.5 82 L 380.5 71.5 L 399.5 87 L 380.5 102.5 L 380.5 92 L 360 92 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 92 L 339.5 102.5 L 320.5 87 L 339.5 71.5 L 339.5 82" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 380.5 82 L 380.5 71.5 L 399.5 87 L 380.5 102.5 L 380.5 92" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 87px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">AUX</div></div></div></foreignObject><text x="360" y="90" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">AUX</text></switch></g><rect x="240" y="147" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 167px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Sprite render</div></div></div></foreignObject><text x="280" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Sprite render</text></switch></g><path d="M 220 187 L 220 197 L 280 197 L 280 220.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 225.88 L 276.5 218.88 L 280 220.63 L 283.5 218.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 197px; margin-left: 250px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pixel data</div></div></div></foreignObject><text x="250" y="200" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">pixel data</text></switch></g><path d="M 130.5 42 L 130.5 31.5 L 149.5 47 L 130.5 62.5 L 130.5 52 L 90 52 L 89.5 52 L 89.5 62.5 L 70.5 47 L 89.5 31.5 L 89.5 42 L 90 42 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 130.5 42 L 130.5 31.5 L 149.5 47 L 130.5 62.5 L 130.5 52" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 89.5 52 L 89.5 62.5 L 70.5 47 L 89.5 31.5 L 89.5 42" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 47px; margin-left: 110px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">FAM</div></div></div></foreignObject><text x="110" y="50" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">FAM</text></switch></g><rect x="150" y="147" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 167px; margin-left: 151px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Sprite render</div></div></div></foreignObject><text x="190" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Sprite render</text></switch></g><path d="M 490.5 162 L 490.5 151.5 L 509.5 167 L 490.5 182.5 L 490.5 172 L 490 172 L 430.5 172 L 430.5 162 L 490 162 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 490.5 162 L 490.5 151.5 L 509.5 167 L 490.5 182.5 L 490.5 172" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 167px; margin-left: 470px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">TMM</div></div></div></foreignObject><text x="470" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">TMM</text></switch></g><rect x="510" y="147" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 167px; margin-left: 511px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Tilemap memory</div></div></div></foreignObject><text x="570" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Tilemap memory</text></switch></g><path d="M 430.5 52 L 430.5 42 L 460 42 L 490.5 42 L 490.5 31.5 L 509.5 47 L 490.5 62.5 L 490.5 52 L 460 52 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 490.5 42 L 490.5 31.5 L 509.5 47 L 490.5 62.5 L 490.5 52" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 47px; margin-left: 470px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">BAM</div></div></div></foreignObject><text x="470" y="50" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">BAM</text></switch></g><rect x="510" y="27" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 47px; margin-left: 511px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Background attribute memory</div></div></div></foreignObject><text x="570" y="51" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Background attribute...</text></switch></g><rect x="160" y="457" width="100" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 467px; margin-left: 161px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: normal; overflow-wrap: normal;">screen position</div></div></div></foreignObject><text x="210" y="471" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">screen position</text></switch></g><rect x="400" y="27" width="30" height="320" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" transform="rotate(180,415,187)" pointer-events="all"/><g transform="translate(-0.5 -0.5)rotate(-90 407 37)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 310px; height: 1px; padding-top: 37px; margin-left: 97px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">PPU RAM bus</div></div></div></foreignObject><text x="407" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">PPU RAM bus</text></switch></g><rect x="40" y="27" width="30" height="160" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" transform="rotate(180,55,107)" pointer-events="all"/><g transform="translate(-0.5 -0.5)rotate(-90 47 37)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 150px; height: 1px; padding-top: 37px; margin-left: -103px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">PPU RAM bus</div></div></div></foreignObject><text x="47" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">PPU RAM bus</text></switch></g><rect x="240" y="497" width="80" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 522px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">native VGA signal generator</div></div></div></foreignObject><text x="280" y="526" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">native VGA si...</text></switch></g><path d="M 280 547 L 280 577 L 280 580.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 585.88 L 276.5 578.88 L 280 580.63 L 283.5 578.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 567px; margin-left: 280px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">VGA signal</div></div></div></foreignObject><text x="280" y="570" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">VGA signal</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="632px" height="476px" viewBox="-0.5 -0.5 632 476" style="background-color: rgb(255, 255, 255);"><defs/><g><path d="M 0 117 L 630 117" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.5" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 114px; margin-left: 628px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pipeline stage 1-2</div></div></div></foreignObject><text x="628" y="114" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="end">pipeline s...</text></switch></g><path d="M 0 357 L 630 357" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.5" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 354px; margin-left: 628px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pipeline stage 5</div></div></div></foreignObject><text x="628" y="354" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="end">pipeline s...</text></switch></g><path d="M 0 207 L 630 207" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.5" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 204px; margin-left: 628px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pipeline stage 3-4</div></div></div></foreignObject><text x="628" y="204" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="end">pipeline s...</text></switch></g><path d="M 280 107 L 280 140.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 145.88 L 276.5 138.88 L 280 140.63 L 283.5 138.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 136px; margin-left: 280px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">sprite info</div></div></div></foreignObject><text x="280" y="136" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">sprite info</text></switch></g><path d="M 339.5 172 L 339.5 182.5 L 320.5 167 L 339.5 151.5 L 339.5 162 L 350.03 162 L 399.5 162 L 399.5 172 L 350.03 172 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 172 L 339.5 182.5 L 320.5 167 L 339.5 151.5 L 339.5 162" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 167px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">TMM</div></div></div></foreignObject><text x="360" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">TMM</text></switch></g><rect x="240" y="27" width="80" height="80" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 67px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Background sprite info</div></div></div></foreignObject><text x="280" y="71" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Background sp...</text></switch></g><path d="M 190 67 L 190 140.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 190 145.88 L 186.5 138.88 L 190 140.63 L 193.5 138.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 136px; margin-left: 190px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">sprite info</div></div></div></foreignObject><text x="190" y="136" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">sprite info</text></switch></g><path d="M 70.5 172 L 70.5 162 L 110.03 162 L 130.5 162 L 130.5 151.5 L 149.5 167 L 130.5 182.5 L 130.5 172 L 110.03 172 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" stroke-dasharray="3 3" pointer-events="all"/><path d="M 130.5 162 L 130.5 151.5 L 149.5 167 L 130.5 182.5 L 130.5 172" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" stroke-dasharray="3 3" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 167px; margin-left: 110px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">TMM</div></div></div></foreignObject><text x="110" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">TMM</text></switch></g><rect x="150" y="27" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 47px; margin-left: 151px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Foreground sprite info</div></div></div></foreignObject><text x="190" y="51" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Foreground sp...</text></switch></g><path d="M 280 267 L 280 300.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 305.88 L 276.5 298.88 L 280 300.63 L 283.5 298.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 287px; margin-left: 280px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">global palette index</div></div></div></foreignObject><text x="280" y="290" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">global palette index</text></switch></g><rect x="240" y="227" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 247px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Compositor</div></div></div></foreignObject><text x="280" y="251" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Compositor</text></switch></g><path d="M 260 427 L 260.03 447 L 20.03 447 L 20.03 7 L 190.03 7 L 190.03 20.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 190.03 25.88 L 186.53 18.88 L 190.03 20.63 L 193.53 18.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 260 427 L 260.03 447 L 20.03 447 L 20.03 7 L 280.03 7 L 280.03 20.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280.03 25.88 L 276.53 18.88 L 280.03 20.63 L 283.53 18.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 280 347 L 280 380.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 385.88 L 276.5 378.88 L 280 380.63 L 283.5 378.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 280 347 L 280 380.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 385.88 L 276.5 378.88 L 280 380.63 L 283.5 378.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 367px; margin-left: 280px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">rgb value</div></div></div></foreignObject><text x="280" y="370" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">rgb value</text></switch></g><path d="M 339.5 332 L 339.5 342.5 L 320.5 327 L 339.5 311.5 L 339.5 322 L 360.03 322 L 380.5 322 L 380.5 311.5 L 399.5 327 L 380.5 342.5 L 380.5 332 L 360.03 332 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 332 L 339.5 342.5 L 320.5 327 L 339.5 311.5 L 339.5 322" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 380.5 322 L 380.5 311.5 L 399.5 327 L 380.5 342.5 L 380.5 332" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 327px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">PAL</div></div></div></foreignObject><text x="360" y="330" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">PAL</text></switch></g><rect x="240" y="307" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 327px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Palette lookup</div></div></div></foreignObject><text x="280" y="331" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Palette lookup</text></switch></g><path d="M 280 187 L 280 220.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 225.88 L 276.5 218.88 L 280 220.63 L 283.5 218.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 399.5 42 L 399.5 52 L 340.03 52 L 339.5 52 L 339.5 62.5 L 320.5 47 L 339.5 31.5 L 339.5 42 L 340.03 42 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 52 L 339.5 62.5 L 320.5 47 L 339.5 31.5 L 339.5 42" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 47px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">BAM</div></div></div></foreignObject><text x="360" y="50" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">BAM</text></switch></g><path d="M 339.5 92 L 339.5 102.5 L 320.5 87 L 339.5 71.5 L 339.5 82 L 360.03 82 L 380.5 82 L 380.5 71.5 L 399.5 87 L 380.5 102.5 L 380.5 92 L 360.03 92 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 339.5 92 L 339.5 102.5 L 320.5 87 L 339.5 71.5 L 339.5 82" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 380.5 82 L 380.5 71.5 L 399.5 87 L 380.5 102.5 L 380.5 92" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 87px; margin-left: 360px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">AUX</div></div></div></foreignObject><text x="360" y="90" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">AUX</text></switch></g><rect x="240" y="147" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 167px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Sprite render</div></div></div></foreignObject><text x="280" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Sprite render</text></switch></g><path d="M 220.03 187 L 220.03 197 L 280.03 197 L 280.03 220.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280.03 225.88 L 276.53 218.88 L 280.03 220.63 L 283.53 218.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 197px; margin-left: 250px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">pixel data</div></div></div></foreignObject><text x="250" y="200" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">pixel data</text></switch></g><path d="M 130.5 42 L 130.5 31.5 L 149.5 47 L 130.5 62.5 L 130.5 52 L 90.03 52 L 89.5 52 L 89.5 62.5 L 70.5 47 L 89.5 31.5 L 89.5 42 L 90.03 42 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 130.5 42 L 130.5 31.5 L 149.5 47 L 130.5 62.5 L 130.5 52" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><path d="M 89.5 52 L 89.5 62.5 L 70.5 47 L 89.5 31.5 L 89.5 42" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 47px; margin-left: 110px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">FAM</div></div></div></foreignObject><text x="110" y="50" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">FAM</text></switch></g><rect x="150" y="147" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 167px; margin-left: 151px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Sprite render</div></div></div></foreignObject><text x="190" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Sprite render</text></switch></g><path d="M 490.5 162 L 490.5 151.5 L 509.5 167 L 490.5 182.5 L 490.5 172 L 490.03 172 L 430.5 172 L 430.5 162 L 490.03 162 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 490.5 162 L 490.5 151.5 L 509.5 167 L 490.5 182.5 L 490.5 172" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 167px; margin-left: 470px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">TMM</div></div></div></foreignObject><text x="470" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">TMM</text></switch></g><rect x="510" y="147" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 167px; margin-left: 511px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Tilemap memory</div></div></div></foreignObject><text x="570" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Tilemap memory</text></switch></g><path d="M 430.5 52 L 430.5 42 L 460.03 42 L 490.5 42 L 490.5 31.5 L 509.5 47 L 490.5 62.5 L 490.5 52 L 460.03 52 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="1.42" pointer-events="all"/><path d="M 490.5 42 L 490.5 31.5 L 509.5 47 L 490.5 62.5 L 490.5 52" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="4" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 47px; margin-left: 470px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">BAM</div></div></div></foreignObject><text x="470" y="50" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">BAM</text></switch></g><rect x="510" y="27" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 47px; margin-left: 511px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Background attribute memory</div></div></div></foreignObject><text x="570" y="51" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Background attribute...</text></switch></g><rect x="90" y="437" width="100" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 447px; margin-left: 91px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: normal; overflow-wrap: normal;">screen position</div></div></div></foreignObject><text x="140" y="451" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">screen position</text></switch></g><rect x="400" y="27" width="30" height="320" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" transform="rotate(180,415,187)" pointer-events="all"/><g transform="translate(-0.5 -0.5)rotate(-90 407 37)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 310px; height: 1px; padding-top: 37px; margin-left: 97px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">PPU RAM bus</div></div></div></foreignObject><text x="407" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">PPU RAM bus</text></switch></g><rect x="40" y="27" width="30" height="160" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" transform="rotate(180,55,107)" pointer-events="all"/><g transform="translate(-0.5 -0.5)rotate(-90 47.000000000000114 37)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 150px; height: 1px; padding-top: 37px; margin-left: -103px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">PPU RAM bus</div></div></div></foreignObject><text x="47" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">PPU RAM bus</text></switch></g><rect x="240" y="387" width="80" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 407px; margin-left: 241px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Display controller</div></div></div></foreignObject><text x="280" y="411" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Display contr...</text></switch></g><path d="M 300 427 L 300 460.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 300 465.88 L 296.5 458.88 L 300 460.63 L 303.5 458.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 447px; margin-left: 300px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">VGA signal</div></div></div></foreignObject><text x="300" y="450" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">VGA signal</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
diff --git a/basys3/basys3.srcs/io.xdc b/basys3/basys3.srcs/io.xdc
index f254cdd..fa1dbd0 100644
--- a/basys3/basys3.srcs/io.xdc
+++ b/basys3/basys3.srcs/io.xdc
@@ -1,6 +1,6 @@
-set_property PACKAGE_PIN A15 [get_ports clkSPI]
-set_property PACKAGE_PIN C15 [get_ports csSPI]
-set_property PACKAGE_PIN A17 [get_ports dataSPI]
-set_property IOSTANDARD LVCMOS33 [get_ports dataSPI]
-set_property IOSTANDARD LVCMOS33 [get_ports csSPI]
-set_property IOSTANDARD LVCMOS33 [get_ports clkSPI] \ No newline at end of file
+set_property PACKAGE_PIN A15 [get_ports SPI_CLK]
+set_property PACKAGE_PIN C15 [get_ports SPI_CS]
+set_property PACKAGE_PIN A17 [get_ports SPI_MOSI]
+set_property IOSTANDARD LVCMOS33 [get_ports SPI_MOSI]
+set_property IOSTANDARD LVCMOS33 [get_ports SPI_CS]
+set_property IOSTANDARD LVCMOS33 [get_ports SPI_CLK]
diff --git a/basys3/basys3.srcs/ppu.vhd b/basys3/basys3.srcs/ppu.vhd
index 9cf1bc0..d6407df 100644
--- a/basys3/basys3.srcs/ppu.vhd
+++ b/basys3/basys3.srcs/ppu.vhd
@@ -14,7 +14,7 @@ entity ppu is port(
DATA : in std_logic_vector(PPU_RAM_BUS_DATA_WIDTH-1 downto 0);
R,G,B : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0);
NVSYNC, NHSYNC : out std_logic; -- native VGA out
- TVSYNC, TVBLANK, THSYNC, THBLANK : out std_logic); -- tiny VGA out
+ TVBLANK, THBLANK : out std_logic); -- tiny VGA out
end ppu;
architecture Behavioral of ppu is
@@ -189,7 +189,7 @@ architecture Behavioral of ppu is
signal BG_SHIFT_X : std_logic_vector(PPU_POS_H_WIDTH-1 downto 0);
signal BG_SHIFT_Y : std_logic_vector(PPU_POS_V_WIDTH-1 downto 0);
signal FG_FETCH : std_logic;
- signal TINY_VBLANK, TINY_VSYNC, TINY_HBLANK, TINY_HSYNC,
+ signal TINY_VBLANK, TINY_HBLANK,
NATIVE_VSYNC, NATIVE_HSYNC : std_logic;
begin
SYSCLK <= CLK100;
@@ -205,9 +205,7 @@ begin
PAL_AI <= (others => '0');
TVBLANK <= TINY_VBLANK;
- TVSYNC <= TINY_VSYNC;
THBLANK <= TINY_HBLANK;
- THSYNC <= TINY_HSYNC;
NVSYNC <= NATIVE_VSYNC;
NHSYNC <= NATIVE_HSYNC;
@@ -334,9 +332,9 @@ begin
RESET => SYSRST,
X => X,
Y => Y,
- VSYNC => TINY_VSYNC,
+ VSYNC => open,
VBLANK => TINY_VBLANK,
- HSYNC => TINY_HSYNC,
+ HSYNC => open,
HBLANK => TINY_HBLANK);
native_vga_signal_generator : component ppu_vga_native port map( -- native vga signal generator (upscaler)
diff --git a/basys3/basys3.srcs/spi.vhd b/basys3/basys3.srcs/spi.vhd
new file mode 100644
index 0000000..cdf7d4a
--- /dev/null
+++ b/basys3/basys3.srcs/spi.vhd
@@ -0,0 +1,71 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+use ieee.std_logic_unsigned.all;
+use work.ppu_consts.all;
+
+entity spi is port (
+ SYSCLK : in std_logic; -- clock basys3 100MHz
+ SPI_CLK : in std_logic; -- incoming clock of SPI
+ SPI_MOSI : in std_logic; -- incoming data of SPI
+ SPI_CS : in std_logic; -- incoming select of SPI
+ DATA : out std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0)); -- data read
+end spi;
+
+architecture Behavioral of spi is
+ signal PulseFF0,PulseFF1,PulseFF2,PulseFF3 : std_logic := '0'; -- signal for metastability synchronizer of clk SPI
+ signal dataFF0,dataFF1,dataFF2,dataFF3 : std_logic := '0'; -- signal for metastability synchronizer of data SPI
+ signal ssFF0,ssFF1,ssFF2,ssFF3 : std_logic := '0'; -- signal for metastability synchronizer of slave select SPI
+
+ signal SPI_REG : std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0) := (others => '0'); -- signal to store incomming data of dataSPI (2x 8bit)
+ signal counter : integer := 23; -- counter for data position
+ signal enable : std_logic := '0'; -- enable signal if slave is selected
+begin
+
+ process (SYSCLK)
+ begin
+ if rising_edge(SYSCLK) then
+ -- flip flop for clk SPI to synchronise a
+ PulseFF0 <= SPI_CLK;
+ PulseFF1 <= PulseFF0;
+ PulseFF2 <= PulseFF1;
+ PulseFF3 <= PulseFF2;
+ -- flip flop for data SPI to synchronise
+ dataFF0 <= SPI_MOSI;
+ dataFF1 <= dataFF0;
+ dataFF2 <= dataFF1;
+ dataFF3 <= dataFF2;
+ -- flip flop for slave select SPI to synchronise
+ ssFF0 <= SPI_CS;
+ ssFF1 <= ssFF0;
+ ssFF2 <= ssFF1;
+ ssFF3 <= ssFF2;
+ -- check if slave select signal has falling edge (slave is selected by master)
+ if(ssFF3 = '1' and ssFF2 = '0') then
+ -- reset counter if true
+ counter <= 23;
+ -- disable data read if rising edge (slave is not selected)
+ elsif (ssFF3 = '0' and ssFF2 = '1') then
+ enable <= '0';
+ end if;
+ -- check if synchronised slave select signal is falling edge or data read is enabled
+ if(ssFF3 = '1' and ssFF2 = '0') or enable = '1' then
+ enable <= '1'; -- enable data read
+ if (PulseFF3 = '0' and PulseFF2 = '1') then -- check for rising edge of clk SPI
+ if counter > -1 then
+ counter <= counter - 1;
+ -- data transfer into vector
+ SPI_REG(counter) <= dataFF3;
+ end if;
+ end if;
+ -- check if counter is done
+ if counter = -1 then
+ counter <= 23; -- reset counter
+ DATA <= SPI_REG;
+ end if;
+ elsif (enable = '0') then
+ -- DATA <= SPI_REG;
+ end if;
+ end if;
+ end process;
+end Behavioral;
diff --git a/basys3/basys3.srcs/top.vhd b/basys3/basys3.srcs/top.vhd
index 7cf3e63..558489b 100644
--- a/basys3/basys3.srcs/top.vhd
+++ b/basys3/basys3.srcs/top.vhd
@@ -1,105 +1,63 @@
-----------------------------------------------------------------------------------
--- Company:
--- Engineer:
---
--- Create Date: 15.02.2023 21:09:16
--- Design Name:
--- Module Name: top - Behavioral
--- Project Name:
--- Target Devices:
--- Tool Versions:
--- Description:
---
--- Dependencies:
---
--- Revision:
--- Revision 0.01 - File Created
--- Additional Comments:
---
-----------------------------------------------------------------------------------
-
-
-library IEEE;
-use IEEE.STD_LOGIC_1164.ALL;
-
--- Uncomment the following library declaration if using
--- arithmetic functions with Signed or Unsigned values
-use IEEE.NUMERIC_STD.ALL;
-use IEEE.STD_LOGIC_UNSIGNED.ALL;
--- Uncomment the following library declaration if instantiating
--- any Xilinx leaf cells in this code.
---library UNISIM;
---use UNISIM.VComponents.all;
-
-entity spiSlave is
- Port ( clkBoard : in std_logic; -- clock basys3 100MHz
- clkSPI : in std_logic; -- incoming clock of SPI
- dataSPI : in std_logic; -- incoming data of SPI
- csSPI : in std_logic; -- incoming select of SPI
- dataRead : out std_logic_vector(23 downto 0) := (others => '0') -- data read
-
- );
-end spiSlave;
-
-architecture Behavioral of spiSlave is
- signal PulseFF0,PulseFF1,PulseFF2,PulseFF3 : std_logic := '0'; -- signal for metastability synchronizer of clk SPI
- signal dataFF0,dataFF1,dataFF2,dataFF3 : std_logic := '0'; -- signal for metastability synchronizer of data SPI
- signal ssFF0,ssFF1,ssFF2,ssFF3 : std_logic := '0'; -- signal for metastability synchronizer of slave select SPI
-
- signal data : std_logic_vector(23 downto 0) := (others => '0'); -- signal to store incomming data of dataSPI (2x 8bit)
- signal counter : integer := 23; --counter for data position
- signal enable : std_logic := '0'; -- enable signal if slave is selected
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+use work.ppu_consts.all;
+
+entity top is port (
+ SYSCLK : in std_logic; -- clock basys3 100MHz
+ RESET : in std_logic; -- global (async) system reset
+ SPI_CLK : in std_logic; -- incoming clock of SPI
+ SPI_MOSI : in std_logic; -- incoming data of SPI
+ SPI_CS : in std_logic; -- incoming select of SPI
+ WEN : in std_logic; -- PPU VRAM write enable
+ R,G,B : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0);
+ NVSYNC, NHSYNC : out std_logic; -- native VGA out
+ TVBLANK, THBLANK : out std_logic); -- tiny VGA out
+end top;
+
+architecture Behavioral of top is
+ component ppu port(
+ CLK100 : in std_logic; -- system clock
+ RESET : in std_logic; -- global (async) system reset
+ EN : in std_logic; -- PPU VRAM enable (enable ADDR and DATA tri-state drivers)
+ WEN : in std_logic; -- PPU VRAM write enable
+ ADDR : in std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH-1 downto 0); -- PPU VRAM ADDR
+ DATA : in std_logic_vector(PPU_RAM_BUS_DATA_WIDTH-1 downto 0);
+ R,G,B : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0);
+ NVSYNC, NHSYNC : out std_logic; -- native VGA out
+ TVBLANK, THBLANK : out std_logic); -- tiny VGA out
+ end component;
+ component spi port (
+ SYSCLK : in std_logic; -- clock basys3 100MHz
+ SPI_CLK : in std_logic; -- incoming clock of SPI
+ SPI_MOSI : in std_logic; -- incoming data of SPI
+ SPI_CS : in std_logic; -- incoming select of SPI
+ DATA : out std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0)); -- data read
+ end component;
+
+ signal SPI_DATA : std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0);
+ alias SPI_DATA_ADDR is SPI_DATA(31 downto 16);
+ alias SPI_DATA_DATA is SPI_DATA(15 downto 0);
begin
-
- process (clkBoard)
- begin
-
- if rising_edge(clkBoard) then
- -- flip flop for clk SPI to synchronise a
- PulseFF0 <= clkSPI;
- PulseFF1 <= PulseFF0;
- PulseFF2 <= PulseFF1;
- PulseFF3 <= PulseFF2;
- -- flip flop for data SPI to synchronise
- dataFF0 <= dataSPI;
- dataFF1 <= dataFF0;
- dataFF2 <= dataFF1;
- dataFF3 <= dataFF2;
- -- flip flop for slave select SPI to synchronise
- ssFF0 <= csSPI;
- ssFF1 <= ssFF0;
- ssFF2 <= ssFF1;
- ssFF3 <= ssFF2;
- -- check if slave select signal has falling edge (slave is selected by master)
- if(ssFF3 = '1' and ssFF2 = '0') then
- --reset counter if true
- counter <= 23;
- --disable data read if rising edge (slave is not selected)
- elsif (ssFF3 = '0' and ssFF2 = '1') then
- enable <= '0';
- end if;
- --check if synchronised slave select signal is falling edge or data read is enabled
- if(ssFF3 = '1' and ssFF2 = '0') or enable = '1' then
- enable <= '1'; --enable data read
- if (PulseFF3 = '0' and PulseFF2 = '1') then -- check for rising edge of clk SPI
- if counter > -1 then
- counter <= counter - 1;
- -- data transfer into vector
- data(counter) <= dataFF3;
- end if;
- end if;
- --check if counter is done
- if counter = -1 then
- counter <= 23; --reset counter
- dataRead <= data;
- end if;
- elsif (enable = '0') then
- --dataRead <= data;
-
- end if;
-
- end if;
-
- end process;
-
+ serial_peripheral_interface: component spi port map(
+ SYSCLK => SYSCLK,
+ SPI_CLK => SPI_CLK,
+ SPI_MOSI => SPI_MOSI,
+ SPI_CS => '1',
+ DATA => SPI_DATA);
+
+ picture_processing_unit: component ppu port map(
+ CLK100 => SYSCLK,
+ RESET => RESET,
+ EN => '1',
+ WEN => WEN,
+ ADDR => SPI_DATA_ADDR,
+ DATA => SPI_DATA_DATA,
+ R => R,
+ G => G,
+ B => B,
+ NVSYNC => NVSYNC,
+ NHSYNC => NHSYNC,
+ TVBLANK => TVBLANK,
+ THBLANK => THBLANK);
end Behavioral;
diff --git a/basys3/basys3.xpr b/basys3/basys3.xpr
index 4060a21..b4b83db 100644
--- a/basys3/basys3.xpr
+++ b/basys3/basys3.xpr
@@ -197,14 +197,32 @@
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
+ <File Path="$PSRCDIR/top.vhd">
+ <FileInfo>
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/spi.vhd">
+ <FileInfo>
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
<Config>
<Option Name="DesignMode" Val="RTL"/>
- <Option Name="TopModule" Val="ppu"/>
+ <Option Name="TopModule" Val="top"/>
<Option Name="dataflowViewerSettings" Val="min_width=16"/>
</Config>
</FileSet>
<FileSet Name="constrs_1" Type="Constrs" RelSrcDir="$PSRCDIR/constrs_1" RelGenDir="$PGENDIR/constrs_1">
<Filter Type="Constrs"/>
+ <File Path="$PSRCDIR/io.xdc">
+ <FileInfo>
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="implementation"/>
+ </FileInfo>
+ </File>
<Config>
<Option Name="ConstrsType" Val="XDC"/>
</Config>
@@ -298,6 +316,7 @@
<FileSet Name="ppu_bam" Type="BlockSrcs" RelSrcDir="$PSRCDIR/ppu_bam" RelGenDir="$PGENDIR/ppu_bam">
<File Path="$PSRCDIR/sources_1/ip/ppu_bam/ppu_bam.xci">
<FileInfo>
+ <Attr Name="UserDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
@@ -311,6 +330,7 @@
<FileSet Name="ppu_tmm" Type="BlockSrcs" RelSrcDir="$PSRCDIR/ppu_tmm" RelGenDir="$PGENDIR/ppu_tmm">
<File Path="$PSRCDIR/sources_1/ip/ppu_tmm/ppu_tmm.xci">
<FileInfo>
+ <Attr Name="UserDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
diff --git a/docs/architecture.md b/docs/architecture.md
index 5001eed..bf062f2 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -1,14 +1,82 @@
+<!-- # Hooded Havic: Miniboss Mania -->
+
+![intro arcade game](../assets/hh_introScreen.png)
+
+# Introduction
+
+Welcome to Hooded Havoc: Miniboss Mania, an exciting 2D platformer game created by our team Joshua, Loek, Bjorn, Frenk and Niels! This game was developed using the STM32 microcontroller as the game engine and the FPGA as the Picture Processing Unit (PPU).
+
+In Hooded Havoc: Miniboss Mania, you will take on the role of a brave hero who must battle through multiple levels filled with challenging obstacles and formidable minibosses. With smooth gameplay and engaging graphics, you will feel immersed in a world of adventure and excitement.
+
+Our use of the STM32 microcontroller and FPGA PPU allowed us to create a unique and innovative gaming experience. The STM32 provides efficient and reliable processing power, while the FPGA ensures that our graphics are rendered smoothly and accurately.
+
+So get ready to embark on a thrilling journey through Hooded Havoc: Miniboss Mania, and see how far you can make it!
+
+## Objective
+
+The objective of Hooded Havoc: Miniboss Mania is to guide the hero through multiple levels, defeating minibosses and overcoming obstacles along the way. The ultimate goal is to reach the final boss and defeat them to retrieve the stolen staff.
+
+To achieve this objective, the player must use their platforming skills to jump, run, and dodge obstacles while also battling enemies and minibosses. Each level presents a unique challenge that will require the player to adapt and strategize to overcome.
+
+As the player progresses through the game, they will unlock new abilities and power-ups that will aid them in their journey. The player must use these abilities wisely to defeat the minibosses and ultimately save the world.
+
+So, the objective of Hooded Havoc: Miniboss Mania is not only to provide an exciting and engaging gaming experience but also to challenge players to use their skills and strategic thinking to overcome obstacles and emerge victorious.
+
+## Problem statement
+
+One potential problem that could arise in the development of Hooded Havoc: Miniboss Mania is related to the PPU and communication between the STM32 and PPU.
+
+The PPU is responsible for rendering the graphics and displaying them on the screen, while the STM32 is responsible for processing the game logic and input from the player. However, if there is a problem with the communication between these two components, it could lead to synchronization issues and graphical glitches that could affect the player's experience.
+
+For example, if the PPU is unable to keep up with the processing speed of the STM32, the graphics may lag or appear distorted, causing the game to become unplayable. Similarly, if there is a delay in communication between the STM32 and PPU, it could result in a mismatch between the game logic and the displayed graphics, leading to confusion for the player.
+
+To ensure a smooth and enjoyable gaming experience, it is essential to address any potential issues with the PPU and communication between the STM32 and PPU during the development process. This may involve optimizing the code for both components, adjusting the communication protocol, or adding buffer systems to prevent lag or synchronization issues.
+
# General system architecture
+The existing hardware components available for building this project consists
+of:
+
+- Raspberry Pi
+- Nucleo STM32 development board
+- Basys3 FPGA development board
+- Arduino Uno R3
+
+The Raspberry Pi is by far the most powerful component out of these 4, but
+because one of the project requirements is that no general-purpose operating
+system is used, utilizing the Raspberry Pi will involve writing low-level
+drivers for its interfaces, which will likely cost a lot of effort.
+
+As to not risk project failure due to hardware constraints, the decision was
+made to use the STM32 microcontroller and FPGA in combination, as these two are
+both familiar and still relatively powerful platforms. Because audio and video
+consist of data streams that require constant output, the audio and graphics
+processing is outsourced to the FPGA. All other game logic processing such as
+world loading, or map and entity interactions is done on the STM32
+microcontroller.
+
+Our game also supports an optional second player, as is shown in the following
+diagram.
+
![Top-down system architecture diagram](../assets/architecture-level-1.svg)
-Important notes:
+In the above diagram, the "display" and "speaker" components are included to
+show what the complete system looks like. The scope of this project only
+includes the components inside the area marked "game console" and the gamepad
+components.
-- Gamepad 2 is optionally connected
-- The PPU and APU are implemented on the FPGA
-- The game logic and PPU/APU control logic runs on the STM32 only
+# STM32 software
+
+The game engine is designed to run a 2D platformer game. The game engine has to manage all the different game states. To do this it will utilize a finite state machine (FSM). The game engine will also cover de input handling from the player, the game logic for example enemy handling or the powerup handling it will also send out data to the APU (Audio processing unit) so that the right sounds will be played.
-# Game controllers
+FSM is a useful tool for managing game states and transitions. The game has many different states such as: title screen, shop and gameplay state. Each state represents a particular configuration from the with different logic and variables.
+
+The state machine is designed to have the following states:
+1. Initialization: The initialization state will be responsible for initializing all game-related variables and subsystems, including the FPGA-based picture processing unit.
+2. Title Screen: The title screen state will display the game's title screen and wait for user input to start the game or access the options menu.
+3. Options: The options state will allow the user to configure game settings, such as sound and graphics options.
+4. Game Play: The game play state will be responsible for running the game logic and updating the game state.
+5. Game Over: The game over state will display the game over screen and wait for user input to restart the game or return to the title screen.
## Input
@@ -44,23 +112,23 @@ The buttons will be connected as follows:
To implement the input in the game, the input should be checked at the start of each game cycle. In this case there are no interrupts needed.
-# STM32 software
+## PPU communication
-The game engine will be designed to support 2D games. The engine will use a state machine to manage game states and transitions between them. The state machine will be implemented using a finite state machine (FSM) design pattern. The engine will also include support for handling user input, game logic, and sound.
+The SPI module will be configured that sends 8 bits per cycle and at a speed of 1.0 MB/s. The STM32 Cube IDE SPI module does not include a slave select line so a pin has to configured manually to fullfill this purpose. Every data transfer consists out of 4 times 8 bits, so 32 bits in total. The first byte is the address and the other 3 bytes consist the data.
-FSM is a useful tool for managing game states and transitions. A game can have many different states, such as a title screen, a level selection screen, a loading screen, and various gameplay states. Each state represents a particular configuration of the game, with different sets of variables, objects, and logic
+## SPI
-The state machine will be designed with the following states:
-
-1. Initialization: The initialization state will be responsible for initializing all game-related variables and subsystems, including the FPGA-based picture processing unit.
-2. Title Screen: The title screen state will display the game's title screen and wait for user input to start the game or access the options menu.
-3. Options: The options state will allow the user to configure game settings, such as sound and graphics options.
-4. Game Play: The game play state will be responsible for running the game logic and updating the game state.
-5. Game Over: The game over state will display the game over screen and wait for user input to restart the game or return to the title screen.
+The FPGA uses 3 JMOD pins to receive the SPI data. The FPGA does not have a IP-Core for SPI. To receive the data the module has 3 synchronisers for the incoming SPI clock, data and slave select. The data will be read via the SPI protocol and shifted untill all 32 bits are read.
# PPU
-Here's a list of features our PPU has:
+As mentioned in the [research document](research.md#graphics), the PPU designed
+for this project is heavily inspired by the NES's PPU. Because our game does
+need slightly different graphical capabilities, the differences between the NES
+PPU and our custom PPU are highlighted here. Readers of this section are
+expected to know basic operation of the NES's PPU.
+
+PPU features:
- 320x240 @ 60Hz VGA output (upscaled to 640x480)
- single tilemap with room for 1024 tiles of 16x16 pixels
@@ -71,8 +139,7 @@ Here's a list of features our PPU has:
- sprites are always drawn on top of the background layer
- PPU control using DMA (dual-port asynchronous RAM)
- tiles can be flipped using FAM or BAM
-- no frame buffer
-- vertical and horizontal sync and blank output
+- vertical and horizontal blank output
Notable differences:
@@ -80,60 +147,63 @@ Notable differences:
- NES OAM equivalent is called FAM (foreground attribute register)
- 320x240 @ 60Hz output
- Since we're using VGA, we can't use custom resolutions without an
- upscaler/downscaler. This resolution was chosen because it's exactly half of
- the lowest standard VGA resolution 640x480.
+ Since the FPGA board we're using has a VGA port, the PPU outputs VGA. VGA
+ does not support custom resolutions. This resolution was chosen because it's
+ exactly half of the lowest standard VGA resolution 640x480. This allows the
+ PPU to use nearest-neighbor upscaling, which will lead to a simpler hardware
+ implementation.
- No scanline sprite limit
- Unless not imposing any sprite limit makes the hardware implementation
- impossible, or much more difficult, this is a restriction that will likely
- lead to frustrating debugging sessions, so will not be replicated in our
- custom PPU.
+ This was a hardware limitation of the original NES, which our PPU design does
+ not have.
- Sprites are 16x16
Most NES games already tile multiple 8x8 tiles together into "metatiles" to
- create the illusion of larger sprites. This was likely done to save on memory
- costs as RAM was expensive in the '80s, but since we're running on an FPGA
- cost is irrelevant.
+ create the illusion of larger sprites. This however is wasteful of the
+ available foreground sprites, so this PPU has 16x16 pixel sprites by default.
- Single 1024 sprite tilemap shared between foreground and background sprites
The NES OAM registers contain a bit to select which tilemap to use (of two),
which effectively expands each tile's index address by one byte. Instead of
creating the illusion of two separate memory areas for tiles, having one
- large tilemap seems like a more sensible solution to indexed tiles.
+ large tilemap is a simpler solution.
- 8 total palettes, with 8 colors each
- More colors is better. Increasing the total palette count is a very memory
- intensive operation, while increasing the palette color count is likely slower
- when looking up color values for each pixel on real hardware.
+ More colors allows for nicer looking graphics. Increasing the palette color
+ count is a very memory intensive operation as this inflates the entire
+ tilemap, while increasing the total palette count increases FPGA utilization.
+ Keeping in mind that these palettes can be modified at any point during
+ runtime, an 8x8 palette table is likely big enough.
- Sprites can be positioned partially off-screen on all screen edges using only
the offset bits in the FAM register
The NES has a separate PPUMASK register to control special color effects, and
to shift sprites off the left and top screen edges, as the sprite offsets
- count from 0. Our PPU's FAM sprite offset bits count from -15, so the sprite
+ count from 0. Our PPU's FAM sprite offset bits count from -16, so the sprite
can shift past the top and left screen edges, as well as the standard bottom
and right edges.
-- No status line register, only V-sync and H-sync outputs are supplied back to
- CPU
+- No status line register, only V-blank and H-blank outputs are supplied back
+ to CPU
- The NES status line register contains some handy lines, such as a buggy
- status line for reaching the max sprite count per scanline, and a status line
- for detecting collisions between background and foreground sprites. Our PPU
- doesn't have a scanline limit, and all hitbox detection is done in software.
- Software hacks involving swapping tiles during a screen draw cycle can still
- be achieved by counting the V-sync and H-sync pulses using interrupts.
+ The NES status line register contains a buggy status line for reaching the
+ max sprite count per scanline, and a status line for detecting collisions
+ between background and foreground sprites. Our PPU doesn't have a scanline
+ limit, and all hitbox detection is done in software. Software hacks involving
+ swapping tiles during a screen draw cycle can still be achieved by counting
+ the V-blank and H-blank pulses using interrupts.
- No background scrolling splits
This feature allows only part of the background canvas to be scrolled, while
another portion stays still. This was used to draw HUD elements on the
background layer for displaying things like health bars or score counters.
- Since we are working with a higher foreground sprite limit, we'll use regular
+ Since this PPU has a higher foreground sprite limit, the game uses regular
foreground sprites to display HUD elements.
- Sprites are always drawn on top of the background layer
- Our game doesn't need this capability for any visual effects. Leaving this
- feature out will lead to a simpler hardware design
+ The NES PPU has the capability to draw 'foreground' sprites both behind and
+ in front of the background layer. Our game doesn't need this capability for
+ any visual effects. Leaving this feature out will lead to a simpler hardware
+ design.
- Sprites are positioned relative to the viewport, not the background layer
This leads to a simpler hardware architecture for the foreground sprite
@@ -149,20 +219,18 @@ Notable differences:
Important notes:
-- The STM32 can reset the PPU. This line will also be connected to a physical
- button on the FPGA.
- The STM32 uses direct memory access to control the PPU.
- The PPU's native resolution is 320x240. It works in this resolution as if it
is a valid VGA signal. The STM32 is also only aware of this resolution. This
resolution is referred to as "tiny" resolution. Because VGA-compatible LCD's
likely don't support this resolution due to low clock speed, a built-in
- pixel-perfect 2X upscaler is chained after the PPU's "tiny" output. This
+ pixel-perfect 2X upscaler is internally connected before the output. This
means that the display sees the resolution as 640x480, but the PPU and STM32
only work in 320x240.
-- The STM32 receives the TVSYNC and THSYNC lines from the PPU. These are the
- VSYNC and HSYNC lines from the tiny VGA signal generator. These lines can be
+- The STM32 receives the TVBLANK and THBLANK lines from the PPU. These are the
+ VBLANK and HBLANK lines from the "tiny" VGA resolution. These lines can be
used to trigger interrupts for counting frames, and to make sure no
- read/write conflicts occur for protected memory regions in the PPU.
+ simultanious reads and writes occur in the PPU.
- NVSYNC, NHSYNC and the RGB signals refer to the output of the native VGA
signal generator.
@@ -181,12 +249,12 @@ Important notes:
sprite with non-transparent color at current pixel in order, fallback to
background)
- (Palette lookup) lookup palette color using palette register
- - (VGA signal generator) output real color to VGA signal generator
+ - (Display controller) output upscaled tiny display signal
- The pipeline stages with two clock cycles contain an address set and memory
read step.
-- The pipeline takes 5 clock ticks in total. About 18 are available during each
- pixel. For optimal display compatibility, the output color signal should be
- stable before 50% of the pixel clock pulse width (9 clock ticks).
+- The pipeline takes 5 clock ticks in total. About 16 are available during each
+ pixel. Since each scanline is buffered in the upscaler, all available clock
+ cycles can be used (if necessary).
- Since the "sprite info" and "sprite render" steps are fundamentally different
for the foreground and background layer, these components will be combined
into one for each layer respectively. They are separated in the above diagram
@@ -197,6 +265,7 @@ Important notes:
the RAM in it's own cache memory. The cache updates are fetched during the
VBLANK time between each frame.
+<!--
### Level 3
This diagram has several flaws, but a significant amount of time has already
@@ -227,6 +296,7 @@ Important notes:
CIDX signal based on the EN signal from the compositor.
- All DATA and ADDR lines are shared between all RAM ports. WEN inputs are
controlled by the address decoder.
+-->
## Registers
@@ -344,6 +414,15 @@ Format:
[custompputimings]: https://docs.google.com/spreadsheets/d/1MU6K4c4PtMR_JXIpc3I0ZJdLZNnoFO7G2P3olCz6LSc
+## PPU communication
+
+To comunicate with the FPGA via the STM32 a protocol is needed. After [research](research.md#Input) of different possible protocols, SPI was the best option for this problem. As there is only one master and one slave, four data lines are needed at maximum. The STM32 will be the master and the FPGA will be the slave. The STM32 has a configurable SPI module that is easily configurable unlike the FPGA. Futhermore, the MISO line is not needed because the FPGA does not send any big data to the STM32. The slave select line will operate as a write enable.
+
+## SPI
+
+The FPGA will configure as a slave of the SPI protocol. The FPGA (Basys3) does not have a IP-Core that supports external SPI communication so the SPI slave has to be designed. The module requires three inputs as mentioned before in the [STM32](architecture.md#STM32) section.
+
+
# APU
The Audio Processing Unit (APU) is programmed on the FPGA, here it will produce different signals on the audio output. These signals come in a few forms, as listed below.
@@ -370,7 +449,7 @@ optional:
- envelope (ADSR)
-![ADSR envelope](https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg)
+<!-- ![ADSR envelope](https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg) -->
This image shows an advanced method of generating tones. In our case this is only an indication as to how it could be done, we will actually only be looking at the sustained tone part for simplicity sakes.
In order to get the correct graph forms, some data points can be stored in a LUT (Look Up Table). This allows the saving of computation power at the cost of some ROM space.
@@ -399,3 +478,4 @@ To index tiles from the tilemap, 10 bits will be used for both the foreground
and background layers of the PPU. This means that the global tilemap can fit up
to 1024 tiles in total, each being 16x16 pixels (the example uses 4x4 tiles for
illustration purposes).
+
diff --git a/docs/hardware/.gitignore b/docs/hardware/.gitignore
new file mode 100644
index 0000000..8b1ed53
--- /dev/null
+++ b/docs/hardware/.gitignore
@@ -0,0 +1 @@
+hardware-backups/
diff --git a/docs/hardware/hardware.kicad_pcb b/docs/hardware/hardware.kicad_pcb
new file mode 100644
index 0000000..2b8ba10
--- /dev/null
+++ b/docs/hardware/hardware.kicad_pcb
@@ -0,0 +1,2 @@
+(kicad_pcb (version 20221018) (generator pcbnew)
+) \ No newline at end of file
diff --git a/docs/hardware/hardware.kicad_prl b/docs/hardware/hardware.kicad_prl
new file mode 100644
index 0000000..2c6f2c5
--- /dev/null
+++ b/docs/hardware/hardware.kicad_prl
@@ -0,0 +1,77 @@
+{
+ "board": {
+ "active_layer": 0,
+ "active_layer_preset": "",
+ "auto_track_width": true,
+ "hidden_netclasses": [],
+ "hidden_nets": [],
+ "high_contrast_mode": 0,
+ "net_color_mode": 1,
+ "opacity": {
+ "images": 0.6,
+ "pads": 1.0,
+ "tracks": 1.0,
+ "vias": 1.0,
+ "zones": 0.6
+ },
+ "selection_filter": {
+ "dimensions": true,
+ "footprints": true,
+ "graphics": true,
+ "keepouts": true,
+ "lockedItems": false,
+ "otherItems": true,
+ "pads": true,
+ "text": true,
+ "tracks": true,
+ "vias": true,
+ "zones": true
+ },
+ "visible_items": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26,
+ 27,
+ 28,
+ 29,
+ 30,
+ 32,
+ 33,
+ 34,
+ 35,
+ 36,
+ 39,
+ 40
+ ],
+ "visible_layers": "fffffff_ffffffff",
+ "zone_display_mode": 0
+ },
+ "meta": {
+ "filename": "hardware.kicad_prl",
+ "version": 3
+ },
+ "project": {
+ "files": []
+ }
+}
diff --git a/docs/hardware/hardware.kicad_pro b/docs/hardware/hardware.kicad_pro
new file mode 100644
index 0000000..a9b4a59
--- /dev/null
+++ b/docs/hardware/hardware.kicad_pro
@@ -0,0 +1,332 @@
+{
+ "board": {
+ "3dviewports": [],
+ "design_settings": {
+ "defaults": {
+ "board_outline_line_width": 0.1,
+ "copper_line_width": 0.2,
+ "copper_text_size_h": 1.5,
+ "copper_text_size_v": 1.5,
+ "copper_text_thickness": 0.3,
+ "other_line_width": 0.15,
+ "silk_line_width": 0.15,
+ "silk_text_size_h": 1.0,
+ "silk_text_size_v": 1.0,
+ "silk_text_thickness": 0.15
+ },
+ "diff_pair_dimensions": [],
+ "drc_exclusions": [],
+ "rules": {
+ "min_copper_edge_clearance": 0.0,
+ "solder_mask_clearance": 0.0,
+ "solder_mask_min_width": 0.0
+ },
+ "track_widths": [],
+ "via_dimensions": []
+ },
+ "layer_presets": [],
+ "viewports": []
+ },
+ "boards": [],
+ "cvpcb": {
+ "equivalence_files": []
+ },
+ "erc": {
+ "erc_exclusions": [],
+ "meta": {
+ "version": 0
+ },
+ "pin_map": [
+ [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 2
+ ],
+ [
+ 0,
+ 2,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 2,
+ 2,
+ 2,
+ 2
+ ],
+ [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 2
+ ],
+ [
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 2,
+ 1,
+ 1,
+ 2
+ ],
+ [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 2
+ ],
+ [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 2
+ ],
+ [
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 2
+ ],
+ [
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 2
+ ],
+ [
+ 0,
+ 2,
+ 1,
+ 2,
+ 0,
+ 0,
+ 1,
+ 0,
+ 2,
+ 2,
+ 2,
+ 2
+ ],
+ [
+ 0,
+ 2,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 2,
+ 0,
+ 0,
+ 2
+ ],
+ [
+ 0,
+ 2,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 2,
+ 0,
+ 0,
+ 2
+ ],
+ [
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2
+ ]
+ ],
+ "rule_severities": {
+ "bus_definition_conflict": "error",
+ "bus_entry_needed": "error",
+ "bus_to_bus_conflict": "error",
+ "bus_to_net_conflict": "error",
+ "conflicting_netclasses": "error",
+ "different_unit_footprint": "error",
+ "different_unit_net": "error",
+ "duplicate_reference": "error",
+ "duplicate_sheet_names": "error",
+ "endpoint_off_grid": "warning",
+ "extra_units": "error",
+ "global_label_dangling": "warning",
+ "hier_label_mismatch": "error",
+ "label_dangling": "error",
+ "lib_symbol_issues": "warning",
+ "missing_bidi_pin": "warning",
+ "missing_input_pin": "warning",
+ "missing_power_pin": "error",
+ "missing_unit": "warning",
+ "multiple_net_names": "warning",
+ "net_not_bus_member": "warning",
+ "no_connect_connected": "warning",
+ "no_connect_dangling": "warning",
+ "pin_not_connected": "error",
+ "pin_not_driven": "error",
+ "pin_to_pin": "warning",
+ "power_pin_not_driven": "error",
+ "similar_labels": "warning",
+ "simulation_model_issue": "error",
+ "unannotated": "error",
+ "unit_value_mismatch": "error",
+ "unresolved_variable": "error",
+ "wire_dangling": "error"
+ }
+ },
+ "libraries": {
+ "pinned_footprint_libs": [],
+ "pinned_symbol_libs": []
+ },
+ "meta": {
+ "filename": "hardware.kicad_pro",
+ "version": 1
+ },
+ "net_settings": {
+ "classes": [
+ {
+ "bus_width": 12,
+ "clearance": 0.2,
+ "diff_pair_gap": 0.25,
+ "diff_pair_via_gap": 0.25,
+ "diff_pair_width": 0.2,
+ "line_style": 0,
+ "microvia_diameter": 0.3,
+ "microvia_drill": 0.1,
+ "name": "Default",
+ "pcb_color": "rgba(0, 0, 0, 0.000)",
+ "schematic_color": "rgba(0, 0, 0, 0.000)",
+ "track_width": 0.25,
+ "via_diameter": 0.8,
+ "via_drill": 0.4,
+ "wire_width": 6
+ }
+ ],
+ "meta": {
+ "version": 3
+ },
+ "net_colors": null,
+ "netclass_assignments": null,
+ "netclass_patterns": []
+ },
+ "pcbnew": {
+ "last_paths": {
+ "gencad": "",
+ "idf": "",
+ "netlist": "",
+ "specctra_dsn": "",
+ "step": "",
+ "vrml": ""
+ },
+ "page_layout_descr_file": ""
+ },
+ "schematic": {
+ "annotate_start_num": 0,
+ "drawing": {
+ "dashed_lines_dash_length_ratio": 12.0,
+ "dashed_lines_gap_length_ratio": 3.0,
+ "default_line_thickness": 6.0,
+ "default_text_size": 50.0,
+ "field_names": [],
+ "intersheets_ref_own_page": false,
+ "intersheets_ref_prefix": "",
+ "intersheets_ref_short": false,
+ "intersheets_ref_show": false,
+ "intersheets_ref_suffix": "",
+ "junction_size_choice": 3,
+ "label_size_ratio": 0.375,
+ "pin_symbol_size": 25.0,
+ "text_offset_ratio": 0.15
+ },
+ "legacy_lib_dir": "",
+ "legacy_lib_list": [],
+ "meta": {
+ "version": 1
+ },
+ "net_format_name": "",
+ "page_layout_descr_file": "",
+ "plot_directory": "",
+ "spice_current_sheet_as_root": false,
+ "spice_external_command": "spice \"%I\"",
+ "spice_model_current_sheet_as_root": true,
+ "spice_save_all_currents": false,
+ "spice_save_all_voltages": false,
+ "subpart_first_id": 65,
+ "subpart_id_separator": 0
+ },
+ "sheets": [
+ [
+ "9c6bd711-93fb-4327-8ec4-bcfe43c3c3c8",
+ ""
+ ]
+ ],
+ "text_variables": {}
+}
diff --git a/docs/hardware/hardware.kicad_sch b/docs/hardware/hardware.kicad_sch
new file mode 100644
index 0000000..21ed426
--- /dev/null
+++ b/docs/hardware/hardware.kicad_sch
@@ -0,0 +1,2050 @@
+(kicad_sch (version 20230121) (generator eeschema)
+
+ (uuid 9c6bd711-93fb-4327-8ec4-bcfe43c3c3c8)
+
+ (paper "A4")
+
+ (lib_symbols
+ (symbol "FPGA_Xilinx_Artix7:XC7A35T-CPG236" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
+ (property "Reference" "U" (at 0 1.27 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (property "Value" "XC7A35T-CPG236" (at 0 -1.27 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (property "Footprint" "" (at 0 0 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (property "Datasheet" "" (at 0 0 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (property "ki_locked" "" (at 0 0 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (property "ki_keywords" "FPGA" (at 0 0 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (property "ki_description" "Artix 7 T 35 XC7A35T-CPG236" (at 0 0 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (symbol "XC7A35T-CPG236_1_1"
+ (rectangle (start -44.45 67.31) (end 44.45 -73.66)
+ (stroke (width 0.254) (type default))
+ (fill (type background))
+ )
+ (pin bidirectional line (at 50.8 53.34 180) (length 6.35)
+ (name "IO_L6P_T0_16" (effects (font (size 1.27 1.27))))
+ (number "A14" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 50.8 180) (length 6.35)
+ (name "IO_L6N_T0_VREF_16" (effects (font (size 1.27 1.27))))
+ (number "A15" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 43.18 180) (length 6.35)
+ (name "IO_L12P_T1_MRCC_16" (effects (font (size 1.27 1.27))))
+ (number "A16" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 40.64 180) (length 6.35)
+ (name "IO_L12N_T1_MRCC_16" (effects (font (size 1.27 1.27))))
+ (number "A17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 25.4 180) (length 6.35)
+ (name "IO_L19N_T3_VREF_16" (effects (font (size 1.27 1.27))))
+ (number "A18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 45.72 180) (length 6.35)
+ (name "IO_L11N_T1_SRCC_16" (effects (font (size 1.27 1.27))))
+ (number "B15" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 35.56 180) (length 6.35)
+ (name "IO_L13N_T2_MRCC_16" (effects (font (size 1.27 1.27))))
+ (number "B16" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 30.48 180) (length 6.35)
+ (name "IO_L14N_T2_SRCC_16" (effects (font (size 1.27 1.27))))
+ (number "B17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 27.94 180) (length 6.35)
+ (name "IO_L19P_T3_16" (effects (font (size 1.27 1.27))))
+ (number "B18" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 33.02 73.66 270) (length 6.35)
+ (name "VCCO_16" (effects (font (size 1.27 1.27))))
+ (number "B19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 35.56 73.66 270) (length 6.35)
+ (name "VCCO_16" (effects (font (size 1.27 1.27))))
+ (number "C14" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 48.26 180) (length 6.35)
+ (name "IO_L11P_T1_SRCC_16" (effects (font (size 1.27 1.27))))
+ (number "C15" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 38.1 180) (length 6.35)
+ (name "IO_L13P_T2_MRCC_16" (effects (font (size 1.27 1.27))))
+ (number "C16" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 33.02 180) (length 6.35)
+ (name "IO_L14P_T2_SRCC_16" (effects (font (size 1.27 1.27))))
+ (number "C17" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 38.1 73.66 270) (length 6.35)
+ (name "VCCO_16" (effects (font (size 1.27 1.27))))
+ (number "C18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 53.34 0) (length 6.35)
+ (name "IO_0_14" (effects (font (size 1.27 1.27))))
+ (number "D17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 50.8 0) (length 6.35)
+ (name "IO_L1P_T0_D00_MOSI_14" (effects (font (size 1.27 1.27))))
+ (number "D18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 48.26 0) (length 6.35)
+ (name "IO_L1N_T0_D01_DIN_14" (effects (font (size 1.27 1.27))))
+ (number "D19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 40.64 0) (length 6.35)
+ (name "IO_L3P_T0_DQS_PUDC_B_14" (effects (font (size 1.27 1.27))))
+ (number "E18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 38.1 0) (length 6.35)
+ (name "IO_L3N_T0_DQS_EMCCLK_14" (effects (font (size 1.27 1.27))))
+ (number "E19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -40.64 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "F17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 43.18 0) (length 6.35)
+ (name "IO_L2N_T0_D03_14" (effects (font (size 1.27 1.27))))
+ (number "F18" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 40.64 73.66 270) (length 6.35)
+ (name "VCCO_16" (effects (font (size 1.27 1.27))))
+ (number "G13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 27.94 0) (length 6.35)
+ (name "IO_L5N_T0_D07_14" (effects (font (size 1.27 1.27))))
+ (number "G17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 45.72 0) (length 6.35)
+ (name "IO_L2P_T0_D02_14" (effects (font (size 1.27 1.27))))
+ (number "G18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 33.02 0) (length 6.35)
+ (name "IO_L4N_T0_D05_14" (effects (font (size 1.27 1.27))))
+ (number "G19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 30.48 0) (length 6.35)
+ (name "IO_L5P_T0_D06_14" (effects (font (size 1.27 1.27))))
+ (number "H17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 35.56 0) (length 6.35)
+ (name "IO_L4P_T0_D04_14" (effects (font (size 1.27 1.27))))
+ (number "H19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 20.32 0) (length 6.35)
+ (name "IO_L7P_T1_D09_14" (effects (font (size 1.27 1.27))))
+ (number "J17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 17.78 0) (length 6.35)
+ (name "IO_L7N_T1_D10_14" (effects (font (size 1.27 1.27))))
+ (number "J18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 22.86 0) (length 6.35)
+ (name "IO_L6N_T0_D08_VREF_14" (effects (font (size 1.27 1.27))))
+ (number "J19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -38.1 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "K12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -35.56 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "K13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -7.62 0) (length 6.35)
+ (name "IO_L12N_T1_MRCC_14" (effects (font (size 1.27 1.27))))
+ (number "K17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 12.7 0) (length 6.35)
+ (name "IO_L8N_T1_D12_14" (effects (font (size 1.27 1.27))))
+ (number "K18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 25.4 0) (length 6.35)
+ (name "IO_L6P_T0_FCS_B_14" (effects (font (size 1.27 1.27))))
+ (number "K19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -33.02 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "L12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -30.48 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "L13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -5.08 0) (length 6.35)
+ (name "IO_L12P_T1_MRCC_14" (effects (font (size 1.27 1.27))))
+ (number "L17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 15.24 0) (length 6.35)
+ (name "IO_L8P_T1_D11_14" (effects (font (size 1.27 1.27))))
+ (number "L18" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -27.94 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "M12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "M17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 0 0) (length 6.35)
+ (name "IO_L11P_T1_SRCC_14" (effects (font (size 1.27 1.27))))
+ (number "M18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -2.54 0) (length 6.35)
+ (name "IO_L11N_T1_SRCC_14" (effects (font (size 1.27 1.27))))
+ (number "M19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -10.16 0) (length 6.35)
+ (name "IO_L13P_T2_MRCC_14" (effects (font (size 1.27 1.27))))
+ (number "N17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 10.16 0) (length 6.35)
+ (name "IO_L9P_T1_DQS_14" (effects (font (size 1.27 1.27))))
+ (number "N18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 7.62 0) (length 6.35)
+ (name "IO_L9N_T1_DQS_D13_14" (effects (font (size 1.27 1.27))))
+ (number "N19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -12.7 0) (length 6.35)
+ (name "IO_L13N_T2_MRCC_14" (effects (font (size 1.27 1.27))))
+ (number "P17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -15.24 0) (length 6.35)
+ (name "IO_L14P_T2_SRCC_14" (effects (font (size 1.27 1.27))))
+ (number "P18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 5.08 0) (length 6.35)
+ (name "IO_L10P_T1_D14_14" (effects (font (size 1.27 1.27))))
+ (number "P19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -22.86 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "R17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -17.78 0) (length 6.35)
+ (name "IO_L14N_T2_SRCC_14" (effects (font (size 1.27 1.27))))
+ (number "R18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 2.54 0) (length 6.35)
+ (name "IO_L10N_T1_D15_14" (effects (font (size 1.27 1.27))))
+ (number "R19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -30.48 0) (length 6.35)
+ (name "IO_L17P_T2_A14_D30_14" (effects (font (size 1.27 1.27))))
+ (number "T17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -33.02 0) (length 6.35)
+ (name "IO_L17N_T2_A13_D29_14" (effects (font (size 1.27 1.27))))
+ (number "T18" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -20.32 73.66 270) (length 6.35)
+ (name "VCCO_14" (effects (font (size 1.27 1.27))))
+ (number "U13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -71.12 0) (length 6.35)
+ (name "IO_25_14" (effects (font (size 1.27 1.27))))
+ (number "U14" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -60.96 0) (length 6.35)
+ (name "IO_L23P_T3_A03_D19_14" (effects (font (size 1.27 1.27))))
+ (number "U15" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -63.5 0) (length 6.35)
+ (name "IO_L23N_T3_A02_D18_14" (effects (font (size 1.27 1.27))))
+ (number "U16" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -35.56 0) (length 6.35)
+ (name "IO_L18P_T2_A12_D28_14" (effects (font (size 1.27 1.27))))
+ (number "U17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -38.1 0) (length 6.35)
+ (name "IO_L18N_T2_A11_D27_14" (effects (font (size 1.27 1.27))))
+ (number "U18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -20.32 0) (length 6.35)
+ (name "IO_L15P_T2_DQS_RDWR_B_14" (effects (font (size 1.27 1.27))))
+ (number "U19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -66.04 0) (length 6.35)
+ (name "IO_L24P_T3_A01_D17_14" (effects (font (size 1.27 1.27))))
+ (number "V13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -68.58 0) (length 6.35)
+ (name "IO_L24N_T3_A00_D16_14" (effects (font (size 1.27 1.27))))
+ (number "V14" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -50.8 0) (length 6.35)
+ (name "IO_L21P_T3_DQS_14" (effects (font (size 1.27 1.27))))
+ (number "V15" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -40.64 0) (length 6.35)
+ (name "IO_L19P_T3_A10_D26_14" (effects (font (size 1.27 1.27))))
+ (number "V16" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -43.18 0) (length 6.35)
+ (name "IO_L19N_T3_A09_D25_VREF_14" (effects (font (size 1.27 1.27))))
+ (number "V17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -22.86 0) (length 6.35)
+ (name "IO_L15N_T2_DQS_DOUT_CSO_B_14" (effects (font (size 1.27 1.27))))
+ (number "V19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -55.88 0) (length 6.35)
+ (name "IO_L22P_T3_A05_D21_14" (effects (font (size 1.27 1.27))))
+ (number "W13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -58.42 0) (length 6.35)
+ (name "IO_L22N_T3_A04_D20_14" (effects (font (size 1.27 1.27))))
+ (number "W14" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -53.34 0) (length 6.35)
+ (name "IO_L21N_T3_DQS_A06_D22_14" (effects (font (size 1.27 1.27))))
+ (number "W15" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -45.72 0) (length 6.35)
+ (name "IO_L20P_T3_A08_D24_14" (effects (font (size 1.27 1.27))))
+ (number "W16" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -48.26 0) (length 6.35)
+ (name "IO_L20N_T3_A07_D23_14" (effects (font (size 1.27 1.27))))
+ (number "W17" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -25.4 0) (length 6.35)
+ (name "IO_L16P_T2_CSI_B_14" (effects (font (size 1.27 1.27))))
+ (number "W18" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -27.94 0) (length 6.35)
+ (name "IO_L16N_T2_A15_D31_14" (effects (font (size 1.27 1.27))))
+ (number "W19" (effects (font (size 1.27 1.27))))
+ )
+ )
+ (symbol "XC7A35T-CPG236_2_1"
+ (rectangle (start -44.45 34.29) (end 44.45 -40.64)
+ (stroke (width 0.254) (type default))
+ (fill (type background))
+ )
+ (pin bidirectional line (at 50.8 17.78 180) (length 6.35)
+ (name "IO_L1N_T0_AD4N_35" (effects (font (size 1.27 1.27))))
+ (number "G2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 20.32 180) (length 6.35)
+ (name "IO_L1P_T0_AD4P_35" (effects (font (size 1.27 1.27))))
+ (number "G3" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 10.16 180) (length 6.35)
+ (name "IO_L3P_T0_DQS_AD5P_35" (effects (font (size 1.27 1.27))))
+ (number "H1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 15.24 180) (length 6.35)
+ (name "IO_L2P_T0_AD12P_35" (effects (font (size 1.27 1.27))))
+ (number "H2" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 27.94 40.64 270) (length 6.35)
+ (name "VCCO_35" (effects (font (size 1.27 1.27))))
+ (number "H3" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 7.62 180) (length 6.35)
+ (name "IO_L3N_T0_DQS_AD5N_35" (effects (font (size 1.27 1.27))))
+ (number "J1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 12.7 180) (length 6.35)
+ (name "IO_L2N_T0_AD12N_35" (effects (font (size 1.27 1.27))))
+ (number "J2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -2.54 180) (length 6.35)
+ (name "IO_L7P_T1_AD6P_35" (effects (font (size 1.27 1.27))))
+ (number "J3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 30.48 40.64 270) (length 6.35)
+ (name "VCCO_35" (effects (font (size 1.27 1.27))))
+ (number "J7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 33.02 40.64 270) (length 6.35)
+ (name "VCCO_35" (effects (font (size 1.27 1.27))))
+ (number "K1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 5.08 180) (length 6.35)
+ (name "IO_L5P_T0_AD13P_35" (effects (font (size 1.27 1.27))))
+ (number "K2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -5.08 180) (length 6.35)
+ (name "IO_L7N_T1_AD6N_35" (effects (font (size 1.27 1.27))))
+ (number "K3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 35.56 40.64 270) (length 6.35)
+ (name "VCCO_35" (effects (font (size 1.27 1.27))))
+ (number "K7" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 0 180) (length 6.35)
+ (name "IO_L6N_T0_VREF_35" (effects (font (size 1.27 1.27))))
+ (number "L1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 2.54 180) (length 6.35)
+ (name "IO_L5N_T0_AD13N_35" (effects (font (size 1.27 1.27))))
+ (number "L2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -7.62 180) (length 6.35)
+ (name "IO_L8P_T1_AD14P_35" (effects (font (size 1.27 1.27))))
+ (number "L3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 38.1 40.64 270) (length 6.35)
+ (name "VCCO_35" (effects (font (size 1.27 1.27))))
+ (number "L7" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -15.24 180) (length 6.35)
+ (name "IO_L9N_T1_DQS_AD7N_35" (effects (font (size 1.27 1.27))))
+ (number "M1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -12.7 180) (length 6.35)
+ (name "IO_L9P_T1_DQS_AD7P_35" (effects (font (size 1.27 1.27))))
+ (number "M2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -10.16 180) (length 6.35)
+ (name "IO_L8N_T1_AD14N_35" (effects (font (size 1.27 1.27))))
+ (number "M3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 40.64 40.64 270) (length 6.35)
+ (name "VCCO_35" (effects (font (size 1.27 1.27))))
+ (number "M7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -40.64 40.64 270) (length 6.35)
+ (name "VCCO_34" (effects (font (size 1.27 1.27))))
+ (number "M8" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -20.32 180) (length 6.35)
+ (name "IO_L10N_T1_AD15N_35" (effects (font (size 1.27 1.27))))
+ (number "N1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -17.78 180) (length 6.35)
+ (name "IO_L10P_T1_AD15P_35" (effects (font (size 1.27 1.27))))
+ (number "N2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -22.86 180) (length 6.35)
+ (name "IO_L12P_T1_MRCC_35" (effects (font (size 1.27 1.27))))
+ (number "N3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -38.1 40.64 270) (length 6.35)
+ (name "VCCO_34" (effects (font (size 1.27 1.27))))
+ (number "N7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -35.56 40.64 270) (length 6.35)
+ (name "VCCO_34" (effects (font (size 1.27 1.27))))
+ (number "N8" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -27.94 180) (length 6.35)
+ (name "IO_L19N_T3_VREF_35" (effects (font (size 1.27 1.27))))
+ (number "P1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 50.8 -25.4 180) (length 6.35)
+ (name "IO_L12N_T1_MRCC_35" (effects (font (size 1.27 1.27))))
+ (number "P3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -33.02 40.64 270) (length 6.35)
+ (name "VCCO_34" (effects (font (size 1.27 1.27))))
+ (number "R1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 20.32 0) (length 6.35)
+ (name "IO_L1P_T0_34" (effects (font (size 1.27 1.27))))
+ (number "R2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 15.24 0) (length 6.35)
+ (name "IO_L2P_T0_34" (effects (font (size 1.27 1.27))))
+ (number "R3" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 10.16 0) (length 6.35)
+ (name "IO_L3P_T0_DQS_34" (effects (font (size 1.27 1.27))))
+ (number "T1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 17.78 0) (length 6.35)
+ (name "IO_L1N_T0_34" (effects (font (size 1.27 1.27))))
+ (number "T2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 12.7 0) (length 6.35)
+ (name "IO_L2N_T0_34" (effects (font (size 1.27 1.27))))
+ (number "T3" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 7.62 0) (length 6.35)
+ (name "IO_L3N_T0_DQS_34" (effects (font (size 1.27 1.27))))
+ (number "U1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -7.62 0) (length 6.35)
+ (name "IO_L9N_T1_DQS_34" (effects (font (size 1.27 1.27))))
+ (number "U2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -5.08 0) (length 6.35)
+ (name "IO_L9P_T1_DQS_34" (effects (font (size 1.27 1.27))))
+ (number "U3" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -10.16 0) (length 6.35)
+ (name "IO_L11P_T1_SRCC_34" (effects (font (size 1.27 1.27))))
+ (number "U4" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -30.48 0) (length 6.35)
+ (name "IO_L16P_T2_34" (effects (font (size 1.27 1.27))))
+ (number "U5" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -35.56 0) (length 6.35)
+ (name "IO_L19P_T3_34" (effects (font (size 1.27 1.27))))
+ (number "U7" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -25.4 0) (length 6.35)
+ (name "IO_L14P_T2_SRCC_34" (effects (font (size 1.27 1.27))))
+ (number "U8" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -30.48 40.64 270) (length 6.35)
+ (name "VCCO_34" (effects (font (size 1.27 1.27))))
+ (number "V1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 5.08 0) (length 6.35)
+ (name "IO_L5P_T0_34" (effects (font (size 1.27 1.27))))
+ (number "V2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 0 0) (length 6.35)
+ (name "IO_L6P_T0_34" (effects (font (size 1.27 1.27))))
+ (number "V3" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -12.7 0) (length 6.35)
+ (name "IO_L11N_T1_SRCC_34" (effects (font (size 1.27 1.27))))
+ (number "V4" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -33.02 0) (length 6.35)
+ (name "IO_L16N_T2_34" (effects (font (size 1.27 1.27))))
+ (number "V5" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -27.94 40.64 270) (length 6.35)
+ (name "VCCO_34" (effects (font (size 1.27 1.27))))
+ (number "V6" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -38.1 0) (length 6.35)
+ (name "IO_L19N_T3_VREF_34" (effects (font (size 1.27 1.27))))
+ (number "V7" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -27.94 0) (length 6.35)
+ (name "IO_L14N_T2_SRCC_34" (effects (font (size 1.27 1.27))))
+ (number "V8" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 2.54 0) (length 6.35)
+ (name "IO_L5N_T0_34" (effects (font (size 1.27 1.27))))
+ (number "W2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -2.54 0) (length 6.35)
+ (name "IO_L6N_T0_VREF_34" (effects (font (size 1.27 1.27))))
+ (number "W3" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -17.78 0) (length 6.35)
+ (name "IO_L12N_T1_MRCC_34" (effects (font (size 1.27 1.27))))
+ (number "W4" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -15.24 0) (length 6.35)
+ (name "IO_L12P_T1_MRCC_34" (effects (font (size 1.27 1.27))))
+ (number "W5" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -22.86 0) (length 6.35)
+ (name "IO_L13N_T2_MRCC_34" (effects (font (size 1.27 1.27))))
+ (number "W6" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -50.8 -20.32 0) (length 6.35)
+ (name "IO_L13P_T2_MRCC_34" (effects (font (size 1.27 1.27))))
+ (number "W7" (effects (font (size 1.27 1.27))))
+ )
+ )
+ (symbol "XC7A35T-CPG236_3_1"
+ (rectangle (start -31.75 20.32) (end 31.75 -20.32)
+ (stroke (width 0.254) (type default))
+ (fill (type background))
+ )
+ (pin bidirectional line (at -38.1 -15.24 0) (length 6.35)
+ (name "MGTREFCLK1N_216" (effects (font (size 1.27 1.27))))
+ (number "A10" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 10.16 0) (length 6.35)
+ (name "MGTPTXN1_216" (effects (font (size 1.27 1.27))))
+ (number "A2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 2.54 0) (length 6.35)
+ (name "MGTPRXN0_216" (effects (font (size 1.27 1.27))))
+ (number "A4" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 -2.54 0) (length 6.35)
+ (name "MGTPRXN1_216" (effects (font (size 1.27 1.27))))
+ (number "A6" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 -10.16 0) (length 6.35)
+ (name "MGTREFCLK0N_216" (effects (font (size 1.27 1.27))))
+ (number "A8" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 -12.7 0) (length 6.35)
+ (name "MGTREFCLK1P_216" (effects (font (size 1.27 1.27))))
+ (number "B10" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 12.7 0) (length 6.35)
+ (name "MGTPTXP1_216" (effects (font (size 1.27 1.27))))
+ (number "B2" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 5.08 0) (length 6.35)
+ (name "MGTPRXP0_216" (effects (font (size 1.27 1.27))))
+ (number "B4" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 0 0) (length 6.35)
+ (name "MGTPRXP1_216" (effects (font (size 1.27 1.27))))
+ (number "B6" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 -7.62 0) (length 6.35)
+ (name "MGTREFCLK0P_216" (effects (font (size 1.27 1.27))))
+ (number "B8" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 15.24 0) (length 6.35)
+ (name "MGTPTXN0_216" (effects (font (size 1.27 1.27))))
+ (number "D1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -38.1 17.78 0) (length 6.35)
+ (name "MGTPTXP0_216" (effects (font (size 1.27 1.27))))
+ (number "D2" (effects (font (size 1.27 1.27))))
+ )
+ )
+ (symbol "XC7A35T-CPG236_4_1"
+ (rectangle (start -31.75 10.16) (end 31.75 -10.16)
+ (stroke (width 0.254) (type default))
+ (fill (type background))
+ )
+ (pin power_in line (at 38.1 7.62 180) (length 6.35)
+ (name "MGTAVTT" (effects (font (size 1.27 1.27))))
+ (number "B1" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -38.1 7.62 0) (length 6.35)
+ (name "MGTAVCC" (effects (font (size 1.27 1.27))))
+ (number "C1" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 38.1 5.08 180) (length 6.35)
+ (name "MGTAVTT" (effects (font (size 1.27 1.27))))
+ (number "C5" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 38.1 -5.08 180) (length 6.35)
+ (name "MGTRREF_216" (effects (font (size 1.27 1.27))))
+ (number "C7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -38.1 5.08 0) (length 6.35)
+ (name "MGTAVCC" (effects (font (size 1.27 1.27))))
+ (number "E1" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 38.1 2.54 180) (length 6.35)
+ (name "MGTAVTT" (effects (font (size 1.27 1.27))))
+ (number "E2" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -38.1 2.54 0) (length 6.35)
+ (name "MGTAVCC" (effects (font (size 1.27 1.27))))
+ (number "F3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 38.1 0 180) (length 6.35)
+ (name "MGTAVTT" (effects (font (size 1.27 1.27))))
+ (number "G7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -38.1 0 0) (length 6.35)
+ (name "MGTAVCC" (effects (font (size 1.27 1.27))))
+ (number "G9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -38.1 -2.54 0) (length 6.35)
+ (name "MGTAVCC" (effects (font (size 1.27 1.27))))
+ (number "H9" (effects (font (size 1.27 1.27))))
+ )
+ )
+ (symbol "XC7A35T-CPG236_5_1"
+ (rectangle (start -31.75 34.29) (end 31.75 -40.64)
+ (stroke (width 0.254) (type default))
+ (fill (type background))
+ )
+ (pin bidirectional line (at 38.1 -35.56 180) (length 6.35)
+ (name "DXP_0" (effects (font (size 1.27 1.27))))
+ (number "A11" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -20.32 180) (length 6.35)
+ (name "VP_0" (effects (font (size 1.27 1.27))))
+ (number "A12" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -30.48 180) (length 6.35)
+ (name "VREFN_0" (effects (font (size 1.27 1.27))))
+ (number "A13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -38.1 180) (length 6.35)
+ (name "DXN_0" (effects (font (size 1.27 1.27))))
+ (number "B11" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -27.94 180) (length 6.35)
+ (name "VREFP_0" (effects (font (size 1.27 1.27))))
+ (number "B12" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -22.86 180) (length 6.35)
+ (name "VN_0" (effects (font (size 1.27 1.27))))
+ (number "B13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 7.62 180) (length 6.35)
+ (name "CCLK_0" (effects (font (size 1.27 1.27))))
+ (number "C11" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 12.7 180) (length 6.35)
+ (name "TCK_0" (effects (font (size 1.27 1.27))))
+ (number "C8" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 40.64 270) (length 6.35)
+ (name "VCCO_0" (effects (font (size 1.27 1.27))))
+ (number "G12" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 0 180) (length 6.35)
+ (name "M2_0" (effects (font (size 1.27 1.27))))
+ (number "U10" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -7.62 180) (length 6.35)
+ (name "INIT_B_0" (effects (font (size 1.27 1.27))))
+ (number "U11" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -5.08 180) (length 6.35)
+ (name "DONE_0" (effects (font (size 1.27 1.27))))
+ (number "U12" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -10.16 180) (length 6.35)
+ (name "PROGRAM_B_0" (effects (font (size 1.27 1.27))))
+ (number "V10" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 -15.24 180) (length 6.35)
+ (name "CFGBVS_0" (effects (font (size 1.27 1.27))))
+ (number "V11" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 5.08 180) (length 6.35)
+ (name "M0_0" (effects (font (size 1.27 1.27))))
+ (number "V12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 27.94 40.64 270) (length 6.35)
+ (name "VCCO_0" (effects (font (size 1.27 1.27))))
+ (number "V9" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 20.32 180) (length 6.35)
+ (name "TDI_0" (effects (font (size 1.27 1.27))))
+ (number "W10" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 2.54 180) (length 6.35)
+ (name "M1_0" (effects (font (size 1.27 1.27))))
+ (number "W11" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 17.78 180) (length 6.35)
+ (name "TDO_0" (effects (font (size 1.27 1.27))))
+ (number "W8" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 38.1 15.24 180) (length 6.35)
+ (name "TMS_0" (effects (font (size 1.27 1.27))))
+ (number "W9" (effects (font (size 1.27 1.27))))
+ )
+ )
+ (symbol "XC7A35T-CPG236_6_1"
+ (rectangle (start -19.05 45.72) (end 19.05 -45.72)
+ (stroke (width 0.254) (type default))
+ (fill (type background))
+ )
+ (pin power_in line (at -25.4 20.32 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "A1" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 7.62 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "A19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 17.78 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "A3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 15.24 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "A5" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 12.7 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "A7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 10.16 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "A9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -5.08 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "B14" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 5.08 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "B3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 2.54 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "B5" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 0 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "B7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -2.54 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "B9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -17.78 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "C10" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 35.56 0) (length 6.35)
+ (name "GNDADC_0" (effects (font (size 1.27 1.27))))
+ (number "C12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 33.02 0) (length 6.35)
+ (name "VCCADC_0" (effects (font (size 1.27 1.27))))
+ (number "C13" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -20.32 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "C19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -7.62 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "C2" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -10.16 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "C3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -12.7 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "C4" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -15.24 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "C6" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 30.48 0) (length 6.35)
+ (name "VCCBATT_0" (effects (font (size 1.27 1.27))))
+ (number "C9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -22.86 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "D3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -27.94 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "E17" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -25.4 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "E3" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -30.48 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "F1" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -35.56 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "F19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -33.02 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "F2" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -38.1 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "G1" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 43.18 180) (length 6.35)
+ (name "VCCINT" (effects (font (size 1.27 1.27))))
+ (number "G10" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -43.18 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "G11" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 -40.64 0) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "G8" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 40.64 180) (length 6.35)
+ (name "VCCINT" (effects (font (size 1.27 1.27))))
+ (number "H10" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 15.24 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "H11" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 12.7 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "H12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 43.18 0) (length 6.35)
+ (name "VCCAUX" (effects (font (size 1.27 1.27))))
+ (number "H13" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 10.16 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "H18" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 20.32 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "H7" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 17.78 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "H8" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 38.1 180) (length 6.35)
+ (name "VCCINT" (effects (font (size 1.27 1.27))))
+ (number "J10" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 2.54 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "J11" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 0 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "J12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 40.64 0) (length 6.35)
+ (name "VCCAUX" (effects (font (size 1.27 1.27))))
+ (number "J13" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 7.62 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "J8" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 5.08 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "J9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -2.54 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "K8" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 35.56 180) (length 6.35)
+ (name "VCCINT" (effects (font (size 1.27 1.27))))
+ (number "L10" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -10.16 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "L11" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -12.7 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "L19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -5.08 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "L8" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -7.62 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "L9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 33.02 180) (length 6.35)
+ (name "VCCINT" (effects (font (size 1.27 1.27))))
+ (number "M10" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 27.94 0) (length 6.35)
+ (name "VCCBRAM" (effects (font (size 1.27 1.27))))
+ (number "M11" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -17.78 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "M13" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -15.24 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "M9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 30.48 180) (length 6.35)
+ (name "VCCINT" (effects (font (size 1.27 1.27))))
+ (number "N10" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -25.4 25.4 0) (length 6.35)
+ (name "VCCBRAM" (effects (font (size 1.27 1.27))))
+ (number "N11" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -22.86 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "N12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -25.4 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "N13" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -20.32 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "N9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -27.94 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "P2" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -30.48 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "T19" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -33.02 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "U6" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -35.56 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "U9" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -38.1 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "V18" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -40.64 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "W1" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 25.4 -43.18 180) (length 6.35)
+ (name "GND" (effects (font (size 1.27 1.27))))
+ (number "W12" (effects (font (size 1.27 1.27))))
+ )
+ )
+ )
+ (symbol "MCU_ST_STM32F0:STM32F091RCTx" (in_bom yes) (on_board yes)
+ (property "Reference" "U" (at -12.7 46.99 0)
+ (effects (font (size 1.27 1.27)) (justify left))
+ )
+ (property "Value" "STM32F091RCTx" (at 10.16 46.99 0)
+ (effects (font (size 1.27 1.27)) (justify left))
+ )
+ (property "Footprint" "Package_QFP:LQFP-64_10x10mm_P0.5mm" (at -12.7 -43.18 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ (property "Datasheet" "https://www.st.com/resource/en/datasheet/stm32f091rc.pdf" (at 0 0 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (property "ki_locked" "" (at 0 0 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (property "ki_keywords" "Arm Cortex-M0 STM32F0 STM32F0x1" (at 0 0 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (property "ki_description" "STMicroelectronics Arm Cortex-M0 MCU, 256KB flash, 32KB RAM, 48 MHz, 2.0-3.6V, 52 GPIO, LQFP64" (at 0 0 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (property "ki_fp_filters" "LQFP*10x10mm*P0.5mm*" (at 0 0 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (symbol "STM32F091RCTx_0_1"
+ (rectangle (start -12.7 -43.18) (end 15.24 45.72)
+ (stroke (width 0.254) (type default))
+ (fill (type background))
+ )
+ )
+ (symbol "STM32F091RCTx_1_1"
+ (pin power_in line (at -5.08 48.26 270) (length 2.54)
+ (name "VBAT" (effects (font (size 1.27 1.27))))
+ (number "1" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -15.24 17.78 0) (length 2.54)
+ (name "PC2" (effects (font (size 1.27 1.27))))
+ (number "10" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN12" bidirectional line)
+ (alternate "I2S2_MCK" bidirectional line)
+ (alternate "SPI2_MISO" bidirectional line)
+ (alternate "USART8_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 15.24 0) (length 2.54)
+ (name "PC3" (effects (font (size 1.27 1.27))))
+ (number "11" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN13" bidirectional line)
+ (alternate "I2S2_SD" bidirectional line)
+ (alternate "SPI2_MOSI" bidirectional line)
+ (alternate "USART8_RX" bidirectional line)
+ )
+ (pin power_in line (at 2.54 -45.72 90) (length 2.54)
+ (name "VSSA" (effects (font (size 1.27 1.27))))
+ (number "12" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 5.08 48.26 270) (length 2.54)
+ (name "VDDA" (effects (font (size 1.27 1.27))))
+ (number "13" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 17.78 43.18 180) (length 2.54)
+ (name "PA0" (effects (font (size 1.27 1.27))))
+ (number "14" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN0" bidirectional line)
+ (alternate "COMP1_INM" bidirectional line)
+ (alternate "COMP1_OUT" bidirectional line)
+ (alternate "RTC_TAMP2" bidirectional line)
+ (alternate "SYS_WKUP1" bidirectional line)
+ (alternate "TIM2_CH1" bidirectional line)
+ (alternate "TIM2_ETR" bidirectional line)
+ (alternate "TSC_G1_IO1" bidirectional line)
+ (alternate "USART2_CTS" bidirectional line)
+ (alternate "USART4_TX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 40.64 180) (length 2.54)
+ (name "PA1" (effects (font (size 1.27 1.27))))
+ (number "15" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN1" bidirectional line)
+ (alternate "COMP1_INP" bidirectional line)
+ (alternate "TIM15_CH1N" bidirectional line)
+ (alternate "TIM2_CH2" bidirectional line)
+ (alternate "TSC_G1_IO2" bidirectional line)
+ (alternate "USART2_DE" bidirectional line)
+ (alternate "USART2_RTS" bidirectional line)
+ (alternate "USART4_RX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 38.1 180) (length 2.54)
+ (name "PA2" (effects (font (size 1.27 1.27))))
+ (number "16" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN2" bidirectional line)
+ (alternate "COMP2_INM" bidirectional line)
+ (alternate "COMP2_OUT" bidirectional line)
+ (alternate "SYS_WKUP4" bidirectional line)
+ (alternate "TIM15_CH1" bidirectional line)
+ (alternate "TIM2_CH3" bidirectional line)
+ (alternate "TSC_G1_IO3" bidirectional line)
+ (alternate "USART2_TX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 35.56 180) (length 2.54)
+ (name "PA3" (effects (font (size 1.27 1.27))))
+ (number "17" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN3" bidirectional line)
+ (alternate "COMP2_INP" bidirectional line)
+ (alternate "TIM15_CH2" bidirectional line)
+ (alternate "TIM2_CH4" bidirectional line)
+ (alternate "TSC_G1_IO4" bidirectional line)
+ (alternate "USART2_RX" bidirectional line)
+ )
+ (pin power_in line (at 0 -45.72 90) (length 2.54)
+ (name "VSS" (effects (font (size 1.27 1.27))))
+ (number "18" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at -2.54 48.26 270) (length 2.54)
+ (name "VDD" (effects (font (size 1.27 1.27))))
+ (number "19" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -15.24 -10.16 0) (length 2.54)
+ (name "PC13" (effects (font (size 1.27 1.27))))
+ (number "2" (effects (font (size 1.27 1.27))))
+ (alternate "RTC_OUT_ALARM" bidirectional line)
+ (alternate "RTC_OUT_CALIB" bidirectional line)
+ (alternate "RTC_TAMP1" bidirectional line)
+ (alternate "RTC_TS" bidirectional line)
+ (alternate "SYS_WKUP2" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 33.02 180) (length 2.54)
+ (name "PA4" (effects (font (size 1.27 1.27))))
+ (number "20" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN4" bidirectional line)
+ (alternate "COMP1_INM" bidirectional line)
+ (alternate "COMP2_INM" bidirectional line)
+ (alternate "DAC_OUT1" bidirectional line)
+ (alternate "I2S1_WS" bidirectional line)
+ (alternate "SPI1_NSS" bidirectional line)
+ (alternate "TIM14_CH1" bidirectional line)
+ (alternate "TSC_G2_IO1" bidirectional line)
+ (alternate "USART2_CK" bidirectional line)
+ (alternate "USART6_TX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 30.48 180) (length 2.54)
+ (name "PA5" (effects (font (size 1.27 1.27))))
+ (number "21" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN5" bidirectional line)
+ (alternate "CEC" bidirectional line)
+ (alternate "COMP1_INM" bidirectional line)
+ (alternate "COMP2_INM" bidirectional line)
+ (alternate "DAC_OUT2" bidirectional line)
+ (alternate "I2S1_CK" bidirectional line)
+ (alternate "SPI1_SCK" bidirectional line)
+ (alternate "TIM2_CH1" bidirectional line)
+ (alternate "TIM2_ETR" bidirectional line)
+ (alternate "TSC_G2_IO2" bidirectional line)
+ (alternate "USART6_RX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 27.94 180) (length 2.54)
+ (name "PA6" (effects (font (size 1.27 1.27))))
+ (number "22" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN6" bidirectional line)
+ (alternate "COMP1_OUT" bidirectional line)
+ (alternate "I2S1_MCK" bidirectional line)
+ (alternate "SPI1_MISO" bidirectional line)
+ (alternate "TIM16_CH1" bidirectional line)
+ (alternate "TIM1_BKIN" bidirectional line)
+ (alternate "TIM3_CH1" bidirectional line)
+ (alternate "TSC_G2_IO3" bidirectional line)
+ (alternate "USART3_CTS" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 25.4 180) (length 2.54)
+ (name "PA7" (effects (font (size 1.27 1.27))))
+ (number "23" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN7" bidirectional line)
+ (alternate "COMP2_OUT" bidirectional line)
+ (alternate "I2S1_SD" bidirectional line)
+ (alternate "SPI1_MOSI" bidirectional line)
+ (alternate "TIM14_CH1" bidirectional line)
+ (alternate "TIM17_CH1" bidirectional line)
+ (alternate "TIM1_CH1N" bidirectional line)
+ (alternate "TIM3_CH2" bidirectional line)
+ (alternate "TSC_G2_IO4" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 12.7 0) (length 2.54)
+ (name "PC4" (effects (font (size 1.27 1.27))))
+ (number "24" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN14" bidirectional line)
+ (alternate "USART3_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 10.16 0) (length 2.54)
+ (name "PC5" (effects (font (size 1.27 1.27))))
+ (number "25" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN15" bidirectional line)
+ (alternate "SYS_WKUP5" bidirectional line)
+ (alternate "TSC_G3_IO1" bidirectional line)
+ (alternate "USART3_RX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 0 180) (length 2.54)
+ (name "PB0" (effects (font (size 1.27 1.27))))
+ (number "26" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN8" bidirectional line)
+ (alternate "TIM1_CH2N" bidirectional line)
+ (alternate "TIM3_CH3" bidirectional line)
+ (alternate "TSC_G3_IO2" bidirectional line)
+ (alternate "USART3_CK" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -2.54 180) (length 2.54)
+ (name "PB1" (effects (font (size 1.27 1.27))))
+ (number "27" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN9" bidirectional line)
+ (alternate "TIM14_CH1" bidirectional line)
+ (alternate "TIM1_CH3N" bidirectional line)
+ (alternate "TIM3_CH4" bidirectional line)
+ (alternate "TSC_G3_IO3" bidirectional line)
+ (alternate "USART3_DE" bidirectional line)
+ (alternate "USART3_RTS" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -5.08 180) (length 2.54)
+ (name "PB2" (effects (font (size 1.27 1.27))))
+ (number "28" (effects (font (size 1.27 1.27))))
+ (alternate "TSC_G3_IO4" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -25.4 180) (length 2.54)
+ (name "PB10" (effects (font (size 1.27 1.27))))
+ (number "29" (effects (font (size 1.27 1.27))))
+ (alternate "CEC" bidirectional line)
+ (alternate "I2C2_SCL" bidirectional line)
+ (alternate "I2S2_CK" bidirectional line)
+ (alternate "SPI2_SCK" bidirectional line)
+ (alternate "TIM2_CH3" bidirectional line)
+ (alternate "TSC_SYNC" bidirectional line)
+ (alternate "USART3_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 -12.7 0) (length 2.54)
+ (name "PC14" (effects (font (size 1.27 1.27))))
+ (number "3" (effects (font (size 1.27 1.27))))
+ (alternate "RCC_OSC32_IN" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -27.94 180) (length 2.54)
+ (name "PB11" (effects (font (size 1.27 1.27))))
+ (number "30" (effects (font (size 1.27 1.27))))
+ (alternate "I2C2_SDA" bidirectional line)
+ (alternate "TIM2_CH4" bidirectional line)
+ (alternate "TSC_G6_IO1" bidirectional line)
+ (alternate "USART3_RX" bidirectional line)
+ )
+ (pin passive line (at 0 -45.72 90) (length 2.54) hide
+ (name "VSS" (effects (font (size 1.27 1.27))))
+ (number "31" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 0 48.26 270) (length 2.54)
+ (name "VDD" (effects (font (size 1.27 1.27))))
+ (number "32" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 17.78 -30.48 180) (length 2.54)
+ (name "PB12" (effects (font (size 1.27 1.27))))
+ (number "33" (effects (font (size 1.27 1.27))))
+ (alternate "I2S2_WS" bidirectional line)
+ (alternate "SPI2_NSS" bidirectional line)
+ (alternate "TIM15_BKIN" bidirectional line)
+ (alternate "TIM1_BKIN" bidirectional line)
+ (alternate "TSC_G6_IO2" bidirectional line)
+ (alternate "USART3_CK" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -33.02 180) (length 2.54)
+ (name "PB13" (effects (font (size 1.27 1.27))))
+ (number "34" (effects (font (size 1.27 1.27))))
+ (alternate "I2C2_SCL" bidirectional line)
+ (alternate "I2S2_CK" bidirectional line)
+ (alternate "SPI2_SCK" bidirectional line)
+ (alternate "TIM1_CH1N" bidirectional line)
+ (alternate "TSC_G6_IO3" bidirectional line)
+ (alternate "USART3_CTS" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -35.56 180) (length 2.54)
+ (name "PB14" (effects (font (size 1.27 1.27))))
+ (number "35" (effects (font (size 1.27 1.27))))
+ (alternate "I2C2_SDA" bidirectional line)
+ (alternate "I2S2_MCK" bidirectional line)
+ (alternate "SPI2_MISO" bidirectional line)
+ (alternate "TIM15_CH1" bidirectional line)
+ (alternate "TIM1_CH2N" bidirectional line)
+ (alternate "TSC_G6_IO4" bidirectional line)
+ (alternate "USART3_DE" bidirectional line)
+ (alternate "USART3_RTS" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -38.1 180) (length 2.54)
+ (name "PB15" (effects (font (size 1.27 1.27))))
+ (number "36" (effects (font (size 1.27 1.27))))
+ (alternate "I2S2_SD" bidirectional line)
+ (alternate "RTC_REFIN" bidirectional line)
+ (alternate "SPI2_MOSI" bidirectional line)
+ (alternate "SYS_WKUP7" bidirectional line)
+ (alternate "TIM15_CH1N" bidirectional line)
+ (alternate "TIM15_CH2" bidirectional line)
+ (alternate "TIM1_CH3N" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 7.62 0) (length 2.54)
+ (name "PC6" (effects (font (size 1.27 1.27))))
+ (number "37" (effects (font (size 1.27 1.27))))
+ (alternate "TIM3_CH1" bidirectional line)
+ (alternate "USART7_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 5.08 0) (length 2.54)
+ (name "PC7" (effects (font (size 1.27 1.27))))
+ (number "38" (effects (font (size 1.27 1.27))))
+ (alternate "TIM3_CH2" bidirectional line)
+ (alternate "USART7_RX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 2.54 0) (length 2.54)
+ (name "PC8" (effects (font (size 1.27 1.27))))
+ (number "39" (effects (font (size 1.27 1.27))))
+ (alternate "TIM3_CH3" bidirectional line)
+ (alternate "USART8_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 -15.24 0) (length 2.54)
+ (name "PC15" (effects (font (size 1.27 1.27))))
+ (number "4" (effects (font (size 1.27 1.27))))
+ (alternate "RCC_OSC32_OUT" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 0 0) (length 2.54)
+ (name "PC9" (effects (font (size 1.27 1.27))))
+ (number "40" (effects (font (size 1.27 1.27))))
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "TIM3_CH4" bidirectional line)
+ (alternate "USART8_RX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 22.86 180) (length 2.54)
+ (name "PA8" (effects (font (size 1.27 1.27))))
+ (number "41" (effects (font (size 1.27 1.27))))
+ (alternate "CRS_SYNC" bidirectional line)
+ (alternate "RCC_MCO" bidirectional line)
+ (alternate "TIM1_CH1" bidirectional line)
+ (alternate "USART1_CK" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 20.32 180) (length 2.54)
+ (name "PA9" (effects (font (size 1.27 1.27))))
+ (number "42" (effects (font (size 1.27 1.27))))
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "I2C1_SCL" bidirectional line)
+ (alternate "RCC_MCO" bidirectional line)
+ (alternate "TIM15_BKIN" bidirectional line)
+ (alternate "TIM1_CH2" bidirectional line)
+ (alternate "TSC_G4_IO1" bidirectional line)
+ (alternate "USART1_TX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 17.78 180) (length 2.54)
+ (name "PA10" (effects (font (size 1.27 1.27))))
+ (number "43" (effects (font (size 1.27 1.27))))
+ (alternate "I2C1_SDA" bidirectional line)
+ (alternate "TIM17_BKIN" bidirectional line)
+ (alternate "TIM1_CH3" bidirectional line)
+ (alternate "TSC_G4_IO2" bidirectional line)
+ (alternate "USART1_RX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 15.24 180) (length 2.54)
+ (name "PA11" (effects (font (size 1.27 1.27))))
+ (number "44" (effects (font (size 1.27 1.27))))
+ (alternate "CAN_RX" bidirectional line)
+ (alternate "COMP1_OUT" bidirectional line)
+ (alternate "I2C2_SCL" bidirectional line)
+ (alternate "TIM1_CH4" bidirectional line)
+ (alternate "TSC_G4_IO3" bidirectional line)
+ (alternate "USART1_CTS" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 12.7 180) (length 2.54)
+ (name "PA12" (effects (font (size 1.27 1.27))))
+ (number "45" (effects (font (size 1.27 1.27))))
+ (alternate "CAN_TX" bidirectional line)
+ (alternate "COMP2_OUT" bidirectional line)
+ (alternate "I2C2_SDA" bidirectional line)
+ (alternate "TIM1_ETR" bidirectional line)
+ (alternate "TSC_G4_IO4" bidirectional line)
+ (alternate "USART1_DE" bidirectional line)
+ (alternate "USART1_RTS" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 10.16 180) (length 2.54)
+ (name "PA13" (effects (font (size 1.27 1.27))))
+ (number "46" (effects (font (size 1.27 1.27))))
+ (alternate "IR_OUT" bidirectional line)
+ (alternate "SYS_SWDIO" bidirectional line)
+ )
+ (pin passive line (at 0 -45.72 90) (length 2.54) hide
+ (name "VSS" (effects (font (size 1.27 1.27))))
+ (number "47" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 7.62 48.26 270) (length 2.54)
+ (name "VDDIO2" (effects (font (size 1.27 1.27))))
+ (number "48" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 17.78 7.62 180) (length 2.54)
+ (name "PA14" (effects (font (size 1.27 1.27))))
+ (number "49" (effects (font (size 1.27 1.27))))
+ (alternate "SYS_SWCLK" bidirectional line)
+ (alternate "USART2_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 38.1 0) (length 2.54)
+ (name "PF0" (effects (font (size 1.27 1.27))))
+ (number "5" (effects (font (size 1.27 1.27))))
+ (alternate "CRS_SYNC" bidirectional line)
+ (alternate "I2C1_SDA" bidirectional line)
+ (alternate "RCC_OSC_IN" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 5.08 180) (length 2.54)
+ (name "PA15" (effects (font (size 1.27 1.27))))
+ (number "50" (effects (font (size 1.27 1.27))))
+ (alternate "I2S1_WS" bidirectional line)
+ (alternate "SPI1_NSS" bidirectional line)
+ (alternate "TIM2_CH1" bidirectional line)
+ (alternate "TIM2_ETR" bidirectional line)
+ (alternate "USART2_RX" bidirectional line)
+ (alternate "USART4_DE" bidirectional line)
+ (alternate "USART4_RTS" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 -2.54 0) (length 2.54)
+ (name "PC10" (effects (font (size 1.27 1.27))))
+ (number "51" (effects (font (size 1.27 1.27))))
+ (alternate "USART3_TX" bidirectional line)
+ (alternate "USART4_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 -5.08 0) (length 2.54)
+ (name "PC11" (effects (font (size 1.27 1.27))))
+ (number "52" (effects (font (size 1.27 1.27))))
+ (alternate "USART3_RX" bidirectional line)
+ (alternate "USART4_RX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 -7.62 0) (length 2.54)
+ (name "PC12" (effects (font (size 1.27 1.27))))
+ (number "53" (effects (font (size 1.27 1.27))))
+ (alternate "USART3_CK" bidirectional line)
+ (alternate "USART4_CK" bidirectional line)
+ (alternate "USART5_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 27.94 0) (length 2.54)
+ (name "PD2" (effects (font (size 1.27 1.27))))
+ (number "54" (effects (font (size 1.27 1.27))))
+ (alternate "TIM3_ETR" bidirectional line)
+ (alternate "USART3_DE" bidirectional line)
+ (alternate "USART3_RTS" bidirectional line)
+ (alternate "USART5_RX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -7.62 180) (length 2.54)
+ (name "PB3" (effects (font (size 1.27 1.27))))
+ (number "55" (effects (font (size 1.27 1.27))))
+ (alternate "I2S1_CK" bidirectional line)
+ (alternate "SPI1_SCK" bidirectional line)
+ (alternate "TIM2_CH2" bidirectional line)
+ (alternate "TSC_G5_IO1" bidirectional line)
+ (alternate "USART5_TX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -10.16 180) (length 2.54)
+ (name "PB4" (effects (font (size 1.27 1.27))))
+ (number "56" (effects (font (size 1.27 1.27))))
+ (alternate "I2S1_MCK" bidirectional line)
+ (alternate "SPI1_MISO" bidirectional line)
+ (alternate "TIM17_BKIN" bidirectional line)
+ (alternate "TIM3_CH1" bidirectional line)
+ (alternate "TSC_G5_IO2" bidirectional line)
+ (alternate "USART5_RX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -12.7 180) (length 2.54)
+ (name "PB5" (effects (font (size 1.27 1.27))))
+ (number "57" (effects (font (size 1.27 1.27))))
+ (alternate "I2C1_SMBA" bidirectional line)
+ (alternate "I2S1_SD" bidirectional line)
+ (alternate "SPI1_MOSI" bidirectional line)
+ (alternate "SYS_WKUP6" bidirectional line)
+ (alternate "TIM16_BKIN" bidirectional line)
+ (alternate "TIM3_CH2" bidirectional line)
+ (alternate "USART5_CK" bidirectional line)
+ (alternate "USART5_DE" bidirectional line)
+ (alternate "USART5_RTS" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -15.24 180) (length 2.54)
+ (name "PB6" (effects (font (size 1.27 1.27))))
+ (number "58" (effects (font (size 1.27 1.27))))
+ (alternate "I2C1_SCL" bidirectional line)
+ (alternate "TIM16_CH1N" bidirectional line)
+ (alternate "TSC_G5_IO3" bidirectional line)
+ (alternate "USART1_TX" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -17.78 180) (length 2.54)
+ (name "PB7" (effects (font (size 1.27 1.27))))
+ (number "59" (effects (font (size 1.27 1.27))))
+ (alternate "I2C1_SDA" bidirectional line)
+ (alternate "TIM17_CH1N" bidirectional line)
+ (alternate "TSC_G5_IO4" bidirectional line)
+ (alternate "USART1_RX" bidirectional line)
+ (alternate "USART4_CTS" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 35.56 0) (length 2.54)
+ (name "PF1" (effects (font (size 1.27 1.27))))
+ (number "6" (effects (font (size 1.27 1.27))))
+ (alternate "I2C1_SCL" bidirectional line)
+ (alternate "RCC_OSC_OUT" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 33.02 0) (length 2.54)
+ (name "PF11" (effects (font (size 1.27 1.27))))
+ (number "60" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at 17.78 -20.32 180) (length 2.54)
+ (name "PB8" (effects (font (size 1.27 1.27))))
+ (number "61" (effects (font (size 1.27 1.27))))
+ (alternate "CAN_RX" bidirectional line)
+ (alternate "CEC" bidirectional line)
+ (alternate "I2C1_SCL" bidirectional line)
+ (alternate "TIM16_CH1" bidirectional line)
+ (alternate "TSC_SYNC" bidirectional line)
+ )
+ (pin bidirectional line (at 17.78 -22.86 180) (length 2.54)
+ (name "PB9" (effects (font (size 1.27 1.27))))
+ (number "62" (effects (font (size 1.27 1.27))))
+ (alternate "CAN_TX" bidirectional line)
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "I2C1_SDA" bidirectional line)
+ (alternate "I2S2_WS" bidirectional line)
+ (alternate "IR_OUT" bidirectional line)
+ (alternate "SPI2_NSS" bidirectional line)
+ (alternate "TIM17_CH1" bidirectional line)
+ )
+ (pin passive line (at 0 -45.72 90) (length 2.54) hide
+ (name "VSS" (effects (font (size 1.27 1.27))))
+ (number "63" (effects (font (size 1.27 1.27))))
+ )
+ (pin power_in line (at 2.54 48.26 270) (length 2.54)
+ (name "VDD" (effects (font (size 1.27 1.27))))
+ (number "64" (effects (font (size 1.27 1.27))))
+ )
+ (pin input line (at -15.24 43.18 0) (length 2.54)
+ (name "NRST" (effects (font (size 1.27 1.27))))
+ (number "7" (effects (font (size 1.27 1.27))))
+ )
+ (pin bidirectional line (at -15.24 22.86 0) (length 2.54)
+ (name "PC0" (effects (font (size 1.27 1.27))))
+ (number "8" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN10" bidirectional line)
+ (alternate "USART6_TX" bidirectional line)
+ (alternate "USART7_TX" bidirectional line)
+ )
+ (pin bidirectional line (at -15.24 20.32 0) (length 2.54)
+ (name "PC1" (effects (font (size 1.27 1.27))))
+ (number "9" (effects (font (size 1.27 1.27))))
+ (alternate "ADC_IN11" bidirectional line)
+ (alternate "USART6_RX" bidirectional line)
+ (alternate "USART7_RX" bidirectional line)
+ )
+ )
+ )
+ )
+
+
+ (wire (pts (xy 128.27 50.8) (xy 130.81 50.8))
+ (stroke (width 0) (type default))
+ (uuid 45248ecd-ee4b-4ea2-af73-287f6387e023)
+ )
+ (wire (pts (xy 237.49 58.42) (xy 240.03 58.42))
+ (stroke (width 0) (type default))
+ (uuid 6aab3e3f-2152-43e4-9dc9-ebd992f2b620)
+ )
+ (wire (pts (xy 128.27 60.96) (xy 130.81 60.96))
+ (stroke (width 0) (type default))
+ (uuid 83173bcb-ab3f-4aa4-8764-97dec94555f6)
+ )
+ (wire (pts (xy 237.49 53.34) (xy 240.03 53.34))
+ (stroke (width 0) (type default))
+ (uuid 8fe19af1-4366-40c5-a172-d901753c5aba)
+ )
+
+ (global_label "GP_P2_LEFT" (shape input) (at 175.26 102.87 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 07ee05cd-2cfe-4e95-894a-1d90597b1926)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 161.1662 102.87 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "SPI_CLK" (shape output) (at 240.03 53.34 0) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify left))
+ (uuid 0b707211-fac4-4b34-87bc-40aa2d3f360a)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 250.5558 53.34 0)
+ (effects (font (size 1.27 1.27)) (justify left) hide)
+ )
+ )
+ (global_label "GP_P1_BUT_2" (shape input) (at 175.26 90.17 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 17cb1049-d8f8-4432-a5e3-536077b0511b)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 159.6543 90.17 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "GP_P1_RIGHT" (shape input) (at 175.26 82.55 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 32bda99c-ae4d-4b9c-8179-066f3a3468f6)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 159.9566 82.55 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "GP_P2_UP" (shape input) (at 175.26 107.95 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 53fd3333-ae47-4955-abf3-c321bc82554b)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 162.799 107.95 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "GP_P1_LEFT" (shape input) (at 175.26 80.01 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 5db46339-17ed-46d7-837a-c971db03a990)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 161.1662 80.01 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "GP_P1_UP" (shape input) (at 175.26 85.09 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 6088b30b-cded-4934-a067-a0d96ef62981)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 162.799 85.09 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "GP_P1_BUT_1" (shape input) (at 175.26 87.63 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 846511d3-01ef-46ec-9812-b1d57f483244)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 159.6543 87.63 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "SPI_MOSI" (shape input) (at 130.81 60.96 0) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify left))
+ (uuid 8509abfe-1aad-475b-b8cf-5c88d9b7fba0)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 142.3639 60.96 0)
+ (effects (font (size 1.27 1.27)) (justify left) hide)
+ )
+ )
+ (global_label "GP_P2_DOWN" (shape input) (at 175.26 100.33 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid 8c703da6-5cbe-482c-8520-3b3d06e4dd10)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 160.0171 100.33 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "GP_P1_DOWN" (shape input) (at 175.26 77.47 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid aa8f6c1f-d1f2-46d8-b1cb-d151fe665499)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 160.0171 77.47 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "GP_P2_RIGHT" (shape input) (at 175.26 105.41 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid be612968-9ba8-45ae-9575-ee5e47f785c3)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 159.9566 105.41 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "SPI_CLK" (shape input) (at 130.81 50.8 0) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify left))
+ (uuid cf66c093-1ca9-4057-8bbd-aeeb66852a40)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 141.3358 50.8 0)
+ (effects (font (size 1.27 1.27)) (justify left) hide)
+ )
+ )
+ (global_label "GP_P2_BUT_2" (shape input) (at 175.26 113.03 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid f05f290c-daf7-4c98-906e-7b236d4b8653)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 159.6543 113.03 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+ (global_label "SPI_MOSI" (shape output) (at 240.03 58.42 0) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify left))
+ (uuid f775a504-9c3f-4558-9e0e-366fe34b0bc7)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 251.5839 58.42 0)
+ (effects (font (size 1.27 1.27)) (justify left) hide)
+ )
+ )
+ (global_label "GP_P2_BUT_1" (shape input) (at 175.26 110.49 180) (fields_autoplaced)
+ (effects (font (size 1.27 1.27)) (justify right))
+ (uuid f99f4681-dfb1-423f-9e0b-3294db075677)
+ (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 159.6543 110.49 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ )
+
+ (symbol (lib_id "MCU_ST_STM32F0:STM32F091RCTx") (at 219.71 83.82 0) (unit 1)
+ (in_bom yes) (on_board yes) (dnp no)
+ (uuid 0eccff7f-b8ed-40d2-bef6-3550c7c06b44)
+ (property "Reference" "U1" (at 224.2059 129.54 0)
+ (effects (font (size 1.27 1.27)) (justify left))
+ )
+ (property "Value" "STM32F091RCTx" (at 224.2059 132.08 0)
+ (effects (font (size 1.27 1.27)) (justify left))
+ )
+ (property "Footprint" "Package_QFP:LQFP-64_10x10mm_P0.5mm" (at 207.01 127 0)
+ (effects (font (size 1.27 1.27)) (justify right) hide)
+ )
+ (property "Datasheet" "https://www.st.com/resource/en/datasheet/stm32f091rc.pdf" (at 219.71 83.82 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (pin "1" (uuid fa0097f4-c658-485c-9248-0116ce786e7a))
+ (pin "10" (uuid 4a4d6c33-a01b-4d19-b21e-e0a7e74c299d))
+ (pin "11" (uuid f982c192-173c-4e8c-aa38-dc5926e0243e))
+ (pin "12" (uuid 6277e5ca-ae24-457f-bd79-bd5f56ed03e2))
+ (pin "13" (uuid 5062e642-5936-4c2d-8eaf-862844734123))
+ (pin "14" (uuid 47eeb4ee-e3fb-452e-99c0-6510fbb8eb10))
+ (pin "15" (uuid 3cf3869b-b50b-4602-8b43-5a78138e63aa))
+ (pin "16" (uuid 2148dd57-513c-4596-8ed3-db09c304672e))
+ (pin "17" (uuid 139d102e-42dc-4324-ab61-8f4c864bd524))
+ (pin "18" (uuid 11870aac-203f-42a3-a10d-74e7f9fae817))
+ (pin "19" (uuid 4d64b1e2-6af3-49d7-85e3-56c2f89d27d8))
+ (pin "2" (uuid 41126fd6-cbca-4cd0-8b50-4f3ae0dbf5fd))
+ (pin "20" (uuid 44897108-d61a-46e4-b598-4bfbc3122587))
+ (pin "21" (uuid f1a12c80-5602-49e7-b9fd-7651e64d5103))
+ (pin "22" (uuid fa00348b-f666-421a-b6f7-4cb246a4505f))
+ (pin "23" (uuid 594f2b1e-bfc3-4e8d-80ab-9f2bf83d341c))
+ (pin "24" (uuid 7d6283b6-3701-4c75-b961-f7577af7fee0))
+ (pin "25" (uuid 7bbfa2bd-a489-40d2-8290-f9f30817fa4d))
+ (pin "26" (uuid d67e3b25-bd18-4996-882b-91b7ba478bba))
+ (pin "27" (uuid ab64f78e-0439-4ebb-bc23-d216fd7f3694))
+ (pin "28" (uuid 5abc2a0e-4df0-4ae4-9472-8fd386830792))
+ (pin "29" (uuid 0d46373f-9b80-4160-bedf-79df8e309d34))
+ (pin "3" (uuid 48a48e73-896d-49f0-8ec2-1979aedd8061))
+ (pin "30" (uuid 33247740-20dc-4ead-a4f2-9bc8f0067a35))
+ (pin "31" (uuid 1ecbfeb4-cce1-40a2-8f57-65f3a52504ea))
+ (pin "32" (uuid 44d28163-1cc5-411a-897c-410901722a7b))
+ (pin "33" (uuid f6609f50-eea4-447e-9ba6-ade5d9cabe42))
+ (pin "34" (uuid 8b464bcf-f368-4e68-84c3-ea4c0a924d47))
+ (pin "35" (uuid ba0a395b-4d60-4e01-8963-dd02d3b4740a))
+ (pin "36" (uuid 435532ac-7110-4a96-8c4e-54afae8a38fc))
+ (pin "37" (uuid eb0612a9-4b32-4b79-8027-8c9d0bcc4c51))
+ (pin "38" (uuid d44e5e40-2d64-4cdf-8615-724b73cbfbba))
+ (pin "39" (uuid adaea3ad-542c-4379-91bc-ad15676ba885))
+ (pin "4" (uuid 05c7f272-f0b9-4635-88ba-33b77a70a28c))
+ (pin "40" (uuid e3c53a59-bdfa-48db-8c1b-43aaa08441ac))
+ (pin "41" (uuid 3ac8f941-e30f-4cf2-8784-a7400bd7fcfb))
+ (pin "42" (uuid d4aca600-a791-4d1d-a754-cb9fa3e653f6))
+ (pin "43" (uuid ef3a5bc3-8b3e-4054-a4d8-e83af2841ffa))
+ (pin "44" (uuid 8c4ccbe2-12d7-4e03-9959-1f234f0b7a43))
+ (pin "45" (uuid 168c46f5-ac91-4ea6-b010-e60aea126d2e))
+ (pin "46" (uuid 298abf97-af8f-4fe4-b8c7-a536dfaeb767))
+ (pin "47" (uuid 302d2009-e11f-4aca-b8a4-f1f801da5936))
+ (pin "48" (uuid 0db66cfc-f3ff-49bc-aa1e-fb8708d0b447))
+ (pin "49" (uuid 9d5a8c35-ba32-487d-96b5-30a3015dbe17))
+ (pin "5" (uuid 3c1a0ad5-7688-4d5c-9017-1e33815222c1))
+ (pin "50" (uuid e3e0f208-4b85-448d-82fa-6cfd86bf32c6))
+ (pin "51" (uuid b52ee081-7229-44bc-920f-9b98da1c71e8))
+ (pin "52" (uuid f6b653e1-605d-47ff-941c-c42800163b4b))
+ (pin "53" (uuid 77e46e39-e27f-489f-913f-1222cb1754a9))
+ (pin "54" (uuid adad2c82-ce1d-40d1-83b0-fbdbec5a3210))
+ (pin "55" (uuid 0de99495-785d-496b-b99c-8fcff413e00d))
+ (pin "56" (uuid f0ce53fa-15a2-43ee-ad91-398eddc25c55))
+ (pin "57" (uuid 8ed9d357-63d6-409a-8d05-997a2853be58))
+ (pin "58" (uuid 9917b0af-78ac-4c47-a2bb-131a2b985993))
+ (pin "59" (uuid 1972f9f7-7b50-4ba0-a870-35a4a933cf0c))
+ (pin "6" (uuid 6bf7f5aa-46b3-4256-b160-d1d1f314f6ed))
+ (pin "60" (uuid c4c4f768-e559-4159-95b2-e46b124e67fc))
+ (pin "61" (uuid 156eae32-467b-4d28-a832-1731dec8ac33))
+ (pin "62" (uuid 80b507b1-d35b-438f-b4a6-7f5609ea5ef1))
+ (pin "63" (uuid 08565d11-8348-4f53-aed5-4283b454e454))
+ (pin "64" (uuid 8a715651-ce06-4233-949c-61676cca25f5))
+ (pin "7" (uuid 59151b96-4dca-4765-b86c-3f2dc043e737))
+ (pin "8" (uuid e1ca4371-a6ce-4504-b09d-7bd7e06351b1))
+ (pin "9" (uuid 2ac16a37-e256-4d20-b085-505467fbb282))
+ (instances
+ (project "hardware"
+ (path "/9c6bd711-93fb-4327-8ec4-bcfe43c3c3c8"
+ (reference "U1") (unit 1)
+ )
+ )
+ )
+ )
+
+ (symbol (lib_id "FPGA_Xilinx_Artix7:XC7A35T-CPG236") (at 77.47 101.6 0) (unit 1)
+ (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
+ (uuid be9b1cde-5098-4ba0-9cde-b4c8702d743e)
+ (property "Reference" "U2" (at 77.47 177.8 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (property "Value" "XC7A35T-CPG236" (at 77.47 180.34 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (property "Footprint" "" (at 77.47 101.6 0)
+ (effects (font (size 1.27 1.27)) hide)
+ )
+ (property "Datasheet" "" (at 77.47 101.6 0)
+ (effects (font (size 1.27 1.27)))
+ )
+ (pin "A14" (uuid 508d4c60-c3d8-4638-817b-7124b8138268))
+ (pin "A15" (uuid 27afc36d-9a85-49b6-abe6-3ffc58bf129b))
+ (pin "A16" (uuid e7dffcaa-7266-4cb7-9bc0-ff07241110ab))
+ (pin "A17" (uuid f22efb78-fbc2-40cb-9afc-92435ef5a3b7))
+ (pin "A18" (uuid d77ea860-aa21-482f-91ed-4435565f771f))
+ (pin "B15" (uuid 7fe5f8f7-8843-470c-97af-e2ecad63514b))
+ (pin "B16" (uuid cf200bca-7550-416b-a961-aff4101f9920))
+ (pin "B17" (uuid 2f0061a9-5045-4d9b-9de1-56a2a001ef62))
+ (pin "B18" (uuid 9753e917-688e-4292-b73c-4f9eac4609ac))
+ (pin "B19" (uuid 235b75f7-af17-4ee5-9955-606ddaf59ee6))
+ (pin "C14" (uuid 8222e9b2-bdfa-4c12-83a4-b20cec33c7ab))
+ (pin "C15" (uuid 07eaf0e5-230e-4f8c-8124-f927874a984e))
+ (pin "C16" (uuid 963c2ba7-3c1f-4804-97ca-597525f81547))
+ (pin "C17" (uuid ad6bdf66-f65c-4287-9d0d-32cbf8f988e3))
+ (pin "C18" (uuid 02511511-2668-47c2-8cdd-743e3b0d67db))
+ (pin "D17" (uuid 444e1a94-d308-4c48-843c-59765edd086c))
+ (pin "D18" (uuid 1c780fd0-2e78-4359-a640-9e9fd63e1fe7))
+ (pin "D19" (uuid 373a2e2a-895c-4dbe-bec9-572bdd4d2d50))
+ (pin "E18" (uuid 07f57f6f-7806-4490-9cf0-7b0827f3aca5))
+ (pin "E19" (uuid a90d729e-ba01-4610-b63b-d3580a8776cb))
+ (pin "F17" (uuid 15c89453-024e-4f4a-ab24-188a86a27b8d))
+ (pin "F18" (uuid ec121bec-7f54-4871-88c0-35fa91373867))
+ (pin "G13" (uuid 40886b30-ceb7-4d3b-9f39-455ae942c74a))
+ (pin "G17" (uuid 66778ba6-fdf0-422d-a7a2-515654fb7151))
+ (pin "G18" (uuid e05ca092-07a5-4acc-85b2-716e99636ea5))
+ (pin "G19" (uuid 37cc4893-f289-4c19-b6a3-cc7b79315228))
+ (pin "H17" (uuid 7cb925e4-67e7-41e8-8860-3856c52ec347))
+ (pin "H19" (uuid 79d7cba0-9c21-4768-827f-6410e2201c4c))
+ (pin "J17" (uuid 11ffa21a-e693-4e92-a3d7-da840fcfd343))
+ (pin "J18" (uuid 8edc2c1d-3be3-4924-984d-5bc871137a01))
+ (pin "J19" (uuid ffc1bef5-6500-4a05-a8a8-319e161fe0ff))
+ (pin "K12" (uuid 82894033-0c3a-4f2d-b29a-1844ba8d275c))
+ (pin "K13" (uuid e279a789-e678-45fe-9c4f-58dcab52564c))
+ (pin "K17" (uuid 3d65b223-d4f2-4980-a351-66b2c743e71a))
+ (pin "K18" (uuid 87352920-88b9-49ab-8895-ae1f5d1f53b6))
+ (pin "K19" (uuid 8a131724-9727-4430-b063-d89ea6f2f2ca))
+ (pin "L12" (uuid 3f009cb0-3d5d-4ad5-9836-c31617e689ff))
+ (pin "L13" (uuid d0b4b2a5-61aa-40bf-a8d8-ab74b74afb32))
+ (pin "L17" (uuid c8aaa6c3-82e6-40e6-ad99-d4346acb18de))
+ (pin "L18" (uuid ac2df9a6-ab83-442b-8d68-9469077b5ed8))
+ (pin "M12" (uuid 9b4e25c2-e66b-485f-8708-d58b3aaa8a03))
+ (pin "M17" (uuid 8e47b54e-06bd-4b19-ae0b-f7c91e4e52c5))
+ (pin "M18" (uuid 27b396d4-89b1-4b27-ab9c-25c862da58d2))
+ (pin "M19" (uuid be0dd454-6779-49a5-8669-f401ff86917e))
+ (pin "N17" (uuid 33e3f617-dfb7-42b9-b5ad-fc34a2d33e08))
+ (pin "N18" (uuid 8afa2c82-930f-4cd3-bf85-962b4bb60313))
+ (pin "N19" (uuid 7b3c9b83-7c18-4a20-9f60-3a0a17cc5f71))
+ (pin "P17" (uuid c4201d75-0651-408f-a1a2-082f3e60172e))
+ (pin "P18" (uuid 94eac6d0-b033-49c2-9d18-e42c04c0ffb6))
+ (pin "P19" (uuid 3518e2a5-5135-48ef-a6de-7b9ef03f8c5d))
+ (pin "R17" (uuid 0873e0a5-cc27-4c17-8cd6-3424627c5876))
+ (pin "R18" (uuid a9faa32c-1210-4023-a666-7f98d7124f2f))
+ (pin "R19" (uuid 8d45c82a-2d50-467c-86ef-805c4e63908d))
+ (pin "T17" (uuid e483361b-4814-4af4-a988-0a4f316f6a94))
+ (pin "T18" (uuid af6851d1-3433-4257-b7f8-bc5bb2d9aa2e))
+ (pin "U13" (uuid 85faccae-dae2-4598-97ca-86dbb5f8c8e0))
+ (pin "U14" (uuid c749aceb-beac-4110-a3d2-9b9aa16fa8ae))
+ (pin "U15" (uuid d1acfa4e-a89d-44f0-85e2-1c79bd2e5dd8))
+ (pin "U16" (uuid 531cf274-3440-4fb7-a106-f6ac2b593888))
+ (pin "U17" (uuid ea51fa45-8c6e-4627-a55e-09855a8fe52b))
+ (pin "U18" (uuid 6794a3d6-cbc3-49a2-8199-365d8a1976c9))
+ (pin "U19" (uuid fc7549a6-963c-4f4c-9d36-374a5e78c027))
+ (pin "V13" (uuid fdf41aaa-3a4c-4436-b8e0-74b21a71b7cd))
+ (pin "V14" (uuid b0da0a86-ce74-4258-917f-cc478cb2bc8f))
+ (pin "V15" (uuid 7bc24b6a-965e-4141-938a-81b19b21e599))
+ (pin "V16" (uuid 65ff3ef5-5706-44be-bb14-3d245685b4e0))
+ (pin "V17" (uuid 4cdf6e1e-ab9d-46b8-beab-6b08df956d10))
+ (pin "V19" (uuid 8539a62a-1392-4b48-995e-c56baddba2ea))
+ (pin "W13" (uuid 3a6d4d02-b2fc-425d-a215-81917784b9ad))
+ (pin "W14" (uuid 50defb3c-0f5d-4d04-a00c-67cfe0db6d6b))
+ (pin "W15" (uuid 3efbe8c0-63d3-4cb3-88dc-38798062ba7f))
+ (pin "W16" (uuid fc698360-01ac-4c67-8687-95f126dc5bdb))
+ (pin "W17" (uuid 531accc5-111d-441a-8a4d-36b73545d741))
+ (pin "W18" (uuid ae029038-79dd-4592-943e-531c426c656b))
+ (pin "W19" (uuid b2798ba7-f950-4bb6-a3dd-ef2fc4ef53f8))
+ (pin "G2" (uuid fc4610bd-cc0d-487a-b15c-7ecab27970d9))
+ (pin "G3" (uuid 6848bca2-cb99-4007-a4de-dea28ceb0fa7))
+ (pin "H1" (uuid 4643b49c-463c-4c23-abf9-648cb0c80b2c))
+ (pin "H2" (uuid 55ff1d65-6588-4689-b501-53ec656a71c4))
+ (pin "H3" (uuid e5035286-023d-4f8b-b33d-89cdeabe32b2))
+ (pin "J1" (uuid b3cf2eac-2afc-4ddc-a0ff-d7137d32823c))
+ (pin "J2" (uuid f9e9a687-0249-42d5-be51-e6bbedd3e8cb))
+ (pin "J3" (uuid caae61b9-e99a-4ef2-9747-89ada29af704))
+ (pin "J7" (uuid a988b64c-0966-44e7-b1ab-437217837366))
+ (pin "K1" (uuid 3a1259fa-3aa8-43dd-a007-4b891f0e96ad))
+ (pin "K2" (uuid 4bbec1f5-02bb-4ed3-b1a1-22772e3f516a))
+ (pin "K3" (uuid 4479713f-0cab-4be7-b6f4-4473431cf24e))
+ (pin "K7" (uuid fcdb389c-0ef4-4083-b93e-1e0f100f6397))
+ (pin "L1" (uuid f189d746-6cdb-49a3-825d-365ecc79fad4))
+ (pin "L2" (uuid 4aeea86d-483d-4dd7-a5fe-5d84d8d8e570))
+ (pin "L3" (uuid 84a0585b-59c7-4f29-9055-48e85102d2c5))
+ (pin "L7" (uuid 98e6d842-9e3e-4607-aacc-15339af61dd2))
+ (pin "M1" (uuid 58cd7475-017a-4308-a77b-6c154064b101))
+ (pin "M2" (uuid 7c4a535d-e184-4df0-a02c-f44482bb89e3))
+ (pin "M3" (uuid 7806a97b-0a80-4a46-828f-d6753135bb22))
+ (pin "M7" (uuid 9b4a802a-a3e7-4e25-8574-18cf9e2d2050))
+ (pin "M8" (uuid c8fc7cdd-4e79-41d5-8fe5-4292ec87f91b))
+ (pin "N1" (uuid d0a3173d-694f-4cb1-818d-3ebe04a30974))
+ (pin "N2" (uuid c419aaa3-6e01-4bb7-b3f2-809eb527eeee))
+ (pin "N3" (uuid de2ac41e-0f9b-4651-9cd6-602af13134f2))
+ (pin "N7" (uuid 09f48094-e99d-427b-b29d-6471acc00e18))
+ (pin "N8" (uuid f86e7fdf-2659-411a-b5d6-0b52515b6e65))
+ (pin "P1" (uuid 2b40127d-5857-43d0-aa1c-4e1750ce063f))
+ (pin "P3" (uuid 4566fdb5-3af3-41c8-a5d2-fec526da105e))
+ (pin "R1" (uuid 9da55c7b-8bf0-4b08-a4e9-4dce2d5a22ad))
+ (pin "R2" (uuid 47ddd496-c648-4105-9148-16b6843ff6a2))
+ (pin "R3" (uuid 2755bac4-24a3-446c-a88b-a3d9e2a2e762))
+ (pin "T1" (uuid d9b85305-e500-4dc6-a593-38b5b4ed30a9))
+ (pin "T2" (uuid 584a6e12-434d-4813-bdcb-a8e643d6ffad))
+ (pin "T3" (uuid 1710395a-eb93-43de-b262-3d4b79b6cb91))
+ (pin "U1" (uuid e179598e-8a0f-4e73-b968-94f2402bfae0))
+ (pin "U2" (uuid c68fe62c-c06b-4bc9-a56b-735188c345a7))
+ (pin "U3" (uuid a177d889-e6a8-4508-b8a0-bd07454a8a01))
+ (pin "U4" (uuid 7eab4dae-9058-4c85-baba-2a8d35f4d3e3))
+ (pin "U5" (uuid 43c7489b-bd92-48f9-b362-a5961fb81a50))
+ (pin "U7" (uuid e20d1589-b3d5-4f4e-b08e-9c3ba3c94dc2))
+ (pin "U8" (uuid 0eb93802-e4d6-4bd8-83b8-e047ce57328e))
+ (pin "V1" (uuid fcf631e4-7ef6-498d-8cc9-9cf3e1f7e96d))
+ (pin "V2" (uuid 5072eb9f-3f60-4040-88bc-4604f65cc781))
+ (pin "V3" (uuid aa85040f-88f7-4aef-9029-4afc6e6f032c))
+ (pin "V4" (uuid c4553595-f527-445d-b2dc-8fd2218aa926))
+ (pin "V5" (uuid e78513cf-d6c3-484e-97b6-2d989b5d1af8))
+ (pin "V6" (uuid c44e2735-cb99-4b80-bf89-15832fc4958e))
+ (pin "V7" (uuid 93c5982e-b123-40ff-9d98-c35b00ce52c7))
+ (pin "V8" (uuid 749bbc75-9dda-43b0-a6c4-292c74682c69))
+ (pin "W2" (uuid e85af978-bd09-4306-9392-eb834f03b11c))
+ (pin "W3" (uuid e5f6f666-20b7-478f-9783-a1d85e353bfb))
+ (pin "W4" (uuid 7b0692a5-e190-40b0-9b6b-ab8314f540da))
+ (pin "W5" (uuid 1d79fe4f-cde2-4438-b497-e88a7efd2e8e))
+ (pin "W6" (uuid fef5be97-9c76-42ff-b300-0a78803f67e4))
+ (pin "W7" (uuid 943e232e-df3f-4b23-94f1-1f52c7051eb5))
+ (pin "A10" (uuid e0191025-17e2-46ea-9da7-7fe91797c87d))
+ (pin "A2" (uuid da854dff-24da-4866-b0c2-6dac15fba2d2))
+ (pin "A4" (uuid 4d0482de-2766-42b5-91b0-c4c21d4ea3e0))
+ (pin "A6" (uuid 89fb9859-d7d6-42ab-8102-ab507aee87f4))
+ (pin "A8" (uuid 1bb8aa97-1d9e-426a-ac08-24504c7841e5))
+ (pin "B10" (uuid fcb6190b-8af2-4745-8b0a-6cc6db59099f))
+ (pin "B2" (uuid d1a1e4b5-56ba-4697-a445-a8137f3f2ca0))
+ (pin "B4" (uuid bed8736a-2cd7-4120-a643-61dfb8b88ec4))
+ (pin "B6" (uuid 40d58f4b-ae2b-4c77-9722-f68ebcccb410))
+ (pin "B8" (uuid 8d777ddc-c2e2-40fc-9f31-775b926e1a47))
+ (pin "D1" (uuid c0dd1b3a-944a-4f63-a3cf-8474b54e2857))
+ (pin "D2" (uuid faa26f62-1d18-4f94-9ca5-e9aca493e96d))
+ (pin "B1" (uuid 435cf405-9cea-4538-a15f-9808d0d04a28))
+ (pin "C1" (uuid b7dfd033-ff14-43a0-b7f7-62ffc8c2dac8))
+ (pin "C5" (uuid d91b802c-b50d-4a71-8dcf-9ed737dd4c92))
+ (pin "C7" (uuid b7822153-4756-484f-ab48-abb1d4c2683b))
+ (pin "E1" (uuid a5ec74d5-7732-445c-8df7-5e6611af4170))
+ (pin "E2" (uuid 0e7d714d-0bf9-47aa-bede-ed43f29c0e86))
+ (pin "F3" (uuid aa76e46d-4212-469d-a8c4-c822179037fe))
+ (pin "G7" (uuid 8e9ccba9-dbd9-4fc9-9702-bace6e8c76ef))
+ (pin "G9" (uuid cde57fdd-262b-4efb-9d4a-13a26ed77fdb))
+ (pin "H9" (uuid 16db1592-07ad-4f6d-9987-da9d89ada5e1))
+ (pin "A11" (uuid a6611366-ba24-4f65-b7c9-6be4984e8e3d))
+ (pin "A12" (uuid d06856cb-a166-49aa-bd99-30a763137d3d))
+ (pin "A13" (uuid 7c4c1827-3648-45af-b061-f0d2e8239ad3))
+ (pin "B11" (uuid 5decf0d7-7f7e-45b9-8060-c33467339436))
+ (pin "B12" (uuid 2c50dd38-85c3-478b-a5c6-10a56aa6a212))
+ (pin "B13" (uuid 930615f2-fa73-4de0-8f17-d4c13ce6d640))
+ (pin "C11" (uuid 3d35233a-565f-4036-8e28-10a3a3549cc6))
+ (pin "C8" (uuid ecd3eb4f-ad4d-4b2c-b171-594224f2ba95))
+ (pin "G12" (uuid a36888c8-117f-428f-babf-8e2beab5df80))
+ (pin "U10" (uuid 1d27284b-7d14-446a-9df4-ff964b37c2bb))
+ (pin "U11" (uuid 917796ca-aa6d-4d07-abb0-d1de921ba6c1))
+ (pin "U12" (uuid 98885d37-1e79-4c0c-b83c-5f9352efb9bd))
+ (pin "V10" (uuid 97b08718-5fd4-4205-8587-1f85d7984b55))
+ (pin "V11" (uuid 69dce61a-438b-4210-869c-28cbfb7bc5d3))
+ (pin "V12" (uuid 153194a6-829c-474f-815a-bc346e4ffe50))
+ (pin "V9" (uuid 0e59551c-a608-4825-9a6f-cd26ae3ff40a))
+ (pin "W10" (uuid 84265488-b124-4d6d-a44e-3a8101871927))
+ (pin "W11" (uuid bcd5e037-571f-4bf9-baf9-0d14fb76089c))
+ (pin "W8" (uuid b4572b6d-ae6e-42e3-bfd4-233b5db0d570))
+ (pin "W9" (uuid 7cae7a4e-afc5-43db-83f1-c9ead4550d31))
+ (pin "A1" (uuid b41eed3d-463c-4370-b9be-434cf0e697fc))
+ (pin "A19" (uuid 86f8e217-70eb-4e89-9052-935c4f84daf3))
+ (pin "A3" (uuid f4c31c92-43a0-4afb-acb8-267b23dfc02c))
+ (pin "A5" (uuid 89b2b132-0dcb-40ca-8af1-22870e88ca53))
+ (pin "A7" (uuid 4b34be32-3ef6-4197-bc85-6291d0b85d34))
+ (pin "A9" (uuid 3d625d3e-2a8b-43e2-a401-722f1dc7c96b))
+ (pin "B14" (uuid 3e756b80-9128-499a-8942-1f4a8935450b))
+ (pin "B3" (uuid 9d71780e-bef0-4a6c-9a02-98f56bf00b6d))
+ (pin "B5" (uuid a4c7cede-3dfd-4cf5-80ef-01b3b7624939))
+ (pin "B7" (uuid 395fc260-c310-41f2-a61c-58fe4d9ee6ac))
+ (pin "B9" (uuid 465c0e54-c93a-4a4f-a740-142efad5c27c))
+ (pin "C10" (uuid 1242e125-61cb-4ced-a671-7f05f087e413))
+ (pin "C12" (uuid f6f32458-ee84-49e8-b081-4afda0a2e7a3))
+ (pin "C13" (uuid 592fe309-8382-4188-9719-e6d8a0da70b3))
+ (pin "C19" (uuid 01399ae8-a832-4329-8511-54b7c137a67c))
+ (pin "C2" (uuid daf38a91-074f-462d-b9cf-0e2b0721bdb3))
+ (pin "C3" (uuid b1fe1fd6-5450-4fb8-adf7-9b492a3a220c))
+ (pin "C4" (uuid 562a35a5-2738-4c30-b72a-bd02988de7e6))
+ (pin "C6" (uuid ae6d9ce2-8126-46cd-b869-9d2ca96575fc))
+ (pin "C9" (uuid dd43e27b-4ef0-4d76-ac26-0d0d31bc57af))
+ (pin "D3" (uuid 97110486-6366-4e68-a2ed-fc41dbdc8dd4))
+ (pin "E17" (uuid 655602ea-f5c0-492b-8852-2b0915a4dcd7))
+ (pin "E3" (uuid 62e4ed8d-e47b-4bbb-9ed9-37c8749b5cc8))
+ (pin "F1" (uuid 77ebedf9-4552-4dfd-84a8-e7053613f010))
+ (pin "F19" (uuid aa650ac3-1117-4d35-ab01-6947a995b815))
+ (pin "F2" (uuid eea2d071-a0c2-4b28-abd1-9c573fb56f0f))
+ (pin "G1" (uuid 406b3c2d-e0c2-4dd1-860e-d7fa6a09ce5a))
+ (pin "G10" (uuid 03e8c706-0d39-4e10-a5f9-c40abab6e4a2))
+ (pin "G11" (uuid f45786be-bffc-475d-9d1e-9bdee36f7585))
+ (pin "G8" (uuid d5eda1c3-6df9-4fda-bef2-cc99e1975a2b))
+ (pin "H10" (uuid dd76e4da-054a-454b-98df-0aff89b48c2d))
+ (pin "H11" (uuid feef6d1a-efa9-4ddd-a62d-e890b00d1128))
+ (pin "H12" (uuid 39fb399c-02ba-4986-bd7b-310eeb500230))
+ (pin "H13" (uuid 71129c4a-c4f0-488e-adce-36b33e0a0a11))
+ (pin "H18" (uuid cfebd0c6-e7bd-4900-a769-5a4cb669cb90))
+ (pin "H7" (uuid 1766a265-2c35-4849-9fea-ef8ee431a9c7))
+ (pin "H8" (uuid d0cf94e6-73b1-4590-8d79-c5d1acfecdd0))
+ (pin "J10" (uuid cc147f0d-2f5d-4c2e-ac22-6f39a3abd207))
+ (pin "J11" (uuid 5b888eef-67d3-44c0-81b0-df61193ed72c))
+ (pin "J12" (uuid fca45bff-6554-4b3d-86cb-112da734e178))
+ (pin "J13" (uuid 06bded97-7212-4f84-8b76-57e73128753d))
+ (pin "J8" (uuid a33f53e7-f6bc-4440-bdcc-b5e94f1f4d80))
+ (pin "J9" (uuid 1f084a10-0f00-4c12-af8b-fb88bc82bbe0))
+ (pin "K8" (uuid f9ca2753-0a61-481c-9f14-c0c406439cd2))
+ (pin "L10" (uuid 2173ddcd-9e11-410e-91a8-33bb26186b45))
+ (pin "L11" (uuid 51045df6-203e-4806-badd-560554f24c8f))
+ (pin "L19" (uuid 232fd990-631c-445f-bdc7-fbed489921a1))
+ (pin "L8" (uuid 3acc3bee-534f-455e-83d8-242296ca3299))
+ (pin "L9" (uuid a83aa0a3-2ad7-4eb1-a4e9-952e46fd6fc9))
+ (pin "M10" (uuid 3fc595b5-d006-41b4-be08-64f08ba334a7))
+ (pin "M11" (uuid 0b847dcd-60c3-450a-a9a2-a2a486c0889a))
+ (pin "M13" (uuid 476dfaec-a047-4bb4-98d2-14eab41f4697))
+ (pin "M9" (uuid c968c349-0142-4748-8596-2e9dd5231b0f))
+ (pin "N10" (uuid efc422f6-fcdb-4081-9b18-8890c5f69bd8))
+ (pin "N11" (uuid efe693c7-2797-4aae-a54a-b41c9f1dc733))
+ (pin "N12" (uuid 6b38761f-660c-4e0b-8db3-31c1b5ba4886))
+ (pin "N13" (uuid 5257aeb7-e901-425b-841a-5ca6caa1b430))
+ (pin "N9" (uuid 09ed3118-898e-4767-b14a-323cf1bd4c61))
+ (pin "P2" (uuid eb556876-5e74-477c-a234-961fdee63b80))
+ (pin "T19" (uuid 78e4f078-c50d-4247-b3c6-395f96753c50))
+ (pin "U6" (uuid a4ca2684-c081-4ec3-89d2-94593ee94c99))
+ (pin "U9" (uuid a7b15dc9-ee2d-4926-8d91-fc82a85ae869))
+ (pin "V18" (uuid af9811a7-ba98-4884-90b2-31fea8c76766))
+ (pin "W1" (uuid e358d629-fe18-4c15-9260-93f122fe82e5))
+ (pin "W12" (uuid 6523c6ec-7bab-477c-86f6-9220d4242ac0))
+ (instances
+ (project "hardware"
+ (path "/9c6bd711-93fb-4327-8ec4-bcfe43c3c3c8"
+ (reference "U2") (unit 1)
+ )
+ )
+ )
+ )
+
+ (sheet_instances
+ (path "/" (page "1"))
+ )
+)
diff --git a/docs/ppu.drawio b/docs/ppu.drawio
index c0ce0be..f7677be 100644
--- a/docs/ppu.drawio
+++ b/docs/ppu.drawio
@@ -1 +1 @@
-<mxfile host="Electron" modified="2023-02-17T15:42:42.163Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.8.16 Chrome/106.0.5249.199 Electron/21.4.0 Safari/537.36" etag="F4f9xIP4TBzWa1ggQMnZ" version="20.8.16" type="device" pages="3"><diagram name="level-1" id="DBE48RpXtx8JnoEt3ekA">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</diagram><diagram id="MdQQJuunD4ehtDpxKxax" name="level-2">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</diagram><diagram id="lj51MlK96fuJFRP7cw84" name="level-3">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</diagram></mxfile> \ No newline at end of file
+<mxfile host="Electron" modified="2023-03-15T21:14:25.736Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.8.16 Chrome/106.0.5249.199 Electron/21.4.0 Safari/537.36" etag="djLggK9M9AFY2cF3fK9j" version="20.8.16" type="device" pages="3"><diagram name="level-1" id="DBE48RpXtx8JnoEt3ekA">7Vtbd6I6FP41rnXOg13cRH3ES9sztU6XtRfn5SyUiHQisRCr9tdPkEQJQdAqWmc5D7PIziYm+/v2JSEtqPXx/MYzJ6N7ZAFYUCRrXlAbBUUp6Tr5PxAsQoGqlUOB7TlWKJLXgkfnE1ChRKVTxwI+p4gRgtiZ8MIBcl0wwJzM9Dw049WGCPK/OjFtIAgeByYUpS+OhUehtFKS1vJb4Ngj9suyRHvGJlOmAn9kWmgWEanNglr3EMLh03heBzCwHbNL+N71ht7VxDzg4m1eKC3+w/gVd6dyd9aDqK03pdsiHeXDhFO64JrpL3yVyK4fboyCokMyeK3vkSc7eHp4eKLLwQtmIw9NXQsEPyMRjdnIweBxYg6C3hkhBZGN8BiSlkwefdLjuHYLDINZF0vSWtahduSEdFRo9gF8QL6DHeQS2YCsGnik4wN42CF4tWIKfYQxGhMFEzp24hsG7cAomKJoTmYbog7mERE17w1AY4C9BVGhvQrDnnK9TJuzNXFkncpGPGkoYSlZ7dXQazzJA4V0B3gVAd6G40+gGUwaTfFkikWE/3m+Mf69YLwBY03LxLiSF8R3LeN53Ov1Xu+aVWdufPaR/lJUBaiARSIYbSIPj5CNXBM219IaD6b/G+DBiDbWL7RQYLMlnm8A4wWNzeYUoxjaLLAtB8Omh40g8BKBi1zAZNdOsK6lzkYYiJ4NcMpiKZ+DFaaC5QFoYueDj+FJpl++Sqa79AimMEGOi/3IyA+BYM0BucxzQFZKfOTdTZ88hDPY8LYuXUmRf3LiWKvJ+2jqDQAdI8atlYW+HlFUIaI8du9V5Vqqyp26GEzql3SxMZSUq1fVcnYwuZLUY6YMuSIgLEYY12IuPoCm7zsDHjQe4ex4BGB/ORgzdQQGuAQ+iDGT4P0hBHP60zVmJY2FGFag6cGQrhVr0vilMG3aVrcNSB8ATu6nP+XFXaNzPQbt/oP1oyirW0akOTduBOBSQrZgst3C2K6RQ98ucgjDKjofzrQ4F0OrCQPtHGYrUuKEN4bZdP1NYZZNBw2HPtg3ZiaTpLp3jv5CWuYpv5HiIeops9dFV0irNU+cm1dkZCSQ00mToZ+Rm1Uhs8dc4XDZOBGb1d7yLJlVOS9mKbtVfRn6PLMORoiEZH0+hGC+eCaMUOMJp5TOiAz9fBghi0c8zx3jvmg0Gh2BK6RyxbH6G3voN6gjiEgtzDZ0Q7KXi4li9Vq8aB47lrXkWlK5H9uOcoV8vNYPztfiu4JU0n39+EbWkjbyB6i7kz13/438KT1XOW/PzSgtM/Rz8lxxr7303IbRNS6em+q5iaesuXmuLKBxTp6rnbfnajt6rnYMzy0JnitS5HKGEqtQzvEMRfvqGYrMDyvp/LhKKbE77xOWDGfK0D/KCUvad4F4pnxpti+JMjVRKjklStiGDftNk/ypNarUxj+GnY6d8LFZQMcmhppsv9DVd3+zz0aQUg2g6lvU+GpelQKzbMQCNzkQ1AuXkhtDk8mYCnk2Qxc8+Y5Sucli3Khd8ODwyCtApNaiETzyOKM4SzwODUBZvr2H0tvTe8tQXn7p70/lX/9/ywidFBHix+wHY6AuGKD9/Nhr1/8aFqbCfnwWpn0XiIJwewHhaKly0etPO7jfN94/f8J2tViv9Z++Y2RIumd1iMCQuH6xUug+11pG++6vIWUq7MePDInTEU9Eu7cXFE4cGsSiLTdMct5657bvjtzioghVxateG2565QWbeEaZW0A7X9gSE87pMDvRRSIy9Vf6/rLRCxpXJdZszKOdjUUh45pv9JtEWrKNnhynUfjUF0Nih2qVjHshMXVNylDfQ7ty2I8dycnpRHeQvkbKMHSxzxr8hzR9L9KqW5JW+x6kjd17q+52TU5Np6G6j3Z1L9KS5vpvqkL19R+mqc0/</diagram><diagram id="MdQQJuunD4ehtDpxKxax" name="level-2">7Vzbdto6EP2aPNLlK5dHSJr0rKRt2iRtz6OxBagRlo8sB+jXHwnLYEvGGLDBNLxk4fH4opk9s0cjOVfm9XR+R5xg8hl7AF0Zmje/Mm+uDKPXsdlfLljEArvXjQVjAr1YpK8FT/APEEJNSCPogTCjSDFGFAZZoYt9H7g0I3MIwbOs2gij7FMDZwwUwZPrIFX6E3p0Eku7traWfwJwPEmerGvizNRJlIUgnDgenqVE5scr85pgTONf0/k1QNx2iV3i6243nF29GAE+LXOBfT3qvX2y3v58vX9b2BEin34/tLpmfJs3B0VixAEMAII+4K9MuXUMTW8ZYgx0kRgG+F6f25cd+Zhpm4MJnSJ2pLOfBEe+B/iDNXa0Gjk/8JxwsjzD9cJXQN2JOIOcIUCPOIQUYp/JSGzWwRsgFDKPPEjnp9Dz+NsMHATHeRf0hXyIKcVTdgIHjgspR6LNH6haUBgVeBlQCHveATwFlCyYwjyjPlsDI8HFJIWJREYAcih8ywLLEfgcr26+et4jhuy9DE1Ejm5q2UtCHBEXCK2045MLxVu2kws33Yg6ZAxowY0SRTwahSCjw36kDLMWLbG3Cw47ZXBoX1B4ahSanYpQqNzouCj8Qhb/GL4/7bgR88/cjsC917LLgNBsWRcYnhqGK1Y9FIbKjRqQDNtqMgwDAilHH/RHWIUfc9GTOMSETvAY+w76uJbKGEwjbX3BA8aBwOJvQOlCVGNORHEW0RkMs7ggVEL/UnYL+bCXOhtBGHIQ+uOBOL7pFiEx9nGB4aykQlz6sEDRNvfC9r6grR8yHTV1PX/+vAdQmGsDfnaEwFw49WjgGSLsvuagR82uTJI6vz9gEhxsBYyllQTMbhBhw3IWKYWAAybMQZDAoWlLpVxXqvl302c/4jc4Ol6TSE3hdeC4r+Ml1LjnCvNdFpCzCVN9YomEn52xWWgWbxvRwZMSmBd6U5w1rKwZk8MU13VzuK6rbXZ/xqA7E4Qa7ReCKEUQZePd7vxtBKFO9PcjiBMDJY+fMlV0KXDkVv+VY6NeLtD13bhgi/4mLkiYpJO9ulWyAK+MMFT83mICGkoYur0XYVh1EUbivJT1xggPHbQcKGIhGpvOY8M7u5RwAB1YZcu/btUhf5A7k/dOufMaTwPeDcDk5OCXq6Vjop/817G9sOfo3lfz2/xrYM3uH1q6YpLGYxrMIf3Ff38wbHH4r7gX/30zT+ndLHYJhN79t7vo5cvP/kh7GLx4rZcf/s9W2XmzVXbeXC/1GW0pvbaLqc84SF1eV5F5tVekvoVWN42kBlrNDQ3jEhpVhUbZduk7Co1Vmm94aOTXTGdIGweUQpVXOOUgYWmSVzf03yvzqqGUTmQ8XAneocfTma0oA/7tyOiqLcnH/sMeiGhiC71amDS6RS7RhmltaZEX62dJqrJuRlfF2moajjB+jQIFeKeexpkJ95+qidHuvaf0XH5pyqo67g5rNfUUaA/657YSWT3ZamW92YxphCkF/5ZpQbF6PTk0yT0poPVffp0Z0Grg69IT1mbydbKBtixfS/r1YM1WVx+ekgUH5iIPNK/rqrdPTddqjRPAebw73KHOu+LyTtVcLpze0j6I+WzNXSW576Pv2PjRC4L0qMvg6srJ7dlVJzWQRk6xWbRGfmLO6O1UnBRq77rsrR+5K2Gre0GbxjzyYvfJmafTVmx22Qy5PQm0z6xytKTA3rYBZot+PZVjW+0qPkMEpiwODW0Kpljg/ZQBbMs7g3ICWDeOGsFq7XhpIpRvIrSbQdNWeyeeLlavKTzViV1mH7JDKYHDaEm3DY3WnN01tQVr7h4C1YShSwDw+UCTD5Rko7GxUimOKMGv4BojTNaxM2JhI4mS75tcZkFW/Khbh1dfQuW5Iuus5UdWa38nT/LAyIkQrcZdEulYdo67tBx3yfsrq9s8pvbNHh9fmOA7z7DaMAoPg7jsD4qXCpjAP9inTpIGPUiAKz5em4GQXqmfrom938/LTKytBd+FlQr3gpf30GqhcXNAmTkOMqvwUNEk6+KgedYhu/lHl/eL7OOfogXxlH9uYBigJTe6zIQEI9SAeZlqt+PNy3LtZih2+3HX5zZiqOJbkc+tIbjeidY54k60uvdhmHI6lD9j2tDx2Fwd7vINrfo6UrljV7YNjB2u//tGrL7+Fybmx/8B</diagram><diagram id="lj51MlK96fuJFRP7cw84" name="level-3">7V3bcuK4Fv2arjrngSl8h0cChKRPrpD0dJ5SEJyExGDacTqXrz8mWASkjWRjSxayp2pqBkcCW2t5a9/1w2hP33vBcP546o9d74deH7//MDo/9Ogf24z+s7jysbzSsJ3lhYdgMl5e0r4vDCafbnyxHl99nYzdl42Boe974WS+efHOn83cu3Dj2jAI/LfNYfe+t/mr8+GDS1wY3A098uq/k3H4GD+FVf++fuROHh7RL2v1+C/TIRocX3h5HI79t7VLRveH0Q58P1z+3/S97XqLxUPrspx3uOWvqxsL3FmYZMJbt2V0jt6s/snl0/Hg+rM7Ov5ds+N7Cz/QA7vj6Pnjj34QPvoP/mzodb+vHgT+62zsLr61Hn36HnPi+/PoohZdfHLD8CMGc/ga+tGlx3DqxX+Nbjj4+B3P//pws/6h877x6SP+RD5vvAQv/mtwF99997TZ8cyX49On0XR0fXvWat42azHjwmHw4MZTR0/t18fr0eFv/W/j5s9Lx7cPnJpmLQculmDtF+Ll7Ln+1I1uKBoQuN4wnPzdpMgwZtrDatxq6oU/ie5Zr6O3ArEnficM9Bl9xfJO41nfkLaCYPixNmy+GPBC+Z069jtNa5MhjPGaU6eOr5lGxgn65oTof5bPiD6trfr3pS9ep+C4UwaO20k5bgriuCmG41oT+50GneP4eK3BoqyecYJuC+C4hniiNMn1BslycCAnlm8n5xq6+eCplwLPZlI8+ezMAvE0yoAn2t3ZeNp7jqcZ38rfofca3xwB8EOE33zrYv51g9B937gU2zDDEfqGOrwoaKdpYDsN2mLfvg0VtAs/rtkoRn37Mm6sU9pFMRrEokTm0OnRJ7E0m8x+e5yE7mA+/OLWW2RHbrL4JfrLZPZw4t4vHqBm1b+v9eOnWl70hiPXu/BfJuHEn0VX76I1d4PoD4u1nkQ23Qk2YOSHoT+NBgy9yQM4oxX/IVy8cehXt74ndKrggJPAFgUc+rE14Non/yNQi24/xKAJA//ZbfueHy1aZ+bPFmLrfuJ52CW0vsHyYYjlnU7G4y+RB1FhkyybGGA80LnA8r4JCVIEAYSa/xiOlR2kh8bp683ln/7H09Wf58HsrGf9uqgZEkgcfYtSv0bcBrAsmpYDc/vz0Vn746d76z8+9U5//gzq958rPWltVS6GXrQputFFz/ef0XrsKnyogkCoSGIJHyppUskebhDCukBTkPDxvtDiJnvqBC9gaZQRJ+RHBSDihZAObA/Hnd8VRHSIDOg14rWFI4t3h+0h1dMm3zPiVXA4KTIwU8nt4N/umbpEpVOBzVQx4oPUXFqdTr9ChSE/IAWTH0ik/Oi0rloVSAyQdKFCnlSVChby75saI+aIECPzSa8DD9kikem6ooEsAp6kZa9CoEBhbpAK+0EFiBjBDQpaUi3tdwfdK3V313wsKGgf4YaR1iDg2O8QzdW93Xquza8O2nfWp/b51r+0vJUtzwzRINWCd6JAzdnUHVbh85wTBWq4+5aRDIOPN3ULo1i2MD4sJ0jBnVTBy8/J6+ArldDL6+TwZjbPO4e/Zte68b+BaR6Nu81Lx6yRsbbWeBy4LxHa9bF754/dgFglRSNMdNZk9vLmASEsXHePXqR75NT+KUgxw0XQLssASl8U9y6Lf4rOBfHmC3g/JCZqu6eygsLZooFvL2fPRw7yA3Z9QKuCpz7mJk50YGe85hGXKcbSozMhMVGhVIo8iErVr9cD0q2TChIxoTF40yVlx2HrtIJEjD8EhoT02R5UkIjaYWFIHAKSq9MKEqGaqKFaqQo123DdBQUrablnfWdCB8iSTKqD5uicwWq0BPpmYIxIw/5iMne9yWyRgXfn+XfPCEG9/uDO3GAY+uV215jbbA953DWGtTPV0z2yrOYWzHVSaxlYau+QKyIUbm3BiJCq/cCsEBFjbMG3R26SA7L2qeSICI09G6STaEBK85IjItSZaegkImT9blkREQNBzv7kHBQczvEoqoVV7toLybwAOhmQKmW2kDT+MvD2nN0lSH7eAKL7BbII1wxHDdQ2uFXkkeRt+9P5wsQuudnvJOezEPTgWDhZBsCp1Esi5SQFMu8YKoVIHtLldtDjkkWiFEZCzWAHUKzKVzKZAjTOL1LTvTh/tfTLcW9+MX//5d02DmtZHPrpHje1EQB49cGNgJur09l9aehLvfvSCHlui4yCHvbq9aPjsmnfzjbACjKKLNL3HgGjVcBIZhbZ0AvktCqc2DgJVVBs8n36T/SxFv373/1DarG/CMVKqAffBhLYeo1qU0qAk9BopLN7UzheShNuCwlRomxSeVzsAcqbqMk7ihUi8Ul2LjSoCpVi9SUdNDgqVATXAJH+Gp7qkAgkMHe5mcZVnfqdEasPkTGGhT5UvTOFaj8N1VqQUwMk7Pr5eJ3FJy/DuuQenfSxfEfRcStaUrzA514dGsNKNkeeP1nw2qNSgDzxQiUZTLwc0S3h42/G20SsBOpK5jL6SuATsBMrMjeWgOm0R81NdqQTVb1epxO8QLocdLIxNukMNmHjLebpJGbGCXn3QYHRkCG5xsJqDZJ2u86lDwq0KhbpV7maeO400jn1+tSd+vFvlKDZNZ01UhTWwBACFftKN5vIChRnSwYGifTJcOqFWox1mRWT5E0/+UFE5kCp3a42p/dILEhkMqHS3Y5ywohXVADGqGQVADlhJDRPDUhKKl4bFll5Dq8K0ENkePf88EWaxQ+GYTAZvX6dBFMpx98kklg5Jq2+EirHKYAqQjkGgvvqK8cpMJFAOQYi/SVUjtO/R2JBIo3M8inH6TESqhzbpJVZPuU4PUa8lGPwQHN9jwKbW/Xz9TgG+JRA1HmvomIoQaSwqBjMHRnO1DSxjl5GkzSsNBt6pWxeco/cmg79wF1ZVi/zYLIwq7JYU4ntJtjsEmhN0ZmTrphXLIwl272yAlWEawc6/FSleuusmKC/YmFuoRjpQElT96p9VL1JrDNqRaIENB7bspeTG42Th+TfodMPsD55HJMHrw/pFIjszRqfTti8y72cTBbNiirik8/h+yH1rYXfs8JGvv3agOPOFVSFVgnAt7d7DhlvwW8mtfC4rQ0Zmf+SOPvb8R2zJ7fs6HSipFdHxYBFlrt8yRw+YEkuc4rr1QdnDuxe8stZyEDBjDz6SMImEilPFO51RGeCJMwEWnveVJDIpEuau3ufOcsOo2j9BDjYjE+3C4lyDMzdvWJi6EpaqefdskmU4o6uhF/5PSrrIpc4aREXani5Hv0ElwMdK1Z09BPpXklLArHx6L1OXJOVegJKGeMbXZWhiAuPruoxFmLCcvC6EMuykbdaRVe/mSNJdBW8ySq6mgqoInKDFG9mnRUSwcFV8HZJ39aWPSJj1G7bqqS2jaCgZh5BO/C2ycjzImbH54xnaRx/VJ5IoniTtSdf/vMKGdm2AFIH/fKdV0AlAIpXuA623RLnb4iW+KvmmSLcYfDawF0Davt7ZnaycB2dKMX7yeD7I+27L5HDByy5RU4KrMRgk7fLPTchwytcBy9DqcJ1dCbIwsxSheuyQlKEJqmROr/K8Y+c/D286vXg25NXhxSZ8gU/yxYdUvWULzpRJNUhEW9LlvKVFSsh2KBEemVirtQ2D+yYa0zVomOuJmpLstp4GEFXYoIhICaKUv3VJg9qoMckjy4LebBzdJkRe3wC6g3KlzxGWclDzYvee/JYhoBad0OmhuL/WHnQ5+rebj3X5lcH7TvrU/t8619aXk1zEtIHeVyKpo+NdT7QbFbL5yJaJRiqZZrB5GkkJI8tycZl4wdROyzyYBN0IeRploE80FETtKh+0dwxsbRDnblv4ROaApQe5DhRhjtUjzxT8KBKm8LJg8sRZgoqNsE0BQgeUzVbnRo7YJNHku5QpoGRx2GRB5tgWiLIo5q5Bas8zYTkQX6voslj48nvDZbKg59g0hRBHpnMLX5eQqAyg9pmvHDy4OUATGML785miyCPasYWtd0zmzyySB5c52mmNLYMIZJHNWOL2uOYTR5DEvIYKeMT+ATMrciHPJZq1hZVoLB1HkndPEZayWMJIY9q1hZVoLDJI6nkYcYn8AmWJoI8ehnIgwQK00coSSUz7vKz0voIjboAH6GlmqVOlSdM7jQl4Q5+NqnG4g42wdBEcMdUjDtv3ZbROXqz+ieXT8eD68/u6Pj3KpNxnTuwOyj3oHqmZCvkN1AbHbTfMtv7SwaOaj4u2pqzDU1JxK6Dl3OzQsL4BF2El8JSzUsBv9hJDU1bEheX46R0ruMTDBGGpq2aoQmTJ+mhL7okiXCE5DFTSh5HBHdU0/dASiS2M/n4KIAWV1gQDj9Ecnmj8axvDqQ3OrCD91jxHXw8dlARJw6qdmYVzMGk+VDCOIj5tRqCOMhSwIrhYCmUd8iyKpaDmGM+1q+4c5ClxxXDQdXi3LB6BvheiuUglkDeFMRBVtCqGA6qZojCHAQS27unzY5nvhyfPo2mo+vbs1bztrlKB+NOQrwxp1bnxEKiux0z42djvBHnOHElIdKGlSEhbNAmJqEkkVNHT2dM4OM3u+wS4xtZRgup+nFUc7TQ9l12QF8OVjK2SfYEIZlEjq4YdUCRZgL2BTVTtmjycBZpRL5s2vG6iPxaR7WoYuJEJXC7laWmKHuiUpMlCbONF1Kz5KjmHEycggmTUxLBiVeRsFMwsQl2nUE2K9t4U0QXAUc1r2HGyJsc3MTEIDPuVkRmuYN6qRV5GkgDrx0DTrqCGn3h0apdUmjgvCyyw/vxbP66RFvA+R85nvQBHyWy0/kfK66kOv9DKHDACar97qCrzhllWYF53wRl5X0jMcqjUxuMUeLDJTI+fWpBhPsYgVXJ40wJairo5qESyvCWzgTxPQSpCZ9YM84KBDH9fam5eljPzQoTMYdCDF96A6/28nZ6dP5x+9nq1A+OzmsG2RVbuNKo44afReqM0KFAWp3XqgDHQcyW5oVe/9VrLZYnItRw8T0P7swNhmHEQjH6JE7plbqYWtFcqo+pz5Oj0yiVPikYVJ0AVenz5LICxXmLgDHa/fiIdI+bur84ZPvkoUHCywDYPiUjaoHHR8D3Q26UvQoSqWQHaYweVAjJpGxqpC+uaOkOp35AvOUn7MljT9SxU+k8kEW2kw4bHrJ9PxEoQpQDx8zwEOV7DYhQya2TCqmckpvXKW/wqpA64a/BzVlbbaquuCCJ9NZJve+oQqFgCW5Ia8hDoSB+EoLU7RQ+B5LOBFnEBans3VSQFCQ7jMblfNifuyd/7NA5vxy3rf57TbXcUTDrDqjUoLoCxXekAbFRLXUSxAYoJ6T6BCXBRrXMQbhyCagHoLoDJQFHtUJcGBwg5xhcDV0qbFQrUIWx0RNik3s6eCZs0PuuNjhACzSqPSELOKq1BQXBAc67o1oWsoCjWh+mxPWB1PQP7nX3DnHq1+ZX5FV2L3XtdM5FhjDBVTMUqeHBdYLDb4IcRYYGnQrs8TmX3cPUUc1WosY12dSR4/AgA291yejrRYzPua8qTB3VLDlqBJZNHTlaYxp4wQejHRc+Pu8KPZg6qhma1Kgomzp8OiGlpg5e5ssoiifG6wKoo6tmBlNDuUzqSHK0uIG3L2AcwECMz7miHK5AIUOx569hmUpgt1WqbE0qwVunrRQNRjGsxq2m0Nw9np5bnQ6xKlD9Br8VKFVOPJ0EkhRZmqXKic8KSREll2apcuJzQohXZiWsyejyCXYTWoE8cqSoZsDaCpzxSqOUmagrJkgi3ZGOvY4Lr8RKRXApIluKLFUuXn7wysKm5RKsLcCV4uKDygPx0oOWRbCOiuLCIyMqnGVH7y447wzvz42b62nfNkbO8G9DStnhcJId4AJAsuPgpHWmcFsAKhHECw/wdiDhUcFSoPToz0dn7Y+f7q3/+NQ7/fkzqN9/AiiFk9niZiRrkbJ0Eubohczd36gl8DeCzVLy8LZRDwgoS7OU7JDBzWyywwO3mJNg58ZXYLWT5+0OhglauYNTkDZvUsKQVO7gFJBw3rFhhCp3cHqEhLqDkRwvVLDjqZ+82qHQCuOU7IZCh1wSMa5yM5SsABQitFVuhpITIGJltAS5GLiMBs2PPNxmtHIlzl0NZGJkcZkXtJIkzj0M9hOAIvIsMvRH4qe28YrCUUt/le2FRMddErkA9DhWqxdSVhSKiLLJKBuERtmANmm8ojnFsJIKuyQxNaBLWgVCwZJhj6oQlxz4N45HLb9nHP+GDeIBFH3QpMN6zQctVi++uh68mz2qAuQHHVCuQ4vnc4cu+hj4frhePxMJl8dTf+wuRvwf</diagram></mxfile> \ No newline at end of file
diff --git a/features.md b/features.md
new file mode 100644
index 0000000..6742551
--- /dev/null
+++ b/features.md
@@ -0,0 +1,73 @@
+Af/Cancelled/Implement in sprint 3
+Done
+## Checkpoint room (shop)
+| feature | status |
+|-|-|
+|Upgrade abilities|Implement in sprint 3|
+|Interaction with shopkeeper|Implement in sprint 3|
+
+## Upgrades abilities
+| feature | status |
+|-|-|
+|HP boost|Implement in sprint 3|
+|Jump boost|Implement in sprint 3|
+|Speed boost|Implement in sprint 3|
+|Regular dash|Implement in sprint 3|
+|Super punch|Implement in sprint 3|
+|Smoke bomb|Implement in sprint 3|
+|Dubble Jump|Implement in sprint 3|
+
+## Levels
+| feature | status |
+|-|-|
+|Breakable blocks|Implement in sprint 3|
+|Hidden secrets|Implement in sprint 3|
+|Boss fights|Implement in sprint 3|
+|Enemies|Implement in sprint 3|
+|audio|Implement in sprint 3|
+
+## player (Gozer)
+| feature | status |
+|-|-|
+|Move X-as|Done|
+|Jump|Done|
+|Special ability|Implement in sprint 3|
+|Health|Implement in sprint 3|
+|Currency/Scoreboard|Implement in sprint 3|
+
+## Enemy (Menneke)
+| feature | status |
+|-|-|
+|Move X-as|Implement in sprint 3|
+|Jump|Implement in sprint 3|
+|Hunt player|Implement in sprint 3|
+|Health (1 HP)|Implement in sprint 3|
+|Currency/Scoreboard|Implement in sprint 3|
+
+## Enemy (Ventje)
+| feature | status |
+|-|-|
+|Move X-as|Implement in sprint 3|
+|Jump|Implement in sprint 3|
+|Hunt player|Implement in sprint 3|
+|Health (2 HP) |Implement in sprint 3|
+|Splitting upon defeat|Implement in sprint 3|
+|Currency/Scoreboard|Implement in sprint 3|
+
+## Enemy (Terror uil)
+| feature | status |
+|-|-|
+|Movement|Implement in sprint 3|
+|Hunt player|Implement in sprint 3|
+|Health (1 HP) |Implement in sprint 3|
+|Splitting upon defeat|Implement in sprint 3|
+|Currency/Scoreboard|Implement in sprint 3|
+
+## Could have additions if time is enough
+| feature | status |
+|-|-|
+|Multiplayer|Implement in sprint 3|
+|Shared HP|Implement in sprint 3|
+|Special ability|Implement in sprint 3|
+|Health|Implement in sprint 3|
+|Currency/Scoreboard|Implement in sprint 3|
diff --git a/pinout.md b/pinout.md
deleted file mode 100644
index f4569d2..0000000
--- a/pinout.md
+++ /dev/null
@@ -1,33 +0,0 @@
-Pin layout
-
-| pin STM | function |
-|---------|----------|
-| PA5 / D13 | SPI clock |
-| PA7 / D11 | SPI MOSI |
-| PA9 / D8 | SPI cs |
-| PB4 / D5 | button 1 |
-| PB5 / D4 | button 2 |
-| PB6 / D10 | button 3 |
-| PB8 / D15 | button 4 |
-
-| pin FPGA | function |
-|---------|----------|
-| JB 7 | SPI clock |
-| JB 8 | SPI data |
-| JB 9 | SPI cs |
-
-
-
-constraints:
-
-set_property PACKAGE_PIN A15 [get_ports clkSPI]
-
-set_property PACKAGE_PIN C15 [get_ports csSPI]
-
-set_property PACKAGE_PIN A17 [get_ports dataSPI]
-
-set_property IOSTANDARD LVCMOS33 [get_ports dataSPI]
-
-set_property IOSTANDARD LVCMOS33 [get_ports csSPI]
-
-set_property IOSTANDARD LVCMOS33 [get_ports clkSPI] .
diff --git a/src/.gitignore b/src/.gitignore
index d8325cf..e3d1207 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -3,4 +3,5 @@ main.elf
main.bin
main
main.exe
-static/
+static/*.bin
+
diff --git a/src/demo.c b/src/demo.c
index b9bba17..4fa1be2 100644
--- a/src/demo.c
+++ b/src/demo.c
@@ -1,26 +1,26 @@
#include <math.h>
#include "demo.h"
-#include "entity.h"
#include "input.h"
+#include "entity.h"
#include "ppu/ppu.h"
-#define HH_DEMO_BALL_COUNT 1
-hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT];
+#include "engine/maths.h"
+#include "engine/camera.h"
+#include "engine/entity.h"
+#include "engine/draw_screen.h"
+#include "engine/player_controller.h"
+#include "engine/sprite_controller.h"
+#include "engine/level_const.h"
+
+#include "game_loop/starting_screen.h"
+#include "game_loop/gameplay.h"
+#include "game_loop/shop.h"
-hh_s_entity_player g_hh_player_1 = {
- .pos_x = 31000, // 0b0000 0001 0011 0110
- .pos_y = 21000,
- .radius = 8,
- .speed = 1,
- .direction_x = 1,
- .rotation = 8,
- .in_air = false,
-};
-void hh_player_movement();
+hh_g_all_levels hh_game;
-uint16_t g_hh_pos_x; // 0b0000 0001 0011 0110
+uint16_t g_hh_pos_x = 1000; // 0b0000 0001 0011 0110
uint16_t g_hh_pos_y;
uint8_t g_hh_left = 0;
uint8_t g_hh_right = 0;
@@ -29,150 +29,69 @@ uint8_t g_hh_down = 0;
uint8_t g_hh_pos_x_bit[2];
uint8_t g_hh_pos_y_bit[2];
uint8_t g_hh_data_send[3];
-int g_hh_tile_x;
+int g_hh_tile_size = 8;
int g_hh_tile_y;
+typedef struct {
+ vec2 pos;
+ uint8_t idx;
+}hh_s_tiles;
+
+
+hh_e_game_state hh_game_states;
+ hh_entity hh_g_player, hh_g_player_new;
void hh_demo_setup() {
- // load sprites
- hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL);
- hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD);
-
- // background pattern
- hh_ppu_update_color(0, 1, (hh_ppu_rgb_color_t){0x4, 0x4, 0x4});
- for (unsigned i = 0; i < HH_PPU_BG_CANVAS_TILES_H * HH_PPU_BG_CANVAS_TILES_V; i++) {
- hh_ppu_update_background(i, (hh_s_ppu_loc_bam_entry){
- .horizontal_flip = false,
- .vertical_flip = false,
- .palette_index = 0,
- .tilemap_index = 1,
- });
- }
- // cool colors
- hh_ppu_update_color(1, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0xf});
- hh_ppu_update_color(2, 1, (hh_ppu_rgb_color_t){0xf, 0xf, 0xf});
- hh_ppu_update_color(3, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0x0});
- hh_ppu_update_color(4, 1, (hh_ppu_rgb_color_t){0x0, 0xf, 0xf});
- hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t){0x0, 0x0, 0xf});
-
- // balls
- for (unsigned i = 0; i < HH_DEMO_BALL_COUNT; i++) {
- g_hh_demo_balls[i].horizontal_flip = false;
- g_hh_demo_balls[i].vertical_flip = false;
- g_hh_demo_balls[i].palette_index = i + 1;
- g_hh_demo_balls[i].tilemap_index = 0;
- }
+ hh_setup_palettes();
+ hh_game = hh_init_game_levels();
}
void hh_demo_loop(unsigned long frame) {
- hh_player_movement();
-
- // adjust map size
- g_hh_pos_x = g_hh_player_1.pos_x / 100;
- g_hh_pos_y = g_hh_player_1.pos_y / 100;
-
- // input testing (no hitbox stuff)
- // pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R
- // pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U
-
- // update player sprite on ppu
- g_hh_demo_balls[0].position_x = g_hh_pos_x;
- g_hh_demo_balls[0].position_y = g_hh_pos_y;
- hh_ppu_update_foreground(0, g_hh_demo_balls[0]);
-
- // set background pattern position
- hh_ppu_update_aux((hh_s_ppu_loc_aux){
- .bg_shift_x = (frame / 2) % HH_PPU_SPRITE_WIDTH,
- .bg_shift_y = (frame / 8) % HH_PPU_SPRITE_HEIGHT,
- .fg_fetch = 0,
- .sysreset = 0,
- });
+
+
+ switch (hh_game_states)
+ {
+ case hh_e_state_starting_screen:
+ bool ret = hh_show_starting_screen();
+ if(ret){
+ hh_game_states = hh_e_state_shop;
+ }
+ break;
+ case hh_e_state_shop:
+ hh_shop(&hh_game_states);
+ break;
+ case hh_e_state_gameplay:
+ hh_gameplay(hh_game, &hh_game_states);
+ break;
+ case hh_e_state_game_over:
+ // todo:
+ // function: show game over screen
+ // function: after time goto high score
+ break;
+ case hh_e_state_high_score:
+ // todo:
+ // fucntion: show all previously scored points
+ // function: button pressed goto starting screen
+ break;
+ default:
+ hh_game_states = hh_e_state_starting_screen;
+ break;
+ }
}
-// void sendData(uint8_t address, uint16_t data) {
-// uint8_t bitData[3];
-// bitData[2] = data & 0xff;
-// bitData[1] = (data >> 8);
-// bitData[0] = address; // first byte is address
+// void send_data(uint8_t address, uint16_t data) {
+// uint8_t bit_data[3];
+// bit_data[2] = data & 0xff;
+// bit_data[1] = (data >> 8);
+// bit_data[0] = address; // first byte is address
//
-// HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_RESET);
-// HAL_SPI_Transmit(&hspi1, bitData, 3, 100); //2*8 bit data
-// HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_SET);
+// hal_gpio_write_pin(gpioa, gpio_pin_9, gpio_pin_reset);
+// hal_spi_transmit(&hspi1, bit_data, 3, 100); //2*8 bit data
+// hal_gpio_write_pin(gpioa, gpio_pin_9, gpio_pin_set);
// }
-void hh_player_movement() {
- int8_t directionX = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R
- int8_t directionY = (-1 * g_hh_controller_p1.dpad_down) + (1 * g_hh_controller_p1.dpad_up); // -1 = D || 1 == U
-
- uint8_t i, j;
- uint8_t rotation = 0; // 0-7
-
- // rotation calc
- for (i = -1; i < 2; i++) {
- for (j = -1; j < 2; j++) {
- if (directionX == i) {
- if (directionY == j) {
- if (i != 0 && j != 0) // dont update when player idle
- {
- g_hh_player_1.rotation = rotation;
- }
- }
- }
- rotation++;
- }
- }
- // direction calc
- if (directionX != 0) // update direction if player is not idle
- {
- g_hh_player_1.direction_x = directionX;
- }
- // collision map x-axis
-
- // tile calc including radius and direction for background coliision
-
- uint16_t tileColX;
- uint16_t tileColY = (g_hh_player_1.pos_y / 100) / 16;
- ;
-
- // remaining space between grid and exact
- uint8_t modTileX;
- uint8_t modTileY;
-
- if (g_hh_player_1.in_air == false && directionX != 0) {
- if (directionX == 1) {
- tileColX = ((g_hh_player_1.pos_x / 100) + g_hh_player_1.radius) / 20;
- modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 2000;
- } else if (directionX == -1) {
- tileColX = ((g_hh_player_1.pos_x / 100) - g_hh_player_1.radius) / 20;
- modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 2000;
- }
-
- if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] != 1) {
- g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set
- }
-
- else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] == 1) {
- if (modTileX < g_hh_player_1.speed) {
- g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * modTileX); // NEW x set
- } else {
- g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set
- }
- }
-
- } else // if in air different all borders have to be checked
- {
- }
- // collision map floor (y-axis) (falling)
- // if falling no jump press (implement)
- /*
- tileColY = (( g_hh_player_1.pos_y / 100) + g_hh_player_1.radius) / 16; //bottom of player box
- modTileY = 1;
- if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) //rework after jumping
- {
- g_hh_player_1.pos_y = g_hh_player_1.pos_y + 5 ;// NEW y set //makew var gravity
- //playerStat = falling; //for later use of graphics/sound
- }
- */
- // else if(HH_DEMO_HITBOX_TILEMAP[])
-}
+
+
+
+
diff --git a/src/stm32/TODO/hh_combat.h b/src/engine/TODO/combat.h
index 16c41f5..16c41f5 100644
--- a/src/stm32/TODO/hh_combat.h
+++ b/src/engine/TODO/combat.h
diff --git a/src/engine/bullet.c b/src/engine/bullet.c
index 5aa9e51..e6ca6df 100644
--- a/src/engine/bullet.c
+++ b/src/engine/bullet.c
@@ -1,44 +1,35 @@
#include "bullet.h"
-#include "engine/sprite_controller.h"
-void shootBullet(vec2 playerPos, Bullet* bullet){
- // Set bullet's x and y coordinates to player's coordinates
- bullet->x = playerPos.x;
- bullet->y = playerPos.y;
- // Set bullet's velocity to a fixed value
- bullet->velocity = 1;
- // Set bullet's status to active
- bullet->isActive = true;
-}
-void updateBullet(Bullet* bullet, int deltaTime){
- // Only update bullet if it is active
- static int latestLocationBullet = 0;
- if (bullet->isActive) {
- // Move bullet based on velocity and deltaTime
- bullet->x += bullet->velocity * deltaTime;
- drawBullet(bullet);
- // Check if bullet has moved 16 pixels
- if (bullet->x - latestLocationBullet > 32) {
- // Set bullet's status to inactive
- bullet->isActive = false;
- drawBullet(&(Bullet){.x = -16,.y = -16. });
- }
- }
- else{
- latestLocationBullet = bullet->x;
- }
+
+// TODO: use hh_entity as bullet struct
+void hh_shoot_bullet(vec2 player, vec_cor cam_pos, hh_entity* bullet){
+ vec2 temp;
+ if(g_hh_controller_p1.button_secondary){
+ if(bullet->is_grounded){
+ bullet->is_grounded=false;
+ bullet->pos = player;
+ }
+ }
+ else{
+ if(!bullet->is_grounded){
+ hh_update_bullet(bullet , cam_pos);
+ hh_draw_bullet(*bullet);
+ }
+ }
+
+
}
-void drawBullet(Bullet* bullet){
+void hh_update_bullet(hh_entity* bullet, vec_cor cam_pos){
+ bullet->pos.x += 1;
- hh_ppu_update_foreground(10, (hh_s_ppu_loc_fam_entry)
- {
- .position_x = bullet->x,
- .position_y = bullet->y,
- .horizontal_flip = false,
- .vertical_flip = false,
- .palette_index = 7,
- .tilemap_index = 84, // change tilemap to the correct foreground index;
- });
+ // update bullet sprite on ppu
+ bullet->render.fam.position_x = (bullet->pos.x-cam_pos.x);
+ bullet->render.fam.position_y = (bullet->pos.y-cam_pos.y);
+
+}
+void hh_draw_bullet(hh_entity bullet){
+ hh_s_ppu_loc_fam_entry temp = bullet.render.fam;
+ hh_ppu_update_foreground(10,temp);
}
diff --git a/src/engine/bullet.h b/src/engine/bullet.h
index ad67d84..5f07b2e 100644
--- a/src/engine/bullet.h
+++ b/src/engine/bullet.h
@@ -1,16 +1,11 @@
#pragma once
#include "player_controller.h"
+#include "engine/sprite_controller.h"
+#include "input.h"
-typedef struct {
- int x;
- int y;
- int velocity;
- int isActive;
- int hit;
-} Bullet;
+void hh_shoot_bullet(vec2 playerPos, vec_cor cam_pos, hh_entity*);
-//Bullet* createBullet(float x, float y, float velocity, float direction);
-void shootBullet(vec2 playerPos, Bullet* bullet);
-void updateBullet(Bullet* bullet, int deltaTime);
-void drawBullet(Bullet* bullet);
+void hh_update_bullet(hh_entity* , vec_cor );
+
+void hh_draw_bullet(hh_entity);
diff --git a/src/engine/camera.c b/src/engine/camera.c
new file mode 100644
index 0000000..6898430
--- /dev/null
+++ b/src/engine/camera.c
@@ -0,0 +1,38 @@
+#include "engine/camera.h"
+
+#include "ppu/consts.h"
+
+
+vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){
+ //TODO: change floating point math to fix point math
+ //TODO: remove magic number at y camera offset
+
+ // new = vec_cen2cor(new,(vec2){.x=max.x/2,.y=max.y/2});
+ new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH),.y=new.y+(HH_PPU_SPRITE_HEIGHT*8)},(vec2){.x=(max.x - min.x)/2,.y=(max.y - min.y)/2});
+ // new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH),.y=new.y+(HH_PPU_SPRITE_HEIGHT*8)},(vec2){.x=max.x/2,.y=max.y/2});
+
+ // new.x = new.x << HH_MATH_FIXED_POINT;
+ // new.y = new.y << HH_MATH_FIXED_POINT;
+ static vec_cor old;
+ // old.x = old.x << HH_MATH_FIXED_POINT;
+ // old.y = old.y << HH_MATH_FIXED_POINT;
+
+ // int16_t some = 0;
+ // some = some <<= HH_MATH_FIXED_POINT-1;
+
+ // Camera smoothing
+ new.x = (int)((float)new.x*0.1f + (float)old.x*0.9f);
+ new.y = (int)((float)new.y*0.1f + (float)old.y*0.9f);
+
+ // old.x = old.x >> HH_MATH_FIXED_POINT;
+ // old.y = old.y >> HH_MATH_FIXED_POINT;
+
+
+ old.x = CLAMP(new.x,min.x,max.x);
+ old.y = CLAMP(new.y,min.y,max.y);
+
+ //printf("camera new %d min %d max %d\n",new.y,min.y,max.y);
+ return old;
+}
+
+
diff --git a/src/engine/camera.h b/src/engine/camera.h
new file mode 100644
index 0000000..b3ffb52
--- /dev/null
+++ b/src/engine/camera.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include "engine/maths.h"
+
+vec_cor hh_update_camera(vec_cor new, vec2 min, vec2 max);
+
diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c
new file mode 100644
index 0000000..d1d7a04
--- /dev/null
+++ b/src/engine/draw_screen.c
@@ -0,0 +1,129 @@
+#include "engine/draw_screen.h"
+
+hh_level_entity level;
+uint64_t offsetY=0;
+uint64_t offsetX=0;
+uint8_t hh_world_to_tile(vec2 pos){
+
+ int index = (((pos.y/HH_PPU_SPRITE_HEIGHT)*level.size.x) + (pos.x/HH_PPU_SPRITE_WIDTH));//TODO: remove magic number(s)
+ int tile= level.place[index];
+ return tile;
+}
+
+void hh_update_screen(vec2 view, vec2 player){
+ int current_tile_y = view.y / HH_PPU_SPRITE_HEIGHT;
+ int current_tile_x = view.x / HH_PPU_SPRITE_WIDTH;
+ int offset_py = view.y - (offsetY / 40 * HH_PPU_SPRITE_HEIGHT);
+ int offset_px = view.x - offsetX * HH_PPU_SPRITE_WIDTH;
+ static int prev_ofsset = 0;
+
+ int size = MIN(HH_PPU_BG_CANVAS_TILES_H,level.size.x) * MIN(HH_PPU_BG_CANVAS_TILES_V,level.size.y);
+ if( (offset_py == 0 || offset_py > 230) && level.size.y > level.size.x && prev_ofsset != offset_py){
+ if(offset_py==0){
+ offsetY = (current_tile_y-14) * level.size.x;
+ }
+ else{
+ offsetY = current_tile_y * level.size.x;
+ }
+
+ // Update the background screen
+ for (int BAM_index = 0; BAM_index < size; BAM_index++) {
+ hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){
+ .horizontal_flip = false,
+ .vertical_flip = false,
+ .palette_index = hh_get_palette(level.place[offsetY + BAM_index]),
+ .tilemap_index = level.place[offsetY + BAM_index],
+ });
+ }
+ prev_ofsset = offset_py;
+ }
+ else if ((offset_px == 0 || offset_px > 310) && level.size.x > level.size.y && prev_ofsset != offset_px)
+ {
+ if(offset_px==0){
+ offsetX = current_tile_x - 14;
+ }
+ else{
+ offsetX = current_tile_x;
+ }
+ // Update the background screen
+ for (int BAM_index = 0; BAM_index < size; BAM_index++) {
+ int var = (BAM_index / HH_PPU_BG_CANVAS_TILES_H) * level.size.x + MIN((BAM_index % HH_PPU_BG_CANVAS_TILES_H + offsetX),level.size.x);
+ hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){
+ .horizontal_flip = false,
+ .vertical_flip = false,
+ .palette_index = hh_get_palette(level.place[var]),
+ .tilemap_index = level.place[var],
+ });
+ }
+ }
+
+ prev_ofsset = offset_px;
+
+}
+void hh_setup_screen(hh_level_entity currentlevel){
+ hh_clear_screen();
+ hh_clear_sprite();
+ level = currentlevel;
+ offsetY=0;
+ offsetX=0;
+ int size = MIN(HH_PPU_BG_CANVAS_TILES_H, level.size.x) * MIN(HH_PPU_BG_CANVAS_TILES_V, level.size.y);
+ for (int BAM_index = 0; BAM_index < size; BAM_index++) {
+ int var = (BAM_index / HH_PPU_BG_CANVAS_TILES_H) * level.size.x + BAM_index % HH_PPU_BG_CANVAS_TILES_H;
+ hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){
+ .horizontal_flip = false,
+ .vertical_flip = false,
+ .palette_index = hh_get_palette(currentlevel.place[var]),
+ .tilemap_index = currentlevel.place[var],
+ });
+ }
+}
+vec_cor hh_draw_screen(vec2 player) {
+ static vec_cor previousViewport = {0, 0};
+ int offset_py = offsetY / 40 * HH_PPU_SPRITE_HEIGHT;
+
+ int offset_px = (offsetX * HH_PPU_SPRITE_WIDTH) ;
+ vec_cor viewport = hh_update_camera(player,(vec2){.x = offset_px, .y = offset_py},(vec2){.x = HH_PPU_SCREEN_WIDTH + offset_px, .y = 480 + offset_py});//TODO: remove magic number(s)
+ viewport.x = CLAMP(viewport.x, 0, level.size.x * HH_PPU_SPRITE_WIDTH - HH_PPU_SCREEN_WIDTH);
+ viewport.y = CLAMP(viewport.y, 0, level.size.y * HH_PPU_SPRITE_HEIGHT - HH_PPU_SCREEN_HEIGHT);
+
+ hh_update_screen((vec2){.y=viewport.y,.x=viewport.x},player);
+ if (viewport.x == previousViewport.x && viewport.y == previousViewport.y){}
+ else{
+ hh_ppu_update_aux((hh_s_ppu_loc_aux){
+ .bg_shift_x = viewport.x - offset_px,
+ .bg_shift_y = viewport.y - offset_py,
+ .fg_fetch = 0,
+ .sysreset = 0,
+ });
+ previousViewport = viewport;
+ }
+
+ return viewport;
+}
+
+void hh_clear_screen(){
+ // (HH_PPU_SCREEN_HEIGHT*HH_PPU_SCREEN_WIDTH)/(HH_PPU_SPRITE_HEIGHT*HH_PPU_SPRITE_WIDTH)
+ for (int i = 0; i < HH_PPU_BG_CANVAS_TILES_H*HH_PPU_BG_CANVAS_TILES_V; i++) {
+ hh_s_ppu_loc_bam_entry temp = {
+ .vertical_flip=false,.horizontal_flip = false,
+ .palette_index = 3,.tilemap_index = 0
+ };
+ hh_ppu_update_background(i,temp);
+ hh_ppu_update_color(3,0,(hh_ppu_rgb_color_t){0x0,0x0,0x0});
+ }
+ hh_ppu_update_aux((hh_s_ppu_loc_aux){
+ .bg_shift_x = 0,
+ .bg_shift_y = 0,
+ .fg_fetch = 0,
+ .sysreset = 0,
+ });
+}
+
+void hh_clear_sprite(){
+ for (int i = 0; i < HH_PPU_FG_SPRITE_COUNT; i++) {
+ hh_ppu_update_foreground(i,(hh_s_ppu_loc_fam_entry){
+ .position_x = -HH_PPU_SPRITE_WIDTH,
+ .position_y = -HH_PPU_SPRITE_HEIGHT,
+ });
+ }
+}
diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h
new file mode 100644
index 0000000..9130842
--- /dev/null
+++ b/src/engine/draw_screen.h
@@ -0,0 +1,34 @@
+#pragma once
+
+
+// every function call for drawing the screen goes here.
+#include "engine/maths.h"
+#include "ppu/ppu.h"
+#include "engine/level_const.h"
+#include "engine/sprite_controller.h"
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "engine/camera.h"
+
+#define hh_max_x_size 40
+#define hh_max_y_size 30
+
+/** @brief return a single tile from world binary */
+uint8_t hh_world_to_tile(vec2 pos);
+
+/** @brief shift to level if viewport changed position */
+vec_cor hh_draw_screen(vec2 player);
+
+/** @brief send data to BAM memory from binary level */
+void hh_setup_screen(hh_level_entity currentlevel);
+/** @brief updates screen based on view and maybe player position if it needs to turn back*/
+void hh_update_screen(vec2 view, vec2 );
+
+/** @brief send black screen to background memory */
+void hh_clear_screen();
+
+/** @brief clears all sprite data */
+void hh_clear_sprite();
+/** @brief send data to BAM memory from binary from shop */
+void hh_setup_Shop();
diff --git a/src/engine/engine.c b/src/engine/engine.c
new file mode 100644
index 0000000..799ee7c
--- /dev/null
+++ b/src/engine/engine.c
@@ -0,0 +1,4 @@
+#include "engine/draw_screen.h"
+#include "engine/level.h"
+#include "engine/maths.h"
+#include "engine/sprite_controller.h"
diff --git a/src/engine/entity.c b/src/engine/entity.c
new file mode 100644
index 0000000..535759d
--- /dev/null
+++ b/src/engine/entity.c
@@ -0,0 +1,127 @@
+#include <stdbool.h>
+
+#include "engine/entity.h"
+#include "engine/maths.h"
+
+/*
+ PLAYER: (pos on X)
+ ,___,
+ | |
+ | X |
+ |___|
+
+*/
+
+bool hh_collision(vec_cor pos1, vec2 pos2){
+ if (pos2.x == CLAMP(pos2.x, pos1.x, pos1.x+16)){// hit x
+ return true;
+ }
+
+ if (pos2.y == CLAMP(pos2.y, pos1.y, pos1.y+16)){// hit y
+ return true;
+ }
+ return false;
+}
+
+void hh_solve_collision(vec2 pos_environment, hh_entity* entity){
+ if (!hh_collision(pos_environment,entity->pos))
+ return;
+
+ printf("BONK!/n");
+ // if (entity->vel.y > 0){
+ // entity->pos.y = MAX(entity->pos.y,pos_environment.y);
+ // entity->vel.y = 0;
+ // } else {
+ // entity->pos.y = MIN(entity->pos.y,pos_environment.y);
+ // entity->vel.y = 0;
+ // }
+ // if (entity->vel.x <= 0){
+ // entity->pos.x = MIN(entity->pos.x,pos_environment.x-16);
+ // entity->vel.x = 0;
+ // } else {
+ // entity->pos.x = MAX(entity->pos.x,pos_environment.x+16);
+ // entity->vel.x = 0;
+ // }
+}
+hh_entity hh_background_collision (hh_entity temp_old_entity,hh_entity temp_new_entity){
+
+ temp_old_entity.is_grounded = false;
+
+// solves x collision
+ if (temp_old_entity.vel.x <= 0) {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_old_entity.pos.y + 0})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_old_entity.pos.y + 15}))) {
+ temp_new_entity.pos.x = (temp_new_entity.pos.x & ~15) + 16,
+ temp_new_entity.vel.x = 0;
+ }
+ } else {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 16, .y=temp_old_entity.pos.y + 0})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 16, .y=temp_old_entity.pos.y + 15}))) {
+ temp_new_entity.pos.x = temp_new_entity.pos.x & ~15, // <-- magic comma, NOT TOUCHY
+ temp_new_entity.vel.x = 0;
+ }
+ }
+
+ //solves y collision
+ if (temp_old_entity.vel.y <= 0) {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_new_entity.pos.y + 0})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 15, .y=temp_new_entity.pos.y + 0}))) {
+ temp_new_entity.pos.y = (temp_new_entity.pos.y & ~15) + 16,
+ temp_new_entity.vel.y = 0;
+ }
+ } else {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_new_entity.pos.y + 15})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 15, .y=temp_new_entity.pos.y + 15}))) {
+ temp_new_entity.pos.y = temp_new_entity.pos.y & ~15,
+ temp_new_entity.vel.y = 0;
+ temp_old_entity.is_grounded = true;
+ }
+ }
+ temp_old_entity.pos = temp_new_entity.pos;
+ temp_old_entity.vel = temp_new_entity.vel;
+ return temp_old_entity;
+}
+
+hh_entity hh_enemy_collision(hh_entity temp_player, hh_entity temp_enemy){
+
+ bool collide = hh_distance_circles( temp_player.pos, temp_enemy.pos, temp_player.radius, temp_enemy.radius);
+
+ if (collide == true && temp_player.is_hit == false)
+ {
+ temp_player.is_hit = true;
+ //angle = atan2( tempEntity.pos_y - tempPlayer.pos_y, tempEntity.pos_x - tempPlayer.pos_x);
+ if(temp_player.pos.x <= temp_enemy.pos.x) //player left of enemy -- creates flinch movement L or R
+ {
+ // printf("BONK-left!/n");
+ temp_player.vel.y = -5;
+ temp_player.vel.x = -8;
+ } else {
+ // printf("BONK-right!/n");
+ temp_player.vel.y = -5;
+ temp_player.vel.x = 8;
+ }
+ // ghost mode / invulnerable or other things on hit
+ // temp_player.hp--;
+
+ } else {
+ temp_player.is_hit = false;
+
+ }
+
+
+return temp_player;
+}
+
+
+bool hh_distance_circles (vec2 object_1, vec2 object_2, int radius_1, int radius_2){
+ int a_squared = (object_1.x - object_2.x) * (object_1.x - object_2.x);
+ int b_squared = (object_1.y - object_2.y) * (object_1.y - object_2.y);
+ int c_squared = a_squared + b_squared;
+ int radius = ( radius_1 + radius_2) * ( radius_1 + radius_2 );
+
+ if( c_squared <= radius ){
+ return true;
+ } else {
+ return false;
+ }
+}
diff --git a/src/engine/entity.h b/src/engine/entity.h
new file mode 100644
index 0000000..cad6ba4
--- /dev/null
+++ b/src/engine/entity.h
@@ -0,0 +1,82 @@
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+#include "ppu/types.h"
+
+#include "engine/maths.h"
+
+typedef uint8_t hh_idx_t;
+
+typedef enum {
+ fire, ice, poison
+}hh_e_damage_t;
+
+typedef struct {
+ hh_s_ppu_loc_fam_entry fam; //screen
+ hh_idx_t frame0;
+ hh_idx_t palette;
+
+}hh_s_rendering;
+
+typedef struct {
+ int8_t hp;
+ int8_t dmg;
+ hh_e_damage_t dmg_type;
+ int8_t speed_x, speed_y;
+
+} hh_s_atributes;
+
+
+typedef struct {
+ vec2 pos, vel, vec;
+ bool is_grounded;
+ bool is_hit;
+ uint8_t radius;
+ int8_t hp;
+ int8_t speed;
+ hh_s_rendering render;
+ //armor/block?
+}hh_entity;
+
+typedef struct {
+ hh_entity p;
+ hh_s_atributes atr;
+}hh_s_player;
+
+
+/// @brief detect for collision enity and eviroment
+/// @param pos1 position of environment tile to be checked
+/// @param pos2 position entity
+/// @return true if collision between enity and environment
+bool hh_collision(vec2 pos1, vec2 pos2);
+
+/// @brief solve collisions
+/// @param environment position
+/// @param entity position
+/// @return solved new entity position
+void hh_solve_collision(vec2 pos_environment, hh_entity* entity);
+
+/// @brief solve collision of entity with background tiles
+/// @param temp_old_entity old data of entity
+/// @param temp_new_entity new data of entity where it wants to go to
+/// @return updated new entity where it actually can go to
+hh_entity hh_background_collision (hh_entity temp_old_entity, hh_entity temp_new_entity);
+
+/// @brief solve collision of player with enemy
+/// @param temp_player data of player
+/// @param temp_enemy data of enemy
+/// @return updated player with new stats if hitted with enemy
+hh_entity hh_enemy_collision(hh_entity temp_player, hh_entity temp_enemy);
+
+/// @brief calculate if circles (entity) hit each other
+/// @param object_1 position of first object (entity)
+/// @param object_2 position of second object (entity)
+/// @param radius_1 radius of first object (entity)
+/// @param radius_2 radius of second object (entity)
+/// @return true if objects collids
+bool hh_distance_circles (vec2 object_1, vec2 object_2, int radius_1, int radius_2);
+
+
diff --git a/src/engine/level.h b/src/engine/level.h
new file mode 100644
index 0000000..8d610dd
--- /dev/null
+++ b/src/engine/level.h
@@ -0,0 +1,5 @@
+#pragma once
+//deal with loading/saving the correct level
+
+/** @brief */
+void hh_map_load();
diff --git a/src/engine/level_const.c b/src/engine/level_const.c
new file mode 100644
index 0000000..5ba0187
--- /dev/null
+++ b/src/engine/level_const.c
@@ -0,0 +1,37 @@
+#include "engine/level_const.h"
+
+
+hh_g_all_levels hh_init_game_levels(){
+ hh_g_all_levels levels;
+ levels.current_level=0;
+
+ levels.level[0].size.x=40;
+ levels.level[0].size.y=100;
+ levels.level[0].hh_level_completed=false;
+
+ levels.level[1].size.x=100;
+ levels.level[1].size.y=28;
+ levels.level[1].hh_level_completed=false;
+
+ FILE *fp = fopen("../test/bin/level1_test.bin", "rb");
+ fseek(fp, 0, SEEK_END);
+ int size = ftell(fp) / sizeof(int);
+ fseek(fp, (0 * sizeof(int)) + sizeof(int), SEEK_SET);
+ int* hh_game_level1 = malloc(size * sizeof(int));
+ fread(hh_game_level1, sizeof(int), size, fp);
+ fclose(fp);
+
+ FILE *lvl2 = fopen("../test/bin/level2_test.bin", "rb");
+ fseek(lvl2, 0, SEEK_END);
+ size = ftell(lvl2) / sizeof(int);
+ fseek(lvl2, (0 * sizeof(int)) + sizeof(int), SEEK_SET);
+ int* hh_game_level2 = malloc(size * sizeof(int));
+ fread(hh_game_level2, sizeof(int), size, lvl2);
+ fclose(lvl2);
+
+ levels.level[0].place = hh_game_level1;
+ levels.level[1].place = hh_game_level2;
+
+ return levels;
+}
+
diff --git a/src/engine/level_const.h b/src/engine/level_const.h
new file mode 100644
index 0000000..b86ae7b
--- /dev/null
+++ b/src/engine/level_const.h
@@ -0,0 +1,31 @@
+#pragma once
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include "engine/maths.h"
+#include "engine/entity.h"
+
+typedef enum {
+ hh_e_state_starting_screen,
+ hh_e_state_shop,
+ hh_e_state_gameplay,
+ hh_e_state_game_over,
+ hh_e_state_high_score
+} hh_e_game_state;
+//entity array met enemeies
+typedef struct {
+ vec2 size;
+ int hh_total_enemies;
+ int* place;
+ bool hh_level_completed;
+}hh_level_entity;
+
+typedef struct {
+ hh_level_entity level[2];
+ int current_level;
+
+
+}hh_g_all_levels;
+
+hh_g_all_levels hh_init_game_levels();
diff --git a/src/engine/maths.c b/src/engine/maths.c
new file mode 100644
index 0000000..475bba2
--- /dev/null
+++ b/src/engine/maths.c
@@ -0,0 +1,19 @@
+#include "engine/maths.h"
+
+vec2 vec_add(vec2 a, vec2 b){
+ return (vec2){a.x + b.x, a.y + b.y};
+}
+
+vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance){
+ return (vec_cor){
+ .x = in.x - halfDistance.x,
+ .y = in.y - halfDistance.y,
+ };
+}
+
+vec_cen vec_cor2cen(vec_cor in, vec2 halfDistance){
+ return (vec_cen){
+ .x = in.x + halfDistance.x,
+ .y = in.y + halfDistance.y,
+ };
+}
diff --git a/src/engine/maths.h b/src/engine/maths.h
new file mode 100644
index 0000000..bef287e
--- /dev/null
+++ b/src/engine/maths.h
@@ -0,0 +1,22 @@
+#pragma once
+#include <stdint.h>
+// #include <math.h>
+
+typedef struct {
+ int32_t x,y;
+} vec2;
+
+typedef vec2 vec_cen;//centered
+typedef vec2 vec_cor;//left upper corner
+
+vec2 vec_add(vec2 a, vec2 b);
+
+vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance);
+vec_cor vec_cor2cen(vec_cen in, vec2 halfDistance);
+
+//fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point))
+#define HH_MATH_FIXED_POINT 7
+
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#define CLAMP(N,LOWER,UPPER) (MIN(MAX(LOWER, N), UPPER))
diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c
new file mode 100644
index 0000000..647b00c
--- /dev/null
+++ b/src/engine/player_controller.c
@@ -0,0 +1,252 @@
+#include "ppu/types.h"
+#include "engine/camera.h"
+#include "engine/draw_screen.h"
+#include "engine/sprite_controller.h"
+#include "engine/player_controller.h"
+
+#include "input.h"
+
+#include "engine/bullet.h"
+void hh_player_actions() {
+ static Bullet bullet ={
+ .isActive=false,
+ };
+ static hh_entity player={
+ .hp = 4,
+ .speed = 6,
+ .is_grounded = false,
+ .is_hit = false,
+ .radius = 8,
+ .pos = (vec2){32,32},
+ .vel = (vec2){0,0},
+ .vec = (vec2){0,0},
+ .render = {
+ .frame0 = 80,
+ .palette = 3,
+ .fam = (hh_s_ppu_loc_fam_entry){
+ .horizontal_flip = false,
+ .vertical_flip = false,
+ .palette_index = 2,
+ .tilemap_index = 60,
+ }
+ }
+ }, player_new = {0};
+
+
+ static hh_entity enemy={
+ .hp = 4,
+ .speed = 6,
+ .is_grounded = false,
+ .is_hit = false,
+ .radius = 8,
+ .pos = (vec2){128,48},
+ .vel = (vec2){0,0},
+ .vec = (vec2){0,0},
+ .render = {
+ .frame0 = 20,
+ .palette = 7,
+ .fam = (hh_s_ppu_loc_fam_entry){
+ .horizontal_flip = false,
+ .vertical_flip = false,
+ .palette_index = 7,
+ .tilemap_index = 1,
+ }
+ }
+ };
+ player_new = player;
+ // hh_input_read();
+ static uint8_t hit = 0;
+ int8_t hit_timer = 0;
+ int8_t direction_x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right);
+ int8_t direction_y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down);
+
+ if(player.is_hit == true){
+ hit_timer = 9;
+ player.is_hit = false;
+ }
+ if(hit_timer > -10){
+ hit_timer--;
+ }
+
+ if(hit_timer <= 0){
+ if(direction_x != 0){
+ if(player.vel.x > -1 * player.speed && player.vel.x < player.speed) {
+ player.vel.x = player.vel.x + direction_x;
+ } else {
+ if (player.vel.x > 0) {
+ player.vel.x--;
+ } else if(player.vel.x < 0) {
+ player.vel.x++;
+ }
+ }
+ } else {
+ if (player.vel.x > 0) {
+ player.vel.x--;
+ } else if(player.vel.x < 0) {
+ player.vel.x++;
+ }
+ }
+
+ /* // movement Y (w-s) disable gravity to use this
+ if(direction_y != 0){
+ if(player.vel.y > -4 && player.vel.y < 4 ) {
+ player.vel.y = player.vel.y + direction_y;
+ }
+ } else {
+ if (player.vel.y > 0) {
+ player.vel.y--;
+ } else if(player.vel.y < 0) {
+ player.vel.y++;
+ }
+ }
+
+ */
+ } else {
+ if (player.vel.x > 0) {
+ player.vel.x--;
+ } else if(player.vel.x < 0) {
+ player.vel.x++;
+ }
+ player.vel.y++;
+ }
+
+
+ if (g_hh_controller_p1.button_primary && player.is_grounded == true) {//JUMP
+ player.vel.y = -10;
+ player.is_grounded = false;
+ } else if (player.vel.y < 6){
+ player.vel.y += 1; //gravity
+ }
+
+ if(g_hh_controller_p1.button_secondary==true){
+ shootBullet(player.pos,&bullet);
+ }
+ updateBullet(&bullet,5);
+
+
+
+/*
+ player.vel = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right),
+ .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) };
+
+ player_new.vel = (vec2){
+ .x = player.vel.x,
+ .y = player.vel.y,
+ };
+*/
+
+ player_new.vel = (vec2){
+ .x = player.vel.x,
+ .y = player.vel.y,
+ };
+
+ player_new = hh_enemy_collision(player, enemy);
+
+
+ // const int8_t maa = 3;
+ // const int8_t mbb = -3;
+ // if (g_hh_controller_p1.dpad_up)
+ //
+ // if (g_hh_controller_p1.dpad_down)
+ //
+ // if (g_hh_controller_p1.dpad_left) {
+ // player.vel.x += mbb;
+ // // g_hh_demo_balls[0].horizontal_flip = true;
+ // }
+ // if (g_hh_controller_p1.dpad_right) {
+ // player.vel.x += maa;
+ // // g_hh_demo_balls[0].horizontal_flip = true;
+ // }
+ // if (g_hh_controller_p1.button_primary /*&& player.is_grounded*/) //JUMP
+ // player.vel.y += -6;
+ // // // if (g_hh_controller_p1.button_secondary)
+
+ // player.vel.y += 1; //gravity
+
+
+ //END OF VECTOR CHANGES
+ // player.vel.y = CLAMP(player.vel.y,-32,32);
+ // player.vel.x = CLAMP(player.vel.x,-32,32);
+
+ player_new.pos = (vec2){
+ .x = player.pos.x + player_new.vel.x,
+ .y = player.pos.y + player_new.vel.y,
+ };
+
+
+
+ // const uint8_t empty = 0;
+ // hh_s_tiles tiles[9];
+ // const vec2 tile_offset[9] = {
+ // (vec2){-16,-16},(vec2){0,-16},(vec2){+16,-16},
+ // (vec2){-16,0}, (vec2){0,0}, (vec2){+16,0},
+ // (vec2){-16,+16},(vec2){0,+16},(vec2){+16,+16},
+ // };
+ // for (int i = 0; i < 9; i++) {
+ // vec2 temp_pos = vec_add(player.pos, tile_offset[i]);
+ // temp_pos =(vec2){
+ // .x = temp_pos.x,
+ // .y = temp_pos.y,
+ // };
+ // hh_s_tiles tile = {
+ // .pos = temp_pos,
+ // .idx = hh_world_to_tile(temp_pos)
+ // };
+ // if(hh_colidable(tile.idx)) {
+ // tiles[i]=tile;
+ // // printf(" collidable near!");
+ // } else {
+ // tiles[i].idx = 0;
+ // }
+ // }
+ /*
+ 012
+ 345
+ 678
+ */
+ // for (int i = 0; i < 9; i++)
+ // {
+ // if (tiles[i].idx != 0){
+ // hh_solve_collision(tiles[i].pos, &player);
+ // }
+ // }
+
+ player = hh_background_collision ( player, player_new);
+
+ //player = player_new;
+
+ vec_cor cam_pos;//value in tiles
+ // cam_pos = (vec2){0,0};
+ cam_pos = hh_update_camera(player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s)
+ // printf("%i, %i:%i, %i\n",player.pos.x,player.pos.y,cam_pos.x,cam_pos.y);
+ hh_draw_screen(cam_pos);
+ // update player sprite on ppu
+ player.render.fam.position_x = (player.pos.x-cam_pos.x);
+ player.render.fam.position_y = (player.pos.y-cam_pos.y);
+
+ enemy.render.fam.position_x = (enemy.pos.x-cam_pos.x);
+ enemy.render.fam.position_y = (enemy.pos.y-cam_pos.y);
+
+ player.render.fam.tilemap_index = 2;//TODO: these two lines should be redundant
+ player.render.fam.palette_index = 7;
+ // hh_ppu_update_foreground(0, player.render.fam);
+
+ for (int i = 0; i < 4; i++)
+ {
+ hh_s_ppu_loc_fam_entry temp = player.render.fam;
+ temp.position_x = player.render.fam.position_x+(!(player.vel.x>0)?-1:1)*(i%2?8:-8);
+ temp.position_y = player.render.fam.position_y+(i>1?0:-16);
+ temp.tilemap_index = player.render.frame0 + i;
+ temp.palette_index = player.render.palette;
+ temp.horizontal_flip = !(player.vel.x>0);
+ hh_ppu_update_foreground(i,temp);
+ }
+
+
+
+ hh_ppu_update_foreground(4, enemy.render.fam);
+
+}
+
+
+
diff --git a/src/engine/player_controller.h b/src/engine/player_controller.h
new file mode 100644
index 0000000..400c18e
--- /dev/null
+++ b/src/engine/player_controller.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#include "engine/maths.h"
+#include "engine/entity.h"
+// inputs
+
+void hh_player_actions();
diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c
new file mode 100644
index 0000000..b38b647
--- /dev/null
+++ b/src/engine/sprite_controller.c
@@ -0,0 +1,24 @@
+#include <stdint.h>
+
+#include "engine/sprite_controller.h"
+#include "ppu/types.h"
+#include "ppu/consts.h"
+#include "ppu/ppu.h"
+
+uint8_t hh_get_palette(uint8_t tile_idx) {
+ return hh_g_sprite_palette[tile_idx];
+}
+
+void hh_setup_palettes(){
+ //TODO: use simpler function
+ for (int idx = 0; idx < HH_PPU_PALETTE_COUNT; idx++) {
+ for (int col = 0; col < HH_PPU_PALETTE_COLOR_COUNT; col++) {
+ hh_ppu_update_color(idx,col,hh_g_palette[idx][col]);
+ }
+ }
+ // hh_ppu_update_palette_table(hh_g_palette);
+}
+
+bool hh_colidable(uint8_t tile_idx){
+ return (hh_get_palette(tile_idx) != 0);
+}
diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h
new file mode 100644
index 0000000..fc6d3d3
--- /dev/null
+++ b/src/engine/sprite_controller.h
@@ -0,0 +1,118 @@
+#pragma once
+#include <stdint.h>
+
+#include "ppu/types.h"
+
+// handles sprites
+
+// Bg sprites
+
+// Fg or entity sprites
+
+//TODO: pack data inside of sprite_palette LUT
+//HH_PPU_PALETTE_COUNT
+#define HH_SPRITE_COUNT 80
+#define HH_PAL_IDX_SKY 512
+#define HH_PAL_IDX_BRICK 1
+const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = {
+ //TODO: make a buffer of 16 no-collider sprites (instead of the current 1)
+ 0,1,1,1,1,1,1,1,1,1, //1+9
+ 1,1,1,1,1,1,1,1,1,1, //6+4
+ 1,1,1,1,1,1,1,1,1, //9
+ 7,7,7,2,7,7,1,2,7,
+ 7,7,7,7, //??
+
+ 7,6,6,6,6,6,6,6, //baskets
+ 7,7,7,7,7,7,7,7,7,7, //shop
+ 7,7,7,7,7, //shop
+ 6,6,6,6,6, //(hi-)score
+
+ 3,3,3,3,3,3, //title_screen icon
+ 6,6,6,6,/*6,6,6,6,6,6, //title_screen large letters
+ 6,6,6,6,*/
+ //other palettes here:
+ // [HH_PAL_IDX_SKY] = 0,
+};
+
+
+const static hh_ppu_loc_palette_table_t hh_g_palette = {
+ {//palette info here
+ {0x1,0x2,0x3},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {//Bricks
+ {0x1,0x2,0x3},//01
+ {0xd,0x8,0xa},//24
+ {0x0,0x0,0x1},//25
+ {0x1,0x1,0x1},//26
+ {0x1,0x1,0x2},//27
+ {0x2,0x2,0x3},//28
+ {0x3,0x4,0x5},//29
+ {0x5,0x1,0x7}},
+ {//slime
+ {0x1,0x2,0x3},
+ {0x1,0x3,0x2},
+ {0x4,0x8,0x3},
+ {0x7,0xa,0x4},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {//player //TODO: use one less color && update player indexed sprites
+ {0x0,0x0,0x0},
+ {0x1,0x1,0x1},
+ {0x4,0x2,0x5},
+ {0x7,0x3,0x7},
+ {0xe,0xe,0xe},
+ {0xe,0xe,0xe}, //elemental
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {//elemental
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {//white
+ {0x1,0x2,0x3},
+ {0xf,0xf,0xf},
+ {0xf,0xf,0xf},
+ {0xf,0xf,0xf},
+ {0xf,0xf,0xf},
+ {0xf,0xf,0xf},
+ {0xf,0xf,0xf},
+ {0xf,0xf,0xf}},
+ {//Dev palette (7)
+ {0x0,0xf,0xf},
+ {0xf,0xf,0xf},
+ {0xf,0x0,0xf},
+ {0xf,0xf,0x0},
+ {0xf,0x0,0x0},
+ {0x0,0xf,0x0},
+ {0x0,0x0,0xf},
+ {0x0,0x0,0x0}}
+};
+
+void hh_setup_palettes();
+
+/** @brief return palette index that belongs to tilemap index */
+uint8_t hh_get_palette(uint8_t tile_idx);
+
+bool hh_colidable(uint8_t tile_idx);
diff --git a/src/engine/title_screen.c b/src/engine/title_screen.c
new file mode 100644
index 0000000..9c7ed48
--- /dev/null
+++ b/src/engine/title_screen.c
@@ -0,0 +1,93 @@
+#include "ppu/ppu.h"
+#include "ppu/types.h"
+#include "ppu/consts.h"
+
+
+#include "engine/draw_screen.h"
+#include "engine/entity.h"
+
+void hh_init_title_screen(){
+
+ // hh_clear_screen();
+
+ //send data
+ uint8_t idx = 0;
+ const uint8_t tilemap_offset = 59;
+ int tiles_h = HH_PPU_BG_CANVAS_TILES_H;
+ int vp_h = HH_PPU_SCREEN_WIDTH/HH_PPU_SPRITE_WIDTH; //screen_h in tiles
+ int vert_offset = tiles_h*3;
+
+ const uint8_t arr[4][4] = {
+ {0,1,1,0},
+ {2,3,3,2},
+ {4,0,0,4},
+ {5,6,6,5},
+ };
+ int val, counter =0;
+ hh_ppu_update_color(5, 0, (hh_ppu_rgb_color_t) {0x1, 0x1, 0x1});
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ val = arr[i][j];
+
+ hh_s_ppu_loc_bam_entry temp = {
+ .vertical_flip=false, .horizontal_flip = ((j % 4 < 2) ? false : true),
+ .palette_index = (counter == 9 || counter == 10? 5:3), .tilemap_index = (val > 0 ? (tilemap_offset + val) : 0)
+ };
+
+ int vert_pos = tiles_h*i;
+ int x_pos = j;
+ idx = vert_offset + vert_pos + x_pos + vp_h/2-2;
+
+ hh_ppu_update_background(idx,temp);
+ counter++;
+ }
+
+ }
+
+
+ const uint8_t letters_offset = 66;
+ const int _size_hooded = 7, _size_v = 2;
+
+ // char* hh = "hooded";
+ int hooded_lookup[7][2]={
+ {0,1},{0,2},//H
+ {3,4},{3,4},//oo
+ {5,6},{13,9},//de
+ {5,6}//d
+ };
+
+ counter = 8;
+ for (int i = 0; i < _size_hooded; i++) {
+ for (int vert = 1; vert <= _size_v; vert++) {
+ //TODO: move 'H' a few pixels to the right for a more cohesive font spacing
+ hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) {
+ .vertical_flip = false, .horizontal_flip = false,
+ .palette_index = 6, .tilemap_index = letters_offset + hooded_lookup[i][vert-1],
+ .position_x = (16*i + 64+48), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+16 +(i==2 || i==3 ? 6:0))
+ });
+ }
+ }
+
+
+ hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t) {0xa, 0x3, 0x3});
+ hh_ppu_update_color(5, 2, (hh_ppu_rgb_color_t) {0xc, 0x5, 0x3});
+
+ const int _size_havoc = 6;
+ int lookup_havoc[6][2]={
+ {0,1},{0,2},//H
+ {13,10},{7,8},//av
+ {13,11},{13,12}//oc
+ };
+
+ counter = 8 + (_size_hooded * _size_v);
+ for (int i = 0; i < _size_havoc; i++) {
+ for (int vert = 1; vert <= _size_v; vert++) {
+ //TODO: move 'H' a few pixels to the right for a more cohesive font spacing
+ hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) {
+ .vertical_flip = false, .horizontal_flip = (i > 4 && vert==0 ? 1:0),
+ .palette_index = 5, .tilemap_index = letters_offset + lookup_havoc[i][vert-1],
+ .position_x = (16*i +64+32+8), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+48)
+ });
+ }
+ }
+}
diff --git a/src/engine/title_screen.h b/src/engine/title_screen.h
new file mode 100644
index 0000000..b5eda63
--- /dev/null
+++ b/src/engine/title_screen.h
@@ -0,0 +1,3 @@
+#pragma once
+
+void hh_init_title_screen();
diff --git a/src/entity.h b/src/entity.h
index 20cbf42..181182b 100644
--- a/src/entity.h
+++ b/src/entity.h
@@ -12,4 +12,3 @@ typedef struct {
int8_t speed; //10 default L/R MODifier
bool in_air;
} hh_s_entity_player;
-
diff --git a/src/game_loop/game_over.c b/src/game_loop/game_over.c
new file mode 100644
index 0000000..f5b70cf
--- /dev/null
+++ b/src/game_loop/game_over.c
@@ -0,0 +1,28 @@
+#include "game_over.h"
+
+
+void hh_game_over(hh_e_game_state* hh_game_state){
+ static hh_e_game_over hh_e_states_game_over = hh_e_game_over_show;
+
+ switch (hh_e_states_game_over)
+ {
+ case hh_e_game_over_show:
+ hh_clear_screen();
+ hh_clear_sprite();
+ // todo: make function to show game over
+ hh_e_states_game_over = hh_e_game_over_input;
+ break;
+ case hh_e_game_over_input:
+ if(g_hh_controller_p1.button_primary){
+ hh_e_states_game_over = hh_e_game_over_end;
+ }
+ break;
+ case hh_e_game_over_end:
+ hh_e_states_game_over = hh_e_game_over_show;
+ *hh_game_state = hh_e_state_game_over;
+ break;
+ default:
+ hh_e_states_game_over = hh_e_game_over_show;
+ break;
+ }
+}
diff --git a/src/game_loop/game_over.h b/src/game_loop/game_over.h
new file mode 100644
index 0000000..80db667
--- /dev/null
+++ b/src/game_loop/game_over.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "input.h"
+#include "engine/draw_screen.h"
+#include "engine/level_const.h"
+
+
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef enum {
+ hh_e_game_over_show,
+ hh_e_game_over_input,
+ hh_e_game_over_end,
+} hh_e_game_over;
+
+
+void hh_game_over(hh_e_game_state*);
diff --git a/src/game_loop/gameplay.c b/src/game_loop/gameplay.c
new file mode 100644
index 0000000..295eb5d
--- /dev/null
+++ b/src/game_loop/gameplay.c
@@ -0,0 +1,47 @@
+#include "gameplay.h"
+
+// player struct
+
+
+void hh_gameplay(hh_g_all_levels game, hh_e_game_state* hh_game_state){
+ static hh_e_gameplay gameplay = hh_e_setup_screen;
+
+ switch (gameplay)
+ {
+ case hh_e_setup_screen:
+ hh_setup_screen(game.level[game.current_level]);
+ gameplay = hh_e_play_level;
+ break;
+ case hh_e_play_level:
+ // todo: here come all the different functions for the gameplay
+ hh_player_actions();
+
+
+
+
+
+ if(game.level[game.current_level].hh_level_completed){
+ gameplay = hh_e_level_complete;
+ }
+ break;
+ case hh_e_level_complete:
+ if(game.current_level < 3){
+ game.current_level++;
+ gameplay = hh_e_setup_screen;
+ }
+ else {
+ gameplay = hh_e_game_over;
+ }
+ break;
+ case hh_e_game_over:
+ // todo make reset levels
+ hh_reset_levels();
+ gameplay = hh_e_setup_screen;
+ *hh_game_state = hh_e_state_game_over;
+ break;
+ default:
+ break;
+ }
+
+}
+void hh_reset_levels(){}
diff --git a/src/game_loop/gameplay.h b/src/game_loop/gameplay.h
new file mode 100644
index 0000000..d309e78
--- /dev/null
+++ b/src/game_loop/gameplay.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "engine/draw_screen.h"
+#include "engine/player_controller.h"
+#include "engine/sprite_controller.h"
+#include "game_loop/starting_screen.h"
+#include "engine/level_const.h"
+
+typedef enum {
+ hh_e_setup_screen,
+ hh_e_play_level,
+ hh_e_level_complete,
+ hh_e_game_over,
+}hh_e_gameplay;
+
+void hh_reset_levels();
+void hh_gameplay(hh_g_all_levels, hh_e_game_state*);
+
diff --git a/src/game_loop/shop.c b/src/game_loop/shop.c
new file mode 100644
index 0000000..b3d2234
--- /dev/null
+++ b/src/game_loop/shop.c
@@ -0,0 +1,30 @@
+#include "shop.h"
+
+
+void hh_shop(hh_e_game_state* hh_game_state){
+ static hh_e_shop_states hh_e_shop = hh_e_shop_show;
+
+ switch (hh_e_shop)
+ {
+ case hh_e_shop_show:
+ hh_clear_screen();
+ hh_clear_sprite();
+ // todo: make function to show shop
+ //hh_setup_shop();
+ hh_e_shop = hh_e_shop_input;
+ break;
+ case hh_e_shop_input:
+ // todo: make it so that you can choose between shop
+ if(g_hh_controller_p1.button_primary){
+ hh_e_shop = hh_e_shop_end;
+ }
+ break;
+ case hh_e_shop_end:
+ hh_e_shop = hh_e_shop_show;
+ *hh_game_state = hh_e_state_gameplay;
+ break;
+ default:
+ hh_e_shop = hh_e_shop_show;
+ break;
+ }
+}
diff --git a/src/game_loop/shop.h b/src/game_loop/shop.h
new file mode 100644
index 0000000..7d01b7e
--- /dev/null
+++ b/src/game_loop/shop.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "input.h"
+#include "engine/draw_screen.h"
+#include "engine/level_const.h"
+
+
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef enum {
+ hh_e_shop_show,
+ hh_e_shop_input,
+ hh_e_shop_end,
+} hh_e_shop_states;
+
+
+void hh_shop(hh_e_game_state*);
diff --git a/src/game_loop/starting_screen.c b/src/game_loop/starting_screen.c
new file mode 100644
index 0000000..6ab0278
--- /dev/null
+++ b/src/game_loop/starting_screen.c
@@ -0,0 +1,32 @@
+#include "starting_screen.h""
+#include "input.h"
+#include "engine/title_screen.h"
+#include "engine/draw_screen.h"
+// #include "engine/player_controller.h"
+
+bool hh_show_starting_screen(){
+ static hh_e_screen_states hh_e_starting_screen = hh_e_state_show;
+
+ switch (hh_e_starting_screen)
+ {
+ case hh_e_state_show:
+ hh_clear_screen();
+ hh_init_title_screen();
+ hh_e_starting_screen = hh_e_state_input;
+ return false;
+ break;
+ case hh_e_state_input:
+ if(g_hh_controller_p1.button_primary){
+ hh_e_starting_screen = hh_e_state_end;
+ }
+ break;
+ case hh_e_state_end:
+ hh_e_starting_screen = hh_e_state_show;
+ return true;
+ break;
+ default:
+ hh_e_starting_screen = hh_e_state_show;
+ break;
+ }
+ return false;
+}
diff --git a/src/game_loop/starting_screen.h b/src/game_loop/starting_screen.h
new file mode 100644
index 0000000..4228f38
--- /dev/null
+++ b/src/game_loop/starting_screen.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef enum {
+ hh_e_state_show,
+ hh_e_state_input,
+ hh_e_state_end
+} hh_e_screen_states;
+
+
+bool hh_show_starting_screen();
+
diff --git a/src/input.h b/src/input.h
index adacba2..90f0c61 100644
--- a/src/input.h
+++ b/src/input.h
@@ -19,4 +19,3 @@ extern hh_s_gamepad g_hh_controller_p2;
/** @brief update g_hh_controller_p1 and 2 by reading buttons */
void hh_input_read();
-
diff --git a/src/makefile b/src/makefile
index c69bfb5..4dc84e6 100644
--- a/src/makefile
+++ b/src/makefile
@@ -30,7 +30,21 @@ CFLAGS += $(if $(DESKTOP), -DHH_TARGET_DESKTOP, )
LOCAL_SRCS += main.c \
ppu/internals.c \
ppu/ppu.c \
- demo.c
+ demo.c \
+ engine/engine.c \
+ engine/sprite_controller.c \
+ engine/player_controller.c \
+ engine/draw_screen.c \
+ engine/camera.c \
+ engine/maths.c \
+ engine/entity.c \
+ engine/bullet.c \
+ engine/title_screen.c \
+ engine/level_const.c \
+ game_loop/shop.c \
+ game_loop/gameplay.c \
+ game_loop/game_over.c \
+ game_loop/starting_screen.c
CFLAGS += $(SHARED_FLAGS)
LFLAGS += $(SHARED_FLAGS)
diff --git a/src/ppusim/input.c b/src/ppusim/input.c
index 08bc382..4bc7018 100644
--- a/src/ppusim/input.c
+++ b/src/ppusim/input.c
@@ -12,4 +12,6 @@ void hh_input_read() {
g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S];
g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A];
g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D];
+ g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_SPACE];
+ g_hh_controller_p1.button_secondary = kb[SDL_SCANCODE_R];
}
diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c
index 449b78d..8b67acc 100644
--- a/src/ppusim/sim.c
+++ b/src/ppusim/sim.c
@@ -1,9 +1,12 @@
#include <SDL2/SDL.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <stdio.h>
#include "main.h"
#include "ppu/ppu.h"
+#include "ppu/consts.h"
+#include "ppu/internals.h"
#include "ppusim/mem.h"
#include "ppusim/sim.h"
#include "ppusim/work.h"
@@ -22,6 +25,33 @@ void hh_ppu_init() {
g_hh_ppusim_vram = malloc(sizeof(hh_ppu_data_t) * 0xffff);
memset(g_hh_ppusim_vram, 0x0000, 0xffff);
+ hh_ppu_load_tilemap();
+}
+
+void hh_ppu_load_tilemap() {
+ //TODO: remove magic file name here
+ char* filename = "static/tiles.bin";
+ FILE* fp = fopen(filename,"rb");
+ if (!fp){
+ fprintf(stderr,"Error: Failed to load tiles.");
+ return;//error
+ }
+ int sprite_size = (HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT);
+ fseek(fp, 0, SEEK_END);//goto EOF
+ int _size = ftell(fp)/sprite_size;
+ fseek(fp, 0, 0);//goto start of file
+
+ for (int i = 0; i < _size; i++) {
+ uint8_t data[sprite_size];
+
+ fread(data,sizeof(uint8_t),sprite_size,fp);
+
+ hh_s_ppu_vram_data sprite = hh_ppu_2nat_sprite(data);
+ sprite.offset = i*HH_PPU_VRAM_TMM_SPRITE_SIZE;
+ hh_ppu_vram_write(sprite);
+ free(sprite.data);
+ }
+ fclose(fp);
}
void hh_ppu_deinit() {
diff --git a/src/ppusim/sim.h b/src/ppusim/sim.h
index 73f4b23..4d1d718 100644
--- a/src/ppusim/sim.h
+++ b/src/ppusim/sim.h
@@ -4,3 +4,6 @@
#define HH_PPUSIM_UPSCALE_FACTOR 3
/** @brief max framerate for PPUSIM */
#define HH_PPUSIM_FRAMERATE 60
+
+/** @brief pump tilemap from rom to ppu ram */
+void hh_ppu_load_tilemap(); //ppu sim?
diff --git a/src/static/background/shop.hex b/src/static/background/shop.hex
new file mode 100644
index 0000000..8c08feb
--- /dev/null
+++ b/src/static/background/shop.hex
@@ -0,0 +1,331 @@
+;indices: 9
+;75 24 38
+;a5 30 30
+;cf 57 3c
+;1e 1d 39
+;40 27 51
+;7a 36 7b
+;10 14 1f
+;eb ed e9
+;17 20 38
+
+000000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+000010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+000020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000040: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000050: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000070: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000090: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+0000a0: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+0000b0: 06 06 01 00 00 00 00 00 00 00 00 00 00 00 01 06
+0000c0: 06 06 06 01 00 00 00 00 00 00 00 00 00 01 06 06
+0000d0: 06 06 06 06 01 01 00 00 00 00 00 01 01 06 06 06
+0000e0: 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06
+0000f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000120: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000130: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000140: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000150: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000160: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000170: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000180: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000190: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0001a0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0001b0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0001c0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0001d0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0001e0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0001f0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000220: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000230: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000240: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000250: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000260: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000270: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000280: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000290: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0002a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0002b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0002c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0002d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0002e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0002f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000320: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000330: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000340: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000350: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000360: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000370: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000380: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000390: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0003a0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0003b0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0003c0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0003d0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0003e0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0003f0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000400: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07
+000410: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07
+000420: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000430: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000440: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000450: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000460: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000470: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000480: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000490: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0004a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0004b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0004c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0004d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0004e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0004f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000500: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000510: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000520: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000530: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000540: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000550: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000560: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000570: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000580: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000590: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0005a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0005b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0005c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0005d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0005e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0005f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000600: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+000610: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+000620: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000630: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000640: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000650: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000660: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000670: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000680: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000690: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+0006a0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+0006b0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+0006c0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+0006d0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+0006e0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+0006f0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+000700: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01
+000710: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01
+000720: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01
+000730: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01
+000740: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01
+000750: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01
+000760: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01
+000770: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01
+000780: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01
+000790: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01
+0007a0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01
+0007b0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01
+0007c0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01
+0007d0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01
+0007e0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01
+0007f0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01
+000800: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01
+000810: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06
+000820: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06
+000830: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06
+000840: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06
+000850: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06
+000860: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06
+000870: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06
+000880: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01
+000890: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06
+0008a0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06
+0008b0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06
+0008c0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06
+0008d0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06
+0008e0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06
+0008f0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06
+000900: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000910: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000920: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000930: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000940: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000950: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000a00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000a10: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06
+000a20: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06
+000a30: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06
+000a40: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06
+000a50: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06
+000a60: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06
+000a70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000a80: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06
+000a90: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06
+000aa0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06
+000ab0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06
+000ac0: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06
+000ad0: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06
+000ae0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000af0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b00: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b10: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b20: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b30: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b40: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b50: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b60: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b70: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b80: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000b90: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ba0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000bb0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000bc0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000bd0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000be0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000bf0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+000c00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000c10: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000c20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000c30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000c40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000c50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000c60: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000c70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000c80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000c90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000ca0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000cb0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000cc0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000cd0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01
+000ce0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01
+000cf0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+000d00: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+000d10: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01
+000d20: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01
+000d30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000d40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000d50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000d60: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01
+000d70: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01
+000d80: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+000d90: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+000da0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01
+000db0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01
+000dc0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000dd0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000de0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000df0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+000e00: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06
+000e10: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06
+000e20: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06
+000e30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e60: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06
+000e70: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06
+000e80: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06
+000e90: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06
+000ea0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06
+000eb0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06
+000ec0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ed0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ee0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ef0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000f00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000f10: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06
+000f20: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06
+000f30: 06 07 07 07 07 06 06 07 07 06 06 07 07 07 07 06
+000f40: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06
+000f50: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06
+000f60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000f70: 06 07 07 07 07 07 07 07 07 07 07 07 07 07 07 06
+000f80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000f90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000fa0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06
+000fb0: 06 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06
+000fc0: 06 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06
+000fd0: 06 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06
+000fe0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06
+000ff0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001000: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001010: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07
+001020: 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 07
+001030: 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 07
+001040: 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 07
+001050: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07
+001060: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001070: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001080: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001090: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0010a0: 07 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06
+0010b0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06
+0010c0: 07 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07
+0010d0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06
+0010e0: 07 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07
+0010f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001110: 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 06
+001120: 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 07
+001130: 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 07
+001140: 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 07
+001150: 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 07
+001160: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001170: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001180: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001190: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0011a0: 06 07 07 07 06 06 06 06 06 07 07 06 06 06 06 07
+0011b0: 07 06 07 07 06 06 06 06 07 07 07 06 06 06 06 06
+0011c0: 06 07 07 06 06 06 06 07 07 07 06 06 06 07 07 07
+0011d0: 07 07 06 06 06 06 07 07 07 06 06 06 07 07 06 06
+0011e0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06
+0011f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001210: 07 07 07 06 06 07 07 07 07 07 06 06 06 06 07 07
+001220: 07 07 06 06 06 06 06 07 07 07 06 06 06 07 06 07
+001230: 07 06 06 06 06 06 07 07 07 06 06 06 07 07 07 07
+001240: 07 06 06 06 06 07 07 07 06 06 06 07 06 07 07 06
+001250: 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06
+001260: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001270: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001280: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001290: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0012a0: 07 07 06 06 06 06 07 07 07 06 06 06 07 06 06 07
+0012b0: 07 07 06 06 07 06 06 07 07 06 06 07 06 06 07 07
+0012c0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06
+0012d0: 06 06 06 07 06 07 07 06 06 06 06 07 07 07 06 06
+0012e0: 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 06
+0012f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001310: 07 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06
+001320: 07 06 06 06 07 06 07 07 06 06 06 06 06 06 06 06
+001330: 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06
+001340: 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06
+001350: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06
+001360: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001370: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001380: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001390: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0013a0: 06 06 06 07 07 07 07 06 06 06 06 06 06 06 06 06
+0013b0: 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 06
+0013c0: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06
+0013d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0013e0: 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 06
+0013f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 \ No newline at end of file
diff --git a/src/static/background/shop_ext.hex b/src/static/background/shop_ext.hex
new file mode 100644
index 0000000..d151156
--- /dev/null
+++ b/src/static/background/shop_ext.hex
@@ -0,0 +1,459 @@
+;indices: 9
+;75 24 38
+;a5 30 30
+;cf 57 3c
+;1e 1d 39
+;40 27 51
+;7a 36 7b
+;10 14 1f
+;eb ed e9
+;17 20 38
+
+000000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+000010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+000020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000040: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000050: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000070: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000090: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+0000a0: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+0000b0: 06 06 01 00 00 00 00 00 00 00 00 00 00 00 01 06
+0000c0: 06 06 06 01 00 00 00 00 00 00 00 00 00 01 06 06
+0000d0: 06 06 06 06 01 01 00 00 00 00 00 01 01 06 06 06
+0000e0: 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06
+0000f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000120: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000130: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000140: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000150: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000160: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000170: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000180: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000190: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+0001a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+0001b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+0001c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+0001d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+0001e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+0001f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07
+000200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000220: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000230: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000240: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000250: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000260: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000270: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000280: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000290: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0002a0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0002b0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0002c0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0002d0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0002e0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0002f0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000320: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000330: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000340: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000350: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000360: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000370: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000380: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000390: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0003a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0003b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0003c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0003d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0003e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0003f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000400: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000410: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000420: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000430: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000440: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000450: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000460: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000470: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000480: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000490: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0004a0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0004b0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0004c0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0004d0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0004e0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+0004f0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06
+000500: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000510: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000520: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000530: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000540: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000550: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000560: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000570: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000580: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000590: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0005a0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0005b0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0005c0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0005d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0005e0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0005f0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000600: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07
+000610: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07
+000620: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000630: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000640: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000650: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000660: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000670: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000680: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000690: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0006a0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0006b0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0006c0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0006d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0006e0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+0006f0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+000700: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07
+000710: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07
+000720: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000730: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000740: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000750: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000760: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000770: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000780: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000790: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0007a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0007b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0007c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0007d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0007e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+0007f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06
+000800: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01
+000810: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01
+000820: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+000830: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+000840: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+000850: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+000860: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+000870: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+000880: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+000890: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+0008a0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+0008b0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+0008c0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+0008d0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06
+0008e0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01
+0008f0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01
+000900: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000910: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000920: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000930: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000940: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000950: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0009e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0009f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000a00: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+000a10: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+000a20: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000a30: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000a40: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000a50: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000a60: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000a70: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000a80: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000a90: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000aa0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000ab0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000ac0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000ad0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06
+000ae0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+000af0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06
+000b00: 01 01 06 06 06 06 06 06 01 06 06 06 06 06 06 06
+000b10: 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06
+000b20: 01 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06
+000b30: 01 01 06 01 06 06 06 06 06 06 06 01 06 06 06 06
+000b40: 01 01 06 06 01 06 06 06 06 06 06 06 01 06 06 06
+000b50: 01 01 06 06 06 01 06 06 06 06 06 06 06 01 06 06
+000b60: 01 01 06 06 06 06 01 06 06 06 06 06 06 06 01 06
+000b70: 01 01 06 06 06 06 06 01 06 06 06 06 06 06 06 01
+000b80: 01 01 06 06 06 06 06 06 01 06 06 06 06 06 06 06
+000b90: 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06
+000ba0: 01 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06
+000bb0: 01 01 06 01 06 06 06 06 06 06 06 01 06 06 06 06
+000bc0: 01 01 06 06 01 06 06 06 06 06 06 06 01 06 06 06
+000bd0: 01 01 06 06 06 01 06 06 06 06 06 06 06 01 06 06
+000be0: 01 01 06 06 06 06 01 06 06 06 06 06 06 06 01 06
+000bf0: 01 01 06 06 06 06 06 01 06 06 06 06 06 06 06 01
+000c00: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01
+000c10: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06
+000c20: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06
+000c30: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06
+000c40: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06
+000c50: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06
+000c60: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06
+000c70: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06
+000c80: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01
+000c90: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06
+000ca0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06
+000cb0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06
+000cc0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06
+000cd0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06
+000ce0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06
+000cf0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06
+000d00: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01
+000d10: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01
+000d20: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01
+000d30: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01
+000d40: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01
+000d50: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01
+000d60: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01
+000d70: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01
+000d80: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01
+000d90: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01
+000da0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01
+000db0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01
+000dc0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01
+000dd0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01
+000de0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01
+000df0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01
+000e00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000e10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000e20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000e90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ea0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000eb0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ec0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ed0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ee0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ef0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000f00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000f10: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06
+000f20: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06
+000f30: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06
+000f40: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06
+000f50: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06
+000f60: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06
+000f70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000f80: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06
+000f90: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06
+000fa0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06
+000fb0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06
+000fc0: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06
+000fd0: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06
+000fe0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+000ff0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001000: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001010: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001020: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001030: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001040: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001050: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001060: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001070: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001080: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001090: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+0010a0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+0010b0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+0010c0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+0010d0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+0010e0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+0010f0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06
+001100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001120: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001130: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001140: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001150: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001160: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+001170: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001180: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001190: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0011a0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0011b0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0011c0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0011d0: 01 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06
+0011e0: 01 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06
+0011f0: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06
+001200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001220: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001230: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001240: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001250: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001260: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+001270: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001280: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001290: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0012a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0012b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0012c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0012d0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06
+0012e0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06
+0012f0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06
+001300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001320: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001330: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001340: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001350: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001360: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+001370: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+001380: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+001390: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+0013a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+0013b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+0013c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+0013d0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01
+0013e0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01
+0013f0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+001400: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06
+001410: 01 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06
+001420: 01 06 06 06 06 06 06 06 01 01 01 01 06 06 06 06
+001430: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001440: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001450: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001460: 01 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06
+001470: 01 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06
+001480: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06
+001490: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06
+0014a0: 01 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06
+0014b0: 01 06 06 06 06 06 06 06 01 01 01 01 06 06 06 06
+0014c0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0014d0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0014e0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0014f0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001500: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06
+001510: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06
+001520: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06
+001530: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001540: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001550: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001560: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06
+001570: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06
+001580: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06
+001590: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06
+0015a0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06
+0015b0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06
+0015c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0015d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0015e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0015f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001600: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+001610: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01
+001620: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01
+001630: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+001640: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+001650: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+001660: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01
+001670: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01
+001680: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+001690: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01
+0016a0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01
+0016b0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01
+0016c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+0016d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+0016e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+0016f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01
+001700: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001710: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06
+001720: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06
+001730: 06 07 07 07 07 06 06 07 07 06 06 07 07 07 07 06
+001740: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06
+001750: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06
+001760: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001770: 06 07 07 07 07 07 07 07 07 07 07 07 07 07 07 06
+001780: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001790: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0017a0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06
+0017b0: 06 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06
+0017c0: 06 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06
+0017d0: 06 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06
+0017e0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06
+0017f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001800: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001810: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07
+001820: 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 07
+001830: 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 07
+001840: 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 07
+001850: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07
+001860: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001870: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001880: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001890: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0018a0: 07 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06
+0018b0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06
+0018c0: 07 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07
+0018d0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06
+0018e0: 07 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07
+0018f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001900: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001910: 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 06
+001920: 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 07
+001930: 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 07
+001940: 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 07
+001950: 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 07
+001960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+0019a0: 06 07 07 07 06 06 06 06 06 07 07 06 06 06 06 07
+0019b0: 07 06 07 07 06 06 06 06 07 07 07 06 06 06 06 06
+0019c0: 06 07 07 06 06 06 06 07 07 07 06 06 06 07 07 07
+0019d0: 07 07 06 06 06 06 07 07 07 06 06 06 07 07 06 06
+0019e0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06
+0019f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001a00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001a10: 07 07 07 06 06 07 07 07 07 07 06 06 06 06 07 07
+001a20: 07 07 06 06 06 06 06 07 07 07 06 06 06 07 06 07
+001a30: 07 06 06 06 06 06 07 07 07 06 06 06 07 07 07 07
+001a40: 07 06 06 06 06 07 07 07 06 06 06 07 06 07 07 06
+001a50: 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06
+001a60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001a70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001a80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001a90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001aa0: 07 07 06 06 06 06 07 07 07 06 06 06 07 06 06 07
+001ab0: 07 07 06 06 07 06 06 07 07 06 06 07 06 06 07 07
+001ac0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06
+001ad0: 06 06 06 07 06 07 07 06 06 06 06 07 07 07 06 06
+001ae0: 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 06
+001af0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001b00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001b10: 07 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06
+001b20: 07 06 06 06 07 06 07 07 06 06 06 06 06 06 06 06
+001b30: 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06
+001b40: 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06
+001b50: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06
+001b60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001b70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001b80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001b90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
+001ba0: 06 06 06 07 07 07 07 06 06 06 06 06 06 06 06 06
+001bb0: 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 06
+001bc0: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06
+001bd0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06
+001be0: 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 06
+001bf0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 \ No newline at end of file
diff --git a/src/static/background/tilemap.hex b/src/static/background/tilemap.hex
new file mode 100644
index 0000000..446f3dd
--- /dev/null
+++ b/src/static/background/tilemap.hex
@@ -0,0 +1,514 @@
+;TODO split up file
+;Tilemap (all current tiles)
+0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0100: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06
+0110: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05
+0120: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05
+0130: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02
+0140: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03
+0150: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03
+0160: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03
+0170: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02
+0180: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02
+0190: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+01a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02
+01b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02
+01c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03
+01d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03
+01e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03
+01f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02
+0200: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06
+0210: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05
+0220: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05
+0230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0240: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+0250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+0260: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+0270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+0290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+02a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+02b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+02c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+02d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+02e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+02f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0300: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06
+0310: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06
+0320: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06
+0330: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06
+0340: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06
+0350: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05
+0360: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05
+0370: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05
+0380: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00
+0390: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+03a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+03b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06
+03c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06
+03d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06
+03e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05
+03f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05
+0400: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0410: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0420: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02
+0430: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02
+0440: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03
+0450: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03
+0460: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03
+0470: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02
+0480: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0490: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+04a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02
+04b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02
+04c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03
+04d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03
+04e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03
+04f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02
+0500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+0510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03
+0520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+0530: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0540: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+0550: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+0560: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03
+0570: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0580: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02
+0590: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+05a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+05b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+05c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03
+05d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+05e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03
+05f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0600: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00
+0610: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00
+0620: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00
+0630: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06
+0640: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06
+0650: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05
+0660: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05
+0670: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05
+0680: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00
+0690: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+06a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+06b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06
+06c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06
+06d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05
+06e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05
+06f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05
+0700: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0710: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0720: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02
+0730: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02
+0740: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03
+0750: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03
+0760: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03
+0770: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02
+0780: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0790: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+07a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02
+07b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02
+07c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04
+07d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04
+07e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04
+07f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05
+0800: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+0810: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03
+0820: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+0830: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0840: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+0850: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+0860: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03
+0870: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0880: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02
+0890: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+08a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+08b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+08c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04
+08d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04
+08e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04
+08f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05
+0900: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00
+0910: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00
+0920: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00
+0930: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06
+0940: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06
+0950: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05
+0960: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05
+0970: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05
+0980: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00
+0990: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+09a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+09b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06
+09c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06
+09d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05
+09e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06
+09f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06
+0a00: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06
+0a10: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05
+0a20: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05
+0a30: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02
+0a40: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03
+0a50: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03
+0a60: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03
+0a70: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02
+0a80: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0a90: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02
+0aa0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02
+0ab0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02
+0ac0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04
+0ad0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04
+0ae0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04
+0af0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05
+0b00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06
+0b10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05
+0b20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05
+0b30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0b40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+0b50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+0b60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+0b70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0b80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02
+0b90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+0ba0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+0bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+0bc0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04
+0bd0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04
+0be0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04
+0bf0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05
+0c00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06
+0c10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06
+0c20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06
+0c30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06
+0c40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06
+0c50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05
+0c60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05
+0c70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05
+0c80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00
+0c90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+0ca0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00
+0cb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06
+0cc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06
+0cd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05
+0ce0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06
+0cf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06
+0d00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06
+0d10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06
+0d20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06
+0d30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06
+0d40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06
+0d50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05
+0d60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05
+0d70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05
+0d80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00
+0d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00
+0da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00
+0db0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06
+0dc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06
+0dd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06
+0de0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05
+0df0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05
+0e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00
+0e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00
+0e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00
+0e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06
+0e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06
+0e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05
+0e60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05
+0e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05
+0e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00
+0e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00
+0ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00
+0eb0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06
+0ec0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06
+0ed0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05
+0ee0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05
+0ef0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05
+0f00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00
+0f10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00
+0f20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00
+0f30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06
+0f40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06
+0f50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05
+0f60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05
+0f70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05
+0f80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00
+0f90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00
+0fa0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00
+0fb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06
+0fc0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06
+0fd0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05
+0fe0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06
+0ff0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06
+1000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+1010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03
+1020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+1030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+1050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+1060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03
+1070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02
+1090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+10a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+10b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+10c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04
+10d0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04
+10e0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04
+10f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1100: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+1110: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03
+1120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+1130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+1150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+1160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03
+1170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02
+1190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+11a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+11b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+11c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03
+11d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03
+11e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03
+11f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1200: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05
+1210: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05
+1220: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05
+1230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+1250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+1260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03
+1270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02
+1290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+12a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+12b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+12c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03
+12d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+12e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03
+12f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1300: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+1310: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03
+1320: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+1330: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1340: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03
+1350: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03
+1360: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03
+1370: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1380: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02
+1390: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02
+13a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+13b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+13c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03
+13d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+13e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03
+13f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1400: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1410: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1420: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1430: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1440: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1450: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1460: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1470: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1480: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1490: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+14a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+14b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+14c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+14d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+14e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+14f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+1510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03
+1520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+1530: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01
+1540: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02
+1550: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02
+1560: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02
+1570: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01
+1580: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01
+1590: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01
+15a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01
+15b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01
+15c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01
+15d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01
+15e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01
+15f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01
+1600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+1610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03
+1620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+1630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1640: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02
+1650: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02
+1660: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02
+1670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1680: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01
+1690: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01
+16a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01
+16b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+16c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+16d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+16e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+16f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03
+1710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03
+1720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03
+1730: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02
+1740: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03
+1750: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03
+1760: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03
+1770: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02
+1780: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02
+1790: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02
+17a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02
+17b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02
+17c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03
+17d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03
+17e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03
+17f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02
+1800: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01
+1810: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01
+1820: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01
+1830: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01
+1840: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01
+1850: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01
+1860: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01
+1870: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01
+1880: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01
+1890: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01
+18a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01
+18b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01
+18c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01
+18d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01
+18e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01
+18f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01
+1900: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03
+1910: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03
+1920: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03
+1930: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02
+1940: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03
+1950: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03
+1960: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03
+1970: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02
+1980: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02
+1990: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02
+19a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02
+19b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02
+19c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03
+19d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03
+19e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03
+19f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02
+1a00: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01
+1a10: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01
+1a20: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02
+1a30: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01
+1a40: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02
+1a50: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02
+1a60: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02
+1a70: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01
+1a80: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01
+1a90: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01
+1aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02
+1ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03
+1ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+1ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03
+1af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1b00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1b10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1b20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02
+1b30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01
+1b40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02
+1b50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02
+1b60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02
+1b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+1b80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01
+1b90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01
+1ba0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01
+1bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03
+1bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+1be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03
+1bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1c00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03
+1c10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03
+1c20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03
+1c30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02
+1c40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03
+1c50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03
+1c60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03
+1c70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02
+1c80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02
+1c90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02
+1ca0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02
+1cb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1cc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03
+1cd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03
+1ce0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03
+1cf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
+1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1d10: 00 00 01 01 01 01 01 00 00 00 01 01 01 00 00 00
+1d20: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00
+1d30: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00
+1d40: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00
+1d50: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00
+1d60: 00 00 00 00 01 00 00 00 00 00 01 01 01 00 00 00
+1d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1d80: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00
+1d90: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00
+1da0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00
+1db0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00
+1dc0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00
+1dd0: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00
+1de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1df0: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00
+1e00: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+1e10: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00
+1e20: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00
+1e30: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00
+1e40: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00
+1e50: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00
+1e60: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00
+1e70: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00
+1e80: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00
+1e90: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+1ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1eb0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+1ec0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00
+1ed0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00
+1ee0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00
+1ef0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1f30: 00 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00
+1f40: 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00
+1f50: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00
+1f60: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00
+1f70: 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00
+1f80: 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00
+1f90: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00
+1fa0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00
+1fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+1fe0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00
+1ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
diff --git a/src/static/background/title_screen_icon.hex b/src/static/background/title_screen_icon.hex
new file mode 100644
index 0000000..120eaa1
--- /dev/null
+++ b/src/static/background/title_screen_icon.hex
@@ -0,0 +1,102 @@
+;indices: 4
+;17 20 38
+;10 14 1f
+;40 27 51
+;7a 36 7b
+
+000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02
+0000b0: 00 00 00 00 00 00 00 00 00 00 02 02 02 02 03 03
+0000c0: 00 00 00 00 00 00 00 02 02 02 03 03 03 03 03 03
+0000d0: 00 00 00 00 02 02 02 03 03 03 03 03 03 03 03 03
+0000e0: 00 00 02 02 03 03 03 03 03 03 03 03 03 03 03 03
+0000f0: 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03
+000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02
+000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03
+000120: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03
+000130: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03
+000140: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03
+000150: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03
+000160: 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03
+000170: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03
+000180: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03
+000190: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03
+0001a0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03
+0001b0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03
+0001c0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 01
+0001d0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01
+0001e0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01
+0001f0: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01
+000200: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
+000210: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
+000220: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
+000230: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
+000240: 03 03 03 03 03 03 03 03 03 03 01 01 01 01 01 01
+000250: 03 03 03 03 03 03 03 01 01 01 01 01 01 01 01 01
+000260: 03 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01
+000270: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01
+000280: 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000290: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0002a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0002b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0002c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0002d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0002e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0002f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000300: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01
+000310: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01
+000320: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01
+000330: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01
+000340: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01
+000350: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01
+000360: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01
+000370: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01
+000380: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01
+000390: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01
+0003a0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01
+0003b0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01
+0003c0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01
+0003d0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01
+0003e0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01
+0003f0: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01
+000400: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01
+000410: 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 01
+000420: 00 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01
+000430: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01
+000440: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01
+000450: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01
+000460: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01
+000470: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01
+000480: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03
+000490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03
+0004a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02
+0004b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0004c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0004d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0004e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0004f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+000500: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000510: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000520: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000530: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000540: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000550: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000560: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000570: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000580: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+000590: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
+0005a0: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01
+0005b0: 02 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01
+0005c0: 00 02 02 03 03 03 03 01 01 01 01 01 01 01 01 01
+0005d0: 00 00 00 02 02 02 03 03 03 03 03 03 01 01 01 01
+0005e0: 00 00 00 00 00 00 02 02 02 02 02 03 03 03 03 03
+0005f0: 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 \ No newline at end of file
diff --git a/src/static/foreground/slime.hex b/src/static/foreground/slime.hex
new file mode 100644
index 0000000..ce20533
--- /dev/null
+++ b/src/static/foreground/slime.hex
@@ -0,0 +1,24 @@
+;slime sprite
+;indices: 4
+;23 32 56
+;25 51 45
+;70 130 50
+;117 167 67
+
+00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+40: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00
+50: 00 00 00 01 03 03 03 03 03 03 01 00 00 00 00 00
+60: 00 00 01 03 03 03 03 03 03 03 03 01 00 00 00 00
+70: 00 01 03 03 03 03 03 03 03 01 02 03 01 00 00 00
+80: 01 03 03 03 01 02 03 03 03 01 01 03 03 01 00 00
+90: 01 03 03 03 01 01 03 03 03 03 03 03 03 03 01 00
+a0: 01 03 03 03 03 03 03 03 02 03 03 03 03 03 02 01
+b0: 01 02 03 03 03 03 03 03 03 03 03 03 03 02 02 01
+c0: 00 01 02 03 03 03 03 03 03 03 03 02 02 02 02 01
+d0: 00 00 01 02 02 03 03 03 02 02 02 02 02 02 01 00
+e0: 00 00 00 01 02 02 02 02 02 02 02 02 02 01 00 00
+f0: 00 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00
+
diff --git a/src/static/foreground/title_screen_letteres_large.hex b/src/static/foreground/title_screen_letteres_large.hex
new file mode 100644
index 0000000..fea1c77
--- /dev/null
+++ b/src/static/foreground/title_screen_letteres_large.hex
@@ -0,0 +1,230 @@
+;title screen letters (Large)
+;indices: 3
+;23 32 56
+;165 48 48
+;207 87 60
+
+0000: 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00
+0010: 00 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00
+0020: 00 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00
+0030: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00
+0040: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00
+0050: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00
+0060: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00
+0070: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00
+0080: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00
+0090: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00
+00a0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00
+00b0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00
+00c0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00
+00d0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00
+00e0: 00 00 00 00 00 00 02 02 01 00 00 00 00 00 00 00
+00f0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0100: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0110: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0120: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0130: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 01
+0140: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01
+0150: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01
+0160: 00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00
+0170: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00
+0180: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0190: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+01a0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+01b0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+01c0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+01d0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+01e0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+01f0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00
+0200: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0210: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0220: 00 00 00 00 00 00 01 01 01 01 00 00 00 00 00 00
+0230: 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00
+0240: 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00
+0250: 01 01 01 00 00 00 01 01 01 00 00 00 00 00 00 00
+0260: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0270: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0280: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00
+0290: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00
+02a0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00
+02b0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+02c0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+02d0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+02e0: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
+02f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0350: 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 00
+0360: 00 00 00 00 00 02 02 02 02 02 02 00 00 00 00 00
+0370: 00 00 00 00 02 02 02 02 02 02 02 02 00 00 00 00
+0380: 00 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00
+0390: 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 00
+03a0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00
+03b0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00
+03c0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00
+03d0: 00 00 02 02 02 02 02 02 02 02 02 02 01 01 00 00
+03e0: 00 00 02 02 02 02 02 02 02 02 01 01 01 01 00 00
+03f0: 00 00 02 02 02 02 02 01 01 01 01 01 01 01 00 00
+0400: 00 00 02 02 01 01 01 01 01 01 01 01 01 01 00 00
+0410: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00
+0420: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00
+0430: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00
+0440: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00
+0450: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00
+0460: 00 00 01 01 01 01 01 01 01 01 01 01 01 00 00 00
+0470: 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00
+0480: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00
+0490: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00
+04a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+04c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+04d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+04f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0500: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00
+0510: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00
+0520: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00
+0530: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00
+0540: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00
+0550: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00
+0560: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00
+0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00
+0580: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00
+0590: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00
+05a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00
+05b0: 00 00 00 00 00 02 02 02 02 00 00 00 02 02 00 00
+05c0: 00 00 00 00 02 02 02 02 02 02 00 00 02 02 00 00
+05d0: 00 00 00 00 02 02 02 00 00 00 02 00 02 02 00 00
+05e0: 00 00 00 02 02 02 00 00 00 00 00 02 02 02 00 00
+05f0: 00 00 00 02 02 00 00 00 00 00 00 02 02 02 00 00
+0600: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00
+0610: 00 00 02 02 00 00 00 00 00 00 00 00 01 01 00 00
+0620: 00 00 02 01 00 00 00 00 00 00 00 00 01 01 00 00
+0630: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 00 00
+0640: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00
+0650: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00
+0660: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00
+0670: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00
+0680: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00
+0690: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00
+06a0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00
+06b0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00
+06c0: 00 00 01 01 00 00 00 00 00 01 01 01 01 01 00 00
+06d0: 00 00 01 01 01 00 00 00 01 01 01 00 01 01 00 00
+06e0: 00 00 00 01 01 01 01 01 01 01 00 00 01 01 00 00
+06f0: 00 00 00 00 01 01 01 01 01 00 00 00 00 01 01 00
+0700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+07a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+07b0: 00 02 02 00 00 00 00 00 00 00 00 00 00 02 02 00
+07c0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+07d0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+07e0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+07f0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+0800: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+0810: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+0820: 00 00 02 02 00 00 00 00 00 00 00 00 02 02 02 00
+0830: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00
+0840: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00
+0850: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00
+0860: 00 00 00 02 02 00 00 00 00 00 00 00 02 01 00 00
+0870: 00 00 00 02 01 01 00 00 00 00 00 00 01 00 00 00
+0880: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 00
+0890: 00 00 00 00 01 01 00 00 00 00 00 01 01 00 00 00
+08a0: 00 00 00 00 01 01 01 00 00 00 00 01 01 00 00 00
+08b0: 00 00 00 00 00 01 01 00 00 00 00 01 00 00 00 00
+08c0: 00 00 00 00 00 01 01 01 00 00 01 01 00 00 00 00
+08d0: 00 00 00 00 00 00 01 01 00 00 01 00 00 00 00 00
+08e0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00
+08f0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00
+0900: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00
+0910: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00
+0920: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00
+0930: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 02 00
+0940: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00
+0950: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00
+0960: 00 00 02 02 02 02 00 00 00 00 02 02 02 00 00 00
+0970: 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 00
+0980: 00 00 02 02 00 00 02 02 02 02 00 00 00 00 00 00
+0990: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00
+09a0: 00 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00
+09b0: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00
+09c0: 00 00 00 01 01 00 00 00 00 00 00 01 01 01 00 00
+09d0: 00 00 00 01 01 01 00 00 00 00 01 01 01 01 00 00
+09e0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00
+09f0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00
+0a00: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00
+0a10: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00
+0a20: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00
+0a30: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00
+0a40: 00 00 00 00 02 00 00 00 00 00 00 00 00 02 02 00
+0a50: 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 00
+0a60: 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00
+0a70: 00 00 00 01 02 02 02 00 00 00 00 00 02 02 01 00
+0a80: 00 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00
+0a90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00
+0aa0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00
+0ab0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00
+0ac0: 00 01 01 01 01 00 00 00 00 00 00 01 01 01 01 00
+0ad0: 00 00 01 01 01 01 01 00 01 01 01 01 01 01 01 00
+0ae0: 00 00 00 01 01 01 01 01 01 01 01 01 00 01 01 00
+0af0: 00 00 00 00 00 01 01 01 01 01 00 00 00 01 01 00
+0b00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00
+0b10: 00 00 02 02 02 00 00 00 00 00 00 00 00 02 00 00
+0b20: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+0b30: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+0b40: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+0b50: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00
+0b60: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 01 00
+0b70: 00 02 01 01 00 00 00 00 00 00 00 00 00 01 01 00
+0b80: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00
+0b90: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00
+0ba0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 00
+0bb0: 00 00 01 01 01 00 00 00 00 00 00 00 01 01 00 00
+0bc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 00 00 00
+0bd0: 00 00 00 01 01 01 01 01 00 00 01 01 01 00 00 00
+0be0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00
+0bf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00
+0c00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00
+0c10: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00
+0c20: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00
+0c30: 00 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00
+0c40: 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 00
+0c50: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00
+0c60: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00
+0c70: 00 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00
+0c80: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00
+0c90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00
+0ca0: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00
+0cb0: 00 01 01 01 01 00 00 00 00 00 00 00 01 01 01 00
+0cc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 01 00 00
+0cd0: 00 00 00 01 01 01 00 00 00 01 01 01 01 00 00 00
+0ce0: 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 00
+0cf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00
+0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0db0: 00 00 00 00 00 00 00 02 02 02 02 02 00 00 00 00
+0dc0: 00 00 00 00 00 00 02 02 02 02 02 02 02 00 00 00
+0dd0: 00 00 00 00 00 02 02 00 00 00 02 02 02 00 00 00
+0de0: 00 00 00 00 02 02 00 00 00 00 00 02 02 02 00 00
+0df0: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00
diff --git a/src/stm32/TODO/hh_draw_screen.h b/src/stm32/TODO/hh_draw_screen.h
deleted file mode 100644
index f5d7507..0000000
--- a/src/stm32/TODO/hh_draw_screen.h
+++ /dev/null
@@ -1 +0,0 @@
-// every function call for drawing the screen goes here.
diff --git a/src/stm32/TODO/hh_entity.c b/src/stm32/TODO/hh_entity.c
deleted file mode 100644
index fa550d5..0000000
--- a/src/stm32/TODO/hh_entity.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdbool.h>
-
-#include "hh_entity.h"
-#include "maths.h"
-
-/*
- PLAYER: (pos on X)
- ,___,
- | |
- | X |
- |___|
-
-*/
-
-bool hh_collision(vec2* pos1, vec2* pos2){
- if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x
- return true;
- }
-
- if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y
- return true;
- }
- return false;
-}
-
-void hh_solve_collision(vec2* pos_environment, hh_entity* entity){
- if (entity->vec.x > 0.0f){
- entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f);
- entity->vec.x = 0.0f;
- } else if (entity->vec.x < 0.0f){
- entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f);
- entity->vec.x = 0.0f;
- } else if (entity->vec.y > 0.0f){
- entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f);
- entity->vec.x = 0.0f;
- } else if (entity->vec.y < 0.0f){
- entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f);
- entity->vec.x = 0.0f;
- }
-}
-
diff --git a/src/stm32/TODO/hh_entity.h b/src/stm32/TODO/hh_entity.h
deleted file mode 100644
index fdbeb8a..0000000
--- a/src/stm32/TODO/hh_entity.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-
-#include "maths.h"
-
-typedef struct {
- vec2 pos, vec;
- bool is_grounded;
- int8_t hp;
- //armor/block?
-}hh_entity;
-
-/// @brief detect for collision enity and eviroment
-/// @param pos1 position of environment tile to be checked
-/// @param pos2 position entity
-/// @return true if collision between enity and environment
-bool hh_collision(vec2* pos1, vec2* pos2);
-
-/// @brief solve collisions
-/// @param environment position
-/// @param entity position
-/// @return solved new entity position
-void hh_solve_collision(vec2* pos_environment, hh_entity* entity);
diff --git a/src/stm32/TODO/hh_level.h b/src/stm32/TODO/hh_level.h
deleted file mode 100644
index 43b19a3..0000000
--- a/src/stm32/TODO/hh_level.h
+++ /dev/null
@@ -1 +0,0 @@
-//deal with loading/saving the correct level
diff --git a/src/stm32/TODO/hh_rand.h b/src/stm32/TODO/hh_rand.h
deleted file mode 100644
index ea7c1d4..0000000
--- a/src/stm32/TODO/hh_rand.h
+++ /dev/null
@@ -1 +0,0 @@
-// deal with Pseudo random number generation here.
diff --git a/src/stm32/TODO/maths.c b/src/stm32/TODO/maths.c
deleted file mode 100644
index 2f4444a..0000000
--- a/src/stm32/TODO/maths.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "maths.h"
-
-float clamp( float* x, float *min, float *max ){
- if (*x < *min)
- return *min;
- else if (*x > *max)
- return *max;
- else
- return *x;
-}
diff --git a/src/stm32/TODO/maths.h b/src/stm32/TODO/maths.h
deleted file mode 100644
index 0889c47..0000000
--- a/src/stm32/TODO/maths.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#pragma once
-
-// #include <math.h>
-
-typedef struct {
- u_int32_t x,y;
-} vec2;
-
-typedef vec2 vec_cen;//centered
-typedef vec2 vec_cor;//left upper corner
-
-#define HH_MATH_FIXED_POINT 7 //fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point))
-
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#define CLAMP(N,LOWER,UPPER) (MIN(MAX(LOWER, N), UPPER))
diff --git a/src/stm32/TODO/player_controller.h b/src/stm32/TODO/player_controller.h
deleted file mode 100644
index 1e9b86c..0000000
--- a/src/stm32/TODO/player_controller.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "maths.h"
-#include "hh_entity.h"
-
-// inputs
diff --git a/src/stm32/TODO/sprite_controller.h b/src/stm32/TODO/sprite_controller.h
deleted file mode 100644
index c1fadff..0000000
--- a/src/stm32/TODO/sprite_controller.h
+++ /dev/null
@@ -1,6 +0,0 @@
-// handles sprites
-
-// Bg sprites
-
-
-// Fg or entity sprites
diff --git a/src/stm32/main.c b/src/stm32/main.c
index 735b378..d381d35 100644
--- a/src/stm32/main.c
+++ b/src/stm32/main.c
@@ -1,4 +1,7 @@
#include "main.h"
+#include "ppu/ppu.h"
+
+void hh_ppu_load_tilemap() {}
void hh_loop() {
while(g_hh_run);
diff --git a/style.md b/style.md
index 3fe912b..db3e1d7 100644
--- a/style.md
+++ b/style.md
@@ -31,6 +31,7 @@ before formatting as a failsafe.
- library hooks that need specific symbol names are exempt from the naming
conventions (e.g. `main` or `HAL_UART_MspInit`)
- names are always in English
+- filenames should not be prefixed by anything.
## others
diff --git a/test/bin/exportingPalettes.md b/test/bin/exportingPalettes.md
new file mode 100644
index 0000000..be4a354
--- /dev/null
+++ b/test/bin/exportingPalettes.md
@@ -0,0 +1,4 @@
+```sh
+cat test.src|head -n 46 | awk '{printf "%02x: {0x%x,0x%x,0x%x}\n",NR,$1/2,$2/2,$3/2 }' > hex_palettes
+```
+
diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c
new file mode 100644
index 0000000..df93395
--- /dev/null
+++ b/test/bin/test_file_read.c
@@ -0,0 +1,46 @@
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+
+#define HH_PPU_VRAM_TMM_SPRITE_SIZE 52
+
+
+void printData(uint8_t* in) {
+ for (int i = 0; i < HH_PPU_VRAM_TMM_SPRITE_SIZE; i++)
+ {
+ printf("%02x ",in[i]);
+ }
+ printf("\n");
+}
+
+void hh_ppu_load_tilemap() {
+
+
+ char* filename = "slime.bin";
+ FILE* fp = fopen(filename,"rb");
+ if (!fp){
+ return;//error
+ }
+
+ int sprite_size = (16 * 16);
+ fseek(fp, 0, SEEK_END);
+ int _size = ftell(fp)/sprite_size;
+ rewind(fp);
+ // printf("%i",_size);
+ for (int i = 0; i < _size; i++) {
+ uint8_t data[sprite_size];
+ fread(data,1,sprite_size,fp);
+
+ printData(data);
+ }
+ fclose(fp);
+
+}
+
+
+int main(){
+hh_ppu_load_tilemap();
+ return 0;
+}