Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1b25ae3
Symbian port
shinovon Sep 29, 2026
1fdcbb2
Symbian: Implement keyboard input, fix platformSleepUntil
shinovon Sep 29, 2026
8d7a35c
Move symbian config to artifacts dir
shinovon Sep 29, 2026
84a21a9
Symbian: Implement audio
shinovon Sep 29, 2026
dd3814b
Merge remote-tracking branch 'origin/main' into symbian
shinovon Sep 29, 2026
083efd9
try and fix RGBA4, hope you don't mind!
cobaltgit Sep 29, 2026
fe14870
Symbian: use 16bpp textures
shinovon Sep 30, 2026
c1edcb9
Symbian: try unload old textures when going out of vram
shinovon Sep 30, 2026
f2dce75
Merge remote-tracking branch 'origin/main' into symbian
shinovon Sep 30, 2026
03eac95
Fix unused function error
shinovon Sep 30, 2026
29c8c00
Symbian: add volume keys listener
shinovon Sep 30, 2026
2ab366c
Cleanup
shinovon Sep 30, 2026
dd716f9
Symbian: try unloading unused textures before uploading
shinovon Oct 1, 2026
2c6014b
Symbian: refactor and fixes
shinovon Oct 1, 2026
d49f69f
Merge remote-tracking branch 'origin/main' into symbian
shinovon Oct 2, 2026
53ff84e
Symbian: Use O3 optimization
shinovon Oct 2, 2026
5f9091d
Symbian build CI
shinovon Oct 2, 2026
fbac1c0
Ignore cache for now
shinovon Oct 2, 2026
172bd1f
Fix symbian ci and move it to build-other
shinovon Oct 2, 2026
ffe8ad6
Fix ci again
shinovon Oct 2, 2026
b86103f
Use gcc 15 in symbian ci
shinovon Oct 2, 2026
01dca43
fix ci?
cobaltgit Oct 3, 2026
c286b07
ok
cobaltgit Oct 3, 2026
66a0f9c
Make loop.c less ugly
shinovon Oct 3, 2026
15d58f2
Merge remote-tracking branch 'origin/main' into symbian
shinovon Oct 3, 2026
70668fc
Idents
shinovon Oct 3, 2026
fa8c817
Merge remote-tracking branch 'origin/main' into symbian
shinovon Oct 3, 2026
dfeae28
Log
shinovon Oct 3, 2026
d29fbf1
temporary fix
shinovon Oct 3, 2026
1d1e81e
Better names
shinovon Oct 3, 2026
06bfc38
Merge remote-tracking branch 'origin/main' into symbian
shinovon Oct 4, 2026
76a166b
Symbian: use usleep in miniaudio instead
shinovon Oct 4, 2026
e023a17
Merge remote-tracking branch 'origin/main' into symbian
shinovon Oct 5, 2026
23d31ec
Merge remote-tracking branch 'origin/main' into symbian
shinovon Oct 9, 2026
8346d4e
Fix symbian build
shinovon Oct 9, 2026
d2efd7d
DISABLE_PHYSICS doesn't do anything
shinovon Oct 9, 2026
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
48 changes: 47 additions & 1 deletion .github/workflows/build-other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,50 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: butterscotch-android
path: src/android/frontend/app/build/outputs/apk/debug/app-debug.apk
path: src/android/frontend/app/build/outputs/apk/debug/app-debug.apk

build-symbian:
name: Build (Symbian)
runs-on: windows-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7

- uses: actions/cache/restore@v5
name: Check SDK
id: cache_sdk
with:
path: symbiansdk.zip
key: symbian-sdk

- name: Download SDK
if: steps.cache_sdk.outputs.cache-hit != 'true'
run: Invoke-WebRequest https://nnproject.cc/dl/symbian3_gcce1520_workflow.zip -OutFile symbiansdk.zip

- name: Cache SDK
if: steps.cache_sdk.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: symbiansdk.zip
key: symbian-sdk

- name: Extract SDK
run: Expand-Archive symbiansdk.zip -DestinationPath .

- name: Compile
run: |
$SDK = "$pwd/SDK/"
$Env:EPOCROOT = "$SDK".Substring(2)
$Env:SBS_GCCE1520BIN = "$pwd/GCCE/bin"
cmd /c "$SDK/epoc32/tools/sbs\bin\sbs.bat -b artifacts/symbian/bld.inf -c armv6_urel_gcce -f - -m $SDK/epoc32/build/Butterscotch/makefile -j 4"

