diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0fda0cc..22e6ba8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,9 +7,9 @@ jobs:
GLOBAL_CACHE_VERSION: 1
PBDOOM_PATH: pbdoom
SDK_DOWNLOAD_PATH: sdk
- SDK_REPO: pocketbook/SDK_6.3.0
- SDK_REF: 23eb32c3a011a1df4ce3d8f22150dcdd34cbc75a
- SDK_VARIANT: SDK-A13
+ SDK_REPO: blchinezu/pocketbook-sdk
+ SDK_REF: 64e9fa210dd90569f8eabea92da4d40f3d072fc1
+ SDK_VARIANT: SDK_481
steps:
- name: Checkout repo
uses: actions/checkout@v3
@@ -46,7 +46,7 @@ jobs:
- name: Build
run: |
- $SDK_DOWNLOAD_PATH/$SDK_VARIANT/bin/update_path.sh
+ sed -i "s@/srv/einkbuild/SDK2FREE/SDK-481@$(pwd)/$SDK_DOWNLOAD_PATH/$SDK_VARIANT@g" $SDK_DOWNLOAD_PATH/$SDK_VARIANT/share/cmake/arm_conf.cmake
cd $PBDOOM_PATH
echo "../$SDK_DOWNLOAD_PATH/$SDK_VARIANT" > sdk_path
diff --git a/.gitignore b/.gitignore
index c795b05..7abc51c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-build
\ No newline at end of file
+build
+*.~undo-tree~
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b97805..924a70c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
+- Removed `DitherAreaPattern2Level` dithering mode because it is not supported in the older SDK
+- Support for older devices (min GLIBC 2.4) like PocketBook 611 [#9](https://github.com/imustafin/pbdoom/issues/9)
+
### Fixed
## [v0.0.5]
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20468fb..4832932 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,6 @@ configure_file(
include_directories(${CMAKE_BINARY_DIR}/generated)
### end version
-
add_executable(game.app
main.c
pbdoom_state.h
@@ -173,5 +172,7 @@ sdldoom-1.10/z_zone.h
)
target_link_libraries(game.app ${INKVIEW_LIBRARIES})
target_link_libraries(game.app m)
+target_link_libraries(game.app rt)
-target_compile_options(game.app PRIVATE -Werror=implicit-function-declaration)
+target_compile_options(game.app PRIVATE -Werror=implicit-function-declaration -D_GNU_SOURCE -fsigned-char)
+set_property(TARGET game.app PROPERTY C_STANDARD 99)
diff --git a/build.sh b/build.sh
index 5522509..3fcce9e 100755
--- a/build.sh
+++ b/build.sh
@@ -1,2 +1,3 @@
+export LC_ALL=C
SDK_PATH=$(cat sdk_path)
mkdir -p build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$SDK_PATH/share/cmake/arm_conf.cmake .. && cmake --build .
diff --git a/pages/_data/i18n.yml b/pages/_data/i18n.yml
index f0bfab2..6782881 100644
--- a/pages/_data/i18n.yml
+++ b/pages/_data/i18n.yml
@@ -25,6 +25,10 @@ home:
en: 'PBDoom is known to be running on:'
ru: 'Известно, что PBDoom работает на этих устройствах:'
tt: 'PBDoom бу җайланмаларда эшләве билгеле:'
+ device_compat_limited_desc:
+ en: 'PBDoom starts but works with limited functionality on:'
+ ru: 'PBDoom запускается, но работает в ограниченном режиме на:'
+ tt: 'PBDoom бу җайланмаларда башлый ала, ләкин чикләнгән функционалда эшли:'
source_code_and_contacts:
en: Source code and contacts
ru: Исходный код и контакты
diff --git a/pages/_layouts/home.html b/pages/_layouts/home.html
index 9f86870..919bb3c 100644
--- a/pages/_layouts/home.html
+++ b/pages/_layouts/home.html
@@ -87,6 +87,10 @@
PocketBook X
PocketBook Touch HD 3
+ {{ site.data.i18n.home.device_compat_limited_desc | t }}
+
{{ site.data.i18n.home.source_code_and_contacts | t }}
diff --git a/pbdoom-get.app b/pbdoom-get.app
index 472e6a3..d5be7f5 100644
--- a/pbdoom-get.app
+++ b/pbdoom-get.app
@@ -20,7 +20,7 @@ do
nc -l -p "$LOCAL_PORT" > "$LOCAL_APP_PATH"
echo "Application has been saved to '$LOCAL_APP_PATH'"
- MON_IP=192.168.43.248
+ MON_IP=192.168.3.224
MON_PORT=10002
pbdoom.app | nc $MON_IP $MON_PORT
done
diff --git a/pbdoom/frames/color_settings.c b/pbdoom/frames/color_settings.c
index 8ead744..49a9ddc 100644
--- a/pbdoom/frames/color_settings.c
+++ b/pbdoom/frames/color_settings.c
@@ -211,7 +211,7 @@ static void uninstall() {
}
-const int NUM_BUF_S = 10;
+#define NUM_BUF_S 10
char num_buf[NUM_BUF_S];
void draw_value_text(value *v) {
diff --git a/pbdoom/frames/game.c b/pbdoom/frames/game.c
index c55edf9..5ab34d8 100644
--- a/pbdoom/frames/game.c
+++ b/pbdoom/frames/game.c
@@ -119,10 +119,6 @@ void game_frame_draw_screen(unsigned char *screen) {
case DYNAMIC_A2:
DynamicUpdateA2(ux, uy, uw, uh);
break;
- case DITHER_AREA_PATTERN_2_LEVEL:
- DitherAreaPattern2Level(ux, uy, uw, uh);
- PartialUpdate(ux, uy, uw, uh);
- break;
case DITHER_MANUAL_2_PATTERN:
DitherArea(ux, uy, uw, uh, 2, DITHER_PATTERN);
PartialUpdate(ux, uy, uw, uh);
diff --git a/pbdoom/frames/game.h b/pbdoom/frames/game.h
index 7848fc4..50b7961 100644
--- a/pbdoom/frames/game.h
+++ b/pbdoom/frames/game.h
@@ -9,7 +9,6 @@ extern frame game_frame;
typedef enum {
DYNAMIC_A2,
- DITHER_AREA_PATTERN_2_LEVEL,
DITHER_MANUAL_2_PATTERN,
NO_DITHER
} ink_render_mode;
@@ -19,9 +18,9 @@ void game_frame_set_render_mode(ink_render_mode i_render_mode);
void game_frame_set_palette(byte *palette);
void game_frame_draw_screen(unsigned char *screen);
-static const double GAME_DEFAULT_ALPHA = 1;
-static const double GAME_DEFAULT_BETA = 0;
-static const double GAME_DEFAULT_GAMMA = 1;
+#define GAME_DEFAULT_ALPHA 1
+#define GAME_DEFAULT_BETA 0
+#define GAME_DEFAULT_GAMMA 1
extern double game_alpha;
extern double game_beta;
extern double game_gamma;
diff --git a/pbdoom/frames/panel.c b/pbdoom/frames/panel.c
index b3b8496..0b522ae 100644
--- a/pbdoom/frames/panel.c
+++ b/pbdoom/frames/panel.c
@@ -9,7 +9,6 @@ icontext_menu *main_menu;
enum {
idx_render = 1,
idx_render_dynamic_a2,
- idx_render_dither_area_pattern_2_level,
idx_render_dither_area_2,
idx_render_no_dither,
@@ -24,11 +23,6 @@ imenu render_submenu[] = {
idx_render_dynamic_a2,
"DynamicA2"
},
- {
- ITEM_ACTIVE,
- idx_render_dither_area_pattern_2_level,
- "DitherAreaPattern2Level"
- },
{
ITEM_ACTIVE,
idx_render_dither_area_2,
@@ -97,10 +91,6 @@ void main_menu_handler(int i) {
send_render_event(DYNAMIC_A2);
main_menu = NULL;
break;
- case idx_render_dither_area_pattern_2_level:
- send_render_event(DITHER_AREA_PATTERN_2_LEVEL);
- main_menu = NULL;
- break;
case idx_render_dither_area_2:
send_render_event(DITHER_MANUAL_2_PATTERN);
main_menu = NULL;
@@ -126,9 +116,6 @@ void make_main_menu() {
case DYNAMIC_A2:
active_idx = idx_render_dynamic_a2;
break;
- case DITHER_AREA_PATTERN_2_LEVEL:
- active_idx = idx_render_dither_area_pattern_2_level;
- break;
case DITHER_MANUAL_2_PATTERN:
active_idx = idx_render_dither_area_2;
break;
diff --git a/send.sh b/send.sh
index 20282ea..010b717 100755
--- a/send.sh
+++ b/send.sh
@@ -4,7 +4,7 @@ set -e
LOCAL_PATH=./build/game.app
REMOTE_APP_NAME=pbdoom/game.app
-REMOTE_IP=192.168.43.40
+REMOTE_IP=192.168.3.211
REMOTE_PORT=10003
echo "Sending '$LOCAL_PATH' to '$REMOTE_IP:$REMOTE_PORT/$REMOTE_APP_NAME'"