From 65f9982ba6992e62960d20bb690cf29ef60e835c Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Wed, 8 Mar 2023 15:37:25 +0100 Subject: spelling correction --- src/stm32/TODO/hh_entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stm32/TODO/hh_entity.h b/src/stm32/TODO/hh_entity.h index 82d75c5..768b2e6 100644 --- a/src/stm32/TODO/hh_entity.h +++ b/src/stm32/TODO/hh_entity.h @@ -7,10 +7,10 @@ typedef struct hh_entity //armor/block? }; -/// @brief detect for collision enity and eviroment +/// @brief detect for collision entity and environment /// @param environment position of tile to be checked /// @param entity position entity -/// @return true if collision between enity and environment +/// @return true if collision between entity and environment bool hh_collision(const vec2& environment, const vec2& entity); /// @brief solve collisions -- cgit v1.2.3 From 0ce1adac6d80bf69e3a03891879d9445698300bc Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Fri, 10 Mar 2023 11:55:46 +0100 Subject: nope --- src/stm32/TODO/hh_entity.c | 6 ++++++ src/stm32/TODO/maths.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/stm32/TODO/hh_entity.c create mode 100644 src/stm32/TODO/maths.c diff --git a/src/stm32/TODO/hh_entity.c b/src/stm32/TODO/hh_entity.c new file mode 100644 index 0000000..492ca67 --- /dev/null +++ b/src/stm32/TODO/hh_entity.c @@ -0,0 +1,6 @@ +#include "maths.h" +#include "hh_entity.h" + +bool hh_collision(const vec2& environment, const vec2& entity){ + +} \ No newline at end of file diff --git a/src/stm32/TODO/maths.c b/src/stm32/TODO/maths.c new file mode 100644 index 0000000..ef3698b --- /dev/null +++ b/src/stm32/TODO/maths.c @@ -0,0 +1,12 @@ +#include "maths.h" + +#include + +float clamp( float x, float min, float max ){ + if (x > max) + return max; + else if (x < min) + return min; + else + return x; +} -- cgit v1.2.3 From 4a740898621dcfc16fe257b6fe8695c768ec4dd6 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 10 Mar 2023 14:02:25 +0100 Subject: update style guide --- style.md | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3 From e3e0feb56340a72545b6fd38f22e134cf2e3509a Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Fri, 10 Mar 2023 14:23:05 +0100 Subject: fixed code styles --- .editorconfig | 4 ++-- src/engine/TODO/combat.h | 9 +++++++++ src/engine/TODO/draw_screen.h | 1 + src/engine/TODO/entity.c | 41 ++++++++++++++++++++++++++++++++++++++++ src/engine/TODO/entity.h | 24 +++++++++++++++++++++++ src/engine/TODO/hh_combat.h | 9 --------- src/engine/TODO/hh_draw_screen.h | 1 - src/engine/TODO/hh_entity.c | 41 ---------------------------------------- src/engine/TODO/hh_entity.h | 24 ----------------------- src/engine/TODO/hh_level.h | 1 - src/engine/TODO/hh_rand.h | 1 - src/engine/TODO/level.h | 4 ++++ src/engine/TODO/maths.c | 1 - src/engine/TODO/maths.h | 3 ++- src/entity.h | 1 - src/input.h | 1 - src/ppu/ppu.h | 3 --- src/ppusim/sim.c | 5 +++++ src/ppusim/sim.h | 3 +++ src/stm32/main.c | 3 +++ 20 files changed, 94 insertions(+), 86 deletions(-) create mode 100644 src/engine/TODO/combat.h create mode 100644 src/engine/TODO/draw_screen.h create mode 100644 src/engine/TODO/entity.c create mode 100644 src/engine/TODO/entity.h delete mode 100644 src/engine/TODO/hh_combat.h delete mode 100644 src/engine/TODO/hh_draw_screen.h delete mode 100644 src/engine/TODO/hh_entity.c delete mode 100644 src/engine/TODO/hh_entity.h delete mode 100644 src/engine/TODO/hh_level.h delete mode 100644 src/engine/TODO/hh_rand.h create mode 100644 src/engine/TODO/level.h delete mode 100644 src/engine/TODO/maths.c diff --git a/.editorconfig b/.editorconfig index fece754..1f4a360 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,10 +2,10 @@ root = true [*] indent_style = tab -indent_size = 2 +indent_size = 3 end_of_line = lf insert_final_newline = true [*.md] indent_style = space -indent_size = 2 +indent_size = 3 diff --git a/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/TODO/draw_screen.h b/src/engine/TODO/draw_screen.h new file mode 100644 index 0000000..f5d7507 --- /dev/null +++ b/src/engine/TODO/draw_screen.h @@ -0,0 +1 @@ +// every function call for drawing the screen goes here. diff --git a/src/engine/TODO/entity.c b/src/engine/TODO/entity.c new file mode 100644 index 0000000..fa550d5 --- /dev/null +++ b/src/engine/TODO/entity.c @@ -0,0 +1,41 @@ +#include + +#include "hh_entity.h" +#include "maths.h" + +/* + PLAYER: (pos on X) + ,___, + | | + | X | + |___| + +*/ + +bool hh_collision(vec2* pos1, vec2* pos2){ + if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x + return true; + } + + if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y + return true; + } + return false; +} + +void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ + if (entity->vec.x > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.x < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } +} + diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h new file mode 100644 index 0000000..fdbeb8a --- /dev/null +++ b/src/engine/TODO/entity.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include "maths.h" + +typedef struct { + vec2 pos, vec; + bool is_grounded; + int8_t hp; + //armor/block? +}hh_entity; + +/// @brief detect for collision enity and eviroment +/// @param pos1 position of environment tile to be checked +/// @param pos2 position entity +/// @return true if collision between enity and environment +bool hh_collision(vec2* pos1, vec2* pos2); + +/// @brief solve collisions +/// @param environment position +/// @param entity position +/// @return solved new entity position +void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/hh_combat.h b/src/engine/TODO/hh_combat.h deleted file mode 100644 index 16c41f5..0000000 --- a/src/engine/TODO/hh_combat.h +++ /dev/null @@ -1,9 +0,0 @@ -#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/TODO/hh_draw_screen.h b/src/engine/TODO/hh_draw_screen.h deleted file mode 100644 index f5d7507..0000000 --- a/src/engine/TODO/hh_draw_screen.h +++ /dev/null @@ -1 +0,0 @@ -// every function call for drawing the screen goes here. diff --git a/src/engine/TODO/hh_entity.c b/src/engine/TODO/hh_entity.c deleted file mode 100644 index fa550d5..0000000 --- a/src/engine/TODO/hh_entity.c +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#include "hh_entity.h" -#include "maths.h" - -/* - PLAYER: (pos on X) - ,___, - | | - | X | - |___| - -*/ - -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x - return true; - } - - if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y - return true; - } - return false; -} - -void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ - if (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } -} - diff --git a/src/engine/TODO/hh_entity.h b/src/engine/TODO/hh_entity.h deleted file mode 100644 index fdbeb8a..0000000 --- a/src/engine/TODO/hh_entity.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -#include "maths.h" - -typedef struct { - vec2 pos, vec; - bool is_grounded; - int8_t hp; - //armor/block? -}hh_entity; - -/// @brief detect for collision enity and eviroment -/// @param pos1 position of environment tile to be checked -/// @param pos2 position entity -/// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); - -/// @brief solve collisions -/// @param environment position -/// @param entity position -/// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/hh_level.h b/src/engine/TODO/hh_level.h deleted file mode 100644 index 43b19a3..0000000 --- a/src/engine/TODO/hh_level.h +++ /dev/null @@ -1 +0,0 @@ -//deal with loading/saving the correct level diff --git a/src/engine/TODO/hh_rand.h b/src/engine/TODO/hh_rand.h deleted file mode 100644 index ea7c1d4..0000000 --- a/src/engine/TODO/hh_rand.h +++ /dev/null @@ -1 +0,0 @@ -// deal with Pseudo random number generation here. diff --git a/src/engine/TODO/level.h b/src/engine/TODO/level.h new file mode 100644 index 0000000..09f77e7 --- /dev/null +++ b/src/engine/TODO/level.h @@ -0,0 +1,4 @@ +//deal with loading/saving the correct level + +/** @brief */ +void hh_map_load(); diff --git a/src/engine/TODO/maths.c b/src/engine/TODO/maths.c deleted file mode 100644 index d1bb089..0000000 --- a/src/engine/TODO/maths.c +++ /dev/null @@ -1 +0,0 @@ -#include "maths.h" diff --git a/src/engine/TODO/maths.h b/src/engine/TODO/maths.h index 032e56d..c7f1b44 100644 --- a/src/engine/TODO/maths.h +++ b/src/engine/TODO/maths.h @@ -9,7 +9,8 @@ typedef struct { typedef vec2 vec_cen;//centered typedef vec2 vec_cor;//left upper corner -#define HH_MATH_FIXED_POINT 7 //fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) +//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)) diff --git a/src/entity.h b/src/entity.h index 20cbf42..181182b 100644 --- a/src/entity.h +++ b/src/entity.h @@ -12,4 +12,3 @@ typedef struct { int8_t speed; //10 default L/R MODifier bool in_air; } hh_s_entity_player; - diff --git a/src/input.h b/src/input.h index adacba2..90f0c61 100644 --- a/src/input.h +++ b/src/input.h @@ -19,4 +19,3 @@ extern hh_s_gamepad g_hh_controller_p2; /** @brief update g_hh_controller_p1 and 2 by reading buttons */ void hh_input_read(); - diff --git a/src/ppu/ppu.h b/src/ppu/ppu.h index 18b58a2..75d97c1 100644 --- a/src/ppu/ppu.h +++ b/src/ppu/ppu.h @@ -9,9 +9,6 @@ void hh_ppu_init(); /** @brief deinitialize ppu interface */ void hh_ppu_deinit(); -/** @brief */ -void hh_ppu_load_tilemap(); - /** @brief update single foreground sprite */ void hh_ppu_update_foreground(unsigned index, hh_s_ppu_loc_fam_entry e); /** @brief update single background sprite */ diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 449b78d..7d56d2d 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -22,6 +22,11 @@ void hh_ppu_init() { g_hh_ppusim_vram = malloc(sizeof(hh_ppu_data_t) * 0xffff); memset(g_hh_ppusim_vram, 0x0000, 0xffff); + hh_ppu_load_tilemap(); +} + +void hh_ppu_load_tilemap() { + } void hh_ppu_deinit() { diff --git a/src/ppusim/sim.h b/src/ppusim/sim.h index 73f4b23..4d1d718 100644 --- a/src/ppusim/sim.h +++ b/src/ppusim/sim.h @@ -4,3 +4,6 @@ #define HH_PPUSIM_UPSCALE_FACTOR 3 /** @brief max framerate for PPUSIM */ #define HH_PPUSIM_FRAMERATE 60 + +/** @brief pump tilemap from rom to ppu ram */ +void hh_ppu_load_tilemap(); //ppu sim? diff --git a/src/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); -- cgit v1.2.3 From 6cd57aed4fa4d8617c602a0efa4856ea58aa2e0e Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 10 Mar 2023 14:54:47 +0100 Subject: move pinout.md to schematic --- docs/hardware/.gitignore | 1 + docs/hardware/hardware.kicad_pcb | 2 + docs/hardware/hardware.kicad_prl | 77 ++ docs/hardware/hardware.kicad_pro | 332 ++++++ docs/hardware/hardware.kicad_sch | 2050 ++++++++++++++++++++++++++++++++++++++ pinout.md | 33 - 6 files changed, 2462 insertions(+), 33 deletions(-) create mode 100644 docs/hardware/.gitignore create mode 100644 docs/hardware/hardware.kicad_pcb create mode 100644 docs/hardware/hardware.kicad_prl create mode 100644 docs/hardware/hardware.kicad_pro create mode 100644 docs/hardware/hardware.kicad_sch delete mode 100644 pinout.md 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/pinout.md b/pinout.md deleted file mode 100644 index f4569d2..0000000 --- a/pinout.md +++ /dev/null @@ -1,33 +0,0 @@ -Pin layout - -| pin STM | function | -|---------|----------| -| PA5 / D13 | SPI clock | -| PA7 / D11 | SPI MOSI | -| PA9 / D8 | SPI cs | -| PB4 / D5 | button 1 | -| PB5 / D4 | button 2 | -| PB6 / D10 | button 3 | -| PB8 / D15 | button 4 | - -| pin FPGA | function | -|---------|----------| -| JB 7 | SPI clock | -| JB 8 | SPI data | -| JB 9 | SPI cs | - - - -constraints: - -set_property PACKAGE_PIN A15 [get_ports clkSPI] - -set_property PACKAGE_PIN C15 [get_ports csSPI] - -set_property PACKAGE_PIN A17 [get_ports dataSPI] - -set_property IOSTANDARD LVCMOS33 [get_ports dataSPI] - -set_property IOSTANDARD LVCMOS33 [get_ports csSPI] - -set_property IOSTANDARD LVCMOS33 [get_ports clkSPI] . -- cgit v1.2.3 From 80e2732c8f208f3f225a2a5c0e540bc50fceab5d Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 10 Mar 2023 16:09:10 +0100 Subject: top.vhdl --- basys3/basys3.srcs/io.xdc | 12 ++-- basys3/basys3.srcs/ppu.vhd | 10 ++- basys3/basys3.srcs/spi.vhd | 71 ++++++++++++++++++++ basys3/basys3.srcs/top.vhd | 164 +++++++++++++++++---------------------------- basys3/basys3.xpr | 22 +++++- 5 files changed, 163 insertions(+), 116 deletions(-) create mode 100644 basys3/basys3.srcs/spi.vhd diff --git a/basys3/basys3.srcs/io.xdc b/basys3/basys3.srcs/io.xdc index f254cdd..fa1dbd0 100644 --- a/basys3/basys3.srcs/io.xdc +++ b/basys3/basys3.srcs/io.xdc @@ -1,6 +1,6 @@ -set_property PACKAGE_PIN A15 [get_ports clkSPI] -set_property PACKAGE_PIN C15 [get_ports csSPI] -set_property PACKAGE_PIN A17 [get_ports dataSPI] -set_property IOSTANDARD LVCMOS33 [get_ports dataSPI] -set_property IOSTANDARD LVCMOS33 [get_ports csSPI] -set_property IOSTANDARD LVCMOS33 [get_ports clkSPI] \ No newline at end of file +set_property PACKAGE_PIN A15 [get_ports SPI_CLK] +set_property PACKAGE_PIN C15 [get_ports SPI_CS] +set_property PACKAGE_PIN A17 [get_ports SPI_MOSI] +set_property IOSTANDARD LVCMOS33 [get_ports SPI_MOSI] +set_property IOSTANDARD LVCMOS33 [get_ports SPI_CS] +set_property IOSTANDARD LVCMOS33 [get_ports SPI_CLK] diff --git a/basys3/basys3.srcs/ppu.vhd b/basys3/basys3.srcs/ppu.vhd index 9cf1bc0..d6407df 100644 --- a/basys3/basys3.srcs/ppu.vhd +++ b/basys3/basys3.srcs/ppu.vhd @@ -14,7 +14,7 @@ entity ppu is port( DATA : in std_logic_vector(PPU_RAM_BUS_DATA_WIDTH-1 downto 0); R,G,B : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0); NVSYNC, NHSYNC : out std_logic; -- native VGA out - TVSYNC, TVBLANK, THSYNC, THBLANK : out std_logic); -- tiny VGA out + TVBLANK, THBLANK : out std_logic); -- tiny VGA out end ppu; architecture Behavioral of ppu is @@ -189,7 +189,7 @@ architecture Behavioral of ppu is signal BG_SHIFT_X : std_logic_vector(PPU_POS_H_WIDTH-1 downto 0); signal BG_SHIFT_Y : std_logic_vector(PPU_POS_V_WIDTH-1 downto 0); signal FG_FETCH : std_logic; - signal TINY_VBLANK, TINY_VSYNC, TINY_HBLANK, TINY_HSYNC, + signal TINY_VBLANK, TINY_HBLANK, NATIVE_VSYNC, NATIVE_HSYNC : std_logic; begin SYSCLK <= CLK100; @@ -205,9 +205,7 @@ begin PAL_AI <= (others => '0'); TVBLANK <= TINY_VBLANK; - TVSYNC <= TINY_VSYNC; THBLANK <= TINY_HBLANK; - THSYNC <= TINY_HSYNC; NVSYNC <= NATIVE_VSYNC; NHSYNC <= NATIVE_HSYNC; @@ -334,9 +332,9 @@ begin RESET => SYSRST, X => X, Y => Y, - VSYNC => TINY_VSYNC, + VSYNC => open, VBLANK => TINY_VBLANK, - HSYNC => TINY_HSYNC, + HSYNC => open, HBLANK => TINY_HBLANK); native_vga_signal_generator : component ppu_vga_native port map( -- native vga signal generator (upscaler) diff --git a/basys3/basys3.srcs/spi.vhd b/basys3/basys3.srcs/spi.vhd new file mode 100644 index 0000000..cdf7d4a --- /dev/null +++ b/basys3/basys3.srcs/spi.vhd @@ -0,0 +1,71 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; +use ieee.std_logic_unsigned.all; +use work.ppu_consts.all; + +entity spi is port ( + SYSCLK : in std_logic; -- clock basys3 100MHz + SPI_CLK : in std_logic; -- incoming clock of SPI + SPI_MOSI : in std_logic; -- incoming data of SPI + SPI_CS : in std_logic; -- incoming select of SPI + DATA : out std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0)); -- data read +end spi; + +architecture Behavioral of spi is + signal PulseFF0,PulseFF1,PulseFF2,PulseFF3 : std_logic := '0'; -- signal for metastability synchronizer of clk SPI + signal dataFF0,dataFF1,dataFF2,dataFF3 : std_logic := '0'; -- signal for metastability synchronizer of data SPI + signal ssFF0,ssFF1,ssFF2,ssFF3 : std_logic := '0'; -- signal for metastability synchronizer of slave select SPI + + signal SPI_REG : std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0) := (others => '0'); -- signal to store incomming data of dataSPI (2x 8bit) + signal counter : integer := 23; -- counter for data position + signal enable : std_logic := '0'; -- enable signal if slave is selected +begin + + process (SYSCLK) + begin + if rising_edge(SYSCLK) then + -- flip flop for clk SPI to synchronise a + PulseFF0 <= SPI_CLK; + PulseFF1 <= PulseFF0; + PulseFF2 <= PulseFF1; + PulseFF3 <= PulseFF2; + -- flip flop for data SPI to synchronise + dataFF0 <= SPI_MOSI; + dataFF1 <= dataFF0; + dataFF2 <= dataFF1; + dataFF3 <= dataFF2; + -- flip flop for slave select SPI to synchronise + ssFF0 <= SPI_CS; + ssFF1 <= ssFF0; + ssFF2 <= ssFF1; + ssFF3 <= ssFF2; + -- check if slave select signal has falling edge (slave is selected by master) + if(ssFF3 = '1' and ssFF2 = '0') then + -- reset counter if true + counter <= 23; + -- disable data read if rising edge (slave is not selected) + elsif (ssFF3 = '0' and ssFF2 = '1') then + enable <= '0'; + end if; + -- check if synchronised slave select signal is falling edge or data read is enabled + if(ssFF3 = '1' and ssFF2 = '0') or enable = '1' then + enable <= '1'; -- enable data read + if (PulseFF3 = '0' and PulseFF2 = '1') then -- check for rising edge of clk SPI + if counter > -1 then + counter <= counter - 1; + -- data transfer into vector + SPI_REG(counter) <= dataFF3; + end if; + end if; + -- check if counter is done + if counter = -1 then + counter <= 23; -- reset counter + DATA <= SPI_REG; + end if; + elsif (enable = '0') then + -- DATA <= SPI_REG; + end if; + end if; + end process; +end Behavioral; diff --git a/basys3/basys3.srcs/top.vhd b/basys3/basys3.srcs/top.vhd index 7cf3e63..558489b 100644 --- a/basys3/basys3.srcs/top.vhd +++ b/basys3/basys3.srcs/top.vhd @@ -1,105 +1,63 @@ ----------------------------------------------------------------------------------- --- Company: --- Engineer: --- --- Create Date: 15.02.2023 21:09:16 --- Design Name: --- Module Name: top - Behavioral --- Project Name: --- Target Devices: --- Tool Versions: --- Description: --- --- Dependencies: --- --- Revision: --- Revision 0.01 - File Created --- Additional Comments: --- ----------------------------------------------------------------------------------- - - -library IEEE; -use IEEE.STD_LOGIC_1164.ALL; - --- Uncomment the following library declaration if using --- arithmetic functions with Signed or Unsigned values -use IEEE.NUMERIC_STD.ALL; -use IEEE.STD_LOGIC_UNSIGNED.ALL; --- Uncomment the following library declaration if instantiating --- any Xilinx leaf cells in this code. ---library UNISIM; ---use UNISIM.VComponents.all; - -entity spiSlave is - Port ( clkBoard : in std_logic; -- clock basys3 100MHz - clkSPI : in std_logic; -- incoming clock of SPI - dataSPI : in std_logic; -- incoming data of SPI - csSPI : in std_logic; -- incoming select of SPI - dataRead : out std_logic_vector(23 downto 0) := (others => '0') -- data read - - ); -end spiSlave; - -architecture Behavioral of spiSlave is - signal PulseFF0,PulseFF1,PulseFF2,PulseFF3 : std_logic := '0'; -- signal for metastability synchronizer of clk SPI - signal dataFF0,dataFF1,dataFF2,dataFF3 : std_logic := '0'; -- signal for metastability synchronizer of data SPI - signal ssFF0,ssFF1,ssFF2,ssFF3 : std_logic := '0'; -- signal for metastability synchronizer of slave select SPI - - signal data : std_logic_vector(23 downto 0) := (others => '0'); -- signal to store incomming data of dataSPI (2x 8bit) - signal counter : integer := 23; --counter for data position - signal enable : std_logic := '0'; -- enable signal if slave is selected +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; +use work.ppu_consts.all; + +entity top is port ( + SYSCLK : in std_logic; -- clock basys3 100MHz + RESET : in std_logic; -- global (async) system reset + SPI_CLK : in std_logic; -- incoming clock of SPI + SPI_MOSI : in std_logic; -- incoming data of SPI + SPI_CS : in std_logic; -- incoming select of SPI + WEN : in std_logic; -- PPU VRAM write enable + R,G,B : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0); + NVSYNC, NHSYNC : out std_logic; -- native VGA out + TVBLANK, THBLANK : out std_logic); -- tiny VGA out +end top; + +architecture Behavioral of top is + component ppu port( + CLK100 : in std_logic; -- system clock + RESET : in std_logic; -- global (async) system reset + EN : in std_logic; -- PPU VRAM enable (enable ADDR and DATA tri-state drivers) + WEN : in std_logic; -- PPU VRAM write enable + ADDR : in std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH-1 downto 0); -- PPU VRAM ADDR + DATA : in std_logic_vector(PPU_RAM_BUS_DATA_WIDTH-1 downto 0); + R,G,B : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0); + NVSYNC, NHSYNC : out std_logic; -- native VGA out + TVBLANK, THBLANK : out std_logic); -- tiny VGA out + end component; + component spi port ( + SYSCLK : in std_logic; -- clock basys3 100MHz + SPI_CLK : in std_logic; -- incoming clock of SPI + SPI_MOSI : in std_logic; -- incoming data of SPI + SPI_CS : in std_logic; -- incoming select of SPI + DATA : out std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0)); -- data read + end component; + + signal SPI_DATA : std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH+PPU_RAM_BUS_DATA_WIDTH-1 downto 0); + alias SPI_DATA_ADDR is SPI_DATA(31 downto 16); + alias SPI_DATA_DATA is SPI_DATA(15 downto 0); begin - - process (clkBoard) - begin - - if rising_edge(clkBoard) then - -- flip flop for clk SPI to synchronise a - PulseFF0 <= clkSPI; - PulseFF1 <= PulseFF0; - PulseFF2 <= PulseFF1; - PulseFF3 <= PulseFF2; - -- flip flop for data SPI to synchronise - dataFF0 <= dataSPI; - dataFF1 <= dataFF0; - dataFF2 <= dataFF1; - dataFF3 <= dataFF2; - -- flip flop for slave select SPI to synchronise - ssFF0 <= csSPI; - ssFF1 <= ssFF0; - ssFF2 <= ssFF1; - ssFF3 <= ssFF2; - -- check if slave select signal has falling edge (slave is selected by master) - if(ssFF3 = '1' and ssFF2 = '0') then - --reset counter if true - counter <= 23; - --disable data read if rising edge (slave is not selected) - elsif (ssFF3 = '0' and ssFF2 = '1') then - enable <= '0'; - end if; - --check if synchronised slave select signal is falling edge or data read is enabled - if(ssFF3 = '1' and ssFF2 = '0') or enable = '1' then - enable <= '1'; --enable data read - if (PulseFF3 = '0' and PulseFF2 = '1') then -- check for rising edge of clk SPI - if counter > -1 then - counter <= counter - 1; - -- data transfer into vector - data(counter) <= dataFF3; - end if; - end if; - --check if counter is done - if counter = -1 then - counter <= 23; --reset counter - dataRead <= data; - end if; - elsif (enable = '0') then - --dataRead <= data; - - end if; - - end if; - - end process; - + serial_peripheral_interface: component spi port map( + SYSCLK => SYSCLK, + SPI_CLK => SPI_CLK, + SPI_MOSI => SPI_MOSI, + SPI_CS => '1', + DATA => SPI_DATA); + + picture_processing_unit: component ppu port map( + CLK100 => SYSCLK, + RESET => RESET, + EN => '1', + WEN => WEN, + ADDR => SPI_DATA_ADDR, + DATA => SPI_DATA_DATA, + R => R, + G => G, + B => B, + NVSYNC => NVSYNC, + NHSYNC => NHSYNC, + TVBLANK => TVBLANK, + THBLANK => THBLANK); end Behavioral; diff --git a/basys3/basys3.xpr b/basys3/basys3.xpr index 4060a21..b4b83db 100644 --- a/basys3/basys3.xpr +++ b/basys3/basys3.xpr @@ -197,14 +197,32 @@ + + + + + + + + + + + + + + + + + + @@ -298,6 +316,7 @@ + @@ -311,6 +330,7 @@ + -- cgit v1.2.3 From 8670e4bb2bdaf46399830d9c4d413705ae01dc40 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Fri, 10 Mar 2023 16:32:50 +0100 Subject: ppusim read sprites from file and put into vram --- src/ppusim/sim.c | 25 +++++++++++++++++++++++- test/bin/test_file_read.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 test/bin/test_file_read.c diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 7d56d2d..1fceb82 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -1,9 +1,12 @@ #include #include #include +#include #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" @@ -26,7 +29,27 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - + char* filename = "tiles.bin"; + FILE* fp = fopen(filename,"rb"); + if (!fp){ + return;//error + } + + fseek(fp, 0, SEEK_END);//goto EOF + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + fseek(fp, 0, 0);//goto start of file + + for (int i = 0; i < _size; i++) { + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + + hh_s_ppu_vram_data sprite = hh_ppu_2nat_sprite(data); + sprite.offset = i*HH_PPU_VRAM_TMM_SPRITE_SIZE; + hh_ppu_vram_write(sprite); + free(sprite.data); + } + fclose(fp); } void hh_ppu_deinit() { diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c new file mode 100644 index 0000000..6357feb --- /dev/null +++ b/test/bin/test_file_read.c @@ -0,0 +1,48 @@ + +#include +#include +#include + + +#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() { + + //TODO: lees bestand in mem + char* filename = "tiles.bin"; + FILE* fp = fopen(filename,"rb"); + if (!fp){ + return;//error + } + + fseek(fp, 0, SEEK_END); + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + fseek(fp, 0, 0); + // printf("%i",_size); + for (int i = 0; i < _size; i++) { + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + // for (int i = 0; i < 255; i++) { + // buffer[i] = 0; //TODO: vullen + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + // } + + printData(data); + } + fclose(fp); + +} + + +int main(){ +hh_ppu_load_tilemap(); + return 0; +} -- cgit v1.2.3 From 148db0e330e158381bf2b5b39e139d75c55088b2 Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:36:21 +0100 Subject: Delete c_cpp_properties.json --- src/.vscode/c_cpp_properties.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/.vscode/c_cpp_properties.json diff --git a/src/.vscode/c_cpp_properties.json b/src/.vscode/c_cpp_properties.json deleted file mode 100644 index 359928d..0000000 --- a/src/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "configurations": [ - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [], - "compilerPath": "/usr/bin/gcc", - "cStandard": "c17", - "cppStandard": "c++14", - "intelliSenseMode": "linux-gcc-x64" - } - ], - "version": 4 -} \ No newline at end of file -- cgit v1.2.3 From 233b2e7a0743935db145f921dd49756248aaee58 Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:36:38 +0100 Subject: Delete settings.json --- src/.vscode/settings.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 src/.vscode/settings.json diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json deleted file mode 100644 index d485e2c..0000000 --- a/src/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "files.associations": { - "hh_entity.h": "c", - "maths.h": "c" - } -} \ No newline at end of file -- cgit v1.2.3 From a52a405cd9932abbc51713d75d3b91884820b081 Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:42:04 +0100 Subject: Delete tiles.bs --- test/bin/tiles.bs | 544 ------------------------------------------------------ 1 file changed, 544 deletions(-) delete mode 100644 test/bin/tiles.bs diff --git a/test/bin/tiles.bs b/test/bin/tiles.bs deleted file mode 100644 index 4452c2a..0000000 --- a/test/bin/tiles.bs +++ /dev/null @@ -1,544 +0,0 @@ -0000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0040: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0050: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0060: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0070: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0080: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0090: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0100: 29 29 29 29 29 28 29 29 29 29 29 28 29 29 29 29 -0110: 29 28 28 28 28 26 28 28 28 28 28 26 28 28 28 28 -0120: 29 28 27 27 27 26 28 28 28 28 28 26 28 28 28 28 -0130: 29 27 27 27 27 25 25 25 25 25 25 25 25 25 25 25 -0140: 29 27 27 27 27 25 25 26 26 26 26 26 26 25 26 26 -0150: 28 27 27 27 27 25 26 26 26 26 26 26 26 25 26 26 -0160: 28 27 27 27 27 25 26 26 26 26 26 26 26 25 26 26 -0170: 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 25 -0180: 29 29 27 27 27 27 27 25 25 25 26 26 26 26 25 25 -0190: 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -01a0: 28 27 27 27 27 27 27 25 25 26 26 26 26 26 26 25 -01b0: 28 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 -01c0: 01 28 27 27 27 27 27 27 25 25 26 26 26 26 26 26 -01d0: 01 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 -01e0: 01 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 -01f0: 29 29 29 28 28 28 25 25 25 25 25 25 25 25 25 25 -0200: 29 29 29 28 29 29 29 29 29 29 29 28 29 29 29 29 -0210: 28 28 28 26 28 28 28 28 28 28 28 26 28 28 28 28 -0220: 28 28 28 26 28 28 28 28 28 28 28 26 28 28 28 28 -0230: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0240: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -0250: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -0260: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -0270: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0280: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -0290: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -02a0: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -02b0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -02c0: 26 25 26 26 26 26 26 26 26 25 26 26 26 26 26 26 -02d0: 26 25 26 26 26 26 26 26 26 25 26 26 26 26 26 26 -02e0: 25 25 26 26 26 26 26 26 26 25 26 26 26 26 26 26 -02f0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0300: 29 29 29 28 29 29 29 29 29 29 28 29 29 29 29 29 -0310: 28 28 28 26 28 28 28 28 28 28 26 28 28 28 28 29 -0320: 28 28 28 26 28 28 28 28 28 28 26 27 27 28 28 29 -0330: 25 25 25 25 25 25 25 25 25 25 25 27 27 27 27 29 -0340: 26 26 26 26 26 25 26 26 26 26 25 27 27 27 27 29 -0350: 26 26 26 26 26 25 26 26 26 26 25 27 27 27 27 28 -0360: 26 26 26 26 26 25 26 26 26 26 25 27 27 27 27 28 -0370: 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 28 -0380: 26 26 26 26 26 26 26 25 27 27 27 27 27 28 28 01 -0390: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -03a0: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -03b0: 25 25 25 25 25 25 25 25 25 25 25 28 28 29 29 29 -03c0: 26 25 26 26 26 26 26 26 26 25 27 27 27 27 27 29 -03d0: 26 25 26 26 26 26 26 26 26 25 27 27 27 27 27 29 -03e0: 26 25 26 26 26 26 26 26 26 25 27 27 27 27 27 28 -03f0: 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 28 -0400: 29 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0410: 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0420: 28 27 27 27 27 27 27 25 25 26 26 26 26 26 25 25 -0430: 28 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 -0440: 01 28 27 27 27 26 25 26 26 26 26 26 26 25 26 26 -0450: 01 28 27 27 27 25 26 26 26 26 26 26 26 25 26 26 -0460: 01 27 27 27 27 25 26 26 26 26 26 25 25 25 25 26 -0470: 29 29 28 28 25 25 25 25 25 25 25 25 25 25 25 25 -0480: 29 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0490: 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -04a0: 28 27 27 27 27 27 27 25 25 26 26 26 26 26 26 25 -04b0: 28 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 -04c0: 01 28 28 27 27 27 27 26 25 26 26 26 26 26 26 26 -04d0: 01 28 27 27 27 27 27 27 25 25 26 26 26 26 26 26 -04e0: 01 28 27 27 27 27 27 27 25 25 26 26 26 26 26 26 -04f0: 01 28 26 26 26 26 26 25 25 25 25 25 25 25 25 25 -0500: 26 26 25 25 25 26 26 26 26 26 26 25 25 26 26 26 -0510: 26 26 26 25 26 26 26 26 26 26 26 25 26 26 26 26 -0520: 26 26 26 25 26 26 26 26 26 26 25 25 25 26 26 26 -0530: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0540: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -0550: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -0560: 26 26 26 26 26 25 26 26 26 26 26 26 25 25 25 26 -0570: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0580: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 25 25 -0590: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -05a0: 26 26 26 26 26 26 25 25 25 25 26 26 26 26 26 25 -05b0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -05c0: 25 25 25 26 26 26 26 26 26 25 26 26 26 26 26 26 -05d0: 26 25 26 26 26 26 26 26 26 25 26 26 26 26 26 26 -05e0: 26 25 26 26 26 26 26 26 25 25 25 26 26 26 26 26 -05f0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0600: 26 26 26 25 26 26 26 26 26 26 26 25 27 27 28 01 -0610: 26 26 26 25 26 26 26 26 26 26 26 25 27 27 28 01 -0620: 26 26 25 25 26 26 26 26 26 26 26 25 27 27 27 01 -0630: 25 25 25 25 25 25 25 25 25 25 25 25 25 29 29 29 -0640: 26 26 26 26 26 25 26 26 26 25 27 27 27 27 27 29 -0650: 26 26 26 26 26 25 26 26 26 25 27 27 27 27 27 28 -0660: 26 26 26 26 26 25 26 26 26 25 27 27 27 27 27 28 -0670: 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 28 -0680: 26 26 26 26 26 26 26 25 27 27 27 27 27 28 28 01 -0690: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -06a0: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -06b0: 25 25 25 25 25 25 25 25 25 25 25 26 26 29 29 29 -06c0: 26 25 26 26 26 26 26 26 26 25 27 27 27 27 27 29 -06d0: 26 25 26 26 26 26 26 26 26 25 27 27 27 27 27 28 -06e0: 26 25 26 26 26 26 26 26 26 25 27 27 27 27 27 28 -06f0: 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 28 -0700: 29 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0710: 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0720: 28 27 27 27 27 27 27 25 25 26 26 26 26 26 25 25 -0730: 28 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 -0740: 01 28 27 27 27 26 25 26 26 26 26 26 26 25 26 26 -0750: 01 28 27 27 27 25 26 26 26 26 26 26 26 25 26 26 -0760: 01 27 27 27 27 25 26 26 26 26 26 25 25 25 25 26 -0770: 29 29 28 28 25 25 25 25 25 25 25 25 25 25 25 25 -0780: 29 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0790: 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -07a0: 28 27 27 27 27 27 27 25 25 26 26 26 26 26 26 25 -07b0: 28 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 -07c0: 01 28 28 27 27 27 27 27 27 27 27 25 25 25 25 27 -07d0: 01 28 28 27 27 27 27 27 27 27 27 27 25 27 27 27 -07e0: 01 29 28 28 28 27 27 27 27 27 27 27 26 27 27 27 -07f0: 01 29 29 29 28 28 28 28 28 28 28 28 26 28 28 28 -0800: 26 26 25 25 25 26 26 26 26 26 26 25 25 26 26 26 -0810: 26 26 26 25 26 26 26 26 26 26 26 25 26 26 26 26 -0820: 26 26 26 25 26 26 26 26 26 26 25 25 25 26 26 26 -0830: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0840: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -0850: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -0860: 26 26 26 26 26 25 26 26 26 26 26 26 25 25 25 26 -0870: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0880: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 25 25 -0890: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -08a0: 26 26 26 26 26 26 25 25 25 25 26 26 26 26 26 25 -08b0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -08c0: 27 27 27 27 27 27 27 27 26 26 26 27 27 27 27 27 -08d0: 27 27 27 27 27 27 27 27 27 26 26 27 27 27 27 27 -08e0: 27 27 27 27 27 27 27 27 27 26 27 27 27 27 27 27 -08f0: 28 28 28 28 28 28 28 28 28 26 28 28 28 28 28 28 -0900: 26 26 26 25 26 26 26 26 26 26 26 25 27 27 28 01 -0910: 26 26 26 25 26 26 26 26 26 26 26 25 27 27 28 01 -0920: 26 26 25 25 26 26 26 26 26 26 26 25 27 27 27 01 -0930: 25 25 25 25 25 25 25 25 25 25 25 25 25 29 29 29 -0940: 26 26 26 26 26 25 26 26 26 25 27 27 27 27 27 29 -0950: 26 26 26 26 26 25 26 26 26 25 27 27 27 27 27 28 -0960: 26 26 26 26 26 25 26 26 26 25 27 27 27 27 27 28 -0970: 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 28 -0980: 26 26 26 26 26 26 26 25 27 27 27 27 27 28 28 01 -0990: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -09a0: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -09b0: 25 25 25 25 25 25 26 26 26 26 26 26 26 29 29 29 -09c0: 27 27 26 26 26 27 27 27 27 27 27 27 27 27 28 29 -09d0: 27 27 27 26 26 27 27 27 27 27 27 27 27 28 28 28 -09e0: 27 27 27 26 27 27 27 27 27 27 27 28 28 28 28 29 -09f0: 28 28 28 26 28 28 28 28 28 28 28 28 28 29 29 29 -0a00: 29 29 29 29 29 28 29 29 29 29 29 28 29 29 29 29 -0a10: 29 28 28 28 28 26 28 28 28 28 28 26 28 28 28 28 -0a20: 29 28 27 27 27 26 28 28 28 28 28 26 28 28 28 28 -0a30: 29 27 27 27 27 25 25 25 25 25 25 25 25 25 25 25 -0a40: 29 27 27 27 27 25 25 26 26 26 26 26 26 25 26 26 -0a50: 28 27 27 27 27 25 26 26 26 26 26 26 26 25 26 26 -0a60: 28 27 27 27 27 25 26 26 26 26 26 26 26 25 26 26 -0a70: 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 25 -0a80: 29 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0a90: 28 27 27 27 27 27 27 25 26 26 26 26 26 26 26 25 -0aa0: 28 27 27 27 27 27 27 25 25 26 26 26 26 26 26 25 -0ab0: 28 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 -0ac0: 01 28 28 27 27 27 27 27 27 27 27 25 25 25 25 27 -0ad0: 01 28 28 27 27 27 27 27 27 27 27 27 25 27 27 27 -0ae0: 01 29 28 28 28 27 27 27 27 27 27 27 26 27 27 27 -0af0: 01 29 29 29 28 28 28 28 28 28 28 28 26 28 28 28 -0b00: 29 29 29 28 29 29 29 29 29 29 29 28 29 29 29 29 -0b10: 28 28 28 26 28 28 28 28 28 28 28 26 28 28 28 28 -0b20: 28 28 28 26 28 28 28 28 28 28 28 26 28 28 28 28 -0b30: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0b40: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -0b50: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -0b60: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -0b70: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0b80: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 25 25 -0b90: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -0ba0: 26 26 26 26 26 26 25 25 25 25 26 26 26 26 26 25 -0bb0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -0bc0: 27 27 27 27 27 27 27 27 26 26 26 27 27 27 27 27 -0bd0: 27 27 27 27 27 27 27 27 27 26 26 27 27 27 27 27 -0be0: 27 27 27 27 27 27 27 27 27 26 27 27 27 27 27 27 -0bf0: 28 28 28 28 28 28 28 28 28 26 28 28 28 28 28 28 -0c00: 29 29 29 28 29 29 29 29 29 29 28 29 29 29 29 29 -0c10: 28 28 28 26 28 28 28 28 28 28 26 28 28 28 28 29 -0c20: 28 28 28 26 28 28 28 28 28 28 26 27 27 28 28 29 -0c30: 25 25 25 25 25 25 25 25 25 25 25 27 27 27 27 29 -0c40: 26 26 26 26 26 25 26 26 26 26 25 27 27 27 27 29 -0c50: 26 26 26 26 26 25 26 26 26 26 25 27 27 27 27 28 -0c60: 26 26 26 26 26 25 26 26 26 26 25 27 27 27 27 28 -0c70: 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 28 -0c80: 26 26 26 26 26 26 26 25 27 27 27 27 27 28 28 01 -0c90: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -0ca0: 26 26 26 26 26 26 26 25 27 27 27 27 27 27 28 01 -0cb0: 25 25 25 25 25 25 26 26 26 26 26 26 26 29 29 29 -0cc0: 27 27 26 26 26 27 27 27 27 27 27 27 27 27 28 29 -0cd0: 27 27 27 26 26 27 27 27 27 27 27 27 27 28 28 28 -0ce0: 27 27 27 26 27 27 27 27 27 27 27 28 28 28 28 29 -0cf0: 28 28 28 26 28 28 28 28 28 28 28 28 28 29 29 29 -0d00: 29 29 29 29 29 28 29 29 29 29 28 29 29 29 29 29 -0d10: 29 28 28 28 28 26 28 28 28 28 26 28 28 28 28 29 -0d20: 29 28 27 27 27 26 28 28 28 28 26 27 27 28 28 29 -0d30: 29 27 27 27 27 25 25 25 25 25 25 27 27 27 27 29 -0d40: 29 27 27 27 27 25 25 26 26 26 25 27 27 27 27 29 -0d50: 28 27 27 27 27 25 26 26 26 26 25 27 27 27 27 28 -0d60: 28 27 27 27 27 25 26 26 26 26 25 27 27 27 27 28 -0d70: 26 26 26 26 26 25 25 25 25 25 25 26 26 26 26 28 -0d80: 29 29 27 27 27 27 27 25 27 27 27 27 27 28 28 01 -0d90: 28 27 27 27 27 27 27 25 27 27 27 27 27 27 28 01 -0da0: 28 27 27 27 27 27 27 25 27 27 27 27 27 27 28 01 -0db0: 28 26 26 26 26 26 25 25 25 25 25 28 28 29 29 29 -0dc0: 01 28 27 27 27 27 27 27 26 25 27 27 27 27 27 29 -0dd0: 01 28 27 27 27 27 27 27 26 25 27 27 27 27 27 29 -0de0: 01 28 27 27 27 27 27 27 26 25 27 27 27 27 27 28 -0df0: 29 29 29 28 28 28 25 25 25 25 25 25 26 26 26 28 -0e00: 29 27 27 27 27 27 27 25 26 26 26 25 27 27 28 01 -0e10: 28 27 27 27 27 27 27 25 26 26 26 25 27 27 28 01 -0e20: 28 27 27 27 27 27 27 25 26 26 26 25 27 27 27 01 -0e30: 28 26 26 26 26 26 25 25 25 25 25 25 25 29 29 29 -0e40: 01 28 27 27 27 26 25 26 26 25 27 27 27 27 27 29 -0e50: 01 28 27 27 27 25 26 26 26 25 27 27 27 27 27 28 -0e60: 01 27 27 27 27 25 26 26 26 25 26 27 27 27 27 28 -0e70: 29 29 28 28 25 25 25 25 25 25 25 26 26 26 26 28 -0e80: 29 27 27 27 27 27 27 25 27 27 27 27 27 28 28 01 -0e90: 28 27 27 27 27 27 27 25 27 27 27 27 27 27 28 01 -0ea0: 28 27 27 27 27 27 27 25 27 27 27 27 27 27 28 01 -0eb0: 28 26 26 26 26 26 25 25 25 25 25 26 26 29 29 29 -0ec0: 01 28 28 27 27 27 26 26 26 26 26 27 27 27 27 29 -0ed0: 01 28 27 27 27 27 26 26 26 26 27 27 27 27 27 28 -0ee0: 01 28 27 27 27 26 26 26 26 26 27 27 27 27 27 28 -0ef0: 01 28 26 26 26 26 26 25 25 25 25 25 26 26 26 28 -0f00: 29 27 27 27 27 27 27 25 26 26 26 25 27 27 28 01 -0f10: 28 27 27 27 27 27 27 25 26 26 26 25 27 27 28 01 -0f20: 28 27 27 27 27 27 27 25 26 26 26 25 27 27 27 01 -0f30: 28 26 26 26 26 26 25 25 25 25 25 25 25 29 29 29 -0f40: 01 28 27 27 27 26 25 26 26 25 27 27 27 27 27 29 -0f50: 01 28 27 27 27 25 26 26 26 25 27 27 27 27 27 28 -0f60: 01 27 27 27 27 25 26 26 26 25 27 27 27 27 27 28 -0f70: 29 29 28 28 25 25 25 25 25 25 25 26 26 26 26 28 -0f80: 29 27 27 27 27 27 27 25 27 27 27 27 27 28 28 01 -0f90: 28 27 27 27 27 27 27 25 27 27 27 27 27 27 28 01 -0fa0: 28 27 27 27 27 27 27 25 27 27 27 27 27 27 28 01 -0fb0: 28 26 26 26 26 26 25 25 26 26 26 26 26 29 29 29 -0fc0: 01 28 28 27 27 27 27 27 27 27 27 27 27 27 28 29 -0fd0: 01 28 28 27 27 27 27 27 27 27 27 27 27 28 28 28 -0fe0: 01 29 28 28 28 27 27 27 27 27 27 28 28 28 28 29 -0ff0: 01 29 29 29 28 28 28 28 28 28 28 28 28 29 29 29 -1000: 26 26 25 25 25 26 26 26 26 26 26 25 25 26 26 26 -1010: 26 26 26 25 26 26 26 26 26 26 26 25 26 26 26 26 -1020: 26 26 26 25 26 26 26 26 26 26 25 25 25 26 26 26 -1030: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1040: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -1050: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -1060: 26 26 26 26 26 25 26 26 26 26 26 26 25 25 25 26 -1070: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1080: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 25 25 -1090: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -10a0: 26 26 26 26 26 26 25 25 25 25 26 26 26 26 26 25 -10b0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -10c0: 25 25 25 26 26 26 26 26 26 25 26 26 26 27 27 27 -10d0: 26 25 26 26 26 26 26 26 26 25 26 26 27 27 27 27 -10e0: 26 25 26 26 26 26 26 26 25 25 25 26 27 27 27 27 -10f0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1100: 26 26 25 25 25 26 26 26 26 26 26 25 25 26 26 26 -1110: 26 26 26 25 26 26 26 26 26 26 26 25 26 26 26 26 -1120: 26 26 26 25 26 26 26 26 26 26 25 25 25 26 26 26 -1130: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1140: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -1150: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -1160: 26 26 26 26 26 25 26 26 26 26 26 26 25 25 25 26 -1170: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1180: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 25 25 -1190: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -11a0: 26 26 26 26 26 26 25 25 25 25 26 26 26 26 26 25 -11b0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -11c0: 25 25 25 26 26 26 26 26 26 25 26 26 26 26 26 26 -11d0: 27 25 27 27 26 26 26 26 26 25 26 26 26 26 26 26 -11e0: 27 25 27 27 26 26 26 26 25 25 25 26 26 26 26 26 -11f0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1200: 26 26 25 25 25 26 26 26 26 26 26 25 25 28 28 28 -1210: 26 26 26 25 26 26 26 26 26 26 26 25 26 28 28 28 -1220: 26 26 26 25 26 26 26 26 26 26 25 25 25 26 28 28 -1230: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1240: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -1250: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -1260: 26 26 26 26 26 25 26 26 26 26 26 26 25 25 25 26 -1270: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1280: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 25 25 -1290: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -12a0: 26 26 26 26 26 26 25 25 25 25 26 26 26 26 26 25 -12b0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -12c0: 25 25 25 26 26 26 26 26 26 25 26 26 26 26 26 26 -12d0: 26 25 26 26 26 26 26 26 26 25 26 26 26 26 26 26 -12e0: 26 25 26 26 26 26 26 26 25 25 25 26 26 26 26 26 -12f0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1300: 28 28 25 25 25 26 26 26 26 26 26 25 25 26 26 26 -1310: 28 28 28 25 26 26 26 26 26 26 26 25 26 26 26 26 -1320: 28 28 26 25 26 26 26 26 26 26 25 25 25 26 26 26 -1330: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1340: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 26 -1350: 26 26 26 26 26 25 26 26 26 26 26 26 26 25 26 26 -1360: 26 26 26 26 26 25 26 26 26 26 26 26 25 25 25 26 -1370: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1380: 25 26 26 26 26 26 26 25 26 26 26 26 26 26 25 25 -1390: 26 26 26 26 26 26 26 25 26 26 26 26 26 26 26 25 -13a0: 26 26 26 26 26 26 25 25 25 25 26 26 26 26 26 25 -13b0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -13c0: 25 25 25 26 26 26 26 26 26 25 26 26 26 26 26 26 -13d0: 26 25 26 26 26 26 26 26 26 25 26 26 26 26 26 26 -13e0: 26 25 26 26 26 26 26 26 25 25 25 26 26 26 26 26 -13f0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1400: 26 26 25 25 24 25 25 25 25 25 24 24 24 24 24 24 -1410: 26 26 26 24 25 25 25 25 25 25 24 24 24 24 24 24 -1420: 26 26 25 24 25 25 25 25 25 25 24 24 24 24 24 24 -1430: 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1440: 25 25 25 25 24 24 25 25 25 25 24 24 24 24 24 24 -1450: 25 25 25 25 25 24 25 25 25 25 24 24 24 24 24 24 -1460: 25 25 25 25 25 24 25 25 25 25 24 24 24 24 24 24 -1470: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1480: 24 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 -1490: 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 -14a0: 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 -14b0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -14c0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -14d0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -14e0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -14f0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1500: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1510: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1520: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1530: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1540: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1550: 24 24 24 24 24 24 24 24 25 25 25 25 25 24 25 25 -1560: 24 24 24 24 24 24 24 25 25 25 25 25 24 24 24 25 -1570: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1580: 24 24 24 24 24 24 24 24 25 25 25 25 25 25 24 24 -1590: 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 24 -15a0: 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 24 -15b0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 -15c0: 24 24 24 24 24 25 25 25 25 24 25 25 25 26 26 26 -15d0: 24 24 24 24 25 25 25 25 25 24 25 25 26 26 26 26 -15e0: 24 24 24 24 25 25 25 25 24 24 24 26 26 26 26 26 -15f0: 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 -1600: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1610: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1620: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1630: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1640: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1650: 25 25 25 25 25 24 25 25 25 25 24 24 24 24 24 24 -1660: 25 25 25 25 25 24 25 25 25 25 25 24 24 24 24 25 -1670: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1680: 24 25 25 25 25 25 25 24 25 25 25 25 25 25 24 24 -1690: 25 25 25 25 25 25 25 24 25 25 25 25 25 25 25 24 -16a0: 25 25 25 25 25 25 24 24 24 24 25 25 25 25 25 24 -16b0: 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 -16c0: 25 25 25 26 26 25 25 25 25 24 25 25 26 26 26 26 -16d0: 26 25 26 26 26 26 26 26 26 25 26 26 26 26 26 26 -16e0: 26 25 26 26 26 26 26 26 25 25 25 26 26 26 26 26 -16f0: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1700: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1710: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1720: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1730: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1740: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1750: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1760: 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 -1770: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1780: 24 25 25 25 25 25 25 24 25 25 24 24 24 24 24 24 -1790: 25 25 25 25 25 25 25 24 25 25 24 24 24 24 24 24 -17a0: 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 -17b0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -17c0: 25 24 24 25 25 25 25 25 25 24 24 24 24 24 24 24 -17d0: 26 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 -17e0: 26 25 26 25 25 25 25 25 24 24 24 24 24 24 24 24 -17f0: 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 -1800: 24 24 24 24 24 25 25 25 25 25 26 25 25 26 26 26 -1810: 24 24 24 24 25 25 25 25 25 25 26 25 26 26 26 26 -1820: 24 24 24 24 25 25 25 25 25 25 25 25 25 26 26 26 -1830: 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 -1840: 24 24 24 24 24 24 25 25 25 25 26 26 26 25 26 26 -1850: 24 24 24 24 24 24 25 25 25 25 26 26 26 25 26 26 -1860: 24 24 24 24 24 24 25 25 25 25 26 26 25 25 25 26 -1870: 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 -1880: 24 24 24 24 25 25 25 24 25 25 26 26 26 26 25 25 -1890: 24 24 24 25 25 25 25 24 25 25 25 26 26 26 26 25 -18a0: 24 24 24 25 25 25 24 24 24 24 25 25 26 26 26 25 -18b0: 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 -18c0: 24 24 24 25 25 25 25 25 25 24 26 26 26 26 26 26 -18d0: 24 24 24 24 25 25 25 25 25 24 26 26 26 26 26 26 -18e0: 24 24 24 24 25 25 25 25 24 24 25 26 26 26 26 26 -18f0: 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 -1900: 26 26 25 25 25 25 25 25 25 24 24 24 24 24 24 24 -1910: 26 26 26 25 26 25 25 25 25 24 24 24 24 24 24 24 -1920: 26 26 26 25 26 25 25 25 25 24 24 24 24 24 24 24 -1930: 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 -1940: 26 26 26 26 25 24 25 25 25 24 24 24 24 24 24 24 -1950: 26 26 26 26 26 24 25 25 25 24 24 24 24 24 24 24 -1960: 26 26 26 26 26 24 25 25 24 24 24 24 24 24 24 24 -1970: 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 -1980: 25 26 26 26 25 25 25 24 24 24 24 24 24 24 24 24 -1990: 26 26 26 26 25 25 25 24 24 24 24 24 24 24 24 24 -19a0: 26 26 26 26 26 25 24 24 24 24 24 24 24 24 24 24 -19b0: 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 -19c0: 25 25 25 26 26 25 25 25 25 24 24 24 24 24 24 24 -19d0: 26 25 26 26 26 25 25 25 25 24 24 24 24 24 24 24 -19e0: 26 25 26 26 26 25 25 25 24 24 24 24 24 24 24 24 -19f0: 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 -1a00: 24 24 24 24 24 25 25 25 25 25 26 25 25 26 26 26 -1a10: 24 24 24 24 25 25 25 25 25 25 25 25 26 26 26 26 -1a20: 24 24 24 24 25 25 25 25 25 25 24 24 25 26 26 26 -1a30: 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 -1a40: 24 24 24 24 24 24 25 25 25 25 25 25 25 24 26 26 -1a50: 24 24 24 24 24 24 24 25 25 25 25 25 25 24 25 25 -1a60: 24 24 24 24 24 24 24 25 25 25 25 25 24 24 24 25 -1a70: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1a80: 24 24 24 24 24 24 24 24 25 25 25 25 25 25 24 24 -1a90: 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 24 -1aa0: 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 24 -1ab0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1ac0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1ad0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1ae0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1af0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1b00: 26 26 25 25 25 26 26 26 26 26 26 25 25 26 26 26 -1b10: 26 26 26 25 26 26 26 26 26 26 26 25 26 26 26 26 -1b20: 26 26 26 25 26 26 26 26 26 26 25 25 25 26 26 26 -1b30: 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 -1b40: 26 26 26 26 25 25 26 26 26 26 26 26 26 25 26 25 -1b50: 25 25 25 25 25 24 25 25 25 25 25 25 25 24 25 25 -1b60: 25 25 25 25 25 24 25 25 25 25 25 25 24 24 24 25 -1b70: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1b80: 24 25 25 25 25 25 25 24 25 25 25 25 25 25 24 24 -1b90: 25 25 25 25 25 25 25 24 25 25 25 25 25 25 25 24 -1ba0: 25 25 25 25 25 25 24 24 24 24 25 25 25 25 25 24 -1bb0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1bc0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1bd0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1be0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1bf0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1c00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1c10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1c20: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1c30: 01 01 01 01 01 1b 1b 1b 1b 1b 1b 01 01 01 01 01 -1c40: 01 01 01 01 01 1b 01 01 01 01 1b 01 01 01 01 01 -1c50: 01 01 01 01 01 01 01 01 01 01 1b 01 01 01 01 01 -1c60: 01 01 01 01 01 01 01 01 01 01 1b 01 01 01 01 01 -1c70: 01 01 01 01 01 01 01 01 01 1b 1b 01 01 01 01 01 -1c80: 01 01 01 01 01 01 01 01 1b 1b 01 01 01 01 01 01 -1c90: 01 01 01 01 01 01 01 1b 1b 01 01 01 01 01 01 01 -1ca0: 01 01 01 01 01 01 01 1b 01 01 01 01 01 01 01 01 -1cb0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1cc0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1cd0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1ce0: 01 01 01 01 01 01 01 1b 01 01 01 01 01 01 01 01 -1cf0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1d00: 01 01 01 01 01 01 01 1b 1b 1b 01 01 01 01 01 01 -1d10: 01 01 01 01 01 01 1b 1b 1b 1b 1b 01 01 01 01 01 -1d20: 01 01 01 01 01 1b 1b 1b 1b 1b 1b 1b 01 01 01 01 -1d30: 01 01 01 01 01 1b 1b 1b 1b 1b 1b 1b 01 01 01 01 -1d40: 01 01 01 01 01 1b 1b 1b 1b 1b 1b 1b 01 01 01 01 -1d50: 01 01 01 01 01 1b 1b 1b 1b 1b 1b 1b 01 01 01 01 -1d60: 01 01 01 01 01 1b 1b 1b 1b 1b 1b 1b 01 01 01 01 -1d70: 01 01 01 01 01 01 1b 1b 1b 1b 1b 01 01 01 01 01 -1d80: 01 01 01 01 01 01 1b 1b 1b 1b 1b 01 01 01 01 01 -1d90: 01 01 01 01 01 01 01 1b 1b 1b 01 01 01 01 01 01 -1da0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1db0: 01 01 01 01 01 01 01 1b 1b 1b 01 01 01 01 01 01 -1dc0: 01 01 01 01 01 01 1b 1b 1b 1b 1b 01 01 01 01 01 -1dd0: 01 01 01 01 01 01 1b 1b 1b 1b 1b 01 01 01 01 01 -1de0: 01 01 01 01 01 01 1b 1b 1b 1b 1b 01 01 01 01 01 -1df0: 01 01 01 01 01 01 01 1b 1b 1b 01 01 01 01 01 01 -1e00: 09 09 09 08 08 09 09 09 09 09 09 09 08 08 09 09 -1e10: 09 08 08 08 09 09 08 08 07 09 09 08 08 07 07 07 -1e20: 09 08 07 07 09 08 08 07 07 06 09 08 08 07 07 09 -1e30: 08 08 07 06 08 08 08 07 07 06 09 08 07 07 08 09 -1e40: 07 06 06 08 06 06 07 07 07 06 06 08 07 08 08 08 -1e50: 06 08 08 08 08 06 06 07 06 06 08 06 08 08 08 07 -1e60: 08 07 07 08 08 08 06 06 06 08 08 07 06 07 07 07 -1e70: 06 06 07 07 07 08 08 06 08 08 07 07 06 06 06 06 -1e80: 24 24 06 07 07 07 06 07 07 07 07 06 06 24 24 24 -1e90: 24 24 24 06 06 06 06 06 07 06 06 24 24 24 24 24 -1ea0: 24 24 24 24 24 24 24 24 06 24 24 24 24 24 24 24 -1eb0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1ec0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1ed0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1ee0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1ef0: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 -1f00: 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e -1f10: 0d 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0d -1f20: 0d 0d 0d 0e 12 12 12 12 12 12 12 12 0e 0d 0d 0d -1f30: 0d 0d 13 0d 0e 12 12 12 12 12 12 0e 0d 13 0d 0d -1f40: 0d 0d 12 13 0d 0e 12 12 12 12 0e 0d 13 12 0d 0d -1f50: 0d 0d 12 12 13 0d 0e 12 12 0e 0d 13 12 12 0d 0d -1f60: 0d 0d 12 12 12 13 0d 0e 0e 0d 13 12 12 12 0d 0d -1f70: 0d 0d 12 12 12 12 13 0d 0d 13 12 12 12 12 0d 0d -1f80: 0d 0d 12 12 12 12 0e 0d 0d 0e 12 12 12 12 0d 0d -1f90: 0d 0d 12 12 12 0e 0d 13 13 0d 0e 12 12 12 0d 0d -1fa0: 0d 0d 12 12 0e 0d 13 12 12 13 0d 0e 12 12 0d 0d -1fb0: 0d 0d 12 0e 0d 13 12 12 12 12 13 0d 0e 12 0d 0d -1fc0: 0d 0d 0e 0d 13 12 12 12 12 12 12 13 0d 0e 0d 0d -1fd0: 0d 0d 0d 13 12 12 12 12 12 12 12 12 13 0d 0d 0d -1fe0: 0d 13 13 13 13 13 13 13 13 13 13 13 13 13 13 0d -1ff0: 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 -2000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -2010: 01 01 2d 2d 2d 2d 2d 01 01 01 2d 2d 2d 01 01 01 -2020: 01 01 01 01 2d 01 01 01 01 2d 01 01 01 2d 01 01 -2030: 01 01 01 01 2d 01 01 01 01 2d 01 01 01 2d 01 01 -2040: 01 01 01 01 2d 01 01 01 01 2d 01 01 01 2d 01 01 -2050: 01 01 01 01 2d 01 01 01 01 2d 01 01 01 2d 01 01 -2060: 01 01 01 01 2d 01 01 01 01 01 2d 2d 2d 01 01 01 -2070: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -2080: 01 01 2d 2d 2d 2d 01 01 01 01 2d 2d 2d 01 01 01 -2090: 01 01 2d 01 01 01 2d 01 01 2d 01 01 01 2d 01 01 -20a0: 01 01 2d 01 01 01 2d 01 01 2d 01 01 01 2d 01 01 -20b0: 01 01 2d 01 01 01 2d 01 01 2d 01 01 01 2d 01 01 -20c0: 01 01 2d 01 01 01 2d 01 01 2d 01 01 01 2d 01 01 -20d0: 01 01 2d 2d 2d 2d 01 01 01 01 2d 2d 2d 01 01 01 -20e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -20f0: 01 01 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 01 -2100: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -2110: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -2120: 01 01 01 01 01 01 17 17 17 17 01 01 01 01 01 01 -2130: 01 01 01 01 17 17 17 17 17 17 17 17 01 01 01 01 -2140: 01 01 01 17 17 17 16 17 16 17 17 17 17 01 01 01 -2150: 01 01 01 17 17 17 15 15 15 15 17 17 17 01 01 01 -2160: 01 01 17 17 17 15 16 17 16 17 17 17 17 17 01 01 -2170: 01 01 17 17 17 15 16 17 16 17 17 17 17 17 01 01 -2180: 01 01 17 17 17 15 16 17 16 17 17 17 17 17 01 01 -2190: 01 01 17 17 17 15 16 17 16 17 17 17 17 17 01 01 -21a0: 01 01 01 17 17 17 15 15 15 15 17 17 17 01 01 01 -21b0: 01 01 01 17 17 17 16 17 16 17 17 17 17 01 01 01 -21c0: 01 01 01 01 17 17 17 17 17 17 17 17 01 01 01 01 -21d0: 01 01 01 01 01 01 17 17 17 17 01 01 01 01 01 01 -21e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -21f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -- cgit v1.2.3 From 635f67120132f840c825b9f9b5f4fdf2a6f250ef Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:42:33 +0100 Subject: removed TODO --- test/bin/test_file_read.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c index 6357feb..e9ece4d 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -16,8 +16,6 @@ void printData(uint8_t* in) { } void hh_ppu_load_tilemap() { - - //TODO: lees bestand in mem char* filename = "tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ -- cgit v1.2.3 From 877ac831461f35d00e0e0ab7d6afbe93768fc7c6 Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:42:59 +0100 Subject: Update test_file_read.c --- test/bin/test_file_read.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c index e9ece4d..b3357ce 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -28,10 +28,7 @@ void hh_ppu_load_tilemap() { // printf("%i",_size); for (int i = 0; i < _size; i++) { uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; - // for (int i = 0; i < 255; i++) { - // buffer[i] = 0; //TODO: vullen - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); - // } + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); printData(data); } -- cgit v1.2.3 From adde3c22fa09092d238b165b2a65e5bfa48f00ea Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Fri, 10 Mar 2023 16:43:16 +0100 Subject: removed TODO --- test/bin/test_file_read.c | 1 - 1 file changed, 1 deletion(-) diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c index 6357feb..503601b 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -17,7 +17,6 @@ void printData(uint8_t* in) { void hh_ppu_load_tilemap() { - //TODO: lees bestand in mem char* filename = "tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ -- cgit v1.2.3 From c9ef075fbbb57f9968fbce39b12fbd82a89e7ef6 Mon Sep 17 00:00:00 2001 From: NielsCoding <101340368+NielsCoding@users.noreply.github.com> Date: Sat, 11 Mar 2023 09:32:11 +0100 Subject: moved files --- src/engine/TODO/draw_screen.h | 1 - src/engine/TODO/level.h | 4 ---- src/engine/TODO/maths.h | 17 ----------------- src/engine/draw_screen.h | 1 + src/engine/level.h | 4 ++++ src/engine/maths.h | 17 +++++++++++++++++ 6 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 src/engine/TODO/draw_screen.h delete mode 100644 src/engine/TODO/level.h delete mode 100644 src/engine/TODO/maths.h create mode 100644 src/engine/draw_screen.h create mode 100644 src/engine/level.h create mode 100644 src/engine/maths.h diff --git a/src/engine/TODO/draw_screen.h b/src/engine/TODO/draw_screen.h deleted file mode 100644 index f5d7507..0000000 --- a/src/engine/TODO/draw_screen.h +++ /dev/null @@ -1 +0,0 @@ -// every function call for drawing the screen goes here. diff --git a/src/engine/TODO/level.h b/src/engine/TODO/level.h deleted file mode 100644 index 09f77e7..0000000 --- a/src/engine/TODO/level.h +++ /dev/null @@ -1,4 +0,0 @@ -//deal with loading/saving the correct level - -/** @brief */ -void hh_map_load(); diff --git a/src/engine/TODO/maths.h b/src/engine/TODO/maths.h deleted file mode 100644 index c7f1b44..0000000 --- a/src/engine/TODO/maths.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once -#include -// #include - -typedef struct { - uint32_t x,y; -} vec2; - -typedef vec2 vec_cen;//centered -typedef vec2 vec_cor;//left upper corner - -//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/draw_screen.h b/src/engine/draw_screen.h new file mode 100644 index 0000000..f5d7507 --- /dev/null +++ b/src/engine/draw_screen.h @@ -0,0 +1 @@ +// every function call for drawing the screen goes here. diff --git a/src/engine/level.h b/src/engine/level.h new file mode 100644 index 0000000..09f77e7 --- /dev/null +++ b/src/engine/level.h @@ -0,0 +1,4 @@ +//deal with loading/saving the correct level + +/** @brief */ +void hh_map_load(); diff --git a/src/engine/maths.h b/src/engine/maths.h new file mode 100644 index 0000000..c7f1b44 --- /dev/null +++ b/src/engine/maths.h @@ -0,0 +1,17 @@ +#pragma once +#include +// #include + +typedef struct { + uint32_t x,y; +} vec2; + +typedef vec2 vec_cen;//centered +typedef vec2 vec_cor;//left upper corner + +//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)) -- cgit v1.2.3 From f4e4b53fe3ef96a7bd2d4052c5a181f05945a0aa Mon Sep 17 00:00:00 2001 From: NielsCoding <101340368+NielsCoding@users.noreply.github.com> Date: Sat, 11 Mar 2023 11:16:50 +0100 Subject: makefile engine --- src/engine/draw_screen.h | 8 ++++++++ src/engine/engine.c | 3 +++ src/engine/level.h | 1 + src/makefile | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/engine/engine.c diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index f5d7507..4af5865 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -1 +1,9 @@ +#pragma once + + // every function call for drawing the screen goes here. +#include "engine/maths.h" + +#include +uint16_t hh_world_to_tile(vec2 pos); +void hh_draw_screen(vec2 viewport); \ No newline at end of file diff --git a/src/engine/engine.c b/src/engine/engine.c new file mode 100644 index 0000000..f3410a4 --- /dev/null +++ b/src/engine/engine.c @@ -0,0 +1,3 @@ +#include "engine/draw_screen.h" +#include "engine/level.h" +#include "engine/maths.h" diff --git a/src/engine/level.h b/src/engine/level.h index 09f77e7..8d610dd 100644 --- a/src/engine/level.h +++ b/src/engine/level.h @@ -1,3 +1,4 @@ +#pragma once //deal with loading/saving the correct level /** @brief */ diff --git a/src/makefile b/src/makefile index c69bfb5..96751fb 100644 --- a/src/makefile +++ b/src/makefile @@ -30,7 +30,8 @@ CFLAGS += $(if $(DESKTOP), -DHH_TARGET_DESKTOP, ) LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ - demo.c + demo.c \ + engine/engine.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) -- cgit v1.2.3 From 311850396060dbd2b6d716d69bd98af44ee69164 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sat, 11 Mar 2023 12:08:52 +0100 Subject: C: --- src/engine/TODO/sprite_controller.h | 6 ------ src/engine/sprite_controller.c | 0 src/engine/sprite_controller.h | 8 ++++++++ 3 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 src/engine/TODO/sprite_controller.h create mode 100644 src/engine/sprite_controller.c create mode 100644 src/engine/sprite_controller.h diff --git a/src/engine/TODO/sprite_controller.h b/src/engine/TODO/sprite_controller.h deleted file mode 100644 index c1fadff..0000000 --- a/src/engine/TODO/sprite_controller.h +++ /dev/null @@ -1,6 +0,0 @@ -// handles sprites - -// Bg sprites - - -// Fg or entity sprites diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c new file mode 100644 index 0000000..e69de29 diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h new file mode 100644 index 0000000..a433bd6 --- /dev/null +++ b/src/engine/sprite_controller.h @@ -0,0 +1,8 @@ +#pragma once +// handles sprites + +// Bg sprites + +// Fg or entity sprites + + -- cgit v1.2.3 From 557cbed3ab2dea1dafd61ccdc3521aeed9b63a43 Mon Sep 17 00:00:00 2001 From: NielsCoding <101340368+NielsCoding@users.noreply.github.com> Date: Sat, 11 Mar 2023 19:46:57 +0100 Subject: drawing map en read from binary complete. shift to background. --- src/engine/draw_screen.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ src/engine/draw_screen.h | 18 +++++++++++--- src/makefile | 3 ++- 3 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 src/engine/draw_screen.c diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c new file mode 100644 index 0000000..3e4d8c4 --- /dev/null +++ b/src/engine/draw_screen.c @@ -0,0 +1,61 @@ +#include "draw_screen.h" + +uint8_t hh_world_to_tile(vec2 pos){ + + FILE* level = fopen("../test/bin/test_map.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 + pos.x); + 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 val; +} + + +// remeber old value to know which part to update. +vec2 previousViewport = { .x = 0, .y = 0 }; +void hh_draw_screen(vec2 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*HH_PPU_SPRITE_WIDTH, + .bg_shift_y = viewport.y*HH_PPU_SPRITE_HEIGHT, + .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 = 3200; // max X = 40 en max Y = 80 + FILE* level = fopen("../test/bin/test_map.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 = tile[BAM_index]+1, + .tilemap_index = tile[BAM_index], + }); + } + free(tile); +} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index 4af5865..8d7df47 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -2,8 +2,20 @@ // every function call for drawing the screen goes here. -#include "engine/maths.h" +#include "../engine/maths.h" +#include "ppu/ppu.h" +#include #include -uint16_t hh_world_to_tile(vec2 pos); -void hh_draw_screen(vec2 viewport); \ No newline at end of file +#include + + +#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/makefile b/src/makefile index 96751fb..96f3108 100644 --- a/src/makefile +++ b/src/makefile @@ -31,7 +31,8 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.c + engine/engine.c \ + engine/draw_screen.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) -- cgit v1.2.3 From c12ff10740927c6040c83b3399ad35e94117131c Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Sat, 11 Mar 2023 20:56:26 +0100 Subject: Fixed movement Adjusted movement speed otherwise wouldnt show any movement. Also changed input testing lines so it does work --- src/demo.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/demo.c b/src/demo.c index b9bba17..baaf73d 100644 --- a/src/demo.c +++ b/src/demo.c @@ -12,7 +12,7 @@ hh_s_entity_player g_hh_player_1 = { .pos_x = 31000, // 0b0000 0001 0011 0110 .pos_y = 21000, .radius = 8, - .speed = 1, + .speed = 100, .direction_x = 1, .rotation = 8, .in_air = false, @@ -66,14 +66,17 @@ void hh_demo_setup() { void hh_demo_loop(unsigned long frame) { hh_player_movement(); + // input testing (no hitbox stuff) + // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R + // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U + // adjust map size g_hh_pos_x = g_hh_player_1.pos_x / 100; g_hh_pos_y = g_hh_player_1.pos_y / 100; - // input testing (no hitbox stuff) - // pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - // pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U + + // update player sprite on ppu g_hh_demo_balls[0].position_x = g_hh_pos_x; @@ -102,7 +105,7 @@ void hh_demo_loop(unsigned long frame) { void hh_player_movement() { int8_t directionX = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - int8_t directionY = (-1 * g_hh_controller_p1.dpad_down) + (1 * g_hh_controller_p1.dpad_up); // -1 = D || 1 == U + 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 @@ -140,11 +143,11 @@ void hh_player_movement() { if (g_hh_player_1.in_air == false && directionX != 0) { if (directionX == 1) { - tileColX = ((g_hh_player_1.pos_x / 100) + g_hh_player_1.radius) / 20; - modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 2000; + 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) / 20; - modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 2000; + 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) { @@ -163,6 +166,11 @@ void hh_player_movement() { { } + + 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) /* -- cgit v1.2.3 From a386709d12167ab8f85336a1764040c3f573e9eb Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sun, 12 Mar 2023 11:37:58 +0100 Subject: integrated palettes and fixed reading tiles --- src/engine/engine.c | 1 + src/engine/sprite_controller.c | 10 + src/engine/sprite_controller.h | 96 ++++++++ src/makefile | 3 +- src/ppusim/sim.c | 12 +- test/bin/exportingPalettes.md | 4 + test/bin/test_file_read.c | 11 +- test/bin/tilemap.pip | 512 +++++++++++++++++++++++++++++++++++++++++ 8 files changed, 637 insertions(+), 12 deletions(-) create mode 100644 test/bin/exportingPalettes.md create mode 100644 test/bin/tilemap.pip diff --git a/src/engine/engine.c b/src/engine/engine.c index f3410a4..799ee7c 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,3 +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/sprite_controller.c b/src/engine/sprite_controller.c index e69de29..c224ff7 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -0,0 +1,10 @@ +#include + +#include "engine/sprite_controller.h" +// #include "engine/maths.h" +#include "ppu/types.h" +#include "ppu/consts.h" + +uint8_t hh_get_palette(uint16_t tile_idx) { + return hh_g_sprite_palette[tile_idx]; +} diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index a433bd6..47ab0af 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -1,8 +1,104 @@ #pragma once +#include + +#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 32 +#define HH_PAL_IDX_SKY 0 +#define HH_PAL_IDX_BRICK 1 +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: +}; + + +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}}, + { + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}} +}; + +/** @brief return palette index that belongs to tilemap index */ +uint8_t hh_get_palette(uint16_t tile_idx); +bool hh_colidable(uint16_t tile_idx); diff --git a/src/makefile b/src/makefile index 96751fb..02fcb12 100644 --- a/src/makefile +++ b/src/makefile @@ -31,7 +31,8 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.c + engine/engine.c \ + engine/sprite_controller.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index a759039..1e7e609 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,21 +29,21 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + char* filename = "../test/bin/tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ - printf("File error!"); + fprintf(stderr,"File error!"); return;//error } - + int sprite_size = (HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT); fseek(fp, 0, SEEK_END);//goto EOF - int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + int _size = ftell(fp)/sprite_size; fseek(fp, 0, 0);//goto start of file for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + uint8_t data[sprite_size]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + 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; 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 index 391e2c6..df93395 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -18,19 +18,20 @@ void printData(uint8_t* in) { void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + 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)/HH_PPU_VRAM_TMM_SPRITE_SIZE; - fseek(fp, 0, 0); + int _size = ftell(fp)/sprite_size; + rewind(fp); // printf("%i",_size); for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + uint8_t data[sprite_size]; + fread(data,1,sprite_size,fp); printData(data); } 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 -- cgit v1.2.3 From c74b9b2ff60db2ddc7fe50686b6b654ceea3896e Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Sun, 12 Mar 2023 11:38:48 +0100 Subject: syntax update --- src/engine/draw_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index 3e4d8c4..acf5b41 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -21,7 +21,7 @@ uint8_t hh_world_to_tile(vec2 pos){ // remeber old value to know which part to update. vec2 previousViewport = { .x = 0, .y = 0 }; -void hh_draw_screen(vec2 viewport){ +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){ -- cgit v1.2.3 From 43951373604173c70bb2423dd56988b60a6704db Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sun, 12 Mar 2023 12:58:51 +0100 Subject: camera movement --- src/engine/camera.c | 16 ++++++++++++++++ src/engine/camera.h | 6 ++++++ src/engine/draw_screen.c | 9 +++++---- src/engine/draw_screen.h | 2 +- src/engine/maths.c | 15 +++++++++++++++ src/engine/maths.h | 3 +++ src/engine/sprite_controller.c | 11 ++++++++++- src/engine/sprite_controller.h | 24 +++++++++++++----------- 8 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 src/engine/camera.c create mode 100644 src/engine/camera.h create mode 100644 src/engine/maths.c diff --git a/src/engine/camera.c b/src/engine/camera.c new file mode 100644 index 0000000..46c2d93 --- /dev/null +++ b/src/engine/camera.c @@ -0,0 +1,16 @@ +#include "engine/camera.h" + +#include "ppu/consts.h" + + +vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ + + new = vec_cen2cor(new,(vec2){.x=20,.y=30}); + static vec_cor old; + + 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 index acf5b41..0295241 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -1,4 +1,5 @@ -#include "draw_screen.h" +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" uint8_t hh_world_to_tile(vec2 pos){ @@ -37,8 +38,8 @@ void hh_draw_screen(vec_cor viewport){ void hh_setup_screen(){ //(HH_map_size_X*HH_map_size_Y) - int size = 3200; // max X = 40 en max Y = 80 - FILE* level = fopen("../test/bin/test_map.bin", "rb"); /* open binary file */ + 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; @@ -53,7 +54,7 @@ void hh_setup_screen(){ hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){ .horizontal_flip = false, .vertical_flip = false, - .palette_index = tile[BAM_index]+1, + .palette_index = hh_get_palette(tile[BAM_index]), .tilemap_index = tile[BAM_index], }); } diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index 8d7df47..b181108 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -2,7 +2,7 @@ // every function call for drawing the screen goes here. -#include "../engine/maths.h" +#include "engine/maths.h" #include "ppu/ppu.h" #include diff --git a/src/engine/maths.c b/src/engine/maths.c new file mode 100644 index 0000000..ebd699c --- /dev/null +++ b/src/engine/maths.c @@ -0,0 +1,15 @@ +#include "engine/maths.h" + +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 index c7f1b44..bd20202 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -9,6 +9,9 @@ typedef struct { typedef vec2 vec_cen;//centered typedef vec2 vec_cor;//left upper corner +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 diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c index c224ff7..d4c44ab 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -4,7 +4,16 @@ // #include "engine/maths.h" #include "ppu/types.h" #include "ppu/consts.h" +#include "ppu/ppu.h" -uint8_t hh_get_palette(uint16_t tile_idx) { +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]); + } + } +} diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index 47ab0af..001a459 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -11,10 +11,10 @@ //TODO: pack data inside of sprite_palette LUT //HH_PPU_PALETTE_COUNT -#define HH_SPRITE_COUNT 32 +#define HH_SPRITE_COUNT 40 #define HH_PAL_IDX_SKY 0 #define HH_PAL_IDX_BRICK 1 -uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { +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 @@ -23,7 +23,7 @@ uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { }; -hh_ppu_loc_palette_table_t hh_g_palette = { +const static hh_ppu_loc_palette_table_t hh_g_palette = { {//palette info here {0x1,0x2,0x3}, {0x0,0x0,0x0}, @@ -88,17 +88,19 @@ hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}}, { + {0x0,0xf,0xf}, {0xf,0xf,0xf}, - {0xf,0xf,0xf}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, + {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(uint16_t tile_idx); +uint8_t hh_get_palette(uint8_t tile_idx); -bool hh_colidable(uint16_t tile_idx); +bool hh_colidable(uint8_t tile_idx); -- cgit v1.2.3 From bb2839a81d64e8644c57d83806ae41cc4cfad9dd Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sun, 12 Mar 2023 13:00:45 +0100 Subject: makefile update --- src/engine/TODO/entity.c | 41 ----------------------------------------- src/engine/TODO/entity.h | 24 ------------------------ src/engine/entity.c | 41 +++++++++++++++++++++++++++++++++++++++++ src/engine/entity.h | 24 ++++++++++++++++++++++++ src/makefile | 7 +++++-- 5 files changed, 70 insertions(+), 67 deletions(-) delete mode 100644 src/engine/TODO/entity.c delete mode 100644 src/engine/TODO/entity.h create mode 100644 src/engine/entity.c create mode 100644 src/engine/entity.h diff --git a/src/engine/TODO/entity.c b/src/engine/TODO/entity.c deleted file mode 100644 index fa550d5..0000000 --- a/src/engine/TODO/entity.c +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#include "hh_entity.h" -#include "maths.h" - -/* - PLAYER: (pos on X) - ,___, - | | - | X | - |___| - -*/ - -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x - return true; - } - - if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y - return true; - } - return false; -} - -void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ - if (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } -} - diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h deleted file mode 100644 index fdbeb8a..0000000 --- a/src/engine/TODO/entity.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -#include "maths.h" - -typedef struct { - vec2 pos, vec; - bool is_grounded; - int8_t hp; - //armor/block? -}hh_entity; - -/// @brief detect for collision enity and eviroment -/// @param pos1 position of environment tile to be checked -/// @param pos2 position entity -/// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); - -/// @brief solve collisions -/// @param environment position -/// @param entity position -/// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/entity.c b/src/engine/entity.c new file mode 100644 index 0000000..1dc1df8 --- /dev/null +++ b/src/engine/entity.c @@ -0,0 +1,41 @@ +#include + +#include "engine/hh_entity.h" +#include "engine/maths.h" + +/* + PLAYER: (pos on X) + ,___, + | | + | X | + |___| + +*/ + +bool hh_collision(vec2* pos1, vec2* pos2){ + if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x + return true; + } + + if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y + return true; + } + return false; +} + +void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ + if (entity->vec.x > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.x < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } +} + diff --git a/src/engine/entity.h b/src/engine/entity.h new file mode 100644 index 0000000..b2a0c49 --- /dev/null +++ b/src/engine/entity.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include "engine/maths.h" + +typedef struct { + vec2 pos, vec; + bool is_grounded; + int8_t hp; + //armor/block? +}hh_entity; + +/// @brief detect for collision enity and eviroment +/// @param pos1 position of environment tile to be checked +/// @param pos2 position entity +/// @return true if collision between enity and environment +bool hh_collision(vec2* pos1, vec2* pos2); + +/// @brief solve collisions +/// @param environment position +/// @param entity position +/// @return solved new entity position +void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/makefile b/src/makefile index 10baa14..142d918 100644 --- a/src/makefile +++ b/src/makefile @@ -32,8 +32,11 @@ LOCAL_SRCS += main.c \ ppu/ppu.c \ demo.c \ engine/engine.c \ - engine/sprite_controller.c \ - engine/draw_screen.c + engine/sprite_controller.c \ + engine/draw_screen.c \ + engine/camera.c \ + engine/maths.c \ + engine/entity.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) -- cgit v1.2.3 From 4e58421328f9ee56989879c699c5f2f203fa0732 Mon Sep 17 00:00:00 2001 From: NielsCoding <101340368+NielsCoding@users.noreply.github.com> Date: Mon, 13 Mar 2023 09:11:56 +0100 Subject: features voor ons spel --- features.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 features.md 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| -- cgit v1.2.3 From 5c4bf7d451135cd3af3e51976251f01cbb6e6573 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Mon, 13 Mar 2023 09:57:34 +0100 Subject: camera, movement, collisions --- src/engine/TODO/player_controller.h | 4 ---- src/engine/camera.c | 20 +++++++++++++++++- src/engine/draw_screen.c | 18 ++++++++-------- src/engine/entity.c | 41 +++++++++++++++++++++---------------- src/engine/entity.h | 6 ++++-- src/engine/maths.c | 4 ++++ src/engine/maths.h | 4 +++- src/engine/player_controller.c | 1 + src/engine/player_controller.h | 7 +++++++ src/engine/sprite_controller.c | 5 ++++- src/makefile | 1 + src/ppusim/input.c | 1 + src/ppusim/sim.c | 2 +- 13 files changed, 77 insertions(+), 37 deletions(-) delete mode 100644 src/engine/TODO/player_controller.h create mode 100644 src/engine/player_controller.c create mode 100644 src/engine/player_controller.h diff --git a/src/engine/TODO/player_controller.h b/src/engine/TODO/player_controller.h deleted file mode 100644 index 1e9b86c..0000000 --- a/src/engine/TODO/player_controller.h +++ /dev/null @@ -1,4 +0,0 @@ -#include "maths.h" -#include "hh_entity.h" - -// inputs diff --git a/src/engine/camera.c b/src/engine/camera.c index 46c2d93..e756bd4 100644 --- a/src/engine/camera.c +++ b/src/engine/camera.c @@ -5,8 +5,26 @@ vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ - new = vec_cen2cor(new,(vec2){.x=20,.y=30}); + //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); diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index 0295241..c4f3389 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -3,20 +3,20 @@ uint8_t hh_world_to_tile(vec2 pos){ - FILE* level = fopen("../test/bin/test_map.bin", "rb"); /* open binary file */ + 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 + pos.x); + 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 + 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 val; + // int val = tile; + // free(tile); + return tile; } @@ -26,8 +26,8 @@ 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*HH_PPU_SPRITE_WIDTH, - .bg_shift_y = viewport.y*HH_PPU_SPRITE_HEIGHT, + .bg_shift_x = viewport.x, + .bg_shift_y = viewport.y, .fg_fetch = 0, .sysreset = 0, }); diff --git a/src/engine/entity.c b/src/engine/entity.c index 1dc1df8..152cf1d 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -1,6 +1,6 @@ #include -#include "engine/hh_entity.h" +#include "engine/entity.h" #include "engine/maths.h" /* @@ -12,30 +12,35 @@ */ -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit 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+0.99f)){// hit y + 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 (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } +void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ + if (!hh_collision(pos_environment,entity->pos)) + return; + + printf("BONK!/n"); + // if (entity->vec.y > 0){ + // entity->pos.y = MAX(entity->pos.y,pos_environment.y); + // entity->vec.y = 0; + // } else { + // entity->pos.y = MIN(entity->pos.y,pos_environment.y); + // entity->vec.y = 0; + // } + // if (entity->vec.x <= 0){ + // entity->pos.x = MIN(entity->pos.x,pos_environment.x-16); + // entity->vec.x = 0; + // } else { + // entity->pos.x = MAX(entity->pos.x,pos_environment.x+16); + // entity->vec.x = 0; + // } } diff --git a/src/engine/entity.h b/src/engine/entity.h index b2a0c49..dee4aed 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include "engine/maths.h" @@ -8,6 +9,7 @@ typedef struct { vec2 pos, vec; bool is_grounded; int8_t hp; + int8_t speed; //armor/block? }hh_entity; @@ -15,10 +17,10 @@ typedef struct { /// @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); +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); +void hh_solve_collision(vec2 pos_environment, hh_entity* entity); diff --git a/src/engine/maths.c b/src/engine/maths.c index ebd699c..475bba2 100644 --- a/src/engine/maths.c +++ b/src/engine/maths.c @@ -1,5 +1,9 @@ #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, diff --git a/src/engine/maths.h b/src/engine/maths.h index bd20202..bef287e 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -3,12 +3,14 @@ // #include typedef struct { - uint32_t x,y; + 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); diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c new file mode 100644 index 0000000..27e522e --- /dev/null +++ b/src/engine/player_controller.c @@ -0,0 +1 @@ +#include "engine/player_controller.h" 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 index d4c44ab..5d93cf8 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -1,7 +1,6 @@ #include #include "engine/sprite_controller.h" -// #include "engine/maths.h" #include "ppu/types.h" #include "ppu/consts.h" #include "ppu/ppu.h" @@ -17,3 +16,7 @@ void hh_setup_palettes(){ } } } + +bool hh_colidable(uint8_t tile_idx){ + return (hh_get_palette(tile_idx) != 0); +} diff --git a/src/makefile b/src/makefile index 142d918..d7d9087 100644 --- a/src/makefile +++ b/src/makefile @@ -33,6 +33,7 @@ LOCAL_SRCS += main.c \ demo.c \ engine/engine.c \ engine/sprite_controller.c \ + engine/player_controller.c \ engine/draw_screen.c \ engine/camera.c \ engine/maths.c \ diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 08bc382..5323fb1 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,4 +12,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; + g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_SPACE]; } diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 1e7e609..a5fec45 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -32,7 +32,7 @@ void hh_ppu_load_tilemap() { char* filename = "../test/bin/tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ - fprintf(stderr,"File error!"); + fprintf(stderr,"Error: Failed to load tiles."); return;//error } int sprite_size = (HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT); -- cgit v1.2.3 From 506b1d11e6006e44de5b888eb342eb9dbed58d2c Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Mon, 13 Mar 2023 10:04:37 +0100 Subject: demo.c --- src/demo.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 184 insertions(+), 23 deletions(-) diff --git a/src/demo.c b/src/demo.c index b9bba17..58cb461 100644 --- a/src/demo.c +++ b/src/demo.c @@ -1,10 +1,17 @@ #include #include "demo.h" -#include "entity.h" #include "input.h" +#include "entity.h" #include "ppu/ppu.h" +#include "engine/maths.h" +#include "engine/camera.h" +#include "engine/entity.h" +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" + + #define HH_DEMO_BALL_COUNT 1 hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; @@ -32,10 +39,19 @@ 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() { +#if 0 // load sprites - hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL); - hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD); + // hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL); + // hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD); + hh_ppu_update_sprite(1, HH_SQUARE); // background pattern hh_ppu_update_color(0, 1, (hh_ppu_rgb_color_t){0x4, 0x4, 0x4}); @@ -49,44 +65,189 @@ void hh_demo_setup() { } // 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}); + // 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}); + + for (int i = 0; i < 8; i++) + { + hh_ppu_update_color(1,i,HH_SLIME[i]); + } + // balls +#else + hh_g_player = (hh_entity){ + .pos = {32,32}, + .vec = {0,0}, + .hp = 1, + .speed = 1, + .is_grounded = false + }; + 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; + g_hh_demo_balls[i].palette_index = 7; + g_hh_demo_balls[i].tilemap_index = 20; } + hh_setup_palettes(); + hh_setup_screen(); +#endif } void hh_demo_loop(unsigned long frame) { - hh_player_movement(); + // hh_player_movement(); // adjust map size - g_hh_pos_x = g_hh_player_1.pos_x / 100; - g_hh_pos_y = g_hh_player_1.pos_y / 100; + // g_hh_pos_x = g_hh_player_1.pos_x / 100; + // g_hh_pos_y = g_hh_player_1.pos_y / 100; // input testing (no hitbox stuff) - // pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - // pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U + // g_hh_pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R + // g_hh_pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U + + + + hh_g_player.vec = (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) { + // hh_g_player.vec.x += mbb; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + // if (g_hh_controller_p1.dpad_right) { + // hh_g_player.vec.x += maa; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + if (g_hh_controller_p1.button_primary /*&& hh_g_player.is_grounded*/) //JUMP + hh_g_player.vec.y += -6; + // // if (g_hh_controller_p1.button_secondary) + + + hh_g_player.vec.y += 1; //gravity + + + //END OF VECTOR CHANGES + // hh_g_player.vec.y = CLAMP(hh_g_player.vec.y,-32,32); + // hh_g_player.vec.x = CLAMP(hh_g_player.vec.x,-32,32); + + hh_g_player_new.pos = (vec2){ + .x = hh_g_player.pos.x + hh_g_player.vec.x, + .y = hh_g_player.pos.y + hh_g_player.vec.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(hh_g_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, &hh_g_player); + // } + // } + + hh_g_player_new.is_grounded = false; + + // solves x collision + if (hh_g_player.vec.x <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 15}))) { + hh_g_player_new.pos.x = (hh_g_player_new.pos.x & ~15) + 16, + hh_g_player_new.vec.x = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 15}))) { + hh_g_player_new.pos.x = hh_g_player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY + hh_g_player_new.vec.x = 0; + } + } + + //solves y collision + if (hh_g_player.vec.y <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 15}))) { + hh_g_player_new.pos.y = (hh_g_player_new.pos.y & ~15) + 16, + hh_g_player_new.vec.y = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 16})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player_new.pos.y + 15}))) { + hh_g_player_new.pos.y = hh_g_player_new.pos.y & ~15, + hh_g_player_new.vec.y = 0; + hh_g_player_new.is_grounded = true; + } + } + + hh_g_player = hh_g_player_new; + + + + vec_cor cam_pos;//value in tiles + // cam_pos = (vec2){0,0}; + cam_pos = hh_update_camera(hh_g_player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s) + printf("%i, %i:%i, %i\n",hh_g_player.pos.x,hh_g_player.pos.y,cam_pos.x,cam_pos.y); + hh_draw_screen(cam_pos); // update player sprite on ppu - g_hh_demo_balls[0].position_x = g_hh_pos_x; - g_hh_demo_balls[0].position_y = g_hh_pos_y; + g_hh_demo_balls[0].position_x = (hh_g_player.pos.x-cam_pos.x); + g_hh_demo_balls[0].position_y = hh_g_player.pos.y-cam_pos.y; hh_ppu_update_foreground(0, g_hh_demo_balls[0]); + // for (int i = 0; i < HH_DEMO_BALL_COUNT; i++){ + // g_hh_demo_balls[i].position_x = hh_g_player.pos.x +16*i; + // g_hh_demo_balls[i].position_y = hh_g_player.pos.y; + // hh_ppu_update_foreground(i, g_hh_demo_balls[i]); + + // } + + // 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, - }); + // 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, + // }); } // void sendData(uint8_t address, uint16_t data) { -- cgit v1.2.3 From e47f7fa198229b8598b8ab03ef8b2483f7c685bc Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 13:24:44 +0100 Subject: Background collision Added background collision for player and other entities. Added gravity and jump functionailty --- .vscode/c_cpp_properties.json | 3 +- .vscode/launch.json | 2 +- .vscode/tasks.json | 69 +++++++++++--- src/demo.c | 208 +++++++++++++++++++++++++++++++++--------- src/entity.h | 17 +++- src/ppusim/input.c | 1 + 6 files changed, 241 insertions(+), 59 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 51f5ad0..3a0c430 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -2,7 +2,8 @@ "configurations": [ { "name": "src", - "compileCommands": "${workspaceFolder}/src/compile_commands.json" + "compileCommands": "${workspaceFolder}/src/compile_commands.json", + "configurationProvider": "ms-vscode.makefile-tools" } ], "version": 4 diff --git a/.vscode/launch.json b/.vscode/launch.json index 2f7561c..4ff91bb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "environment": [], "externalConsole": false, "MIMode": "gdb", - "preLaunchTask": "client/build", + "preLaunchTask": "build", "setupCommands": [ { "description": "Enable pretty-printing for gdb", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 53a235e..a670b0f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,13 +16,19 @@ "isDefault": false, "kind": "build" }, - "options": { "cwd": "${workspaceFolder}/src" }, + "options": { + "cwd": "${workspaceFolder}/src" + }, "windows": { "command": "make -j", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "-j" ], + "args": [ + "-j" + ], "type": "shell" }, { @@ -32,13 +38,20 @@ "isDefault": false, "kind": "test" }, - "options": { "cwd": "${workspaceFolder}/src" }, + "options": { + "cwd": "${workspaceFolder}/src" + }, "windows": { "command": "make -j flash", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "-j", "flash" ], + "args": [ + "-j", + "flash" + ], "type": "shell" }, { @@ -48,13 +61,19 @@ "isDefault": false, "kind": "test" }, - "options": { "cwd": "${workspaceFolder}/src" }, + "options": { + "cwd": "${workspaceFolder}/src" + }, "windows": { "command": "make compile_commands.json", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "compile_commands" ], + "args": [ + "compile_commands" + ], "type": "shell" }, { @@ -64,14 +83,40 @@ "isDefault": false, "kind": "test" }, - "options": { "cwd": "${workspaceFolder}" }, + "options": { + "cwd": "${workspaceFolder}" + }, "windows": { "command": "make clean", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "clean" ], + "args": [ + "clean" + ], "type": "shell" + }, + { + "type": "cppbuild", + "label": "C/C++: gcc.exe build active file", + "command": "C:\\msys64\\mingw64\\bin\\gcc.exe", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}\\${fileBasenameNoExtension}.exe" + ], + "options": { + "cwd": "C:\\msys64\\mingw64\\bin" + }, + "problemMatcher": [ + "$gcc" + ], + "group": "build", + "detail": "compiler: C:\\msys64\\mingw64\\bin\\gcc.exe" } ] } diff --git a/src/demo.c b/src/demo.c index baaf73d..f5d2e71 100644 --- a/src/demo.c +++ b/src/demo.c @@ -5,21 +5,36 @@ #include "input.h" #include "ppu/ppu.h" -#define HH_DEMO_BALL_COUNT 1 +#define HH_DEMO_BALL_COUNT 2 hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; hh_s_entity_player g_hh_player_1 = { - .pos_x = 31000, // 0b0000 0001 0011 0110 - .pos_y = 21000, - .radius = 8, + .pos_x = 11000, + .pos_y = 5000, + .radius = 4, .speed = 100, + .air_speed = 80, .direction_x = 1, + .accelY = 0, .rotation = 8, .in_air = false, }; +hh_s_entity_enemy g_hh_enemy_1 = { + .pos_x = 16000, + .pos_y = 20000, + .radius = 4, + .speed = 100, + .direction_x = 1, + .accelY = 0, + .in_air = false, +}; + void hh_player_movement(); +int hh_background_collision_x(hh_s_entity_player tempEntity); +hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity); + uint16_t g_hh_pos_x; // 0b0000 0001 0011 0110 uint16_t g_hh_pos_y; uint8_t g_hh_left = 0; @@ -68,7 +83,7 @@ void hh_demo_loop(unsigned long frame) { hh_player_movement(); // input testing (no hitbox stuff) // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R - // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U + g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U // adjust map size @@ -76,12 +91,14 @@ void hh_demo_loop(unsigned long frame) { g_hh_pos_y = g_hh_player_1.pos_y / 100; - - // update player sprite on ppu g_hh_demo_balls[0].position_x = g_hh_pos_x; g_hh_demo_balls[0].position_y = g_hh_pos_y; + + g_hh_demo_balls[1].position_x = 220; + g_hh_demo_balls[1].position_y = 220; hh_ppu_update_foreground(0, g_hh_demo_balls[0]); + hh_ppu_update_foreground(1, g_hh_demo_balls[1]); // set background pattern position hh_ppu_update_aux((hh_s_ppu_loc_aux){ @@ -107,6 +124,12 @@ 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 + if(g_hh_controller_p1.button_primary == 1 && g_hh_player_1.accelY == 0 && g_hh_player_1.in_air == false) + { + g_hh_player_1.accelY = 25; + } + + uint8_t i, j; uint8_t rotation = 0; // 0-7 @@ -124,63 +147,162 @@ void hh_player_movement() { rotation++; } } - // direction calc - if (directionX != 0) // update direction if player is not idle + // X-axis calc + if (directionX != 0) // update direction and position if player is not idle { g_hh_player_1.direction_x = directionX; + g_hh_player_1.pos_x = hh_background_collision_x(g_hh_player_1); } - // collision map x-axis + + g_hh_player_1 = hh_background_collision_y_player(g_hh_player_1); + +} + + +int hh_background_collision_x(hh_s_entity_player tempEntity){ // tile calc including radius and direction for background coliision uint16_t tileColX; - uint16_t tileColY = (g_hh_player_1.pos_y / 100) / 16; + uint16_t tileColY = (tempEntity.pos_y / 100) / 8; ; // 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 (tempEntity.direction_x == 1) { + tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; + modTileX = 800 -((tempEntity.pos_x + (100 * tempEntity.radius)) % 800); + } else if (tempEntity.direction_x == -1) { + tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius )/ 8; + modTileX = (tempEntity.pos_x - (100 * tempEntity.radius)) % 800; + } + + tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box + + if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { + tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //bottom of player box + if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { + if(tempEntity.in_air== true){ + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // 80% of max speed if in air + } else { + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // 80% of max speed if in air + } + } else { + if(tempEntity.in_air == true){ + if (modTileX < tempEntity.air_speed) { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + } else { + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // + } + } else { + if (modTileX < g_hh_player_1.speed) { + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + } else { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // + } + } + } + } else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] == 1) { + if(tempEntity.in_air == true){ + if (modTileX < tempEntity.air_speed) { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + } else { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // + } + } else { if (modTileX < g_hh_player_1.speed) { - g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * modTileX); // NEW x set + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * 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 + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // } } - - } else // if in air different all borders have to be checked - { } + + return tempEntity.pos_x; + +} + +hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity){ + + uint16_t tileColX; + uint16_t tileColY; + + + // remaining space between grid and exact + uint8_t modTileY; - if(directionY != 0) + if(g_hh_controller_p1.button_primary == 1 && tempEntity.accelY == 0 && tempEntity.in_air == false) { - // g_hh_player_1.pos_y = g_hh_player_1.pos_y + (directionY * g_hh_player_1.speed * 2); // NEW x set +// tempEntity.accelY = 25; } - // 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 + + tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box + tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; //right of player + modTileY = ((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //bottom of box + + //rework arfter jumping + if(tempEntity.accelY <= 0){ //falling + if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) {//check bottom right first + tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; + if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) { + tempEntity.in_air = true; + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + if (tempEntity.accelY > -35){ + tempEntity.accelY--; + } + } + else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + } + tempEntity.in_air = false; + tempEntity.accelY = 0; + } + } + else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + } + tempEntity.in_air = false; + tempEntity.accelY = 0; + } } - */ - // else if(HH_DEMO_HITBOX_TILEMAP[]) + else{ //jumping + tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //top of player box + modTileY = 800 -((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //top of box + if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) {//check bottom right first + tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; + if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + tempEntity.in_air = true; + tempEntity.accelY--; + } else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ; + } + tempEntity.accelY = 0; + } + } + else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set //makew var gravity + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set //makew var gravity + } + tempEntity.accelY = 0; + } + + } + + return tempEntity; } diff --git a/src/entity.h b/src/entity.h index 181182b..3684252 100644 --- a/src/entity.h +++ b/src/entity.h @@ -8,7 +8,20 @@ typedef struct { 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 + int8_t direction_x; //direction where its looking at in case no input; + int8_t accelY; + int16_t speed; // default L/R MODifier + int16_t air_speed; // air L/R MODifier bool in_air; } hh_s_entity_player; + +typedef struct { + uint16_t pos_x; + uint16_t pos_y; + uint8_t radius; + uint8_t direction_x; //direction where its walking towards; + int8_t accelY; + int16_t speed; // default L/R MODifier + int16_t air_speed; + bool in_air; +} hh_s_entity_enemy; diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 08bc382..4491a63 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,4 +12,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; + g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_K]; } -- cgit v1.2.3 From 30eca8d3bd03c1efe52f2432c4b6b0c842fffa2d Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Mon, 13 Mar 2023 17:10:11 +0100 Subject: demo.c clean up --- src/demo.c | 197 +---------------------------------------- src/engine/entity.c | 12 +-- src/engine/entity.h | 33 ++++++- src/engine/player_controller.c | 166 ++++++++++++++++++++++++++++++++++ 4 files changed, 207 insertions(+), 201 deletions(-) diff --git a/src/demo.c b/src/demo.c index 58cb461..bb0aecf 100644 --- a/src/demo.c +++ b/src/demo.c @@ -9,11 +9,10 @@ #include "engine/camera.h" #include "engine/entity.h" #include "engine/draw_screen.h" +#include "engine/player_controller.h" #include "engine/sprite_controller.h" -#define HH_DEMO_BALL_COUNT 1 -hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; hh_s_entity_player g_hh_player_1 = { .pos_x = 31000, // 0b0000 0001 0011 0110 @@ -47,207 +46,17 @@ typedef struct { hh_entity hh_g_player, hh_g_player_new; void hh_demo_setup() { -#if 0 - // load sprites - // hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL); - // hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD); - hh_ppu_update_sprite(1, HH_SQUARE); - // 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}); - - for (int i = 0; i < 8; i++) - { - hh_ppu_update_color(1,i,HH_SLIME[i]); - } - - - // balls -#else - hh_g_player = (hh_entity){ - .pos = {32,32}, - .vec = {0,0}, - .hp = 1, - .speed = 1, - .is_grounded = false - }; - - 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 = 7; - g_hh_demo_balls[i].tilemap_index = 20; - } hh_setup_palettes(); hh_setup_screen(); -#endif + } void hh_demo_loop(unsigned long frame) { // hh_player_movement(); - // adjust map size - // g_hh_pos_x = g_hh_player_1.pos_x / 100; - // g_hh_pos_y = g_hh_player_1.pos_y / 100; - - // input testing (no hitbox stuff) - // g_hh_pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - // g_hh_pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U - - - - hh_g_player.vec = (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) { - // hh_g_player.vec.x += mbb; - // // g_hh_demo_balls[0].horizontal_flip = true; - // } - // if (g_hh_controller_p1.dpad_right) { - // hh_g_player.vec.x += maa; - // // g_hh_demo_balls[0].horizontal_flip = true; - // } - if (g_hh_controller_p1.button_primary /*&& hh_g_player.is_grounded*/) //JUMP - hh_g_player.vec.y += -6; - // // if (g_hh_controller_p1.button_secondary) - - - hh_g_player.vec.y += 1; //gravity - - - //END OF VECTOR CHANGES - // hh_g_player.vec.y = CLAMP(hh_g_player.vec.y,-32,32); - // hh_g_player.vec.x = CLAMP(hh_g_player.vec.x,-32,32); - - hh_g_player_new.pos = (vec2){ - .x = hh_g_player.pos.x + hh_g_player.vec.x, - .y = hh_g_player.pos.y + hh_g_player.vec.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(hh_g_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, &hh_g_player); - // } - // } - - hh_g_player_new.is_grounded = false; - - // solves x collision - if (hh_g_player.vec.x <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 15}))) { - hh_g_player_new.pos.x = (hh_g_player_new.pos.x & ~15) + 16, - hh_g_player_new.vec.x = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 15}))) { - hh_g_player_new.pos.x = hh_g_player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY - hh_g_player_new.vec.x = 0; - } - } - - //solves y collision - if (hh_g_player.vec.y <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 15}))) { - hh_g_player_new.pos.y = (hh_g_player_new.pos.y & ~15) + 16, - hh_g_player_new.vec.y = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 16})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player_new.pos.y + 15}))) { - hh_g_player_new.pos.y = hh_g_player_new.pos.y & ~15, - hh_g_player_new.vec.y = 0; - hh_g_player_new.is_grounded = true; - } - } - - hh_g_player = hh_g_player_new; - - - - vec_cor cam_pos;//value in tiles - // cam_pos = (vec2){0,0}; - cam_pos = hh_update_camera(hh_g_player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s) - printf("%i, %i:%i, %i\n",hh_g_player.pos.x,hh_g_player.pos.y,cam_pos.x,cam_pos.y); - hh_draw_screen(cam_pos); - // update player sprite on ppu - g_hh_demo_balls[0].position_x = (hh_g_player.pos.x-cam_pos.x); - g_hh_demo_balls[0].position_y = hh_g_player.pos.y-cam_pos.y; - hh_ppu_update_foreground(0, g_hh_demo_balls[0]); - - // for (int i = 0; i < HH_DEMO_BALL_COUNT; i++){ - // g_hh_demo_balls[i].position_x = hh_g_player.pos.x +16*i; - // g_hh_demo_balls[i].position_y = hh_g_player.pos.y; - // hh_ppu_update_foreground(i, g_hh_demo_balls[i]); - - // } - + hh_player_actions(); - // 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, - // }); } // void sendData(uint8_t address, uint16_t data) { diff --git a/src/engine/entity.c b/src/engine/entity.c index 152cf1d..153e7e1 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -28,19 +28,19 @@ void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ return; printf("BONK!/n"); - // if (entity->vec.y > 0){ + // if (entity->vel.y > 0){ // entity->pos.y = MAX(entity->pos.y,pos_environment.y); - // entity->vec.y = 0; + // entity->vel.y = 0; // } else { // entity->pos.y = MIN(entity->pos.y,pos_environment.y); - // entity->vec.y = 0; + // entity->vel.y = 0; // } - // if (entity->vec.x <= 0){ + // if (entity->vel.x <= 0){ // entity->pos.x = MIN(entity->pos.x,pos_environment.x-16); - // entity->vec.x = 0; + // entity->vel.x = 0; // } else { // entity->pos.x = MAX(entity->pos.x,pos_environment.x+16); - // entity->vec.x = 0; + // entity->vel.x = 0; // } } diff --git a/src/engine/entity.h b/src/engine/entity.h index dee4aed..f45dae2 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -3,16 +3,47 @@ #include #include +#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, vec; + 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 diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 27e522e..6735620 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -1 +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 + +#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); + +} + -- cgit v1.2.3 From a9ad8e0a8ac5346108f1e2c1a0bf9360fadc20da Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 18:02:59 +0100 Subject: Revert "Merge branch 'dev' of https://github.com/Flenk008/avans-arcade into dev" This reverts commit 4f489426e05fb3b296998b17859d8702cc4f37e1, reversing changes made to e47f7fa198229b8598b8ab03ef8b2483f7c685bc. --- features.md | 72 ----- src/.gitignore | 1 - src/engine/TODO/entity.c | 41 +++ src/engine/TODO/entity.h | 24 ++ src/engine/TODO/player_controller.h | 4 + src/engine/TODO/sprite_controller.h | 6 + src/engine/camera.c | 34 --- src/engine/camera.h | 6 - src/engine/draw_screen.c | 62 ----- src/engine/draw_screen.h | 16 +- src/engine/engine.c | 1 - src/engine/entity.c | 46 ---- src/engine/entity.h | 57 ---- src/engine/maths.c | 19 -- src/engine/maths.h | 7 +- src/engine/player_controller.c | 167 ------------ src/engine/player_controller.h | 7 - src/engine/sprite_controller.c | 22 -- src/engine/sprite_controller.h | 106 -------- src/makefile | 8 +- src/ppusim/sim.c | 11 +- test/bin/exportingPalettes.md | 4 - test/bin/test_file_read.c | 13 +- test/bin/tilemap.pip | 512 ------------------------------------ 24 files changed, 89 insertions(+), 1157 deletions(-) delete mode 100644 features.md create mode 100644 src/engine/TODO/entity.c create mode 100644 src/engine/TODO/entity.h create mode 100644 src/engine/TODO/player_controller.h create mode 100644 src/engine/TODO/sprite_controller.h delete mode 100644 src/engine/camera.c delete mode 100644 src/engine/camera.h delete mode 100644 src/engine/draw_screen.c delete mode 100644 src/engine/entity.c delete mode 100644 src/engine/entity.h delete mode 100644 src/engine/maths.c delete mode 100644 src/engine/player_controller.c delete mode 100644 src/engine/player_controller.h delete mode 100644 src/engine/sprite_controller.c delete mode 100644 src/engine/sprite_controller.h delete mode 100644 test/bin/exportingPalettes.md delete mode 100644 test/bin/tilemap.pip diff --git a/features.md b/features.md deleted file mode 100644 index d044232..0000000 --- a/features.md +++ /dev/null @@ -1,72 +0,0 @@ -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 504b995..d8325cf 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -4,4 +4,3 @@ main.bin main main.exe static/ -*.bin diff --git a/src/engine/TODO/entity.c b/src/engine/TODO/entity.c new file mode 100644 index 0000000..fa550d5 --- /dev/null +++ b/src/engine/TODO/entity.c @@ -0,0 +1,41 @@ +#include + +#include "hh_entity.h" +#include "maths.h" + +/* + PLAYER: (pos on X) + ,___, + | | + | X | + |___| + +*/ + +bool hh_collision(vec2* pos1, vec2* pos2){ + if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x + return true; + } + + if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y + return true; + } + return false; +} + +void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ + if (entity->vec.x > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.x < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } +} + diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h new file mode 100644 index 0000000..fdbeb8a --- /dev/null +++ b/src/engine/TODO/entity.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include "maths.h" + +typedef struct { + vec2 pos, vec; + bool is_grounded; + int8_t hp; + //armor/block? +}hh_entity; + +/// @brief detect for collision enity and eviroment +/// @param pos1 position of environment tile to be checked +/// @param pos2 position entity +/// @return true if collision between enity and environment +bool hh_collision(vec2* pos1, vec2* pos2); + +/// @brief solve collisions +/// @param environment position +/// @param entity position +/// @return solved new entity position +void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/player_controller.h b/src/engine/TODO/player_controller.h new file mode 100644 index 0000000..1e9b86c --- /dev/null +++ b/src/engine/TODO/player_controller.h @@ -0,0 +1,4 @@ +#include "maths.h" +#include "hh_entity.h" + +// inputs diff --git a/src/engine/TODO/sprite_controller.h b/src/engine/TODO/sprite_controller.h new file mode 100644 index 0000000..c1fadff --- /dev/null +++ b/src/engine/TODO/sprite_controller.h @@ -0,0 +1,6 @@ +// handles sprites + +// Bg sprites + + +// Fg or entity sprites diff --git a/src/engine/camera.c b/src/engine/camera.c deleted file mode 100644 index e756bd4..0000000 --- a/src/engine/camera.c +++ /dev/null @@ -1,34 +0,0 @@ -#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 deleted file mode 100644 index b3ffb52..0000000 --- a/src/engine/camera.h +++ /dev/null @@ -1,6 +0,0 @@ -#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 deleted file mode 100644 index c4f3389..0000000 --- a/src/engine/draw_screen.c +++ /dev/null @@ -1,62 +0,0 @@ -#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 index b181108..4af5865 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -3,19 +3,7 @@ // every function call for drawing the screen goes here. #include "engine/maths.h" -#include "ppu/ppu.h" -#include #include -#include - - -#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(); +uint16_t hh_world_to_tile(vec2 pos); +void hh_draw_screen(vec2 viewport); \ No newline at end of file diff --git a/src/engine/engine.c b/src/engine/engine.c index 799ee7c..f3410a4 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,4 +1,3 @@ #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 deleted file mode 100644 index 153e7e1..0000000 --- a/src/engine/entity.c +++ /dev/null @@ -1,46 +0,0 @@ -#include - -#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 deleted file mode 100644 index f45dae2..0000000 --- a/src/engine/entity.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include - -#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/maths.c b/src/engine/maths.c deleted file mode 100644 index 475bba2..0000000 --- a/src/engine/maths.c +++ /dev/null @@ -1,19 +0,0 @@ -#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 index bef287e..c7f1b44 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -3,17 +3,12 @@ // #include typedef struct { - int32_t x,y; + uint32_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 diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c deleted file mode 100644 index 6735620..0000000 --- a/src/engine/player_controller.c +++ /dev/null @@ -1,167 +0,0 @@ -#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 - -#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 deleted file mode 100644 index 400c18e..0000000 --- a/src/engine/player_controller.h +++ /dev/null @@ -1,7 +0,0 @@ -#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 deleted file mode 100644 index 5d93cf8..0000000 --- a/src/engine/sprite_controller.c +++ /dev/null @@ -1,22 +0,0 @@ -#include - -#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 deleted file mode 100644 index 001a459..0000000 --- a/src/engine/sprite_controller.h +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once -#include - -#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/makefile b/src/makefile index d7d9087..96751fb 100644 --- a/src/makefile +++ b/src/makefile @@ -31,13 +31,7 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.c \ - engine/sprite_controller.c \ - engine/player_controller.c \ - engine/draw_screen.c \ - engine/camera.c \ - engine/maths.c \ - engine/entity.c + engine/engine.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index a5fec45..1fceb82 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,21 +29,20 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "../test/bin/tiles.bin"; + char* filename = "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; + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; fseek(fp, 0, 0);//goto start of file for (int i = 0; i < _size; i++) { - uint8_t data[sprite_size]; + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; - fread(data,sizeof(uint8_t),sprite_size,fp); + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); hh_s_ppu_vram_data sprite = hh_ppu_2nat_sprite(data); sprite.offset = i*HH_PPU_VRAM_TMM_SPRITE_SIZE; diff --git a/test/bin/exportingPalettes.md b/test/bin/exportingPalettes.md deleted file mode 100644 index be4a354..0000000 --- a/test/bin/exportingPalettes.md +++ /dev/null @@ -1,4 +0,0 @@ -```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 index df93395..b3357ce 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -16,22 +16,19 @@ void printData(uint8_t* in) { } void hh_ppu_load_tilemap() { - - - char* filename = "slime.bin"; + char* filename = "tiles.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); + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + fseek(fp, 0, 0); // printf("%i",_size); for (int i = 0; i < _size; i++) { - uint8_t data[sprite_size]; - fread(data,1,sprite_size,fp); + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); printData(data); } diff --git a/test/bin/tilemap.pip b/test/bin/tilemap.pip deleted file mode 100644 index c0c646e..0000000 --- a/test/bin/tilemap.pip +++ /dev/null @@ -1,512 +0,0 @@ -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 -- cgit v1.2.3 From 91c9d1c9fc13cf163c6262437de16c992dadaa5b Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 18:03:21 +0100 Subject: Revert "Background collision" This reverts commit e47f7fa198229b8598b8ab03ef8b2483f7c685bc. --- .vscode/c_cpp_properties.json | 3 +- .vscode/launch.json | 2 +- .vscode/tasks.json | 69 +++----------- src/demo.c | 208 +++++++++--------------------------------- src/entity.h | 17 +--- src/ppusim/input.c | 1 - 6 files changed, 59 insertions(+), 241 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 3a0c430..51f5ad0 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -2,8 +2,7 @@ "configurations": [ { "name": "src", - "compileCommands": "${workspaceFolder}/src/compile_commands.json", - "configurationProvider": "ms-vscode.makefile-tools" + "compileCommands": "${workspaceFolder}/src/compile_commands.json" } ], "version": 4 diff --git a/.vscode/launch.json b/.vscode/launch.json index 4ff91bb..2f7561c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "environment": [], "externalConsole": false, "MIMode": "gdb", - "preLaunchTask": "build", + "preLaunchTask": "client/build", "setupCommands": [ { "description": "Enable pretty-printing for gdb", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a670b0f..53a235e 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,19 +16,13 @@ "isDefault": false, "kind": "build" }, - "options": { - "cwd": "${workspaceFolder}/src" - }, + "options": { "cwd": "${workspaceFolder}/src" }, "windows": { "command": "make -j", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "-j" - ], + "args": [ "-j" ], "type": "shell" }, { @@ -38,20 +32,13 @@ "isDefault": false, "kind": "test" }, - "options": { - "cwd": "${workspaceFolder}/src" - }, + "options": { "cwd": "${workspaceFolder}/src" }, "windows": { "command": "make -j flash", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "-j", - "flash" - ], + "args": [ "-j", "flash" ], "type": "shell" }, { @@ -61,19 +48,13 @@ "isDefault": false, "kind": "test" }, - "options": { - "cwd": "${workspaceFolder}/src" - }, + "options": { "cwd": "${workspaceFolder}/src" }, "windows": { "command": "make compile_commands.json", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "compile_commands" - ], + "args": [ "compile_commands" ], "type": "shell" }, { @@ -83,40 +64,14 @@ "isDefault": false, "kind": "test" }, - "options": { - "cwd": "${workspaceFolder}" - }, + "options": { "cwd": "${workspaceFolder}" }, "windows": { "command": "make clean", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "clean" - ], + "args": [ "clean" ], "type": "shell" - }, - { - "type": "cppbuild", - "label": "C/C++: gcc.exe build active file", - "command": "C:\\msys64\\mingw64\\bin\\gcc.exe", - "args": [ - "-fdiagnostics-color=always", - "-g", - "${file}", - "-o", - "${fileDirname}\\${fileBasenameNoExtension}.exe" - ], - "options": { - "cwd": "C:\\msys64\\mingw64\\bin" - }, - "problemMatcher": [ - "$gcc" - ], - "group": "build", - "detail": "compiler: C:\\msys64\\mingw64\\bin\\gcc.exe" } ] } diff --git a/src/demo.c b/src/demo.c index f5d2e71..baaf73d 100644 --- a/src/demo.c +++ b/src/demo.c @@ -5,36 +5,21 @@ #include "input.h" #include "ppu/ppu.h" -#define HH_DEMO_BALL_COUNT 2 +#define HH_DEMO_BALL_COUNT 1 hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; hh_s_entity_player g_hh_player_1 = { - .pos_x = 11000, - .pos_y = 5000, - .radius = 4, + .pos_x = 31000, // 0b0000 0001 0011 0110 + .pos_y = 21000, + .radius = 8, .speed = 100, - .air_speed = 80, .direction_x = 1, - .accelY = 0, .rotation = 8, .in_air = false, }; -hh_s_entity_enemy g_hh_enemy_1 = { - .pos_x = 16000, - .pos_y = 20000, - .radius = 4, - .speed = 100, - .direction_x = 1, - .accelY = 0, - .in_air = false, -}; - void hh_player_movement(); -int hh_background_collision_x(hh_s_entity_player tempEntity); -hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity); - uint16_t g_hh_pos_x; // 0b0000 0001 0011 0110 uint16_t g_hh_pos_y; uint8_t g_hh_left = 0; @@ -83,7 +68,7 @@ void hh_demo_loop(unsigned long frame) { hh_player_movement(); // input testing (no hitbox stuff) // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R - g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U + // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U // adjust map size @@ -91,14 +76,12 @@ void hh_demo_loop(unsigned long frame) { g_hh_pos_y = g_hh_player_1.pos_y / 100; + + // update player sprite on ppu g_hh_demo_balls[0].position_x = g_hh_pos_x; g_hh_demo_balls[0].position_y = g_hh_pos_y; - - g_hh_demo_balls[1].position_x = 220; - g_hh_demo_balls[1].position_y = 220; hh_ppu_update_foreground(0, g_hh_demo_balls[0]); - hh_ppu_update_foreground(1, g_hh_demo_balls[1]); // set background pattern position hh_ppu_update_aux((hh_s_ppu_loc_aux){ @@ -124,12 +107,6 @@ 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 - if(g_hh_controller_p1.button_primary == 1 && g_hh_player_1.accelY == 0 && g_hh_player_1.in_air == false) - { - g_hh_player_1.accelY = 25; - } - - uint8_t i, j; uint8_t rotation = 0; // 0-7 @@ -147,162 +124,63 @@ void hh_player_movement() { rotation++; } } - // X-axis calc - if (directionX != 0) // update direction and position if player is not idle + // direction calc + if (directionX != 0) // update direction if player is not idle { g_hh_player_1.direction_x = directionX; - g_hh_player_1.pos_x = hh_background_collision_x(g_hh_player_1); } + // collision map x-axis - - g_hh_player_1 = hh_background_collision_y_player(g_hh_player_1); - -} - - -int hh_background_collision_x(hh_s_entity_player tempEntity){ // tile calc including radius and direction for background coliision uint16_t tileColX; - uint16_t tileColY = (tempEntity.pos_y / 100) / 8; + 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 (tempEntity.direction_x == 1) { - tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; - modTileX = 800 -((tempEntity.pos_x + (100 * tempEntity.radius)) % 800); - } else if (tempEntity.direction_x == -1) { - tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius )/ 8; - modTileX = (tempEntity.pos_x - (100 * tempEntity.radius)) % 800; - } - - tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box - - if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { - tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //bottom of player box - if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { - if(tempEntity.in_air== true){ - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // 80% of max speed if in air - } else { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // 80% of max speed if in air - } - } else { - if(tempEntity.in_air == true){ - if (modTileX < tempEntity.air_speed) { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set - } else { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // - } - } else { - if (modTileX < g_hh_player_1.speed) { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set - } else { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // - } - } + 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 + tempEntity.direction_x] == 1) { - if(tempEntity.in_air == true){ - if (modTileX < tempEntity.air_speed) { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set - } else { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // - } - } else { + + else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] == 1) { if (modTileX < g_hh_player_1.speed) { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * modTileX); // NEW x set } else { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // + g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set } } - } - - - return tempEntity.pos_x; - -} - -hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity){ - - uint16_t tileColX; - uint16_t tileColY; - - - // remaining space between grid and exact - uint8_t modTileY; - if(g_hh_controller_p1.button_primary == 1 && tempEntity.accelY == 0 && tempEntity.in_air == false) + } else // if in air different all borders have to be checked { -// tempEntity.accelY = 25; } - - tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box - tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; //right of player - modTileY = ((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //bottom of box - //rework arfter jumping - if(tempEntity.accelY <= 0){ //falling - if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) {//check bottom right first - tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; - if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) { - tempEntity.in_air = true; - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - if (tempEntity.accelY > -35){ - tempEntity.accelY--; - } - } - else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - } - tempEntity.in_air = false; - tempEntity.accelY = 0; - } - } - else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - } - tempEntity.in_air = false; - tempEntity.accelY = 0; - } + + 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 } - else{ //jumping - tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //top of player box - modTileY = 800 -((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //top of box - if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) {//check bottom right first - tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; - if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - tempEntity.in_air = true; - tempEntity.accelY--; - } else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ; - } - tempEntity.accelY = 0; - } - } - else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set //makew var gravity - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set //makew var gravity - } - tempEntity.accelY = 0; - } - + // 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 } - - return tempEntity; + */ + // else if(HH_DEMO_HITBOX_TILEMAP[]) } diff --git a/src/entity.h b/src/entity.h index 3684252..181182b 100644 --- a/src/entity.h +++ b/src/entity.h @@ -8,20 +8,7 @@ typedef struct { uint16_t pos_y; uint8_t radius; uint8_t rotation; //45 degrees steps 0 == right 2 == down 4 == left 6 == up - int8_t direction_x; //direction where its looking at in case no input; - int8_t accelY; - int16_t speed; // default L/R MODifier - int16_t air_speed; // air L/R MODifier + 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; - -typedef struct { - uint16_t pos_x; - uint16_t pos_y; - uint8_t radius; - uint8_t direction_x; //direction where its walking towards; - int8_t accelY; - int16_t speed; // default L/R MODifier - int16_t air_speed; - bool in_air; -} hh_s_entity_enemy; diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 4491a63..08bc382 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,5 +12,4 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; - g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_K]; } -- cgit v1.2.3 From 47c76e5eabd2b7aa4eb0de7ca34b4ef9ac78f395 Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 18:04:59 +0100 Subject: Revert "Revert "Merge branch 'dev' of https://github.com/Flenk008/avans-arcade into dev"" This reverts commit a9ad8e0a8ac5346108f1e2c1a0bf9360fadc20da. --- features.md | 72 +++++ src/.gitignore | 1 + src/engine/TODO/entity.c | 41 --- src/engine/TODO/entity.h | 24 -- src/engine/TODO/player_controller.h | 4 - src/engine/TODO/sprite_controller.h | 6 - src/engine/camera.c | 34 +++ src/engine/camera.h | 6 + src/engine/draw_screen.c | 62 +++++ src/engine/draw_screen.h | 16 +- src/engine/engine.c | 1 + src/engine/entity.c | 46 ++++ src/engine/entity.h | 57 ++++ src/engine/maths.c | 19 ++ src/engine/maths.h | 7 +- src/engine/player_controller.c | 167 ++++++++++++ src/engine/player_controller.h | 7 + src/engine/sprite_controller.c | 22 ++ src/engine/sprite_controller.h | 106 ++++++++ src/makefile | 8 +- src/ppusim/sim.c | 11 +- test/bin/exportingPalettes.md | 4 + test/bin/test_file_read.c | 13 +- test/bin/tilemap.pip | 512 ++++++++++++++++++++++++++++++++++++ 24 files changed, 1157 insertions(+), 89 deletions(-) create mode 100644 features.md delete mode 100644 src/engine/TODO/entity.c delete mode 100644 src/engine/TODO/entity.h delete mode 100644 src/engine/TODO/player_controller.h delete mode 100644 src/engine/TODO/sprite_controller.h create mode 100644 src/engine/camera.c create mode 100644 src/engine/camera.h create mode 100644 src/engine/draw_screen.c create mode 100644 src/engine/entity.c create mode 100644 src/engine/entity.h create mode 100644 src/engine/maths.c create mode 100644 src/engine/player_controller.c create mode 100644 src/engine/player_controller.h create mode 100644 src/engine/sprite_controller.c create mode 100644 src/engine/sprite_controller.h create mode 100644 test/bin/exportingPalettes.md create mode 100644 test/bin/tilemap.pip 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/engine/TODO/entity.c b/src/engine/TODO/entity.c deleted file mode 100644 index fa550d5..0000000 --- a/src/engine/TODO/entity.c +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#include "hh_entity.h" -#include "maths.h" - -/* - PLAYER: (pos on X) - ,___, - | | - | X | - |___| - -*/ - -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x - return true; - } - - if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y - return true; - } - return false; -} - -void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ - if (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } -} - diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h deleted file mode 100644 index fdbeb8a..0000000 --- a/src/engine/TODO/entity.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -#include "maths.h" - -typedef struct { - vec2 pos, vec; - bool is_grounded; - int8_t hp; - //armor/block? -}hh_entity; - -/// @brief detect for collision enity and eviroment -/// @param pos1 position of environment tile to be checked -/// @param pos2 position entity -/// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); - -/// @brief solve collisions -/// @param environment position -/// @param entity position -/// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/player_controller.h b/src/engine/TODO/player_controller.h deleted file mode 100644 index 1e9b86c..0000000 --- a/src/engine/TODO/player_controller.h +++ /dev/null @@ -1,4 +0,0 @@ -#include "maths.h" -#include "hh_entity.h" - -// inputs diff --git a/src/engine/TODO/sprite_controller.h b/src/engine/TODO/sprite_controller.h deleted file mode 100644 index c1fadff..0000000 --- a/src/engine/TODO/sprite_controller.h +++ /dev/null @@ -1,6 +0,0 @@ -// handles sprites - -// Bg sprites - - -// Fg or entity sprites 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 index 4af5865..b181108 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -3,7 +3,19 @@ // every function call for drawing the screen goes here. #include "engine/maths.h" +#include "ppu/ppu.h" +#include #include -uint16_t hh_world_to_tile(vec2 pos); -void hh_draw_screen(vec2 viewport); \ No newline at end of file +#include + + +#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 index f3410a4..799ee7c 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,3 +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 + +#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 +#include + +#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/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 index c7f1b44..bef287e 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -3,12 +3,17 @@ // #include typedef struct { - uint32_t x,y; + 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 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 + +#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 + +#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 + +#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/makefile b/src/makefile index 96751fb..d7d9087 100644 --- a/src/makefile +++ b/src/makefile @@ -31,7 +31,13 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.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) diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 1fceb82..a5fec45 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,20 +29,21 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + 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)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + int _size = ftell(fp)/sprite_size; fseek(fp, 0, 0);//goto start of file for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + uint8_t data[sprite_size]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + 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; 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 index b3357ce..df93395 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -16,19 +16,22 @@ void printData(uint8_t* in) { } void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + + + 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)/HH_PPU_VRAM_TMM_SPRITE_SIZE; - fseek(fp, 0, 0); + int _size = ftell(fp)/sprite_size; + rewind(fp); // printf("%i",_size); for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + uint8_t data[sprite_size]; + fread(data,1,sprite_size,fp); printData(data); } 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 -- cgit v1.2.3 From 5c999fb95681ffaff41e59f8f43c82b5cf148e42 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Tue, 14 Mar 2023 17:26:17 +0100 Subject: camera y-axis bug fixed + clean up --- src/engine/camera.c | 5 +++-- src/engine/player_controller.c | 17 ----------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/engine/camera.c b/src/engine/camera.c index e756bd4..2c3e517 100644 --- a/src/engine/camera.c +++ b/src/engine/camera.c @@ -6,10 +6,10 @@ 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 ?? + //TODO: remove magic number at y camera offset // new = vec_cen2cor(new,(vec2){.x=max.x/2,.y=max.y/2}); - new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH/2),.y=(new.y+(HH_PPU_SPRITE_HEIGHT/2))*2},(vec2){.x=max.x/2,.y=max.y/2}); + new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH),.y=new.y+(HH_PPU_SPRITE_HEIGHT*8)},(vec2){.x=max.x/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; @@ -19,6 +19,7 @@ vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ // int16_t some = 0; // some = some <<= HH_MATH_FIXED_POINT-1; + // Camera smoothing new.x = (int)((float)new.x*0.1f + (float)old.x*0.9f); new.y = (int)((float)new.y*0.1f + (float)old.y*0.9f); diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 6735620..22f6eb6 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -4,9 +4,6 @@ #include "engine/sprite_controller.h" #include "engine/player_controller.h" -#include "demo.h" -#include - #include "input.h" void hh_player_actions() { @@ -50,11 +47,6 @@ void hh_player_actions() { // 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 @@ -154,14 +146,5 @@ void hh_player_actions() { 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); - } -- cgit v1.2.3 From 0c3292879774e33dfb3e8c7d787b236876508467 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Tue, 14 Mar 2023 19:38:43 +0100 Subject: added hexdump file structures --- src/.gitignore | 4 +- src/engine/sprite_controller.h | 30 +- src/static/background/tilemap.hex | 514 +++++++++++++++++++++++++++++ src/static/foreground/slime.hex | 24 ++ src/static/title_screen_icon.hex | 119 +++++++ src/static/title_screen_letteres_large.hex | 230 +++++++++++++ test/bin/tilemap.pip | 512 ---------------------------- 7 files changed, 904 insertions(+), 529 deletions(-) create mode 100644 src/static/background/tilemap.hex create mode 100644 src/static/foreground/slime.hex create mode 100644 src/static/title_screen_icon.hex create mode 100644 src/static/title_screen_letteres_large.hex delete mode 100644 test/bin/tilemap.pip diff --git a/src/.gitignore b/src/.gitignore index 504b995..e3d1207 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -3,5 +3,5 @@ main.elf main.bin main main.exe -static/ -*.bin +static/*.bin + diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index 001a459..fbb230c 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -51,22 +51,13 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {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}, + {//player {0x0,0x0,0x0}, + {0x1,0x1,0x1}, + {0x4,0x2,0x5}, + {0x7,0x3,0x6}, + {0x1,0x1,0x3}, + {0xe,0xe,0xe}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, { @@ -87,6 +78,15 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, + {//white + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}}, { {0x0,0xf,0xf}, {0xf,0xf,0xf}, diff --git a/src/static/background/tilemap.hex b/src/static/background/tilemap.hex new file mode 100644 index 0000000..446f3dd --- /dev/null +++ b/src/static/background/tilemap.hex @@ -0,0 +1,514 @@ +;TODO split up file +;Tilemap (all current tiles) +0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0100: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0110: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0120: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0130: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0140: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0150: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0160: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0170: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0180: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02 +0190: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +01a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +01b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +01c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +01d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02 +0200: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0210: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0220: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0240: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0260: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +02c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0300: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0310: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0320: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0330: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0340: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0350: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0360: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0370: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0380: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0390: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06 +03c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +03f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0400: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0410: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0420: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0430: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0440: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0450: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0460: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0470: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0480: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0490: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +04a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +04b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +04c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03 +04d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 +0500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0530: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0540: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0550: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0560: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0570: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0580: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0590: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +05a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +05b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +05c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +05d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +05e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +05f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0600: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0610: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0620: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0630: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0640: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0650: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0660: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0670: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0680: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0690: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06 +06c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +06d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0700: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0710: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0720: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0730: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0740: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0750: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0760: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0770: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0780: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0790: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +07a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +07b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +07c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +07d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +07e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +07f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0800: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0810: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0820: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0830: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0840: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0850: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0860: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0870: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0880: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0890: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +08a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +08b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +08c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +08d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +08e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +08f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0900: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0910: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0920: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0930: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0940: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0950: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0960: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0970: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0980: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0990: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +09c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +09d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +09e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +09f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0a00: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0a10: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0a20: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0a30: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0a40: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0a50: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a60: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a70: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0a80: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0a90: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0aa0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0ab0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0ac0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +0ad0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +0ae0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +0af0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0b00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0b10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0b70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0b90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0ba0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0bc0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +0bd0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +0be0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +0bf0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0c00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0c10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0c20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0c30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0c40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0c50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0c80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0c90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0ca0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0cb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +0cc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +0cd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +0ce0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +0cf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0d00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06 +0d10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06 +0d20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06 +0d30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06 +0d40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06 +0d50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05 +0d80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0db0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06 +0dc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0dd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0de0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05 +0df0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05 +0e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0e60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05 +0e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0eb0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06 +0ec0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06 +0ed0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05 +0ee0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05 +0ef0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05 +0f00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0f30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0f40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0f50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0f80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0f90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fa0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06 +0fc0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06 +0fd0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05 +0fe0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06 +0ff0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06 +1000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +10a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +10b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +10c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04 +10d0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04 +10e0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04 +10f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1100: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1110: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +11a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +11b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +11c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03 +11d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03 +11e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03 +11f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1200: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05 +1210: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05 +1220: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05 +1230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +12a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +12b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +12c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +12d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +12e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +12f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1300: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1310: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03 +1320: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1330: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1340: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1350: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1360: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1370: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1380: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1390: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +13a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +13b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +13c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +13d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +13e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +13f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1400: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1410: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1420: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1430: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1440: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1450: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1460: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1470: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1480: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1490: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1530: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01 +1540: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02 +1550: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02 +1560: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1570: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1580: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01 +1590: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01 +15a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01 +15b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +15c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01 +15d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01 +15e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01 +15f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1640: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1650: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1660: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1680: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1690: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +16a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01 +16b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1730: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 +1740: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03 +1750: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03 +1760: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03 +1770: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1780: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1790: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02 +17a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02 +17b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +17c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03 +17d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03 +17e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03 +17f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1800: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01 +1810: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01 +1820: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01 +1830: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1840: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1850: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1860: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01 +1870: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1880: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +1890: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +18a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01 +18b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +18c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01 +18d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01 +18e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01 +18f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1900: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1910: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03 +1920: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03 +1930: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1940: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1950: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1960: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03 +1970: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1980: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02 +1990: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02 +19a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02 +19b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +19c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03 +19d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03 +19e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03 +19f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1a00: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01 +1a10: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01 +1a20: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02 +1a30: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1a40: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02 +1a50: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02 +1a60: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1a70: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1a80: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01 +1a90: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01 +1aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +1ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1b00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 +1b30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01 +1b40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1b50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1b60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1b90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +1ba0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01 +1bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1c00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1c10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03 +1c20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03 +1c30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1c40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03 +1c50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03 +1c60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03 +1c70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1c80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1c90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02 +1ca0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02 +1cb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1cc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1cd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ce0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1cf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d10: 00 00 01 01 01 01 01 00 00 00 01 01 01 00 00 00 +1d20: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d30: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d40: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d50: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d60: 00 00 00 00 01 00 00 00 00 00 01 01 01 00 00 00 +1d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d80: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1d90: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1da0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1db0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dc0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dd0: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1df0: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00 +1e00: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1e10: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e20: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e30: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e40: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e50: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e60: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e70: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e80: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e90: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1eb0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ec0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ed0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ee0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ef0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f30: 00 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 +1f40: 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00 +1f50: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f60: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f70: 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 +1f80: 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 +1f90: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +1fa0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fe0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 diff --git a/src/static/foreground/slime.hex b/src/static/foreground/slime.hex new file mode 100644 index 0000000..ce20533 --- /dev/null +++ b/src/static/foreground/slime.hex @@ -0,0 +1,24 @@ +;slime sprite +;indices: 4 +;23 32 56 +;25 51 45 +;70 130 50 +;117 167 67 + +00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +40: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 +50: 00 00 00 01 03 03 03 03 03 03 01 00 00 00 00 00 +60: 00 00 01 03 03 03 03 03 03 03 03 01 00 00 00 00 +70: 00 01 03 03 03 03 03 03 03 01 02 03 01 00 00 00 +80: 01 03 03 03 01 02 03 03 03 01 01 03 03 01 00 00 +90: 01 03 03 03 01 01 03 03 03 03 03 03 03 03 01 00 +a0: 01 03 03 03 03 03 03 03 02 03 03 03 03 03 02 01 +b0: 01 02 03 03 03 03 03 03 03 03 03 03 03 02 02 01 +c0: 00 01 02 03 03 03 03 03 03 03 03 02 02 02 02 01 +d0: 00 00 01 02 02 03 03 03 02 02 02 02 02 02 01 00 +e0: 00 00 00 01 02 02 02 02 02 02 02 02 02 01 00 00 +f0: 00 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 + diff --git a/src/static/title_screen_icon.hex b/src/static/title_screen_icon.hex new file mode 100644 index 0000000..a1e5f0b --- /dev/null +++ b/src/static/title_screen_icon.hex @@ -0,0 +1,119 @@ +;Main character icon for title screen +;indices: 4 +;23 32 56 +;16 20 31 +;64 39 81 +;122 54 123 + +0000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0040: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0050: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0060: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0070: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0080: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0090: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +01b0: 00 00 00 00 00 00 00 00 00 00 02 02 02 02 03 03 +01c0: 00 00 00 00 00 00 00 02 02 02 03 03 03 03 03 03 +01d0: 00 00 00 00 02 02 02 03 03 03 03 03 03 03 03 03 +01e0: 00 00 02 02 03 03 03 03 03 03 03 03 03 03 03 03 +01f0: 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +0220: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 +0230: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 +0240: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +0250: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +0260: 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 +0270: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +0280: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +0290: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +02a0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +02b0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +02c0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 01 +02d0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +02e0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +02f0: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +0300: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0310: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0320: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0330: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0340: 03 03 03 03 03 03 03 03 03 03 01 01 01 01 01 01 +0350: 03 03 03 03 03 03 03 01 01 01 01 01 01 01 01 01 +0360: 03 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +0370: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +0380: 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0390: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0400: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +0410: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +0420: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0430: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0440: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0450: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0460: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0470: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0480: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0490: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +04a0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +04b0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +04c0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +04d0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +04e0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +04f0: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +0500: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +0510: 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 01 +0520: 00 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 +0530: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +0540: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +0550: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +0560: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 +0580: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +0590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 +05a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 +05b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0600: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0610: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0620: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0640: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0650: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0660: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0680: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0690: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +06a0: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +06b0: 02 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +06c0: 00 02 02 03 03 03 03 01 01 01 01 01 01 01 01 01 +06d0: 00 00 00 02 02 02 03 03 03 03 03 03 01 01 01 01 +06e0: 00 00 00 00 00 00 02 02 02 02 02 03 03 03 03 03 +06f0: 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 diff --git a/src/static/title_screen_letteres_large.hex b/src/static/title_screen_letteres_large.hex new file mode 100644 index 0000000..fea1c77 --- /dev/null +++ b/src/static/title_screen_letteres_large.hex @@ -0,0 +1,230 @@ +;title screen letters (Large) +;indices: 3 +;23 32 56 +;165 48 48 +;207 87 60 + +0000: 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 02 02 01 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0100: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0110: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0120: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0130: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 01 +0140: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0150: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0160: 00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 +0170: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 +0180: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0190: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01a0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01b0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01c0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01d0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01e0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01f0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +0200: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0210: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0220: 00 00 00 00 00 00 01 01 01 01 00 00 00 00 00 00 +0230: 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 +0240: 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 +0250: 01 01 01 00 00 00 01 01 01 00 00 00 00 00 00 00 +0260: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0270: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0280: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0290: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02a0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02b0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02c0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02d0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02e0: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 +02f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0350: 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 00 +0360: 00 00 00 00 00 02 02 02 02 02 02 00 00 00 00 00 +0370: 00 00 00 00 02 02 02 02 02 02 02 02 00 00 00 00 +0380: 00 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 +0390: 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 00 +03a0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03b0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03c0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03d0: 00 00 02 02 02 02 02 02 02 02 02 02 01 01 00 00 +03e0: 00 00 02 02 02 02 02 02 02 02 01 01 01 01 00 00 +03f0: 00 00 02 02 02 02 02 01 01 01 01 01 01 01 00 00 +0400: 00 00 02 02 01 01 01 01 01 01 01 01 01 01 00 00 +0410: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0420: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0430: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0440: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0450: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0460: 00 00 01 01 01 01 01 01 01 01 01 01 01 00 00 00 +0470: 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00 +0480: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0490: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +04a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0500: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0510: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0520: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0530: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0540: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0550: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0560: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0580: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0590: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05b0: 00 00 00 00 00 02 02 02 02 00 00 00 02 02 00 00 +05c0: 00 00 00 00 02 02 02 02 02 02 00 00 02 02 00 00 +05d0: 00 00 00 00 02 02 02 00 00 00 02 00 02 02 00 00 +05e0: 00 00 00 02 02 02 00 00 00 00 00 02 02 02 00 00 +05f0: 00 00 00 02 02 00 00 00 00 00 00 02 02 02 00 00 +0600: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0610: 00 00 02 02 00 00 00 00 00 00 00 00 01 01 00 00 +0620: 00 00 02 01 00 00 00 00 00 00 00 00 01 01 00 00 +0630: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0640: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0650: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0660: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0670: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0680: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0690: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +06a0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06b0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06c0: 00 00 01 01 00 00 00 00 00 01 01 01 01 01 00 00 +06d0: 00 00 01 01 01 00 00 00 01 01 01 00 01 01 00 00 +06e0: 00 00 00 01 01 01 01 01 01 01 00 00 01 01 00 00 +06f0: 00 00 00 00 01 01 01 01 01 00 00 00 00 01 01 00 +0700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07b0: 00 02 02 00 00 00 00 00 00 00 00 00 00 02 02 00 +07c0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07d0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07e0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07f0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0800: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0810: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0820: 00 00 02 02 00 00 00 00 00 00 00 00 02 02 02 00 +0830: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0840: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0850: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0860: 00 00 00 02 02 00 00 00 00 00 00 00 02 01 00 00 +0870: 00 00 00 02 01 01 00 00 00 00 00 00 01 00 00 00 +0880: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 00 +0890: 00 00 00 00 01 01 00 00 00 00 00 01 01 00 00 00 +08a0: 00 00 00 00 01 01 01 00 00 00 00 01 01 00 00 00 +08b0: 00 00 00 00 00 01 01 00 00 00 00 01 00 00 00 00 +08c0: 00 00 00 00 00 01 01 01 00 00 01 01 00 00 00 00 +08d0: 00 00 00 00 00 00 01 01 00 00 01 00 00 00 00 00 +08e0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +08f0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +0900: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0910: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0920: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0930: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 02 00 +0940: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0950: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0960: 00 00 02 02 02 02 00 00 00 00 02 02 02 00 00 00 +0970: 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 00 +0980: 00 00 02 02 00 00 02 02 02 02 00 00 00 00 00 00 +0990: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00 +09a0: 00 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +09b0: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +09c0: 00 00 00 01 01 00 00 00 00 00 00 01 01 01 00 00 +09d0: 00 00 00 01 01 01 00 00 00 00 01 01 01 01 00 00 +09e0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +09f0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0a00: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 +0a10: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0a20: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a30: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a40: 00 00 00 00 02 00 00 00 00 00 00 00 00 02 02 00 +0a50: 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 00 +0a60: 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 +0a70: 00 00 00 01 02 02 02 00 00 00 00 00 02 02 01 00 +0a80: 00 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 +0a90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0aa0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ab0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ac0: 00 01 01 01 01 00 00 00 00 00 00 01 01 01 01 00 +0ad0: 00 00 01 01 01 01 01 00 01 01 01 01 01 01 01 00 +0ae0: 00 00 00 01 01 01 01 01 01 01 01 01 00 01 01 00 +0af0: 00 00 00 00 00 01 01 01 01 01 00 00 00 01 01 00 +0b00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0b10: 00 00 02 02 02 00 00 00 00 00 00 00 00 02 00 00 +0b20: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b30: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b40: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b50: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b60: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 01 00 +0b70: 00 02 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b80: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b90: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ba0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0bb0: 00 00 01 01 01 00 00 00 00 00 00 00 01 01 00 00 +0bc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 00 00 00 +0bd0: 00 00 00 01 01 01 01 01 00 00 01 01 01 00 00 00 +0be0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0bf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0c00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0c10: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c20: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c30: 00 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 +0c40: 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 00 +0c50: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c60: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c70: 00 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c80: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0ca0: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0cb0: 00 01 01 01 01 00 00 00 00 00 00 00 01 01 01 00 +0cc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 01 00 00 +0cd0: 00 00 00 01 01 01 00 00 00 01 01 01 01 00 00 00 +0ce0: 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 00 +0cf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0db0: 00 00 00 00 00 00 00 02 02 02 02 02 00 00 00 00 +0dc0: 00 00 00 00 00 00 02 02 02 02 02 02 02 00 00 00 +0dd0: 00 00 00 00 00 02 02 00 00 00 02 02 02 00 00 00 +0de0: 00 00 00 00 02 02 00 00 00 00 00 02 02 02 00 00 +0df0: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 diff --git a/test/bin/tilemap.pip b/test/bin/tilemap.pip deleted file mode 100644 index c0c646e..0000000 --- a/test/bin/tilemap.pip +++ /dev/null @@ -1,512 +0,0 @@ -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 -- cgit v1.2.3 From 0ede5beef926151dd6c6ce8b0810b26225dae895 Mon Sep 17 00:00:00 2001 From: "U-DESKTOP-MR3JJV2\\niels" Date: Wed, 15 Mar 2023 10:01:50 +0100 Subject: precautions --- src/.gitignore | 14 +-- src/engine/sprite_controller.h | 212 ++++++++++++++++++++--------------------- 2 files changed, 113 insertions(+), 113 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index 504b995..b0126dd 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,7 +1,7 @@ -*.o -main.elf -main.bin -main -main.exe -static/ -*.bin +*.o +main.elf +main.bin +main +main.exe +static/ +*.bin diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index 001a459..bb7e8d1 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -1,106 +1,106 @@ -#pragma once -#include - -#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); +#pragma once +#include + +#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); -- cgit v1.2.3 From 3891486b368f4cdd1c5e00019a2a66ca05e656e6 Mon Sep 17 00:00:00 2001 From: NielsCoding <48092678+heavydemon21@users.noreply.github.com> Date: Wed, 15 Mar 2023 15:37:21 +0100 Subject: game loop and bullet TODO game loop: -(startingscreen) read correct indexes -(shop) read correct indexes -gameplay still needs alot with different levels etc.. rest not yet done bullet needs testing and correct PAL and tilemap reading --- src/GameLoop/shop.c | 28 +++++++++++++++++++ src/GameLoop/shop.h | 15 ++++++++++ src/GameLoop/startingScreen.c | 30 ++++++++++++++++++++ src/GameLoop/startingScreen.h | 14 ++++++++++ src/demo.c | 62 ++++++++++++++++++++++++++++++++++++++---- src/engine/bullet.c | 39 ++++++++++++++++++++++++++ src/engine/bullet.h | 14 ++++++++++ src/engine/draw_screen.c | 49 ++++++++++++++++++++++++++++++++- src/engine/draw_screen.h | 5 ++++ src/engine/engine.c | 1 + src/engine/player_controller.c | 13 ++++++++- src/makefile | 6 +++- 12 files changed, 268 insertions(+), 8 deletions(-) create mode 100644 src/GameLoop/shop.c create mode 100644 src/GameLoop/shop.h create mode 100644 src/GameLoop/startingScreen.c create mode 100644 src/GameLoop/startingScreen.h create mode 100644 src/engine/bullet.c create mode 100644 src/engine/bullet.h diff --git a/src/GameLoop/shop.c b/src/GameLoop/shop.c new file mode 100644 index 0000000..31ff5ce --- /dev/null +++ b/src/GameLoop/shop.c @@ -0,0 +1,28 @@ +#include "shop.h" + + +bool hh_show_Shop(){ + static hh_e_ShopStates hh_e_Shop = hh_e_STATE_SHOW; + + switch (hh_e_Shop) + { + case hh_e_STATE_SHOW: + hh_setup_startingScreen(); + hh_e_Shop = hh_e_STATE_Input; + return false; + break; + case hh_e_STATE_Input: + if(g_hh_controller_p1.dpad_right){ + hh_e_Shop = hh_e_STATE_END; + } + break; + case hh_e_STATE_END: + hh_e_Shop = hh_e_STATE_SHOW; + return true; + break; + default: + hh_e_Shop = hh_e_STATE_SHOW; + break; + } + return false; +} diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h new file mode 100644 index 0000000..35bb780 --- /dev/null +++ b/src/GameLoop/shop.h @@ -0,0 +1,15 @@ +#include "input.h" +#include "engine/draw_screen.h" + + +#include +#include + +typedef enum { + hh_e_STATE_SHOW, + hh_e_STATE_Input, + hh_e_STATE_END +} hh_e_ShopStates; + + +bool hh_show_Shop(); diff --git a/src/GameLoop/startingScreen.c b/src/GameLoop/startingScreen.c new file mode 100644 index 0000000..a0cd283 --- /dev/null +++ b/src/GameLoop/startingScreen.c @@ -0,0 +1,30 @@ +#include "startingScreen.h" +#include "input.h" +#include "engine/draw_screen.h" +// #include "engine/player_controller.h" + +bool hh_show_startingScreen(){ + static hh_e_screenStates hh_e_startingScreen = hh_e_STATE_SHOW; + + switch (hh_e_startingScreen) + { + case hh_e_STATE_SHOW: + hh_setup_startingScreen(); + hh_e_startingScreen = hh_e_STATE_Input; + return false; + break; + case hh_e_STATE_Input: + if(g_hh_controller_p1.dpad_left){ + hh_e_startingScreen = hh_e_STATE_END; + } + break; + case hh_e_STATE_END: + hh_e_startingScreen = hh_e_STATE_SHOW; + return true; + break; + default: + hh_e_startingScreen = hh_e_STATE_SHOW; + break; + } + return false; +} diff --git a/src/GameLoop/startingScreen.h b/src/GameLoop/startingScreen.h new file mode 100644 index 0000000..f51cc66 --- /dev/null +++ b/src/GameLoop/startingScreen.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +typedef enum { + hh_e_STATE_SHOW, + hh_e_STATE_Input, + hh_e_STATE_END +} hh_e_screenStates; + + +bool hh_show_startingScreen(); + diff --git a/src/demo.c b/src/demo.c index 95347cb..f5b5c29 100644 --- a/src/demo.c +++ b/src/demo.c @@ -13,6 +13,17 @@ #include "engine/sprite_controller.h" +#include "GameLoop/startingScreen.h" +#include "GameLoop/shop.h" +// states +typedef enum { + hh_e_STATE_startingScreen, + hh_e_STATE_Shop, + hh_e_STATE_Gameplay, + hh_e_STATE_GameOver, + hh_e_STATE_HighScore +} hh_e_GameState; +hh_e_GameState hh_gameStates; hh_s_entity_player g_hh_player_1 = { .pos_x = 31000, // 0b0000 0001 0011 0110 @@ -45,18 +56,59 @@ typedef struct { hh_entity hh_g_player, hh_g_player_new; -void hh_demo_setup() { - +void hh_demo_setup() { hh_setup_palettes(); - hh_setup_screen(); + //hh_setup_screen(); } - void hh_demo_loop(unsigned long frame) { // hh_player_movement(); + switch (hh_gameStates) + { + case hh_e_STATE_startingScreen: - hh_player_actions(); + if(hh_show_startingScreen()){ + hh_gameStates = hh_e_STATE_Shop; + } + break; + case hh_e_STATE_Shop: + // TODO: + + if(hh_show_Shop()){ + hh_gameStates = hh_e_STATE_Gameplay; + } + // function: new level is chosen goto level + break; + case hh_e_STATE_Gameplay: + static int run_test=0; + if(!run_test){ + hh_setup_screen(); + run_test=1; + + } + else{ + hh_player_actions(); + } + // TODO: + // function: if level complete goto shop + // function: if player is dead goto game over + break; + case hh_e_STATE_GameOver: + // TODO: + // function: show game over screen + // function: after time goto high score + break; + case hh_e_STATE_HighScore: + // TODO: + // fucntion: show all previously scored points + // function: button pressed goto starting screen + break; + default: + hh_gameStates = hh_e_STATE_startingScreen; + break; + } + } diff --git a/src/engine/bullet.c b/src/engine/bullet.c new file mode 100644 index 0000000..eafd4e7 --- /dev/null +++ b/src/engine/bullet.c @@ -0,0 +1,39 @@ +#include "bullet.h" +#include "engine/sprite_controller.h" + +void shootBullet(vec2 playerPos, Bullet* bullet){ + // Set bullet's x and y coordinates to player's coordinates + bullet->x = playerPos.x; + bullet->y = playerPos.y; + // Set bullet's velocity to a fixed value + bullet->velocity = 1; + // Set bullet's status to active + bullet->isActive = true; +} +void updateBullet(Bullet* bullet, int deltaTime){ + // Only update bullet if it is active + static int latestLocationBullet = 0; + if (bullet->isActive) { + // Move bullet based on velocity and deltaTime + bullet->x += bullet->velocity * deltaTime; + drawBullet(bullet); + // Check if bullet has moved 16 pixels + if (bullet->x - latestLocationBullet > 16) { + // Set bullet's status to inactive + bullet->isActive = false; + } + } + else{ + latestLocationBullet = bullet->x; + } +} +void drawBullet(Bullet* bullet){ + + hh_ppu_update_foreground(1, (hh_s_ppu_loc_fam_entry) + { + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 7, + .tilemap_index = 2, // change tilemap to the correct foreground index; + }); +} diff --git a/src/engine/bullet.h b/src/engine/bullet.h new file mode 100644 index 0000000..f119829 --- /dev/null +++ b/src/engine/bullet.h @@ -0,0 +1,14 @@ +#pragma once +#include "player_controller.h" + +typedef struct { + int x; + int y; + int velocity; + int isActive; +} Bullet; + +//Bullet* createBullet(float x, float y, float velocity, float direction); +void shootBullet(vec2 playerPos, Bullet* bullet); +void updateBullet(Bullet* bullet, int deltaTime); +void drawBullet(Bullet* bullet); diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index c4f3389..205d4b6 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -19,7 +19,6 @@ uint8_t hh_world_to_tile(vec2 pos){ return tile; } - // remeber old value to know which part to update. vec2 previousViewport = { .x = 0, .y = 0 }; void hh_draw_screen(vec_cor viewport){ @@ -60,3 +59,51 @@ void hh_setup_screen(){ } free(tile); } + +void hh_setup_startingScreen(){ + int size = 300; // 40 x as tiles 30 y as tiles + FILE* level = fopen("../test/bin/startingScreen.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); +} + +void hh_setup_shopScreen(){ + int size = 300; // 40 x as tiles 30 y as tiles + FILE* level = fopen("../test/bin/shopScreen.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 index b181108..bfe8bf8 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -19,3 +19,8 @@ uint8_t hh_world_to_tile(vec2 pos); void hh_draw_screen(vec2 viewport); /** @brief send data to BAM memory from binary level */ void hh_setup_screen(); +/** @brief send starting screen data to BAM memory from binary level */ +void hh_setup_startingScreen(); + +/** @brief send shop screen data to BAM memory from binary level */ +void hh_setup_shopScreen(); diff --git a/src/engine/engine.c b/src/engine/engine.c index 799ee7c..3280892 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,4 +1,5 @@ #include "engine/draw_screen.h" +#include "engine/bullet.h"" #include "engine/level.h" #include "engine/maths.h" #include "engine/sprite_controller.h" diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 22f6eb6..f938844 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -3,7 +3,7 @@ #include "engine/draw_screen.h" #include "engine/sprite_controller.h" #include "engine/player_controller.h" - +#include "engine/bullet.h" #include "input.h" void hh_player_actions() { @@ -29,6 +29,17 @@ void hh_player_actions() { // 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) }; + + // shooting code + static Bullet bullet; + if(g_hh_controller_p1.button_primary){ + bullet.isActive = false; + shootBullet(player.vel, &bullet); + } + else{ + updateBullet(&bullet, 1); + + } // const int8_t maa = 3; // const int8_t mbb = -3; // if (g_hh_controller_p1.dpad_up) diff --git a/src/makefile b/src/makefile index d7d9087..94406ca 100644 --- a/src/makefile +++ b/src/makefile @@ -37,7 +37,11 @@ LOCAL_SRCS += main.c \ engine/draw_screen.c \ engine/camera.c \ engine/maths.c \ - engine/entity.c + engine/bullet.c \ + engine/entity.c \ + GameLoop/shop.c \ + GameLoop/startingScreen.c + CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) -- cgit v1.2.3 From 2588df5f89da62b857287344d6a7f2cc6951e938 Mon Sep 17 00:00:00 2001 From: NielsCoding <48092678+heavydemon21@users.noreply.github.com> Date: Wed, 15 Mar 2023 18:56:15 +0100 Subject: architecture docu --- .vscode/settings.json | 15 ++++++++++++++- assets/TopLevelArchi | 1 + assets/hh_introScreen.png | Bin 0 -> 130932 bytes docs/architecture.md | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 assets/TopLevelArchi create mode 100644 assets/hh_introScreen.png diff --git a/.vscode/settings.json b/.vscode/settings.json index d027762..7f37ba0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,18 @@ } }, "cmake.configureOnOpen": false, - "files.eol": "\n" + "files.eol": "\n", + "nrf-connect.topdir": "${nrf-connect.sdk:2.1.2}", + "nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.1.2}", + "files.associations": { + "input.h": "c", + "draw_screen.h": "c", + "camera.h": "c", + "entity.h": "c", + "stdint.h": "c", + "player_controller.h": "c", + "sprite_controller.h": "c", + "types.h": "c", + "startingscreen.h": "c" + } } diff --git a/assets/TopLevelArchi b/assets/TopLevelArchi new file mode 100644 index 0000000..bd8c538 --- /dev/null +++ b/assets/TopLevelArchi @@ -0,0 +1 @@ +zVdNc5swEP01PrYDFlD76NhpOtN0yowPSY8KbECtYD3y4o/++kpGfDuJkzp1fTG72hXSe29XYsTm2e5G8VX6DWOQo7ET70ZsMRqPXT9w9J/x7EvP1JuUjkSJ2AY1jqX4DdZp85JCxLDuBBKiJLHqOiPMc4io4+NK4bYb9oiy+9YVT2DgWEZcDr13IqbUet1g2gx8AZGk9tWT8adyIONVsN3JOuUxblsudj1ic4VI5VO2m4M04FW4lHmfnxitF6Ygp1MSvPAuyxcOfL1NQr8QyfebOPzg27XRvtowxHr/1kRFKSaYc3ndeK8UFnkMZlZHW03MLeJKO13t/AlEe0smLwi1K6VM2lG9YLW/t/kH44cxPvqVudi1Bxd7a5VrNQt8EgLrWmOhInhm38xKiasE6Jk4ryZKKxwwA70enadAchKb7jq4lVpSxzVs6AdLyCvIsYvccFnYN4WS70ENONPSWpnHIpOziFBprDagSGgZ3/IHkCGuBQnMdcgDEmGmA6QZuOLRr+TA5xylydOzscfDrzXHTIrE5JLht00kFiRFDvO69hqWTC7snudpiKtN8G3J2J7hVSW0bVWgY31pq/jcKvHsVHgDKnTDIYVSHqGjWyDbVBAsV/ygx63ukl0MzwAXG3fx8t0hXpNjcLnvBdf0om3F7bYV1vu90GUOVghKaChAnb/1BCe2HnbJ1hMM9L6MFED+32md+ZMLa72auIXVghO/OFK+00OKHemi4yNQ1fidH6rhiTZsFHk8M/c2bUWSr9ci6lX5TtB967l1ddBWU9PGeIeLg3di9brOcXJa4PtHsK98J1e5fUOIQu+k5t7rnaBBn9JynzarfWnsTdQXUcB6E5VADCY6yKPe9l8oZnjwvl4xT5wL//C6WfWIF2UTXFI1bp/s6RtV4/bl551LNdpsvpjK8Oa7k13/AQ== \ No newline at end of file diff --git a/assets/hh_introScreen.png b/assets/hh_introScreen.png new file mode 100644 index 0000000..8b6e192 Binary files /dev/null and b/assets/hh_introScreen.png differ diff --git a/docs/architecture.md b/docs/architecture.md index 5001eed..94f17a4 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,3 +1,38 @@ +# Hooded Havic: Miniboss Mania +![intro arcade game](../assets/hh_introScreen.png) + +# introduction +Welcome to Hooded Havoc: Miniboss Mania, an exciting 2D platformer game created by our team Joshua, Loek, Bjorn, Frenk and Niels! This game was developed using the STM32 microcontroller as the game engine and the FPGA as the Picture Processing Unit (PPU). + +In Hooded Havoc: Miniboss Mania, you will take on the role of a brave hero who must battle through multiple levels filled with challenging obstacles and formidable minibosses. With smooth gameplay and engaging graphics, you will feel immersed in a world of adventure and excitement. + +Our use of the STM32 microcontroller and FPGA PPU allowed us to create a unique and innovative gaming experience. The STM32 provides efficient and reliable processing power, while the FPGA ensures that our graphics are rendered smoothly and accurately. + +So get ready to embark on a thrilling journey through Hooded Havoc: Miniboss Mania, and see how far you can make it! +## Objective +The objective of Hooded Havoc: Miniboss Mania is to guide the hero through multiple levels, defeating minibosses and overcoming obstacles along the way. The ultimate goal is to reach the final boss and defeat them to retrieve the stolen staff. + +To achieve this objective, the player must use their platforming skills to jump, run, and dodge obstacles while also battling enemies and minibosses. Each level presents a unique challenge that will require the player to adapt and strategize to overcome. + +As the player progresses through the game, they will unlock new abilities and power-ups that will aid them in their journey. The player must use these abilities wisely to defeat the minibosses and ultimately save the world. + +So, the objective of Hooded Havoc: Miniboss Mania is not only to provide an exciting and engaging gaming experience but also to challenge players to use their skills and strategic thinking to overcome obstacles and emerge victorious. +## Problem statement +One potential problem that could arise in the development of Hooded Havoc: Miniboss Mania is related to the PPU and communication between the STM32 and PPU. + +The PPU is responsible for rendering the graphics and displaying them on the screen, while the STM32 is responsible for processing the game logic and input from the player. However, if there is a problem with the communication between these two components, it could lead to synchronization issues and graphical glitches that could affect the player's experience. + +For example, if the PPU is unable to keep up with the processing speed of the STM32, the graphics may lag or appear distorted, causing the game to become unplayable. Similarly, if there is a delay in communication between the STM32 and PPU, it could result in a mismatch between the game logic and the displayed graphics, leading to confusion for the player. + +To ensure a smooth and enjoyable gaming experience, it is essential to address any potential issues with the PPU and communication between the STM32 and PPU during the development process. This may involve optimizing the code for both components, adjusting the communication protocol, or adding buffer systems to prevent lag or synchronization issues. +### architecture ( top level) +![Top level architecture](../assets/TopLevelArchi); + + + + +### design document (mid-low level) + # General system architecture ![Top-down system architecture diagram](../assets/architecture-level-1.svg) -- cgit v1.2.3 From e79c36460f400991caa82598499c0ea7c37ebb90 Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Wed, 15 Mar 2023 18:58:25 +0100 Subject: Player-Enemy collision Added player with enemy collision. Also changed input system to a vector system with friction and gravity. Jump also works. Enemy is 1 stationary object. --- src/demo.c | 175 +++++++---------------------------------- src/engine/entity.c | 81 +++++++++++++++++++ src/engine/entity.h | 25 ++++++ src/engine/player_controller.c | 155 +++++++++++++++++++++++++++--------- src/ppusim/input.c | 1 + 5 files changed, 253 insertions(+), 184 deletions(-) diff --git a/src/demo.c b/src/demo.c index baaf73d..d4d1bf7 100644 --- a/src/demo.c +++ b/src/demo.c @@ -1,26 +1,21 @@ #include #include "demo.h" -#include "entity.h" #include "input.h" +#include "entity.h" #include "ppu/ppu.h" -#define HH_DEMO_BALL_COUNT 1 -hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; +#include "engine/maths.h" +#include "engine/camera.h" +#include "engine/entity.h" +#include "engine/draw_screen.h" +#include "engine/player_controller.h" +#include "engine/sprite_controller.h" -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_x = 1000; // 0b0000 0001 0011 0110 uint16_t g_hh_pos_y; uint8_t g_hh_left = 0; uint8_t g_hh_right = 0; @@ -29,67 +24,29 @@ uint8_t g_hh_down = 0; uint8_t g_hh_pos_x_bit[2]; uint8_t g_hh_pos_y_bit[2]; uint8_t g_hh_data_send[3]; -int g_hh_tile_x; +int g_hh_tile_size = 8; int g_hh_tile_y; -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; - } -} - -void hh_demo_loop(unsigned long frame) { - hh_player_movement(); - // input testing (no hitbox stuff) - // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R - // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U +typedef struct { + vec2 pos; + uint8_t idx; +}hh_s_tiles; - // adjust map size - g_hh_pos_x = g_hh_player_1.pos_x / 100; - g_hh_pos_y = g_hh_player_1.pos_y / 100; +hh_entity hh_g_player, hh_g_player_new; +void hh_demo_setup() { + hh_setup_palettes(); + hh_setup_screen(); +} - // update player sprite on ppu - g_hh_demo_balls[0].position_x = g_hh_pos_x; - g_hh_demo_balls[0].position_y = g_hh_pos_y; - hh_ppu_update_foreground(0, g_hh_demo_balls[0]); +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, - }); + + hh_player_actions(); + } // void sendData(uint8_t address, uint16_t data) { @@ -103,84 +60,8 @@ void hh_demo_loop(unsigned long frame) { // 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/engine/entity.c b/src/engine/entity.c index 153e7e1..535759d 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -43,4 +43,85 @@ void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ // entity->vel.x = 0; // } } +hh_entity hh_background_collision (hh_entity temp_old_entity,hh_entity temp_new_entity){ + temp_old_entity.is_grounded = false; + +// solves x collision + if (temp_old_entity.vel.x <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_old_entity.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_old_entity.pos.y + 15}))) { + temp_new_entity.pos.x = (temp_new_entity.pos.x & ~15) + 16, + temp_new_entity.vel.x = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 16, .y=temp_old_entity.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 16, .y=temp_old_entity.pos.y + 15}))) { + temp_new_entity.pos.x = temp_new_entity.pos.x & ~15, // <-- magic comma, NOT TOUCHY + temp_new_entity.vel.x = 0; + } + } + + //solves y collision + if (temp_old_entity.vel.y <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_new_entity.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 15, .y=temp_new_entity.pos.y + 0}))) { + temp_new_entity.pos.y = (temp_new_entity.pos.y & ~15) + 16, + temp_new_entity.vel.y = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_new_entity.pos.y + 15})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 15, .y=temp_new_entity.pos.y + 15}))) { + temp_new_entity.pos.y = temp_new_entity.pos.y & ~15, + temp_new_entity.vel.y = 0; + temp_old_entity.is_grounded = true; + } + } + temp_old_entity.pos = temp_new_entity.pos; + temp_old_entity.vel = temp_new_entity.vel; + return temp_old_entity; +} + +hh_entity hh_enemy_collision(hh_entity temp_player, hh_entity temp_enemy){ + + bool collide = hh_distance_circles( temp_player.pos, temp_enemy.pos, temp_player.radius, temp_enemy.radius); + + if (collide == true && temp_player.is_hit == false) + { + temp_player.is_hit = true; + //angle = atan2( tempEntity.pos_y - tempPlayer.pos_y, tempEntity.pos_x - tempPlayer.pos_x); + if(temp_player.pos.x <= temp_enemy.pos.x) //player left of enemy -- creates flinch movement L or R + { + // printf("BONK-left!/n"); + temp_player.vel.y = -5; + temp_player.vel.x = -8; + } else { + // printf("BONK-right!/n"); + temp_player.vel.y = -5; + temp_player.vel.x = 8; + } + // ghost mode / invulnerable or other things on hit + // temp_player.hp--; + + } else { + temp_player.is_hit = false; + + } + + +return temp_player; +} + + +bool hh_distance_circles (vec2 object_1, vec2 object_2, int radius_1, int radius_2){ + int a_squared = (object_1.x - object_2.x) * (object_1.x - object_2.x); + int b_squared = (object_1.y - object_2.y) * (object_1.y - object_2.y); + int c_squared = a_squared + b_squared; + int radius = ( radius_1 + radius_2) * ( radius_1 + radius_2 ); + + if( c_squared <= radius ){ + return true; + } else { + return false; + } +} diff --git a/src/engine/entity.h b/src/engine/entity.h index f45dae2..cad6ba4 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -2,6 +2,7 @@ #include #include +#include #include "ppu/types.h" @@ -32,6 +33,8 @@ typedef struct { typedef struct { vec2 pos, vel, vec; bool is_grounded; + bool is_hit; + uint8_t radius; int8_t hp; int8_t speed; hh_s_rendering render; @@ -55,3 +58,25 @@ bool hh_collision(vec2 pos1, vec2 pos2); /// @param entity position /// @return solved new entity position void hh_solve_collision(vec2 pos_environment, hh_entity* entity); + +/// @brief solve collision of entity with background tiles +/// @param temp_old_entity old data of entity +/// @param temp_new_entity new data of entity where it wants to go to +/// @return updated new entity where it actually can go to +hh_entity hh_background_collision (hh_entity temp_old_entity, hh_entity temp_new_entity); + +/// @brief solve collision of player with enemy +/// @param temp_player data of player +/// @param temp_enemy data of enemy +/// @return updated player with new stats if hitted with enemy +hh_entity hh_enemy_collision(hh_entity temp_player, hh_entity temp_enemy); + +/// @brief calculate if circles (entity) hit each other +/// @param object_1 position of first object (entity) +/// @param object_2 position of second object (entity) +/// @param radius_1 radius of first object (entity) +/// @param radius_2 radius of second object (entity) +/// @return true if objects collids +bool hh_distance_circles (vec2 object_1, vec2 object_2, int radius_1, int radius_2); + + diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 22f6eb6..d351bee 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -11,6 +11,8 @@ void hh_player_actions() { .hp = 4, .speed = 6, .is_grounded = false, + .is_hit = false, + .radius = 8, .pos = (vec2){32,32}, .vel = (vec2){0,0}, .vec = (vec2){0,0}, @@ -26,9 +28,113 @@ void hh_player_actions() { } }, player_new = {0}; + + static hh_entity enemy={ + .hp = 4, + .speed = 6, + .is_grounded = false, + .is_hit = false, + .radius = 8, + .pos = (vec2){128,48}, + .vel = (vec2){0,0}, + .vec = (vec2){0,0}, + .render = { + .frame0 = 20, + .palette = 7, + .fam = (hh_s_ppu_loc_fam_entry){ + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 7, + .tilemap_index = 1, + } + } + }; + player_new = player; // hh_input_read(); + static uint8_t hit = 0; + int8_t hit_timer = 0; + int8_t direction_x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); + int8_t direction_y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); + + if(player.is_hit == true){ + hit_timer = 9; + player.is_hit = false; + } + if(hit_timer > -10){ + hit_timer--; + } + + if(hit_timer <= 0){ + if(direction_x != 0){ + if(player.vel.x > -1 * player.speed && player.vel.x < player.speed) { + player.vel.x = player.vel.x + direction_x; + } else { + if (player.vel.x > 0) { + player.vel.x--; + } else if(player.vel.x < 0) { + player.vel.x++; + } + } + } else { + if (player.vel.x > 0) { + player.vel.x--; + } else if(player.vel.x < 0) { + player.vel.x++; + } + } + + /* // movement Y (w-s) disable gravity to use this + if(direction_y != 0){ + if(player.vel.y > -4 && player.vel.y < 4 ) { + player.vel.y = player.vel.y + direction_y; + } + } else { + if (player.vel.y > 0) { + player.vel.y--; + } else if(player.vel.y < 0) { + player.vel.y++; + } + } + + */ + } else { + if (player.vel.x > 0) { + player.vel.x--; + } else if(player.vel.x < 0) { + player.vel.x++; + } + player.vel.y++; + } + + + if (g_hh_controller_p1.button_primary && player.is_grounded == true) {//JUMP + player.vel.y = -10; + player.is_grounded = false; + } else if (player.vel.y < 6){ + player.vel.y += 1; //gravity + } + + + + +/* player.vel = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right), .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) }; + + player_new.vel = (vec2){ + .x = player.vel.x, + .y = player.vel.y, + }; +*/ + + player_new.vel = (vec2){ + .x = player.vel.x, + .y = player.vel.y, + }; + + player_new = hh_enemy_collision(player, enemy); + + // const int8_t maa = 3; // const int8_t mbb = -3; // if (g_hh_controller_p1.dpad_up) @@ -55,8 +161,8 @@ void hh_player_actions() { // 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, + .x = player.pos.x + player_new.vel.x, + .y = player.pos.y + player_new.vel.y, }; @@ -96,41 +202,10 @@ void hh_player_actions() { // 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; + + player = hh_background_collision ( player, player_new); + + //player = player_new; vec_cor cam_pos;//value in tiles // cam_pos = (vec2){0,0}; @@ -141,10 +216,16 @@ void hh_player_actions() { player.render.fam.position_x = (player.pos.x-cam_pos.x); player.render.fam.position_y = (player.pos.y-cam_pos.y); + enemy.render.fam.position_x = (enemy.pos.x-cam_pos.x); + enemy.render.fam.position_y = (enemy.pos.y-cam_pos.y); player.render.fam.tilemap_index = 2;//TODO: these two lines should be redundant player.render.fam.palette_index = 7; hh_ppu_update_foreground(0, player.render.fam); + hh_ppu_update_foreground(1, enemy.render.fam); + } + + diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 08bc382..5323fb1 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,4 +12,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; + g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_SPACE]; } -- cgit v1.2.3 From 2346a009fefb6e880bd7a36bb132cad833185080 Mon Sep 17 00:00:00 2001 From: NielsCoding <48092678+heavydemon21@users.noreply.github.com> Date: Wed, 15 Mar 2023 19:46:54 +0100 Subject: bob --- assets/TopLevel.PNG | Bin 0 -> 13919 bytes assets/TopLevelArchi | 1 - docs/BobSprint2.md | 19 +++++++++++++++++++ docs/architecture.md | 3 ++- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 assets/TopLevel.PNG delete mode 100644 assets/TopLevelArchi create mode 100644 docs/BobSprint2.md diff --git a/assets/TopLevel.PNG b/assets/TopLevel.PNG new file mode 100644 index 0000000..2a7b16d Binary files /dev/null and b/assets/TopLevel.PNG differ diff --git a/assets/TopLevelArchi b/assets/TopLevelArchi deleted file mode 100644 index bd8c538..0000000 --- a/assets/TopLevelArchi +++ /dev/null @@ -1 +0,0 @@ -zVdNc5swEP01PrYDFlD76NhpOtN0yowPSY8KbECtYD3y4o/++kpGfDuJkzp1fTG72hXSe29XYsTm2e5G8VX6DWOQo7ET70ZsMRqPXT9w9J/x7EvP1JuUjkSJ2AY1jqX4DdZp85JCxLDuBBKiJLHqOiPMc4io4+NK4bYb9oiy+9YVT2DgWEZcDr13IqbUet1g2gx8AZGk9tWT8adyIONVsN3JOuUxblsudj1ic4VI5VO2m4M04FW4lHmfnxitF6Ygp1MSvPAuyxcOfL1NQr8QyfebOPzg27XRvtowxHr/1kRFKSaYc3ndeK8UFnkMZlZHW03MLeJKO13t/AlEe0smLwi1K6VM2lG9YLW/t/kH44cxPvqVudi1Bxd7a5VrNQt8EgLrWmOhInhm38xKiasE6Jk4ryZKKxwwA70enadAchKb7jq4lVpSxzVs6AdLyCvIsYvccFnYN4WS70ENONPSWpnHIpOziFBprDagSGgZ3/IHkCGuBQnMdcgDEmGmA6QZuOLRr+TA5xylydOzscfDrzXHTIrE5JLht00kFiRFDvO69hqWTC7snudpiKtN8G3J2J7hVSW0bVWgY31pq/jcKvHsVHgDKnTDIYVSHqGjWyDbVBAsV/ygx63ukl0MzwAXG3fx8t0hXpNjcLnvBdf0om3F7bYV1vu90GUOVghKaChAnb/1BCe2HnbJ1hMM9L6MFED+32md+ZMLa72auIXVghO/OFK+00OKHemi4yNQ1fidH6rhiTZsFHk8M/c2bUWSr9ci6lX5TtB967l1ddBWU9PGeIeLg3di9brOcXJa4PtHsK98J1e5fUOIQu+k5t7rnaBBn9JynzarfWnsTdQXUcB6E5VADCY6yKPe9l8oZnjwvl4xT5wL//C6WfWIF2UTXFI1bp/s6RtV4/bl551LNdpsvpjK8Oa7k13/AQ== \ No newline at end of file diff --git a/docs/BobSprint2.md b/docs/BobSprint2.md new file mode 100644 index 0000000..6fff8fc --- /dev/null +++ b/docs/BobSprint2.md @@ -0,0 +1,19 @@ + + +# Proud of +Simulation: We're proud of the simulation that we created to test our game because it allows us to identify and address potential issues before the game is released. This helps ensure that the game is as polished and bug-free as possible. + +PPU: Our use of an FPGA-based PPU (Picture Processing Unit) in our game engine allows us to achieve high-quality graphics and smooth animation. This is important because it helps create an immersive and engaging gaming experience. + +Upscaling: We've implemented a sophisticated upscaling that allows us to scale up our game. This Ensures that our game runs smoothly and without any + +Collisions: We've put a lot of effort into making sure that our collision detection system is accurate and reliable. This ensures that the game mechanics work as intended and that players are able to navigate the game world without frustration. + +Artwork: We're proud of the artwork that was created which is stunning and imaginative artwork that brings the game world to life. From character designs to background artwork, every aspect of the game has been given careful attention to ensure that it looks as good as it plays. And more is coming! +# Challegens +Upscaling: While our upscaling algorithm is sophisticated, one of the challenges we faced was synchronization. Because we're upscaling in real-time, we had to ensure that the upscaling process didn't cause any lag or delay in the game. This required careful optimization of the algorithm and synchronization with other game components. + +PPU: While the use of an FPGA-based PPU allowed us to achieve high-quality graphics, it also presented some challenges. Specifically, the limited resources of the FPGA required us to optimize the PPU code to ensure that it could handle the demands of real-time gameplay. + +Communication bug fixes on the STM32: As with any complex system, we encountered some bugs in the communication between the STM32 microcontroller and the other components of the system. This required careful debugging and troubleshooting to identify and fix the issues. + diff --git a/docs/architecture.md b/docs/architecture.md index 94f17a4..d4632b5 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -25,8 +25,9 @@ The PPU is responsible for rendering the graphics and displaying them on the scr For example, if the PPU is unable to keep up with the processing speed of the STM32, the graphics may lag or appear distorted, causing the game to become unplayable. Similarly, if there is a delay in communication between the STM32 and PPU, it could result in a mismatch between the game logic and the displayed graphics, leading to confusion for the player. To ensure a smooth and enjoyable gaming experience, it is essential to address any potential issues with the PPU and communication between the STM32 and PPU during the development process. This may involve optimizing the code for both components, adjusting the communication protocol, or adding buffer systems to prevent lag or synchronization issues. + ### architecture ( top level) -![Top level architecture](../assets/TopLevelArchi); +![Top level architecture](../assets/TopLevel.PNG.); -- cgit v1.2.3 From 6a70bf52bc2ed5d28b7d08854fabfaee27be3e84 Mon Sep 17 00:00:00 2001 From: NielsCoding <48092678+heavydemon21@users.noreply.github.com> Date: Wed, 15 Mar 2023 20:08:12 +0100 Subject: architecture and design --- docs/architecture.md | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index d4632b5..cf4440f 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -26,14 +26,40 @@ For example, if the PPU is unable to keep up with the processing speed of the ST To ensure a smooth and enjoyable gaming experience, it is essential to address any potential issues with the PPU and communication between the STM32 and PPU during the development process. This may involve optimizing the code for both components, adjusting the communication protocol, or adding buffer systems to prevent lag or synchronization issues. -### architecture ( top level) +# architecture ( top level) ![Top level architecture](../assets/TopLevel.PNG.); - - - -### design document (mid-low level) - +## STM32 +### game engine +### user input +### PPU communication +### APU communication +### level editing pipeline + +## FPGA (PPU) +### PPU +### SPI +### APU + +## Screen +### VGA + + +# design document (mid-low level) +## STM32 +### game engine +### user input +### PPU communication +### APU communication +### level editing pipeline + +## FPGA (PPU) +### PPU +### SPI +### APU + +## Screen +### VGA # General system architecture ![Top-down system architecture diagram](../assets/architecture-level-1.svg) -- cgit v1.2.3 From 623bcb03aead264b412bcba9fed75df22e115fab Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Wed, 15 Mar 2023 20:44:06 +0100 Subject: added title screen --- src/engine/draw_screen.c | 33 +- src/engine/draw_screen.h | 5 + src/engine/sprite_controller.c | 4 +- src/engine/sprite_controller.h | 31 +- src/engine/title_screen.c | 93 +++++ src/engine/title_screen.h | 3 + src/makefile | 3 +- src/static/background/shop.hex | 331 +++++++++++++++ src/static/background/shop_ext.hex | 459 +++++++++++++++++++++ src/static/background/title_screen_icon.hex | 102 +++++ .../foreground/title_screen_letteres_large.hex | 230 +++++++++++ src/static/title_screen_icon.hex | 119 ------ src/static/title_screen_letteres_large.hex | 230 ----------- 13 files changed, 1278 insertions(+), 365 deletions(-) create mode 100644 src/engine/title_screen.c create mode 100644 src/engine/title_screen.h create mode 100644 src/static/background/shop.hex create mode 100644 src/static/background/shop_ext.hex create mode 100644 src/static/background/title_screen_icon.hex create mode 100644 src/static/foreground/title_screen_letteres_large.hex delete mode 100644 src/static/title_screen_icon.hex delete mode 100644 src/static/title_screen_letteres_large.hex diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index c4f3389..58553bd 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -2,8 +2,8 @@ #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 */ + //TODO: remove magic file name here + FILE* level = fopen("static/tiles.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ fprintf(stderr, "Error: Failed to open file.\n"); return 0; @@ -39,9 +39,10 @@ void hh_draw_screen(vec_cor 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 */ + //TODO: remove magic file name here + FILE* level = fopen("static/level1_test.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ - fprintf(stderr, "Error: Failed to open file.\n"); + fprintf(stderr, "Error: Failed to open level file.\n"); return; } fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET); @@ -60,3 +61,27 @@ void hh_setup_screen(){ } free(tile); } + +void hh_clear_screen(){ + // (HH_PPU_SCREEN_HEIGHT*HH_PPU_SCREEN_WIDTH)/(HH_PPU_SPRITE_HEIGHT*HH_PPU_SPRITE_WIDTH) + for (int i = 0; i < HH_PPU_BG_CANVAS_TILES_H*HH_PPU_BG_CANVAS_TILES_V; i++) { + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false,.horizontal_flip = false, + .palette_index = 3,.tilemap_index = 0 + }; + hh_ppu_update_background(i,temp); + hh_ppu_update_color(3,0,(hh_ppu_rgb_color_t){0x0,0x0,0x0}); + } + hh_ppu_update_aux((hh_s_ppu_loc_aux){ + .bg_shift_x = 0, + .bg_shift_y = 0, + .fg_fetch = 0, + .sysreset = 0, + }); +} + +void hh_clear_sprite(){ + for (int i = 0; i < HH_PPU_FG_SPRITE_COUNT; i++) { + hh_ppu_update_sprite(i,(hh_s_ppu_loc_sprite){0}); + } +} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index b181108..95765e5 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -3,6 +3,7 @@ // every function call for drawing the screen goes here. #include "engine/maths.h" +#include "ppu/consts.h" #include "ppu/ppu.h" #include @@ -19,3 +20,7 @@ uint8_t hh_world_to_tile(vec2 pos); void hh_draw_screen(vec2 viewport); /** @brief send data to BAM memory from binary level */ void hh_setup_screen(); +/** @brief send black screen to background memory */ +void hh_clear_screen(); +/** @brief clears all sprite data */ +void hh_clear_sprite(); diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c index 5d93cf8..b38b647 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -10,11 +10,13 @@ uint8_t hh_get_palette(uint8_t tile_idx) { } void hh_setup_palettes(){ + //TODO: use simpler function for (int idx = 0; idx < HH_PPU_PALETTE_COUNT; idx++) { for (int col = 0; col < HH_PPU_PALETTE_COLOR_COUNT; col++) { hh_ppu_update_color(idx,col,hh_g_palette[idx][col]); } - } + } + // hh_ppu_update_palette_table(hh_g_palette); } bool hh_colidable(uint8_t tile_idx){ diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index fbb230c..c6ebc93 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -11,14 +11,25 @@ //TODO: pack data inside of sprite_palette LUT //HH_PPU_PALETTE_COUNT -#define HH_SPRITE_COUNT 40 +#define HH_SPRITE_COUNT 80 #define HH_PAL_IDX_SKY 0 #define HH_PAL_IDX_BRICK 1 const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { + //TODO: make a buffer of 16 no-collider sprites (instead of the current 1) 0,1,1,1,1,1,1,1,1,1, //1+9 1,1,1,1,1,1,1,1,1,1, //6+4 1,1,1,1,1,1,1,1,1, //9 - 7,7,7,2,7,7,1,2,7 + 7,7,7,2,7,7,1,2,7, + 7,7,7,7, //?? + + 7,6,6,6,6,6,6,6, //baskets + 7,7,7,7,7,7,7,7,7,7, //shop + 7,7,7,7,7, //shop + 6,6,6,6,6, //(hi-)score + + 3,3,3,3,3,3, //title_screen icon + 6,6,6,6,/*6,6,6,6,6,6, //title_screen large letters + 6,6,6,6,*/ //other palettes here: }; @@ -51,14 +62,14 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, - {//player + {//player //TODO: use one less color && update player indexed sprites {0x0,0x0,0x0}, {0x1,0x1,0x1}, {0x4,0x2,0x5}, - {0x7,0x3,0x6}, - {0x1,0x1,0x3}, - {0xe,0xe,0xe}, - {0x0,0x0,0x0}, + {0x7,0x3,0x7}, + {0x1,0x1,0x3}, + {0xe,0xe,0xe}, + {0x0,0x0,0x0}, {0x0,0x0,0x0}}, { {0x0,0x0,0x0}, @@ -69,7 +80,7 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, - { + {//elemental {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}, @@ -79,7 +90,7 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}}, {//white - {0xf,0xf,0xf}, + {0x1,0x2,0x3}, {0xf,0xf,0xf}, {0xf,0xf,0xf}, {0xf,0xf,0xf}, @@ -87,7 +98,7 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0xf,0xf,0xf}, {0xf,0xf,0xf}, {0xf,0xf,0xf}}, - { + {//Dev palette (7) {0x0,0xf,0xf}, {0xf,0xf,0xf}, {0xf,0x0,0xf}, diff --git a/src/engine/title_screen.c b/src/engine/title_screen.c new file mode 100644 index 0000000..9c7ed48 --- /dev/null +++ b/src/engine/title_screen.c @@ -0,0 +1,93 @@ +#include "ppu/ppu.h" +#include "ppu/types.h" +#include "ppu/consts.h" + + +#include "engine/draw_screen.h" +#include "engine/entity.h" + +void hh_init_title_screen(){ + + // hh_clear_screen(); + + //send data + uint8_t idx = 0; + const uint8_t tilemap_offset = 59; + int tiles_h = HH_PPU_BG_CANVAS_TILES_H; + int vp_h = HH_PPU_SCREEN_WIDTH/HH_PPU_SPRITE_WIDTH; //screen_h in tiles + int vert_offset = tiles_h*3; + + const uint8_t arr[4][4] = { + {0,1,1,0}, + {2,3,3,2}, + {4,0,0,4}, + {5,6,6,5}, + }; + int val, counter =0; + hh_ppu_update_color(5, 0, (hh_ppu_rgb_color_t) {0x1, 0x1, 0x1}); + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + val = arr[i][j]; + + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false, .horizontal_flip = ((j % 4 < 2) ? false : true), + .palette_index = (counter == 9 || counter == 10? 5:3), .tilemap_index = (val > 0 ? (tilemap_offset + val) : 0) + }; + + int vert_pos = tiles_h*i; + int x_pos = j; + idx = vert_offset + vert_pos + x_pos + vp_h/2-2; + + hh_ppu_update_background(idx,temp); + counter++; + } + + } + + + const uint8_t letters_offset = 66; + const int _size_hooded = 7, _size_v = 2; + + // char* hh = "hooded"; + int hooded_lookup[7][2]={ + {0,1},{0,2},//H + {3,4},{3,4},//oo + {5,6},{13,9},//de + {5,6}//d + }; + + counter = 8; + for (int i = 0; i < _size_hooded; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = false, + .palette_index = 6, .tilemap_index = letters_offset + hooded_lookup[i][vert-1], + .position_x = (16*i + 64+48), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+16 +(i==2 || i==3 ? 6:0)) + }); + } + } + + + hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t) {0xa, 0x3, 0x3}); + hh_ppu_update_color(5, 2, (hh_ppu_rgb_color_t) {0xc, 0x5, 0x3}); + + const int _size_havoc = 6; + int lookup_havoc[6][2]={ + {0,1},{0,2},//H + {13,10},{7,8},//av + {13,11},{13,12}//oc + }; + + counter = 8 + (_size_hooded * _size_v); + for (int i = 0; i < _size_havoc; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = (i > 4 && vert==0 ? 1:0), + .palette_index = 5, .tilemap_index = letters_offset + lookup_havoc[i][vert-1], + .position_x = (16*i +64+32+8), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+48) + }); + } + } +} diff --git a/src/engine/title_screen.h b/src/engine/title_screen.h new file mode 100644 index 0000000..b5eda63 --- /dev/null +++ b/src/engine/title_screen.h @@ -0,0 +1,3 @@ +#pragma once + +void hh_init_title_screen(); diff --git a/src/makefile b/src/makefile index d7d9087..4e9e745 100644 --- a/src/makefile +++ b/src/makefile @@ -37,7 +37,8 @@ LOCAL_SRCS += main.c \ engine/draw_screen.c \ engine/camera.c \ engine/maths.c \ - engine/entity.c + engine/entity.c \ + engine/title_screen.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/static/background/shop.hex b/src/static/background/shop.hex new file mode 100644 index 0000000..8c08feb --- /dev/null +++ b/src/static/background/shop.hex @@ -0,0 +1,331 @@ +;indices: 9 +;75 24 38 +;a5 30 30 +;cf 57 3c +;1e 1d 39 +;40 27 51 +;7a 36 7b +;10 14 1f +;eb ed e9 +;17 20 38 + +000000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000040: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000050: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000070: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000090: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000a0: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000b0: 06 06 01 00 00 00 00 00 00 00 00 00 00 00 01 06 +0000c0: 06 06 06 01 00 00 00 00 00 00 00 00 00 01 06 06 +0000d0: 06 06 06 06 01 01 00 00 00 00 00 01 01 06 06 06 +0000e0: 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +0000f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000120: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000130: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000140: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000150: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000160: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000170: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000180: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000190: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001a0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001b0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001c0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001d0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001e0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001f0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000220: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000230: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000240: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000250: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000260: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000270: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000280: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000290: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000320: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000330: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000340: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000350: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000360: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000370: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000380: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000390: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003a0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003b0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003c0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003d0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003e0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003f0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000400: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000410: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000420: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000430: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000440: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000450: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000460: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000470: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000480: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000490: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000500: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000510: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000520: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000530: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000540: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000550: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000560: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000570: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000580: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000590: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0005f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000600: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000610: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000620: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000630: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000640: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000650: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000660: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000670: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000680: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000690: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006a0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006b0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006c0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006d0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006e0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +0006f0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000700: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000710: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +000720: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +000730: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +000740: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +000750: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +000760: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +000770: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000780: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000790: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +0007a0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +0007b0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +0007c0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +0007d0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +0007e0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +0007f0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000800: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000810: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000820: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000830: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000840: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000850: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000860: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000870: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000880: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000890: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +0008a0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +0008b0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +0008c0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +0008d0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +0008e0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +0008f0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000900: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000910: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000920: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000930: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000940: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000950: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a10: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000a20: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000a30: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000a40: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000a50: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000a60: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000a70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a80: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000a90: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000aa0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000ab0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000ac0: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000ad0: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000ae0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000af0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b00: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b10: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b20: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b30: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b40: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b50: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b60: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b70: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b80: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b90: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ba0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bb0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bc0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bd0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000be0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bf0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c10: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c60: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000c70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000c80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000c90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000ca0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000cb0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000cc0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000cd0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +000ce0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +000cf0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000d00: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000d10: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +000d20: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +000d30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000d40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000d50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000d60: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +000d70: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +000d80: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000d90: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000da0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +000db0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +000dc0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000dd0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000de0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000df0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000e00: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +000e10: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +000e20: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +000e30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e60: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +000e70: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 +000e80: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +000e90: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +000ea0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +000eb0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +000ec0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ed0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ee0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ef0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f10: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +000f20: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +000f30: 06 07 07 07 07 06 06 07 07 06 06 07 07 07 07 06 +000f40: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +000f50: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +000f60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f70: 06 07 07 07 07 07 07 07 07 07 07 07 07 07 07 06 +000f80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000fa0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +000fb0: 06 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 +000fc0: 06 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 +000fd0: 06 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 +000fe0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +000ff0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001000: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001010: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001020: 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 07 +001030: 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001040: 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001050: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001060: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001070: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001080: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001090: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010a0: 07 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 +0010b0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 +0010c0: 07 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 +0010d0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 +0010e0: 07 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 +0010f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001110: 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 06 +001120: 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 07 +001130: 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 07 +001140: 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 07 +001150: 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 07 +001160: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001170: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001180: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001190: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011a0: 06 07 07 07 06 06 06 06 06 07 07 06 06 06 06 07 +0011b0: 07 06 07 07 06 06 06 06 07 07 07 06 06 06 06 06 +0011c0: 06 07 07 06 06 06 06 07 07 07 06 06 06 07 07 07 +0011d0: 07 07 06 06 06 06 07 07 07 06 06 06 07 07 06 06 +0011e0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +0011f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001210: 07 07 07 06 06 07 07 07 07 07 06 06 06 06 07 07 +001220: 07 07 06 06 06 06 06 07 07 07 06 06 06 07 06 07 +001230: 07 06 06 06 06 06 07 07 07 06 06 06 07 07 07 07 +001240: 07 06 06 06 06 07 07 07 06 06 06 07 06 07 07 06 +001250: 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 +001260: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001270: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001280: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001290: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012a0: 07 07 06 06 06 06 07 07 07 06 06 06 07 06 06 07 +0012b0: 07 07 06 06 07 06 06 07 07 06 06 07 06 06 07 07 +0012c0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +0012d0: 06 06 06 07 06 07 07 06 06 06 06 07 07 07 06 06 +0012e0: 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 06 +0012f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001310: 07 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 +001320: 07 06 06 06 07 06 07 07 06 06 06 06 06 06 06 06 +001330: 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 +001340: 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 +001350: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +001360: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001370: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001380: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001390: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0013a0: 06 06 06 07 07 07 07 06 06 06 06 06 06 06 06 06 +0013b0: 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +0013c0: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +0013d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0013e0: 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +0013f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 \ No newline at end of file diff --git a/src/static/background/shop_ext.hex b/src/static/background/shop_ext.hex new file mode 100644 index 0000000..d151156 --- /dev/null +++ b/src/static/background/shop_ext.hex @@ -0,0 +1,459 @@ +;indices: 9 +;75 24 38 +;a5 30 30 +;cf 57 3c +;1e 1d 39 +;40 27 51 +;7a 36 7b +;10 14 1f +;eb ed e9 +;17 20 38 + +000000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000040: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000050: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000070: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000090: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000a0: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000b0: 06 06 01 00 00 00 00 00 00 00 00 00 00 00 01 06 +0000c0: 06 06 06 01 00 00 00 00 00 00 00 00 00 01 06 06 +0000d0: 06 06 06 06 01 01 00 00 00 00 00 01 01 06 06 06 +0000e0: 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +0000f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000120: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000130: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000140: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000150: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000160: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000170: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000180: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000190: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000220: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000230: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000240: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000250: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000260: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000270: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000280: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000290: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002a0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002b0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002c0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002d0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002e0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002f0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000320: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000330: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000340: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000350: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000360: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000370: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000380: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000390: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000400: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000410: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000420: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000430: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000440: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000450: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000460: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000470: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000480: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000490: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004a0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004b0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004c0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004d0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004e0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004f0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000500: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000510: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000520: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000530: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000540: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000550: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000560: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000570: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000580: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000590: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005a0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005b0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005c0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005e0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005f0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000600: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000610: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000620: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000630: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000640: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000650: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000660: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000670: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000680: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000690: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006a0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006b0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006c0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006e0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006f0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000700: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000710: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000720: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000730: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000740: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000750: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000760: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000770: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000780: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000790: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000800: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +000810: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +000820: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000830: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000840: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000850: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000860: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000870: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000880: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000890: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008a0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008b0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008c0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008d0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008e0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +0008f0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +000900: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000910: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000920: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000930: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000940: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000950: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0009f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000a00: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000a10: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000a20: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a30: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a40: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a50: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a60: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a70: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a80: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a90: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000aa0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ab0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ac0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ad0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ae0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000af0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000b00: 01 01 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000b10: 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000b20: 01 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000b30: 01 01 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000b40: 01 01 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000b50: 01 01 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000b60: 01 01 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000b70: 01 01 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000b80: 01 01 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000b90: 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000ba0: 01 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000bb0: 01 01 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000bc0: 01 01 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000bd0: 01 01 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000be0: 01 01 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000bf0: 01 01 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000c00: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000c10: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000c20: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000c30: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000c40: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000c50: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000c60: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000c70: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000c80: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000c90: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000ca0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000cb0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000cc0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000cd0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000ce0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000cf0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000d00: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000d10: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +000d20: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +000d30: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +000d40: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +000d50: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +000d60: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +000d70: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000d80: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000d90: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +000da0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +000db0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +000dc0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +000dd0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +000de0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +000df0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000e00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000e10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000e20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ea0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000eb0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ec0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ed0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ee0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ef0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f10: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000f20: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000f30: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000f40: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000f50: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000f60: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000f70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f80: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000f90: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000fa0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000fb0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000fc0: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000fd0: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000fe0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ff0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001000: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001010: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001020: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001030: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001040: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001050: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001060: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001070: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001080: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001090: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010a0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010b0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010c0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010d0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010e0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010f0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001120: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001130: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001140: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001150: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001160: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001170: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001180: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001190: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011a0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011b0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011c0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011d0: 01 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +0011e0: 01 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +0011f0: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +001200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001220: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001230: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001240: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001250: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001260: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001270: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001280: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001290: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012d0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +0012e0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 +0012f0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +001300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001320: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001330: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001340: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001350: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001360: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001370: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001380: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001390: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013d0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +0013e0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +0013f0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +001400: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +001410: 01 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 +001420: 01 06 06 06 06 06 06 06 01 01 01 01 06 06 06 06 +001430: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001440: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001450: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001460: 01 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +001470: 01 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +001480: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +001490: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +0014a0: 01 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 +0014b0: 01 06 06 06 06 06 06 06 01 01 01 01 06 06 06 06 +0014c0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0014d0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0014e0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0014f0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001500: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +001510: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +001520: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +001530: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001540: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001550: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001560: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +001570: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 +001580: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +001590: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +0015a0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +0015b0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +0015c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0015d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0015e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0015f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001600: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +001610: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +001620: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +001630: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001640: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001650: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001660: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +001670: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +001680: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +001690: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +0016a0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +0016b0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +0016c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0016d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0016e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0016f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001700: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001710: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +001720: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +001730: 06 07 07 07 07 06 06 07 07 06 06 07 07 07 07 06 +001740: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +001750: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +001760: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001770: 06 07 07 07 07 07 07 07 07 07 07 07 07 07 07 06 +001780: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001790: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0017a0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +0017b0: 06 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 +0017c0: 06 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 +0017d0: 06 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 +0017e0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +0017f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001800: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001810: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001820: 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 07 +001830: 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001840: 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001850: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001860: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001870: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001880: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001890: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0018a0: 07 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 +0018b0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 +0018c0: 07 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 +0018d0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 +0018e0: 07 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 +0018f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001900: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001910: 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 06 +001920: 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 07 +001930: 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 07 +001940: 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 07 +001950: 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 07 +001960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0019a0: 06 07 07 07 06 06 06 06 06 07 07 06 06 06 06 07 +0019b0: 07 06 07 07 06 06 06 06 07 07 07 06 06 06 06 06 +0019c0: 06 07 07 06 06 06 06 07 07 07 06 06 06 07 07 07 +0019d0: 07 07 06 06 06 06 07 07 07 06 06 06 07 07 06 06 +0019e0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +0019f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a10: 07 07 07 06 06 07 07 07 07 07 06 06 06 06 07 07 +001a20: 07 07 06 06 06 06 06 07 07 07 06 06 06 07 06 07 +001a30: 07 06 06 06 06 06 07 07 07 06 06 06 07 07 07 07 +001a40: 07 06 06 06 06 07 07 07 06 06 06 07 06 07 07 06 +001a50: 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 +001a60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001aa0: 07 07 06 06 06 06 07 07 07 06 06 06 07 06 06 07 +001ab0: 07 07 06 06 07 06 06 07 07 06 06 07 06 06 07 07 +001ac0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +001ad0: 06 06 06 07 06 07 07 06 06 06 06 07 07 07 06 06 +001ae0: 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 06 +001af0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b10: 07 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 +001b20: 07 06 06 06 07 06 07 07 06 06 06 06 06 06 06 06 +001b30: 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 +001b40: 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 +001b50: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +001b60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001ba0: 06 06 06 07 07 07 07 06 06 06 06 06 06 06 06 06 +001bb0: 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +001bc0: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +001bd0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +001be0: 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +001bf0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 \ No newline at end of file diff --git a/src/static/background/title_screen_icon.hex b/src/static/background/title_screen_icon.hex new file mode 100644 index 0000000..120eaa1 --- /dev/null +++ b/src/static/background/title_screen_icon.hex @@ -0,0 +1,102 @@ +;indices: 4 +;17 20 38 +;10 14 1f +;40 27 51 +;7a 36 7b + +000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +0000b0: 00 00 00 00 00 00 00 00 00 00 02 02 02 02 03 03 +0000c0: 00 00 00 00 00 00 00 02 02 02 03 03 03 03 03 03 +0000d0: 00 00 00 00 02 02 02 03 03 03 03 03 03 03 03 03 +0000e0: 00 00 02 02 03 03 03 03 03 03 03 03 03 03 03 03 +0000f0: 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +000120: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 +000130: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 +000140: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +000150: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +000160: 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 +000170: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +000180: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +000190: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +0001a0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +0001b0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +0001c0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 01 +0001d0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +0001e0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +0001f0: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +000200: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000210: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000220: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000230: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000240: 03 03 03 03 03 03 03 03 03 03 01 01 01 01 01 01 +000250: 03 03 03 03 03 03 03 01 01 01 01 01 01 01 01 01 +000260: 03 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +000270: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +000280: 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000290: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000300: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +000310: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +000320: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000330: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000340: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000350: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000360: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000370: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000380: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000390: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +0003a0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +0003b0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +0003c0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +0003d0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +0003e0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +0003f0: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +000400: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +000410: 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 01 +000420: 00 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 +000430: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +000440: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +000450: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +000460: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +000470: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 +000480: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +000490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 +0004a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 +0004b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000500: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000510: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000520: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000530: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000540: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000550: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000560: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000570: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000580: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000590: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0005a0: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +0005b0: 02 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +0005c0: 00 02 02 03 03 03 03 01 01 01 01 01 01 01 01 01 +0005d0: 00 00 00 02 02 02 03 03 03 03 03 03 01 01 01 01 +0005e0: 00 00 00 00 00 00 02 02 02 02 02 03 03 03 03 03 +0005f0: 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 \ No newline at end of file diff --git a/src/static/foreground/title_screen_letteres_large.hex b/src/static/foreground/title_screen_letteres_large.hex new file mode 100644 index 0000000..fea1c77 --- /dev/null +++ b/src/static/foreground/title_screen_letteres_large.hex @@ -0,0 +1,230 @@ +;title screen letters (Large) +;indices: 3 +;23 32 56 +;165 48 48 +;207 87 60 + +0000: 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 02 02 01 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0100: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0110: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0120: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0130: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 01 +0140: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0150: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0160: 00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 +0170: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 +0180: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0190: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01a0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01b0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01c0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01d0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01e0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01f0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +0200: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0210: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0220: 00 00 00 00 00 00 01 01 01 01 00 00 00 00 00 00 +0230: 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 +0240: 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 +0250: 01 01 01 00 00 00 01 01 01 00 00 00 00 00 00 00 +0260: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0270: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0280: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0290: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02a0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02b0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02c0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02d0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02e0: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 +02f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0350: 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 00 +0360: 00 00 00 00 00 02 02 02 02 02 02 00 00 00 00 00 +0370: 00 00 00 00 02 02 02 02 02 02 02 02 00 00 00 00 +0380: 00 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 +0390: 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 00 +03a0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03b0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03c0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03d0: 00 00 02 02 02 02 02 02 02 02 02 02 01 01 00 00 +03e0: 00 00 02 02 02 02 02 02 02 02 01 01 01 01 00 00 +03f0: 00 00 02 02 02 02 02 01 01 01 01 01 01 01 00 00 +0400: 00 00 02 02 01 01 01 01 01 01 01 01 01 01 00 00 +0410: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0420: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0430: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0440: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0450: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0460: 00 00 01 01 01 01 01 01 01 01 01 01 01 00 00 00 +0470: 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00 +0480: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0490: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +04a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0500: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0510: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0520: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0530: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0540: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0550: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0560: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0580: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0590: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05b0: 00 00 00 00 00 02 02 02 02 00 00 00 02 02 00 00 +05c0: 00 00 00 00 02 02 02 02 02 02 00 00 02 02 00 00 +05d0: 00 00 00 00 02 02 02 00 00 00 02 00 02 02 00 00 +05e0: 00 00 00 02 02 02 00 00 00 00 00 02 02 02 00 00 +05f0: 00 00 00 02 02 00 00 00 00 00 00 02 02 02 00 00 +0600: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0610: 00 00 02 02 00 00 00 00 00 00 00 00 01 01 00 00 +0620: 00 00 02 01 00 00 00 00 00 00 00 00 01 01 00 00 +0630: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0640: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0650: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0660: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0670: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0680: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0690: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +06a0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06b0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06c0: 00 00 01 01 00 00 00 00 00 01 01 01 01 01 00 00 +06d0: 00 00 01 01 01 00 00 00 01 01 01 00 01 01 00 00 +06e0: 00 00 00 01 01 01 01 01 01 01 00 00 01 01 00 00 +06f0: 00 00 00 00 01 01 01 01 01 00 00 00 00 01 01 00 +0700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07b0: 00 02 02 00 00 00 00 00 00 00 00 00 00 02 02 00 +07c0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07d0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07e0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07f0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0800: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0810: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0820: 00 00 02 02 00 00 00 00 00 00 00 00 02 02 02 00 +0830: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0840: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0850: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0860: 00 00 00 02 02 00 00 00 00 00 00 00 02 01 00 00 +0870: 00 00 00 02 01 01 00 00 00 00 00 00 01 00 00 00 +0880: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 00 +0890: 00 00 00 00 01 01 00 00 00 00 00 01 01 00 00 00 +08a0: 00 00 00 00 01 01 01 00 00 00 00 01 01 00 00 00 +08b0: 00 00 00 00 00 01 01 00 00 00 00 01 00 00 00 00 +08c0: 00 00 00 00 00 01 01 01 00 00 01 01 00 00 00 00 +08d0: 00 00 00 00 00 00 01 01 00 00 01 00 00 00 00 00 +08e0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +08f0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +0900: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0910: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0920: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0930: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 02 00 +0940: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0950: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0960: 00 00 02 02 02 02 00 00 00 00 02 02 02 00 00 00 +0970: 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 00 +0980: 00 00 02 02 00 00 02 02 02 02 00 00 00 00 00 00 +0990: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00 +09a0: 00 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +09b0: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +09c0: 00 00 00 01 01 00 00 00 00 00 00 01 01 01 00 00 +09d0: 00 00 00 01 01 01 00 00 00 00 01 01 01 01 00 00 +09e0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +09f0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0a00: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 +0a10: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0a20: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a30: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a40: 00 00 00 00 02 00 00 00 00 00 00 00 00 02 02 00 +0a50: 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 00 +0a60: 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 +0a70: 00 00 00 01 02 02 02 00 00 00 00 00 02 02 01 00 +0a80: 00 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 +0a90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0aa0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ab0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ac0: 00 01 01 01 01 00 00 00 00 00 00 01 01 01 01 00 +0ad0: 00 00 01 01 01 01 01 00 01 01 01 01 01 01 01 00 +0ae0: 00 00 00 01 01 01 01 01 01 01 01 01 00 01 01 00 +0af0: 00 00 00 00 00 01 01 01 01 01 00 00 00 01 01 00 +0b00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0b10: 00 00 02 02 02 00 00 00 00 00 00 00 00 02 00 00 +0b20: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b30: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b40: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b50: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b60: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 01 00 +0b70: 00 02 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b80: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b90: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ba0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0bb0: 00 00 01 01 01 00 00 00 00 00 00 00 01 01 00 00 +0bc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 00 00 00 +0bd0: 00 00 00 01 01 01 01 01 00 00 01 01 01 00 00 00 +0be0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0bf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0c00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0c10: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c20: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c30: 00 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 +0c40: 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 00 +0c50: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c60: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c70: 00 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c80: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0ca0: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0cb0: 00 01 01 01 01 00 00 00 00 00 00 00 01 01 01 00 +0cc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 01 00 00 +0cd0: 00 00 00 01 01 01 00 00 00 01 01 01 01 00 00 00 +0ce0: 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 00 +0cf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0db0: 00 00 00 00 00 00 00 02 02 02 02 02 00 00 00 00 +0dc0: 00 00 00 00 00 00 02 02 02 02 02 02 02 00 00 00 +0dd0: 00 00 00 00 00 02 02 00 00 00 02 02 02 00 00 00 +0de0: 00 00 00 00 02 02 00 00 00 00 00 02 02 02 00 00 +0df0: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 diff --git a/src/static/title_screen_icon.hex b/src/static/title_screen_icon.hex deleted file mode 100644 index a1e5f0b..0000000 --- a/src/static/title_screen_icon.hex +++ /dev/null @@ -1,119 +0,0 @@ -;Main character icon for title screen -;indices: 4 -;23 32 56 -;16 20 31 -;64 39 81 -;122 54 123 - -0000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0040: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0050: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0060: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0070: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0080: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0090: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 -01b0: 00 00 00 00 00 00 00 00 00 00 02 02 02 02 03 03 -01c0: 00 00 00 00 00 00 00 02 02 02 03 03 03 03 03 03 -01d0: 00 00 00 00 02 02 02 03 03 03 03 03 03 03 03 03 -01e0: 00 00 02 02 03 03 03 03 03 03 03 03 03 03 03 03 -01f0: 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 -0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 -0220: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 -0230: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 -0240: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 -0250: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 -0260: 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 -0270: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 -0280: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 -0290: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 -02a0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 -02b0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 -02c0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 01 -02d0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 -02e0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 -02f0: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 -0300: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0310: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0320: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0330: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0340: 03 03 03 03 03 03 03 03 03 03 01 01 01 01 01 01 -0350: 03 03 03 03 03 03 03 01 01 01 01 01 01 01 01 01 -0360: 03 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 -0370: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 -0380: 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0390: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0400: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 -0410: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 -0420: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0430: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0440: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0450: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0460: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0470: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0480: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0490: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 -04a0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 -04b0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 -04c0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 -04d0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 -04e0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 -04f0: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 -0500: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 -0510: 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 01 -0520: 00 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 -0530: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 -0540: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 -0550: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 -0560: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 -0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 -0580: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 -0590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 -05a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 -05b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0600: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0610: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0620: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0640: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0650: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0660: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0680: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0690: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -06a0: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 -06b0: 02 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 -06c0: 00 02 02 03 03 03 03 01 01 01 01 01 01 01 01 01 -06d0: 00 00 00 02 02 02 03 03 03 03 03 03 01 01 01 01 -06e0: 00 00 00 00 00 00 02 02 02 02 02 03 03 03 03 03 -06f0: 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 diff --git a/src/static/title_screen_letteres_large.hex b/src/static/title_screen_letteres_large.hex deleted file mode 100644 index fea1c77..0000000 --- a/src/static/title_screen_letteres_large.hex +++ /dev/null @@ -1,230 +0,0 @@ -;title screen letters (Large) -;indices: 3 -;23 32 56 -;165 48 48 -;207 87 60 - -0000: 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00 -0010: 00 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 -0020: 00 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 -0030: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0040: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0050: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0060: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0070: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -0080: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -0090: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00a0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00b0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00c0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00d0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00e0: 00 00 00 00 00 00 02 02 01 00 00 00 00 00 00 00 -00f0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0100: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0110: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0120: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0130: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 01 -0140: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 -0150: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 -0160: 00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 -0170: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 -0180: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0190: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01a0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01b0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01c0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01d0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01e0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01f0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -0200: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0210: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0220: 00 00 00 00 00 00 01 01 01 01 00 00 00 00 00 00 -0230: 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 -0240: 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 -0250: 01 01 01 00 00 00 01 01 01 00 00 00 00 00 00 00 -0260: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0270: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0280: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0290: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -02a0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -02b0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -02c0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -02d0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -02e0: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 -02f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0350: 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 00 -0360: 00 00 00 00 00 02 02 02 02 02 02 00 00 00 00 00 -0370: 00 00 00 00 02 02 02 02 02 02 02 02 00 00 00 00 -0380: 00 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 -0390: 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 00 -03a0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 -03b0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 -03c0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 -03d0: 00 00 02 02 02 02 02 02 02 02 02 02 01 01 00 00 -03e0: 00 00 02 02 02 02 02 02 02 02 01 01 01 01 00 00 -03f0: 00 00 02 02 02 02 02 01 01 01 01 01 01 01 00 00 -0400: 00 00 02 02 01 01 01 01 01 01 01 01 01 01 00 00 -0410: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0420: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0430: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0440: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0450: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0460: 00 00 01 01 01 01 01 01 01 01 01 01 01 00 00 00 -0470: 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00 -0480: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 -0490: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -04a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0500: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -0510: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0520: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0530: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0540: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0550: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0560: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0580: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -0590: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -05a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -05b0: 00 00 00 00 00 02 02 02 02 00 00 00 02 02 00 00 -05c0: 00 00 00 00 02 02 02 02 02 02 00 00 02 02 00 00 -05d0: 00 00 00 00 02 02 02 00 00 00 02 00 02 02 00 00 -05e0: 00 00 00 02 02 02 00 00 00 00 00 02 02 02 00 00 -05f0: 00 00 00 02 02 00 00 00 00 00 00 02 02 02 00 00 -0600: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0610: 00 00 02 02 00 00 00 00 00 00 00 00 01 01 00 00 -0620: 00 00 02 01 00 00 00 00 00 00 00 00 01 01 00 00 -0630: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 00 00 -0640: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 -0650: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 -0660: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 -0670: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 -0680: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 -0690: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 -06a0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 -06b0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 -06c0: 00 00 01 01 00 00 00 00 00 01 01 01 01 01 00 00 -06d0: 00 00 01 01 01 00 00 00 01 01 01 00 01 01 00 00 -06e0: 00 00 00 01 01 01 01 01 01 01 00 00 01 01 00 00 -06f0: 00 00 00 00 01 01 01 01 01 00 00 00 00 01 01 00 -0700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -07a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -07b0: 00 02 02 00 00 00 00 00 00 00 00 00 00 02 02 00 -07c0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -07d0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -07e0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -07f0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0800: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0810: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0820: 00 00 02 02 00 00 00 00 00 00 00 00 02 02 02 00 -0830: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0840: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0850: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0860: 00 00 00 02 02 00 00 00 00 00 00 00 02 01 00 00 -0870: 00 00 00 02 01 01 00 00 00 00 00 00 01 00 00 00 -0880: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 00 -0890: 00 00 00 00 01 01 00 00 00 00 00 01 01 00 00 00 -08a0: 00 00 00 00 01 01 01 00 00 00 00 01 01 00 00 00 -08b0: 00 00 00 00 00 01 01 00 00 00 00 01 00 00 00 00 -08c0: 00 00 00 00 00 01 01 01 00 00 01 01 00 00 00 00 -08d0: 00 00 00 00 00 00 01 01 00 00 01 00 00 00 00 00 -08e0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -08f0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -0900: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0910: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0920: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0930: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 02 00 -0940: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 -0950: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 -0960: 00 00 02 02 02 02 00 00 00 00 02 02 02 00 00 00 -0970: 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 00 -0980: 00 00 02 02 00 00 02 02 02 02 00 00 00 00 00 00 -0990: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00 -09a0: 00 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -09b0: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -09c0: 00 00 00 01 01 00 00 00 00 00 00 01 01 01 00 00 -09d0: 00 00 00 01 01 01 00 00 00 00 01 01 01 01 00 00 -09e0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 -09f0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -0a00: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 -0a10: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0a20: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 -0a30: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 -0a40: 00 00 00 00 02 00 00 00 00 00 00 00 00 02 02 00 -0a50: 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 00 -0a60: 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 -0a70: 00 00 00 01 02 02 02 00 00 00 00 00 02 02 01 00 -0a80: 00 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 -0a90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0aa0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -0ab0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -0ac0: 00 01 01 01 01 00 00 00 00 00 00 01 01 01 01 00 -0ad0: 00 00 01 01 01 01 01 00 01 01 01 01 01 01 01 00 -0ae0: 00 00 00 01 01 01 01 01 01 01 01 01 00 01 01 00 -0af0: 00 00 00 00 00 01 01 01 01 01 00 00 00 01 01 00 -0b00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0b10: 00 00 02 02 02 00 00 00 00 00 00 00 00 02 00 00 -0b20: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b30: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b40: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b50: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b60: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 01 00 -0b70: 00 02 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0b80: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0b90: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -0ba0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 00 -0bb0: 00 00 01 01 01 00 00 00 00 00 00 00 01 01 00 00 -0bc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 00 00 00 -0bd0: 00 00 00 01 01 01 01 01 00 00 01 01 01 00 00 00 -0be0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 -0bf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -0c00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0c10: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 -0c20: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 -0c30: 00 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 -0c40: 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 00 -0c50: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 -0c60: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 -0c70: 00 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 -0c80: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 -0c90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0ca0: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0cb0: 00 01 01 01 01 00 00 00 00 00 00 00 01 01 01 00 -0cc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 01 00 00 -0cd0: 00 00 00 01 01 01 00 00 00 01 01 01 01 00 00 00 -0ce0: 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 00 -0cf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0db0: 00 00 00 00 00 00 00 02 02 02 02 02 00 00 00 00 -0dc0: 00 00 00 00 00 00 02 02 02 02 02 02 02 00 00 00 -0dd0: 00 00 00 00 00 02 02 00 00 00 02 02 02 00 00 00 -0de0: 00 00 00 00 02 02 00 00 00 00 00 02 02 02 00 00 -0df0: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 -- cgit v1.2.3 From 47df28a8199ddbde1e4c004c4706d5e49614b256 Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Wed, 15 Mar 2023 20:53:33 +0100 Subject: Update features.md Added Dubble Jump --- features.md | 1 + 1 file changed, 1 insertion(+) diff --git a/features.md b/features.md index d044232..6742551 100644 --- a/features.md +++ b/features.md @@ -15,6 +15,7 @@ Done |Regular dash|Implement in sprint 3| |Super punch|Implement in sprint 3| |Smoke bomb|Implement in sprint 3| +|Dubble Jump|Implement in sprint 3| ## Levels | feature | status | -- cgit v1.2.3 From 0f93aaf6edd9ae46c6a9e729552e91312ccc41ce Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Wed, 15 Mar 2023 21:26:50 +0100 Subject: updated file fetch --- src/ppusim/sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index a5fec45..8b67acc 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,7 +29,8 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "../test/bin/tiles.bin"; + //TODO: remove magic file name here + char* filename = "static/tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ fprintf(stderr,"Error: Failed to load tiles."); -- cgit v1.2.3 From 1c0cb0d1cf8c9cb6a11aa404d8c31def1087a586 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 15 Mar 2023 21:57:44 +0100 Subject: (UNCLEAN) partial merge of #37 --- .vscode/settings.json | 15 +-------------- src/GameLoop/shop.h | 4 ++-- src/GameLoop/startingScreen.h | 8 +++----- src/engine/draw_screen.c | 3 ++- src/engine/engine.c | 2 +- src/engine/entity.c | 4 ++++ 6 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7f37ba0..d027762 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,18 +8,5 @@ } }, "cmake.configureOnOpen": false, - "files.eol": "\n", - "nrf-connect.topdir": "${nrf-connect.sdk:2.1.2}", - "nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.1.2}", - "files.associations": { - "input.h": "c", - "draw_screen.h": "c", - "camera.h": "c", - "entity.h": "c", - "stdint.h": "c", - "player_controller.h": "c", - "sprite_controller.h": "c", - "types.h": "c", - "startingscreen.h": "c" - } + "files.eol": "\n" } diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h index 35bb780..39db9fd 100644 --- a/src/GameLoop/shop.h +++ b/src/GameLoop/shop.h @@ -1,7 +1,8 @@ +#pragma once + #include "input.h" #include "engine/draw_screen.h" - #include #include @@ -11,5 +12,4 @@ typedef enum { hh_e_STATE_END } hh_e_ShopStates; - bool hh_show_Shop(); diff --git a/src/GameLoop/startingScreen.h b/src/GameLoop/startingScreen.h index f51cc66..5b4f15a 100644 --- a/src/GameLoop/startingScreen.h +++ b/src/GameLoop/startingScreen.h @@ -1,13 +1,11 @@ #pragma once +#include "GameLoop/shop.h" #include #include -typedef enum { - hh_e_STATE_SHOW, - hh_e_STATE_Input, - hh_e_STATE_END -} hh_e_screenStates; +// TODO: fix naming of enum consts +typedef hh_e_ShopStates hh_e_screenStates; bool hh_show_startingScreen(); diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index 205d4b6..43d3cd4 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -61,10 +61,11 @@ void hh_setup_screen(){ } void hh_setup_startingScreen(){ + return; int size = 300; // 40 x as tiles 30 y as tiles FILE* level = fopen("../test/bin/startingScreen.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ - fprintf(stderr, "Error: Failed to open file.\n"); + fprintf(stderr, "Error: Failed to open file. AAAA\n"); return; } fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET); diff --git a/src/engine/engine.c b/src/engine/engine.c index 3280892..d852a99 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,5 +1,5 @@ #include "engine/draw_screen.h" -#include "engine/bullet.h"" +#include "engine/bullet.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 index 153e7e1..888539a 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -3,6 +3,10 @@ #include "engine/entity.h" #include "engine/maths.h" +#ifdef HH_TARGET_DESKTOP +#include +#endif + /* PLAYER: (pos on X) ,___, -- cgit v1.2.3 From 7b44ae05a17b544dfcddd8db322bbd916d2d2df3 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 15 Mar 2023 22:17:56 +0100 Subject: architecture document update --- assets/ppu-level-1.svg | 2 +- assets/ppu-level-2.svg | 2 +- docs/architecture.md | 119 +++++++++++++++++++++++++++++++------------------ docs/ppu.drawio | 2 +- 4 files changed, 78 insertions(+), 47 deletions(-) diff --git a/assets/ppu-level-1.svg b/assets/ppu-level-1.svg index e0d1949..6b3a2ab 100644 --- a/assets/ppu-level-1.svg +++ b/assets/ppu-level-1.svg @@ -1,3 +1,3 @@ -
Basys3 FPGA
PPU
Basys3 FPGA...
Display output
(VGA)
Display output...
STM32F091RC
CPU
STM32F091RC...
RESET
RESET
VRAM-ADDR
VRAM-ADDR
VRAM-DATA
VRAM-DATA
VRAM-WEN
VRAM-WEN
G
G
B
B
R
R
NVSYNC
NVSYNC
NHSYNC
NHSYNC
TVSYNC
TVSYNC
THSYNC
THSYNC
TVBLANK
TVBLANK
THBLANK
THBLANK
HBLANK
HBLANK
VBLANK
VBLANK
VSYNC
VSYNC
HSYNC
HSYNC
Text is not SVG - cannot display
\ No newline at end of file +
Basys3 FPGA
PPU
Basys3 FPGA...
Display output
(VGA)
Display output...
STM32F091RC
CPU
STM32F091RC...
VRAM-ADDR
VRAM-ADDR
VRAM-DATA
VRAM-DATA
VRAM-WEN
VRAM-WEN
G
G
B
B
R
R
NVSYNC
NVSYNC
NHSYNC
NHSYNC
TVBLANK
TVBLANK
THBLANK
THBLANK
HBLANK
HBLANK
VBLANK
VBLANK
Text is not SVG - cannot display
\ No newline at end of file diff --git a/assets/ppu-level-2.svg b/assets/ppu-level-2.svg index a7f343f..303e95a 100644 --- a/assets/ppu-level-2.svg +++ b/assets/ppu-level-2.svg @@ -1,3 +1,3 @@ -
pipeline stage 1-2
pipeline s...
pipeline stage 5
pipeline s...
pipeline stage 3-4
pipeline s...
sprite info
sprite info
TMM
TMM
Background sprite info
Background sp...
sprite info
sprite info
TMM
TMM
Foreground sprite info
Foreground sp...
global palette index
global palette index
Compositor
Compositor
VGA signal
VGA signal
tiny VGA signal generator
tiny VGA sign...
rgb value
rgb value
PAL
PAL
Palette lookup
Palette lookup
BAM
BAM
AUX
AUX
Sprite render
Sprite render
pixel data
pixel data
FAM
FAM
Sprite render
Sprite render
TMM
TMM
Tilemap memory
Tilemap memory
BAM
BAM
Background attribute memory
Background attribute...
screen position
screen position
PPU RAM bus
PPU RAM bus
PPU RAM bus
PPU RAM bus
native VGA signal generator
native VGA si...
VGA signal
VGA signal
Text is not SVG - cannot display
\ No newline at end of file +
pipeline stage 1-2
pipeline s...
pipeline stage 5
pipeline s...
pipeline stage 3-4
pipeline s...
sprite info
sprite info
TMM
TMM
Background sprite info
Background sp...
sprite info
sprite info
TMM
TMM
Foreground sprite info
Foreground sp...
global palette index
global palette index
Compositor
Compositor
rgb value
rgb value
PAL
PAL
Palette lookup
Palette lookup
BAM
BAM
AUX
AUX
Sprite render
Sprite render
pixel data
pixel data
FAM
FAM
Sprite render
Sprite render
TMM
TMM
Tilemap memory
Tilemap memory
BAM
BAM
Background attribute memory
Background attribute...
screen position
screen position
PPU RAM bus
PPU RAM bus
PPU RAM bus
PPU RAM bus
Display controller
Display contr...
VGA signal
VGA signal
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/architecture.md b/docs/architecture.md index 5001eed..9be6751 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,12 +1,35 @@ # General system architecture -![Top-down system architecture diagram](../assets/architecture-level-1.svg) +The existing hardware components available for building this project consists +of: + +- Raspberry Pi +- Nucleo STM32 development board +- Basys3 FPGA development board +- Arduino Uno R3 + +The Raspberry Pi is by far the most powerful component out of these 4, but +because one of the project requirements is that no general-purpose operating +system is used, utilizing the Raspberry Pi will involve writing low-level +drivers for its interfaces, which will likely cost a lot of effort. + +As to not risk project failure due to hardware constraints, the decision was +made to use the STM32 microcontroller and FPGA in combination, as these two are +both familiar and still relatively powerful platforms. Because audio and video +consist of data streams that require constant output, the audio and graphics +processing is outsourced to the FPGA. All other game logic processing such as +world loading, or map and entity interactions is done on the STM32 +microcontroller. + +Our game also supports an optional second player, as is shown in the following +diagram. -Important notes: +![Top-down system architecture diagram](../assets/architecture-level-1.svg) -- Gamepad 2 is optionally connected -- The PPU and APU are implemented on the FPGA -- The game logic and PPU/APU control logic runs on the STM32 only +In the above diagram, the "display" and "speaker" components are included to +show what the complete system looks like. The scope of this project only +includes the components inside the area marked "game console" and the gamepad +components. # Game controllers @@ -60,7 +83,13 @@ The state machine will be designed with the following states: # PPU -Here's a list of features our PPU has: +As mentioned in the [research document](research.md#graphics), the PPU designed +for this project is heavily inspired by the NES's PPU. Because our game does +need slightly different graphical capabilities, the differences between the NES +PPU and our custom PPU are highlighted here. Readers of this section are +expected to know basic operation of the NES's PPU. + +PPU features: - 320x240 @ 60Hz VGA output (upscaled to 640x480) - single tilemap with room for 1024 tiles of 16x16 pixels @@ -71,8 +100,7 @@ Here's a list of features our PPU has: - sprites are always drawn on top of the background layer - PPU control using DMA (dual-port asynchronous RAM) - tiles can be flipped using FAM or BAM -- no frame buffer -- vertical and horizontal sync and blank output +- vertical and horizontal blank output Notable differences: @@ -80,60 +108,63 @@ Notable differences: - NES OAM equivalent is called FAM (foreground attribute register) - 320x240 @ 60Hz output - Since we're using VGA, we can't use custom resolutions without an - upscaler/downscaler. This resolution was chosen because it's exactly half of - the lowest standard VGA resolution 640x480. + Since the FPGA board we're using has a VGA port, the PPU outputs VGA. VGA + does not support custom resolutions. This resolution was chosen because it's + exactly half of the lowest standard VGA resolution 640x480. This allows the + PPU to use nearest-neighbor upscaling, which will lead to a simpler hardware + implementation. - No scanline sprite limit - Unless not imposing any sprite limit makes the hardware implementation - impossible, or much more difficult, this is a restriction that will likely - lead to frustrating debugging sessions, so will not be replicated in our - custom PPU. + This was a hardware limitation of the original NES, which our PPU design does + not have. - Sprites are 16x16 Most NES games already tile multiple 8x8 tiles together into "metatiles" to - create the illusion of larger sprites. This was likely done to save on memory - costs as RAM was expensive in the '80s, but since we're running on an FPGA - cost is irrelevant. + create the illusion of larger sprites. This however is wasteful of the + available foreground sprites, so this PPU has 16x16 pixel sprites by default. - Single 1024 sprite tilemap shared between foreground and background sprites The NES OAM registers contain a bit to select which tilemap to use (of two), which effectively expands each tile's index address by one byte. Instead of creating the illusion of two separate memory areas for tiles, having one - large tilemap seems like a more sensible solution to indexed tiles. + large tilemap is a simpler solution. - 8 total palettes, with 8 colors each - More colors is better. Increasing the total palette count is a very memory - intensive operation, while increasing the palette color count is likely slower - when looking up color values for each pixel on real hardware. + More colors allows for nicer looking graphics. Increasing the palette color + count is a very memory intensive operation as this inflates the entire + tilemap, while increasing the total palette count increases FPGA utilization. + Keeping in mind that these palettes can be modified at any point during + runtime, an 8x8 palette table is likely big enough. - Sprites can be positioned partially off-screen on all screen edges using only the offset bits in the FAM register The NES has a separate PPUMASK register to control special color effects, and to shift sprites off the left and top screen edges, as the sprite offsets - count from 0. Our PPU's FAM sprite offset bits count from -15, so the sprite + count from 0. Our PPU's FAM sprite offset bits count from -16, so the sprite can shift past the top and left screen edges, as well as the standard bottom and right edges. -- No status line register, only V-sync and H-sync outputs are supplied back to - CPU +- No status line register, only V-blank and H-blank outputs are supplied back + to CPU - The NES status line register contains some handy lines, such as a buggy - status line for reaching the max sprite count per scanline, and a status line - for detecting collisions between background and foreground sprites. Our PPU - doesn't have a scanline limit, and all hitbox detection is done in software. - Software hacks involving swapping tiles during a screen draw cycle can still - be achieved by counting the V-sync and H-sync pulses using interrupts. + The NES status line register contains a buggy status line for reaching the + max sprite count per scanline, and a status line for detecting collisions + between background and foreground sprites. Our PPU doesn't have a scanline + limit, and all hitbox detection is done in software. Software hacks involving + swapping tiles during a screen draw cycle can still be achieved by counting + the V-blank and H-blank pulses using interrupts. - No background scrolling splits This feature allows only part of the background canvas to be scrolled, while another portion stays still. This was used to draw HUD elements on the background layer for displaying things like health bars or score counters. - Since we are working with a higher foreground sprite limit, we'll use regular + Since this PPU has a higher foreground sprite limit, the game uses regular foreground sprites to display HUD elements. - Sprites are always drawn on top of the background layer - Our game doesn't need this capability for any visual effects. Leaving this - feature out will lead to a simpler hardware design + The NES PPU has the capability to draw 'foreground' sprites both behind and + in front of the background layer. Our game doesn't need this capability for + any visual effects. Leaving this feature out will lead to a simpler hardware + design. - Sprites are positioned relative to the viewport, not the background layer This leads to a simpler hardware architecture for the foreground sprite @@ -149,20 +180,18 @@ Notable differences: Important notes: -- The STM32 can reset the PPU. This line will also be connected to a physical - button on the FPGA. - The STM32 uses direct memory access to control the PPU. - The PPU's native resolution is 320x240. It works in this resolution as if it is a valid VGA signal. The STM32 is also only aware of this resolution. This resolution is referred to as "tiny" resolution. Because VGA-compatible LCD's likely don't support this resolution due to low clock speed, a built-in - pixel-perfect 2X upscaler is chained after the PPU's "tiny" output. This + pixel-perfect 2X upscaler is internally connected before the output. This means that the display sees the resolution as 640x480, but the PPU and STM32 only work in 320x240. -- The STM32 receives the TVSYNC and THSYNC lines from the PPU. These are the - VSYNC and HSYNC lines from the tiny VGA signal generator. These lines can be +- The STM32 receives the TVBLANK and THBLANK lines from the PPU. These are the + VBLANK and HBLANK lines from the "tiny" VGA resolution. These lines can be used to trigger interrupts for counting frames, and to make sure no - read/write conflicts occur for protected memory regions in the PPU. + simultanious reads and writes occur in the PPU. - NVSYNC, NHSYNC and the RGB signals refer to the output of the native VGA signal generator. @@ -181,12 +210,12 @@ Important notes: sprite with non-transparent color at current pixel in order, fallback to background) - (Palette lookup) lookup palette color using palette register - - (VGA signal generator) output real color to VGA signal generator + - (Display controller) output upscaled tiny display signal - The pipeline stages with two clock cycles contain an address set and memory read step. -- The pipeline takes 5 clock ticks in total. About 18 are available during each - pixel. For optimal display compatibility, the output color signal should be - stable before 50% of the pixel clock pulse width (9 clock ticks). +- The pipeline takes 5 clock ticks in total. About 16 are available during each + pixel. Since each scanline is buffered in the upscaler, all available clock + cycles can be used (if necessary). - Since the "sprite info" and "sprite render" steps are fundamentally different for the foreground and background layer, these components will be combined into one for each layer respectively. They are separated in the above diagram @@ -197,6 +226,7 @@ Important notes: the RAM in it's own cache memory. The cache updates are fetched during the VBLANK time between each frame. + ## Registers diff --git a/docs/ppu.drawio b/docs/ppu.drawio index c0ce0be..f7677be 100644 --- a/docs/ppu.drawio +++ b/docs/ppu.drawio @@ -1 +1 @@ -7Vzbcto6FP0aZs55SMayjYFHc0lymoRmCElKX84YEOBWIGqLBPL1lUHCFxmZm21o6Uut7W3Z2mtpbd1IQauN57eONR094j5EBVXpzwtavaCqQAc6/c+zLFaWslFaGYaO3WdOvuHZ/oTMqDDrzO5DN+RIMEbEnoaNPTyZwB4J2SzHwR9htwFG4bdOrSEUDM89C4nWN7tPRqwVRcW330F7OOJvBgq7M7a4MzO4I6uPPwImrVHQag7GZHU1ntcg8oLH47J67mbD3fWHOXBCtnmguPiPkG+kPQPtjw7CTaOh3F2xWt4tNGMNrlruwtWo7ebp1iyoBqKVV7sOvRp6V09PL6w5ZMFj5ODZpA+91yjU42NkE/g8tXre3Q/KCmobkTGiJUAvXXrHngwf4MD76qui4ttaLI4hI6sVWV2InrBrExtPqK1HWw0deuMdOsSmeD1EHLqYEDymDhayh7FPmOwGwd4niuHksaHucB4wsfDeQjyGxFlQF3ZX5dgzrpdY8cMnDjCYbRQkjcaMFiPrcF21jye9YJDuAK8qwFu33SmyvI/GMzKdERHhf15vzX8vGG/AWNcTMS6nBfE7RNPH2VewuK+3bsaw2X3qf7kCZQEr2KcSxorYISM8xBMLNXxrNYym7/OAvTgtMfwBCVkwPbZmBIcRhhOu1YYHI3Hwz7U+AlmkXTxzelBCWY2JvOUMIZG0u7Ly89oqxc2ByCL2e1jO41BYPmo6zrJzcIcptifEDdT85Bl8OoBKmA7lYliDd3KnF6v3+2xYN2Qrgtw/mK/jTqfz7b5RsefmZxcbbzygB/DD/QlJb7Q/WdaZb1kZRZaYXmamhgmeQG67sb12LX2Oyp7YoKinwZ5SmA5AT6CP3P9g/shCGsghz+1HTb1RKqBVE9NH7TJA2Jg8SpXrSik5fVwrWpaDBJ5BAgiLkjHp8z7bQ5br2r0waGGEkwUGou6yMh7qAAxoCbwnGlPv+QGCc/bqKo+SzjWDpxxjlZIiRSZIKvdmZS2T/AS0LSVmHnp/gAjFmHEEt+2mS6KQFMNCooMIuVZhYE9JFEk1IhVFWbqKk1DRzkpZjihfUqKV+4eV0n+afw4eDFxICtGetZuaxtOiku9wTd2W/LFfb4jkl807MkuvG3mgCRlzO6IfC25Vzwdu+tXfuBh7hY5XuC7yYn0evFlfrEvBUT2c22RdCb3uBK79CrwCf37PeUAJ3D0i5cfLrwdTfftu/Hopff9/a53VT2Ikp5V3mgdE3Q1F6m4c4n3kOUY8zfka11mqWvlEVS0eXl3dbdKQ4J8SIYoX3dtP9/Qtda94EmTUIgsalQTdi7gX5UpWPMS7kgHN2WAuMHNqNZ4bbYH7dH5IIrPcJWVqGGE64+TrIAMboYgpMiuKTk3Hdr+/7Dtxk+rIKk5ouiybUbOpt1RU918Vj10eTWt1NG4qez6JiYflTDJTdFQDSruNgiL+6XRZIG55vbbMxyuzXm+dYb/19hsz6rjxe1ep9dzD163z7LnqeffcHecv0uWVo/VccSV62XPrZtu89Fxpz8025wIBjXPquTED8HPqucaOPdfIoucWhZ4rUuSyw7DrDgPYkoG57DCUlGsl+M8I004vxt7eef8BHPSatHYnEjphgn8muxOybfFohn1rNC8JVppg9ZQSLGqi+vCHrriz/qhcHX8ZtFrDmEN7AjpDGqjp9g1dn5+0urwGRRoAzdhibpDemSdFiMBtCgR1Vk1JjaHxZJRCnszQRZh8mYz4gKgb1QseITzUTPHQBTzSWNs4SzyODUDsIv4pKrQWw0A1LQYaQgCar8+dZu2PYaEU9uxZKNvXDIJwdwEhs1QZ+3VipsxdGeIWh44hDLJjHYH2t/8CYVA3YJdTehKHB+2/QBi2ByFlYVh0urMW6XbNX59fUbNyVat2X05yyKCkpAyxARCVsf1afTCb938MK6W4Zy8NsZ8To893FxRy1gZRr1PDJOVFudRW5MSfVgCuVIEF7w0/rUgLN3HbIzVF+4NwA7njJs5eM8/FYlzK8WEJ7m4AoJXSydiyo9dBeqc0ijwRdkvJkkz5TAgtOywaTCAXpLZP8vkpUU6/FtrvGPVGOQxuecvG/sEtb1lCzfsEfnT3T0k4gR/x1+XnmPVDvAE47nmO+NFyTj/32I+W4un88Hn//Wkbc1JDNn7Pm7ZASpVEf01ORO0Qb6AeRFta9P+Qzsrd/3NEWuM37Vxdd9o4EP01eaTH38AjpE26J2mbNkm7rwILUGMsrywH6K9fCWSwJGNswOA09KV4NLasmTu6I3mUK/t6Or8lIJp8wT4MrizDn1/ZH68sy3RMh/3HJYuVpOO1V4IxQb5Q2gge0R8ohIaQJsiHsaRIMQ4oimThEIchHFJJBgjBM1lthAO51wiMoSZ4HIJAl/5CPp2IUbjGRv4ZovEk7dk0RMsUpMpCEE+Aj2cZkf3pyr4mGNPVr+n8GgbceKldVvfdbGldvxiBIS1zg3s96r5+dl7/fLt7XbhJQD7/vm917NVjXkGQiBFHKIIBCiF/ZcqtYxlmyxJjoIvUMDD0e9y+7CrETNvuT+g0YFcm+0lwEvqQd2ywq/XI+YUP4smyhevFL5AOJ6IlAAMYPOAYUYRDJiMrs/ZfIaGIeeReaZ8i3+dv0wcBGufd0BPyAaYUT1kDjsAQUY5El3eoW1AYFfoSKIQ9byGeQkoWTGEuqc82wEhxMclgIpURGACKXmVgAYHP8frh6/4eMGLvZRkickzbkG+JcUKGUGhlHZ/eKN7SS2/c9iAKyBjSggeling0iqGkw35kDLMRLbFXBYftMjh0Lyg8Nwrt9pFQqD3otCj8Shb/WGE4bQ8T5p+5m8A7v+WWAaHdci4wPDcM16x6KAy1BzVgMvT0yTCOCKIcfSgcYR1+zEWP4hITOsFjHILg00aqYjCLtM0N9xhHAou/IaULkY2BhGIZ0RKGWVwQqqB/KbtBfNhLna0gjDkIw3FfXH/sFCFx5eMCwzlphrj0YYGia++F7X1BWz9k2vrU9fTlyx5AYa6NeOsogHPh1JOBZxDg4UsOevTZlUky7fsDJsXBTsA4RknAVIMIGxZYZBQiDpg4B0ECh7arpHIdJeevps9+rN7g5HhNIzWD1z4YvoyXUOOeK5zvZEDOJkz1kU0kvHXGlqEy3raig09KcF7oTdFqObIZ08sM13VyuK5jbHe/ZNDKBKFH+4UgShFE2Xh3238bQegL/f0I4sxAyeMnKYsuBY7c7P/o2KiXC0yzGhfs0N/GBSmTtOW7WyUT8KMRho7fG0xgQwnDdPciDKcuwkidl7HeOMADECwHGrAQXZnOZ8N7c1PCAXTglE3/OscO+YPcmb53xp3XeBrx3QBMzg5+NVs6JfrJf23Xj7vA9L/Z3+ffImd2d98yNZP8zZh2y2K67Bq4XhqzPGWq3EFj1kHq6jcSlSO7ReoyRe7BbLnotC7oLFggXtCZ0e6cHp36SvPnbY97mq3TePrwvqHbvft+mzx//dUbGff9Z7/1/DP81aoHuXpGbshocA2FP7fsZFfec9rSz9Y9p2L9M+456VimKOSmkCFtjGEICWhiKuUY5VIpr7aFxPvKpTpl2co9dswf5iVLQzoZD9aCiwcb78GOvj/+0Lvfw3NN/J5zCnc25HuNkj7azg7uLNY/OMUrNGoWa+s9oQDjlyRqHBHaVjkirG1Hzeu+p2m0/HdSp1HTaLurQbvfe2ufxY9PikZZbzZjEW4rwe/tmEQL1euZQ9O5JwO03vO/bwxoNfB12YKchvK1uWutW6xfD9Zc/VPYY/r1i7nIh81bt5reuelaz3EiNF+dVQAUvCsubx+by4XTW8YHse6seU9W3TU1K26bmgVBetKaDP0z3s2by05qII2cZLOoYOPMnNGtlJwUaletwTBLbvkejXn0wuSmMY9aeXF25ml7ms0ulbm7JwHvjWWOjhLYu6qxdujXkzl6+q7iEwrglMWhZUzhFAu8nzOAXbVMLSeATeukEaznjpdNhPKbCF4zaNrxKvF0sXpN4akv7KSieEApQYNkSbcNjdacUq/agjW3XkE3YTwkEIZ8oOlpOdVobKxUiSNK8Au8xgEmm9gZsbBRROlhuyGzIEt+9Dr29bG8PFfIzlqe+Nv4O+3JhyOQBPRI2ZFaztLO8ZeR4y+12vd4pYz6xtnDwzMT/OBTrDFI4sMwrjqE4qUCJugPDilI50EfETgURylnMKZX+kFKcRLhaTkVGxvBD2GlwpMJ5V3kGDsjys5xkH0MDxWtsi4OmssOqeYf8xglGUXlRhn/hCsafUN1LWsa2bFKc+syoqUZ8R2UuZ2zek3dlPNqql5T+3G71TYLFf3qm4U59XHdD93sP7k/dZ7Y+1wNu9z8cZmV+uZP9Nif/gc=7V1bV+q6Fv41a4xzHtiD3uERAdF1vIKuvXxygFRFC2XVurz8+lOkQUgmSUubNKR92GMvagJtvq8z854fRnv63guG88dTf+x6P/T6+P2H0fmh63pdb0T/W1z5WF5xdGN54SGYjJeXtO8Lg8mnG1+sx1dfJ2P3ZWNg6PteOJlvXrzzZzP3Lty4NgwC/21z2L3vbf7qfPjgEhcGd0OPvPrvZBw+Lq82rPr39SN38vCIflmrx3+ZDtHg+MLL43Dsv61dMro/jHbg++HyX9P3tustFg+ty3Le4Za/rm4scGdhkglv3ZbROXqz+ieXT8eD68/u6Ph3zY7vLfxAD+yOo+ePP/pB+Og/+LOh1/2+ehD4r7Oxu/jWevTpe8yJ78+ji1p08ckNw48YzOFr6EeXHsOpF/81uuHg43c8/+vDzfqHzvvGp4/4E/m88RK8+K/BXXz33dNmxzNfjk+fRtPR9e1Zq3nbrDkxb4bBgxtPHT21Xx+vR4e/9b+Nmz8vHd8+cGqatRy4WIK1X4iXs+f6Uze6oWhA4HrDcPJ3kyLDmGkPq3GrqRf+JLpnvY7eCsSe+J0w0Gf0Fcs7jWd9Q9oKguHH2rD5YsAL5Xfq2O80rU2GMMZrTp06vmYaGSfomxOifyyfEX1aW/XvS1+8TsFxpwwct5Ny3BTEcVMMx7Um9jsNOsfx8VqDRVk94wTdFsBxDfFEaZIjZWKd5eBATizfTs41dPPBUy8Fns2kePLZmQXiaZQBT7S7s/G09xxPM76Vv0PvNb45AuCHCL/51sX86wah+75xKbZhhiP0DXV4UdBO08B2GrTFvn0bKmgXflyzUYz69mXcWKe0i2I0iEWJzKHTo09iaTaZ/fY4Cd3BfPjFrbfIjtxk8Uv0l8ns4cS9XzxAzap/X+vHT7W86A1Hrnfhv0zCiT+Lrt5Fa+4G0R8Waz2JbLoTbMDID0N/Gg0YepMHcEYr/kO4eOPQr259T+hUwQEngS0KOPRja8C1T/5HoBbdfohBEwb+s9v2PT9atM7Mny3E1v3E87BLaH2D5cMQyzudjMdfIg+iwiZZNjHAeKBzgeV9ExKkCAIINf8xHCs7SA+N09ebyz/9j6erP8+D2VnP+nVRMySQOPoWpX6NuA1gWTQtB+b256Oz9sdP99Z/fOqd/vwZ1O8/V3rS2qpcDL1oU3Sji57vP6P12FX4UAWBUJHEEj5U0qSSPdwghHWBpiDh432hxU321AlewNIoI07xq9cAIOKFkA5sD8ed3xVEdIgM6DXitYUji3eH7SHV0ybfM5DDn5MiAzOV3A7+7Z6pS1Q6FdhMFSM+SM2l1en0K1QY8gNSMPmBRMqPTuuqVYHEAEkXKuRJValgIf++qTFijggxMp/0OvCQLRKZrisayCLgSVr2KgQKFOYGqbAfVICIEdygoCXV0n530L1Sd3fNx4KC9hFuGGkNAo79DtFc3dut59r86qB9Z31qn2/9S8tb2fLMEA1SLXgnCtScTd1hFT7POVGghrtvGckw+HhTtzCKZQvjw3KCFNxJFbz8nLwOvlIJvbxODm9m87xz+Gt2rRv/G5jm0bjbvHTMGhlra43HgfsSoV0fu3f+2A2IVVI0wkRnTWYvbx4QwsJ19+hFukdO7Z+CFDNcBO2yDKD0RXHvsvin6FwQb76A90NiorZ7KisonC0a+PZy9nzkID9g1we0KnjqY27iRAd2xmsecZliLD06ExITFUqlyIOoVP16PSDdOqkgERMagzddUnYctk4rSMT4Q2BISJ/tQQWJqB0WhsQhILk6rSARqokaqpWqULMN111QsJKWe9Z3JnSALMmkOmiOzhmsRkugbwbGiDTsLyZz15vMFhl4d55/94wQ1OsP7swNhqFfbneNuc32kMddY1g7Uz3dI8tqbsFcJ7WWgaX2DrkiQuHWFowIqdoPzAoRMcYWfHvkJjkga59KjojQ2LNBOokGpDQvOSJCnZmGTiJC1u+WFRExEOTsT85BweEcj6JaWOWuvZDMC6CTAalSZgtJ4y8Db8/ZXYLk5w0gul8gi3DNcNRAbYNbRR5J3rY/nS9M7JKb/U5yPgtBD46Fk2UAnEq9JFJOUiDzjqFSiOQhXW4HPS5ZJEphJNQMdgDFqnwlkylA4/wiNd2L81dLvxz35hfz91/ebeOwlsWhn+5xUxsBgFcf3Ai4uTqd3ZeGvtS7L42Q57bIKOhhr14/Oi6b9u1sA6wgo8gife8RMFoFjGRmkQ29QE6rwomNk1AFxSbfp/9EH2vRf//dP6QW+4tQrIR68G0gga3XqDalBDgJjUY6uzeF46U04baQECXKJpXHxR6gvImavKNYIRKfZOdCg6pQKVZf0kGDo0JFcA0Q6a/hqQ6JQAJzl5tpXNWp3xmx+hAZY1joQ9U7U6j201CtBTk1QMKun4/XWXzyMqxL7tFJH8t3FB23oiXFC3zu1aExrGRz5PmTBa89KgXIEy9UksHEyxHdEj7+ZrxNxEqgrmQuo68EPgE7sSJzYwmYTnvU3GRHOlHV63U6wQuky0EnG2OTzmATNt5ink5iZpyQdx8UGA0ZkmssrNYgabfrXPqgQKtikX6Vq4nnTiOdU69P3akf/0YJml3TWSNFYQ0MIVCxr3SziaxAcbZkYJBInwynXqjFWJdZMUne9JMfRGQOlNrtanN6j8SCRCYTKt3tKCeMeEUFYIxKVgGQE0ZC89SApKTitWGRlefwqgA9RIZ3zw9fpFn8YBgGk9Hr10kwlXL8TSKJlWPS6iuhcpwCqCKUYyC4r75ynAITCZRjINJfQuU4/XskFiTSyCyfcpweI6HKsU1ameVTjtNjxEs5Bg801/cosLlVP1+PY4BPCUSd9yoqhhJECouKwdyR4UxNE+voZTRJw0qzoVfK5iX3yK3p0A/clWX1Mg8mC7MqizWV2G6CzS6B1hSdOemKecXCWLLdKytQRbh2oMNPVaq3zooJ+isW5haKkQ6UNHWv2kfVm8Q6o1YkSkDjsS17ObnROHlI/h06/QDrk8cxefD6kE6ByN6s8emEzbvcy8lk0ayoIj75HL4fUt9a+D0rbOTbrw047lxBVWiVAHx7u+eQ8Rb8ZlILj9vakJH5L4mzvx3fMXtyy45OJ0p6dVQMWGS5y5fM4QOW5DKnuF59cObA7iW/nIUMFMzIo48kbCKR8kThXkd0JkjCTKC1500FiUy6pLm795mz7DCK1k+Ag834dLuQKMfA3N0rJoaupJV63i2bRCnu6Er4ld+jsi5yiZMWcaGGl+vRT3A50LFiRUc/ke6VtCQQG4/e68Q1WaknoJQxvtFVGYq48OiqHmMhJiwHrwuxLBt5q1V09Zs5kkRXwZusoqupgCoiN0jxZtZZIREcXAVvl/RtbdkjMkbttq1KatsICmrmEbQDb5uMPC9idnzOeJbG8UfliSSKN1l78uU/r5CRbQsgddAv33kFVAKgeIXrYNstcf6GaIm/ap4pwh0Grw3cNaC2v2dmJwvX0YlSvJ8Mvj/SvvsSOXzAklvkpMBKDDZ5u9xzEzK8wnXwMpQqXEdngizMLFW4LiskRWiSGqnzqxz/yMnfw6teD749eXVIkSlf8LNs0SFVT/miE0VSHRLxtmQpX1mxEoINSqRXJuZKbfPAjrnGVC065mqitiSrjYcRdCUmGAJioijVX23yoAZ6TPLospAHO0eXGbHHJ6DeoHzJY5SVPNS86L0nj2UIqHU3ZGoo/o+VB32u7u3Wc21+ddC+sz61z7f+peXVNCchfZDHpWj62FjnA81mtXwuolWCoVqmGUyeRkLy2JJsXDZ+ELXDIg82QRdCnmYZyAMdNUGL6hfNHRNLO9SZ+xY+oSlA6UGOE2W4Q/XIMwUPqrQpnDy4HGGmoGITTFOA4DFVs9WpsQM2eSTpDmUaGHkcFnmwCaYlgjyqmVuwytNMSB7k9yqaPDae/N5gqTz4CSZNEeSRydzi5yUEKjOobcYLJw9eDsA0tvDubLYI8qhmbFHbPbPJI4vkwXWeZkpjyxAieVQztqg9jtnkMSQhj5EyPoFPwNyKfMhjqWZtUQUKW+eR1M1jpJU8lhDyqGZtUQUKmzySSh5mfAKfYGkiyKOXgTxIoDB9hJJUMuMuPyutj9CoC/ARWqpZ6lR5wuROUxLu4GeTaizuYBMMTQR3TMW489ZtGZ2jN6t/cvl0PLj+7I6Of68yGde5A7uDcg+qZ0q2Qn4DtdFB+y2zvb9k4Kjm46KtOdvQlETsOng5NyskjE/QRXgpLNW8FPCLndTQtCVxcTlOSuc6PsEQYWjaqhmaMHmSHvqiS5IIR0geM6XkcURwRzV9D6REYjuTj48CaHGFBeHwQySXNxrP+uZAeqMDO3iPFd/Bx2MHFXHioGpnVsEcTJoPJYyDmF+rIYiDLAWsGA6WQnmHLKtiOYg55mP9ijsHWXpcMRxULc4Nq2eA76VYDmIJ5E1BHGQFrYrhoGqGKMxBILG9e9rseObL8enTaDq6vj1rNW+bq3Qw7iTEG3NqdU4sJLrbMTN+NsYbcY4TVxIibVgZEsIGbWISShI5dfR0xgQ+frPLLjG+kWW0kKofRzVHC23fZQf05WAlY5tkTxCSSeToilEHFGkmYF9QM2WLJg9nkUbky6Ydr4vIr3VUiyomTlQCt1tZaoqyJyo1WZIw23ghNUuOas7BxCmYMDklEZx4FQk7BRObYNcZZLOyjTdFdBFwVPMaZoy8ycFNTAwy425FZJY7qJdakaeBNPDaMeCkK6jRFx6t2iWFBs7LIju8H8/mr0u0BZz/keNJH/BRIjud/7HiSqrzP4QCB5yg2u8OuuqcUZYVmPdNUFbeNxKjPDq1wRglPlwi49OnFkS4jxFYlTzOlKCmgm4eKqEMb+lMEN9DkJrwiTXjrEAQ09+XmquH9dysMBFzKMTwpTfwai9vp0fnH7efrU794Oi8ZpBdsYUrjTpu+FmkzggdCqTVea0KcBzEbGle6PVfvdZieSJCDRff8+DO3GAYRiwUo0/ilF6pi6kVzaX6mPo8OTqNUumTgkHVCVCVPk8uK1CctwgYo92Pj0j3uKn7i0O2Tx4aJLwMgO1TMqIWeHwEfD/kRtmrIJFKdpDG6EGFkEzKpkb64oqW7nDqB8RbfsKePPZEHTuVzgNZZDvpsOEh2/cTgSJEOXDMDA9RvteACJXcOqmQyim5eZ3yBq8KqRP+GtyctdWm6ooLkkhvndT7jioUCpbghrSGPBQK4ichSN1O4XMg6UyQRVyQyt5NBUlBssNoXM6H/bl78scOnfPLcdvqv9dUyx0Fs+6ASg2qK1B8RxoQG9VSJ0FsgHJCqk9QEmxUyxyEK5eAegCqO1AScFQrxIXBAXKOwdXQpcJGtQJVGBs9ITa5p4Nnwga972qDA7RAo9oTsoCjWltQEBzgvDuqZSELOKr1YUpcH0hN/+Bed+8Qp35tfkVeZfdS107nXGQIE1w1Q5EaHlwnOPwmyFFkaNCpwB6fc9k9TB3VbCVqXJNNHTkODzLwVpeMvl7E+Jz7qsLUUc2So0Zg2dSRozWmgRd8MNpx4ePzrtCDqaOaoUmNirKpw6cTUmrq4GW+jKJ4YrwugDq6amYwNZTLpI4kR4sbePsCxgEMxPicK8rhChQyFHv+GpapBHZbpcrWpBK8ddpK0WAUw2rcagrN3ePpudXpEKsC1W/wW4FS5cTTSSBJkaVZqpz4rJAUUXJplionPieEeGVWwpqMLp9gN6EVyCNHimoGrK3AGa80SpmJumKCJNId6djruPBKrFQElyKypchS5eLlB68sbFouwdoCXCkuPqg8EC89aFkE66goLjwyosJZdvTugvPO8P7cuLme9m1j5Az/NqSUHQ4n2QEuACQ7Dk5aZwq3BaASQbzwAG8HEh4VLAVKj/58dNb++One+o9PvdOfP4P6/SeAUjiZLW5GshYpSydhjl7I3P2NWgJ/I9gsJQ9vG/WAgLI0S8kOGdzMJjs8cIs5CXZufAVWO3ne7mCYoJU7OAVp8yYlDEnlDk4BCecdG0aocgenR0ioOxjJ8UIFO576yasdCq0wTsluKHTIJRHjKjdDyQpAIUJb5WYoOQEiVkZLkIuBy2jQ/MjDbUYrV+Lc1UAmRhaXeUErSeLcw2A/ASgizyJDfyR+ahuvKBy19FfZXkh03CWRC0CPY7V6IWVFoYgom4yyQWiUDWiTxiuaUwwrqbBLElMDuqRVIBQsGfaoCnHJgX/jeNTye8bxb9ggHkDRB006rNd80GL14qvrwbvZoypAftAB5Tq0eD536KKPge+H6/UzkXB5PPXH7mLE/wE= \ No newline at end of file +7Vtbd6I6FP41rnXOg13cRH3ES9sztU6XtRfn5SyUiHQisRCr9tdPkEQJQdAqWmc5D7PIziYm+/v2JSEtqPXx/MYzJ6N7ZAFYUCRrXlAbBUUp6Tr5PxAsQoGqlUOB7TlWKJLXgkfnE1ChRKVTxwI+p4gRgtiZ8MIBcl0wwJzM9Dw049WGCPK/OjFtIAgeByYUpS+OhUehtFKS1vJb4Ngj9suyRHvGJlOmAn9kWmgWEanNglr3EMLh03heBzCwHbNL+N71ht7VxDzg4m1eKC3+w/gVd6dyd9aDqK03pdsiHeXDhFO64JrpL3yVyK4fboyCokMyeK3vkSc7eHp4eKLLwQtmIw9NXQsEPyMRjdnIweBxYg6C3hkhBZGN8BiSlkwefdLjuHYLDINZF0vSWtahduSEdFRo9gF8QL6DHeQS2YCsGnik4wN42CF4tWIKfYQxGhMFEzp24hsG7cAomKJoTmYbog7mERE17w1AY4C9BVGhvQrDnnK9TJuzNXFkncpGPGkoYSlZ7dXQazzJA4V0B3gVAd6G40+gGUwaTfFkikWE/3m+Mf69YLwBY03LxLiSF8R3LeN53Ov1Xu+aVWdufPaR/lJUBaiARSIYbSIPj5CNXBM219IaD6b/G+DBiDbWL7RQYLMlnm8A4wWNzeYUoxjaLLAtB8Omh40g8BKBi1zAZNdOsK6lzkYYiJ4NcMpiKZ+DFaaC5QFoYueDj+FJpl++Sqa79AimMEGOi/3IyA+BYM0BucxzQFZKfOTdTZ88hDPY8LYuXUmRf3LiWKvJ+2jqDQAdI8atlYW+HlFUIaI8du9V5Vqqyp26GEzql3SxMZSUq1fVcnYwuZLUY6YMuSIgLEYY12IuPoCm7zsDHjQe4ex4BGB/ORgzdQQGuAQ+iDGT4P0hBHP60zVmJY2FGFag6cGQrhVr0vilMG3aVrcNSB8ATu6nP+XFXaNzPQbt/oP1oyirW0akOTduBOBSQrZgst3C2K6RQ98ucgjDKjofzrQ4F0OrCQPtHGYrUuKEN4bZdP1NYZZNBw2HPtg3ZiaTpLp3jv5CWuYpv5HiIeops9dFV0irNU+cm1dkZCSQ00mToZ+Rm1Uhs8dc4XDZOBGb1d7yLJlVOS9mKbtVfRn6PLMORoiEZH0+hGC+eCaMUOMJp5TOiAz9fBghi0c8zx3jvmg0Gh2BK6RyxbH6G3voN6gjiEgtzDZ0Q7KXi4li9Vq8aB47lrXkWlK5H9uOcoV8vNYPztfiu4JU0n39+EbWkjbyB6i7kz13/438KT1XOW/PzSgtM/Rz8lxxr7303IbRNS6em+q5iaesuXmuLKBxTp6rnbfnajt6rnYMzy0JnitS5HKGEqtQzvEMRfvqGYrMDyvp/LhKKbE77xOWDGfK0D/KCUvad4F4pnxpti+JMjVRKjklStiGDftNk/ypNarUxj+GnY6d8LFZQMcmhppsv9DVd3+zz0aQUg2g6lvU+GpelQKzbMQCNzkQ1AuXkhtDk8mYCnk2Qxc8+Y5Sucli3Khd8ODwyCtApNaiETzyOKM4SzwODUBZvr2H0tvTe8tQXn7p70/lX/9/ywidFBHix+wHY6AuGKD9/Nhr1/8aFqbCfnwWpn0XiIJwewHhaKly0etPO7jfN94/f8J2tViv9Z++Y2RIumd1iMCQuH6xUug+11pG++6vIWUq7MePDInTEU9Eu7cXFE4cGsSiLTdMct5657bvjtzioghVxateG2565QWbeEaZW0A7X9gSE87pMDvRRSIy9Vf6/rLRCxpXJdZszKOdjUUh45pv9JtEWrKNnhynUfjUF0Nih2qVjHshMXVNylDfQ7ty2I8dycnpRHeQvkbKMHSxzxr8hzR9L9KqW5JW+x6kjd17q+52TU5Np6G6j3Z1L9KS5vpvqkL19R+mqc0/7Vzbdto6EP2aPNLlK5dHSJr0rKRt2iRtz6OxBagRlo8sB+jXHwnLYEvGGLDBNLxk4fH4opk9s0cjOVfm9XR+R5xg8hl7AF0Zmje/Mm+uDKPXsdlfLljEArvXjQVjAr1YpK8FT/APEEJNSCPogTCjSDFGFAZZoYt9H7g0I3MIwbOs2gij7FMDZwwUwZPrIFX6E3p0Eku7traWfwJwPEmerGvizNRJlIUgnDgenqVE5scr85pgTONf0/k1QNx2iV3i6243nF29GAE+LXOBfT3qvX2y3v58vX9b2BEin34/tLpmfJs3B0VixAEMAII+4K9MuXUMTW8ZYgx0kRgG+F6f25cd+Zhpm4MJnSJ2pLOfBEe+B/iDNXa0Gjk/8JxwsjzD9cJXQN2JOIOcIUCPOIQUYp/JSGzWwRsgFDKPPEjnp9Dz+NsMHATHeRf0hXyIKcVTdgIHjgspR6LNH6haUBgVeBlQCHveATwFlCyYwjyjPlsDI8HFJIWJREYAcih8ywLLEfgcr26+et4jhuy9DE1Ejm5q2UtCHBEXCK2045MLxVu2kws33Yg6ZAxowY0SRTwahSCjw36kDLMWLbG3Cw47ZXBoX1B4ahSanYpQqNzouCj8Qhb/GL4/7bgR88/cjsC917LLgNBsWRcYnhqGK1Y9FIbKjRqQDNtqMgwDAilHH/RHWIUfc9GTOMSETvAY+w76uJbKGEwjbX3BA8aBwOJvQOlCVGNORHEW0RkMs7ggVEL/UnYL+bCXOhtBGHIQ+uOBOL7pFiEx9nGB4aykQlz6sEDRNvfC9r6grR8yHTV1PX/+vAdQmGsDfnaEwFw49WjgGSLsvuagR82uTJI6vz9gEhxsBYyllQTMbhBhw3IWKYWAAybMQZDAoWlLpVxXqvl302c/4jc4Ol6TSE3hdeC4r+Ml1LjnCvNdFpCzCVN9YomEn52xWWgWbxvRwZMSmBd6U5w1rKwZk8MU13VzuK6rbXZ/xqA7E4Qa7ReCKEUQZePd7vxtBKFO9PcjiBMDJY+fMlV0KXDkVv+VY6NeLtD13bhgi/4mLkiYpJO9ulWyAK+MMFT83mICGkoYur0XYVh1EUbivJT1xggPHbQcKGIhGpvOY8M7u5RwAB1YZcu/btUhf5A7k/dOufMaTwPeDcDk5OCXq6Vjop/817G9sOfo3lfz2/xrYM3uH1q6YpLGYxrMIf3Ff38wbHH4r7gX/30zT+ndLHYJhN79t7vo5cvP/kh7GLx4rZcf/s9W2XmzVXbeXC/1GW0pvbaLqc84SF1eV5F5tVekvoVWN42kBlrNDQ3jEhpVhUbZduk7Co1Vmm94aOTXTGdIGweUQpVXOOUgYWmSVzf03yvzqqGUTmQ8XAneocfTma0oA/7tyOiqLcnH/sMeiGhiC71amDS6RS7RhmltaZEX62dJqrJuRlfF2moajjB+jQIFeKeexpkJ95+qidHuvaf0XH5pyqo67g5rNfUUaA/657YSWT3ZamW92YxphCkF/5ZpQbF6PTk0yT0poPVffp0Z0Grg69IT1mbydbKBtixfS/r1YM1WVx+ekgUH5iIPNK/rqrdPTddqjRPAebw73KHOu+LyTtVcLpze0j6I+WzNXSW576Pv2PjRC4L0qMvg6srJ7dlVJzWQRk6xWbRGfmLO6O1UnBRq77rsrR+5K2Gre0GbxjzyYvfJmafTVmx22Qy5PQm0z6xytKTA3rYBZot+PZVjW+0qPkMEpiwODW0Kpljg/ZQBbMs7g3ICWDeOGsFq7XhpIpRvIrSbQdNWeyeeLlavKTzViV1mH7JDKYHDaEm3DY3WnN01tQVr7h4C1YShSwDw+UCTD5Rko7GxUimOKMGv4BojTNaxM2JhI4mS75tcZkFW/Khbh1dfQuW5Iuus5UdWa38nT/LAyIkQrcZdEulYdo67tBx3yfsrq9s8pvbNHh9fmOA7z7DaMAoPg7jsD4qXCpjAP9inTpIGPUiAKz5em4GQXqmfrom938/LTKytBd+FlQr3gpf30GqhcXNAmTkOMqvwUNEk6+KgedYhu/lHl/eL7OOfogXxlH9uYBigJTe6zIQEI9SAeZlqt+PNy3LtZih2+3HX5zZiqOJbkc+tIbjeidY54k60uvdhmHI6lD9j2tDx2Fwd7vINrfo6UrljV7YNjB2u//tGrL7+Fybmx/8B7V3bcuK4Fv2arjrngSl8h0cChKRPrpD0dJ5SEJyExGDacTqXrz8mWASkjWRjSxayp2pqBkcCW2t5a9/1w2hP33vBcP546o9d74deH7//MDo/9Ogf24z+s7jysbzSsJ3lhYdgMl5e0r4vDCafbnyxHl99nYzdl42Boe974WS+efHOn83cu3Dj2jAI/LfNYfe+t/mr8+GDS1wY3A098uq/k3H4GD+FVf++fuROHh7RL2v1+C/TIRocX3h5HI79t7VLRveH0Q58P1z+3/S97XqLxUPrspx3uOWvqxsL3FmYZMJbt2V0jt6s/snl0/Hg+rM7Ov5ds+N7Cz/QA7vj6Pnjj34QPvoP/mzodb+vHgT+62zsLr61Hn36HnPi+/PoohZdfHLD8CMGc/ga+tGlx3DqxX+Nbjj4+B3P//pws/6h877x6SP+RD5vvAQv/mtwF99997TZ8cyX49On0XR0fXvWat42azHjwmHw4MZTR0/t18fr0eFv/W/j5s9Lx7cPnJpmLQculmDtF+Ll7Ln+1I1uKBoQuN4wnPzdpMgwZtrDatxq6oU/ie5Zr6O3ArEnficM9Bl9xfJO41nfkLaCYPixNmy+GPBC+Z069jtNa5MhjPGaU6eOr5lGxgn65oTof5bPiD6trfr3pS9ep+C4UwaO20k5bgriuCmG41oT+50GneP4eK3BoqyecYJuC+C4hniiNMn1BslycCAnlm8n5xq6+eCplwLPZlI8+ezMAvE0yoAn2t3ZeNp7jqcZ38rfofca3xwB8EOE33zrYv51g9B937gU2zDDEfqGOrwoaKdpYDsN2mLfvg0VtAs/rtkoRn37Mm6sU9pFMRrEokTm0OnRJ7E0m8x+e5yE7mA+/OLWW2RHbrL4JfrLZPZw4t4vHqBm1b+v9eOnWl70hiPXu/BfJuHEn0VX76I1d4PoD4u1nkQ23Qk2YOSHoT+NBgy9yQM4oxX/IVy8cehXt74ndKrggJPAFgUc+rE14Non/yNQi24/xKAJA//ZbfueHy1aZ+bPFmLrfuJ52CW0vsHyYYjlnU7G4y+RB1FhkyybGGA80LnA8r4JCVIEAYSa/xiOlR2kh8bp683ln/7H09Wf58HsrGf9uqgZEkgcfYtSv0bcBrAsmpYDc/vz0Vn746d76z8+9U5//gzq958rPWltVS6GXrQputFFz/ef0XrsKnyogkCoSGIJHyppUskebhDCukBTkPDxvtDiJnvqBC9gaZQRJ+RHBSDihZAObA/Hnd8VRHSIDOg14rWFI4t3h+0h1dMm3zPiVXA4KTIwU8nt4N/umbpEpVOBzVQx4oPUXFqdTr9ChSE/IAWTH0ik/Oi0rloVSAyQdKFCnlSVChby75saI+aIECPzSa8DD9kikem6ooEsAp6kZa9CoEBhbpAK+0EFiBjBDQpaUi3tdwfdK3V313wsKGgf4YaR1iDg2O8QzdW93Xquza8O2nfWp/b51r+0vJUtzwzRINWCd6JAzdnUHVbh85wTBWq4+5aRDIOPN3ULo1i2MD4sJ0jBnVTBy8/J6+ArldDL6+TwZjbPO4e/Zte68b+BaR6Nu81Lx6yRsbbWeBy4LxHa9bF754/dgFglRSNMdNZk9vLmASEsXHePXqR75NT+KUgxw0XQLssASl8U9y6Lf4rOBfHmC3g/JCZqu6eygsLZooFvL2fPRw7yA3Z9QKuCpz7mJk50YGe85hGXKcbSozMhMVGhVIo8iErVr9cD0q2TChIxoTF40yVlx2HrtIJEjD8EhoT02R5UkIjaYWFIHAKSq9MKEqGaqKFaqQo123DdBQUrablnfWdCB8iSTKqD5uicwWq0BPpmYIxIw/5iMne9yWyRgXfn+XfPCEG9/uDO3GAY+uV215jbbA953DWGtTPV0z2yrOYWzHVSaxlYau+QKyIUbm3BiJCq/cCsEBFjbMG3R26SA7L2qeSICI09G6STaEBK85IjItSZaegkImT9blkREQNBzv7kHBQczvEoqoVV7toLybwAOhmQKmW2kDT+MvD2nN0lSH7eAKL7BbII1wxHDdQ2uFXkkeRt+9P5wsQuudnvJOezEPTgWDhZBsCp1Esi5SQFMu8YKoVIHtLldtDjkkWiFEZCzWAHUKzKVzKZAjTOL1LTvTh/tfTLcW9+MX//5d02DmtZHPrpHje1EQB49cGNgJur09l9aehLvfvSCHlui4yCHvbq9aPjsmnfzjbACjKKLNL3HgGjVcBIZhbZ0AvktCqc2DgJVVBs8n36T/SxFv373/1DarG/CMVKqAffBhLYeo1qU0qAk9BopLN7UzheShNuCwlRomxSeVzsAcqbqMk7ihUi8Ul2LjSoCpVi9SUdNDgqVATXAJH+Gp7qkAgkMHe5mcZVnfqdEasPkTGGhT5UvTOFaj8N1VqQUwMk7Pr5eJ3FJy/DuuQenfSxfEfRcStaUrzA514dGsNKNkeeP1nw2qNSgDzxQiUZTLwc0S3h42/G20SsBOpK5jL6SuATsBMrMjeWgOm0R81NdqQTVb1epxO8QLocdLIxNukMNmHjLebpJGbGCXn3QYHRkCG5xsJqDZJ2u86lDwq0KhbpV7maeO400jn1+tSd+vFvlKDZNZ01UhTWwBACFftKN5vIChRnSwYGifTJcOqFWox1mRWT5E0/+UFE5kCp3a42p/dILEhkMqHS3Y5ywohXVADGqGQVADlhJDRPDUhKKl4bFll5Dq8K0ENkePf88EWaxQ+GYTAZvX6dBFMpx98kklg5Jq2+EirHKYAqQjkGgvvqK8cpMJFAOQYi/SVUjtO/R2JBIo3M8inH6TESqhzbpJVZPuU4PUa8lGPwQHN9jwKbW/Xz9TgG+JRA1HmvomIoQaSwqBjMHRnO1DSxjl5GkzSsNBt6pWxeco/cmg79wF1ZVi/zYLIwq7JYU4ntJtjsEmhN0ZmTrphXLIwl272yAlWEawc6/FSleuusmKC/YmFuoRjpQElT96p9VL1JrDNqRaIENB7bspeTG42Th+TfodMPsD55HJMHrw/pFIjszRqfTti8y72cTBbNiirik8/h+yH1rYXfs8JGvv3agOPOFVSFVgnAt7d7DhlvwW8mtfC4rQ0Zmf+SOPvb8R2zJ7fs6HSipFdHxYBFlrt8yRw+YEkuc4rr1QdnDuxe8stZyEDBjDz6SMImEilPFO51RGeCJMwEWnveVJDIpEuau3ufOcsOo2j9BDjYjE+3C4lyDMzdvWJi6EpaqefdskmU4o6uhF/5PSrrIpc4aREXani5Hv0ElwMdK1Z09BPpXklLArHx6L1OXJOVegJKGeMbXZWhiAuPruoxFmLCcvC6EMuykbdaRVe/mSNJdBW8ySq6mgqoInKDFG9mnRUSwcFV8HZJ39aWPSJj1G7bqqS2jaCgZh5BO/C2ycjzImbH54xnaRx/VJ5IoniTtSdf/vMKGdm2AFIH/fKdV0AlAIpXuA623RLnb4iW+KvmmSLcYfDawF0Davt7ZnaycB2dKMX7yeD7I+27L5HDByy5RU4KrMRgk7fLPTchwytcBy9DqcJ1dCbIwsxSheuyQlKEJqmROr/K8Y+c/D286vXg25NXhxSZ8gU/yxYdUvWULzpRJNUhEW9LlvKVFSsh2KBEemVirtQ2D+yYa0zVomOuJmpLstp4GEFXYoIhICaKUv3VJg9qoMckjy4LebBzdJkRe3wC6g3KlzxGWclDzYvee/JYhoBad0OmhuL/WHnQ5+rebj3X5lcH7TvrU/t8619aXk1zEtIHeVyKpo+NdT7QbFbL5yJaJRiqZZrB5GkkJI8tycZl4wdROyzyYBN0IeRploE80FETtKh+0dwxsbRDnblv4ROaApQe5DhRhjtUjzxT8KBKm8LJg8sRZgoqNsE0BQgeUzVbnRo7YJNHku5QpoGRx2GRB5tgWiLIo5q5Bas8zYTkQX6voslj48nvDZbKg59g0hRBHpnMLX5eQqAyg9pmvHDy4OUATGML785miyCPasYWtd0zmzyySB5c52mmNLYMIZJHNWOL2uOYTR5DEvIYKeMT+ATMrciHPJZq1hZVoLB1HkndPEZayWMJIY9q1hZVoLDJI6nkYcYn8AmWJoI8ehnIgwQK00coSSUz7vKz0voIjboAH6GlmqVOlSdM7jQl4Q5+NqnG4g42wdBEcMdUjDtv3ZbROXqz+ieXT8eD68/u6Pj3KpNxnTuwOyj3oHqmZCvkN1AbHbTfMtv7SwaOaj4u2pqzDU1JxK6Dl3OzQsL4BF2El8JSzUsBv9hJDU1bEheX46R0ruMTDBGGpq2aoQmTJ+mhL7okiXCE5DFTSh5HBHdU0/dASiS2M/n4KIAWV1gQDj9Ecnmj8axvDqQ3OrCD91jxHXw8dlARJw6qdmYVzMGk+VDCOIj5tRqCOMhSwIrhYCmUd8iyKpaDmGM+1q+4c5ClxxXDQdXi3LB6BvheiuUglkDeFMRBVtCqGA6qZojCHAQS27unzY5nvhyfPo2mo+vbs1bztrlKB+NOQrwxp1bnxEKiux0z42djvBHnOHElIdKGlSEhbNAmJqEkkVNHT2dM4OM3u+wS4xtZRgup+nFUc7TQ9l12QF8OVjK2SfYEIZlEjq4YdUCRZgL2BTVTtmjycBZpRL5s2vG6iPxaR7WoYuJEJXC7laWmKHuiUpMlCbONF1Kz5KjmHEycggmTUxLBiVeRsFMwsQl2nUE2K9t4U0QXAUc1r2HGyJsc3MTEIDPuVkRmuYN6qRV5GkgDrx0DTrqCGn3h0apdUmjgvCyyw/vxbP66RFvA+R85nvQBHyWy0/kfK66kOv9DKHDACar97qCrzhllWYF53wRl5X0jMcqjUxuMUeLDJTI+fWpBhPsYgVXJ40wJairo5qESyvCWzgTxPQSpCZ9YM84KBDH9fam5eljPzQoTMYdCDF96A6/28nZ6dP5x+9nq1A+OzmsG2RVbuNKo44afReqM0KFAWp3XqgDHQcyW5oVe/9VrLZYnItRw8T0P7swNhmHEQjH6JE7plbqYWtFcqo+pz5Oj0yiVPikYVJ0AVenz5LICxXmLgDHa/fiIdI+bur84ZPvkoUHCywDYPiUjaoHHR8D3Q26UvQoSqWQHaYweVAjJpGxqpC+uaOkOp35AvOUn7MljT9SxU+k8kEW2kw4bHrJ9PxEoQpQDx8zwEOV7DYhQya2TCqmckpvXKW/wqpA64a/BzVlbbaquuCCJ9NZJve+oQqFgCW5Ia8hDoSB+EoLU7RQ+B5LOBFnEBans3VSQFCQ7jMblfNifuyd/7NA5vxy3rf57TbXcUTDrDqjUoLoCxXekAbFRLXUSxAYoJ6T6BCXBRrXMQbhyCagHoLoDJQFHtUJcGBwg5xhcDV0qbFQrUIWx0RNik3s6eCZs0PuuNjhACzSqPSELOKq1BQXBAc67o1oWsoCjWh+mxPWB1PQP7nX3DnHq1+ZX5FV2L3XtdM5FhjDBVTMUqeHBdYLDb4IcRYYGnQrs8TmX3cPUUc1WosY12dSR4/AgA291yejrRYzPua8qTB3VLDlqBJZNHTlaYxp4wQejHRc+Pu8KPZg6qhma1Kgomzp8OiGlpg5e5ssoiifG6wKoo6tmBlNDuUzqSHK0uIG3L2AcwECMz7miHK5AIUOx569hmUpgt1WqbE0qwVunrRQNRjGsxq2m0Nw9np5bnQ6xKlD9Br8VKFVOPJ0EkhRZmqXKic8KSREll2apcuJzQohXZiWsyejyCXYTWoE8cqSoZsDaCpzxSqOUmagrJkgi3ZGOvY4Lr8RKRXApIluKLFUuXn7wysKm5RKsLcCV4uKDygPx0oOWRbCOiuLCIyMqnGVH7y447wzvz42b62nfNkbO8G9DStnhcJId4AJAsuPgpHWmcFsAKhHECw/wdiDhUcFSoPToz0dn7Y+f7q3/+NQ7/fkzqN9/AiiFk9niZiRrkbJ0Eubohczd36gl8DeCzVLy8LZRDwgoS7OU7JDBzWyywwO3mJNg58ZXYLWT5+0OhglauYNTkDZvUsKQVO7gFJBw3rFhhCp3cHqEhLqDkRwvVLDjqZ+82qHQCuOU7IZCh1wSMa5yM5SsABQitFVuhpITIGJltAS5GLiMBs2PPNxmtHIlzl0NZGJkcZkXtJIkzj0M9hOAIvIsMvRH4qe28YrCUUt/le2FRMddErkA9DhWqxdSVhSKiLLJKBuERtmANmm8ojnFsJIKuyQxNaBLWgVCwZJhj6oQlxz4N45HLb9nHP+GDeIBFH3QpMN6zQctVi++uh68mz2qAuQHHVCuQ4vnc4cu+hj4frhePxMJl8dTf+wuRvwf \ No newline at end of file -- cgit v1.2.3 From f53db3c725838e89a6148b2c629093862d57519c Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Wed, 15 Mar 2023 22:19:50 +0100 Subject: Update architecture.md --- docs/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture.md b/docs/architecture.md index 9be6751..36bec75 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -401,7 +401,7 @@ optional: - envelope (ADSR) -![ADSR envelope](https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg) + This image shows an advanced method of generating tones. In our case this is only an indication as to how it could be done, we will actually only be looking at the sustained tone part for simplicity sakes. In order to get the correct graph forms, some data points can be stored in a LUT (Look Up Table). This allows the saving of computation power at the cost of some ROM space. -- cgit v1.2.3 From 51ee4672d5f2f734eb40f4312a2aefd2f8c6dc03 Mon Sep 17 00:00:00 2001 From: BjornMartens <113104306+BjornMartens@users.noreply.github.com> Date: Thu, 16 Mar 2023 09:58:34 +0100 Subject: Added top level stm --- docs/architecture.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/architecture.md b/docs/architecture.md index cf4440f..3b4a877 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -31,6 +31,17 @@ To ensure a smooth and enjoyable gaming experience, it is essential to address a ## STM32 ### game engine +The game engine is designed to run a 2D platformer game. The game engine has to manage all the different game states. To do this it will utilize a finite state machine (FSM). The game engine will also cover de input handling from the player, the game logic for example enemy handling or the powerup handling it will also send out data to the APU (Audio processing unit) so that the right sounds will be played. + +FSM is a useful tool for managing game states and transitions. The game has many different states such as: title screen, shop and gameplay state. Each state represents a particular configuration from the with different logic and variables. + +The state machine is designed to have the following states: +1. Initialization: The initialization state will be responsible for initializing all game-related variables and subsystems, including the FPGA-based picture processing unit. +2. Title Screen: The title screen state will display the game's title screen and wait for user input to start the game or access the options menu. +3. Options: The options state will allow the user to configure game settings, such as sound and graphics options. +4. Game Play: The game play state will be responsible for running the game logic and updating the game state. +5. Game Over: The game over state will display the game over screen and wait for user input to restart the game or return to the title screen. + ### user input ### PPU communication ### APU communication -- cgit v1.2.3 From edee448b453c683ca968a8dacaa37508ec649c8c Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Thu, 16 Mar 2023 12:46:18 +0100 Subject: Update architecture.md Added SPI (STM32, BASYS3) --- docs/architecture.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/architecture.md b/docs/architecture.md index 36bec75..bea35be 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -430,3 +430,23 @@ To index tiles from the tilemap, 10 bits will be used for both the foreground and background layers of the PPU. This means that the global tilemap can fit up to 1024 tiles in total, each being 16x16 pixels (the example uses 4x4 tiles for illustration purposes). + + +### PPU communication + +To comunicate with the FPGA via the STM32 a protocol is needed. After [research](research.md#Input) of different possible protocols, SPI was the best option for this problem. As there is only one master and one slave, four data lines are needed at maximum. The STM32 will be the master and the FPGA will be the slave. The STM32 has a configurable SPI module that is easily configurable unlike the FPGA. Futhermore, the MISO line is not needed because the FPGA does not send any big data to the STM32. The slave select line will operate as a write enable. + + + +### SPI + +The FPGA will configure as a slave of the SPI protocol. THe FPGA (Basys3) does not have a IP-Core that supports external SPI communication so the SPI slave has to be designed. The module requires three inputs as mentioned before in the [STM32](architecture.md#STM32) section. + + +### PPU communication + +The SPI module will be configured that sends 8 bits per cycle and at a speed of 1.0 MB/s. The STM32 Cube IDE SPI module does not include a slave select line so a pin has to configured manually to fullfill this purpose. Every data transfer consists out of 4 times 8 bits, so 32 bits in total. The first byte is the address and the other 3 bytes consist the data. + + +### SPI +The FPGA uses 3 JMOD pins to receive the SPI data. The FPGA does not have a IP-Core for SPI. To receive the data the module has 3 synchronisers for the incoming SPI clock, data and slave select. The data will be read via the SPI protocol and shifted untill all 32 bits are read. -- cgit v1.2.3 From 3b9864c7e6382acc0a6727920ef0f92c33af250d Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 16 Mar 2023 13:06:27 +0100 Subject: merge niels docs --- assets/TopLevel.PNG | Bin 0 -> 13919 bytes assets/hh_introScreen.png | Bin 0 -> 130932 bytes docs/BobSprint2.md | 19 +++++++++++++++++++ docs/architecture.md | 38 +++++++++++++++++++++++++++++++++----- 4 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 assets/TopLevel.PNG create mode 100644 assets/hh_introScreen.png create mode 100644 docs/BobSprint2.md diff --git a/assets/TopLevel.PNG b/assets/TopLevel.PNG new file mode 100644 index 0000000..2a7b16d Binary files /dev/null and b/assets/TopLevel.PNG differ diff --git a/assets/hh_introScreen.png b/assets/hh_introScreen.png new file mode 100644 index 0000000..8b6e192 Binary files /dev/null and b/assets/hh_introScreen.png differ diff --git a/docs/BobSprint2.md b/docs/BobSprint2.md new file mode 100644 index 0000000..6fff8fc --- /dev/null +++ b/docs/BobSprint2.md @@ -0,0 +1,19 @@ + + +# Proud of +Simulation: We're proud of the simulation that we created to test our game because it allows us to identify and address potential issues before the game is released. This helps ensure that the game is as polished and bug-free as possible. + +PPU: Our use of an FPGA-based PPU (Picture Processing Unit) in our game engine allows us to achieve high-quality graphics and smooth animation. This is important because it helps create an immersive and engaging gaming experience. + +Upscaling: We've implemented a sophisticated upscaling that allows us to scale up our game. This Ensures that our game runs smoothly and without any + +Collisions: We've put a lot of effort into making sure that our collision detection system is accurate and reliable. This ensures that the game mechanics work as intended and that players are able to navigate the game world without frustration. + +Artwork: We're proud of the artwork that was created which is stunning and imaginative artwork that brings the game world to life. From character designs to background artwork, every aspect of the game has been given careful attention to ensure that it looks as good as it plays. And more is coming! +# Challegens +Upscaling: While our upscaling algorithm is sophisticated, one of the challenges we faced was synchronization. Because we're upscaling in real-time, we had to ensure that the upscaling process didn't cause any lag or delay in the game. This required careful optimization of the algorithm and synchronization with other game components. + +PPU: While the use of an FPGA-based PPU allowed us to achieve high-quality graphics, it also presented some challenges. Specifically, the limited resources of the FPGA required us to optimize the PPU code to ensure that it could handle the demands of real-time gameplay. + +Communication bug fixes on the STM32: As with any complex system, we encountered some bugs in the communication between the STM32 microcontroller and the other components of the system. This required careful debugging and troubleshooting to identify and fix the issues. + diff --git a/docs/architecture.md b/docs/architecture.md index 36bec75..c2eb655 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,18 +1,46 @@ -# General system architecture +# Hooded Havic: Miniboss Mania + +![intro arcade game](../assets/hh_introScreen.png) + +# introduction +Welcome to Hooded Havoc: Miniboss Mania, an exciting 2D platformer game created by our team Joshua, Loek, Bjorn, Frenk and Niels! This game was developed using the STM32 microcontroller as the game engine and the FPGA as the Picture Processing Unit (PPU). + +In Hooded Havoc: Miniboss Mania, you will take on the role of a brave hero who must battle through multiple levels filled with challenging obstacles and formidable minibosses. With smooth gameplay and engaging graphics, you will feel immersed in a world of adventure and excitement. + +Our use of the STM32 microcontroller and FPGA PPU allowed us to create a unique and innovative gaming experience. The STM32 provides efficient and reliable processing power, while the FPGA ensures that our graphics are rendered smoothly and accurately. + +So get ready to embark on a thrilling journey through Hooded Havoc: Miniboss Mania, and see how far you can make it! +## Objective +The objective of Hooded Havoc: Miniboss Mania is to guide the hero through multiple levels, defeating minibosses and overcoming obstacles along the way. The ultimate goal is to reach the final boss and defeat them to retrieve the stolen staff. + +To achieve this objective, the player must use their platforming skills to jump, run, and dodge obstacles while also battling enemies and minibosses. Each level presents a unique challenge that will require the player to adapt and strategize to overcome. + +As the player progresses through the game, they will unlock new abilities and power-ups that will aid them in their journey. The player must use these abilities wisely to defeat the minibosses and ultimately save the world. + +So, the objective of Hooded Havoc: Miniboss Mania is not only to provide an exciting and engaging gaming experience but also to challenge players to use their skills and strategic thinking to overcome obstacles and emerge victorious. +## Problem statement +One potential problem that could arise in the development of Hooded Havoc: Miniboss Mania is related to the PPU and communication between the STM32 and PPU. + +The PPU is responsible for rendering the graphics and displaying them on the screen, while the STM32 is responsible for processing the game logic and input from the player. However, if there is a problem with the communication between these two components, it could lead to synchronization issues and graphical glitches that could affect the player's experience. The existing hardware components available for building this project consists of: +For example, if the PPU is unable to keep up with the processing speed of the STM32, the graphics may lag or appear distorted, causing the game to become unplayable. Similarly, if there is a delay in communication between the STM32 and PPU, it could result in a mismatch between the game logic and the displayed graphics, leading to confusion for the player. -- Raspberry Pi -- Nucleo STM32 development board -- Basys3 FPGA development board -- Arduino Uno R3 +To ensure a smooth and enjoyable gaming experience, it is essential to address any potential issues with the PPU and communication between the STM32 and PPU during the development process. This may involve optimizing the code for both components, adjusting the communication protocol, or adding buffer systems to prevent lag or synchronization issues. + +# General system architecture The Raspberry Pi is by far the most powerful component out of these 4, but because one of the project requirements is that no general-purpose operating system is used, utilizing the Raspberry Pi will involve writing low-level drivers for its interfaces, which will likely cost a lot of effort. +- Raspberry Pi +- Nucleo STM32 development board +- Basys3 FPGA development board +- Arduino Uno R3 + As to not risk project failure due to hardware constraints, the decision was made to use the STM32 microcontroller and FPGA in combination, as these two are both familiar and still relatively powerful platforms. Because audio and video -- cgit v1.2.3 From 0fb8c4c52d185244898bac5745df6730a5c6ed5e Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 16 Mar 2023 17:58:20 +0100 Subject: restructure architecture document --- docs/architecture.md | 78 +++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index c880b5d..831e6e4 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,8 +1,9 @@ -# Hooded Havic: Miniboss Mania + ![intro arcade game](../assets/hh_introScreen.png) -# introduction +# Introduction + Welcome to Hooded Havoc: Miniboss Mania, an exciting 2D platformer game created by our team Joshua, Loek, Bjorn, Frenk and Niels! This game was developed using the STM32 microcontroller as the game engine and the FPGA as the Picture Processing Unit (PPU). In Hooded Havoc: Miniboss Mania, you will take on the role of a brave hero who must battle through multiple levels filled with challenging obstacles and formidable minibosses. With smooth gameplay and engaging graphics, you will feel immersed in a world of adventure and excitement. @@ -10,7 +11,9 @@ In Hooded Havoc: Miniboss Mania, you will take on the role of a brave hero who m Our use of the STM32 microcontroller and FPGA PPU allowed us to create a unique and innovative gaming experience. The STM32 provides efficient and reliable processing power, while the FPGA ensures that our graphics are rendered smoothly and accurately. So get ready to embark on a thrilling journey through Hooded Havoc: Miniboss Mania, and see how far you can make it! + ## Objective + The objective of Hooded Havoc: Miniboss Mania is to guide the hero through multiple levels, defeating minibosses and overcoming obstacles along the way. The ultimate goal is to reach the final boss and defeat them to retrieve the stolen staff. To achieve this objective, the player must use their platforming skills to jump, run, and dodge obstacles while also battling enemies and minibosses. Each level presents a unique challenge that will require the player to adapt and strategize to overcome. @@ -18,29 +21,32 @@ To achieve this objective, the player must use their platforming skills to jump, As the player progresses through the game, they will unlock new abilities and power-ups that will aid them in their journey. The player must use these abilities wisely to defeat the minibosses and ultimately save the world. So, the objective of Hooded Havoc: Miniboss Mania is not only to provide an exciting and engaging gaming experience but also to challenge players to use their skills and strategic thinking to overcome obstacles and emerge victorious. + ## Problem statement + One potential problem that could arise in the development of Hooded Havoc: Miniboss Mania is related to the PPU and communication between the STM32 and PPU. The PPU is responsible for rendering the graphics and displaying them on the screen, while the STM32 is responsible for processing the game logic and input from the player. However, if there is a problem with the communication between these two components, it could lead to synchronization issues and graphical glitches that could affect the player's experience. -The existing hardware components available for building this project consists -of: For example, if the PPU is unable to keep up with the processing speed of the STM32, the graphics may lag or appear distorted, causing the game to become unplayable. Similarly, if there is a delay in communication between the STM32 and PPU, it could result in a mismatch between the game logic and the displayed graphics, leading to confusion for the player. To ensure a smooth and enjoyable gaming experience, it is essential to address any potential issues with the PPU and communication between the STM32 and PPU during the development process. This may involve optimizing the code for both components, adjusting the communication protocol, or adding buffer systems to prevent lag or synchronization issues. # General system architecture -The Raspberry Pi is by far the most powerful component out of these 4, but -because one of the project requirements is that no general-purpose operating -system is used, utilizing the Raspberry Pi will involve writing low-level -drivers for its interfaces, which will likely cost a lot of effort. +The existing hardware components available for building this project consists +of: - Raspberry Pi - Nucleo STM32 development board - Basys3 FPGA development board - Arduino Uno R3 +The Raspberry Pi is by far the most powerful component out of these 4, but +because one of the project requirements is that no general-purpose operating +system is used, utilizing the Raspberry Pi will involve writing low-level +drivers for its interfaces, which will likely cost a lot of effort. + As to not risk project failure due to hardware constraints, the decision was made to use the STM32 microcontroller and FPGA in combination, as these two are both familiar and still relatively powerful platforms. Because audio and video @@ -59,7 +65,19 @@ show what the complete system looks like. The scope of this project only includes the components inside the area marked "game console" and the gamepad components. -# Game controllers +# STM32 software + +The game engine will be designed to support 2D games. The engine will use a state machine to manage game states and transitions between them. The state machine will be implemented using a finite state machine (FSM) design pattern. The engine will also include support for handling user input, game logic, and sound. + +FSM is a useful tool for managing game states and transitions. A game can have many different states, such as a title screen, a level selection screen, a loading screen, and various gameplay states. Each state represents a particular configuration of the game, with different sets of variables, objects, and logic + +The state machine will be designed with the following states: + +1. Initialization: The initialization state will be responsible for initializing all game-related variables and subsystems, including the FPGA-based picture processing unit. +2. Title Screen: The title screen state will display the game's title screen and wait for user input to start the game or access the options menu. +3. Options: The options state will allow the user to configure game settings, such as sound and graphics options. +4. Game Play: The game play state will be responsible for running the game logic and updating the game state. +5. Game Over: The game over state will display the game over screen and wait for user input to restart the game or return to the title screen. ## Input @@ -95,19 +113,13 @@ The buttons will be connected as follows: To implement the input in the game, the input should be checked at the start of each game cycle. In this case there are no interrupts needed. -# STM32 software +## PPU communication -The game engine will be designed to support 2D games. The engine will use a state machine to manage game states and transitions between them. The state machine will be implemented using a finite state machine (FSM) design pattern. The engine will also include support for handling user input, game logic, and sound. - -FSM is a useful tool for managing game states and transitions. A game can have many different states, such as a title screen, a level selection screen, a loading screen, and various gameplay states. Each state represents a particular configuration of the game, with different sets of variables, objects, and logic +The SPI module will be configured that sends 8 bits per cycle and at a speed of 1.0 MB/s. The STM32 Cube IDE SPI module does not include a slave select line so a pin has to configured manually to fullfill this purpose. Every data transfer consists out of 4 times 8 bits, so 32 bits in total. The first byte is the address and the other 3 bytes consist the data. -The state machine will be designed with the following states: +## SPI -1. Initialization: The initialization state will be responsible for initializing all game-related variables and subsystems, including the FPGA-based picture processing unit. -2. Title Screen: The title screen state will display the game's title screen and wait for user input to start the game or access the options menu. -3. Options: The options state will allow the user to configure game settings, such as sound and graphics options. -4. Game Play: The game play state will be responsible for running the game logic and updating the game state. -5. Game Over: The game over state will display the game over screen and wait for user input to restart the game or return to the title screen. +The FPGA uses 3 JMOD pins to receive the SPI data. The FPGA does not have a IP-Core for SPI. To receive the data the module has 3 synchronisers for the incoming SPI clock, data and slave select. The data will be read via the SPI protocol and shifted untill all 32 bits are read. # PPU @@ -403,6 +415,15 @@ Format: [custompputimings]: https://docs.google.com/spreadsheets/d/1MU6K4c4PtMR_JXIpc3I0ZJdLZNnoFO7G2P3olCz6LSc +## PPU communication + +To comunicate with the FPGA via the STM32 a protocol is needed. After [research](research.md#Input) of different possible protocols, SPI was the best option for this problem. As there is only one master and one slave, four data lines are needed at maximum. The STM32 will be the master and the FPGA will be the slave. The STM32 has a configurable SPI module that is easily configurable unlike the FPGA. Futhermore, the MISO line is not needed because the FPGA does not send any big data to the STM32. The slave select line will operate as a write enable. + +## SPI + +The FPGA will configure as a slave of the SPI protocol. The FPGA (Basys3) does not have a IP-Core that supports external SPI communication so the SPI slave has to be designed. The module requires three inputs as mentioned before in the [STM32](architecture.md#STM32) section. + + # APU The Audio Processing Unit (APU) is programmed on the FPGA, here it will produce different signals on the audio output. These signals come in a few forms, as listed below. @@ -459,22 +480,3 @@ and background layers of the PPU. This means that the global tilemap can fit up to 1024 tiles in total, each being 16x16 pixels (the example uses 4x4 tiles for illustration purposes). - -### PPU communication - -To comunicate with the FPGA via the STM32 a protocol is needed. After [research](research.md#Input) of different possible protocols, SPI was the best option for this problem. As there is only one master and one slave, four data lines are needed at maximum. The STM32 will be the master and the FPGA will be the slave. The STM32 has a configurable SPI module that is easily configurable unlike the FPGA. Futhermore, the MISO line is not needed because the FPGA does not send any big data to the STM32. The slave select line will operate as a write enable. - - - -### SPI - -The FPGA will configure as a slave of the SPI protocol. THe FPGA (Basys3) does not have a IP-Core that supports external SPI communication so the SPI slave has to be designed. The module requires three inputs as mentioned before in the [STM32](architecture.md#STM32) section. - - -### PPU communication - -The SPI module will be configured that sends 8 bits per cycle and at a speed of 1.0 MB/s. The STM32 Cube IDE SPI module does not include a slave select line so a pin has to configured manually to fullfill this purpose. Every data transfer consists out of 4 times 8 bits, so 32 bits in total. The first byte is the address and the other 3 bytes consist the data. - - -### SPI -The FPGA uses 3 JMOD pins to receive the SPI data. The FPGA does not have a IP-Core for SPI. To receive the data the module has 3 synchronisers for the incoming SPI clock, data and slave select. The data will be read via the SPI protocol and shifted untill all 32 bits are read. -- cgit v1.2.3 From 72295b9df9c0de9e585cce3f41437965eb0390cb Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Mon, 20 Mar 2023 19:11:41 +0100 Subject: demo version --- .vscode/settings.json | 4 +- src/GameLoop/shop.c | 30 ++++++++++++++ src/GameLoop/shop.h | 16 ++++++++ src/GameLoop/startingScreen.c | 32 +++++++++++++++ src/GameLoop/startingScreen.h | 14 +++++++ src/demo.c | 54 ++++++++++++++++++++++-- src/engine/bullet.c | 44 ++++++++++++++++++++ src/engine/bullet.h | 16 ++++++++ src/engine/draw_screen.c | 26 ++++++++++++ src/engine/draw_screen.h | 5 +++ src/engine/player_controller.c | 35 ++++++++++++---- src/engine/title_screen.c | 93 ++++++++++++++++++++++++++++++++++++++++++ src/engine/title_screen.h | 3 ++ src/makefile | 6 ++- src/ppusim/input.c | 1 + 15 files changed, 367 insertions(+), 12 deletions(-) create mode 100644 src/GameLoop/shop.c create mode 100644 src/GameLoop/shop.h create mode 100644 src/GameLoop/startingScreen.c create mode 100644 src/GameLoop/startingScreen.h create mode 100644 src/engine/bullet.c create mode 100644 src/engine/bullet.h create mode 100644 src/engine/title_screen.c create mode 100644 src/engine/title_screen.h diff --git a/.vscode/settings.json b/.vscode/settings.json index d027762..f4d72ed 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,7 @@ } }, "cmake.configureOnOpen": false, - "files.eol": "\n" + "files.eol": "\n", + "nrf-connect.topdir": "${nrf-connect.sdk:2.1.2}", + "nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.1.2}" } diff --git a/src/GameLoop/shop.c b/src/GameLoop/shop.c new file mode 100644 index 0000000..eb6bed5 --- /dev/null +++ b/src/GameLoop/shop.c @@ -0,0 +1,30 @@ +#include "shop.h" + + +bool hh_show_Shop(){ + static hh_e_ShopStates hh_e_Shop = hh_e_STATE_SHOW; + + switch (hh_e_Shop) + { + case hh_e_STATE_SHOW: + //hh_clear_screen(); + + //hh_setup_shop(); + hh_e_Shop = hh_e_STATE_Input; + return false; + break; + case hh_e_STATE_Input: + if(g_hh_controller_p1.button_primary){ + hh_e_Shop = hh_e_STATE_END; + } + break; + case hh_e_STATE_END: + hh_e_Shop = hh_e_STATE_SHOW; + return true; + break; + default: + hh_e_Shop = hh_e_STATE_SHOW; + break; + } + return false; +} diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h new file mode 100644 index 0000000..4014f58 --- /dev/null +++ b/src/GameLoop/shop.h @@ -0,0 +1,16 @@ +#include "input.h" +#include "engine/draw_screen.h" + + + +#include +#include + +typedef enum { + hh_e_STATE_SHOW, + hh_e_STATE_Input, + hh_e_STATE_END +} hh_e_ShopStates; + + +bool hh_show_Shop(); diff --git a/src/GameLoop/startingScreen.c b/src/GameLoop/startingScreen.c new file mode 100644 index 0000000..4fc5af9 --- /dev/null +++ b/src/GameLoop/startingScreen.c @@ -0,0 +1,32 @@ +#include "startingScreen.h" +#include "input.h" +#include "engine/title_screen.h" +#include "engine/draw_screen.h" +// #include "engine/player_controller.h" + +bool hh_show_startingScreen(){ + static hh_e_screenStates hh_e_startingScreen = hh_e_STATE_SHOW; + + switch (hh_e_startingScreen) + { + case hh_e_STATE_SHOW: + hh_clear_screen(); + hh_init_title_screen(); + hh_e_startingScreen = hh_e_STATE_Input; + return false; + break; + case hh_e_STATE_Input: + if(g_hh_controller_p1.button_primary){ + hh_e_startingScreen = hh_e_STATE_END; + } + break; + case hh_e_STATE_END: + hh_e_startingScreen = hh_e_STATE_SHOW; + return true; + break; + default: + hh_e_startingScreen = hh_e_STATE_SHOW; + break; + } + return false; +} diff --git a/src/GameLoop/startingScreen.h b/src/GameLoop/startingScreen.h new file mode 100644 index 0000000..f51cc66 --- /dev/null +++ b/src/GameLoop/startingScreen.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +typedef enum { + hh_e_STATE_SHOW, + hh_e_STATE_Input, + hh_e_STATE_END +} hh_e_screenStates; + + +bool hh_show_startingScreen(); + diff --git a/src/demo.c b/src/demo.c index d4d1bf7..22ee8b7 100644 --- a/src/demo.c +++ b/src/demo.c @@ -11,8 +11,18 @@ #include "engine/draw_screen.h" #include "engine/player_controller.h" #include "engine/sprite_controller.h" +#include "GameLoop/startingScreen.h" +typedef enum { + hh_e_STATE_startingScreen, + hh_e_STATE_Shop, + hh_e_STATE_Gameplay, + hh_e_STATE_GameOver, + hh_e_STATE_HighScore +} hh_e_GameState; +hh_e_GameState hh_gameStates; + uint16_t g_hh_pos_x = 1000; // 0b0000 0001 0011 0110 @@ -37,7 +47,7 @@ hh_entity hh_g_player, hh_g_player_new; void hh_demo_setup() { hh_setup_palettes(); - hh_setup_screen(); + // hh_setup_screen(); } @@ -45,8 +55,46 @@ void hh_demo_setup() { void hh_demo_loop(unsigned long frame) { - hh_player_actions(); - + switch (hh_gameStates) + { + case hh_e_STATE_startingScreen: + bool ret = hh_show_startingScreen(); + if(ret){ + hh_gameStates = hh_e_STATE_Shop; + } + break; + case hh_e_STATE_Shop: + // TODO: + // if(hh_show_Shop()){ + hh_clear_screen(); + hh_clear_sprite(); + hh_setup_screen(); + hh_clear_sprite(); + hh_gameStates = hh_e_STATE_Gameplay; + // } + // function: new level is chosen goto level + break; + case hh_e_STATE_Gameplay: + hh_player_actions(); + + // TODO: + // function: if level complete goto shop + // function: if player is dead goto game over + break; + case hh_e_STATE_GameOver: + // TODO: + // function: show game over screen + // function: after time goto high score + break; + case hh_e_STATE_HighScore: + // TODO: + // fucntion: show all previously scored points + // function: button pressed goto starting screen + break; + default: + hh_gameStates = hh_e_STATE_startingScreen; + break; + } } // void sendData(uint8_t address, uint16_t data) { diff --git a/src/engine/bullet.c b/src/engine/bullet.c new file mode 100644 index 0000000..5aa9e51 --- /dev/null +++ b/src/engine/bullet.c @@ -0,0 +1,44 @@ +#include "bullet.h" +#include "engine/sprite_controller.h" + + +void shootBullet(vec2 playerPos, Bullet* bullet){ + // Set bullet's x and y coordinates to player's coordinates + bullet->x = playerPos.x; + bullet->y = playerPos.y; + // Set bullet's velocity to a fixed value + bullet->velocity = 1; + // Set bullet's status to active + bullet->isActive = true; +} +void updateBullet(Bullet* bullet, int deltaTime){ + // Only update bullet if it is active + static int latestLocationBullet = 0; + if (bullet->isActive) { + // Move bullet based on velocity and deltaTime + bullet->x += bullet->velocity * deltaTime; + drawBullet(bullet); + // Check if bullet has moved 16 pixels + if (bullet->x - latestLocationBullet > 32) { + // Set bullet's status to inactive + bullet->isActive = false; + drawBullet(&(Bullet){.x = -16,.y = -16. }); + } + } + else{ + latestLocationBullet = bullet->x; + } +} +void drawBullet(Bullet* bullet){ + + + hh_ppu_update_foreground(10, (hh_s_ppu_loc_fam_entry) + { + .position_x = bullet->x, + .position_y = bullet->y, + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 7, + .tilemap_index = 84, // change tilemap to the correct foreground index; + }); +} diff --git a/src/engine/bullet.h b/src/engine/bullet.h new file mode 100644 index 0000000..ad67d84 --- /dev/null +++ b/src/engine/bullet.h @@ -0,0 +1,16 @@ +#pragma once +#include "player_controller.h" + +typedef struct { + int x; + int y; + int velocity; + int isActive; + int hit; +} Bullet; + + +//Bullet* createBullet(float x, float y, float velocity, float direction); +void shootBullet(vec2 playerPos, Bullet* bullet); +void updateBullet(Bullet* bullet, int deltaTime); +void drawBullet(Bullet* bullet); diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index c4f3389..fed2cfa 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -60,3 +60,29 @@ void hh_setup_screen(){ } free(tile); } +void hh_clear_screen(){ + // (HH_PPU_SCREEN_HEIGHT*HH_PPU_SCREEN_WIDTH)/(HH_PPU_SPRITE_HEIGHT*HH_PPU_SPRITE_WIDTH) + for (int i = 0; i < HH_PPU_BG_CANVAS_TILES_H*HH_PPU_BG_CANVAS_TILES_V; i++) { + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false,.horizontal_flip = false, + .palette_index = 3,.tilemap_index = 0 + }; + hh_ppu_update_background(i,temp); + hh_ppu_update_color(3,0,(hh_ppu_rgb_color_t){0x0,0x0,0x0}); + } + hh_ppu_update_aux((hh_s_ppu_loc_aux){ + .bg_shift_x = 0, + .bg_shift_y = 0, + .fg_fetch = 0, + .sysreset = 0, + }); +} + +void hh_clear_sprite(){ + for (int i = 0; i < HH_PPU_FG_SPRITE_COUNT; i++) { + hh_ppu_update_foreground(i,(hh_s_ppu_loc_fam_entry){ + .position_x = -16, + .position_y = -16, + }); + } +} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index b181108..d3abca6 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -19,3 +19,8 @@ uint8_t hh_world_to_tile(vec2 pos); void hh_draw_screen(vec2 viewport); /** @brief send data to BAM memory from binary level */ void hh_setup_screen(); + +/** @brief send black screen to background memory */ +void hh_clear_screen(); +/** @brief clears all sprite data */ +void hh_clear_sprite(); diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index d351bee..647b00c 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -6,7 +6,11 @@ #include "input.h" +#include "engine/bullet.h" void hh_player_actions() { + static Bullet bullet ={ + .isActive=false, + }; static hh_entity player={ .hp = 4, .speed = 6, @@ -17,13 +21,13 @@ void hh_player_actions() { .vel = (vec2){0,0}, .vec = (vec2){0,0}, .render = { - .frame0 = 20, - .palette = 7, + .frame0 = 80, + .palette = 3, .fam = (hh_s_ppu_loc_fam_entry){ .horizontal_flip = false, .vertical_flip = false, - .palette_index = 7, - .tilemap_index = 2, + .palette_index = 2, + .tilemap_index = 60, } } }, player_new = {0}; @@ -114,6 +118,10 @@ void hh_player_actions() { player.vel.y += 1; //gravity } + if(g_hh_controller_p1.button_secondary==true){ + shootBullet(player.pos,&bullet); + } + updateBullet(&bullet,5); @@ -202,7 +210,7 @@ void hh_player_actions() { // hh_solve_collision(tiles[i].pos, &player); // } // } - + player = hh_background_collision ( player, player_new); //player = player_new; @@ -221,9 +229,22 @@ void hh_player_actions() { 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_ppu_update_foreground(0, player.render.fam); + + for (int i = 0; i < 4; i++) + { + hh_s_ppu_loc_fam_entry temp = player.render.fam; + temp.position_x = player.render.fam.position_x+(!(player.vel.x>0)?-1:1)*(i%2?8:-8); + temp.position_y = player.render.fam.position_y+(i>1?0:-16); + temp.tilemap_index = player.render.frame0 + i; + temp.palette_index = player.render.palette; + temp.horizontal_flip = !(player.vel.x>0); + hh_ppu_update_foreground(i,temp); + } + + - hh_ppu_update_foreground(1, enemy.render.fam); + hh_ppu_update_foreground(4, enemy.render.fam); } diff --git a/src/engine/title_screen.c b/src/engine/title_screen.c new file mode 100644 index 0000000..9c7ed48 --- /dev/null +++ b/src/engine/title_screen.c @@ -0,0 +1,93 @@ +#include "ppu/ppu.h" +#include "ppu/types.h" +#include "ppu/consts.h" + + +#include "engine/draw_screen.h" +#include "engine/entity.h" + +void hh_init_title_screen(){ + + // hh_clear_screen(); + + //send data + uint8_t idx = 0; + const uint8_t tilemap_offset = 59; + int tiles_h = HH_PPU_BG_CANVAS_TILES_H; + int vp_h = HH_PPU_SCREEN_WIDTH/HH_PPU_SPRITE_WIDTH; //screen_h in tiles + int vert_offset = tiles_h*3; + + const uint8_t arr[4][4] = { + {0,1,1,0}, + {2,3,3,2}, + {4,0,0,4}, + {5,6,6,5}, + }; + int val, counter =0; + hh_ppu_update_color(5, 0, (hh_ppu_rgb_color_t) {0x1, 0x1, 0x1}); + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + val = arr[i][j]; + + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false, .horizontal_flip = ((j % 4 < 2) ? false : true), + .palette_index = (counter == 9 || counter == 10? 5:3), .tilemap_index = (val > 0 ? (tilemap_offset + val) : 0) + }; + + int vert_pos = tiles_h*i; + int x_pos = j; + idx = vert_offset + vert_pos + x_pos + vp_h/2-2; + + hh_ppu_update_background(idx,temp); + counter++; + } + + } + + + const uint8_t letters_offset = 66; + const int _size_hooded = 7, _size_v = 2; + + // char* hh = "hooded"; + int hooded_lookup[7][2]={ + {0,1},{0,2},//H + {3,4},{3,4},//oo + {5,6},{13,9},//de + {5,6}//d + }; + + counter = 8; + for (int i = 0; i < _size_hooded; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = false, + .palette_index = 6, .tilemap_index = letters_offset + hooded_lookup[i][vert-1], + .position_x = (16*i + 64+48), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+16 +(i==2 || i==3 ? 6:0)) + }); + } + } + + + hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t) {0xa, 0x3, 0x3}); + hh_ppu_update_color(5, 2, (hh_ppu_rgb_color_t) {0xc, 0x5, 0x3}); + + const int _size_havoc = 6; + int lookup_havoc[6][2]={ + {0,1},{0,2},//H + {13,10},{7,8},//av + {13,11},{13,12}//oc + }; + + counter = 8 + (_size_hooded * _size_v); + for (int i = 0; i < _size_havoc; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = (i > 4 && vert==0 ? 1:0), + .palette_index = 5, .tilemap_index = letters_offset + lookup_havoc[i][vert-1], + .position_x = (16*i +64+32+8), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+48) + }); + } + } +} diff --git a/src/engine/title_screen.h b/src/engine/title_screen.h new file mode 100644 index 0000000..b5eda63 --- /dev/null +++ b/src/engine/title_screen.h @@ -0,0 +1,3 @@ +#pragma once + +void hh_init_title_screen(); diff --git a/src/makefile b/src/makefile index d7d9087..cd248e2 100644 --- a/src/makefile +++ b/src/makefile @@ -37,7 +37,11 @@ LOCAL_SRCS += main.c \ engine/draw_screen.c \ engine/camera.c \ engine/maths.c \ - engine/entity.c + engine/entity.c \ + engine/bullet.c \ + engine/title_screen.c \ + GameLoop/shop.c \ + GameLoop/startingScreen.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 5323fb1..4bc7018 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -13,4 +13,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_SPACE]; + g_hh_controller_p1.button_secondary = kb[SDL_SCANCODE_R]; } -- cgit v1.2.3