cd artifacts/symbian
(Get-Content Butterscotch.pkg).Replace('$(EPOCROOT)', "$SDK").Replace('$(PLATFORM)', 'armv6').Replace('$(TARGET)', 'urel') | Set-Content Butterscotch.pkg
cmd /c "$SDK/epoc32/tools/makesis.exe Butterscotch.pkg Butterscotch.sis"


- name: Upload SIS
uses: actions/upload-artifact@v7
with:
name: butterscotch-symbian
path: artifacts/symbian/Butterscotch.sis
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ CMakeUserPresets.json
compat/config.mk
/.vs
*.log

# symbian
.project
.cproject
*.sis
*.d
134 changes: 134 additions & 0 deletions artifacts/symbian/Butterscotch.mmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
TARGET Butterscotch.exe
TARGETTYPE exe
UID 0x100039CE 0xEC93FBDE

SYSTEMINCLUDE /epoc32
SYSTEMINCLUDE /epoc32/include
SYSTEMINCLUDE /epoc32/include/mw
SYSTEMINCLUDE /epoc32/include/app
SYSTEMINCLUDE /epoc32/include/platform
SYSTEMINCLUDE /epoc32/include/platform/mw
SYSTEMINCLUDE /epoc32/include/platform/app
SYSTEMINCLUDE /epoc32/include/stdapis

LIBRARY euser.lib
// ui
LIBRARY cone.lib
LIBRARY avkon.lib
LIBRARY apparc.lib
LIBRARY eikcore.lib
LIBRARY ws32.lib
// gl
LIBRARY libglesv2.lib
LIBRARY libegl.lib
// pips
LIBRARY libc.lib
LIBRARY libm.lib
LIBRARY libpthread.lib
// audio
LIBRARY mediaclientaudiostream.lib
// volume keys
LIBRARY remconinterfacebase.lib
LIBRARY remconcoreapi.lib

#ifdef ARMCC
OPTION ARMCC -Otime
OPTION ARMCC --gnu --c99 --diag_suppress 1,61,66,68,111,174,381,1293,1296
OPTION_REPLACE ARMCC --cpu 6
OPTION_REPLACE ARMCC --fpu vfpv2 --fpmode fast
OPTION_REPLACE ARMCC -O2 -O3

ARMFPU vfpv2
ALWAYS_BUILD_AS_ARM
#endif

OPTION GCCE -std=gnu99
#if defined(GCCE_12) || defined(GCCE_15)
OPTION GCCE -O3
ARMFPU vfpv2
ALWAYS_BUILD_AS_ARM
#endif

OPTION CW -lang c99 -undefine _WIN32 -relax_pointers

CAPABILITY NetworkServices ReadUserData WriteUserData

EPOCSTACKSIZE 0x14000
EPOCHEAPSIZE 0x80000 0x4000000

DEBUGGABLE_UDEBONLY
#ifdef _DEBUG
SRCDBG
#endif

SOURCEPATH .
START RESOURCE butterscotch.rss
HEADER
TARGETPATH \resource\apps
LANG SC
END

START RESOURCE butterscotch_reg.rss
TARGETPATH \private\10003a3f\import\apps
END

MACRO SYMBIAN_OE_POSIX_SIGNALS
MACRO ENABLE_MODERN_GL
MACRO USE_MINIAUDIO
MACRO ENABLE_WAD14
MACRO ENABLE_WAD16
MACRO ENABLE_WAD17
MACRO NO_LOG2
MACRO USE_FLOAT_REALS
MACRO MINIZ_NO_ARCHIVE_APIS
MACRO MINIZ_NO_STDIO

USERINCLUDE ../../src
USERINCLUDE ../../src/debug_font
USERINCLUDE ../../src/gl
USERINCLUDE ../../src/gl_common
USERINCLUDE ../../src/gl_legacy
USERINCLUDE ../../src/image
USERINCLUDE ../../src/video
USERINCLUDE ../../src/audio/miniaudio
USERINCLUDE ../../src/symbian
USERINCLUDE ../../vendor/base64
USERINCLUDE ../../vendor/bzip2
USERINCLUDE ../../vendor/md5
USERINCLUDE ../../vendor/sha1
USERINCLUDE ../../vendor/stb/ds
USERINCLUDE ../../vendor/stb/image
USERINCLUDE ../../vendor/stb/vorbis
USERINCLUDE ../../vendor/miniz
USERINCLUDE ../../vendor/miniaudio

