Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with older SDK #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
build
*.~undo-tree~
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ configure_file(
include_directories(${CMAKE_BINARY_DIR}/generated)
### end version


add_executable(game.app
main.c
pbdoom_state.h
Expand Down Expand Up @@ -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)
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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 .
4 changes: 4 additions & 0 deletions pages/_data/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Исходный код и контакты
Expand Down
4 changes: 4 additions & 0 deletions pages/_layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ <h2 class="text-2xl font-bold mt-2 mb-1">
<li>PocketBook X</li>
<li>PocketBook Touch HD 3</li>
</ul>
{{ site.data.i18n.home.device_compat_limited_desc | t }}
<ul class="list-disc list-inside">
<li>PocketBook 611</li>
</ul>
<h2 class="text-2xl font-bold mt-2 mb-1">
{{ site.data.i18n.home.source_code_and_contacts | t }}
</h2>
Expand Down
2 changes: 1 addition & 1 deletion pbdoom-get.app
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pbdoom/frames/color_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 0 additions & 4 deletions pbdoom/frames/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions pbdoom/frames/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
13 changes: 0 additions & 13 deletions pbdoom/frames/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand All @@ -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,
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion send.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down