aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.editorconfig11
-rw-r--r--.vscode/c_cpp_properties.json9
-rw-r--r--.vscode/extensions.json7
-rw-r--r--.vscode/launch.json47
-rw-r--r--.vscode/settings.json12
-rw-r--r--.vscode/tasks.json77
-rw-r--r--basys3/basys3.srcs/io.xdc6
-rw-r--r--basys3/basys3.srcs/ppu.vhd6
-rw-r--r--basys3/basys3.srcs/spi.vhd71
-rw-r--r--basys3/basys3.srcs/top.vhd63
-rw-r--r--basys3/basys3.xpr237
-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/state-diagram-game-engine.drawio1
-rw-r--r--features.md72
-rw-r--r--src/.gitignore1
-rw-r--r--src/demo.c183
-rw-r--r--src/demo.h35
-rw-r--r--src/ds.c15
-rw-r--r--src/ds.mk9
-rw-r--r--src/engine/TODO/combat.h9
-rw-r--r--src/engine/camera.c34
-rw-r--r--src/engine/camera.h6
-rw-r--r--src/engine/draw_screen.c62
-rw-r--r--src/engine/draw_screen.h21
-rw-r--r--src/engine/engine.c4
-rw-r--r--src/engine/entity.c46
-rw-r--r--src/engine/entity.h57
-rw-r--r--src/engine/level.h5
-rw-r--r--src/engine/maths.c19
-rw-r--r--src/engine/maths.h22
-rw-r--r--src/engine/player_controller.c167
-rw-r--r--src/engine/player_controller.h7
-rw-r--r--src/engine/sprite_controller.c22
-rw-r--r--src/engine/sprite_controller.h106
-rw-r--r--src/entity.h14
-rw-r--r--src/input.h21
-rw-r--r--src/main.c20
-rw-r--r--src/makefile16
-rw-r--r--src/ppu/internals.c75
-rw-r--r--src/ppu/ppu.c22
-rw-r--r--src/ppu/stm.c4
-rw-r--r--src/ppusim/input.c16
-rw-r--r--src/ppusim/mem.c4
-rw-r--r--src/ppusim/pixel.c77
-rw-r--r--src/ppusim/sim.c45
-rw-r--r--src/ppusim/sim.h3
-rw-r--r--src/ppusim/work.c40
-rw-r--r--src/ppusim/work.h1
-rw-r--r--src/stm32.mk34
-rw-r--r--src/stm32/input.c13
-rw-r--r--src/stm32/main.c3
-rw-r--r--src/stm32/setup.c197
-rw-r--r--src/stm32/setup.h24
-rw-r--r--src/stm32/stm32f0xx_hal_conf.h16
-rw-r--r--style.md1
-rw-r--r--test/bin/exportingPalettes.md4
-rw-r--r--test/bin/test_file_read.c46
-rw-r--r--test/bin/tilemap.pip512
62 files changed, 4786 insertions, 333 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..fece754
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+root = true
+
+[*]
+indent_style = tab
+indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+
+[*.md]
+indent_style = space
+indent_size = 2
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
new file mode 100644
index 0000000..51f5ad0
--- /dev/null
+++ b/.vscode/c_cpp_properties.json
@@ -0,0 +1,9 @@
+{
+ "configurations": [
+ {
+ "name": "src",
+ "compileCommands": "${workspaceFolder}/src/compile_commands.json"
+ }
+ ],
+ "version": 4
+} \ No newline at end of file
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..f4800ac
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,7 @@
+{
+ "recommendations": [
+ "marus25.cortex-debug",
+ "ms-vscode.cpptools-extension-pack",
+ "EditorConfig.EditorConfig"
+ ]
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..2f7561c
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,47 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "ppusim debug",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceFolder}/src/main",
+ "windows": { "program": "${workspaceFolder}/src/main.exe" },
+ "args": [],
+ "cwd": "${fileDirname}",
+ "environment": [],
+ "externalConsole": false,
+ "MIMode": "gdb",
+ "preLaunchTask": "client/build",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ },
+ {
+ "description": "Set Disassembly Flavor to Intel",
+ "text": "-gdb-set disassembly-flavor intel",
+ "ignoreFailures": true
+ }
+ ]
+ },
+ {
+ "name": "stm32 debug",
+ "cwd": "${workspaceFolder}",
+ "executable": "${workspaceFolder}/src/main.elf",
+ "request": "launch",
+ "type": "cortex-debug",
+ "servertype": "stlink",
+ "preLaunchTask": "stm32/flash",
+ "linux": {
+ "stlinkPath": "/usr/bin/st-util"
+ },
+ "windows": {
+ "armToolchainPath": "C:/msys64/mingw64/bin",
+ "stlinkPath": "C:/msys64/mingw64/bin/st-util.exe",
+ "gdbPath": "C:/msys64/mingw64/bin/gdb-multiarch.exe"
+ }
+ }
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..d027762
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,12 @@
+{
+ "terminal.integrated.defaultProfile.windows": "MSYS2 MinGW x64",
+ "terminal.integrated.profiles.windows": {
+ "MSYS2 MinGW x64": {
+ "path": [ "C:/msys64/msys2_shell.cmd" ],
+ "args": [ "-defterm", "-no-start", "-mingw64", "-shell", "sh", "-here" ],
+ "icon": "terminal-bash"
+ }
+ },
+ "cmake.configureOnOpen": false,
+ "files.eol": "\n"
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..8404cfa
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,77 @@
+{
+ "version": "2.0.0",
+ "windows": {
+ "options": {
+ "cwd": "${workspaceFolder}",
+ "shell": {
+ "executable": "C:/msys64/msys2_shell.cmd",
+ "args": [ "-defterm", "-no-start", "-mingw64", "-shell", "sh", "-here", "-c" ]
+ },
+ },
+ },
+ "tasks": [
+ {
+ "label": "build",
+ "group": {
+ "isDefault": false,
+ "kind": "build"
+ },
+ "options": { "cwd": "${workspaceFolder}/src" },
+ "windows": {
+ "command": "make -j",
+ "args": [ "" ],
+ },
+ "command": "make",
+ "args": [ "-j" ],
+ "type": "shell"
+ },
+ {
+ "label": "flash",
+ "detail": "build and upload to stm32",
+ "group": {
+ "isDefault": false,
+ "kind": "test"
+ },
+ "options": { "cwd": "${workspaceFolder}/src" },
+ "windows": {
+ "command": "make -j flash",
+ "args": [ "" ],
+ },
+ "command": "make",
+ "args": [ "-j", "flash" ],
+ "type": "shell"
+ },
+ {
+ "label": "compiledb",
+ "detail": "generate editor autocomplete files",
+ "group": {
+ "isDefault": false,
+ "kind": "test"
+ },
+ "options": { "cwd": "${workspaceFolder}/src" },
+ "windows": {
+ "command": "make compile_commands.json",
+ "args": [ "" ],
+ },
+ "command": "make",
+ "args": [ "compile_commands.json" ],
+ "type": "shell"
+ },
+ {
+ "label": "clean",
+ "detail": "remove binary files from working directory",
+ "group": {
+ "isDefault": false,
+ "kind": "test"
+ },
+ "options": { "cwd": "${workspaceFolder}" },
+ "windows": {
+ "command": "make clean",
+ "args": [ "" ],
+ },
+ "command": "make",
+ "args": [ "clean" ],
+ "type": "shell"
+ }
+ ]
+}
diff --git a/basys3/basys3.srcs/io.xdc b/basys3/basys3.srcs/io.xdc
new file mode 100644
index 0000000..fa1dbd0
--- /dev/null
+++ b/basys3/basys3.srcs/io.xdc
@@ -0,0 +1,6 @@
+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 638df89..0955506 100644
--- a/basys3/basys3.srcs/ppu.vhd
+++ b/basys3/basys3.srcs/ppu.vhd
@@ -144,8 +144,8 @@ architecture Behavioral of ppu is
R,G,B : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0)); -- VGA color out
end component;
- component ppu_dispctl port( -- display controller
- CLK : in std_logic; -- system clock
+ component ppu_dispctl port(
+ SYSCLK : in std_logic; -- system clock
RESET : in std_logic;
X : out std_logic_vector(PPU_POS_H_WIDTH-1 downto 0); -- tiny screen pixel x
@@ -299,7 +299,7 @@ begin
B => UB);
display_controller : component ppu_dispctl port map(
- CLK => SYSCLK,
+ SYSCLK => SYSCLK,
RESET => SYSRST,
PREADY => PL_READY,
X => X,
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
new file mode 100644
index 0000000..558489b
--- /dev/null
+++ b/basys3/basys3.srcs/top.vhd
@@ -0,0 +1,63 @@
+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
+ 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 a6d7041..dc5e1eb 100644
--- a/basys3/basys3.xpr
+++ b/basys3/basys3.xpr
@@ -6,7 +6,7 @@
<Project Version="7" Minor="61" Path="/home/loek/docs/repos/avans-arcade/basys3/basys3.xpr">
<DefaultLaunch Dir="$PRUNDIR"/>
<Configuration>
- <Option Name="Id" Val="c71bd79008bf4728a2417b154418cb5f"/>
+ <Option Name="Id" Val="ca3fd6267bfa422ca0883093e4774689"/>
<Option Name="Part" Val="xc7a35tcpg236-1"/>
<Option Name="CompiledLibDir" Val="$PCACHEDIR/compile_simlib"/>
<Option Name="CompiledLibDirXSim" Val=""/>
@@ -42,10 +42,8 @@
<Option Name="SimulatorGccVersionVCS" Val="9.2.0"/>
<Option Name="SimulatorGccVersionRiviera" Val="9.3.0"/>
<Option Name="SimulatorGccVersionActiveHdl" Val="9.3.0"/>
- <Option Name="TargetLanguage" Val="VHDL"/>
<Option Name="BoardPart" Val="digilentinc.com:basys3:part0:1.2"/>
<Option Name="BoardPartRepoPaths" Val="$PPRDIR/../../../../.Xilinx/Vivado/2022.2/xhub/board_store/xilinx_board_store"/>
- <Option Name="SourceMgmtMode" Val="DisplayOnly"/>
<Option Name="ActiveSimSet" Val="sim_1"/>
<Option Name="DefaultLib" Val="xil_defaultlib"/>
<Option Name="ProjectType" Val="Default"/>
@@ -61,20 +59,20 @@
<Option Name="IPStaticSourceDir" Val="$PIPUSERFILESDIR/ipstatic"/>
<Option Name="EnableBDX" Val="FALSE"/>
<Option Name="DSABoardId" Val="basys3"/>
- <Option Name="WTXSimLaunchSim" Val="270"/>
+ <Option Name="WTXSimLaunchSim" Val="0"/>
<Option Name="WTModelSimLaunchSim" Val="0"/>
<Option Name="WTQuestaLaunchSim" Val="0"/>
<Option Name="WTIesLaunchSim" Val="0"/>
<Option Name="WTVcsLaunchSim" Val="0"/>
<Option Name="WTRivieraLaunchSim" Val="0"/>
<Option Name="WTActivehdlLaunchSim" Val="0"/>
- <Option Name="WTXSimExportSim" Val="19"/>
- <Option Name="WTModelSimExportSim" Val="19"/>
- <Option Name="WTQuestaExportSim" Val="19"/>
+ <Option Name="WTXSimExportSim" Val="0"/>
+ <Option Name="WTModelSimExportSim" Val="0"/>
+ <Option Name="WTQuestaExportSim" Val="0"/>
<Option Name="WTIesExportSim" Val="0"/>
- <Option Name="WTVcsExportSim" Val="19"/>
- <Option Name="WTRivieraExportSim" Val="19"/>
- <Option Name="WTActivehdlExportSim" Val="19"/>
+ <Option Name="WTVcsExportSim" Val="0"/>
+ <Option Name="WTRivieraExportSim" Val="0"/>
+ <Option Name="WTActivehdlExportSim" Val="0"/>
<Option Name="GenerateIPUpgradeLog" Val="TRUE"/>
<Option Name="XSimRadix" Val="hex"/>
<Option Name="XSimTimeUnit" Val="ns"/>
@@ -99,55 +97,116 @@
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
+ <File Path="$PSRCDIR/er_ram.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/er_ram_mod.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/ppu.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/ppu_addr_dec.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/ppu_aux.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/ppu_comp.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
<File Path="$PSRCDIR/ppu_dispctl.vhd">
<FileInfo SFType="VHDL2008">
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
- <File Path="$PSRCDIR/ppu_dispctl_demo_top.vhd">
- <FileInfo>
+ <File Path="$PSRCDIR/ppu_pceg.vhd">
+ <FileInfo SFType="VHDL2008">
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
- <File Path="$PPRDIR/../test/upscaler/img.coe">
- <FileInfo>
+ <File Path="$PSRCDIR/ppu_plut.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/ppu_sprite_bg.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/ppu_sprite_fg.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/ppu_sprite_transform.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/spi.vhd">
+ <FileInfo SFType="VHDL2008">
+ <Attr Name="UsedIn" Val="synthesis"/>
+ <Attr Name="UsedIn" Val="simulation"/>
+ </FileInfo>
+ </File>
+ <File Path="$PSRCDIR/top.vhd">
+ <FileInfo SFType="VHDL2008">
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<Config>
<Option Name="DesignMode" Val="RTL"/>
- <Option Name="TopModule" Val="ppu_dispctl_demo"/>
+ <Option Name="TopModule" Val="top"/>
+ <Option Name="TopAutoSet" Val="TRUE"/>
<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/ppu_dispctl_demo.xdc">
+ <File Path="$PSRCDIR/io.xdc">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
</FileInfo>
</File>
<Config>
- <Option Name="TargetConstrsFile" Val="$PSRCDIR/ppu_dispctl_demo.xdc"/>
+ <Option Name="TargetConstrsFile" Val="$PSRCDIR/io.xdc"/>
<Option Name="ConstrsType" Val="XDC"/>
</Config>
</FileSet>
<FileSet Name="sim_1" Type="SimulationSrcs" RelSrcDir="$PSRCDIR/sim_1" RelGenDir="$PGENDIR/sim_1">
- <Filter Type="Srcs"/>
- <File Path="$PSRCDIR/ppu_dispctl_tb.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_dispctl_tb"/>
+ <Option Name="TopModule" Val="top"/>
<Option Name="TopLib" Val="xil_defaultlib"/>
+ <Option Name="TopAutoSet" Val="TRUE"/>
<Option Name="TransportPathDelay" Val="0"/>
<Option Name="TransportIntDelay" Val="0"/>
<Option Name="SelectedSimModel" Val="rtl"/>
@@ -162,7 +221,7 @@
</FileSet>
<FileSet Name="utils_1" Type="Utils" RelSrcDir="$PSRCDIR/utils_1" RelGenDir="$PGENDIR/utils_1">
<Filter Type="Utils"/>
- <File Path="$PSRCDIR/utils_1/imports/synth_1/ppu_dispctl_demo.dcp">
+ <File Path="$PSRCDIR/utils_1/imports/synth_1/top.dcp">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
@@ -174,31 +233,16 @@
<Option Name="TopAutoSet" Val="TRUE"/>
</Config>
</FileSet>
- <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"/>
- </FileInfo>
- </File>
- <Config>
- <Option Name="TopModule" Val="ppu_tmm"/>
- <Option Name="UseBlackboxStub" Val="1"/>
- </Config>
- </FileSet>
- <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">
+ <FileSet Name="ppu_dispctl_pixclk" Type="BlockSrcs" RelSrcDir="$PSRCDIR/ppu_dispctl_pixclk" RelGenDir="$PGENDIR/ppu_dispctl_pixclk">
+ <File Path="$PSRCDIR/sources_1/ip/ppu_dispctl_pixclk/ppu_dispctl_pixclk.xci">
<FileInfo>
- <Attr Name="UserDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<Config>
- <Option Name="TopModule" Val="ppu_bam"/>
+ <Option Name="TopModule" Val="ppu_dispctl_pixclk"/>
<Option Name="dataflowViewerSettings" Val="min_width=16"/>
<Option Name="UseBlackboxStub" Val="1"/>
</Config>
@@ -217,8 +261,8 @@
<Option Name="UseBlackboxStub" Val="1"/>
</Config>
</FileSet>
- <FileSet Name="ppu_dispctl_pixclk" Type="BlockSrcs" RelSrcDir="$PSRCDIR/ppu_dispctl_pixclk" RelGenDir="$PGENDIR/ppu_dispctl_pixclk">
- <File Path="$PSRCDIR/sources_1/ip/ppu_dispctl_pixclk/ppu_dispctl_pixclk.xci">
+ <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="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
@@ -226,13 +270,13 @@
</FileInfo>
</File>
<Config>
- <Option Name="TopModule" Val="ppu_dispctl_pixclk"/>
+ <Option Name="TopModule" Val="ppu_tmm"/>
<Option Name="dataflowViewerSettings" Val="min_width=16"/>
<Option Name="UseBlackboxStub" Val="1"/>
</Config>
</FileSet>
- <FileSet Name="ppu_dispctl_test_img" Type="BlockSrcs" RelSrcDir="$PSRCDIR/ppu_dispctl_test_img" RelGenDir="$PGENDIR/ppu_dispctl_test_img">
- <File Path="$PSRCDIR/sources_1/ip/ppu_dispctl_test_img/ppu_dispctl_test_img.xci">
+ <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="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
@@ -240,7 +284,7 @@
</FileInfo>
</File>
<Config>
- <Option Name="TopModule" Val="ppu_dispctl_test_img"/>
+ <Option Name="TopModule" Val="ppu_bam"/>
<Option Name="dataflowViewerSettings" Val="min_width=16"/>
<Option Name="UseBlackboxStub" Val="1"/>
</Config>
@@ -268,9 +312,11 @@
</Simulator>
</Simulators>
<Runs Version="1" Minor="19">
- <Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="true" IncrementalCheckpoint="$PSRCDIR/utils_1/imports/synth_1/ppu_dispctl_demo.dcp" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1">
+ <Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="true" IncrementalCheckpoint="$PSRCDIR/utils_1/imports/synth_1/top.dcp" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022"/>
+ <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022">
+ <Desc>Vivado Synthesis Defaults</Desc>
+ </StratHandle>
<Step Id="synth_design">
<Option Id="FlattenHierarchy">0</Option>
</Step>
@@ -280,27 +326,23 @@
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
- <Run Id="ppu_tmm_synth_1" Type="Ft3:Synth" SrcSet="ppu_tmm" Part="xc7a35tcpg236-1" ConstrsSet="ppu_tmm" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_tmm_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_tmm_synth_1">
- <Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022"/>
- <Step Id="synth_design"/>
- </Strategy>
- <ReportStrategy Name="Vivado Synthesis Default Reports" Flow="Vivado Synthesis 2022"/>
- <Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
- <RQSFiles/>
- </Run>
- <Run Id="ppu_bam_synth_1" Type="Ft3:Synth" SrcSet="ppu_bam" Part="xc7a35tcpg236-1" ConstrsSet="ppu_bam" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_bam_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_bam_synth_1">
+ <Run Id="ppu_dispctl_pixclk_synth_1" Type="Ft3:Synth" SrcSet="ppu_dispctl_pixclk" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_pixclk" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" Dir="$PRUNDIR/ppu_dispctl_pixclk_synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_synth_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022"/>
+ <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022">
+ <Desc>Vivado Synthesis Defaults</Desc>
+ </StratHandle>
<Step Id="synth_design"/>
</Strategy>
+ <GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
<ReportStrategy Name="Vivado Synthesis Default Reports" Flow="Vivado Synthesis 2022"/>
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
<Run Id="ppu_dispctl_slbuf_synth_1" Type="Ft3:Synth" SrcSet="ppu_dispctl_slbuf" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_slbuf" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" Dir="$PRUNDIR/ppu_dispctl_slbuf_synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_slbuf_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_slbuf_synth_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022"/>
+ <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022">
+ <Desc>Vivado Synthesis Defaults</Desc>
+ </StratHandle>
<Step Id="synth_design"/>
</Strategy>
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
@@ -308,29 +350,11 @@
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
- <Run Id="synth_1_copy_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="true" WriteIncrSynthDcp="false" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1/synth_1_copy_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1_copy_1">
+ <Run Id="ppu_tmm_synth_1" Type="Ft3:Synth" SrcSet="ppu_tmm" Part="xc7a35tcpg236-1" ConstrsSet="ppu_tmm" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" Dir="$PRUNDIR/ppu_tmm_synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_tmm_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_tmm_synth_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022"/>
- <Step Id="synth_design">
- <Option Id="MaxDsp">0</Option>
- <Option Id="FlattenHierarchy">0</Option>
- </Step>
- </Strategy>
- <ReportStrategy Name="Vivado Synthesis Default Reports" Flow="Vivado Synthesis 2022" CtrlBit="true">
- <ReportConfig DisplayName="synthesis_report" Name="synth_1_copy_1_synth_synthesis_report_0" Spec="" RunStep="synth_design">
- <ReportConfigOption Name="dummy_option" Type="string"/>
- </ReportConfig>
- <ReportConfig DisplayName="Utilization - Synth Design" Name="synth_1_copy_1_synth_report_utilization_0" Spec="report_utilization" RunStep="synth_design" Version="1" Minor="0">
- <ReportConfigOption Name="dummy_option" Type="string"/>
- <ReportConfigOutputOption Name="pb" Type="string" Value=""/>
- </ReportConfig>
- </ReportStrategy>
- <Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
- <RQSFiles/>
- </Run>
- <Run Id="ppu_dispctl_pixclk_synth_1" Type="Ft3:Synth" SrcSet="ppu_dispctl_pixclk" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_pixclk" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" Dir="$PRUNDIR/ppu_dispctl_pixclk_synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_synth_1">
- <Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022"/>
+ <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022">
+ <Desc>Vivado Synthesis Defaults</Desc>
+ </StratHandle>
<Step Id="synth_design"/>
</Strategy>
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
@@ -338,7 +362,7 @@
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
- <Run Id="ppu_dispctl_test_img_synth_1" Type="Ft3:Synth" SrcSet="ppu_dispctl_test_img" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_test_img" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" Dir="$PRUNDIR/ppu_dispctl_test_img_synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_test_img_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_test_img_synth_1">
+ <Run Id="ppu_bam_synth_1" Type="Ft3:Synth" SrcSet="ppu_bam" Part="xc7a35tcpg236-1" ConstrsSet="ppu_bam" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" Dir="$PRUNDIR/ppu_bam_synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_bam_synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_bam_synth_1">
<Strategy Version="1" Minor="2">
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022">
<Desc>Vivado Synthesis Defaults</Desc>
@@ -352,7 +376,9 @@
</Run>
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022"/>
+ <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022">
+ <Desc>Default settings for Implementation.</Desc>
+ </StratHandle>
<Step Id="init_design"/>
<Step Id="opt_design"/>
<Step Id="power_opt_design"/>
@@ -368,26 +394,11 @@
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
- <Run Id="ppu_tmm_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_tmm" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_tmm_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_tmm_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_tmm_impl_1">
- <Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022"/>
- <Step Id="init_design"/>
- <Step Id="opt_design"/>
- <Step Id="power_opt_design"/>
- <Step Id="place_design"/>
- <Step Id="post_place_power_opt_design"/>
- <Step Id="phys_opt_design"/>
- <Step Id="route_design"/>
- <Step Id="post_route_phys_opt_design"/>
- <Step Id="write_bitstream"/>
- </Strategy>
- <ReportStrategy Name="Vivado Implementation Default Reports" Flow="Vivado Implementation 2022"/>
- <Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
- <RQSFiles/>
- </Run>
- <Run Id="ppu_bam_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_bam" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_bam_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_bam_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_bam_impl_1">
+ <Run Id="ppu_dispctl_pixclk_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_pixclk" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_dispctl_pixclk_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_impl_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022"/>
+ <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022">
+ <Desc>Default settings for Implementation.</Desc>
+ </StratHandle>
<Step Id="init_design"/>
<Step Id="opt_design"/>
<Step Id="power_opt_design"/>
@@ -404,7 +415,9 @@
</Run>
<Run Id="ppu_dispctl_slbuf_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_slbuf" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_dispctl_slbuf_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_slbuf_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_slbuf_impl_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022"/>
+ <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022">
+ <Desc>Default settings for Implementation.</Desc>
+ </StratHandle>
<Step Id="init_design"/>
<Step Id="opt_design"/>
<Step Id="power_opt_design"/>
@@ -419,9 +432,11 @@
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
- <Run Id="ppu_dispctl_pixclk_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_pixclk" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_dispctl_pixclk_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_pixclk_impl_1">
+ <Run Id="ppu_tmm_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_tmm" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_tmm_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_tmm_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_tmm_impl_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022"/>
+ <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022">
+ <Desc>Default settings for Implementation.</Desc>
+ </StratHandle>
<Step Id="init_design"/>
<Step Id="opt_design"/>
<Step Id="power_opt_design"/>
@@ -436,7 +451,7 @@
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
- <Run Id="ppu_dispctl_test_img_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_dispctl_test_img" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_dispctl_test_img_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_dispctl_test_img_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_dispctl_test_img_impl_1">
+ <Run Id="ppu_bam_impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="ppu_bam" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" SynthRun="ppu_bam_synth_1" IncludeInArchive="false" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/ppu_bam_impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/ppu_bam_impl_1">
<Strategy Version="1" Minor="2">
<StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022">
<Desc>Default settings for Implementation.</Desc>
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/state-diagram-game-engine.drawio b/docs/state-diagram-game-engine.drawio
new file mode 100644
index 0000000..7ec8604
--- /dev/null
+++ b/docs/state-diagram-game-engine.drawio
@@ -0,0 +1 @@
+<mxfile host="Electron" modified="2023-03-03T15:42:20.194Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.9.9 Chrome/85.0.4183.121 Electron/10.1.5 Safari/537.36" etag="US9eJ7OLJRPnynqDQFcl" version="13.9.9" type="device"><diagram id="ASTeEJEp3BGPOZBVnUyx" name="Pagina-1">7Vzbdto4FP0aHttlWb7x2Fym6ZrJNNM8tH10QAFNjc0yIoF+/Ui2jLGOHdQELJnpE0i+amvrnH2OZI3w5WLzMY+X89tsSpKR60w3I3w1cl3Xcz3+I2q2ZQ3CISprZjmdyrq64p7+JLLSkbVrOiWrxoksyxJGl83KSZamZMIadXGeZ8/N0x6zpPnUZTwjoOJ+Eiew9iudsnlZG7lhXX9D6GxePRkF4/LIIq5Oli1ZzeNp9rxXha9H+DLPMlb+W2wuSSLQq3Apr/uj4+juxXKSMp0LVuHXx6//rG/X78Iv0f3mE3oe43d+eZenOFnLBsuXZdsKATLlgMhilrN5NsvSOLmuay/ybJ1OiXiMw0v1OX9l2ZJXIl75L2FsK3s3XrOMV83ZIpFHy2eKB3W2TVatsnU+IS80qOJInM8Ie+E8b9cDnLskWxCWb/l1OUliRp+a7xFLDs1259Uw8z8S6V9AHQHUP6XLNeNV85gjmdB0NnKDeMHRu0gfVssdRPvdkiR8DAj4n+eUkftlXODyzMdhG7hPJGdk8zK8EI7qAkdyuBrFoSw/10MCVTyf7w2HyDkRghggeJfEW5LfFPiRHMDFG8+auMQJnaX8/4SDwC/AFwIiykf+B3lgQafTkt9kRX/GD8WtBMOXGU1Z0SL/YuRfiXtxSq9Kdh8LcqRAjlogd1ogd08FeXhupsLTNBWBSVPhdRBdeJiMP5y71pjFVlkHjE1bB3R2bi3Q5Coy6tcCAPvlnEx+iDZXpL25s4qr3tg0V6Nzo+pYl6odPdUPVcedVDXMUG8cNh2/ca1VKY/zoSjSjRKQa5KjCMYJt4XPtyg0UOlqgfN3AWpfCFvn6U4rWQyfeX+EYGh1S1Ly4zDthhZi+fhwiBX0GWEhKPYV5lqknALfOFNhRKoVGw2Np8jxG8iHbcijXol6dqIV6arWrr7qSRFA2XpPWEGwJKMTJt7kMcv3A66HeMUxdp1MWBFaphktMiORcb3gnp28dXXlrYtNktmF8nZnvxlNCvtNGJkwKrhrEWfHxkVaRdEz4izW5azRDJfboo5LqWG5nUXIuF5zhyRvEW6bcOkXL50sdjr9IGa5hXhN4tWKTprI8Nbn229ihL/3q+J3OeCLwtWmUdrK0hFHdiXTDydbxu09tNcBfgv+VZ22AZBPuBPSvSZApOgSpHRr2U55Ud2z4D5IiSrDQLlRiQO4UUGRXavfwBqYhK8ml5/iPdskp5qFtz2zuB4pXRm2ues2Jp0sXnLtmDslG8q+7f3/XtsFXqotgShUhsACA6IvZ6M3SoOOER0qrsFRTb6ubcBqxsnBPRsHGLhL+cKNgXDDOaeSSTesmmEbZAuMuT8LOzorxuPwrWXYzC4hp8Vchn1ay2pMNDyYeBDNB4829rCCdsv0ntcr2jAKhxbgkMqUjqV2Jt/3jtjrWCJdx9IRcxpRpq93P6o01XY/vPPj7d5pcqR0vjH2lAdVbeh8s+DlC/if8h2O6g0xzKK8sAhgaKYG9LbnGjbs3tlNG2DdNYRe2N5X/WStfOhRfwPfB/AYprxuqLB7tiS2Fe3nO6bVtqdDVfuTXpVrOchPbFZaKP3vvV5aqHfqObL1ur+p+N+kvdQuCFoGc695Lx/Olgzc73i6yWzfNel3PJhwvF8/rFgeT8QYQIIAZhM9wPUEbWzt1/XARM/fn80uBnZDbBtKvk6+4Hcu+826tWMy7M25bFXxjV/r8dU7BWG/Ht8/u2jS1xWNvtlosjttQh9l7sQp6qXCSliBUxVb2OJxopZ8SM+2FIaHEKLzzL1WzvbVQqqfAMlTM5mR82p7qd5Jld3HSr5i3P7K3clXdWA0LzhN8tWHEnW3GkhYEIs+0gCWYxwZtxwtWjUrwlsK150NLZLFvipSWiaBew1kK9Wt5vEGDjTUcC2L3nCvQENtAYf+oERdoLuwtbTCpkRdAFM1lxm3sasiR21JvtpXF2l6xg1xoCPhhkVYX5ewRjfGCODq2D8JWY6Kb7+KDXScKc05abkdtYu0gWectHCNqL2fyAL8IuOTVAHUrnIZ3S1Jy29lB64MfKQEEW2LB/rdfyiA+Z6P2Uh8eCFSDwYJuvsS1qIBDsMDE15poElafcl2mgXHvpoqCNXJVN2kA7gT+KzhxEnaEAZOkIj6GS7P3c9xvXeQ9zKXeOGO5JS3QphYa/ilu+6wS2H1k/sKgeNVbbsuDUPVQoaacwW/mvsKkd/+oM4Boi48VC44Te4rtON7kCNSOtSldOnyTAUNIdQQNq3HUneDiYx/gxjaISSOyNQKqsNMNbrTQwQdp/V7P42Nb1UWwcUJ9ga2YKc3ZHwvjMiFrJObPzmHDOXQQlxvrLGtzpGS37xYb/Rdqoh6v3R8/R8=</diagram></mxfile> \ No newline at end of file
diff --git a/features.md b/features.md
new file mode 100644
index 0000000..d044232
--- /dev/null
+++ b/features.md
@@ -0,0 +1,72 @@
+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|
+
+## 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/src/.gitignore b/src/.gitignore
index d8325cf..504b995 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -4,3 +4,4 @@ main.bin
main
main.exe
static/
+*.bin
diff --git a/src/demo.c b/src/demo.c
index 019750a..95347cb 100644
--- a/src/demo.c
+++ b/src/demo.c
@@ -1,55 +1,154 @@
#include <math.h>
#include "demo.h"
+#include "input.h"
+#include "entity.h"
#include "ppu/ppu.h"
-#define HH_DEMO_BALL_COUNT 5
-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"
+
+
+hh_s_entity_player g_hh_player_1 = {
+ .pos_x = 31000, // 0b0000 0001 0011 0110
+ .pos_y = 21000,
+ .radius = 8,
+ .speed = 100,
+ .direction_x = 1,
+ .rotation = 8,
+ .in_air = false,
+};
+
+void hh_player_movement();
+
+uint16_t g_hh_pos_x; // 0b0000 0001 0011 0110
+uint16_t g_hh_pos_y;
+uint8_t g_hh_left = 0;
+uint8_t g_hh_right = 0;
+uint8_t g_hh_up = 0;
+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_y;
+
+typedef struct {
+ vec2 pos;
+ uint8_t idx;
+}hh_s_tiles;
+
+
+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_setup_screen();
+
}
void hh_demo_loop(unsigned long frame) {
- // 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,
- });
-
- for (unsigned i = 0; i < HH_DEMO_BALL_COUNT; i++) {
- g_hh_demo_balls[i].position_x = HH_PPU_SCREEN_WIDTH/2 - HH_PPU_SPRITE_WIDTH/2 + (int)(60 * (double)sin((1*(double)frame / 10) + (double)i * 12));
- g_hh_demo_balls[i].position_y = HH_PPU_SCREEN_HEIGHT/2 - HH_PPU_SPRITE_HEIGHT/2 + (int)(30 * (double)sin((2*(double)frame / 10) + (double)i * 12));
- hh_ppu_update_foreground(i, g_hh_demo_balls[i]);
+
+ // hh_player_movement();
+
+ hh_player_actions();
+
+}
+
+// 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
+//
+// 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);
+// }
+
+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_up) + (1 * g_hh_controller_p1.dpad_down); // -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) / 16;
+ modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 1600;
+ } else if (directionX == -1) {
+ tileColX = ((g_hh_player_1.pos_x / 100) - g_hh_player_1.radius) / 16;
+ modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 1600;
+ }
+
+ 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
+ {
+ }
+
+
+ if(directionY != 0)
+ {
+ // g_hh_player_1.pos_y = g_hh_player_1.pos_y + (directionY * g_hh_player_1.speed * 2); // NEW x set
+ }
+ // 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/demo.h b/src/demo.h
index 89436b5..ddf8403 100644
--- a/src/demo.h
+++ b/src/demo.h
@@ -42,3 +42,38 @@ static const hh_s_ppu_loc_sprite HH_DBG_SPRITE_CHECKERBOARD = {
0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0,
0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0
};
+
+static const uint8_t HH_DEMO_HITBOX_TILEMAP[30][40] =
+ {
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 },
+ {1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1 }
+ };
+
diff --git a/src/ds.c b/src/ds.c
new file mode 100644
index 0000000..24ef58f
--- /dev/null
+++ b/src/ds.c
@@ -0,0 +1,15 @@
+#include "demo.h"
+#include "main.h"
+#include "ppu/ppu.h"
+
+void hh_setup() {
+ hh_ppu_init();
+
+ hh_demo_setup();
+}
+
+void hh_exit() {
+ g_hh_run = false;
+
+ hh_ppu_deinit();
+}
diff --git a/src/ds.mk b/src/ds.mk
index f70c1c9..57d1776 100644
--- a/src/ds.mk
+++ b/src/ds.mk
@@ -3,8 +3,13 @@ LD := gcc
LFLAGS += -lSDL2
+ifeq ($(HOST),Msys)
+SHARED_FLAGS += -I/mingw64/include
+endif
+
DESKTOP_SRCS += ppusim/sim.c \
ppusim/mem.c \
ppusim/pixel.c \
- ppusim/work.c
-
+ ppusim/work.c \
+ ds.c \
+ ppusim/input.c
diff --git a/src/engine/TODO/combat.h b/src/engine/TODO/combat.h
new file mode 100644
index 0000000..16c41f5
--- /dev/null
+++ b/src/engine/TODO/combat.h
@@ -0,0 +1,9 @@
+#include "hh_entity.h"
+
+
+// attacktypes:
+
+/// @brief basic attack
+/// @param dmg damage number
+/// @param target entity under attack (damage changes this hp value)
+void hh_attack_basic( int8_t dmg, hh_entity* target );
diff --git a/src/engine/camera.c b/src/engine/camera.c
new file mode 100644
index 0000000..e756bd4
--- /dev/null
+++ b/src/engine/camera.c
@@ -0,0 +1,34 @@
+#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: fix buggy y-axis ??
+
+ // new = vec_cen2cor(new,(vec2){.x=max.x/2,.y=max.y/2});
+ new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH/2),.y=(new.y+(HH_PPU_SPRITE_HEIGHT/2))*2},(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;
+
+ 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);
+
+ 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..c4f3389
--- /dev/null
+++ b/src/engine/draw_screen.c
@@ -0,0 +1,62 @@
+#include "engine/draw_screen.h"
+#include "engine/sprite_controller.h"
+
+uint8_t hh_world_to_tile(vec2 pos){
+
+ FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */
+ if (!level) { /* check if file opened successfully */
+ fprintf(stderr, "Error: Failed to open file.\n");
+ return 0;
+ }
+ int index = ((pos.y/16)*40 + pos.x/16);//TODO: remove magic number(s)
+ fseek(level, (index * sizeof(int)) + sizeof(int), SEEK_SET);
+ int tile;// = (int*)malloc(sizeof(int));
+ fread(&tile, sizeof(int), 1, level); // read 1 tile from binary
+
+ fclose(level);
+ // int val = tile;
+ // free(tile);
+ return tile;
+}
+
+
+// remeber old value to know which part to update.
+vec2 previousViewport = { .x = 0, .y = 0 };
+void hh_draw_screen(vec_cor viewport){
+ if (viewport.x == previousViewport.x && viewport.y == previousViewport.y) return;
+
+ hh_ppu_update_aux((hh_s_ppu_loc_aux){
+ .bg_shift_x = viewport.x,
+ .bg_shift_y = viewport.y,
+ .fg_fetch = 0,
+ .sysreset = 0,
+ });
+
+ // update previous viewport values
+ previousViewport = viewport;
+}
+
+void hh_setup_screen(){
+ //(HH_map_size_X*HH_map_size_Y)
+ int size = 2400; // max X = 40 en max Y = 80
+ FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */
+ if (!level) { /* check if file opened successfully */
+ fprintf(stderr, "Error: Failed to open file.\n");
+ return;
+ }
+ fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET);
+ int* tile = (int*)malloc(size*sizeof(int));
+ fread(tile, sizeof(int), size, level); // read 1 tile from binary
+
+ fclose(level);
+
+ 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(tile[BAM_index]),
+ .tilemap_index = tile[BAM_index],
+ });
+ }
+ free(tile);
+}
diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h
new file mode 100644
index 0000000..b181108
--- /dev/null
+++ b/src/engine/draw_screen.h
@@ -0,0 +1,21 @@
+#pragma once
+
+
+// every function call for drawing the screen goes here.
+#include "engine/maths.h"
+#include "ppu/ppu.h"
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+
+#define HH_map_size_X 80
+#define HH_map_size_Y 60
+
+/** @brief return a single tile from world binary */
+uint8_t hh_world_to_tile(vec2 pos);
+/** @brief shift to level if viewport changed position */
+void hh_draw_screen(vec2 viewport);
+/** @brief send data to BAM memory from binary level */
+void hh_setup_screen();
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..153e7e1
--- /dev/null
+++ b/src/engine/entity.c
@@ -0,0 +1,46 @@
+#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;
+ // }
+}
+
diff --git a/src/engine/entity.h b/src/engine/entity.h
new file mode 100644
index 0000000..f45dae2
--- /dev/null
+++ b/src/engine/entity.h
@@ -0,0 +1,57 @@
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.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;
+ 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);
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/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..6735620
--- /dev/null
+++ b/src/engine/player_controller.c
@@ -0,0 +1,167 @@
+#include "ppu/types.h"
+#include "engine/camera.h"
+#include "engine/draw_screen.h"
+#include "engine/sprite_controller.h"
+#include "engine/player_controller.h"
+
+#include "demo.h"
+#include <stdio.h>
+
+#include "input.h"
+
+void hh_player_actions() {
+ static hh_entity player={
+ .hp = 4,
+ .speed = 6,
+ .is_grounded = false,
+ .pos = (vec2){32,32},
+ .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 = 2,
+ }
+ }
+ }, player_new = {0};
+
+ // hh_input_read();
+ 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) };
+ // 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.render.fam.palette_index = 7;
+ // player.render.fam.tilemap_index = 7;
+
+ // printf("%x ",player.render.fam.palette_index);
+
+ // 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.vel.x,
+ .y = player.pos.y + player.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_new.is_grounded = false;
+
+ // solves x collision
+ if (player.vel.x <= 0) {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 0})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 15}))) {
+ player_new.pos.x = (player_new.pos.x & ~15) + 16,
+ player_new.vel.x = 0;
+ }
+ } else {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 0})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 15}))) {
+ player_new.pos.x = player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY
+ player_new.vel.x = 0;
+ }
+ }
+
+ //solves y collision
+ if (player.vel.y <= 0) {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 0})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 15}))) {
+ player_new.pos.y = (player_new.pos.y & ~15) + 16,
+ player_new.vel.y = 0;
+ }
+ } else {
+ if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 16})) ||
+ hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player_new.pos.y + 15}))) {
+ player_new.pos.y = player_new.pos.y & ~15,
+ player_new.vel.y = 0;
+ player_new.is_grounded = true;
+ }
+ }
+
+ 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);
+
+
+ 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);
+
+
+ hh_s_ppu_loc_fam_entry sprite = {
+ .position_x = 16,
+ .position_y = 16,
+ .palette_index = 7,
+ .tilemap_index = 2,
+ };
+ hh_ppu_update_foreground(1, sprite);
+
+}
+
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..5d93cf8
--- /dev/null
+++ b/src/engine/sprite_controller.c
@@ -0,0 +1,22 @@
+#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(){
+ 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]);
+ }
+ }
+}
+
+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..001a459
--- /dev/null
+++ b/src/engine/sprite_controller.h
@@ -0,0 +1,106 @@
+#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 40
+#define HH_PAL_IDX_SKY 0
+#define HH_PAL_IDX_BRICK 1
+const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = {
+ 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
+ //other palettes here:
+};
+
+
+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}},
+ {
+ {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},
+ {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},
+ {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},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {
+ {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/entity.h b/src/entity.h
new file mode 100644
index 0000000..181182b
--- /dev/null
+++ b/src/entity.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef struct {
+ uint16_t pos_x;
+ uint16_t pos_y;
+ uint8_t radius;
+ uint8_t rotation; //45 degrees steps 0 == right 2 == down 4 == left 6 == up
+ uint8_t direction_x; //direction where its looking at in case no input;
+ int8_t speed; //10 default L/R MODifier
+ bool in_air;
+} hh_s_entity_player;
diff --git a/src/input.h b/src/input.h
new file mode 100644
index 0000000..90f0c61
--- /dev/null
+++ b/src/input.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <stdbool.h>
+
+/** @brief game controller state */
+typedef struct {
+ bool dpad_up;
+ bool dpad_down;
+ bool dpad_left;
+ bool dpad_right;
+ bool button_primary;
+ bool button_secondary;
+} hh_s_gamepad;
+
+/** @brief player 1's controller */
+extern hh_s_gamepad g_hh_controller_p1;
+/** @brief player 2's controller */
+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/main.c b/src/main.c
index f4de225..191d5d9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
-#include "main.h"
-#include "ppu/ppu.h"
#include "demo.h"
+#include "input.h"
+#include "main.h"
bool g_hh_run = true;
@@ -15,19 +15,7 @@ int main() {
void hh_ppu_vblank_interrupt() {
static unsigned long frame = 0;
- frame++;
-
+ hh_input_read();
hh_demo_loop(frame);
-}
-
-void hh_setup() {
- hh_ppu_init();
-
- hh_demo_setup();
-}
-
-void hh_exit() {
- g_hh_run = false;
-
- hh_ppu_deinit();
+ frame++;
}
diff --git a/src/makefile b/src/makefile
index 1f1dc65..d7d9087 100644
--- a/src/makefile
+++ b/src/makefile
@@ -4,6 +4,7 @@ TARGET = main
# platform is ds (desktop) or stm (stm32)
PLATFORM = ds
+# if your editor uses compile_commands.json for autocomplete, you should run `make compile_commands.json` again
HOST=$(strip $(shell uname -o))
@@ -29,7 +30,14 @@ 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
CFLAGS += $(SHARED_FLAGS)
LFLAGS += $(SHARED_FLAGS)
@@ -74,14 +82,14 @@ flash: $(TARGET).bin
$(TARGET): $(OBJS)
$(LD) $^ $(LFLAGS) -o $@
-compile_commands.json:
+compile_commands.json: makefile stm32.mk ds.mk
compiledb make -Bn
../scripts/compiledb-full-path-mingw.sh compile_commands.json
PHONY += format
format:
- clang-format -i $(LOCAL_SRCS)
- clang-tidy --fix-errors $(LOCAL_SRCS)
+ clang-format -i $(LOCAL_SRCS) $(DESKTOP_SRCS)
+ clang-tidy --fix-errors $(LOCAL_SRCS) $(DESKTOP_SRCS)
PHONY += clean
clean:
diff --git a/src/ppu/internals.c b/src/ppu/internals.c
index 650ba3e..b8d3e27 100644
--- a/src/ppu/internals.c
+++ b/src/ppu/internals.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
-#include "ppu/types.h"
-#include "ppu/internals.h"
#include "ppu/consts.h"
+#include "ppu/internals.h"
+#include "ppu/types.h"
bool hh_ppu_vram_valid_address(hh_ppu_addr_t addr) {
#pragma GCC diagnostic push
@@ -17,88 +17,59 @@ bool hh_ppu_vram_valid_address(hh_ppu_addr_t addr) {
}
void hh_ppu_vram_write(hh_s_ppu_vram_data data) {
- for (unsigned i = 0; i < data.size; i++)
- hh_ppu_vram_dwrite(data.offset + i, data.data[i]);
+ for (unsigned i = 0; i < data.size; i++) hh_ppu_vram_dwrite(data.offset + i, data.data[i]);
}
hh_s_ppu_vram_data hh_ppu_2nat_bam(hh_s_ppu_loc_bam_entry e) {
- hh_ppu_data_t* data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_BAM_ENTRY_SIZE);
+ hh_ppu_data_t *data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_BAM_ENTRY_SIZE);
- data[0] = HH_RESIZE(e.tilemap_index, 9, 0) << 0 |
- HH_RESIZE(e.palette_index, 2, 0) << 10 |
- e.vertical_flip << 13 |
- e.horizontal_flip << 14;
+ data[0] = HH_RESIZE(e.tilemap_index, 9, 0) << 0 | HH_RESIZE(e.palette_index, 2, 0) << 10 | e.vertical_flip << 13 | e.horizontal_flip << 14;
- hh_s_ppu_vram_data out = {
- .data = data,
- .size = HH_PPU_VRAM_FAM_ENTRY_SIZE
- };
+ hh_s_ppu_vram_data out = {.data = data, .size = HH_PPU_VRAM_FAM_ENTRY_SIZE};
return out;
}
hh_s_ppu_vram_data hh_ppu_2nat_fam(hh_s_ppu_loc_fam_entry e) {
- hh_ppu_data_t* data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_FAM_ENTRY_SIZE);
+ hh_ppu_data_t *data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_FAM_ENTRY_SIZE);
e.position_x += 16;
e.position_y += 16;
- data[0] = HH_RESIZE(e.tilemap_index, 9, 0) << 0 |
- HH_RESIZE(e.palette_index, 2, 0) << 10 |
- HH_RESIZE(e.position_y, 2, 0) << 13;
- data[1] = HH_RESIZE(e.position_y, 7, 3) << 0 |
- HH_RESIZE(e.position_x, 8, 0) << 5 |
- e.vertical_flip << 14 |
- e.horizontal_flip << 15;
-
- hh_s_ppu_vram_data out = {
- .data = data,
- .size = HH_PPU_VRAM_FAM_ENTRY_SIZE
- };
+ data[0] = HH_RESIZE(e.tilemap_index, 9, 0) << 0 | HH_RESIZE(e.palette_index, 2, 0) << 10 | HH_RESIZE(e.position_y, 2, 0) << 13;
+ data[1] = HH_RESIZE(e.position_y, 7, 3) << 0 | HH_RESIZE(e.position_x, 8, 0) << 5 | e.vertical_flip << 14 | e.horizontal_flip << 15;
+
+ hh_s_ppu_vram_data out = {.data = data, .size = HH_PPU_VRAM_FAM_ENTRY_SIZE};
return out;
}
hh_s_ppu_vram_data hh_ppu_2nat_aux(hh_s_ppu_loc_aux aux) {
- hh_ppu_data_t* data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_AUX_SIZE);
-
- data[0] = HH_RESIZE(aux.bg_shift_y, 7, 0) << 0 |
- HH_RESIZE(aux.bg_shift_x, 7, 0) << 8;
- data[1] = HH_RESIZE(aux.bg_shift_x, 8, 8) << 0 |
- aux.fg_fetch << 1 |
- aux.sysreset << 2;
-
- hh_s_ppu_vram_data out = {
- .data = data,
- .size = HH_PPU_VRAM_AUX_SIZE
- };
+ hh_ppu_data_t *data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_AUX_SIZE);
+
+ data[0] = HH_RESIZE(aux.bg_shift_y, 7, 0) << 0 | HH_RESIZE(aux.bg_shift_x, 7, 0) << 8;
+ data[1] = HH_RESIZE(aux.bg_shift_x, 8, 8) << 0 | aux.fg_fetch << 1 | aux.sysreset << 2;
+
+ hh_s_ppu_vram_data out = {.data = data, .size = HH_PPU_VRAM_AUX_SIZE};
return out;
}
hh_s_ppu_vram_data hh_ppu_2nat_sprite(const hh_ppu_loc_sprite_data_t sprite_data) {
- hh_ppu_data_t* data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_TMM_SPRITE_SIZE);
+ hh_ppu_data_t *data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_TMM_SPRITE_SIZE);
for (unsigned i = 0; i < HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT; i++) {
- unsigned word = i / 5;
+ unsigned word = i / 5;
unsigned pixel = i % 5;
if (pixel == 0) data[word] = 0;
data[word] |= HH_RESIZE(sprite_data[i], 2, 0) << pixel * 3;
}
- hh_s_ppu_vram_data out = {
- .data = data,
- .size = HH_PPU_VRAM_TMM_SPRITE_SIZE
- };
+ hh_s_ppu_vram_data out = {.data = data, .size = HH_PPU_VRAM_TMM_SPRITE_SIZE};
return out;
}
hh_s_ppu_vram_data hh_ppu_2nat_color(hh_ppu_rgb_color_t rgb) {
- hh_ppu_data_t* data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_PAL_ENTRY_SIZE);
+ hh_ppu_data_t *data = malloc(sizeof(hh_ppu_data_t) * HH_PPU_VRAM_PAL_ENTRY_SIZE);
- data[0] = HH_RESIZE(rgb[0], 3, 0) << 8 |
- HH_RESIZE(rgb[1], 3, 0) << 4 |
- HH_RESIZE(rgb[2], 3, 0) << 0;
+ data[0] = HH_RESIZE(rgb[0], 3, 0) << 8 | HH_RESIZE(rgb[1], 3, 0) << 4 | HH_RESIZE(rgb[2], 3, 0) << 0;
- hh_s_ppu_vram_data out = {
- .data = data,
- .size = HH_PPU_VRAM_PAL_ENTRY_SIZE
- };
+ hh_s_ppu_vram_data out = {.data = data, .size = HH_PPU_VRAM_PAL_ENTRY_SIZE};
return out;
}
diff --git a/src/ppu/ppu.c b/src/ppu/ppu.c
index 5f33c55..df14b9f 100644
--- a/src/ppu/ppu.c
+++ b/src/ppu/ppu.c
@@ -1,52 +1,48 @@
#include <stdlib.h>
-#include "ppu/ppu.h"
-#include "ppu/internals.h"
#include "ppu/consts.h"
+#include "ppu/internals.h"
+#include "ppu/ppu.h"
void hh_ppu_update_foreground(unsigned index, hh_s_ppu_loc_fam_entry e) {
hh_s_ppu_vram_data s = hh_ppu_2nat_fam(e);
- s.offset = HH_PPU_VRAM_FAM_OFFSET + HH_PPU_VRAM_FAM_ENTRY_SIZE * index;
+ s.offset = HH_PPU_VRAM_FAM_OFFSET + HH_PPU_VRAM_FAM_ENTRY_SIZE * index;
hh_ppu_vram_write(s);
free(s.data);
}
void hh_ppu_update_background(unsigned index, hh_s_ppu_loc_bam_entry e) {
hh_s_ppu_vram_data s = hh_ppu_2nat_bam(e);
- s.offset = HH_PPU_VRAM_BAM_OFFSET + HH_PPU_VRAM_BAM_ENTRY_SIZE * index;
+ s.offset = HH_PPU_VRAM_BAM_OFFSET + HH_PPU_VRAM_BAM_ENTRY_SIZE * index;
hh_ppu_vram_write(s);
free(s.data);
}
void hh_ppu_update_sprite(unsigned tilemap_index, const hh_s_ppu_loc_sprite sprite) {
hh_s_ppu_vram_data s = hh_ppu_2nat_sprite(sprite);
- s.offset = HH_PPU_VRAM_TMM_OFFSET + HH_PPU_VRAM_TMM_SPRITE_SIZE * tilemap_index;
+ s.offset = HH_PPU_VRAM_TMM_OFFSET + HH_PPU_VRAM_TMM_SPRITE_SIZE * tilemap_index;
hh_ppu_vram_write(s);
free(s.data);
}
void hh_ppu_update_aux(hh_s_ppu_loc_aux aux) {
hh_s_ppu_vram_data a = hh_ppu_2nat_aux(aux);
- a.offset = HH_PPU_VRAM_AUX_OFFSET;
+ a.offset = HH_PPU_VRAM_AUX_OFFSET;
hh_ppu_vram_write(a);
free(a.data);
}
void hh_ppu_update_palette_table(hh_ppu_loc_palette_table_t table) {
- for(unsigned i = 0; i < HH_PPU_PALETTE_COUNT; i++)
- hh_ppu_update_palette(i, table[i]);
+ for (unsigned i = 0; i < HH_PPU_PALETTE_COUNT; i++) hh_ppu_update_palette(i, table[i]);
}
void hh_ppu_update_palette(unsigned palette_index, hh_ppu_loc_palette_data_t palette) {
- for(unsigned i = 0; i < HH_PPU_PALETTE_COLOR_COUNT; i++)
- hh_ppu_update_color(palette_index, i, palette[i]);
+ for (unsigned i = 0; i < HH_PPU_PALETTE_COLOR_COUNT; i++) hh_ppu_update_color(palette_index, i, palette[i]);
}
void hh_ppu_update_color(unsigned palette_index, unsigned color_index, hh_ppu_rgb_color_t color) {
hh_s_ppu_vram_data c = hh_ppu_2nat_color(color);
- c.offset = HH_PPU_VRAM_PAL_OFFSET +
- palette_index * HH_PPU_VRAM_PAL_ENTRY_SIZE * HH_PPU_PALETTE_COLOR_COUNT +
- color_index * HH_PPU_VRAM_PAL_ENTRY_SIZE;
+ c.offset = HH_PPU_VRAM_PAL_OFFSET + palette_index * HH_PPU_VRAM_PAL_ENTRY_SIZE * HH_PPU_PALETTE_COLOR_COUNT + color_index * HH_PPU_VRAM_PAL_ENTRY_SIZE;
hh_ppu_vram_write(c);
free(c.data);
}
diff --git a/src/ppu/stm.c b/src/ppu/stm.c
new file mode 100644
index 0000000..fd4a18c
--- /dev/null
+++ b/src/ppu/stm.c
@@ -0,0 +1,4 @@
+#include "ppu/ppu.h"
+
+void hh_ppu_init() {}
+void hh_ppu_deinit() {}
diff --git a/src/ppusim/input.c b/src/ppusim/input.c
new file mode 100644
index 0000000..5323fb1
--- /dev/null
+++ b/src/ppusim/input.c
@@ -0,0 +1,16 @@
+#include <SDL2/SDL.h>
+
+#include "input.h"
+
+hh_s_gamepad g_hh_controller_p1 = {0};
+hh_s_gamepad g_hh_controller_p2 = {0};
+
+void hh_input_read() {
+ // SDL_PumpEvents();
+ const Uint8 *kb = SDL_GetKeyboardState(NULL);
+ g_hh_controller_p1.dpad_up = kb[SDL_SCANCODE_W];
+ 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];
+}
diff --git a/src/ppusim/mem.c b/src/ppusim/mem.c
index e3f41f5..bd8606e 100644
--- a/src/ppusim/mem.c
+++ b/src/ppusim/mem.c
@@ -1,8 +1,8 @@
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
-#include "ppusim/mem.h"
#include "ppu/internals.h"
+#include "ppusim/mem.h"
hh_ppu_data_t *g_hh_ppusim_vram = NULL;
diff --git a/src/ppusim/pixel.c b/src/ppusim/pixel.c
index 6e915e6..0457d55 100644
--- a/src/ppusim/pixel.c
+++ b/src/ppusim/pixel.c
@@ -1,10 +1,10 @@
#include <SDL2/SDL.h>
#include <stdbool.h>
-#include "ppusim/work.h"
+#include "ppu/consts.h"
#include "ppu/internals.h"
#include "ppusim/mem.h"
-#include "ppu/consts.h"
+#include "ppusim/work.h"
/* transform xy if tile is flipped */
static uint16_t hh_ppusim_apply_transform(unsigned x, unsigned y, bool fliph, bool flipv) {
@@ -15,25 +15,25 @@ static uint16_t hh_ppusim_apply_transform(unsigned x, unsigned y, bool fliph, bo
/* @brief get current bg pixel cidx */
static uint8_t hh_ppusim_bg_pixel(unsigned x, unsigned y) {
- hh_ppu_data_t* aux = &g_hh_ppusim_vram[HH_PPU_VRAM_AUX_OFFSET];
- unsigned bg_shift_y = HH_RESIZE(aux[0], 7, 0);
- unsigned bg_shift_x = HH_RESIZE(aux[0], 15, 8) | HH_RESIZE(aux[1], 0, 0) << 8;
- unsigned abs_x = bg_shift_x + x;
- unsigned abs_y = bg_shift_y + y;
- unsigned grid_x = abs_x / HH_PPU_SPRITE_WIDTH;
- unsigned grid_y = abs_y / HH_PPU_SPRITE_HEIGHT;
- unsigned loc_x = abs_x - grid_x * HH_PPU_SPRITE_WIDTH;
- unsigned loc_y = abs_y - grid_y * HH_PPU_SPRITE_HEIGHT;
- unsigned bam_offset = grid_y * HH_PPU_BG_CANVAS_TILES_H + grid_x;
- hh_ppu_data_t bam = g_hh_ppusim_vram[HH_PPU_VRAM_BAM_OFFSET + bam_offset];
- uint8_t cidx = 0;
+ hh_ppu_data_t *aux = &g_hh_ppusim_vram[HH_PPU_VRAM_AUX_OFFSET];
+ unsigned bg_shift_y = HH_RESIZE(aux[0], 7, 0);
+ unsigned bg_shift_x = HH_RESIZE(aux[0], 15, 8) | HH_RESIZE(aux[1], 0, 0) << 8;
+ unsigned abs_x = bg_shift_x + x;
+ unsigned abs_y = bg_shift_y + y;
+ unsigned grid_x = abs_x / HH_PPU_SPRITE_WIDTH;
+ unsigned grid_y = abs_y / HH_PPU_SPRITE_HEIGHT;
+ unsigned loc_x = abs_x - grid_x * HH_PPU_SPRITE_WIDTH;
+ unsigned loc_y = abs_y - grid_y * HH_PPU_SPRITE_HEIGHT;
+ unsigned bam_offset = grid_y * HH_PPU_BG_CANVAS_TILES_H + grid_x;
+ hh_ppu_data_t bam = g_hh_ppusim_vram[HH_PPU_VRAM_BAM_OFFSET + bam_offset];
+ uint8_t cidx = 0;
uint16_t tile_pixel_idx = hh_ppusim_apply_transform(loc_x, loc_y, HH_RESIZE(bam, 14, 14), HH_RESIZE(bam, 13, 13));
- uint16_t tile_idx = HH_RESIZE(bam, 9, 0);
- hh_ppu_addr_t ttm_addr = tile_idx * HH_PPU_VRAM_TMM_SPRITE_SIZE + tile_pixel_idx / 5;
- uint8_t word_bit_addr = (tile_pixel_idx % 5) * 3;
- hh_ppu_data_t tmm = g_hh_ppusim_vram[HH_PPU_VRAM_TMM_OFFSET + ttm_addr];
+ uint16_t tile_idx = HH_RESIZE(bam, 9, 0);
+ hh_ppu_addr_t ttm_addr = tile_idx * HH_PPU_VRAM_TMM_SPRITE_SIZE + tile_pixel_idx / 5;
+ uint8_t word_bit_addr = (tile_pixel_idx % 5) * 3;
+ hh_ppu_data_t tmm = g_hh_ppusim_vram[HH_PPU_VRAM_TMM_OFFSET + ttm_addr];
cidx |= HH_RESIZE(bam, 12, 10) << 3;
- cidx |= HH_RESIZE(tmm, word_bit_addr+2, word_bit_addr) << 0;
+ cidx |= HH_RESIZE(tmm, word_bit_addr + 2, word_bit_addr) << 0;
return cidx;
}
@@ -44,42 +44,37 @@ static uint8_t hh_ppusim_fg_pixel(unsigned x, unsigned y) {
uint8_t cidx = 0;
for (unsigned i = 0; i < HH_PPU_FG_SPRITE_COUNT; i++) {
unsigned fam_offset = i * HH_PPU_VRAM_FAM_ENTRY_SIZE;
- hh_ppu_data_t* fam = &g_hh_ppusim_vram[HH_PPU_VRAM_FAM_OFFSET + fam_offset];
- unsigned sprite_y = HH_RESIZE(fam[0], 15, 13) | HH_RESIZE(fam[1], 4, 0) << 3;
- unsigned sprite_x = HH_RESIZE(fam[1], 13, 5);
+ hh_ppu_data_t *fam = &g_hh_ppusim_vram[HH_PPU_VRAM_FAM_OFFSET + fam_offset];
+ unsigned sprite_y = HH_RESIZE(fam[0], 15, 13) | HH_RESIZE(fam[1], 4, 0) << 3;
+ unsigned sprite_x = HH_RESIZE(fam[1], 13, 5);
if (x < sprite_x) continue;
if (x >= sprite_x + HH_PPU_SPRITE_WIDTH) continue;
if (y < sprite_y) continue;
if (y >= sprite_y + HH_PPU_SPRITE_HEIGHT) continue;
- unsigned loc_x = x - sprite_x;
- unsigned loc_y = y - sprite_y;
+ unsigned loc_x = x - sprite_x;
+ unsigned loc_y = y - sprite_y;
uint16_t tile_pixel_idx = hh_ppusim_apply_transform(loc_x, loc_y, HH_RESIZE(fam[1], 15, 15), HH_RESIZE(fam[1], 14, 14));
- uint16_t tile_idx = HH_RESIZE(fam[0], 9, 0);
- hh_ppu_addr_t ttm_addr = tile_idx * HH_PPU_VRAM_TMM_SPRITE_SIZE + tile_pixel_idx / 5;
- uint8_t word_bit_addr = (tile_pixel_idx % 5) * 3;
- hh_ppu_data_t tmm = g_hh_ppusim_vram[HH_PPU_VRAM_TMM_OFFSET + ttm_addr];
- unsigned cidx_col = HH_RESIZE(tmm, word_bit_addr+2, word_bit_addr);
+ uint16_t tile_idx = HH_RESIZE(fam[0], 9, 0);
+ hh_ppu_addr_t ttm_addr = tile_idx * HH_PPU_VRAM_TMM_SPRITE_SIZE + tile_pixel_idx / 5;
+ uint8_t word_bit_addr = (tile_pixel_idx % 5) * 3;
+ hh_ppu_data_t tmm = g_hh_ppusim_vram[HH_PPU_VRAM_TMM_OFFSET + ttm_addr];
+ unsigned cidx_col = HH_RESIZE(tmm, word_bit_addr + 2, word_bit_addr);
if (cidx_col == 0) continue;
unsigned cidx_pal = HH_RESIZE(fam[0], 12, 10);
- cidx = (cidx_col << 0) | (cidx_pal << 3);
+ cidx = (cidx_col << 0) | (cidx_pal << 3);
break;
}
return cidx;
}
-void hh_ppusim_pixel(uint8_t* s, unsigned x, unsigned y) {
- uint8_t bg_cidx = hh_ppusim_bg_pixel(x, y);
- uint8_t fg_cidx = hh_ppusim_fg_pixel(x, y);
- uint8_t cidx = (fg_cidx & HH_MASK(3)) == 0 ? bg_cidx : fg_cidx;
- hh_ppu_data_t pal_rgb = g_hh_ppusim_vram[HH_PPU_VRAM_PAL_OFFSET + cidx];
- hh_ppu_rgb_color_t rgb = {
- HH_RESIZE(pal_rgb, 11, 8),
- HH_RESIZE(pal_rgb, 7, 4),
- HH_RESIZE(pal_rgb, 3, 0)
- };
+void hh_ppusim_pixel(uint8_t *s, unsigned x, unsigned y) {
+ uint8_t bg_cidx = hh_ppusim_bg_pixel(x, y);
+ uint8_t fg_cidx = hh_ppusim_fg_pixel(x, y);
+ uint8_t cidx = (fg_cidx & HH_MASK(3)) == 0 ? bg_cidx : fg_cidx;
+ hh_ppu_data_t pal_rgb = g_hh_ppusim_vram[HH_PPU_VRAM_PAL_OFFSET + cidx];
+ hh_ppu_rgb_color_t rgb = {HH_RESIZE(pal_rgb, 11, 8), HH_RESIZE(pal_rgb, 7, 4), HH_RESIZE(pal_rgb, 3, 0)};
s[0] = rgb[0] << 4;
s[1] = rgb[1] << 4;
s[2] = rgb[2] << 4;
}
-
diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c
index 2816b31..a5fec45 100644
--- a/src/ppusim/sim.c
+++ b/src/ppusim/sim.c
@@ -1,26 +1,56 @@
-#include <stdlib.h>
-#include <stdbool.h>
#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"
-SDL_Window *g_hh_window = NULL;
+SDL_Window *g_hh_window = NULL;
SDL_Renderer *g_hh_renderer = NULL;
void hh_ppu_init() {
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
- g_hh_window = SDL_CreateWindow("ppusim", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, HH_PPU_SCREEN_WIDTH * HH_PPUSIM_UPSCALE_FACTOR, HH_PPU_SCREEN_HEIGHT * HH_PPUSIM_UPSCALE_FACTOR, SDL_WINDOW_SHOWN);
+ g_hh_window = SDL_CreateWindow("ppusim", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, HH_PPU_SCREEN_WIDTH * HH_PPUSIM_UPSCALE_FACTOR,
+ HH_PPU_SCREEN_HEIGHT * HH_PPUSIM_UPSCALE_FACTOR, SDL_WINDOW_SHOWN);
g_hh_renderer = SDL_CreateRenderer(g_hh_window, -1, SDL_RENDERER_ACCELERATED);
g_hh_ppusim_core_count = SDL_GetCPUCount();
- g_hh_ppusim_threads = malloc(sizeof(pthread_t) * g_hh_ppusim_core_count);
+ g_hh_ppusim_threads = malloc(sizeof(pthread_t) * g_hh_ppusim_core_count);
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() {
+ char* filename = "../test/bin/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() {
@@ -36,8 +66,9 @@ void hh_loop() {
SDL_Event e;
while (g_hh_run) {
uint32_t start = SDL_GetTicks();
- while (SDL_PollEvent(&e)) if (e.type == SDL_QUIT) exit(0);
-
+ while (SDL_PollEvent(&e))
+ if (e.type == SDL_QUIT) exit(0);
+
hh_ppu_vblank_interrupt();
SDL_RenderClear(g_hh_renderer);
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/ppusim/work.c b/src/ppusim/work.c
index fcb80ca..96d15aa 100644
--- a/src/ppusim/work.c
+++ b/src/ppusim/work.c
@@ -2,39 +2,41 @@
#include <pthread.h>
#include <stdio.h>
-#include "ppusim/work.h"
-#include "ppusim/sim.h"
#include "ppu/consts.h"
#include "ppusim/pixel.h"
+#include "ppusim/sim.h"
+#include "ppusim/work.h"
-pthread_t* g_hh_ppusim_threads;
+pthread_t *g_hh_ppusim_threads;
unsigned g_hh_ppusim_core_count;
hh_s_ppusim_screen g_hh_ppusim_screen;
-void* hh_ppusim_draw_thread(void* arg) {
- unsigned core = (unsigned long) arg;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
+#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
+
+void *hh_ppusim_draw_thread(void *arg) {
+ unsigned core = (unsigned long)arg;
for (unsigned y = core; y < HH_PPU_SCREEN_HEIGHT; y += g_hh_ppusim_core_count)
- for (unsigned x = 0; x < HH_PPU_SCREEN_WIDTH; x++)
- hh_ppusim_pixel(g_hh_ppusim_screen[y][x], x, y);
+ for (unsigned x = 0; x < HH_PPU_SCREEN_WIDTH; x++) hh_ppusim_pixel(g_hh_ppusim_screen[y][x], x, y);
return NULL;
}
-void hh_ppusim_draw_frame(SDL_Renderer* renderer) {
- for (unsigned core = 0; core < g_hh_ppusim_core_count; core++)
- pthread_create(&g_hh_ppusim_threads[core], NULL, hh_ppusim_draw_thread, (void*)(unsigned long)core);
- for (unsigned core = 0; core < g_hh_ppusim_core_count; core++)
- pthread_join(g_hh_ppusim_threads[core], NULL);
-
+void hh_ppusim_draw_frame(SDL_Renderer *renderer) {
+ for (unsigned core = 0; core < g_hh_ppusim_core_count; core++) pthread_create(&g_hh_ppusim_threads[core], NULL, hh_ppusim_draw_thread, (void *)(unsigned long)core);
+ for (unsigned core = 0; core < g_hh_ppusim_core_count; core++) pthread_join(g_hh_ppusim_threads[core], NULL);
+
for (unsigned x = 0; x < HH_PPU_SCREEN_WIDTH; x++) {
for (unsigned y = 0; y < HH_PPU_SCREEN_HEIGHT; y++) {
SDL_SetRenderDrawColor(renderer, g_hh_ppusim_screen[y][x][0], g_hh_ppusim_screen[y][x][1], g_hh_ppusim_screen[y][x][2], 255);
- SDL_RenderFillRect(renderer, &(SDL_Rect) {
- .x = x * HH_PPUSIM_UPSCALE_FACTOR,
- .y = y * HH_PPUSIM_UPSCALE_FACTOR,
- .w = HH_PPUSIM_UPSCALE_FACTOR,
- .h = HH_PPUSIM_UPSCALE_FACTOR,
- });
+ SDL_RenderFillRect(renderer, &(SDL_Rect){
+ .x = x * HH_PPUSIM_UPSCALE_FACTOR,
+ .y = y * HH_PPUSIM_UPSCALE_FACTOR,
+ .w = HH_PPUSIM_UPSCALE_FACTOR,
+ .h = HH_PPUSIM_UPSCALE_FACTOR,
+ });
}
}
}
+#pragma GCC diagnostic pop
diff --git a/src/ppusim/work.h b/src/ppusim/work.h
index 6f72357..3a165ff 100644
--- a/src/ppusim/work.h
+++ b/src/ppusim/work.h
@@ -1,6 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
+#include <pthread.h>
#include "ppu/consts.h"
diff --git a/src/stm32.mk b/src/stm32.mk
index e41bcf9..3b5ccb9 100644
--- a/src/stm32.mk
+++ b/src/stm32.mk
@@ -17,6 +17,9 @@ SHARED_FLAGS += -I./stm32
ifeq ($(HOST),GNU/Linux)
SHARED_FLAGS += -I/usr/arm-none-eabi/include/
endif
+ifeq ($(HOST),Msys)
+SHARED_FLAGS += -I/mingw64/arm-none-eabi/include/
+endif
SHARED_FLAGS += -ffunction-sections
SHARED_FLAGS += -fdata-sections
SHARED_FLAGS += -Wl,--gc-sections
@@ -40,22 +43,25 @@ STM_SRCS += lib/FreeRTOS-Kernel/croutine.c \
lib/FreeRTOS-Kernel/timers.c \
lib/FreeRTOS-Kernel/portable/GCC/ARM_CM0/port.c \
lib/FreeRTOS-Kernel/portable/MemMang/heap_4.c
-STM_SRCS += lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_rcc.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_rcc_ex.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_i2c.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_i2c_ex.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_gpio.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_dma.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_cortex.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_pwr.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_pwr_ex.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_flash.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_flash_ex.c \
+STM_SRCS += lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_spi.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_spi_ex.c \
lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_tim.c \
lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_tim_ex.c \
lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_uart.c \
- lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_uart_ex.c
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_uart_ex.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_cortex.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_dma.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_flash.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_flash_ex.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_gpio.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_pwr.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_pwr_ex.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_rcc.c \
+ lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_rcc_ex.c
STM_SRCS += stm32/idle_task_static_memory.c \
- stm32/main.c
+ stm32/main.c \
+ stm32/setup.c \
+ ppu/stm.c \
+ stm32/input.c
diff --git a/src/stm32/input.c b/src/stm32/input.c
new file mode 100644
index 0000000..e2d07cb
--- /dev/null
+++ b/src/stm32/input.c
@@ -0,0 +1,13 @@
+#include <stm32f0xx_hal_gpio.h>
+
+#include "input.h"
+
+hh_s_gamepad g_hh_controller_p1 = { 0 };
+hh_s_gamepad g_hh_controller_p2 = { 0 };
+
+void hh_input_read() {
+ g_hh_controller_p1.dpad_left = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_4);
+ g_hh_controller_p1.dpad_right = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_5);
+ g_hh_controller_p1.dpad_down = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_6);
+ g_hh_controller_p1.dpad_up = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_8);
+}
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/src/stm32/setup.c b/src/stm32/setup.c
new file mode 100644
index 0000000..2c3552b
--- /dev/null
+++ b/src/stm32/setup.c
@@ -0,0 +1,197 @@
+#include <stm32f0xx_hal.h>
+#include <stm32f0xx_hal_spi.h>
+#include <stm32f0xx_hal_uart.h>
+#include <stm32f0xx_hal_gpio.h>
+#include <FreeRTOS.h>
+#include <task.h>
+
+#include "main.h"
+#include "setup.h"
+#include "ppu/ppu.h"
+
+UART_HandleTypeDef huart2 = {
+ .Instance = USART2,
+ .Init.BaudRate = 115200,
+ .Init.WordLength = UART_WORDLENGTH_8B,
+ .Init.StopBits = UART_STOPBITS_1,
+ .Init.Parity = UART_PARITY_NONE,
+ .Init.Mode = UART_MODE_TX_RX,
+ .Init.HwFlowCtl = UART_HWCONTROL_NONE,
+ .Init.OverSampling = UART_OVERSAMPLING_16,
+ .Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE,
+ .AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT,
+};
+
+GPIO_InitTypeDef spi_gpio = {
+ .Pin = HH_IO_SPI_PINS,
+ .Mode = GPIO_MODE_AF_PP,
+ .Pull = GPIO_NOPULL,
+ .Speed = GPIO_SPEED_FREQ_HIGH,
+ .Alternate = GPIO_AF0_SPI1,
+};
+
+SPI_HandleTypeDef hspi1 = {
+ .Instance = SPI1,
+ .Init.Mode = SPI_MODE_MASTER,
+ .Init.Direction = SPI_DIRECTION_1LINE,
+ .Init.DataSize = SPI_DATASIZE_8BIT,
+ .Init.CLKPolarity = SPI_POLARITY_LOW,
+ .Init.CLKPhase = SPI_PHASE_1EDGE,
+ .Init.NSS = SPI_NSS_SOFT,
+ .Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16,
+ .Init.FirstBit = SPI_FIRSTBIT_MSB,
+ .Init.TIMode = SPI_TIMODE_DISABLE,
+ .Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE,
+ .Init.CRCPolynomial = 7,
+ .Init.CRCLength = SPI_CRC_LENGTH_DATASIZE,
+ .Init.NSSPMode = SPI_NSS_PULSE_DISABLE,
+};
+
+TIM_HandleTypeDef htim3 = {
+ .Instance = TIM3,
+ .Init.Prescaler = 7999,
+ .Init.CounterMode = TIM_COUNTERMODE_UP,
+ .Init.Period = 65535,
+ .Init.ClockDivision = TIM_CLOCKDIVISION_DIV1,
+ .Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE,
+};
+
+static void hh_io_spi_setup();
+static void hh_io_tim_setup();
+static void hh_io_usart2_setup();
+static void hh_io_gpio_setup();
+static void hh_io_clock_setup();
+static void hh_io_setup_error_handler();
+
+void hh_setup() {
+ HAL_Init();
+
+ hh_io_clock_setup();
+ hh_io_usart2_setup();
+ hh_io_gpio_setup();
+ hh_io_spi_setup();
+ hh_io_tim_setup();
+
+ hh_ppu_init();
+}
+
+void hh_exit() {
+ hh_ppu_deinit();
+
+ HAL_DeInit();
+}
+
+void hh_io_clock_setup() {
+ if (HAL_OK != HAL_RCC_OscConfig(&(RCC_OscInitTypeDef){
+ .OscillatorType = RCC_OSCILLATORTYPE_HSI,
+ .HSIState = RCC_HSI_ON,
+ .HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT,
+ .PLL.PLLState = RCC_PLL_ON,
+ })) return hh_io_setup_error_handler();
+
+ // cpu, ahb & apb clocks
+ if (HAL_OK != HAL_RCC_ClockConfig(&(RCC_ClkInitTypeDef){
+ .ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1,
+ .SYSCLKSource = RCC_SYSCLKSOURCE_HSI,
+ .AHBCLKDivider = RCC_SYSCLK_DIV1,
+ .APB1CLKDivider = RCC_HCLK_DIV1,
+ }, FLASH_LATENCY_1)) return hh_io_setup_error_handler();
+
+ // usart2 clock (usb serial)
+ if (HAL_RCCEx_PeriphCLKConfig(&(RCC_PeriphCLKInitTypeDef){
+ .PeriphClockSelection = RCC_PERIPHCLK_USART2,
+ .Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1,
+ .I2c1ClockSelection = RCC_I2C1CLKSOURCE_HSI,
+ }) != HAL_OK) return hh_io_setup_error_handler();
+}
+
+void hh_io_spi_setup() {
+ if (HAL_SPI_Init(&hspi1) != HAL_OK)
+ return hh_io_setup_error_handler();
+}
+
+void hh_io_usart2_setup() {
+ if (HAL_UART_Init(&huart2) != HAL_OK)
+ return hh_io_setup_error_handler();
+}
+
+void hh_io_tim_setup() {
+ if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
+ return hh_io_setup_error_handler();
+
+ if (HAL_TIM_ConfigClockSource(&htim3, &(TIM_ClockConfigTypeDef) {
+ .ClockSource = TIM_CLOCKSOURCE_INTERNAL
+ }) != HAL_OK) return hh_io_setup_error_handler();
+
+ if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &(TIM_MasterConfigTypeDef) {
+ .MasterOutputTrigger = TIM_TRGO_RESET,
+ .MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE,
+ }) != HAL_OK) return hh_io_setup_error_handler();
+}
+
+void hh_io_gpio_setup() {
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_SET);
+ HAL_GPIO_Init(GPIOA, &(GPIO_InitTypeDef) {
+ .Pin = GPIO_PIN_9,
+ .Mode = GPIO_MODE_OUTPUT_PP,
+ .Pull = GPIO_NOPULL,
+ .Speed = GPIO_SPEED_FREQ_LOW,
+ });
+ HAL_GPIO_Init(GPIOA, &(GPIO_InitTypeDef) {
+ .Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_8,
+ .Mode = GPIO_MODE_INPUT,
+ .Pull = GPIO_PULLDOWN,
+ });
+}
+
+void HAL_MspInit() {
+ __HAL_RCC_SYSCFG_CLK_ENABLE();
+ __HAL_RCC_PWR_CLK_ENABLE();
+}
+
+void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) {
+ if(hspi->Instance != SPI1) return;
+
+ __HAL_RCC_SPI1_CLK_ENABLE();
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+
+ HAL_GPIO_Init(HH_IO_SPI_PORT, &spi_gpio);
+}
+
+void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi) {
+ if(hspi->Instance != SPI1) return;
+
+ __HAL_RCC_SPI1_CLK_DISABLE();
+
+ HAL_GPIO_DeInit(HH_IO_SPI_PORT, HH_IO_SPI_PINS);
+}
+
+void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) {
+ if(htim_base->Instance != TIM3) return;
+
+ __HAL_RCC_TIM3_CLK_ENABLE();
+}
+
+void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base) {
+ if(htim_base->Instance != TIM3) return;
+
+ __HAL_RCC_TIM3_CLK_DISABLE();
+}
+
+void SysTick_Handler() {
+ HAL_IncTick();
+ if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED)
+ xPortSysTickHandler();
+}
+
+void HardFault_Handler() {
+ for(;;);
+}
+
+void hh_io_setup_error_handler() {
+ __disable_irq();
+ while (1);
+}
diff --git a/src/stm32/setup.h b/src/stm32/setup.h
new file mode 100644
index 0000000..66d5ff3
--- /dev/null
+++ b/src/stm32/setup.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <stm32f0xx_hal_spi.h>
+#include <stm32f0xx_hal_uart.h>
+#include <stm32f0xx_hal_tim.h>
+#include <stm32f0xx_hal_gpio.h>
+
+#define HH_IO_SPI_PINS (GPIO_PIN_5 | GPIO_PIN_7)
+#define HH_IO_SPI_PORT GPIOA
+
+extern UART_HandleTypeDef huart2; // NOLINT
+extern GPIO_InitTypeDef spi_gpio; // NOLINT
+extern SPI_HandleTypeDef hspi1; // NOLINT
+extern TIM_HandleTypeDef htim3; // NOLINT
+
+// required HAL setup functions
+void HAL_MspInit(); // NOLINT
+void HAL_UART_MspInit(UART_HandleTypeDef *huart); // NOLINT
+void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi); // NOLINT
+void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi); // NOLINT
+void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base); // NOLINT
+void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base); // NOLINT
+void HardFault_Handler(); // NOLINT
+void SysTick_Handler(); // NOLINT
diff --git a/src/stm32/stm32f0xx_hal_conf.h b/src/stm32/stm32f0xx_hal_conf.h
index fc27221..84a3b74 100644
--- a/src/stm32/stm32f0xx_hal_conf.h
+++ b/src/stm32/stm32f0xx_hal_conf.h
@@ -19,16 +19,18 @@
#define DATA_CACHE_ENABLE 0U
#define USE_SPI_CRC 0U
-#define HAL_RCC_MODULE_ENABLED
#define HAL_MODULE_ENABLED
-#define HAL_I2C_MODULE_ENABLED
-#define HAL_GPIO_MODULE_ENABLED
-#define HAL_DMA_MODULE_ENABLED
-#define HAL_CORTEX_MODULE_ENABLED
-#define HAL_PWR_MODULE_ENABLED
-#define HAL_FLASH_MODULE_ENABLED
+#define HAL_SPI_MODULE_ENABLED
#define HAL_TIM_MODULE_ENABLED
#define HAL_UART_MODULE_ENABLED
+#define HAL_CORTEX_MODULE_ENABLED
+#define HAL_DMA_MODULE_ENABLED
+#define HAL_FLASH_MODULE_ENABLED
+#define HAL_GPIO_MODULE_ENABLED
+#define HAL_EXTI_MODULE_ENABLED
+#define HAL_PWR_MODULE_ENABLED
+#define HAL_RCC_MODULE_ENABLED
+// #define HAL_I2C_MODULE_ENABLED
#ifdef HAL_RCC_MODULE_ENABLED
#include <stm32f0xx_hal_rcc.h>
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;
+}
diff --git a/test/bin/tilemap.pip b/test/bin/tilemap.pip
new file mode 100644
index 0000000..c0c646e
--- /dev/null
+++ b/test/bin/tilemap.pip
@@ -0,0 +1,512 @@
+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