SOURCEPATH ../../src
SOURCE binary_reader.c data_win.c data_win_print.c debug_overlay.c event_table.c gml_array.c gml_method.c ini.c input_recording.c instance.c int_int_hashmap.c int_rvalue_hashmap.c json_reader.c json_writer.c log.c loop.c noop_audio_system.c overlay_file_system.c profiler.c random.c runner.c runner_gamepad.c runner_keyboard.c runner_mouse.c spatial_grid.c stb_ds.c string_builder.c vm.c vm_builtins.c
SOURCEPATH ../../src/video
SOURCE null_video.c
SOURCEPATH ../../src/debug_font
SOURCE debug_font.c debug_font_4bpp.c
SOURCEPATH ../../src/gl_common
SOURCE gl_common.c
SOURCEPATH ../../src/image
SOURCE image_decoder.c
SOURCEPATH ../../vendor/base64
SOURCE base64.c
SOURCEPATH ../../vendor/bzip2
SOURCE bz_internal_error.c bzlib.c crctable.c decompress.c huffman.c randtable.c
SOURCEPATH ../../vendor/md5
SOURCE md5.c
SOURCEPATH ../../vendor/sha1
SOURCE sha1.c
SOURCEPATH ../../vendor/miniz
SOURCE miniz.c miniz_tdef.c miniz_tinfl.c
SOURCEPATH ../../src/symbian
SOURCE stb_impl.c symbian.cpp symbian_audio.cpp symbian_atomics.c
SOURCEPATH ../../src/gl
SOURCE gl_renderer.c
SOURCEPATH ../../src/audio/miniaudio
SOURCE ma_audio_system.c
SOURCEPATH ../../src/physics/disabled
SOURCE physics_disabled.c
SOURCEPATH ../../src/physics
SOURCE physics.c
12 changes: 12 additions & 0 deletions artifacts/symbian/Butterscotch.pkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
&EN

#{"Butterscotch"},(0xEC93FBDE),1,0,0

[0x20022E6D], 0, 0, 0, {"S60ProductID"}

%{"shinovon"}
:"shinovon"

"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\Butterscotch.exe" - "!:\sys\bin\Butterscotch.exe"
"$(EPOCROOT)\epoc32\data\z\private\10003a3f\import\apps\butterscotch_reg.rsc" - "!:\private\10003a3f\import\apps\butterscotch_reg.rsc"
"$(EPOCROOT)\epoc32\data\z\resource\apps\butterscotch.rsc" - "!:\resource\apps\butterscotch.rsc"
5 changes: 5 additions & 0 deletions artifacts/symbian/bld.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PRJ_PLATFORMS
GCCE ARMV5 ARMV6

PRJ_MMPFILES
Butterscotch.mmp
78 changes: 78 additions & 0 deletions artifacts/symbian/butterscotch.rss
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
NAME BTSC

#include <eikon.rh>
#include <avkon.rsg>
#include <avkon.rh>
#include <avkon.mbg>
#include <appinfo.rh>

RESOURCE RSS_SIGNATURE { }
RESOURCE TBUF { buf="Butterscotch"; }

RESOURCE EIK_APP_INFO { }

rls_string STRING_app_caption_string "Butterscotch"
rls_string STRING_app_short_caption_string "Butterscotch"

RESOURCE LOCALISABLE_APP_INFO r_BUTTERSCOTCH_localisable_app_info
{
short_caption = STRING_app_short_caption_string;
caption_and_icon = CAPTION_AND_ICON_INFO
{
caption = STRING_app_caption_string;
number_of_icons = 1;
icon_file = "\\resource\\apps\\butterscotch_icon.mif";
};
}

RESOURCE DIALOG r_query_dialog
{
flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
items =
{
DLG_LINE
{
type = EAknCtPopupHeadingPane;
id = EAknMessageQueryHeaderId;
itemflags = EEikDlgItemNonFocusing;
control = AVKON_HEADING
{
};
},
DLG_LINE
{
type = EAknCtMessageQuery;
id = EAknMessageQueryContentId;
control = AVKON_MESSAGE_QUERY
{
};
}
};
}

