From dbfbc333f4a664f425719e8063ea97c7bcab7047 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Sat, 16 Nov 2019 22:06:46 +0100 Subject: [PATCH] fps2bios: Remove fps2bios from master branch. It's an abandoned project pretty much, if someone needs to go back and take a look at it we have 1.4 branches and older. --- debian-packager/create_built_tarball.sh | 2 - linux_various/check_format.sh | 3 +- unfree/fps2bios/.gitignore | 5 - unfree/fps2bios/FP2BLOGO | Bin 256016 -> 0 bytes unfree/fps2bios/IOPBTCONF | 27 - unfree/fps2bios/Makefile | 44 - unfree/fps2bios/README.md | 5 - unfree/fps2bios/doc/overview.md | 199 - unfree/fps2bios/fps2blogo.bmp | Bin 192054 -> 0 bytes unfree/fps2bios/intro/Makefile | 23 - unfree/fps2bios/intro/crt0.s | 111 - unfree/fps2bios/intro/eedebug.c | 31 - unfree/fps2bios/intro/include/eedebug.h | 12 - unfree/fps2bios/intro/include/romdir.h | 20 - unfree/fps2bios/intro/intro.c | 19 - unfree/fps2bios/intro/linkfile | 52 - unfree/fps2bios/intro/romdir.c | 43 - unfree/fps2bios/kernel/Makefile | 39 - unfree/fps2bios/kernel/eeload/Makefile | 27 - unfree/fps2bios/kernel/eeload/eedata.c | 198 - unfree/fps2bios/kernel/eeload/eedebug.c | 31 - unfree/fps2bios/kernel/eeload/eeelf.c | 423 -- unfree/fps2bios/kernel/eeload/eeinit.c | 511 --- unfree/fps2bios/kernel/eeload/eeirq.c | 336 -- unfree/fps2bios/kernel/eeload/eekernel.c | 3619 ----------------- unfree/fps2bios/kernel/eeload/eeload.c | 34 - unfree/fps2bios/kernel/eeload/eeload.map | 1039 ----- .../fps2bios/kernel/eeload/include/eedebug.h | 12 - unfree/fps2bios/kernel/eeload/include/eeelf.h | 6 - .../fps2bios/kernel/eeload/include/eeinit.h | 8 - unfree/fps2bios/kernel/eeload/include/eeirq.h | 17 - .../fps2bios/kernel/eeload/include/eekernel.h | 447 -- .../fps2bios/kernel/eeload/include/eeload.h | 4 - .../fps2bios/kernel/eeload/include/romdir.h | 20 - unfree/fps2bios/kernel/eeload/linkfile | 56 - unfree/fps2bios/kernel/eeload/romdir.c | 47 - unfree/fps2bios/kernel/eestart.c | 50 - unfree/fps2bios/kernel/iopload/Makefile | 18 - .../fps2bios/kernel/iopload/dmacman/Makefile | 19 - .../fps2bios/kernel/iopload/dmacman/dmacman.c | 923 ----- .../fps2bios/kernel/iopload/excepman/Makefile | 19 - .../kernel/iopload/excepman/ex_handler.s | 16 - .../kernel/iopload/excepman/excepman.c | 339 -- .../fps2bios/kernel/iopload/heaplib/Makefile | 19 - .../fps2bios/kernel/iopload/heaplib/heaplib.c | 206 - unfree/fps2bios/kernel/iopload/include/err.h | 30 - .../fps2bios/kernel/iopload/include/errno.h | 143 - .../kernel/iopload/include/iopdebug.h | 11 - .../fps2bios/kernel/iopload/include/iopelf.h | 226 - .../fps2bios/kernel/iopload/include/iopload.h | 18 - .../kernel/iopload/include/kdmacman.h | 116 - .../kernel/iopload/include/kexcepman.h | 23 - .../kernel/iopload/include/kheaplib.h | 30 - .../kernel/iopload/include/kintrman.h | 38 - .../fps2bios/kernel/iopload/include/kioman.h | 56 - .../kernel/iopload/include/kloadcore.h | 89 - .../fps2bios/kernel/iopload/include/ksifcmd.h | 162 - .../fps2bios/kernel/iopload/include/ksifman.h | 57 - .../fps2bios/kernel/iopload/include/kstdio.h | 21 - .../kernel/iopload/include/ksysclib.h | 46 - .../fps2bios/kernel/iopload/include/ksysmem.h | 27 - .../fps2bios/kernel/iopload/include/kthbase.h | 19 - .../kernel/iopload/include/kthsemap.h | 17 - .../kernel/iopload/include/ktimrman.h | 48 - .../fps2bios/kernel/iopload/include/romdir.h | 115 - .../fps2bios/kernel/iopload/intrman/Makefile | 19 - .../kernel/iopload/intrman/int_handler.s | 373 -- .../fps2bios/kernel/iopload/intrman/intrman.c | 705 ---- .../fps2bios/kernel/iopload/iopboot/Makefile | 20 - .../fps2bios/kernel/iopload/iopboot/iopboot.c | 252 -- .../fps2bios/kernel/iopload/iopboot/iopirq.c | 17 - .../fps2bios/kernel/iopload/iopboot/linkfile | 16 - unfree/fps2bios/kernel/iopload/iopdebug.c | 279 -- unfree/fps2bios/kernel/iopload/iopelf.c | 428 -- .../kernel/iopload/libkernel/iop_cdvdman.s | 146 - .../kernel/iopload/libkernel/iop_dmacman.s | 52 - .../kernel/iopload/libkernel/iop_excepman.s | 58 - .../kernel/iopload/libkernel/iop_heaplib.s | 51 - .../kernel/iopload/libkernel/iop_intrman.s | 73 - .../kernel/iopload/libkernel/iop_ioman.s | 116 - .../kernel/iopload/libkernel/iop_libsd.s | 160 - .../kernel/iopload/libkernel/iop_loadcore.s | 65 - .../kernel/iopload/libkernel/iop_modload.s | 61 - .../kernel/iopload/libkernel/iop_sifcmd.s | 144 - .../kernel/iopload/libkernel/iop_sifman.s | 178 - .../kernel/iopload/libkernel/iop_stdio.s | 32 - .../kernel/iopload/libkernel/iop_sysclib.s | 219 - .../kernel/iopload/libkernel/iop_sysmem.s | 71 - .../kernel/iopload/libkernel/iop_thbase.s | 167 - .../kernel/iopload/libkernel/iop_thevent.s | 67 - .../kernel/iopload/libkernel/iop_thsemap.s | 68 - .../kernel/iopload/libkernel/iop_usbd.s | 113 - .../kernel/iopload/libkernel/iop_vblank.s | 53 - .../fps2bios/kernel/iopload/loadcore/Makefile | 19 - .../kernel/iopload/loadcore/loadcore.c | 1044 ----- unfree/fps2bios/kernel/iopload/romdir.c | 106 - .../fps2bios/kernel/iopload/sifcmd/Makefile | 19 - .../fps2bios/kernel/iopload/sifcmd/sifcmd.c | 798 ---- .../fps2bios/kernel/iopload/sifman/Makefile | 19 - .../fps2bios/kernel/iopload/sifman/sifman.c | 467 --- .../fps2bios/kernel/iopload/sio2man/Makefile | 19 - .../fps2bios/kernel/iopload/sio2man/sio2man.c | 508 --- .../fps2bios/kernel/iopload/ssbusc/Makefile | 19 - .../fps2bios/kernel/iopload/ssbusc/ssbusc.c | 178 - unfree/fps2bios/kernel/iopload/stdio/Makefile | 19 - unfree/fps2bios/kernel/iopload/stdio/stdio.c | 40 - .../fps2bios/kernel/iopload/sysclib/Makefile | 19 - .../fps2bios/kernel/iopload/sysclib/sysclib.c | 583 --- .../fps2bios/kernel/iopload/sysmem/Makefile | 19 - .../fps2bios/kernel/iopload/sysmem/sysmem.c | 529 --- .../kernel/iopload/threadman/Makefile | 19 - .../kernel/iopload/threadman/threadman.c | 654 --- .../fps2bios/kernel/iopload/timrman/Makefile | 19 - .../fps2bios/kernel/iopload/timrman/timrman.c | 234 -- .../fps2bios/kernel/iopload/vblank/Makefile | 19 - .../fps2bios/kernel/iopload/vblank/vblank.c | 300 -- unfree/fps2bios/kernel/iopstart.c | 66 - unfree/fps2bios/kernel/linkfile | 53 - unfree/fps2bios/kernel/romdir.c | 43 - unfree/fps2bios/kernel/romdir.h | 20 - unfree/fps2bios/kernel/start.c | 30 - unfree/fps2bios/loader/Makefile | 23 - unfree/fps2bios/loader/crt0.s | 110 - unfree/fps2bios/loader/eedebug.c | 31 - unfree/fps2bios/loader/include/eedebug.h | 12 - unfree/fps2bios/loader/include/menu.h | 8 - unfree/fps2bios/loader/include/romdir.h | 20 - unfree/fps2bios/loader/linkfile | 52 - unfree/fps2bios/loader/loader.c | 14 - unfree/fps2bios/loader/menu.c | 20 - unfree/fps2bios/loader/romdir.c | 47 - unfree/fps2bios/ps2romgen.c | 80 - unfree/fps2bios/romdir.c | 84 - unfree/fps2bios/romver.c | 37 - unfree/readme | 15 - 135 files changed, 1 insertion(+), 20788 deletions(-) delete mode 100644 unfree/fps2bios/.gitignore delete mode 100644 unfree/fps2bios/FP2BLOGO delete mode 100644 unfree/fps2bios/IOPBTCONF delete mode 100644 unfree/fps2bios/Makefile delete mode 100644 unfree/fps2bios/README.md delete mode 100644 unfree/fps2bios/doc/overview.md delete mode 100644 unfree/fps2bios/fps2blogo.bmp delete mode 100644 unfree/fps2bios/intro/Makefile delete mode 100644 unfree/fps2bios/intro/crt0.s delete mode 100644 unfree/fps2bios/intro/eedebug.c delete mode 100644 unfree/fps2bios/intro/include/eedebug.h delete mode 100644 unfree/fps2bios/intro/include/romdir.h delete mode 100644 unfree/fps2bios/intro/intro.c delete mode 100644 unfree/fps2bios/intro/linkfile delete mode 100644 unfree/fps2bios/intro/romdir.c delete mode 100644 unfree/fps2bios/kernel/Makefile delete mode 100644 unfree/fps2bios/kernel/eeload/Makefile delete mode 100644 unfree/fps2bios/kernel/eeload/eedata.c delete mode 100644 unfree/fps2bios/kernel/eeload/eedebug.c delete mode 100644 unfree/fps2bios/kernel/eeload/eeelf.c delete mode 100644 unfree/fps2bios/kernel/eeload/eeinit.c delete mode 100644 unfree/fps2bios/kernel/eeload/eeirq.c delete mode 100644 unfree/fps2bios/kernel/eeload/eekernel.c delete mode 100644 unfree/fps2bios/kernel/eeload/eeload.c delete mode 100644 unfree/fps2bios/kernel/eeload/eeload.map delete mode 100644 unfree/fps2bios/kernel/eeload/include/eedebug.h delete mode 100644 unfree/fps2bios/kernel/eeload/include/eeelf.h delete mode 100644 unfree/fps2bios/kernel/eeload/include/eeinit.h delete mode 100644 unfree/fps2bios/kernel/eeload/include/eeirq.h delete mode 100644 unfree/fps2bios/kernel/eeload/include/eekernel.h delete mode 100644 unfree/fps2bios/kernel/eeload/include/eeload.h delete mode 100644 unfree/fps2bios/kernel/eeload/include/romdir.h delete mode 100644 unfree/fps2bios/kernel/eeload/linkfile delete mode 100644 unfree/fps2bios/kernel/eeload/romdir.c delete mode 100644 unfree/fps2bios/kernel/eestart.c delete mode 100644 unfree/fps2bios/kernel/iopload/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/dmacman/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/dmacman/dmacman.c delete mode 100644 unfree/fps2bios/kernel/iopload/excepman/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/excepman/ex_handler.s delete mode 100644 unfree/fps2bios/kernel/iopload/excepman/excepman.c delete mode 100644 unfree/fps2bios/kernel/iopload/heaplib/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/heaplib/heaplib.c delete mode 100644 unfree/fps2bios/kernel/iopload/include/err.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/errno.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/iopdebug.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/iopelf.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/iopload.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kdmacman.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kexcepman.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kheaplib.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kintrman.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kioman.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kloadcore.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/ksifcmd.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/ksifman.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kstdio.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/ksysclib.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/ksysmem.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kthbase.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/kthsemap.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/ktimrman.h delete mode 100644 unfree/fps2bios/kernel/iopload/include/romdir.h delete mode 100644 unfree/fps2bios/kernel/iopload/intrman/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/intrman/int_handler.s delete mode 100644 unfree/fps2bios/kernel/iopload/intrman/intrman.c delete mode 100644 unfree/fps2bios/kernel/iopload/iopboot/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/iopboot/iopboot.c delete mode 100644 unfree/fps2bios/kernel/iopload/iopboot/iopirq.c delete mode 100644 unfree/fps2bios/kernel/iopload/iopboot/linkfile delete mode 100644 unfree/fps2bios/kernel/iopload/iopdebug.c delete mode 100644 unfree/fps2bios/kernel/iopload/iopelf.c delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_cdvdman.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_dmacman.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_excepman.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_heaplib.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_intrman.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_ioman.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_libsd.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_loadcore.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_modload.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_sifcmd.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_sifman.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_stdio.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_sysclib.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_sysmem.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_thbase.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_thevent.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_thsemap.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_usbd.s delete mode 100644 unfree/fps2bios/kernel/iopload/libkernel/iop_vblank.s delete mode 100644 unfree/fps2bios/kernel/iopload/loadcore/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/loadcore/loadcore.c delete mode 100644 unfree/fps2bios/kernel/iopload/romdir.c delete mode 100644 unfree/fps2bios/kernel/iopload/sifcmd/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/sifcmd/sifcmd.c delete mode 100644 unfree/fps2bios/kernel/iopload/sifman/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/sifman/sifman.c delete mode 100644 unfree/fps2bios/kernel/iopload/sio2man/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/sio2man/sio2man.c delete mode 100644 unfree/fps2bios/kernel/iopload/ssbusc/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/ssbusc/ssbusc.c delete mode 100644 unfree/fps2bios/kernel/iopload/stdio/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/stdio/stdio.c delete mode 100644 unfree/fps2bios/kernel/iopload/sysclib/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/sysclib/sysclib.c delete mode 100644 unfree/fps2bios/kernel/iopload/sysmem/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/sysmem/sysmem.c delete mode 100644 unfree/fps2bios/kernel/iopload/threadman/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/threadman/threadman.c delete mode 100644 unfree/fps2bios/kernel/iopload/timrman/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/timrman/timrman.c delete mode 100644 unfree/fps2bios/kernel/iopload/vblank/Makefile delete mode 100644 unfree/fps2bios/kernel/iopload/vblank/vblank.c delete mode 100644 unfree/fps2bios/kernel/iopstart.c delete mode 100644 unfree/fps2bios/kernel/linkfile delete mode 100644 unfree/fps2bios/kernel/romdir.c delete mode 100644 unfree/fps2bios/kernel/romdir.h delete mode 100644 unfree/fps2bios/kernel/start.c delete mode 100644 unfree/fps2bios/loader/Makefile delete mode 100644 unfree/fps2bios/loader/crt0.s delete mode 100644 unfree/fps2bios/loader/eedebug.c delete mode 100644 unfree/fps2bios/loader/include/eedebug.h delete mode 100644 unfree/fps2bios/loader/include/menu.h delete mode 100644 unfree/fps2bios/loader/include/romdir.h delete mode 100644 unfree/fps2bios/loader/linkfile delete mode 100644 unfree/fps2bios/loader/loader.c delete mode 100644 unfree/fps2bios/loader/menu.c delete mode 100644 unfree/fps2bios/loader/romdir.c delete mode 100644 unfree/fps2bios/ps2romgen.c delete mode 100644 unfree/fps2bios/romdir.c delete mode 100644 unfree/fps2bios/romver.c delete mode 100644 unfree/readme diff --git a/debian-packager/create_built_tarball.sh b/debian-packager/create_built_tarball.sh index 4a7ff61f3..7bb3c23a0 100644 --- a/debian-packager/create_built_tarball.sh +++ b/debian-packager/create_built_tarball.sh @@ -83,7 +83,6 @@ remove_3rdparty() { echo "Remove 3rdparty code" rm -fr $LOCAL_REPO/3rdparty - rm -fr $LOCAL_REPO/fps2bios rm -fr $LOCAL_REPO/tools } @@ -100,7 +99,6 @@ remove_not_yet_free_plugin() remove_remaining_non_free_file() { echo "Remove remaining non free file. TODO UPSTREAM" - rm -fr $LOCAL_REPO/unfree rm -fr $LOCAL_REPO/plugins/GSdx/baseclasses rm -f $LOCAL_REPO/plugins/zzogl-pg/opengl/Win32/aviUtil.h rm -f $LOCAL_REPO/common/src/Utilities/x86/MemcpyFast.cpp diff --git a/linux_various/check_format.sh b/linux_various/check_format.sh index a395e0c29..a3d1612ef 100755 --- a/linux_various/check_format.sh +++ b/linux_various/check_format.sh @@ -59,8 +59,7 @@ files=`git diff --name-only --diff-filter=ACMRT $diff_range -- $PWD | \ grep -v "bin/" | \ grep -v "cmake/" | \ grep -v "tools/" | \ - grep -v "tests/" | \ - grep -v "unfree/" + grep -v "tests/" ` # Check remaining files are clang-format compliant diff --git a/unfree/fps2bios/.gitignore b/unfree/fps2bios/.gitignore deleted file mode 100644 index a90613f09..000000000 --- a/unfree/fps2bios/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.o -EXTINFO -ROMDIR -build -*.map \ No newline at end of file diff --git a/unfree/fps2bios/FP2BLOGO b/unfree/fps2bios/FP2BLOGO deleted file mode 100644 index dd4a347599762fcd3f885e4be97c2891faab097c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256016 zcmb5XNs}zsnI-l`W(*k_k@KASa-QCV2Rs1pVFm#L1Od)-vB)BeL$OF!6{}k6E>o+` zq&6*NZPuG!Xd}}`TJ}mCt+dlhrk|yA&i&4f8=eVPw*xo6>3pBx@N_@#x?gvXFTVKf z`A5Bo|1Z422s8No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Zp}|7j+Y^^BZtri50Hu1r6)$c} zumF`4vzN>T3V2=&?*7|UzVxN>B$eMjV#eA=<(fY9Y*X?XoAJ@*i0`1BZZqw{^_n2b zs3>kPHM1NDuVt@>z%0V;Lhf`Z_90tY1JANeDIOx68M@caTT}XT_F=$lE|Kj|k`RV% z6<+xw0g^j8VnanY$HpNZvlnv6U`@XEJx4LO_-o)A+fWl$yiF;sCj?-CQBO$$!Q4)a zNI)%ZN@*P&V*qnM&A34U_R`os$Btm0J|eBy*yaHmaIzTO;4=317TEa@ncA_5$3KCg Sd;e5CaQ2re`WVz=E&m@udT3(+ diff --git a/unfree/fps2bios/IOPBTCONF b/unfree/fps2bios/IOPBTCONF deleted file mode 100644 index c904b11b0..000000000 --- a/unfree/fps2bios/IOPBTCONF +++ /dev/null @@ -1,27 +0,0 @@ -@800 -SYSMEM -LOADCORE -EXCEPMAN -INTRMAN -SSBUSC -DMACMAN -TIMRMAN -SYSCLIB -HEAPLIB -THREADMAN -VBLANK -IOMAN -MODLOAD -ROMDRV -STDIO -SIFMAN -IGREETING -SIFCMD -REBOOT -LOADFILE -CDVDMAN -CDVDFSV -SIFINIT -FILEIO -SECRMAN -EESYNC diff --git a/unfree/fps2bios/Makefile b/unfree/fps2bios/Makefile deleted file mode 100644 index 174d48e6f..000000000 --- a/unfree/fps2bios/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -VERSION = 0 -BUILD = 1 - -CC = gcc - -CFLAGS = -Wall -O2 -I. -DIRS = kernel intro loader -FILES = RESET ROMDIR ROMVER IOPBOOT EELOAD \ - SYSMEM LOADCORE EXCEPMAN INTRMAN SSBUSC DMACMAN \ - TIMRMAN SYSCLIB HEAPLIB THREADMAN VBLANK STDIO \ - SIFMAN SIFCMD SIO2MAN LOADER INTRO IOPBTCONF FP2BLOGO - -.PHONY: clean - -build/fps2bios: build/ps2romgen_exe build/romdir_exe build/romver_exe | build - for i in $(DIRS); do \ - make -C $$i; \ - done; - cp -f FP2BLOGO build - cp -f IOPBTCONF build - (cd build; \ - ./romver_exe $(VERSION) $(BUILD); \ - ./romdir_exe $(FILES); \ - ./ps2romgen_exe fps2bios; \ - cd ..) - -build/ps2romgen_exe: ps2romgen.c | build - $(CC) $(CFLAGS) $< -o $@ - -build/romdir_exe: romdir.c | build - $(CC) $(CFLAGS) $< -o $@ - -build/romver_exe: romver.c | build - $(CC) $(CFLAGS) $< -o $@ - -build: - mkdir -p $@ - -clean: - rm -f -r *.o build - for i in $(DIRS); do \ - make -C $$i clean; \ - done; diff --git a/unfree/fps2bios/README.md b/unfree/fps2bios/README.md deleted file mode 100644 index e3c96be92..000000000 --- a/unfree/fps2bios/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Free PS2 BIOS (fps2bios) - -An open source (but "unfree" because of no licenses) and incomplete implementation of the PS2's boot ROM. -Requires latest PS2 toolchain from https://github.com/ps2dev/ps2toolchain -This, currently, does not work as a full replacement for the PS2's boot ROM. diff --git a/unfree/fps2bios/doc/overview.md b/unfree/fps2bios/doc/overview.md deleted file mode 100644 index e9cb81816..000000000 --- a/unfree/fps2bios/doc/overview.md +++ /dev/null @@ -1,199 +0,0 @@ -This is a collection of notes which should help anyone looking at the PS2 BIOS. The goal is to fully document the public interface so that a free (GPL) replacement BIOS can be developed for use in emulators such as PCSX2. Where source code examples are given, these refer to the fps2bios source code and not to any original Sony code. The information contained in here has been collected from a number of sources but the main sources are the PCSX2 source code which documents the machine hardware and the open source ps2sdk found at ps2dev.org. - -The PS2 BIOS is a collection of files packed into a single file. A file called ROMDIR contains the name and size of each file in the archive. The first file in the archive is called RESET and contains a minimal boot program. The ROMDIR structure is found by looking for the character sequence RESET from the start of the BIOS - -# The boot process - -The BIOS file is initialized to the memory address 0xBFC00000. The program counter is set to this address and execution started. This is true for both the EE and IOP and so the first few lines of code need to figure out which CPU is currently executing and branch to the relevant initialization code. This code is contained in kernel/start.c. The files kernel/eestart.c and kernel/iopstart.c contain the boot code for the EE and IOP respectively - -# The IOP boot process - -The IOP boot code is stored in kernel/iopstart.c. This locates the file IOPLOAD in the BIOS image and loads it to the memory address 0x80000000. It then executes the code at 0x80001000. The directory kernel/iopload contains all of the IOP releated BIOS code. Note the linkfile in this directory – this is required to enforce the magic numbers described above. It makes sure that the iopirq.o object is linked at the address 0x80000000 and that iopload is linked starting at 0x80001000. - -The boot code found at 0x80001000 is _start() located in iopload.c. This loads the SYSMEM file from the BIOS image and executes its defined entry point. The LOADCORE file is then loaded and its entry point executed. When the LOADCORE entry point returns, the IOP enters an endless loop waiting for an exception. - -# IRX linking - -The LOADCORE module is responsible mainly for managing the dynamic link relationship between IRX modules. An IRX module is a dynamically linked module – it both exports and imports functions in addition to having an execution entry point. IRX dynamic linking is ordinal based rather than symbolic and, as the public interface is defined by the function export table, this makes figuring it out quite complex. Fortunately, some games have been distributed with debugging symbols and thus this allows us to associate symbolic names with the export ordinals. - -The IRX export table is defined as follows: - -``` -struct irx_export_table { - u32 magic; - struct irx_export_table *next; - u16 version; - u16 mode; - u8 name[8]; - void *fptrs[0]; -}; -``` - -Where magic is `0x41c00000` and fptrs is a list of exported functions terminated by a NULL entry. - -The IRX import table definition is very similar. - -``` -struct irx_import_table -{ - u32 magic; - struct irx_import_table *next; - u16 version; - u16 mode; - char name[8]; - void *stubs[0]; -} -``` - -The magic number for the import table is `0x41e00000` and in the same manner as the export table, the stubs list is NULL terminated. An IRX will contain an import table for each module (IRX) that it needs to link with. - -To give a concrete example, an IRX that wants to import the `GetLibraryEntryTable` function from the LOADCORE module, could define the import table as follows: - -``` -loadcore_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "loadcore" - .align 2 - - .globl GetLibraryEntryTable # 0x03 -GetLibraryEntryTable: - j $31 - li $0, 3 - -.word 0 - .word 0 -``` - -The label `GetLibraryEntryTable` does not define the linkage itself – this is done by the number (or ordinal) 3. The `li $0, 3` instruction defines that this entry should be linked to the 3rd function exported by the loadcore export table. The function of the LOADCORE module is to resolve the import stub functions with the export tables from the other IRX modules that have been previously registered. It does this by modifying the import table and changing the `j $31` to a `j imm` instruction where imm is the relative address of the exported function. - -The LOADCORE code that actually does the linking is in `fix_imports()` and is shown below: - -``` -int fix_imports(struct import *imp, struct export *exp){ - func *ef; - struct func_stub *fs; - int count=0; - - for (ef=exp->func; *ef; ef++){ - count++; //count number of exported functions - } - for (fs=imp->func; fs->jr_ra; fs++) { - int ordinal = fs->addiu0 & 0xFFFF; - if (ordinal < count) { - fs->jr_ra=(((u32)exp->func[ordinal]>>2) & 0x3FFFFFF) | INS_J; - } else { - fs->jr_ra=INS_JR_RA; - } - } - imp->flags |=FLAG_IMPORT_QUEUED; - return 0; -} -``` - -# Module loading - -The first 2 modules loaded are SYSMEM and LOADCORE. After these have been successfully loaded, the remaining modules are loaded in the order specified in iopload.c. The IRX dynamic linking mechanism is very simple and does not account for forward references, so this list must be carefully ordered. Details of the individual modules follow. - -# The Exception Manager (EXCEPMAN – version 1.1) - -The exception manager is the 3rd module loaded and as the name suggests is responsible for managing the exception handling code. It does not actually implement any of the exception routines but rather provides the plumbing to allow other modules to register exception handlers and to provide for exception handlers to be chained together in priority order. - -The Exception Manager maintains an array of 16 pointers (one for each of the 16 possible exceptions) starting at address 0x0440. This address should be an implementation detail but it is used by some modules and so effectively is part of the public interface. - -|Ordinal|Function Definition | -|-------|-----------------------------------------------------------------------------------------| -|`0x00` |`void _start()` | -|`0x01` |`int excepman_reinit()` | -|`0x02` |`int excepman_deinit()` | -|`0x03` |`void *GetExHandlersTable()` | -|`0x04` |`int RegisterExceptionHandler(int code, struct exHandler *handler)` | -|`0x05` |`int RegisterPriorityExceptionHandler(int code, int priority, struct exHandler *handler)`| -|`0x06` |`int RegisterDefaultExceptionHandler(struct exHandler *handler)` | -|`0x07` |`int ReleaseExceptionHandler(int code, struct exHandler *handler)` | -|`0x08` |`int ReleaseDefaultExceptionHandler(struct exHandler *handler)` | - -# The Interrupt Manager (INTRMAN – version 1.2) - -The interrupt manager builds upon the services of the exception manager. Its main task is to service the interrupt exception and to call the correct interrupt service for the current interrupt. It installs an exception handler for exception code 0 (interrupt) and exception code 8 (syscall exception). It also deals with context switching of the stack which is used by the thread manager. -The interrupt table is located directly after the exception table (so starting at 0x0480) – but I don’t think this is important for the public interface. - -|Ordinal|Function Definition | -|-------|---------------------------------------------------------------------------------| -|`0x00` |`void _start()` | -|`0x01` |`int intrmanDeinit()` | -|`0x02` | | -|`0x03` | | -|`0x04` |`int RegisterIntrHandler(int interrupt, int mode, intrh_func handler, void *arg)`| -|`0x05` |`int ReleaseIntrHandler(int interrupt)` | -|`0x06` |`int EnableIntr(int interrupt)` | -|`0x07` |`int DisableIntr(int interrupt, int *oldstat)` | -|`0x08` |`int CpuDisableIntr()` | -|`0x09` |`int CpuEnableIntr()` | -|`0x0A` |`void intrman_syscall_04()` | -|`0x0B` |`void intrman_syscall_08()` | -|`0x0C` |`int CpuGetICTRL()` | -|`0x0D` |`int CpuEnableICTRL()` | -|`0x0E` |`void intrman_syscall_0C()` | -|`0x0F` | | -|`0x10` | | -|`0x11` |`int CpuSuspendIntr(u32 *ictrl)` | -|`0x12` |`int CpuResumeIntr(u32 ictrl)` | -|`0x13` |`int CpuSuspendIntr(u32 *ictrl)` | -|`0x14` |`int CpuResumeIntr(u32 ictrl)` | -|`0x15` |`void intrman_syscall_10()` | -|`0x16` |`void intrman_syscall_14()` | -|`0x17` |`int QueryIntrContext()` | -|`0x18` |`int QueryIntrStack(int stack_pointer)` | -|`0x19` |`int iCatchMultiIntr()` | -|`0x1A` |`void retonly()` | -|`0x1B` | | -|`0x1C` |`void SetCtxSwitchHandler(func handler)` | -|`0x1D` |`func ResetCtxSwitchHandler()` | -|`0x1E` |`void SetCtxSwitchReqHandler(func handler)` | -|`0x1F` |`func ResetCtxSwitchReqHandler()` | - -# Stack frame layout - -The interrupt manager also handles the management of the stackframe when context switching between threads. The stack frame is a reserved area on the stack that is large enough to hold the entire processor state. This enables the processor state to be saved and restored between interrupts and context switches. For performance reasons, the entire state is not always stored – an interrupt can define via the mode setting what processor registers it will not preserve and so need saving. -The stack frame contains a status field which defines how much of it is currently valid so that incremental saving and restoring from it can be achieved. In general, the layout of the stack frame could (and should) be considered as private to the interrupt manager. Given that it is exposed publicly though and the information is available to games, it is documented below. - -|Offset|Stored value | | | | | -|------|----------------------|----------------------|----------------------|----------------------|------------| -|`0x00`|`FrameID` |`0xAC0000FE Mode = 0`|`0xFF00FFFE Mode = 1`|`0xFFFFFFFE Mode = 2`|`0xF0FF000C`| -|`0x04`|`AT ($1)` |x |x |x | | -|`0x08`|`V0 ($2)` |x |x |x |x | -|`0x0C`|`V1 ($3)` |x |x |x |x | -|`0x10`|`A0 ($4)` |x |x |x |x | -|`0x14`|`A1 ($5)` |x |x |x |x | -|`0x18`|`A2 ($6)` |x |x |x |x | -|`0x1C`|`A3 ($7)` |x |x |x |x | -|`0x20`|`T0 ($8)` | |x |x | | -|`0x24`|`T1 ($9)` | |x |x | | -|`0x28`|`T2 ($10)` | |x |x | | -|`0x2C`|`T3 ($11)` | |x |x | | -|`0x30`|`T4 ($12)` | |x |x | | -|`0x34`|`T5 ($13)` | |x |x | | -|`0x38`|`T6 ($14)` | |x |x | | -|`0x3C`|`T7 ($15)` | |x |x | | -|`0x40`|`S0 ($16)` | | |x | | -|`0x44`|`S1 ($17)` | | |x |x | -|`0x48`|`S2 ($18)` | | |x |x | -|`0x4C`|`S3 ($19)` | | |x |x | -|`0x50`|`S4 ($20)` | | |x |x | -|`0x54`|`S5 ($21)` | | |x |x | -|`0x58`|`S6 ($22)` | | |x |x | -|`0x5C`|`S7 ($23)` | | |x |x | -|`0x60`|`T8 ($24)` | |x |x | | -|`0x64`|`T9 ($25)` | |x |x | | -|`0x68`|`Unused (k0)` | | | | | -|`0x6C`|`Unused (k1)` | | | | | -|`0x70`|`GP` | |x |x | | -|`0x74`|`SP` |x |x |x |x | -|`0x78`|`FP` | |x |x |x | -|`0x7C`|`RA` |x |x |x |x | -|`0x80`|`HI` |x |x |x | | -|`0x84`|`LO` |x |x |x | | -|`0x88`|`COP0 STATUS` |x |x |x |x | -|`0x8C`|`EPC before exception`|x |x |x |x | diff --git a/unfree/fps2bios/fps2blogo.bmp b/unfree/fps2bios/fps2blogo.bmp deleted file mode 100644 index 40d37391c7d33b1124fdc8c2a09d972ee5227003..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192054 zcmbTf=awYNbtaghBSWUvS*c}2>C{;wv#PRmbyrvGCc4oChz21jpr!%N49OW1AaLdh zK<>Z!$K5v|_y7LjJObwh_8jgb%znbm+#{=J_MDCKGQW23cdway+%K-VhsX!74*sn; z#K!^tZ{z=2VQA?8!oDyxgBB0i|L?|-{#!vCH~k+f6tqPXl+@U2oHbS&Ml&BAIm*E? z4}($G5GKZvD;w&A%^hiEep^qxqJkisn1Iip6jlvPI|LM( zG59|?h7eZDm8cjw$mxXW@RN%|uonb{RX-cTT|(lB4jy2cnKAS~v<#+zbo97Hgg8KE z_!uN;;y_XT*4}XjMq?*UEJaQNLpW>-rXZR`2;|w??ofsV4|VbZc~CK0-ZvjJ+T##m zFLertog=L1aiR#rk#8x z&@n^|F)s~A04y3VixYzfjUrG^Fw4?Y8BLy{V_GjuP}piG%6O;^7zMYNEkU2_6s5v& z*~DT5MvIT+cnJo(;KT)!RF;!T=G0KgW;*~Hu!Lg~z$mobyo+H%*NCVTE{-B)XmY;L zWOL4A>=y&Zy%4FB&RAYO7<@2fz~usja}ahmBy%n-b@=aRGX@<5Qfp0i=F<%As}`_< z@@lu>$sl+b;IoQ06Kock!4%MKm|N5&D?A{xO(q=$yHY|(5g0_UWD3p>B1dEB9g#^0 zF&UT-+T&Q3^Loc2Oqg)ULIkkmyS1mlcA-Kh56Wo9gq;o~uZenl(L1N1To?*WRNw@I zkdP28hgUGUgfNOQfE*k>jpm^l%78eN;G49XMy{9P8NriO1Ud?5u;U~-Kad?$AY-y< zxhVk?!X}W$3eDR}XuJs#2F+;(9HYCZY7=!ypOZ6DQ_8zsc9eSnF#6qbP@&v&1s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8000) { __asm__ ("nop\nnop\nnop\n"); } - - *((u8*)0x1000f180) = c; -} - -void __puts(u8 *s) { - while (*s != 0) { - __putc(*s++); - } -} - -int __printf(const char *format, ...) { - char buf[4096]; - va_list args; - int ret; - - va_start(args, format); - ret = vsnprintf(buf, 4096, format, args); - va_end(args); - - __puts((u8*)buf); - return ret; -} - diff --git a/unfree/fps2bios/intro/include/eedebug.h b/unfree/fps2bios/intro/include/eedebug.h deleted file mode 100644 index 503f65e06..000000000 --- a/unfree/fps2bios/intro/include/eedebug.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __EEDEBUG_H__ -#define __EEDEBUG_H__ - -#include -#include - - -void __putc(u8 c); -void __puts(u8 *s); -int __printf(const char *format, ...); - -#endif /* __EEDEBUG_H__ */ diff --git a/unfree/fps2bios/intro/include/romdir.h b/unfree/fps2bios/intro/include/romdir.h deleted file mode 100644 index ef03a3223..000000000 --- a/unfree/fps2bios/intro/include/romdir.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ROMDIR_H__ -#define __ROMDIR_H__ - -#include - -struct romdir { - /*following variable must place in designed order*/ - u8 fileName[10]; - u16 extInfoSize; - u32 fileSize; -} __attribute__ ((packed)); - -struct rominfo { - u32 fileOffset; - u32 fileSize; -}; - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri); - -#endif /* __ROMDIR_H__ */ diff --git a/unfree/fps2bios/intro/intro.c b/unfree/fps2bios/intro/intro.c deleted file mode 100644 index 7972a8ed2..000000000 --- a/unfree/fps2bios/intro/intro.c +++ /dev/null @@ -1,19 +0,0 @@ - -#include -#include -#include -#include - -#include "eedebug.h" -#include "romdir.h" - - -int main() { - - __printf("INTRO start\n"); - - __printf("INTRO end\n"); - - return 0; -} - diff --git a/unfree/fps2bios/intro/linkfile b/unfree/fps2bios/intro/linkfile deleted file mode 100644 index 5b5f5ca2a..000000000 --- a/unfree/fps2bios/intro/linkfile +++ /dev/null @@ -1,52 +0,0 @@ -_stack_size = 0x80000; -_heap_size = 1024*1024*10; - -ENTRY(_start); -SECTIONS { - - .text 0x00100008 : { - *(.text) - *(.rodata) - } - .reginfo ALIGN(128) : { - *(.reginfo) - } - .data ALIGN(128) : { - *(.data) - } - .rdata ALIGN(128) : { - *(.rdata) - } - _gp = ALIGN(128) + 0x7ff0; - .lit4 ALIGN(128) : { - *(.lit4) - } - .lit8 ALIGN(128) : { - *(.lit8) - } - .sdata ALIGN(128) : { - *(.sdata) - } - - .sbss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - _fbss = . ; - *(.scommon) - *(.sbss) - } - .bss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(.bss) - } - .COMMON ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(COMMON) - } - _end_bss = . - 4; - _stack = .; - . += _stack_size ; - _end_stack = . - 8*5; - _end = . ; - __lc_bh = . ; - . += _heap_size ; - __lc_eh = .; - -} - diff --git a/unfree/fps2bios/intro/romdir.c b/unfree/fps2bios/intro/romdir.c deleted file mode 100644 index 71e8bab8b..000000000 --- a/unfree/fps2bios/intro/romdir.c +++ /dev/null @@ -1,43 +0,0 @@ -/*************************************************************** -* romdir.c, based over Alex Lau (http://alexlau.8k.com) RomDir * -****************************************************************/ -#include "romdir.h" - -struct romdir *romdirInit() { - u8 *mem; - - for (mem=(u8*)0xbfc00000; (u32)mem<0xbfc01000; mem++) { - if (mem[0] == 'R' && mem[1] == 'E' && - mem[2] == 'S' && mem[3] == 'E' && - mem[4] == 'T') - break; - } - if ((u32)mem == 0xbfc01000) return NULL; - - return (struct romdir*)mem; -} - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri) { - struct romdir *rd; - struct romdir *base; - int i; - - base = romdirInit(); - if (base == NULL) return NULL; - - ri->fileOffset = 0; - for (rd = base; rd->fileName[0] != 0; rd++) { - for (i=0; i<10 && name[i] != 0; i++) { - if (rd->fileName[i] != name[i]) break; - } - if (rd->fileName[i] != name[i]) { - ri->fileOffset+= (rd->fileSize + 15) & ~0xF; - continue; - } - - ri->fileSize = rd->fileSize; - return ri; - } - - return NULL; -} diff --git a/unfree/fps2bios/kernel/Makefile b/unfree/fps2bios/kernel/Makefile deleted file mode 100644 index 0e57f9b22..000000000 --- a/unfree/fps2bios/kernel/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -DIRS = eeload iopload - -RESET_BIN = ../build/RESET - -EE_INCS += -Iinclude - -EE_OBJS = eestart.ee.o -IOP_OBJS = iopstart.iop.o romdir.iop.o start.iop.o - -all: $(RESET_BIN) - for i in $(DIRS); do \ - make -C $$i; \ - done; - -$(RESET_BIN): $(EE_OBJS) $(IOP_OBJS) - $(EE_CC) -Wl,--oformat,binary -Tlinkfile -nostartfiles $(EE_CFLAGS) \ - -o $(RESET_BIN) $(EE_OBJS) $(IOP_OBJS) $(EE_LDFLAGS) $(EE_LIBS) - -%.ee.o: %.c - $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@ - -%.iop.o: %.c - $(IOP_CC) $(IOP_CFLAGS) -c $< -o $@ - -clean: - for i in $(DIRS); do \ - make -C $$i clean; \ - done; - rm -f -r $(RESET_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.eeglobal -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/eeload/Makefile b/unfree/fps2bios/kernel/eeload/Makefile deleted file mode 100644 index 549980f47..000000000 --- a/unfree/fps2bios/kernel/eeload/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -EELOAD_BIN = ../../build/EELOAD - -EE_INCS += -Iinclude - -EE_LIBS += -lmc -lpad -lc -lkernel - -EE_OBJS = eeirq.o eedata.o eekernel.o eeinit.o eeload.o eeelf.o eedebug.o romdir.o - -$(EELOAD_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o - $(EE_CC) -nostartfiles -Wl,--oformat,binary,--Map,eeload.map -Tlinkfile $(EE_CFLAGS) \ - -o $(EELOAD_BIN) $(EE_OBJS) $(EE_LDFLAGS) $(EE_LIBS) - -# restrict all but the kernel registers -eeirq.o: eeirq.c - $(EE_C_COMPILE) -ffixed-2 -ffixed-3 -ffixed-4 -ffixed-5 -ffixed-6 -ffixed-7 -ffixed-8 -ffixed-9 -ffixed-10 -ffixed-11 -ffixed-12 -ffixed-13 -ffixed-14 -ffixed-15 -ffixed-16 -ffixed-17 -ffixed-18 -ffixed-19 -ffixed-20 -ffixed-21 -ffixed-22 -ffixed-23 -ffixed-24 -ffixed-25 -fcall-used-26 -fcall-used-27 -ffixed-30 $< -c -o $@ - -clean: - rm -f -r $(EELOAD_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.eeglobal diff --git a/unfree/fps2bios/kernel/eeload/eedata.c b/unfree/fps2bios/kernel/eeload/eedata.c deleted file mode 100644 index 2a60a8a30..000000000 --- a/unfree/fps2bios/kernel/eeload/eedata.c +++ /dev/null @@ -1,198 +0,0 @@ -// eedata.c - needed in order to assure -// that some of the kernel variables are as close to 0x80000000 as possible -// (ie, look in saveContext2) -//[made by] [RO]man, zerofrog - -#include -#include -#include - -#include "eekernel.h" -#include "eeirq.h" - -eeRegs SavedRegs __attribute((aligned(256))); -u128 SavedSP __attribute((aligned(16))); -u128 SavedRA __attribute((aligned(16))); -u128 SavedAT __attribute((aligned(16))); -u64 SavedT9 __attribute((aligned(16))); - -u32 _CpuConfig_0(u32); -u32 _CpuConfig_1(u32); -u32 _CpuConfig_2(u32); -u32 _CpuConfig_3(u32); -u32 _CpuConfig_4(u32); -u32 _CpuConfig_5(u32); -u32 (*table_CpuConfig[6])(u32) = {_CpuConfig_0, _CpuConfig_1, _CpuConfig_2, - _CpuConfig_3, _CpuConfig_4, _CpuConfig_5}; - -u32 dmac_CHCR[10] = { - 0xB0008000, - 0xB0009000, - 0xB000A000, - 0xB000B000, - 0xB000B400, - 0xB000C000, - 0xB000C400, - 0xB000C800, - 0xB000D000, - 0xB000D400, -}; - -void (*VCRTable[14])() = { - 0, 0, 0, 0, - 0, 0, 0, 0, - SyscException, 0, 0, 0, - 0, 0 -}; - -void (*VIntTable[8])() = { - 0, 0, DMACException, INTCException, - 0, 0, 0, TIMERException, -}; - -void _DummyINTCHandler(int); -void _DummyDMACHandler(int); - -void (*INTCTable[16])(int) = { - _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, - _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, - _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, - _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler }; - -void (*DMACTable[16])(int) = { - _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, - _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, - _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, - _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler }; - - -void (*table_SYSCALL[0x80])() = { - (void (*))_RFU___, // 0x00 - (void (*))_ResetEE, - (void (*))_SetGsCrt, - (void (*))_RFU___, - (void (*))_Exit, // 0x04 - (void (*))_RFU005, - (void (*))_LoadPS2Exe, - (void (*))_ExecPS2, - (void (*))_RFU___, // 0x08 - (void (*))_TlbWriteRandom, - (void (*))_AddSbusIntcHandler, - (void (*))_RemoveSbusIntcHandler, - (void (*))_Interrupt2Iop, // 0x0C - (void (*))_SetVTLBRefillHandler, - (void (*))_SetVCommonHandler, - (void (*))_SetVInterruptHandler, - (void (*))_AddIntcHandler, // 0x10 - (void (*))_RemoveIntcHandler, - (void (*))_AddDmacHandler, - (void (*))_RemoveDmacHandler, - (void (*))__EnableIntc, // 0x14 - (void (*))__DisableIntc, - (void (*))__EnableDmac, - (void (*))__DisableDmac, - (void (*))_SetAlarm, // 0x18 - (void (*))_ReleaseAlarm, - (void (*))__EnableIntc, - (void (*))__DisableIntc, - (void (*))__EnableDmac, // 0x1C - (void (*))__DisableDmac, - (void (*))_SetAlarm, - (void (*))_ReleaseAlarm, - (void (*))_CreateThread, // 0x20 - (void (*))_DeleteThread, - (void (*))_StartThread, - (void (*))_ExitThread, - (void (*))_ExitDeleteThread, // 0x24 - (void (*))_TerminateThread, - (void (*))_iTerminateThread, - (void (*))_DisableDispatchThread, - (void (*))_EnableDispatchThread, // 0x28 - (void (*))_ChangeThreadPriority, - (void (*))_iChangeThreadPriority, - (void (*))_RotateThreadReadyQueue, - (void (*))_iRotateThreadReadyQueue, // 0x2C - (void (*))_ReleaseWaitThread, - (void (*))_iReleaseWaitThread, - (void (*))_GetThreadId, - (void (*))_ReferThreadStatus, // 0x30 - (void (*))_ReferThreadStatus, - (void (*))_SleepThread, - (void (*))_WakeupThread, - (void (*))_iWakeupThread, - (void (*))_CancelWakeupThread, - (void (*))_CancelWakeupThread, - (void (*))_SuspendThread, - (void (*))_SuspendThread, - (void (*))_ResumeThread, - (void (*))_iResumeThread, - (void (*))_JoinThread, - (void (*))_InitializeMainThread, - (void (*))_InitializeHeapArea, - (void (*))_EndOfHeap, - (void (*))_RFU___, - (void (*))_CreateSema, // 0x40 - (void (*))_DeleteSema, - (void (*))_SignalSema, - (void (*))_iSignalSema, - (void (*))_WaitSema, - (void (*))_PollSema, - (void (*))_PollSema, - (void (*))_ReferSemaStatus, - (void (*))_ReferSemaStatus, - (void (*))_iDeleteSema, - (void (*))_SetOsdConfigParam, - (void (*))_GetOsdConfigParam, - (void (*))_GetGsHParam, - (void (*))_GetGsVParam, - (void (*))_SetGsHParam, - (void (*))_SetGsVParam, - (void (*))_CreateEventFlag, // 0x50 - (void (*))_DeleteEventFlag, - (void (*))_SetEventFlag, - (void (*))_iSetEventFlag, - (void (*))_RFU___, - (void (*))_RFU___, - (void (*))_RFU___, - (void (*))_RFU___, - (void (*))_RFU___, - (void (*))_RFU___, - (void (*))_RFU___, - (void (*))_RFU___, - (void (*))_EnableIntcHandler, - (void (*))_DisableIntcHandler, - (void (*))_EnableDmacHandler, - (void (*))_DisableDmacHandler, - (void (*))_KSeg0, // 0x60 - (void (*))_EnableCache, - (void (*))_DisableCache, - (void (*))_GetCop0, - (void (*))_FlushCache, - (void (*))_105, - (void (*))_CpuConfig, - (void (*))_GetCop0, - (void (*))_FlushCache, - (void (*))_105, - (void (*))_CpuConfig, - (void (*))_SifStopDma, //_sceSifStopDma, - (void (*))_SetCPUTimerHandler, - (void (*))_SetCPUTimer, - (void (*))0,//_SetOsdConfigParam2, - (void (*))0,//_GetOsdConfigParam2, - (void (*))_GsGetIMR, // 0x70 - (void (*))_GsPutIMR, - (void (*))_SetPgifHandler, - (void (*))_SetVSyncFlag, - (void (*))_SetSYSCALL, - (void (*))_print, - (void (*))_SifDmaStat, - (void (*))_SifSetDma, - (void (*))_SifSetDChain, - (void (*))_SifSetReg, - (void (*))_SifGetReg, - (void (*))_ExecOSD, - (void (*))_RFU___, - (void (*))_PSMode, - (void (*))_MachineType, - (void (*))_GetMemorySize -}; diff --git a/unfree/fps2bios/kernel/eeload/eedebug.c b/unfree/fps2bios/kernel/eeload/eedebug.c deleted file mode 100644 index 8be3c068b..000000000 --- a/unfree/fps2bios/kernel/eeload/eedebug.c +++ /dev/null @@ -1,31 +0,0 @@ - -#include -#include -#include - - -void __putc(u8 c) { - while (*((u32*)0x1000f130) & 0x8000) { __asm__ ("nop\nnop\nnop\n"); } - - *((u8*)0x1000f180) = c; -} - -void __puts(u8 *s) { - while (*s != 0) { - __putc(*s++); - } -} - -int __printf(const char *format, ...) { - char buf[4096]; - va_list args; - int ret; - - va_start(args, format); - ret = vsnprintf(buf, 4096, format, args); - va_end(args); - - __puts(buf); - return ret; -} - diff --git a/unfree/fps2bios/kernel/eeload/eeelf.c b/unfree/fps2bios/kernel/eeload/eeelf.c deleted file mode 100644 index 53e0273e4..000000000 --- a/unfree/fps2bios/kernel/eeload/eeelf.c +++ /dev/null @@ -1,423 +0,0 @@ -#include "romdir.h" -#include "eedebug.h" - -typedef struct { - u8 e_ident[16]; //0x7f,"ELF" (ELF file identifier) - u16 e_type; //ELF type: 0=NONE, 1=REL, 2=EXEC, 3=SHARED, 4=CORE - u16 e_machine; //Processor: 8=MIPS R3000 - u32 e_version; //Version: 1=current - u32 e_entry; //Entry point address - u32 e_phoff; //Start of program headers (offset from file start) - u32 e_shoff; //Start of section headers (offset from file start) - u32 e_flags; //Processor specific flags = 0x20924001 noreorder, mips - u16 e_ehsize; //ELF header size (0x34 = 52 bytes) - u16 e_phentsize; //Program headers entry size - u16 e_phnum; //Number of program headers - u16 e_shentsize; //Section headers entry size - u16 e_shnum; //Number of section headers - u16 e_shstrndx; //Section header stringtable index -} ELF_HEADER; - -typedef struct { - u32 p_type; //see notes1 - u32 p_offset; //Offset from file start to program segment. - u32 p_vaddr; //Virtual address of the segment - u32 p_paddr; //Physical address of the segment - u32 p_filesz; //Number of bytes in the file image of the segment - u32 p_memsz; //Number of bytes in the memory image of the segment - u32 p_flags; //Flags for segment - u32 p_align; //Alignment. The address of 0x08 and 0x0C must fit this alignment. 0=no alignment -} ELF_PHR; - -/* -notes1 ------- -0=Inactive -1=Load the segment into memory, no. of bytes specified by 0x10 and 0x14 -2=Dynamic linking -3=Interpreter. The array element must specify a path name -4=Note. The array element must specify the location and size of aux. info -5=reserved -6=The array element must specify location and size of the program header table. -*/ - -typedef struct { - u32 sh_name; //No. to the index of the Section header stringtable index - u32 sh_type; //See notes2 - u32 sh_flags; //see notes3 - u32 sh_addr; //Section start address - u32 sh_offset; //Offset from start of file to section - u32 sh_size; //Size of section - u32 sh_link; //Section header table index link - u32 sh_info; //Info - u32 sh_addralign; //Alignment. The adress of 0x0C must fit this alignment. 0=no alignment. - u32 sh_entsize; //Fixed size entries. -} ELF_SHR; -/* -notes 2 -------- -Type: -0=Inactive -1=PROGBITS -2=SYMTAB symbol table -3=STRTAB string table -4=RELA relocation entries -5=HASH hash table -6=DYNAMIC dynamic linking information -7=NOTE -8=NOBITS -9=REL relocation entries -10=SHLIB -0x70000000=LOPROC processor specifc -0x7fffffff=HIPROC -0x80000000=LOUSER lower bound -0xffffffff=HIUSER upper bound - -notes 3 -------- -Section Flags: (1 bit, you may combine them like 3 = alloc & write permission) -1=Write section contains data the is be writeable during execution. -2=Alloc section occupies memory during execution -4=Exec section contains executable instructions -0xf0000000=Mask bits processor-specific -*/ - -typedef struct { - u32 st_name; - u32 st_value; - u32 st_size; - u8 st_info; - u8 st_other; - u16 st_shndx; -} Elf32_Sym; - -#define ELF32_ST_TYPE(i) ((i)&0xf) - -typedef struct { - u32 r_offset; - u32 r_info; -} Elf32_Rel; - -char *sections_names; - -ELF_HEADER *elfHeader; -ELF_PHR *elfProgH; -ELF_SHR *elfSectH; -u8 *elfdata; -int elfsize; - - -static void __memcpy(void *dest, const void *src, int n) { - const u8 *s = (u8*)src; - u8 *d = (u8*)dest; - - while (n) { - *d++ = *s++; n--; - } -} - - -int loadHeaders() { - elfHeader = (ELF_HEADER*)elfdata; - - if ((elfHeader->e_shentsize != sizeof(ELF_SHR)) && (elfHeader->e_shnum > 0)) { - return -1; - } - -#ifdef ELF_LOG - ELF_LOG( "type: " ); -#endif - switch( elfHeader->e_type ) - { - default: -#ifdef ELF_LOG - ELF_LOG( "unknown %x", elfHeader->e_type ); -#endif - break; - - case 0x0: -#ifdef ELF_LOG - ELF_LOG( "no file type" ); -#endif - break; - - case 0x1: -#ifdef ELF_LOG - ELF_LOG( "relocatable" ); -#endif - break; - - case 0x2: -#ifdef ELF_LOG - ELF_LOG( "executable" ); -#endif - break; - } -#ifdef ELF_LOG - ELF_LOG( "\n" ); - ELF_LOG( "machine: " ); -#endif - switch ( elfHeader->e_machine ) - { - default: -#ifdef ELF_LOG - ELF_LOG( "unknown" ); -#endif - break; - - case 0x8: -#ifdef ELF_LOG - ELF_LOG( "mips_rs3000" ); -#endif - break; - } -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("version: %d\n",elfHeader->e_version); - ELF_LOG("entry: %08x\n",elfHeader->e_entry); - ELF_LOG("flags: %08x\n",elfHeader->e_flags); - ELF_LOG("eh size: %08x\n",elfHeader->e_ehsize); - ELF_LOG("ph off: %08x\n",elfHeader->e_phoff); - ELF_LOG("ph entsiz: %08x\n",elfHeader->e_phentsize); - ELF_LOG("ph num: %08x\n",elfHeader->e_phnum); - ELF_LOG("sh off: %08x\n",elfHeader->e_shoff); - ELF_LOG("sh entsiz: %08x\n",elfHeader->e_shentsize); - ELF_LOG("sh num: %08x\n",elfHeader->e_shnum); - ELF_LOG("sh strndx: %08x\n",elfHeader->e_shstrndx); - - ELF_LOG("\n"); -#endif - - return 0; -} - - -int loadProgramHeaders() { - int i; - - if (elfHeader->e_phnum == 0) { - return 0; - } - - if (elfHeader->e_phentsize != sizeof(ELF_PHR)) { - return -1; - } - - elfProgH = (ELF_PHR*)&elfdata[elfHeader->e_phoff]; - - for ( i = 0 ; i < elfHeader->e_phnum ; i++ ) - { -#ifdef ELF_LOG - ELF_LOG( "Elf32 Program Header\n" ); - ELF_LOG( "type: " ); -#endif - switch ( elfProgH[ i ].p_type ) - { - default: -#ifdef ELF_LOG - ELF_LOG( "unknown %x", (int)elfProgH[ i ].p_type ); -#endif - break; - - case 0x1: -#ifdef ELF_LOG - ELF_LOG("load"); -#endif -/* if ( elfHeader->e_shnum == 0 ) {*/ - if (elfProgH[ i ].p_offset < elfsize) { - int size; - - if ((elfProgH[ i ].p_filesz + elfProgH[ i ].p_offset) > elfsize) { - size = elfsize - elfProgH[ i ].p_offset; - } else { - size = elfProgH[ i ].p_filesz; - } -// __printf("loading program to %x\n", elfProgH[ i ].p_paddr + elfbase); - __memcpy(elfProgH[ i ].p_paddr, - &elfdata[elfProgH[ i ].p_offset], - size); - } -#ifdef ELF_LOG - ELF_LOG("\t*LOADED*"); -#endif -// } - break; - } -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("offset: %08x\n",(int)elfProgH[i].p_offset); - ELF_LOG("vaddr: %08x\n",(int)elfProgH[i].p_vaddr); - ELF_LOG("paddr: %08x\n",elfProgH[i].p_paddr); - ELF_LOG("file size: %08x\n",elfProgH[i].p_filesz); - ELF_LOG("mem size: %08x\n",elfProgH[i].p_memsz); - ELF_LOG("flags: %08x\n",elfProgH[i].p_flags); - ELF_LOG("palign: %08x\n",elfProgH[i].p_align); - ELF_LOG("\n"); -#endif - } - - return 0; -} - -int loadSectionHeaders() { - int i; - int i_st = -1; - int i_dt = -1; - - if (elfHeader->e_shnum == 0) { - return -1; - } - - elfSectH = (ELF_SHR*)&elfdata[elfHeader->e_shoff]; - - if ( elfHeader->e_shstrndx < elfHeader->e_shnum ) { - sections_names = (char *)&elfdata[elfSectH[ elfHeader->e_shstrndx ].sh_offset]; - } - - for ( i = 0 ; i < elfHeader->e_shnum ; i++ ) - { -#ifdef ELF_LOG - ELF_LOG( "Elf32 Section Header [%x] %s", i, §ions_names[ elfSectH[ i ].sh_name ] ); -#endif -/* if ( elfSectH[i].sh_flags & 0x2 ) { - if (elfSectH[i].sh_offset < elfsize) { - int size; - - if ((elfSectH[i].sh_size + elfSectH[i].sh_offset) > elfsize) { - size = elfsize - elfSectH[i].sh_offset; - } else { - size = elfSectH[i].sh_size; - } - memcpy(&psM[ elfSectH[ i ].sh_addr &0x1ffffff ], - &elfdata[elfSectH[i].sh_offset], - size); - } -#ifdef ELF_LOG - ELF_LOG( "\t*LOADED*" ); -#endif - }*/ -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("type: "); -#endif - switch ( elfSectH[ i ].sh_type ) - { - default: -#ifdef ELF_LOG - ELF_LOG("unknown %08x",elfSectH[i].sh_type); -#endif - break; - - case 0x0: -#ifdef ELF_LOG - ELF_LOG("null"); -#endif - break; - - case 0x1: -#ifdef ELF_LOG - ELF_LOG("progbits"); -#endif - break; - - case 0x2: -#ifdef ELF_LOG - ELF_LOG("symtab"); -#endif - break; - - case 0x3: -#ifdef ELF_LOG - ELF_LOG("strtab"); -#endif - break; - - case 0x4: -#ifdef ELF_LOG - ELF_LOG("rela"); -#endif - break; - - case 0x8: -#ifdef ELF_LOG - ELF_LOG("no bits"); -#endif - break; - - case 0x9: -#ifdef ELF_LOG - ELF_LOG("rel"); -#endif - break; - } -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("flags: %08x\n", elfSectH[i].sh_flags); - ELF_LOG("addr: %08x\n", elfSectH[i].sh_addr); - ELF_LOG("offset: %08x\n", elfSectH[i].sh_offset); - ELF_LOG("size: %08x\n", elfSectH[i].sh_size); - ELF_LOG("link: %08x\n", elfSectH[i].sh_link); - ELF_LOG("info: %08x\n", elfSectH[i].sh_info); - ELF_LOG("addralign: %08x\n", elfSectH[i].sh_addralign); - ELF_LOG("entsize: %08x\n", elfSectH[i].sh_entsize); -#endif - // dump symbol table - - if (elfSectH[i].sh_type == 0x02) { - i_st = i; i_dt = elfSectH[i].sh_link; - } -/* - if (elfSectH[i].sh_type == 0x01) { - int size = elfSectH[i].sh_size / 4; - u32 *ptr = (u32*)&psxM[(elfSectH[i].sh_addr + irx_addr) & 0x1fffff]; - - while (size) { - - if (*ptr == 0x41e00000) { // import func - int ret = iopSetImportFunc(ptr+1); - size-= ret; ptr+= ret; - } - - if (*ptr == 0x41c00000) { // export func - int ret = iopSetExportFunc(ptr+1); - size-= ret; ptr+= ret; - } - - size--; ptr++; - } - } -*/ -/* if (!strcmp(".data", §ions_names[elfSectH[i].sh_name])) { - // seems so.. - - psxRegs.GPR.n.gp = 0x8000 + irx_addr + elfSectH[i].sh_addr; - }*/ - } - - return 0; -} - - -u32 loadElfFile(char *filename, struct elfinfo *info) { - struct rominfo ri; - char str[256]; - char str2[256]; - int i; - - __printf("loadElfFile: %s\n", filename); - - if (romdirGetFile(filename, &ri) == NULL) { - __printf("file %s not found!!\n", filename); - return -1; - } - elfdata = (u8*)(0xbfc00000 + ri.fileOffset); - elfsize = ri.fileSize; - - loadHeaders(); - loadProgramHeaders(); - loadSectionHeaders(); - -// __printf("loadElfFile: e_entry=%x\n", elfHeader->e_entry); - return elfHeader->e_entry; -} - diff --git a/unfree/fps2bios/kernel/eeload/eeinit.c b/unfree/fps2bios/kernel/eeload/eeinit.c deleted file mode 100644 index e0e0fe3d0..000000000 --- a/unfree/fps2bios/kernel/eeload/eeinit.c +++ /dev/null @@ -1,511 +0,0 @@ -// EE initialization functions -// [made by] [RO]man, zerofrog -#include -#include - -#include "eekernel.h" -#include "eeirq.h" - -void InitializeGS(); -void InitializeGIF(); -void InitializeDMAC(int code); -void InitializeVU1(); -void InitializeVIF1(); -void InitializeIPU(); -void InitializeVIF0(); -void InitializeVU0(); -void InitializeFPU(); -void InitializeScratchPad(); -void InitializeUserMemory(u32 base); -void InitializeINTC(int a); -void InitializeTIMER(); - -//////////////////////////////////////////////////////////////////// -//8000AA60 -//////////////////////////////////////////////////////////////////// -void InitializeGS() -{ -} - -//////////////////////////////////////////////////////////////////// -//8000AB98 -//////////////////////////////////////////////////////////////////// -void InitializeGIF() -{ - GIF_CTRL = 1; - __asm__ ("sync\n"); - GIF_FIFO = 0; -} - -//////////////////////////////////////////////////////////////////// -//8000AD68 SYSCALL 001 ResetEE -//////////////////////////////////////////////////////////////////// -int _ResetEE(int init) -{ - if (init & 0x01) { __printf("# Initialize DMAC ...\n"); InitializeDMAC(0x31F); } - if (init & 0x02) { __printf("# Initialize VU1 ...\n"); InitializeVU1(); } - if (init & 0x04) { __printf("# Initialize VIF1 ...\n"); InitializeVIF1(); } - if (init & 0x08) { __printf("# Initialize GIF ...\n"); InitializeGIF(); } - if (init & 0x10) { __printf("# Initialize VU0 ...\n"); InitializeVU0(); } - if (init & 0x04) { __printf("# Initialize VIF0 ...\n"); InitializeVIF0(); } - if (init & 0x40) { __printf("# Initialize IPU ...\n"); InitializeIPU(); } - - InitializeINTC(0xC); -// return (*(int*)0x1000F410 &= 0xFFFBFFFF); code never reached :) -} - -//////////////////////////////////////////////////////////////////// -//8000AE88 -//////////////////////////////////////////////////////////////////// -int Initialize() -{ - __printf("# Initialize Start.\n"); - __printf("# Initialize GS ..."); - - InitializeGS(); - _SetGsCrt(1, 2, 1); - __printf("\n"); - - __printf("# Initialize INTC ...\n"); - InitializeINTC(0xFFFF); - - __printf("# Initialize TIMER ...\n"); - InitializeTIMER(); - - ResetEE(0x7F); - - __printf("# Initialize FPU ...\n"); - InitializeFPU(); - - __printf("# Initialize User Memory ...\n"); - InitializeUserMemory(0x80000); - - __printf("# Initialize Scratch Pad ...\n"); - InitializeScratchPad(); - - __printf("# Initialize Done.\n"); -} - -//////////////////////////////////////////////////////////////////// -//8000AF50 -//////////////////////////////////////////////////////////////////// -int Restart() -{ - __printf("# Restart.\n"); - __printf("# Initialize GS ..."); - - INTC_STAT = 4; - while (INTC_STAT & 4) { __asm__ ("nop\nnop\nnop\n"); } - INTC_STAT = 4; - - InitializeGS(); - _SetGsCrt(1, 2, 1); - __printf("\n"); - - __printf("# Initialize INTC ...\n"); - InitializeINTC(0xDFFD); - - __printf("# Initialize TIMER ...\n"); - InitializeTIMER(); - - ResetEE(0x7F); - - __printf("# Initialize FPU ...\n"); - InitializeFPU(); - - __printf("# Initialize User Memory ...\n"); - InitializeUserMemory(0x82000); - - __printf("# Initialize Scratch Pad ...\n"); - InitializeScratchPad(); - - __printf("# Restart Done.\n"); - - //wait for syncing IOP - while (SBUS_SMFLG & SBFLG_IOPSYNC) { __asm__ ("nop\nnop\nnop\n"); } - - SBUS_SMFLG=SBFLG_IOPSYNC; -} - -//////////////////////////////////////////////////////////////////// -//8000B0A0 -//////////////////////////////////////////////////////////////////// -void InitializeDMAC(int code) -{ - int i; - int *addr; - - for (i=0; i<10; i++) { - if (!(code & (1< 48) { - __printf("# TLB over flow (1)\n"); - } - - ptr = (u32*)(tlb_config[4] + 0x10); - for (i=1; i 48) { - __printf("# TLB over flow (2)\n"); - } - - if (tlb_config[1]) { - ptr = (u32*)(tlb_config[5]); - for (; i 48) { - __printf("# TLB over flow (3)\n"); - } - - ptr = (u32*)(tlb_config[6]); - for (; i> 16) | 0x8000; - code&= DMAC_STAT & 0xFFFF; - if (code & 0x80) { - //__printf("%s: code & 0x80\n", __FUNCTION__); - __asm__( - ".set noat\n" - "lui $26, %hi(SavedAT)\n" - "lq $1, %lo(SavedAT)($26)\n" - ".set at\n"); - __exception1(); - } - __asm__ ( - "mfc0 $26, $14\n" - "li $27, 0xFFFFFFE4\n" - "and $26, $27\n" - "mtc0 $26, $14\n" - "sync\n" - - LOAD_KERNELSTACK - "addiu $sp, -0x10\n" - "mfc0 $26, $14\n" - "sw $26, 0($sp)\n" - ); - saveContext2(); - - __asm__ ( - "plzcw %0, %1" - : "=r"(temp) : "r"(code) - ); - temp = 0x1e - (temp & 0xff); - DMAC_STAT = 1 << temp; - threadStatus = 0; - - DMACTable[temp](temp); - - restoreContext2(); - - __asm__ ( - ".set noat\n" - "lw $26, 0($sp)\n" - "mtc0 $26, $14\n" - "lui $26, %hi(SavedSP)\n" - "lq $sp, %lo(SavedSP)($26)\n" - "lui $26, %hi(SavedRA)\n" - "lq $31, %lo(SavedRA)($26)\n" - "lui $26, %hi(SavedAT)\n" - "lq $1, %lo(SavedAT)($26)\n" - ".set at\n" - ); - - if (!threadStatus) { - __asm__ ( - "mfc0 $26, $12\n" - "ori $26, 0x13\n" - "mtc0 $26, $12\n" - "sync\n" - "eret\n" - ); - } - __asm__(LOAD_KERNELSTACK); - threadStatus = 0; - - __ThreadHandler(); -} - -//////////////////////////////////////////////////////////////////// -//80000600 -//////////////////////////////////////////////////////////////////// -void TIMERException() -{ - -} - -//////////////////////////////////////////////////////////////////// -//80000700 -//////////////////////////////////////////////////////////////////// -void setINTCHandler(int n, void (*phandler)(int)) -{ - INTCTable[n] = phandler; -} - -//////////////////////////////////////////////////////////////////// -//80000780 -//////////////////////////////////////////////////////////////////// -void setDMACHandler(int n, void (*phandler)(int)) -{ - DMACTable[n] = phandler; -} diff --git a/unfree/fps2bios/kernel/eeload/eekernel.c b/unfree/fps2bios/kernel/eeload/eekernel.c deleted file mode 100644 index 00edc6313..000000000 --- a/unfree/fps2bios/kernel/eeload/eekernel.c +++ /dev/null @@ -1,3619 +0,0 @@ -//[module] KERNEL -//[processor] EE -//[type] RAW -//[size] 80880(0x13BF0) -//[bios] 10000(0xB3200-0xC6DF0) -//[iopboot] NA -//[loaded @] 80000000 -//[name] NA -//[version] NA -//[memory map] [too many, see mem.txt] -//[handlers] -//[entry point] ENTRYPOINT @ 0x80001000 -//[made by] [RO]man, zerofrog & others -#include -#include - -#include "eekernel.h" -#include "eeinit.h" -#include "eedebug.h" -#include "romdir.h" - -#define PS2_LOADADDR 0x82000 - -// internal functions -int InitPgifHandler(); -int InitPgifHandler2(); - -struct ll* LL_unlink(struct ll *l); -struct ll* LL_rotate(struct ll *l); -struct ll *LL_unlinkthis(struct ll *l); -void LL_add(struct ll *l, struct ll *new); - -extern int (*table_GetCop0[32])(int reg); // 124E8-12564 -extern int (*table_SetCop0[32])(int reg, int val); // 12568-125E4 - -void DefaultCPUTimerHandler(); -void _excepRet(u32 eretpc, u32 v1, u32 a, u32 a1, u32 a2); -int __ExitThread(); -int __ExitDeleteThread(); -int __SleepThread(); -int _iWaitSema(int sid); - -void saveContext(); -void restoreContext(); - -int _SemasInit(); - -void _ThreadHandler(u32 epc, u32 stack); -void _ChangeThread(u32 entry, u32 stack_res, int waitSema); - -int __DeleteThread(int tid); -int __StartThread(int tid, void *arg); -int __load_module(char *name, void (*entry)(void*), void *stack_res, int prio); -void* __ExecPS2(void * entry, void * gp, int argc, char ** argv); - -void releaseTCB(int tid); -void unsetTCB(int tid); -void thread_2_ready(int tid); - -void FlushInstructionCache(); -void FlushDataCache(); -void FlushSecondaryCache(); - -void SifDmaInit(); - -u32 excepRetPc=0;//124E4 -int threadId=0; // 125EC -int threadPrio=0; // 125F0 -int threadStatus=0; // 125F4 - -char threadArgStrBuffer[256]; // 12608 -u64 hvParam; - -u32 machineType; -u64 gsIMR; -u32 memorySize; - -u8 g_kernelstack[0x2000] __attribute((aligned(128))); -u32 g_kernelstackend; // hopefully this is right after g_kernelstack - -int _HandlersCount; - -int VSyncFlag0; -int VSyncFlag1; - -struct ll handler_ll_free, *ihandlers_last=NULL, *ihandlers_first=NULL; -struct HCinfo intcs_array[14]; -struct ll *dhandlers_last=NULL, *dhandlers_first=NULL; -struct HCinfo dmacs_array[15]; -struct IDhandl pgifhandlers_array[161]; -void (*sbus_handlers[32])(int ca); -void (*CPUTimerHandler)() = DefaultCPUTimerHandler; //12480 - -u64 _alarm_unk = 0; -u64 rcnt3Valid=0;//16A68 -int rcnt3Count = 0; //16A70 -u32 dword_80016A78, dword_80016A7C, dword_80016A84, dword_80016A88; -//u32 rcnt3gp; //16A80 -//u32 rcnt3Mode; //16A84 -int rcnt3TargetTable[0x142]={0};//16A80 -u8 rcnt3TargetNum[0x40];//16F78 -int threads_count=0; - -u32 excepRA=0;//16FC0 -u32 excepSP=0;//16FD0 - -struct ll thread_ll_free; -struct ll thread_ll_priorities[128]; -int semas_count=0; -struct kSema* semas_last=0; - -struct TCB threads_array[256]; -struct kSema semas_array[256]; - -char tagindex=0;//1E104 -short transferscount=0;//1E106 -struct TAG tadrptr[31] __attribute((aligned(16)));//1E140 -int extrastorage[(16/4) * 8][31] __attribute((aligned(16)));//1E340 - -int osdConfigParam;//1F340 - -u32 sifEEbuff[32] __attribute((aligned(16))); -u32 sifRegs[32] __attribute((aligned(16))); -u32 sifIOPbuff; -u32 sif1tagdata; - -void _eret() -{ - __asm__("mfc0 $26, $12\n" - "ori $26, 0x13\n" - "mtc0 $26, $12\n" - "sync\n" - "eret\n" - "nop\n"); -} - -#define eret() __asm__("j _eret\nnop\n"); - -//////////////////////////////////////////////////////////////////// -//800006C0 SYSCALL 116 RFU116_SetSYSCALL -//////////////////////////////////////////////////////////////////// -void _SetSYSCALL(int num, int address) -{ - table_SYSCALL[num] = (void (*)())address; -} - -//////////////////////////////////////////////////////////////////// -//80000740 SYSCALL 114 SetPgifHandler -//////////////////////////////////////////////////////////////////// -void _SetPgifHandler(void (*handler)(int)) -{ - INTCTable[15] = handler; -} - -//////////////////////////////////////////////////////////////////// -//800007C0 SYSCALL 108 SetCPUTimerHandler -//////////////////////////////////////////////////////////////////// -void _SetCPUTimerHandler(void (*handler)()) -{ - CPUTimerHandler = handler; -} - -//////////////////////////////////////////////////////////////////// -//80000800 SYSCALL 109 SetCPUTimer -//////////////////////////////////////////////////////////////////// -void _SetCPUTimer(int compval) -{ - if( compval < 0 ) { - u32 status; - __asm__("mfc0 %0, $12\n" : "=r"(status) : ); - __asm__("mtc0 %0, $12\n" - "mtc0 $0, $9\n" : : "r"(status|0x18001)); - } - else if( compval == 0 ) { - u32 compare, status; - __asm__("mfc0 %0, $12\n" - "mfc0 %1, $11\n" - : "=r"(status), "=r"(compare) : ); - __asm__("mtc0 %0, $12\n" - "mtc0 $0, $9\n" - "mtc0 %1, $11\n" - : : "r"(status&~0x8000), "r"(compare) ); - } - else { - __asm__("mtc0 $0, $9\n" // count - "mtc0 %0, $11\n" // compare - : : "r"(compval)); - } -} - -//////////////////////////////////////////////////////////////////// -//800008C0 SYSCALL 020 EnableIntc -//////////////////////////////////////////////////////////////////// -int __EnableIntc(int ch) -{ - int intbit; - - intbit = 0x1 << ch; - if ((INTC_MASK & intbit) != 0) return 0; - - INTC_MASK = intbit; - - return 1; -} - -//////////////////////////////////////////////////////////////////// -//80000900 SYSCALL 021 DisableIntc -//////////////////////////////////////////////////////////////////// -int __DisableIntc(int ch) -{ - int intbit; - - intbit = 0x1 << ch; - if ((INTC_MASK & intbit) == 0) return 0; - - INTC_MASK = intbit; - - return 1; -} - -//////////////////////////////////////////////////////////////////// -//80000940 SYSCALL 022 EnableDmac -//////////////////////////////////////////////////////////////////// -int __EnableDmac(int ch) -{ - int dmabit; - - dmabit = 0x10000 << ch; - if ((DMAC_STAT & dmabit) != 0) return 0; - - DMAC_STAT = dmabit; - - return 1; -} - -//////////////////////////////////////////////////////////////////// -//80000980 SYSCALL 023 DisableDmac -//////////////////////////////////////////////////////////////////// -int __DisableDmac(int ch) -{ - int dmabit; - - dmabit = 0x10000 << ch; - if ((DMAC_STAT & dmabit) == 0) return 0; - - DMAC_STAT = dmabit; - - return 1; -} - -//////////////////////////////////////////////////////////////////// -//800009C0 SYSCALL 013 SetVTLBRefillHandler -//////////////////////////////////////////////////////////////////// -void* _SetVTLBRefillHandler(int cause, void (*handler)()) -{ - if ((cause-1) >= 3) return 0; - - VCRTable[cause] = handler; - - return handler; -} - -//////////////////////////////////////////////////////////////////// -//80000A00 SYSCALL 014 SetVCommonHandler -//////////////////////////////////////////////////////////////////// -void* _SetVCommonHandler(int cause, void (*handler)()) -{ - if ((cause-4) >= 10) return 0; - - VCRTable[cause] = handler; - - return handler; -} - -//////////////////////////////////////////////////////////////////// -//80000A40 SYSCALL 015 SetVInterruptHandler -//////////////////////////////////////////////////////////////////// -void* _SetVInterruptHandler(int cause, void (*handler)()) -{ - if (cause >= 8) return 0; - - VIntTable[cause] = handler; - // no return value... -} - -//////////////////////////////////////////////////////////////////// -//80000A80 SYSCALL 102,106 CpuConfig -//////////////////////////////////////////////////////////////////// -u32 _CpuConfig(u32 op) -{ - u32 cfg; - __asm__("mfc0 %0, $16\n" : "=r"(cfg) : ); - return table_CpuConfig[op](cfg); -} - -//////////////////////////////////////////////////////////////////// -//80000AB8 -//////////////////////////////////////////////////////////////////// -u32 _CpuConfig_0(u32 cfg) -{ - cfg |= 0x40000; - __asm__("mtc0 %0, $16\n" - "sync\n": : "r"(cfg)); - return cfg; -} - -//////////////////////////////////////////////////////////////////// -//80000AD0 -//////////////////////////////////////////////////////////////////// -u32 _CpuConfig_1(u32 cfg) -{ - cfg |= 0x2000; - __asm__("mtc0 %0, $16\n" - "sync\n": : "r"(cfg)); - return cfg; -} - -//////////////////////////////////////////////////////////////////// -//80000AEC -//////////////////////////////////////////////////////////////////// -u32 _CpuConfig_2(u32 cfg) -{ - cfg |= 0x1000; - __asm__("mtc0 %0, $16\n" - "sync\n": : "r"(cfg)); - return cfg; -} - -//////////////////////////////////////////////////////////////////// -//80000B04 -//////////////////////////////////////////////////////////////////// -u32 _CpuConfig_3(u32 cfg) -{ - cfg &= ~0x40000; - __asm__("mtc0 %0, $16\n" - "sync\n": : "r"(cfg)); - return cfg; -} - -//////////////////////////////////////////////////////////////////// -//80000B20 -//////////////////////////////////////////////////////////////////// -u32 _CpuConfig_4(u32 cfg) -{ - cfg &= ~0x2000; - __asm__("mtc0 %0, $16\n" - "sync\n": : "r"(cfg)); - return cfg; -} - -//////////////////////////////////////////////////////////////////// -//80000B40 -//////////////////////////////////////////////////////////////////// -u32 _CpuConfig_5(u32 cfg) -{ - cfg &= ~0x1000; - __asm__("mtc0 %0, $16\n" - "sync\n": : "r"(cfg)); - return cfg; -} - -//////////////////////////////////////////////////////////////////// -//80000B80 SYSCALL 125 PSMode -//////////////////////////////////////////////////////////////////// -void _PSMode() -{ - machineType|= 0x8000; -} - -//////////////////////////////////////////////////////////////////// -//80000BC0 SYSCALL 126 MachineType -//////////////////////////////////////////////////////////////////// -u32 _MachineType() -{ - return machineType; -} - -//////////////////////////////////////////////////////////////////// -//80000C00 -//////////////////////////////////////////////////////////////////// -u32 _SetMemorySize(u32 size) -{ - memorySize = size; - return size; -} - -//////////////////////////////////////////////////////////////////// -//80000C40 SYSCALL 127 GetMemorySize -//////////////////////////////////////////////////////////////////// -u32 _GetMemorySize() -{ - return memorySize; -} - -//////////////////////////////////////////////////////////////////// -//80000D00 SYSCALL 112 GsGetIMR -//////////////////////////////////////////////////////////////////// -u64 _GsGetIMR() -{ - return gsIMR; -} - -//////////////////////////////////////////////////////////////////// -//80000D40 SYSCALL 113 GsPutIMR -//////////////////////////////////////////////////////////////////// -u64 _GsPutIMR(u64 val) -{ - GS_IMR = val; - gsIMR = val; - return val; -} - -//////////////////////////////////////////////////////////////////// -//80000D80 SYSCALL 002 Exit -//////////////////////////////////////////////////////////////////// -int _Exit() -{ - return _RFU004_Exit(); -} - -//////////////////////////////////////////////////////////////////// -//80001000 ENTRYPOINT -//////////////////////////////////////////////////////////////////// -void __attribute__((noreturn)) _start() -{ - __asm__("lui $sp, %hi(g_kernelstackend)\n" - "addiu $sp, %lo(g_kernelstackend)\n"); - - __puts("EEKERNEL start\n"); - - memorySize = 32*1024*1024; - machineType = 0; - //memorySize = *(int*)0x70003FF0; - //machineType = machine_type; - - __printf("TlbInit\n"); - TlbInit(); - __printf("InitPgifHandler\n"); - InitPgifHandler(); - __printf("Initialize\n"); - Initialize(); -// __load_module_EENULL(); - - __asm__ ( - "li $26, %0\n" - "lw $26, 0($26)\n" - "mtc0 $26, $12\n" - "li $26, %1\n" - "lw $26, 0($26)\n" - "mtc0 $26, $16\n" - : : "i"(SRInitVal), "i"(ConfigInitVal) - ); - -// ee_deci2_manager_init(); - SifDmaInit(); -// __init_unk(0x81FE0); - SetVSyncFlag(0, 0); - - // call directly instread of loading module, might need to - // set thread0 as used since soem code assumes thread 0 is always - // main thread - //eeload_start(); - //launch_thread(__load_module("EELOAD", 0x82000, 0x81000, 0)); - - for (;;); -} - -//////////////////////////////////////////////////////////////////// -//80001300 -//////////////////////////////////////////////////////////////////// -void saveContext2() { - __asm__ ( - ".set noat\n" - "lui $26, %hi(SavedRegs)\n" - "sq $2, %lo(SavedRegs+0x000)($26)\n" - "sq $3, %lo(SavedRegs+0x010)($26)\n" - "sq $4, %lo(SavedRegs+0x020)($26)\n" - "sq $5, %lo(SavedRegs+0x030)($26)\n" - "sq $6, %lo(SavedRegs+0x040)($26)\n" - "sq $7, %lo(SavedRegs+0x050)($26)\n" - "sq $8, %lo(SavedRegs+0x060)($26)\n" - "sq $9, %lo(SavedRegs+0x070)($26)\n" - "sq $10, %lo(SavedRegs+0x080)($26)\n" - "sq $11, %lo(SavedRegs+0x090)($26)\n" - "sq $12, %lo(SavedRegs+0x0A0)($26)\n" - "sq $13, %lo(SavedRegs+0x0B0)($26)\n" - "sq $14, %lo(SavedRegs+0x0C0)($26)\n" - "sq $15, %lo(SavedRegs+0x0D0)($26)\n" - "sq $16, %lo(SavedRegs+0x0E0)($26)\n" - "sq $17, %lo(SavedRegs+0x0F0)($26)\n" - "sq $18, %lo(SavedRegs+0x100)($26)\n" - "sq $19, %lo(SavedRegs+0x110)($26)\n" - "sq $20, %lo(SavedRegs+0x120)($26)\n" - "sq $21, %lo(SavedRegs+0x130)($26)\n" - "sq $22, %lo(SavedRegs+0x140)($26)\n" - "sq $23, %lo(SavedRegs+0x150)($26)\n" - "sq $24, %lo(SavedRegs+0x160)($26)\n" - "sq $25, %lo(SavedRegs+0x170)($26)\n" - "sq $gp, %lo(SavedRegs+0x180)($26)\n" - "sq $fp, %lo(SavedRegs+0x190)($26)\n" - - "mfhi $2\n" - "sd $2, %lo(SavedRegs+0x1A0)($26)\n" - "mfhi1 $2\n" - "sd $2, %lo(SavedRegs+0x1A8)($26)\n" - - "mflo $2\n" - "sd $2, %lo(SavedRegs+0x1B0)($26)\n" - "mflo1 $2\n" - "sd $2, %lo(SavedRegs+0x1B8)($26)\n" - - "mfsa $2\n" - "sd $2, %lo(SavedRegs+0x1C0)($26)\n" - "jr $31\n" - "nop\n" - ".set at\n" - ); -} - -//////////////////////////////////////////////////////////////////// -//800013C0 -//////////////////////////////////////////////////////////////////// -void restoreContext2() { - __asm__ ( - ".set noat\n" - "lui $26, %hi(SavedRegs)\n" - "lq $2, %lo(SavedRegs+0x000)($26)\n" - "lq $3, %lo(SavedRegs+0x010)($26)\n" - "lq $4, %lo(SavedRegs+0x020)($26)\n" - "lq $5, %lo(SavedRegs+0x030)($26)\n" - "lq $6, %lo(SavedRegs+0x040)($26)\n" - "lq $7, %lo(SavedRegs+0x050)($26)\n" - "lq $8, %lo(SavedRegs+0x060)($26)\n" - "lq $9, %lo(SavedRegs+0x070)($26)\n" - "lq $10, %lo(SavedRegs+0x080)($26)\n" - "lq $11, %lo(SavedRegs+0x090)($26)\n" - "lq $12, %lo(SavedRegs+0x0A0)($26)\n" - "lq $13, %lo(SavedRegs+0x0B0)($26)\n" - "lq $14, %lo(SavedRegs+0x0C0)($26)\n" - "lq $15, %lo(SavedRegs+0x0D0)($26)\n" - "lq $16, %lo(SavedRegs+0x0E0)($26)\n" - "lq $17, %lo(SavedRegs+0x0F0)($26)\n" - "lq $18, %lo(SavedRegs+0x100)($26)\n" - "lq $19, %lo(SavedRegs+0x110)($26)\n" - "lq $20, %lo(SavedRegs+0x120)($26)\n" - "lq $21, %lo(SavedRegs+0x130)($26)\n" - "lq $22, %lo(SavedRegs+0x140)($26)\n" - "lq $23, %lo(SavedRegs+0x150)($26)\n" - "lq $24, %lo(SavedRegs+0x160)($26)\n" - "lq $25, %lo(SavedRegs+0x170)($26)\n" - "lq $gp, %lo(SavedRegs+0x180)($26)\n" - "lq $fp, %lo(SavedRegs+0x190)($26)\n" - - "ld $1, %lo(SavedRegs+0x1A0)($26)\n" - "mthi $1\n" - "ld $1, %lo(SavedRegs+0x1A8)($26)\n" - "mthi1 $1\n" - - "ld $1, %lo(SavedRegs+0x1B0)($26)\n" - "mtlo $1\n" - "ld $1, %lo(SavedRegs+0x1B8)($26)\n" - "mtlo1 $1\n" - - "ld $1, %lo(SavedRegs+0x1C0)($26)\n" - "mtsa $1\n" - - "jr $31\n" - "nop\n" - ".set at\n" - ); -} - -//////////////////////////////////////////////////////////////////// -//80001460 -//////////////////////////////////////////////////////////////////// -void erase_cpu_regs() -{ - __asm__( - ".set noat\n" - "padduw $1, $0, $0\n" - "padduw $2, $0, $0\n" - "padduw $3, $0, $0\n" - "padduw $4, $0, $0\n" - "padduw $5, $0, $0\n" - "padduw $6, $0, $0\n" - "padduw $7, $0, $0\n" - "padduw $8, $0, $0\n" - "padduw $9, $0, $0\n" - "padduw $10, $0, $0\n" - "padduw $11, $0, $0\n" - "padduw $12, $0, $0\n" - "padduw $13, $0, $0\n" - "padduw $14, $0, $0\n" - "padduw $15, $0, $0\n" - "padduw $16, $0, $0\n" - "padduw $17, $0, $0\n" - "padduw $18, $0, $0\n" - "padduw $19, $0, $0\n" - "padduw $20, $0, $0\n" - "padduw $21, $0, $0\n" - "padduw $22, $0, $0\n" - "padduw $23, $0, $0\n" - "padduw $24, $0, $0\n" - "padduw $25, $0, $0\n" - "padduw $gp, $0, $0\n" - "jr $31\n" - "padduw $fp, $0, $0\n" - ".set at\n" - ); -} - -//////////////////////////////////////////////////////////////////// -//800014D8 dummy intc handler -//////////////////////////////////////////////////////////////////// -void _DummyINTCHandler(int n) -{ - __printf("# INT: INTC (%d)\n", n); - while(1) { __asm__ ("nop\nnop\nnop\nnop\n"); } -} - -//////////////////////////////////////////////////////////////////// -//80001508 dummy dmac handler -//////////////////////////////////////////////////////////////////// -void _DummyDMACHandler(int n) -{ - __printf("# INT: DMAC (%d)\n", n); - while(1) { __asm__ ("nop\nnop\nnop\nnop\n"); } -} - -//////////////////////////////////////////////////////////////////// -//80001508 -//////////////////////////////////////////////////////////////////// -void DefaultCPUTimerHandler() -{ - __printf("# INT: CPU Timer\n"); -} - -//////////////////////////////////////////////////////////////////// -//80001564 SYSCALL 000 RFU000_FullReset -//80001564 SYSCALL 003 RFU003 (also) -//80001564 SYSCALL 008 RFU008 (too) -//////////////////////////////////////////////////////////////////// -void _RFU___() -{ - register int syscnum __asm__("$3"); - __printf("# Syscall: undefined (%d)\n", syscnum>>2); -} - -//////////////////////////////////////////////////////////////////// -//80001588 -//////////////////////////////////////////////////////////////////// -void _SetVSyncFlag(int flag0, int flag1) -{ - VSyncFlag0 = flag0; - VSyncFlag1 = flag1; -} - -//////////////////////////////////////////////////////////////////// -//800015A0 -//////////////////////////////////////////////////////////////////// -struct ll* _AddHandler() -{ - struct ll *l; - - l = LL_unlink(&handler_ll_free); - if (l == NULL) return NULL; - - _HandlersCount++; - return l; -} - -//////////////////////////////////////////////////////////////////// -//800015E8 -//////////////////////////////////////////////////////////////////// -void _RemoveHandler(int n) -{ - LL_add(&handler_ll_free, (struct ll*)&pgifhandlers_array[n]); - _HandlersCount--; -} - -//////////////////////////////////////////////////////////////////// -//80001630 -//////////////////////////////////////////////////////////////////// -void DefaultINTCHandler(int n) -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//80001798 -//////////////////////////////////////////////////////////////////// -void DefaultDMACHandler(int n) -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//800018B0 -//////////////////////////////////////////////////////////////////// -int __AddIntcHandler(int cause, int (*handler)(int), int next, void *arg, int flag) -{ - struct IDhandl *idh; - - if ((flag != 0) && (cause == INTC_SBUS)) return -1; - if (cause >= 15) return -1; - - idh = (struct IDhandl *)_AddHandler(); - if (idh == 0) return -1; - - idh->handler = handler; - __asm__ ("sw $gp, %0\n" : "=m"(idh->gp) : ); - idh->arg = arg; - idh->flag = flag; - - if (next==-1) //register_last - LL_add(&ihandlers_last[cause*12], (struct ll*)idh); - else if (next==0) //register_first - LL_add(&ihandlers_first[cause*12], (struct ll*)idh); - else{ - if (next>128) return -1; - if (pgifhandlers_array[next].flag==3) return -1; - LL_add((struct ll*)&pgifhandlers_array[next], (struct ll*)idh); - } - - intcs_array[cause].count++; - return (((u32)idh-(u32)&pgifhandlers_array) * 0xAAAAAAAB) / 8; -} - -//////////////////////////////////////////////////////////////////// -//80001A30 SYSCALL 016 AddIntcHandler -//////////////////////////////////////////////////////////////////// -int _AddIntcHandler(int cause, int (*handler)(int), int next, void *arg) -{ - __AddIntcHandler(cause, handler, next, arg, 2); -} - -//////////////////////////////////////////////////////////////////// -//80001A50 -//////////////////////////////////////////////////////////////////// -int _AddIntcHandler2(int cause, int (*handler)(int), int next, void *arg) -{ - __AddIntcHandler(cause, handler, next, arg, 0); -} - -//////////////////////////////////////////////////////////////////// -//80001AC8 SYSCALL 017 RemoveIntcHandler -//////////////////////////////////////////////////////////////////// -int _RemoveIntcHandler(int cause, int hid) -{ - if (hid >= 128) return -1; - - if (pgifhandlers_array[hid].flag == 3) return -1; - pgifhandlers_array[hid].flag = 3; - pgifhandlers_array[hid].handler = 0; - - LL_unlinkthis((struct ll*)&pgifhandlers_array[hid]); - _RemoveHandler(hid); - - intcs_array[cause].count--; -} - -//////////////////////////////////////////////////////////////////// -//80001B10 -//////////////////////////////////////////////////////////////////// -int __AddDmacHandler(int cause, int (*handler)(int), int next, void *arg, int flag) -{ - struct IDhandl *idh; - register int temp; - - if (cause >= 16) return -1; - - idh = (struct IDhandl *)_AddHandler(); - if (idh == 0) return -1; - - idh->handler = handler; - __asm__ ("sw $gp, %0\n" : "=m"(idh->gp) : ); - idh->arg = arg; - idh->flag = flag; - - if (next==-1) //register_last - LL_add(&dhandlers_last[cause*12], (struct ll*)idh); - else if (next==0) //register_first - LL_add(&dhandlers_first[cause*12], (struct ll*)idh); - else{ - if (next>128) return -1; - if (pgifhandlers_array[next].flag==3) return -1; - LL_add((struct ll*)&pgifhandlers_array[next], (struct ll*)idh); - } - - dmacs_array[cause].count++; - return (((u32)idh-(u32)&pgifhandlers_array) * 0xAAAAAAAB) / 8; -} - -//////////////////////////////////////////////////////////////////// -//80001C78 SYSCALL 018 AddDmacHandler -//////////////////////////////////////////////////////////////////// -int _AddDmacHandler(int cause, int (*handler)(int), int next, void *arg) -{ - __AddDmacHandler(cause, handler, next, arg, 2); -} - -//////////////////////////////////////////////////////////////////// -//80001C98 -//////////////////////////////////////////////////////////////////// -int _AddDmacHandler2(int cause, int (*handler)(int), int next, void *arg) -{ - __AddDmacHandler(cause, handler, next, arg, 0); -} - -//////////////////////////////////////////////////////////////////// -//80001CB8 SYSCALL 019 RemoveDmacHandler -//////////////////////////////////////////////////////////////////// -int _RemoveDmacHandler(int cause, int hid) -{ - if (hid >= 128) return -1; - - if (pgifhandlers_array[hid].flag == 3) return -1; - pgifhandlers_array[hid].flag = 3; - pgifhandlers_array[hid].handler = 0; - - LL_unlinkthis((struct ll*)&pgifhandlers_array[hid]); - _RemoveHandler(hid); - - dmacs_array[cause].count--; -} - -//////////////////////////////////////////////////////////////////// -//80001D58 -//////////////////////////////////////////////////////////////////// -void sbusHandler() -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//80001E38 -//////////////////////////////////////////////////////////////////// -int __AddSbusIntcHandler(int cause, void (*handler)(int ca)) -{ - if (cause >= 32) return -1; - - if (sbus_handlers[cause] != 0) return -1; - - sbus_handlers[cause] = handler; - return cause; -} - -//////////////////////////////////////////////////////////////////// -//80001E78 SYSCALL 010 AddSbusIntcHandler -//////////////////////////////////////////////////////////////////// -int _AddSbusIntcHandler(int cause, void (*handler)(int ca)) -{ - if (cause < 16) return __AddSbusIntcHandler(cause, handler); - - return -1; -} - -//////////////////////////////////////////////////////////////////// -//80001EA8 -//////////////////////////////////////////////////////////////////// -int __RemoveSbusIntcHandler(int cause) -{ - if (cause >= 32) return -1; - - sbus_handlers[cause] = 0; - return cause; -} - -//////////////////////////////////////////////////////////////////// -//80001ED0 SYSCALL 011 RemoveSbusIntcHandler -//////////////////////////////////////////////////////////////////// -int _RemoveSbusIntcHandler(int cause) -{ - if (cause < 16) return __RemoveSbusIntcHandler(cause); - - return -1; -} - -//////////////////////////////////////////////////////////////////// -//80001F00 -//////////////////////////////////////////////////////////////////// -int __Interrupt2Iop(int cause) -{ - if (cause >= 32) { - return -1; - } - - SBUS_MSFLG = 1 << cause; - - SBUS_F240 = 0x100; - SBUS_F240 = 0x100; - SBUS_F240 = 0x100; - SBUS_F240 = 0x100; - SBUS_F240 = 0x100; - SBUS_F240 = 0x100; - SBUS_F240 = 0x100; - SBUS_F240 = 0x100; // eight times - - SBUS_F240 = 0x40100; - - return cause; -} - -//////////////////////////////////////////////////////////////////// -//80001F70 SYSCALL 012 Interrupt2Iop -//////////////////////////////////////////////////////////////////// -int _Interrupt2Iop(int cause) -{ - if (cause < 16) { - return _Interrupt2Iop(cause); - } else { - return -1; - } -} - -//////////////////////////////////////////////////////////////////// -//80001FA0 SYSCALL 092 EnableIntcHandler -//////////////////////////////////////////////////////////////////// -void _EnableIntcHandler(u32 id) -{ - pgifhandlers_array[id].flag = 2; -} - -//////////////////////////////////////////////////////////////////// -//80001FA0 SYSCALL 093 DisableIntcHandler -//////////////////////////////////////////////////////////////////// -void _DisableIntcHandler(u32 id) -{ - pgifhandlers_array[id].flag = 1; -} - -//////////////////////////////////////////////////////////////////// -//80001FA0 SYSCALL 094 EnableDmacHandler -//////////////////////////////////////////////////////////////////// -void _EnableDmacHandler(u32 id) -{ - pgifhandlers_array[id].flag = 2; -} - -//////////////////////////////////////////////////////////////////// -//80001FA0 SYSCALL 095 DisableDmacHandler -//////////////////////////////////////////////////////////////////// -void _DisableDmacHandler(u32 id) -{ - pgifhandlers_array[id].flag = 1; -} - -//////////////////////////////////////////////////////////////////// -//80002040 SYSCALL 083 iSetEventFlag -//////////////////////////////////////////////////////////////////// -int _iSetEventFlag(int ef, u32 bits) -{ - return _HandlersCount; //? -} - -//////////////////////////////////////////////////////////////////// -//800022D8 SYSCALL 24,30 -//////////////////////////////////////////////////////////////////// -int _SetAlarm(short a0, int a1, int a2) -{ - int mode = _alarm_unk & 0x1; - int i; - - i = 0; - while (mode) { - mode = (_alarm_unk >> i++) & 0x1; - if (i >= 64) { - return -1; - } - } - - _alarm_unk|= mode << i; - - __asm__("move %0, $gp\n" : "=r"(rcnt3TargetTable[0]) : ); - dword_80016A78 = a1; - dword_80016A7C = a2; - rcnt3TargetTable[1] = RCNT3_MODE; - i = RCNT3_MODE + a0; - if (i < -1) - i&= 0xffff; - dword_80016A88 = i; - - if (RCNT3_MODE < i) { - if (rcnt3Count <= 0) { - - } - } -} - -//////////////////////////////////////////////////////////////////// -//80002570 SYSCALL 25,31 ReleaseAlarm -//////////////////////////////////////////////////////////////////// -void _ReleaseAlarm() -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//80002650 -//////////////////////////////////////////////////////////////////// -void rcnt3Handler() -{ - unsigned int i; - u32* ptr; - u32 storegp; - u32 addr; - - if (rcnt3Count < 2) { - RCNT3_MODE = 0x483; - } else { - RCNT3_MODE = 0x583; - RCNT3_TARGET = rcnt3TargetTable[2+rcnt3TargetNum[1] * 5]; - } - - for (;;) { - u32 id = (u32)rcnt3TargetNum[0]; - if (--rcnt3Count >= 0) { - // shift one down - for (i=0; i= 0) { - if (addr != rcnt3TargetTable[rcnt3TargetNum[0] * 5 + 2]) { - break; - } - } else break; - } -} - -//////////////////////////////////////////////////////////////////// -//800027F8 SYSCALL 082 SetEventFlag -//////////////////////////////////////////////////////////////////// -int _SetEventFlag(int ef, u32 bits) -{ - return rcnt3Count; //? -} - -//////////////////////////////////////////////////////////////////// -//800027F8 -//////////////////////////////////////////////////////////////////// -void _InitRCNT3() -{ - int i; - - rcnt3Count = 0; - rcnt3Valid = 0; - _alarm_unk = 0; - for (i=0; i<0x40; i++) rcnt3TargetNum[i] = 0; - - __EnableIntc(INTC_TIM3); -} - -//////////////////////////////////////////////////////////////////// -//80002840 -//////////////////////////////////////////////////////////////////// -void _excepRet(u32 eretpc, u32 v1, u32 a, u32 a1, u32 a2) -{ - __asm__("sw $31, %0\n" - "sw $sp, %1\n" - : "=m"(excepRA), "=m"(excepSP) : ); - __asm__("mtc0 $4, $14\n" - "sync\n" - "daddu $3, $5, $0\n" - "daddu $4, $6, $0\n" - "daddu $5, $7, $0\n" - "daddu $6, $8, $0\n" - "mfc0 $26, $12\n" - "ori $26, 0x12\n" - "mtc0 $26, $12\n" - "sync\n" - "eret\n" - "nop\n"); -} - -//////////////////////////////////////////////////////////////////// -//80002880 SYSCALL 005 RFU005 -//////////////////////////////////////////////////////////////////// -void _RFU005() -{ - __asm__ ( - ".set noat\n" - - "mfc0 $26, $12\n" - "ori $1, $0, 0xFFE4\n" - "and $26, $1\n" - "mtc0 $26, $12\n" - "sync\n" - - "lw $ra, excepRA\n" - "lw $sp, excepSP\n" - "jr $ra\n" - "nop\n" - - ".set at\n"); -} - -//////////////////////////////////////////////////////////////////// -//A00028C0 SYSCALL 097 EnableCache -//////////////////////////////////////////////////////////////////// -int _EnableCache(int cache) -{ - u32 cfg; - __asm__("mfc0 %0, $16\n" : "=r"(cfg) : ); - cfg |= ((cache&3)<<16); - __asm__("mtc0 %0, $16\n" - "sync\n" : : "r"(cfg) ); -} - -//////////////////////////////////////////////////////////////////// -//A0002980 SYSCALL 098 DisableCache -//////////////////////////////////////////////////////////////////// -int _DisableCache(int cache) -{ - u32 cfg; - __asm__("mfc0 %0, $16\n" : "=r"(cfg) : ); - cfg &= ~((cache&3)<<16); - __asm__("mtc0 %0, $16\n" - "sync\n" : : "r"(cfg) ); -} - -//////////////////////////////////////////////////////////////////// -//A0002A40 SYSCALL 100 FlushCache -//////////////////////////////////////////////////////////////////// -void _FlushCache(int op) -{ - if( op == 0 ) FlushInstructionCache(); - else if ( op == 1 ) FlushSecondaryCache(); - else if( op == 2 ) FlushDataCache(); - else { - FlushSecondaryCache(); - FlushDataCache(); - } -} - -//////////////////////////////////////////////////////////////////// -//80002AC0 -//////////////////////////////////////////////////////////////////// -void FlushInstructionCache() -{ -} - -//////////////////////////////////////////////////////////////////// -//80002A80 -//////////////////////////////////////////////////////////////////// -void FlushDataCache() -{ -} - -//////////////////////////////////////////////////////////////////// -//80002B00 -//////////////////////////////////////////////////////////////////// -void FlushSecondaryCache() -{ -} - -//////////////////////////////////////////////////////////////////// -//A0002B40 SYSCALL 101,105 _105 -//////////////////////////////////////////////////////////////////// -void _105(int op1, int op2) -{ - // flushing caches again -} - -//////////////////////////////////////////////////////////////////// -//A0002C00 SYSCALL 096 KSeg0 -//////////////////////////////////////////////////////////////////// -void _KSeg0(u32 arg) -{ - u32 cfg; - __asm__("mfc0 %0, $16\n" : "=r"(cfg) : ); - cfg = (arg&3)&((cfg>>3)<<3); // yes it is 0, don't ask - __asm__("mtc0 %0, $16\n" - "sync\n" : : "r"(cfg) ); -} - -//////////////////////////////////////////////////////////////////// -//80002C40 SYSCALL 099 GetCop0 -//////////////////////////////////////////////////////////////////// -int _GetCop0(int reg) -{ - return table_GetCop0[reg](reg); -} - -//////////////////////////////////////////////////////////////////// -//80002C58-80002D50 calls for table_GetCop0 -//////////////////////////////////////////////////////////////////// -int GetCop0_Index(int reg) { __asm__(" mfc0 $2, $0\n"); } -int GetCop0_Random(int reg) { __asm__(" mfc0 $2, $1\n"); } -int GetCop0_EntryLo0(int reg) { __asm__(" mfc0 $2, $2\n"); } -int GetCop0_EntryLo1(int reg) { __asm__(" mfc0 $2, $3\n"); } - -int GetCop0_Context(int reg) { __asm__(" mfc0 $2, $4\n"); } -int GetCop0_PageMask(int reg) { __asm__(" mfc0 $2, $5\n"); } -int GetCop0_Wired(int reg) { __asm__(" mfc0 $2, $6\n"); } -int GetCop0_Reg7(int reg) { return; } - -int GetCop0_BadVAddr(int reg) { __asm__(" mfc0 $2, $8\n"); } -int GetCop0_Count(int reg) { __asm__(" mfc0 $2, $9\n"); } -int GetCop0_EntryHi(int reg) { __asm__(" mfc0 $2, $10\n"); } -int GetCop0_Compare(int reg) { __asm__(" mfc0 $2, $11\n"); } - -int GetCop0_Status(int reg) { __asm__(" mfc0 $2, $12\n"); } -int GetCop0_Cause(int reg) { __asm__(" mfc0 $2, $13\n"); } -int GetCop0_ExceptPC(int reg) { __asm__(" mfc0 $2, $14\n"); } -int GetCop0_PRevID(int reg) { __asm__(" mfc0 $2, $15\n"); } - -int GetCop0_Config(int reg) { __asm__(" mfc0 $2, $16\n"); } -int GetCop0_Reg17(int reg) { return; } -int GetCop0_Reg18(int reg) { return; } -int GetCop0_Reg19(int reg) { return; } - -int GetCop0_Reg20(int reg) { return; } -int GetCop0_Reg21(int reg) { return; } -int GetCop0_Reg22(int reg) { return; } -int GetCop0_Reg23(int reg) { __asm__(" mfc0 $2, $23\n"); } - -int GetCop0_DebugReg24(int reg) { __asm__(" mfc0 $2, $24\n"); } -int GetCop0_Perf(int reg) { __asm__(" mfc0 $2, $25\n"); } -int GetCop0_Reg26(int reg) { return; } -int GetCop0_Reg27(int reg) { return; } - -int GetCop0_TagLo(int reg) { __asm__(" mfc0 $2, $28\n"); } -int GetCop0_TagHi(int reg) { __asm__(" mfc0 $2, $29\n"); } -int GetCop0_ErrorPC(int reg) { __asm__(" mfc0 $2, $30\n"); } -int GetCop0_Reg31(int reg) { return; } - -int (*table_GetCop0[32])(int reg) = { // 800124E8 - GetCop0_Index, GetCop0_Random, GetCop0_EntryLo0, GetCop0_EntryLo1, - GetCop0_Context, GetCop0_PageMask, GetCop0_Wired, GetCop0_Reg7, - GetCop0_BadVAddr, GetCop0_Count, GetCop0_EntryHi, GetCop0_Compare, - GetCop0_Status, GetCop0_Cause, GetCop0_ExceptPC, GetCop0_PRevID, - GetCop0_Config, GetCop0_Reg17, GetCop0_Reg18, GetCop0_Reg19, - GetCop0_Reg20, GetCop0_Reg21, GetCop0_Reg22, GetCop0_Reg23, - GetCop0_DebugReg24, GetCop0_Perf, GetCop0_Reg26, GetCop0_Reg27, - GetCop0_TagLo, GetCop0_TagHi, GetCop0_ErrorPC, GetCop0_Reg31 -}; - -//////////////////////////////////////////////////////////////////// -//80002D80 -//////////////////////////////////////////////////////////////////// -int SetCop0(int reg, int val) -{ - return table_SetCop0[reg](reg, val); -} - -//////////////////////////////////////////////////////////////////// -//80002D98-80002F74 calls for table_SetCop0 -//////////////////////////////////////////////////////////////////// -int SetCop0_Index(int reg, int val) { __asm__(" mfc0 $2, $0\nmtc0 %0, $0\nsync\n" : : "r"(val)); } -int SetCop0_Random(int reg, int val) { return -1; } -int SetCop0_EntryLo0(int reg, int val) { __asm__(" mfc0 $2, $2\nmtc0 %0, $2\nsync\n" : : "r"(val)); } -int SetCop0_EntryLo1(int reg, int val) { __asm__(" mfc0 $2, $3\nmtc0 %0, $3\nsync\n" : : "r"(val)); } - -int SetCop0_Context(int reg, int val) { __asm__(" mfc0 $2, $4\nmtc0 %0, $4\nsync\n" : : "r"(val)); } -int SetCop0_PageMask(int reg, int val) { __asm__(" mfc0 $2, $5\nmtc0 %0, $5\nsync\n" : : "r"(val)); } -int SetCop0_Wired(int reg, int val) { __asm__(" mfc0 $2, $6\nmtc0 %0, $6\nsync\n" : : "r"(val)); } -int SetCop0_Reg7(int reg, int val) { return -1; } - -int SetCop0_BadVAddr(int reg, int val) { return -1; } -int SetCop0_Count(int reg, int val) { __asm__(" mfc0 $2, $9\nmtc0 %0, $9\nsync\n" : : "r"(val)); } -int SetCop0_EntryHi(int reg, int val) { __asm__(" mfc0 $2, $10\nmtc0 %0, $10\nsync\n" : : "r"(val)); } -int SetCop0_Compare(int reg, int val) { __asm__(" mfc0 $2, $11\nmtc0 %0, $11\nsync\n" : : "r"(val)); } - -int SetCop0_Status(int reg, int val) { __asm__(" mfc0 $2, $12\nmtc0 %0, $12\nsync\n" : : "r"(val)); } -int SetCop0_Cause(int reg, int val) { return -1; } -int SetCop0_ExceptPC(int reg, int val) { __asm__(" mfc0 $2, $14\nmtc0 %0, $14\nsync\n" : : "r"(val)); } -int SetCop0_PRevID(int reg, int val) { return -1; } - -int SetCop0_Config(int reg, int val) { __asm__(" mfc0 $2, $16\nmtc0 %0, $16\nsync\n" : : "r"(val)); } -int SetCop0_Reg17(int reg, int val) { return -1; } -int SetCop0_Reg18(int reg, int val) { return -1; } -int SetCop0_Reg19(int reg, int val) { return -1; } - -int SetCop0_Reg20(int reg, int val) { return -1; } -int SetCop0_Reg21(int reg, int val) { return -1; } -int SetCop0_Reg22(int reg, int val) { return -1; } -int SetCop0_Reg23(int reg, int val) { __asm__(" mfc0 $2, $23\nmtc0 %0, $23\nsync\n" : : "r"(val)); } - -int SetCop0_DebugReg24(int reg, int val){ __asm__(" mfc0 $2, $24\nmtc0 %0, $24\nsync\n" : : "r"(val)); } -int SetCop0_Perf(int reg, int val) { __asm__(" mfc0 $2, $25\nmtc0 %0, $25\nsync\n" : : "r"(val)); } -int SetCop0_Reg26(int reg, int val) { return -1; } -int SetCop0_Reg27(int reg, int val) { return -1; } - -int SetCop0_TagLo(int reg, int val) { __asm__(" mfc0 $2, $28\nmtc0 %0, $28\nsync\n" : : "r"(val)); } -int SetCop0_TagHi(int reg, int val) { __asm__(" mfc0 $2, $29\nmtc0 %0, $29\nsync\n" : : "r"(val)); } -int SetCop0_ErrorPC(int reg, int val) { __asm__(" mfc0 $2, $30\nmtc0 %0, $30\nsync\n" : : "r"(val)); } -int SetCop0_Reg31(int reg, int val) { return -1; } - -int (*table_SetCop0[32])(int reg, int val) = { // 80012568 - SetCop0_Index, SetCop0_Random, SetCop0_EntryLo0, SetCop0_EntryLo1, - SetCop0_Context, SetCop0_PageMask, SetCop0_Wired, SetCop0_Reg7, - SetCop0_BadVAddr, SetCop0_Count, SetCop0_EntryHi, SetCop0_Compare, - SetCop0_Status, SetCop0_Cause, SetCop0_ExceptPC, SetCop0_PRevID, - SetCop0_Config, SetCop0_Reg17, SetCop0_Reg18, SetCop0_Reg19, - SetCop0_Reg20, SetCop0_Reg21, SetCop0_Reg22, SetCop0_Reg23, - SetCop0_DebugReg24, SetCop0_Perf, SetCop0_Reg26, SetCop0_Reg27, - SetCop0_TagLo, SetCop0_TagHi, SetCop0_ErrorPC, SetCop0_Reg31 -}; - -//////////////////////////////////////////////////////////////////// -//80002F80 SYSCALL 007 ExecPS2 -//////////////////////////////////////////////////////////////////// -int _ExecPS2(void * entry, void * gp, int argc, char ** argv) -{ - saveContext(); - __ExecPS2(entry, gp, argc, argv); - __asm__("mtc0 $2, $14\n" - "move $sp, %0\n" - "sd $2, 0x20($sp)\n" - : : "r"(SavedSP)); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80002FC0 SYSCALL 033 DeleteThread -//////////////////////////////////////////////////////////////////// -int _DeleteThread(int tid) -{ - register int ret __asm__("$2"); - register u32 curepc __asm__("$4"); - - saveContext(); - - ret = __DeleteThread(tid); - if (ret < 0) { - __asm__("lw $sp, %0\n" : : "m"(SavedSP)); - // make sure the return value is also stored - __asm__("sd $2, 0x20($sp)\n"); - - restoreContext(); - eret(); - } - - - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); // EPC - _ThreadHandler(curepc, SavedSP); // returns entry in $3, stack in $4 - - __asm__("mtc0 $2, $14\n" - "move $sp, $3\n"); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003040 SYSCALL 034 StartThread -//////////////////////////////////////////////////////////////////// -int _StartThread(int tid, void *arg) -{ - register int ret __asm__("$2"); - register u32 curepc __asm__("$4"); - - saveContext(); - - ret = __StartThread(tid, arg); - - if (ret < 0) { - __asm__("lw $sp, %0\n" : : "m"(SavedSP)); - // make sure the return value is also stored - __asm__("sd $2, 0x20($sp)\n"); - - restoreContext(); - eret(); - } - - - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); // EPC - _ThreadHandler(curepc, SavedSP); // returns entry in $3, stack in $4 - - __asm__("mtc0 $2, $14\n" - "move $sp, $3\n"); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//800030C0 SYSCALL 035 ExitThread -//////////////////////////////////////////////////////////////////// -int _ExitThread() -{ - saveContext(); - - __ExitThread(); - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003100 SYSCALL 036 ExitDeleteThread -//////////////////////////////////////////////////////////////////// -int _ExitDeleteThread() -{ - saveContext(); - - __ExitDeleteThread(); - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003140 SYSCALL 037 TerminateThread -//////////////////////////////////////////////////////////////////// -int _TerminateThread(int tid) -{ - register int ret __asm__("$2"); - register u32 curepc __asm__("$4"); - - saveContext(); - - ret = _iTerminateThread(tid); - - if( ret < 0 ) { - __asm__("lw $sp, %0\n" : : "m"(SavedSP)); - // make sure the return value is also stored - __asm__("sd $2, 0x20($sp)\n"); - - restoreContext(); - eret(); - } - - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); // EPC - _ThreadHandler(curepc, SavedSP); // returns entry in $3, stack in $4 - - __asm__("mtc0 $2, $14\n" - "move $sp, $3\n"); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//800031C0 SYSCALL 043 RotateThreadReadyQueue -//////////////////////////////////////////////////////////////////// -void _RotateThreadReadyQueue(int pri) -{ - register int ret __asm__("$2"); - register u32 curepc __asm__("$4"); - - ret = pri; - saveContext(); - - ret = _iRotateThreadReadyQueue(pri); - - if( ret < 0 ) { - __asm__("lw $sp, %0\n" : : "m"(SavedSP)); - // make sure the return value is also stored - __asm__("sd $2, 0x20($sp)\n"); - - restoreContext(); - eret(); - } - - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); // EPC - _ThreadHandler(curepc, SavedSP); // returns entry in $3, stack in $4 - - __asm__("mtc0 $2, $14\n" - "move $sp, $3\n"); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003240 SYSCALL 045 ReleaseWaitThread -//////////////////////////////////////////////////////////////////// -void _ReleaseWaitThread(int tid) -{ - register int ret __asm__("$2"); - register u32 curepc __asm__("$4"); - - ret = tid; - saveContext(); - - ret = _iReleaseWaitThread(tid); - - if( ret < 0 ) { - __asm__("lw $sp, %0\n" : : "m"(SavedSP)); - // make sure the return value is also stored - __asm__("sd $2, 0x20($sp)\n"); - - restoreContext(); - eret(); - } - - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); // EPC - _ThreadHandler(curepc, SavedSP); // returns entry in $3, stack in $4 - - __asm__("mtc0 $2, $14\n" - "move $sp, $3\n"); - - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//800032C0 SYSCALL 052 SleepThread -//////////////////////////////////////////////////////////////////// -int _SleepThread() -{ - register int ret __asm__("$2"); - - ret = threadId; - saveContext(); - - ret = __SleepThread(); - if (ret < 0) { - register int curepc __asm__("$4"); - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ChangeThread(curepc, SavedSP, 1); - - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); - } - - __asm__("lw $sp, %0\n" - "sd %1, 0x20($sp)\n" : : "m"(SavedSP), "r"(ret) ); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003340 SYSCALL 051 WakeupThread -//////////////////////////////////////////////////////////////////// -int _WakeupThread(int tid) -{ - register int ret __asm__("$2"); - - ret = tid; - saveContext(); - - ret = iWakeupThread(tid); - if( ret >= 0 ) { - register int curepc __asm__("$4"); - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ThreadHandler(curepc, SavedSP); - - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); - } - - __asm__("lw $sp, %0\n" - "sd %1, 0x20($sp)\n" : : "m"(SavedSP), "r"(ret) ); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//800033C0 SYSCALL 057 ResumeThread -//////////////////////////////////////////////////////////////////// -int _ResumeThread(int tid) -{ - register int ret __asm__("$2"); - - ret = tid; - saveContext(); - - ret = _iResumeThread(tid); - if( ret >= 0 ) { - register int curepc __asm__("$4"); - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ThreadHandler(curepc, SavedSP); - - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); - } - - __asm__("lw $sp, %0\n" - "sd %1, 0x20($sp)\n" : : "m"(SavedSP), "r"(ret) ); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003440 SYSCALL 068 WaitSema -//////////////////////////////////////////////////////////////////// -int _WaitSema(int sid) -{ - register int ret __asm__("$2"); - - ret = sid; - saveContext(); - - ret = _iWaitSema(sid); - if( ret == 0xFFFFFFFE ) { - register int curepc __asm__("$4"); - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ChangeThread(curepc, SavedSP, 2); - - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); - } - - __asm__("lw $sp, %0\n" : : "m"(SavedSP)); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//800034C0 SYSCALL 066 SignalSema -//////////////////////////////////////////////////////////////////// -void _SignalSema(int sid) -{ - register int ret __asm__("$2"); - - ret = sid; - saveContext(); - - ret = _iSignalSema(sid); - if( ret >= 0 ) { - register int curepc __asm__("$4"); - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ThreadHandler(curepc, SavedSP); - - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); - } - - __asm__("lw $sp, %0\n" - "sd %1, 0x20($sp)\n" : : "m"(SavedSP), "r"(ret) ); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003540 SYSCALL 065 DeleteSema -//////////////////////////////////////////////////////////////////// -int _DeleteSema(int sid) -{ - register int ret __asm__("$2"); - - ret = sid; - saveContext(); - - ret = _iDeleteSema(sid); - if( ret >= 0 ) { - register int curepc __asm__("$4"); - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ThreadHandler(curepc, SavedSP); - - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); - } - - __asm__("lw $sp, %0\n" - "sd %1, 0x20($sp)\n" : : "m"(SavedSP), "r"(ret) ); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//800035C0 SYSCALL 041 ChangeThreadPriority -//return has to be void (even though it fills in v0) -//////////////////////////////////////////////////////////////////// -void _ChangeThreadPriority(int tid, int prio) -{ - register int ret __asm__("$2"); - - saveContext(); - ret = _iChangeThreadPriority(tid, prio); - - __asm__("lw $26, %0\n" - "sd %1, 0x20($26)\n" : : "m"(SavedSP), "r"(ret) ); - - if (ret>=0){ - register int curepc __asm__("$4"); - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ThreadHandler(curepc, SavedSP); - - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); - } - - // why twice? - __asm__("lw $sp, %0\n" - "sd %1, 0x20($sp)\n" : : "m"(SavedSP), "r"(ret) ); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//8000363C -//////////////////////////////////////////////////////////////////// -void __ThreadHandler() -{ - register int curepc __asm__("$4"); - - saveContext(); - - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - _ThreadHandler(curepc, SavedSP); - __asm__("mtc0 $2, $14\n" - "sync\n" - "move $sp, $3\n"); - restoreContext(); - eret(); -} - -//////////////////////////////////////////////////////////////////// -//80003680 -//////////////////////////////////////////////////////////////////// -void saveContext() -{ - __asm__ ( - "lui $26, %hi(SavedSP)\n" - "lq $26, %lo(SavedSP)($26)\n" - ); - __asm__ ( - "addiu $26, %0\n" - : : "i"(-sizeof(struct threadCtx)) - ); - __asm__ ( - ".set noat\n" - "lui $1, %hi(SavedAT)\n" - "lq $1, %lo(SavedAT)($1)\n" - "sq $1, 0x000($26)\n" - "sq $2, 0x010($26)\n" - "sq $3, 0x020($26)\n" - "sq $4, 0x030($26)\n" - "sq $5, 0x040($26)\n" - "sq $6, 0x050($26)\n" - "sq $7, 0x060($26)\n" - "sq $8, 0x070($26)\n" - "sq $9, 0x080($26)\n" - "sq $10, 0x090($26)\n" - "sq $11, 0x0A0($26)\n" - "sq $12, 0x0B0($26)\n" - "sq $13, 0x0C0($26)\n" - "sq $14, 0x0D0($26)\n" - "sq $15, 0x0E0($26)\n" - "sq $16, 0x0F0($26)\n" - "sq $17, 0x100($26)\n" - "sq $18, 0x110($26)\n" - "sq $19, 0x120($26)\n" - "sq $20, 0x130($26)\n" - "sq $21, 0x140($26)\n" - "sq $22, 0x150($26)\n" - "sq $23, 0x160($26)\n" - "sq $24, 0x170($26)\n" - "sq $25, 0x180($26)\n" - "sq $gp, 0x190($26)\n" - "lui $1, %hi(SavedSP)\n" - "lq $sp, %lo(SavedSP)($1)\n" - "sq $sp, 0x1A0($26)\n" - "sq $fp, 0x1B0($26)\n" - "lui $1, %hi(SavedRA)\n" - "lq $1, %lo(SavedRA)($1)\n" - "sq $1, 0x1C0($26)\n" - - "swc1 $0, 0x200($26)\n" - "swc1 $1, 0x204($26)\n" - "swc1 $2, 0x208($26)\n" - "swc1 $3, 0x20C($26)\n" - "swc1 $4, 0x210($26)\n" - "swc1 $5, 0x214($26)\n" - "swc1 $6, 0x218($26)\n" - "swc1 $7, 0x21C($26)\n" - "swc1 $8, 0x220($26)\n" - "swc1 $9, 0x224($26)\n" - "swc1 $10, 0x228($26)\n" - "swc1 $11, 0x22C($26)\n" - "swc1 $12, 0x230($26)\n" - "swc1 $13, 0x234($26)\n" - "swc1 $14, 0x238($26)\n" - "swc1 $15, 0x23C($26)\n" - "swc1 $16, 0x240($26)\n" - "swc1 $17, 0x244($26)\n" - "swc1 $18, 0x248($26)\n" - "swc1 $19, 0x24C($26)\n" - "swc1 $20, 0x250($26)\n" - "swc1 $21, 0x254($26)\n" - "swc1 $22, 0x258($26)\n" - "swc1 $23, 0x25C($26)\n" - "swc1 $24, 0x260($26)\n" - "swc1 $25, 0x264($26)\n" - "swc1 $26, 0x268($26)\n" - "swc1 $27, 0x26C($26)\n" - "swc1 $28, 0x270($26)\n" - "swc1 $29, 0x274($26)\n" - "swc1 $30, 0x278($26)\n" - "swc1 $31, 0x27C($26)\n" - - "mfsa $1\n" - "sw $1, 0x1F0($26)\n" - - "cfc1 $1, $31\n" - "sw $1, 0x1F4($26)\n" - - "lui $1, 0x8000\n" - "mtc1 $1, $1\n" - "mtc1 $1, $0\n" - "madd.s $f0, $f0, $f1\n" - "swc1 $0, 0x1F8($26)\n" - - "mfhi $1\n" - "sd $1, 0x1D0($26)\n" - "mfhi1 $1\n" - "sd $1, 0x1D8($26)\n" - - "mflo $1\n" - "sd $1, 0x1E0($26)\n" - "mflo1 $1\n" - "sd $1, 0x1E8($26)\n" - - "lui $1, %hi(SavedSP)\n" - "sw $26, %lo(SavedSP)($1)\n" - - "jr $31\n" - "lui $1, 0x8000\n" - ".set at\n" - ); -} - -//////////////////////////////////////////////////////////////////// -//80003800 -//////////////////////////////////////////////////////////////////// -void restoreContext() -{ - __asm__ ( - ".set noat\n" - - "lui $26, 0x8000\n" - "mtc1 $26, $1\n" - "lwc1 $0, 0x1F8($sp)\n" - "adda.s $f0, $f1\n" - - "lw $26, 0x1F0($sp)\n" - "mtsa $26\n" - - "lw $26, 0x1F4($sp)\n" - "ctc1 $26, $31\n" - - "ld $26, 0x1D0($sp)\n" - "mthi $26\n" - "ld $26, 0x1D8($sp)\n" - "mthi1 $26\n" - - "ld $26, 0x1E0($sp)\n" - "mtlo $26\n" - "ld $26, 0x1E8($sp)\n" - "mtlo1 $26\n" - - "lq $1, 0x000($sp)\n" - "lq $2, 0x010($sp)\n" - "lq $3, 0x020($sp)\n" - "lq $4, 0x030($sp)\n" - "lq $5, 0x040($sp)\n" - "lq $6, 0x050($sp)\n" - "lq $7, 0x060($sp)\n" - "lq $8, 0x070($sp)\n" - "lq $9, 0x080($sp)\n" - "lq $10, 0x090($sp)\n" - "lq $11, 0x0A0($sp)\n" - "lq $12, 0x0B0($sp)\n" - "lq $13, 0x0C0($sp)\n" - "lq $14, 0x0D0($sp)\n" - "lq $15, 0x0E0($sp)\n" - "lq $16, 0x0F0($sp)\n" - "lq $17, 0x100($sp)\n" - "lq $18, 0x110($sp)\n" - "lq $19, 0x120($sp)\n" - "lq $20, 0x130($sp)\n" - "lq $21, 0x140($sp)\n" - "lq $22, 0x150($sp)\n" - "lq $23, 0x160($sp)\n" - "lq $24, 0x170($sp)\n" - "lq $25, 0x180($sp)\n" - "lq $gp, 0x190($sp)\n" - "lq $fp, 0x1B0($sp)\n" - - "lwc1 $0, 0x200($sp)\n" - "lwc1 $1, 0x204($sp)\n" - "lwc1 $2, 0x208($sp)\n" - "lwc1 $3, 0x20C($sp)\n" - "lwc1 $4, 0x210($sp)\n" - "lwc1 $5, 0x214($sp)\n" - "lwc1 $6, 0x218($sp)\n" - "lwc1 $7, 0x21C($sp)\n" - "lwc1 $8, 0x220($sp)\n" - "lwc1 $9, 0x224($sp)\n" - "lwc1 $10, 0x228($sp)\n" - "lwc1 $11, 0x22C($sp)\n" - "lwc1 $12, 0x230($sp)\n" - "lwc1 $13, 0x234($sp)\n" - "lwc1 $14, 0x238($sp)\n" - "lwc1 $15, 0x23C($sp)\n" - "lwc1 $16, 0x240($sp)\n" - "lwc1 $17, 0x244($sp)\n" - "lwc1 $18, 0x248($sp)\n" - "lwc1 $19, 0x24C($sp)\n" - "lwc1 $20, 0x250($sp)\n" - "lwc1 $21, 0x254($sp)\n" - "lwc1 $22, 0x258($sp)\n" - "lwc1 $23, 0x25C($sp)\n" - "lwc1 $24, 0x260($sp)\n" - "lwc1 $25, 0x264($sp)\n" - "lwc1 $26, 0x268($sp)\n" - "lwc1 $27, 0x26C($sp)\n" - "lwc1 $28, 0x270($sp)\n" - "lwc1 $29, 0x274($sp)\n" - "lwc1 $30, 0x278($sp)\n" - "lwc1 $31, 0x27C($sp)\n" - "daddu $26, $31, $0\n" - "lq $31, 0x1C0($sp)\n" - "jr $26\n" - "lq $sp, 0x1A0($sp)\n" - ".set at\n" - ); -} - -//////////////////////////////////////////////////////////////////// -//80003940 -//////////////////////////////////////////////////////////////////// -void _ThreadHandler(u32 epc, u32 stack) -{ - register int tid; - - threads_array[threadId].entry =(void*)epc; - threads_array[threadId].status =THS_READY; - threads_array[threadId].stack_res =(void*)stack; - - for ( ; threadPrio < 129; threadPrio++) - if ((thread_ll_priorities[threadPrio].next != - &thread_ll_priorities[threadPrio]) || - (thread_ll_priorities[threadPrio].prev != - &thread_ll_priorities[threadPrio])){ - tid=threadId=(( (u32)thread_ll_priorities[threadPrio].prev - - (u32)threads_array)*0x286BCA1B)>>2; - break; - } - - if (threadPrio>=129){ - __printf("# No active threads\n"); - Exit(1); - tid=0; - } - - threads_array[tid].status=THS_RUN; - - if (threads_array[tid].waitSema){ - threads_array[tid].waitSema=0; - *(u32*)((u32)threads_array[tid].stack_res + 0x20) = -1; - } - - __asm__("move $2, %0\n" - "move $3, %1\n" - : : "r"(threads_array[tid].entry), "r"(threads_array[tid].stack_res) ); -} - -//////////////////////////////////////////////////////////////////// -//80003A78 -//////////////////////////////////////////////////////////////////// -void _ChangeThread(u32 entry, u32 stack_res, int waitSema) -{ - struct TCB *th; - struct ll *l, *p; - int prio; - - th = &threads_array[threadId]; - th->status = THS_WAIT; - th->waitSema = waitSema; - th->entry = (void (*)(void*))entry; - th->stack_res = (void*)stack_res; - - prio = threadPrio; - for (l = &thread_ll_priorities[prio]; ; l++, prio++) { - if (prio >= 129) { - __printf("# No active threads\n"); - Exit(1); l = 0; break; - } - - if (l->next != l) { p = l->next; break; } - if (l->prev == l) continue; - p = l->prev; break; - } - - if (l) { - threadPrio = prio; - threadId = (((u32)p - (u32)threads_array) * 0x286BCA1B) / 4; - } - - th = &threads_array[threadId]; - th->status = THS_RUN; - if (th->waitSema) { - th->waitSema = 0; - *(s64*)((u32)th->stack_res+0x20) = -1; - } - - __asm__("move $2, %0\n" - "move $3, %1\n" - : : "r"(th->entry), "r"(th->stack_res) ); -} - -//////////////////////////////////////////////////////////////////// -//80003C50 SYSCALL 032 CreateThread -//////////////////////////////////////////////////////////////////// -int _CreateThread(struct ThreadParam *param) -{ - struct TCB *th; - struct threadCtx *thctx; - int index; - int *ptr; - - th = (struct TCB *)LL_unlink((struct ll*)&thread_ll_free); - if (th == NULL) { - __printf("%s: failed to get free thread\n", __FUNCTION__); - return -1; - } - - threads_count++; - index=(((u32)th-(u32)threads_array) * 0x286BCA1B)/4; - - th->entry = param->entry; - th->stack_res = param->stack + param->stackSize - STACK_RES; - th->status = THS_DORMANT; - th->gpReg = param->gpReg; - th->initPriority = param->initPriority; - th->argstring = 0; - th->wakeupCount = 0; - th->semaId = 0; - th->stack = param->stack; - th->argc = 0; - th->entry_ = param->entry; - th->heap_base = threads_array[threadId].heap_base; - th->stackSize = param->stackSize; - th->currentPriority = param->initPriority; - th->waitSema = 0; - th->root = threads_array[threadId].root; - - thctx = th->stack_res; - thctx->gp = (u32)param->gpReg; - thctx->sp = (u32)&thctx[1]; - thctx->fp = (u32)&thctx[1]; - thctx->ra = (u32)threads_array[threadId].root; - - return index; -} - -//////////////////////////////////////////////////////////////////// -//80003E00 SYSCALL 37 iTerminateThread -//////////////////////////////////////////////////////////////////// -int _iTerminateThread(int tid) -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//80003F00 -//////////////////////////////////////////////////////////////////// -int __DeleteThread(int tid) -{ - if ((tid>=256) || (tid==threadId) || (threads_array[tid].status!=THS_DORMANT)) - return -1; - - releaseTCB(tid); - return tid; -} - -//////////////////////////////////////////////////////////////////// -//80003F70 -//////////////////////////////////////////////////////////////////// -int __StartThread(int tid, void *arg) -{ - if ((tid>=256) || (tid==threadId) || (threads_array[tid].status!=THS_DORMANT)) - return -1; - - threads_array[tid].argstring = arg; - ((void**)threads_array[tid].stack_res)[0x10] = arg; //a0 - thread_2_ready(tid); - return tid; -} - -//////////////////////////////////////////////////////////////////// -//80003FF8 -//////////////////////////////////////////////////////////////////// -int __ExitThread() -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//80004110 -//////////////////////////////////////////////////////////////////// -int __ExitDeleteThread() -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//80004228 SYSCALL 39 DisableDispatchThread -//////////////////////////////////////////////////////////////////// -int _DisableDispatchThread() -{ - __printf("# DisableDispatchThread is not supported in this version\n"); - return threadId; -} - -//////////////////////////////////////////////////////////////////// -//80004258 SYSCALL 40 EnableDispatchThread -//////////////////////////////////////////////////////////////////// -int _EnableDispatchThread() -{ - __printf("# EnableDispatchThread is not supported in this version\n"); - return threadId; -} - -//////////////////////////////////////////////////////////////////// -//80004288 SYSCALL 042 iChangeThreadPriority -//////////////////////////////////////////////////////////////////// -int _iChangeThreadPriority(int tid, int prio) -{ - short oldPrio; - - if ((tid >= 256) || (prio < 0) || (prio >= 128)) return -1; - - if (tid == 0) tid = threadId; - if (threads_array[tid].status == 0) return -1; - if ((0 < (threads_array[tid].status ^ 0x10)) == 0) return -1; - - oldPrio = threads_array[tid].currentPriority; - if ((tid != threadId) && (threads_array[tid].status != THS_READY)) { - threads_array[tid].currentPriority = prio; - return oldPrio; - } - - if (threadPrio < prio) threadStatus = 1; - - unsetTCB(tid); - threads_array[tid].currentPriority = prio; - thread_2_ready(tid); - - return oldPrio; -} - -//////////////////////////////////////////////////////////////////// -//80004388 SYSCALL 044 iRotateThreadReadyQueue -//////////////////////////////////////////////////////////////////// -int _iRotateThreadReadyQueue(int prio) -{ - if (prio >= 128) return -1; - - LL_rotate(&thread_ll_priorities[prio]); - return prio; -} - -//////////////////////////////////////////////////////////////////// -//800043D0 SYSCALL 046 iReleaseWaitThread -//////////////////////////////////////////////////////////////////// -int _iReleaseWaitThread(int tid) -{ - if( (u32)(tid-1) >= 255 ) - return -1; - - if( (u32)threads_array[tid].status >= 17 ) - return tid; - - switch(threads_array[tid].status) { - case 0: - return -1; - case THS_WAIT: { - //443C - if( threads_array[tid].waitSema == 2 ) { - LL_unlinkthis((struct ll*)&threads_array[tid]); - semas_array[threads_array[tid].semaId].wait_threads--; - } - - int threadPrioOld = threadPrio; - threads_array[tid].status = THS_READY; - thread_2_ready(tid); - - if( threadPrio < threadPrioOld ) { - threadStatus = 1; - } - break; - } - case (THS_WAIT|THS_SUSPEND): - threads_array[tid].status = THS_SUSPEND; - if( threads_array[tid].waitSema != 2 ) - return tid; - - LL_unlinkthis((struct ll*)&threads_array[tid]); - semas_array[threads_array[tid].semaId].wait_threads--; - break; - } - - return tid; -} - -//////////////////////////////////////////////////////////////////// -//80004548 SYSCALL 047 GetThreadId -//////////////////////////////////////////////////////////////////// -int _GetThreadId() -{ - return threadId; -} - -//////////////////////////////////////////////////////////////////// -//80004558 SYSCALL 048 ReferThreadStatus -//////////////////////////////////////////////////////////////////// -int _ReferThreadStatus(int tid, struct ThreadParam *info) -{ - if (tid >= 256) return -1; - if (tid == 0) tid = threadId; - - if (info != NULL) { - info->entry = threads_array[tid].entry; - info->status = threads_array[tid].status; - info->stack = threads_array[tid].stack; - info->stackSize = threads_array[tid].stackSize; - info->gpReg = threads_array[tid].gpReg; - info->initPriority = threads_array[tid].initPriority; - info->currentPriority = threads_array[tid].currentPriority; - info->attr = threads_array[tid].attr; - info->waitSema = threads_array[tid].waitSema; - info->option = threads_array[tid].option; - info->waitId = threads_array[tid].semaId; - info->wakeupCount = threads_array[tid].wakeupCount; - } - - return threads_array[tid].status; -} - -//////////////////////////////////////////////////////////////////// -//80004658 -//////////////////////////////////////////////////////////////////// -int __SleepThread() -{ - if (threads_array[threadId].wakeupCount <= 0) { - unsetTCB(threadId); - return -1; - } - - threads_array[threadId].wakeupCount--; - return threadId; -} - -//////////////////////////////////////////////////////////////////// -//800046B0 SYSCALL 052 iWakeupThread -//////////////////////////////////////////////////////////////////// -int _iWakeupThread(int tid) -{ - register int prio; - - if (tid>=256) return -1; - - if (tid==0) tid = threadId; - - switch (threads_array[tid].status){ - case THS_WAIT: - if (threads_array[tid].waitSema=1){ - prio=threadPrio; - thread_2_ready(tid); - if (threadPrio=256) return -1; - tid = tid ? tid : threadId; - ret=threads_array[tid].wakeupCount; - threads_array[tid].wakeupCount=0; - return ret; -} - -//////////////////////////////////////////////////////////////////// -//800049B0 SYSCALL 080 RFU080_CreateEventFlag -//////////////////////////////////////////////////////////////////// -int _CreateEventFlag() -{ - return threads_count; // CreateEventFlag, why!?! -} - -//////////////////////////////////////////////////////////////////// -//800049C0 SYSCALL 064 CreateSema -//////////////////////////////////////////////////////////////////// -int _CreateSema(struct SemaParam *sema) -{ - register struct kSema *crt=semas_last; - - if ((crt==NULL) || (sema->init_count<0)) return -1; - - crt->wait_prev = (struct TCB*)&crt->wait_next; - semas_count++; - crt->count =sema->init_count; - crt->wait_next =(struct TCB*)&crt->wait_next; - semas_last = crt->free; - crt->max_count =sema->max_count; - crt->free =NULL; - crt->attr =sema->attr; - crt->wait_threads=0; - crt->option =sema->option; - - return (crt-semas_array); //sizeof(kSema)==32 -} - -//////////////////////////////////////////////////////////////////// -//80004A48 SYSCALL 073 iDeleteSema -//////////////////////////////////////////////////////////////////// -int _iDeleteSema(int sid) -{ - register thid, thprio; - if ((sid>=MAX_SEMAS) || (semas_array[sid].count<0)) return -1; - - semas_count--; - while (semas_array[sid].wait_threads>0){ - thid=(((u32)LL_unlink((struct ll*)&semas_array[sid].wait_next)-(u32)threads_array) * 0x286BCA1B)/4; - LL_unlinkthis((struct ll*)&threads_array[thid]); - semas_array[sid].wait_threads--; - if (threads_array[thid].status==THS_WAIT){ - thprio=threadPrio; - thread_2_ready(thid); - if (threadPrio=MAX_SEMAS) || (semas_array[sid].count<0)) return -1; - - if (semas_array[sid].wait_threads>0){ - thid=(((u32)LL_unlink((struct ll*)&semas_array[sid].wait_next)-(u32)threads_array)*0x286BCA1B)/4; - - LL_unlinkthis((struct ll*)&threads_array[thid]); - - semas_array[sid].wait_threads--; - - if (threads_array[thid].status==THS_WAIT){ - prio=threadPrio; - thread_2_ready(thid); - if (threadPrio < prio) - threadStatus=THS_RUN; - threads_array[thid].waitSema=0; //just a guess:P - } - else if (threads_array[thid].status==(THS_WAIT|THS_SUSPEND)){ - threads_array[thid].status =THS_SUSPEND; - threads_array[thid].waitSema=0; - } - }else - semas_array[sid].count++; - return sid; -} - -//////////////////////////////////////////////////////////////////// -//80004CF8 -//////////////////////////////////////////////////////////////////// -int _iWaitSema(int sid) -{ - if ((sid>=MAX_SEMAS) || (semas_array[sid].count<0)) return -1; - - if (semas_array[sid].count>0){ - semas_array[sid].count--; - return sid; - } - - semas_array[sid].wait_threads++; - - unsetTCB(threadId); - LL_add((struct ll*)&semas_array[sid].wait_next, (struct ll*)&threads_array[threadId]); - threads_array[threadId].semaId=sid; - - return -2; -} - -//////////////////////////////////////////////////////////////////// -//80004DC8 SYSCALL 069 PollSema, 070 iPollSema -//////////////////////////////////////////////////////////////////// -int _PollSema(int sid) -{ - if ((sid>=MAX_SEMAS) || (semas_array[sid].count<=0)) return -1; - - semas_array[sid].count--; - - return sid; -} - -//////////////////////////////////////////////////////////////////// -//80004E00 SYSCALL 071 ReferSemaStatus, 072 iReferSemaStatus -//////////////////////////////////////////////////////////////////// -int _ReferSemaStatus(int sid, struct SemaParam *sema) -{ - if ((sid>=MAX_SEMAS) || (semas_array[sid].count<0)) return -1; - - sema->count =semas_array[sid].count; - sema->max_count =semas_array[sid].max_count; - sema->wait_threads =semas_array[sid].wait_threads; - sema->attr =semas_array[sid].attr; - sema->option =semas_array[sid].option; - - return sid; -} - -//////////////////////////////////////////////////////////////////// -//80004E58 SYSCALL 081 RFU081_DeleteEventFlag -//////////////////////////////////////////////////////////////////// -int _DeleteEventFlag() -{ - return semas_count; // DeleteEventFlag, why!?! -} - -//////////////////////////////////////////////////////////////////// -//80004E68 -//////////////////////////////////////////////////////////////////// -int _SemasInit() -{ - int i; - - for (i=0; i<256; i++) { - semas_array[i].free = &semas_array[i+1]; - semas_array[i].count = -1; - semas_array[i].wait_threads = 0; - semas_array[i].wait_next = (struct TCB*)&semas_array[i].wait_next; - semas_array[i].wait_prev = (struct TCB*)&semas_array[i].wait_next; - } - semas_array[255].free = 0; - - semas_last = semas_array; - semas_count = 0; - - return 256; -} - -//////////////////////////////////////////////////////////////////// -//80004EC8 -//////////////////////////////////////////////////////////////////// -void __load_module_EENULL() -{ - int i; - - thread_ll_free.prev = &thread_ll_free; - thread_ll_free.next = &thread_ll_free; - - for (i=0; i<128; i++) { - thread_ll_priorities[i].prev = &thread_ll_priorities[i]; - thread_ll_priorities[i].next = &thread_ll_priorities[i]; - } - - threads_count = 0; - threadId = 0; - threadPrio = 0; - - for (i=0; i<256; i++) { - threads_array[i].status = 0; - LL_add(&thread_ll_free, (struct ll*)&threads_array[i]); - } - - _SemasInit(); - - threadStatus = 0; - __load_module("EENULL", (void (*)(void*))0x81FC0, (void*)0x81000, 0x80); -} - -//////////////////////////////////////////////////////////////////// -//80004FB0 -// makes the args from argc & argstring; args is in bss of program -//////////////////////////////////////////////////////////////////// -void _InitArgs(char *argstring, ARGS *args, int argc) -{ - int i; - char *p = args->args; - - args->argc = argc; - for (i=0; iargv[i] = p; //copy string pointer - while (*argstring) //copy the string itself - *p++ = *argstring++; - *p++ = *argstring++; //copy the '\0' - } -} - -//////////////////////////////////////////////////////////////////// -//80005198 SYSCALL 060 _InitializeMainThread -//////////////////////////////////////////////////////////////////// -void *_InitializeMainThread(u32 gp, void *stack, int stack_size, char *args, int root) -{ - struct TCB *th; - struct threadCtx *ctx; - - if ((int)stack == -1) - stack = (void*)((_GetMemorySize() - 4*1024) - stack_size); - - ctx = (struct threadCtx*)((u32)stack + stack_size - STACK_RES/4); - ctx->gp = gp; //+1C0 - ctx->ra = root; //+1F0 - ctx->fp = (u32)ctx+0x280; //+1E0 <- &280 - ctx->sp = (u32)ctx+0x280; //+1D0 <- &280 - - th = &threads_array[threadId]; - th->gpReg = (void*)gp; - th->stackSize = stack_size; - th->stack_res = ctx; - th->stack = stack; - th->root = (void*)root; - _InitArgs(th->argstring, (ARGS*)args, th->argc); - th->argstring = args; - - return ctx; -} - -//////////////////////////////////////////////////////////////////// -//800052A0 SYSCALL 061 RFU061_InitializeHeapArea -//////////////////////////////////////////////////////////////////// -void* _InitializeHeapArea(void *heap_base, int heap_size) -{ - void *ret; - - if (heap_size < 0) { - ret = threads_array[threadId].stack; - } else { - ret = heap_base + heap_size; - } - - threads_array[threadId].heap_base = ret; - return ret; -} - -//////////////////////////////////////////////////////////////////// -//800052D8 SYSCALL 062 RFU062_EndOfHeap -//////////////////////////////////////////////////////////////////// -void* _EndOfHeap() -{ - return threads_array[threadId].heap_base; -} - -//////////////////////////////////////////////////////////////////// -//80005390 -//////////////////////////////////////////////////////////////////// -int __load_module(char *name, void (*entry)(void*), void *stack_res, int prio) -{ - struct TCB *th; - int index; - int *ptr; - struct rominfo ri; - - th = (struct TCB*)LL_unlink(&thread_ll_free); - if (th) { - threads_count++; - index = (((u32)th-(u32)threads_array) * 0x286BCA1B)/4; - } else { - index = -1; - } - - threadId = index; - th->wakeupCount = 0; - th->semaId = 0; - th->attr = 0; - th->stack_res = stack_res; - th->option = 0; - th->entry = entry; - th->gpReg = 0; - th->currentPriority = prio; - th->status = THS_DORMANT; - th->waitSema = 0; - th->entry_ = entry; - th->argc = 0; - th->argstring = 0; - th->initPriority = prio; - - thread_2_ready(index); - - if (romdirGetFile(name, &ri) == NULL) { - __printf("# panic ! '%s' not found\n", name); - _Exit(1); - } - - if (ri.fileSize > 0) { - int i; - int *src = (int*)(0xbfc00000+ri.fileOffset); - int *dst = (int*)entry; - - for (i=0; i 0 ) { - int i; - for(i = 0; i < argc; ++i) - pbuf = strcpy(pbuf, argv[i]); - } - - threads_array[threadId].argc = argc+2; - threads_array[threadId].argstring = threadArgStrBuffer; - _CancelWakeupThread(threadId); - _iChangeThreadPriority(threadId, 0); - - // search for RESET - // search for filename romdir entry - if( romdirGetFile(filename, &ri) == NULL ) { - __printf("# panic ! '%s' not found\n", filename); - _Exit(); - } - - // terminate threads - curthreadid = 1; // skip main thread? - curtcb = &threads_array[curthreadid]; - - while(curthreadid < 256) { - if( curtcb->status && threadId != curthreadid ) { - if( curtcb->status == THS_DORMANT ) { - _DeleteThread(curthreadid); - } - else { - iTerminateThread(curthreadid); - _DeleteThread(curthreadid); - } - } - ++curthreadid; - ++curtcb; - } - - _SemasInit(); - threadStatus = 0; - InitPgifHandler2(); - - Restart(); - - if( ri.fileSize > 0 ) { - // copy to PS2_LOADADDR - int i; - u32* psrc = (u32*)(0xbfc00000+ri.fileOffset); - u32* pdst = (u32*)PS2_LOADADDR; - for(i = 0; i < ri.fileSize; i += 4) - *pdst++ = *psrc++; - } - - FlushInstructionCache(); - FlushDataCache(); - - __asm__("mtc0 %0, $14\n" - "sync\n" : : "r"(PS2_LOADADDR)); - erase_cpu_regs(); - __asm__("di\n" - "eret\n"); -} - -//////////////////////////////////////////////////////////////////// -//800057E8 -//////////////////////////////////////////////////////////////////// -void* __ExecPS2(void * entry, void * gp, int argc, char ** argv) -{ - char* pbuf = threadArgStrBuffer; - int i; - - if( argc > 0 ) { - for(i = 0; i < argc; ++i) - pbuf = eestrcpy(pbuf, argv[i]); - } - - threads_array[threadId].entry = entry; //0C - threads_array[threadId].wakeupCount = 0; //24 - threads_array[threadId].gpReg = gp; //14 - threads_array[threadId].semaId = 0; //20 - threads_array[threadId].argstring = threadArgStrBuffer; //38 - threads_array[threadId].argc = argc; //34 - threads_array[threadId].entry_ = entry; //30 - threads_array[threadId].currentPriority = 0; //18 - threads_array[threadId].waitSema = 0; //1C - threads_array[threadId].initPriority = 0; - FlushInstructionCache(); - FlushDataCache(); - - return entry; -} - -//////////////////////////////////////////////////////////////////// -//800058E8 -//////////////////////////////////////////////////////////////////// -int _ExecOSD(int argc, char **argv) -{ - return _LoadPS2Exe("rom0:OSDSYS", argc, argv); -} - -//////////////////////////////////////////////////////////////////// -//80005900 -//////////////////////////////////////////////////////////////////// -int _RFU004_Exit() -{ - char *bb = "BootBrowser"; - return _LoadPS2Exe("rom0:OSDSYS", 1, &bb); -} - -//////////////////////////////////////////////////////////////////// -//80005938 -//////////////////////////////////////////////////////////////////// -void releaseTCB(int tid) -{ - threads_count--; - threads_array[tid].status=0; - LL_add(&thread_ll_free, (struct ll*)&threads_array[tid]); -} - -//////////////////////////////////////////////////////////////////// -//80005978 -//////////////////////////////////////////////////////////////////// -void unsetTCB(int tid) -{ - if ((threads_array[tid].status) <= THS_READY) - LL_unlinkthis((struct ll*)&threads_array[tid]); -} - -//////////////////////////////////////////////////////////////////// -//800059B8 -//////////////////////////////////////////////////////////////////// -void thread_2_ready(int tid) -{ - threads_array[tid].status=THS_READY; - if (threads_array[tid].initPriority < threadPrio) - threadPrio=(short)threads_array[tid].initPriority; - LL_add( &thread_ll_priorities[threads_array[tid].initPriority], (struct ll*)&threads_array[tid] ); -} - -//////////////////////////////////////////////////////////////////// -//80005A58 -//////////////////////////////////////////////////////////////////// -struct ll* LL_unlink(struct ll *l) -{ - struct ll *p; - - if ((l==l->next) && (l==l->prev)) - return 0; - p=l->prev; - p->prev->next=p->next; - p->next->prev=p->prev; - return p; -} - -//////////////////////////////////////////////////////////////////// -//80005A98 -//////////////////////////////////////////////////////////////////// -struct ll* LL_rotate(struct ll *l) -{ - struct ll *p; - - if (p=LL_unlink(l)){ - p->prev=l; - p->next=l->next; - l->next->prev=p; - l->next=p; - return l->prev; - } - return NULL; -} - -//////////////////////////////////////////////////////////////////// -//80005AE8 -//////////////////////////////////////////////////////////////////// -struct ll *LL_unlinkthis(struct ll *l) -{ - l->prev->next=l->next; - l->next->prev=l->prev; - return l->next; -} - -//////////////////////////////////////////////////////////////////// -//80005B08 -//////////////////////////////////////////////////////////////////// -void LL_add(struct ll *l, struct ll *new) -{ - new->prev=l; - new->next=l->next; - l->next->prev=new; - l->next=new; -} - -//////////////////////////////////////////////////////////////////// -//80005B28 SYSCALL 9 (0x09) TlbWriteRandom -//////////////////////////////////////////////////////////////////// -int _TlbWriteRandom(u32 PageMask, u32 EntryHi, u32 EntryLo0, u32 EntryLo1) { - if ((EntryHi >> 24) != 4) return -1; - __asm__ ( - "mfc0 $2, $1\n" - "mtc0 $2, $0\n" - "mtc0 $4, $5\n" - "mtc0 $5, $10\n" - "mtc0 $6, $2\n" - "mtc0 $7, $3\n" - "sync\n" - "tlbwi\n" - "sync\n" - ); -} - -int _sifGetMSFLG() { - u32 msflg; - for (;;) { - msflg = SBUS_MSFLG; - __asm__ ("nop\nnop\nnop\nnop\nnop\nnop\nnop\nnop\n"); - __asm__ ("nop\nnop\nnop\nnop\nnop\nnop\nnop\nnop\n"); - __asm__ ("nop\nnop\nnop\nnop\nnop\nnop\nnop\nnop\n"); - - if (msflg == SBUS_MSFLG) return msflg; - } -} - -//////////////////////////////////////////////////////////////////// -//80005E58 -//////////////////////////////////////////////////////////////////// -int _sifGetSMFLG() { - u32 smflg; - for (;;) { - smflg = SBUS_SMFLG; - __asm__ ("nop\nnop\nnop\nnop\nnop\nnop\nnop\nnop\n"); - __asm__ ("nop\nnop\nnop\nnop\nnop\nnop\nnop\nnop\n"); - __asm__ ("nop\nnop\nnop\nnop\nnop\nnop\nnop\nnop\n"); - - if (smflg == SBUS_SMFLG) return smflg; - } -} - -int _ResetSif1() -{ - sif1tagdata = 0xFFFF001E; - //*(int*)0xa0001e330 = 0x20000000; - //*(int*)0xa0001e334 = (u32)ptag&0x0fffffff; - D6_QWC = 0; - D6_TAG = (u32)&sif1tagdata&0x0fffffff; -} - -//////////////////////////////////////////////////////////////////// -//80006198 -//////////////////////////////////////////////////////////////////// -void SifDmaInit() -{ - int msflg; - memset(sifEEbuff, 0, sizeof(sifEEbuff)); - memset(sifRegs, 0, sizeof(sifRegs)); - - *(u32*)0xB000F260 = 0xFF; - D5_CHCR = 0; - D6_CHCR = 0; - - _SifSetDChain(); - *(u32*)0xB000F200 = (u32)sifEEbuff; - __printf("MSFLG = 0x10000\n"); - SBUS_MSFLG = 0x10000; - msflg = SBUS_MSFLG; - _ResetSif1(); - _SifSetReg(1, 0); - - while (!(_SifGetReg(4) & 0x10000)) { __asm__ ("nop\nnop\nnop\nnop\n"); } - - sifIOPbuff = *(u32*)0xB000F210; - - SBUS_MSFLG = 0x20000; - SBUS_MSFLG; -} - -//////////////////////////////////////////////////////////////////// -//800062A0 SYSCALL 120 (0x78) SifSetDChain -//////////////////////////////////////////////////////////////////// -void _SifSetDChain(){ - int var_10; - - D5_CHCR = 0; - D5_QWC = 0; - D5_CHCR = 0x184; // 0001 1000 0100 - var_10 = D5_CHCR; // read? -} - -//////////////////////////////////////////////////////////////////// -//800062D8 SYSCALL 107 (0x6B) SifStopDma -//////////////////////////////////////////////////////////////////// -void _SifStopDma(){ - int var_10; - - D5_CHCR = 0; - D5_QWC = 0; - var_10 = D5_CHCR; // read? -} - -//////////////////////////////////////////////////////////////////// -//80006370 -//////////////////////////////////////////////////////////////////// -void _SifDmaSend(void *src, void *dest, int size, int attr, int id) -{ - int qwc; - struct TAG* t1; - int *t3; - int tocopy; - - if (((++tagindex) & 0xFF) == 31){ - tagindex=0; - transferscount++; - } - - qwc=(size+15)/16; //rount up - - t1=(struct TAG*)KSEG1_ADDR(&tadrptr[tagindex]); - if (attr & SIF_DMA_TAG) { - t1->id_qwc = (id << 16) | qwc | - ((attr & SIF_DMA_INT_I) ? 0x80000000 : 0); //IRQ - t1->addr=(u32)src & 0x1FFFFFFF; - t3=(int*)KSEG1_ADDR(src); - qwc--; - } - else { - if (qwc >= 8){ //two transfers - tocopy=7; - t1->id_qwc=0x30000008; //(id)REF | (qwc)8; - t1->addr=(u32)&extrastorage[tagindex] | 0x1FFFFFFF; - t3=(int*)KSEG1_ADDR(&extrastorage[tagindex]); - - if (((++tagindex) & 0xff) == 31){ - tagindex=0; - transferscount++; - } - - t1=(struct TAG*)KSEG1_ADDR(&tadrptr[tagindex]); - t1->id_qwc=(id << 16) | (qwc - 7) | - ((attr & SIF_DMA_INT_I) ? 0x80000000 : 0);//IRQ - t1->addr=(u32)(src+112) | 0x1FFFFFFF; - } - else { - tocopy=qwc; - t1->id_qwc=(id << 16) | (qwc+1) | - ((attr & SIF_DMA_INT_I) ? 0x80000000 : 0);//IRQ - t1->addr=(u32)&extrastorage[tagindex] & 0x1FFFFFFF; - t3=(int*)KSEG1_ADDR(&extrastorage[tagindex]); - } - memcpy((char*)t3+16, (void*)KSEG1_ADDR(src), tocopy*16);//inline with qwords - } - t3[1]=qwc * 4; - t3[0]=(u32)((u32)dest & 0x00FFFFFF) | - ((((u32)(attr & SIF_DMA_INT_O)) ? 0x40000000 : 0) | - (((u32)(attr & SIF_DMA_ERT)) ? 0x80000000 : 0)); -} - -//////////////////////////////////////////////////////////////////// -//800065C8 -//////////////////////////////////////////////////////////////////// -int _SifDmaCount() -{ - register int count; - - count=((D6_TAG-(u32)tadrptr) & 0x1FFFFFFF) >> 4; - - count=count>0? count-1:30; - - if (count == tagindex) - return (D6_QWC ? 30 : 31); - - if (count < tagindex) - return count + 30 - tagindex; - - return count-tagindex-1; -} - -//////////////////////////////////////////////////////////////////// -//80006650 -//////////////////////////////////////////////////////////////////// -void _SifDmaPrepare(int count) -{ - register struct TAG *t0; - - if (count==31) return; - - t0=(struct TAG*)KSEG1_ADDR(&tadrptr[tagindex]); - if (count == 30){ - t0->id_qwc &= DMA_TAG_IRQ|DMA_TAG_PCE; //keep PCE|REFE|IRQ - t0->id_qwc |= DMA_TAG_REF<<28; - t0->id_qwc |= D6_QWC; - t0->addr = D6_MADR; - D6_QWC = 0; - D6_TAG = KUSEG_ADDR(t0); - }else - t0->id_qwc |= DMA_TAG_REF<<28; -} - -//////////////////////////////////////////////////////////////////// -//800066F8 SYSCALL 119 (0x77) SifSetDma -//////////////////////////////////////////////////////////////////// -u32 _SifSetDma(SifDmaTransfer_t *sdd, int len) -{ - int var_10; - int count, tmp; - int i, c, _len = len; - int nextindex; - - DMAC_ENABLEW = DMAC_ENABLER | 0x10000; //suspend - - D6_CHCR = 0; //kill any previous transfer?!? - var_10 = D6_CHCR; // read? - - DMAC_ENABLEW = DMAC_ENABLER & ~0x10000; //enable - - count = _SifDmaCount(); - -lenloop: - i=0; c=0; - while (_len > 0) { - if (!(sdd[i].attr & SIF_DMA_TAG)) { - if (sdd[i].size <= 112) c++; - else c+=2; - } else c++; - _len--; i++; - } - if (count < c) { count = 0; goto lenloop; } - - nextindex = ((tagindex+1) % 31) & 0xff; - if (nextindex == 0) - tmp = (transferscount + 1) & 0xFFFF; - else - tmp = transferscount; - - _SifDmaPrepare(count); - - while (len > 0) { - _SifDmaSend(sdd->src, sdd->dest, sdd->size, sdd->attr, DMA_TAG_REF<<12);//REF >> 16 - sdd++; len--; - } - - _SifDmaSend(sdd->src, sdd->dest, sdd->size, sdd->attr, DMA_TAG_REFE<<12);//REFE >> 16 - - D6_CHCR|= 0x184; - var_10 = D6_CHCR; // read? - return (tmp<<16)|(nextindex<<8)|c; -} - -//////////////////////////////////////////////////////////////////// -//800068B0 SYSCALL 118 (0x76) SifDmaStat -//////////////////////////////////////////////////////////////////// -int _SifDmaStat(int id) -{ - //TODO - return 0; -} - -//////////////////////////////////////////////////////////////////// -//80006B60 SYSCALL 121 (0x79) SifSetDma -//////////////////////////////////////////////////////////////////// -int _SifSetReg(int reg, u32 val) -{ - __printf("%s: reg=%d; val=%x\n", __FUNCTION__, reg, val); - - if (reg == 1) { - *(u32*)0xB000F200 = val; - return *(u32*)0xB000F200; - } else - if (reg == 3) { - SBUS_MSFLG = val; - return _sifGetMSFLG(); - } else - if (reg == 4) { - SBUS_SMFLG = val; - return _sifGetSMFLG(); - } else - if (reg >= 0) { - return 0; - } - - reg&= 0x7FFFFFFF; - if (reg >= 32) return 0; - - sifRegs[reg] = val; - return val; -} - -//////////////////////////////////////////////////////////////////// -//80006C18 SYSCALL 122 (0x7A) SifSetDma -//////////////////////////////////////////////////////////////////// -int _SifGetReg(int reg) -{ - //__printf("%s: reg=%x\n", __FUNCTION__, reg); - - if (reg == 1) { - return *(u32*)0xB000F200; - } else - if (reg == 2) { - return *(u32*)0xB000F210; - } else - if (reg == 3) { - return _sifGetMSFLG(); - } else - if (reg == 4) { - return _sifGetSMFLG(); - } else - if (reg >= 0) { - return 0; - } - - reg&= 0x7FFFFFFF; - if (reg >= 32) return 0; - - //__printf("ret=%x\n", sifRegs[reg]); - return sifRegs[reg]; -} - -//////////////////////////////////////////////////////////////////// -//80007428 SYSCALL 117 print -//////////////////////////////////////////////////////////////////// -void _print() -{ -} - -//////////////////////////////////////////////////////////////////// -//800074D8 -//////////////////////////////////////////////////////////////////// -void _SetGsCrt2() -{ - u32 tmp; - - tmp = *(int*)0x8001F344; - if (tmp == 0x40 || tmp == 0x60 || tmp == 0x61) { - *(char*)0xbf803218 = 0; - *(char*)0xbf803218 = 2; - return; - } - - *(short*)0xbf801470 = 0; - *(short*)0xbf801472 = 0; - *(short*)0xbf801472 = 1; -} - -//////////////////////////////////////////////////////////////////// -//800076B0 -//////////////////////////////////////////////////////////////////// -void _iJoinThread(int param) -{ - //TODO -} - -//////////////////////////////////////////////////////////////////// -//80008A60 -//////////////////////////////////////////////////////////////////// -void _SetGsCrt3(short arg0, short arg1, short arg2) -{ - __printf("_SetGsCrt3 unimplemented\n"); -} - -//////////////////////////////////////////////////////////////////// -//80009CE0 -//////////////////////////////////////////////////////////////////// -void _SetGsCrt4(short arg0, short arg1, short arg2) -{ - __printf("_SetGsCrt4 unimplemented\n"); -} - -//////////////////////////////////////////////////////////////////// -//8000A060 SYSCALL 002 SetGsCrt -//////////////////////////////////////////////////////////////////// -void _SetGsCrt(short arg0, short arg1, short arg2) -{ - u64 val, val2; - u64 tmp; - int count; - - if (arg1 == 0) { - tmp = (hvParam >> 3) & 0x7; - tmp^= 0x2; - if (tmp == 0) arg1 = 3; - else arg1 = 2; - } - - for (count=0x270f; count >= 0; count--) { - __asm__ ("nop\nnop\nnop\nnop\nnop\nnop\n"); - } - - *(int*)0x8001F344 = 0; - - if (arg1 == 2) { - if (arg0 != 0) { - val = 0x740834504LL; - val2 = 0x740814504LL; - - tmp = (hvParam & 0x1) << 25; - val|= tmp; - val2|= tmp; - - GS_SMODE1 = val; - GS_SYNCH1 = 0x7F5B61F06F040LL; - GS_SYNCH2 = 0x33A4D8; - GS_SYNCV = 0xC7800601A01801LL; - - GS_SMODE2 = (arg2 << 1) | 1; - GS_SRFSH = 8; - GS_SMODE1 = val2; - } else { - val = 0x740834504LL; - val2 = 0x740814504LL; - - tmp = (hvParam & 0x2) << 35; - val|= tmp; - val2|= tmp; - - tmp = (hvParam & 0x1) << 25; - val|= tmp; - val2|= tmp; - - GS_SMODE1 = val; - GS_SYNCH1 = 0x7F5B61F06F040LL; - GS_SYNCH2 = 0x33A4D8; - GS_SYNCV = 0xC7800601A01802LL; - GS_SMODE2 = 0; - GS_SRFSH = 8; - GS_SMODE1 = val2; - } - _SetGsCrt2(); - return; - } - - if (arg1 == 3) { - if (arg0 != 0) { - val = 0x740836504LL; - val2 = 0x740816504LL; - - tmp = (hvParam & 0x1) << 25; - val|= tmp; - val2|= tmp; - - GS_SMODE1 = val; - GS_SYNCH1 = 0x7F5C21FC83030LL; - GS_SYNCH2 = 0x3484BC; - GS_SYNCV = 0xA9000502101401LL; - - GS_SMODE2 = (arg2 << 1) | 1; - GS_SRFSH = 8; - GS_SMODE1 = val2; - } else { - val = 0x740836504LL; - val2 = 0x740816504LL; - - tmp = (hvParam & 0x2) << 35; - val|= tmp; - val2|= tmp; - - tmp = (hvParam & 0x1) << 25; - val|= tmp; - val2|= tmp; - - GS_SMODE1 = val; - GS_SYNCH1 = 0x7F5C21F683030LL; - GS_SYNCH2 = 0x3484BC; - GS_SYNCV = 0xA9000502101404LL; - GS_SMODE2 = 0; - GS_SRFSH = 8; - GS_SMODE1 = val2; - } - _SetGsCrt2(); - return; - } - - if (arg1 == 0x72) { - if (arg0 != 0) { - val = 0x740814504LL; - val|= (hvParam & 0x1) << 25; - - GS_SYNCH1 = 0x7F5B61F06F040LL; - GS_SYNCH2 = 0x33A4D8; - GS_SYNCV = 0xC7800601A01801LL; - - GS_SMODE2 = (arg2 << 1) | 1; - GS_SRFSH = 8; - GS_SMODE1 = val; - } else { - val = 0x740814504LL; - - val|= (hvParam & 0x2) << 35; - val|= (hvParam & 0x1) << 25; - - GS_SYNCH1 = 0x7F5B61F06F040LL; - GS_SYNCH2 = 0x33A4D8; - GS_SYNCV = 0xC7800601A01802LL; - GS_SMODE2 = 0; - GS_SRFSH = 8; - GS_SMODE1 = val; - } - return; - } - - if (arg1 == 0x73) { - if (arg0 != 0) { - val = 0x740816504LL; - val|= (hvParam & 0x1) << 25; - - GS_SYNCH1 = 0x7F5C21FC83030LL; - GS_SYNCH2 = 0x3484BC; - GS_SYNCV = 0xA9000502101401LL; - - GS_SMODE2 = (arg2 << 1) | 1; - GS_SRFSH = 8; - GS_SMODE1 = val; - } else { - val = 0x740816504; - - val|= (hvParam & 0x2) << 35; - val|= (hvParam & 0x1) << 25; - - GS_SYNCH1 = 0x7F5C21FC83030LL; - GS_SYNCH2 = 0x3484BC; - GS_SYNCV = 0xA9000502101404LL; - GS_SMODE2 = 0; - GS_SRFSH = 8; - GS_SMODE1 = val; - } - return; - } - - if ((u32)(arg1 - 26) >= 0x38) { - _SetGsCrt3(arg0, arg1, arg2); return; - } - - if (arg1 == 0x52) { - _SetGsCrt3(arg0, arg1, arg2); return; - } - - _SetGsCrt4(arg0, arg1, arg2); -} - -//////////////////////////////////////////////////////////////////// -//8000A768 SYSCALL 076 GetGsHParam -//////////////////////////////////////////////////////////////////// -void _GetGsHParam(int *p0, int *p1, int *p2, int *p3) -{ - u32 _hvParam = (u32)hvParam; - - *p0 = _hvParam >> 12; - *p1 = _hvParam >> 24; - *p2 = _hvParam >> 18; - *p3 = _hvParam >> 28; -} - -//////////////////////////////////////////////////////////////////// -//8000A7D0 SYSCALL 077 GetGsVParam -//////////////////////////////////////////////////////////////////// -int _GetGsVParam() -{ - return hvParam & 0x3; -} - -//////////////////////////////////////////////////////////////////// -//8000A800 SYSCALL 059 JoinThread -//////////////////////////////////////////////////////////////////// -void _JoinThread() -{ - _iJoinThread(0x87); -} - -//////////////////////////////////////////////////////////////////// -//8000A820 SYSCALL 078 SetGsHParam -//////////////////////////////////////////////////////////////////// -void _SetGsHParam(int a0, int a1, int a2, int a3) -{ - __printf("SetGsHParam(%x,%x,%x,%x)... probably will never be supported\n", a0, a1, a2, a3); - //write hvParam&1 to 12000010? -} - -//////////////////////////////////////////////////////////////////// -//8000A8F8 SYSCALL 079 SetGsVParam -//////////////////////////////////////////////////////////////////// -void _SetGsVParam(int VParam) -{ - hvParam&= ~0x1; - hvParam|= VParam & 0x1; -} - -//////////////////////////////////////////////////////////////////// -//8000A920 SYSCALL 075 GetOsdConfigParam -//////////////////////////////////////////////////////////////////// -void _GetOsdConfigParam(int *result) -{ - *result= (*result & 0xFFFFFFFE) | (osdConfigParam & 1); - *result= (*result & 0xFFFFFFF9) | (osdConfigParam & 6); - *result= (*result & 0xFFFFFFF7) | (osdConfigParam & 8); - *result= (*result & 0xFFFFFFEF) | (osdConfigParam & 0x10); - *result=((*result & 0xFFFFE01F) | (osdConfigParam & 0x1FE0)) & 0xFFFF1FFF; - ((u16*)result)[1]=((u16*)&osdConfigParam)[1]; -} - -//////////////////////////////////////////////////////////////////// -//8000A9C0 SYSCALL 074 SetOsdConfigParam -//////////////////////////////////////////////////////////////////// -void _SetOsdConfigParam(int *param) -{ - osdConfigParam= (osdConfigParam & 0xFFFFFFFE) | (*param & 1); - osdConfigParam= (osdConfigParam & 0xFFFFFFF9) | (*param & 6); - osdConfigParam= (osdConfigParam & 0xFFFFFFF7) | (*param & 8); - osdConfigParam= (osdConfigParam & 0xFFFFFFEF) | (*param & 0x10); - osdConfigParam=((osdConfigParam & 0xFFFFE01F) | (*param & 0x1FE0)) & 0xFFFF1FFF; - ((u16*)&osdConfigParam)[1]=((u16*)param)[1]; -} - -//////////////////////////////////////////////////////////////////// -//8000FCE8 -//////////////////////////////////////////////////////////////////// -void __exhandler(int a0) -{ -} - -//////////////////////////////////////////////////////////////////// -//80010F34 -//////////////////////////////////////////////////////////////////// -void __disableInterrupts() -{ - __asm__("mtc0 $0, $25\n" - "mtc0 $0, $24\n" - "li $3, 0xFFFFFFE0\n" - "mfc0 $2, $12\n" - "and $2, $3\n" - "mtc0 $2, $12\n" - "sync\n"); -} - -//////////////////////////////////////////////////////////////////// -//80010F58 -//////////////////////////////////////////////////////////////////// -void kSaveContext() -{ -} - -//////////////////////////////////////////////////////////////////// -//80011030 -//////////////////////////////////////////////////////////////////// -void kLoadContext() -{ -} - -//////////////////////////////////////////////////////////////////// -//800110F4 -//////////////////////////////////////////////////////////////////// -void kLoadDebug() -{ - kLoadContext(); - // lq $31, 0x1F0($27) - // lq $27, 0x1B0($27) - // j 80005020 - probably load debug services or restore prev program state -} - -//////////////////////////////////////////////////////////////////// -//80011108 -//////////////////////////////////////////////////////////////////// -int __exception() -{ - register u32 curepc __asm__("$2"); - int ret; - - __asm__("mfc0 %0, $14\n" : "=r"(curepc) : ); - - // check if epc is currently in the except handlers: - // _Deci2Handler, __exception1, and __exception - if (curepc >= (u32)__exception && curepc < (u32)__exception+0x300) { - __asm__("mfc0 %0, $13\n" : "=r"(ret) : ); - return (ret & 0x7C) >> 2; - } - - kSaveContext(); - - __disableInterrupts(); - __exhandler(1); - - kLoadContext(); - - __asm__("eret\n"); -} - -//////////////////////////////////////////////////////////////////// -//800111F0 -//////////////////////////////////////////////////////////////////// -void __exception1() -{ - kSaveContext(); - __disableInterrupts(); - //sub_8000CF68 - kLoadContext(); - __asm__("eret\n"); -} diff --git a/unfree/fps2bios/kernel/eeload/eeload.c b/unfree/fps2bios/kernel/eeload/eeload.c deleted file mode 100644 index efacfe9cd..000000000 --- a/unfree/fps2bios/kernel/eeload/eeload.c +++ /dev/null @@ -1,34 +0,0 @@ - -#include -#include - -#include "eeload.h" -#include "eeinit.h" -#include "eedebug.h" - -void __attribute__((noreturn)) eeload_start() { - void (*entry)(); - __puts("EELOAD start\n"); - - __printf("about to SifInitRpc(0)\n"); - SifInitRpc(0); - __printf("done rpc\n"); - - entry = (void (*)())loadElfFile("INTRO"); - entry(); - - entry = (void (*)())loadElfFile("LOADER"); - entry(); - - for (;;); -} - -void Kmemcpy(void *dest, const void *src, int n) { - const u8 *s = (u8*)src; - u8 *d = (u8*)dest; - - while (n) { - *d++ = *s++; n--; - } -} - diff --git a/unfree/fps2bios/kernel/eeload/eeload.map b/unfree/fps2bios/kernel/eeload/eeload.map deleted file mode 100644 index 2f33d80fb..000000000 --- a/unfree/fps2bios/kernel/eeload/eeload.map +++ /dev/null @@ -1,1039 +0,0 @@ -Archive member included because of file (symbol) - -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(memcpy.o) - eekernel.o (memcpy) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(memset.o) - eekernel.o (memset) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(strcpy.o) - eekernel.o (strcpy) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vsnprintf.o) - eedebug.o (vsnprintf) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vsnprintf.o) (vxprintf) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__sout.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vsnprintf.o) (__sout) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(free.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (free) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(free.o) (_ps2sdk_alloc_lock) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(isdigit.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (isdigit) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(sbrk.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(free.o) (ps2_sbrk) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(strlen.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (strlen) -/Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(malloc.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(free.o) (__alloc_heap_head) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(ResetEE.o) - eeinit.o (ResetEE) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(Exit.o) - eekernel.o (Exit) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iTerminateThread.o) - eekernel.o (iTerminateThread) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EndOfHeap.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(sbrk.o) (EndOfHeap) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(CreateSema.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) (CreateSema) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DeleteSema.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) (DeleteSema) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SignalSema.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) (SignalSema) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(WaitSema.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) (WaitSema) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SetVSyncFlag.o) - eekernel.o (SetVSyncFlag) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) - eeload.o (SifInitRpc) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_rpc_get_fpacket.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (_rpc_get_fpacket) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(__iop_control_internals.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (_iop_reboot_count) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DIntr.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (DIntr) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EIntr.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (EIntr) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) - eekernel.o (iWakeupThread) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iRotateThreadReadyQueue.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) (iRotateThreadReadyQueue) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_iGetThreadId.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) (_iGetThreadId) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iReferThreadStatus.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) (iReferThreadStatus) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSuspendThread.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) (iSuspendThread) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iResumeThread.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) (iResumeThread) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSignalSema.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (iSignalSema) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetReg.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (SifSetReg) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifGetReg.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (SifGetReg) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_send.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (SifSendCmd) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (SifInitCmd) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_client.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (SifAddCmdHandler) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_sreg_get.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) (SifGetSreg) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EnableDmac.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) (EnableDmac) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DisableDmac.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) (DisableDmac) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(AddDmacHandler.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) (AddDmacHandler) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(RemoveDmacHandler.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) (RemoveDmacHandler) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_EnableDmac.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EnableDmac.o) (_EnableDmac) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_DisableDmac.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DisableDmac.o) (_DisableDmac) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(FlushCache.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) (FlushCache) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetDma.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_send.o) (SifSetDma) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSifSetDma.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_send.o) (iSifSetDma) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetDChain.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) (SifSetDChain) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifWriteBackDCache.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_send.o) (SifWriteBackDCache) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_sif_cmd_int_handler.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) (_SifCmdIntHandler) -/Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSifSetDChain.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_sif_cmd_int_handler.o) (iSifSetDChain) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (__udivdi3) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (__umoddi3) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (dpadd) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (dpmul) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (dpcmp) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (litodp) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) (dptoli) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) (__thenan_df) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) (__clz_tab) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) (__pack_d) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) (__unpack_d) -/Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) (__fpcmp_parts_d) - -Allocating common symbols -Common symbol size file - -intcs_array 0xa8 eekernel.o -elfsize 0x4 eeelf.o -threadArgStrBuffer 0x100 eekernel.o -sifIOPbuff 0x4 eekernel.o -sifRegs 0x80 eekernel.o -rcnt3TargetNum 0x40 eekernel.o -dword_80016A84 0x4 eekernel.o -threads_array 0x4c00 eekernel.o -g_kernelstackend 0x4 eekernel.o -VSyncFlag1 0x4 eekernel.o -handler_ll_free 0x8 eekernel.o -gsIMR 0x8 eekernel.o -SavedRA 0x10 eedata.o -thread_ll_free 0x8 eekernel.o -semas_array 0x2000 eekernel.o -sifEEbuff 0x80 eekernel.o -SavedSP 0x10 eedata.o -dword_80016A7C 0x4 eekernel.o -machineType 0x4 eekernel.o -sections_names 0x4 eeelf.o -SavedT9 0x8 eedata.o -elfdata 0x4 eeelf.o -sbus_handlers 0x80 eekernel.o -thread_ll_priorities - 0x400 eekernel.o -tadrptr 0x1f0 eekernel.o -_HandlersCount 0x4 eekernel.o -sif1tagdata 0x4 eekernel.o -VSyncFlag0 0x4 eekernel.o -g_kernelstack 0x2000 eekernel.o -osdConfigParam 0x4 eekernel.o -dword_80016A88 0x4 eekernel.o -_sif_cmd_data 0x20 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) -pgifhandlers_array 0xf18 eekernel.o -dmacs_array 0xb4 eekernel.o -SavedRegs 0x1d0 eedata.o -elfHeader 0x4 eeelf.o -hvParam 0x8 eekernel.o -dword_80016A78 0x4 eekernel.o -extrastorage 0xf80 eekernel.o -elfProgH 0x4 eeelf.o -memorySize 0x4 eekernel.o -SavedAT 0x10 eedata.o -elfSectH 0x4 eeelf.o - -Memory Configuration - -Name Origin Length Attributes -*default* 0x0000000000000000 0xffffffffffffffff - -Linker script and memory map - -LOAD eeirq.o -LOAD eedata.o -LOAD eekernel.o -LOAD eeinit.o -LOAD eeload.o -LOAD eeelf.o -LOAD eedebug.o -LOAD romdir.o -LOAD /Users/julian/ps2dev/ps2sdk/ee/lib/libmc.a -LOAD /Users/julian/ps2dev/ps2sdk/ee/lib/libpad.a -LOAD /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a -LOAD /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a -LOAD /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a -LOAD /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a -LOAD /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a -LOAD /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a - 0x0000000000080000 _stack_size = 0x80000 - 0x0000000000a00000 _heap_size = 0xa00000 - -. 0x0000000080000000 0xefa - eeirq.o() - .text 0x0000000080000000 0x718 eeirq.o - 0x0000000080000280 SyscException - 0x00000000800006e8 setINTCHandler - 0x0000000080000180 CpuException - 0x00000000800003e0 INTCException - 0x00000000800003c0 _Deci2Call - 0x0000000080000200 CpuException2 - 0x00000000800006e0 TIMERException - 0x0000000080000578 DMACException - 0x0000000080000000 CpuException0 - 0x0000000080000700 setDMACHandler - .reginfo 0x0000000080000718 0x18 eeirq.o - .mdebug 0x0000000080000730 0x79c eeirq.o - *fill* 0x0000000080000ecc 0x4 00 - .rodata 0x0000000080000ed0 0x18 eeirq.o - .comment 0x0000000080000ee8 0x12 eeirq.o - -.text 0x0000000080001000 0xa7e8 - *(.text) - .text 0x0000000080001000 0x4e90 eekernel.o - 0x0000000080005c20 _SetGsVParam - 0x0000000080001ab0 _AddDmacHandler - 0x0000000080002820 _TerminateThread - 0x0000000080002300 GetCop0_Reg19 - 0x0000000080003410 _iTerminateThread - 0x0000000080004200 _InitArgs - 0x0000000080001600 _DummyINTCHandler - 0x0000000080005260 _SifSetReg - 0x0000000080002060 _excepRet - 0x0000000080002488 SetCop0_EntryHi - 0x00000000800018e0 _RemoveIntcHandler - 0x0000000080003a78 _SuspendThread - 0x0000000080002380 GetCop0_ErrorPC - 0x0000000080002c00 _SignalSema - 0x0000000080001ad0 _AddDmacHandler2 - 0x00000000800020a8 _RFU005 - 0x00000000800012d8 _CpuConfig_4 - 0x0000000080002a58 _WakeupThread - 0x00000000800036c8 _iReleaseWaitThread - 0x0000000080001350 _GsGetIMR - 0x0000000080005c40 _GetOsdConfigParam - 0x0000000080004890 releaseTCB - 0x0000000080003f30 _iWaitSema - 0x0000000080002588 SetCop0_Reg26 - 0x0000000080002318 GetCop0_Reg22 - 0x0000000080002358 GetCop0_Reg27 - 0x0000000080003828 _ReferThreadStatus - 0x00000000800023e8 SetCop0_EntryLo0 - 0x0000000080002430 SetCop0_PageMask - 0x00000000800010d0 __EnableIntc - 0x0000000080002b68 _WaitSema - 0x00000000800022c0 GetCop0_ExceptPC - 0x00000000800038e8 __SleepThread - 0x0000000080004b38 _sifGetSMFLG - 0x00000000800043a0 _EndOfHeap - 0x0000000080001d70 _iSetEventFlag - 0x0000000080002120 _FlushCache - 0x00000000800027e0 _ExitDeleteThread - 0x0000000080004988 LL_unlink - 0x00000000800025e8 _ExecPS2 - 0x0000000080005470 _SetGsCrt4 - 0x0000000080002db0 __ThreadHandler - 0x0000000080001178 __DisableDmac - 0x0000000080001588 erase_cpu_regs - 0x0000000080002558 SetCop0_DebugReg24 - 0x0000000080002518 SetCop0_Reg18 - 0x0000000080005d88 __disableInterrupts - 0x0000000080002940 _ReleaseWaitThread - 0x0000000080001e48 _ReleaseAlarm - 0x0000000080002340 GetCop0_Perf - 0x00000000800031d8 _ChangeThread - 0x0000000080001b88 sbusHandler - 0x00000000800029d0 _SleepThread - 0x00000000800032e0 _CreateThread - 0x0000000080001000 _eret - 0x0000000080002000 _InitRCNT3 - 0x0000000080005490 _SetGsCrt - 0x0000000080001bd0 _AddSbusIntcHandler - 0x00000000800024d8 SetCop0_ExceptPC - 0x0000000080001288 _CpuConfig_1 - 0x00000000800025b0 SetCop0_TagHi - 0x00000000800025c8 SetCop0_ErrorPC - 0x0000000080002280 GetCop0_EntryHi - 0x0000000080005400 _SetGsCrt2 - 0x00000000800040b8 _SemasInit - 0x0000000080001340 _GetMemorySize - 0x0000000080001058 _SetCPUTimer - 0x00000000800040a8 _DeleteEventFlag - 0x0000000080005008 _SifDmaPrepare - 0x0000000080002330 GetCop0_DebugReg24 - 0x0000000080003528 _DisableDispatchThread - 0x00000000800050b0 _SifSetDma - 0x0000000080004128 __load_module_EENULL - 0x0000000080005dc0 kLoadContext - 0x0000000080004928 thread_2_ready - 0x0000000080005de8 __exception - 0x0000000080003550 _EnableDispatchThread - 0x0000000080002f70 restoreContext - 0x0000000080003578 _iChangeThreadPriority - 0x0000000080001d80 _SetAlarm - 0x0000000080001380 _Exit - 0x0000000080003940 _iWakeupThread - 0x0000000080003c08 _CreateEventFlag - 0x0000000080004348 _InitializeHeapArea - 0x0000000080001c38 _RemoveSbusIntcHandler - 0x0000000080003418 __DeleteThread - 0x0000000080005ce0 _SetOsdConfigParam - 0x00000000800022f0 GetCop0_Reg17 - 0x0000000080002360 GetCop0_TagLo - 0x0000000080005db8 kSaveContext - 0x0000000080001680 _RFU___ - 0x0000000080005d80 __exhandler - 0x00000000800016c0 _AddHandler - 0x0000000080005bc0 _JoinThread - 0x0000000080001320 _MachineType - 0x0000000080003490 __StartThread - 0x0000000080002528 SetCop0_Reg20 - 0x0000000080001748 DefaultINTCHandler - 0x00000000800023c8 SetCop0_Index - 0x0000000080004a20 LL_unlinkthis - 0x0000000080002390 GetCop0_Reg31 - 0x0000000080002468 SetCop0_BadVAddr - 0x0000000080002188 FlushDataCache - 0x0000000080001630 _DummyDMACHandler - 0x0000000080004a58 _TlbWriteRandom - 0x0000000080001140 __EnableDmac - 0x00000000800024f0 SetCop0_PRevID - 0x00000000800027a0 _ExitThread - 0x00000000800024a0 SetCop0_Compare - 0x0000000080001758 __AddIntcHandler - 0x0000000080001330 _SetMemorySize - 0x0000000080002400 SetCop0_EntryLo1 - 0x00000000800012b8 _CpuConfig_3 - 0x0000000080001108 __DisableIntc - 0x0000000080002218 GetCop0_EntryLo1 - 0x00000000800018a0 _AddIntcHandler - 0x00000000800021b8 _GetCop0 - 0x0000000080002470 SetCop0_Count - 0x0000000080005ba8 _GetGsVParam - 0x00000000800011b0 _SetVTLBRefillHandler - 0x0000000080004d28 _SifStopDma - 0x0000000080002308 GetCop0_Reg20 - 0x0000000080005258 _SifDmaStat - 0x0000000080001700 _RemoveHandler - 0x0000000080003b08 _iResumeThread - 0x0000000080001cf0 _EnableIntcHandler - 0x0000000080002d10 _ChangeThreadPriority - 0x0000000080003e10 _iSignalSema - 0x0000000080002570 SetCop0_Perf - 0x0000000080002260 GetCop0_BadVAddr - 0x00000000800013a0 _start - 0x0000000080002238 GetCop0_PageMask - 0x00000000800022f8 GetCop0_Reg18 - 0x0000000080001d30 _EnableDmacHandler - 0x0000000080001b90 __AddSbusIntcHandler - 0x0000000080002670 _DeleteThread - 0x0000000080001af0 _RemoveDmacHandler - 0x0000000080001750 DefaultDMACHandler - 0x0000000080002598 SetCop0_TagLo - 0x00000000800023e0 SetCop0_Random - 0x0000000080002448 SetCop0_Wired - 0x00000000800024b8 SetCop0_Status - 0x0000000080001038 _SetPgifHandler - 0x0000000080001448 saveContext2 - 0x00000000800022e0 GetCop0_Config - 0x00000000800030b0 _ThreadHandler - 0x0000000080002310 GetCop0_Reg21 - 0x0000000080002590 SetCop0_Reg27 - 0x0000000080002228 GetCop0_Context - 0x0000000080001d50 _DisableDmacHandler - 0x0000000080005dc8 kLoadDebug - 0x0000000080004828 _ExecOSD - 0x00000000800043c8 __load_module - 0x0000000080005be0 _SetGsHParam - 0x0000000080001e50 rcnt3Handler - 0x0000000080002208 GetCop0_EntryLo0 - 0x0000000080003818 _GetThreadId - 0x00000000800028b0 _RotateThreadReadyQueue - 0x00000000800021f8 GetCop0_Random - 0x0000000080003520 __ExitDeleteThread - 0x0000000080001c08 __RemoveSbusIntcHandler - 0x0000000080005448 _iJoinThread - 0x0000000080004568 _LoadPS2Exe - 0x0000000080001270 _CpuConfig_0 - 0x0000000080004748 __ExecPS2 - 0x0000000080004ab0 _sifGetMSFLG - 0x0000000080002c88 _DeleteSema - 0x0000000080002df8 saveContext - 0x0000000080001308 _PSMode - 0x00000000800011e0 _SetVCommonHandler - 0x0000000080004c00 SifDmaInit - 0x00000000800016a8 _SetVSyncFlag - 0x0000000080002510 SetCop0_Reg17 - 0x0000000080002540 SetCop0_Reg23 - 0x0000000080002248 GetCop0_Wired - 0x0000000080001048 _SetCPUTimerHandler - 0x0000000080002270 GetCop0_Count - 0x00000000800012f0 _CpuConfig_5 - 0x0000000080002370 GetCop0_TagHi - 0x0000000080002180 FlushInstructionCache - 0x0000000080003678 _iRotateThreadReadyQueue - 0x00000000800014e8 restoreContext2 - 0x0000000080002398 SetCop0 - 0x00000000800020f8 _DisableCache - 0x0000000080001cd8 _Interrupt2Iop - 0x0000000080002198 _105 - 0x0000000080005e60 __exception1 - 0x00000000800024f8 SetCop0_Config - 0x00000000800022d0 GetCop0_PRevID - 0x0000000080002418 SetCop0_Context - 0x0000000080001d10 _DisableIntcHandler - 0x0000000080002320 GetCop0_Reg23 - 0x0000000080004858 _RFU004_Exit - 0x0000000080003c18 _CreateSema - 0x00000000800025e0 SetCop0_Reg31 - 0x00000000800012a0 _CpuConfig_2 - 0x0000000080004bc0 _ResetSif1 - 0x0000000080004d48 _SifDmaSend - 0x0000000080002290 GetCop0_Compare - 0x0000000080005b70 _GetGsHParam - 0x0000000080004008 _PollSema - 0x00000000800049d0 LL_rotate - 0x0000000080003518 __ExitThread - 0x0000000080001210 _SetVInterruptHandler - 0x0000000080002700 _StartThread - 0x0000000080004260 _InitializeMainThread - 0x00000000800024d0 SetCop0_Cause - 0x00000000800020d8 _EnableCache - 0x0000000080005450 _SetGsCrt3 - 0x0000000080001660 DefaultCPUTimerHandler - 0x0000000080001020 _SetSYSCALL - 0x00000000800022a0 GetCop0_Status - 0x0000000080004048 _ReferSemaStatus - 0x00000000800053f8 _print - 0x0000000080001978 __AddDmacHandler - 0x0000000080003bc0 _CancelWakeupThread - 0x0000000080002ae0 _ResumeThread - 0x0000000080004a38 LL_add - 0x00000000800021a0 _KSeg0 - 0x0000000080004f90 _SifDmaCount - 0x0000000080002530 SetCop0_Reg21 - 0x0000000080002538 SetCop0_Reg22 - 0x0000000080002258 GetCop0_Reg7 - 0x0000000080001c70 __Interrupt2Iop - 0x0000000080002350 GetCop0_Reg26 - 0x0000000080002190 FlushSecondaryCache - 0x0000000080003c90 _iDeleteSema - 0x0000000080001ff0 _SetEventFlag - 0x0000000080001238 _CpuConfig - 0x0000000080005340 _SifGetReg - 0x0000000080002460 SetCop0_Reg7 - 0x0000000080004d00 _SifSetDChain - 0x0000000080001360 _GsPutIMR - 0x00000000800018c0 _AddIntcHandler2 - 0x00000000800021e8 GetCop0_Index - 0x0000000080004530 eestrcpy - 0x00000000800022b0 GetCop0_Cause - 0x0000000080002520 SetCop0_Reg19 - 0x00000000800048e0 unsetTCB - .text 0x0000000080005e90 0xbf0 eeinit.o - 0x00000000800063d8 InitializeScratchPad - 0x0000000080006928 InitPgifHandler2 - 0x0000000080005ec0 _ResetEE - 0x0000000080006318 InitializeVU1 - 0x00000000800067a0 InitPgifHandler - 0x0000000080006328 InitializeIPU - 0x0000000080006408 InitializeUserMemory - 0x0000000080006330 InitializeVIF0 - 0x0000000080006488 InitializeTIMER - 0x0000000080006340 InitializeFPU - 0x0000000080006578 _TlbSet - 0x0000000080006458 InitializeINTC - 0x00000000800060c0 Restart - 0x00000000800065b0 TlbInit - 0x0000000080006338 InitializeVU0 - 0x0000000080006228 InitializeDMAC - 0x0000000080006320 InitializeVIF1 - 0x0000000080005e90 InitializeGS - 0x0000000080005ff0 Initialize - 0x0000000080005e98 InitializeGIF - .text 0x0000000080006a80 0x98 eeload.o - 0x0000000080006a80 eeload_start - 0x0000000080006ae8 Kmemcpy - .text 0x0000000080006b18 0x2b8 eeelf.o - 0x0000000080006cb0 loadSectionHeaders - 0x0000000080006b48 loadHeaders - 0x0000000080006b80 loadProgramHeaders - 0x0000000080006d30 loadElfFile - .text 0x0000000080006dd0 0xf0 eedebug.o - 0x0000000080006e50 __printf - 0x0000000080006e08 __puts - 0x0000000080006dd0 __putc - .text 0x0000000080006ec0 0x1a0 romdir.o - 0x0000000080006ec0 romdirInit - 0x0000000080006f48 romdirGetFile - .text 0x0000000080007060 0xb0 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(memcpy.o) - 0x0000000080007060 memcpy - .text 0x0000000080007110 0xc0 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(memset.o) - 0x0000000080007110 memset - .text 0x00000000800071d0 0x114 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(strcpy.o) - 0x00000000800071d0 strcpy - *fill* 0x00000000800072e4 0x4 00 - .text 0x00000000800072e8 0x40 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vsnprintf.o) - 0x00000000800072e8 vsnprintf - .text 0x0000000080007328 0x1008 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) - 0x00000000800073b8 vxprintf - .text 0x0000000080008330 0x88 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__sout.o) - 0x0000000080008330 __sout - .text 0x00000000800083b8 0xf8 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(free.o) - 0x00000000800083b8 free - .text 0x00000000800084b0 0xc0 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) - 0x00000000800084e0 _ps2sdk_alloc_deinit - 0x00000000800084b0 _ps2sdk_alloc_init - 0x0000000080008510 _ps2sdk_alloc_lock - 0x0000000080008540 _ps2sdk_alloc_unlock - .text 0x0000000080008570 0x18 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(isdigit.o) - 0x0000000080008570 isdigit - .text 0x0000000080008588 0x68 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(sbrk.o) - 0x0000000080008588 ps2_sbrk - .text 0x00000000800085f0 0x138 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(strlen.o) - 0x00000000800085f0 strlen - .text 0x0000000080008728 0x1f0 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(malloc.o) - 0x0000000080008768 malloc - 0x0000000080008728 _heap_mem_fit - *fill* 0x0000000080008918 0x8 00 - .text 0x0000000080008920 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(ResetEE.o) - 0x0000000080008920 ResetEE - .text 0x0000000080008930 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(Exit.o) - 0x0000000080008930 Exit - .text 0x0000000080008940 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iTerminateThread.o) - 0x0000000080008940 iTerminateThread - .text 0x0000000080008950 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EndOfHeap.o) - 0x0000000080008950 EndOfHeap - .text 0x0000000080008960 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(CreateSema.o) - 0x0000000080008960 CreateSema - .text 0x0000000080008970 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DeleteSema.o) - 0x0000000080008970 DeleteSema - .text 0x0000000080008980 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SignalSema.o) - 0x0000000080008980 SignalSema - .text 0x0000000080008990 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(WaitSema.o) - 0x0000000080008990 WaitSema - .text 0x00000000800089a0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SetVSyncFlag.o) - 0x00000000800089a0 SetVSyncFlag - .text 0x00000000800089b0 0x448 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) - 0x0000000080008c68 SifInitRpc - 0x0000000080008dd0 SifExitRpc - .text 0x0000000080008df8 0x30 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_rpc_get_fpacket.o) - 0x0000000080008df8 _rpc_get_fpacket - .text 0x0000000080008e28 0x48 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DIntr.o) - 0x0000000080008e28 DIntr - .text 0x0000000080008e70 0x18 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EIntr.o) - 0x0000000080008e70 EIntr - .text 0x0000000080008e88 0x88 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) - 0x0000000080008e88 iWakeupThread - .text 0x0000000080008f10 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iRotateThreadReadyQueue.o) - 0x0000000080008f10 iRotateThreadReadyQueue - .text 0x0000000080008f20 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_iGetThreadId.o) - 0x0000000080008f20 _iGetThreadId - .text 0x0000000080008f30 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iReferThreadStatus.o) - 0x0000000080008f30 iReferThreadStatus - .text 0x0000000080008f40 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSuspendThread.o) - 0x0000000080008f40 iSuspendThread - .text 0x0000000080008f50 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iResumeThread.o) - 0x0000000080008f50 iResumeThread - .text 0x0000000080008f60 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSignalSema.o) - 0x0000000080008f60 iSignalSema - .text 0x0000000080008f70 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetReg.o) - 0x0000000080008f70 SifSetReg - .text 0x0000000080008f80 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifGetReg.o) - 0x0000000080008f80 SifGetReg - .text 0x0000000080008f90 0x1b0 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_send.o) - 0x00000000800090c0 SifSendCmd - 0x0000000080009100 iSifSendCmd - .text 0x0000000080009140 0x2e8 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) - 0x0000000080009170 SifInitCmd - 0x00000000800093f0 SifExitCmd - .text 0x0000000080009428 0x58 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_client.o) - 0x0000000080009440 SifAddCmdHandler - 0x0000000080009428 SifSetCmdBuffer - .text 0x0000000080009480 0x18 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_sreg_get.o) - 0x0000000080009480 SifGetSreg - .text 0x0000000080009498 0x78 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EnableDmac.o) - 0x0000000080009498 EnableDmac - .text 0x0000000080009510 0x78 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DisableDmac.o) - 0x0000000080009510 DisableDmac - *fill* 0x0000000080009588 0x8 00 - .text 0x0000000080009590 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(AddDmacHandler.o) - 0x0000000080009590 AddDmacHandler - .text 0x00000000800095a0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(RemoveDmacHandler.o) - 0x00000000800095a0 RemoveDmacHandler - .text 0x00000000800095b0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_EnableDmac.o) - 0x00000000800095b0 _EnableDmac - .text 0x00000000800095c0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_DisableDmac.o) - 0x00000000800095c0 _DisableDmac - .text 0x00000000800095d0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(FlushCache.o) - 0x00000000800095d0 FlushCache - .text 0x00000000800095e0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetDma.o) - 0x00000000800095e0 SifSetDma - .text 0x00000000800095f0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSifSetDma.o) - 0x00000000800095f0 iSifSetDma - .text 0x0000000080009600 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetDChain.o) - 0x0000000080009600 SifSetDChain - .text 0x0000000080009610 0xb0 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifWriteBackDCache.o) - 0x0000000080009610 SifWriteBackDCache - .text 0x00000000800096c0 0xf0 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_sif_cmd_int_handler.o) - 0x00000000800096c0 _SifCmdIntHandler - .text 0x00000000800097b0 0x10 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSifSetDChain.o) - 0x00000000800097b0 iSifSetDChain - .text 0x00000000800097c0 0x6c8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - 0x00000000800097c0 __udivdi3 - .text 0x0000000080009e88 0x6c8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - 0x0000000080009e88 __umoddi3 - .text 0x000000008000a550 0x2f8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - 0x000000008000a7d8 dpsub - 0x000000008000a778 dpadd - .text 0x000000008000a848 0x2d0 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - 0x000000008000a848 dpmul - .text 0x000000008000ab18 0x58 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - 0x000000008000ab18 dpcmp - .text 0x000000008000ab70 0xb8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - 0x000000008000ab70 litodp - .text 0x000000008000ac28 0xa0 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - 0x000000008000ac28 dptoli - .text 0x000000008000acc8 0x190 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - 0x000000008000acc8 __pack_d - .text 0x000000008000ae58 0xd8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - 0x000000008000ae58 __unpack_d - .text 0x000000008000af30 0x108 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - 0x000000008000af30 __fpcmp_parts_d - *(.rodata) - .rodata 0x000000008000b038 0x290 eekernel.o - .rodata 0x000000008000b2c8 0x208 eeinit.o - .rodata 0x000000008000b4d0 0x48 eeload.o - .rodata 0x000000008000b518 0x30 eeelf.o - .rodata 0x000000008000b548 0x188 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) - .rodata 0x000000008000b6d0 0x18 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - 0x000000008000b6d0 __thenan_df - .rodata 0x000000008000b6e8 0x100 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - 0x000000008000b6e8 __clz_tab - -.reginfo - *(.reginfo) - -.data 0x000000008000b800 0xf60 - *(.data) - .data 0x000000008000b800 0x318 eedata.o - 0x000000008000b800 table_CpuConfig - 0x000000008000b918 table_SYSCALL - 0x000000008000b8d8 DMACTable - 0x000000008000b878 VIntTable - 0x000000008000b840 VCRTable - 0x000000008000b818 dmac_CHCR - 0x000000008000b898 INTCTable - .data 0x000000008000bb18 0x660 eekernel.o - 0x000000008000bb2c ihandlers_first - 0x000000008000bb34 dhandlers_first - 0x000000008000bb30 dhandlers_last - 0x000000008000bb58 rcnt3TargetTable - 0x000000008000bb38 CPUTimerHandler - 0x000000008000c060 threads_count - 0x000000008000c076 transferscount - 0x000000008000bb18 excepRetPc - 0x000000008000bb24 threadStatus - 0x000000008000c06c semas_count - 0x000000008000c078 table_GetCop0 - 0x000000008000bb20 threadPrio - 0x000000008000bb1c threadId - 0x000000008000c070 semas_last - 0x000000008000c068 excepSP - 0x000000008000bb28 ihandlers_last - 0x000000008000c074 tagindex - 0x000000008000c064 excepRA - 0x000000008000c0f8 table_SetCop0 - 0x000000008000bb40 _alarm_unk - 0x000000008000bb50 rcnt3Count - 0x000000008000bb48 rcnt3Valid - .data 0x000000008000c178 0x290 eeinit.o - 0x000000008000c3e8 tlb_config - 0x000000008000c368 tlb3_data - 0x000000008000c178 tlb1_data - 0x000000008000c248 tlb2_data - .data 0x000000008000c408 0x4 romdir.o - 0x000000008000c408 base - *fill* 0x000000008000c40c 0x4 00 - .data 0x000000008000c410 0x248 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) - .data 0x000000008000c658 0x4 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) - .data 0x000000008000c65c 0x4 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(sbrk.o) - .data 0x000000008000c660 0xc /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(malloc.o) - 0x000000008000c664 __alloc_heap_head - 0x000000008000c660 __alloc_heap_base - 0x000000008000c668 __alloc_heap_tail - *fill* 0x000000008000c66c 0x4 00 - .data 0x000000008000c670 0x38 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) - 0x000000008000c670 _sif_rpc_data - .data 0x000000008000c6a8 0x4 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(__iop_control_internals.o) - 0x000000008000c6a8 _iop_reboot_count - .data 0x000000008000c6ac 0xc /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) - .data 0x000000008000c6b8 0x54 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - 0x000000008000c6b8 _GLOBAL__F___udivdi3 - .data 0x000000008000c70c 0x54 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - 0x000000008000c70c _GLOBAL__F___umoddi3 - -.rdata - *(.rdata) - 0x0000000080014770 _gp = (ALIGN (0x80) + 0x7ff0) - -.lit4 - *(.lit4) - -.lit8 - *(.lit8) - -.sdata - *(.sdata) - -.sbss 0x000000008000c780 0x0 - 0x000000008000c780 _fbss = . - *(.scommon) - *(.sbss) - -.bss 0x000000008000c780 0x1a40 - *(.bss) - .bss 0x000000008000c780 0x1800 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) - .bss 0x000000008000df80 0x240 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) - -.COMMON 0x000000008000e200 0xb8b0 - *(COMMON) - COMMON 0x000000008000e200 0x2e0 eedata.o - 0x0 (size before relaxing) - 0x000000008000e200 SavedRA - 0x000000008000e210 SavedSP - 0x000000008000e220 SavedT9 - 0x000000008000e300 SavedRegs - 0x000000008000e4d0 SavedAT - *fill* 0x000000008000e4e0 0x20 00 - COMMON 0x000000008000e500 0xb574 eekernel.o - 0x0 (size before relaxing) - 0x000000008000e500 intcs_array - 0x000000008000e5a8 threadArgStrBuffer - 0x000000008000e6a8 sifIOPbuff - 0x000000008000e6b0 sifRegs - 0x000000008000e730 rcnt3TargetNum - 0x000000008000e770 dword_80016A84 - 0x000000008000e778 threads_array - 0x0000000080013378 g_kernelstackend - 0x000000008001337c VSyncFlag1 - 0x0000000080013380 handler_ll_free - 0x0000000080013388 gsIMR - 0x0000000080013390 thread_ll_free - 0x0000000080013398 semas_array - 0x00000000800153a0 sifEEbuff - 0x0000000080015420 dword_80016A7C - 0x0000000080015424 machineType - 0x0000000080015428 sbus_handlers - 0x00000000800154a8 thread_ll_priorities - 0x00000000800158b0 tadrptr - 0x0000000080015aa0 _HandlersCount - 0x0000000080015aa4 sif1tagdata - 0x0000000080015aa8 VSyncFlag0 - 0x0000000080015b00 g_kernelstack - 0x0000000080017b00 osdConfigParam - 0x0000000080017b04 dword_80016A88 - 0x0000000080017b08 pgifhandlers_array - 0x0000000080018a20 dmacs_array - 0x0000000080018ad8 hvParam - 0x0000000080018ae0 dword_80016A78 - 0x0000000080018af0 extrastorage - 0x0000000080019a70 memorySize - COMMON 0x0000000080019a74 0x18 eeelf.o - 0x0 (size before relaxing) - 0x0000000080019a74 elfsize - 0x0000000080019a78 sections_names - 0x0000000080019a7c elfdata - 0x0000000080019a80 elfHeader - 0x0000000080019a84 elfProgH - 0x0000000080019a88 elfSectH - *fill* 0x0000000080019a8c 0x4 00 - COMMON 0x0000000080019a90 0x20 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) - 0x0 (size before relaxing) - 0x0000000080019a90 _sif_cmd_data - 0x0000000080019aac _end_bss = (. - 0x4) - 0x0000000080019ab0 _stack = . - 0x0000000080099ab0 . = (. + _stack_size) - 0x0000000080099a88 _end_stack = (. - 0x28) - 0x0000000080099ab0 _end = . - 0x0000000080099ab0 __lc_bh = . - 0x0000000080a99ab0 . = (. + _heap_size) - 0x0000000080a99ab0 __lc_eh = . -OUTPUT(../../build/EELOAD binary) - -.mdebug 0x0000000000000000 0x351b4 - .mdebug 0x0000000000000000 0xf54 eedata.o - .mdebug 0x0000000000000f54 0x81bc eekernel.o - .mdebug 0x0000000000009110 0xd7c eeinit.o - .mdebug 0x0000000000009e8c 0x228 eeload.o - .mdebug 0x000000000000a0b4 0x424 eeelf.o - .mdebug 0x000000000000a4d8 0x248 eedebug.o - .mdebug 0x000000000000a720 0x1e0 romdir.o - .mdebug 0x000000000000a900 0x340 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(memcpy.o) - .mdebug 0x000000000000ac40 0x344 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(memset.o) - .mdebug 0x000000000000af84 0x354 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(strcpy.o) - .mdebug 0x000000000000b2d8 0x180 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vsnprintf.o) - .mdebug 0x000000000000b458 0x31c /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) - .mdebug 0x000000000000b774 0x148 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__sout.o) - .mdebug 0x000000000000b8bc 0x1e8 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(free.o) - .mdebug 0x000000000000baa4 0x3a0 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) - .mdebug 0x000000000000be44 0x148 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(isdigit.o) - .mdebug 0x000000000000bf8c 0x1ac /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(sbrk.o) - .mdebug 0x000000000000c138 0x350 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(strlen.o) - .mdebug 0x000000000000c488 0x28c /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(malloc.o) - .mdebug 0x000000000000c714 0x40c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(ResetEE.o) - .mdebug 0x000000000000cb20 0x404 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(Exit.o) - .mdebug 0x000000000000cf24 0x41c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iTerminateThread.o) - .mdebug 0x000000000000d340 0x40c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EndOfHeap.o) - .mdebug 0x000000000000d74c 0x410 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(CreateSema.o) - .mdebug 0x000000000000db5c 0x410 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DeleteSema.o) - .mdebug 0x000000000000df6c 0x410 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SignalSema.o) - .mdebug 0x000000000000e37c 0x40c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(WaitSema.o) - .mdebug 0x000000000000e788 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SetVSyncFlag.o) - .mdebug 0x000000000000eb9c 0x764 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) - .mdebug 0x000000000000f300 0x15c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_rpc_get_fpacket.o) - .mdebug 0x000000000000f45c 0xfc /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(__iop_control_internals.o) - .mdebug 0x000000000000f558 0x144 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DIntr.o) - .mdebug 0x000000000000f69c 0x144 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EIntr.o) - .mdebug 0x000000000000f7e0 0x218 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) - .mdebug 0x000000000000f9f8 0x42c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iRotateThreadReadyQueue.o) - .mdebug 0x000000000000fe24 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_iGetThreadId.o) - .mdebug 0x0000000000010238 0x420 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iReferThreadStatus.o) - .mdebug 0x0000000000010658 0x418 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSuspendThread.o) - .mdebug 0x0000000000010a70 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iResumeThread.o) - .mdebug 0x0000000000010e84 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSignalSema.o) - .mdebug 0x0000000000011298 0x40c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetReg.o) - .mdebug 0x00000000000116a4 0x40c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifGetReg.o) - .mdebug 0x0000000000011ab0 0x2c0 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_send.o) - .mdebug 0x0000000000011d70 0x590 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) - .mdebug 0x0000000000012300 0x1fc /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_client.o) - .mdebug 0x00000000000124fc 0x170 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_sreg_get.o) - .mdebug 0x000000000001266c 0x194 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EnableDmac.o) - .mdebug 0x0000000000012800 0x198 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DisableDmac.o) - .mdebug 0x0000000000012998 0x418 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(AddDmacHandler.o) - .mdebug 0x0000000000012db0 0x41c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(RemoveDmacHandler.o) - .mdebug 0x00000000000131cc 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_EnableDmac.o) - .mdebug 0x00000000000135e0 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_DisableDmac.o) - .mdebug 0x00000000000139f4 0x410 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(FlushCache.o) - .mdebug 0x0000000000013e04 0x40c /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetDma.o) - .mdebug 0x0000000000014210 0x410 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSifSetDma.o) - .mdebug 0x0000000000014620 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifSetDChain.o) - .mdebug 0x0000000000014a34 0x4e4 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifWriteBackDCache.o) - .mdebug 0x0000000000014f18 0x1ac /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_sif_cmd_int_handler.o) - .mdebug 0x00000000000150c4 0x414 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iSifSetDChain.o) - .mdebug 0x00000000000154d8 0x3ca8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .mdebug 0x0000000000019180 0x3d00 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .mdebug 0x000000000001ce80 0x3618 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .mdebug 0x0000000000020498 0x3cf8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .mdebug 0x0000000000024190 0x1f38 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .mdebug 0x00000000000260c8 0x2144 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .mdebug 0x000000000002820c 0x2308 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .mdebug 0x000000000002a514 0x1c0c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .mdebug 0x000000000002c120 0x1ab8 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .mdebug 0x000000000002dbd8 0x2994 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .mdebug 0x000000000003056c 0x23c0 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .mdebug 0x000000000003292c 0x2888 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.mdebug.eabi64 0x0000000000000000 0x0 - -.comment 0x0000000000000000 0x2d0 - .comment 0x0000000000000000 0x12 eedata.o - .comment 0x0000000000000012 0x12 eekernel.o - .comment 0x0000000000000024 0x12 eeinit.o - .comment 0x0000000000000036 0x12 eeload.o - .comment 0x0000000000000048 0x12 eeelf.o - .comment 0x000000000000005a 0x12 eedebug.o - .comment 0x000000000000006c 0x12 romdir.o - .comment 0x000000000000007e 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vsnprintf.o) - .comment 0x0000000000000090 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(vxprintf.o) - .comment 0x00000000000000a2 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__sout.o) - .comment 0x00000000000000b4 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(free.o) - .comment 0x00000000000000c6 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(__alloc_internals.o) - .comment 0x00000000000000d8 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(isdigit.o) - .comment 0x00000000000000ea 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(sbrk.o) - .comment 0x00000000000000fc 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libc.a(malloc.o) - .comment 0x000000000000010e 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(SifRpcMain.o) - .comment 0x0000000000000120 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_rpc_get_fpacket.o) - .comment 0x0000000000000132 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(__iop_control_internals.o) - .comment 0x0000000000000144 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DIntr.o) - .comment 0x0000000000000156 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EIntr.o) - .comment 0x0000000000000168 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(iWakeupThread.o) - .comment 0x000000000000017a 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_send.o) - .comment 0x000000000000018c 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_main.o) - .comment 0x000000000000019e 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_cmd_client.o) - .comment 0x00000000000001b0 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(sif_sreg_get.o) - .comment 0x00000000000001c2 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(EnableDmac.o) - .comment 0x00000000000001d4 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(DisableDmac.o) - .comment 0x00000000000001e6 0x12 /Users/julian/ps2dev/ps2sdk/ee/lib/libkernel.a(_sif_cmd_int_handler.o) - .comment 0x00000000000001f8 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .comment 0x000000000000020a 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .comment 0x000000000000021c 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .comment 0x000000000000022e 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .comment 0x0000000000000240 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .comment 0x0000000000000252 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .comment 0x0000000000000264 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .comment 0x0000000000000276 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .comment 0x0000000000000288 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .comment 0x000000000000029a 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .comment 0x00000000000002ac 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .comment 0x00000000000002be 0x12 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.debug_abbrev 0x0000000000000000 0x1408 - .debug_abbrev 0x0000000000000000 0x1cd /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_abbrev 0x00000000000001cd 0x1dc /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_abbrev 0x00000000000003a9 0x20f /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_abbrev 0x00000000000005b8 0x22a /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_abbrev 0x00000000000007e2 0x180 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .debug_abbrev 0x0000000000000962 0x180 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .debug_abbrev 0x0000000000000ae2 0x1bf /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .debug_abbrev 0x0000000000000ca1 0x146 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .debug_abbrev 0x0000000000000de7 0x10d /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .debug_abbrev 0x0000000000000ef4 0x1ca /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .debug_abbrev 0x00000000000010be 0x19a /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .debug_abbrev 0x0000000000001258 0x1b0 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.debug_info 0x0000000000000000 0x5f86 - .debug_info 0x0000000000000000 0xacf /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_info 0x0000000000000acf 0xadc /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_info 0x00000000000015ab 0x8ff /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_info 0x0000000000001eaa 0x97e /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_info 0x0000000000002828 0x6e1 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .debug_info 0x0000000000002f09 0x6a9 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .debug_info 0x00000000000035b2 0x75c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .debug_info 0x0000000000003d0e 0x671 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .debug_info 0x000000000000437f 0x5d4 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .debug_info 0x0000000000004953 0x77c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .debug_info 0x00000000000050cf 0x6d9 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .debug_info 0x00000000000057a8 0x7de /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.debug_line 0x0000000000000000 0x194c - .debug_line 0x0000000000000000 0x3ce /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_line 0x00000000000003ce 0x3de /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_line 0x00000000000007ac 0x387 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_line 0x0000000000000b33 0x407 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_line 0x0000000000000f3a 0xc6 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .debug_line 0x0000000000001000 0x110 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .debug_line 0x0000000000001110 0x136 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .debug_line 0x0000000000001246 0x83 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .debug_line 0x00000000000012c9 0x103 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .debug_line 0x00000000000013cc 0x232 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .debug_line 0x00000000000015fe 0x19e /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .debug_line 0x000000000000179c 0x1b0 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.debug_frame 0x0000000000000000 0x210 - .debug_frame 0x0000000000000000 0x40 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_frame 0x0000000000000040 0x40 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_frame 0x0000000000000080 0x58 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_frame 0x00000000000000d8 0x3c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_frame 0x0000000000000114 0x2c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .debug_frame 0x0000000000000140 0x28 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .debug_frame 0x0000000000000168 0x28 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .debug_frame 0x0000000000000190 0x10 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .debug_frame 0x00000000000001a0 0x10 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .debug_frame 0x00000000000001b0 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .debug_frame 0x00000000000001d0 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .debug_frame 0x00000000000001f0 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.debug_pubnames - 0x0000000000000000 0x180 - .debug_pubnames - 0x0000000000000000 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_pubnames - 0x0000000000000020 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_pubnames - 0x0000000000000040 0x26 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_pubnames - 0x0000000000000066 0x1c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_pubnames - 0x0000000000000082 0x1c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .debug_pubnames - 0x000000000000009e 0x1d /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .debug_pubnames - 0x00000000000000bb 0x1d /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .debug_pubnames - 0x00000000000000d8 0x22 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .debug_pubnames - 0x00000000000000fa 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .debug_pubnames - 0x000000000000011a 0x1f /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .debug_pubnames - 0x0000000000000139 0x21 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .debug_pubnames - 0x000000000000015a 0x26 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.debug_aranges 0x0000000000000000 0x140 - .debug_aranges - 0x0000000000000000 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_aranges - 0x0000000000000020 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_aranges - 0x0000000000000040 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_aranges - 0x0000000000000060 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_aranges - 0x0000000000000080 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .debug_aranges - 0x00000000000000a0 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .debug_aranges - 0x00000000000000c0 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .debug_aranges - 0x00000000000000e0 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .debug_aranges - 0x0000000000000100 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .debug_aranges - 0x0000000000000120 0x20 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) - -.debug_ranges 0x0000000000000000 0x2d0 - .debug_ranges 0x0000000000000000 0x100 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_ranges 0x0000000000000100 0x100 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_ranges 0x0000000000000200 0x18 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_ranges 0x0000000000000218 0xa0 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_ranges 0x00000000000002b8 0x18 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - -.debug_str 0x0000000000000000 0x61c9 - .debug_str 0x0000000000000000 0x801 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_udivdi3.o) - .debug_str 0x0000000000000801 0x801 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_umoddi3.o) - .debug_str 0x0000000000001002 0x888 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_addsub_df.o) - .debug_str 0x000000000000188a 0x872 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_mul_df.o) - .debug_str 0x00000000000020fc 0x823 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_compare_df.o) - .debug_str 0x000000000000291f 0x81e /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_si_to_df.o) - .debug_str 0x000000000000313d 0x831 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_df_to_si.o) - .debug_str 0x000000000000396e 0x811 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_thenan_df.o) - .debug_str 0x000000000000417f 0x7c7 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_clz.o) - .debug_str 0x0000000000004946 0x833 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_pack_df.o) - .debug_str 0x0000000000005179 0x81c /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_unpack_df.o) - .debug_str 0x0000000000005995 0x834 /Users/julian/ps2dev/ee/lib/gcc-lib/ee/3.2.3/libgcc.a(_fpcmp_parts_df.o) diff --git a/unfree/fps2bios/kernel/eeload/include/eedebug.h b/unfree/fps2bios/kernel/eeload/include/eedebug.h deleted file mode 100644 index 503f65e06..000000000 --- a/unfree/fps2bios/kernel/eeload/include/eedebug.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __EEDEBUG_H__ -#define __EEDEBUG_H__ - -#include -#include - - -void __putc(u8 c); -void __puts(u8 *s); -int __printf(const char *format, ...); - -#endif /* __EEDEBUG_H__ */ diff --git a/unfree/fps2bios/kernel/eeload/include/eeelf.h b/unfree/fps2bios/kernel/eeload/include/eeelf.h deleted file mode 100644 index 16c344006..000000000 --- a/unfree/fps2bios/kernel/eeload/include/eeelf.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __EEELF_H__ -#define __EEELF_H__ - -u32 loadElfFile(char *filename); - -#endif diff --git a/unfree/fps2bios/kernel/eeload/include/eeinit.h b/unfree/fps2bios/kernel/eeload/include/eeinit.h deleted file mode 100644 index d7e267c72..000000000 --- a/unfree/fps2bios/kernel/eeload/include/eeinit.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __EEINIT_H__ -#define __EEINIT_H__ - -#include - -void TlbInit(); - -#endif /* __EEINIT_H__ */ diff --git a/unfree/fps2bios/kernel/eeload/include/eeirq.h b/unfree/fps2bios/kernel/eeload/include/eeirq.h deleted file mode 100644 index 958744e82..000000000 --- a/unfree/fps2bios/kernel/eeload/include/eeirq.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __EEIRQ_H__ -#define __EEIRQ_H__ - -#include - -void CpuException0(); -void CpuException(); -void CpuException2(); -void SyscException(); -void _Deci2Call(); -void INTCException(); -void DMACException(); -void TIMERException(); -void setINTCHandler(int n, void (*phandler)(int)); -void setDMACHandler(int n, void (*phandler)(int)); - -#endif /* __EEIRQ_H__ */ diff --git a/unfree/fps2bios/kernel/eeload/include/eekernel.h b/unfree/fps2bios/kernel/eeload/include/eekernel.h deleted file mode 100644 index 66dd299f7..000000000 --- a/unfree/fps2bios/kernel/eeload/include/eekernel.h +++ /dev/null @@ -1,447 +0,0 @@ -#ifndef __EEKERNEL_H__ -#define __EEKERNEL_H__ - -#include -#include - - -#define RCNT0_COUNT *(volatile int*)0xB0000000 -#define RCNT0_MODE *(volatile int*)0xB0000010 -#define RCNT0_TARGET *(volatile int*)0xB0000020 -#define RCNT0_HOLD *(volatile int*)0xB0000030 - -#define RCNT1_COUNT *(volatile int*)0xB0000800 -#define RCNT1_MODE *(volatile int*)0xB0000810 -#define RCNT1_TARGET *(volatile int*)0xB0000820 -#define RCNT1_HOLD *(volatile int*)0xB0000830 - -#define RCNT2_COUNT *(volatile int*)0xB0001000 -#define RCNT2_MODE *(volatile int*)0xB0001010 -#define RCNT2_TARGET *(volatile int*)0xB0001020 - -#define RCNT3_COUNT *(volatile int*)0xB0001800 -#define RCNT3_MODE *(volatile int*)0xB0001810 -#define RCNT3_TARGET *(volatile int*)0xB0001820 - -#define GIF_CTRL *(volatile int*)0xB0003000 - -#define GIF_FIFO *(volatile u128*)0xB0006000 - -//SIF0 -#define D5_CHCR *(volatile int*)0xB000C000 -#define D5_MADR *(volatile int*)0xB000C010 -#define D5_QWC *(volatile int*)0xB000C020 - -//SIF1 -#define D6_CHCR *(volatile int*)0xB000C400 -#define D6_MADR *(volatile int*)0xB000C410 -#define D6_QWC *(volatile int*)0xB000C420 -#define D6_TAG *(volatile int*)0xB000C430 - -#define DMAC_CTRL *(volatile int*)0xB000E000 -#define DMAC_STAT *(volatile int*)0xB000E010 -#define DMAC_PCR *(volatile int*)0xB000E020 -#define DMAC_SQWC *(volatile int*)0xB000E030 -#define DMAC_RBSR *(volatile int*)0xB000E040 -#define DMAC_RBOR *(volatile int*)0xB000E050 -#define DMAC_STADR *(volatile int*)0xB000E060 - -#define INTC_STAT *(volatile int*)0xB000F000 -#define INTC_MASK *(volatile int*)0xB000F010 - -#define SBUS_MSFLG *(volatile int*)0xB000F220 -#define SBUS_SMFLG *(volatile int*)0xB000F230 -#define SBUS_F240 *(volatile int*)0xB000F240 - -#define DMAC_ENABLER *(volatile int*)0xB000F520 -#define DMAC_ENABLEW *(volatile int*)0xB000F590 - -#define SBFLG_IOPALIVE 0x10000 -#define SBFLG_IOPSYNC 0x40000 - -#define GS_PMODE *(volatile u64*)0xB2000000 -#define GS_SMODE1 *(volatile u64*)0xB2000010 -#define GS_SMODE2 *(volatile u64*)0xB2000020 -#define GS_SRFSH *(volatile u64*)0xB2000030 -#define GS_SYNCH1 *(volatile u64*)0xB2000040 -#define GS_SYNCH2 *(volatile u64*)0xB2000050 -#define GS_SYNCV *(volatile u64*)0xB2000060 -#define GS_DISPFB1 *(volatile u64*)0xB2000070 -#define GS_DISPLAY1 *(volatile u64*)0xB2000080 -#define GS_DISPFB2 *(volatile u64*)0xB2000090 -#define GS_DISPLAY2 *(volatile u64*)0xB20000A0 -#define GS_EXTBUF *(volatile u64*)0xB20000B0 -#define GS_EXTDATA *(volatile u64*)0xB20000C0 -#define GS_EXTWRITE *(volatile u64*)0xB20000D0 -#define GS_BGCOLOR *(volatile u64*)0xB20000E0 -#define GS_CSR *(volatile u64*)0xB2001000 -#define GS_IMR *(volatile u64*)0xB2001010 -#define GS_BUSDIR *(volatile u64*)0xB2001040 -#define GS_SIGLBLID *(volatile u64*)0xB2001080 - -#define INTC_GS 0 -#define INTC_SBUS 1 -#define INTC_VBLANK_S 2 -#define INTC_VBLANK_E 3 -#define INTC_VIF0 4 -#define INTC_VIF1 5 -#define INTC_VU0 6 -#define INTC_VU1 7 -#define INTC_IPU 8 -#define INTC_TIM0 9 -#define INTC_TIM1 10 -#define INTC_TIM2 11 -#define INTC_TIM3 12 //threads -//#define INTC_13 13 //not used -//#define INTC_14 14 //not used - -#define DMAC_VIF0 0 -#define DMAC_VIF1 1 -#define DMAC_GIF 2 -#define DMAC_FROM_IPU 3 -#define DMAC_TO_IPU 4 -#define DMAC_SIF0 5 -#define DMAC_SIF1 6 -#define DMAC_SIF2 7 -#define DMAC_FROM_SPR 8 -#define DMAC_TO_SPR 9 -//#define DMAC_10 10 //not used -//#define DMAC_11 11 //not used -//#define DMAC_12 12 //not used -//#define DMAC_13 13 //not used -//#define DMAC_14 14 //not used -#define DMAC_ERROR 15 - - /////////////////////// - // DMA TAG REGISTERS // - /////////////////////// - #define DMA_TAG_REFE 0x00 - #define DMA_TAG_CNT 0x01 - #define DMA_TAG_NEXT 0x02 - #define DMA_TAG_REF 0x03 - #define DMA_TAG_REFS 0x04 - #define DMA_TAG_CALL 0x05 - #define DMA_TAG_RET 0x06 - #define DMA_TAG_END 0x07 - -// Modes for DMA transfers -#define SIF_DMA_FROM_IOP 0x0 -#define SIF_DMA_TO_IOP 0x1 -#define SIF_DMA_FROM_EE 0x0 -#define SIF_DMA_TO_EE 0x1 - -#define SIF_DMA_INT_I 0x2 -#define SIF_DMA_INT_O 0x4 -#define SIF_DMA_SPR 0x8 -#define SIF_DMA_BSN 0x10 /* ? what is this? */ -#define SIF_DMA_TAG 0x20 -#define SIF_DMA_ERT 0x40 -#define DMA_TAG_IRQ 0x80000000 -#define DMA_TAG_PCE 0x0C000000 - -#define KSEG1_ADDR(x) (((u32)(x))|0xA0000000) -#define KUSEG_ADDR(x) (((u32)(x))&0x1FFFFFFF) - -#define MAX_SEMAS 256 -#define STACK_RES 0x2A0 - -//? -#define SRInitVal 0x70030C13 -#define ConfigInitVal 0x73003 - -//enum { -#define THS_RUN 0x01 -#define THS_READY 0x02 -#define THS_WAIT 0x04 -#define THS_SUSPEND 0x08 -#define THS_DORMANT 0x10 -//}; - -typedef struct { - u128 gpr[24]; // v0-t9 (skip r0,at,k0-ra) - u128 gp; - u128 fp; - u128 hi; - u128 lo; - u32 sa; -} eeRegs; - -struct ThreadParam { - int status; - void (*entry)(void*); - void *stack; - int stackSize; - void *gpReg; - int initPriority; - int currentPriority; - u32 attr; - u32 option; - int waitSema; // waitType? - int waitId; - int wakeupCount; -}; - -struct TCB { //internal struct - struct TCB *next; //+00 - struct TCB *prev; //+04 - int status;//+08 - void (*entry)(void*); //+0C - void *stack_res; //+10 initial $sp - void *gpReg; //+14 - short currentPriority; //+18 - short initPriority; //+1A - int waitSema, //+1C waitType? - semaId, //+20 - wakeupCount, //+24 - attr, //+28 - option; //+2C - void (*entry_)(void*); //+30 - int argc; //+34 - char *argstring;//+38 - void *stack;//+3C - int stackSize; //+40 - int (*root)(); //+44 - void* heap_base; //+48 -}; - -struct threadCtx { - u128 gpr[25]; // at-t9, (skip r0,k0-ra) - u128 gp; //+190 - u128 sp; //+1A0 - u128 fp; //+1B0 - u128 ra; //+1C0 - u128 hi; //+1D0 - u128 lo; //+1E0 - u32 sa; //+1F0 - u32 cf31;//+1F4 - u32 acc; //+1F8 - u32 res; //+1FC - u32 fpr[32];//+200 -}; - -typedef struct tag_ARGS{ - int argc; - char *argv[16]; - char args[256]; -} ARGS; - -struct SemaParam { - int count; - int max_count; - int init_count; - int wait_threads; - int attr; - u32 option; -}; - -struct kSema { // internal struct - struct kSema *free;//+00 - int count;//+04 - int max_count;//+08 - int attr;//+0C - int option;//+10 - int wait_threads;//+14 - struct TCB *wait_next,//+18 - *wait_prev;//+1C -}; - -struct ll { struct ll *next, *prev; }; //linked list - -//internal struct -struct IDhandl { //intc dmac handler - struct ll *next, //+00 - *prev; //+04 - int (*handler)(int); //+08 - u32 gp; //+0C - void *arg; //+10 - int flag; //+14 -}; - -//internal struct -struct HCinfo{ //handler cause info - int count; - struct ll l; -}; - -extern u128 SavedSP; -extern u128 SavedRA; -extern u128 SavedAT; -extern u64 SavedT9; - -extern eeRegs SavedRegs; - -extern u32 excepRA; -extern u32 excepSP; - -extern u32 (*table_CpuConfig[6])(u32); -extern void (*table_SYSCALL[0x80])(); - -extern void (*VCRTable[14])(); -extern void (*VIntTable[8])(); -extern void (*INTCTable[16])(int); -extern void (*DMACTable[16])(int); - -extern int threadId; -extern int threadPrio; -extern int threadStatus; - -extern u64 hvParam; - -extern u32 machineType; -extern u64 gsIMR; -extern u32 memorySize; - -extern u32 g_kernelstackend; - -extern u32 dmac_CHCR[10]; - -extern int VSyncFlag0; -extern int VSyncFlag1; - -extern int _HandlersCount; -extern struct ll handler_ll_free, *ihandlers_last, *ihandlers_first; -extern struct HCinfo intcs_array[14]; -extern struct ll *dhandlers_last, *dhandlers_first; -extern struct HCinfo dmacs_array[15]; -extern struct IDhandl pgifhandlers_array[161]; -extern void (*sbus_handlers[32])(int ca); - -extern int rcnt3Code; -extern int rcnt3TargetTable[0x142]; -extern u8 rcnt3TargetNum[0x40]; -extern int threads_count; -extern struct ll thread_ll_free; -extern struct ll thread_ll_priorities[128]; -extern int semas_count; -extern struct kSema* semas_last; - -extern struct TCB threads_array[256]; -extern struct kSema semas_array[256]; - -extern char tagindex; -extern short transferscount; -extern struct TAG{ - int id_qwc; - int addr; - int unk[2]; -} tadrptr[31]; -extern int extrastorage[(16/4) * 8][31]; - -extern int osdConfigParam; - -// syscalls -// Every syscall is officially prefixed with _ (to avoid clashing with ps2sdk) -void _SetSYSCALL(int num, int address); -int __EnableIntc(int ch); -int __DisableIntc(int ch); -int __EnableDmac(int ch); -int __DisableDmac(int ch); -void *_SetVTLBRefillHandler(int cause, void (*handler)()); -void *_SetVCommonHandler(int cause, void (*handler)()); -void *_SetVInterruptHandler(int cause, void (*handler)()); -void _PSMode(); -u32 _MachineType(); -u32 _SetMemorySize(u32 size); -u32 _GetMemorySize(); -u64 _GsGetIMR(); -u64 _GsPutIMR(u64 val); -int _Exit(); // 3 -void _RFU___(); // 0 -void _SetVSyncFlag(int flag0, int flag1); -int _AddIntcHandler(int cause, int (*handler)(int), int next, void *arg); -int _AddIntcHandler2(int cause, int (*handler)(int), int next, void *arg); -int _RemoveIntcHandler(int cause, int hid); -int _AddDmacHandler(int cause, int (*handler)(int), int next, void *arg); -int _AddDmacHandler2(int cause, int (*handler)(int), int next, void *arg); -int _RemoveDmacHandler(int code, int hid); -int _AddSbusIntcHandler(int cause, void (*handler)(int ca)); -int _RemoveSbusIntcHandler(int cause); -int _Interrupt2Iop(int cause); -void _RFU005(); -int _GetCop0(int reg); -int _ExecPS2(void *, void *, int, char **); -int _DeleteThread(int tid); -int _StartThread(int tid, void *arg); -int _ExitThread(); -int _ExitDeleteThread(); -int _SleepThread(); -int _WakeupThread(int tid); -int _WaitSema(int sid); -void _ChangeThreadPriority(int tid, int prio); -int _CreateThread(struct ThreadParam *param); -int _iChangeThreadPriority(int tid, int prio); -int _GetThreadId(); -int _ReferThreadStatus(int tid, struct ThreadParam *info); -int _iWakeupThread(int tid); -int _SuspendThread(int thid); -int _iResumeThread(int tid); -int _CancelWakeupThread(int tid); -int _CreateEventFlag(); -int _CreateSema(struct SemaParam *sema); -int _RFU073(int sid); -int _iSignalSema(int sid); -int _PollSema(int sid); -int _ReferSemaStatus(int sid, struct SemaParam *sema); -int _DeleteEventFlag(); -void*_InitializeMainThread(u32 gp, void *stack, int stack_size, - char *args, int root); -void *_InitializeHeapArea(void *heap_base, int heap_size); -void *_EndOfHeap(); -int _LoadPS2Exe(char *filename, int argc, char **argv); -int _ExecOSD(int argc, char **argv); -void _SifSetDChain(); -void _SifStopDma(); -u32 _SifSetDma(SifDmaTransfer_t *sdd, int len); -void _SetGsCrt(short arg0, short arg1, short arg2); // 2 -void _GetGsHParam(int *p0, int *p1, int *p2, int *p3); -int _GetGsVParam(); -void _SetGsVParam(int VParam); -void _GetOsdConfigParam(int *result); -void _SetOsdConfigParam(int *param); -int _ResetEE(int init); // 1 -int _TlbWriteRandom(u32 PageMask, u32 EntryHi, u32 EntryLo0, u32 EntryLo1); -int _SetAlarm(short a0, int a1, int a2); -void _ReleaseAlarm(); -int _TerminateThread(int tid); -void _RotateThreadReadyQueue(int prio); -int _iTerminateThread(int tid); -int _DisableDispatchThread(); -int _EnableDispatchThread(); -int _iRotateThreadReadyQueue(int prio); -void _ReleaseWaitThread(int tid); -int _iReleaseWaitThread(int tid); -int _ResumeThread(int tid); -int _iResumeThread(int tid); -void _JoinThread(); -int _DeleteSema(int sid); -int _iDeleteSema(int sid); -void _SignalSema(int sid); -void _SetGsHParam(int a0, int a1, int a2, int a3); -int _SetEventFlag(int ef, u32 bits); // bits is EF_X -int _iSetEventFlag(int ef, u32 bits); -void _EnableIntcHandler(u32 id); -void _DisableIntcHandler(u32 id); -void _EnableDmacHandler(u32 id); -void _DisableDmacHandler(u32 id); -void _KSeg0(u32 arg); -int _EnableCache(int cache); -int _DisableCache(int cache); -void _FlushCache(int op); -void _105(int op1, int op2); -u32 _CpuConfig(u32 op); -void _SetCPUTimerHandler(void (*handler)()); -void _SetCPUTimer(int compval); -void _SetPgifHandler(void (*handler)(int)); -void _print(); -int _SifDmaStat(int id); - -int _SifGetReg(int reg); -int _SifSetReg(int reg, u32 val); - -//////////////////////////////////////////////////////////////////// -// KERNEL BSS // -//////////////////////////////////////////////////////////////////// - - -#endif - diff --git a/unfree/fps2bios/kernel/eeload/include/eeload.h b/unfree/fps2bios/kernel/eeload/include/eeload.h deleted file mode 100644 index 0dda55ba2..000000000 --- a/unfree/fps2bios/kernel/eeload/include/eeload.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __EELOAD_H__ -#define __EELOAD_H__ - -#endif /* __EELOAD_H__ */ diff --git a/unfree/fps2bios/kernel/eeload/include/romdir.h b/unfree/fps2bios/kernel/eeload/include/romdir.h deleted file mode 100644 index ef03a3223..000000000 --- a/unfree/fps2bios/kernel/eeload/include/romdir.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ROMDIR_H__ -#define __ROMDIR_H__ - -#include - -struct romdir { - /*following variable must place in designed order*/ - u8 fileName[10]; - u16 extInfoSize; - u32 fileSize; -} __attribute__ ((packed)); - -struct rominfo { - u32 fileOffset; - u32 fileSize; -}; - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri); - -#endif /* __ROMDIR_H__ */ diff --git a/unfree/fps2bios/kernel/eeload/linkfile b/unfree/fps2bios/kernel/eeload/linkfile deleted file mode 100644 index e777270bb..000000000 --- a/unfree/fps2bios/kernel/eeload/linkfile +++ /dev/null @@ -1,56 +0,0 @@ -_stack_size = 0x80000; -_heap_size = 1024*1024*10; - -ENTRY(_start); -SECTIONS { - - . 0x80000000 : { - eeirq.o - } - - .text 0x80001000 : { - *(.text) - *(.rodata) - } - .reginfo ALIGN(128) : { - *(.reginfo) - } - .data ALIGN(128) : { - *(.data) - } - .rdata ALIGN(128) : { - *(.rdata) - } - _gp = ALIGN(128) + 0x7ff0; - .lit4 ALIGN(128) : { - *(.lit4) - } - .lit8 ALIGN(128) : { - *(.lit8) - } - .sdata ALIGN(128) : { - *(.sdata) - } - - .sbss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - _fbss = . ; - *(.scommon) - *(.sbss) - } - .bss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(.bss) - } - .COMMON ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(COMMON) - } - _end_bss = . - 4; - _stack = .; - . += _stack_size ; - _end_stack = . - 8*5; - _end = . ; - __lc_bh = . ; - . += _heap_size ; - __lc_eh = .; - -} - diff --git a/unfree/fps2bios/kernel/eeload/romdir.c b/unfree/fps2bios/kernel/eeload/romdir.c deleted file mode 100644 index e10d38027..000000000 --- a/unfree/fps2bios/kernel/eeload/romdir.c +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************** -* romdir.c, based over Alex Lau (http://alexlau.8k.com) RomDir * -****************************************************************/ -#include "romdir.h" - -struct romdir *base = NULL; - -struct romdir *romdirInit() { - u8 *mem; - - for (mem=(u8*)0xbfc00000; (u32)mem<0xbfc01000; mem++) { - if (mem[0] == 'R' && mem[1] == 'E' && - mem[2] == 'S' && mem[3] == 'E' && - mem[4] == 'T') - break; - } - if ((u32)mem == 0xbfc01000) return NULL; - - return (struct romdir*)mem; -} - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri) { - struct romdir *rd; -// struct romdir *base; - int i; - - if (base == NULL) { - base = romdirInit(); - if (base == NULL) return NULL; - } - - ri->fileOffset = 0; - for (rd = base; rd->fileName[0] != 0; rd++) { - for (i=0; i<10 && name[i] != 0; i++) { - if (rd->fileName[i] != name[i]) break; - } - if (rd->fileName[i] != name[i]) { - ri->fileOffset+= (rd->fileSize + 15) & ~0xF; - continue; - } - - ri->fileSize = rd->fileSize; - return ri; - } - - return NULL; -} diff --git a/unfree/fps2bios/kernel/eestart.c b/unfree/fps2bios/kernel/eestart.c deleted file mode 100644 index 9a8562e25..000000000 --- a/unfree/fps2bios/kernel/eestart.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include "romdir.h" - -static void Kputc(u8 c) { - *((u8*)0x1000f180) = c; -} - -static void Kputs(u8 *s) { - while (*s != 0) { - Kputc(*s++); - } -} - -static void Kmemcpy(void *dest, const void *src, int n) { - const u8 *s = (u8*)src; - u8 *d = (u8*)dest; - - while (n > 0) { - *d++ = *s++; n--; - } -} - -void _eestart() { - struct rominfo ri; - u8 *str; - - romdirGetFile("ROMVER", &ri); - str = (u8*)(0xbfc00000 + ri.fileOffset); - Kputs("fps2bios v"); - Kputc(str[1]); Kputc('.'); Kputc(str[3]); Kputc('\n'); - - romdirGetFile("EELOAD", &ri); - - Kputs("loading EELOAD to 0x80000000\n"); - - Kmemcpy((void*)0x80000000, (void*)(0xbfc00000 + ri.fileOffset), ri.fileSize); - - __asm__ ( - "li $26, 0x80001000\n" - "jr $26\n"); - for (;;); -} - -__asm__ ( - ".global eestart\n" - "eestart:\n" - "li $sp, 0x80010000\n" - "j _eestart\n"); - - diff --git a/unfree/fps2bios/kernel/iopload/Makefile b/unfree/fps2bios/kernel/iopload/Makefile deleted file mode 100644 index 47b02b6b4..000000000 --- a/unfree/fps2bios/kernel/iopload/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -DIRS = iopboot sysmem loadcore excepman intrman stdio timrman \ - dmacman sifman sifcmd ssbusc sysclib heaplib \ - vblank threadman sio2man - -iopload: $(OBJECTS) - for i in $(DIRS); do \ - make -C $$i; \ - done; - -clean: - for i in $(DIRS); do \ - make -C $$i clean; \ - done; diff --git a/unfree/fps2bios/kernel/iopload/dmacman/Makefile b/unfree/fps2bios/kernel/iopload/dmacman/Makefile deleted file mode 100644 index 0bccbaed3..000000000 --- a/unfree/fps2bios/kernel/iopload/dmacman/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/DMACMAN - -IOP_INCS += -I../include - -IOP_OBJS = dmacman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_sysmem.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/dmacman/dmacman.c b/unfree/fps2bios/kernel/iopload/dmacman/dmacman.c deleted file mode 100644 index 4a92170ee..000000000 --- a/unfree/fps2bios/kernel/iopload/dmacman/dmacman.c +++ /dev/null @@ -1,923 +0,0 @@ -//[module] DMACMAN -//[processor] IOP -//[type] ELF-IRX -//[name] dmacman -//[version] 0x101 -//[memory map] 0xBF801080,0xBF801084,0xBF801088, 00 mdec in -// 0xBF801090,0xBF801094,0xBF801098, 01 mdec out -// 0xBF8010A0,0xBF8010A4,0xBF8010A8, 02 gpu -// 0xBF8010B0,0xBF8010B4,0xBF8010B8, 03 cdrom/dvd -// 0xBF8010C0,0xBF8010C4,0xBF8010C8, 0xBF8010CC, 04 spu -// 0xBF8010D0,0xBF8010D4,0xBF8010D8, 05 pio -// 0xBF8010E0,0xBF8010E4,0xBF8010E8, 06 gpu otc -// -// 0xBF8010F0,0xBF8010F4, -// -// 0xBF801500,0xBF801504,0xBF801508, 07 SPU2 -// 0xBF801510,0xBF801514,0xBF801518, 08 -// 0xBF801520,0xBF801524,0xBF801528, 0xBF80152C, 09 SIF0 -// 0xBF801530,0xBF801534,0xBF801538, 10 SIF1 -// 0xBF801540,0xBF801544,0xBF801548, 11 SIO2in -// 0xBF801550,0xBF801554,0xBF801558, 12 SIO2out -// -// 0xBF801560,0xBF801564,0xBF801568, //sifman -// sif0 sif1 spu -// -// 0xBF801570, 0xBF801574,0xBF801578,0xBF80157C, //sifman -// 0xBF8015F0 -//[handlers] - -//[entry point] dmacman_start, dmacman_stub -//[made by] [RO]man (roman_ps2dev@hotmail.com) - -#include - -#include "kloadcore.h" -#include "kintrman.h" -#include "kdmacman.h" - - -int _start(int argc, char* argv[]); - -/////////////////////////////////////////////////////////////////////// -void _setBF801080(unsigned int ch, int value){ - *(int*)0xBF801080=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801090(unsigned int ch, int value){ - *(int*)0xBF801090=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010A0(unsigned int ch, int value){ - *(int*)0xBF8010A0=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010B0(unsigned int ch, int value){ - *(int*)0xBF8010B0=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010C0(unsigned int ch, int value){ - *(int*)0xBF8010C0=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010D0(unsigned int ch, int value){ - *(int*)0xBF8010D0=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010E0(unsigned int ch, int value){ - *(int*)0xBF8010E0=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801500(unsigned int ch, int value){ - *(int*)0xBF801500=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801510(unsigned int ch, int value){ - *(int*)0xBF801510=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801520(unsigned int ch, int value){ - *(int*)0xBF801520=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801530(unsigned int ch, int value){ - *(int*)0xBF801530=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801540(unsigned int ch, int value){ - *(int*)0xBF801540=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801550(unsigned int ch, int value){ - *(int*)0xBF801550=value; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801080(unsigned int ch){ - return *(int*)0xBF801080; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801090(unsigned int ch){ - return *(int*)0xBF801090; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010A0(unsigned int ch){ - return *(int*)0xBF8010A0; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010B0(unsigned int ch){ - return *(int*)0xBF8010B0; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010C0(unsigned int ch){ - return *(int*)0xBF8010C0; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010D0(unsigned int ch){ - return *(int*)0xBF8010D0; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010E0(unsigned int ch){ - return *(int*)0xBF8010E0; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801500(unsigned int ch){ - return *(int*)0xBF801500; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801510(unsigned int ch){ - return *(int*)0xBF801510; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801520(unsigned int ch){ - return *(int*)0xBF801520; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801530(unsigned int ch){ - return *(int*)0xBF801530; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801540(unsigned int ch){ - return *(int*)0xBF801540; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801550(unsigned int ch){ - return *(int*)0xBF801550; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801084(unsigned int ch, int value){ - *(int*)0xBF801084=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801094(unsigned int ch, int value){ - *(int*)0xBF801094=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010A4(unsigned int ch, int value){ - *(int*)0xBF8010A4=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010B4(unsigned int ch, int value){ - *(int*)0xBF8010B4=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010C4(unsigned int ch, int value){ - *(int*)0xBF8010C4=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010D4(unsigned int ch, int value){ - *(int*)0xBF8010D4=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010E4(unsigned int ch, int value){ - *(int*)0xBF8010E4=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801504(unsigned int ch, int value){ - *(int*)0xBF801504=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801514(unsigned int ch, int value){ - *(int*)0xBF801514=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801524(unsigned int ch, int value){ - *(int*)0xBF801524=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801534(unsigned int ch, int value){ - *(int*)0xBF801534=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801544(unsigned int ch, int value){ - *(int*)0xBF801544=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801554(unsigned int ch, int value){ - *(int*)0xBF801554=value; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801084(unsigned int ch){ - return *(int*)0xBF801084; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801094(unsigned int ch){ - return *(int*)0xBF801094; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010A4(unsigned int ch){ - return *(int*)0xBF8010A4; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010B4(unsigned int ch){ - return *(int*)0xBF8010B4; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010C4(unsigned int ch){ - return *(int*)0xBF8010C4; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010D4(unsigned int ch){ - return *(int*)0xBF8010D4; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010E4(unsigned int ch){ - return *(int*)0xBF8010E4; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801504(unsigned int ch){ - return *(int*)0xBF801504; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801514(unsigned int ch){ - return *(int*)0xBF801514; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801524(unsigned int ch){ - return *(int*)0xBF801524; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801534(unsigned int ch){ - return *(int*)0xBF801534; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801544(unsigned int ch){ - return *(int*)0xBF801544; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801554(unsigned int ch){ - return *(int*)0xBF801554; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801088(unsigned int ch, int value){ - *(int*)0xBF801088=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801098(unsigned int ch, int value){ - *(int*)0xBF801098=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010A8(unsigned int ch, int value){ - *(int*)0xBF8010A8=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010B8(unsigned int ch, int value){ - *(int*)0xBF8010B8=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010C8(unsigned int ch, int value){ - *(int*)0xBF8010C8=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010D8(unsigned int ch, int value){ - *(int*)0xBF8010D8=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF8010E8(unsigned int ch, int value){ - *(int*)0xBF8010E8=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801508(unsigned int ch, int value){ - *(int*)0xBF801508=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801518(unsigned int ch, int value){ - *(int*)0xBF801518=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801528(unsigned int ch, int value){ - *(int*)0xBF801528=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801538(unsigned int ch, int value){ - *(int*)0xBF801538=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801548(unsigned int ch, int value){ - *(int*)0xBF801548=value; -} - -/////////////////////////////////////////////////////////////////////// -void _setBF801558(unsigned int ch, int value){ - *(int*)0xBF801558=value; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801088(unsigned int ch){ - return *(int*)0xBF801088; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801098(unsigned int ch){ - return *(int*)0xBF801098; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010A8(unsigned int ch){ - return *(int*)0xBF8010A8; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010B8(unsigned int ch){ - return *(int*)0xBF8010B8; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010C8(unsigned int ch){ - return *(int*)0xBF8010C8; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010D8(unsigned int ch){ - return *(int*)0xBF8010D8; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF8010E8(unsigned int ch){ - return *(int*)0xBF8010E8; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801508(unsigned int ch){ - return *(int*)0xBF801508; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801518(unsigned int ch){ - return *(int*)0xBF801518; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801528(unsigned int ch){ - return *(int*)0xBF801528; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801538(unsigned int ch){ - return *(int*)0xBF801538; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801548(unsigned int ch){ - return *(int*)0xBF801548; -} - -/////////////////////////////////////////////////////////////////////// -int _getBF801558(unsigned int ch){ - return *(int*)0xBF801558; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetD_TADR(unsigned int ch, int value){ - if (ch==DMAch_SPU) - *(int*)0xBF8010CC=value; else - if (ch==DMAch_SIF0) - *(int*)0xBF80152C=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetD_TADR(unsigned int ch){ - if (ch==DMAch_SPU) - return *(int*)0xBF8010CC; - if (ch==DMAch_SIF0) - return *(int*)0xBF80152C; - return 0; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSet_4_9_A(unsigned int ch, int value){ - if (ch==DMAch_SPU) - *(int*)0xBF801568=value; else - if (ch==DMAch_SIF0) - *(int*)0xBF801560=value; else - if (ch==DMAch_SIF1) - *(int*)0xBF801564=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGet_4_9_A(unsigned int ch){ - if (ch==DMAch_SPU) - return *(int*)0xBF801568; - if (ch==DMAch_SIF0) - return *(int*)0xBF801560; - if (ch==DMAch_SIF1) - return *(int*)0xBF801564; - return 0; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetDPCR(int value){ - *(int*)0xBF8010F0=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetDPCR(){ - return *(int*)0xBF8010F0; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetDPCR2(int value){ - *(int*)0xBF801570=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetDPCR2(){ - return *(int*)0xBF801570; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetDPCR3(int value){ - *(int*)0xBF8015F0=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetDPCR3(){ - return *(int*)0xBF8015F0; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetDICR(int value){ - *(int*)0xBF8010F4=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetDICR(){ - return *(int*)0xBF8010F4; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetDICR2(int value){ - *(int*)0xBF801574=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetDICR2(){ - return *(int*)0xBF801574; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetBF80157C(int value){ - *(int*)0xBF80157C=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetBF80157C(){ - return *(int*)0xBF80157C; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetBF801578(int value){ - *(int*)0xBF801578=value; -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetBF801578(){ - return *(int*)0xBF801578; -} - -func setD_MADR[]={ - (func)_setBF801080, (func)_setBF801090, (func)_setBF8010A0, (func)_setBF8010B0, - (func)_setBF8010C0, (func)_setBF8010D0, (func)_setBF8010E0, - (func)_setBF801500, (func)_setBF801510, (func)_setBF801520, - (func)_setBF801530, (func)_setBF801540, (func)_setBF801550, 0 -}; - -func getD_MADR[]={ - (func)_getBF801080, (func)_getBF801090, (func)_getBF8010A0, (func)_getBF8010B0, - (func)_getBF8010C0, (func)_getBF8010D0, (func)_getBF8010E0, - (func)_getBF801500, (func)_getBF801510, (func)_getBF801520, - (func)_getBF801530, (func)_getBF801540, (func)_getBF801550, 0 -}; - -func setD_BCR[]={ - (func)_setBF801084, (func)_setBF801094, (func)_setBF8010A4, (func)_setBF8010B4, - (func)_setBF8010C4, (func)_setBF8010D4, (func)_setBF8010E4, - (func)_setBF801504, (func)_setBF801514, (func)_setBF801524, - (func)_setBF801534, (func)_setBF801544, (func)_setBF801554, 0 -}; - -func getD_BCR[]={ - (func)_getBF801084, (func)_getBF801094, (func)_getBF8010A4, (func)_getBF8010B4, - (func)_getBF8010C4, (func)_getBF8010D4, (func)_getBF8010E4, - (func)_getBF801504, (func)_getBF801514, (func)_getBF801524, - (func)_getBF801534, (func)_getBF801544, (func)_getBF801554, 0 -}; - -func setD_CHCR[]={ - (func)_setBF801088, (func)_setBF801098, (func)_setBF8010A8, (func)_setBF8010B8, - (func)_setBF8010C8, (func)_setBF8010D8, (func)_setBF8010E8, - (func)_setBF801508, (func)_setBF801518, (func)_setBF801528, - (func)_setBF801538, (func)_setBF801548, (func)_setBF801558, 0 -}; - -func getD_CHCR[]={ - (func)_getBF801088, (func)_getBF801098, (func)_getBF8010A8, (func)_getBF8010B8, - (func)_getBF8010C8, (func)_getBF8010D8, (func)_getBF8010E8, - (func)_getBF801508, (func)_getBF801518, (func)_getBF801528, - (func)_getBF801538, (func)_getBF801548, (func)_getBF801558, 0 -}; - -/////////////////////////////////////////////////////////////////////// -void dmacSetD_MADR(unsigned int ch, int value){ - if (ch<13) - setD_MADR[ch](ch, value); //function call -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetD_MADR(unsigned int ch){ - if (ch<13) - return getD_MADR[ch](ch); //function call - return 0; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetD_BCR(unsigned int ch, int value){ - if (ch<13) - setD_BCR[ch](ch, value); //function call -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetD_BCR(unsigned int ch){ - if (ch<13) - return getD_BCR[ch](ch); //function call - return 0; -} - -/////////////////////////////////////////////////////////////////////// -void dmacSetD_CHCR(unsigned int ch, int value){ - if (ch<13) - setD_CHCR[ch](ch, value); //function call -} - -/////////////////////////////////////////////////////////////////////// -int dmacGetD_CHCR(unsigned int ch){ - if (ch<13) - return getD_CHCR[ch](ch); //function call - return 0; -} - - - - -/////////////////////////////////////////////////////////////////////// -int dmacDeinit(){ - int x; - register int ch, value; - - CpuSuspendIntr(&x); //intrman - - dmacSetBF801578(0); - for (ch=0; ch<13; ch++){ - value=dmacGetD_CHCR(ch); - if (value & DMAf_TR) //sysmem - Kprintf("WARNING:DMA %dch has been continued until shutdown\n", ch); - dmacSetD_CHCR(ch, value & 0xFEFFFFFF); - } - - CpuResumeIntr(x); //intrman - return 1; -} - -/////////////////////////////////////////////////////////////////////// -int dmacSetDMA(int ch, int address, int size, int count, int dir){ - if (ch<13 && ch != DMAch_GPUotc){ - dmacSetD_MADR(ch, 0x00FFFFFF & address); - dmacSetD_BCR (ch, (count << 16) | (size & 0xFFFF)); - dmacSetD_CHCR(ch, (dir & DMAf_DR) | DMAf_CO | - (dir == 0 ? DMAf_30 : 0)); - return 1; - } - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int dmacSetDMA_chainedSPU_SIF0(int ch, int size, int tadr){ - if (ch != DMAch_SPU && ch != DMAch_SIF0) - return 0; - dmacSetD_BCR (ch, size & 0x0000FFFF); - dmacSetD_CHCR(ch, DMAf_LI | DMAf_CO | DMAf_DR); //0x601 - dmacSetD_TADR (ch, tadr & 0x00FFFFFF); - return 1; -} - -/////////////////////////////////////////////////////////////////////// -int dmacSetDMA_SIF0(int ch, int size, int tadr){ - if (ch != DMAch_SIF0) - return 0; - dmacSetD_BCR ( DMAch_SIF0, size & 0x0000FFFF); - dmacSetD_CHCR( DMAch_SIF0, DMAf_LI | DMAf_CO | DMAf_08 | DMAf_DR); //0x701 - dmacSetD_TADR ( DMAch_SIF0, tadr & 0x00FFFFFF); - return 1; -} - -/////////////////////////////////////////////////////////////////////// -int dmacSetDMA_SIF1(int ch, int size){ - if (ch != DMAch_SIF1) - return 0; - dmacSetD_BCR (DMAch_SIF1, size & 0x0000FFFF); - dmacSetD_CHCR(DMAch_SIF1, DMAf_30 | DMAf_CO | DMAf_08); //0x40000300 - return 1; -} - -/////////////////////////////////////////////////////////////////////// -void dmacStartTransfer(int ch){ - if (ch < 15) - dmacSetD_CHCR(ch, DMAf_TR | dmacGetD_CHCR(ch)); -} - -/////////////////////////////////////////////////////////////////////// -// set 3-bit value of channel -void dmacSetVal(int ch, int value){ - int x; - CpuSuspendIntr(&x); //intrman - - switch (ch){ - case DMAch_MDECin: dmacSetDPCR( - (dmacGetDPCR() & 0xFFFFFFF8) | - ( value & 7)); break; - case DMAch_MDECout:dmacSetDPCR( - (dmacGetDPCR() & 0xFFFFFF8F) | - (( value & 7) << 4)); break; - case DMAch_GPU: dmacSetDPCR( - (dmacGetDPCR() & 0xFFFFF8FF) | - (( value & 7) << 8)); break; - case DMAch_CD: dmacSetDPCR( - (dmacGetDPCR() & 0xFFFF8FFF) | - (( value & 7) << 12)); break; - case DMAch_SPU: dmacSetDPCR( - (dmacGetDPCR() & 0xFFF8FFFF) | - (( value & 7) << 16)); break; - case DMAch_PIO: dmacSetDPCR( - (dmacGetDPCR() & 0xFF8FFFFF) | - (( value & 7) << 20)); break; - case DMAch_GPUotc:dmacSetDPCR( - (dmacGetDPCR() & 0xF8FFFFFF) | - (( value & 7) << 24)); break; - case DMAch_SPU2:dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFFFFF8) | - ( value & 7)); break; - case DMAch_8: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFFFF8F) | - (( value & 7) << 4)); break; - case DMAch_SIF0: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFFF8FF) | - (( value & 7) << 8)); break; - case DMAch_SIF1: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFF8FFF) | - (( value & 7) << 12)); break; - case DMAch_SIO2in: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFF8FFFF) | - (( value & 7) << 16)); break; - case DMAch_SIO2out:dmacSetDPCR2( - (dmacGetDPCR2() & 0xFF8FFFFF) | - (( value & 7) << 20)); break; - case DMAch_13: dmacSetDPCR3( - (dmacGetDPCR3() & 0xFFFFFFF8) | - ( value & 7)); break; - case DMAch_14: dmacSetDPCR3( - (dmacGetDPCR3() & 0xFFFFFF8F) | - (( value & 7) << 4)); break; - case DMAch_15: dmacSetDPCR3( - (dmacGetDPCR3() & 0xFFFFF8FF) | - (( value & 7) << 8)); break; - case DMAch_67: dmacSetDPCR( - (dmacGetDPCR() & 0x8FFFFFFF) | - (( value & 7) << 28)); break; - case DMAch_85: dmacSetDPCR2( - (dmacGetDPCR2() & 0xF8FFFFFF) | - (( value & 7) << 24)); break; - } - - CpuResumeIntr(x); //intrman -} - -/////////////////////////////////////////////////////////////////////// -// set 4th bit of channel -void dmacEnableDMAch(int ch){ - int x; - CpuSuspendIntr(&x); //intrman - - switch (ch){ - case DMAch_MDECin: dmacSetDPCR( - (dmacGetDPCR() | 0x00000008)); break; - case DMAch_MDECout:dmacSetDPCR( - (dmacGetDPCR() | 0x00000080)); break; - case DMAch_GPU: dmacSetDPCR( - (dmacGetDPCR() | 0x00000800)); break; - case DMAch_CD: dmacSetDPCR( - (dmacGetDPCR() | 0x00008000)); break; - case DMAch_SPU: dmacSetDPCR( - (dmacGetDPCR() | 0x00080000)); break; - case DMAch_PIO: dmacSetDPCR( - (dmacGetDPCR() | 0x00800000)); break; - case DMAch_GPUotc:dmacSetDPCR( - (dmacGetDPCR() | 0x08000000)); break; - case DMAch_SPU2: dmacSetDPCR2( - (dmacGetDPCR2() | 0x00000008)); break; - case DMAch_8: dmacSetDPCR2( - (dmacGetDPCR2() | 0x00000080)); break; - case DMAch_SIF0: dmacSetDPCR2( - (dmacGetDPCR2() | 0x00000800)); break; - case DMAch_SIF1: dmacSetDPCR2( - (dmacGetDPCR2() | 0x00008000)); break; - case DMAch_SIO2in:dmacSetDPCR2( - (dmacGetDPCR2() | 0x00080000)); break; - case DMAch_SIO2out:dmacSetDPCR2( - (dmacGetDPCR2() | 0x00800000)); break; - case DMAch_13: dmacSetDPCR3( - (dmacGetDPCR3() | 0x00000008)); break; - case DMAch_14: dmacSetDPCR3( - (dmacGetDPCR3() | 0x00000080)); break; - case DMAch_15: dmacSetDPCR3( - (dmacGetDPCR3() | 0x00000800)); break; - case DMAch_85: dmacSetDPCR2( - (dmacGetDPCR2() | 0x08000000)); break; - } - - CpuResumeIntr(x); //intrman -} - -/////////////////////////////////////////////////////////////////////// -// reset 4th bit of channel -void dmacDisableDMAch(int ch){ - int x; - CpuSuspendIntr(&x); //intrman - - switch (ch){ - case DMAch_MDECin: dmacSetDPCR( - (dmacGetDPCR() & 0xFFFFFFF7)); break; - case DMAch_MDECout:dmacSetDPCR( - (dmacGetDPCR() & 0xFFFFFF7F)); break; - case DMAch_GPU: dmacSetDPCR( - (dmacGetDPCR() & 0xFFFFF7FF)); break; - case DMAch_CD: dmacSetDPCR( - (dmacGetDPCR() & 0xFFFF7FFF)); break; - case DMAch_SPU: dmacSetDPCR( - (dmacGetDPCR() & 0xFFF7FFFF)); break; - case DMAch_PIO: dmacSetDPCR( - (dmacGetDPCR() & 0xFF7FFFFF)); break; - case DMAch_GPUotc:dmacSetDPCR( - (dmacGetDPCR() & 0xF7FFFFFF)); break; - case DMAch_SPU2: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFFFFF7)); break; - case DMAch_8: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFFFF7F)); break; - case DMAch_SIF0: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFFF7FF)); break; - case DMAch_SIF1: dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFFF7FFF)); break; - case DMAch_SIO2in:dmacSetDPCR2( - (dmacGetDPCR2() & 0xFFF7FFFF)); break; - case DMAch_SIO2out:dmacSetDPCR2( - (dmacGetDPCR2() & 0xFF7FFFFF)); break; - case DMAch_13: dmacSetDPCR3( - (dmacGetDPCR3() & 0xFFFFFFF7)); break; - case DMAch_14: dmacSetDPCR3( - (dmacGetDPCR3() & 0xFFFFFF7F)); break; - case DMAch_15: dmacSetDPCR3( - (dmacGetDPCR3() & 0xFFFFF7FF)); break; - case DMAch_85: dmacSetDPCR2( - (dmacGetDPCR2() & 0xF7FFFFFF)); break; - } - - CpuResumeIntr(x); //intrman -} - -void _retonly(){} - -//////////////////////////////entrypoint/////////////////////////////// -struct export dmacman_stub={ - 0x41C00000, - 0, - VER(1, 2), // 1.2 => 0x102 - 0, - "dmacman", - (func)_start, // entrypoint - (func)_retonly, - (func)dmacDeinit, - (func)_retonly, - (func)dmacSetD_MADR, - (func)dmacGetD_MADR, - (func)dmacSetD_BCR, - (func)dmacGetD_BCR, - (func)dmacSetD_CHCR, - (func)dmacGetD_CHCR, - (func)dmacSetD_TADR, - (func)dmacGetD_TADR, - (func)dmacSet_4_9_A, - (func)dmacGet_4_9_A, - (func)dmacSetDPCR, - (func)dmacGetDPCR, - (func)dmacSetDPCR2, - (func)dmacGetDPCR2, - (func)dmacSetDPCR3, - (func)dmacGetDPCR3, - (func)dmacSetDICR, - (func)dmacGetDICR, - (func)dmacSetDICR2, - (func)dmacGetDICR2, - (func)dmacSetBF80157C, - (func)dmacGetBF80157C, - (func)dmacSetBF801578, - (func)dmacGetBF801578, - (func)dmacSetDMA, - (func)dmacSetDMA_chainedSPU_SIF0, - (func)dmacSetDMA_SIF0, - (func)dmacSetDMA_SIF1, - (func)dmacStartTransfer, - (func)dmacSetVal, - (func)dmacEnableDMAch, - (func)dmacDisableDMAch, - 0 -}; - -//////////////////////////////entrypoint/////////////////////////////// -int _start(int argc, char* argv[]){ - int x; - register int ch; - - if (RegisterLibraryEntries(&dmacman_stub)) //loadcore - return 1; - - CpuSuspendIntr(&x); //intrman - - dmacSetDPCR(0x07777777); - dmacSetDPCR2(0x07777777); - dmacSetDPCR3(0x00000777); - for (ch=0; ch<13; ch++){ - dmacSetD_MADR(ch, 0); - dmacSetD_BCR (ch, 0); - dmacSetD_CHCR(ch, 0); - } - dmacSetD_TADR( DMAch_SPU, 0); - dmacSetD_TADR( DMAch_SIF0,0); - dmacSet_4_9_A( DMAch_SPU, 0); - dmacSet_4_9_A( DMAch_SIF0,0); - dmacSet_4_9_A( DMAch_SIF1,0); - dmacSetBF801578(1); - - CpuResumeIntr(x); //intrman - return 0; -} - diff --git a/unfree/fps2bios/kernel/iopload/excepman/Makefile b/unfree/fps2bios/kernel/iopload/excepman/Makefile deleted file mode 100644 index afb20a6ad..000000000 --- a/unfree/fps2bios/kernel/iopload/excepman/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/EXCEPMAN - -IOP_INCS += -I../include - -IOP_OBJS = excepman.o ../libkernel/iop_loadcore.o ex_handler.o ../iopdebug.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/excepman/ex_handler.s b/unfree/fps2bios/kernel/iopload/excepman/ex_handler.s deleted file mode 100644 index afdaf9b9b..000000000 --- a/unfree/fps2bios/kernel/iopload/excepman/ex_handler.s +++ /dev/null @@ -1,16 +0,0 @@ - - .global defaultEH - .ent defaultEH -defaultEH: - .set noreorder - .set noat - .word 0 - .word 0 - - jal defaultEHfunc - nop - cop0 0x10 - nop - .end defaultEH - - diff --git a/unfree/fps2bios/kernel/iopload/excepman/excepman.c b/unfree/fps2bios/kernel/iopload/excepman/excepman.c deleted file mode 100644 index fce840666..000000000 --- a/unfree/fps2bios/kernel/iopload/excepman/excepman.c +++ /dev/null @@ -1,339 +0,0 @@ -/* - * The IOP exception manager module. - */ - - -#include - -#include "err.h" -#include "kexcepman.h" -#include "kloadcore.h" -#include "iopdebug.h" - -#define _dprintf(fmt, args...) \ - __printf("excepman: " fmt, ## args) - -int _start(); -int excepman_reinit(); -int excepman_deinit(); -void *GetExHandlersTable(); -int RegisterExceptionHandler(int code, struct exHandler *handler); -int RegisterPriorityExceptionHandler(int code, int priority, struct exHandler *handler); -int RegisterDefaultExceptionHandler(struct exHandler *handler); -int ReleaseExceptionHandler(int code, struct exHandler *handler); -int ReleaseDefaultExceptionHandler(struct exHandler *handler); - -struct export excepman_stub __attribute__((section(".text"))) ={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "excepman", - (func)_start, // entrypoint - (func)excepman_reinit, - (func)excepman_deinit, - (func)GetExHandlersTable, - (func)RegisterExceptionHandler, - (func)RegisterPriorityExceptionHandler, - (func)RegisterDefaultExceptionHandler, - (func)ReleaseExceptionHandler, - (func)ReleaseDefaultExceptionHandler, - 0 -}; - -void* *extable; -struct exHandler *handlers[16]; -void *defhandler; - -void iopException(); - -extern void defaultEH(); - -void defaultEHfunc() -{ - __printf("panic: excepman: %s\n", __FUNCTION__); - __printf("EPC=0x%x, cause: %x\n", *(u32*)0x404, *(u32*)0x40C); - __printf("EXECUTION HALTED\n"); - for (;;); -} - -/////////////////////////////////////////////////////////////////////// -void registerEH() { - int i; - - _dprintf("%s\n", __FUNCTION__); - - // Set up the chain of exception handlers, making sure that each used one is terminated by the - // default exception handler. - for (i=0; i<16; i++) { - if (handlers[i]) { - struct exHandler *eh = handlers[i]; - while(eh->next){ - struct exHandler *p_handler = (struct exHandler *)(eh->info & ~3); - struct exHandler *p_next_handler = (struct exHandler *)(((struct exHandler *)(eh->next))->info & ~3); - p_handler->next = (void*)p_next_handler + 8; - eh = eh->next; - } - { - struct exHandler *p_handler = (struct exHandler *)(eh->info & ~3); - p_handler->next = defhandler; - } - } - } - - for (i=0; i<16; i++) { - if (handlers[i]){ - extable[i]=(void*)((handlers[i]->info & ~3) + 8); - } else { - extable[i]=defhandler; - } - } -} - -//////////////////////////////entrypoint///////////////////////////////[00] -void Kputc(u8 c) { - *((u8*)0x1f80380c) = c; -} - -void Kprintnum(unsigned int n) -{ - int i = 0; - while(i < 8) { - u32 a = n>>28; - if( a < 10 ) Kputc('0'+a); - else Kputc('a'+(a-10)); - n <<= 4; - ++i; - } -} - -int _start() { - int *src, *dst; - int i; - - _dprintf("%s\n", __FUNCTION__); - - for (i=0; i<16; i++){ - handlers[i] = NULL; - } - defhandler=NULL; - extable = (void*)0x440; - - // Install the exception handler to address 0 - for (src=(int*)iopException, dst=0; (u32)dst<0x100; src++, dst++){ - *dst = *src; - } - - RegisterDefaultExceptionHandler((struct exHandler *)&defaultEH); - RegisterLibraryEntries(&excepman_stub); - - return 0; -} - -///////////////////////////////////////////////////////////////////////[02] -int excepman_deinit(){ - return 0; -} - -///////////////////////////////////////////////////////////////////////[01] -int excepman_reinit() { - excepman_deinit(); - return _start(); -} - -///////////////////////////////////////////////////////////////////////[04] -int RegisterExceptionHandler(int code, struct exHandler *handler) -{ - return RegisterPriorityExceptionHandler(code, 2, handler); -} - -// This is a pool of containers. They form a linked list. The info member of each points -// to a registered handler. -struct exHandler _list[32]; -struct exHandler *list = NULL; - - -void link(struct exHandler *e) { - e->next = list; - list = e; -} - -struct exHandler *unlink() { - struct exHandler *e; - if (list == NULL) { - int i; - - list = _list; - for (i=0; i<31; i++) { - list[i].next = &list[i+1]; - } - list[i].next = 0; - } - e = list; - list = e->next; - return e; -} - -///////////////////////////////////////////////////////////////////////[05] -int RegisterPriorityExceptionHandler(int code, int priority, struct exHandler *handler) -{ - struct exHandler *n, *p, *p_prev; - - _dprintf("%s: code = %d, pri = %d, (handler=%x)\n", __FUNCTION__, code, priority, handler); - if (code >= 16){ - _dprintf("%s ERROR_BAD_EXCODE\n", __FUNCTION__); - return ERROR_BAD_EXCODE; - } - if (handler->next){ - _dprintf("%s ERROR_USED_EXCODE\n", __FUNCTION__); - return ERROR_USED_EXCODE; - } - - n = unlink(); - - priority &= 3; - n->info = ((u32)handler & ~3) | priority; - n->next = NULL; - - p = handlers[code]; p_prev = NULL; - // walk along the chain starting at the handlers[code] root to find our place in the queue - while(p && ((p->info & 3) < priority)){ - p_prev = p; p = p->next; - } - n->next = p; - if (p_prev == NULL){ - handlers[code] = n; - } else { - p_prev->next = n; - } - - registerEH(); - return 0; -} - -///////////////////////////////////////////////////////////////////////[06] -int RegisterDefaultExceptionHandler(struct exHandler *handler) -{ - _dprintf("%s\n", __FUNCTION__); - if (handler->next){ - _dprintf("%s ERROR_USED_EXCODE\n", __FUNCTION__); - return ERROR_USED_EXCODE; - } - - handler->next = defhandler; - defhandler = &handler->funccode; - - registerEH(); - return 0; -} - -///////////////////////////////////////////////////////////////////////[07] -int ReleaseExceptionHandler(int code, struct exHandler *handler) -{ - struct exHandler *p, *p_prev; - - _dprintf("%s: %d\n", __FUNCTION__, code); - if (code>=16) return ERROR_BAD_EXCODE; - - p_prev = NULL; - for (p=handlers[code]; p != NULL; p_prev = p, p=p->next) { - if ((struct exHandler *)(p->info & ~3) == handler) { - // found it - // Mark the handler as no longer used - ((struct exHandler *)(p->info & ~3))->next = NULL; - - if (p == handlers[code]){ - // special case, no more list - handlers[code] = NULL; - } else { - // Remove container p from the list - p_prev->next = p->next; - } - - link(p); // Add the container back to the pool - registerEH(); - return 0; - } - } - return ERROR_EXCODE_NOTFOUND; -} - -///////////////////////////////////////////////////////////////////////[08] -int ReleaseDefaultExceptionHandler(struct exHandler *handler) -{ - struct exHandler *p; - - _dprintf("%s\n", __FUNCTION__); - for (p=defhandler; p->next; p=p->next-8) { - if (p->next == handler->funccode) { - p->next = handler->next; - handler->next = 0; - registerEH(); - return 0; - } - } - return ERROR_EXCODE_NOTFOUND; -} - -///////////////////////////////////////////////////////////////////////[03] -void *GetExHandlersTable() -{ - return extable; -} - -// 256 bytes of this code are copied to memory address 0 in order to install the exception handling code. -// Take careful note of the alignment of the code at 0x40 and 0x80 if you change it at all. -void iopException() { - __asm__ ( - ".set noat\n" - "nop\nnop\nnop\nnop\n" - "nop\nnop\nnop\nnop\n" - "nop\nnop\nnop\nnop\n" - "nop\nnop\nnop\nnop\n" - - /* 0x0040 */ - /* This the breakpoint exception vector location. */ - - "sw $26, 0x0420($0)\n" - "mfc0 $27, $14\n" - "mfc0 $26, $13\n" - "sw $27, 0x0424($0)\n" - "sw $26, 0x0428($0)\n" - "mfc0 $27, $12\n" - "mfc0 $26, $7\n" - "sw $27, 0x042C($0)\n" - "sw $26, 0x0430($0)\n" - "lw $27, 0x047C($0)\n" - "mtc0 $0, $7\n" - "jr $27\n" - "nop\n" - "nop\n" - "nop\n" - "nop\n" - - /* 0x0080 */ - /* This is the general exception vector location. */ - "sw $1, 0x0400($0)\n" /* $1 saved at 0x400 */ - "sw $26, 0x0410($0)\n" /* $26 saved at 0x410 */ - "mfc0 $1, $14\n" - "mfc0 $26, $12\n" - "sw $1 , 0x0404($0)\n" /* EPC -> 0x404 */ - "sw $26, 0x0408($0)\n" /* STATUS -> 0x408 */ - "mfc0 $1, $13\n" - "sw $1, 0x040C($0)\n" /* CAUSE -> 0x40C */ - "andi $1, 0x3C\n" /* Isolate EXECODE */ - "lw $1, 0x0440($1)\n" - "jr $1\n" /* jump via EXECODE table at 0x440 */ - "nop\n" - "nop\n" - "nop\n" - "nop\n" - "nop\n" - - "nop\nnop\nnop\nnop\n" - "nop\nnop\nnop\nnop\n" - "nop\nnop\nnop\nnop\n" - "nop\nnop\nnop\nnop\n" - ".set at\n" - ); -} diff --git a/unfree/fps2bios/kernel/iopload/heaplib/Makefile b/unfree/fps2bios/kernel/iopload/heaplib/Makefile deleted file mode 100644 index e6ae062e6..000000000 --- a/unfree/fps2bios/kernel/iopload/heaplib/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/HEAPLIB - -IOP_INCS += -I../include - -IOP_OBJS = heaplib.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_sysmem.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/heaplib/heaplib.c b/unfree/fps2bios/kernel/iopload/heaplib/heaplib.c deleted file mode 100644 index 009748aff..000000000 --- a/unfree/fps2bios/kernel/iopload/heaplib/heaplib.c +++ /dev/null @@ -1,206 +0,0 @@ -//[module] HEAPLIB -//[processor] IOP -//[type] ELF-IRX -//[name] Heap_lib -//[version] 0x101 -//[memory map] - -//[handlers] - -//[entry point] heaplib_start, heaplib_stub -//[made by] [RO]man (roman_ps2dev@hotmail.com) 26 January 2003 - -#include "sysmem.h" -#include "kloadcore.h" -#include "kheaplib.h" -#include "iopdebug.h" - -static int debug=1; - -#define _dprintf(fmt, args...) \ - if (debug > 0) __printf("\033[0;32m" "heaplib: " "\033[0m" fmt, ## args) - -int _start(int argc, char* argv[]); - -/////////////////////////////////////////////////////////////////////// -void ll_reset(struct ll *l){ - l->prev=l->next=l; -} - -/////////////////////////////////////////////////////////////////////// -int ll_one(struct ll *l){ - return (l == l->next); -// return (l ^ l->next) < 1; //l==l->next -} - -/////////////////////////////////////////////////////////////////////// -void ll_remove(struct ll *l){ - l->next->prev=l->prev; - l->prev->next=l->next; -} - -/////////////////////////////////////////////////////////////////////// -/*int ll_one_two(struct ll *l){ - return (l->prev ^ l->next) < 1; //l->prev==l->next -}*/ - -/////////////////////////////////////////////////////////////////////// -void ll_add(struct ll *l, struct ll *n){ - n->next=l; - n->prev=l->prev; - l->prev=n; - n->prev->next=n; -} - -void HeapPrepare(void *mem, int size) { - struct Chunk *_chunk = (struct Chunk*)mem; - - if (mem == NULL || size < 41) return; - - _chunk->_mem=(long)mem-1; - _chunk->freesize=size; - _chunk->usedsize=0; - _chunk->mem_16 = (u32)mem+16; - _chunk->unk5=((size-16)>>3)-1; - _chunk->unk4=(long)_chunk+8+((size-16)&~7); - ((struct ll*)_chunk->unk4)->next=(void*)_chunk->mem_16; - ((struct ll*)_chunk->unk4)->prev=0; -} - -int HeapChunkSize(void *chunk) { -// int size = (chunk[1] - 16) >> 3; -// return ((size - chunk[2]) - 1) << 3; -} - -/////////////////////////////////////////////////////////////////////// -void* CreateHeap(int chunkSize, int memoryType){ - struct Heap *_heap; - - _dprintf("%s\n", __FUNCTION__); - chunkSize = (chunkSize+3) & ~3; - _heap = AllocSysMemory(memoryType & 2 ? ALLOC_LAST : ALLOC_FIRST, chunkSize, NULL); - if (_heap == NULL) return NULL; - - _heap->plus_one=(long)_heap + 1; - if (memoryType & 1) _heap->size2free=chunkSize; - else _heap->size2free=0; - _heap->size2free |= ((memoryType>>1) & 1); - ll_reset(&_heap->l); - - HeapPrepare(&_heap->mem, chunkSize-4*sizeof(int)); - return (void*)_heap; -} - -/////////////////////////////////////////////////////////////////////// -int DestroyHeap(void *heap){ - register struct ll *tmp, *p; - struct Heap *_heap = (struct Heap*)heap; - - if (_heap->plus_one != (long)_heap+1) return (long)_heap+1; - _heap->plus_one=0; - - for (p=&_heap->l; p != &_heap->l; p=tmp){ - tmp=p->next; - ((int*)p)[2]=0; //p->mem - FreeSysMemory(p); - } - _heap->mem=0; - return FreeSysMemory(_heap); -} - -/////////////////////////////////////////////////////////////////////// -void* HeapMalloc(void *heap, int size) { -#if 0 - struct Heap *_heap = (struct Heap*)heap; - void *p; - - if (_heap->plus_one != (long)_heap+1) return NULL; - - for (;;) { - p = HeapChunk13((u32)_heap->l.next+8, size); - if (p != NULL) return p; - - if (_heap->l.next->next == _heap->l.next) break; - } -#endif -} - -int HeapFree(void *heap, void *mem) { - struct Heap *_heap = (struct Heap*)heap; - struct Heap *h; - - if (heap == NULL || - _heap->plus_one != (long)_heap+1) return -4; - - for (h = (struct Heap*)_heap->l.next; h != &_heap->l; h = (struct Heap*)h->l.next) { - if (HeapChunk14(h->l, mem) != NULL) continue; - - break; - } - - if ((struct ll*)h == &_heap->l) return 0; - if (HeapChunk12() == 0) return 0; - ll_one(h); - h->l.next = 0; - FreeSysMemory(h); - - return 0; -} - -int HeapSize(void *heap) { - struct Heap *_heap = (struct Heap*)heap; - - if (heap == NULL || - _heap->plus_one != (long)_heap+1) return -4; - - for (;; _heap = _heap->plus_one) { - if (_heap->l.next == &_heap->l) - break; - } - - return HeapChunkSize(_heap->l.next+8); -} - -void HeapChunk12() { -} - -void HeapChunk13() { -} - -void HeapChunk14() { -} - -/////////////////////////////////////////////////////////////////////// -void _retonly(){} - -struct export heaplib_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "heaplib", - (func)_start, // entrypoint - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)CreateHeap, - (func)DestroyHeap, - (func)HeapMalloc, - (func)HeapFree, - (func)HeapSize, - (func)_retonly, - (func)_retonly, - (func)HeapPrepare, - (func)HeapChunk12, - (func)HeapChunk13, - (func)HeapChunk14, - (func)HeapChunkSize, - (func)_retonly, - (func)_retonly, - 0 -}; - - -//////////////////////////////entrypoint/////////////////////////////// -int _start(int argc, char* argv[]){ - return RegisterLibraryEntries(&heaplib_stub); -} - diff --git a/unfree/fps2bios/kernel/iopload/include/err.h b/unfree/fps2bios/kernel/iopload/include/err.h deleted file mode 100644 index ab421ae54..000000000 --- a/unfree/fps2bios/kernel/iopload/include/err.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __ERR_H__ -#define __ERR_H__ - -//#define ERR_VER 0x - -#define ERROR_OK 0 -#define ERROR_UNK -1 -//bad exception code -#define ERROR_BAD_EXCODE -50 - -//no exception handler for that code -#define ERROR_EXCODE_NOTFOUND -51 - -//already used -#define ERROR_USED_EXCODE -52 -#define ERROR_INTR_CONTEXT -100 -#define ERROR_DOES_EXIST -104 -#define ERROR_DOESNOT_EXIST -105 -#define ERROR_NO_TIMER -150 -#define ERROR_NOT_IRX -201 -#define ERROR_FILE_NOT_FOUND -203 -#define ERROR_FILE_ERROR -204 -#define ERROR_NO_MEM -400 -#define ERROR_SEMACOUNT_ZERO -400 - -// what should these be? Used in intrman.c -#define ERROR_ILLEGAL_INTRCODE ERROR_UNK -#define ERROR_CPUDI ERROR_UNK - -#endif//__ERR_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/errno.h b/unfree/fps2bios/kernel/iopload/include/errno.h deleted file mode 100644 index c8f33f943..000000000 --- a/unfree/fps2bios/kernel/iopload/include/errno.h +++ /dev/null @@ -1,143 +0,0 @@ -/* errno is not a global variable, because that would make using it - non-reentrant. Instead, its address is returned by the function - __errno. */ - -#ifndef _SYS_ERRNO_H_ -#ifdef __cplusplus -extern "C" { -#endif -#define _SYS_ERRNO_H_ - - -#define EPERM 1 /* Not super-user */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No children */ -#define EAGAIN 11 /* No more processes */ -#define ENOMEM 12 /* Not enough core */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Mount device busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math arg out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define ENOMSG 35 /* No message of desired type */ -#define EIDRM 36 /* Identifier removed */ -#define ECHRNG 37 /* Channel number out of range */ -#define EL2NSYNC 38 /* Level 2 not synchronized */ -#define EL3HLT 39 /* Level 3 halted */ -#define EL3RST 40 /* Level 3 reset */ -#define ELNRNG 41 /* Link number out of range */ -#define EUNATCH 42 /* Protocol driver not attached */ -#define ENOCSI 43 /* No CSI structure available */ -#define EL2HLT 44 /* Level 2 halted */ -#define EDEADLK 45 /* Deadlock condition */ -#define ENOLCK 46 /* No record locks available */ -#define EBADE 50 /* Invalid exchange */ -#define EBADR 51 /* Invalid request descriptor */ -#define EXFULL 52 /* Exchange full */ -#define ENOANO 53 /* No anode */ -#define EBADRQC 54 /* Invalid request code */ -#define EBADSLT 55 /* Invalid slot */ -#define EDEADLOCK 56 /* File locking deadlock error */ -#define EBFONT 57 /* Bad font file fmt */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data (for no delay io) */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* The object is remote */ -#define ENOLINK 67 /* The link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EMULTIHOP 74 /* Multihop attempted */ -#define ELBIN 75 /* Inode is remote (not really error) */ -#define EDOTDOT 76 /* Cross mount point (not really error) */ -#define EBADMSG 77 /* Trying to read unreadable message */ -#define EFTYPE 79 /* Inappropriate file type or format */ -#define ENOTUNIQ 80 /* Given log. name not unique */ -#define EBADFD 81 /* f.d. invalid for this operation */ -#define EREMCHG 82 /* Remote address changed */ -#define ELIBACC 83 /* Can't access a needed shared lib */ -#define ELIBBAD 84 /* Accessing a corrupted shared lib */ -#define ELIBSCN 85 /* .lib section in a.out corrupted */ -#define ELIBMAX 86 /* Attempting to link in too many libs */ -#define ELIBEXEC 87 /* Attempting to exec a shared library */ -#define ENOSYS 88 /* Function not implemented */ -#define ENMFILE 89 /* No more files */ -#define ENOTEMPTY 90 /* Directory not empty */ -#define ENAMETOOLONG 91 /* File or path name too long */ -#define ELOOP 92 /* Too many symbolic links */ -#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 96 /* Protocol family not supported */ -#define ECONNRESET 104 /* Connection reset by peer */ -#define ENOBUFS 105 /* No buffer space available */ -#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */ -#define EPROTOTYPE 107 /* Protocol wrong type for socket */ -#define ENOTSOCK 108 /* Socket operation on non-socket */ -#define ENOPROTOOPT 109 /* Protocol not available */ -#define ESHUTDOWN 110 /* Can't send after socket shutdown */ -#define ECONNREFUSED 111 /* Connection refused */ -#define EADDRINUSE 112 /* Address already in use */ -#define ECONNABORTED 113 /* Connection aborted */ -#define ENETUNREACH 114 /* Network is unreachable */ -#define ENETDOWN 115 /* Network interface is not configured */ -#define ETIMEDOUT 116 /* Connection timed out */ -#define EHOSTDOWN 117 /* Host is down */ -#define EHOSTUNREACH 118 /* Host is unreachable */ -#define EINPROGRESS 119 /* Connection already in progress */ -#define EALREADY 120 /* Socket already connected */ -#define EDESTADDRREQ 121 /* Destination address required */ -#define EMSGSIZE 122 /* Message too long */ -#define EPROTONOSUPPORT 123 /* Unknown protocol */ -#define ESOCKTNOSUPPORT 124 /* Socket type not supported */ -#define EADDRNOTAVAIL 125 /* Address not available */ -#define ENETRESET 126 -#define EISCONN 127 /* Socket is already connected */ -#define ENOTCONN 128 /* Socket is not connected */ -#define ETOOMANYREFS 129 -#define EPROCLIM 130 -#define EUSERS 131 -#define EDQUOT 132 -#define ESTALE 133 -#define ENOTSUP 134 /* Not supported */ -#define ENOMEDIUM 135 /* No medium (in tape drive) */ -#define ENOSHARE 136 /* No such host or network path */ -#define ECASECLASH 137 /* Filename exists with different case */ -#define EILSEQ 138 -#define EOVERFLOW 139 /* Value too large for defined data type */ - -/* From cygwin32. */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ - -#define __ELASTERROR 2000 /* Users can add values starting here */ - -#ifdef __cplusplus -} -#endif -#endif /* _SYS_ERRNO_H */ diff --git a/unfree/fps2bios/kernel/iopload/include/iopdebug.h b/unfree/fps2bios/kernel/iopload/include/iopdebug.h deleted file mode 100644 index 20c458519..000000000 --- a/unfree/fps2bios/kernel/iopload/include/iopdebug.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __IOPDEBUG_H__ -#define __IOPDEBUG_H__ - -#include - -void __putc(u8 c); -void __puts(u8 *s); -void __printf(char *fmt, ...); - - -#endif /* __IOPDEBUG_H__ */ diff --git a/unfree/fps2bios/kernel/iopload/include/iopelf.h b/unfree/fps2bios/kernel/iopload/include/iopelf.h deleted file mode 100644 index 666269304..000000000 --- a/unfree/fps2bios/kernel/iopload/include/iopelf.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __IOPELF_H__ -#define __IOPELF_H__ - -#include "romdir.h" - -#define MOD_TYPE_REL 1 -#define MOD_TYPE_2 2 -#define MOD_TYPE_DYN 3 -#define MOD_TYPE_CORE 4 - -typedef struct { - char *name; - short version; -} moduleInfo; - -// info about a module file -typedef struct module_info { - int type; // module type (MOD_TYPE_*) - int (*entry)(void*);// module entry point address - int gpValue; // module gp value - int progVAddr; // programs virtual address - int textSize; // size of text section - int dataSize; // size of data section - int bssSize; // size of bss section - int progMemSize; // size of program memory - int moduleInfo; // info about module ? -} MODULE_INFO; - -typedef struct { - u32 ei_magic; - u8 ei_class; - u8 ei_data; - u8 ei_version; - u8 ei_pad[9]; -} E_IDENT; - -typedef struct { - u8 e_ident[16]; //+00 0x7f,"ELF" (ELF file identifier), E_IDENT* - u16 e_type; //+10 ELF type: 0=NONE, 1=REL, 2=EXEC, 3=SHARED, 4=CORE - u16 e_machine; //+12 Processor: 8=MIPS R3000 - u32 e_version; //+14 Version: 1=current - u32 e_entry; //+18 Entry point address - u32 e_phoff; //+1C Start of program headers (offset from file start) - u32 e_shoff; //+20 Start of section headers (offset from file start) - u32 e_flags; //+24 Processor specific flags = 0x20924001 noreorder, mips - u16 e_ehsize; //+28 ELF header size (0x34 = 52 bytes) - u16 e_phentsize; //+2A Program headers entry size - u16 e_phnum; //+2C Number of program headers - u16 e_shentsize; //+2E Section headers entry size - u16 e_shnum; //+30 Number of section headers - u16 e_shstrndx; //+32 Section header stringtable index -} ELF_HEADER; //+34=sizeof -#define ET_SCE_IOPRELEXEC 0xFF80 -#define PT_SCE_IOPMOD 0x70000080 -#define SHT_REL 9 -#define EM_MIPS 8 - -typedef struct tag_COFF_AOUTHDR { - short magic; //+00 - short vstamp; //+02 - int tsize; //+04 - int dsize; //+08 - int bsize; //+0C - int entry; //+10 - int text_start; //+14 - int data_start; //+18 - int bss_start; //+1C - int field_20; //+20 - int field_24; //+24 - int field_28; //+28 - int field_2C; //+2C - int moduleinfo; //+30 - int gp_value; //+34 -} COFF_AOUTHDR, COHDR; //=38 - -typedef struct tag_CHDR{ - short f_magic; //+00 - short f_nscns; //+02 - int f_timdat; //+04 - int f_symptr; //+08 - int f_nsyms; //+0C - short f_opthdr; //+10 - short f_flags; //+12 -} CHDR; //=14 - -typedef struct tag_COFF_HEADER{ //same header as above - short f_magic; //+00 - short f_nscns; //+02 - int f_timdat; //+04 - int f_symptr; //+08 - int f_nsyms; //+0C - short f_opthdr; //+10 - short f_flags; //+12 - COFF_AOUTHDR opthdr; //+14 -} COFF_HEADER; //=4C - -typedef struct tag_COFF_scnhdr -{ - char s_name[8]; //+00 - int s_paddr; //+08 - int s_vaddr; //+0C - int s_size; //+10 - int s_scnptr; //+14 - int s_relptr; //+18 - int s_lnnoptr; //+1C - short s_nreloc; //+20 - short s_nlnno; //+22 - int s_flags; //+24 -} COFF_scnhdr, SHDR; //=28 - -typedef struct _fileInfo -{ - u32 type, //+00 - entry, //+04 - gp_value, //+08 - p1_vaddr, //+0C - text_size, //+10 - data_size, //+14 - bss_size, //+18 - p1_memsz; //+1C - moduleInfo *moduleinfo; //+20 -} fileInfo; - -typedef struct { - u32 p_type; //+00 see notes1 - u32 p_offset; //+04 Offset from file start to program segment. - u32 p_vaddr; //+08 Virtual address of the segment - u32 p_paddr; //+0C Physical address of the segment - u32 p_filesz; //+10 Number of bytes in the file image of the segment - u32 p_memsz; //+14 Number of bytes in the memory image of the segment - u32 p_flags; //+18 Flags for segment - u32 p_align; //+1C Alignment. The address of 0x08 and 0x0C must fit this alignment. 0=no alignment -} ELF_PHR; - -//notes1 -//------ -//0=Inactive -//1=Load the segment into memory, no. of bytes specified by 0x10 and 0x14 -//2=Dynamic linking -//3=Interpreter. The array element must specify a path name -//4=Note. The array element must specify the location and size of aux. info -//5=reserved -//6=The array element must specify location and size of the program header table. - -typedef struct { - u32 r_offset; - u32 r_info; -} ELF_REL; - -typedef struct { - char* moduleinfo; - u32 entry; //+04 - u32 gp_value; //+08 - u32 text_size; //+0C - u32 data_size; //+10 - u32 bss_size;//+14 - short moduleversion;//+18 - char* modulename; //+1A -} ELF_IOPMOD; - -typedef struct { - u32 sh_name; //+00 No. to the index of the Section header stringtable index - u32 sh_type; //+04 See notes2 - u32 sh_flags; //+08 see notes3 - u32 sh_addr; //+0C Section start address - u32 sh_offset; //+10 Offset from start of file to section - u32 sh_size; //+14 Size of section - u32 sh_link; //+18 Section header table index link - u32 sh_info; //+1C Info - u32 sh_addralign; //+20 Alignment. The adress of 0x0C must fit this alignment. 0=no alignment. - u32 sh_entsize; //+24 Fixed size entries. -} ELF_SHR; - -//notes 2 -//------- -//Type: -//0=Inactive -//1=PROGBITS -//2=SYMTAB symbol table -//3=STRTAB string table -//4=RELA relocation entries -//5=HASH hash table -//6=DYNAMIC dynamic linking information -//7=NOTE -//8=NOBITS -//9=REL relocation entries -//10=SHLIB -//0x70000000=LOPROC processor specifc -//0x7fffffff=HIPROC -//0x80000000=LOUSER lower bound -//0xffffffff=HIUSER upper bound -// -//notes 3 -//------- -//Section Flags: (1 bit, you may combine them like 3 = alloc & write permission) -//1=Write section contains data the is be writeable during execution. -//2=Alloc section occupies memory during execution -//4=Exec section contains executable instructions -//0xf0000000=Mask bits processor-specific - - -#define ELF32_ST_TYPE(i) ((i)&0xf) - -// special header for every iop module? -typedef struct { - u32 next; //+00 - char *name; //+04 - short version, //+08 - flags, //+0A - modid, //+0C - HE; //+0E - u32 entry, //+10 - gp_value, //+14 - p1_vaddr, //+18 - text_size, //+1C - data_size, //+20 - bss_size, //+24 - H28, //+28 - H2C; //+2C -} imageInfo; - -// pass in the memory to load the elf file from -// elfoffset - offset to load elf file to -void* loadElfFile(ROMFILE_INFO* ri, u32 elfoffset); - -#endif diff --git a/unfree/fps2bios/kernel/iopload/include/iopload.h b/unfree/fps2bios/kernel/iopload/include/iopload.h deleted file mode 100644 index ad20f1778..000000000 --- a/unfree/fps2bios/kernel/iopload/include/iopload.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __IOPLOAD_H__ -#define __IOPLOAD_H__ - -#include - -extern char *iopModules[32]; - -void Kmemcpy(void *dest, const void *src, int n); - -#define SBUS_MSFLG *(volatile int*)0xBD00F220 -#define SBUS_SMFLG *(volatile int*)0xBD00F230 -#define SBUS_F240 *(volatile int*)0xBD00F240 - -#define SBFLG_IOPALIVE 0x10000 -#define SBFLG_IOPSYNC 0x40000 - - -#endif /* __IOPLOAD_H__ */ diff --git a/unfree/fps2bios/kernel/iopload/include/kdmacman.h b/unfree/fps2bios/kernel/iopload/include/kdmacman.h deleted file mode 100644 index cabd0529e..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kdmacman.h +++ /dev/null @@ -1,116 +0,0 @@ -#ifndef __DMACMAN_H__ -#define __DMACMAN_H__ - -#define DMACMAN_VER 0x101 - -////////////////////////////// D_CHCR - DMA Channel Control Register -#define DMAf_30 0x40000000 // unknown; set on 'to' direction -#define DMAf_TR 0x01000000 // DMA transfer -#define DMAf_LI 0x00000400 // Linked list GPU; also SPU & SIF0 -#define DMAf_CO 0x00000200 // Continuous stream -#define DMAf_08 0x00000100 // unknown -#define DMAf_DR 0x00000001 // Direction to=0/from=1 -// 31 24 23 16 15 8 7 0 -// ÖÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄ· -// º ³?³ ³ ³ ³ ³ ³Tº ³ ³ ³ ³ ³ ³ ³ º ³ ³ ³ ³ ³L³C³?º ³ ³ ³ ³ ³ ³ ³Dº -// º ³?³ ³ ³ ³ ³ ³Rº ³ ³ ³ ³ ³ ³ ³ º ³ ³ ³ ³ ³I³O³?º ³ ³ ³ ³ ³ ³ ³Rº -// ÓÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁĽ -// 30 24 10 9 8 0 - -////////////////////////////// DPCR - DMA Primary Control Register -// ÖÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄ· -// º 67 ³ DMA 6 º DMA 5 ³ DMA 4 º DMA 3 ³ DMA 2 º DMA 1 ³ DMA 0 º 0xBF8010F0 DPCR -// ÓÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁĽ -// ÖÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄ· -// º ³ DMA85 º DMA12 ³ DMA11 º DMA10 ³ DMA 9 º DMA 8 ³ DMA 7 º 0xBF801570 DPCR_ -// ÓÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁĽ -// ÖÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÒÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄ· -// º ³ º ³ º ³ DMA15 º DMA14 ³ DMA13 º 0xBF8015F0 DPCR__ -// ÓÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÐÄÁÄÁÄÁÄÁÄÁÄÁÄÁĽ - -////////// DPCR -#define DMAch_MDECin 0 -#define DMAch_MDECout 1 -#define DMAch_GPU 2 // SIF2 both directions -#define DMAch_CD 3 -#define DMAch_SPU 4 -#define DMAch_PIO 5 -#define DMAch_GPUotc 6 - -#define DMAch_67 67 // strange - -////////// DPCR_ -#define DMAch_SPU2 7 -#define DMAch_8 8 -#define DMAch_SIF0 9 // SIFout IOP->EE -#define DMAch_SIF1 10 // SIFin EE->IOP -#define DMAch_SIO2in 11 -#define DMAch_SIO2out 12 - -#define DMAch_85 85 // stange, very strange - -////////// DPCR__ -#define DMAch_13 13 -#define DMAch_14 14 -#define DMAch_15 15 - -int dmacman_start(int argc, char* argv[]); // 0 -int dmacman_deinit(); // 2 - -void dmacman_call4_SetD_MADR(unsigned int ch, int value); // 4 -int dmacman_call5_GetD_MADR(unsigned int ch); // 5 -void dmacman_call6_SetD_BCR(unsigned int ch, int value); // 6 -int dmacman_call7_GetD_BCR(unsigned int ch); // 7 -void dmacman_call8_SetD_CHCR(unsigned int ch, int value); // 8 -int dmacman_call9_GetD_CHCR(unsigned int ch); // 9 -void dmacman_call10_SetD_TADR(unsigned int ch, int value); //10 -int dmacman_call11_GetD_TADR(unsigned int ch); //11 -void dmacman_call12_Set_4_9_A(unsigned int ch, int value); //12 -int dmacman_call13_Get_4_9_A(unsigned int ch); //13 -void dmacman_call14_SetDPCR(int value); //14 -int dmacman_call15_GetDPCR(); //15 -void dmacman_call16_SetDPCR2(int value); //16 -int dmacman_call17_GetDPCR2(); //17 -void dmacman_call18_SetDPCR3(int value); //18 -int dmacman_call19_GetDPCR3(); //19 -void dmacman_call20_SetDICR(int value); //20 -int dmacman_call21_GetDICR(); //21 -void dmacman_call22_SetDICR2(int value); //22 -int dmacman_call23_GetDICR2(); //23 -void dmacman_call24_setBF80157C(int value); //24 -int dmacman_call25_getBF80157C(); //25 -void dmacman_call26_setBF801578(int value); //26 -int dmacman_call27_getBF801578(); //27 -int dmacman_call28_SetDMA(int ch, int address, int size, int count, int dir); //28 -int dmacman_call29_SetDMA_chainedSPU_SIF0(int ch, int size, int c);//29 -int dmacman_call30_SetDMA_SIF0(int ch, int size, int c); //30 -int dmacman_call31_SetDMA_SIF1(int ch, int size); //31 -void dmacman_call32_StartTransfer(int ch); //32 -void dmacman_call33_SetVal(int ch, int value); //33 -void dmacman_call34_EnableDMAch(int ch); //34 -void dmacman_call35_DisableDMAch(int ch); //35 - -//SIF2 DMA ch 2 (GPU) -#define DMAch_SIF2_MADR (*(volatile int*)0xBF8010A0) -#define DMAch_SIF2_BCR (*(volatile int*)0xBF8010A4) -#define DMAch_SIF2_BCR_size (*(volatile short*)0xBF8010A4) -#define DMAch_SIF2_BCR_count (*(volatile short*)0xBF8010A6) -#define DMAch_SIF2_CHCR (*(volatile int*)0xBF8010A8) -//SIF0 DMA ch 9 -#define DMAch_SIF9_MADR (*(volatile int*)0xBF801520) -#define DMAch_SIF9_BCR (*(volatile int*)0xBF801524) -#define DMAch_SIF9_BCR_size (*(volatile short*)0xBF801524) -#define DMAch_SIF9_BCR_count (*(volatile short*)0xBF801526) -#define DMAch_SIF9_CHCR (*(volatile int*)0xBF801528) -#define DMAch_SIF9_TADR (*(volatile int*)0xBF80152C) -//SIF1 DMA ch 10 (0xA) -#define DMAch_SIFA_MADR (*(volatile int*)0xBF801530) -#define DMAch_SIFA_BCR (*(volatile int*)0xBF801534) -#define DMAch_SIFA_BCR_size (*(volatile short*)0xBF801534) -#define DMAch_SIFA_BCR_count (*(volatile short*)0xBF801536) -#define DMAch_SIFA_CHCR (*(volatile int*)0xBF801538) - -#define DMAch_DPCR (*(volatile int*)0xBF8010F0) -#define DMAch_DPCR2 (*(volatile int*)0xBF801570) - -#endif//__DMACMAN_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/kexcepman.h b/unfree/fps2bios/kernel/iopload/include/kexcepman.h deleted file mode 100644 index 774831742..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kexcepman.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __EXCEPMAN_H__ -#define __EXCEPMAN_H__ - -#define EXCEPMAN_VER 0x101 - -#define EXCEP_MAX 16 - -struct exHandler { - void *next; // next points to the next funccode :/ - int info; - u32 funccode[0]; -}; - -void *GetExHandlersTable(); // 3 - -int RegisterExceptionHandler(int code, struct exHandler *handler); // 4 -int RegisterPriorityExceptionHandler(int code, int priority, - struct exHandler *handler); // 5 -int RegisterDefaultExceptionHandler(struct exHandler *handler); // 6 -int ReleaseExceptionHandler(int excode, struct exHandler *handler); // 7 -int ReleaseDefaultExceptionHandler(struct exHandler *handler); // 8 - -#endif//__EXCEPMAN_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/kheaplib.h b/unfree/fps2bios/kernel/iopload/include/kheaplib.h deleted file mode 100644 index 3bfd61268..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kheaplib.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __HEAPLIB_H__ -#define __HEAPLIB_H__ - -struct ll{ struct ll *next, *prev; }; //linked list - - -struct Heap { - long plus_one; - int size2free; - struct ll l; - void *mem; -}; - -struct Chunk { - u32 _mem; - int freesize; - int usedsize; - u32 mem_16; - u32 unk4; - u32 unk5; -}; - -void *CreateHeap(int chunkSize, int memoryType ); -int DestroyHeap(void *heap); - -void *HeapMalloc(void *heap, int size); -int HeapFree(void *heap, void * mem); -int HeapSize(void *heap); - -#endif /* __HEAPLIB_H__ */ diff --git a/unfree/fps2bios/kernel/iopload/include/kintrman.h b/unfree/fps2bios/kernel/iopload/include/kintrman.h deleted file mode 100644 index b291ed64d..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kintrman.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __INTRMAN_H__ -#define __INTRMAN_H__ - -#define INTRMAN_VER 0x102 - -#define INT_VBLANK 0x00 - -#define INT_CDROM 0x02 - -#define INT_RTC0 0x04 -#define INT_RTC1 0x05 -#define INT_RTC2 0x06 - -#define INT_EVBLANK 0x0B - -#define INT_RTC3 0x0E -#define INT_RTC4 0x0F -#define INT_RTC5 0x10 - -#define INT_DMA9 0x2A //sif0 -#define INT_DMA10 0x2B //sif1 - -#define IMODE_DMA_IRM 0x100 -#define IMODE_DMA_IQE 0x200 - -typedef int (*intrh_func)(void*); - -int RegisterIntrHandler(int interrupt, int, intrh_func intrh, void*); - //4 (13,18) -int ReleaseIntrHandler(int interrupt); //5 (18) -int EnableIntr(int interrupt); //6 (13,18) -int DisableIntr(int interrupt, int *oldstat); //7 (18) -int CpuEnableIntr(); //9 (18,21,26) -int CpuSuspendIntr(u32* ictrl); //17(05,06,07,13,14,18,26) -int CpuResumeIntr(u32 ictrl); //18(05,06,07,13,14,18,26) -int QueryIntrContext(); //23(07,13) - -#endif//__INTRMAN_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/kioman.h b/unfree/fps2bios/kernel/iopload/include/kioman.h deleted file mode 100644 index df8f4690d..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kioman.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef __IOMAN_H__ -#define __IOMAN_H__ - -#define IOMAN_VER 0x102 - -#define STDIN 0 -#define STDOUT 1 - -struct ioman_FUNCS{ - int init(struct ioman_DRV *drv); //00 - void term(struct ioman_DRV *drv); //01 - int format(char *filename); //02 - int open(int fd, char *filename, int flag); //03 - int close(int fd); //04 - int read(int fd, void *buf, int nbyte); //05 - int write(int fd, void *buf, int nbyte); //06 - int lseek(int fd, int offset, int whence); //07 - int ioctl(int fd, int request, int arg); //08 - int remove(char *filename); //09 - int mkdir(char *filename); //10 - int rmdir(char *filename); //11 - int dopen(char *filename); //12 - int dclose(int fd); //13 - int dread(int fd, void *buf); //14 - int getstat(char *filename, void *buf); //15 - int chstat(char *filename, void *buf, unsigned int mask); //16 -}; - -struct ioman_DRV{ //struct fileio_driver from ps2lib - char *driver; //+00 - int unk1; //+04 - int version; //+08 - char *description; //+0C - struct ioman_FUNCS *f_list; //+10 -}; //=14 - -int open(char *filename, int flag); // 4(26) -int close(int fd); // 5(26) -int read(int fd, void *buf, long count); // 6(17,26) -int write(int fd, void *buf, long count); // 7(17,26) -int lseek(int fd, int offset, int whence); // 8(26) -int ioctl(int fd, int request, int arg); // 9(26) -int remove(char *filename); //10(26) -int mkdir(char *filename); //11(26) -int rmdir(char *filename); //12(26) -int dopen(char *filename); //13(26) -int dclose(int fd); //14(26) -int dread(int fd, void *buf); //15(26) -int getstat(char *filename, void *buf); //16(26) -int chstat(char *filename, void *buf, unsigned int mask); //17(26) -int format(char *filename); //18(26) -int AddDrv(struct ioman_DRV *drv); //20(26) -int DelDrv(char *device); //21(26) - -#endif//__IOMAN_H__ - diff --git a/unfree/fps2bios/kernel/iopload/include/kloadcore.h b/unfree/fps2bios/kernel/iopload/include/kloadcore.h deleted file mode 100644 index 8454919e7..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kloadcore.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef __LOADCORE_H__ -#define __LOADCORE_H__ - -#include - -#define LOADCORE_VER 0x101 - -typedef int (*func)(); - -#define VER(major, minor) ((((major) & 0xFF)<<8) + ((minor) & 0xFF)) - -#define MODULE_RESIDENT_END 0 -#define MODULE_NO_RESIDENT_END 1 - -struct func_stub { - int jr_ra; //jump instruction - int addiu0; //addiu zero, number -}; - -// defined by irx.h in the sdk -//#define IMPORT_MAGIC 0x41E00000 -//#define EXPORT_MAGIC 0x41C00000 - -#define FLAG_EXPORT_QUEUED 1 -#define FLAG_IMPORT_QUEUED 2 - -#define FLAG_NO_AUTO_LINK 1 - -#define INS_JR 2 -#define INS_ADDIU 9 -#define INS_JR_RA 0x03E00008 -#define INS_J 0x08000000 - -enum tag_BOOTUPCB_PRIO{ - BOOTUPCB_FIRST = 0, - BOOTUPCB_RUN_UDNL = 1, - BOOTUPCB_NORMAL = 2, - BOOTUPCB_LAST = 3, - BOOTUPCB_PRIORITIES -} BOOTUPCB_PRIO; - -struct import { - u32 magic; //0x41E00000 - struct import *next; - short version; //mjmi (mj=major, mi=minor version numbers) - short flags; //=0 - char name[8]; - struct func_stub func[0]; //the last one is 0, 0 (i.e. nop, nop) -}; - -struct export { - u32 magic_link; //0x41C00000, prev - struct export *next; - short version; //mjmi (mj=major, mi=minor version numbers) - short flags; //=0 - char name[8]; - func func[45]; //usually module entry point (allways?) -// func1 -// func2 -// func3 -// funcs // more functions: the services provided my module -}; - -struct bootmode { - short unk0; - char id; - char len; - int data[0]; -}; - -typedef struct boot_params { - int ramMBSize; //+00/0 size of iop ram in megabytes (2 or 8) - int bootInfo; //+04/1 ==QueryBootMode(KEY_IOPbootinfo) - char* udnlString; //+08/2 points to the undl reboot string, NULL if no string - u32 firstModuleAddr;//+0C/3 the load address of the first module (sysmem) - int pos; //+10/4 - int size; //+14/5 - int numConfLines; //+18/6 number of lines in IOPBTCONF - u32** moduleAddrs; //+1C/7 pointer to an array of addresses to load modules from -} BOOT_PARAMS; //=20 - -void FlushIcache(); //4 (14) -void FlushDcache(); //5 (14,21,26) -int RegisterLibraryEntries(struct export*); //6 (05,06,07,13,14,17,18,28) -u32* QueryBootMode(int code); //12(11,21,25,26,28) -int loadcore_call20_registerFunc(int (*function)(int *, int), int a1, int *result); - //20(28) - -#endif//__LOADCORE_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/ksifcmd.h b/unfree/fps2bios/kernel/iopload/include/ksifcmd.h deleted file mode 100644 index 166673d61..000000000 --- a/unfree/fps2bios/kernel/iopload/include/ksifcmd.h +++ /dev/null @@ -1,162 +0,0 @@ -#ifndef __SIFCMD_H__ -#define __SIFCMD_H__ - -#define SIFCMD_VER 0x101 - -#define SIF_CMDI_SYSTEM 0x80000000 // system function call -#define SIF_CMDC_CHANGE_SADDR ( SIF_CMDI_SYSTEM | 0x00000000) -#define SIF_CMDC_SET_SREG ( SIF_CMDI_SYSTEM | 0x00000001) -#define SIF_CMDC_INIT_CMD ( SIF_CMDI_SYSTEM | 0x00000002) -#define SIF_CMDC_RESET_CMD ( SIF_CMDI_SYSTEM | 0x00000003) - -#define SIF_CMDC_RPC_END ( SIF_CMDI_SYSTEM | 0x00000008) -#define SIF_CMDC_RPC_BIND ( SIF_CMDI_SYSTEM | 0x00000009) -#define SIF_CMDC_RPC_CALL ( SIF_CMDI_SYSTEM | 0x0000000A) -#define SIF_CMDC_RPC_RDATA ( SIF_CMDI_SYSTEM | 0x0000000C) - -typedef struct { - unsigned int psize:8; // packet size [16->112] - unsigned int dsize:24;// extra data size - unsigned int daddr; // extra data address - unsigned int fcode; // function code - unsigned int opt; // optional user parameter -} SifCmdHdr; - -typedef int (*cmdh_func) (SifCmdHdr*, void*); -typedef void *(*rpch_func)(u32 code, void *param1, int param2); - -typedef struct { - SifCmdHdr hdr; - void *newaddr; -} SifCmdCSData; - -typedef struct { - SifCmdHdr chdr; - int rno; - unsigned int value; -} SifCmdSRData; - -typedef struct { - SifCmdHdr chdr; - int size; - int flag; - char arg[80]; -} SifCmdResetData; - -struct sifcmd_RPC_SERVER_DATA{ //t_rpc_server_data - int command; /* 04 00 */ - - rpch_func func; /* 05 01 */ - void *buff; /* 06 02 */ - int size; /* 07 03 */ - - rpch_func cfunc; /* 08 04 */ - void *cbuff; /* 09 05 */ - int csize; /* 10 06 */ - - struct sifcmd_RPC_CLIENT_DATA*client; /* 11 07 */ - void *pkt_addr; /* 12 08 */ - int fno; /* 13 09 */ - - void *receive; /* 14 10 */ - int rsize; /* 15 11 */ - int rmode; /* 16 12 */ - int rid; /* 17 13 */ - - struct sifcmd_RPC_SERVER_DATA*link; /* 18 14 */ - struct sifcmd_RPC_SERVER_DATA*next; /* 19 15 */ - struct sifcmd_RPC_DATA_QUEUE *base; /* 20 16 */ -}; - - -struct sifcmd_RPC_HEADER{ //t_rpc_header - void *pkt_addr; /* 04 00 */ - u32 rpc_id; /* 05 01 */ - int tid; /* 06 02 */ - u32 mode; /* 07 03 */ -}; - - -struct sifcmd_RPC_CLIENT_DATA{ //t_rpc_client_data - struct sifcmd_RPC_HEADER hdr; - u32 command; /* 04 08 */ - void *buff, /* 05 09 */ - *cbuff; /* 06 10 */ - void (*func)(void*); /* 07 11 */ - void *param; /* 08 12*/ - struct sifcmd_RPC_SERVER_DATA*server; /* 09 13 */ -}; - -struct sifcmd_RPC_RECEIVE_DATA{ //t_rpc_receive_data - struct sifcmd_RPC_HEADER hdr; - void *src, /* 04 */ - *dest; /* 05 */ - int size; /* 06 */ -}; - -struct sifcmd_RPC_DATA_QUEUE{ //t_rpc_data_queue - int key, /* 00 */ - active; /* 01 */ - struct sifcmd_RPC_SERVER_DATA*link, /* 02 */ - *start, /* 03 */ - *end; /* 04 */ - struct sifcmd_RPC_DATA_QUEUE *next; /* 05 */ -}; - -typedef struct { - SifCmdHdr hdr; - u32 rec_id; - void *paddr; - u32 pid; -} RPC_PACKET; - -typedef struct { - RPC_PACKET packet; - struct sifcmd_RPC_CLIENT_DATA *client; - u32 command; - struct sifcmd_RPC_SERVER_DATA *server; - void *buff, *cbuff; -} RPC_PACKET_END; - -typedef struct { - RPC_PACKET packet; - struct sifcmd_RPC_CLIENT_DATA *client; - u32 fno; -} RPC_PACKET_BIND; - -typedef struct { - RPC_PACKET_BIND packet; - u32 size; - void *receive; - u32 rsize; - u32 rmode; - struct sifcmd_RPC_SERVER_DATA *server; -} RPC_PACKET_CALL; - -typedef struct { - RPC_PACKET packet; - struct sifcmd_RPC_CLIENT_DATA *client; - void *src; - void *dst; - u32 size; -} RPC_PACKET_RDATA; - - -typedef struct { - cmdh_func func; - void *data; -} SifCmdData; - -void SifInitCmd(); //4 (21) -void SifAddCmdHandler(int pos, cmdh_func func, void *data); //10(21) -void SifInitRpc(int mode); //14(26) -void SifRegisterRpc(struct sifcmd_RPC_SERVER_DATA *sd, u32 cmd, - rpch_func func, void *buff, - rpch_func cfunc, void *cbuff, - struct sifcmd_RPC_DATA_QUEUE *dq); //17(26) -void SifSetRpcQueue(struct sifcmd_RPC_DATA_QUEUE* dq, int thid); //19(26) -void SifRpcLoop(struct sifcmd_RPC_DATA_QUEUE* dq); //22(26) -int SifGetOtherData(struct sifcmd_RPC_RECEIVE_DATA *rd, - void *src, void *dst, int size, int mode); //23(26) - -#endif//__SIFCMD_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/ksifman.h b/unfree/fps2bios/kernel/iopload/include/ksifman.h deleted file mode 100644 index 94434545c..000000000 --- a/unfree/fps2bios/kernel/iopload/include/ksifman.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef __SIFMAN_H__ -#define __SIFMAN_H__ - -#include - -#define SIFMAN_VER 0x101 - -#define SIF_FROM_IOP 0x0 -#define SIF_TO_IOP 0x1 -#define SIF_FROM_EE 0x0 -#define SIF_TO_EE 0x1 - -#define SIF_DMA_INT_I 0x2 -#define SIF_DMA_INT_O 0x4 -#define SIF_DMA_SPR 0x8 -#define SIF_DMA_BSN 0x10 -#define SIF_DMA_TAG 0x20 - -struct sifman_DMA { //t_sif_dma_transfer - void *data; - void *addr; - int size; - int attr; -}; - -void SifDeinit(); //2 - -void SifSIF2Init(); //4 -void SifInit(); //5 (21,25,26) -void SifSetDChain(); //6 -u32 SifSetDma(struct sifman_DMA* psd, int len); //7 (26) -int SifDmaStat(u32 id); //8 (26) -void SifSend(struct sifman_DMA sd); //9 -void SifSendSync(); //10 -int SifIsSending(); //11 -void SifSetSIF0DMA(void *data, int size, int attr); //12 -void SifSendSync0(); //13 -int SifIsSending0(); //14 -void SifSetSIF1DMA(void *data, int size, int attr); //15 -void SifSendSync1(); //16 -int SifIsSending1(); //17 -void SifSetSIF2DMA(void *data, int size, int attr); //18 -void SifSendSync2(); //19 -int SifIsSending2(); //20 -int SifGetEEIOPflags(); //21 -int SifSetEEIOPflags(int val); //22(21) -int SifGetIOPEEflags(); //23 -int SifSetIOPEEflags(int val); //24(28) -int SifGetEErcvaddr(); //25 -int SifGetIOPrcvaddr(); //26 -int SifSetIOPrcvaddr(int val); //27 -void SifSet1450_2(); //28 -int SifCheckInit(); //29(21,26) -void SifSet0CB(int (*_function)(int), int _param);//30 -void SifReset0CB(); //31 - -#endif /* __SIFMAN_H__ */ diff --git a/unfree/fps2bios/kernel/iopload/include/kstdio.h b/unfree/fps2bios/kernel/iopload/include/kstdio.h deleted file mode 100644 index 8877f32cc..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kstdio.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __STDIO_H__ -#define __STDIO_H__ - -#define STDIO_VER 0x102 - -#define TAB 0x9 //\t -#define LF 0x10 //\n -#define CR 0x13 //\r - -void printf(const char *format, ...); // 4(21,25,26) -int getchar(); // 5 -//int putchar(int c); // 6 -int puts(char *s); // 7 -char *gets(char *s); // 8 -int fdprintf(int fd, const char *format, ...); // 9 -int fdgetc(int fd); //10 -int fdputc(int c, int fd); //11 -int fdputs(char *s, int fd); //12 -char *fdgets(char *buf, int fd); //13 - -#endif//__STDIO_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/ksysclib.h b/unfree/fps2bios/kernel/iopload/include/ksysclib.h deleted file mode 100644 index d73f83d66..000000000 --- a/unfree/fps2bios/kernel/iopload/include/ksysclib.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __SYSCLIB_H__ -#define __SYSCLIB_H__ - -#define SYSCLIB_VER 0x101 - -#include - -#define _U 01 -#define _L 02 -#define _N 04 -#define _S 010 -#define _P 020 -#define _C 040 -#define _X 0100 -#define _B 0200 - -extern const char _ctype_[]; - -#ifndef __cplusplus -#define isalpha(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L)) -#define isupper(c) ((_ctype_+1)[(unsigned)(c)]&_U) -#define islower(c) ((_ctype_+1)[(unsigned)(c)]&_L) -#define isdigit(c) ((_ctype_+1)[(unsigned)(c)]&_N) -#define isxdigit(c) ((_ctype_+1)[(unsigned)(c)]&(_X|_N)) -#define isspace(c) ((_ctype_+1)[(unsigned)(c)]&_S) -#define ispunct(c) ((_ctype_+1)[(unsigned)(c)]&_P) -#define isalnum(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L|_N)) -#define isprint(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B)) -#define isgraph(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N)) -#define iscntrl(c) ((_ctype_+1)[(unsigned)(c)]&_C) -#endif /* !__cplusplus */ - -#define isascii(c) ((unsigned)(c)<=0177) -#define toascii(c) ((c)&0177) - -unsigned char look_ctype_table(int pos); -void* memset(void *s, int c, size_t n); -void bzero(void *s, size_t n); -int strcmp (const char *, const char *); -char* index (const char *s, int c); -int strlen (const char *); -char* strncpy(char *dest, const char *src, size_t n); -long int strtol(const char *nptr, char **endptr, int base); -//int prnt(void (*func)(void*, int), int *v, const char *format, ...); //18(17) - -#endif//__SYSCLIB_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/ksysmem.h b/unfree/fps2bios/kernel/iopload/include/ksysmem.h deleted file mode 100644 index 97234350c..000000000 --- a/unfree/fps2bios/kernel/iopload/include/ksysmem.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __SYSMEM_H__ -#define __SYSMEM_H__ - -#include - -#define SYSMEM_VER 0x101 - -//allocation strategies -#define ALLOC_FIRST 0 -#define ALLOC_LAST 1 -#define ALLOC_LATER 2 - -// see QueryBlockTopAddress, QueryBlockSize -#define USED 0x00000000 -#define FREE 0x80000000 - -void *AllocSysMemory(int flags, int size, void *mem);//4 (11,26) -int FreeSysMemory(void *mem); //5 (26) -unsigned int QueryMemSize(); -unsigned int QueryMaxFreeMemSize(); -unsigned int QueryTotalFreeMemSize(); -void *QueryBlockTopAddress(void *address); -int QueryBlockSize(void *address); -char *Kprintf(const char *format,...); //14(06,14,26) -void sysmem_call15_set_Kprintf(char* (*newKprintf)(unsigned int unk, const char*, ...), unsigned int newunk); - -#endif //__SYSMEM_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/kthbase.h b/unfree/fps2bios/kernel/iopload/include/kthbase.h deleted file mode 100644 index 818096ebe..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kthbase.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef __THBASE_H__ -#define __THBASE_H__ - -#define THBASE_VER 0x101 - -struct thbase_thread{ - unsigned int attr; - unsigned int option; - int (*entry)(); - unsigned int stackSize; - unsigned int initPriority; -}; - -int CreateThread(struct thbase_thread*); //4 (21,26) //returns thid -void StartThread(int thid, int); //6 (21,26) -int GetThreadId(); //20(26) //returns thid? -int GetSystemStatusFlag(); //41(13,21) - -#endif//__THBASE_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/kthsemap.h b/unfree/fps2bios/kernel/iopload/include/kthsemap.h deleted file mode 100644 index 2a8718cc8..000000000 --- a/unfree/fps2bios/kernel/iopload/include/kthsemap.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __THSEMAP_H__ -#define __THSEMAP_H__ - -#define THSEMAP_VER 0x101 - -struct thsema_sema{ - unsigned int attr; - unsigned int option; - int initCount; - int maxCount; -}; - -int CreateSema(struct thsema_sema* sema); // 4(15) -int SignalSema(int semaid); // 6(15) -int WaitSema(int semaid); // 8(15) - -#endif//__THSEMAP_H__ diff --git a/unfree/fps2bios/kernel/iopload/include/ktimrman.h b/unfree/fps2bios/kernel/iopload/include/ktimrman.h deleted file mode 100644 index 5a34bdca2..000000000 --- a/unfree/fps2bios/kernel/iopload/include/ktimrman.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __TIMEMAN_H__ -#define __TIMEMAN_H__ - -#define TIMEMAN_VER 0x101 - -//timids << 2; use AllocHardTimer or ReferHardTimer to get one -#define RTC0 0xBF801100 -#define RTC1 0xBF801110 -#define RTC2 0xBF801120 - -#define RTC3 0xBF801480 -#define RTC4 0xBF801490 -#define RTC5 0xBF8014A0 - -#define RTC_HOLDREGS 0xBF8014B0 -#define RTC_HOLDMODE (*(volatile unsigned int*)0xBF8014C0) - -//source -#define TC_SYSCLOCK 1 -#define TC_PIXEL 2 -#define TC_HLINE 4 -#define TC_HOLD 8 - -//size -#define TIMER_SIZE_16 16 -#define TIMER_SIZE_32 32 - -//prescale -#define TIMER_PRESCALE_1 1 -#define TIMER_PRESCALE_8 8 -#define TIMER_PRESCALE_16 16 -#define TIMER_PRESCALE_256 256 - -int AllocHardTimer(int source, int size, int prescale); //4 -int ReferHardTimer(int source, int size, int mode, int modemask);//5 -int FreeHardTimer(int timid); //6 -void SetTimerMode(int timid, int mode); //7 -unsigned int GetTimerStatus(int timid); //8 -void SetTimerCounter(int timid, unsigned int count); //9 -unsigned int GetTimerCounter(int timid); //10 -void SetTimerCompare(int timid, unsigned int compare); //11 -unsigned int GetTimerCompare(int timid); //12 -void SetHoldMode(int holdnum, int mode); //13 -unsigned long GetHoldMode(int holdnum); //14 -unsigned long GetHoldReg(int holdnum); //15 -int GetHardTimerIntrCode(int timid); //16 - -#endif//__TIMEMAN_H__ \ No newline at end of file diff --git a/unfree/fps2bios/kernel/iopload/include/romdir.h b/unfree/fps2bios/kernel/iopload/include/romdir.h deleted file mode 100644 index d8a68b9cb..000000000 --- a/unfree/fps2bios/kernel/iopload/include/romdir.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef __ROMDIR_H__ -#define __ROMDIR_H__ - -#include - -// an entry in a romdir table. a romdir table is an array of these. -// gets filled in by searchRomDir() -typedef struct romdir_entry { - char name[10]; //+00 - short extSize; //+0A - int fileSize; //+0C -} __attribute__ ((packed)) ROMDIR_ENTRY; - - -// info about a file in a romdir -// gets filled in by searchFileInRom() -typedef struct { - ROMDIR_ENTRY* entry; // pointer to the file's ROMDIR_ENTRY - u32 fileData; // address of file contents - u32 extData; // address of file's ext info -} ROMFILE_INFO; - -// info about the location of a romdir table -typedef struct { - u32 romPtr; //+00 - ROMDIR_ENTRY* romdirPtr;//+04 - u32 extinfoPtr; //+08 -} ROMDIR_INFO; - -typedef struct romfs { - char* filename; //+00 - int fd; //+04 - int size; //+08 - ROMDIR_INFO romdirInfo; //+0C -} ROMFS; - -// rounds off a value to the next multiple -#define ROUND_UP(num, multiple) (((num)+multiple-1) & (~(multiple-1))) - -// searches between beginning and end addresses for a romdir structure. -// if found it returns info about it in romDirInfo. -// -// args: address to start searching from -// address to stop searching at -// gets filled in with info if found -// returns: a pointer to the filled in romDirInfo if successful -// NULL if error -extern ROMDIR_INFO* searchRomDir(const u32* searchStartAddr, const u32* searchEndAddr, ROMDIR_INFO* romDirInfo); - -// find a file in the romdir table and return info about it -// -// args: info about romdir to search through -// filename to search for -// structure to get info about file into -// returns: a pointer to fileinfo if successful -// NULL otherwise -extern ROMFILE_INFO* searchFileInRom(const ROMDIR_INFO* romdirInfo, const char* filename, ROMFILE_INFO* fileinfo); - -// gets a hex number from *addr and updates the pointer -// -// args: pointer to string buffer containing a hex number -// returns: the value of the hex number -extern u32 getHexNumber(char** addr); - -/* -IOPBTCONF file format -===================== -each line is one of this: - -1. loading address of IOP kernel -Format: @ -Example: @800 -Default: 0 -Description: starting with (or 0 if not specified) the loader will - place modules in memory on 256 boundaries at +0x30 (the first 48 bytes are - reserved for info about the following module) - -2. address of function to be called while loading of IOP kernel -Format: !addr -Description: the code indicated by will be run on kernel loading - -3. name of (parent) included IOPBTCONF -Format: !include -Description: allow to have another file with same format to be loaded - recursively; support for this is limited because of the BUGGY parsing; -Note: you can have such option only at the begining of IOPBTCONF and the - inclusion can be made without getting stucked in recursion like this: - -ioprp1.img contains IOPBTCONF1 (!include IOPBTCON2) and IOPBTCONF11 -ioprp2.img contains IOPBTCONF2 (!include IOPBTCONF1) -ioprp.img contains IOPBTCONF (!include IOPBTCONF2!include IOPBTCONF11) -rom0 contains IOPBTCONF and IOPBTCON2 - -udnl cdrom0:ioprp1.img cdrom0:ioprp2.img cdrom0:ioprp.img - -the starting of the chain can be named IOPBTCONF only -also you can include only from the previous romz - -4. comment -Format: # -Example: #APPLOAD -Description: you can have comments on a line that starts with # - -5. modules that have to be loaded after a reset -Format: -Example: SYSMEM -Description: each line of IOPBTCONF usualy have a module name; the order the - modules appear in the list is the order they are loaded as IOP kernel --------------------------------- -Notes: - - each line ends with , that is 0x0A - - in the final loading list the first 2 positions must be SYSMEM and LOADCORE -*/ - -#endif /* __ROMDIR_H__ */ diff --git a/unfree/fps2bios/kernel/iopload/intrman/Makefile b/unfree/fps2bios/kernel/iopload/intrman/Makefile deleted file mode 100644 index ee920330b..000000000 --- a/unfree/fps2bios/kernel/iopload/intrman/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/INTRMAN - -IOP_INCS += -I../include - -IOP_OBJS = int_handler.o intrman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_excepman.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/intrman/int_handler.s b/unfree/fps2bios/kernel/iopload/intrman/int_handler.s deleted file mode 100644 index c5a944646..000000000 --- a/unfree/fps2bios/kernel/iopload/intrman/int_handler.s +++ /dev/null @@ -1,373 +0,0 @@ - -.set noreorder -.set noat - - .global EXCEP_Sys_handler - .ent EXCEP_Sys_handler -EXCEP_Sys_handler: - - .word 0 - .word 0 - - jal EXCEP_Sys_8 - nop # branch delay - - # restore status - lw $k0, EX_ST($0) - mtc0 $k0, $12 - - lw $k0, EX_PC($0) - add $k0, $k0, 4 - jr $k0 - cop0 0x10 - nop - .end EXCEP_Sys_handler - - -.equiv STACK_FRAME_SIZE, 0x90 -.equiv MODE0_ID, 0xAC0000FE -.equiv MODE1_ID, 0xFF00FFFE -.equiv MODE2_ID, 0xFFFFFFFE - -.equiv EX_AT, 0x400 -.equiv EX_PC, 0x404 -.equiv EX_ST, 0x408 -.equiv EX_CAUSE, 0x40C - -.equiv INTR_STACK_SIZE, 0x800 - -.equiv I_REG, 0x1070 -.equiv I_MASK, 0x1074 - -# ------------------------------------------------------------ -# This is installed as priority 3 - the end of the chain. -# does nothing. -# - .global EXCEP_Int_priority_exception_handler - .ent EXCEP_Int_priority_exception_handler -EXCEP_Int_priority_exception_handler: - - .word 0 - .word 0 - - lw $at, EX_AT($0) - - # restore status - lw $k0, EX_ST($0) - mtc0 $k0, $12 - - lw $k0, EX_PC($0) - jr $k0 - cop0 0x10 - nop - .end EXCEP_Int_priority_exception_handler - -# ------------------------------------------------------------ - - .global EXCEP_Int_handler - .ent EXCEP_Int_handler -EXCEP_Int_handler: - .word 0 - .word 0 - - # Initialise the mode 0 stack frame - sw $sp, 0x74-STACK_FRAME_SIZE($sp) - addiu $sp, $sp, -STACK_FRAME_SIZE - - lw $at, EX_AT($0) - sw $at, 0x04($sp) - sw $v0, 0x08($sp) - sw $v1, 0x0C($sp) - sw $a0, 0x10($sp) - sw $a1, 0x14($sp) - sw $a2, 0x18($sp) - sw $a3, 0x1C($sp) - sw $ra, 0x7C($sp) - mfhi $v0 - sw $v0, 0x80($sp) - mflo $v0 - sw $v0, 0x84($sp) - lw $v0, EX_ST($0) - sw $v0, 0x88($sp) - lw $v0, EX_PC($0) - sw $v0, 0x8C($sp) - la $v0, MODE0_ID - jal QueryIntrContext - sw $v0, 0x00($sp) # branch delay slot - - # Check whether this is a nested interrupt - # If it is not a nested interrupt then switch the stack to the interrupt context. - beq $v0, $0, $L_not_nested - or $v0, $sp, $sp # branch delay slot - # it is a nested interrupt - j $L1 - sub $sp, $sp, 0x0C # branch delay slot - -$L_not_nested: - # not a nested interrupt, so initialise to the top of the interrupt - # context stack. - la $sp, tempstack - addiu $sp, $sp, INTR_STACK_SIZE - 0x0C -$L1: - - sw $v0, 0x4($sp) # link the location of the previous stack frame - sw $0, 0x8($sp) # interrupt number (bit mask) - - lw $v0, EX_CAUSE($0) - andi $v0, $v0, 0x30 - bne $v0, $0, $L_SoftwareInt - nop - # The interrupt must have been caused by a hardware event - lui $k0, 0xBF80 - lw $a0, I_REG($k0) - lw $k0, I_MASK($k0) # k0 = I_MASK - and $a0, $a0, $k0 - lw $k1, soft_hw_intr_mask - and $a0, $a0, $k1 # a0 = I_REG & I_MASK & soft_hw_intr_mask - - beq $a0, $0, $L_ChainNextHandler # Interrupt is masked - nop - # The interrupt is not masked, so we should try and handle it - - # Figure out what interrupt is being handled. Look at the bits from the LSB and - # find the first one that is set. The LSB is interrupt 0 - la $a1, 0xFFFFFFFF # The interrupt being handled -$L_countInts: - addi $a1, $a1, 1 - andi $a2, $a0, 0x01 - beq $a2, $0, $L_countInts - srl $a0, 1 - - addiu $a0, $0, 0x1 - sllv $a0, $a0, $a1 # a0 = the bitmask of the int being handled - sw $a0, 0x8($sp) - nor $a0, $a0, $0 - and $k0, $a0, $k0 - lui $k1, 0xBF80 - sw $k0, I_MASK($k1) - sw $a0, I_REG($k1) - - sll $a0, $a1, 3 # Int num * 8 - lw $k0, intrtable - add $k0, $a0, $k0 - lw $a2, 0($k0) # handler - bne $a2, $0, $L_HandleInterrupt - lw $a3, 4($k0) # arg - -$L_ChainNextHandler: - - # Pass control to the next exception handler - lw $sp, 0x4($sp) # pop the value of the previous stack frame (could be a context switch) - - lw $at, 0x04($sp) - lw $v0, 0x08($sp) - lw $v1, 0x0C($sp) - lw $a0, 0x10($sp) - lw $a1, 0x14($sp) - lw $a2, 0x18($sp) - lw $a3, 0x1C($sp) - lw $ra, 0x7C($sp) - addiu $sp, $sp, STACK_FRAME_SIZE - lw $k0, EXCEP_Int_handler - jr $k0 - nop - -$L_SoftwareInt: - # $v0 = CAUSE & 0x30 is non-zero so the interrupt must have been caused by a software event - - andi $v0, $v0, 0x10 - bne $v0, $0, $L2 - addiu $a0, $0, 0x0100 # sw Int 1 - addiu $a0, $0, 0x0200 # sw Int 2 -$L2: - mfc0 $a1, $13 # cause - nor $a2, $a0, $0 - and $a1, $a1, $a2 # reset the relevent cause bit - mtc0 $a1, $13 - - srl $a0, $a0, 8 - addiu $a0, $a0, 0x2D # interrupt vector is 0x2E or 0x2F - sll $a0, $a0, 3 # Int num * 8 - lw $k0, intrtable - addu $k0, $a0, $k0 - lw $a2, 0($k0) # handler - beq $a2, $0, $L_ChainNextHandler # No handler defined - lw $a3, 4($k0) # arg - - # Both paths for SW and HW interrupts come together here. - # - # At this point: - # 0x8($sp) = int mask (0x01 << interrupt number) - # $a2 = handler - # $a3 = arg -$L_HandleInterrupt: - - andi $a0, $a2, 0x03 # $a0 = mode - srl $a2, $a2, 2 - beq $a0, $0, $L_Mode0 - sll $a2, $a2, 2 # $a2 = masked handler - - la $v1, MODE1_ID - srl $a0, $a0, 1 - beq $a0, $0, $L_Mode1 - lw $v0, 4($sp) - # Mode 2 or 3 (save t and s) - sw $s0, 0x40($v0) - sw $s1, 0x44($v0) - sw $s2, 0x48($v0) - sw $s3, 0x4C($v0) - sw $s4, 0x50($v0) - sw $s5, 0x54($v0) - sw $s6, 0x58($v0) - sw $s7, 0x5C($v0) - - la $v1, MODE2_ID - -$L_Mode1: - # Mode 1, save t - sw $t0, 0x20($v0) - sw $t1, 0x24($v0) - sw $t2, 0x28($v0) - sw $t3, 0x2C($v0) - sw $t4, 0x30($v0) - sw $t5, 0x34($v0) - sw $t6, 0x38($v0) - sw $t7, 0x3C($v0) - sw $t8, 0x60($v0) - sw $t9, 0x64($v0) - sw $gp, 0x70($v0) - sw $fp, 0x78($v0) - - sw $v1, 0x00($v0) # mark the current state of the stack - -$L_Mode0: - or $a0, $a3, $a3 - jalr $a2 # call the interrupt handler - mtc0 $0, $12 # status - beq $v0, $0, $L_NotHandled - lui $k0, 0xBF80 - - lw $a0, I_MASK($k0) - lw $a1, 0x08($sp) # interrupt mask - or $a0, $a0, $a1 - sw $a0, I_MASK($k0) - -$L_NotHandled: - - jal QueryIntrContext - nop - - bne $v0, $0, $L_afterContextSwitch - lw $a0, 4($sp) # previous stack frame - - # test if a context switch is pending. Returns true ($v0 != 0) if there is. - jal callContextSwitchRequiredHandler - nop - - beq $v0, $0, $L_afterContextSwitch - lw $a0, 4($sp) # previous stack frame - - lw $v0, 0($a0) # current stack context state - la $a1, MODE2_ID - beq $a1, $v0, $DoContextSwitch - nop - la $a1, MODE1_ID - beq $a1, $v0, $Mode1OnStack - nop - # stack state is currently mode 0 - sw $t0, 0x20($a0) - sw $t1, 0x24($a0) - sw $t2, 0x28($a0) - sw $t3, 0x2C($a0) - sw $t4, 0x30($a0) - sw $t5, 0x34($a0) - sw $t6, 0x38($a0) - sw $t7, 0x3C($a0) - sw $t8, 0x60($a0) - sw $t9, 0x64($a0) - sw $gp, 0x70($a0) - sw $fp, 0x78($a0) -$Mode1OnStack: - sw $s0, 0x40($a0) - sw $s1, 0x44($a0) - sw $s2, 0x48($a0) - sw $s3, 0x4C($a0) - sw $s4, 0x50($a0) - sw $s5, 0x54($a0) - sw $s6, 0x58($a0) - sw $s7, 0x5C($a0) - - la $v1, MODE2_ID - sw $v1, 0($a0) - -$DoContextSwitch: - la $v0, context_switch_handler - lw $v0, 0($v0) - jalr $v0 # do the context switch, returns the new stack in $v0 - nop - addu $a0, $v0, $0 - -$L_afterContextSwitch: - - # At this point: - # - # $a0 = stack frame to switch to - - or $sp, $a0, $a0 - lw $a0, 0($sp) - la $a1, MODE0_ID - - beq $a0, $a1, $L_RestoreMode0 - nop - - la $a1, MODE1_ID - beq $a0, $a1, $L_RestoreMode1 - nop - # mode 2, restore t and s - lw $s0, 0x40($sp) - lw $s1, 0x44($sp) - lw $s2, 0x48($sp) - lw $s3, 0x4C($sp) - lw $s4, 0x50($sp) - lw $s5, 0x54($sp) - lw $s6, 0x58($sp) - lw $s7, 0x5C($sp) - -$L_RestoreMode1: - # mode 1, restore t - lw $t0, 0x20($sp) - lw $t1, 0x24($sp) - lw $t2, 0x28($sp) - lw $t3, 0x2C($sp) - lw $t4, 0x30($sp) - lw $t5, 0x34($sp) - lw $t6, 0x38($sp) - lw $t7, 0x3C($sp) - lw $t8, 0x60($sp) - lw $t9, 0x64($sp) - lw $gp, 0x70($sp) - lw $fp, 0x78($sp) - -$L_RestoreMode0: - lw $a0, 0x80($sp) - mthi $a0 - lw $a0, 0x84($sp) - mtlo $a0 - lw $a0, 0x88($sp) - srl $a0, $a0, 1 - sll $a0, $a0, 1 - mtc0 $a0, $12 # status (reset bit 0) - lw $at, 0x04($sp) - lw $v0, 0x08($sp) - lw $v1, 0x0C($sp) - lw $a0, 0x10($sp) - lw $a1, 0x14($sp) - lw $a2, 0x18($sp) - lw $a3, 0x1C($sp) - lw $ra, 0x7C($sp) - lw $k0, 0x8C($sp) - lw $sp, 0x74($sp) - jr $k0 - cop0 0x10 # rfe - - .end EXCEP_Int_handler diff --git a/unfree/fps2bios/kernel/iopload/intrman/intrman.c b/unfree/fps2bios/kernel/iopload/intrman/intrman.c deleted file mode 100644 index ef5590057..000000000 --- a/unfree/fps2bios/kernel/iopload/intrman/intrman.c +++ /dev/null @@ -1,705 +0,0 @@ - -#define _GNU_SOURCE - -#include "kloadcore.h" -#include "kexcepman.h" -#include "kintrman.h" -#include "err.h" - -#define ICFG (*(volatile int*)0xbf801450) -#define IREG (*(volatile int*)0xbf801070) -#define IMASK (*(volatile int*)0xbf801074) -#define ICTRL (*(volatile int*)0xbf801078) -#define DMA_ICR (*(volatile int*)0xbf8010F4) -#define DMA_ICR2 (*(volatile int*)0xbf801574) - -#define EXCEP_CAUSE (*(volatile int*)0x40C) - -int debug=1; - -#define _dprintf(fmt, args...) \ - if (debug > 0) __printf("intrman: " fmt, ## args) - -struct intrHandler { - u32 handler; - void *arg; -}; - -func context_switch_required_handler; -func context_switch_handler; - -// Additional interrupt mask applied after IMASK -u32 soft_hw_intr_mask; - -int unknown2[4]; //0x1280 up - -#define INTR_STACK_SIZE 0x800 -unsigned char tempstack[INTR_STACK_SIZE]; - -u32 *extable; -struct intrHandler *intrtable; - -extern struct export export_stub; - -int _start(); -int IntrHandler(); -void intrman_retonly(); - -/////////////////////////////syscalls////////////////////////////////// -__inline void syscall_0(); -void syscall_1_CpuDisableIntr(); -void syscall_2_CpuEnableIntr(); -void syscall_3_intrman_call14(); -void syscall_4_intrman_call17_19(); -void syscall_5_intrman_call18_20(); -void goto_EXCEP_Sys_handler(); -void syscall_8_threadman(); - -func syscall[] = { - (func)syscall_0, -/* (func)syscall_1_CpuDisableIntr, - (func)syscall_2_CpuEnableIntr, - (func)syscall_3_intrman_call14, - (func)syscall_4_intrman_call17_19, - (func)syscall_5_intrman_call18_20, - (func)goto_EXCEP_Sys_handler, - (func)goto_EXCEP_Sys_handler, - (func)syscall_8_threadman, - (func)goto_EXCEP_Sys_handler, - (func)goto_EXCEP_Sys_handler, - (func)goto_EXCEP_Sys_handler, - (func)goto_EXCEP_Sys_handler, - (func)goto_EXCEP_Sys_handler, - (func)goto_EXCEP_Sys_handler, - (func)goto_EXCEP_Sys_handler*/ -}; - -/////////////////////////////////////////////////////////////////////// -int intrmanDeinit() { - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int intrman_call2() -{ - IMASK = 0x00; - DMA_ICR = 0x00; - DMA_ICR2 = 0x00; - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int intrman_call3(){ - return (int)&unknown2; -} - -/////////////////////////////////////////////////////////////////////// -// -// interrupt values 0x2E - 0x3F are equivalent to 0x1E - 0x2F with a mode set -// interrupt values 0x20 - 0x2D have their mode forced to zero -// -// mode specifies what registers to save around the call -// 0 = don't save anything, handler will not change anything -// 1 = save t0 - t9, gp and fp -// 2 = save t0 - t9, gp, fp and s0 - s7 -// -// arg is the value passed to the interrupt handler when it is called -// -int RegisterIntrHandler(int interrupt, int mode, intrh_func handler, void *arg) -{ - u32 ictrl; - - _dprintf("%s interrupt=%x, mode=%x\n", __FUNCTION__, interrupt, mode); - if (QueryIntrContext()){ - // cannot be called from within an interrupt - _dprintf("%s ERROR_INTR_CONTEXT\n", __FUNCTION__); - return ERROR_INTR_CONTEXT; - } - CpuSuspendIntr(&ictrl); - - if (interrupt < 0 || interrupt > 0x3F) { - CpuResumeIntr(ictrl); - _dprintf("%s ERROR_ILLEGAL_INTRCODE\n", __FUNCTION__); - return ERROR_ILLEGAL_INTRCODE; - } - int real_interrupt = interrupt; - int real_mode = mode; - - if (interrupt >= 0x2E){ - real_interrupt -= 0x10; - } else if (interrupt >= 0x20){ - real_mode = 0; - } - - if (intrtable[real_interrupt].handler){ - CpuResumeIntr(ictrl); - _dprintf("%s ERROR_DOES_EXIST\n", __FUNCTION__); - return ERROR_DOES_EXIST; - } - intrtable[real_interrupt].handler = (mode & 0x03) | (u32)handler; - intrtable[real_interrupt].arg = arg; - CpuResumeIntr(ictrl); - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int ReleaseIntrHandler(int interrupt) -{ - u32 ictrl; - - if (QueryIntrContext()){ - // Cannot be called from within an interrupt - return ERROR_INTR_CONTEXT; - } - CpuSuspendIntr(&ictrl); - - if (interrupt < 0 || interrupt >= 0x40) { - CpuResumeIntr(ictrl); - return ERROR_ILLEGAL_INTRCODE; - } - if (interrupt >= 0x2E){ - interrupt -= 0x10; - } - - if (intrtable[interrupt].handler){ - intrtable[interrupt].handler = 0; - CpuResumeIntr(ictrl); - return 0; - } - CpuResumeIntr(ictrl); - return ERROR_DOES_EXIST; -} - -/////////////////////////////////////////////////////////////////////// -int CpuSuspendIntr(u32 *ictrl) -{ - u32 rval = ICTRL; - if (ictrl) *ictrl = rval; - if (rval == 0) return ERROR_CPUDI; - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int CpuResumeIntr(u32 ictrl) -{ - ICTRL = ictrl; - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int CpuDisableIntr() -{ - if (ICTRL) return 0; - return ERROR_CPUDI; -} - -/////////////////////////////////////////////////////////////////////// -int CpuEnableIntr() -{ - //_dprintf("%s\n", __FUNCTION__); -// intrman_syscall_08(); -// _dprintf("syscall ok\n"); - CpuEnableICTRL(); - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int CpuGetICTRL() -{ - return ICTRL; -} - -/////////////////////////////////////////////////////////////////////// -int CpuEnableICTRL() -{ - ICTRL = 1; - return 1; -} - -/////////////////////////////////////////////////////////////////////// -void intrman_syscall_04() -{ - __asm__ ( - "li $3, 4\n" - "syscall\n" - ); -} - -/////////////////////////////////////////////////////////////////////// -void intrman_syscall_08() -{ - __asm__ ( - "li $3, 8\n" - "syscall\n" - ); -} - -/////////////////////////////////////////////////////////////////////// -void intrman_syscall_10() -{ - __asm__ ( - "li $3, 16\n" - "syscall\n" - ); -} - -/////////////////////////////////////////////////////////////////////// -void intrman_syscall_14() -{ - __asm__ ( - "li $3, 20\n" - "syscall\n" - ); -} - -/////////////////////////////////////////////////////////////////////// -void intrman_syscall_0C() -{ - __asm__ ( - "li $3, 12\n" - "syscall\n" - ); -} - -/////////////////////////////////////////////////////////////////////// -// -// Interrupt: -// 0 - 0x1F normal interrupt -// 0x20 - 0x26 -// 0x27 - 0x2D -// -// Return 0 for success, -101 for invalid interrupt number -// -#define ERROR_BAD_NUMBER -101 -#define INUM_DMA_0 0x20 -#define INUM_DMA_BERR 0x27 -#define INUM_DMA_7 0x28 -#define IMODE_DMA_IRM 0x100 -#define IMODE_DMA_IQE 0x200 -#define INUM_DMA 3 - -int EnableIntr(int interrupt) -{ - int retval = 0; - u32 low_irq = interrupt & 0xFF; - u32 high_irq = interrupt & 0xFFFFFF00; - - u32 ictrl; - CpuSuspendIntr(&ictrl); - - if( interrupt < 0 ) { - retval = ERROR_BAD_NUMBER; - } - else if (low_irq < INUM_DMA_0){ - IMASK |= (1 << low_irq); - } else if (low_irq < INUM_DMA_BERR){ - DMA_ICR = (DMA_ICR & ((~(1<<(low_irq-INUM_DMA_0)))&0x00FFFFFF)) - | (1 << (INUM_DMA_BERR-INUM_DMA_0 + 16)) - | (1<<(low_irq-INUM_DMA_0+0x10)) - | ((high_irq & IMODE_DMA_IRM) ? (1<<(low_irq-INUM_DMA_0)) : 0); - - DMA_ICR2 = (DMA_ICR2 & ((~(1<<(low_irq-INUM_DMA_0)))&0x00FFFFFF)) - | ((high_irq & IMODE_DMA_IQE) ? (1<<(low_irq-0x10)) : 0); - - IMASK |= 1<>(low_irq-0x20)) & 0x01) stat = low_irq | 0x100; - - if (DMA_ICR2 & (1<<(low_irq-0x20))) stat |= 0x200; - - DMA_ICR2 &= ~(1<<(low_irq-0x20)) & 0xFFFFFF; - - goto end; - } - - ret = -103; - goto end; - } - - if (low_irq<0x2E) - { - if (DMA_ICR2 & 0xFFFFFF & (1<<(low_irq-0x18))) - { - stat = low_irq; - - if (((DMA_ICR2 & 0xFFFFFF)>>(low_irq-0x21))&0x01) stat |= 0x200; - - DMA_ICR2 &= ~(1<<(low_irq-0x18)) & 0xFFFFFF; - - goto end; - } - - ret = -103; - goto end; - } - -end: - if (oldstat) *(volatile int*)oldstat = stat; - CpuResumeIntr(ictrl); - return ret; -} - -/////////////////////////////////////////////////////////////////////// -// Enable -void intrman_call16(int interrupt) -{ - u32 ictrl; - CpuSuspendIntr(&ictrl); - - interrupt &= 0xFF; - - if (interrupt < 0x20){ - soft_hw_intr_mask |= (1 << interrupt); - } else if (interrupt < 0x28){ - unknown2[1] |= 1 << (interrupt-0x08); - } else if (interrupt < 0x2E){ - unknown2[2] |= 1 << (interrupt-0x10); - } - - CpuResumeIntr(ictrl); -} - -/////////////////////////////////////////////////////////////////////// -// Disable -void intrman_call15(int interrupt) -{ - u32 ictrl; - CpuSuspendIntr(&ictrl); - - interrupt &= 0xFF; - - if (interrupt < 0x20){ - soft_hw_intr_mask &= ~(1 << interrupt); - } else if (interrupt < 0x28){ - unknown2[1] &= ~(1 << (interrupt-0x08)); - } else if (interrupt < 0x2E){ - unknown2[2] &= ~(1 << (interrupt-0x10)); - } - - CpuResumeIntr(ictrl); -} - -/////////////////////////////////////////////////////////////////////// -void intrman_call27(int arg0) -{ - unknown2[3]=arg0; -} - -/////////////////////////////////////////////////////////////////////// -// -int IntrHandler() -{ - u32 masked_icr = DMA_ICR & unknown2[1]; - - _dprintf("%s\n", __FUNCTION__); - - - while (masked_icr & 0x7F008000){ - int i; - if (masked_icr & 0x00008000){ - // Int 0x25 - func int_func = (func)(intrtable[0x25].handler & 0xFFFFFFFC); - DMA_ICR &= 0x00FF7FFF; - if (int_func){ - int_func(intrtable[0x25].arg); - } - } - // Check each DMA interrupt - // The bits 24 - 30 are set for DMA channels 0 - 6 (ints 0x20 - 0x26 respectively) - // The bits 16 - 23 are the corresponding mask bits - the interrupt is only generated if the mask bit is set. - for (i=0; i < 7; ++i){ - u32 ibit = 0x01000000 << i; - if (masked_icr & ibit){ - func int_func = (func)(intrtable[0x20+i].handler & 0xFFFFFFFC); - DMA_ICR &= (ibit | 0x00FFFFFF); - if (int_func){ - if (!int_func(intrtable[0x20+i].arg)){ - // Disable / mask the interrupt if it was not handled - DMA_ICR &= (~(0x00010000 << i) & 0x00FFFFFF); - } - } - } - } - } - DMA_ICR &= 0x007FFFFF; - while (DMA_ICR & 0x00800000){ - // do nothing - } - - { - u32 temp_icr = DMA_ICR; - temp_icr &= 0x007FFFFF; - temp_icr |= 0x00800000; - DMA_ICR = temp_icr; - } - - return 1; -} - -/////////////////////////////////////////////////////////////////////// -// -// Default context switch handler - does not switch context. -// -int default_ctx_switch_handler(u32 sp_in) -{ - return sp_in; -} - -/////////////////////////////////////////////////////////////////////// -// -// Default routine to request a context switch. Does not request one. -// -int default_ctx_switch_required_handler() -{ - return 0; -} - - -void SetCtxSwitchHandler(func handler){ - context_switch_handler = handler; -} - -void* ResetCtxSwitchHandler() -{ - context_switch_handler = default_ctx_switch_handler; - return &context_switch_handler; -} - -void SetCtxSwitchReqHandler(func handler) -{ - context_switch_required_handler = handler; -} - -int ResetCtxSwitchReqHandler() -{ - context_switch_required_handler = default_ctx_switch_required_handler; -} - -/////////////////////////////////////////////////////////////////////// -// Return non-zero if sp is in an interrupt context -int QueryIntrStack(unsigned char* sp) -{ - int retval = 0; - if ( (sp < tempstack + INTR_STACK_SIZE) && (sp > tempstack) ){ - retval = 1; - } - return retval; -} - -/////////////////////////////////////////////////////////////////////// -// Return non-zero is we're currently in a interrupt context -int QueryIntrContext() -{ - unsigned char* sp; - __asm__ ("move %0, $29\n" : "=r"(sp) :); - - return QueryIntrStack(sp); -} - -/////////////////////////////////////////////////////////////////////// -// -int iCatchMultiIntr() -{ - unsigned char* sp; - __asm__ ("move %0, $29\n" : "=r"(sp) :); - - if (QueryIntrStack(sp)){ - if (sp >= tempstack + 0x160){ - u32 SR; - __asm__ ("mfc0 %0, $12\n" : "=r"(SR)); - if (SR & 1 == 0){ - u32 set_SR = SR | 1; - __asm__ volatile ( - "mtc0 %0, $12\n" - "nop\n" - "nop\n" - "mtc0 %1, $12\n" : : "r"(set_SR), "r" (SR) - ); - } - return SR; - } - } - return 0; -} - - -/////////////////////////////////////////////////////////////////////// -// called by EXCEP_Sys_handler -void EXCEP_Sys_8() { - _dprintf("%s\n", __FUNCTION__); -} -/////////////////////////////////////////////////////////////////////// -//not finished -void syscall_3_intrman_call14(){ -} - -/////////////////////////////////////////////////////////////////////// -//not finished -void syscall_4_intrman_call17_19(){ -} - -/////////////////////////////////////////////////////////////////////// -__inline void syscall_0(){ - func funct; - funct=(func)((*(volatile int*)(0x404))+4); - __asm__ ( - "jr %0\n" - "rfe\n" - : "=r" (funct) - ); -} - -/////////////////////////////////////////////////////////////////////// -void retonly(){} - -u32 callContextSwitchRequiredHandler() -{ - if (NULL != context_switch_required_handler){ - return context_switch_required_handler(); - } else { - return 0; - } -} - -//////////////////////////////entrypoint/////////////////////////////// -struct export export_stub={ - 0x41C00000, - 0, - VER(1, 2), // 1.2 => 0x102 - 0, - "intrman", - (func)_start, // entrypoint - (func)intrmanDeinit, - (func)intrman_call2, - (func)intrman_call3, - (func)RegisterIntrHandler, - (func)ReleaseIntrHandler, - (func)EnableIntr, - (func)DisableIntr, - (func)CpuDisableIntr, - (func)CpuEnableIntr, - (func)intrman_syscall_04, // 0x0A - (func)intrman_syscall_08, - (func)CpuGetICTRL, - (func)CpuEnableICTRL, - (func)intrman_syscall_0C, // 0x0E - (func)intrman_call15, - (func)intrman_call16, // 0x10 - (func)CpuSuspendIntr, - (func)CpuResumeIntr, - (func)CpuSuspendIntr, - (func)CpuResumeIntr, - (func)intrman_syscall_10, - (func)intrman_syscall_14, - (func)QueryIntrContext, // 0x17 - (func)QueryIntrStack, - (func)iCatchMultiIntr, - (func)retonly, - (func)intrman_call27, - (func)SetCtxSwitchHandler, // 0x1C (called by threadman) - (func)ResetCtxSwitchHandler, - (func)SetCtxSwitchReqHandler, // 0x1E (called by threadman) - (func)ResetCtxSwitchReqHandler, - 0 -}; - -extern struct exHandler EXCEP_Int_priority_exception_handler; -extern struct exHandler EXCEP_Int_handler; -extern struct exHandler EXCEP_Sys_handler; - -//////////////////////////////entrypoint/////////////////////////////// -int _start(){ - int i; - - intrtable = (struct intrHandler*)(GetExHandlersTable() + 0x40); - - IMASK = 0x00; - DMA_ICR = 0x00; - DMA_ICR2 = 0x00; - - for (i=0; i < 0x2F; i++) { - intrtable[i].handler = 0; - intrtable[i].arg = 0; - } - - soft_hw_intr_mask = 0xFFFFFFFF; - unknown2[1] = -1; - unknown2[2] = -1; - unknown2[0] = (int)intrtable; - - RegisterExceptionHandler(0, &EXCEP_Int_handler); - RegisterPriorityExceptionHandler(0, 3, &EXCEP_Int_priority_exception_handler); - RegisterExceptionHandler(8, &EXCEP_Sys_handler); - RegisterIntrHandler(3, 1, &IntrHandler, 0); - RegisterLibraryEntries(&export_stub); - - return 0; -} - -void ijb_ping1() -{ - _dprintf("%s\n", __FUNCTION__); - unsigned char* x = tempstack; -} -void ijb_trace3(u32 a0, u32 a1, u32 a2, u32 a3) -{ - __printf("trace3: 0x%x, 0x%x, 0x%x\n", a0, a1, a2); -while (1){} -} diff --git a/unfree/fps2bios/kernel/iopload/iopboot/Makefile b/unfree/fps2bios/kernel/iopload/iopboot/Makefile deleted file mode 100644 index b01ed7cca..000000000 --- a/unfree/fps2bios/kernel/iopload/iopboot/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOPBOOT_BIN = ../../../build/IOPBOOT - -IOP_INCS += -I../include - -IOP_OBJS = iopboot.o ../iopdebug.o ../iopelf.o ../romdir.o - -$(IOPBOOT_BIN): $(IOP_OBJS) - $(EE_CC) -Wl,--oformat,binary,--Map,iopboot.map -T linkfile $(IOP_OBJS) -nostartfiles -o $(IOPBOOT_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOPBOOT_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/iopboot/iopboot.c b/unfree/fps2bios/kernel/iopload/iopboot/iopboot.c deleted file mode 100644 index b52a39762..000000000 --- a/unfree/fps2bios/kernel/iopload/iopboot/iopboot.c +++ /dev/null @@ -1,252 +0,0 @@ -// -// iopboot.c -// -// this is the c code for the iopboot file in the ps2 rom. -// this file is located at 0xBFC4A000 in the ps2 bios rom0. -// modload.irx also from the ps2 bios executes this direct from the rom -// (no loading to ram first) -// -// this is based on florin's disasm and converted to c code by xorloser and zerofrog -// - -#include -#include - -#include "iopload.h" -#include "iopdebug.h" -#include "iopelf.h" -#include "romdir.h" -#include "kloadcore.h" - -static void kstrcpy(char* dst, const char* src); -static int kstrlen(const char* src); - -//BOOT_PARAMS boot_params; -//u32* next_free_address[0x40]; // up to 64 modules - - -// this is the start point of execution at 0xBFC4A000 -// -// it loads the IOPBTCONF module list from rom0 and compiles a -// list of modules and their addresses. -// -// this list is then passed to loadcore as it is executed in order -// to then load the rest of the modules -// -// args: total size of IOP ram in MegaBytes -// bootinfo flags -// string containing the reboot image filepath -// ? doesnt seem to be used -void _start(int ramMBSize, int bootInfo, char* udnlString, int unk) -{ - ROMFS ri; - void *(*sysmem_entry)(u32 iopmemsize); - void (*loadcore_entry)(BOOT_PARAMS *init); - int i; - ROMDIR_INFO romdir_info; - ROMFILE_INFO romfile_info; - char conf_filename[10]; - int ram_byte_size, num_lines; - u32 module_load_addr; - u32** modules_ptr; - char* file_data_ptr, *file_data_end; - void* psysmemstart; - BOOT_PARAMS* boot_params; - - if( ramMBSize <= 2 ) - ram_byte_size = 2; - else - ram_byte_size = ramMBSize; - ram_byte_size <<= 20; - - // compile module list to send to loadcore - boot_params = (BOOT_PARAMS*)0x30000; // random address, has to be clear before loadcore call - boot_params->ramMBSize = ramMBSize; - boot_params->bootInfo = bootInfo; - boot_params->udnlString = NULL; - boot_params->moduleAddrs = (u32**)((u32)boot_params + sizeof(BOOT_PARAMS)); // right after - - // if a undl string is specified, get a copy of it and store a pointer to it - if(udnlString) - { - boot_params->udnlString = (char*)boot_params->moduleAddrs; - kstrcpy(boot_params->udnlString, udnlString); - boot_params->moduleAddrs = (u32**)((u32)boot_params->udnlString + ROUND_UP(kstrlen(udnlString) + 8, 4)); - } - - // find the romdir table in the rom - if( searchRomDir((u32*)0xBFC00000, (u32*)0xBFC10000, &romdir_info) == NULL ) - { - __printf("IOPBOOT: failed to find start of rom!\n"); - // error - cant find romdir! - while(1) *(u8*)0x80000000 = 0; - } - - // find the bootconf file in the romdir table - kstrcpy(conf_filename, "IOPBTCONF"); - conf_filename[8] = '0' + bootInfo; - if( !searchFileInRom(&romdir_info, conf_filename, &romfile_info) ) - { - kstrcpy(conf_filename, "IOPBTCONF"); - if( !searchFileInRom(&romdir_info, conf_filename, &romfile_info) ) - { - __printf("IOPBTCONF file not found!\n"); - // error - cant find conf file! - while(1) *(u8*)0x80000000 = 1; - } - } - - // count the number of lines in conf file - file_data_ptr = (char*)romfile_info.fileData; - file_data_end = (char*)romfile_info.fileData + romfile_info.entry->fileSize; - { - num_lines = 0; - while( file_data_ptr < file_data_end ) { - // loop until a "newline" charcter is found - while(file_data_ptr < file_data_end) { - if(*file_data_ptr++ < ' ') - break; - } - - // loop until a "non-newline" charcter is found - while(file_data_ptr < file_data_end) { - if(*file_data_ptr++ >= ' ') - break; - } - - num_lines++; - } - num_lines++; - } - - // get the addresses of each module - { - module_load_addr = 0; - boot_params->numConfLines = num_lines-1; - modules_ptr = boot_params->moduleAddrs; - char* file_data_ptr = (char*)romfile_info.fileData; - while( file_data_ptr < file_data_end ) { - if(*file_data_ptr == '@') { - file_data_ptr++; - module_load_addr = getHexNumber(&file_data_ptr); - } - else if(*file_data_ptr == '!') { - if( file_data_ptr[1] == 'a' && - file_data_ptr[2] == 'd' && - file_data_ptr[3] == 'd' && - file_data_ptr[4] == 'r' && - file_data_ptr[5] == ' ' ) { - file_data_ptr += 6; - *modules_ptr++ = (u32*)(getHexNumber(&file_data_ptr) * 4 + 1); - *modules_ptr++ = 0; - } - } - else if(*file_data_ptr != '#') { - // 'file_data_ptr' should be pointing to a filename - // this finds the address of that file in the rom - ROMFILE_INFO module_fileinfo; - char strmodule[16]; - for(i = 0; i < 16; ++i) { - if( file_data_ptr[i] < ' ' ) - break; - strmodule[i] = file_data_ptr[i]; - } - strmodule[i] = 0; - - if( searchFileInRom(&romdir_info, strmodule, &module_fileinfo) == NULL ) { - __printf("IOPBOOT: failed to find %s module\n", strmodule); - return; - } - - //__printf("mod: %s:%x\n", strmodule, module_fileinfo.fileData); - - *modules_ptr++ = (u32*)module_fileinfo.fileData; - *modules_ptr = 0; // don't increment - } - - // loop until a "newline" charcter is found - while(file_data_ptr < file_data_end) { - if(*file_data_ptr++ < ' ') - break; - } - - // loop until a "non-newline" charcter is found - while(file_data_ptr < file_data_end) { - if(*file_data_ptr >= ' ') - break; - file_data_ptr++; - } - } - } - - if( searchFileInRom(&romdir_info, "IOPBOOT", &romfile_info) == NULL ) { - __printf("loadElfFile: failed to find IOPBOOT module\n"); - return; - } - - // load sysmem module to memory and execute it - if( searchFileInRom(&romdir_info, "SYSMEM", &romfile_info) == NULL ) { - __printf("loadElfFile: failed to find SYSMEM module\n"); - return; - } - sysmem_entry = (void *(*)(u32))loadElfFile(&romfile_info, module_load_addr); - if( sysmem_entry == 0 ) - return; - - psysmemstart = sysmem_entry(ram_byte_size); - //FlushIcache(); - if( psysmemstart == 0 ) { - __printf("IOPBOOT: sysmem failed\n"); - return; - } - - __printf("SYSMEM success, start addr: %x, alloc start: %x\n", module_load_addr, psysmemstart); - - if( searchFileInRom(&romdir_info, "LOADCORE", &romfile_info) == NULL ) { - __printf("loadElfFile: failed to find SYSMEM module\n"); - return; - } - loadcore_entry = (void (*)())loadElfFile(&romfile_info, (u32)psysmemstart); - if( loadcore_entry == 0 ) - return; - - boot_params->firstModuleAddr = (u32)module_load_addr + 0x30; // skip elf? - if(0x1FC10000 < ram_byte_size) { - boot_params->pos = 0x1FC00000; - boot_params->size = 0x10100; - } - else { - boot_params->pos = 0; - boot_params->size = 0; - } - - __printf("executing LOADCORE entry at %p\n", loadcore_entry); - loadcore_entry(boot_params); - - __printf("iopboot error\n"); - - // error - loadcore shouldnt ever return - while(1) *(u8*)0x80000000 = 2; -} - -void Kmemcpy(void *dest, const void *src, int n) { - const u8 *s = (u8*)src; - u8 *d = (u8*)dest; - - while (n) { - *d++ = *s++; n--; - } -} - -static void kstrcpy(char* dst, const char* src) -{ - while(*src) *dst++ = *src++; - *dst = 0; -} - -static int kstrlen(const char* src) -{ - int len = 0; - while(*src++) len++; - return len; -} diff --git a/unfree/fps2bios/kernel/iopload/iopboot/iopirq.c b/unfree/fps2bios/kernel/iopload/iopboot/iopirq.c deleted file mode 100644 index 36565b88d..000000000 --- a/unfree/fps2bios/kernel/iopload/iopboot/iopirq.c +++ /dev/null @@ -1,17 +0,0 @@ - - -// Boiler plate exception handlers used at boot time. -// EXCEPMAN replaces these with something more useful. - -__asm__(".org 0x0000"); - -__asm__(".set noreorder"); -void CpuException0() { -} - -__asm__(".org 0x0080"); - -__asm__(".set noreorder"); -void CpuException() { -} - diff --git a/unfree/fps2bios/kernel/iopload/iopboot/linkfile b/unfree/fps2bios/kernel/iopload/iopboot/linkfile deleted file mode 100644 index bdd2f3185..000000000 --- a/unfree/fps2bios/kernel/iopload/iopboot/linkfile +++ /dev/null @@ -1,16 +0,0 @@ -_stack_size = 0x80000; -_heap_size = 1024*1024*10; - -ENTRY(_start); -SECTIONS { - .text 0xbfc008f0 : { - *(.text) - *(.data) - *(.rdata) - *(.sdata) - *(.rodata) - *(.bss) - *(.sbss) - } -} - diff --git a/unfree/fps2bios/kernel/iopload/iopdebug.c b/unfree/fps2bios/kernel/iopload/iopdebug.c deleted file mode 100644 index 2b69b8f5b..000000000 --- a/unfree/fps2bios/kernel/iopload/iopdebug.c +++ /dev/null @@ -1,279 +0,0 @@ -/* Debugging printf, for debugging the library itself. - - We don't assume stdio is working. - We do assume _write_r is working. -*/ - -#include "iopload.h" -#include "iopdebug.h" - -#ifdef __STDC__ -#include "stdarg.h" -#else -#include "varargs.h" -#endif - -static char *parse_number (); -static long get_number (); -static void print_number (); -static void write_char (char c); -static void write_string (char* s); - -/* Non-zero for big-endian systems. */ -static int big_endian_p; - -/* For now hardcode 2 (stderr) as the console file descriptor. - May wish to let the caller pass in a file descriptor or some such but - this is only for debugging purposes anyway. */ -#define CONSOLE_FD 2 - -/* Standalone printf routine. - - The format string has been enhanced so that multiple values can be dumped - without having to have a %-field for each one (say if you want to dump - 20 words at a certain address). A modifier of `N' says the next argument - is a count, and the one after that is a pointer. - - Example: __dprintf (stderr, "%Nx\n", 20, p); /-* print 20 ints at `p' *-/ - - Supported formats are: c d u x s p. - - All ints are retrieved a byte at a time so alignment issues are not - a problem. - - This routine is used in situations where the only debugging capability - is console output and was written to aid debugging newlib itself. We don't - use printf ourselves as we may be debugging it. We do assume _write_r is - working. -*/ - -void -#ifdef __STDC__ -__printf (char *fmt, ...) -#else -__printf (fmt, va_alist) - char *fmt; - va_dcl -#endif -{ - va_list args; - - /* Which endian are we? */ - { - short tmp = 1; - big_endian_p = *(char *) &tmp == 0; - } - -#ifdef __STDC__ - va_start (args, fmt); -#else - va_start (args); -#endif - - while (*fmt) - { - char c, *p; - int count; - long l; - - if (*fmt != '%' || *++fmt == '%') - { - write_char (*fmt++); - continue; - } - - if (*fmt == 'N') - { - count = va_arg (args, int); - p = va_arg (args, char *); - ++fmt; - c = *fmt++; - - while (--count >= 0) - { - switch (c) - { -// case 'c' : -// write_string (unctrl (*p++)); -// break; - case 'p' : - print_number (16, 1, get_number (p, sizeof (char *), 1)); - p += sizeof (char *); - break; - case 'd' : - case 'u' : - case 'x' : - print_number (c == 'x' ? 16 : 10, c != 'd', - get_number (p, sizeof (int), c != 'd')); - p += sizeof (int); - break; - case 's' : - write_string (*(char **) p); - p += sizeof (char *); - break; - } - if (count > 0) - write_char (' '); - } - } - else - { - switch (c = *fmt++) - { -// case 'c' : -// c = va_arg (args, int); -// write_string (unctrl (c)); -// break; - case 'p' : - l = (void *) va_arg (args, char *); - print_number (16, 1, l); - break; - case 'd' : - case 'u' : - case 'x' : - l = va_arg (args, int); - print_number (c == 'x' ? 16 : 10, c != 'd', l); - break; - case 's' : - p = va_arg (args, char *); - write_string (p); - break; - } - } - } - - va_end (args); -} - -static int isdigit(int c) { - if (c >= '0' && c <= '9') return 1; - return 0; -} - -/* Parse a positive decimal integer at S. - FIXME: Was used in earlier version, but not currently used. - Keep for now. */ - -static char * -parse_number (s, p) - char *s; - long *p; -{ - long x = 0; - - while (isdigit (*s)) - { - x = (x * 10) + (*s - '0'); - ++s; - } - - *p = x; - return s; -} - -/* Fetch the number at S of SIZE bytes. */ - -static long -get_number (s, size, unsigned_p) - char *s; - long size; - int unsigned_p; -{ - long x; - unsigned char *p = (unsigned char *) s; - - switch (size) - { - case 1 : - x = *p; - if (!unsigned_p) - x = (x ^ 0x80) - 0x80; - return x; - case 2 : - if (big_endian_p) - x = (p[0] << 8) | p[1]; - else - x = (p[1] << 8) | p[0]; - if (!unsigned_p) - x = (x ^ 0x8000) - 0x8000; - return x; - case 4 : - if (big_endian_p) - x = ((long)p[0] << 24) | ((long)p[1] << 16) | (p[2] << 8) | p[3]; - else - x = ((long)p[3] << 24) | ((long)p[2] << 16) | (p[1] << 8) | p[0]; - if (!unsigned_p) - x = (x ^ 0x80000000L) - 0x80000000L; - return x; -#if 0 /* FIXME: Is there a standard mechanism for knowing if - long longs exist? */ - case 8 : -#endif - default : - return 0; - } -} - -/* Print X in base BASE. */ - -static void -print_number (base, unsigned_p, n) - int base; - int unsigned_p; - long n; -{ - static char chars[16] = "0123456789abcdef"; - char *p, buf[32]; - unsigned long x; - - if (!unsigned_p && n < 0) - { - write_char ('-'); - x = -n; - } - else - x = n; - - p = buf + sizeof (buf); - *--p = '\0'; - do - { - *--p = chars[x % base]; - x /= base; - } - while (x != 0); - - write_string (p); -} - -/* Write C to the console. - We go through the file descriptor directly because we can't assume - stdio is working. */ - -static void -write_char (char c) -{ - __putc(c); -} - -/* Write S to the console. - We go through the file descriptor directly because we can't assume - stdio is working. */ - -static void -write_string (char *s) -{ - __puts(s); -} - - -void __putc(u8 c) { - *((u8*)0x1f80380c) = c; -} - -void __puts(u8 *s) { - while (*s != 0) { - __putc(*s++); - } -} - diff --git a/unfree/fps2bios/kernel/iopload/iopelf.c b/unfree/fps2bios/kernel/iopload/iopelf.c deleted file mode 100644 index 55f951f92..000000000 --- a/unfree/fps2bios/kernel/iopload/iopelf.c +++ /dev/null @@ -1,428 +0,0 @@ -#include "romdir.h" -#include "iopelf.h" - -typedef struct { - u32 st_name; - u32 st_value; - u32 st_size; - u8 st_info; - u8 st_other; - u16 st_shndx; -} Elf32_Sym; - -char *sections_names; - -ELF_HEADER *elfHeader; -ELF_PHR *elfProgH; -ELF_SHR *elfSectH; -u8 *elfdata; -int elfsize; -u32 elfbase; -static int debug=1; - -#define _dprintf(fmt, args...) \ - if (debug > 0) __printf("iopelf: " fmt, ## args) - -static void __memcpy(void *dest, const void *src, int n) { - const u8 *s = (u8*)src; - u8 *d = (u8*)dest; - - while (n) { - *d++ = *s++; n--; - } -} - - -int loadHeaders() { - elfHeader = (ELF_HEADER*)elfdata; - - if ((elfHeader->e_shentsize != sizeof(ELF_SHR)) && (elfHeader->e_shnum > 0)) { - return -1; - } - -#ifdef ELF_LOG - ELF_LOG( "type: " ); -#endif - switch( elfHeader->e_type ) - { - default: -#ifdef ELF_LOG - ELF_LOG( "unknown %x", elfHeader->e_type ); -#endif - break; - - case 0x0: -#ifdef ELF_LOG - ELF_LOG( "no file type" ); -#endif - break; - - case 0x1: -#ifdef ELF_LOG - ELF_LOG( "relocatable" ); -#endif - break; - - case 0x2: -#ifdef ELF_LOG - ELF_LOG( "executable" ); -#endif - break; - } -#ifdef ELF_LOG - ELF_LOG( "\n" ); - ELF_LOG( "machine: " ); -#endif - switch ( elfHeader->e_machine ) - { - default: -#ifdef ELF_LOG - ELF_LOG( "unknown" ); -#endif - break; - - case 0x8: -#ifdef ELF_LOG - ELF_LOG( "mips_rs3000" ); -#endif - break; - } -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("version: %d\n",elfHeader->e_version); - ELF_LOG("entry: %08x\n",elfHeader->e_entry); - ELF_LOG("flags: %08x\n",elfHeader->e_flags); - ELF_LOG("eh size: %08x\n",elfHeader->e_ehsize); - ELF_LOG("ph off: %08x\n",elfHeader->e_phoff); - ELF_LOG("ph entsiz: %08x\n",elfHeader->e_phentsize); - ELF_LOG("ph num: %08x\n",elfHeader->e_phnum); - ELF_LOG("sh off: %08x\n",elfHeader->e_shoff); - ELF_LOG("sh entsiz: %08x\n",elfHeader->e_shentsize); - ELF_LOG("sh num: %08x\n",elfHeader->e_shnum); - ELF_LOG("sh strndx: %08x\n",elfHeader->e_shstrndx); - - ELF_LOG("\n"); -#endif - - return 0; -} - - -int loadProgramHeaders() { - int i; - - if (elfHeader->e_phnum == 0) { - return 0; - } - - if (elfHeader->e_phentsize != sizeof(ELF_PHR)) { - return -1; - } - - elfProgH = (ELF_PHR*)&elfdata[elfHeader->e_phoff]; - - for ( i = 0 ; i < elfHeader->e_phnum ; i++ ) - { -#ifdef ELF_LOG - ELF_LOG( "Elf32 Program Header\n" ); - ELF_LOG( "type: " ); -#endif - switch ( elfProgH[ i ].p_type ) - { - default: -#ifdef ELF_LOG - ELF_LOG( "unknown %x", (int)elfProgH[ i ].p_type ); -#endif - break; - - case 0x1: -#ifdef ELF_LOG - ELF_LOG("load"); -#endif -/* if ( elfHeader->e_shnum == 0 ) {*/ - if (elfProgH[ i ].p_offset < elfsize) { - int size; - - if ((elfProgH[ i ].p_filesz + elfProgH[ i ].p_offset) > elfsize) { - size = elfsize - elfProgH[ i ].p_offset; - } else { - size = elfProgH[ i ].p_filesz; - } - _dprintf("loading program at %x, size=%x\n", elfProgH[ i ].p_paddr + elfbase, size); - __memcpy((void*)(elfProgH[ i ].p_paddr + elfbase), - &elfdata[elfProgH[ i ].p_offset], - size); - } -#ifdef ELF_LOG - ELF_LOG("\t*LOADED*"); -#endif -// } - break; - } -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("offset: %08x\n",(int)elfProgH[i].p_offset); - ELF_LOG("vaddr: %08x\n",(int)elfProgH[i].p_vaddr); - ELF_LOG("paddr: %08x\n",elfProgH[i].p_paddr); - ELF_LOG("file size: %08x\n",elfProgH[i].p_filesz); - ELF_LOG("mem size: %08x\n",elfProgH[i].p_memsz); - ELF_LOG("flags: %08x\n",elfProgH[i].p_flags); - ELF_LOG("palign: %08x\n",elfProgH[i].p_align); - ELF_LOG("\n"); -#endif - } - - return 0; -} - -void _relocateElfSection(int i) { - ELF_REL *rel; - int size = elfSectH[i].sh_size / 4; - int r = 0; - u32 *ptr, *tmp; - ELF_SHR *rsec = &elfSectH[elfSectH[i].sh_info]; - u8 *mem = (u8*)(elfSectH[i].sh_addr + elfbase); - u32 imm; - int j; - - ptr = (u32*)(elfdata+elfSectH[i].sh_offset); - -// _dprintf("relocating section %s\n", §ions_names[rsec->sh_name]); -// __printf("sh_addr %x\n", elfSectH[i].sh_addr); - - while (size > 0) { - rel = (ELF_REL*)&ptr[r]; -// __printf("rel size=%x: offset=%x, info=%x\n", size, rel->r_offset, rel->r_info); - - tmp = (u32*)&mem[rel->r_offset]; - switch ((u8)rel->r_info) { - case 2: // R_MIPS_32 - *tmp+= elfbase; break; - - case 4: // R_MIPS_26 - *tmp = (*tmp & 0xfc000000) | - (((*tmp & 0x03ffffff) + (elfbase >> 2)) & 0x03ffffff); - break; - - case 5: // R_MIPS_HI16 - imm = (((*tmp & 0xffff) + (elfbase >> 16)) & 0xffff); - for (j=(r+2)/2; jr_info == 6) - break; -// if ((rel->r_info >> 8) == (((ELF_REL*)&ptr[j*2])->r_info >> 8)) -// break; - } - -/* if (j != elfSectH[i].sh_size / 4)*/ { - u32 *p; - - rel = (ELF_REL*)&ptr[j*2]; -// __printf("HI16: found match: %x\n", rel->r_offset); - p = (u32*)&mem[rel->r_offset]; -// __printf("%x + %x = %x\n", *p, elfbase, (*p & 0xffff) + (elfbase & 0xffff)); - if (((*p & 0xffff) + (elfbase & 0xffff)) & 0x8000) { -// __printf("found\n"); - imm++; - } - } - *tmp = (*tmp & 0xffff0000) | imm; - break; - - case 6: // R_MIPS_LO16 - *tmp = (*tmp & 0xffff0000) | - (((*tmp & 0xffff) + (elfbase & 0xffff)) & 0xffff); - break; - - default: - __printf("UNKNOWN R_MIPS REL!!\n"); - break; - } - - size-= 2; r+= 2; - } -} - -int loadSectionHeaders() { - int i; - int i_st = -1; - int i_dt = -1; - - if (elfHeader->e_shnum == 0) { - return -1; - } - - elfSectH = (ELF_SHR*)&elfdata[elfHeader->e_shoff]; - - if ( elfHeader->e_shstrndx < elfHeader->e_shnum ) { - sections_names = (char *)&elfdata[elfSectH[ elfHeader->e_shstrndx ].sh_offset]; - } - - for ( i = 0 ; i < elfHeader->e_shnum ; i++ ) - { -#ifdef ELF_LOG - ELF_LOG( "Elf32 Section Header [%x] %s", i, §ions_names[ elfSectH[ i ].sh_name ] ); -#endif -/* if ( elfSectH[i].sh_flags & 0x2 ) { - if (elfSectH[i].sh_offset < elfsize) { - int size; - - if ((elfSectH[i].sh_size + elfSectH[i].sh_offset) > elfsize) { - size = elfsize - elfSectH[i].sh_offset; - } else { - size = elfSectH[i].sh_size; - } - memcpy(&psM[ elfSectH[ i ].sh_addr &0x1ffffff ], - &elfdata[elfSectH[i].sh_offset], - size); - } -#ifdef ELF_LOG - ELF_LOG( "\t*LOADED*" ); -#endif - }*/ -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("type: "); -#endif - switch ( elfSectH[ i ].sh_type ) - { - default: -#ifdef ELF_LOG - ELF_LOG("unknown %08x",elfSectH[i].sh_type); -#endif - break; - - case 0x0: -#ifdef ELF_LOG - ELF_LOG("null"); -#endif - break; - - case 0x1: -#ifdef ELF_LOG - ELF_LOG("progbits"); -#endif - break; - - case 0x2: -#ifdef ELF_LOG - ELF_LOG("symtab"); -#endif - break; - - case 0x3: -#ifdef ELF_LOG - ELF_LOG("strtab"); -#endif - break; - - case 0x4: -#ifdef ELF_LOG - ELF_LOG("rela"); -#endif - break; - - case 0x8: -#ifdef ELF_LOG - ELF_LOG("no bits"); -#endif - break; - - case 0x9: -#ifdef ELF_LOG - ELF_LOG("rel"); -#endif - break; - } -#ifdef ELF_LOG - ELF_LOG("\n"); - ELF_LOG("flags: %08x\n", elfSectH[i].sh_flags); - ELF_LOG("addr: %08x\n", elfSectH[i].sh_addr); - ELF_LOG("offset: %08x\n", elfSectH[i].sh_offset); - ELF_LOG("size: %08x\n", elfSectH[i].sh_size); - ELF_LOG("link: %08x\n", elfSectH[i].sh_link); - ELF_LOG("info: %08x\n", elfSectH[i].sh_info); - ELF_LOG("addralign: %08x\n", elfSectH[i].sh_addralign); - ELF_LOG("entsize: %08x\n", elfSectH[i].sh_entsize); -#endif - // dump symbol table - - if (elfSectH[i].sh_type == 0x02) { - i_st = i; i_dt = elfSectH[i].sh_link; - } - } - - - // now that we have all the stuff loaded, relocate it - for (i = 0 ; i < elfHeader->e_shnum ; i++) { - if (elfSectH[i].sh_type == 0x09) { // relocations - _relocateElfSection(i); - } - } - - return 0; -} - -void* loadElfFile(ROMFILE_INFO* ri, u32 offset) -{ - imageInfo* ii; - ELF_PHR* ph; - ELF_IOPMOD* im; - - __printf("loadElfFile: base=%x, size=%x\n", ri->fileData, ri->entry->fileSize); - elfdata = (u8*)(ri->fileData); - elfsize = ri->entry->fileSize; - elfbase = offset+0x30; - - loadHeaders(); - - // fill the image info header - ph= (ELF_PHR*)((char*)elfHeader +elfHeader->e_phoff); - im= (ELF_IOPMOD*)((char*)elfHeader + ph[0].p_offset); - ii = (imageInfo*)offset; - - if( *(u16*)(elfHeader->e_ident+4) != 0x101 ) - return NULL; - if (elfHeader->e_machine != EM_MIPS) - return NULL; - if (elfHeader->e_phentsize != sizeof(ELF_PHR)) - return NULL; - if (elfHeader->e_phnum != 2) - return NULL; - if (ph[0].p_type != PT_SCE_IOPMOD) - return NULL; - if (elfHeader->e_type != ET_SCE_IOPRELEXEC){ - if (elfHeader->e_type != elfHeader->e_phnum )//ET_EXEC) - return NULL; - //result->type=3; - } - //else result->type=4; - - ii->next =0; - ii->name =NULL; - ii->version =0; - ii->flags =0; - ii->modid =0; - if ((int)im->moduleinfo != -1) { - moduleInfo* minfo = (moduleInfo*)(im->moduleinfo+ph[1].p_vaddr); // probably wrong - ii->name = minfo->name; - ii->version = minfo->version; - } - else { - ii->name = NULL; - ii->version = 0; - } - ii->entry = im->entry; - ii->gp_value = im->gp_value; - ii->p1_vaddr = ph[1].p_vaddr; - ii->text_size = im->text_size; - ii->data_size = im->data_size; - ii->bss_size = im->bss_size; - - loadProgramHeaders(); - loadSectionHeaders(); - - _dprintf("loadElfFile: e_entry=%x, hdr=%x\n", elfHeader->e_entry, elfHeader); - return (void*)(elfbase+elfHeader->e_entry); -} - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_cdvdman.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_cdvdman.s deleted file mode 100644 index ae3bf9362..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_cdvdman.s +++ /dev/null @@ -1,146 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, Nick Van Veen - ------------------------------------------------------------------------ - iop_cdvdman.s CDVD Manager Functions. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - -/* ############################### CDVDMAN STUB ####### */ -/* # Added by Sjeep, 24th June 2002 # */ - -.local cdvdman_stub -cdvdman_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "cdvdman\0" - .align 2 - - .globl CdInit # 004 -CdInit: - j $31 - li $0, 4 - - .globl CdStandby # 005 -CdStandby: - j $31 - li $0, 5 - - .globl CdRead # 006 -CdRead: - j $31 - li $0, 6 - - .globl CdSeek # 007 -CdSeek: - j $31 - li $0, 7 - - .globl CdGetError # 008 -CdGetError: - j $31 - li $0, 8 - - .globl CdGetToc # 009 -CdGetToc: - j $31 - li $0, 9 - - .globl CdSearchFile # 010 -CdSearchFile: - j $31 - li $0, 10 - - .globl CdSync # 011 -CdSync: - j $31 - li $0, 11 - - .globl CdGetDiskType # 012 -CdGetDiskType: - j $31 - li $0, 12 - - .globl CdDiskReady # 013 -CdDiskReady: - j $31 - li $0, 13 - - .globl CdTrayReq # 014 -CdTrayReq: - j $31 - li $0, 14 - - .globl CdStop # 015 -CdStop: - j $31 - li $0, 15 - - .globl CdPosToInt # 016 -CdPosToInt: - j $31 - li $0, 16 - - .globl CdIntToPos # 017 -CdIntToPos: - j $31 - li $0, 17 - - .globl CdCheckCmd # 021 -CdCheckCmd: - j $31 - li $0, 21 - - .globl CdReadILinkID # 022 -CdReadILinkID: - j $31 - li $0, 22 - - .globl CdReadClock # 024 -CdReadClock: - j $31 - li $0, 24 - - .globl CdStatus # 028 -CdStatus: - j $31 - li $0, 28 - - .globl CdCallback # 037 -CdCallback: - j $31 - li $0, 37 - - .globl CdPause # 038 -CdPause: - j #31 - li $0, 38 - - .globl CdBreak # 039 -CdBreak: - j $31 - li $0, 39 - - .globl CdGetReadPos # 044 -CdGetReadPos: - j $31 - li $0, 44 - - .globl CdReadChain # 066 -CdReadChain: - j $31 - li $0, 66 - - .globl CdMmode -CdMmode: - j $31 - li $0, 75 - - .word 0 - .word 0 diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_dmacman.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_dmacman.s deleted file mode 100644 index bc6f6a70d..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_dmacman.s +++ /dev/null @@ -1,52 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_dmacman.s DMAC library function imports. - taken from dmacman in bios. -*/ - - .text - .set noreorder - - -/* ############################### DMACMAN STUB ######## */ - .local dmacman_stub -dmacman_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "dmacman\0" - .align 2 - - .globl dmacSetDMA # 028 -dmacSetDMA: - j $31 - li $0, 28 - - .globl dmacStartTransfer # 032 -dmacStartTransfer: - j $31 - li $0, 32 - - .globl dmacSetVal # 033 -dmacSetVal: - j $31 - li $0, 33 - - .globl dmacEnableDMAch # 034 -dmacEnableDMAch: - j $31 - li $0, 34 - - .globl dmacDisableDMAch # 035 -dmacDisableDMAch: - j $31 - li $0, 35 - - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_excepman.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_excepman.s deleted file mode 100644 index cdf72a719..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_excepman.s +++ /dev/null @@ -1,58 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_excepman.s Exception Manager Functions. -*/ - - .text - .set noreorder - - -/* ############################### EXCEPMAN STUB ####### */ -/* # Added by linuzappz, 10th May 2004 # */ - - .local excepman_stub -excepman_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "excepman" - .align 2 - - .globl GetExHandlersTable # 003 -GetExHandlersTable: - j $31 - li $0, 3 - - .globl RegisterExceptionHandler # 004 -RegisterExceptionHandler: - j $31 - li $0, 4 - - .globl RegisterPriorityExceptionHandler # 005 -RegisterPriorityExceptionHandler: - j $31 - li $0, 5 - - .globl RegisterDefaultExceptionHandler # 006 -RegisterDefaultExceptionHandler: - j $31 - li $0, 6 - - .globl ReleaseExceptionHandler # 007 -ReleaseExceptionHandler: - j $31 - li $0, 7 - - .globl ReleaseDefaultExceptionHandler # 008 -ReleaseDefaultExceptionHandler: - j $31 - li $0, 8 - - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_heaplib.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_heaplib.s deleted file mode 100644 index 955224ed8..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_heaplib.s +++ /dev/null @@ -1,51 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_heaplib.s Heap library function imports. - taken from heaplib in bios. -*/ - - .text - .set noreorder - - -/* ############################### SYSMEM STUB ######## */ - .local sysmem_stub -sysmem_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "heaplib\0" - .align 2 - - .globl CreateHeap # 004 -CreateHeap: - j $31 - li $0, 4 - - .globl DestroyHeap # 005 -DestroyHeap: - j $31 - li $0, 5 - - .globl HeapMalloc # 006 -HeapMalloc: - j $31 - li $0, 6 - - .globl HeapFree # 007 -HeapFree: - j $31 - li $0, 7 - - .globl HeapSize # 008 -HeapSize: - j $31 - li $0, 8 - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_intrman.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_intrman.s deleted file mode 100644 index ce1068eb1..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_intrman.s +++ /dev/null @@ -1,73 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_intrman.s Interrupt Manager Functions. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - -/* ############################### INTRMAN STUB ####### */ -/* # Added by Oobles, 5th March 2002 # */ - - .local intrman_stub -intrman_stub: - .word 0x41e00000 - .word 0 - .word 0x00000102 - .ascii "intrman\0" - .align 2 - - .globl RegisterIntrHandler # 004 -RegisterIntrHandler: - j $31 - li $0, 4 - - .globl ReleaseIntrHandler # 005 -ReleaseIntrHandler: - j $31 - li $0, 5 - - .globl EnableIntr # 006 -EnableIntr: - j $31 - li $0, 6 - - .globl DisableIntr # 007 -DisableIntr: - j $31 - li $0, 7 - - .globl CpuDisableIntr # 008 -CpuDisableIntr: - j $31 - li $0, 8 - - .globl CpuEnableIntr # 009 -CpuEnableIntr: - j $31 - li $0, 9 - - .globl CpuSuspendIntr # 0x11 -CpuSuspendIntr: - j $31 - li $0, 0x11 - - .globl CpuResumeIntr # 0x12 -CpuResumeIntr: - j $31 - li $0, 0x12 - - .globl QueryIntrContext # 0x17 -QueryIntrContext: - j $31 - li $0, 0x17 - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_ioman.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_ioman.s deleted file mode 100644 index 3668da8d4..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_ioman.s +++ /dev/null @@ -1,116 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, Gustavo Scott(gustavo@scotti.com) - ------------------------------------------------------------------------ - iop_iooman.s - IOP Basic libraries. - took from .irx files with symbol table / string table -*/ - - .text - .set noreorder - - -/* ############################### IOMAN STUB ######## */ - .local ioman_stub -ioman_stub: - .word 0x41e00000 - .word 0 - .word 0x00000102 - .ascii "ioman\0\0\0" - .align 2 - - .globl open # 004 -open: - j $31 - li $0, 4 - - .globl close # 005 -close: - j $31 - li $0, 5 - - .globl read # 006 -read: - j $31 - li $0, 6 - - .globl write # 007 -write: - j $31 - li $0, 7 - - .globl lseek # 008 -lseek: - j $31 - li $0, 8 - - .globl ioctl -ioctl: - j $31 - li $0, 9 - - .globl remove -remove: - j $31 - li $0, 10 - - .globl mkdir -mkdir: - j $31 - li $0, 11 - - .globl rmdir -rmdir: - j $31 - li $0, 12 - - .globl dopen -dopen: - j $31 - li $0, 13 - - .globl dclose -dclose: - j $31 - li $0, 14 - - .globl dread -dread: - j $31 - li $0, 15 - - .globl getstat -getstat: - j $31 - li $0, 16 - - .globl chstat -chstat: - j $31 - li $0, 17 - - .globl format -format: - j $31 - li $0, 18 - - .globl FILEIO_add # 020 - .globl AddDrv -FILEIO_add: -AddDrv: - j $31 - li $0, 20 - - .globl FILEIO_del # 021 - .globl DelDrv -FILEIO_del: -DelDrv: - j $31 - li $0, 21 - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_libsd.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_libsd.s deleted file mode 100644 index 318af1526..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_libsd.s +++ /dev/null @@ -1,160 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_libsd.s Sound Library - taken from .irx files with symbol table - Missing calls by Julian Tyler (lovely@crm114.net) -*/ - - .text - .set noreorder - - -/* ############################### LIBSD STUB ######### */ -/* # Added by Oobles, 7th March 2002 # */ - - .local libsd_stub -libsd_stub: - .word 0x41e00000 - .word 0 - .word 0x00000104 - .ascii "libsd\0\0" - .align 2 - -/* Added by Julian Tyler (lovely) */ - .globl SdQuit # 0x02 -SdQuit: - j $31 - li $0, 0x02 - - .globl SdInit # 0x04 -SdInit: - j $31 - li $0, 0x04 - - .globl SdSetParam # 0x05 -SdSetParam: - j $31 - li $0, 0x05 - - .globl SdGetParam # 0x06 -SdGetParam: - j $31 - li $0, 0x06 - - .globl SdSetSwitch # 0x07 -SdSetSwitch: - j $31 - li $0, 0x07 - -/* Added by Julian Tyler (lovely) */ - .globl SdGetSwitch # 0x08 -SdGetSwitch: - j $31 - li $0, 0x08 - - .globl SdSetAddr # 0x09 -SdSetAddr: - j $31 - li $0, 0x09 - - .globl SdGetAddr # 0x0a -SdGetAddr: - j $31 - li $0, 0x0a - - .globl SdSetCoreAttr # 0x0b -SdSetCoreAttr: - j $31 - li $0, 0x0b - -/* Added by Julian Tyler (lovely) 013-016 */ - .globl SdGetCoreAttr # 012 -SdGetCoreAttr: - j $31 - li $0, 0x0c - - .globl SdNote2Pitch # 013 -SdNote2Pitch: - j $31 - li $0, 0x0d - - .globl SdPitch2Note # 014 -SdPitch2Note: - j $31 - li $0, 0x0e - - .globl SdProcBatch # 015 -SdProcBatch: - j $31 - li $0, 0x0f - - .globl SdProcBatchEx # 016 -SdProcBatchEx: - j $31 - li $0, 0x10 - - .globl SdVoiceTrans # 0x11 -SdVoiceTrans: - j $31 - li $0, 0x11 - -/* Added by Julian Tyler (lovely) 018-022 */ - - .globl SdBlockTrans # 018 -SdBlockTrans: - j $31 - li $0, 0x12 - - .globl SdVoiceTransStatus # 019 -SdVoiceTransStatus: - j $31 - li $0, 0x13 - - .globl SdBlockTransStatus # 020 -SdBlockTransStatus: - j $31 - li $0, 0x14 - - .globl SdSetTransCallback # 021 -SdSetTransCallback: - j $31 - li $0, 0x15 - - .globl SdSetIRQCallback # 022 -SdSetIRQCallback: - j $31 - li $0, 0x16 - - .globl SdSetEffectAttr # 0x17 -SdSetEffectAttr: - j $31 - li $0, 0x17 - -/* Added by Julian Tyler (lovely) 024-025 */ - - .globl SdGetEffectAttr # 024 -SdGetEffectAttr: - j $31 - li $0, 0x18 - - .globl SdClearEffectWorkArea # 025 -SdClearEffectWorkArea: - j $31 - li $0, 0x19 - - .globl SdSetTransIntrHandler # 0x1a -SdSetTransIntrHandler: - j $31 - li $0, 0x1a - - .globl SdSetSpu2IntrHandler # 0x1b -SdSetSpu2IntrHandler: - j $31 - li $0, 0x1b - - .word 0 - .word 0 - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_loadcore.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_loadcore.s deleted file mode 100644 index 9fd8c3c62..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_loadcore.s +++ /dev/null @@ -1,65 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_loadcore.s Core IOP Functions. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - - -/* ############################### LOADCORE STUB ###### */ -/* # Added by Oobles, 5th March 2002 # */ - - .local loadcore_stub -loadcore_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "loadcore" - .align 2 - - .globl GetLibraryEntryTable # 0x03 -GetLibraryEntryTable: - j $31 - li $0, 3 - - .globl FlushIcache # 0x05 -FlushIcache: - j $31 - li $0, 4 - - .globl FlushDcache # 0x05 -FlushDcache: - j $31 - li $0, 5 - - .global RegisterLibraryEntries # 0x06 -RegisterLibraryEntries: - j $31 - li $0, 6 - - .global ReleaseLibraryEntries -ReleaseLibraryEntries: - j $31 - li $0, 7 - - .global QueryLibraryEntryTable -QueryLibraryEntryTable: - j $31 - li $0, 11 - - .globl QueryBootMode # 0x0c -QueryBootMode: - j $31 - li $0, 0x0c - - .word 0 - .word 0 - - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_modload.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_modload.s deleted file mode 100644 index 84b5481c6..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_modload.s +++ /dev/null @@ -1,61 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, Nick Van Veen (nickvv@xtra.co.nz) - ------------------------------------------------------------------------ - iop_modload.s Module Manager Functions. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - -/* ############################### MODLOAD STUB ####### */ -/* # Added by Sjeep, 28th March 2002 # */ - - .local modload_stub -modload_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "modload\0" - .align 2 - - .globl ReBootStart # 004 -ReBootStart: - jr $31 - li $0, 0x04 - - .globl LoadModuleAddress # 005 -LoadModuleAddress: - jr $31 - li $0, 0x05 - - .globl LoadModule # 006 -LoadModule: - jr $31 - li $0, 0x06 - - .globl LoadStartModule # 007 -LoadStartModule: - jr $31 - li $0, 0x07 - - .globl StartModule # 008 -StartModule: - jr $31 - li $0, 0x08 - - .globl LoadModuleBufferAddress # 009 -LoadModuleBufferAddress: - jr $31 - li $0, 0x09 - - .globl LoadModuleBuffer # 010 -LoadModuleBuffer: - jr $31 - li $0, 0x0A - - .word 0 - .word 0 diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_sifcmd.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_sifcmd.s deleted file mode 100644 index d5f61990b..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_sifcmd.s +++ /dev/null @@ -1,144 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_sifcmd.s Serial Interface Command Functions. - taken from .irx files with symbol table -*/ - - .text - .set noreorder - - -/* ############################### SIFCMD STUB ######## */ -/* # Added by Oobles, 5th March 2002 # */ - - .local sifcmd_stub -sifcmd_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "sifcmd\0\0" - .align 2 - - .globl SifInitCmd # 0x04 -SifInitCmd: - j $31 - li $0, 0x04 - - .globl SifExitCmd # 0x05 -SifExitCmd: - j $31 - li $0, 0x05 - - .globl SifGetSreg # 0x06 -SifGetSreg: - j $31 - li $0, 0x06 - - .globl SifSetSreg # 0x07 -SifSetSreg: - j $31 - li $0, 0x07 - - .globl SifSetCmdBuffer # 0x08 -SifSetCmdBuffer: - j $31 - li $0, 0x08 - - - .globl SifAddCmdHandler # 0x0a -SifAddCmdHandler: - j $31 - li $0, 0x0a - - .globl SifRemoveCmdHandler # 0x0b -SifRemoveCmdHandler: - j $31 - li $0, 0x0b - - .globl SifSendCmd # 0x0c -SifSendCmd: - j $31 - li $0, 0x0c - - .globl iSifSendCmd # 0x0d -iSifSendCmd: - j $31 - li $0, 0x0d - - .globl SifInitRpc # 0x0E -SifInitRpc: - j $31 - li $0, 0x0E - - .globl SifBindRpc # 0x0F -SifBindRpc: - j $31 - li $0, 0x0F - - .globl SifCallRpc # 0x10 -SifCallRpc: - j $31 - li $0, 0x10 - - .globl SifRegisterRpc # 0x11 -SifRegisterRpc: - j $31 - li $0, 0x11 - - .globl SifCheckStatRpc # 0x12 -SifCheckStatRpc: - j $31 - li $0, 0x12 - - .globl SifSetRpcQueue # 0x13 -SifSetRpcQueue: - j $31 - li $0, 0x13 - - .globl SifGetNextRequest # 0x14 -SifGetNextRequest: - j $31 - li $0, 0x14 - - .globl SifExecRequest # 0x15 -SifExecRequest: - j $31 - li $0, 0x15 - - .globl SifRpcLoop # 0x16 -SifRpcLoop: - j $31 - li $0, 0x16 - - .globl SifRpcGetOtherData # 0x17 -SifRpcGetOtherData: - j $31 - li $0, 0x17 - - .globl SifRemoveRpc # 0x18 -SifRemoveRpc: - j $31 - li $0, 0x18 - - .globl SifRemoveRpcQueue # 0x19 -SifRemoveRpcQueue: - j $31 - li $0, 0x19 - - .globl SifSendCmdIntr # 0x20 -SifSendCmdIntr: - j $31 - li $0, 0x20 - - .globl iSifSendCmdIntr # 0x21 -iSifSendCmdIntr: - j $31 - li $0, 0x21 - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_sifman.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_sifman.s deleted file mode 100644 index f03a53b62..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_sifman.s +++ /dev/null @@ -1,178 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2001, Gustavo Scotti (gustavo@scotti.com) - ------------------------------------------------------------------------ - iop_sifman.s Serial Interface Manager Functions. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - -/* ############################### SIFMAN STUB ######## */ -/* # Added by Oobles, 7th March 2002 # */ - - .local sifman_stub -sifman_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "sifman\0\0" - .align 2 - - .globl SifDeinit # 0x03 -SifDeinit: - j $31 - li $0, 0x03 - - .globl SifSIF2Init # 0x04 -SifSIF2Init: - j $31 - li $0, 0x04 - - .globl SifInit # 0x05 -SifInit: - j $31 - li $0, 0x05 - - .globl SifSetDChain # 0x06 -SifSetDChain: - j $31 - li $0, 0x06 - - .globl SifSetDma # 0x07 -SifSetDma: - j $31 - li $0, 0x07 - - .globl SifDmaStat # 0x08 -SifDmaStat: - j $31 - li $0, 0x08 - - .globl SifSend # 0x09 -SifSend: - j $31 - li $0, 0x09 - - .globl SifSendSync # 0x0A -SifSendSync: - j $31 - li $0, 0x0A - - .globl SifIsSending # 0x0B -SifIsSending: - j $31 - li $0, 0x0B - - .globl SifSetSIF0DMA # 0x0C -SifSetSIF0DMA: - j $31 - li $0, 0x0C - - .globl SifSendSync0 # 0x0D -SifSendSync0: - j $31 - li $0, 0x0D - - .globl SifIsSending0 # 0x0E -SifIsSending0: - j $31 - li $0, 0x0E - - .globl SifSetSIF1DMA # 0x0F -SifSetSIF1DMA: - j $31 - li $0, 0x0F - - .globl SifSendSync1 # 0x10 -SifSendSync1: - j $31 - li $0, 0x10 - - .globl SifIsSending1 # 0x11 -SifIsSending1: - j $31 - li $0, 0x11 - - .globl SifSetSIF2DMA # 0x12 -SifSetSIF2DMA: - j $31 - li $0, 0x12 - - .globl SifSendSync2 # 0x13 -SifSendSync2: - j $31 - li $0, 0x13 - - .globl SifIsSending2 # 0x14 -SifIsSending2: - j $31 - li $0, 0x14 - - .globl SifGetEEIOPflags # 0x15 -SifGetEEIOPflags: - j $31 - li $0, 0x15 - - .globl SifSetEEIOPflags # 0x16 -SifSetEEIOPflags: - j $31 - li $0, 0x16 - - .globl SifGetIOPEEflags # 0x17 -SifGetIOPEEflags: - j $31 - li $0, 0x17 - - .globl SifSetIOPEEflags # 0x18 -SifSetIOPEEflags: - j $31 - li $0, 0x18 - - .globl SifGetEErcvaddr # 0x19 -SifGetEErcvaddr: - j $31 - li $0, 0x19 - - .globl SifGetIOPrcvaddr # 0x1A -SifGetIOPrcvaddr: - j $31 - li $0, 0x1A - - .globl SifSetIOPrcvaddr # 0x1B -SifSetIOPrcvaddr: - j $31 - li $0, 0x1B - - .globl SifSet1450_2 # 0x1C -SifSet1450_2: - j $31 - li $0, 0x1C - - .globl SifCheckInit # 0x1D -SifCheckInit: - j $31 - li $0, 0x1D - - .globl SifSet0CB # 0x1E -SifSet0CB: - j $31 - li $0, 0x1E - - .globl SifReset0CB # 0x1F -SifReset0CB: - j $31 - li $0, 0x1F - - .globl SifSetDmaIntr # 0x20 -SifSetDmaIntr: - j $31 - li $0, 0x20 - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_stdio.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_stdio.s deleted file mode 100644 index 6a4409be5..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_stdio.s +++ /dev/null @@ -1,32 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_stdio.s Stdio Import Library - taken from .irx files with symbol table -*/ - - .text - .set noreorder - - -/* ############################### STDIO STUB ######## */ - .local stdio_stub -stdio_stub: - .word 0x41e00000 - .word 0 - .word 0x00000102 - .ascii "stdio\0\0\0" - .align 2 - - .globl printf # 004 - -printf: - j $31 - li $0, 4 - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_sysclib.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_sysclib.s deleted file mode 100644 index b646501ad..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_sysclib.s +++ /dev/null @@ -1,219 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_sysclib.a C Library Functions. - taken from .irx files with symbol table. - Additions from Herben's IRX Tool imports.txt -*/ - - .text - .set noreorder - - -/* ############################### SYSCLIB STUB ####### */ -/* # Added by Oobles, 5th March 2002 # */ - - .local sysclib_stub -sysclib_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "sysclib\0" - .align 2 - - .globl setjmp # 0x04 -setjmp: - j $31 - li $0, 0x04 - - .globl longjmp # 0x05 -longjmp: - j $31 - li $0, 0x05 - - .globl toupper # 0x06 -toupper: - j $31 - li $0, 0x06 - - .globl tolower # 0x07 -tolower: - j $31 - li $0, 0x07 - - .globl look_ctype_table # 0x08 -look_ctype_table: - j $31 - li $0, 0x08 - - .globl get_ctype_table # 0x09 -get_ctype_table: - j $31 - li $0, 0x09 - - .globl memchr # 0x0A -memchr: - j $31 - li $0, 0x0A - - .globl memcmp # 0x0B -memcmp: - j $31 - li $0, 0x0B - - .globl memcpy # 0x0C -memcpy: - j $31 - li $0, 0x0C - - .globl memmove # 0x0D -memmove: - j $31 - li $0, 0x0D - - .globl memset # 0x0E -memset: - j $31 - li $0, 0x0E - - .globl bcmp # 0x0F -bcmp: - j $31 - li $0, 0x0F - - .globl bcopy # 0x10 -bcopy: - j $31 - li $0, 0x10 - - .globl bzero # 0x11 -bzero: - j $31 - li $0, 0x11 - - .globl prnt # 0x12 -prnt: - j $31 - li $0, 0x12 - - .globl sprintf # 0x013 -sprintf: - j $31 - li $0, 0x13 - - .globl strcat # 0x14 -strcat: - j $31 - li $0, 0x14 - - .globl strchr # 0x15 -strchr: - j $31 - li $0, 0x15 - - .globl strcmp # 0x16 -strcmp: - j $31 - li $0, 0x16 - - .globl strcpy # 0x17 -strcpy: - j $31 - li $0, 0x17 - - .globl strcspn # 0x18 -strcspn: - j $31 - li $0, 0x18 - - .globl index # 0x19 -index: - j $31 - li $0, 0x19 - - .globl rindex # 0x1A -rindex: - j $31 - li $0, 0x1A - - .globl strlen # 0x1b -strlen: - j $31 - li $0, 0x1b - - .globl strncat # 0x1c -strncat: - j $31 - li $0, 0x1C - - .globl strncmp # 0x1d -strncmp: - j $31 - li $0, 0x1d - - .globl strncpy # 0x1E -strncpy: - j $31 - li $0, 0x1E - - .globl strpbrk # 0x1F -strpbrk: - j $31 - li $0, 0x1F - - .globl strrchr # 0x20 -strrchr: - j $31 - li $0, 0x20 - - .globl strspn # 0x21 -strspn: - j $31 - li $0, 0x21 - - .globl strstr # 0x22 -strstr: - j $31 - li $0, 0x22 - - .globl strtok # 0x23 -strtok: - j $31 - li $0, 0x23 - - .globl strtol # 0x24 -strtol: - j $31 - li $0, 0x24 - - .globl atob # 0x25 -atob: - j $31 - li $0, 0x25 - - .globl strtoul # 0x26 -strtoul: - j $31 - li $0, 0x26 - - .globl wmemcopy # 0x28 -wmemcopy: - j $31 - li $0, 0x28 - - .globl wmemset # 0x29 -wmemset: - j $31 - li $0, 0x29 - - .globl vsprintf # 0x2A -vsprintf: - j $31 - li $0, 0x2A - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_sysmem.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_sysmem.s deleted file mode 100644 index 203c22377..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_sysmem.s +++ /dev/null @@ -1,71 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2001, Gustavo Scotti (gustavo@scotti.com) - ------------------------------------------------------------------------ - iop_sysmem.s Memory Function import list. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - -/* ############################### SYSMEM STUB ######## */ - .local sysmem_stub -sysmem_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "sysmem\0\0" - .align 2 - - .globl AllocSysMemory # 004 -AllocSysMemory: - j $31 - li $0, 0x04 - - .globl FreeSysMemory # 005 -FreeSysMemory: - j $31 - li $0, 0x05 - - .globl QueryMemSize # 006 -QueryMemSize: - j $31 - li $0, 0x06 - - .globl QueryMaxFreeMemSize # 007 -QueryMaxFreeMemSize: - j $31 - li $0, 0x07 - - .globl QueryTotalFreeMemSize # 008 -QueryTotalFreeMemSize: - j $31 - li $0, 0x08 - - .globl QueryBlockTopAddress # 009 -QueryBlockTopAddress: - j $31 - li $0, 0x09 - - .globl QueryBlockSize # 00A -QueryBlockSize: - j $31 - li $0, 0x0A - - .globl Kprintf # 0x0E -Kprintf: - j $31 - li $0, 0x0E - - .globl SetKprintf # 0x0F -SetKprintf: - j $31 - li $0, 0x0F - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_thbase.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_thbase.s deleted file mode 100644 index 2db3eca6a..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_thbase.s +++ /dev/null @@ -1,167 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_thbase.s Base Kernel Functions. - taken from .irx files with symbol table -*/ - - .text - .set noreorder - - -/* ############################### THBASE STUB ######## */ -/* # Added by Oobles, 5th March 2002 # */ - - .local thbase_stub -thbase_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "thbase\0\0" - .align 2 - - .globl CreateThread # 004 -CreateThread: - j $31 - li $0, 4 - - .globl DeleteThread # 005 -DeleteThread: - j $31 - li $0, 5 - - .globl StartThread # 006 -StartThread: - j $31 - li $0, 6 - - .globl StartThreadArgs # 007 -StartThreadArgs: - j $31 - li $0, 0x07 - - .globl ExitThread # 008 -ExitThread: - j $31 - li $0, 0x08 - - .globl ExitDeleteThread # 009 -ExitDeleteThread: - j $31 - li $0, 0x09 - - .globl TerminateThread # 010 -TerminateThread: - j $31 - li $0, 0x0A - - .globl iTerminateThread # 011 -iTerminateThread: - j $31 - li $0, 0x0B - - .globl DisableDispatchThread # 012 -DisableDispatchThread: - j $31 - li $0, 0x0C - - .globl EnableDispatchThread # 013 -EnableDispatchThread: - j $31 - li $0, 0x0D - - - .globl ChangeThreadPriority # 014 -ChangeThreadPriority: - j $31 - li $0, 0x0E - - .globl iChangeThreadPriority # 015 -iChangeThreadPriority: - j $31 - li $0, 0x0F - - - .globl ReleaseWaitThread # 018 -ReleaseWaitThread: - j $31 - li $0, 18 - - .globl iReleaseWaitThread # 019 -iReleaseWaitThread: - j $31 - li $0, 19 - - .globl GetThreadId # 0x14 -GetThreadId: - j $31 - li $0, 0x14 - - .globl SleepThread # 0x18 -SleepThread: - j $31 - li $0, 0x18 - - .globl WakeupThread # 0x19 -WakeupThread: - j $31 - li $0, 0x19 - - .globl iWakeupThread # 0x1A -iWakeupThread: - j $31 - li $0, 0x1A - - .globl DelayThread # 0x21 -DelayThread: - j $31 - li $0, 0x21 - - .globl GetSystemTime # 0x22 -GetSystemTime: - j $31 - li $0, 0x22 - - - .globl SetAlarm # 0x23 -SetAlarm: - j $31 - li $0, 0x23 - - .globl iSetAlarm # 0x24 -iSetAlarm: - j $31 - li $0, 0x24 - - .globl CancelAlarm # 0x25 -CancelAlarm: - j $31 - li $0, 0x25 - - .globl iCancelAlarm # 0x26 -iCancelAlarm: - j $31 - li $0, 0x26 - - .globl USec2SysClock # 0x27 -USec2SysClock: - j $31 - li $0, 0x27 - - .globl SysClock2USec # 0x28 -SysClock2USec: - j $31 - li $0, 0x28 - - .globl GetSystemStatusFlag # 0x29 -GetSystemStatusFlag: - j $31 - li $0, 0x29 - - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_thevent.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_thevent.s deleted file mode 100644 index e50f50575..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_thevent.s +++ /dev/null @@ -1,67 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, Florin Sasu (florinsasu@yahoo.com) - ------------------------------------------------------------------------ - iop_thevent.s Event Function Imports. -*/ - - .text - .set noreorder - - - .local thevent_stub -thevent_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "thevent\0" - .align 2 - - .globl CreateEventFlag # 004 -CreateEventFlag: - j $31 - li $0, 0x04 - - .globl DeleteEventFlag -DeleteEventFlag: - j $31 - li $0, 0x05 - - .globl SetEventFlag # 006 -SetEventFlag: - j $31 - li $0, 0x06 - - .globl iSetEventFlag # 007 -iSetEventFlag: - j $31 - li $0, 0x07 - - .globl ClearEventFlag # 008 -ClearEventFlag: - j $31 - li $0, 0x08 - - .globl iClearEventFlag # 009 -iClearEventFlag: - j $31 - li $0, 0x09 - - .globl WaitEventFlag # 00A -WaitEventFlag: - j $31 - li $0, 0x0A - - .word 0 - .word 0 - - .globl ReferEventFlagStatus # 00D -ReferEventFlagStatus: - j $31 - li $0, 0x0D - - .globl iReferEventFlagStatus # 00E -iReferEventFlagStatus: - j $31 - li $0, 0x0E diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_thsemap.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_thsemap.s deleted file mode 100644 index 866ac2111..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_thsemap.s +++ /dev/null @@ -1,68 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, David Ryan (Oobles@hotmail.com) - ------------------------------------------------------------------------ - iop_thsemap.s Semaphore Function Imports. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - -/* ############################### THSEMAP STUB ####### */ -/* # Added by Oobles, 5th March 2002 # */ - - .local thsemap_stub -thsemap_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "thsemap\0" - .align 2 - - .globl CreateSema # 004 -CreateSema: - j $31 - li $0, 4 - - .globl DeleteSema # 005 -DeleteSema: - j $31 - li $0, 5 - - .globl SignalSema # 006 -SignalSema: - j $31 - li $0, 6 - - .globl iSignalSema # 007 -iSignalSema: - j $31 - li $0, 7 - - .globl WaitSema # 008 -WaitSema: - j $31 - li $0, 8 - - .globl PollSema # 009 -PollSema: - j $31 - li $0, 0x09 - - .globl ReferSemaStatus # 00B -ReferSemaStatus: - j $31 - li $0, 0x0B - - .globl iReferSemaStatus # 00C -iReferSemaStatus: - j $31 - li $0, 0x0C - - .word 0 - .word 0 - - diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_usbd.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_usbd.s deleted file mode 100644 index f158a5e83..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_usbd.s +++ /dev/null @@ -1,113 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, Pedro J. Cabrera (rc5stint@yahoo.com) - ------------------------------------------------------------------------ - iop_usbd.s USB Driver Import functions. - - Figured out from IRX files with symbol tables in Unreal Tournament - and JamPak demo discs. -*/ - - .text - .set noreorder - - .local usbd_stub -usbd_stub: # Module Import Information - .word 0x41e00000 # Import Tag - .word 0x00000000 # Minor Version? - .word 0x00000101 # Major Version? - .ascii "usbd\0\0\0\0" # Library ID - .align 2 - - /* initialize USBD.IRX - * Note: UsbInit is automatically called first whenever USBD.IRX is loaded. - * There should never be a need to reinitialize the driver. In fact, it may - * not even work. But I'm providing the function hook anyhow. - */ - .globl UsbInit -UsbInit: - j $31 - li $0, 0x00 - - /* - * These two functions are used to register and unregister device drivers for - * listening for USB bus events. The events are device probe, connect, and disconnect. - */ - - # register a USB device driver - .globl UsbRegisterDriver -UsbRegisterDriver: - j $31 - li $0, 0x04 - - # unregister a USB device driver - .globl UsbUnregisterDriver -UsbUnregisterDriver: - j $31 - li $0, 0x05 - - /* - * This function is used to get the static descriptors for the specific USB - * device. These descriptors identify the device uniquely and help determine - * what type of device we are dealing with, and what its capabilities and - * features are. - */ - .globl UsbGetDeviceStaticDescriptor -UsbGetDeviceStaticDescriptor: - j $31 - li $0, 0x06 - - /* - * These two functions are used to assign relevant data to a specific device. - * The type of data is entirely up to the caller. For example, a particular - * USB device driver may store configuration data for each specific device - * under its control. - */ - - # set the private data pointer for a device - .globl UsbSetDevicePrivateData -UsbSetDevicePrivateData: - j $31 - li $0, 0x07 - - # get the private data pointer for a device - .globl UsbGetDevicePrivateData -UsbGetDevicePrivateData: - j $31 - li $0, 0x08 - - /* - * This function returns an endpoint ID for the device ID and endpoint descriptor - * passed in. This endpoint ID is then used when transfering data to the device, - * and to close the endpoint. - */ - .globl UsbOpenEndpoint -UsbOpenEndpoint: - j $31 - li $0, 0x09 - - # close an endpoint - .globl UsbCloseEndpoint -UsbCloseEndpoint: - j $31 - li $0, 0x0A - - /* - * This function is used for all types of USB data transfers. Which type of - * transfer is determined by the parameters that are passed in. The types are: - * control, isochronous, interrupt, and bulk transfers. More details can be - * found in usbd.h. - */ - .globl UsbTransfer -UsbTransfer: - j $31 - li $0, 0x0B - - .globl UsbOpenBulkEndpoint -UsbOpenBulkEndpoint: - j $31 - li $0, 0x0C - - .word 0 - .word 0 diff --git a/unfree/fps2bios/kernel/iopload/libkernel/iop_vblank.s b/unfree/fps2bios/kernel/iopload/libkernel/iop_vblank.s deleted file mode 100644 index c772e19fe..000000000 --- a/unfree/fps2bios/kernel/iopload/libkernel/iop_vblank.s +++ /dev/null @@ -1,53 +0,0 @@ -/* - _____ ___ ____ - ____| | ____| PSX2 OpenSource Project - | ___| |____ (C)2002, Nick Van Veen (nickvv@xtra.co.nz) - ------------------------------------------------------------------------ - iop_vblank.s Vblank Manager Functions. - taken from .irx files with symbol table. -*/ - - .text - .set noreorder - - -/* ################################ VBLANK STUB ####### */ -/* # Added by Sjeep, 28th March 2002 # */ - - .local vblank_stub -vblank_stub: - .word 0x41e00000 - .word 0 - .word 0x00000101 - .ascii "vblank\0\0" - .align 2 - - .globl WaitVblankStart -WaitVblankStart: - jr $31 - li $0,4 - - .globl WaitVblankEnd -WaitVblankEnd: - jr $31 - li $0,5 - - .globl WaitVblank -WaitVblank: - jr $31 - li $0,6 - - .globl WaitNonVblank -WaitNonVblank: - jr $31 - li $0,7 - - .globl RegisterVblankHandler -RegisterVblankHandler: - jr $31 - li $0,8 - - .globl ReleaseVblankHandler -ReleaseVblankHandler: - jr $31 - li $0,9 diff --git a/unfree/fps2bios/kernel/iopload/loadcore/Makefile b/unfree/fps2bios/kernel/iopload/loadcore/Makefile deleted file mode 100644 index 9ce070c84..000000000 --- a/unfree/fps2bios/kernel/iopload/loadcore/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/LOADCORE - -IOP_INCS += -I../include - -IOP_OBJS = loadcore.o ../iopdebug.o ../iopelf.o ../romdir.o ../libkernel/iop_sysmem.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/loadcore/loadcore.c b/unfree/fps2bios/kernel/iopload/loadcore/loadcore.c deleted file mode 100644 index 9b0627bac..000000000 --- a/unfree/fps2bios/kernel/iopload/loadcore/loadcore.c +++ /dev/null @@ -1,1044 +0,0 @@ - -#include - -#include "ksysmem.h" -#include "kloadcore.h" -#include "iopdebug.h" -#include "iopelf.h" -#include "romdir.h" -#include "irx.h" // ps2sdk file for IMPORT_MAGIC - -#define BOOTMODE_START *((volatile u32**)0x3F0) -#define BOOTMODE_END *((volatile u32**)0x3F4) - -void _start(BOOT_PARAMS *init); // has to be declared first! - -struct tag_LC_internals { - struct export* let_next, *let_prev; - struct export* mda_next, *mda_prev;//.prev==free - imageInfo *image_info; // 0x800?0x830? - int module_count; - int module_index; -} lc_internals; - -u32 free; -u32 sysmem_00; -u32 modules_count; -u32 module_index; -u32 *place; // addr of 8 * 31 = 8 * linesInIopbtconf //place[2][31] -u32 bootmodes[17]; // was 16? -u32 bootmodes_size; -int debug=0; - -u32 bm_end; - -#define _dprintf(fmt, args...) \ - if (debug > 0) __printf("loadcore:%d: " fmt, __LINE__, ## args) - -void retonly(); -struct tag_LC_internals* GetLibraryEntryTable(); -void FlushIcache(); -void FlushDcache(); -int RegisterLibraryEntries(struct export *es); -int ReleaseLibraryEntries(struct export *e); -int _LinkImports(u32 *addr, int size); -int _UnlinkImports(void *addr, int size); -int RegisterNonAutoLinkEntries(struct export *e); -int QueryLibraryEntryTable(struct export *e); -u32 *QueryBootMode(int id); -void RegisterBootMode(struct bootmode *b); -int SetNonAutoLinkFlag(struct export *e); -int UnsetNonAutoLinkFlag(struct export *e); -void _LinkModule(imageInfo *ii); -void _UnlinkModule(imageInfo *ii); -int _RegisterBootupCBFunc(int (*function)(int *, int), int priority, int *result); -void _SetCacheCtrl(u32 val); -int _ReadModuleHeader(void *image, fileInfo *result); -int _LoadModule(void *image, fileInfo *fi); -u32 _FindImageInfo(void *addr); - -struct export loadcore_stub __attribute__((section(".text"))) ={ - EXPORT_MAGIC, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "loadcore", - (func)_start, // entrypoint - (func)retonly, - (func)retonly, - (func)GetLibraryEntryTable, - (func)FlushIcache, - (func)FlushDcache, - (func)RegisterLibraryEntries, - (func)ReleaseLibraryEntries, - (func)_LinkImports, - (func)_UnlinkImports, - (func)RegisterNonAutoLinkEntries, - (func)QueryLibraryEntryTable, - (func)QueryBootMode, - (func)RegisterBootMode, - (func)SetNonAutoLinkFlag, - (func)UnsetNonAutoLinkFlag, - (func)_LinkModule, - (func)_UnlinkModule, - (func)retonly, - (func)retonly, - (func)_RegisterBootupCBFunc, - (func)_SetCacheCtrl, - (func)_ReadModuleHeader, - (func)_LoadModule, - (func)_FindImageInfo, - 0 -}; - -/////////////////////////////////////////////////////////////////////// -void retonly(){} - -/////////////////////////////////////////////////////////////////////// -void RegisterBootMode(struct bootmode *b) { - int i; - - _dprintf("%s\n", __FUNCTION__); - if (((b->len + 1) * 4) < (16-bootmodes_size)) { - u32 *p = &bootmodes[bootmodes_size]; - for (i=0; ilen + 1; i++) p[i]=((u32*)b)[i]; - p[i]=0; - bootmodes_size+= b->len + 1; - } -} - -/////////////////////////////////////////////////////////////////////// -u32 *QueryBootMode(int id) { - u32 *b; - - for (b = (u32*)&bootmodes[0]; *b; b += ((struct bootmode*)b)->len + 1) - if (id == ((struct bootmode*)b)->id) - return b; - return NULL; -} - -/////////////////////////////////////////////////////////////////////// -int match_name(struct export *src, struct export *dst){ - return (*(int*)(src->name+0) == *(int*)(dst->name+0)) && - (*(int*)(src->name+4) == *(int*)(dst->name+4)); -} - -/////////////////////////////////////////////////////////////////////// -int match_version_major(struct export *src, struct export *dst){ - return ((src->version>>8) - (dst->version>>8)); -} - -/////////////////////////////////////////////////////////////////////// -int match_version_minor(struct export *src, struct export *dst){ - return ((unsigned char)src->version - (unsigned char)dst->version); -} - -/////////////////////////////////////////////////////////////////////// -int fix_imports(struct import *imp, struct export *exp){ - func *ef; - struct func_stub *fs; - int count=0, ordinal; - - for (ef=exp->func; *ef; ef++){ - count++; //count number of exported functions - } - _dprintf("%s (%d functions)\n", __FUNCTION__, count); - - for (fs=imp->func; fs->jr_ra; fs++) { - if ((fs->addiu0 >> 26) != INS_ADDIU) break; - - ordinal = fs->addiu0 & 0xFFFF; - if (ordinal < count) { -// _dprintf("%s linking ordinal %d to %x\n", __FUNCTION__, ordinal, exp->func[ordinal]); - fs->jr_ra=(((u32)exp->func[ordinal]>>2) & 0x3FFFFFF) | INS_J; - } else { - fs->jr_ra=INS_JR_RA; - } - } - - imp->flags |=FLAG_IMPORT_QUEUED; - return 0; -} - -/////////////////////////////////////////////////////////////////////// -// Check the structure of the import table. -// Return 0 if a bad or empty import table is detected. -// Return a non-zero value if a valid import table is detected. -// -int check_import_table(struct import* imp){ - struct func_stub *f; - - if (imp->magic != IMPORT_MAGIC) - return 0; - for (f=imp->func; f->jr_ra; f++){ - if (f->addiu0 >> 26 != INS_ADDIU) - return 0; - if ((f->jr_ra!=INS_JR_RA) && (f->jr_ra>26!=INS_JR)) - return 0; - } - if (f->addiu0) - return 0; - return (imp->func < f); -} - -///////////////////////////////////////////////////////////////////////[OK] - -// Return 0 if successful -int link_client(struct import *imp){ - struct export *e; - -// _dprintf("%s\n", __FUNCTION__); - for (e=lc_internals.let_next; e; e=(struct export*)e->magic_link) { - if (debug > 0){ - // Zero terminate the name before printing it - char ename[9], iname[9]; - *(int*)ename = *(int*)e->name; *(int*)(ename+4) = *(int*)(e->name+4); ename[8] = 0; - *(int*)iname = *(int*)imp->name; *(int*)(iname+4) = *(int*)(imp->name+4);iname[8] = 0; - - //__printf("loadcore: %s: %s, %s\n", __FUNCTION__, ename, iname); - } - - if (!(e->flags & FLAG_NO_AUTO_LINK)){ - if ( match_name(e, (struct export*)imp)){ - if (match_version_major(e, (struct export*)imp)==0) { - fix_imports(imp, e); - imp->next=(struct import*)e->next; - e->next=(struct export*)imp; - FlushIcache(); - return 0; - } else { -// _dprintf("%s: version does not match\n", __FUNCTION__); - } - } else { -// _dprintf("%s: name does not match\n", __FUNCTION__); - } - } else { -// _dprintf("%s: e->flags bit 0 is 0\n", __FUNCTION__); - } - } - _dprintf("%s: FAILED to find a match\n", __FUNCTION__); - return -1; -} - -///////////////////////////////////////////////////////////////////////[OK] -int _LinkImports(u32 *addr, int size) -{ - struct import *p; - int i; - - _dprintf("%s: %x, %d\n", __FUNCTION__, addr, size); - for (i=0; imagic == IMPORT_MAGIC) && - check_import_table(p) && - ((p->flags & 7) == 0) && - link_client(p)) { - _UnlinkImports(p, size); - return -1; - } - } - return 0; -} - -///////////////////////////////////////////////////////////////////////[OK] -int unlink_client(struct import *i1, struct import *i2){ - struct import *i, *tmp; - - if (i1->next == i2){ - i1->next=i2->next; - return 0; - } - for (i = i1->next; i->next;) { - tmp=i->next; - if (tmp==i2) { - i->next=tmp->next; - tmp->next=NULL; - return 0; - } - i=tmp; - } - return -1; -} - -///////////////////////////////////////////////////////////////////////[OK] -void restore_imports(struct import* imp){ - struct func_stub *f; - - for (f=imp->func; (f->jr_ra) && ((f->addiu0 >> 26) == INS_ADDIU); f++) - f->jr_ra=INS_JR_RA; -} - -///////////////////////////////////////////////////////////////////////[OK] -int _UnlinkImports(void *addr, int size) -{ - struct export *e; - struct export *i; - struct export *tmp; - void *limit = addr + (size & ~0x3); - - for (e = (struct export*)lc_internals.let_next; e; e=(struct export*)e->magic_link){ - for (i = e->next; i; i=i->next) { - if (((u32)i >= (u32)addr) && ((u32)i < (u32)limit)) { - if (unlink_client((struct import*)e, (struct import*)i)) - return -1; - i->flags &= ~0x7; - restore_imports((struct import*)i); - } - } - if (((u32)e >= (u32)addr) && ((u32)e < (u32)limit)) - ReleaseLibraryEntries(e); - } -/* - for (i=let.mda; i->next; ) - if ((i->next >= addr) && (i->next < limit)){ - i->next->flags &= ~0x7; - restore_imports(i->next); - tmp = i->next->next; - i->next->next=NULL; - i->next=tmp; - }else - i=i->next; -*/ - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int SetNonAutoLinkFlag(struct export *e) -{ - return (e->flags |= FLAG_NO_AUTO_LINK); -} - -/////////////////////////////////////////////////////////////////////// -int UnsetNonAutoLinkFlag(struct export *e) -{ - return (e->flags &= ~FLAG_NO_AUTO_LINK); -} - -/////////////////////////////////////////////////////////////////////// -int _RegisterBootupCBFunc(int (*function)(int *, int), int priority, int *result) -{ - int x; - register int r; - if (place==NULL){ - x=1; - r=function(&x, 0); - if (result) *result=r; - return 0; - } - - __asm__("move %0, $gp\n" : "=r"(x) : ); - - place[0]=(u32)function + (priority & 3); - place[1]=x; - place[2]=0; - place+=2; - return 1; -} - -/////////////////////////////////////////////////////////////////////// -void _LinkModule(imageInfo *ii) -{ - imageInfo* p; - for (p=lc_internals.image_info; p->next && (p->next < (u32)ii); p=(imageInfo*)p->next); - - ii->next=p->next; - p->next=(u32)ii; - - ii->modid=module_index++; - modules_count++; -} - -/////////////////////////////////////////////////////////////////////// -void _UnlinkModule(imageInfo *ii) -{ - imageInfo *p; - if (ii) - for (p=lc_internals.image_info; p->next; p=(imageInfo*)p->next) - if (p->next == (u32)ii){ - p->next=((imageInfo*)p->next)->next; - modules_count--; - return; - } -} - -u32 _FindImageInfo(void *addr) -{ - register imageInfo *ii; - for (ii=lc_internals.image_info; ii; ii=(imageInfo*)ii->next) - if(((u32)addr>=ii->p1_vaddr) && - ((u32)addr p1_vaddr + ii->text_size + ii->data_size + ii->bss_size)) - return (u32)ii; - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int RegisterLibraryEntries(struct export *es){ - struct export *p; - struct export *plast; - struct export *pnext; - struct export *tmp; - struct export *snext; - - if ((es == NULL) || (es->magic_link != EXPORT_MAGIC)) - return -1; - - if (debug > 0){ - // Zero terminate the name before printing it - char ename[9]; - *(int*)ename = *(int*)es->name; - *(int*)(ename+4) = *(int*)(es->name+4); - ename[8] = 0; - - __printf("loadcore: %s (%x): %s, %x\n", __FUNCTION__, es, es->name, es->version); - } - - - plast=NULL; - for (p=(struct export*)lc_internals.let_next; p; p=(struct export*)p->magic_link) { - if (match_name(es, p) == 0 || - match_version_major(es, p) == 0) continue; - - if (match_version_minor(es, p) == 0) - return -1; - _dprintf("%s: found match\n", __FUNCTION__); - pnext = p->next; - p->next = NULL; - - for (tmp = pnext; tmp; ) { - if (tmp->flags & FLAG_NO_AUTO_LINK) { - pnext->magic_link = (u32)tmp; - pnext = tmp->next; - tmp->next = NULL; - } else { - tmp->next=plast; - plast=tmp; - } - tmp=tmp->next; - } - } - - if( lc_internals.mda_next ) { - for (tmp = lc_internals.mda_next; tmp->next; tmp=tmp->next) { //free - if ((match_name(es, tmp->next)) && - (match_version_major(es, tmp->next)==0)){ - _dprintf("%s: freeing module\n", __FUNCTION__); - snext=tmp->next->next; - tmp->next->next=plast; - plast=tmp->next; - tmp->next=snext; - } else tmp=tmp->next; - } - } - - es->next=0; - while (plast) { - snext=plast->next; - fix_imports((struct import*)plast, es); - plast->next=es->next; - es->next=plast; - plast=snext; - } - es->flags &= ~FLAG_NO_AUTO_LINK; - es->magic_link=(u32)lc_internals.let_next; - lc_internals.let_next=es; - FlushIcache(); - - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int ReleaseLibraryEntries(struct export *e) -{ - register struct export *n, *p, *next, *prev; - - p = lc_internals.let_next; - while ((p) && (p!=e)){ - prev=p; - p=(struct export*)prev->magic_link; - } - if (p != e) // if (0 != e) - return -1; //japanese BUG for e==p==0 - - n =e->next; - e ->next =0; - - prev->magic_link=e->magic_link; - e ->magic_link=0x41C00000; - - while(n) { - next = n->next; - if (link_client((struct import*)n)){ - restore_imports((struct import*)n); - n->flags=(n->flags & ~2) | 4; - n->next = lc_internals.mda_prev; - lc_internals.mda_prev=n; - } - n=next; - } - - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int RegisterNonAutoLinkEntries(struct export *e) -{ - if ((e == NULL) || (e->magic_link != EXPORT_MAGIC)){ - return -1; - } - e->flags |= FLAG_NO_AUTO_LINK; - e->magic_link = (u32)lc_internals.let_next; // --add as first - lc_internals.let_next = e; // / - FlushIcache(); - - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int QueryLibraryEntryTable(struct export *e) -{ - struct export *p = lc_internals.let_next; - while (p){ - if ((match_name(p, e)) && (match_version_major(p, e)==0)){ - return (int)p->func; - } - p=(struct export*)p->magic_link; - } - return 0; -} - -/////////////////////////////////////////////////////////////////////// -struct tag_LC_internals* GetLibraryEntryTable(){ - return &lc_internals; -} - -/////////////////////////////////////////////////////////////////////// -void _FlushIcache() { - u32 status; - u32 s1450; - u32 s1578; - u32 icache; - u32 *p; - - __asm__ ("mfc0 %0, $12\n" : "=r"(status) : ); - - __asm__ ("mtc0 %0, $12\n" :: "r"(0)); - - s1450 = *(int*)0xBF801450; - *(int*)0xBF801450&= ~1; - *(int*)0xBF801450; - - s1578 = *(int*)0xBF801578; - *(int*)0xBF801578 = 0; - *(int*)0xBF801578; - - icache = *(int*)0xFFFE0130; - *(int*)0xFFFE0130 = 0xC04; - *(int*)0xFFFE0130; - - __asm__ ("mtc0 %0, $12\n" :: "r"(0x10000)); - - for (p=0; p<(u32*)0x400; p+=4) // 4KB instruction cache - *p=0; - - __asm__ ("mtc0 %0, $12\n" :: "r"(0)); - - *(int*)0xFFFE0130 = icache; - *(int*)0xFFFE0130; - *(int*)0xBF801578 = s1578; - *(int*)0xBF801578; - *(int*)0xBF801450 = s1450; - *(int*)0xBF801450; - - __asm__ ("mtc0 %0, $12\n" : : "r"(status) ); -} - -void FlushIcache() { - __asm__ ( - "la $26, %0\n" - "lui $27, 0xA000\n" - "or $26, $27\n" - "jr $26\n" - "nop\n" - : : "i"(_FlushIcache) - ); -} - -/////////////////////////////////////////////////////////////////////// -void _FlushDcache() { - u32 status; - u32 s1450; - u32 s1578; - u32 icache; - u32 *p; - - __asm__ ("mfc0 %0, $12\n" : "=r"(status) : ); - - __asm__ ("mtc0 %0, $12\n" :: "r"(0)); - - s1450 = *(int*)0xBF801450; - *(int*)0xBF801450&= ~1; - *(int*)0xBF801450; - - s1578 = *(int*)0xBF801578; - *(int*)0xBF801578 = 0; - *(int*)0xBF801578; - - icache = *(int*)0xFFFE0130; - *(int*)0xFFFE0130 = 0xC4; - *(int*)0xFFFE0130; - - __asm__ ("mtc0 %0, $12\n" :: "r"(0x10000)); - - for (p=0; p<(u32*)0x100; p+=4) // 1KB data cache - *p=0; - - __asm__ ("mtc0 %0, $12\n" :: "r"(0)); - - *(int*)0xFFFE0130 = icache; - *(int*)0xFFFE0130; - *(int*)0xBF801578 = s1578; - *(int*)0xBF801578; - *(int*)0xBF801450 = s1450; - *(int*)0xBF801450; - - __asm__ ("mtc0 %0, $12\n" : : "r"(status) ); -} - -void FlushDcache(){ - __asm__ ( - "la $26, %0\n" - "lui $27, 0xA000\n" - "or $26, $27\n" - "jr $26\n" - "nop\n" - : : "i"(_FlushDcache) - ); -} - -/////////////////////////////////////////////////////////////////////// -void _SetIcache(u32 val) { - u32 status; - - __asm__ ("mfc0 %0, $12\n" : "=r"(status) : ); - - __asm__ ("mtc0 %0, $12\n" :: "r"(0)); - - *(int*)0xFFFE0130 = val; - *(int*)0xFFFE0130; - - __asm__ ("mtc0 %0, $12\n" : : "r"(status) ); -} - -void _SetCacheCtrl(u32 val) -{ - __asm__ ( - "la $26, %0\n" - "lui $27, 0xA000\n" - "or $26, $27\n" - "jr $26\n" - "nop\n" - : : "i"(_SetIcache) - ); -} - -/////////////////////////////////////////////////////////////////////// -int _ReadModuleHeader(void *image, fileInfo *result) -{ - COFF_HEADER *coffhdr = image; - COFF_scnhdr *section = (COFF_scnhdr*)((char*)image+sizeof(COFF_HEADER));//0x4C - - if ((coffhdr->f_magic==0x162) && //COFF loading - (coffhdr->opthdr.magic == 0x107) && - (coffhdr->f_nscns < 32) && - ((coffhdr->f_opthdr & 0x2FFFF) == 0x20038) && - (section->s_paddr == coffhdr->opthdr.text_start)){ - - if (coffhdr->opthdr.vstamp == 0x7001) - return -1; - result->type =1; - result->entry =coffhdr->opthdr.entry; - result->gp_value =coffhdr->opthdr.gp_value; - result->p1_vaddr =coffhdr->opthdr.text_start; - result->text_size =coffhdr->opthdr.tsize; - result->data_size =coffhdr->opthdr.dsize; - result->bss_size =coffhdr->opthdr.bsize; - result->p1_memsz =coffhdr->opthdr.bss_start+coffhdr->opthdr.bsize-coffhdr->opthdr.text_start; - result->moduleinfo =(moduleInfo*)coffhdr->opthdr.moduleinfo; - return result->type; - }else{ - ELF_HEADER* eh = (ELF_HEADER*)image; - ELF_PHR* ph= (ELF_PHR*)((char*)eh +eh->e_phoff); - //if ((eh->e_ident[EI_CLASS] != ELFCLASS32) || - //(eh->e_ident[EI_DATA]) != ELFDATA2LSB)) return -1;//break - if( *(u16*)(eh->e_ident+4) != 0x101 ) - return -1; - if (eh->e_machine != EM_MIPS) - return -1;//break - if (eh->e_phentsize != sizeof(ELF_PHR)) - return -1;//break - if (eh->e_phnum != 2) - return -1;//break - if (ph[0].p_type != PT_SCE_IOPMOD) - return -1;//break - if (eh->e_type != ET_SCE_IOPRELEXEC){ - if (eh->e_type != eh->e_phnum )//ET_EXEC) - return -1;//only - result->type=3; - }else - result->type=4; - ELF_IOPMOD* im= (ELF_IOPMOD*)((char*)image + ph[0].p_offset); - result->entry =im->entry; - result->gp_value=im->gp_value; - result->p1_vaddr=ph[1].p_vaddr; - result->text_size=im->text_size; - result->data_size=im->data_size; - result->bss_size=im->bss_size; - result->p1_memsz=ph[1].p_memsz; - result->moduleinfo=( moduleInfo*)im->moduleinfo; - return result->type; - } - return result->type=-1; -} - -#define MODULE_TYPE_COFF 1 -#define MODULE_TYPE_2 2 -#define MODULE_TYPE_EXEC 3 -#define MODULE_TYPE_IOPRELEXEC 4 - -/////////////////////////////////////////////////////////////////////// -void setImageInfo(fileInfo *fi, imageInfo *ii) -{ - ii->next =0; - ii->name =NULL; - ii->version =0; - ii->flags =0; - ii->modid =0; - if ((int)fi->moduleinfo != -1){ - ii->name =fi->moduleinfo->name; - ii->version =fi->moduleinfo->version; - } - ii->entry =fi->entry; - ii->gp_value =fi->gp_value; - ii->p1_vaddr =fi->p1_vaddr; - ii->text_size =fi->text_size; - ii->data_size =fi->data_size; - ii->bss_size =fi->bss_size; -} - -/////////////////////////////////////////////////////////////////////// -void load_type_1(COFF_HEADER *image){ - SHDR* s0=(SHDR*)( (char*)image + *(int*)((char*)image+0x60) ); - lc_memcpy(s0, image->opthdr.text_start, image->opthdr.tsize); - lc_memcpy((char*)s0+image->opthdr.tsize, image->opthdr.data_start, image->opthdr.dsize); - if (image->opthdr.bss_start && image->opthdr.bsize) - lc_zeromem((void*)image->opthdr.bss_start, image->opthdr.bsize/4); -} - -/////////////////////////////////////////////////////////////////////// -void load_type_3(void *image){ - ELF_PHR *ph=(ELF_PHR*)((char*)image+((ELF_HEADER*)image)->e_phoff); - lc_memcpy(image+ph[1].p_offset, ph[1].p_vaddr, ph[1].p_filesz); - if (ph[1].p_filesz < ph[1].p_memsz) - lc_zeromem(ph[1].p_vaddr+ph[1].p_filesz, - (ph[1].p_memsz-ph[1].p_filesz)/4); -} - -/////////////////////////////////////////////////////////////////////// -#define R_MIPS_32 2 -#define R_MIPS_26 4 -#define R_MIPS_HI16 5 -#define R_MIPS_LO16 6 - -void load_type_4(ELF_HEADER *image, fileInfo *fi) -{ - ELF_PHR *ph=(ELF_PHR*)((char*)image+image->e_phoff); - ELF_SHR* sh = (ELF_SHR*)((char*)image+image->e_shoff); - ELF_REL* rel; - int i,j,scount; - u32* b, *b2, tmp; - - //ph[0] - .iopmod, skip - fi->entry += fi->p1_vaddr; - fi->gp_value += fi->p1_vaddr; - if ((int)fi->moduleinfo != -1) - fi->moduleinfo = (moduleInfo*)((int)fi->moduleinfo + fi->p1_vaddr); - lc_memcpy((char*)image+ph[1].p_offset, fi->p1_vaddr, ph[1].p_filesz); - - if (ph[1].p_filesz < ph[1].p_memsz) { - lc_zeromem(ph[1].p_vaddr+ph[1].p_filesz+fi->p1_vaddr, (ph[1].p_memsz-ph[1].p_filesz)); - } - - for (i=1; ie_shnum; i++) { - if (sh[i].sh_type==SHT_REL) { - ELF_REL* rel =(ELF_REL*)(sh[i].sh_offset + (char*)image); - scount=sh[i].sh_size / sh[i].sh_entsize; - for (j=0; jp1_vaddr + rel[j].r_offset); - switch((u8)rel[j].r_info){ - case R_MIPS_LO16: - *b=(*b & 0xFFFF0000) | (((*b & 0x0000FFFF) + fi->p1_vaddr) & 0xFFFF); - break; - case R_MIPS_32: - *b+=fi->p1_vaddr; - break; - case R_MIPS_26: - *b = (*b & 0xfc000000) | (((*b & 0x03ffffff) + (fi->p1_vaddr >> 2)) & 0x03ffffff); - break; - case R_MIPS_HI16: - b2 =(u32*)(rel[j+1].r_offset + fi->p1_vaddr); - ++j; - - tmp = (*b << 16) + (int)(*(s16*)b2) + fi->p1_vaddr; - *b = (*b&0xffff0000) | ((((tmp>>15)+1)>>1)&0xffff); - *b2 = (*b2&0xffff0000) | (tmp&0xffff); - break; - } - } - } - } -} - -int _LoadModule(void *image, fileInfo *fi) -{ - u32* ptr; - int i; - switch (fi->type){ - case MODULE_TYPE_COFF: load_type_1(image); break; - case MODULE_TYPE_EXEC: load_type_3(image); break; - case MODULE_TYPE_IOPRELEXEC: load_type_4(image, fi); break; - default: return -1; - } - - setImageInfo(fi, (imageInfo*)(fi->p1_vaddr-0x30)); - - return 0; -} - -///////////////////////////////////////////////////////////////////////[OK] -int lc_memcpy(void *src,void *dest,int len){ - char* _src = (char*)src; - char* _dst = (char*)dest; - for (len=len; len>0; len--) - *_dst++=*_src++; -} - -///////////////////////////////////////////////////////////////////////[OK] -int lc_zeromem(void *addr,int len){ - for (; len>0; len--) *(char*)addr++=0; -} - -int lc_strlen(char *s) -{ - int len; - if (s==NULL) return 0; - for (len=0; *s++; len++); - return len; -} - -int recursive_set_a2(int* start, int* end, int val) -{ - *start++ = val; - if( start < end ) - return recursive_set_a2(start, end, val); - return 0; -} - -void* lc_memcpy_overlapping(char *dst,char *src,int len){ - if (dst==NULL) return 0; - - if (dst>=src) - while(--len>=0) - *(dst+len)=*(src+len); - else - while (len-->0) - *dst++=*src++; - - return dst; -} - -//////////////////////////////entrypoint/////////////////////////////// -void _start(BOOT_PARAMS *init) { - *(int*)0xFFFE0130 = 0x1e988; - __asm__ ( - "addiu $26, $0, 0\n" - "mtc0 $26, $12\n"); - //"move $fp, %0\n" - //"move $sp, %0\n" - //: : "r"((init->ramMBSize << 20) - 0x40)); - __asm__ ( - "j loadcore_start\n" - ); -} - -extern void* _ftext, *_etext, *_end; -typedef int (*IopEntryFn)(u32,void*,void*,void*); - -void loadcore_start(BOOT_PARAMS *pInitParams) -{ - fileInfo fi; - void (*entry)(); - u32 offset; - u32 status = 0x401; - int bm; - int i; - void** s0; // pointer in module list to current module? - BOOT_PARAMS params; - u32 s1, s2, s3, sp, a2; - - _dprintf("%s\n", __FUNCTION__); - - // Write 0x401 into the co-processor status register? - // This enables interrupts generally, and disables (masks) them all except hardware interrupt 0? - - lc_memcpy(pInitParams,¶ms,sizeof(BOOT_PARAMS)); - BOOTMODE_END = BOOTMODE_START = bootmodes; - - //_dprintf("module: %x\n", params.firstModuleAddr); - - lc_internals.let_next = (struct export*)params.firstModuleAddr; - lc_internals.let_prev = (struct export*)params.firstModuleAddr; - lc_internals.let_next->next = 0; - lc_internals.module_count = 2; // SYSMEM + LOADCORE - lc_internals.mda_prev = lc_internals.mda_next = NULL; - lc_internals.module_index = 3; // next available index - - for (i=0; i<17; i++){ - bootmodes[i]=0; - } - bootmodes_size=0; - - bm = params.bootInfo | 0x00040000; - RegisterBootMode((struct bootmode*)&bm); - - lc_internals.image_info = (imageInfo*)((u32)lc_internals.let_prev - 0x30); - lc_internals.image_info->modid = 1; // SYSMEM is the first module - lc_internals.image_info->next = (u32)&_ftext - 0x30; - ((imageInfo*)lc_internals.image_info->next)->modid = 2; // LOADCORE is the second module - - // find & fix LOADCORE imports (to SYSMEM) - _LinkImports((u32*)&_ftext, (u32)&_etext - (u32)&_ftext); - - RegisterLibraryEntries(&loadcore_stub); - - // reserve LOADCORE memory - AllocSysMemory(2, (u32)((u32)&_end - (((u32)&_ftext - 0x30) >> 8 << 8)), (void*)((((u32)&_ftext - 0x30) >> 8 << 8) & 0x1FFFFFFF)); - - if (params.pos) - params.pos = (u32)AllocSysMemory(2, params.size, (void*)params.pos); - - sp=(u32)__builtin_alloca(0x10); - s0 = (void**)((sp - 0xDF0) & 0x1FFFFF00);//=0x001ff100 - recursive_set_a2((int*)s0, (void*)(sp+0x10), 0x11111111); - if ((u32)s0 < QueryMemSize()) - AllocSysMemory(2, QueryMemSize() - (u32)s0, s0); - - if (params.udnlString){ - int v0 = lc_strlen(params.udnlString); - int* v1 = (int*)__builtin_alloca((v0 + 8 + 8) >> 3 << 3); - lc_memcpy_overlapping((char*)&v1[6], params.udnlString, v0+1); - params.udnlString = (char*)&v1[6]; - v1[4] = 0x01050000; - v1[5] = (int)&v1[6]; - RegisterBootMode((struct bootmode*)&v1[4]); // BTUPDATER bootmode 5 - } - - a2 = (params.numConfLines+1) * 4; - s0 = __builtin_alloca((a2 + 7) >> 3 << 3) + 0x10; - lc_memcpy_overlapping((char*)s0, (char*)params.moduleAddrs, a2); //0x30020 - - s1 = 0; - params.moduleAddrs = (u32**)s0; - s2 = (u32)__builtin_alloca(params.numConfLines << 3) + 0x10; - place = (u32*)s2; - *place = 0; - i = -1; - s3 = 1; - - _dprintf("loading modules: %d\n", params.numConfLines); - s0 += 2; // skip first two: SYSMEM, LOADCORE - for (; *s0; s0+=1) { - if ((u32)*s0 & 1){ - if (((u32)*s0 & 0xF) == s3) - s1 = (u32)*s0>>2; - }else{ - i += 1; - i &= 0xF; - - _dprintf("load module from %x\n", *s0); - switch(_ReadModuleHeader(*s0, &fi)){ - case MODULE_TYPE_COFF: - case MODULE_TYPE_EXEC: - a2 = ((fi.p1_vaddr - 0x30) >> 8 << 8) & 0x1FFFFFFF; - if (NULL == AllocSysMemory(2, fi.p1_memsz + fi.p1_vaddr - a2, (void*)a2)) - goto HALT; - break; - - case MODULE_TYPE_2: - case MODULE_TYPE_IOPRELEXEC: - if (fi.p1_vaddr = (u32)((s1 == 0) ? - AllocSysMemory(0, fi.p1_memsz+0x30, 0) : - AllocSysMemory(2, fi.p1_memsz+0x30, (void*)s1)) ) - fi.p1_vaddr += 0x30; - else - goto HALT; - break; - - default: - _dprintf("could not find module at %x\n", *s0); - goto HALT; - } - - _LoadModule(*s0, &fi); - _dprintf("loading module %s: at offset %x, memsz=%x, type=%x, entry=%x\n", fi.moduleinfo->name, fi.p1_vaddr, fi.p1_memsz, fi.type, fi.entry); - - if (0 == _LinkImports((u32*)fi.p1_vaddr, fi.text_size)) { - - FlushIcache(); - __asm__("move $gp, %0\n" : : "r"(fi.gp_value)); - // call the entry point - s1 = ((IopEntryFn)fi.entry)(0, NULL, s0, NULL); - - if ((s1 & 3) == 0){ - _LinkModule((imageInfo*)(fi.p1_vaddr - 0x30)); - if (s1 & ~3) - _RegisterBootupCBFunc((int (*)(int *, int))(s1 & ~3), BOOTUPCB_NORMAL, 0); - }else{ - _UnlinkImports((void*)fi.p1_vaddr, fi.text_size); - FreeSysMemory((void*)((fi.p1_vaddr - 0x30) >> 8 << 8)); - } - }else { - FreeSysMemory((void*)((fi.p1_vaddr - 0x30) >> 8 << 8)); - } - - s1 = 0; - } - } - - if (params.pos) - FreeSysMemory((void*)params.pos); - - for (i=BOOTUPCB_FIRST; iname[0] == 'R' && - dir_entry->name[1] == 'E' && - dir_entry->name[2] == 'S' && - dir_entry->name[3] == 'E' && - dir_entry->name[4] == 'T' && - dir_entry->name[5] == 0 && - (ROUND_UP(dir_entry->fileSize,16) == offset) ) - { - romDirInfo->romPtr = (u32)searchStartAddr; // start of rom - romDirInfo->romdirPtr = dir_entry; // start of romdir structure - romDirInfo->extinfoPtr = (u32)dir_entry + dir_entry[1].fileSize; // start of extinfo - return romDirInfo; - } - - dir_entry++; - offset += sizeof(ROMDIR_ENTRY); - } - - // not found - romDirInfo->romdirPtr = NULL; - return NULL; -} - -// find a file in the romdir table and return info about it -// -// args: info about romdir to search through -// filename to search for -// structure to get info about file into -// returns: a pointer to fileinfo if successful -// NULL otherwise -ROMFILE_INFO* searchFileInRom(const ROMDIR_INFO* romdirInfo, const char* filename, ROMFILE_INFO* fileinfo) -{ - register ROMDIR_ENTRY* dir_entry; - register ext_offset=0, file_offset=0; - int i; - - for (dir_entry = romdirInfo->romdirPtr; dir_entry->name[0]; dir_entry++) { - - for(i = 0; i < 10; ++i) { - if( filename[i] == 0 ) - break; - if( dir_entry->name[i] != filename[i] ) { - i = -1; - break; - } - } - - if (i > 0 ) { - fileinfo->entry = dir_entry; - fileinfo->fileData = file_offset + romdirInfo->romPtr; // address of file in rom - fileinfo->extData = (u32)NULL; // address of extinfo in rom - - if (dir_entry->extSize) - fileinfo->extData = ext_offset + romdirInfo->extinfoPtr; // address of extinfo in rom - return fileinfo; - } - - file_offset += ROUND_UP(dir_entry->fileSize,16); - ext_offset += dir_entry->extSize; - } - - // error - file not found - return NULL; -} - -// gets a hex number from *addr and updates the pointer -// -// args: pointer to string buffer containing a hex number -// returns: the value of the hex number -u32 getHexNumber(char** addr) -{ - register char *p; //a1 - register u32 h = 0; //a2; - - for (p=*addr; *p >= '0'; p++) - { - int num; - if(*p <= '9') num = *p - '0'; - else if(*p >= 'a') num = *p - 'a' + 10; - else num = *p - 'A' + 10; - - h = h*16 + num; - } - - *addr = p; - return h; -} diff --git a/unfree/fps2bios/kernel/iopload/sifcmd/Makefile b/unfree/fps2bios/kernel/iopload/sifcmd/Makefile deleted file mode 100644 index 5e33e1c6f..000000000 --- a/unfree/fps2bios/kernel/iopload/sifcmd/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/SIFCMD - -IOP_INCS += -I../include - -IOP_OBJS = sifcmd.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_sifman.o ../libkernel/iop_thbase.o ../libkernel/iop_thevent.o ../libkernel/iop_stdio.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/sifcmd/sifcmd.c b/unfree/fps2bios/kernel/iopload/sifcmd/sifcmd.c deleted file mode 100644 index 5a279e578..000000000 --- a/unfree/fps2bios/kernel/iopload/sifcmd/sifcmd.c +++ /dev/null @@ -1,798 +0,0 @@ -//[module] SIFCMD -//[processor] IOP -//[type] ELF-IRX -//[name] IOP_SIF_rpc_interface -//[version] 0x101 -//[memory map] -//[handlers] -//[entry point] sifcmd_start, sifcmd_stub -//[made by] [RO]man (roman_ps2dev@hotmail.com) - -#include "kloadcore.h" -#include "kintrman.h" -#include "ksifman.h" -#include "kthbase.h" -#include "ksifcmd.h" -#include "ksifman.h" - -#define _dprintf(fmt, args...) \ - __printf("sifcmd: " fmt, ## args) - -int sifInitRpc=0; - -// CMD data -char sif1_rcvBuffer[8*16]; //8 qwords -char b[4*16]; //not used -struct tag_cmd_common { - char *sif1_rcvBuffer, //+00 - *b, //+04 - *saddr; //+08 - SifCmdData *sysCmdBuffer; //+0C - int sysCmdBufferSize; //+10 - SifCmdData *cmdBuffer; //+14 - int cmdBufferSize, //+18 - *Sreg, //+1C - systemStatusFlag; //+20 - void (*func)(int); //+24 - int param, //+28 - _pad; //+2C -} cmd_common; //=30 -SifCmdData sysCmds[32]; -int Sreg[32]; - -// RPC data -int bufx[512], bufy[512]; -struct tag_rpc_common{ - int pid; - RPC_PACKET *paddr; - int size; - RPC_PACKET *paddr2; - int size2; - void *next; - int count; - int base; - void *queue; - int _pad0, - _pad1, - _pad2; -} rpc_common; - - -int _start(); - -/////////////////////////////////////////////////////////////////////// -//////////////////////////// CMD ////////////////////////////////////// -/////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////// -void cmd80000001_SET_SREG(SifCmdSRData *packet, struct tag_cmd_common *common) { - common->Sreg[packet->rno]=packet->value; -} - -/////////////////////////////////////////////////////////////////////// -void cmd80000000_CHANGE_SADDR(SifCmdCSData *packet, struct tag_cmd_common *common) { - common->saddr=packet->newaddr; -} - -///////////////////////////////////////////////////////////////////////[06] -int SifGetSreg(int index){ - return Sreg[index]; -} - -///////////////////////////////////////////////////////////////////////[07] -int SifSetSreg(int index, unsigned int value){ - return Sreg[index]=value; -} - -/////////////////////////////////////////////////////////////////////// -void *getCmdCommon(){ - return &cmd_common; -} - -/////////////////////////////////////////////////////////////////////// -void cmd80000002_INIT_CMD(SifCmdCSData *packet, struct tag_cmd_common *common){ - __printf("cmd80000002_INIT_CMD\n"); - if (packet->hdr.opt==0){ - iSetEventFlag(common->systemStatusFlag, 0x100); - SifSetEEIOPflags(0x20000); - common->saddr=packet->newaddr; - }else - iSetEventFlag(common->systemStatusFlag, 0x800); -} - -///////////////////////////////////////////////////////////////////////[02] -int SifDeinitCmd(){ - int x; - DisableIntr(INT_DMA10, &x); - ReleaseIntrHandler(INT_DMA10); - SifDeinit(); - return 0; -} - -///////////////////////////////////////////////////////////////////////[04] -void SifInitCmd(){ - __printf("iopSifInitCmd\n"); - SifSetIOPEEflags(0x20000); - WaitEventFlag(cmd_common.systemStatusFlag, 0x100, 0, 0); -} - -///////////////////////////////////////////////////////////////////////[05] -void SifExitCmd(){ - int x; - DisableIntr(INT_DMA10, &x); - ReleaseIntrHandler(INT_DMA10); -} - -///////////////////////////////////////////////////////////////////////[08] -SifCmdData *SifSetCmdBuffer(SifCmdData *cmdBuffer, int size){ - register SifCmdData *old; - old=cmd_common.cmdBuffer; - cmd_common.cmdBuffer=cmdBuffer; - cmd_common.cmdBufferSize=size; - return old; -} - -///////////////////////////////////////////////////////////////////////[09] -SifCmdData *SifSetSysCmdBuffer(SifCmdData *sysCmdBuffer, int size){ - register SifCmdData *old; - old=cmd_common.sysCmdBuffer; - cmd_common.sysCmdBuffer=sysCmdBuffer; - cmd_common.sysCmdBufferSize=size; - return old; -} - -///////////////////////////////////////////////////////////////////////[0A] -void SifAddCmdHandler(int pos, cmdh_func f, void *data){ - if (pos<0){ - cmd_common.sysCmdBuffer[pos & 0x1FFFFFFF].func=f; - cmd_common.sysCmdBuffer[pos & 0x1FFFFFFF].data=data; - }else{ - cmd_common.cmdBuffer [pos & 0x1FFFFFFF].func=f; - cmd_common.cmdBuffer [pos & 0x1FFFFFFF].data=data; - } -} - -///////////////////////////////////////////////////////////////////////[0B] -void SifRemoveCmdHandler(unsigned int pos){ - if (pos<0) - cmd_common.sysCmdBuffer[pos & 0x1FFFFFFF].func=0; - else - cmd_common.cmdBuffer [pos & 0x1FFFFFFF].func=0; -} - -/////////////////////////////////////////////////////////////////////// -unsigned int sendCmd(unsigned int pos, int mode, SifCmdHdr *cp, int ps, void *src, void *dst, int size){ - u32 x; - struct sifman_DMA dma[2]; - register int count, y; - - if (ps<16 || ps>112) return 0; - - count=0; - if (size>0){ - count=1; - dma[0].addr=dst; - dma[0].size=size; - dma[0].attr=0; - dma[0].data=src; - cp->daddr=(u32)dst; - cp->dsize=size; - }else{ - cp->daddr=0; - cp->dsize=0; - } - count++; - cp->psize=ps; - cp->fcode=pos; - dma[count-1].data=cp; - dma[count-1].attr=SIF_DMA_INT_O; //calls SIF0 handler - dma[count-1].size=ps; //on EE side after transfer;) - dma[count-1].addr=cmd_common.saddr; - if (mode & 1) //interrupt mode - return SifSetDma(dma, count); - else{ - CpuSuspendIntr(&x); - y=SifSetDma(dma, count); - CpuResumeIntr(x); - return y; - } -} - -///////////////////////////////////////////////////////////////////////[0C] -unsigned int SifSendCmd(unsigned int pos, void *cp, int ps, void *src, void *dst, int size){ - return sendCmd(pos, 0, cp, ps, src, dst, size); -} - -///////////////////////////////////////////////////////////////////////[0D] -unsigned int iSifSendCmd(unsigned int pos, void *cp, int ps, void *src, void *dst, int size){ - return sendCmd(pos, 1, cp, ps, src, dst, size); -} - -///////////////////////////////////////////////////////////////////////[1A] -void SifSet1CB(void *func, int param){ - cmd_common.func =func; - cmd_common.param=param; -} - -///////////////////////////////////////////////////////////////////////[1B] -void SifReset1CB(){ - cmd_common.func =0; - cmd_common.param=0; -} - -/////////////////////////////////////////////////////////////////////// -int SIF1_handler(void *common){ - int buf[112/4]; - register int i, ps; - register SifCmdData *scd; - SifCmdHdr *packet; - struct tag_cmd_common *c = (struct tag_cmd_common *)common; - - if (c->func) - c->func(c->param); - - packet=(SifCmdHdr*)c->sif1_rcvBuffer; - - if ((ps=packet->psize & 0xFF)==0){ - SifSetDChain(); - return 1; - } - packet->psize=0; - - ps=(ps+3<0 ? ps+6 : ps+3)/4; - for (i=0; ifcode<0){ - if (packet->fcode & 0x7FFFFFFF>=c->sysCmdBufferSize) - return 1; - scd=&c->sysCmdBuffer[packet->fcode & 0x7FFFFFFF]; - }else{ - if (packet->fcode>=c->cmdBufferSize) - return 1; - scd=&c->cmdBuffer[packet->fcode]; - } - if (scd->func) - scd->func(packet, scd->data); - - return 1; -} - -/////////////////////////////////////////////////////////////////////// -//////////////////////////// RPC ////////////////////////////////////// -/////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////// -RPC_PACKET *rpc_get_packet(struct tag_rpc_common *common){ - u32 x; - register int pid, i; - RPC_PACKET *packet; - - CpuSuspendIntr(&x); - - for (i=0, packet=common->paddr; isize; i++) - if (packet[i].rec_id & 2==0) goto found; - for (i=0, packet=common->paddr2; isize2; i++) - if (packet[i].rec_id & 2==0) goto found; - - CpuResumeIntr(x); - return 0; - -found: - packet[i].rec_id |= 2; - pid=++common->pid; - if (pid == 1) - common->pid++; - packet[i].pid=pid; - packet[i].paddr=&packet[i]; - CpuResumeIntr(x); - return &packet[i]; -} - -/////////////////////////////////////////////////////////////////////// -void rpc_free_packet(RPC_PACKET *packet){ - packet->pid = 0; - packet->rec_id &= 0xFFFFFFFD; //~2 -} - -/////////////////////////////////////////////////////////////////////// -RPC_PACKET *rpc_get_fpacket(struct tag_rpc_common *common){ - register int i; - - i=common->base % common->count; - common->base=i+1; - return (RPC_PACKET*)(((u8*)common->next)+i*64); -} - -/////////////////////////////////////////////////////////////////////// -void cmd80000008_END(RPC_PACKET_END *packet, struct tag_rpc_common *common){ - if (packet->command==0x8000000A){ - if (packet->client->func) - packet->client->func(packet->client->param); - }else - if (packet->command==0x80000009){ - packet->client->server=packet->server; - packet->client->buff =packet->buff; - packet->client->cbuff =packet->cbuff; - } - - if (packet->client->hdr.tid>=0) - iWakeupThread(packet->client->hdr.tid); - - rpc_free_packet(packet->client->hdr.pkt_addr); - packet->client->hdr.pkt_addr=0; -} - -/////////////////////////////////////////////////////////////////////// -void cmd8000000C_RDATA(RPC_PACKET_RDATA *packet, struct tag_rpc_common *common){ - RPC_PACKET_END *epacket; - - epacket = (RPC_PACKET_END *)rpc_get_fpacket(common); - - epacket->packet.paddr = packet->packet.paddr; - epacket->command = 0x8000000C; - epacket->client = packet->client; - - iSifSendCmd(0x80000008, epacket, 0x40, packet->src, packet->dst, packet->size); -} - -///////////////////////////////////////////////////////////////////////[17] -int SifGetOtherData(struct sifcmd_RPC_RECEIVE_DATA *rd, void *src, void *dst, int size, int mode){ - RPC_PACKET_RDATA *packet; - - if ((packet=(RPC_PACKET_RDATA *)rpc_get_packet(&rpc_common))==0) - return -1; - - rd->hdr.pkt_addr=packet; - rd->hdr.rpc_id =packet->packet.pid; - packet->packet.paddr=packet; - packet->client=(struct sifcmd_RPC_CLIENT_DATA*)rd; - packet->src=src; - packet->dst=dst; - packet->size=size; - - if (mode & 1==0){ - rd->hdr.tid=GetThreadId(); - if (SifSendCmd(0x8000000C, packet, 0x40, 0, 0, 0)==0) - return -2; - SleepThread(); - }else{ //async - rd->hdr.tid=-1; - if (SifSendCmd(0x8000000C, packet, 0x40, 0, 0, 0)==0) - return -2; - } - return 0; -} - -/////////////////////////////////////////////////////////////////////// -struct sifcmd_RPC_SERVER_DATA *search_svdata(u32 command, struct tag_rpc_common *common){ - struct sifcmd_RPC_SERVER_DATA *q; - struct sifcmd_RPC_SERVER_DATA *s; - - for (q=common->queue; q; q=q->next) { - for (s=q->link; s; s=s->link) { - if (s->command==command) - return s; - } - } - return 0; -} - -/////////////////////////////////////////////////////////////////////// -void cmd80000009_BIND(RPC_PACKET_BIND *packet, struct tag_rpc_common *common){ - RPC_PACKET_END *epacket; - struct sifcmd_RPC_SERVER_DATA *s; - - epacket = (RPC_PACKET_END *)rpc_get_fpacket(common); - - epacket->packet.paddr=packet->packet.paddr; - epacket->command=0x80000009; - epacket->client=packet->client; - - s = search_svdata(packet->fno, common); - if (s == NULL){ - epacket->server=0; - epacket->buff =0; - epacket->cbuff =0; - }else{ - epacket->server=s; - epacket->buff =s->buff; - epacket->cbuff =s->cbuff; - } - iSifSendCmd(0x80000008, epacket, 0x40, 0, 0, 0); -} - -///////////////////////////////////////////////////////////////////////[0F] -int SifBindRpc(struct sifcmd_RPC_CLIENT_DATA *client, unsigned int number, unsigned int mode) { - RPC_PACKET_BIND *packet; - - client->command=0; - client->server=0; - - packet = (RPC_PACKET_BIND *)rpc_get_packet(&rpc_common); - if (packet==NULL) return -1; - - client->hdr.pkt_addr = packet; - client->hdr.rpc_id = packet->packet.pid; - packet->packet.paddr = packet; - packet->client = client; - packet->fno = number; - - if (mode & 1==0){ - client->hdr.tid=GetThreadId(); - if (SifSendCmd(0x80000009, packet, 0x40, 0, 0, 0)==0) - return -2; - SleepThread(); - }else{ //async - client->hdr.tid=-1; - if (SifSendCmd(0x80000009, packet, 0x40, 0, 0, 0)==0) - return -2; - } - return 0; -} - -/////////////////////////////////////////////////////////////////////// -void cmd8000000A_CALL(RPC_PACKET_CALL *packet, struct tag_rpc_common *common){ - struct sifcmd_RPC_DATA_QUEUE *qd; - - qd = packet->server->base; - if (qd->start==0) qd->start=packet->server; - else qd->end->link=packet->server; - qd->end=packet->server; - packet->server->pkt_addr=packet->packet.packet.paddr; - packet->server->client=packet->packet.client; - packet->server->fno=packet->packet.fno; - packet->server->size=packet->size; - packet->server->receive=packet->receive; - packet->server->rsize=packet->rsize; - packet->server->rmode=packet->rmode; - if ((qd->key>=0) && (qd->active==0)) - iWakeupThread(qd->key); -} - -///////////////////////////////////////////////////////////////////////[10] -int SifCallRpc(struct sifcmd_RPC_CLIENT_DATA *client, unsigned int fno, unsigned int mode, void *send, int ssize, void *receive, int rsize, void (*end_func)(void*), void *end_para){ - RPC_PACKET_CALL *packet; - - if ((packet=(RPC_PACKET_CALL *)rpc_get_packet(&rpc_common))==0) - return -1; - client->hdr.pkt_addr=(void*)packet; - client->func = end_func; - client->param = end_para; - client->hdr.rpc_id= packet->packet.packet.pid; - - packet->packet.packet.paddr = packet; - packet->packet.client = client; - packet->packet.fno = fno; - packet->size = ssize; - packet->receive= receive; - packet->rsize = rsize; - packet->server = client->server; - - if (mode & 1){ - packet->rmode=(end_func!=0); - client->hdr.tid=-1; - if (SifSendCmd(0x8000000A, packet, 0x40, send, client->buff, ssize)) - return 0; - return -2; - }else{ - packet->rmode=1; - client->hdr.tid=GetThreadId(); - if (SifSendCmd(0x8000000A, packet, 0x40, send, client->buff, ssize)==0) - return -2; - SleepThread(); - return 0; - } -} - -///////////////////////////////////////////////////////////////////////[12] -int SifCheckStatRpc(struct sifcmd_RPC_HEADER *rd){ - RPC_PACKET *packet = (RPC_PACKET*)rd->pkt_addr; - return (rd->pkt_addr && - (rd->rpc_id==packet->pid) && - (packet->rec_id & 2)); -} - -///////////////////////////////////////////////////////////////////////[13] -void SifSetRpcQueue(struct sifcmd_RPC_DATA_QUEUE *qd, int key){ - u32 x; - register struct sifcmd_RPC_DATA_QUEUE *q, *i; - - CpuSuspendIntr(&x); - qd->key=key; - qd->active=0; - qd->link=0; - qd->start=0; - qd->end=0; - qd->next=0; - q = (struct sifcmd_RPC_DATA_QUEUE *)&rpc_common.queue; - if (q) { - for (i=q->next; i; i=q->next) q=q->next; - } - rpc_common.queue = qd; - CpuResumeIntr(x); -} - -///////////////////////////////////////////////////////////////////////[11] -void SifRegisterRpc(struct sifcmd_RPC_SERVER_DATA *sd, u32 command, - rpch_func func, void *buff, - rpch_func cfunc, void *cbuff, - struct sifcmd_RPC_DATA_QUEUE *qd) { - u32 x; - register struct sifcmd_RPC_DATA_QUEUE *q, *i; - - CpuSuspendIntr(&x); - sd->command=command; - sd->func=func; - sd->buff=buff; - sd->next=0; - sd->link=0; - sd->cfunc=cfunc; - sd->cbuff=cbuff; - sd->base=qd; - - if (qd->link==0) - qd->link=sd; - else{ - for (q=qd->link, i=q->link; i; i=q->link) - q=q->link; - q->link=sd; - } - CpuResumeIntr(x); -} - -///////////////////////////////////////////////////////////////////////[18] -struct sifcmd_RPC_SERVER_DATA *SifRemoveRpc(struct sifcmd_RPC_SERVER_DATA *sd, struct sifcmd_RPC_DATA_QUEUE *qd){ - u32 x; - register struct sifcmd_RPC_SERVER_DATA *s; - - CpuSuspendIntr(&x); - - if ((s=qd->link)==sd) - qd->link=s->link; - else - for ( ; s; s=s->link) - if (s->link==sd){ - s->link=s->link->link; - break; - } - CpuResumeIntr(x); - return s; -} - -///////////////////////////////////////////////////////////////////////[19] -struct sifcmd_RPC_DATA_QUEUE *SifRemoveRpcQueue(struct sifcmd_RPC_DATA_QUEUE *qd){ - u32 x; - register struct sifcmd_RPC_DATA_QUEUE *q; - - CpuSuspendIntr(&x); - - q=rpc_common.queue; - if (q==qd) { - rpc_common.queue=q->next; - } else { - for (; q; q=q->next) { - if (q->next==qd){ - q->next=q->next->next; - break; - } - } - } - CpuResumeIntr(x); - return q; -} - -///////////////////////////////////////////////////////////////////////[14] -struct sifcmd_RPC_SERVER_DATA *SifGetNextRequest(struct sifcmd_RPC_DATA_QUEUE *qd){ - u32 x; - register struct sifcmd_RPC_SERVER_DATA *s; - - CpuSuspendIntr(&x); - - if ((s=qd->start)==0) - qd->active=0; - else{ - qd->active=1; - qd->start=qd->start->next; - } - - CpuResumeIntr(x); - return s; -} - -///////////////////////////////////////////////////////////////////////[15] -void SifExecRequest(struct sifcmd_RPC_SERVER_DATA *sd){ - u32 x; - register int size, id, count, i; - register void *buff; - RPC_PACKET_END *epacket; - struct sifman_DMA dma[2]; - - size=0; - if (buff=sd->func(sd->fno, sd->buff, sd->size)) - size=sd->rsize; - - CpuSuspendIntr(&x); - epacket=(RPC_PACKET_END *)rpc_get_fpacket(&rpc_common); - CpuResumeIntr(x); - - epacket->command=0x8000000A; - epacket->client=sd->client; - count=0; - if (sd->rmode){ - while (SifSendCmd(0x80000008, epacket, 0x40, buff, sd->receive, size)==0); - return; - }else{ - epacket->packet.pid=0; - epacket->packet.rec_id=0; - if (size>0){ - count=1; - dma[count-1].data=buff; - dma[count-1].size=size; - dma[count-1].attr=0; - dma[count-1].addr=sd->receive; - } - count++; - dma[count-1].data=epacket; - dma[count-1].size=0x40; - dma[count-1].attr=0; - dma[count-1].addr=sd->pkt_addr; - do{ - CpuSuspendIntr(&x); - id=SifSetDma(dma, count); - CpuResumeIntr(x); - if (id) break; - i=0xFFFF; do --i; while (i!=-1); - } while (id==0); - } -} - -///////////////////////////////////////////////////////////////////////[16] -void SifRpcLoop(struct sifcmd_RPC_DATA_QUEUE *qd){ - register struct sifcmd_RPC_SERVER_DATA *s; - - do{ - if (s=SifGetNextRequest(qd)) - SifExecRequest(s); - else - SleepThread(); - } while (1); -} - -///////////////////////////////////////////////////////////////////////[0E] -void SifInitRpc(int mode){ - u32 x; - _dprintf("%s\n", __FUNCTION__); - - SifInitCmd(); - CpuSuspendIntr(&x); - - if (sifInitRpc){ - CpuResumeIntr(x); - }else{ - sifInitRpc=1; - rpc_common.paddr=(RPC_PACKET*)bufx; - rpc_common.size=32; - rpc_common.paddr2=0; - rpc_common.size2=0; - rpc_common.next=(RPC_PACKET*)bufy; - rpc_common.count=32; - rpc_common.base=0; - rpc_common.pid=1; - - SifAddCmdHandler(0x80000008, (cmdh_func)cmd80000008_END, &rpc_common); - SifAddCmdHandler(0x80000009, (cmdh_func)cmd80000009_BIND, &rpc_common); - SifAddCmdHandler(0x8000000A, (cmdh_func)cmd8000000A_CALL, &rpc_common); - SifAddCmdHandler(0x8000000C, (cmdh_func)cmd8000000C_RDATA, &rpc_common); - - CpuResumeIntr(x); - - ((SifCmdSRData*)bufx)->rno =0; - ((SifCmdSRData*)bufx)->value=1; - SifSendCmd(0x80000001, (void*)bufx, sizeof(SifCmdSRData), 0, 0, 0); - } - WaitEventFlag(GetSystemStatusFlag(), 0x800, 0, 0); -} - -void _retonly() {} - -struct export sifcmd_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "sifcmd", - (func)_start, // entrypoint - (func)_retonly, - (func)SifDeinitCmd, - (func)_retonly, - (func)SifInitCmd, - (func)SifExitCmd, - (func)SifGetSreg, - (func)SifSetSreg, - (func)SifSetCmdBuffer, - (func)SifSetSysCmdBuffer, - (func)SifAddCmdHandler, - (func)SifRemoveCmdHandler, - (func)SifSendCmd, - (func)iSifSendCmd, - (func)SifInitRpc, - (func)SifBindRpc, - (func)SifCallRpc, - (func)SifRegisterRpc, - (func)SifCheckStatRpc, - (func)SifSetRpcQueue, - (func)SifGetNextRequest, - (func)SifExecRequest, - (func)SifRpcLoop, - (func)SifGetOtherData, - (func)SifRemoveRpc, - (func)SifRemoveRpcQueue, - (func)SifSet1CB, - (func)SifReset1CB, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - 0 -}; - -//////////////////////////////entrypoint///////////////////////////////[00] -int _start(){ - register int *v, i; - - _dprintf("%s\n", __FUNCTION__); - if (v=QueryBootMode(3)){ - _dprintf("bootmode: %x\n", v[1]); - if (v[1] & 1){ printf("%s No SIF service(sifcmd)\n", __FUNCTION__);return 1;} - if (v[1] & 2){ printf("%s No SIFCMD/RPC service\n", __FUNCTION__); return 1;} - } - - if (SifCheckInit()==0) - SifInit(); - - if (RegisterLibraryEntries(&sifcmd_stub)) return 1; - - cmd_common.sif1_rcvBuffer=sif1_rcvBuffer; - cmd_common.b=b; - cmd_common.sysCmdBuffer=sysCmds; - cmd_common.sysCmdBufferSize=32; - cmd_common.saddr=0; - cmd_common.cmdBuffer=0; - cmd_common.cmdBufferSize=0; - cmd_common.Sreg=Sreg; - cmd_common.func=0; - cmd_common.param=0; - - for (i=0; i<32; i++) { - sysCmds[i].func=0; - sysCmds[i].data=0; - } - for (i=0; i<32; i++) { - Sreg[i]=0; - } - - sysCmds[0].func=(cmdh_func)cmd80000000_CHANGE_SADDR; - sysCmds[0].data=&cmd_common; - - sysCmds[1].func=(cmdh_func)cmd80000001_SET_SREG; - sysCmds[1].data=&cmd_common; - - cmd_common.systemStatusFlag=GetSystemStatusFlag(); - - sysCmds[2].func=(cmdh_func)cmd80000002_INIT_CMD; - sysCmds[2].data=&cmd_common; - - RegisterIntrHandler(INT_DMA10, 1, SIF1_handler, (void*)&cmd_common); - EnableIntr(INT_DMA10 | IMODE_DMA_IQE); - - SifSetIOPrcvaddr((u32)sif1_rcvBuffer); - - return 0; -} - - - - diff --git a/unfree/fps2bios/kernel/iopload/sifman/Makefile b/unfree/fps2bios/kernel/iopload/sifman/Makefile deleted file mode 100644 index 15c253c98..000000000 --- a/unfree/fps2bios/kernel/iopload/sifman/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/SIFMAN - -IOP_INCS += -I../include - -IOP_OBJS = sifman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/sifman/sifman.c b/unfree/fps2bios/kernel/iopload/sifman/sifman.c deleted file mode 100644 index dd2898a3c..000000000 --- a/unfree/fps2bios/kernel/iopload/sifman/sifman.c +++ /dev/null @@ -1,467 +0,0 @@ - -#include "kloadcore.h" -#include "kintrman.h" -#include "kdmacman.h" -#include "ksifman.h" - -#define min(a, b) ((a)<(b)?(a):(b)) -#define max(a, b) ((a)>(b)?(a):(b)) - -#define CONFIG_1450 (*(volatile int*)0xBF801450) - -#define BD0 (*(volatile int*)0xBD000000) //mscom -#define BD1 (*(volatile int*)0xBD000010) //smcom -#define BD2 (*(volatile int*)0xBD000020) //msflag -#define BD3 (*(volatile int*)0xBD000030) //smflag -#define BD4 (*(volatile int*)0xBD000040) -#define BD5 (*(volatile int*)0xBD000050) -#define BD6 (*(volatile int*)0xBD000060) -#define BD7 (*(volatile int*)0xBD000070) - - -int debug=1; - -#define _dprintf(fmt, args...) \ - if (debug > 0) __printf("sifman: " fmt, ## args) - - -struct sifData{ - int data, - words, - count, - addr; -}; - -int sifSIF2Init =0, - sifInit =0; - -struct sm_internal{ - short id, //+000 some id...?!? - res1; //+002 not used - int index; //+004 current position in dma buffer - struct sifData *crtbuf; //+008 address of current used buffer - struct sifData buf1[32]; //+00C first buffer - struct sifData buf2[32]; //+20C second buffer - int (*function)(int);//+40C a function ?!? - int param; //+410 a parameter for function - int res2; //+414 not used -} vars; - -struct sifData one; -int res3, res4; - -int _start(int argc, char* argv); -void RegisterSif0Handler(); - - -/////////////////////////////////////////////////////////////////////// -int getBD2_loopchanging(){ - register int a, b; - a=BD2; - b=BD2; - while (a!=b) { - a=b; - b=BD2; - } - return a; -} - -/////////////////////////////////////////////////////////////////////// -int getBD3_loopchanging(){ - register int a, b; - a=BD3; - b=BD3; - while (a!=b) { - a=b; - b=BD3; - } - return a; -} - -///////////////////////////////////////////////////////////////////////[04] -void SifSIF2Init(){ - if (sifSIF2Init!=0) return; - - DMAch_SIF2_CHCR = 0; //reset ch. 2 - DMAch_DPCR|= 0x800; //enable dma ch. 2 - DMAch_DPCR; - sifSIF2Init =1; -} - -///////////////////////////////////////////////////////////////////////[05] -void SifInit(){ - u32 x, y; - u32 msflag; - - _dprintf("%s: sifInit=%d\n", __FUNCTION__, sifInit); - if (sifInit!=0) return; - - DMAch_DPCR2 |=0x8800; //enable dma ch. 9 and 10 - DMAch_SIF9_CHCR = 0; - DMAch_SIFA_CHCR = 0; - SifSIF2Init(); - - if (CONFIG_1450 & 0x10) - CONFIG_1450 |= 0x10; - CONFIG_1450 |= 0x1; - - RegisterSif0Handler(); - - CpuSuspendIntr(&x); //intrman - CpuEnableIntr(); //intrman - - _dprintf("%s: waiting EE...\n", __FUNCTION__); - do { //EE kernel sif ready - CpuSuspendIntr(&y); //intrman - msflag = getBD2_loopchanging(); - CpuResumeIntr(y); //intrman - } while(!(msflag & 0x10000)); - - _dprintf("%s: EE ready\n", __FUNCTION__); - CpuResumeIntr(x); //intrman - SifSetDChain(); - SifSetIOPrcvaddr(0); //sif1 receive buffer - BD3 = 0x10000; //IOPEE_sifman_init - BD3; - sifInit =1; - _dprintf("%s ok\n", __FUNCTION__); -} - -///////////////////////////////////////////////////////////////////////[02] -void SifDeinit(){ - int x; - - DisableIntr(INT_DMA9, &x); - ReleaseIntrHandler(INT_DMA9); - DMAch_SIF9_CHCR=0; - DMAch_SIFA_CHCR=0; - if (CONFIG_1450 & 0x10) - CONFIG_1450 |= 0x10; -} - -///////////////////////////////////////////////////////////////////////[29] -int SifCheckInit(){ - return sifInit; -} - -///////////////////////////////////////////////////////////////////////[06] -void SifSetDChain(){ - if ((BD4 & 0x40) == 0) BD4=0x40; - DMAch_SIFA_CHCR =0; - DMAch_SIFA_BCR_size =32; - DMAch_SIFA_CHCR =DMAf_08|DMAf_CO|DMAf_TR|DMAf_30;//EE->IOP (to memory) -} - -///////////////////////////////////////////////////////////////////////[30] -void SifSet0CB(int (*_function)(int), int _param){ - vars.function=_function; - vars.param=_param; -} - -///////////////////////////////////////////////////////////////////////[31] -void SifReset0CB(){ - vars.function=NULL; - vars.param=0; -} - -/////////////////////////////////////////////////////////////////////// -int Sif0Handler(void *common) { - struct sm_internal *vars = (struct sm_internal *)common; - int var_10; - if (vars->function) - vars->function(vars->param); - - if ((DMAch_SIF9_CHCR & DMAf_TR == 0) && (vars->index>0)) { - DMAch_SIF9_CHCR =0; - DMAch_SIF9_TADR =(int)vars->crtbuf; - DMAch_SIF9_BCR =32; - if (BD4 & 0x20 == 0) BD4 = 0x20; - vars->id++; - if (vars->crtbuf == vars->buf1){ - vars->index=0; - vars->crtbuf=vars->buf2; - }else - vars->crtbuf=vars->buf1; - DMAch_SIF9_CHCR = DMAf_DR|DMAf_08|DMAf_CO|DMAf_LI|DMAf_TR;//IOP->EE (from memory) - var_10=DMAch_SIF9_CHCR; - } - return 1; -} - -/////////////////////////////////////////////////////////////////////// -void RegisterSif0Handler(){ - u32 x; - vars.index=0; - vars.crtbuf=vars.buf1; - vars.function=NULL; - vars.param=0; - CpuSuspendIntr(&x); //intrman - RegisterIntrHandler(INT_DMA9, 1, Sif0Handler, &vars); //intrman - EnableIntr(INT_DMA9); //intrman - CpuResumeIntr(x); //intrman -} - -/////////////////////////////////////////////////////////////////////// -void enqueue(struct sifman_DMA *psd){ - vars.crtbuf[vars.index].data=(u32)psd->data & 0xFFFFFF; //16MB addressability - if (psd->attr & SIF_DMA_INT_I) - vars.crtbuf[vars.index].data |= 0x40000000; - vars.crtbuf[vars.index].words=(psd->size + 3)/4 & 0xFFFFFF; - vars.crtbuf[vars.index].count = ((psd->size + 3)/16 + (((psd->size + 3)/4) & 3)) - | 0x10000000; - if (psd->attr & SIF_DMA_INT_O) - vars.crtbuf[vars.index].count |=0x80000000; - vars.crtbuf[vars.index].addr = (u32)psd->addr & 0x1FFFFFFF; //512MB addresability - vars.index++; -} - -///////////////////////////////////////////////////////////////////////[07] -u32 SifSetDma(struct sifman_DMA *psd, int len){ - int var_20; - register unsigned int ret; - int i; - - if (32-vars.index < len) return 0; //no place - - ret = vars.id; - ret = (ret << 16) | ((vars.index & 0xFF) << 8) | (len & 0xFF); - - if (vars.index) - vars.crtbuf[vars.index-1].data &= 0x7FFFFFFF; - for (i=0; iEE - var_20=DMAch_SIF9_CHCR; //?!? - } - return ret; -} - -///////////////////////////////////////////////////////////////////////[08] -int SifDmaStat(u32 id){ - if (DMAch_SIF9_CHCR & DMAf_TR){ - if (id>>16 == vars.id) return 1; //waiting in queue - if (id>>16+1 == vars.id) return 0; //running - } - return -1; //terminated -} - -///////////////////////////////////////////////////////////////////////[09] -void SifSend(struct sifman_DMA sd){ - sd.size = sd.size /4 + ((sd.size & 3) > 0); - one.data = ((u32)sd.data & 0xFFFFFF) | 0x80000000; - one.words= sd.size & 0xFFFFFF; - if (sd.attr & SIF_DMA_INT_I) one.data |= 0x40000000; - one.count = (sd.size/4 + ((sd.size & 3)>0)) | 0x10000000; - if (sd.attr & SIF_DMA_INT_O) one.count|= 0x80000000; - one.addr = (u32)sd.addr & 0xFFFFFFF; - - if (BD4 & 0x20 == 0) BD4=0x20; - - DMAch_SIF9_CHCR=0; - DMAch_SIF9_TADR=(u32)&one; - DMAch_SIF9_BCR_size=32; - DMAch_SIF9_CHCR=DMAf_DR|DMAf_08|DMAf_CO|DMAf_LI|DMAf_TR; //IOP->EE - DMAch_SIF9_CHCR; -} - -///////////////////////////////////////////////////////////////////////[10] -void SifSendSync(){ - while (DMAch_SIF9_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[11] -int SifIsSending(){ - return (DMAch_SIF9_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[12] -void SifSetSIF0DMA(void *data, int size, int attr){ - size=size/4 + ((size & 3)>0); - - if (BD4 & 0x20 == 0) BD4=0x20; - - DMAch_SIF9_CHCR=0; - DMAch_SIF9_MADR=(u32)data & 0xFFFFFF; - DMAch_SIF9_BCR_size=32; - DMAch_SIF9_BCR_count=size/32 + ((size & 0x1F)>0); - DMAch_SIF9_CHCR=DMAf_DR|DMAf_CO|DMAf_TR; - DMAch_SIF9_CHCR; -} - -///////////////////////////////////////////////////////////////////////[13] -void SifSendSync0(){ - while (DMAch_SIF9_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[14] -int SifIsSending0(){ - return (DMAch_SIF9_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[15] -void SifSetSIF1DMA(void *data, int size, int attr){ - size=size/4 + ((size & 3)>0); - - if (BD4 & 0x40 == 0) BD4=0x40; - - DMAch_SIFA_CHCR=0; - DMAch_SIFA_MADR=(u32)data & 0xFFFFFF; - DMAch_SIFA_BCR_size=32; - DMAch_SIFA_BCR_count=size/32 + ((size & 0x1F)>0); - DMAch_SIFA_CHCR=DMAf_CO|DMAf_TR| - (attr & SIF_DMA_BSN?DMAf_30:0); - DMAch_SIFA_CHCR; -} - -///////////////////////////////////////////////////////////////////////[16] -void SifSendSync1(){ - while (DMAch_SIFA_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[17] -int SifIsSending1(){ - return (DMAch_SIFA_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[18] -void SifSetSIF2DMA(void *data, int size, int attr){ - size=size/4 + ((size & 3)>0); - - if (BD4 & 0x80 == 0) BD4=0x80; - - DMAch_SIF2_CHCR=0; - DMAch_SIF2_MADR=(u32)data & 0xFFFFFF; - DMAch_SIF2_BCR_size=min(size, 32); - DMAch_SIF2_BCR_count=size/32 + ((size & 0x1F)>0); - DMAch_SIF2_CHCR=DMAf_CO |DMAf_TR| - ((attr & SIF_TO_EE ?DMAf_DR: - (attr & SIF_DMA_BSN?DMAf_30:0))); - DMAch_SIF2_CHCR; -} - -///////////////////////////////////////////////////////////////////////[19] -void SifSendSync2(){ - while (DMAch_SIF2_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[20] -int SifIsSending2(){ - return (DMAch_SIF2_CHCR & DMAf_TR); -} - -///////////////////////////////////////////////////////////////////////[21] -int SifGetEEIOPflags(){ - return getBD2_loopchanging(); -} - -///////////////////////////////////////////////////////////////////////[22] -int SifSetEEIOPflags(int val){ - BD2=val; - return getBD2_loopchanging(); -} - -///////////////////////////////////////////////////////////////////////[23] -int SifGetIOPEEflags(){ - return getBD3_loopchanging(); -} - -///////////////////////////////////////////////////////////////////////[24] -int SifSetIOPEEflags(int val){ - BD3=val; - return getBD3_loopchanging(); -} - -///////////////////////////////////////////////////////////////////////[25] -int SifGetEErcvaddr(){ - return BD0; -} - -///////////////////////////////////////////////////////////////////////[26] -int SifGetIOPrcvaddr(){ - return BD1; -} - -///////////////////////////////////////////////////////////////////////[27] -int SifSetIOPrcvaddr(int val){ - BD1=val; - return BD1; -} - -///////////////////////////////////////////////////////////////////////[28] -void SifSet1450_2(){ - CONFIG_1450 |= 2; - CONFIG_1450 &= ~2; - CONFIG_1450; -} - -///////////////////////////////////////////////////////////////////////[01,03,32,33,34,35] -void _retonly(){} - -//////////////////////////////entrypoint/////////////////////////////// -struct export sifman_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "sifman", - (func)_start, // entrypoint - (func)_retonly, - (func)SifDeinit, - (func)_retonly, - (func)SifSIF2Init, - (func)SifInit, - (func)SifSetDChain, - (func)SifSetDma, - (func)SifDmaStat, - (func)SifSend, - (func)SifSendSync, - (func)SifIsSending, - (func)SifSetSIF0DMA, - (func)SifSendSync0, - (func)SifIsSending0, - (func)SifSetSIF1DMA, - (func)SifSendSync1, - (func)SifIsSending1, - (func)SifSetSIF2DMA, - (func)SifSendSync2, - (func)SifIsSending2, - (func)SifGetEEIOPflags, - (func)SifSetEEIOPflags, - (func)SifGetIOPEEflags, - (func)SifSetIOPEEflags, - (func)SifGetEErcvaddr, - (func)SifGetIOPrcvaddr, - (func)SifSetIOPrcvaddr, - (func)SifSet1450_2, - (func)SifCheckInit, - (func)SifSet0CB, - (func)SifReset0CB, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - 0 -}; - -//////////////////////////////entrypoint///////////////////////////////[00] -int _start(int argc, char* argv){ - - return RegisterLibraryEntries(&sifman_stub) > 0; - -} - diff --git a/unfree/fps2bios/kernel/iopload/sio2man/Makefile b/unfree/fps2bios/kernel/iopload/sio2man/Makefile deleted file mode 100644 index 193d2e4f2..000000000 --- a/unfree/fps2bios/kernel/iopload/sio2man/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/SIO2MAN - -IOP_INCS += -I../include - -IOP_OBJS = sio2man.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_dmacman.o ../libkernel/iop_thbase.o ../libkernel/iop_thevent.o ../libkernel/iop_stdio.o ../libkernel/iop_sysclib.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/sio2man/sio2man.c b/unfree/fps2bios/kernel/iopload/sio2man/sio2man.c deleted file mode 100644 index 43301315f..000000000 --- a/unfree/fps2bios/kernel/iopload/sio2man/sio2man.c +++ /dev/null @@ -1,508 +0,0 @@ -//[module] SIO2MAN -//[processor] IOP -//[type] ELF-IRX -//[size] ?(0x?) -//[bios] ?(0x?-0x?) -//[iopboot2] 21 -//[loaded @] ? -//[name] sio2man -//[version] 0x101 -//[memory map] 0xBF808200,0xBF808204,0xBF808208,0xBF80820C, -// 0xBF808210,0xBF808214,0xBF808218,0xBF80821C, 16 entries -// 0xBF808220,0xBF808224,0xBF808228,0xBF80822C, array -// 0xBF808230,0xBF808234,0xBF808238,0xBF80823C, -// 0xBF808240,0xBF808244,0xBF808248,0xBF80824C, -// 0xBF808250,0xBF808254,0xBF808258,0xBF80825C, -// 0xBF808260, 0xBF808268,0xBF80826C, -// 0xBF808270,0xBF808274,0xBF808278,0xBF80827C, -// 0xBF808280 -//[handlers] - -//[entry point] _start, (export_stub) -//[made by] Herben - -#include -#include - -#include "kdmacman.h" -#include "kloadcore.h" -#include "kintrman.h" -#include -#include - -struct sio2_packet { - u32 recvVal1; // 0x00 - u32 sendArray1[4]; // 0x04-0x10 - u32 sendArray2[4]; // 0x14-0x20 - - u32 recvVal2; // 0x24 - - u32 sendArray3[16]; // 0x28-0x64 - - u32 recvVal3; // 0x68 - - int sendSize; // 0x6C - int recvSize; // 0x70 - - u8 *sendBuf; // 0x74 - u8 *recvBuf; // 0x78 - - u32 dmacAddress1; - u32 dmacSize1; - u32 dmacCount1; - u32 dmacAddress2; - u32 dmacSize2; - u32 dmacCount2; -}; - -struct sio2common { - int evid; - int thid; -}; - -struct sio2common common; -int sio2_initialized = 0; -struct sio2_packet *packetAddr; -int debug = 1; - -#define _dprintf(fmt, args...) if (debug > 0) printf(fmt, ## args) - -// if (debug > 0) printf("\033[0;32m" "sio2man: " "\033[0m" fmt, ## args) - -int _start(void); -void nullSub(void); -int sio2_init(void); -void sio2_deInit(void); -void sio2_setCtrl(u32 arg0); -u32 sio2_getCtrl(void); -u32 sio2_getRecv1(void); -void sio2_setSend1(int entryNum, u32 val); -u32 sio2_getSend1(int entryNum); -void sio2_setSend2(int entryNum, u32 val); -u32 sio2_getSend2(int entryNum); -u32 sio2_getRecv2(void); -void sio2_setSend3(int entryNum, u32 val); -u32 sio2_getSend3(int entryNum); -u32 sio2_getRecv3(void); -void sio2_set8278(u32 arg0); -u32 sio2_get8278(void); -void sio2_set827C(u32 arg0); -u32 sio2_get827C(void); -void sio2_datain(u8 arg0); -u8 sio2_dataout(void); -void sio2_setIntr(u32 arg0); -u32 sio2_getIntr(void); -void sio2_signalExchange1(void); -void sio2_signalExchange2(void); -int sio2_packetExchange(struct sio2_packet *packet); - -struct export sio2man_stub={ - 0x41C00000, - 0, - VER(1, 2), // 1.2 => 0x102 - 0, - "sio2man", - (func)_start, // 0 - (func)nullSub, - (func)sio2_deInit, - (func)nullSub, - (func)sio2_setCtrl, // 4 - (func)sio2_getCtrl, - (func)sio2_getRecv1, - (func)sio2_setSend1, - (func)sio2_getSend1, // 8 - (func)sio2_setSend2, - (func)sio2_getSend2, - (func)sio2_getRecv2, - (func)sio2_setSend3, // 12 - (func)sio2_getSend3, - (func)sio2_getRecv3, - (func)sio2_set8278, - (func)sio2_get8278, // 16 - (func)sio2_set827C, - (func)sio2_get827C, - (func)sio2_datain, - (func)sio2_dataout, // 20 - (func)sio2_setIntr, - (func)sio2_getIntr, - (func)sio2_signalExchange1, - (func)sio2_signalExchange2, // 24 - (func)sio2_packetExchange, - 0 -}; - -#define INUM_sio2 17 -#define HTYPE_C 1 - - -int _start(void) { - return sio2_init(); -} - -void nullSub(void) { return; } - -void sio2_setCtrl(u32 arg0) { - *(u32 *) (0xBF808268) = arg0; -} - -u32 sio2_getCtrl(void) { - return(*(u32 *) (0xBF808268)); -} - -u32 sio2_getRecv1(void) { - return(*(u32 *) (0xBF80826C)); -} - -void sio2_setSend1(int entryNum, u32 val) { - switch(entryNum) { - case 0: - *(u32 *) (0xBF808240) = val; - break; - case 1: - *(u32 *) (0xBF808248) = val; - break; - case 2: - *(u32 *) (0xBF808250) = val; - break; - case 3: - *(u32 *) (0xBF808258) = val; - break; - } -} - -u32 sio2_getSend1(int entryNum) { - switch(entryNum) { - case 0: - return(*(u32 *) (0xBF808240)); - case 1: - return(*(u32 *) (0xBF808248)); - case 2: - return(*(u32 *) (0xBF808250)); - case 3: - return(*(u32 *) (0xBF808258)); - } - - return(0); -} - -void sio2_setSend2(int entryNum, u32 val) { - switch(entryNum) { - case 0: - *(u32 *) (0xBF808244) = val; - break; - case 1: - *(u32 *) (0xBF80824C) = val; - break; - case 2: - *(u32 *) (0xBF808254) = val; - break; - case 3: - *(u32 *) (0xBF80825C) = val; - break; - } -} - -u32 sio2_getSend2(int entryNum) { - switch(entryNum) { - case 0: - return(*(u32 *) (0xBF808244)); - case 1: - return(*(u32 *) (0xBF80824C)); - case 2: - return(*(u32 *) (0xBF808254)); - case 3: - return(*(u32 *) (0xBF80825C)); - } - - return(0); -} - -u32 sio2_getRecv2(void) { - return(*(u32 *) (0xBF808270)); -} - -void sio2_setSend3(int entryNum, u32 val) { - if(entryNum < 16) - *(u32 *) (0xBF808200 + (entryNum * 4)) = val; -} - -u32 sio2_getSend3(int entryNum) { - if(entryNum < 16) - return(*(u32 *) (0xBF808200 + (entryNum * 4))); - - return(-1); -} - -u32 sio2_getRecv3(void) { - return(*(u32 *) (0xBF808274)); -} - -void sio2_set8278(u32 arg0) { - *(u32 *) (0xBF808278) = arg0; -} - -u32 sio2_get8278(void) { - return(*(u32 *) (0xBF808278)); -} - -void sio2_set827C(u32 arg0) { - *(u32 *) (0xBF80827C) = arg0; -} - -u32 sio2_get827C(void) { - return(*(u32 *) (0xBF80827C)); -} - -void sio2_datain(u8 arg0) { - *(u8 *) (0xBF808260) = arg0; -} - -u8 sio2_dataout(void) { - return(*(u8 *) (0xBF808264)); -} - -void sio2_setIntr(u32 arg0) { - *(u32 *) (0xBF808280) = arg0; -} - -u32 sio2_getIntr(void) { - return(*(u32 *) (0xBF808280)); -} - -int sio2_createEventFlag(void) { - iop_event_t param; - - param.attr = 2; - param.option = 0; - param.bits = 0; - return(CreateEventFlag(¶m)); -} - -void dumpbuf(u8 *buf, int size) { -/* char str[1024]; - char tmp[256]; - int i; - - str[0] = 0; - for(i = 0; i < size; i++) { - sprintf(tmp, "%x, ", buf[i]); - strcat(str, tmp); - } - printf("%s\n", str); - */ -} - -void sio2_sendPacket(struct sio2_packet *p) { - int i; - -// _dprintf("%s: sendSize=%d\n", __FUNCTION__, p->sendSize); - - for(i = 0; i < 4; i++) { - sio2_setSend1(i, p->sendArray1[i]); - sio2_setSend2(i, p->sendArray2[i]); - } - - for(i = 0; i < 16; i++) - sio2_setSend3(i, p->sendArray3[i]); - - if (p->sendSize) { - _dprintf("sendBuf: "); - dumpbuf(p->sendBuf, p->sendSize); - - for(i = 0; i < p->sendSize; i++) { - *(u8 *) (0xBF808260) = p->sendBuf[i]; - } - } - - if(p->dmacAddress1 != 0) { - _dprintf("dmaAddress1=%x, dmacSize1=%x, dmacCount1=%x\n", p->dmacAddress1, p->dmacSize1, p->dmacCount1); - dumpbuf((u8*)p->dmacAddress1, p->dmacSize1*p->dmacCount1); - dmacSetDMA(DMAch_SIO2in, p->dmacAddress1, p->dmacSize1, p->dmacCount1, 1); // from memory - dmacStartTransfer(DMAch_SIO2in); - } - - if(p->dmacAddress2 != 0) { - dmacSetDMA(DMAch_SIO2out, p->dmacAddress2, p->dmacSize2, p->dmacCount2, 0); // to memory - dmacStartTransfer(DMAch_SIO2out); - } -} - -void sio2_recvPacket(struct sio2_packet *p) { - int i; - -// _dprintf("%s: recvSize=%d\n", __FUNCTION__, p->recvSize); - - p->recvVal1 = *(u32 *) (0xBF80826C); - p->recvVal2 = *(u32 *) (0xBF808270); - p->recvVal3 = *(u32 *) (0xBF808274); - - if (p->recvSize) { - _dprintf("recvBuf: "); - for(i = 0; i < p->recvSize; i++) { - p->recvBuf[i] = *(u8 *) (0xBF808264); - printf("%x, ", p->recvBuf[i]); - } - // printf("\n"); - } - - if (p->dmacAddress2 != 0) { - dumpbuf((u8*)p->dmacAddress2, p->dmacSize2*p->dmacCount2); - } -} - -void sio2_basicThread(void* data) { - unsigned long result[4]; - - //_dprintf("%s\n", __FUNCTION__); - - while(1) { - WaitEventFlag(common.evid, 0x5, 0x01, result); - - if (result[0] & 0x01) { - ClearEventFlag(common.evid, ~0x1); - SetEventFlag(common.evid, 0x02); - } else - if (result[0] & 0x04) { - ClearEventFlag(common.evid, ~0x4); - SetEventFlag(common.evid, 0x08); - } else { - printf("sio2MAN: Woke up for unknown event(%08X)!\n", result[0]); - return; - } - -// Wait for application to call our export 25 - WaitEventFlag(common.evid, 0x10, 0, NULL); - ClearEventFlag(common.evid, ~0x10); - - *(u32 *) (0xBF808268) = (*(u32 *) (0xBF808268)) | 0x0C; - sio2_sendPacket(packetAddr); - *(u32 *) (0xBF808268) = (*(u32 *) (0xBF808268)) | 0x01; - -// Wait for the sio2 interrupt to occur - WaitEventFlag(common.evid, 0x80, 0, NULL); - ClearEventFlag(common.evid, ~0x80); - -// Recieve the reply packet - sio2_recvPacket(packetAddr); - - SetEventFlag(common.evid, 0x20); - - WaitEventFlag(common.evid, 0x40, 0, NULL); - ClearEventFlag(common.evid, ~0x40); - } -} - -int sio2_createBasicThread(void) { - iop_thread_t param; - - param.attr = TH_C; - param.option = 0; - param.thread = &sio2_basicThread; - param.stacksize = 0x2000; - param.priority = 0x18; - - return(CreateThread(¶m)); -} - - -int sio2_interruptHandler(struct sio2common *c) { - sio2_setIntr(sio2_getIntr()); - - iSetEventFlag(c->evid, 0x80); - - return(1); -} - -// Export 0 -int sio2_init(void) { - u32 oldStat; - -// _dprintf("%s\n", __FUNCTION__); - - if(RegisterLibraryEntries(&sio2man_stub) != 0) { - //printf("sio2MAN: Unable to register library entries!\n"); - return(MODULE_NO_RESIDENT_END);//==1 - } - - if(sio2_initialized != 0) { - //printf("sio2MAN: Already initialized!\n"); - return(MODULE_NO_RESIDENT_END); - } - - sio2_initialized = 1; - - *(u32 *) (0xBF808268) = 0x3BC; - - common.evid = sio2_createEventFlag(); - common.thid = sio2_createBasicThread(); - - CpuSuspendIntr(&oldStat); - - RegisterIntrHandler(INUM_sio2, HTYPE_C, &sio2_interruptHandler, &common); - EnableIntr(INUM_sio2); - - CpuResumeIntr(oldStat); - - dmacSetVal(DMAch_SIO2in, 0x03); - dmacSetVal(DMAch_SIO2out, 0x03); - dmacEnableDMAch(DMAch_SIO2in); - dmacEnableDMAch(DMAch_SIO2out); - - StartThread(common.thid, 0); // Start the "basicThread" - - return MODULE_RESIDENT_END; -} - -void sio2_deInit(void) { - u32 oldStat; - -// _dprintf("%s\n", __FUNCTION__); - - CpuSuspendIntr(&oldStat); - - DisableIntr(INUM_sio2, 0); - ReleaseIntrHandler(INUM_sio2); - - CpuResumeIntr(oldStat); - - dmacDisableDMAch(DMAch_SIO2in); - dmacDisableDMAch(DMAch_SIO2out); -} - -void sio2_signalExchange1(void) { -// _dprintf("%s\n", __FUNCTION__); - -// Signal the basic thread to let it know we want to do an exchange. - SetEventFlag(common.evid, 0x01); -// Wait for basic thread to acknowledge then clear the flag. - WaitEventFlag(common.evid, 0x02, 0, NULL); - ClearEventFlag(common.evid, ~0x2); -} - -void sio2_signalExchange2(void) { -// _dprintf("%s\n", __FUNCTION__); - -// Signal the basic thread to let it know we want to do an exchange. - SetEventFlag(common.evid, 0x04); -// Wait for basic thread to acknowledge then clear the flag. - WaitEventFlag(common.evid, 0x08, 0, NULL); - ClearEventFlag(common.evid, ~0x8); -} - -int sio2_packetExchange(struct sio2_packet *packet) { -// _dprintf("%s: %x\n", __FUNCTION__, packet); - -// Set the address of the packet. - packetAddr = packet; - -// Let the basic thread know we have the address set for the exchange. - SetEventFlag(common.evid, 0x10); - -// Wait for the basic thread to finish it's stuff. - WaitEventFlag(common.evid, 0x20, 0, NULL); - ClearEventFlag(common.evid, ~0x20); - - SetEventFlag(common.evid, 0x40); - - return 1; -} - diff --git a/unfree/fps2bios/kernel/iopload/ssbusc/Makefile b/unfree/fps2bios/kernel/iopload/ssbusc/Makefile deleted file mode 100644 index ad26c6928..000000000 --- a/unfree/fps2bios/kernel/iopload/ssbusc/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/SSBUSC - -IOP_INCS += -I../include - -IOP_OBJS = ssbusc.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/ssbusc/ssbusc.c b/unfree/fps2bios/kernel/iopload/ssbusc/ssbusc.c deleted file mode 100644 index 756a4d3ed..000000000 --- a/unfree/fps2bios/kernel/iopload/ssbusc/ssbusc.c +++ /dev/null @@ -1,178 +0,0 @@ -//[module] SSBUSC -//[processor] IOP -//[type] ELF-IRX -//[name] ssbus_service -//[version] 0x101 -//[memory map] 0xBF801000,0xBF801004,0xBF801008,0xBF80100C, (r/w) -// MDECin(T2),8(T2) ,MDECin(T1),MDECout(T1), -// -// 0xBF801010,0xBF801014,0xBF801018,0xBF80101C,0xBF801020 (r/w) -// GPU(SIF2)(T1),SPU(T1)spu_delay,PIO(T1),8(T1),SSBUSCconfig -// -// 0xBF801400,0xBF801404,0xBF801408,0xBF80140C, (r/w) -// MDECout(T2),SPU(T2) ,PIO(T2) ,SIF0(T2), -// -// 0xBF801410,0xBF801414,0xBF801418,0xBF80141C,0xBF801420 (r/w) -// SIO2in(T2),SIF0(T1) ,SIF1(T1) ,SIO2in(T1),SIO2out(T1) -// -//[handlers] - -//[entry point] start, export_stub -//[made by] [RO]man (roman_ps2dev@hotmail.com) - -#include "kloadcore.h" -#include "kintrman.h" - -int memmap_table[]={ - 0xBF801008, 0xBF80100C, 0xBF801010, 0, 0xBF801014,//spu_delay - 0xBF801018, 0, 0, 0xBF80101C, 0xBF801414, - 0xBF801418, 0xBF80141C, 0xBF801420 -}; - -int memmap_table_2[]={ - 0xBF801000, 0xBF801400, 0, 0, 0xBF801404, - 0xBF801408, 0, 0, 0xBF801004, 0xBF80140C, - 0, 0xBF801410, 0 -}; - -int _start(); - -/////////////////////////////////////////////////////////////////////// -int return_0(){ - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSsetTable1(int code, int value){ //set - int *v; - if ((code < 13) && (v=(int*)memmap_table[code])) - return *v=value; - return -1; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSgetTable1(int code){ //get - int *v; - if ((code < 13) && (v=(int*)memmap_table[code])) - return *v; - return -1; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSsetTable2(int code, int value){ //set - int *v; - if ((code < 13) && (v=(int*)memmap_table_2[code])) - return *v=value; - return -1; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSgetTable2(int code){ //get - int *v; - if ((code < 13) && (v=(int*)memmap_table_2[code])) - return *v; - return -1; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSsetCOM_DELAY_1st(int a){ //set lowest nibble - return *(int*)(0xBF801020) = - (*(int*)(0xBF801020) & 0xFFFFFFF0) | - ( a & 0xF); -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSgetCOM_DELAY_1st(){ //get lowest nibble - return *(int*)(0xBF801020) & 0xF; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSsetCOM_DELAY_2nd(int a){ //set - return *(int*)(0xBF801020) = - (*(int*)(0xBF801020) & 0xFFFFFF0F) | - ( (a << 4) & 0xF0); -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSgetCOM_DELAY_2nd(){ //get - return *(unsigned char*)(0xBF801020) >> 4; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSsetCOM_DELAY_3rd(int a){ //set - return *(int*)(0xBF801020) = - (*(int*)(0xBF801020) & 0xFFFFF0FF) | - ( (a << 8) & 0xF00); -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSgetCOM_DELAY_3rd(){ //get - return (*(int*)(0xBF801020) >> 8) & 0xF; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSsetCOM_DELAY_4th(int a){ //set - return *(int*)(0xBF801020) = - (*(int*)(0xBF801020) & 0xFFFF0FFF) | - ( (a << 12) & 0xF000); -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSgetCOM_DELAY_4th(){ //get - return (*(int*)(0xBF801020) >> 12) & 0xF; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSsetCOM_DELAY(int a){ //set - return *(int*)(0xBF801020) = a; -} - -/////////////////////////////////////////////////////////////////////// -int SSBUSgetCOM_DELAY(){ //get - return *(int*)(0xBF801020); -} - -/////////////////////////////////////////////////////////////////////// -void retonly(){} - -//////////////////////////////entrypoint/////////////////////////////// -struct export export_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "ssbusc", - (func)_start, // entrypoint - (func)retonly, - (func)return_0, - (func)retonly, - (func)SSBUSsetTable1, - (func)SSBUSgetTable1, - (func)SSBUSsetTable2, - (func)SSBUSgetTable2, - (func)SSBUSsetCOM_DELAY_1st, - (func)SSBUSgetCOM_DELAY_1st, - (func)SSBUSsetCOM_DELAY_2nd, - (func)SSBUSgetCOM_DELAY_2nd, - (func)SSBUSsetCOM_DELAY_3rd, - (func)SSBUSgetCOM_DELAY_3rd, - (func)SSBUSsetCOM_DELAY_4th, - (func)SSBUSgetCOM_DELAY_4th, - (func)SSBUSsetCOM_DELAY, - (func)SSBUSgetCOM_DELAY, - 0 // end of list -}; - -//////////////////////////////entrypoint/////////////////////////////// -int _start(int argc, char* argv[]){ - int x; - - CpuSuspendIntr(&x); - if (RegisterLibraryEntries(&export_stub)==0) { - CpuResumeIntr(x); - return 0; - } - - CpuResumeIntr(x); - return 1; -} - diff --git a/unfree/fps2bios/kernel/iopload/stdio/Makefile b/unfree/fps2bios/kernel/iopload/stdio/Makefile deleted file mode 100644 index 4d04e4659..000000000 --- a/unfree/fps2bios/kernel/iopload/stdio/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/STDIO - -IOP_INCS += -I../include - -IOP_OBJS = stdio.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/stdio/stdio.c b/unfree/fps2bios/kernel/iopload/stdio/stdio.c deleted file mode 100644 index 36feefe9c..000000000 --- a/unfree/fps2bios/kernel/iopload/stdio/stdio.c +++ /dev/null @@ -1,40 +0,0 @@ - -#include -//#include - -void Kputc(u8 c) { - *((u8*)0x1f80380c) = c; -} - -void Kputs(u8 *s) { - while (*s != 0) { - Kputc(*s++); - } -} - -void Kmemcpy(void *dest, const void *src, int n) { - const u8 *s = (u8*)src; - u8 *d = (u8*)dest; - - while (n) { - *d++ = *s++; n--; - } -} -/* -int Kprintf(const char *format, ...) { - char buf[4096]; - va_list args; - int ret; - - va_start(args, format); - ret = vsnprintf(buf, 4096, format, args); - va_end(args); - - Kputs(buf); - return ret; -} -*/ -void _start() { - Kputs("STDIO start\n"); -} - diff --git a/unfree/fps2bios/kernel/iopload/sysclib/Makefile b/unfree/fps2bios/kernel/iopload/sysclib/Makefile deleted file mode 100644 index 809815ffa..000000000 --- a/unfree/fps2bios/kernel/iopload/sysclib/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/SYSCLIB - -IOP_INCS += -I../include - -IOP_OBJS = sysclib.o ../iopdebug.o ../libkernel/iop_loadcore.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/sysclib/sysclib.c b/unfree/fps2bios/kernel/iopload/sysclib/sysclib.c deleted file mode 100644 index 865b94619..000000000 --- a/unfree/fps2bios/kernel/iopload/sysclib/sysclib.c +++ /dev/null @@ -1,583 +0,0 @@ -#include -#include -#include -#include - -#include "kloadcore.h" -#include "stdarg.h" -#include "ksysclib.h" - - -typedef struct _jmp_buf{ - int ra, - sp, - fp, - s0, - s1, - s2, - s3, - s4, - s5, - s6, - s7, - gp; -} *jmp_buf; - -int _start(int argc, char* argv[]); - - -unsigned char ctype_table[128]={ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x08, 0x08, 0x08, 0x08, 0x08, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - - 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - - 0x10, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x10, 0x10, 0x10, 0x10, 0x10, - - 0x10, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x10, 0x10, 0x10, 0x10, 0x20 -}; - -int setjmp (jmp_buf jb){ - asm __volatile__( - "sw $31, 0($4)\n" //$ra, JUMP_BUFFER.ra($a0) - "sw $28, 4($4)\n" //$gp, JUMP_BUFFER.gp($a0) - "sw $29, 8($4)\n" //$sp, JUMP_BUFFER.sp($a0) - "sw $30, 12($4)\n" //$fp, JUMP_BUFFER.fp($a0) - "sw $16, 16($4)\n" //$s0, JUMP_BUFFER.s0($a0) - "sw $17, 20($4)\n" //$s1, JUMP_BUFFER.s1($a0) - "sw $18, 24($4)\n" //$s2, JUMP_BUFFER.s2($a0) - "sw $19, 28($4)\n" //$s3, JUMP_BUFFER.s3($a0) - "sw $20, 32($4)\n" //$s4, JUMP_BUFFER.s4($a0) - "sw $21, 36($4)\n" //$s5, JUMP_BUFFER.s5($a0) - "sw $22, 40($4)\n" //$s6, JUMP_BUFFER.s6($a0) - "sw $23, 44($4)\n" //$s7, JUMP_BUFFER.s7($a0) - ); - return 0; -} - -int longjmp(void *jb, int u){ - asm __volatile__( - "lw $31, 0($4)\n" //$ra, JUMP_BUFFER.ra($a0) - "lw $28, 4($4)\n" //$gp, JUMP_BUFFER.gp($a0) - "lw $29, 8($4)\n" //$sp, JUMP_BUFFER.sp($a0) - "lw $30, 12($4)\n" //$fp, JUMP_BUFFER.fp($a0) - "lw $16, 16($4)\n" //$s0, JUMP_BUFFER.s0($a0) - "lw $17, 20($4)\n" //$s1, JUMP_BUFFER.s1($a0) - "lw $18, 24($4)\n" //$s2, JUMP_BUFFER.s2($a0) - "lw $19, 28($4)\n" //$s3, JUMP_BUFFER.s3($a0) - "lw $20, 32($4)\n" //$s4, JUMP_BUFFER.s4($a0) - "lw $21, 36($4)\n" //$s5, JUMP_BUFFER.s5($a0) - "lw $22, 40($4)\n" //$s6, JUMP_BUFFER.s6($a0) - "lw $23, 44($4)\n" //$s7, JUMP_BUFFER.s7($a0) - ); - return u; -} - -#define CHAR(a) (((a)<<24)>>24) -unsigned char look_ctype_table(int); - -int toupper (int ch){ - if (look_ctype_table(CHAR(ch)) & 0x0002) - return CHAR(ch-32); - return CHAR(ch); -} - -int tolower (int ch){ - if (look_ctype_table(CHAR(ch)) & 0x0001) - return CHAR(ch+32); - return CHAR(ch); -} - -unsigned char look_ctype_table(int pos){ - return ctype_table[pos]; -} - -void* get_ctype_table(){ - return ctype_table; -} - -void* memchr(void *s, int ch, int len){ - if (s && len>0) { - ch &= 0xFF; - do { - if (*(unsigned char*)s == ch) - return s; - } while(s++, --len>0); - - } - return NULL; -} - -int memcmp(const void *a, const void *b, size_t len){ - if (len == 0) return 0; - - do { - if (*(unsigned char*)a != *(unsigned char*)b) { - if (*(unsigned char*)a < *(unsigned char*)b) return 1; - else return -1; - } - } while (a++, b++, --len>0); - - return 0; -} - -void* memcpy(void *dest, const void *src, size_t len){ - void *temp; - - if (dest == NULL) return NULL; - -// if (((int)dest | (int)src | len) & 3 == 0) -// return wmemcopy(dest, src, len); - for(temp=dest; len>0; len--) - *(unsigned char*)temp++ = *(unsigned char*)src++; - return dest; -} - -void *memmove (void *dest, const void *src, size_t len){ - void *temp; - - if (dest==NULL) return NULL; - - temp=dest; - if (dest>=src) - for (len--; len>=0; len--) - *(unsigned char*)(temp+len)=*(unsigned char*)(src+len); - else - for ( ; len>0; len--) - *(unsigned char*)temp++ =*(unsigned char*)src++; - return dest; -} - -void *memset (void *dest, int ch, size_t len){ - void *temp; - - if (dest == NULL) return NULL; - -/* if ((ch==0) && (((int)dest | len) & 3 == 0)) - return wmemset(dest, 0, len); - else -*/ for (temp=dest; len>0; len--) - *(unsigned char*)temp++ = ch; - return dest; -} - -int bcmp (const void *a, const void *b, size_t len){ - return memcmp(a, b, len); -} - -void bcopy (const void *src, void *dest, size_t len){ - memmove(dest, src, len); -} - -void bzero (void *dest, size_t len){ - memset(dest, 0, len); -} - -char *strcat(char *dest, const char *src) { - char *s = dest; - - while (*dest) dest++; - while (*dest++ = *src++); - - return s; -} - -char *strncat(char *dest, const char *src, size_t n) { - char *s = dest; - - while (*dest) dest++; - while (n-- > 0 && (*dest++ = *src++)); - *dest = '\0'; - - return s; -} - -char *strchr(const char *s, int c) { - unsigned char _c = (unsigned int)c; - - while (*s && *s != c) s++; - if (*s != c) s = NULL; - - return (char *)s; -} - -char *strrchr(const char *s, int c) { - const char *last = NULL; - - if (c) { - while (s = strchr(s, c)) { - last = s++; - } - } else { - last = strchr(s, c); - } - - return (char *)last; -} - -int strcmp(const char *s1, const char *s2) { - while (*s1 != '\0' && *s1 == *s2) { - s1++; s2++; - } - - return (*(unsigned char *)s1) - (*(unsigned char *)s2); -} - -int strncmp(const char *s1, const char *s2, size_t n) { - if (n == 0) return 0; - - while (n-- != 0 && *s1 == *s2) { - if (n == 0 || *s1 == '\0') break; - s1++; s2++; - } - - return (*(unsigned char *)s1) - (*(unsigned char *)s2); -} - -char *strcpy(char *dest, const char *src) { - char *s = dest; - - while (*dest++ = *src++); - - return s; -} - -char *strncpy(char *dest, const char *src, size_t n) { - char *s = dest; - - while (*dest++ = *src++); - - return s; -} - -size_t strspn(const char *s, const char *accept) { - const char *_s = s; - const char *c; - - while (*s) { - for (c = accept; *c; c++) { - if (*s == *c) break; - } - if (*c == '\0') break; - s++; - } - - return s - _s; -} - -size_t strcspn(const char *s, const char *reject) { - const char *_s = s; - const char *c; - - while (*s) { - for (c = reject; *c; c++) { - if (*s == *c) break; - } - if (*c) break; - s++; - } - - return s - _s; -} - -char *index(const char *s, int c) { - return strchr(s, c); -} - -char *rindex(const char *s, int c) { - return strrchr(s, c); -} - -int strlen (const char *s) { - const char *start = s; - - while (*s) s++; - - return s - start; -} - -char *strpbrk(const char *s, const char *accept) { - const char *c = accept; - - if (!*s) return NULL; - - while (*s) { - for (c = accept; *c; c++) { - if (*s == *c) break; - } - if (*c) break; - s++; - } - - if (*c == '\0') s = NULL; - - return (char *)s; -} - -char *strstr(const char *haystack, const char *needle) { - if (*haystack == 0) { - if (*needle) return (char *) NULL; - return (char *) haystack; - } - - while (*haystack) { - size_t i; - i = 0; - - for (;;) { - if (needle[i] == 0) { - return (char *) haystack; - } - - if (needle[i] != haystack[i]) break; - i++; - } - haystack++; - } - - return (char *) NULL; -} - -#define _CTYPE_DATA_0_127 \ - _C, _C, _C, _C, _C, _C, _C, _C, \ - _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, \ - _C, _C, _C, _C, _C, _C, _C, _C, \ - _C, _C, _C, _C, _C, _C, _C, _C, \ - _S|_B, _P, _P, _P, _P, _P, _P, _P, \ - _P, _P, _P, _P, _P, _P, _P, _P, \ - _N, _N, _N, _N, _N, _N, _N, _N, \ - _N, _N, _P, _P, _P, _P, _P, _P, \ - _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, \ - _U, _U, _U, _U, _U, _U, _U, _U, \ - _U, _U, _U, _U, _U, _U, _U, _U, \ - _U, _U, _U, _P, _P, _P, _P, _P, \ - _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, \ - _L, _L, _L, _L, _L, _L, _L, _L, \ - _L, _L, _L, _L, _L, _L, _L, _L, \ - _L, _L, _L, _P, _P, _P, _P, _C - -#define _CTYPE_DATA_128_256 \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0 - - -const char _ctype_[1 + 256] = { - 0, - _CTYPE_DATA_0_127, - _CTYPE_DATA_128_256 -}; - -char *strtok(char *s, const char *delim) { -} - -long _strtol_r(const char *nptr, char **endptr, int base) { - register const char *s = nptr; - register unsigned long acc; - register int c; - register unsigned long cutoff; - register int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') { - neg = 1; - c = *s++; - } else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; - cutlim = cutoff % (unsigned long)base; - cutoff /= (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = neg ? LONG_MIN : LONG_MAX; -// rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (char *) (any ? s - 1 : nptr); - return (acc); -} - -long int strtol(const char *nptr, char **endptr, int base) { - return _strtol_r (nptr, endptr, base); -} - -unsigned long int strtoul(const char *nptr, char **endptr, int base) { -} - -void atob() { -} - -wchar_t *wmemcpy(wchar_t *dest, const wchar_t *src, size_t n) { -} - -wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n) { -} - -void prnt() { -} - -int sprintf(char *str, const char *format, ...) { -} - -int vsprintf(char *str, const char *format, va_list ap) { -} - - - - -/////////////////////////////////////////////////////////////////////// -void _retonly(){} - -struct export sysclib_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "sysclib", - (func)_start, // entrypoint - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)setjmp, - (func)longjmp, - (func)toupper, - (func)tolower, - (func)look_ctype_table, - (func)get_ctype_table, - (func)memchr, - (func)memcmp, - (func)memcpy, - (func)memmove, - (func)memset, - (func)bcmp, - (func)bcopy, - (func)bzero, - (func)prnt, - (func)sprintf, - (func)strcat, - (func)strchr, - (func)strcmp, - (func)strcpy, - (func)strcspn, - (func)index, - (func)rindex, - (func)strlen, - (func)strncat, - (func)strncmp, - (func)strncpy, - (func)strpbrk, - (func)strrchr, - (func)strspn, - (func)strstr, - (func)strtok, - (func)strtol, - (func)atob, - (func)strtoul, - (func)wmemcpy, - (func)wmemset, - (func)vsprintf, - 0 -}; - -struct export stdio_stub={ - 0x41C00000, - 0, - VER(1, 2), // 1.2 => 0x102 - 0, - "stdio", - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, -}; - -//////////////////////////////entrypoint/////////////////////////////// -int _start(int argc, char* argv[]){ - int ret = RegisterLibraryEntries(&sysclib_stub); - return RegisterLibraryEntries(&stdio_stub) + ret; -} - diff --git a/unfree/fps2bios/kernel/iopload/sysmem/Makefile b/unfree/fps2bios/kernel/iopload/sysmem/Makefile deleted file mode 100644 index d9bee8c6b..000000000 --- a/unfree/fps2bios/kernel/iopload/sysmem/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/SYSMEM - -IOP_INCS += -I../include - -IOP_OBJS = sysmem.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/sysmem/sysmem.c b/unfree/fps2bios/kernel/iopload/sysmem/sysmem.c deleted file mode 100644 index 6d375c5f1..000000000 --- a/unfree/fps2bios/kernel/iopload/sysmem/sysmem.c +++ /dev/null @@ -1,529 +0,0 @@ -//[module] SYSMEM -//[processor] IOP -//[type] ELF-IRX -//[name] System_Memory_Manager -//[version] 0x101 -//[memory map] 0x00001500(0x000015C3) in RAM -//[handlers] see fileio/80000003 -//[entry point] sysmem_start, sysmem_stub(it is handeled specialy by loadcore) -//[made by] [RO]man (roman_ps2dev@hotmail.com) september 2002 - -#define min(a, b) ((a)<(b)?(a):(b)) -#define max(a, b) ((a)>(b)?(a):(b)) - -#include - -#include "ksysmem.h" -#include "kloadcore.h" -#include "iopdebug.h" - -#define EIGHTMEGSm256 (8*1024*1024-256) //0x007FFF00 -#define ALIGN256 0xFFFFFF00 - -#define mALLOCATED(info) (info & 1) -#define mADDRESS(info) ((info >> 1) & 0x7FFF) -#define mSIZE(info) (info >> 17) -//[000000000000000 0 000000000000000 1] -//[ size of block |?|address of block|a]located -//upper 15bits are the size of block in 256bytes units [8MB addressability] -//unknown 1 bit -//15bits for address of block in 256bytes units [8MB addressability; 15+8 bits] -//the lower bit means that block is allocated or not (1/0) - -struct allocELEM{ //sizeof()=8 - struct allocELEM *next; -/* unsigned int size :15, - unknown :1, // info could be declared this way - addr :15, - allocated:1; */ - unsigned int info; // here is stored data about - // an allocable memory chunk -}; - -#define smFIRST 0 -#define smFIRSTF 2 //first one that can be freed -#define smCHECK 27 -#define smLAST 30 -#define smMAX (smLAST+1) //max number of elements = 31 - -struct allocTABLE{ //sizeof()=256=0x100 - struct allocTABLE *next; //+00 - struct allocELEM list[31]; //+04 8 * 31 = 248 = 0xF8; - int dummy; -}; - -char* (*_Kprintf)(unsigned int, ...); -unsigned int unk; - -/////////////////////////////////////////////////////////////////////// -unsigned int memsize; - -void *_start(u32 iopmemsize); -void *sysmem_init_memory(); -void sysmem_retonly(); -unsigned int *sysmem_return_addr_of_memsize(); - -//////////////////////////////entrypoint/////////////////////////////// -struct export sysmem_stub __attribute__((section(".text"))) = { - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "sysmem", - (func)_start, // entrypoint - (func)sysmem_init_memory, - (func)sysmem_retonly, - (func)sysmem_return_addr_of_memsize, - (func)AllocSysMemory, - (func)FreeSysMemory, - (func)QueryMemSize, - (func)QueryMaxFreeMemSize, - (func)QueryTotalFreeMemSize, - (func)QueryBlockTopAddress, - (func)QueryBlockSize, - (func)sysmem_retonly, - (func)sysmem_retonly, - (func)sysmem_retonly, - (func)Kprintf, - (func)sysmem_call15_set_Kprintf, - 0 -}; - -struct allocTABLE *alloclist; -char _alloclist[0x200]; // temp buffer -//struct allocTABLE _alloclist; // has to be last!, also temp! - -void Kputc(u8 c) { - *((u8*)0x1f80380c) = c; -} - -void Kputs(u8 *s) { - while (*s != 0) { - Kputc(*s++); - } -} - -void Kprintnum(unsigned int n) -{ - char chars[16] = "0123456789abcdef"; - int i = 0; - while(i < 8) { - Kputc(chars[n>>28]); - n <<= 4; - ++i; - } -} - - -///////////////////////////////////////////////////////////////////////[OK] -void sysmem_retonly(){} - -//////////////////////////////entrypoint///////////////////////////////[OK] -void *_start(u32 iopmemsize) -{ - iopmemsize=min(EIGHTMEGSm256, iopmemsize); - - alloclist = (struct allocTABLE*)(((u32)&_alloclist + 255) & 0xFFFFFF00); // round up - memsize = iopmemsize & 0xFFFFFF00; - - //__printf("sysmem_start: %x, %x\n", memsize, ((u32)alloclist+sizeof(struct allocTABLE))); - //Kprintnum((int)alloclist); Kputs(" alloclist\n"); - //Kprintnum((int)&alloclist); Kputs(" &alloclist\n"); - - if (memsize >= ((u32)alloclist+sizeof(struct allocTABLE))) //alloctable must fit memory - return sysmem_init_memory(); - alloclist = NULL; - return NULL; -} - -/////////////////////////////////////////////////////////////////////// -extern void* _end; -void *sysmem_init_memory(){ //mark all mem as not allocated, available - unsigned int i; - struct allocELEM *p; - - //__printf("system_init_memory\n"); - - if (alloclist == NULL) return NULL; - - alloclist->next=NULL; - for (i=smFIRST; ilist[i].next=&alloclist->list[i+1]; - alloclist->list[i].info=0; - } - alloclist->list[smLAST].next=NULL; - - alloclist->list[smFIRST].info &= 0x0001FFFF; - alloclist->list[smFIRST].info |= (((memsize<0 ? - memsize+255:memsize) >> 8) << 17); - - // _end ~= alloclist + sizeof(struct alocTABLE); - - //this is not NULL! but the starting address of the first 0x1500 bytes allocated - if ( AllocSysMemory(ALLOC_FIRST, (int)alloclist, NULL)==0) { - if (alloclist==AllocSysMemory(ALLOC_FIRST, sizeof(struct allocTABLE)-4, NULL)){ //alloc allocated allocation table;-) - for (p=alloclist->list; p; p=p->next) { - if (!mALLOCATED(p->info)) { - return (void*)((mADDRESS(p->info))<<8);//next free block address - } - } - return NULL; - } - } - alloclist=NULL; - return NULL; -} - -///////////////////////////////////////////////////////////////////////[OK] -unsigned int QueryMemSize(){ - if (alloclist) - return memsize;//2*1024*1024-256=0x001FFF00 - return 0; -} - -///////////////////////////////////////////////////////////////////////[OK] -unsigned int QueryMaxFreeMemSize(){ - unsigned int maxfree=0; - struct allocELEM *p; - - if (alloclist) - for (p=alloclist->list; p; p=p->next) - if (!mALLOCATED(p->info)) - maxfree = max(maxfree, mSIZE(p->info)); - return maxfree<<8; // => 256bytes allocation units -} - -///////////////////////////////////////////////////////////////////////[OK] -unsigned int QueryTotalFreeMemSize(){ - unsigned int freesize=0; - struct allocELEM *p; - - if (alloclist) - for (p=alloclist->list; p; p=p->next) - if (!mALLOCATED(p->info)) - freesize+=mSIZE(p->info); - return freesize<<8; // => 256bytes allocation units -} - -void *alloc(int flags, int size, void *mem); -void maintain(); -///////////////////////////////////////////////////////////////////////[OK] -void *AllocSysMemory(int flags, int size, void *mem){ - if (alloclist && (flags<3)){ - void *r=alloc(flags, size, mem); - maintain(); - //Kprintnum((int)r); Kputs("\n"); - return (void*)r; - } - return NULL; -} - -int free(void *mem); -///////////////////////////////////////////////////////////////////////[OK] -int FreeSysMemory(void *mem){ - struct allocTABLE *table; - int r; - - for (table=alloclist; table; table=table->next) //must not be among - if (mem==table) //the allocation tables - return -1; - if (r=free(mem)) - return r; - maintain(); - return r; //r==0 ;-) -} - -struct allocELEM *findblock(void *a); -///////////////////////////////////////////////////////////////////////[OK] -void *QueryBlockTopAddress(void *address){ - struct allocELEM *p; - - if (p=findblock(address)) - return (void*)((mADDRESS(p->info) << 8) + - (mALLOCATED(p->info) ? USED : FREE)); - return (void*)-1; -} - -///////////////////////////////////////////////////////////////////////[OK] -int QueryBlockSize(void *address){ - struct allocELEM *p; - - if (p=findblock(address)) - return (mSIZE(p->info) << 8) | - (mALLOCATED(p->info) ? USED : FREE); - return -1; -} - -///////////////////////////////////////////////////////////////////////[OK] -unsigned int *sysmem_return_addr_of_memsize(){ - return &memsize; -} - -/////////////////////////////////////////////////////////////////////// -void *alloc(int flags, int size, void *mem){ - struct allocELEM *a, *last, *k; - unsigned int bsize, //block size in 256bytes units - baddress, //block address in 256bytes units - i, tmp; - void *address; - - bsize = (size+255) >> 8; // round to upper - if (bsize==0) return NULL; - - switch (flags){ - case ALLOC_FIRST: - for (a = alloclist->list; a; a=a->next) - if ((!mALLOCATED(a->info))) - if (mSIZE(a->info) >= bsize) - break; - if (a==NULL) return NULL; - - if (mSIZE(a->info) == bsize){ - a->info|=1; //alloc it - return (void*)(mADDRESS(a->info) << 8); //all done, how quick! - } - - address = (void*)(mADDRESS(a->info) << 8); - i = a->info; - - a->info=((a->info | 1) & 0x1FFFF) | //alloc block - (bsize << 17); //of wanted size - - i = (i & 0xFFFF0001) | (((mADDRESS(i) + bsize) & 0x7FFF) << 1); - i = (i & 0x1FFFF) | ((mSIZE(i) - bsize) << 17); - - a=a->next; - while (mSIZE(i)>0){ - tmp=a->info; - a->info=i; - i=tmp; - a = a->next; - } - return address; - - case ALLOC_LAST: - last=NULL; - for (a = alloclist->list; a; a=a->next) - if ((!mALLOCATED(a->info))) - if (mSIZE(a->info) >= bsize) - last=a; //use last one suitable - a = last; - if (a==0) return NULL; - - if (mSIZE(a->info) == bsize){ - a->info|=1; //alloc it - return (void*)(mADDRESS(a->info) << 8); - } - - a->info = (a->info & 0x0001FFFF) | - ((mSIZE(a->info) - bsize) << 17); //put rest of block - - i = (((i & 0xFFFF0001)//this line has no use; this is stupid - | ((mADDRESS(a->info) + mSIZE(a->info)) & 0x7FFF) << 1) //calculate address of block to use - & 0x0001FFFF) //keep only address (and alloc' state) - | (bsize << 17) //put size - | 1; //mark as allocated - a=a->next; - - address = (void*)(mADDRESS(i) << 8); //address in bytes - while (mSIZE(i)>0){ - tmp=a->info; - a->info=i; - i=tmp; - a = a->next; - } - return address; - - case ALLOC_LATER: - if ((unsigned int)mem & 0xFF) return NULL; - baddress = (unsigned int)mem >> 8; //addr in 256bytes units - for (a = alloclist->list; a ; a=a->next){ - if (baddress < mADDRESS(a->info)) return NULL;//cannot realloc - if ((!mALLOCATED(a->info)) && - (mSIZE(a->info) + mADDRESS(a->info) >= baddress + bsize)) - break; - } - if (a==0) return NULL; - - if (mADDRESS(a->info) < baddress){ - tmp = mADDRESS(a->info) + mSIZE(a->info) - baddress; - a->info= (a->info & 0x1FFFF) | - ((mSIZE(a->info) - tmp) << 17); - - i =(((i & 0xFFFF0001) | //stupid compiler - ((mADDRESS(a->info) + mSIZE(a->info)) & 0x7FFF) << 1) - & 0x1FFFE) - | (tmp << 17); - - k = a = a->next; - while (mSIZE(i)>0){ - tmp=a->info; - a->info=i; - i=tmp; - a=a->next; - } - a = k; - } - - if (mSIZE(a->info)==bsize){ - a->info|=1; //alloc it - return (void*)(mADDRESS(a->info) << 8); - } - - address = (void*)(mADDRESS(a->info) << 8); - i = a->info; - - a->info=((a->info | 1) & 0x1FFFF) | //alloc block - (bsize << 17); - - i = (i & 0xFFFF0001) | (((mADDRESS(i) + bsize) & 0x7FFF) << 1); - i = (i & 0x1FFFF) | ((mSIZE(i) - bsize) << 17); - - a=a->next; - while (mSIZE(i)>0){ - tmp=a->info; - a->info=i; - i=tmp; - a = a->next; - } - return address; - - } - - return NULL; -} -/***original while (mSIZE(i)>0){ - x=a->next; //stupid, n'est ce pas? - tmp=a->info; - a->next=z; //stupid, n'est ce pas? - a->info=i; - a->next=x; //stupid, n'est ce pas? - z=x; //stupid, n'est ce pas? - i=tmp; - a = a->next; - } ***/ - -///////////////////////////////////////////////////////////////////////[OK] -int free(void *mem){ - int skip; // counter (0,1,2) of elements to remove - struct allocELEM *a, // an element - *p, // prev - *n; // next - - if ((unsigned int)mem & 0xFF) return -1; // only 256byte multiple - - for (a=&alloclist->list[smFIRSTF], p=NULL; a; a=a->next){ - if ((mSIZE(a->info) && (mADDRESS(a->info)== - ((unsigned int)mem >> 8)))) // convert to 256byte units - break; - p=a; - } - - if (a==NULL) return -1; //block not found - - if (!mALLOCATED(a->info))return -1; //cannot free a freed block - - n=NULL; - skip=0; - - a->info&=0xFFFFFFFE; //free block - - if ((a->next) && (!mALLOCATED(a->next->info))){//bind with next free block - n = a->next; - skip = 1; - a->info = (a->info & 0x1FFFE) | - ((mSIZE(a->info) + mSIZE(a->next->info)) << 17); - } - - if (p && (!mALLOCATED(p->info))){ //bind with previous free block - n=a; - skip++; // or skip=2; - p->info=(p->info & 0x1FFFF) | - ((mSIZE(p->info) + mSIZE(a->info)) << 17); - } - - if (skip){ - a=n; - while (--skip!=-1) - a=a->next; - while (a){ - n->info=a->info; - a=a->next; - n=n->next; - } - } - return 0; -} -/***original while (a){ - t1=n->next; - t2=a->next; - t3=a->info; - n->next=t2; //stupid compiler, see above - n->info=t3; - n->next=t1; - a=a->next; - n=t1; - }***/ - -///////////////////////////////////////////////////////////////////////[OK] -void maintain(){ - struct allocTABLE *table, *new; - int i; - - for (table=alloclist; table->next; table = table->next) //+0x00 - ; //move to last non-NULL - if (mSIZE(table->list[smCHECK].info)>0) //+0xE0 //27 (i.e.28th) - // a new table is needed; alloc it - if (new=(struct allocTABLE*)alloc(0, sizeof(struct allocTABLE), 0)){ - table->next=new; // link it - table->list[smLAST].next=&new->list[smFIRST];// link it's table elements - table=table->next; // move to it - table->next=NULL; // mark as end of tables - for (i=0; ilist[i].next=&table->list[i+1]; - table->list[i].info=0; - } - table->list[smLAST].next=NULL; - } - - table=alloclist; - if (table->next){ - while (table->next->next) - table=table->next; - if (table->next) //redundant check - if (mSIZE(table->list[smCHECK].info)==0){ - struct allocTABLE *t=table->next; - table->list[smLAST].next=NULL; - table->next =NULL; - free(t); - } - } -} - -///////////////////////////////////////////////////////////////////////[OK] -struct allocELEM *findblock(void *a){ // it finds the block for a given address - struct allocELEM *p; - for (p = alloclist->list; p; p=p->next) - if (((unsigned int)a >= (mADDRESS(p->info) << 8)) && - ((unsigned int)a < (mADDRESS(p->info) << 8) + mSIZE(p->info))) - break; - return p; -} - -///////////////////////////////////////////////////////////////////////[OK] -char *Kprintf(const char *format,...){ - if (_Kprintf) - return _Kprintf(unk, format, (void*)(format+4));//it is not accurate since mips - // have the 2nd, 3rd & 4th parameters - // in regs and not in stack, - // but you got the idea - return NULL; -} - -///////////////////////////////////////////////////////////////////////[OK] -void sysmem_call15_set_Kprintf(char* (*newKprintf)(unsigned int, const char*, ...), unsigned int newunk){ - if (_Kprintf && newKprintf) - newKprintf(newunk, _Kprintf(0)); - unk = newunk; - _Kprintf = newKprintf; -} diff --git a/unfree/fps2bios/kernel/iopload/threadman/Makefile b/unfree/fps2bios/kernel/iopload/threadman/Makefile deleted file mode 100644 index 4f49236d0..000000000 --- a/unfree/fps2bios/kernel/iopload/threadman/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/THREADMAN - -IOP_INCS += -I../include - -IOP_OBJS = threadman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/threadman/threadman.c b/unfree/fps2bios/kernel/iopload/threadman/threadman.c deleted file mode 100644 index 3aa91f43d..000000000 --- a/unfree/fps2bios/kernel/iopload/threadman/threadman.c +++ /dev/null @@ -1,654 +0,0 @@ -//[module] THREADMAN -//[processor] IOP -//[type] ELF-IRX -//[name] Multi_Thread_Manager -//[version] 0x101 -//[memory map] 0xBF802070 -//[handlers] - -//[entry point] start, thbase_stub, thevent_stub, thsemap_stub, -// thmsgbx_stub, thfpool_stub, thvpool_stub, thrdman_stub -//[made by] [RO]man (roman_ps2dev@hotmail.com) november 2002 - january 2003 - -#include "err.h" -#include "ksysmem.h" -#include "kloadcore.h" -#include "kintrman.h" -#include "kstdio.h" -#include "ksysclib.h" -#include "ktimrman.h" -#include "kheaplib.h" -#include "iopdebug.h" -#include "kthbase.h" - -int debug=1; - -#define _dprintf(fmt, args...) \ - if (debug > 0) __printf("threadman:" fmt, ## args) - -int _start(); - - -void _retonly() {} - -struct export thbase_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "thbase", - (func)_start, // entrypoint - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, // 0x08 - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, // 0x10 - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, // 0x18 - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, // 0x20 - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, // 0x28 - (func)_retonly, - 0 -}; - -struct export thevent_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "thevent", - (func)_start, // entrypoint - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, // 0x08 - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - 0 -}; - -struct export thsemap_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "thsemap", - (func)_start, // entrypoint - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, // 0x08 - (func)_retonly, - (func)_retonly, - (func)_retonly, - (func)_retonly, - 0 -}; - - -int _start() { - int x; - - _dprintf("_start\n"); - -// if (RegisterNonAutoLinkEntries(&thrdman_stub)) return 1; - if (RegisterLibraryEntries(&thbase_stub)) return 1; - - CpuSuspendIntr(&x); - - RegisterLibraryEntries(&thevent_stub); - RegisterLibraryEntries(&thsemap_stub); -// RegisterLibraryEntries(&thmsgbx_stub); -// RegisterLibraryEntries(&thfpool_stub); -// RegisterLibraryEntries(&thvpool_stub); - - CpuEnableIntr(); -} - -#if 0 -unsigned int ready; -unsigned int _263; -unsigned int _14; - -/////////////////////////////////////////////////////////////////////// -unsigned int *threadman_callx(){ - return &ready; -} - -/////////////////////////////////////////////////////////////////////// -int thbase_start(int argc, char* argv[]){ - int x; - - if (RegisterNonAutoLinkEntries(&thrdman_stub)) return 1; - if (RegisterLibraryEntries(&thbase_stub)) return 1; - - CpuSuspendIntr(&x); - - RegisterLibraryEntries(&thevent_stub); - RegisterLibraryEntries(&thsemap_stub); - RegisterLibraryEntries(&thmsgbx_stub); - RegisterLibraryEntries(&thfpool_stub); - RegisterLibraryEntries(&thvpool_stub); - - memset(&ready, 0, 1220); //305 x 4 => zero all bss - - _unk3=8; - _2=NULL; - LL_reset(&a); - LL_reset(&b); - LL_reset(&c); - LL_reset(&d); - LL_reset(&e); - LL_reset(&f); - LL_reset(&g); - LL_reset(&h); - LL_reset(&i); - LL_reset(&threads_list); - - for (j=0; j<128; j++) - LL_reset(&prio_lists[j]); - hp=CreateHeap(0x800, 1); //s3=&hp - th=allocheap(0x7F01, sizeof(struct TCB)); - th->id=++ids;//short - th->thp_stackSize=512; - th->stack=AllocSysMemory(ALLOC_LAST, 512, 0); - th->prio=th->thp_priority=127;//LOWEST_PRIORITY+1 - th->thp_attr=TH_C; - th->status=THS_READY; - th->gp=gp; - th->thp_entry=infinite_call; - th->area=th->stack + ((th->thp_stackSize >> 2) << 2) - 0xB8; - memset(th->area, 0, 0xB8); - th->area->field_00=0xFFFFFFFE; - th->area->H78=th->area->H74==&th->area->regs; - th->area->ExitThread=ExitThread; - th->area->gp=th->gp; - th->area->attr=(th->attr & TH_COP) | 0x404; - th->area->attr|=th->attr & TH_UMODE; - th->area->entry=th->thp_entry; - th->area->ei=1; - _2.next=th; - _2.prev=th; - enqueue(th); - - th=allocheap(0x7F01, sizeof(struct TCB)); - th->id=++ids;//short - th->thp_stackSize=QueryBlockSize(&j); - th->stack=QueryBlockTopAddress(&j); - th->thp_priority=8; //MODULE_INIT_PRIORITY - th->prio=1; //HIGHEST_PRIORITY - th->thp_attr=0x2000000; - th->status=THS_RUN; - th->gp=gp; - th->next_2=_2.next; - _2.next=th; - ready.prev=ready.next=th; - th->next=NULL; - th->prev=NULL; - SetCtxSwitchHandler(handler1_switchcontexts); - SetCtxSwitchReqHandler(handler2_morethan1ready); - sub_50A0(); - - efp.attr=2; - efp.initPattern=0; - efp.option=0; - systemStatusFlag=CreateEventFlag(&efp); - - if (v0=QueryBootMode(4)) - SetEventFlag(systemStatusFlag, 1<<(v0->H0 & 3));//H0 short - - loadcore_call20_registerFunc(&lc20_2, 2, 0); - loadcore_call20_registerFunc(&lc20_3, 3, 0); - CpuEnableIntr(); - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int lc20_2(){ - CpuEnableIntr(); - - return 0; -} - -/////////////////////////////////////////////////////////////////////// -int lc20_3(int a){ - _dprintf("%s\n", __FUNCTION__); - CpuEnableIntr(); - - ChangeThreadPriority(0, 126);//LOWEST_PRIORIT - if (a->H0 == 0) { - for (;;) { - DelayThread(1000000); //never exit - } - } - return 0; -} - -/////////////////////////////////////////////////////////////////////// -void infinite_call(){ - infinite_call(); -} - -/////////////////////////////////////////////////////////////////////// -void syscall_32(){ - li $v0, 0x20 - syscall #0 -} - -/////////////////////////////////////////////////////////////////////// -void enqueue(struct TCB *th){ - flags[th->prio>>5] |= 1 << (th->prio & 0x1F); - LL_add_before(&prio_lists[th->prio], th); -} - -///////////////////////////////////////////////////////////////////////clone? -void enqueue2(struct TCB *th){ - flags[th->prio>>5] |= 1 << (th->prio & 0x1F); - LL_add_before(&prio_lists[th->prio], th); -} - -/////////////////////////////////////////////////////////////////////// -void unqueue(ll, prio){ - if (LL_0_1_elements(ll) - flags[prio>>5] &= ~(1 << (prio & 0x1F)) - LL_remove(ll); -} - -/////////////////////////////////////////////////////////////////////// -int run(struct TCB *th, int x){ - if (th->prio >= ready.next->prio){ - th->status=THS_READY; - enqueue(th); - CpuResumeIntr(x); - return KE_OK; - }else{ - ready.next->status=THS_READY; - enqueue2(ready.next); - th->status=THS_RUN; - ready->prev=th; - return syscall_32(0, 0, x, 0); - } -} - -/////////////////////////////////////////////////////////////////////// -int getHighestUsed(){ - int i; - for (i=0; i<4; i++) - if (flags[i]) - return (i<<5)+getHighestUsed_32(flags[i]); - return 128; //LOWEST_PRIORITY+2 -} - -/////////////////////////////////////////////////////////////////////// -void switch(){ - int hp; - - ready.prev=ready.next; - if (ready.next->status != THS_RUN){ - if (unk3 & 4) - Kprintf(" not THS_RUN "); - hp=getHighestUsed(); - if (hp<128){ - if (unk3 & 4) - Kprintf(" readyq = %x, newrun = %x:%d, prio = %d", - &prio_lists[hp], prio_lists[hp].next, prio_lists[hp].next->id, hp); - unqueue(prio_lists[hp].next, hp); - prio_lists[hp].next->status=THS_RUN; - ready.prev=prio_lists[hp].next; - }else - Kprintf("Panic: not found executable Thread\n"); - }else - if ((hp=getHighestUsed())<128){ - if (unk3 & 4) - Kprintf(" THS_RUN cp=%d : hp=%d ", ready.next->prio, hp); - if (hpprio){ - if (unk3 & 4) - Kprintf(" readyq = %x, newrun = %x:%d, prio = %d", - &prio_list[hp], prio_list[hp].next, prio_list[hp].next->id, hp); - unqueue(prio_list[hp].next, hp); - prio_list[hp].next->status=ready.next->status; - ready.prev=prio_lists[hp].next; - ready.next->status=THS_READY; - enqueue2(ready.next); - } - }else - Kprintf("Panic: not found ready Thread\n"); - if (unk3 & 4) - Kprintf("\n"); -} - -/////////////////////////////////////////////////////////////////////// -void stack_overflow(struct TCB *th){ - register ImageInfo ii; - register char *name; - Kprintf("\nThread (thid=%x, #%d) stack overflow\n Stack = %x, Stack size = %x, SP=%x\n", - (th<<5) | ((th->id & 0x3F) << 1) | 1, th->id & 0xFFFF, th->stack, th->thp_stackSize, th->area); - if ((ii=loadcore_call24_findImageInfo(th->thp_entry)) && - (name=ii->H04)) - Kprintf(" Module Name = %s\n", name); - __asm break #0x400 -); - -/////////////////////////////////////////////////////////////////////// -struct TCB *handler1_switchcontexts(struct AREA *area){ - s0=&unk4; - unk4++; - if (unk3 & 3){ - if (1==unk3 & 3) - Kprintf("[%3d->", ready.next->id); - if (2==unk3 & 3) - Kprintf("switch_context(%x:%x,pc=%x,ei=%x =>%x:%d)\n", - area, area->field_00, area->entry, area->ei, ready.next, ready.next->id); - } - ready.next->area=area; - if (area < ready.next->stack) - stack_overflow(ready.next); - if (ready.prev->next==NULL) - switch(); - if (ready.prev != ready.next){ - s0=GetTimerCounter(timid); - ready.next->field_30=moveregs(0, s0-www.prev, ready.next->field_30); - www.prev=s0; - } - if (unk3 & 3){ - if (unk3 & 3 == 1) - Kprintf("%3d]", ready.prev->id); - if (unk3 & 3 == 2) - Kprintf(" switch_context --> %x:%x,pc=%x,ei=%x =>%x:%d\n" - ready.prev->area, ready.prev->area->field_00, ready.prev->area->entry, - ready.prev->area->ei, ready.prev, ready.prev->id); - } - if (unk3 & 0x20){ - 0xBF802070=~(1 << ((ready.prev->id-1) & 7)); - } - return ready.prev; -} - -/////////////////////////////////////////////////////////////////////// -int handler2_morethan1ready(){ - return (0 < (ready.prev^ready.next)); - //return (ready.prev!=ready.next); -} - -/////////////////////////////////////////////////////////////////////// -void queue_on_prio(struct TCB *th, void *fld, int prio){ - register struct TCB *p; - - LL_remove(th); - for (p=fld->H14; p !=&fld->H14 && prio>=p->prio; p=p->next); - LL_add_before(p, th); -} - -///////////////////////////////////////////////////////////////////////[04] -int CreateThread(struct ThreadParam *param){ - int x; - register struct TCB *th; - - if (QueryIntrContext()) return KE_ILLEGAL_CONTEXT; - if (param->attr & 0x1CFFFFF7) return KE_ILLEGAL_ATTR; - if (param->initPriority-1>=126) return KE_ILLEGAL_PRIORITY; - if (param->entry & 3) return KE_ILLEGAL_ENTRY; - if (param->stackSize<0x130) return KE_ILLEGAL_STACK_SIZE; - - CpuSuspendIntr(&x); - if (th=allocheap(0x7F01, sizeof(struct TCB))){ //0x50 - param->stackSize = (param->stackSize+0xFF) & 0xFFFFFF00; - stack=AllocSysMemory(ALLOC_LAST, param->stackSize, NULL); - if (!stack) - freeheap(th); - } - if (!th || !stack){ - CpuResumeIntr(x); - return KE_NO_MEMORY; - } - th->id=++ids; - th->thp_entry=param->entry; - th->stack=stack; - th->thp_stackSize; - th->thp_priority=param->initPriority; - th->thp_attr=attr; - th->status=THS_DORMANT; - th->thp_option=param->option; - th->gp=$gp; - th->next_2=&_2; - _2.next=th; - LL_add_before(threads_list, th); - if (!(th->thp_attr & TH_NO_FILLSTACK)) - memset(th->stack, 0xFF, th->thp_stackSize-48); - CpuResumeIntr(x); - return ((int)th<<5) | ((th->id & 0x3F) << 1) | 1; -} - -///////////////////////////////////////////////////////////////////////[05] -int DeleteThread(int thid){ - int x; - register struct TCB *th, *p; - - if (QueryIntrContext()) return KE_ILLEGAL_CONTEXT; - if (thid==0) return KE_ILLEGAL_THID; - - CpuSuspendIntr(&x); - th=(struct TCB *)(thid>>7<<2); - if ((th->_7F01 != 0x7F01) || - (((thid>>1) & 0x3F) != (th->id & 0x3F)) || - (_2.prev == th)){ - CpuResumeIntr(x); - return KE_UNKNOWN_THID; - } - if (th->status != THS_DORMANT){ - CpuResumeIntr(x); - return KE_NOT_DORMANT; - } - FreeSysMemory(th->stack); - LL_remove(th); - - if (_2.next==th) - _2.next=th->next_2; - else - for (p=_2.next; p->next_2; p=p->next_2) - if (p->next_2==th){ - p->next_2=th->next_2; - break; - } - - freeheap(th); - CpuResumeIntr(x); - return KE_OK; -} - -/////////////////////////////////////////////////////////////////////// -int startThread(struct TCB *th,int x){ - th->field_1C=0; - th->field_20=0; - th->field_1E=0; - th->prio=thp_priority; - th->area->field_00=0xFFFFFFFE; - th->area->field_78=th->area->field_74=&th->area->regs; - th->area->ExitThread=ExitThread; - th->area->gp=th->gp; - th->area->attr=(th->attr & TH_COP) | 0x404; - th->area->attr|=th->attr & TH_UMODE; - th->area->entry->th->thp_entry; - th->ei=1; - LL_remove(th); - return run(th, x); -} - -///////////////////////////////////////////////////////////////////////[06] -int StartThread(int thid,u_long arg){ - int x; - register struct TCB *th, *p; - - if (QueryIntrContext()) return KE_ILLEGAL_CONTEXT; - if (thid==0) return KE_ILLEGAL_THID; - - CpuSuspendIntr(&x); - th=(struct TCB *)(thid>>7<<2); - if ((th->_7F01 != 0x7F01) || - (((thid>>1) & 0x3F) != (th->id & 0x3F))){ - CpuResumeIntr(x); - return KE_UNKNOWN_THID; - } - if (th->status != THS_DORMANT){ - CpuResumeIntr(x); - return KE_NOT_DORMANT; - } - th->area = th->stack + ((th->thp_stackSize >> 2) << 2) - 0xB8; - memset(th->area, 0, 0xB8); - th->area->arg=arg; - return startThread(th, x); -} - -///////////////////////////////////////////////////////////////////////[07] -int StartThreadArgs(int thid,int args,void *argp){ - int x; - register struct TCB *th, *p; - register void *_argp; - - if (QueryIntrContext()) return KE_ILLEGAL_CONTEXT; - if (thid==0) return KE_ILLEGAL_THID; - - CpuSuspendIntr(&x); - th=(struct TCB *)(thid>>7<<2); - if ((th->_7F01 != 0x7F01) || - (((thid>>1) & 0x3F) != (th->id & 0x3F))){ - CpuResumeIntr(x); - return KE_UNKNOWN_THID; - } - if (th->status != THS_DORMANT){ - CpuResumeIntr(x); - return KE_NOT_DORMANT; - } - - _argp=th->stack + ((th->thp_stackSize >> 2) - ((args+3) >> 2)) << 2 - if (args>0 && argp) - memcpy(_argp, argp, args); - - memset(th->area, 0, 0xB8); //BUG: these instructions should be switched! - th->area = th->stack + ((th->thp_stackSize >> 2) << 2) - 0xB8; - - th->area->arg =args; - th->area->argp=_argp; - return startThread(th, x); -} - -///////////////////////////////////////////////////////////////////////[08] -int ExitThread(){ - th=ready->next; - if (QueryIntrContext()) return KE_ILLEGAL_CONTEXT - CpuSuspendIntr(&x); - th->status=THS_DORMANT; - LL_add_before(&threads_list, th); - a0=0; - do{ - ready.prev=0; - syscall_32(0, 0, x, 0); - Kprintf("panic ! Thread DORMANT !\n"); - __asm break #0x400 - while(1); -} - -///////////////////////////////////////////////////////////////////////[09] -int ExitDeleteThread(){ - return KE_ERROR; -} - -///////////////////////////////////////////////////////////////////////[10] -int TerminateThread(int thid){ - int x; - register struct TCB *th, *p; - - if (QueryIntrContext()) return KE_ILLEGAL_CONTEXT; - if (thid==0) return KE_ILLEGAL_THID; - - CpuSuspendIntr(&x); - th=(struct TCB *)(thid>>7<<2); - if (ready.next==th){ - CpuResumeIntr(x); - return KE_ILLEGAL_THID; - } - if ((th->_7F01 != 0x7F01) || - (((thid>>1) & 0x3F) != (th->id & 0x3F))){ - CpuResumeIntr(x); - return KE_UNKNOWN_THID; - } - if (th->status == THS_DORMANT){ - CpuResumeIntr(x); - return KE_DORMANT; - } - LL_remove(th); - if (th->status==THS_WAIT) - if (th->field_1C==2) - CancelAlarm(alarmhandler, th); - else - if (th->field_1C>=2) && (th->field_1C<8) - th->field_20->H10--; - th->status=THS_DORMANT; - LL_add_before(&threads_list, th); - - CpuResumeIntr(x); - return KE_OK; -} - -/////////////////////////////////////////////////////////////////////// -void LL_add_before(struct ll *list, struct ll *new){ - new->next=list; - new->prev=list->prev; - list->prev=new; - new->prev->next=new; -} - -///////////////////////////////////////////////////////////////////////:) -int getHighestUsed_32(int flags_32){ - v=-4; - do{ - i=flags_32<<28; - flags_32>>=4; - v+=4; - }while(i==0); - return v + ((0x1020103 >> ((i>>26) & 0x1C)) & 0xF); -} - -#endif diff --git a/unfree/fps2bios/kernel/iopload/timrman/Makefile b/unfree/fps2bios/kernel/iopload/timrman/Makefile deleted file mode 100644 index 6a96bc972..000000000 --- a/unfree/fps2bios/kernel/iopload/timrman/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/TIMRMAN - -IOP_INCS += -I../include - -IOP_OBJS = timrman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/timrman/timrman.c b/unfree/fps2bios/kernel/iopload/timrman/timrman.c deleted file mode 100644 index b4de66924..000000000 --- a/unfree/fps2bios/kernel/iopload/timrman/timrman.c +++ /dev/null @@ -1,234 +0,0 @@ -//[module] TIMEMANI -//[processor] IOP -//[type] ELF-IRX -//[name] Timer_Manager -//[version] 0x101 -//[memory map] 0xBF801100, 0xBF801110, 0xBF801120, -// 0xBF801450 -// 0xBF801480, 0xBF801490, 0xBF8014A0, -// 0xBF8014B0, 0xBF8014C0 -//[handlers] - -//[entry point] timrman_start, timrman_stub -//[made by] [RO]man (roman_ps2dev@hotmail.com) 13 October 2002 - -#include - -#include "iopdebug.h" -#include "kloadcore.h" -#include "kintrman.h" - -#include "err.h" -#include "ktimrman.h" - -#define CONFIG_1450 (*(volatile int*)0xBF801450) - -struct TIMRMAN{ - int hwreg; - char source, size; - short prescale; - int allocated; -} t[6]={ -{RTC2, TC_SYSCLOCK, TIMER_SIZE_16, TIMER_PRESCALE_8, 0}, -{RTC5, TC_SYSCLOCK, TIMER_SIZE_32, TIMER_PRESCALE_256, 0}, -{RTC4, TC_SYSCLOCK, TIMER_SIZE_32, TIMER_PRESCALE_256, 0}, -{RTC3, TC_SYSCLOCK|TC_HLINE, TIMER_SIZE_32, TIMER_PRESCALE_1, 0}, -{RTC0, TC_SYSCLOCK|TC_PIXEL|TC_HOLD, TIMER_SIZE_16, TIMER_PRESCALE_1, 0}, -{RTC1, TC_SYSCLOCK|TC_HLINE|TC_HOLD, TIMER_SIZE_16, TIMER_PRESCALE_1, 0} -}; - -int _start(int argc, char* argv[]); - -///////////////////////////////////////////////////////////////////////[03] -void *GetTimersTable(){ - return t; //address of the array -} - -///////////////////////////////////////////////////////////////////////[04] -int AllocHardTimer(int source, int size, int prescale){ - register int i; - int x; - - if (QueryIntrContext()) return ERROR_INTR_CONTEXT; //intrman - - CpuSuspendIntr(&x); //intrman - - for (i=0; i<6; i++) - if (!t[i].allocated && (t[i].source & source) && - (t[i].size==size) && (t[i].prescale>=prescale)){ - t[i].allocated++; //u8 - CpuResumeIntr(x); //intrman - return t[i].hwreg>>2; - } - - CpuResumeIntr(x); //intrman - return ERROR_NO_TIMER; -} - -///////////////////////////////////////////////////////////////////////[05] -int ReferHardTimer(int source, int size, int mode, int modemask){ - register int i; - int x; - - if (QueryIntrContext()) return ERROR_INTR_CONTEXT; //intrman - - CpuSuspendIntr(&x); //intrman - - for (i=0; i<6; i++) - if (t[i].allocated && (t[i].source & source) && (t[i].size==size) && - (int)(GetTimerStatus(t[i].hwreg>>2) & modemask)==mode){ - t[i].allocated++; //u8 - CpuResumeIntr(x); //intrman - return t[i].hwreg>>2; - } - - CpuResumeIntr(x); //intrman - return ERROR_NO_TIMER; -} - -///////////////////////////////////////////////////////////////////////[10] -int GetHardTimerIntrCode(int timid){ - switch(timid<<2){ - case RTC2: return INT_RTC2; - case RTC0: return INT_RTC0; - case RTC1: return INT_RTC1; - - case RTC4: return INT_RTC4; - case RTC3: return INT_RTC3; - case RTC5: return INT_RTC5; - } - return ERROR_UNK; -} - -///////////////////////////////////////////////////////////////////////[06] -int FreeHardTimer(int timid){ - register int i; - int x; - - if (QueryIntrContext()) return ERROR_INTR_CONTEXT; //intrman - - for (i=0; i<6; i++) - if (t[i].hwreg==(timid<<2)) - break; - - if ((i<6) && (t[i].allocated)){ - CpuSuspendIntr(&x); //intrman - t[i].allocated--; - CpuResumeIntr(x); //intrman - return ERROR_OK; - } - return ERROR_NO_TIMER; - -} - -///////////////////////////////////////////////////////////////////////[07] -void SetTimerMode(int timid, int mode){ - *(volatile short*)((timid<<2)+4) = mode; -} - -///////////////////////////////////////////////////////////////////////[08] -unsigned int GetTimerStatus(int timid){ - return *(volatile unsigned short*)((timid<<2)+4); -} - -///////////////////////////////////////////////////////////////////////[09] -void SetTimerCounter(int timid, unsigned int count){ - if ((timid<<2) < RTC3) - *(volatile short*)((timid<<2)+0)=count; - else - *(volatile int*)((timid<<2)+0)=count; -} - -///////////////////////////////////////////////////////////////////////[0A] -unsigned int GetTimerCounter(int timid){ - if ((timid<<2) < RTC3) - return *(volatile short*)((timid<<2)+0); - else - return *(volatile int*)((timid<<2)+0); -} - -///////////////////////////////////////////////////////////////////////[0B] -void SetTimerCompare(int timid, unsigned int compare){ - if ((timid<<2)+8 < RTC3) - *(volatile short*)((timid<<2)+8)=compare; - else - *(volatile int*)((timid<<2)+8)=compare; -} - -///////////////////////////////////////////////////////////////////////[0C] -unsigned int GetTimerCompare(int timid){ - if ((timid<<2)+8 < RTC3) - return *(volatile short*)((timid<<2)+8); - else - return *(volatile int*)((timid<<2)+8); -} - -///////////////////////////////////////////////////////////////////////[0D] -void SetHoldMode(int holdnum, int mode){ - RTC_HOLDMODE=(RTC_HOLDMODE & - ( ~(0xF << (holdnum*4)))) | - ((mode & 0xF) << (holdnum*4)); -} - -///////////////////////////////////////////////////////////////////////[0E] -unsigned long GetHoldMode(int holdnum){ - return (RTC_HOLDMODE >> (holdnum*4)) & 0xF; -} - -///////////////////////////////////////////////////////////////////////[0F] -unsigned long GetHoldReg(int holdnum){ - return *(volatile unsigned int*)(RTC_HOLDREGS + (holdnum*4)); -} - -///////////////////////////////////////////////////////////////////////[01,02] -void _retonly(){} - -//////////////////////////////entrypoint/////////////////////////////// -struct export timrman_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "timrman", - (func)_start, // entrypoint - (func)_retonly, - (func)_retonly, - (func)GetTimersTable, - (func)AllocHardTimer, - (func)ReferHardTimer, - (func)FreeHardTimer, - (func)SetTimerMode, - (func)GetTimerStatus, - (func)SetTimerCounter, - (func)GetTimerCounter, - (func)SetTimerCompare, - (func)GetTimerCompare, - (func)SetHoldMode, - (func)GetHoldMode, - (func)GetHoldReg, - (func)GetHardTimerIntrCode, - 0 -}; - -//////////////////////////////entrypoint///////////////////////////////[00] -int _start(int argc, char* argv[]){ - int i; - u32 PRid; - - __asm__ ( - "mfc0 %0, $15\n" - : "=r"(PRid) : - ); - - - if ((PRid<0x10) || (CONFIG_1450 & 8)) return 1; - - for (i=5; i>=0; i--) t[i].allocated=0; - - if( RegisterLibraryEntries(&timrman_stub) > 0 ) - return 1; - - EnableIntr(INT_RTC5); - - return 0; //loadcore -} - diff --git a/unfree/fps2bios/kernel/iopload/vblank/Makefile b/unfree/fps2bios/kernel/iopload/vblank/Makefile deleted file mode 100644 index 4c00e2de0..000000000 --- a/unfree/fps2bios/kernel/iopload/vblank/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -IOP_BIN = ../../../build/VBLANK - -IOP_INCS += -I../include - -IOP_OBJS = vblank.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_sysclib.o ../libkernel/iop_thbase.o ../libkernel/iop_thevent.o - -all: $(IOP_BIN) - -clean: - rm -f -r $(IOP_OBJS) $(IOP_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.iopglobal diff --git a/unfree/fps2bios/kernel/iopload/vblank/vblank.c b/unfree/fps2bios/kernel/iopload/vblank/vblank.c deleted file mode 100644 index 142acf8c9..000000000 --- a/unfree/fps2bios/kernel/iopload/vblank/vblank.c +++ /dev/null @@ -1,300 +0,0 @@ -#include "kloadcore.h" -#include "kintrman.h" -#include "ksysclib.h" -#include "kthbase.h" -#include "thevent.h" -#include "err.h" - -#define _dprintf(fmt, args...) \ - __printf("vblank: " fmt, ## args) - -struct DCLL -{ - struct DCLL *next; - struct DCLL *prev; - int priority; - int (*function)(); - void *this; //'this' style pointer -}; //intrh_vblank, intrh_evblank, vblank_0, vblank_1 - //cannot access global v -struct VBHS -{ - int statusFlag; //set to 0 in 'start' function - int count; - struct DCLL list0; //sentinel, dummy list head (interrupt 0 vblank) - struct DCLL list11; //sentinel, dummy list head (interrupt 11 evblank) - struct DCLL free; //available blocks - struct DCLL items[16]; -} v; - -int _start(); -struct VBHS *return_v(); -int WaitVblankStart(); -int WaitVblankEnd(); -int WaitVblank(); -int WaitNonVblank(); -int RegisterVblankHandler(int number, int priority, int (*)(struct VBHS *), struct VBHS*); -int ReleaseVblankHandler(int number, int (*)(struct VBHS *)); - -void DCLL_del(struct DCLL *list); -void DCLL_add_before(struct DCLL *list, struct DCLL *new); -void DCLL_add_after(struct DCLL *list, struct DCLL *new); - -/////////////////////////////////////////////////////////////////////// -struct VBHS *return_v(){ - return &v; -} - -/////////////////////////////////////////////////////////////////////// -int RegisterVblankHandler(int number, int priority, int (*handler)(struct VBHS *), struct VBHS* this) -{ - struct DCLL *p, *list; - u32 x; - - if (QueryIntrContext()){ - _dprintf("%s - ERROR_INTR_CONTEXT\n", __FUNCTION__); - return ERROR_INTR_CONTEXT; - } - CpuSuspendIntr(&x); - - if (DCLL_is_only_sentinel(&v.free)){ - CpuResumeIntr(x); - _dprintf("%s - ERROR_NO_MEM\n", __FUNCTION__); - return ERROR_NO_MEM; - } - - list=(number? &v.list11 : &v.list0); //which list: 0 or 11? - p=list->next; - if (p != list){ //search for an existing instance in the list - do{ - if (p->function == handler){ - CpuResumeIntr(x); //intrman - return ERROR_DOES_EXIST;//already added - } - p=p->next; - }while(p != list); - p = list->next; - } - while (p != list){ // while we have elements in list ... - if (priority < p->priority) - break; //greater priority - p=p->next; - } - - struct DCLL* node = v.free.next; - DCLL_del(node); - node->function=handler; - node->this =this; - node->priority=priority; - DCLL_add_after(p, node); - - CpuResumeIntr(x); - return ERROR_OK; -} - -/////////////////////////////////////////////////////////////////////// -int ReleaseVblankHandler(int number, int (*handler)(struct VBHS *)){ - struct DCLL *p, *list; - u32 x; - - if (QueryIntrContext()) - return ERROR_INTR_CONTEXT; - CpuSuspendIntr(&x); - - for (list=(number?&v.list11:&v.list0), p=list->next; p!=list; p=p->next) - if (p->function == handler){ //bingo - DCLL_del(p); - DCLL_add_before(&v.free, p); - - CpuResumeIntr(x); - return ERROR_OK; - } - - CpuResumeIntr(x); - return ERROR_DOESNOT_EXIST; //not found -} - -/////////////////////////////////////////////////////////////////////// -int intrh_vblank(struct VBHS *m) -{ - struct DCLL *p; - struct DCLL *cp; - - if (m->count++ == 0){ - iSetEventFlag(GetSystemStatusFlag(), 0x200); - } - - for (p = m->list0.next; p != &(m->list0); p = cp){ - cp=p->next; - if ((p->function)(p->this)==0){ - DCLL_del(p); - DCLL_add_before(&m->free, p); - } - } - return 1; -} - -/////////////////////////////////////////////////////////////////////// -int intrh_evblank(struct VBHS *m) -{ - struct DCLL *p, *cp; - _dprintf("%s\n", __FUNCTION__); - - for (p=m->list11.next; p != &m->list11; p=cp ){ - cp=p->next; - if ((p->function)(p->this)==0){ - DCLL_del(p); - DCLL_add_before(&m->free, p); - } - } - - return 1; -} - -/////////////////////////////////////////////////////////////////////// -int vblankh_0(struct VBHS *m) -{ -// _dprintf("%s\n", __FUNCTION__); - - iSetEventFlag(m->statusFlag, 1); // 0001b //thevent - iSetEventFlag(m->statusFlag, 2); // 0010b //thevent - iClearEventFlag(m->statusFlag, ~(1|8));//~(1001b)=0xFFFFFFF6//thevent - return 1; -} - -/////////////////////////////////////////////////////////////////////// -int vblankh_1(struct VBHS *m) -{ - _dprintf("%s\n", __FUNCTION__); - - iSetEventFlag(m->statusFlag, 4); // 0100b //thevent - iSetEventFlag(m->statusFlag, 8); // 1000b //thevent - iClearEventFlag(m->statusFlag, ~(2|4));//~(0110b)=0xFFFFFFF9//thevent - return 1; -} - -/////////////////////////////////////////////////////////////////////// -int WaitVblankStart(){ - return WaitEventFlag(v.statusFlag, 1, 1, 0); //thevent -} - -/////////////////////////////////////////////////////////////////////// -int WaitVblankEnd(){ - return WaitEventFlag(v.statusFlag, 4, 1, 0); //thevent -} - -/////////////////////////////////////////////////////////////////////// -int WaitVblank(){ - return WaitEventFlag(v.statusFlag, 2, 1, 0); //thevent -} - -/////////////////////////////////////////////////////////////////////// -int WaitNonVblank(){ - return WaitEventFlag(v.statusFlag, 8, 1, 0); //thevent -} - -/////////////////////////////////////////////////////////////////////// -//static allocated Double Cyclic sentinel priority Linked List (whew)// -/////////////////////////////////////////////////////////////////////// -void DCLL_make_sentinel(struct DCLL *list){ - list->next=list; - list->prev=list; -} - -/////////////////////////////////////////////////////////////////////// -int DCLL_is_only_sentinel(struct DCLL *list){ - return (list->next == list); -} - -/////////////////////////////////////////////////////////////////////// -// x <-> list <-> y -// becomes -// x <-> y -void DCLL_del(struct DCLL *list) -{ - struct DCLL* x = list->prev; - struct DCLL* y = list->next; - x->next = y; - y->prev = x; -} - -/////////////////////////////////////////////////////////////////////// -void DCLL_add_before(struct DCLL *list, struct DCLL *new) -{ - new->next=list; - new->prev=list->prev; - list->prev=new; - new->prev->next=new; -} - -// -// list <-> x -// list <-> new <-> x -void DCLL_add_after(struct DCLL *list, struct DCLL *new) -{ - struct DCLL *x = list->next; - new->prev = list; - new->next = x; - list->next = new; - x->prev = new; -} - -void _retonly(){} - -//////////////////////////////entrypoint/////////////////////////////// -struct export export_stub={ - 0x41C00000, - 0, - VER(1, 1), // 1.1 => 0x101 - 0, - "vblank\0\0", - (func)_start, // entrypoint - (func)_retonly, - (func)_retonly, - (func)return_v, - (func)WaitVblankStart, // 4 - (func)WaitVblankEnd, // 5 - (func)WaitVblank, // 6 - (func)WaitNonVblank, // 7 - (func)RegisterVblankHandler, // 8 - (func)ReleaseVblankHandler, // 9 - 0 // end of list -}; - -//////////////////////////////entrypoint/////////////////////////////// -int _start(){ - iop_event_t e; - u32 x; - int i; - - CpuSuspendIntr(&x); - - if (RegisterLibraryEntries(&export_stub)){ - CpuResumeIntr(x); - return 1; - } - - memset(&v, 0, sizeof(struct VBHS)); // 352 //sysclib - DCLL_make_sentinel(&v.list0); - DCLL_make_sentinel(&v.list11); - DCLL_make_sentinel(&v.free); - for (i=0; i<16; i++){ //link 16 elements - DCLL_add_after(&v.free, &v.items[i]);//to 'available' list - } - - e.bits=0; - e.attr=2; - e.option=0; - CreateEventFlag(&e); //thevent - - v.statusFlag=0; - RegisterVblankHandler(0, 128, vblankh_0, &v); - RegisterVblankHandler(1, 128, vblankh_1, &v); - RegisterIntrHandler( 0, 1, (intrh_func)intrh_vblank, &v); - RegisterIntrHandler(11, 1, (intrh_func)intrh_evblank,&v); - EnableIntr(0); - EnableIntr(11); - - CpuResumeIntr(x); - return 0; -} diff --git a/unfree/fps2bios/kernel/iopstart.c b/unfree/fps2bios/kernel/iopstart.c deleted file mode 100644 index f872ab81a..000000000 --- a/unfree/fps2bios/kernel/iopstart.c +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include "romdir.h" - -static void Kputc(u8 c) { - *((u8*)0x1f80380c) = c; -} - -static void Kputs(u8 *s) { - while (*s != 0) { - Kputc(*s++); - } -} - -static void Kmemcpy(void *dest, const void *src, int n) { - const u8 *s = (u8*)src; - u8 *d = (u8*)dest; - - while (n) { - *d++ = *s++; n--; - } -} - -static void _iopstart() { - struct rominfo ri; - u8 *str; - - // setup iop - *(char*)0xbf802070 = 9; - *(int*)0xfffe0130 = 0xcc4; - *(int*)0xfffe0130 = 0xcc0; - if( (*(int*)0xbf801450) & 8 ) - *(int*)0xfffe0130 = 0x1e988; - else - *(int*)0xfffe0130 = 0x1edd8; - - romdirGetFile("ROMVER", &ri); - str = (u8*)(0xbfc00000 + ri.fileOffset); - Kputs("iopstart: fps2bios v"); - Kputc(str[1]); Kputc('.'); Kputc(str[3]); Kputc('\n'); - - // note, IOPBOOT has to be linked at location ri.fileOffset=0x600!! - romdirGetFile("IOPBOOT", &ri); - - Kputs("_iopstart: loading IOPBOOT to 0xbfc0a180\n"); - //Kmemcpy((void*)0x80000000, (void*)(0xbfc00000 + ri.fileOffset), ri.fileSize); - - __asm__ ( - "li $a0, 2\n" // 2Mb - "move $a1, $0\n" - "move $a2, $0\n" - "move $a3, $0\n" - "move $26, %0\n" - "jr $26\n" - "nop\n" : : "r"(0xbfc00000+ri.fileOffset)); - for (;;); -} - -__asm__ ( - ".global iopstart\n" - "iopstart:\n" - "li $sp, 0x001fffc0\n" // (2<<20)-0x40 - "move $fp, $sp\n" - "j _iopstart\n" - "nop\n"); - - diff --git a/unfree/fps2bios/kernel/linkfile b/unfree/fps2bios/kernel/linkfile deleted file mode 100644 index 89f7659a9..000000000 --- a/unfree/fps2bios/kernel/linkfile +++ /dev/null @@ -1,53 +0,0 @@ -_stack_size = 0x80000; -_heap_size = 1024*1024*10; - -ENTRY(_start); -SECTIONS { - - .text 0xbfc00000 : { - start.iop.o - *(.text) - *(.rodata) - } - .reginfo ALIGN(128) : { - *(.reginfo) - } - .data ALIGN(128) : { - *(.data) - } - .rdata ALIGN(128) : { - *(.rdata) - } - _gp = ALIGN(128) + 0x7ff0; - .lit4 ALIGN(128) : { - *(.lit4) - } - .lit8 ALIGN(128) : { - *(.lit8) - } - .sdata ALIGN(128) : { - *(.sdata) - } - - .sbss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - _fbss = . ; - *(.scommon) - *(.sbss) - } - .bss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(.bss) - } - .COMMON ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(COMMON) - } - _end_bss = . - 4; - _stack = .; - . += _stack_size ; - _end_stack = . - 8*5; - _end = . ; - __lc_bh = . ; - . += _heap_size ; - __lc_eh = .; - -} - diff --git a/unfree/fps2bios/kernel/romdir.c b/unfree/fps2bios/kernel/romdir.c deleted file mode 100644 index 71e8bab8b..000000000 --- a/unfree/fps2bios/kernel/romdir.c +++ /dev/null @@ -1,43 +0,0 @@ -/*************************************************************** -* romdir.c, based over Alex Lau (http://alexlau.8k.com) RomDir * -****************************************************************/ -#include "romdir.h" - -struct romdir *romdirInit() { - u8 *mem; - - for (mem=(u8*)0xbfc00000; (u32)mem<0xbfc01000; mem++) { - if (mem[0] == 'R' && mem[1] == 'E' && - mem[2] == 'S' && mem[3] == 'E' && - mem[4] == 'T') - break; - } - if ((u32)mem == 0xbfc01000) return NULL; - - return (struct romdir*)mem; -} - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri) { - struct romdir *rd; - struct romdir *base; - int i; - - base = romdirInit(); - if (base == NULL) return NULL; - - ri->fileOffset = 0; - for (rd = base; rd->fileName[0] != 0; rd++) { - for (i=0; i<10 && name[i] != 0; i++) { - if (rd->fileName[i] != name[i]) break; - } - if (rd->fileName[i] != name[i]) { - ri->fileOffset+= (rd->fileSize + 15) & ~0xF; - continue; - } - - ri->fileSize = rd->fileSize; - return ri; - } - - return NULL; -} diff --git a/unfree/fps2bios/kernel/romdir.h b/unfree/fps2bios/kernel/romdir.h deleted file mode 100644 index ef03a3223..000000000 --- a/unfree/fps2bios/kernel/romdir.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ROMDIR_H__ -#define __ROMDIR_H__ - -#include - -struct romdir { - /*following variable must place in designed order*/ - u8 fileName[10]; - u16 extInfoSize; - u32 fileSize; -} __attribute__ ((packed)); - -struct rominfo { - u32 fileOffset; - u32 fileSize; -}; - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri); - -#endif /* __ROMDIR_H__ */ diff --git a/unfree/fps2bios/kernel/start.c b/unfree/fps2bios/kernel/start.c deleted file mode 100644 index 33481cb49..000000000 --- a/unfree/fps2bios/kernel/start.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -void eestart() __attribute__ ((noreturn)); -void iopstart() __attribute__ ((noreturn)); - -__asm__ ( - ".org 0\n" - ".set noat\n" - - ".global _start\n" - "_start:\n" - "mfc0 $at, $15\n" - "sltiu $at, 0x59\n" - "bne $at, $0, __iopstart\n" - "j eestart\n" - "nop\n" - "__iopstart:\n" - "j iopstart\n" - "nop\n"); - - -/* -void _start() __attribute__ ((noreturn)); -void _start() { - register unsigned long PRid; - - __asm__ ("mfc0 %0, $15" : "=r"(PRid) : ); - if (PRid >= 0x59) eestart(); - else iopstart(); -}*/ - diff --git a/unfree/fps2bios/loader/Makefile b/unfree/fps2bios/loader/Makefile deleted file mode 100644 index 17f87ae2f..000000000 --- a/unfree/fps2bios/loader/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# _____ ___ ____ -# ____| | ____| PSX2 OpenSource Project -# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com ) -# ------------------------------------------------------------------------ - -LOADER_BIN = ../build/LOADER - -EE_INCS += -Iinclude - -EE_LIBS += -lkernel -lmc -lkernel -lpad -lc -lkernel - -EE_OBJS = loader.o menu.o eedebug.o crt0.o romdir.o - -$(LOADER_BIN): $(EE_OBJS) - $(EE_CC) -nostartfiles -Tlinkfile $(EE_CFLAGS) \ - -o $(LOADER_BIN) $(EE_OBJS) $(EE_LDFLAGS) $(EE_LIBS) - -clean: - rm -f -r $(EE_OBJS) $(LOADER_BIN) - -include $(PS2SDK)/Defs.make -include $(PS2SDK)/samples/Makefile.pref -include $(PS2SDK)/samples/Makefile.eeglobal diff --git a/unfree/fps2bios/loader/crt0.s b/unfree/fps2bios/loader/crt0.s deleted file mode 100644 index 19d1657b9..000000000 --- a/unfree/fps2bios/loader/crt0.s +++ /dev/null @@ -1,110 +0,0 @@ -.set noat -.set noreorder -.global _start - -.global FlushCache -.global Exit -.global SignalSema -.global _start -.global _exit - -.text - nop - nop -FlushCache: - li $3,100 - syscall - jr $31 - nop -Exit: - li $3,4 - syscall - jr $31 - nop -SignalSema: - li $3,66 - syscall - jr $31 - nop - - nop - nop -_start: - lui $2,%hi(_args_ptr) - addiu $2,$2, %lo(_args_ptr) - sw $4,($2) -# Clear bss -zerobss: - lui $2,%hi(_fbss) - lui $3,%hi(_end) - addiu $2,$2,%lo(_fbss) - addiu $3,$3,%lo(_end) -loop: - nop - nop - sq $0,($2) - sltu $1,$2,$3 - bne $1,$0,loop - addiu $2,$2,16 - -# Thread - lui $4,%hi(_gp) - addiu $4,$4,%lo(_gp) - lui $5,%hi(_stack) - addiu $5,$5,%lo(_stack) - lui $6,%hi(_stack_size) - addiu $6,$6,%lo(_stack_size) - lui $7,%hi(_args) - addiu $7,$7,%lo(_args) - lui $8,%hi(_root) - addiu $8,$8,%lo(_root) - move $28,$4 - addiu $3,$0,60 - syscall - move $29, $2 - -# Heap - addiu $3,$0,61 - lui $4,%hi(_end) - addiu $4,$4,%lo(_end) - lui $5,%hi(_heap_size) - addiu $5,$5,%lo(_heap_size) - syscall - nop - -# Cache - jal FlushCache - move $4,$0 - -# Jump main - ei - - lui $2,%hi(_args_ptr) - addiu $2,$2,%lo(_args_ptr) - lw $3,($2) - lui $2,%hi(_args) - addiu $2,$2,%lo(_args) - - lw $4, ($2) - jal main - addiu $5, $2, 4 -_root: -_exit: -# ??? - lui $2,%hi(_args_ptr) - addiu $2,$2,%lo(_args_ptr) - lw $3,($2) - jal SignalSema - lw $4,($3) -# Exit - addiu $3,$0,35 - syscall - nop - - .bss - .align 6 -_args: .space 256+16*4+4 - - .data -_args_ptr: - .space 4 diff --git a/unfree/fps2bios/loader/eedebug.c b/unfree/fps2bios/loader/eedebug.c deleted file mode 100644 index 8be3c068b..000000000 --- a/unfree/fps2bios/loader/eedebug.c +++ /dev/null @@ -1,31 +0,0 @@ - -#include -#include -#include - - -void __putc(u8 c) { - while (*((u32*)0x1000f130) & 0x8000) { __asm__ ("nop\nnop\nnop\n"); } - - *((u8*)0x1000f180) = c; -} - -void __puts(u8 *s) { - while (*s != 0) { - __putc(*s++); - } -} - -int __printf(const char *format, ...) { - char buf[4096]; - va_list args; - int ret; - - va_start(args, format); - ret = vsnprintf(buf, 4096, format, args); - va_end(args); - - __puts(buf); - return ret; -} - diff --git a/unfree/fps2bios/loader/include/eedebug.h b/unfree/fps2bios/loader/include/eedebug.h deleted file mode 100644 index 503f65e06..000000000 --- a/unfree/fps2bios/loader/include/eedebug.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __EEDEBUG_H__ -#define __EEDEBUG_H__ - -#include -#include - - -void __putc(u8 c); -void __puts(u8 *s); -int __printf(const char *format, ...); - -#endif /* __EEDEBUG_H__ */ diff --git a/unfree/fps2bios/loader/include/menu.h b/unfree/fps2bios/loader/include/menu.h deleted file mode 100644 index 6c08f4bdf..000000000 --- a/unfree/fps2bios/loader/include/menu.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __MENU_H__ -#define __MENU_H__ - -#include - -int menuStart(); - -#endif /* __MENU_H__ */ diff --git a/unfree/fps2bios/loader/include/romdir.h b/unfree/fps2bios/loader/include/romdir.h deleted file mode 100644 index ef03a3223..000000000 --- a/unfree/fps2bios/loader/include/romdir.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ROMDIR_H__ -#define __ROMDIR_H__ - -#include - -struct romdir { - /*following variable must place in designed order*/ - u8 fileName[10]; - u16 extInfoSize; - u32 fileSize; -} __attribute__ ((packed)); - -struct rominfo { - u32 fileOffset; - u32 fileSize; -}; - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri); - -#endif /* __ROMDIR_H__ */ diff --git a/unfree/fps2bios/loader/linkfile b/unfree/fps2bios/loader/linkfile deleted file mode 100644 index 29d72354c..000000000 --- a/unfree/fps2bios/loader/linkfile +++ /dev/null @@ -1,52 +0,0 @@ -_stack_size = 0x80000; -_heap_size = 1024*1024*10; - -ENTRY(_start); -SECTIONS { - - .text 0x00082000 : { - *(.text) - *(.rodata) - } - .reginfo ALIGN(128) : { - *(.reginfo) - } - .data ALIGN(128) : { - *(.data) - } - .rdata ALIGN(128) : { - *(.rdata) - } - _gp = ALIGN(128) + 0x7ff0; - .lit4 ALIGN(128) : { - *(.lit4) - } - .lit8 ALIGN(128) : { - *(.lit8) - } - .sdata ALIGN(128) : { - *(.sdata) - } - - .sbss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - _fbss = . ; - *(.scommon) - *(.sbss) - } - .bss ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(.bss) - } - .COMMON ALIGN(128) (NOLOAD) : { /* uninitialized data */ - *(COMMON) - } - _end_bss = . - 4; - _stack = .; - . += _stack_size ; - _end_stack = . - 8*5; - _end = . ; - __lc_bh = . ; - . += _heap_size ; - __lc_eh = .; - -} - diff --git a/unfree/fps2bios/loader/loader.c b/unfree/fps2bios/loader/loader.c deleted file mode 100644 index dad51eed3..000000000 --- a/unfree/fps2bios/loader/loader.c +++ /dev/null @@ -1,14 +0,0 @@ - -#include -#include -#include - -#include "eedebug.h" - - -void main() { - __printf("LOADER start\n"); - - menuStart(); -} - diff --git a/unfree/fps2bios/loader/menu.c b/unfree/fps2bios/loader/menu.c deleted file mode 100644 index bba7cf322..000000000 --- a/unfree/fps2bios/loader/menu.c +++ /dev/null @@ -1,20 +0,0 @@ - -#include -#include -#include -#include - -#include "eedebug.h" -#include "romdir.h" - - -int menuStart() { - - - __printf("%s\n", __FUNCTION__); - - - - return 0; -} - diff --git a/unfree/fps2bios/loader/romdir.c b/unfree/fps2bios/loader/romdir.c deleted file mode 100644 index e10d38027..000000000 --- a/unfree/fps2bios/loader/romdir.c +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************** -* romdir.c, based over Alex Lau (http://alexlau.8k.com) RomDir * -****************************************************************/ -#include "romdir.h" - -struct romdir *base = NULL; - -struct romdir *romdirInit() { - u8 *mem; - - for (mem=(u8*)0xbfc00000; (u32)mem<0xbfc01000; mem++) { - if (mem[0] == 'R' && mem[1] == 'E' && - mem[2] == 'S' && mem[3] == 'E' && - mem[4] == 'T') - break; - } - if ((u32)mem == 0xbfc01000) return NULL; - - return (struct romdir*)mem; -} - -struct rominfo *romdirGetFile(char *name, struct rominfo *ri) { - struct romdir *rd; -// struct romdir *base; - int i; - - if (base == NULL) { - base = romdirInit(); - if (base == NULL) return NULL; - } - - ri->fileOffset = 0; - for (rd = base; rd->fileName[0] != 0; rd++) { - for (i=0; i<10 && name[i] != 0; i++) { - if (rd->fileName[i] != name[i]) break; - } - if (rd->fileName[i] != name[i]) { - ri->fileOffset+= (rd->fileSize + 15) & ~0xF; - continue; - } - - ri->fileSize = rd->fileSize; - return ri; - } - - return NULL; -} diff --git a/unfree/fps2bios/ps2romgen.c b/unfree/fps2bios/ps2romgen.c deleted file mode 100644 index 822224b8f..000000000 --- a/unfree/fps2bios/ps2romgen.c +++ /dev/null @@ -1,80 +0,0 @@ -// little prog for bios image repack by Florin Sasu 2002-10-03 - -#include -#include - -struct romdir{ - char name[10]; - short ext; - int size; -} rd[200]; //increase the number if needed; 200 is enough - -char buffer[10000]; - -#define min(a,b) (a0){ - fwrite(buffer, 1, min(size, 10000), f); - size-=10000; - } -} - -void writefile(FILE *f, char *name, int offset, int size){ - FILE *fi=fopen(name, "rb"); - if (fi) fseek(fi, 0, SEEK_END); - if ((!fi) || (ftell(fi)!=size)){ - printf("Could not find a file %s of %d bytes\n", name, size); - if (fi) fclose(fi); - return; - } - - printf("%10s\t%8X\t%8X\n", name, offset, size); - fillfile(f, offset-ftell(f), 0); - fseek(fi, 0, SEEK_SET); - while (size>0){ - fread(buffer, 1, min(10000, size), fi); - fwrite(buffer, 1, min(10000, size), f); - size-=10000; - } - - fclose(fi); -} - -int main(int argc, char* argv[]){ - int i, n, offset; - FILE *f; -////////////////////////////////// - printf("PS2 ROMGEN v0.1 Florin Sasu 2002-10-03 (florinsasu@yahoo.com) no padding\n"); - if (argc<2){ - printf("Usage: ps2biosgen \n\tfilename=name of the biosfile to create\n"); - printf("\n\tPut in the same directory with ps2romgen all the files from bios\n"); - return 1; - } -////////////////////////////////// - f=fopen("ROMDIR", "rb"); - if (!f){ - printf("Could not find the ROMDIR file\n"); - return 1; - } - - for (n=0; !feof(f) && (fread(&rd[n], 16, 1, f)==1) && rd[n].name[0]; n++); - - fclose(f); -////////////////////////////////// - printf("\n Name Offset(hex) Size(hex)" - "\n----------------------------------------\n"); - f=fopen(argv[1], "wb"); - - for (i=0, offset=0; i -#include -#include -#include -#include - -#define MAXFILES 200 -#define DIRENTRY_SIZE 16 -#define BUFFSIZE 16384 - -struct __attribute__ ((__packed__)) romdir { - /*following variable must place in designed order*/ - char fileName[10]; - unsigned short extInfoSize; - unsigned long fileSize; -} rd; - -int main(int argc, char *argv[]) { - struct stat buf; - FILE *romdir; - FILE *extinfo; - int i, j; - - printf("fps2bios romdir generator\n"); - if (argc < 2){ - printf("usage: %s infile1 [infile2...]\n", argv[0]); - return 1; - } - - romdir = fopen("ROMDIR", "wb"); - if (romdir == NULL) { - printf("failed to create ROMDIR\n"); - return 1; - } - - extinfo = fopen("EXTINFO", "wb"); - if (extinfo == NULL) { - /* Don't leak the opened romdir */ - fclose(romdir); - printf("failed to create EXTINFO\n"); - return 1; - } - - for (i=1; i -#include -#include -#include -#include -#include -#include - -int main(int argc, char *argv[]) { - char str[256]; - FILE *f; - time_t t; - int version; - int build; - - printf("fps2bios romver generator\n"); - if (argc < 3){ - printf("usage: %s version build\n", argv[0]); - return 1; - } - f = fopen("ROMVER", "wb"); - if (f == NULL) { - printf("failed to create ROMVER\n"); - return 1; - } - - t = time(NULL); - strftime(str, 256, "%Y%m%d", localtime(&t)); - version = strtol(argv[1], (char**)NULL, 0); - build = strtol(argv[2], (char**)NULL, 0); - fprintf(f, "%2.2d%2.2dPD%s\n", version, build, str); - fputc(0, f); - - fclose(f); - - return 0; -} diff --git a/unfree/readme b/unfree/readme deleted file mode 100644 index d33c22644..000000000 --- a/unfree/readme +++ /dev/null @@ -1,15 +0,0 @@ -This directory contains code that have an unclean license status. - -Every time, you copy files into it, please update this readme to explain that -* What are the license issue? -* Why the files are useful for the project? -* What are the solution to improve the situation in the future? - - ------------------------------------------------------------------------ -fps2bios: -* Code is likely free but main authors didn't put any license -=> zerofrog & Ian Brown (bigianb on github) -* The initial goal was an implementation of a GPL compatible bios (so it is likely free) -* Code won't be integrated this way but it remains a valuable source of information ------------------------------------------------------------------------