[Scummvm-git-logs] scummvm branch-2-8 -> 1472a17918e8133dca1990401af4027cb00d6f2a

sev- noreply at scummvm.org
Sat Jan 20 22:51:37 UTC 2024


This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d7bdb4b48b KOLIBRI: Update for new ksys.h
b42f769159 KOLIBRI: Remove sdl-stubs
76e3c79d8e KOLIBRI: Replace kos32sys.h
845dbd9ba6 KOLIBRI: build-kolibri: Use a more common path to SDK
850cd4b2f5 KOLIBRI: build-kolibri: Temporarily disable ags engine as it fails to compile
8f22e41ec8 CONFIGURE: Handle kolibrios that merges vorbisfile and vorbis
1472a17918 KOLIBRI: Add explicit paths for ogg and vorbis


Commit: d7bdb4b48b57e551ab8284e0b67d2bf5b278d6e6
    https://github.com/scummvm/scummvm/commit/d7bdb4b48b57e551ab8284e0b67d2bf5b278d6e6
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:51:30+01:00

Commit Message:
KOLIBRI: Update for new ksys.h

New ksys has renamed few structs and function. Propagate rename and
use _ksys_file_read_dir function instead of manual filling

Changed paths:
    backends/fs/kolibrios/kolibrios-fs.cpp


diff --git a/backends/fs/kolibrios/kolibrios-fs.cpp b/backends/fs/kolibrios/kolibrios-fs.cpp
index b1bf8184f55..0a2456bdecd 100644
--- a/backends/fs/kolibrios/kolibrios-fs.cpp
+++ b/backends/fs/kolibrios/kolibrios-fs.cpp
@@ -33,25 +33,17 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <sys/kos_io.h>
 #include <sys/ksys.h>
 
 #include "common/pack-start.h"	// START STRUCT PACKING
 
-struct kol_readdir_result_header {
-	uint32 version;
-	uint32 number_of_placed_blocks;
-	uint32 total_number_of_blocks;
-	byte reserved[20];
-} PACKED_STRUCT;
-
 struct kol_readdir_result_entry {
-	ksys_bdfe_t bdfe;
+	ksys_file_info_t bdfe;
 	char fileName[520];
 } PACKED_STRUCT;
 
 struct kol_readdir_result {
-	kol_readdir_result_header header;
+	ksys_dir_entry_header_t header;
 	kol_readdir_result_entry entries[0];
 } PACKED_STRUCT;
 
