name: PSP
path: PicoDrive_psp_*.zip
+ build-ps2:
+ runs-on: ubuntu-latest
+ container: ps2dev/ps2dev
+ steps:
+ - name: build environment
+ run: |
+ apk add build-base cmake git zip make
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: build
+ run: |
+ export CROSS_COMPILE=mips64r5900el-ps2-elf-
+ git config --global --add safe.directory $PWD
+ ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
+ ./configure --platform=ps2
+ make -j2
+ make -C platform/ps2 rel VER=$ver
+ - name: artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: PS2
+ path: PicoDrive_ps2_*.zip
+
build-dingux:
runs-on: ubuntu-latest
# "" means "autodetect".
# TODO this is annoyingly messy. should have platform and device
-platform_list="generic pandora gph dingux retrofw opendingux[-gcw0] odbeta[-gcw0] miyoo rpi1 rpi2 psp"
+platform_list="generic pandora gph dingux retrofw opendingux[-gcw0] odbeta[-gcw0] miyoo rpi1 rpi2 ps2 psp"
platform="generic"
sound_driver_list="oss alsa sdl"
sound_drivers=""
CXX="${CXX-${CROSS_COMPILE}g++}"
AS="${AS-${CROSS_COMPILE}as}"
STRIP="${STRIP-${CROSS_COMPILE}strip}"
+LD="${LD-${CROSS_COMPILE}gcc}" # Use better gcc for linking
SYSROOT=`$CC $CFLAGS $LDFLAGS --print-sysroot 2> /dev/null || true`
config_mak="config.mak"
MFLAGS="-march=allegrex"
ARCH=mipsel
;;
+ ps2)
+ # use newlib
+ SYSLIBS=""
+ MFLAGS=""
+ ARCH=mips64r5900el
+ ASFLAGS="$ASFLAGS -G0 -call_shared"
+ CFLAGS="$CFLAGS -D_EE -G0 -I${PS2SDK}/ee/include -I${PS2SDK}/common/include -I${PS2SDK}/ports/include"
+ LDFLAGS="$LDFLAGS -Wl,-zmax-page-size=128 -T${PS2SDK}/ee/startup/linkfile -L${PS2SDK}/ee/lib -L${PS2SDK}/ports/lib"
+ ;;
*)
fail "unsupported platform: $platform"
;;
echo "CXX = $CXX" >> $config_mak
echo "AS = $AS" >> $config_mak
echo "STRIP = $STRIP" >> $config_mak
+echo "LD = $LD" >> $config_mak
echo "CFLAGS += $MFLAGS $CFLAGS" >> $config_mak
echo "ASFLAGS += $MFLAGS $ASFLAGS" >> $config_mak
echo "LDFLAGS += $LDFLAGS" >> $config_mak
--- /dev/null
+\r
+# ----------- release -----------\r
+ifneq ($(findstring rel,$(MAKECMDGOALS)),)\r
+ifeq ($(VER),)\r
+$(error need VER)\r
+endif\r
+endif\r
+\r
+../../tools/textfilter: ../../tools/textfilter.c\r
+ make -C ../../tools/ textfilter\r
+\r
+readme.txt: ../../tools/textfilter ../base_readme.txt ../../ChangeLog\r
+ ../../tools/textfilter ../base_readme.txt $@ PS2\r
+\r
+# ?\r
+rel: ../../PicoDrive readme.txt ../game_def.cfg\r
+ mkdir -p PicoDrive/skin/\r
+ cp $^ PicoDrive/\r
+ cp ../../skin/* PicoDrive/skin/\r
+ zip -9 -r ../../PicoDrive_ps2_$(VER).zip PicoDrive\r
+ rm -rf PicoDrive\r
+ mkdir bin_to_cso_mp3\r
+ cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/\r
+ zip -9 -r ../../PicoDrive_ps2_$(VER).zip bin_to_cso_mp3\r
+ rm -rf bin_to_cso_mp3\r
+\r
+\r
--- /dev/null
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "../libpicofe/plat.h"
+
+const char *renderer_names[] = { "Software", "Hardware" };
+const char *renderer_names32x[] = { "Software", "Hardware", "Hardware (fast)" };
+
+struct plat_target plat_target = {};
+
+int plat_parse_arg(int argc, char *argv[], int *x) { return 1; }
+
+void plat_early_init(void) {}
+
+int plat_target_init(void) { return 0; }
+
+void plat_init(void) {}
+
+void plat_video_menu_enter(int is_rom_loaded) {}
+
+void plat_video_menu_leave(void) {}
+
+void plat_finish(void) {}
+
+void plat_target_finish(void) {}
+
+void plat_video_menu_begin(void) {}
+
+void plat_video_menu_end(void) {}
+
+int plat_get_root_dir(char *dst, int len) { return 0; }
+
+
+unsigned int plat_get_ticks_ms(void) { return 0; }
+
+unsigned int plat_get_ticks_us(void) { return 0; }
+
+void plat_sleep_ms(int ms) {}
+
+void plat_video_toggle_renderer(int change, int menu_call) {}
+
+void plat_update_volume(int has_changed, int is_up) {}
+
+int plat_is_dir(const char *path) { return 0; }
+
+void plat_status_msg_busy_first(const char *msg) {}
+
+void pemu_prep_defconfig(void) {}
+
+void pemu_validate_config(void) {}
+
+void plat_status_msg_clear(void) {}
+
+void plat_status_msg_busy_next(const char *msg) {}
+
+void plat_video_loop_prepare(void) {}
+
+int plat_get_data_dir(char *dst, int len) { return 0; }
+
+void plat_video_flip(void) {}
+
+void plat_video_wait_vsync(void) {}
+
+void plat_wait_till_us(unsigned int us) {}
+
+int plat_get_skin_dir(char *dst, int len) { return 0; }
+
+void plat_debug_cat(char *str) {}
+
+int plat_wait_event(int *fds_hnds, int count, int timeout_ms) { return 0; }
+
+void pemu_loop_prep(void) {}
+
+void pemu_sound_start(void) {}
+
+void pemu_loop_end(void) {}
+
+void *plat_mem_get_for_drc(size_t size) { return NULL; }
+
+void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed) { return NULL; }
+
+void *plat_mremap(void *ptr, size_t oldsize, size_t newsize) { return NULL; }
+
+void plat_munmap(void *ptr, size_t size) {}
+
+int plat_mem_set_exec(void *ptr, size_t size) { return 0; }
+
+void emu_video_mode_change(int start_line, int line_count, int start_col, int col_count) {}
+
+void pemu_forced_frame(int no_scale, int do_emu) {}
+
+void pemu_finalize_frame(const char *fps, const char *notice_msg) {}
+
+int _flush_cache (char *addr, const int size, const int op) { return 0; }
+
+/* lprintf */
+void lprintf(const char *fmt, ...)
+{
+ va_list vl;
+
+ va_start(vl, fmt);
+#if defined(LOG_TO_FILE)
+ vfprintf(logFile, fmt, vl);
+#else
+ vprintf(fmt, vl);
+#endif
+ va_end(vl);
+}
\ No newline at end of file