-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from vladkorotnev/develop
Release v5.5
- Loading branch information
Showing
70 changed files
with
11,892 additions
and
870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# PIO/esp32-arduino doesn't correctly calculate the binary size | ||
# See thread for more info: https://esp32.com/viewtopic.php?f=19&t=43303&sid=b02e92b5c4d3e7c16f2c3b14b2d0edc6#p141312 | ||
|
||
Import("env") | ||
|
||
import csv | ||
from os.path import join, getsize | ||
|
||
BINPATH = join("$BUILD_DIR", "${PROGNAME}.bin") | ||
|
||
def post_program_action(source, target, env): | ||
found=False | ||
csvpath = env["PARTITIONS_TABLE_CSV"] | ||
print("Using partition table:", csvpath) | ||
with open(csvpath, 'r') as file: | ||
reader = csv.DictReader(file) | ||
for row in reader: | ||
if row['# Name'] == 'app0': | ||
app0_size = int(row['Size'].strip(), 16) | ||
found=True | ||
break | ||
|
||
if not found: | ||
raise Exception("Could not find app0 size") | ||
|
||
fp = target[0].get_path() | ||
sz = getsize(fp) #<- scons' getsize doesn't work when creating the file for the first time, huh! | ||
if sz >= app0_size: | ||
print("app0 is", app0_size, "bytes, but",fp,"is",sz,": too big!") | ||
raise Exception("resulting binary too big") | ||
else: | ||
print("app0 is", app0_size, "bytes, and",fp,"is",sz,": OK") | ||
|
||
|
||
env.AddPostAction(BINPATH, post_program_action) |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <views/framework.h> | ||
|
||
class AppHost: public Composite { | ||
public: | ||
AppHost(); | ||
void render(FantaManipulator*) override; | ||
void step() override; | ||
void add_view(Renderable*, view_id_t); | ||
void switch_to(view_id_t, transition_type_t); | ||
|
||
protected: | ||
bool is_in_critical_state(); | ||
bool state_wants_full_screen(view_id_t); | ||
ViewMultiplexor * main_screen = nullptr; | ||
ViewMultiplexor * split_screen = nullptr; | ||
bool split_active = false; | ||
bool main_idle = true; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#include <views/framework.h> | ||
#include <sound/sequencer.h> | ||
|
||
#if HAS(PIXEL_CAVE) | ||
class AppPixelCave: public Renderable { | ||
public: | ||
AppPixelCave(NewSequencer *); | ||
void prepare() override; | ||
void render(FantaManipulator*) override; | ||
void step() override; | ||
void cleanup() override; | ||
|
||
protected: | ||
enum PixelCaveState { | ||
PCGAME_TITLE, | ||
PCGAME_GAME, | ||
PCGAME_OVER | ||
}; | ||
|
||
struct PxcCoord { | ||
int16_t x; | ||
uint16_t y; | ||
}; | ||
|
||
NewSequencer * sequencer; | ||
MelodySequence * melody; | ||
PixelCaveState state; | ||
|
||
const font_definition_t * score_font; | ||
const font_definition_t * gui_font; | ||
uint32_t cur_score; | ||
uint32_t hi_score; | ||
uint8_t framecount; | ||
|
||
static const size_t PLAYER_TRAIL_LEN = 4; | ||
static const int16_t PLAYER_MAX_X = 16; | ||
PxcCoord playerPos; | ||
int16_t player_yVel; | ||
bool unsettled; | ||
int crash_flash; | ||
PxcCoord playerTrail[PLAYER_TRAIL_LEN]; | ||
|
||
fanta_buffer_t playfield_buf; | ||
FantaManipulator * playfield; | ||
bool pf_dirty; | ||
|
||
void leave(); | ||
void new_game(); | ||
void render_game(FantaManipulator*, bool); | ||
void step_game(); | ||
void player_crashed(); | ||
}; | ||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,4 +83,8 @@ | |
#endif | ||
#endif | ||
|
||
#if HWCONF_DISPLAY_WIDTH_PX >= 192 | ||
#define HAS_SPLIT_SCREEN_APPHOST | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include <input/infrared.h> | ||
|
||
// NB: | ||
|
||
const infrared_definition_t HWCONF_IR_BUTTONS = { | ||
/** | ||
Optosupply OE13KIR (https://akizukidenshi.com/goodsaffix/OE13KIR.pdf) | ||
*/ | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0xA0, .value = 0x8F705FA, .key = KEY_UP}, // UP | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0x00, .value = 0x8F700FF, .key = KEY_DOWN}, // DOWN | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0x10, .value = 0x8F708F7, .key = KEY_LEFT}, // LEFT | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0x80, .value = 0x8F701FE, .key = KEY_RIGHT}, // RIGHT | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0x20, .value = 0x8F704FB, .key = KEY_HEADPAT}, // CENTER | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0xf8, .value = 0x8f71fe0, .key = KEY_SOFT_F1}, // A | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0x78, .value = 0x8f71ee1, .key = KEY_SOFT_F2}, // B | ||
{ .protocol = IRPROTO_NEC, .address = 0x10, .command = 0x58, .value = 0x8f71ae5, .key = KEY_SOFT_F3}, // C | ||
// Top-left: TYPE=3, VALUE=0x8f78d72, ADDRESS=0x10, COMMAND=0xb1 | ||
// Top-right: TYPE=3, VALUE=0x8f7847b, ADDRESS=0x10, COMMAND=0x21 | ||
// Bottom-left: TYPE=3, VALUE=0x8f78877, ADDRESS=0x10, COMMAND=0x11 | ||
// Bottom-right: TYPE=3, VALUE=0x8f7817e, ADDRESS=0x10, COMMAND=0x81 | ||
// Power: TYPE=3, VALUE=0x8f71be4, ADDRESS=0x10, COMMAND=0xd8 | ||
|
||
/** | ||
* ProSpec DVE (Digital Video Editor) | ||
*/ | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa0, .value = 0x417405FA, .key = KEY_UP }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa2, .value = 0x417445BA, .key = KEY_DOWN }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa5, .value = 0x4174A55A, .key = KEY_LEFT }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa4, .value = 0x417425DA, .key = KEY_RIGHT }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa1, .value = 0x4174857A, .key = KEY_HEADPAT }, // input sw | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa7, .value = 0x4174E51A, .key = KEY_SOFT_F1 }, // pwr | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa6, .value = 0x4174659A, .key = KEY_SOFT_F3 }, // frame | ||
{ .protocol = IRPROTO_NEC, .address = 0x2e82, .command = 0xa3, .value = 0x4174C53A, .key = KEY_SOFT_F2 }, // back | ||
|
||
|
||
/** | ||
* UNKNOWN "LCD remote" | ||
*/ | ||
{ .protocol = IRPROTO_NEC, .address = 0x6b86, .command = 0x1b, .value = 0x61D6D827, .key = KEY_UP }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x6b86, .command = 0x1a, .value = 0x61D658A7, .key = KEY_DOWN }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x6b86, .command = 0x4, .value = 0x61D620DF, .key = KEY_LEFT }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x6b86, .command = 0x6, .value = 0x61D6609F, .key = KEY_RIGHT }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x6b86, .command = 0x5, .value = 0x61D6A05F, .key = KEY_HEADPAT }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x6b86, .command = 0x12, .value = 0x61D648B7, .key = KEY_SOFT_F2 }, // pwr | ||
|
||
/** | ||
* UNKNOWN "Audio Switch" SPDIF/TOSLINK 4X1 REMOTE CONTROL | ||
*/ | ||
{ .protocol = IRPROTO_NEC, .address = 0x0, .command = 0x15, .value = 0xFFA857, .key = KEY_UP }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x0, .command = 0x18, .value = 0xFF18E7, .key = KEY_DOWN }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x0, .command = 0x16, .value = 0xFF6897, .key = KEY_LEFT }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x0, .command = 0xd, .value = 0xFFB04F, .key = KEY_RIGHT }, | ||
{ .protocol = IRPROTO_NEC, .address = 0x0, .command = 0x45, .value = 0xFFA25D, .key = KEY_HEADPAT }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.