@@ -61,26 +53,18 @@ namespace {
 
 // opendir/readdir are buggy. And they encourage using syscalls. Whatever
 kol_readdir_result *kol_readdir(const char *path, uint32 max_blocks) {
-	ksys70_status_t ret_result;
-	int result_buffer_size = sizeof (kol_readdir_result_header)
+	ksys_file_status_t ret_result;
+	int result_buffer_size = sizeof (ksys_dir_entry_header_t)
 		+ max_blocks * sizeof (kol_readdir_result_entry);
 	kol_readdir_result *result_buffer = (kol_readdir_result *) malloc (result_buffer_size);
 	if (!result_buffer)
 		return nullptr;
 	memset(result_buffer, 0, result_buffer_size);
-	ksys70_t request;
-	request.p00 = 1; // Read directory
-	request.p04dw = 0;
-	request.p08dw = 3; // UTF-8
-	request.p12 = max_blocks;
-	request.buf16 = result_buffer;
-	request.p20 = 0; // Don't use inline path
-	request.p21 = path;
-
-	ret_result = _ksys70(&request);
-
-	// 0 is returned for normal dirs, 6 for virtual directories
-	if (ret_result.status != 0 && ret_result.status != 6) {
+
+	ret_result = _ksys_file_read_dir(path, 0, KSYS_FILE_UTF8, max_blocks, result_buffer);
+
+	// KSYS_FS_ERR_SUCCESS (0) is returned for normal dirs, KSYS_FS_ERR_EOF (6) for virtual directories
+	if (ret_result.status != 0 && ret_result.status != KSYS_FS_ERR_EOF) {
 		free (result_buffer);
 		return nullptr;
 	}
@@ -94,18 +78,19 @@ kol_readdir_result *kol_readdir(const char *path) {
 	if (!res)
 		return nullptr;
 
-	uint32 tot_blocks = res->header.total_number_of_blocks;
+	uint32 tot_blocks = res->header.files;
 	free(res);
 
 	return kol_readdir(path, tot_blocks);
 }
 
 bool getFileAttrs(Common::String path, uint32& attrs) {
-	fileinfo_t info;
+	ksys_file_info_t info;
 
 	memset(&info, 0, sizeof(info));
-	info.attr = 0x10;
-	if(get_fileinfo(path.c_str(), &info)) {
+	info.attr = KSYS_FILE_ATTR_DIR;
+
+	if(_ksys_file_info(path.c_str(), &info)) {
 		attrs = 0;
 		return false;
 	}
@@ -170,7 +155,7 @@ bool KolibriOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode,
 	if (!res)
 		return false;
 
-	for (int i = 0; i < (int) res->header.number_of_placed_blocks; i++)
+	for (int i = 0; i < (int) res->header.blocks; i++)
 	{
 		// Skip 'invisible' files if necessary
 		if (res->entries[i].fileName[0] == '.' && !hidden) {
@@ -190,7 +175,7 @@ bool KolibriOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode,
 		entry._path += entry._displayName;
 
 		entry._isValid = true;
-		entry._attributes = res->entries[i].bdfe.attributes;
+		entry._attributes = res->entries[i].bdfe.attr;
 
 		// Honor the chosen mode
 		if ((mode == Common::FSNode::kListFilesOnly && entry.isDirectory()) ||


Commit: b42f769159f8a6484c05df65870411a254a79a65
    https://github.com/scummvm/scummvm/commit/b42f769159f8a6484c05df65870411a254a79a65
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:51:30+01:00

Commit Message:
KOLIBRI: Remove sdl-stubs

Now similar SDL stubs are in the SDL library. We now have a conflict due
to slightly different prototypes. Just remove the stubs

Changed paths:
  R backends/platform/sdl/kolibrios/sdl-stubs.cpp
    backends/platform/sdl/module.mk


diff --git a/backends/platform/sdl/kolibrios/sdl-stubs.cpp b/backends/platform/sdl/kolibrios/sdl-stubs.cpp
deleted file mode 100644
index 0c8f23f1b08..00000000000
--- a/backends/platform/sdl/kolibrios/sdl-stubs.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "backends/events/sdl/sdl-events.h"
-
-SDL_Joystick *SDL_JoystickOpen (int index) {
-	return nullptr;
-}
-
-const char *SDL_JoystickName (int index) {
-	return nullptr;
-}
-
-int SDL_NumJoysticks (void) {
-	return 0;
-}
-
-void SDL_JoystickClose (SDL_Joystick *joystick) {
-}
-
-// SDL CDAudio is not used on kolibri as it's redirected away from
-// in platform-specific code but since it's still linked-in it needs those stubs
-CDstatus SDL_CDStatus (SDL_CD *cdrom) {
-	return CD_ERROR;
-}
-
-int SDL_CDPlayTracks (SDL_CD *cdrom, int start_track, int start_frame, int ntracks, int nframes) {
-	return -1;
-}
-
-int SDL_CDStop (SDL_CD *cdrom) {
-	return -1;
-}
-
-SDL_CD *SDL_CDOpen (int drive) {
-	return nullptr;
-}
-
-void SDL_CDClose (SDL_CD *cdrom) {
-}
diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk
index 06480af4ce9..230ea04b351 100644
--- a/backends/platform/sdl/module.mk
+++ b/backends/platform/sdl/module.mk
@@ -7,8 +7,7 @@ MODULE_OBJS := \
 ifdef KOLIBRIOS
 MODULE_OBJS += \
 	kolibrios/kolibrios-main.o \
-	kolibrios/kolibrios.o \
-	kolibrios/sdl-stubs.o
+	kolibrios/kolibrios.o
 endif
 
 ifdef POSIX


Commit: 76e3c79d8ea89a61715129bb2da279cc808afeb3
    https://github.com/scummvm/scummvm/commit/76e3c79d8ea89a61715129bb2da279cc808afeb3
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:51:30+01:00

Commit Message:
KOLIBRI: Replace kos32sys.h

kos32sys.h is no longer available. Just declare DLL-related functions ourselves
like other programs do.

Changed paths:
    backends/platform/sdl/kolibrios/wrapper-main.c
    backends/plugins/kolibrios/kolibrios-provider.cpp


diff --git a/backends/platform/sdl/kolibrios/wrapper-main.c b/backends/platform/sdl/kolibrios/wrapper-main.c
index ac5d05e96c3..fab501d1701 100644
--- a/backends/platform/sdl/kolibrios/wrapper-main.c
+++ b/backends/platform/sdl/kolibrios/wrapper-main.c
@@ -19,8 +19,11 @@
  *
  */
 
-#include <kos32sys.h>
 #include <stdio.h>
+#include <string.h>
+
+void* get_proc_address(void *handle, const char *proc_name);
+void* load_library(const char *name);
 
 /* This is just a small wrapper so that the main scummvm is loaded as dll.  */
 int kolibrios_main(int argc, char *argv[]);
diff --git a/backends/plugins/kolibrios/kolibrios-provider.cpp b/backends/plugins/kolibrios/kolibrios-provider.cpp
index 0327273a948..897da4e967a 100644
--- a/backends/plugins/kolibrios/kolibrios-provider.cpp
+++ b/backends/plugins/kolibrios/kolibrios-provider.cpp
@@ -30,9 +30,13 @@
 
 #include "common/debug.h"
 
-#include <kos32sys.h>
 #include <errno.h>
 
+extern "C" {
+void* get_proc_address(void *handle, const char *proc_name);
+void* load_library(const char *name);
+}
+
 class KolibriOSPlugin final : public DynamicPlugin {
 protected:
 	void *_dlHandle;


Commit: 845dbd9ba637b6842b2245646fdfe98dedc450a9
    https://github.com/scummvm/scummvm/commit/845dbd9ba637b6842b2245646fdfe98dedc450a9
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:51:30+01:00

Commit Message:
KOLIBRI: build-kolibri: Use a more common path to SDK

~/sdk is a pretty unusual path for kolibri SDK. Use a bit more natural
paths resulting from manual checkout.

Changed paths:
    backends/platform/sdl/kolibrios/build-kolibri.sh


diff --git a/backends/platform/sdl/kolibrios/build-kolibri.sh b/backends/platform/sdl/kolibrios/build-kolibri.sh
index 1a2228d5fe4..4dbb68f8af4 100755
--- a/backends/platform/sdl/kolibrios/build-kolibri.sh
+++ b/backends/platform/sdl/kolibrios/build-kolibri.sh
@@ -2,7 +2,7 @@
 
 set -e
 
-export KOS32_SDK_DIR=$HOME/sdk
+export KOS32_SDK_DIR=$HOME/kolibrios/contrib/sdk
 export KOS32_AUTOBUILD=$HOME/autobuild
 
 # Use plugins for both engines and detection as KolibriOS has a limit per executable module


Commit: 850cd4b2f563cc16a60d9ec2c856954c8fe47c3c
    https://github.com/scummvm/scummvm/commit/850cd4b2f563cc16a60d9ec2c856954c8fe47c3c
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:51:30+01:00

Commit Message:
KOLIBRI: build-kolibri: Temporarily disable ags engine as it fails to compile

Changed paths:
    backends/platform/sdl/kolibrios/build-kolibri.sh


diff --git a/backends/platform/sdl/kolibrios/build-kolibri.sh b/backends/platform/sdl/kolibrios/build-kolibri.sh
index 4dbb68f8af4..bba0265e7b1 100755
--- a/backends/platform/sdl/kolibrios/build-kolibri.sh
+++ b/backends/platform/sdl/kolibrios/build-kolibri.sh
@@ -6,6 +6,6 @@ export KOS32_SDK_DIR=$HOME/kolibrios/contrib/sdk
 export KOS32_AUTOBUILD=$HOME/autobuild
 
 # Use plugins for both engines and detection as KolibriOS has a limit per executable module
-./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --enable-engine=testbed
+./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --enable-engine=testbed --disable-engine=ags
 
 make -j5 all zip-root scummvm-zip


Commit: 8f22e41ec834dbc74672925c95e2d31ad14e96a7
    https://github.com/scummvm/scummvm/commit/8f22e41ec834dbc74672925c95e2d31ad14e96a7
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:51:30+01:00

Commit Message:
CONFIGURE: Handle kolibrios that merges vorbisfile and vorbis

Kolibri doesn't have a separate -lvorbisfile

Changed paths:
    configure


diff --git a/configure b/configure
index e8ae1c17384..480916a2706 100755
--- a/configure
+++ b/configure
@@ -5137,6 +5137,10 @@ echo "$_tts"
 # Check for Vorbis
 #
 echocheck "Vorbis"
+VORBISFILE=-lvorbisfile
+if test "$_host_os" = kolibrios ; then
+    VORBISFILE=
+fi
 if test "$_vorbis" = auto ; then
 	_vorbis=no
 	cat > $TMPC << EOF
@@ -5145,14 +5149,14 @@ int main(void) { vorbis_packet_blocksize(0,0); return 0; }
 EOF
 	if test "$_ogg" = yes ; then
 		cc_check $OGG_CFLAGS $OGG_LIBS $VORBIS_CFLAGS $VORBIS_LIBS \
-			-lvorbisfile -lvorbis -logg && _vorbis=yes
+			$VORBISFILE -lvorbis -logg && _vorbis=yes
 	else
 		cc_check $VORBIS_CFLAGS $VORBIS_LIBS \
-			-lvorbisfile -lvorbis && _vorbis=yes
+			$VORBISFILE -lvorbis && _vorbis=yes
 	fi
 fi
 if test "$_vorbis" = yes ; then
-	append_var LIBS "$VORBIS_LIBS -lvorbisfile -lvorbis"
+	append_var LIBS "$VORBIS_LIBS $VORBISFILE -lvorbis"
 	append_var INCLUDES "$VORBIS_CFLAGS"
 fi
 define_in_config_if_yes "$_vorbis" 'USE_VORBIS'


Commit: 1472a17918e8133dca1990401af4027cb00d6f2a
    https://github.com/scummvm/scummvm/commit/1472a17918e8133dca1990401af4027cb00d6f2a
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:51:30+01:00

Commit Message:
KOLIBRI: Add explicit paths for ogg and vorbis

Auto-detect fails which is kinda expected with such weird paths

Changed paths:
    backends/platform/sdl/kolibrios/build-kolibri.sh


diff --git a/backends/platform/sdl/kolibrios/build-kolibri.sh b/backends/platform/sdl/kolibrios/build-kolibri.sh
index bba0265e7b1..a6ac3b5b881 100755
--- a/backends/platform/sdl/kolibrios/build-kolibri.sh
+++ b/backends/platform/sdl/kolibrios/build-kolibri.sh
@@ -6,6 +6,6 @@ export KOS32_SDK_DIR=$HOME/kolibrios/contrib/sdk
 export KOS32_AUTOBUILD=$HOME/autobuild
 
 # Use plugins for both engines and detection as KolibriOS has a limit per executable module
-./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --enable-engine=testbed --disable-engine=ags
+./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --with-vorbis-prefix=$KOS32_SDK_DIR/sources/libvorbis-1.3.7  --with-ogg-prefix=$KOS32_SDK_DIR/sources/libogg-1.3.5 --enable-engine=testbed --disable-engine=ags
 
 make -j5 all zip-root scummvm-zip




More information about the Scummvm-git-logs mailing list