RESOURCE DIALOG r_text_query
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | EEikDialogFlagCbaButtons;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
DLG_LINE
{
type = EAknCtQuery;
id = EGeneralQuery;
control = AVKON_DATA_QUERY
{
layout = EDataLayout;
control = EDWIN
{
width = 128;
lines = 1;
maxlength = 510;
default_case = EAknEditorLowerCase;
allowed_case_modes = EAknEditorAllCaseModes;
};
};
}
};
}
17 changes: 17 additions & 0 deletions artifacts/symbian/butterscotch_reg.rss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <appinfo.rh>
#include <Butterscotch.rsg>

UID2 KUidAppRegistrationResourceFile
UID3 0xEC93FBDE

RESOURCE APP_REGISTRATION_INFO
{
app_file="Butterscotch";

localisable_resource_file="\\resource\\apps\\butterscotch";
localisable_resource_id=R_BUTTERSCOTCH_LOCALISABLE_APP_INFO;

embeddability=KAppNotEmbeddable;
newfile=KAppDoesNotSupportNewFile;
}

33 changes: 30 additions & 3 deletions src/audio/miniaudio/ma_audio_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@
#include <windows.h>
#endif

#ifdef __SYMBIAN32__
#define MA_BSD
#define MA_NO_RUNTIME_LINKING
#define MA_THREAD_DEFAULT_STACK_SIZE 64*1024
#define MA_ENABLE_ONLY_SPECIFIC_BACKENDS
#define MA_ENABLE_CUSTOM
#endif

// Include stb_vorbis BEFORE miniaudio so that STB_VORBIS_INCLUDE_STB_VORBIS_H is defined,
// which enables miniaudio's built-in OGG Vorbis decoding support.
#include "stb_vorbis.c"

#define MA_NO_FLAC
#define MA_NO_MP3
#define MINIAUDIO_IMPLEMENTATION
#if defined(__GNUC__) || defined(__clang__)
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__ARMCC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include "miniaudio.h"
#if defined(__GNUC__) || defined(__clang__)
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__ARMCC__)
#pragma GCC diagnostic pop
#endif

Expand Down Expand Up @@ -106,11 +114,26 @@ static char* resolveExternalPath(MaAudioSystem* ma, Sound* sound) {

// ===[ Vtable Implementations ]===

#ifdef __SYMBIAN32__
ma_context* maSymbianAudioInit(void);
void maSymbianAudioDestroy(void);
#endif

static void maInit(AudioSystem* audio, DataWin* dataWin, FileSystem* fileSystem) {
MaAudioSystem* ma = (MaAudioSystem*) audio;
arrput(ma->base.audioGroups, dataWin);
ma->fileSystem = fileSystem;


#ifdef __SYMBIAN32__
ma_context* context = maSymbianAudioInit();
ma_device_config deviceConfig = ma_device_config_init(ma_device_type_playback);
deviceConfig.playback.format = ma_format_f32;
deviceConfig.playback.channels = 2;
deviceConfig.sampleRate = 44100;
deviceConfig.dataCallback = ma_engine_data_callback_internal;
deviceConfig.pUserData = &ma->engine;
ma_result deviceResult = ma_device_init(context, &deviceConfig, &ma->device);
#else
ma_device_config deviceConfig = ma_device_config_init(ma_device_type_playback);
deviceConfig.playback.format = ma_format_f32;
deviceConfig.playback.channels = 2;
Expand All @@ -119,6 +142,7 @@ static void maInit(AudioSystem* audio, DataWin* dataWin, FileSystem* fileSystem)
deviceConfig.dataCallback = ma_engine_data_callback_internal;
deviceConfig.pUserData = &ma->engine;
ma_result deviceResult = ma_device_init(NULL, &deviceConfig, &ma->device);
#endif
if (deviceResult != MA_SUCCESS) {
logError("Audio: Failed to initialize playback device (error %d)\n", deviceResult);
return;
Expand Down Expand Up @@ -183,6 +207,9 @@ static void maDestroy(AudioSystem* audio) {

ma_device_uninit(&ma->device);
ma_engine_uninit(&ma->engine);
#ifdef __SYMBIAN32__
maSymbianAudioDestroy();
#endif
free(ma);
}

Expand Down
Loading
Loading