From a7f056b7ca70af6a5c72511a09f5cb6b08760522 Mon Sep 17 00:00:00 2001 From: Fuji Pebri Date: Mon, 28 Oct 2019 09:58:33 +0700 Subject: [PATCH] update retro-esp32 launcher --- .../esplay-components/esplay-hal/power.c | 2 + .../esplay-components/esplay-hal/sdcard.c | 8 +- mkrelease_retro-esp32.sh | 15 +- retro-esp32/main/includes/core.h | 5 +- retro-esp32/main/includes/declarations.h | 20 +- retro-esp32/main/includes/definitions.h | 17 +- retro-esp32/main/includes/structures.h | 29 +- retro-esp32/main/main.c | 582 +++++++++++++----- retro-esp32/main/sprites/characters.h | 21 +- retro-esp32/main/sprites/charge.h | 8 + retro-esp32/main/sprites/folder.h | 18 + retro-esp32/main/sprites/icons.h | 4 +- retro-esp32/main/sprites/logo.h | 1 - retro-esp32/main/sprites/media.h | 33 +- retro-esp32/main/sprites/speaker.h | 83 +++ retro-esp32/partitions.csv | 78 ++- retro-esp32/sdkconfig | 22 +- 17 files changed, 697 insertions(+), 249 deletions(-) create mode 100644 retro-esp32/main/sprites/charge.h create mode 100644 retro-esp32/main/sprites/folder.h create mode 100644 retro-esp32/main/sprites/speaker.h diff --git a/esplay-sdk/esplay-components/esplay-hal/power.c b/esplay-sdk/esplay-components/esplay-hal/power.c index 06a1479..5e05589 100644 --- a/esplay-sdk/esplay-components/esplay-hal/power.c +++ b/esplay-sdk/esplay-components/esplay-hal/power.c @@ -166,7 +166,9 @@ void battery_level_init() PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[GPIO_NUM_13], PIN_FUNC_GPIO); gpio_set_direction(GPIO_NUM_13, GPIO_MODE_OUTPUT); gpio_set_direction(USB_PLUG_PIN, GPIO_MODE_INPUT); + gpio_set_pull_mode(USB_PLUG_PIN, GPIO_PULLUP_ONLY); gpio_set_direction(CHRG_STATE_PIN, GPIO_MODE_INPUT); + gpio_set_pull_mode(CHRG_STATE_PIN, GPIO_PULLUP_ONLY); adc1_config_width(ADC_WIDTH_12Bit); adc1_config_channel_atten(ADC1_CHANNEL_3, ADC_ATTEN_11db); diff --git a/esplay-sdk/esplay-components/esplay-hal/sdcard.c b/esplay-sdk/esplay-components/esplay-hal/sdcard.c index f254231..8dec74e 100644 --- a/esplay-sdk/esplay-components/esplay-hal/sdcard.c +++ b/esplay-sdk/esplay-components/esplay-hal/sdcard.c @@ -169,13 +169,7 @@ esp_err_t sdcard_open(const char *base_path) { sdmmc_host_t host = SDMMC_HOST_DEFAULT(); host.flags = SDMMC_HOST_FLAG_1BIT; -#ifdef CONFIG_SDIO_DAT2_DISABLED - /* For slave chips with 3.3V flash, DAT2 pullup conflicts with the pulldown - required by strapping pin (MTDI). We can either burn the EFUSE for the - strapping or just disable the DAT2 and work in 1-bit mode. - */ - host.flags |= SDIO_SLAVE_FLAG_DAT2_DISABLED; -#endif + host.max_freq_khz = SDMMC_FREQ_HIGHSPEED; sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT(); slot_config.width = 1; diff --git a/mkrelease_retro-esp32.sh b/mkrelease_retro-esp32.sh index 00a17e5..b93350f 100644 --- a/mkrelease_retro-esp32.sh +++ b/mkrelease_retro-esp32.sh @@ -3,14 +3,17 @@ #edit your ESP-IDF path here, tested with release/v3.3 branch export IDF_PATH=~/esp/esp-idf +#tune this to match yours +export ESPLAY_SDK=~/esp/esplay-retro-emulation/esplay-sdk + cd retro-esp32 make -j4 -cd ../esplay-gnuboy -make -j4 -cd ../esplay-nofrendo -make -j4 -cd ../esplay-smsplusgx -make -j4 +#cd ../esplay-gnuboy +#make -j4 +#cd ../esplay-nofrendo +#make -j4 +#cd ../esplay-smsplusgx +#make -j4 cd .. #ffmpeg -i Tile.png -f rawvideo -pix_fmt rgb565 tile.raw /home/Peruri/esp/esplay-base-firmware/tools/mkfw/mkfw.exe Retro-ESP32 assets/retro-esp32.raw 0 16 1048576 retro-esp32 retro-esp32/build/retro-esp32.bin 0 17 655360 esplay-nofrendo esplay-nofrendo/build/esplay-nofrendo.bin 0 18 655360 esplay-gnuboy esplay-gnuboy/build/esplay-gnuboy.bin 0 19 1310720 esplay-smsplusgx esplay-smsplusgx/build/esplay-smsplusgx.bin diff --git a/retro-esp32/main/includes/core.h b/retro-esp32/main/includes/core.h index 1ff6968..11674b3 100644 --- a/retro-esp32/main/includes/core.h +++ b/retro-esp32/main/includes/core.h @@ -52,7 +52,10 @@ Sprites */ #include "../sprites/battery.h" +#include "../sprites/charge.h" #include "../sprites/characters.h" #include "../sprites/icons.h" #include "../sprites/logo.h" -#include "../sprites/media.h" \ No newline at end of file +#include "../sprites/media.h" +#include "../sprites/folder.h" +#include "../sprites/speaker.h" diff --git a/retro-esp32/main/includes/declarations.h b/retro-esp32/main/includes/declarations.h index 2625a9e..6a1b0c9 100644 --- a/retro-esp32/main/includes/declarations.h +++ b/retro-esp32/main/includes/declarations.h @@ -15,6 +15,18 @@ void draw_text(short x, short y, char *string, bool ext, bool current); void draw_mask(int x, int y, int w, int h); void draw_background(); +/* + Options +*/ +void draw_settings(); + +/* + Volume +*/ +void draw_volume(); +int32_t get_volume(); +void set_volume(); + /* Theme */ @@ -41,17 +53,19 @@ void get_restore_states(); */ void draw_systems(); void draw_media(int x, int y, bool current); +void draw_folder(int x, int y, bool current); void draw_battery(); +void draw_speaker(); void draw_numbers(); void draw_launcher(); -void draw_options(); +void draw_launcher_options(); /* Files */ void get_files(); void sort_files(char** files); -void draw_files(char** files); +void draw_files(); void has_save_file(char *name); /* @@ -78,4 +92,4 @@ void rom_delete_save(); /* Launcher */ -static void launcher(); \ No newline at end of file +static void launcher(); diff --git a/retro-esp32/main/includes/definitions.h b/retro-esp32/main/includes/definitions.h index 4f5c0e8..2ea6034 100644 --- a/retro-esp32/main/includes/definitions.h +++ b/retro-esp32/main/includes/definitions.h @@ -4,11 +4,6 @@ #define WIDTH 320 #define HEIGHT 240 -/* - Emulator Count + 1 for Theme -*/ -#define COUNT 7 - /* System Ribbon Display */ @@ -24,4 +19,14 @@ Global Colors */ #define WHITE 65535 -#define BLACK 0 \ No newline at end of file +#define BLACK 0 + +/* + Emulator Count + 1 for Theme +*/ +#define COUNT 7 + +/* + +*/ +#define MAX_FILES 1024 diff --git a/retro-esp32/main/includes/structures.h b/retro-esp32/main/includes/structures.h index c7a6233..77943fd 100644 --- a/retro-esp32/main/includes/structures.h +++ b/retro-esp32/main/includes/structures.h @@ -18,13 +18,12 @@ OFFSET ORIGIN = {16,48}; // LIST typedef struct{ int limit; - int offset; + int16_t offset; int total; int pages; int page; } LIST; LIST ROMS = {8, 0, 0, 0, 0}; -bool LAUNCHER = false; // FILE typedef struct{ @@ -40,18 +39,18 @@ typedef struct{ int system[32][32]; } SYSTEM; SYSTEM SYSTEMS[COUNT] = { - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,65535,65535,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,65535,65535,0,0},{0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0},{0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,65535,65535,0,0,65535},{65535,0,65535,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,0,65535,0,65535,0,0,65535,0,65535},{65535,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,0,0,65535,65535,0,0,65535,0,65535,0,0,65535,0,65535,0,0,65535,0,65535},{65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535},{65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535},{65535,65535,0,65535,0,0,0,0,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535},{65535,65535,0,65535,0,0,65535,0,65535,65535,65535,0,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535,65535},{65535,65535,0,65535,0,0,0,0,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535},{65535,65535,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535},{65535,65535,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535,65535},{65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535},{65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0},{0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0},{0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0},{65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,0,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,0,0,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,0,65535},{65535,65535,0,0,0,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,0,65535},{65535,65535,65535,0,0,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,0},{0,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,0,0,65535,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,0,0,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,0,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,0,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535},{65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,65535,0,65535,0,65535,0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,0,65535,65535,0,0,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,0,65535,0,65535,0,65535,0,65535,0,65535,65535,0,0,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,0,65535,0,65535,0,65535,0,65535,0,0,65535,65535,0,0,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,65535,0,0,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, - {0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,65535,65535,0,0,65535,65535,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}} + /* OPTIONS */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,65535,65535,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,65535,65535,0,0},{0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0},{0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* NINTENDO ENTERTAINMENT SYSTEM */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,65535,65535,0,0,65535},{65535,0,65535,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,0,65535,0,65535,0,0,65535,0,65535},{65535,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,0,0,65535,65535,0,0,65535,0,65535,0,0,65535,0,65535,0,0,65535,0,65535},{65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535},{65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* NINTENDO GAME BOY */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* NINTENDO GAME BOY COLOR */{0,{{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0}}}, + /* SEGA MASTER SYSTEM */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535},{65535,65535,0,65535,0,0,0,0,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535},{65535,65535,0,65535,0,0,65535,0,65535,65535,65535,0,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535,65535},{65535,65535,0,65535,0,0,0,0,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535},{65535,65535,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535},{65535,65535,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535,65535},{65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535},{65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* SEGA GAME GEAR */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0},{0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0},{0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0},{65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,0,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,0,0,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,0,65535},{65535,65535,0,0,0,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,0,65535},{65535,65535,65535,0,0,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* COLECOVISION */{0,{{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0}}}, + /* SINCLAIR ZX SPECTRUM 48K */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,0},{0,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,0,0,65535,0},{0,65535,65535,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,65535,65535,65535,0,0,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* ATARI 2600 */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,0,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,0,0,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,0,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* ATARI 7800 */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,0,65535,65535,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,0,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535},{65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,0,0,0,0,0,65535,65535,65535,65535},{65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535},{65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* ATARI LYNX */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,0,65535,65535},{65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,0,65535,0,65535,65535,65535},{65535,65535,65535,0,65535,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,0,0,0,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,0,0,65535,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,0,65535,0,0,0,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,65535,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,65535,0,65535,0,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,0,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, + /* PC ENGINE */{0,{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535},{65535,65535,65535,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{65535,65535,65535,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,0,0,65535,65535,0,0,0,0,65535,65535,0,0,65535,65535,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535},{65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535},{0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}, }; // THEME @@ -84,4 +83,4 @@ THEME THEMES[22] = { {16936,48631,"dark"}, {29614,52857,"light"} }; -THEME GUI; \ No newline at end of file +THEME GUI; diff --git a/retro-esp32/main/main.c b/retro-esp32/main/main.c index 3dafc19..21517bb 100644 --- a/retro-esp32/main/main.c +++ b/retro-esp32/main/main.c @@ -11,16 +11,30 @@ //}#pragma endregion Odroid //{#pragma region Global - int STEP = 1; - int OPTION = 0; bool SAVED = false; - int8_t USER; bool RESTART = false; + bool LAUNCHER = false; + bool FOLDER = false; + bool SPLASH = true; + bool SETTINGS = false; + + int STEP = 0; + int OPTION = 0; + int PREVIOUS = 0; + int32_t VOLUME = 0; + int8_t USER; + int8_t SETTING; + + char** FILES; + char folder_path[256] = ""; + + DIR *directory; + struct dirent *file; //}#pragma endregion Global //{#pragma region Emulator and Directories char EMULATORS[COUNT][30] = { - "THEME", + "SETTINGS", "NINTENDO ENTERTAINMENT SYSTEM", "NINTENDO GAME BOY", "NINTENDO GAME BOY COLOR", @@ -30,8 +44,8 @@ "SINCLAIR ZX SPECTRUM 48K", "ATARI 2600", "ATARI 7800", - "COMMODORE 64", - "NEC TURBOGRAFX 16" + "ATARI LYNX", + "PC ENGINE" }; char DIRECTORIES[COUNT][10] = { @@ -45,8 +59,8 @@ "spectrum", // 3 "a26", // 5 "a78", // 6 - "c64", // 7 - "nec" // 8 + "lynx", // 7 + "pce" // 8 }; char EXTENSIONS[COUNT][10] = { @@ -57,11 +71,11 @@ "sms", // 3 "gg", // 3 "col", // 3 - "z80", // 3 + "z80", // 3 "a26", // 5 "a78", // 6 - "d64", // 7 - "nec" // 8 + "lnx", // 7 + "pce", // 8 }; int PROGRAMS[COUNT] = {1, 2, 2, 3, 3, 3, 3, 4, 5, 6, 7, 8}; @@ -81,11 +95,18 @@ nvs_flash_init(); esplay_system_init(); - int startHeap = esp_get_free_heap_size(); - // Audio audio_init(16000); - set_volume_settings(4); + /* + #ifdef CONFIG_LCD_DRIVER_CHIP_RETRO_ESP32 + odroid_settings_Volume_set(4); + #else + odroid_settings_Volume_set(3); + #endif + */ + + VOLUME = get_volume_settings(); + set_volume_settings(VOLUME); // Display display_init(); @@ -96,6 +117,9 @@ // Battery battery_level_init(); + // SD + sdcard_open("/sd"); + // Theme get_theme(); get_restore_states(); @@ -105,7 +129,7 @@ display_prepare(); display_clear(0); - printf("==============\n%s\n==============\n", "RETRO ESP32"); + //printf("==============\n%s\n==============\n", "RETRO ESP32"); switch(esp_reset_reason()) { case ESP_RST_POWERON: RESTART = false; @@ -119,7 +143,7 @@ RESTART = false; break; } - RESTART ? restart() : splash(); + RESTART ? restart() : SPLASH ? splash() : NULL; draw_background(); restore_layout(); xTaskCreate(launcher, "launcher", 8192, NULL, 5, NULL); @@ -132,6 +156,7 @@ //{#pragma region Debounce void debounce(int key) { draw_battery(); + draw_speaker(); while (gamepad.values[key]) gamepad_read(&gamepad); } //}#pragma endregion Debounce @@ -159,8 +184,11 @@ STEP = 0; } nvs_close(handle); + //printf("\nGet nvs_get_i8:%d\n", STEP); } + void set_step_state() { + //printf("\nGet nvs_set_i8:%d\n", STEP); nvs_handle handle; nvs_open("storage", NVS_READWRITE, &handle); nvs_set_i8(handle, "STEP", STEP); @@ -178,8 +206,7 @@ nvs_handle handle; err = nvs_open("storage", NVS_READWRITE, &handle); - - err = nvs_get_i8(handle, "OFFSET", &ROMS.offset); + err = nvs_get_i16(handle, "LAST", &ROMS.offset); switch (err) { case ESP_OK: break; @@ -190,13 +217,17 @@ ROMS.offset = 0; } nvs_close(handle); + //printf("\nGet nvs_get_i16:%d\n", ROMS.offset); } + void set_list_state() { + //printf("\nSet nvs_set_i16:%d", ROMS.offset); nvs_handle handle; nvs_open("storage", NVS_READWRITE, &handle); - nvs_set_i8(handle, "OFFSET", ROMS.offset); + nvs_set_i16(handle, "LAST", ROMS.offset); nvs_commit(handle); nvs_close(handle); + get_list_state(); } void set_restore_states() { @@ -227,21 +258,24 @@ void draw_text(short x, short y, char *string, bool ext, bool current) { int length = !ext ? strlen(string) : strlen(string)-(strlen(EXTENSIONS[STEP])+1); int size = 5; + int rows = 7; + int cols = 5; for(int n = 0; n < length; n++) { int dx = get_letter(string[n]); int i = 0; - for(int r = 0; r < (size); r++) { + for(int r = 0; r < (rows); r++) { if(string[n] != ' ') { - for(int c = dx; c < (dx+size); c++) { - buffer[i] = characters[r][c] == 0 ? GUI.bg : current ? WHITE : GUI.fg; + for(int c = dx; c < (dx+cols); c++) { + //buffer[i] = FONT_5x5[r][c] == 0 ? GUI.bg : current ? WHITE : GUI.fg; + buffer[i] = FONT_5x7[r][c] == 0 ? GUI.bg : current ? WHITE : GUI.fg; i++; } } } if(string[n] != ' ') { - write_frame_rectangleLE(x, y, size, size, buffer); + write_frame_rectangleLE(x, y-1, cols, rows, buffer); } - x+= string[n] != ' ' ? 6 : 2; + x+= string[n] != ' ' ? 7 : 3; } } //}#pragma endregion Text @@ -257,9 +291,70 @@ int h = 60; for (int i = 0; i < 4; i++) draw_mask(0, i*h, w, h); draw_battery(); + draw_speaker(); } //}#pragma endregion Mask +//{#pragma region Options + void draw_settings() { + int x = ORIGIN.x; + int y = POS.y + 46; + + draw_mask(x,y-1,100,17); + draw_text(x,y,"THEMES",false, SETTING == 0 ? true : false); + + y+=20; + draw_mask(x,y-1,100,17); + draw_text(x,y,"VOLUME",false, SETTING == 1 ? true : false); + + draw_volume(); + } +//}#pragma endregion Options + +//{#pragma region Volume + void draw_volume() { + int32_t volume = get_volume(); + int x = SCREEN.w - 120; + int y = POS.y + 66; + //int w = 25 * volume; + int w, h; + + int i = 0; + for(h = 0; h < 7; h++) { + for(w = 0; w < 100; w++) { + buffer[i] = (w+h)%2 == 0 ? GUI.fg : GUI.bg; + i++; + } + } + write_frame_rectangleLE(x, y, 100, 7, buffer); + + if(volume > 0) { + i = 0; + for(h = 0; h < 7; h++) { + for(w = 0; w < ((volume*100)/255); w++) { + if(SETTING == 1) { + buffer[i] = WHITE; + } else { + buffer[i] = GUI.fg; + } + i++; + } + } + write_frame_rectangleLE(x, y, ((volume*100)/255), 7, buffer); + } + + draw_speaker(); + } + int32_t get_volume() { + return get_volume_settings(); + } + + void set_volume() { + set_volume_settings(VOLUME); + draw_volume(); + } +//}#pragma endregion Volume + //{#pragma region Theme void draw_themes() { int x = ORIGIN.x; @@ -268,7 +363,7 @@ int count = 22; for(int n = USER; n < count; n++){ if(filled < ROMS.limit) { - draw_mask(x,y,100,16); + draw_mask(x,y-1,100,17); draw_text(x,y,THEMES[n].name,false, n == USER ? true : false); y+=20; filled++; @@ -276,7 +371,7 @@ } int slots = (ROMS.limit - filled); for(int n = 0; n < slots; n++) { - draw_mask(x,y,100,16); + draw_mask(x,y-1,100,17); draw_text(x,y,THEMES[n].name,false,false); y+=20; } @@ -346,27 +441,26 @@ } } - void draw_media(int x, int y, bool current) { - int offset = STEP * 16; + void draw_folder(int x, int y, bool current) { int i = 0; - if(current) { - for(int h = 0; h < 16; h++) { - for(int w = offset; w < (offset+16); w++) { - buffer[i] = media[h][w] == WHITE ? GUI.fg : GUI.bg; - i++; - } + for(int h = 0; h < 16; h++) { + for(int w = 0; w < 16; w++) { + buffer[i] = folder[h][w] == WHITE ? current ? WHITE : GUI.fg : GUI.bg; + i++; } - write_frame_rectangleLE(x+1, y+1, 16, 16, buffer); } - i = 0; + write_frame_rectangleLE(x, y, 16, 16, buffer); + } + + void draw_media(int x, int y, bool current) { + int offset = (STEP-1) * 16; + int i = 0; for(int h = 0; h < 16; h++) { for(int w = offset; w < (offset+16); w++) { buffer[i] = media[h][w] == WHITE ? current ? WHITE : GUI.fg : GUI.bg; i++; } } - current ? - write_frame_rectangleLE(x-1, y-1, 16, 16, buffer) : write_frame_rectangleLE(x, y, 16, 16, buffer); } @@ -389,25 +483,71 @@ } write_frame_rectangleLE(x, y, 16, 16, buffer); + int percentage = bat_state.percentage/10; x += 2; y += 6; - w = (int)bat_state.percentage/10 > 0 ? ((int)bat_state.percentage/10) : 10; + w = percentage > 0 ? percentage > 10 ? 10 : percentage : 10; h = 4; i = 0; - int color[11] = {24576,24576,64288,64288,65504,65504,65504,26592,26592,26592,26592}; + //printf("\nbattery_state.percentage:%d\n(percentage):%d\n(millivolts)%d\n", battery_state.percentage, percentage, battery_state.millivolts); + int color[11] = {24576,24576,64288,64288,65504,65504,65504,26592,26592,26592,26592}; + int fill = color[w]; for(int c = 0; c < h; c++) { for(int n = 0; n <= w; n++) { - buffer[i] = color[w]; + buffer[i] = fill; i++; } } write_frame_rectangleLE(x, y, w, h, buffer); + + /* + if(battery_state.millivolts > 4200) { + i = 0; + for(h = 0; h < 5; h++) { + for(w = 0; w < 3; w++) { + buffer[i] = charge[h][w] == WHITE ? WHITE : fill; + i++; + } + } + ili9341_write_frame_rectangleLE(x+4, y, 3, 5, buffer); + } + */ #endif } + void draw_speaker() { + int32_t volume = get_volume(); + + int i = 0; + int x = SCREEN.w - 52; + int y = 8; + int h = 16; + int w = 16; + + draw_mask(x,y,16,16); + + int width = 0; + if (volume > 0 && volume < 64) + width = 1; + else if (volume > 64 && volume < 128) + width = 2; + else if (volume > 64 && volume < 192) + width = 3; + else if (volume > 192 && volume < 256) + width = 4; + int dh = 64 - (width*16); + for(h = 0; h < 16; h++) { + for(w = 0; w < 16; w++) { + buffer[i] = speaker[dh+h][w] == WHITE ? WHITE : GUI.bg; + i++; + } + } + write_frame_rectangleLE(x, y, w, h, buffer); + } + void draw_numbers() { int x = 296; int y = POS.y + 48; @@ -439,10 +579,10 @@ y += 48; draw_media(x,y-6,true); - draw_options(); + draw_launcher_options(); } - void draw_options() { + void draw_launcher_options() { has_save_file(ROM.name); int x = GAP/3 + 32; @@ -492,124 +632,139 @@ //}#pragma endregion GUI //{#pragma region Files - inline static void swap(char** a, char** b) - { - char* t = *a; - *a = *b; - *b = t; - } + //{#pragma region Sort + inline static void swap(char** a, char** b) { + char* t = *a; + *a = *b; + *b = t; + } - static int strcicmp(char const *a, char const *b) - { - for (;; a++, b++) - { - int d = tolower((int)*a) - tolower((int)*b); - if (d != 0 || !*a) return d; - } - } + static int strcicmp(char const *a, char const *b) { + for (;; a++, b++) + { + int d = tolower((int)*a) - tolower((int)*b); + if (d != 0 || !*a) return d; + } + } - static int partition (char* arr[], int low, int high) - { - char* pivot = arr[high]; - int i = (low - 1); - - for (int j = low; j <= high- 1; j++) - { - if (strcicmp(arr[j], pivot) < 0) - { - i++; - swap(&arr[i], &arr[j]); - } - } - swap(&arr[i + 1], &arr[high]); - return (i + 1); - } - void quick_sort(char* arr[], int low, int high) - { - if (low < high) - { - int pi = partition(arr, low, high); + static int partition (char** arr, int low, int high) { + char* pivot = arr[high]; + int i = (low - 1); - quick_sort(arr, low, pi - 1); - quick_sort(arr, pi + 1, high); - } - } + for (int j = low; j <= high- 1; j++) + { + if (strcicmp(arr[j], pivot) < 0) + { + i++; + swap(&arr[i], &arr[j]); + } + } + swap(&arr[i + 1], &arr[high]); + return (i + 1); + } - void sort_files(char** files) - { - bool swapped = true; + void quick_sort(char** arr, int low, int high) { + if (low < high) + { + int pi = partition(arr, low, high); - if (ROMS.total > 1) - { - quick_sort(files, 0, ROMS.total - 1); - } - } + quick_sort(arr, low, pi - 1); + quick_sort(arr, pi + 1, high); + } + } + + void sort_files(char** files) + { + if (ROMS.total > 1) + { + quick_sort(files, 0, ROMS.total - 1); + } + } + //}#pragma endregion Sort void get_files() { - sdcard_open("/sd"); - const int MAX_FILES = 1024; - char** result = (char**)malloc(MAX_FILES * sizeof(void*)); + FILES = (char**)malloc(MAX_FILES * sizeof(void*)); + ROMS.total = 0; - DIR *directory; - struct dirent *file; char path[256] = "/sd/roms/"; strcat(&path[strlen(path) - 1], DIRECTORIES[STEP]); + strcat(&path[strlen(path) - 1],folder_path); + printf("\npath:%s", path); + strcpy(ROM.path, path); - bool files = !(directory = opendir(path)) ? false : true; - ROMS.total = 0; + DIR *directory = opendir(path); - if(files) { + if(directory == NULL) { + char message[100] = "no games available"; + int center = ceil((320/2)-((strlen(message)*5)/2)); + draw_text(center,134,message,false,false); + } else { + struct dirent *file; while ((file = readdir(directory)) != NULL) { int rom_length = strlen(file->d_name); int ext_lext = strlen(EXTENSIONS[STEP]); bool extenstion = strcmp(&file->d_name[rom_length - ext_lext], EXTENSIONS[STEP]) == 0 && file->d_name[0] != '.'; - if(extenstion) { + if(extenstion || (file->d_type == 2)) { + if(ROMS.total >= MAX_FILES) { break; } size_t len = strlen(file->d_name); - result[ROMS.total] = (char*)malloc(len + 1); - strcpy(result[ROMS.total], file->d_name); + FILES[ROMS.total] = (file->d_type == 2) ? (char*)malloc(len + 5) : (char*)malloc(len + 1); + if((file->d_type == 2)) { + char dir[256]; + strcpy(dir, file->d_name); + char dd[8]; + sprintf(dd, "%s", ext_lext == 2 ? "dir" : ".dir"); + strcat(&dir[strlen(dir) - 1], dd); + strcpy(FILES[ROMS.total], dir); + } else { + strcpy(FILES[ROMS.total], file->d_name); + } ROMS.total++; } } ROMS.pages = ROMS.total/ROMS.limit; - printf("\nDIRECTORY:%s ROMS.page:%d ROMS.pages:%d\n", DIRECTORIES[STEP], ROMS.page, ROMS.pages); + if(ROMS.offset > ROMS.total) { ROMS.offset = 0;} + closedir(directory); - } + if(ROMS.total < 500) sort_files(FILES); + draw_files(); - if(ROMS.total > 0) { - sort_files(result); - draw_files(result); - draw_numbers(); - } else { - char message[100] = "no games available"; - int center = ceil((320/2)-((strlen(message)*5)/2)); - draw_text(center,134,message,false,false); + //free(FILES); } } - void draw_files(char** files) { - + void draw_files() { + //printf("\n"); int x = ORIGIN.x; int y = POS.y + 48; int game = ROMS.offset ; ROMS.page = ROMS.offset/ROMS.limit; + /* + printf("\nROMS.offset:%d", ROMS.offset); + printf("\nROMS.limit:%d", ROMS.limit); + printf("\nROMS.total:%d", ROMS.total); + printf("\nROMS.page:%d", ROMS.page); + printf("\nROMS.pages:%d", ROMS.pages); + */ + for (int i = 0; i < 4; i++) draw_mask(0, y+(i*40)-6, 320, 40); - for(int n = 0; n < ROMS.total; n++) { - if(game < (ROMS.limit+ROMS.offset) && n >= game && game < ROMS.total) { - draw_media(x,y-6,game == ROMS.offset ? true : false); - draw_text(x+24,y,files[n],true,game == ROMS.offset ? true : false); - if(game == ROMS.offset) { - strcpy(ROM.name, files[n]); - int i = strlen(ROM.path); ROM.path[i] = '/'; - ROM.path[i + 1] = 0; - strcat(ROM.path, ROM.name); - ROM.ready = true; - } - y+=20; - game++; + + int limit = (ROMS.offset + ROMS.limit) > ROMS.total ? ROMS.total : ROMS.offset + ROMS.limit; + for(int n = ROMS.offset; n < limit; n++) { + draw_text(x+24,y,FILES[n],true,n == ROMS.offset ? true : false); + + bool directory = strcmp(&FILES[n][strlen(FILES[n]) - 3], "dir") == 0; + directory ? draw_folder(x,y-6,n == ROMS.offset ? true : false) : draw_media(x,y-6,n == ROMS.offset ? true : false); + if(n == ROMS.offset) { + strcpy(ROM.name, FILES[n]); + ROM.ready = true; } + y+=20; } + + + draw_numbers(); } void has_save_file(char *name) { @@ -660,9 +815,9 @@ draw_systems(); usleep(20000); } - draw_mask(0,0,SCREEN.w - 32,32); + draw_mask(0,0,SCREEN.w - 56,32); draw_text(16,16,EMULATORS[STEP], false, true); - STEP == 0 ? draw_themes() : get_files(); + STEP == 0 ? draw_settings() : get_files(); clean_up(); } @@ -680,6 +835,7 @@ }; draw_background(); + for(int n = 0; n < COUNT; n++) { int delta = (n-STEP); if(delta < 0) { @@ -694,25 +850,24 @@ SYSTEMS[n].x = GAP/3+NEXT+(GAP*(delta-1)); } } + + clean_up(); draw_systems(); draw_text(16,16,EMULATORS[STEP],false,true); - STEP == 0 ? draw_themes() : get_files(); - clean_up(); + STEP == 0 ? draw_settings() : get_files(); } void clean_up() { - int inc = 0; + int MAX = 736; for(int n = 0; n < COUNT; n++) { - int delta = (n-STEP); - if(SYSTEMS[n].x > 464) { - SYSTEMS[n].x -= 736; + if(SYSTEMS[n].x > 512) { + SYSTEMS[n].x -= MAX; } if(SYSTEMS[n].x <= -272) { - SYSTEMS[n].x += 736; + SYSTEMS[n].x += MAX; } } } - //}#pragma endregion Animations //{#pragma region Boot Screens @@ -755,6 +910,7 @@ void restart() { draw_background(); + char message[100] = "restarting"; int h = 5; int w = strlen(message)*h; @@ -800,6 +956,7 @@ system_application_set(PROGRAMS[STEP-1]); usleep(10000); esp_restart(); + } void rom_resume() { @@ -858,6 +1015,7 @@ tmp[strlen(tmp)-4] = '\0'; gets(tmp); if(strcmp(ROM.name, tmp) == 0) { + //printf("\nDIRECTORIES[STEP]:%s ROM.name:%s tmp:%s",DIRECTORIES[STEP], ROM.name, tmp); struct stat st; if (stat(file_to_delete, &st) == 0) { unlink(file_to_delete); @@ -876,6 +1034,7 @@ //{#pragma region Launcher static void launcher() { draw_battery(); + draw_speaker(); while (true) { /* Get Gamepad State @@ -886,15 +1045,25 @@ LEFT */ if(gamepad.values[GAMEPAD_INPUT_LEFT]) { - if(!LAUNCHER) { - STEP--; - if( STEP < 0 ) { - STEP = COUNT - 1; - } + if(!LAUNCHER && !FOLDER) { + if(SETTING != 1) { + STEP--; + if( STEP < 0 ) { + STEP = COUNT - 1; + } - ROMS.offset = 0; - ROMS.total = 0; - animate(-1); + ROMS.offset = 0; + ROMS.total = 0; + animate(-1); + } else { + if(VOLUME > 0) { + VOLUME -= 5; + if(VOLUME < 0) + VOLUME = 0; + set_volume(); + usleep(200000); + } + } } usleep(100000); //debounce(GAMEPAD_INPUT_LEFT); @@ -903,14 +1072,24 @@ RIGHT */ if(gamepad.values[GAMEPAD_INPUT_RIGHT]) { - if(!LAUNCHER) { - STEP++; - if( STEP > COUNT-1 ) { - STEP = 0; + if(!LAUNCHER && !FOLDER) { + if(SETTING != 1) { + STEP++; + if( STEP > COUNT-1 ) { + STEP = 0; + } + ROMS.offset = 0; + ROMS.total = 0; + animate(1); + } else { + if(VOLUME < 255) { + VOLUME += 5; + if(VOLUME > 255) + VOLUME = 255; + set_volume(); + usleep(200000); + } } - ROMS.offset = 0; - ROMS.total = 0; - animate(1); } usleep(100000); //debounce(GAMEPAD_INPUT_RIGHT); @@ -921,23 +1100,29 @@ if (gamepad.values[GAMEPAD_INPUT_UP]) { if(!LAUNCHER) { if(STEP == 0) { - USER--; - if( USER < 0 ) { USER = 21; } - draw_themes(); + if(!SETTINGS) { + SETTING--; + if( SETTING < 0 ) { SETTING = 1; } + draw_settings(); + } else { + USER--; + if( USER < 0 ) { USER = 21; } + draw_themes(); + } } if(STEP != 0) { ROMS.offset--; if( ROMS.offset < 0 ) { ROMS.offset = ROMS.total - 1; } - get_files(); + draw_files(); } } else { if(SAVED) { OPTION--; if( OPTION < 0 ) { OPTION = 2; } - draw_options(); + draw_launcher_options(); } } - usleep(100000); + usleep(200000); //debounce(GAMEPAD_INPUT_UP); } /* @@ -946,24 +1131,30 @@ if (gamepad.values[GAMEPAD_INPUT_DOWN]) { if(!LAUNCHER) { if(STEP == 0) { - USER++; - if( USER > 21 ) { USER = 0; } - draw_themes(); + if(!SETTINGS) { + SETTING++; + if( SETTING > 1 ) { SETTING = 0; } + draw_settings(); + } else { + USER++; + if( USER > 21 ) { USER = 0; } + draw_themes(); + } } if(STEP != 0) { ROMS.offset++; if( ROMS.offset > ROMS.total - 1 ) { ROMS.offset = 0; } - get_files(); + draw_files(); } } else { if(SAVED) { OPTION++; if( OPTION > 2 ) { OPTION = 0; } - draw_options(); + draw_launcher_options(); } } - usleep(100000); + usleep(200000); //debounce(GAMEPAD_INPUT_DOWN); } @@ -980,7 +1171,7 @@ ROMS.page++; if( ROMS.page > ROMS.pages ) { ROMS.page = 0; } ROMS.offset = ROMS.page * ROMS.limit; - get_files(); + draw_files(); } } //debounce(GAMEPAD_INPUT_START); @@ -995,7 +1186,7 @@ ROMS.page--; if( ROMS.page < 0 ) { ROMS.page = ROMS.pages; }; ROMS.offset = ROMS.page * ROMS.limit; - get_files(); + draw_files(); } } //debounce(GAMEPAD_INPUT_SELECT); @@ -1009,14 +1200,48 @@ */ if (gamepad.values[GAMEPAD_INPUT_A]) { if(STEP == 0) { - update_theme(); + if(!SETTINGS && SETTING != 1) { + SETTINGS = true; + draw_background(); + draw_systems(); + switch(SETTING) { + case 0: + draw_text(16,16,"THEMES",false,true); + draw_themes(); + break; + } + } else { + switch(SETTING) { + case 0: + update_theme(); + break; + } + } } else { if (ROM.ready && !LAUNCHER) { OPTION = 0; - LAUNCHER = true; - draw_launcher(); + char file_to_load[256] = ""; + sprintf(file_to_load, "%s/%s", ROM.path, ROM.name); + bool directory = strcmp(&file_to_load[strlen(file_to_load) - 3], "dir") == 0; + + if(directory) { + FOLDER = true; + PREVIOUS = ROMS.offset; + ROMS.offset = 0; + ROMS.total = 0; + + sprintf(folder_path, "/%s", ROM.name); + folder_path[strlen(folder_path)-(strlen(EXTENSIONS[STEP]) == 3 ? 4 : 3)] = 0; + draw_background(); + draw_systems(); + draw_text(16,16,EMULATORS[STEP],false,true); + get_files(); + } else { + LAUNCHER = true; + set_rom_name_settings(file_to_load); + draw_launcher(); + } } else { - set_rom_name_settings(ROM.path); switch(OPTION) { case 0: SAVED ? rom_resume() : rom_run(false); @@ -1041,7 +1266,22 @@ draw_background(); draw_systems(); draw_text(16,16,EMULATORS[STEP],false,true); - STEP == 0 ? draw_themes() : get_files(); + STEP == 0 ? draw_settings() : draw_files(); + } + if(FOLDER) { + FOLDER = false; + ROMS.offset = PREVIOUS; + ROMS.total = 0; + PREVIOUS = 0; + folder_path[0] = 0; + get_files(); + } + if(SETTINGS) { + SETTINGS = false; + draw_background(); + draw_systems(); + draw_text(16,16,EMULATORS[STEP],false,true); + draw_settings(); } debounce(GAMEPAD_INPUT_B); } @@ -1056,4 +1296,4 @@ } } } -//}#pragma endregion Launcher \ No newline at end of file +//}#pragma endregion Launcher diff --git a/retro-esp32/main/sprites/characters.h b/retro-esp32/main/sprites/characters.h index 4473e63..15c7a24 100644 --- a/retro-esp32/main/sprites/characters.h +++ b/retro-esp32/main/sprites/characters.h @@ -1,8 +1,17 @@ -const uint16_t characters[5][245] = { - {65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535,65535,65535,65535,0,65535,0,0,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0}, - {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,0,65535,0,0,65535,0,65535,0,65535,0,0,0,0,65535,65535,0,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,0,0,65535,0,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,65535,0,65535,0,0,65535,0,65535,0,0,0,0,65535,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,0,0,65535,0,65535,0,0,65535,0,65535,0,0,0,0,65535,0,0,0,0,0,0,0,65535,0,65535,0,0,65535,0,65535,0,0,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,65535,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0}, - {65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,65535,0,0,65535,65535,0,0,65535,0,0,0,0,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,65535,65535,0,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0}, - {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,0,65535,0,65535,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,65535,65535,65535,0,0,65535,0,0,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,0,65535,65535,65535,0,0,65535,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,65535,0,0,65535,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0}, - {65535,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,65535,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0}, +const uint16_t FONT_5x5[5][250] = { + {65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,65535,65535,65535,65535,0,65535,0,0,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0}, + {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,0,65535,0,0,65535,0,65535,0,65535,0,0,0,0,65535,65535,0,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,0,0,65535,0,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,65535,0,65535,0,0,65535,0,65535,0,0,0,0,65535,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0,65535,0,0,0,0,65535,0,65535,0,0,65535,0,65535,0,0,0,0,65535,0,0,0,0,0,0,0,65535,0,65535,0,0,65535,0,65535,0,0,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,65535,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,65535,0,65535,0,0,0,0,0,0}, + {65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,65535,0,0,65535,65535,0,0,65535,0,0,0,0,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,65535,65535,0,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,65535,0,65535,0,0,0,0,0,0,0}, + {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,0,65535,0,65535,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,65535,65535,65535,0,0,65535,0,0,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,0,65535,65535,65535,0,0,65535,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,65535,0,0,65535,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0}, + {65535,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,65535,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0}, +}; +const uint16_t FONT_5x7[7][250] = { + {0,65535,65535,65535,0,65535,65535,65535,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,0,65535,65535,65535,0,65535,65535,65535,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,65535,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0}, + {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,65535,0,65535,0,0,0,0,65535,65535,0,65535,65535,65535,65535,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,65535,0,65535,0,0,0,0,0,65535,65535,0,0,0,65535,0,65535,65535,0,0,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,65535,0,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0}, + {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,65535,0,65535,0,0,65535,0,0,0,0,65535,0,65535,0,65535,65535,0,65535,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,65535,0,0,0,65535,0,65535,0,65535,0,0,0,65535,0,0,0,0,0,65535,0,65535,0,0,0,65535,65535,0,65535,0,0,0,0,0,0,65535,0,0,0,0,65535,0,65535,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0}, + {65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,0,0,0,65535,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,0,0,0,0,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,65535,0,0,65535,65535,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,0,65535,0,0,0,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,0,65535,0,0,0,65535,65535,0,65535,0,0,0,65535,0,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,65535,0,0,65535,65535,65535,0,0,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,65535,0,65535,0,65535,0,65535,0,0,0,0,0}, + {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,65535,65535,65535,65535,0,0,0,65535,0,0,65535,0,0,65535,0,65535,0,0,65535,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,65535,65535,0,65535,0,0,0,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,0,65535,65535,65535,0,0,0,0,0,0,65535,0,65535,0,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,65535,0,0,65535,0,65535,0,0,0,0,0,0}, + {65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,0,0,65535,0,0,65535,0,65535,0,0,65535,0,0,65535,0,65535,0,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,0,0,65535,65535,65535,0,65535,0,0,65535,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,65535,0,65535,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,65535,0,0,0,0,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,65535,0,0,0,65535,0,0,0,65535,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0}, + {65535,0,0,0,65535,65535,65535,65535,65535,0,0,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,65535,65535,65535,0,65535,0,0,0,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,0,0,0,65535,0,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,65535,65535,0,0,0,65535,0,65535,65535,65535,0,0,0,65535,0,0,0,65535,65535,65535,0,0,0,65535,0,0,0,65535,0,65535,0,65535,0,0,0,65535,0,0,65535,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,65535,0,65535,65535,65535,0,0,65535,65535,65535,0,65535,0,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,0,0,0,65535,0,0,0,0,65535,0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,65535,0,0,65535,0,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0}, }; \ No newline at end of file diff --git a/retro-esp32/main/sprites/charge.h b/retro-esp32/main/sprites/charge.h new file mode 100644 index 0000000..9f66914 --- /dev/null +++ b/retro-esp32/main/sprites/charge.h @@ -0,0 +1,8 @@ +const uint16_t charge[5][3] = { + {0,0,65535}, + {0,65535,0}, + {65535,65535,65535}, + {0,65535,0}, + {65535,0,0}, + +}; \ No newline at end of file diff --git a/retro-esp32/main/sprites/folder.h b/retro-esp32/main/sprites/folder.h new file mode 100644 index 0000000..6ee5636 --- /dev/null +++ b/retro-esp32/main/sprites/folder.h @@ -0,0 +1,18 @@ +const uint16_t folder[16][16] = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0}, + {0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0}, + {0,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0}, + {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0}, + {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0}, + {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0}, + {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0}, + {0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0}, + {0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0}, + {0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0}, + {0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, +}; \ No newline at end of file diff --git a/retro-esp32/main/sprites/icons.h b/retro-esp32/main/sprites/icons.h index 1a2b9ce..443fb9c 100644 --- a/retro-esp32/main/sprites/icons.h +++ b/retro-esp32/main/sprites/icons.h @@ -14,9 +14,9 @@ const uint16_t icons[30][5] = { {65535,0,0,0,65535}, {65535,65535,0,0,65535}, {65535,0,65535,65535,0}, - {65535,65535,65535,65535,65535}, - {65535,0,65535,0,65535}, + {0,65535,65535,65535,0}, {65535,0,65535,0,65535}, + {65535,65535,0,65535,65535}, {65535,0,65535,0,65535}, {0,65535,65535,65535,0}, {65535,0,0,0,65535}, diff --git a/retro-esp32/main/sprites/logo.h b/retro-esp32/main/sprites/logo.h index 45e2b3c..0bbc455 100644 --- a/retro-esp32/main/sprites/logo.h +++ b/retro-esp32/main/sprites/logo.h @@ -17,5 +17,4 @@ const uint16_t logo[18][128] = { {0,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0}, {0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0}, {0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0}, - }; \ No newline at end of file diff --git a/retro-esp32/main/sprites/media.h b/retro-esp32/main/sprites/media.h index 0e8335f..a365a7a 100644 --- a/retro-esp32/main/sprites/media.h +++ b/retro-esp32/main/sprites/media.h @@ -1,18 +1,19 @@ const uint16_t media[16][176] = { - {65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, - {65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, - {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535}, - {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535}, - {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535}, - {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, - {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,0,0,65535,65535,65535,65535,0,0,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, - {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,0,0,65535,0,0,65535,0,0,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535}, - {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, - {65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, - {65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, - {65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, - {65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, - {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,0,65535,65535,0,65535,65535,0,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535}, - {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, - {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535}, + {65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, + {65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, + {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535}, + {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535}, + {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535}, + {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, + {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,0,0,65535,65535,65535,65535,0,0,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, + {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,0,0,65535,0,0,65535,0,0,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535}, + {65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, + {65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, + {65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, + {65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, + {65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535}, + {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,65535,65535,65535,0,65535,65535,0,65535,65535,0,65535,65535,0,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535}, + {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535}, + {0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,65535,65535,65535,65535,0,0,0,0,0,0,65535,65535,65535,65535,65535}, + }; \ No newline at end of file diff --git a/retro-esp32/main/sprites/speaker.h b/retro-esp32/main/sprites/speaker.h new file mode 100644 index 0000000..00a5565 --- /dev/null +++ b/retro-esp32/main/sprites/speaker.h @@ -0,0 +1,83 @@ +const uint16_t speaker[80][16] = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,65535,0,0,65535,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,65535}, + {0,0,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,65535}, + {0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,65535,0,65535}, + {0,65535,0,0,0,0,0,65535,0,65535,0,65535,0,65535,0,65535}, + {0,65535,0,0,0,0,0,65535,0,65535,0,65535,0,65535,0,65535}, + {0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,65535,0,65535}, + {0,0,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,65535}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,65535}, + {0,0,0,0,0,65535,65535,65535,0,0,0,65535,0,0,65535,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,65535,0,0,0,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,65535,0,0}, + {0,65535,0,0,0,0,0,65535,0,65535,0,65535,0,65535,0,0}, + {0,65535,0,0,0,0,0,65535,0,65535,0,65535,0,65535,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,65535,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,65535,0,0,65535,0,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,65535,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,65535,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0}, + {0,65535,0,0,0,0,0,65535,0,65535,0,65535,0,0,0,0}, + {0,65535,0,0,0,0,0,65535,0,65535,0,65535,0,0,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,0,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,0,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0}, + {0,65535,0,0,0,0,0,65535,0,65535,0,0,0,0,0,0}, + {0,65535,0,0,0,0,0,65535,0,65535,0,0,0,0,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,0,0,0,0,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,65535,0,0,0,65535,0}, + {0,65535,0,0,0,0,0,65535,0,0,0,65535,0,65535,0,0}, + {0,65535,0,0,0,0,0,65535,0,0,0,0,65535,0,0,0}, + {0,65535,65535,0,0,0,0,65535,0,0,0,65535,0,65535,0,0}, + {0,0,0,65535,0,0,0,65535,0,0,65535,0,0,0,65535,0}, + {0,0,0,0,65535,0,0,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,65535,65535,65535,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + +}; diff --git a/retro-esp32/partitions.csv b/retro-esp32/partitions.csv index a680474..65e0ebc 100644 --- a/retro-esp32/partitions.csv +++ b/retro-esp32/partitions.csv @@ -1,14 +1,64 @@ -# Name, Type, SubType, Offset, Size -# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild -nvs, data, nvs, 0x9000, 0x4000 -otadata, data, ota, 0xd000, 0x2000 -phy_init, data, phy, 0xf000, 0x1000 -firmware, app, factory, 0x10000, 0x090000 -#app_0, 0, ota_0, 0x100000, 0x200000 -#app_1, 0, ota_1, 0x300000, 0x200000 -#app_2, 0, ota_2, 0x500000, 0x200000 -#app_3, 0, ota_3, 0x700000, 0x200000 -#app_4, 0, ota_4, 0x900000, 0x200000 -#app_5, 0, ota_5, 0xb00000, 0x200000 -#app_6, 0, ota_6, 0xd00000, 0x200000 -#storage, data, spiffs, 0xf00000, 0x100000 +######################################################### +# Name, Type, SubType, Offset, Size +nvs, data, nvs, 0x9000, 0x4000 +otadata, data, ota, 0xd000, 0x2000 +phy_init, data, phy, 0xf000, 0x1000 +factory, app, factory, 0x10000, 0x80000 +storage, data, spiffs, 0x100000, 0x100000 +launcher, 0, ota_0, 0x200000, 0x80000 +nes, 0, ota_1, 0x280000, 0xc0000 +gb, 0, ota_2, 0x340000, 0xb0000 +sms, 0, ota_3, 0x3F0000, 0x160000 +a26, 0, ota_4, 0x550000, 0x1a0000 +a78, 0, ota_5, 0x6F0000, 0xc0000 +lnx, 0, ota_6, 0x7B0000, 0xe0000 +pce, 0, ota_7, 0x890000, 0xb0000 +data_0, 0x40, 0x00, 0x940000, 0x400000 +######################################################### + + +# file size 0 kb bytes 0 hex 0 +# file size 64 kb bytes 65536 hex 10000 +# file size 128 kb bytes 131072 hex 20000 +# file size 192 kb bytes 196608 hex 30000 +# file size 256 kb bytes 262144 hex 40000 +# file size 320 kb bytes 327680 hex 50000 +# file size 384 kb bytes 393216 hex 60000 +# file size 448 kb bytes 458752 hex 70000 +# file size 512 kb bytes 524288 hex 80000 +# file size 576 kb bytes 589824 hex 90000 +# file size 640 kb bytes 655360 hex a0000 +# file size 704 kb bytes 720896 hex b0000 +# file size 768 kb bytes 786432 hex c0000 +# file size 832 kb bytes 851968 hex d0000 +# file size 896 kb bytes 917504 hex e0000 +# file size 960 kb bytes 983040 hex f0000 +# file size 1024 kb bytes 1048576 hex 100000 +# file size 1088 kb bytes 1114112 hex 110000 +# file size 1152 kb bytes 1179648 hex 120000 +# file size 1216 kb bytes 1245184 hex 130000 +# file size 1280 kb bytes 1310720 hex 140000 +# file size 1344 kb bytes 1376256 hex 150000 +# file size 1408 kb bytes 1441792 hex 160000 +# file size 1472 kb bytes 1507328 hex 170000 +# file size 1536 kb bytes 1572864 hex 180000 +# file size 1600 kb bytes 1638400 hex 190000 +# file size 1664 kb bytes 1703936 hex 1a0000 +# file size 1728 kb bytes 1769472 hex 1b0000 +# file size 1792 kb bytes 1835008 hex 1c0000 +# file size 1856 kb bytes 1900544 hex 1d0000 +# file size 1920 kb bytes 1966080 hex 1e0000 +# file size 1984 kb bytes 2031616 hex 1f0000 + +# Name, Type, SubType, Offset, Size +#nvs, data, nvs, 0x9000, 0x4000 +#otadata, data, ota, 0xd000, 0x2000 +#phy_init, data, phy, 0xf000, 0x1000 +#factory, app, factory, 0x10000, 0x0F0000 +#storage, data, spiffs, 0x100000, 0x100000 +#app_0, 0, ota_0, 0x200000, 0x100000 +#app_1, 0, ota_1, 0x300000, 0x100000 +#app_2, 0, ota_2, 0x400000, 0x100000 +#app_3, 0, ota_3, 0x500000, 0x200000 +#data_0, 0x40, 0x00, 0x700000, 0x400000 + diff --git a/retro-esp32/sdkconfig b/retro-esp32/sdkconfig index 4c3df41..46b2b3d 100644 --- a/retro-esp32/sdkconfig +++ b/retro-esp32/sdkconfig @@ -64,7 +64,7 @@ CONFIG_HW_LCD_TYPE=0 # # Serial flasher config # -CONFIG_ESPTOOLPY_PORT="/dev/cu.SLAB_USBtoUART" +CONFIG_ESPTOOLPY_PORT="/dev/cu.usbserial-A1015RV2" CONFIG_ESPTOOLPY_BAUD_115200B= CONFIG_ESPTOOLPY_BAUD_230400B= CONFIG_ESPTOOLPY_BAUD_921600B=y @@ -117,6 +117,26 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5= +# +# 8bkc uGui config +# +CONFIG_USE_FONT_4X6= +CONFIG_USE_FONT_5X8= +CONFIG_USE_FONT_5X12= +CONFIG_USE_FONT_6X8=y +CONFIG_USE_FONT_6X10= +CONFIG_USE_FONT_7X12= +CONFIG_USE_FONT_8X8= +CONFIG_USE_FONT_8X12=y +CONFIG_USE_FONT_8X14= +CONFIG_USE_FONT_10X16= +CONFIG_USE_FONT_12X16= +CONFIG_USE_FONT_12X20= +CONFIG_USE_FONT_16X26= +CONFIG_USE_FONT_22X36= +CONFIG_USE_FONT_24X40= +CONFIG_USE_FONT_32X53= + # # Compiler options #