├── .clang-format ├── .clang-format-ignore ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.yml │ └── issue-report.yml └── workflows │ ├── OPLTestISO.yml │ ├── check-format.yml │ └── compilation.yml ├── .gitignore ├── CHANGELOG ├── CREDITS ├── LICENSE ├── Makefile ├── OLD_DETAILED_CHANGELOG ├── README.md ├── audio ├── bd_connect.adp ├── bd_disconnect.adp ├── boot.adp ├── cancel.adp ├── confirm.adp ├── cursor.adp ├── message.adp └── transition.adp ├── download_cfla.sh ├── download_lng.sh ├── download_lwNBD.sh ├── ee_core ├── Makefile ├── debug_colors_doc.sh ├── include │ ├── asm.h │ ├── cd_igr_rpc.h │ ├── cheat_api.h │ ├── cheat_engine.h │ ├── coreconfig.h │ ├── dve_reg.h │ ├── ee_core.h │ ├── gsm_api.h │ ├── gsm_defines.h │ ├── igs_api.h │ ├── iopmgr.h │ ├── modmgr.h │ ├── modules.h │ ├── padhook.h │ ├── padpatterns.h │ ├── patches.h │ ├── syshook.h │ ├── tlb.h │ └── util.h ├── linkfile └── src │ ├── asm.S │ ├── cd_igr_rpc.c │ ├── cheat_api.c │ ├── cheat_engine.S │ ├── crt0.S │ ├── dve_reg.S │ ├── gsm_api.c │ ├── gsm_engine.S │ ├── gsm_engine_adv.S │ ├── igs_api.c │ ├── iopmgr.c │ ├── main.c │ ├── modmgr.c │ ├── padhook.c │ ├── patches.c │ ├── patches_asm.S │ ├── syshook.c │ ├── tlb.c │ └── util.c ├── gfx ├── APPS.png ├── Aspect_s.png ├── Aspect_w.png ├── Aspect_w1.png ├── Aspect_w2.png ├── CD.png ├── DVD.png ├── Device_1.png ├── Device_2.png ├── Device_3.png ├── Device_4.png ├── Device_5.png ├── Device_6.png ├── Device_all.png ├── ELF.png ├── HDL.png ├── ISO.png ├── Index_0.png ├── Index_1.png ├── Index_2.png ├── Index_3.png ├── Index_4.png ├── L1.png ├── L2.png ├── L3.png ├── R1.png ├── R2.png ├── R3.png ├── Rating_0.png ├── Rating_1.png ├── Rating_2.png ├── Rating_3.png ├── Rating_4.png ├── Rating_5.png ├── Scan_1080i.png ├── Scan_1080i2.png ├── Scan_1080p.png ├── Scan_240p.png ├── Scan_240p1.png ├── Scan_480i.png ├── Scan_480p.png ├── Scan_480p1.png ├── Scan_480p2.png ├── Scan_480p3.png ├── Scan_480p4.png ├── Scan_480p5.png ├── Scan_576i.png ├── Scan_576p.png ├── Scan_720p.png ├── UL.png ├── Vmode_multi.png ├── Vmode_ntsc.png ├── Vmode_pal.png ├── ZSO.png ├── app.png ├── apps_case.png ├── background.png ├── case.png ├── circle.png ├── cover.png ├── cross.png ├── disc.png ├── down.png ├── eth.png ├── hdd.png ├── hdd_bd.png ├── icon.sys ├── ilk_bd.png ├── info.png ├── left.png ├── load0.png ├── load1.png ├── load2.png ├── load3.png ├── load4.png ├── load5.png ├── load6.png ├── load7.png ├── logo.png ├── m4s_bd.png ├── opl.icn ├── right.png ├── screen.png ├── select.png ├── square.png ├── start.png ├── triangle.png ├── udp_bd.png ├── up.png ├── usb.png └── usb_bd.png ├── include ├── OSDHistory.h ├── appsupport.h ├── atlas.h ├── bdmsupport.h ├── cheatman.h ├── compatupd.h ├── config.h ├── debug.h ├── dia.h ├── dialogs.h ├── ds34common.h ├── ethsupport.h ├── extern_irx.h ├── fntsys.h ├── gui.h ├── guigame.h ├── hdd.h ├── hddsupport.h ├── ioman.h ├── ioprp.h ├── iosupport.h ├── lang.h ├── mcemu.h ├── menusys.h ├── nbns.h ├── opl.h ├── pad.h ├── pggsm.h ├── ps2cnf.h ├── renderman.h ├── sound.h ├── supportbase.h ├── system.h ├── texcache.h ├── textures.h ├── themes.h ├── utf8.h ├── util.h └── xparam.h ├── labs ├── genvmclab │ ├── Makefile │ └── genvmclab.c ├── lwnbdsvr │ ├── Makefile │ └── lwnbdsvrlab.c ├── opltestiso │ ├── Makefile │ ├── ee │ │ ├── Makefile │ │ └── main.c │ ├── iop │ │ └── freeram │ │ │ ├── Makefile │ │ │ ├── imports.lst │ │ │ ├── irx_imports.h │ │ │ └── main.c │ └── iso │ │ └── system.cnf └── smblab │ ├── Makefile │ └── smblab.c ├── lang_compiler.py ├── lang_decompiler.py ├── lng └── README.md ├── lng_pack.sh ├── lng_tmpl └── _base.yml ├── make_changelog.sh ├── misc ├── conf_theme_OPL.cfg ├── icon_A.sys ├── icon_C.sys └── icon_J.sys ├── modules ├── Rules.bin.make ├── bdmevent │ ├── Makefile │ ├── imports.lst │ ├── irx_imports.h │ └── main.c ├── debug │ ├── deci2.img │ ├── drvtif-ingame.irx │ ├── drvtif.irx │ ├── ps2link │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── cmdHandler.c │ │ ├── excepHandler.c │ │ ├── excepHandler.h │ │ ├── hostlink.h │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── net_fio.c │ │ ├── net_fio.h │ │ ├── net_fsys.c │ │ ├── nprintf.c │ │ └── ps2link.c │ ├── tifinet-ingame.irx │ ├── tifinet.irx │ └── udptty-ingame │ │ ├── Makefile │ │ ├── exports.tab │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── udptty.c ├── ds34bt │ ├── Makefile │ ├── ee │ │ ├── Makefile │ │ ├── libds34bt.c │ │ └── libds34bt.h │ └── iop │ │ ├── Makefile │ │ ├── ds34bt.c │ │ ├── ds34bt.h │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── smsutils.S ├── ds34usb │ ├── Makefile │ ├── ee │ │ ├── Makefile │ │ ├── libds34usb.c │ │ └── libds34usb.h │ └── iop │ │ ├── Makefile │ │ ├── ds34usb.c │ │ ├── ds34usb.h │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── smsutils.S ├── hdd │ ├── common │ │ └── opl-hdd-ioctl.h │ └── xhdd │ │ ├── Makefile │ │ ├── hdpro.c │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── xatad.c │ │ ├── xhdd.c │ │ └── xhdd.h ├── iopcore │ ├── IOPRP.img │ ├── cdvdfsv │ │ ├── Makefile │ │ ├── cdvdfsv-internal.h │ │ ├── cdvdfsv.c │ │ ├── exports.tab │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── ncmd.c │ │ ├── scmd.c │ │ └── searchfile.c │ ├── cdvdman │ │ ├── Makefile │ │ ├── atad.c │ │ ├── atad.h │ │ ├── cdvdman.c │ │ ├── dev9.c │ │ ├── dev9.h │ │ ├── device-bdm.c │ │ ├── device-hdd.c │ │ ├── device-smb.c │ │ ├── device.h │ │ ├── exports.tab │ │ ├── hdpro_atad.c │ │ ├── imports.lst │ │ ├── internal.h │ │ ├── ioman_add.h │ │ ├── ioops.c │ │ ├── ioplib_util.c │ │ ├── ioplib_util.h │ │ ├── irx_imports.h │ │ ├── ncmd.c │ │ ├── scmd.c │ │ ├── searchfile.c │ │ ├── smb.c │ │ ├── smb.h │ │ ├── smsutils.S │ │ └── streaming.c │ ├── common │ │ ├── cdvd_config.h │ │ ├── cdvdman_opl.h │ │ ├── oplsmb.h │ │ └── smsutils.h │ ├── imgdrv │ │ ├── Makefile │ │ ├── imgdrv.c │ │ ├── imports.lst │ │ └── irx_imports.h │ ├── patches │ │ ├── apemodpatch │ │ │ ├── Makefile │ │ │ ├── imports.lst │ │ │ ├── irx_imports.h │ │ │ └── main.c │ │ ├── cleareffects │ │ │ ├── Makefile │ │ │ ├── imports.lst │ │ │ ├── irx_imports.h │ │ │ └── main.c │ │ ├── f2techioppatch │ │ │ ├── Makefile │ │ │ ├── imports.lst │ │ │ ├── irx_imports.h │ │ │ └── main.c │ │ └── iremsndpatch │ │ │ ├── Makefile │ │ │ ├── asm.S │ │ │ ├── imports.lst │ │ │ ├── irx_imports.h │ │ │ └── main.c │ └── resetspu │ │ ├── Makefile │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── resetspu.c ├── isofs │ ├── Makefile │ ├── imports.lst │ ├── irx_imports.h │ ├── isofs.c │ ├── lz4.c │ ├── lz4.h │ ├── zso.c │ └── zso.h ├── mcemu │ ├── Makefile │ ├── device-bdm.c │ ├── device-hdd.c │ ├── device-smb.c │ ├── device.h │ ├── imports.lst │ ├── ioman_add.h │ ├── irx_imports.h │ ├── mcemu.c │ ├── mcemu.h │ ├── mcemu_io.c │ ├── mcemu_rpc.c │ ├── mcemu_sys.c │ ├── mcemu_utils.h │ └── mcemu_var.c ├── network │ ├── SMSTCPIP │ │ ├── Makefile │ │ ├── api_lib.c │ │ ├── api_msg.c │ │ ├── etharp.c │ │ ├── exports.tab │ │ ├── icmp.c │ │ ├── imports.lst │ │ ├── include │ │ │ ├── arch │ │ │ │ ├── cc.h │ │ │ │ └── sys_arch.h │ │ │ ├── irx_imports.h │ │ │ ├── lwip │ │ │ │ ├── api.h │ │ │ │ ├── api_msg.h │ │ │ │ ├── arch.h │ │ │ │ ├── debug.h │ │ │ │ ├── def.h │ │ │ │ ├── dhcp.h │ │ │ │ ├── err.h │ │ │ │ ├── icmp.h │ │ │ │ ├── inet.h │ │ │ │ ├── ip.h │ │ │ │ ├── ip_addr.h │ │ │ │ ├── ip_frag.h │ │ │ │ ├── mem.h │ │ │ │ ├── memp.h │ │ │ │ ├── netif.h │ │ │ │ ├── opt.h │ │ │ │ ├── pbuf.h │ │ │ │ ├── raw.h │ │ │ │ ├── snmp.h │ │ │ │ ├── sockets.h │ │ │ │ ├── stats.h │ │ │ │ ├── sys.h │ │ │ │ ├── tcp.h │ │ │ │ ├── tcpip.h │ │ │ │ ├── timers.h │ │ │ │ └── udp.h │ │ │ ├── lwipopts.h │ │ │ ├── netif │ │ │ │ ├── etharp.h │ │ │ │ └── loopif.h │ │ │ └── ps2ip_internal.h │ │ ├── inet.S │ │ ├── ip.c │ │ ├── ip_addr.c │ │ ├── ip_frag.c │ │ ├── loopif.c │ │ ├── mem.c │ │ ├── memp.c │ │ ├── netif.c │ │ ├── pbuf.c │ │ ├── ps2ip.c │ │ ├── sockets.c │ │ ├── tcp.c │ │ ├── tcp_in.c │ │ ├── tcp_out.c │ │ ├── tcpip.c │ │ ├── timers.c │ │ └── udp.c │ ├── SMSUTILS │ │ ├── Makefile │ │ └── SMSUTILS.S │ ├── common │ │ ├── httpclient.h │ │ ├── smstcpip-common.h │ │ └── smstcpip.h │ ├── httpclient │ │ ├── Makefile │ │ ├── exports.tab │ │ ├── httpclient.c │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── main.c │ ├── nbns │ │ ├── Makefile │ │ ├── exports.tab │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── main.c │ │ └── nbns.c │ ├── smap-ingame │ │ ├── Makefile │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── main.c │ │ ├── main.h │ │ ├── smap.c │ │ ├── xfer.c │ │ └── xfer.h │ └── smbinit │ │ ├── Makefile │ │ ├── des.c │ │ ├── des.h │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── main.c │ │ ├── md4.c │ │ ├── md4.h │ │ ├── smbauth.c │ │ └── smbauth.h ├── pademu │ ├── Makefile │ ├── ds34bt.c │ ├── ds34bt.h │ ├── ds34common.c │ ├── ds34usb.c │ ├── ds34usb.h │ ├── exports.tab │ ├── imports.lst │ ├── irx_imports.h │ ├── pademu.c │ ├── pademu.h │ ├── padmacro.c │ ├── padmacro.h │ ├── sys_utils.c │ └── sys_utils.h └── vmc │ └── genvmc │ ├── Makefile │ ├── genvmc.c │ ├── genvmc.h │ ├── imports.lst │ └── irx_imports.h ├── notes └── xparam │ ├── xparamNotes.txt │ ├── xparam_0220_20050620.c │ ├── xparam_0250_20100415.c │ ├── xparam_GamesList_0250_20100415.txt │ └── xparam_GamesList_20050620.txt ├── pc ├── Makefile ├── genvmc │ ├── Makefile │ └── src │ │ ├── genvmc.c │ │ └── genvmc.h ├── iso2opl │ ├── Makefile │ ├── libcvd_license.txt │ └── src │ │ ├── iso2opl.c │ │ ├── iso2opl.h │ │ └── isofs.c ├── opl2iso │ ├── Makefile │ └── src │ │ ├── opl2iso.c │ │ └── opl2iso.h └── ziso.py ├── requirements.txt ├── src ├── OSDHistory.c ├── appsupport.c ├── atlas.c ├── bdmsupport.c ├── cheatman.c ├── config.c ├── debug.c ├── dia.c ├── dialogs.c ├── ethsupport.c ├── fntsys.c ├── gsm.c ├── gui.c ├── guigame.c ├── hdd.c ├── hddsupport.c ├── httpclient.c ├── ioman.c ├── ioprp.c ├── lang.c ├── lz4.c ├── menusys.c ├── nbns.c ├── opl.c ├── pad.c ├── ps2cnf.c ├── renderman.c ├── sound.c ├── supportbase.c ├── system.c ├── texcache.c ├── textures.c ├── themes.c ├── util.c ├── xparam.c └── zso.c └── thirdparty └── PoeVeticaNew.ttf /.clang-format-ignore: -------------------------------------------------------------------------------- 1 | ./modules/isofs/lz4.c 2 | ./modules/isofs/lz4.h 3 | ./modules/network/lwNBD 4 | ./thirdparty/clang-format-lint-action 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig: http://EditorConfig.org 2 | 3 | # Top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | charset = utf-8 12 | 13 | # 4 space indentation 14 | [*.{c,h,js,css,html}] 15 | indent_style = space 16 | indent_size = 4 17 | 18 | # 2 space indentation 19 | [*.{json,xml,yaml,yml}] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | # Tab indentation 24 | [Makefile*] 25 | indent_style = tab 26 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for this project 3 | title: "[FR]" 4 | labels: [enhancement] 5 | body: 6 | - type: checkboxes 7 | id: terms 8 | attributes: 9 | label: Checks 10 | description: "Check before posting" 11 | options: 12 | - label: I have checked existing [__OPL feature requests__](https://github.com/ps2homebrew/Open-PS2-Loader/issues?q=is%3Aissue+is%3Aopen+%5BFR%5D) for duplicates and found none 13 | 14 | - type: textarea 15 | id: explanation 16 | attributes: 17 | label: Describe the FR 18 | description: "Is your feature request related to a problem? Please describe." 19 | placeholder: "I'm always frustrated when [...]" 20 | validations: 21 | required: false 22 | 23 | - type: textarea 24 | id: solution 25 | attributes: 26 | label: "Describe the solution you'd like" 27 | description: "A clear and concise description of what you want to happen." 28 | placeholder: "...Should happen" 29 | validations: 30 | required: true 31 | 32 | - type: textarea 33 | id: alternatives 34 | attributes: 35 | label: "Describe alternatives you've considered" 36 | description: "A clear and concise description of any alternative solutions or features you've considered." 37 | placeholder: "..." 38 | validations: 39 | required: false 40 | 41 | - type: textarea 42 | id: context 43 | attributes: 44 | label: "Additional context" 45 | description: "more context" 46 | placeholder: "..." 47 | validations: 48 | required: false 49 | -------------------------------------------------------------------------------- /.github/workflows/OPLTestISO.yml: -------------------------------------------------------------------------------- 1 | name: CI-OPLTestISO 2 | 3 | on: 4 | push: 5 | paths: 6 | - '.github/workflows/OPLTestISO.yml' 7 | - 'labs/opltestiso/**' 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build-opltestiso: 12 | runs-on: ubuntu-latest 13 | container: ps2dev/ps2dev:latest 14 | steps: 15 | - name: Install dependencies 16 | run: apk add build-base git zip cdrkit 17 | 18 | - name: git checkout 19 | uses: actions/checkout@v3 20 | 21 | - run: | 22 | git config --global --add safe.directory "$GITHUB_WORKSPACE" 23 | git fetch --prune --unshallow 24 | 25 | - name: make ISO 26 | run: | 27 | cd labs/opltestiso/ 28 | make iso 29 | 30 | - name: Upload release artifact ISO 31 | uses: actions/upload-artifact@v3 32 | with: 33 | name: OPLTESTISO 34 | path: | 35 | labs/opltestiso/*.iso 36 | -------------------------------------------------------------------------------- /.github/workflows/check-format.yml: -------------------------------------------------------------------------------- 1 | 2 | name: CI-format-check 3 | 4 | on: 5 | push: 6 | paths: 7 | - '**.h' 8 | - '**.c' 9 | - '.github/workflows/check-format.yml' 10 | - '.clang-format' 11 | pull_request: 12 | paths: 13 | - '**.h' 14 | - '**.c' 15 | - '.github/workflows/check-format.yml' 16 | - '.clang-format' 17 | 18 | jobs: 19 | check-format: 20 | runs-on: ubuntu-latest 21 | 22 | steps: 23 | - uses: actions/checkout@v4 24 | - uses: DoozyX/clang-format-lint-action@v0.18.2 25 | with: 26 | source: '.' 27 | extensions: 'h,c' 28 | clangFormatVersion: 12 29 | inplace: False 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE! Please use 'git ls-files -i --exclude-standard' 3 | # command after changing this file, to see if there are 4 | # any tracked files which get ignored after the change. 5 | # 6 | # Normal rules 7 | # 8 | .* 9 | *.a 10 | *.diff 11 | *.elf 12 | *.ELF 13 | *.erl 14 | *.exe 15 | *.irx 16 | *.map 17 | *.o 18 | *.patch 19 | *.rej 20 | *.s 21 | *.zip 22 | *.ZIP 23 | *.a 24 | *.d 25 | DETAILED_CHANGELOG 26 | 27 | # 28 | # files that we don't want to ignore 29 | # 30 | !.gitignore 31 | !.gitattributes 32 | !.github 33 | !.editorconfig 34 | !.clang-format 35 | !.clang-format-ignore 36 | !modules/debug/*.irx 37 | 38 | # 39 | # Generated source files 40 | # 41 | pc/iso2usbld/bin/iso2usbld 42 | IOPRP_img.c 43 | asm/*.c 44 | 45 | # 46 | # 3rd party 47 | # 48 | *modules/network/lwNBD 49 | *thirdparty/clang-format-lint-action 50 | 51 | # language 52 | lng/lang_*.lng 53 | *lng_src 54 | src/lang_internal.c 55 | include/lang_autogen.h 56 | tmp/ 57 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | 3 | Copyright 2009, Ifcaro & jimmikaelkael 4 | Licenced under Academic Free License version 3.0 5 | Review OpenPS2Loader README & LICENSE files for further details. 6 | 7 | ----------------------------------------------------------------------------- 8 | 9 | Main code is based on HD Project 1.081 10 | Copyright (C) 2006-2008 Polo 11 | 12 | Adaptation to USB Advance format and User interface 13 | Copyright (C) 2009 Ifcaro 14 | 15 | CDVDMAN, CDVDFSV, CDDEV, DISCID & SMBMAN modules by jimmikaelkael 16 | Copyright (C) 2009 jimmikaelkael 17 | 18 | NETLOG module, and other contributions 19 | Copyright (C) 2009 misfire 20 | 21 | ----------------------------------------------------------------------------- 22 | 23 | Main Project developers 24 | by Ifcaro, volca, jimmikaelkael, polo35, izdubar, hominem.te.esse, SP193 25 | 26 | Other developers 27 | by BatRastard, crazyc, dlanor, doctorxyz, reprep, belek666, Maximus32, misfire 28 | 29 | UI design 30 | by Berion 31 | 32 | Quality Assurance 33 | by RandQalan, yoshi314, EP, LocalH, lee4, El_Patas, ShaolinAssassin, algol, gledson999, jolek, zero35 34 | 35 | SMSUTILS, SMSMAP & SMSTCPIP modules 36 | by Eugene Plotnikov 37 | 38 | DEV9, ATAD modules and derived code used in cdvdman 39 | by Marcus R. Brown 40 | 41 | USB, Network and PS2HDD modules 42 | by ps2dev's taken from PS2SDK 43 | 44 | OPL-CL project/network update support 45 | by icyson55 46 | 47 | SMB code in Open PS2 Loader includes DES algorithm developed 48 | by Eric Young (eay@mincom.oz.au) 49 | 50 | CI/CD Implementation using Dockers and GiHubActions 51 | by fjtrujy 52 | -------------------------------------------------------------------------------- /audio/bd_connect.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/bd_connect.adp -------------------------------------------------------------------------------- /audio/bd_disconnect.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/bd_disconnect.adp -------------------------------------------------------------------------------- /audio/boot.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/boot.adp -------------------------------------------------------------------------------- /audio/cancel.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/cancel.adp -------------------------------------------------------------------------------- /audio/confirm.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/confirm.adp -------------------------------------------------------------------------------- /audio/cursor.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/cursor.adp -------------------------------------------------------------------------------- /audio/message.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/message.adp -------------------------------------------------------------------------------- /audio/transition.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/audio/transition.adp -------------------------------------------------------------------------------- /download_cfla.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | REPO_URL="https://github.com/DoozyX/clang-format-lint-action.git" 4 | REPO_FOLDER="thirdparty/clang-format-lint-action" 5 | COMMIT="c3b2c943e924028b93a707a5b1b017976ab8d50c" 6 | 7 | if test ! -d "$REPO_FOLDER"; then 8 | git clone $REPO_URL "$REPO_FOLDER" || { exit 1; } 9 | (cd $REPO_FOLDER && git checkout "$COMMIT" && cd -) || { exit 1; } 10 | else 11 | (cd "$REPO_FOLDER" && git fetch origin && git checkout "$COMMIT" && cd - )|| exit 1 12 | fi 13 | -------------------------------------------------------------------------------- /download_lng.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Download languages 4 | REPO_URL="https://github.com/ps2homebrew/Open-PS2-Loader-lang" 5 | REPO_FOLDER="lng_src" 6 | BRANCH_NAME="main" 7 | if test ! -d "$REPO_FOLDER"; then 8 | git clone --depth 1 -b $BRANCH_NAME $REPO_URL "$REPO_FOLDER" || exit 1 9 | else 10 | (cd "$REPO_FOLDER" && git fetch origin && git reset --hard "origin/${BRANCH_NAME}" && git checkout "$BRANCH_NAME" && cd - )|| exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /download_lwNBD.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Download lwNBD 4 | REPO_URL="https://github.com/bignaux/lwNBD.git" 5 | REPO_FOLDER="modules/network/lwNBD" 6 | COMMIT="9777a10f840679ef89b1ec6a588e2d93803d7c37" 7 | if test ! -d "$REPO_FOLDER"; then 8 | git clone $REPO_URL "$REPO_FOLDER" || { exit 1; } 9 | (cd $REPO_FOLDER && git checkout "$COMMIT" && cd -) || { exit 1; } 10 | else 11 | (cd "$REPO_FOLDER" && git fetch origin && git checkout "$COMMIT" && cd - )|| exit 1 12 | fi 13 | -------------------------------------------------------------------------------- /ee_core/debug_colors_doc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # automated listing of debug colors. with small description and location in source code 3 | echo "# EECORE Color automated documentation" 4 | echo "## Static Debug Colors:" 5 | echo "source file | line | Color (BGR) | Category | Description" 6 | echo ":---------- | :--- | :---------: | :------: | :--------- " 7 | grep -Eon "DBGCOL\(.*\);" src/* | sed -E 's/(.*):([0-9]*):DBGCOL\((.*), (.*), "(.*)"\).*/\1 | \2 | \3 | \4 | \5/g' | sed -E "s/0x([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/\!\[0x\1\2\3\](https:\/\/img.shields.io\/badge\/\1\2\3-\3\2\1\?style=for-the-badge)/g" 8 | 9 | echo "## Blinking Debug Colors:" 10 | #DBGCOL_BLNK(blinkCount, colour, forever, type, description) 11 | echo "source file | line | Blinks | Color (BGR) | Blinks forever? | Category | Description" 12 | echo ":---------- | :--- | :----- | :---------: | :-------------: | :------: | :--------- " 13 | grep -Eon "DBGCOL_BLNK\(.*\);" src/* | sed -E 's/(.*):([0-9]*):DBGCOL_BLNK\((.*), (.*), (.*), (.*), "(.*)"\).*/\1 | \2 | \3 | \4 | **\5** | \6 | \7/g' | sed -E "s/0x([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/\!\[0x\1\2\3\](https:\/\/img.shields.io\/badge\/\1\2\3-\3\2\1\?style=for-the-badge)/g" 14 | 15 | -------------------------------------------------------------------------------- /ee_core/include/asm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo 3 | Copyright 2006-2008 Polo 4 | Licenced under Academic Free License version 3.0 5 | Review Open-Ps2-Loader README & LICENSE files for further details. 6 | 7 | Some parts of the code are taken from HD Project by Polo 8 | */ 9 | 10 | #ifndef ASM_H 11 | #define ASM_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | u32 Hook_SifSetDma(SifDmaTransfer_t *sdd, s32 len); 18 | int Hook_SifSetReg(u32 register_num, int register_value); 19 | int Hook_ExecPS2(void *entry, void *gp, int num_args, char *args[]); 20 | int Hook_CreateThread(ee_thread_t *thread_param); 21 | void Hook_Exit(s32 exit_code); 22 | void CleanExecPS2(void *epc, void *gp, int argc, char **argv); 23 | void iResetEE(u32 init_bitfield); 24 | 25 | #endif /* ASM */ 26 | -------------------------------------------------------------------------------- /ee_core/include/cd_igr_rpc.h: -------------------------------------------------------------------------------- 1 | int oplIGRShutdown(int poff); 2 | -------------------------------------------------------------------------------- /ee_core/include/cheat_api.h: -------------------------------------------------------------------------------- 1 | #ifndef _CHEATAPI_H_ 2 | #define _CHEATAPI_H_ 3 | 4 | #include "include/cheat_engine.h" 5 | #include "include/ee_core.h" 6 | 7 | void EnableCheats(void); 8 | void DisableCheats(void); 9 | 10 | /** 11 | * code_t - a code object 12 | * @addr: code address 13 | * @val: code value 14 | */ 15 | typedef struct 16 | { 17 | u32 addr; 18 | u32 val; 19 | } code_t; 20 | 21 | #endif /* _CHEATAPI_H_ */ 22 | -------------------------------------------------------------------------------- /ee_core/include/cheat_engine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Interface to cheat engine 3 | * 4 | * Copyright (C) 2009-2010 Mathias Lafeldt 5 | * 6 | * This file is part of PS2rd, the PS2 remote debugger. 7 | * 8 | * PS2rd is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * PS2rd is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with PS2rd. If not, see . 20 | * 21 | * $Id$ 22 | */ 23 | 24 | #ifndef _CHEATENGINE_H_ 25 | #define _CHEATENGINE_H_ 26 | 27 | #define MAX_HOOKS 5 28 | #define MAX_CODES 250 29 | #define MAX_CHEATLIST (MAX_HOOKS * 2 + MAX_CODES * 2) 30 | 31 | extern void (*Old_SetupThread)(void *gp, void *stack, s32 stack_size, void *args, void *root_func); 32 | extern void HookSetupThread(void *gp, void *stack, s32 stack_size, void *args, void *root_func); 33 | 34 | extern u32 numhooks; 35 | extern u32 numcodes; 36 | extern u32 hooklist[]; 37 | extern u32 codelist[]; 38 | 39 | #endif /* _CHEATENGINE_H_ */ 40 | -------------------------------------------------------------------------------- /ee_core/include/coreconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef EE_CORE_CONFIG_H_ 2 | #define EE_CORE_CONFIG_H_ 3 | 4 | #include 5 | #define CORE_EXIT_PATH_MAX_LEN (256) 6 | #define CORE_GAME_MODE_DESC_MAX_LEN (16) 7 | #define CORE_GAME_ID_MAX_LEN (16) 8 | 9 | // Do not use "EE" as it might catch a string. 10 | #define EE_CORE_MAGIC_0 (0x4D614730) 11 | #define EE_CORE_MAGIC_1 (0x4D616731) 12 | // #include "ee_core.h" 13 | 14 | struct GsmConfig_t 15 | { 16 | s16 interlace; 17 | s16 mode; 18 | s16 ffmd; 19 | u32 dx_offset; 20 | u32 dy_offset; 21 | u64 display; 22 | u64 syncv; 23 | u64 smode2; 24 | int k576P_fix; 25 | int kGsDxDyOffsetSupported; 26 | int FIELD_fix; 27 | }; 28 | 29 | 30 | struct EECoreConfig_t 31 | { 32 | u32 magic[2]; 33 | 34 | char GameMode; 35 | char GameModeDesc[CORE_GAME_MODE_DESC_MAX_LEN]; 36 | 37 | int EnableDebug; 38 | 39 | char ExitPath[CORE_EXIT_PATH_MAX_LEN]; 40 | 41 | int HDDSpindown; 42 | 43 | char g_ps2_ip[16]; 44 | char g_ps2_netmask[16]; 45 | char g_ps2_gateway[16]; 46 | unsigned char g_ps2_ETHOpMode; 47 | 48 | unsigned int *gCheatList; // Store hooks/codes addr+val pairs 49 | 50 | void *eeloadCopy; 51 | void *initUserMemory; 52 | 53 | void *ModStorageStart; 54 | void *ModStorageEnd; 55 | 56 | char GameID[CORE_GAME_ID_MAX_LEN]; 57 | 58 | u32 _CompatMask; 59 | 60 | ConfigParam CustomOSDConfigParam; 61 | int enforceLanguage; 62 | 63 | // Keep them eitherway. 64 | int EnablePadEmuOp; 65 | int PadEmuSettings; 66 | int PadMacroSettings; 67 | 68 | int EnableGSMOp; 69 | struct GsmConfig_t GsmConfig; 70 | }; 71 | 72 | #define USE_LOCAL_EECORE_CONFIG struct EECoreConfig_t *config = &g_ee_core_config; 73 | extern struct EECoreConfig_t g_ee_core_config; 74 | #endif 75 | -------------------------------------------------------------------------------- /ee_core/include/dve_reg.h: -------------------------------------------------------------------------------- 1 | /* 2 | # 3 | # DVE management. 4 | #------------------------------------------------------------- 5 | # Copyright (C) Mega Man, 2010-2014 6 | # 7 | # Taken from Kernelloader. 8 | # 9 | */ 10 | 11 | #ifndef _DVE_REG_H_ 12 | #define _DVE_REG_H_ 13 | 14 | void dve_prepare_bus(void); 15 | int dve_get_reg(u32 reg); 16 | int dve_set_reg(u32 reg, u32 val); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /ee_core/include/gsm_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | # 3 | # Graphics Synthesizer Mode Selector (a.k.a. GSM) - Force (set and keep) a GS Mode, then load & exec a PS2 ELF 4 | #------------------------------------------------------------------------------------------------------------- 5 | # Copyright 2009, 2010, 2011 doctorxyz & dlanor 6 | # Copyright 2011, 2012 doctorxyz, SP193 & reprep 7 | # Copyright 2013 Bat Rastard 8 | # Copyright 2014, 2015, 2016 doctorxyz 9 | # Licenced under Academic Free License version 2.0 10 | # Review LICENSE file for further details. 11 | # 12 | */ 13 | 14 | void UpdateGSMParams(s16 interlace, s16 mode, s16 ffmd, u64 display, u64 syncv, u64 smode2, u32 dx_offset, u32 dy_offset, int k576p_fix, int kGsDxDyOffsetSupported, int FIELD_fix); 15 | void Enable_GSBreakpoint(void); 16 | void Disable_GSBreakpoint(void); 17 | void EnableGSM(void); 18 | void DisableGSM(void); 19 | void setdve_576P(void); 20 | -------------------------------------------------------------------------------- /ee_core/include/iopmgr.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo 3 | Copyright 2006-2008 Polo 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | 7 | Some parts of the code are taken from HD Project by Polo 8 | */ 9 | 10 | #ifndef IOPMGR_H 11 | #define IOPMGR_H 12 | 13 | int New_Reset_Iop(const char *arg, int arglen); 14 | int Reset_Iop(const char *arg, int flag); 15 | 16 | #endif /* IOPMGR */ 17 | -------------------------------------------------------------------------------- /ee_core/include/modules.h: -------------------------------------------------------------------------------- 1 | enum OPL_MODULE_ID { 2 | // Basic modules 3 | OPL_MODULE_ID_UDNL = 1, 4 | OPL_MODULE_ID_IOPRP, 5 | OPL_MODULE_ID_IMGDRV, 6 | OPL_MODULE_ID_RESETSPU, 7 | 8 | // USB mode modules 9 | OPL_MODULE_ID_USBD, 10 | OPL_MODULE_ID_USBMASSBD, 11 | 12 | // iLink mode modules 13 | OPL_MODULE_ID_ILINK, 14 | OPL_MODULE_ID_ILINKBD, 15 | 16 | // mx4sio mode modules 17 | OPL_MODULE_ID_MX4SIOBD, 18 | 19 | // SMB mode modules 20 | OPL_MODULE_ID_SMSTCPIP, 21 | OPL_MODULE_ID_SMAP, 22 | OPL_MODULE_ID_SMBINIT, 23 | 24 | // VMC module 25 | OPL_MODULE_ID_MCEMU, 26 | 27 | OPL_MODULE_ID_PADEMU, 28 | 29 | // Debugging modules 30 | OPL_MODULE_ID_UDPTTY, 31 | OPL_MODULE_ID_IOPTRAP, 32 | OPL_MODULE_ID_DRVTIF, 33 | OPL_MODULE_ID_TIFINET, 34 | OPL_MODULE_ID_PPCTTY, 35 | 36 | // Special patches 37 | OPL_MODULE_ID_IOP_PATCH, 38 | 39 | OPL_MODULE_ID_COUNT 40 | }; 41 | 42 | typedef struct 43 | { 44 | void *ptr; 45 | unsigned int info; // Upper 8 bits = module ID 46 | } irxptr_t; 47 | 48 | typedef struct 49 | { 50 | irxptr_t *modules; 51 | int count; 52 | } irxtab_t; 53 | 54 | // Macros for working with module information. 55 | #define GET_OPL_MOD_ID(x) ((x) >> 24) 56 | #define SET_OPL_MOD_ID(x) ((x) << 24) 57 | #define GET_OPL_MOD_SIZE(x) ((x)&0x00FFFFFF) 58 | -------------------------------------------------------------------------------- /ee_core/include/patches.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006-2008 Polo 3 | Copyright 2009-2010, ifcaro, jimmikaelkael & Polo 4 | Copyright 2016 doctorxyz 5 | Licenced under Academic Free License version 3.0 6 | Review Open-Ps2-Loader README & LICENSE files for further details. 7 | 8 | Some parts of the code have been taken from Polo's HD Project and doctorxyz's GSM 9 | */ 10 | 11 | #ifndef PATCHES_H 12 | #define PATCHES_H 13 | 14 | #define COMPAT_MODE_4 0x08 // Skip Videos 15 | 16 | void apply_patches(const char *path); 17 | 18 | #endif /* PATCHES */ 19 | -------------------------------------------------------------------------------- /ee_core/include/syshook.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo 3 | Copyright 2006-2008 Polo 4 | Licenced under Academic Free License version 3.0 5 | Review Open-Ps2-Loader README & LICENSE files for further details. 6 | 7 | Some parts of the code are taken from HD Project by Polo 8 | */ 9 | 10 | #ifndef SYSHOOK_H 11 | #define SYSHOOK_H 12 | 13 | #include 14 | #include 15 | 16 | void Install_Kernel_Hooks(void); 17 | void Remove_Kernel_Hooks(void); 18 | 19 | extern u32 (*Old_SifSetDma)(SifDmaTransfer_t *sdd, s32 len); 20 | extern int (*Old_SifSetReg)(u32 register_num, int register_value); 21 | extern int (*Old_ExecPS2)(void *entry, void *gp, int num_args, char *args[]); 22 | extern int (*Old_CreateThread)(ee_thread_t *thread_param); 23 | extern void (*Old_Exit)(s32 exit_code); 24 | extern void (*Old_SetOsdConfigParam)(ConfigParam *osdconfig); 25 | extern void (*Old_GetOsdConfigParam)(ConfigParam *osdconfig); 26 | void sysLoadElf(char *filename, int argc, char **argv); 27 | void sysExit(s32 exit_code); 28 | 29 | #endif /* SYSHOOK */ 30 | -------------------------------------------------------------------------------- /ee_core/include/tlb.h: -------------------------------------------------------------------------------- 1 | void InitializeTLB(void); 2 | -------------------------------------------------------------------------------- /ee_core/include/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo 3 | Copyright 2006-2008 Polo 4 | Licenced under Academic Free License version 3.0 5 | Review Open-Ps2-Loader README & LICENSE files for further details. 6 | 7 | Some parts of the code are taken from HD Project by Polo 8 | */ 9 | 10 | #ifndef UTIL_H 11 | #define UTIL_H 12 | 13 | #include 14 | 15 | void _strcpy(char *dst, const char *src); 16 | void _strcat(char *dst, const char *src); 17 | int _strncmp(const char *s1, const char *s2, int length); 18 | int _strcmp(const char *s1, const char *s2); 19 | char *_strchr(const char *string, int c); 20 | char *_strrchr(const char *string, int c); 21 | char *_strtok(char *strToken, const char *strDelimit); 22 | char *_strstr(const char *string, const char *substring); 23 | int _islower(int c); 24 | int _toupper(int c); 25 | int _memcmp(const void *s1, const void *s2, unsigned int length); 26 | unsigned int _strtoui(const char *p); 27 | int _strtoi(const char *p); 28 | u64 _strtoul(const char *p); 29 | void set_ipconfig(void); 30 | u32 *find_pattern_with_mask(u32 *buf, unsigned int bufsize, const u32 *pattern, const u32 *mask, unsigned int len); 31 | void CopyToIop(void *eedata, unsigned int size, void *iopptr); 32 | void WipeUserMemory(void *start, void *end); 33 | void delay(int count); 34 | 35 | #endif /* UTIL */ 36 | -------------------------------------------------------------------------------- /ee_core/src/cd_igr_rpc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "cd_igr_rpc.h" 7 | 8 | int oplIGRShutdown(int poff) 9 | { 10 | SifRpcClientData_t _igr_cd __attribute__((aligned(64))); 11 | int r; 12 | s32 poffData __attribute__((aligned(64))); 13 | 14 | _igr_cd.server = NULL; 15 | while ((r = SifBindRpc(&_igr_cd, 0x80000598, 0)) >= 0 && (!_igr_cd.server)) 16 | nopdelay(); 17 | 18 | if (r < 0) 19 | return -E_SIF_RPC_BIND; 20 | 21 | *(s32 *)UNCACHED_SEG(&poffData) = poff; 22 | if (SifCallRpc(&_igr_cd, 1, SIF_RPC_M_NOWBDC, &poffData, sizeof(poffData), NULL, 0, NULL, NULL) < 0) 23 | return -E_SIF_RPC_CALL; 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /ee_core/src/patches_asm.S: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010, jimmikaelkael 3 | Licenced under Academic Free License version 3.0 4 | Review Open PS2 Loader README & LICENSE files for further details. 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #define ABI_EABI64 // force all register names to EABI64 (legacy toolchain) 11 | #include "as_reg_compat.h" 12 | 13 | .set push 14 | .set noreorder 15 | .set noat 16 | # .set nomacro # Uncomment to set nomacro, to check for hidden macro instructions. 17 | 18 | /************************************************************************** 19 | * 20 | * .text section 21 | * 22 | **************************************************************************/ 23 | 24 | .text 25 | 26 | .globl SRWI_IncrementCntrlFlag 27 | .ent SRWI_IncrementCntrlFlag 28 | SRWI_IncrementCntrlFlag: 29 | # Wait for interrupts to be disabled, to avoid causing a hang if the di instruction binds within an interrupt handler. 30 | lui $at, 1 31 | 1: 32 | di 33 | sync.p 34 | mfc0 $v0, $12 35 | and $v0, $v0, $at # Wait until EIE == 0 36 | bne $v0, $zero, 1b 37 | nop 38 | lui $at, 0x003e 39 | lw $v0, -17388($at) 40 | addiu $v0, 1 41 | sw $v0, -17388($at) 42 | 43 | jr $ra 44 | ei 45 | .end SRWI_IncrementCntrlFlag 46 | 47 | .globl RnC3_AlwaysAllocMem 48 | .ent RnC3_AlwaysAllocMem 49 | RnC3_AlwaysAllocMem: # Read the comments on the "Ratchet and Clank: Up Your Arsenal" patch in patches.c 50 | addu $t0, $a0, $s1 51 | lui $v1, 0x2000 # Bypass the cache because the cache has already been flushed by the game. 52 | or $t0, $v1 53 | addiu $v1, $zero, 1 54 | jr $ra 55 | sb $v1, 0x3D8($t0) # Change "beqz $s7, 0x13" in iop_stash_daemon to "beqz $s7, 0x01" 56 | .end RnC3_AlwaysAllocMem 57 | 58 | .set pop 59 | 60 | -------------------------------------------------------------------------------- /gfx/APPS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/APPS.png -------------------------------------------------------------------------------- /gfx/Aspect_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Aspect_s.png -------------------------------------------------------------------------------- /gfx/Aspect_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Aspect_w.png -------------------------------------------------------------------------------- /gfx/Aspect_w1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Aspect_w1.png -------------------------------------------------------------------------------- /gfx/Aspect_w2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Aspect_w2.png -------------------------------------------------------------------------------- /gfx/CD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/CD.png -------------------------------------------------------------------------------- /gfx/DVD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/DVD.png -------------------------------------------------------------------------------- /gfx/Device_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Device_1.png -------------------------------------------------------------------------------- /gfx/Device_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Device_2.png -------------------------------------------------------------------------------- /gfx/Device_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Device_3.png -------------------------------------------------------------------------------- /gfx/Device_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Device_4.png -------------------------------------------------------------------------------- /gfx/Device_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Device_5.png -------------------------------------------------------------------------------- /gfx/Device_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Device_6.png -------------------------------------------------------------------------------- /gfx/Device_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Device_all.png -------------------------------------------------------------------------------- /gfx/ELF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/ELF.png -------------------------------------------------------------------------------- /gfx/HDL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/HDL.png -------------------------------------------------------------------------------- /gfx/ISO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/ISO.png -------------------------------------------------------------------------------- /gfx/Index_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Index_0.png -------------------------------------------------------------------------------- /gfx/Index_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Index_1.png -------------------------------------------------------------------------------- /gfx/Index_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Index_2.png -------------------------------------------------------------------------------- /gfx/Index_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Index_3.png -------------------------------------------------------------------------------- /gfx/Index_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Index_4.png -------------------------------------------------------------------------------- /gfx/L1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/L1.png -------------------------------------------------------------------------------- /gfx/L2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/L2.png -------------------------------------------------------------------------------- /gfx/L3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/L3.png -------------------------------------------------------------------------------- /gfx/R1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/R1.png -------------------------------------------------------------------------------- /gfx/R2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/R2.png -------------------------------------------------------------------------------- /gfx/R3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/R3.png -------------------------------------------------------------------------------- /gfx/Rating_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Rating_0.png -------------------------------------------------------------------------------- /gfx/Rating_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Rating_1.png -------------------------------------------------------------------------------- /gfx/Rating_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Rating_2.png -------------------------------------------------------------------------------- /gfx/Rating_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Rating_3.png -------------------------------------------------------------------------------- /gfx/Rating_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Rating_4.png -------------------------------------------------------------------------------- /gfx/Rating_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Rating_5.png -------------------------------------------------------------------------------- /gfx/Scan_1080i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_1080i.png -------------------------------------------------------------------------------- /gfx/Scan_1080i2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_1080i2.png -------------------------------------------------------------------------------- /gfx/Scan_1080p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_1080p.png -------------------------------------------------------------------------------- /gfx/Scan_240p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_240p.png -------------------------------------------------------------------------------- /gfx/Scan_240p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_240p1.png -------------------------------------------------------------------------------- /gfx/Scan_480i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_480i.png -------------------------------------------------------------------------------- /gfx/Scan_480p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_480p.png -------------------------------------------------------------------------------- /gfx/Scan_480p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_480p1.png -------------------------------------------------------------------------------- /gfx/Scan_480p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_480p2.png -------------------------------------------------------------------------------- /gfx/Scan_480p3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_480p3.png -------------------------------------------------------------------------------- /gfx/Scan_480p4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_480p4.png -------------------------------------------------------------------------------- /gfx/Scan_480p5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_480p5.png -------------------------------------------------------------------------------- /gfx/Scan_576i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_576i.png -------------------------------------------------------------------------------- /gfx/Scan_576p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_576p.png -------------------------------------------------------------------------------- /gfx/Scan_720p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Scan_720p.png -------------------------------------------------------------------------------- /gfx/UL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/UL.png -------------------------------------------------------------------------------- /gfx/Vmode_multi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Vmode_multi.png -------------------------------------------------------------------------------- /gfx/Vmode_ntsc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Vmode_ntsc.png -------------------------------------------------------------------------------- /gfx/Vmode_pal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/Vmode_pal.png -------------------------------------------------------------------------------- /gfx/ZSO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/ZSO.png -------------------------------------------------------------------------------- /gfx/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/app.png -------------------------------------------------------------------------------- /gfx/apps_case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/apps_case.png -------------------------------------------------------------------------------- /gfx/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/background.png -------------------------------------------------------------------------------- /gfx/case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/case.png -------------------------------------------------------------------------------- /gfx/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/circle.png -------------------------------------------------------------------------------- /gfx/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/cover.png -------------------------------------------------------------------------------- /gfx/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/cross.png -------------------------------------------------------------------------------- /gfx/disc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/disc.png -------------------------------------------------------------------------------- /gfx/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/down.png -------------------------------------------------------------------------------- /gfx/eth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/eth.png -------------------------------------------------------------------------------- /gfx/hdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/hdd.png -------------------------------------------------------------------------------- /gfx/hdd_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/hdd_bd.png -------------------------------------------------------------------------------- /gfx/icon.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/icon.sys -------------------------------------------------------------------------------- /gfx/ilk_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/ilk_bd.png -------------------------------------------------------------------------------- /gfx/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/info.png -------------------------------------------------------------------------------- /gfx/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/left.png -------------------------------------------------------------------------------- /gfx/load0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load0.png -------------------------------------------------------------------------------- /gfx/load1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load1.png -------------------------------------------------------------------------------- /gfx/load2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load2.png -------------------------------------------------------------------------------- /gfx/load3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load3.png -------------------------------------------------------------------------------- /gfx/load4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load4.png -------------------------------------------------------------------------------- /gfx/load5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load5.png -------------------------------------------------------------------------------- /gfx/load6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load6.png -------------------------------------------------------------------------------- /gfx/load7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/load7.png -------------------------------------------------------------------------------- /gfx/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/logo.png -------------------------------------------------------------------------------- /gfx/m4s_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/m4s_bd.png -------------------------------------------------------------------------------- /gfx/opl.icn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/opl.icn -------------------------------------------------------------------------------- /gfx/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/right.png -------------------------------------------------------------------------------- /gfx/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/screen.png -------------------------------------------------------------------------------- /gfx/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/select.png -------------------------------------------------------------------------------- /gfx/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/square.png -------------------------------------------------------------------------------- /gfx/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/start.png -------------------------------------------------------------------------------- /gfx/triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/triangle.png -------------------------------------------------------------------------------- /gfx/udp_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/udp_bd.png -------------------------------------------------------------------------------- /gfx/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/up.png -------------------------------------------------------------------------------- /gfx/usb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/usb.png -------------------------------------------------------------------------------- /gfx/usb_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/gfx/usb_bd.png -------------------------------------------------------------------------------- /include/appsupport.h: -------------------------------------------------------------------------------- 1 | #ifndef __APP_SUPPORT_H 2 | #define __APP_SUPPORT_H 3 | 4 | #include "include/iosupport.h" 5 | 6 | #define APP_MODE_UPDATE_DELAY 240 7 | 8 | #define APP_TITLE_MAX 128 9 | #define APP_PATH_MAX 128 10 | #define APP_BOOT_MAX 64 11 | #define APP_ARGV1_MAX 128 12 | 13 | #define APP_CONFIG_TITLE "title" 14 | #define APP_CONFIG_BOOT "boot" 15 | #define APP_CONFIG_ARGV1 "argv1" 16 | 17 | #define APP_TITLE_CONFIG_FILE "title.cfg" 18 | 19 | typedef struct 20 | { 21 | char title[APP_TITLE_MAX + 1]; 22 | char path[APP_PATH_MAX + 1]; 23 | char boot[APP_BOOT_MAX + 1]; 24 | char argv1[APP_ARGV1_MAX + 1]; 25 | u8 legacy; 26 | } app_info_t; 27 | 28 | void appInit(); 29 | item_list_t *appGetObject(int initOnly); 30 | void appPostUpdateCallback(int mode); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/atlas.h: -------------------------------------------------------------------------------- 1 | #ifndef __ATLAS_H 2 | #define __ATLAS_H 3 | 4 | struct atlas_allocation_t 5 | { 6 | int x, y; 7 | int w, h; 8 | 9 | struct atlas_allocation_t *leaf1, *leaf2; 10 | }; 11 | 12 | typedef struct 13 | { 14 | struct atlas_allocation_t *allocation; 15 | 16 | GSTEXTURE surface; 17 | } atlas_t; 18 | 19 | /** allocates a new atlas. Further settings should be set manually 20 | * on the atlas_t::surface. 21 | */ 22 | atlas_t *atlasNew(size_t width, size_t height, u8 psm); 23 | 24 | /// Frees the atlas 25 | void atlasFree(atlas_t *atlas); 26 | 27 | /** Allocates a place in atlas for the given pixmap data. 28 | * Atlas expects 32bit pixels - all the time 29 | */ 30 | struct atlas_allocation_t *atlasPlace(atlas_t *atlas, size_t width, 31 | size_t height, const void *surface); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /include/bdmsupport.h: -------------------------------------------------------------------------------- 1 | #ifndef __BDM_SUPPORT_H 2 | #define __BDM_SUPPORT_H 3 | 4 | #include "include/iosupport.h" 5 | 6 | #define BDM_MODE_UPDATE_DELAY MENU_UPD_DELAY_GENREFRESH 7 | 8 | #include "include/mcemu.h" 9 | 10 | typedef struct 11 | { 12 | int active; /* Activation flag */ 13 | u32 start_sector; /* Start sector of vmc file */ 14 | int flags; /* Card flag */ 15 | vmc_spec_t specs; /* Card specifications */ 16 | } bdm_vmc_infos_t; 17 | 18 | #define MAX_BDM_DEVICES 5 19 | 20 | #define BDM_TYPE_UNKNOWN -1 21 | #define BDM_TYPE_USB 0 22 | #define BDM_TYPE_ILINK 1 23 | #define BDM_TYPE_SDC 2 24 | 25 | typedef struct 26 | { 27 | int massDeviceIndex; // Underlying device index backing the mass fs partition, ex: usb0 = 0, usb1 = 1, etc. 28 | char bdmPrefix[40]; // Contains the full path to the folder where all the games are. 29 | int bdmULSizePrev; 30 | time_t bdmModifiedCDPrev; 31 | time_t bdmModifiedDVDPrev; 32 | int bdmGameCount; 33 | base_game_info_t *bdmGames; 34 | char bdmDriver[32]; 35 | int bdmDeviceType; // Type of BDM device, see BDM_TYPE_* above 36 | 37 | int bdmDeviceTick; // Used alongside BdmGeneration to tell if device data needs to be refreshed 38 | unsigned char ThemesLoaded; 39 | unsigned char LanguagesLoaded; 40 | unsigned char ForceRefresh; 41 | } bdm_device_data_t; 42 | 43 | void bdmInit(); 44 | int bdmFindPartition(char *target, const char *name, int write); 45 | void bdmLoadModules(void); 46 | void bdmLaunchGame(item_list_t *itemList, int id, config_set_t *configSet); 47 | 48 | void bdmInitSemaphore(); 49 | void bdmEnumerateDevices(); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /include/cheatman.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Manage cheat codes 3 | * 4 | * Copyright (C) 2009-2010 Mathias Lafeldt 5 | * Copyright (C) 2014 doctorxyz 6 | * 7 | * This file is part of PS2rd, the PS2 remote debugger. 8 | * 9 | * PS2rd is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation, either version 3 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * PS2rd is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with PS2rd. If not, see . 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef _CHEATMAN_H_ 26 | #define _CHEATMAN_H_ 27 | 28 | #include "opl.h" 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #define CHEAT_VERSION "0.5.3.65.g774d1" 38 | 39 | #define MAX_HOOKS 5 40 | #define MAX_CODES 250 41 | #define MAX_CHEATLIST (MAX_HOOKS * 2 + MAX_CODES * 2) 42 | 43 | /* Some character defines */ 44 | #define NUL 0x00 45 | #define LF 0x0A 46 | #define CR 0x0D 47 | #define SPACE 0x20 48 | /* Number of digits per cheat code */ 49 | #define CODE_DIGITS 16 50 | 51 | /** 52 | * code_t - a code object 53 | * @addr: code address 54 | * @val: code value 55 | */ 56 | typedef struct 57 | { 58 | u32 addr; 59 | u32 val; 60 | } code_t; 61 | 62 | void InitCheatsConfig(config_set_t *configSet); 63 | int GetCheatsEnabled(void); 64 | const u32 *GetCheatsList(void); 65 | int load_cheats(const char *cheatfile); 66 | 67 | #endif /* _CHEATMAN_H_ */ 68 | -------------------------------------------------------------------------------- /include/compatupd.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMPATUPD_H 2 | #define __COMPATUPD_H 3 | 4 | #define OPL_USER_AGENT "OPL/" OPL_VERSION 5 | #define OPL_COMPAT_HTTP_HOST "sx.sytes.net" 6 | #define OPL_COMPAT_HTTP_PORT 80 7 | #define OPL_COMPAT_HTTP_RETRIES 3 8 | #define OPL_COMPAT_HTTP_URI "/oplcl/sync.ashx?code=%s&device=%d" 9 | 10 | void oplUpdateGameCompat(int UpdateAll); 11 | int oplGetUpdateGameCompatStatus(unsigned int *done, unsigned int *total); 12 | void oplAbortUpdateGameCompat(void); 13 | int oplUpdateGameCompatSingle(int id, item_list_t *support, config_set_t *configSet); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEBUG_H 2 | #define __DEBUG_H 3 | 4 | int debugSetActive(void); 5 | void debugApplyConfig(void); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /include/ethsupport.h: -------------------------------------------------------------------------------- 1 | #ifndef __ETH_SUPPORT_H 2 | #define __ETH_SUPPORT_H 3 | 4 | #include "include/iosupport.h" 5 | 6 | #define ETH_MODE_UPDATE_DELAY 300 7 | 8 | #include "include/mcemu.h" 9 | typedef struct 10 | { 11 | int active; /* Activation flag */ 12 | char fname[64]; /* File name (memorycard?.bin) */ 13 | u16 fid; /* SMB File ID */ 14 | int flags; /* Card flag */ 15 | vmc_spec_t specs; /* Card specifications */ 16 | } smb_vmc_infos_t; 17 | 18 | void ethInit(item_list_t *itemList); // Full initialization (Start ETH + SMB and apply configuration). GUI must be already initialized, used by GUI to start SMB mode. 19 | void ethDeinitModules(void); // Module-only deinitialization, without the GUI's knowledge (for specific reasons, otherwise unused). 20 | int ethLoadInitModules(void); // Initializes Ethernet and applies configuration. 21 | void ethDisplayErrorStatus(void); // Displays the current error status (if any). GUI must be already initialized. 22 | int ethGetNetConfig(u8 *ip_address, u8 *netmask, u8 *gateway); 23 | int ethApplyConfig(void); 24 | int ethGetDHCPStatus(void); 25 | item_list_t *ethGetObject(int initOnly); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /include/fntsys.h: -------------------------------------------------------------------------------- 1 | #ifndef __FNTSYS_H 2 | #define __FNTSYS_H 3 | 4 | /// default (built-in) font id 5 | #define FNT_DEFAULT (0) 6 | /// Value returned on errors 7 | #define FNT_ERROR (-1) 8 | 9 | /** Initializes the font subsystem */ 10 | void fntInit(); 11 | 12 | /** Terminates the font subsystem */ 13 | void fntEnd(); 14 | 15 | /** Loads a font from a file path 16 | * @param path The path to the font file 17 | * @return font slot id (negative value means error happened) */ 18 | int fntLoadFile(char *path); 19 | 20 | /** Reloads the default font */ 21 | int fntLoadDefault(char *path); 22 | 23 | /** Releases a font slot */ 24 | void fntRelease(int id); 25 | 26 | /** Updates to the native display resolution and aspect ratio 27 | * @note Invalidates the whole glyph cache for all fonts! */ 28 | void fntUpdateAspectRatio(); 29 | 30 | /** Renders a text with specified window dimensions */ 31 | int fntRenderString(int id, int x, int y, short aligned, size_t width, size_t height, const char *string, u64 colour); 32 | 33 | /** replaces spaces with newlines so that the text fits into the specified width. 34 | * @note A destrutive operation - modifies the given string! 35 | */ 36 | void fntFitString(int id, char *string, size_t width); 37 | 38 | /** Calculates the width of the given text string 39 | * We can't use the height for alignment, as the horizontal center would depends of the contained text itself */ 40 | int fntCalcDimensions(int id, const char *str); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /include/guigame.h: -------------------------------------------------------------------------------- 1 | #ifndef __GUIGAME_H 2 | #define __GUIGAME_H 3 | 4 | #define SETTINGS_GLOBAL 0 5 | #define SETTINGS_PERGAME 1 6 | 7 | int guiGameAltStartupNameHandler(char *text, int maxLen); 8 | 9 | char *gameConfigSource(void); 10 | 11 | int guiGameVmcNameHandler(char *text, int maxLen); 12 | void guiGameShowVMCMenu(int id, item_list_t *support); 13 | void guiGameShowCompatConfig(int id, item_list_t *support, config_set_t *configSet); 14 | void guiGameShowGSConfig(void); 15 | void guiGameShowCheatConfig(void); 16 | 17 | #ifdef PADEMU 18 | void guiGameShowPadEmuConfig(int forceGlobal); 19 | void guiGameShowPadMacroConfig(int forceGlobal); 20 | void guiGameSavePadEmuGlobalConfig(config_set_t *configGame); 21 | void guiGameSavePadMacroGlobalConfig(config_set_t *configGame); 22 | #endif 23 | 24 | void guiGameShowOSDLanguageConfig(int forceGlobal); 25 | void guiGameSaveOSDLanguageGlobalConfig(config_set_t *configGame); 26 | 27 | void guiGameLoadConfig(item_list_t *support, config_set_t *configSet); 28 | int guiGameSaveConfig(config_set_t *configSet, item_list_t *support); 29 | void guiGameTestSettings(int id, item_list_t *support, config_set_t *configSet); 30 | 31 | void guiGameRemoveSettings(config_set_t *configSet); 32 | void guiGameRemoveGlobalSettings(config_set_t *configGame); 33 | #endif 34 | -------------------------------------------------------------------------------- /include/hdd.h: -------------------------------------------------------------------------------- 1 | #ifndef __HDD_H 2 | #define __HDD_H 3 | 4 | typedef struct 5 | { 6 | u32 start; // Sector address 7 | u32 length; // Sector count 8 | } apa_sub_t; 9 | 10 | typedef struct 11 | { 12 | u8 unused; 13 | u8 sec; 14 | u8 min; 15 | u8 hour; 16 | u8 day; 17 | u8 month; 18 | u16 year; 19 | } ps2time_t; 20 | 21 | typedef struct 22 | { 23 | u32 checksum; 24 | u32 magic; // APA_MAGIC 25 | u32 next; 26 | u32 prev; 27 | char id[APA_IDMAX]; 28 | char rpwd[APA_PASSMAX]; 29 | char fpwd[APA_PASSMAX]; 30 | u32 start; 31 | u32 length; 32 | u16 type; 33 | u16 flags; 34 | u32 nsub; 35 | ps2time_t created; 36 | u32 main; 37 | u32 number; 38 | u32 modver; 39 | u32 pading1[7]; 40 | char pading2[128]; 41 | struct 42 | { 43 | char magic[32]; 44 | u32 version; 45 | u32 nsector; 46 | ps2time_t created; 47 | u32 osdStart; 48 | u32 osdSize; 49 | char pading3[200]; 50 | } mbr; 51 | apa_sub_t subs[APA_MAXSUB]; 52 | } apa_header_t; 53 | 54 | #define PFS_INODE_MAX_BLOCKS 114 55 | 56 | typedef struct 57 | { 58 | u32 number; 59 | u16 subpart; 60 | u16 count; 61 | } pfs_blockinfo_t; 62 | 63 | typedef struct 64 | { 65 | u32 checksum; 66 | u32 magic; 67 | pfs_blockinfo_t inode_block; 68 | pfs_blockinfo_t next_segment; 69 | pfs_blockinfo_t last_segment; 70 | pfs_blockinfo_t unused; 71 | pfs_blockinfo_t data[PFS_INODE_MAX_BLOCKS]; 72 | u16 mode; 73 | u16 attr; 74 | u16 uid; 75 | u16 gid; 76 | ps2time_t atime; 77 | ps2time_t ctime; 78 | ps2time_t mtime; 79 | u64 size; 80 | u32 number_blocks; 81 | u32 number_data; 82 | u32 number_segdesg; 83 | u32 subpart; 84 | u32 reserved[4]; 85 | } pfs_inode_t; 86 | 87 | int hddReadSectors(u32 lba, u32 nsectors, void *buf); 88 | 89 | // Array should be APA_MAXSUB+1 entries. 90 | int hddGetPartitionInfo(const char *name, apa_sub_t *parts); 91 | 92 | // Array should be max entries. 93 | int hddGetFileBlockInfo(const char *name, const apa_sub_t *subs, pfs_blockinfo_t *blocks, int max); 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /include/hddsupport.h: -------------------------------------------------------------------------------- 1 | #ifndef __HDD_SUPPORT_H 2 | #define __HDD_SUPPORT_H 3 | 4 | #include "include/iosupport.h" 5 | #include "include/hdd.h" 6 | 7 | #define HDD_MODE_UPDATE_DELAY MENU_UPD_DELAY_NOUPDATE 8 | 9 | #define HDL_GAME_NAME_MAX 64 10 | 11 | // APA Partition 12 | #define APA_IOCTL2_GETHEADER 0x6836 13 | 14 | typedef struct 15 | { 16 | char partition_name[APA_IDMAX + 1]; 17 | char name[HDL_GAME_NAME_MAX + 1]; 18 | char startup[8 + 1 + 3 + 1]; 19 | u8 hdl_compat_flags; 20 | u8 ops2l_compat_flags; 21 | u8 dma_type; 22 | u8 dma_mode; 23 | u8 disctype; 24 | u32 layer_break; 25 | u32 start_sector; 26 | u32 total_size_in_kb; 27 | } hdl_game_info_t; 28 | 29 | typedef struct 30 | { 31 | u32 count; 32 | hdl_game_info_t *games; 33 | } hdl_games_list_t; 34 | 35 | typedef struct 36 | { 37 | u32 start; 38 | u32 length; 39 | } apa_subs; 40 | 41 | #include "include/mcemu.h" 42 | typedef struct 43 | { 44 | int active; /* Activation flag */ 45 | apa_subs parts[5]; /* Vmc file Apa partitions */ 46 | pfs_blockinfo_t blocks[10]; /* Vmc file Pfs inode */ 47 | int flags; /* Card flag */ 48 | vmc_spec_t specs; /* Card specifications */ 49 | } hdd_vmc_infos_t; 50 | 51 | int hddCheck(void); 52 | u32 hddGetTotalSectors(void); 53 | int hddIs48bit(void); 54 | int hddSetTransferMode(int type, int mode); 55 | void hddSetIdleTimeout(int timeout); 56 | void hddSetIdleImmediate(void); 57 | int hddGetHDLGamelist(hdl_games_list_t *game_list); 58 | void hddFreeHDLGamelist(hdl_games_list_t *game_list); 59 | int hddSetHDLGameInfo(hdl_game_info_t *ginfo); 60 | int hddDeleteHDLGame(hdl_game_info_t *ginfo); 61 | 62 | void hddInit(); 63 | item_list_t *hddGetObject(int initOnly); 64 | void hddLoadModules(void); 65 | void hddLaunchGame(item_list_t *itemList, int id, config_set_t *configSet); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /include/ioman.h: -------------------------------------------------------------------------------- 1 | #ifndef __IOMAN_H 2 | #define __IOMAN_H 3 | 4 | // Input output manager 5 | // asynchronous io handling thread with worker queue 6 | 7 | #define IO_OK 0 8 | #define IO_ERR_UNKNOWN_REQUEST_TYPE -1 9 | #define IO_ERR_TOO_MANY_HANDLERS -2 10 | #define IO_ERR_DUPLICIT_HANDLER -3 11 | #define IO_ERR_INVALID_HANDLER -4 12 | #define IO_ERR_IO_BLOCKED -5 13 | 14 | typedef void (*io_request_handler_t)(void *request); 15 | 16 | typedef void (*io_simpleaction_t)(void); 17 | 18 | /** initializes the io worker thread */ 19 | void ioInit(void); 20 | 21 | /** deinitializes the io worker thread */ 22 | void ioEnd(void); 23 | 24 | /** registers a handler for a certain request type */ 25 | int ioRegisterHandler(int type, io_request_handler_t handler); 26 | 27 | /** schedules a new request into the pending request list 28 | * @note The data are not freed! */ 29 | int ioPutRequest(int type, void *data); 30 | 31 | /** removes all requests of a given type from the queue 32 | * @param type the type of the requests to remove 33 | * @return the count of the requests removed */ 34 | int ioRemoveRequests(int type); 35 | 36 | /** returns the count of pending requests */ 37 | int ioGetPendingRequestCount(void); 38 | 39 | /** returns nonzero if there are any pending io requests */ 40 | int ioHasPendingRequests(void); 41 | 42 | /** returns nonzero if the io thread is running */ 43 | int ioIsRunning(void); 44 | 45 | /** Helper thread safe printf */ 46 | int ioPrintf(const char *format, ...); 47 | 48 | /** Helper function. Will flush the io operation list 49 | (wait for all io ops requested to end) and then 50 | issue a blocking flag that will mean no io 51 | operation will get in. 52 | @param block If nonzero, will issue blocking, otherwise it will unblock 53 | */ 54 | int ioBlockOps(int block); 55 | 56 | #ifdef __DEBUG 57 | #define PREINIT_LOG(...) printf(__VA_ARGS__) 58 | #define LOG(...) ioPrintf(__VA_ARGS__) 59 | #else 60 | #define PREINIT_LOG(...) 61 | #define LOG(...) 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /include/ioprp.h: -------------------------------------------------------------------------------- 1 | unsigned int patch_IOPRP_image(void *ioprp_image, void *cdvdman_module, unsigned int size_cdvdman); 2 | -------------------------------------------------------------------------------- /include/lang.h: -------------------------------------------------------------------------------- 1 | #ifndef __LANG_H 2 | #define __LANG_H 3 | 4 | #include "lang_autogen.h" 5 | 6 | // Maximum external languages supported 7 | #define MAX_LANGUAGE_FILES 15 8 | 9 | extern char *internalEnglish[LANG_STR_COUNT]; 10 | // getter for a localised string version 11 | extern char *_l(unsigned int id); 12 | 13 | typedef struct 14 | { 15 | char *filePath; 16 | char *name; 17 | } language_t; 18 | 19 | int lngAddLanguages(char *path, const char *separator, int mode); 20 | void lngInit(void); 21 | char *lngGetValue(void); 22 | void lngEnd(void); 23 | 24 | // Indices are shifted in GUI, as we add the internal english language at 0 25 | int lngSetGuiValue(int langID); 26 | int lngGetGuiValue(void); 27 | int lngFindGuiID(const char *lang); 28 | char **lngGetGuiList(void); 29 | char *lngGetFilePath(int langID); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/mcemu.h: -------------------------------------------------------------------------------- 1 | #ifndef MCEMU_H 2 | #define MCEMU_H 3 | 4 | typedef struct 5 | { 6 | char magic[40]; 7 | u16 page_size; 8 | u16 pages_per_cluster; 9 | u16 pages_per_block; 10 | u16 unused0; // always 0xFF00 11 | u32 clusters_per_card; 12 | u32 first_allocatable; 13 | u32 last_allocatable; 14 | u32 root_cluster; // must be 0 15 | u32 backup_block1; // 1023 16 | u32 backup_block2; // 1024 17 | u8 unused1[8]; // unused / who knows what it is 18 | u32 indir_fat_clusters[32]; 19 | u32 bad_block_list[32]; 20 | u8 mc_type; 21 | u8 mc_flag; 22 | u16 unused2; // zero 23 | u32 cluster_size; // 1024 always, 0x400 24 | u32 unused3; // 0x100 25 | u32 size_in_megs; // size in megabytes 26 | u32 unused4; // 0xffffffff 27 | u8 unused5[12]; // zero 28 | u32 max_used; // 97%of total clusters 29 | u8 unused6[8]; // zero 30 | u32 unused7; // 0xffffffff 31 | u8 unused8[128]; 32 | } vmc_superblock_t; 33 | 34 | typedef struct 35 | { 36 | u16 page_size; /* Page size in bytes (user data only) */ 37 | u16 block_size; /* Block size in pages */ 38 | u32 card_size; /* Total number of pages */ 39 | } vmc_spec_t; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /include/nbns.h: -------------------------------------------------------------------------------- 1 | // RPC IDs 2 | enum NBNS_RPC_ID { 3 | NBNS_RPC_ID_FIND_NAME = 0, 4 | 5 | NBNS_RPC_ID_COUNT 6 | }; 7 | 8 | // RPC structures 9 | struct nbnsFindNameResult 10 | { 11 | int result; 12 | u8 address[4]; 13 | }; 14 | 15 | // Function prototypes 16 | int nbnsInit(void); 17 | void nbnsDeinit(void); 18 | int nbnsFindName(const char *name, unsigned char *ip_address); 19 | 20 | #ifdef _IOP 21 | #define nbnsman_IMPORTS_start DECLARE_IMPORT_TABLE(nbnsman, 1, 1) 22 | #define nbnsman_IMPORTS_end END_IMPORT_TABLE 23 | 24 | #define I_nbnsFindName DECLARE_IMPORT(4, nbnsFindName) 25 | #endif 26 | -------------------------------------------------------------------------------- /include/pad.h: -------------------------------------------------------------------------------- 1 | #ifndef __PAD_H 2 | #define __PAD_H 3 | 4 | // PAD handling 5 | 6 | #define KEY_LEFT 1 7 | #define KEY_DOWN 2 8 | #define KEY_RIGHT 3 9 | #define KEY_UP 4 10 | #define KEY_START 5 11 | #define KEY_R3 6 12 | #define KEY_L3 7 13 | #define KEY_SELECT 8 14 | #define KEY_SQUARE 9 15 | #define KEY_CROSS 10 16 | #define KEY_CIRCLE 11 17 | #define KEY_TRIANGLE 12 18 | #define KEY_R1 13 19 | #define KEY_L1 14 20 | #define KEY_R2 15 21 | #define KEY_L2 16 22 | 23 | int startPads(); 24 | int readPads(); 25 | void unloadPads(); 26 | 27 | int getKey(int num); 28 | 29 | int getKeyOn(int num); 30 | int getKeyOff(int num); 31 | int getKeyPressed(int num); 32 | 33 | /** Sets the repetition delay for the specified button 34 | * @param button id (KEY_XXX values) 35 | * @param btndelay the delay in miliseconds per repeat (clamped by framerate!) */ 36 | void setButtonDelay(int button, int btndelay); 37 | 38 | /** Gets the repetition delay for the specified button */ 39 | int getButtonDelay(int button); 40 | 41 | 42 | /** Store's the button delay into specified integer array (has to have 16 items) */ 43 | void padStoreSettings(int *buffer); 44 | 45 | /** Restore's the button delay from specified integer array (has to have 16 items) */ 46 | void padRestoreSettings(int *buffer); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /include/ps2cnf.h: -------------------------------------------------------------------------------- 1 | #define CNF_PATH_LEN_MAX 64 2 | 3 | int ps2cnfGetBootFile(const char *path, char *bootfile); 4 | -------------------------------------------------------------------------------- /include/sound.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOUND_H 2 | #define __SOUND_H 3 | 4 | enum SFX { 5 | SFX_BOOT = 0, 6 | SFX_CANCEL, 7 | SFX_CONFIRM, 8 | SFX_CURSOR, 9 | SFX_MESSAGE, 10 | SFX_TRANSITION, 11 | SFX_BD_CONNECT, 12 | SFX_BD_DISCONNECT, 13 | 14 | SFX_COUNT 15 | }; 16 | 17 | void audioInit(void); 18 | void audioEnd(void); 19 | void audioSetVolume(void); 20 | 21 | int sfxInit(int bootSnd); 22 | int sfxGetSoundDuration(int id); 23 | void sfxPlay(int id); 24 | 25 | void bgmStart(void); 26 | void bgmStop(void); 27 | int isBgmPlaying(void); 28 | void bgmMute(void); 29 | void bgmUnMute(void); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/system.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYSTEM_H 2 | #define __SYSTEM_H 3 | 4 | #include "include/mcemu.h" 5 | 6 | #define SYS_LOAD_MC_MODULES 0x01 7 | #define SYS_LOAD_USB_MODULES 0x02 8 | #define SYS_LOAD_ISOFS_MODULE 0x04 9 | 10 | unsigned int USBA_crc32(const char *string); 11 | int sysGetDiscID(char *discID); 12 | void sysInitDev9(void); 13 | void sysShutdownDev9(void); 14 | void sysReset(int modload_mask); 15 | void sysExecExit(void); 16 | void sysPowerOff(void); 17 | #ifdef __DECI2_DEBUG 18 | int sysInitDECI2(void); 19 | #endif 20 | 21 | void sysLaunchLoaderElf(const char *filename, const char *mode_str, int size_cdvdman_irx, void **cdvdman_irx, int size_mcemu_irx, void **mcemu_irx, int EnablePS2Logo, unsigned int compatflags); 22 | 23 | int sysExecElf(const char *path); 24 | int sysLoadModuleBuffer(void *buffer, int size, int argc, char *argv); 25 | int sysCheckMC(void); 26 | int sysCheckVMC(const char *prefix, const char *sep, char *name, int createSize, vmc_superblock_t *vmc_superblock); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/texcache.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEX_CACHE_H 2 | #define __TEX_CACHE_H 3 | 4 | #include "include/iosupport.h" 5 | 6 | /// A single cache entry... 7 | typedef struct 8 | { 9 | GSTEXTURE texture; 10 | 11 | // NULL not queued, otherwise queue request record 12 | void *qr; 13 | 14 | // frame counter the icon was used the last time - oldest get rewritten first in case new icon is requested and cache is full. negative numbers mean 15 | // slot is free and can be used right now 16 | int lastUsed; 17 | 18 | int UID; 19 | } cache_entry_t; 20 | 21 | 22 | /// One texture cache instance 23 | typedef struct 24 | { 25 | /// User specified ID, not used in any way by the cache code (not even initialized!) 26 | int userId; 27 | 28 | /// count of entries (copy of the requested cache size upon cache initialization) 29 | int count; 30 | 31 | /// directory prefix for this cache (if any) 32 | char *prefix; 33 | int isPrefixRelative; 34 | char *suffix; 35 | 36 | int nextUID; 37 | 38 | /// the cache entries itself 39 | cache_entry_t *content; 40 | } image_cache_t; 41 | 42 | /** Initializes the cache subsystem. 43 | */ 44 | void cacheInit(); 45 | 46 | /** Terminates the cache. Does nothing currently. Users of this code have to destroy caches via cacheDestroyCache 47 | */ 48 | void cacheEnd(); 49 | 50 | /** Initializes a single cache 51 | */ 52 | image_cache_t *cacheInitCache(int userId, const char *prefix, int isPrefixRelative, const char *suffix, int count); 53 | 54 | /** Destroys a given cache (unallocates all memory stored there, disconnects the pixmaps from the usage points). 55 | */ 56 | void cacheDestroyCache(image_cache_t *cache); 57 | 58 | GSTEXTURE *cacheGetTexture(image_cache_t *cache, item_list_t *list, int *cacheId, int *UID, char *value); 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /include/util.h: -------------------------------------------------------------------------------- 1 | #ifndef __UTIL_H 2 | #define __UTIL_H 3 | 4 | int getmcID(void); 5 | int getFileSize(int fd); 6 | void checkMCFolder(void); 7 | int openFile(char *path, int mode); 8 | void *readFile(char *path, int align, int *size); 9 | int listDir(char *path, const char *separator, int maxElem, 10 | int (*readEntry)(int index, const char *path, const char *separator, const char *name, unsigned char d_type)); 11 | 12 | typedef struct 13 | { 14 | int fd; 15 | int mode; 16 | char *buffer; 17 | unsigned int size; 18 | unsigned int available; 19 | char *lastPtr; 20 | short allocResult; 21 | } file_buffer_t; 22 | 23 | file_buffer_t *openFileBufferBuffer(short allocResult, const void *buffer, unsigned int size); 24 | file_buffer_t *openFileBuffer(char *fpath, int mode, short allocResult, unsigned int size); 25 | int readFileBuffer(file_buffer_t *readContext, char **outBuf); 26 | void writeFileBuffer(file_buffer_t *fileBuffer, char *inBuf, int size); 27 | void closeFileBuffer(file_buffer_t *fileBuffer); 28 | 29 | int max(int a, int b); 30 | int min(int a, int b); 31 | int fromHex(char digit); 32 | char toHex(int digit); 33 | 34 | enum CONSOLE_REGIONS { 35 | CONSOLE_REGION_INVALID = -1, 36 | CONSOLE_REGION_JAPAN = 0, 37 | CONSOLE_REGION_USA, // USA and HK/SG. 38 | CONSOLE_REGION_EUROPE, 39 | CONSOLE_REGION_CHINA, 40 | 41 | CONSOLE_REGION_COUNT 42 | }; 43 | 44 | int InitConsoleRegionData(void); 45 | const char *GetSystemDataPath(void); 46 | char GetSystemFolderLetter(void); 47 | int sysDeleteFolder(const char *folder); 48 | 49 | int CheckPS2Logo(int fd, u32 lba); 50 | 51 | void delay(int count); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /include/xparam.h: -------------------------------------------------------------------------------- 1 | /* 2 | # 3 | # DECKARD Configs 4 | #-------------------------- 5 | # Copyright 2023 krat0s. 6 | # 7 | */ 8 | 9 | 10 | #define GM_IOP_TYPE (0x80000000) 11 | 12 | #define PARAM_MDEC_DELAY_CYCLE (0x00) 13 | #define PARAM_SPU_INT_DELAY_LIMIT (0x01) 14 | #define PARAM_SPU_INT_DELAY_PPC_COEFF (0x02) 15 | #define PARAM_SPU2_INT_DELAY_LIMIT (0x03) 16 | #define PARAM_SPU2_INT_DELAY_PPC_COEFF (0x04) 17 | #define PARAM_DMAC_CH10_INT_DELAY (0x05) 18 | #define PARAM_CPU_DELAY (0x06) 19 | #define PARAM_SPU_DMA_WAIT_LIMIT (0x07) 20 | #define PARAM_GPU_DMA_WAIT_LIMIT (0x08) 21 | #define PARAM_DMAC_CH10_INT_DELAY_DPC (0x09) 22 | #define PARAM_CPU_DELAY_DPC (0x0A) 23 | #define PARAM_USB_DELAYED_INT_ENABLE (0x0B) 24 | #define PARAM_TIMER_LOAD_DELAY (0x0C) 25 | #define PARAM_SIO0_DTR_SCK_DELAY (0x0D) 26 | #define PARAM_SIO0_DSR_SCK_DELAY_C (0x0E) 27 | #define PARAM_SIO0_DSR_SCK_DELAY_M (0x0F) 28 | #define PARAM_MIPS_DCACHE_ON (0x10) 29 | #define PARAM_CACHE_FLASH_CHANNELS (0x11) 30 | 31 | #define GM_IF ((vu32 *)0x1F801450) 32 | 33 | void ResetDeckardXParams(); 34 | void ApplyDeckardXParam(const char *title); 35 | -------------------------------------------------------------------------------- /labs/lwnbdsvr/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EE_BIN = lwnbdsvrlab.elf 3 | EE_OBJS = lwnbdsvrlab.o discid.o poweroff.o ps2dev9.o smsutils.o smstcpip.o smsmap.o ps2atad.o ps2hdd.o lwnbdsvr.o iomanx.o filexio.o 4 | 5 | EE_LIBS = -lfileXio -lpatches -ldebug -lc -lkernel 6 | EE_CFLAGS = -g 7 | EE_LDFLAGS = -s 8 | 9 | BIN2C = $(PS2SDK)/bin/bin2c 10 | 11 | all: 12 | $(MAKE) $(EE_BIN) 13 | 14 | clean: 15 | $(MAKE) -C ../../modules/cdvd/discID clean 16 | $(MAKE) -C ../../modules/dev9 clean 17 | $(MAKE) -C ../../modules/network/SMSUTILS clean 18 | $(MAKE) -C ../../modules/network/SMSTCPIP -f Makefile clean 19 | $(MAKE) -C ../../modules/network/SMSMAP clean 20 | $(MAKE) -C ../../modules/hdd/atad clean 21 | $(MAKE) -C ../../modules/hdd/ps2hdd clean 22 | $(MAKE) -C ../../modules/network/lwNBD clean 23 | rm -f *.elf *.o *.a *.s 24 | 25 | rebuild: clean all 26 | 27 | discid.c: ../../modules/cdvd/discID/discID.irx 28 | $(MAKE) -C ../../modules/cdvd/discID 29 | $(BIN2C) $< $@ $(*F) 30 | 31 | poweroff.c: $(PS2SDK)/iop/irx/poweroff.irx 32 | $(BIN2C) $< $@ $(*F) 33 | 34 | ps2dev9.c: ../../modules/dev9/ps2dev9.irx 35 | $(MAKE) -C ../../modules/dev9 36 | $(BIN2C) $< $@ $(*F) 37 | 38 | smsutils.c: ../../modules/network/SMSUTILS/SMSUTILS.irx 39 | $(MAKE) -C ../../modules/network/SMSUTILS 40 | $(BIN2C) $< $@ $(*F) 41 | 42 | smstcpip.c: ../../modules/network/SMSTCPIP/SMSTCPIP.irx 43 | $(MAKE) -C ../../modules/network/SMSTCPIP -f Makefile rebuild 44 | $(BIN2C) $< $@ $(*F) 45 | 46 | smsmap.c: ../../modules/network/SMSMAP/SMSMAP.irx 47 | $(MAKE) -C ../../modules/network/SMSMAP 48 | $(BIN2C) $< $@ $(*F) 49 | 50 | ps2atad.c: ../../modules/hdd/atad/ps2atad.irx 51 | $(MAKE) -C ../../modules/hdd/atad 52 | $(BIN2C) $< $@ $(*F) 53 | 54 | ps2hdd.c: ../../modules/hdd/ps2hdd/ps2hdd.irx 55 | $(MAKE) -C ../../modules/hdd/ps2hdd 56 | $(BIN2C) $< $@ $(*F) 57 | 58 | lwnbdsvr.c: ../../modules/network/lwNBD/lwnbdsvr.irx 59 | $(MAKE) -C ../../modules/network/lwNBD 60 | $(BIN2C) $< $@ $(*F) 61 | 62 | iomanx.c: $(PS2SDK)/iop/irx/iomanX.irx 63 | $(BIN2C) $< $@ $(*F) 64 | 65 | filexio.c: $(PS2SDK)/iop/irx/fileXio.irx 66 | $(BIN2C) $< $@ $(*F) 67 | 68 | include $(PS2SDK)/samples/Makefile.pref 69 | include $(PS2SDK)/samples/Makefile.eeglobal 70 | -------------------------------------------------------------------------------- /labs/opltestiso/Makefile: -------------------------------------------------------------------------------- 1 | ISO=TEST_OPL.00.OPLtester_v0.5.iso 2 | 3 | all: 4 | $(MAKE) -C iop/freeram all 5 | $(MAKE) -C ee all 6 | 7 | clean: 8 | $(MAKE) -C iop/freeram clean 9 | $(MAKE) -C ee clean 10 | rm -f *.iso 11 | rm -f iso/*.BIN 12 | rm -f iso/TEST_OPL.00 13 | 14 | run: all 15 | ps2client -h 192.168.1.10 execee host:ee/opltester.elf 16 | 17 | iso: all 18 | cp ee/opltester.elf iso/TEST_OPL.00 19 | dd if=/dev/random of=iso/RANDOM.BIN bs=1M count=5 20 | dd if=/dev/zero of=iso/ZERO.BIN bs=1M count=5 21 | mkisofs -o $(ISO) iso 22 | -------------------------------------------------------------------------------- /labs/opltestiso/ee/Makefile: -------------------------------------------------------------------------------- 1 | EE_BIN = opltester.elf 2 | EE_OBJS = main.o 3 | EE_LIBS = -ldebug -lpatches -lxcdvd 4 | EE_CFLAGS += -Wall -Werror 5 | 6 | # Add embedded IRX files 7 | EE_IRX_FILES=\ 8 | freeram.irx 9 | EE_IRX_OBJS = $(addsuffix _irx.o, $(basename $(EE_IRX_FILES))) 10 | EE_OBJS += $(EE_IRX_OBJS) 11 | 12 | # Where to find the IRX files 13 | vpath %.irx ../iop/freeram 14 | 15 | # Rule to generate them 16 | %_irx.o: %.irx 17 | bin2c $< $*_irx.c $*_irx 18 | mips64r5900el-ps2-elf-gcc -c $*_irx.c -o $*_irx.o 19 | 20 | all: $(EE_BIN) 21 | 22 | run: all 23 | ps2client -h 192.168.1.10 execee host:$(EE_BIN) 24 | 25 | reset: clean 26 | ps2client -h 192.168.1.10 reset 27 | 28 | clean: 29 | rm -f -r $(EE_OBJS) $(EE_BIN) *_irx.c 30 | 31 | include $(PS2SDK)/samples/Makefile.pref 32 | include $(PS2SDK)/samples/Makefile.eeglobal 33 | -------------------------------------------------------------------------------- /labs/opltestiso/iop/freeram/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = freeram.irx 2 | IOP_OBJS = main.o imports.o 3 | 4 | IOP_CFLAGS += -Wall -Werror 5 | 6 | all: $(IOP_BIN) 7 | 8 | clean: 9 | rm -f -r $(IOP_OBJS) $(IOP_BIN) 10 | 11 | include $(PS2SDK)/Defs.make 12 | include $(PS2SDK)/samples/Makefile.pref 13 | include $(PS2SDK)/samples/Makefile.iopglobal 14 | -------------------------------------------------------------------------------- /labs/opltestiso/iop/freeram/imports.lst: -------------------------------------------------------------------------------- 1 | sysmem_IMPORTS_start 2 | I_QueryTotalFreeMemSize 3 | sysmem_IMPORTS_end 4 | -------------------------------------------------------------------------------- /labs/opltestiso/iop/freeram/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include "irx.h" 5 | 6 | #include "sysmem.h" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /labs/opltestiso/iop/freeram/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define MODNAME "freeram" 5 | IRX_ID(MODNAME, 1, 1); 6 | 7 | /* 8 | * In order to test the amount of free IOP RAM available, this module should be 9 | * AS SMALL AS POSSIBLE! 10 | * 11 | * Free IOP RAM is placed at exactly the middle of IOP RAM, where the EE can 12 | * read the value from. This memory location should not be used by anything! 13 | */ 14 | 15 | int _start() 16 | { 17 | vu32 *pfreeram = (vu32 *)(1 * 1024 * 1024); 18 | *pfreeram = QueryTotalFreeMemSize(); 19 | return MODULE_NO_RESIDENT_END; 20 | } 21 | -------------------------------------------------------------------------------- /labs/opltestiso/iso/system.cnf: -------------------------------------------------------------------------------- 1 | BOOT2 = cdrom0:\TEST_OPL.00;1 2 | VER = 1.00 3 | VMODE = PAL 4 | -------------------------------------------------------------------------------- /labs/smblab/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EE_BIN = smblab.elf 3 | EE_OBJS = smblab.o poweroff.o ps2dev9.o smsutils.o smstcpip.o smsmap.o smbman.o iomanx.o filexio.o udptty.o ioptrap.o ps2link.o 4 | 5 | EE_LIBS = -lfileXio -lpatches -ldebug -lc -lkernel 6 | EE_CFLAGS = -g 7 | EE_LDFLAGS = -s 8 | 9 | BIN2C = $(PS2SDK)/bin/bin2c 10 | 11 | all: 12 | $(MAKE) $(EE_BIN) 13 | 14 | clean: 15 | $(MAKE) -C ../../modules/dev9 clean 16 | $(MAKE) -C ../../modules/network/SMSUTILS clean 17 | $(MAKE) -C ../../modules/network/SMSTCPIP clean 18 | $(MAKE) -C ../../modules/network/SMSMAP clean 19 | $(MAKE) -C ../../modules/debug/udptty clean 20 | $(MAKE) -C ../../modules/debug/ioptrap clean 21 | $(MAKE) -C ../../modules/debug/ps2link clean 22 | rm -f *.elf *.o *.a *.s 23 | 24 | rebuild: clean all 25 | 26 | poweroff.c: $(PS2SDK)/iop/irx/poweroff.irx 27 | $(BIN2C) $< $@ $(*F) 28 | 29 | ps2dev9.c: ../../modules/dev9/ps2dev9.irx 30 | $(MAKE) -C ../../modules/dev9 31 | $(BIN2C) $< $@ $(*F) 32 | 33 | smsutils.c: ../../modules/network/SMSUTILS/SMSUTILS.irx 34 | $(MAKE) -C ../../modules/network/SMSUTILS 35 | $(BIN2C) $< $@ $(*F) 36 | 37 | smstcpip.c: ../../modules/network/SMSTCPIP/SMSTCPIP.irx 38 | $(MAKE) -C ../../modules/network/SMSTCPIP 39 | $(BIN2C) $< $@ $(*F) 40 | 41 | smsmap.c: ../../modules/network/SMSMAP/SMSMAP.irx 42 | $(MAKE) -C ../../modules/network/SMSMAP 43 | $(BIN2C) $< $@ $(*F) 44 | 45 | smbman.c: $(PS2SDK)/iop/irx/smbman.irx 46 | $(BIN2C) $< $@ $(*F) 47 | 48 | udptty.c: ../../modules/debug/udptty/udptty.irx 49 | $(MAKE) -C ../../modules/debug/udptty 50 | $(BIN2C) $< $@ $(*F) 51 | 52 | ioptrap.c: ../../modules/debug/ioptrap/ioptrap.irx 53 | $(MAKE) -C ../../modules/debug/ioptrap 54 | $(BIN2C) $< $@ $(*F) 55 | 56 | ps2link.c: ../../modules/debug/ps2link/ps2link.irx 57 | $(MAKE) -C ../../modules/debug/ps2link 58 | $(BIN2C) $< $@ $(*F) 59 | 60 | iomanx.c: $(PS2SDK)/iop/irx/iomanX.irx 61 | $(BIN2C) $< $@ $(*F) 62 | 63 | filexio.c: $(PS2SDK)/iop/irx/fileXio.irx 64 | $(BIN2C) $< $@ $(*F) 65 | 66 | include $(PS2SDK)/samples/Makefile.pref 67 | include $(PS2SDK)/samples/Makefile.eeglobal 68 | -------------------------------------------------------------------------------- /lang_decompiler.py: -------------------------------------------------------------------------------- 1 | import os 2 | import yaml 3 | 4 | def represent_str(self, data): 5 | tag = u'tag:yaml.org,2002:str' 6 | style = None 7 | if '\n' in data: 8 | style = '|' 9 | else: 10 | style = '' 11 | 12 | return self.represent_scalar(tag, data, style=style) 13 | 14 | yaml.add_representer(str, represent_str) 15 | 16 | with open('lng_tmpl/_base.yml', encoding='utf-8') as f: 17 | base = yaml.safe_load(f) 18 | 19 | for file in os.listdir('lng'): 20 | try: 21 | assert file.endswith('.lng') and file.startswith("lang_") 22 | except AssertionError: 23 | continue 24 | base_name = file[5:-4] 25 | output = { 26 | "comments": [], 27 | "translations": {}, 28 | } 29 | n_counter = 0 30 | with open(f'lng/{file}', encoding='utf-8') as f: 31 | for line in f.readlines(): 32 | if line.startswith("#"): 33 | line = line.strip().strip("#").strip() 34 | print(line) 35 | output["comments"].append(line) 36 | else: 37 | base_string = base['gui_strings'][n_counter] 38 | line = line.strip() 39 | label = base_string['label'] 40 | if not line or line == base_string['string']: 41 | output["translations"][label] = [ 42 | "untranslated", 43 | {"original": base_string['string'],}, 44 | ] 45 | else: 46 | output["translations"][label] = line 47 | 48 | n_counter += 1 49 | output['comments'] = '\n'.join(output['comments']).strip() 50 | with open(f'lng_src/{base_name}.yml', 'w', encoding='utf-8') as f: 51 | yaml.dump( 52 | output, 53 | f, 54 | encoding='utf-8', 55 | allow_unicode=True, 56 | sort_keys=False, 57 | canonical=False, 58 | default_flow_style=False, 59 | default_style='' 60 | ) 61 | -------------------------------------------------------------------------------- /lng/README.md: -------------------------------------------------------------------------------- 1 | # Translation guide 2 | 3 | ## For translators 4 | 5 | All translation files moved to the separate repository: \\ 6 | Provide your submissions there.\\ 7 | Languages were moved there for reducing commit stress for the main repository.\\ 8 | Check if your `.yml` file has untranslated strings. Example: 9 | 10 | ```yml 11 | MENU: 12 | - untranslated 13 | - original: Menu 14 | ``` 15 | 16 | You should change this into: 17 | 18 | ```yml 19 | MENU: Menu_on_your_language 20 | ``` 21 | 22 | If you want to test your changes: 23 | 24 | - run `make download_lng` 25 | - make your changes int `lng_src/*.yml` 26 | - run `make languages` 27 | - test generated file from `lng/lang_*.lng`. 28 | 29 | ## For developers 30 | 31 | If you add the language string into the code,\\ 32 | propose your changes into `lng_tmpl/_base.yml` with the necessary comments.\\ 33 | For example, if you add the string `_STR_NETWORK_STARTUP_ERROR`,\\ 34 | then you should update the base file like: 35 | 36 | ```yml 37 | - comment: Generic network error message. 38 | label: NETWORK_STARTUP_ERROR 39 | string: '%d: Network startup error.' 40 | ``` 41 | 42 | After running `make languages` propose your changes into [the language repo](https://github.com/ps2homebrew/Open-PS2-Loader-lang).\\ 43 | Folder `lng_src` will contain updated files. 44 | 45 | It is not recommended to rename or remove already existing strings.\\ 46 | In such a case, you will need to edit all language yml files manually. 47 | -------------------------------------------------------------------------------- /misc/icon_A.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/misc/icon_A.sys -------------------------------------------------------------------------------- /misc/icon_C.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/misc/icon_C.sys -------------------------------------------------------------------------------- /misc/icon_J.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/misc/icon_J.sys -------------------------------------------------------------------------------- /modules/Rules.bin.make: -------------------------------------------------------------------------------- 1 | BIN2C = $(PS2SDK)/bin/bin2c 2 | IOP_SRC_DIR = ./ 3 | 4 | all: $(IOP_BIN) 5 | 6 | clean: 7 | rm -r -f $(IOP_BIN) $(IOP_OBJS) $(IOP_OBJS_DIR) $(IOP_BIN_DIR) $(IOP_LIB_DIR) 8 | 9 | rebuild: clean all 10 | 11 | run: 12 | ps2client -t 1 execiop host:$(IOP_BIN) 13 | -------------------------------------------------------------------------------- /modules/bdmevent/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = bdmevent.irx 2 | IOP_OBJS = main.o imports.o 3 | 4 | IOP_INCS += -I../../include/ 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/bdmevent/imports.lst: -------------------------------------------------------------------------------- 1 | bdm_IMPORTS_start 2 | I_bdm_RegisterCallback 3 | bdm_IMPORTS_end 4 | 5 | sifcmd_IMPORTS_start 6 | I_sceSifSendCmd 7 | sifcmd_IMPORTS_end 8 | -------------------------------------------------------------------------------- /modules/bdmevent/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | * irx_imports.h - Defines all IRX imports. 3 | * 4 | * Copyright (c) 2003 Marcus R. Brown 5 | * 6 | * See the file LICENSE included with this distribution for licensing terms. 7 | */ 8 | 9 | #ifndef IOP_IRX_IMPORTS_H 10 | #define IOP_IRX_IMPORTS_H 11 | 12 | #include 13 | 14 | /* Please keep these in alphabetical order! */ 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #endif /* IOP_IRX_IMPORTS_H */ 24 | -------------------------------------------------------------------------------- /modules/bdmevent/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | IRX_ID("bdmevent", 1, 1); 7 | 8 | static void bdm_callback(int cause) 9 | { 10 | static SifCmdHeader_t EventCmdData; 11 | 12 | EventCmdData.opt = cause; 13 | sceSifSendCmd(0, &EventCmdData, sizeof(EventCmdData), NULL, NULL, 0); 14 | } 15 | 16 | int _start(int argc, char *argv[]) 17 | { 18 | bdm_RegisterCallback(&bdm_callback); 19 | return MODULE_RESIDENT_END; 20 | } 21 | -------------------------------------------------------------------------------- /modules/debug/deci2.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/modules/debug/deci2.img -------------------------------------------------------------------------------- /modules/debug/drvtif-ingame.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/modules/debug/drvtif-ingame.irx -------------------------------------------------------------------------------- /modules/debug/drvtif.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/modules/debug/drvtif.irx -------------------------------------------------------------------------------- /modules/debug/ps2link/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = ps2link.irx 2 | IOP_OBJS = net_fsys.o net_fio.o ps2link.o cmdHandler.o nprintf.o excepHandler.o imports.o 3 | 4 | # Enable zero-copy on fileio writes. 5 | ifeq ($(ZEROCOPY),1) 6 | IOP_CFLAGS += -DZEROCOPY 7 | endif 8 | 9 | # Enable debug mode 10 | ifeq ($(DEBUG),1) 11 | IOP_CFLAGS += -DDEBUG 12 | endif 13 | 14 | ifeq ($(PWOFFONRESET),1) 15 | IOP_CFLAGS += -DPWOFFONRESET 16 | endif 17 | 18 | include $(PS2SDK)/Defs.make 19 | include ../../Rules.bin.make 20 | include $(PS2SDK)/samples/Makefile.iopglobal 21 | -------------------------------------------------------------------------------- /modules/debug/ps2link/excepHandler.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Copyright (C) 2003 Tord Lindstrom (pukko@home.se) 3 | * This file is subject to the terms and conditions of the PS2Link License. 4 | * See the file LICENSE in the main directory of this distribution for more 5 | * details. 6 | */ 7 | 8 | #ifndef _EXCEPTION_H_ 9 | #define _EXCEPTION_H_ 10 | 11 | void installExceptionHandlers(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /modules/debug/ps2link/imports.lst: -------------------------------------------------------------------------------- 1 | stdio_IMPORTS_start 2 | I_printf 3 | stdio_IMPORTS_end 4 | 5 | sysclib_IMPORTS_start 6 | I_memset 7 | I_memcpy 8 | I_strlen 9 | I_strncpy 10 | sysclib_IMPORTS_end 11 | 12 | thsemap_IMPORTS_start 13 | I_CreateSema 14 | I_SignalSema 15 | I_WaitSema 16 | I_DeleteSema 17 | thsemap_IMPORTS_end 18 | 19 | thbase_IMPORTS_start 20 | I_CreateThread 21 | I_DeleteThread 22 | I_StartThread 23 | I_GetThreadId 24 | I_ExitDeleteThread 25 | thbase_IMPORTS_end 26 | 27 | ioman_IMPORTS_start 28 | I_open 29 | I_close 30 | I_AddDrv 31 | I_DelDrv 32 | ioman_IMPORTS_end 33 | 34 | ps2ip_IMPORTS_start 35 | I_lwip_send 36 | #ifdef DEBUG 37 | I_lwip_sendto 38 | I_lwip_socket 39 | I_lwip_listen 40 | I_lwip_recv 41 | I_lwip_recvfrom 42 | I_lwip_close 43 | I_lwip_bind 44 | I_lwip_accept 45 | #endif 46 | ps2ip_IMPORTS_end 47 | 48 | sifcmd_IMPORTS_start 49 | I_sceSifInitRpc 50 | I_sceSifSetRpcQueue 51 | I_sceSifRegisterRpc 52 | I_sceSifRpcLoop 53 | sifcmd_IMPORTS_end 54 | 55 | sifman_IMPORTS_start 56 | I_sceSifSetDma 57 | sifman_IMPORTS_end 58 | 59 | intrman_IMPORTS_start 60 | I_CpuEnableIntr 61 | I_CpuSuspendIntr 62 | I_CpuResumeIntr 63 | intrman_IMPORTS_end 64 | 65 | loadcore_IMPORTS_start 66 | I_FlushDcache 67 | loadcore_IMPORTS_end 68 | 69 | modload_IMPORTS_start 70 | I_LoadStartModule 71 | modload_IMPORTS_end 72 | 73 | cdvdman_IMPORTS_start 74 | I_sceCdInit 75 | I_sceCdStop 76 | cdvdman_IMPORTS_end 77 | 78 | ioptrap_IMPORTS_start 79 | I_set_exception_handler 80 | ioptrap_IMPORTS_end 81 | 82 | poweroff_IMPORTS_start 83 | I_SetPowerButtonHandler 84 | I_PoweroffShutdown 85 | poweroff_IMPORTS_end 86 | -------------------------------------------------------------------------------- /modules/debug/ps2link/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | * irx_imports.h - Defines all IRX imports. 3 | * 4 | * Copyright (c) 2003 Marcus R. Brown 5 | * 6 | * See the file LICENSE included with this distribution for licensing terms. 7 | */ 8 | 9 | #ifndef IOP_IRX_IMPORTS_H 10 | #define IOP_IRX_IMPORTS_H 11 | 12 | #include "irx.h" 13 | 14 | 15 | /* Please keep these in alphabetical order! */ 16 | #include "cdvdman.h" 17 | #include "intrman.h" 18 | #include "ioman.h" 19 | #include "ioptrap.h" 20 | #include "loadcore.h" 21 | #include "modload.h" 22 | #include "ps2ip.h" 23 | #include "sifcmd.h" 24 | #include "sifman.h" 25 | #include "stdio.h" 26 | #include "sysclib.h" 27 | #include "thbase.h" 28 | #include "thsemap.h" 29 | #include "poweroff.h" 30 | 31 | #endif /* IOP_IRX_IMPORTS_H */ 32 | -------------------------------------------------------------------------------- /modules/debug/ps2link/net_fio.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Copyright (C) 2003 Tord Lindstrom (pukko@home.se) 3 | * Copyright (C) 2004 adresd (adresd_ps2dev@yahoo.com) 4 | * This file is subject to the terms and conditions of the PS2Link License. 5 | * See the file LICENSE in the main directory of this distribution for more 6 | * details. 7 | */ 8 | 9 | #ifndef _NETFIO_H_ 10 | #define _NETFIO_H_ 11 | 12 | int pko_file_serv(void *arg); 13 | int pko_recv_bytes(int fd, char *buf, int bytes); 14 | int pko_accept_pkt(int fd, char *buf, int len, int pkt_type); 15 | int pko_open_file(char *path, int flags); 16 | int pko_close_file(int fd); 17 | int pko_read_file(int fd, char *buf, int length); 18 | int pko_write_file(int fd, char *buf, int length); 19 | int pko_lseek_file(int fd, unsigned int offset, int whence); 20 | void pko_close_socket(void); 21 | void pko_close_fsys(void); 22 | int pko_remove(char *name); 23 | int pko_mkdir(char *name, int mode); 24 | int pko_rmdir(char *name); 25 | int pko_open_dir(char *path); 26 | int pko_read_dir(int fd, void *buf); 27 | int pko_close_dir(int fd); 28 | 29 | /* 30 | * Don't want printfs to broadcast in case more than 1 ps2 on the same network, so at 31 | * connect time, the remote PC's IP is stored here and used as destination for printfs. 32 | */ 33 | extern unsigned int remote_pc_addr; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /modules/debug/ps2link/ps2link.c: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Copyright (C) 2003 Tord Lindstrom (pukko@home.se) 3 | * This file is subject to the terms and conditions of the PS2Link License. 4 | * See the file LICENSE in the main directory of this distribution for more 5 | * details. 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "excepHandler.h" 16 | 17 | #define MODNAME "ps2link" 18 | IRX_ID(MODNAME, 1, 8); 19 | 20 | // Entry points 21 | extern int fsysMount(void); 22 | extern int cmdHandlerInit(void); 23 | extern int ttyMount(void); 24 | extern int naplinkRpcInit(void); 25 | //////////////////////////////////////////////////////////////////////// 26 | // main 27 | // start threads & init rpc & filesys 28 | int _start(int argc, char **argv) 29 | { 30 | FlushDcache(); 31 | CpuEnableIntr(0); 32 | 33 | sceCdInit(1); 34 | sceCdStop(); 35 | 36 | SifInitRpc(0); 37 | 38 | fsysMount(); 39 | printf("host: mounted\n"); 40 | cmdHandlerInit(); 41 | printf("IOP cmd thread started\n"); 42 | naplinkRpcInit(); 43 | printf("Naplink thread started\n"); 44 | 45 | installExceptionHandlers(); 46 | 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /modules/debug/tifinet-ingame.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/modules/debug/tifinet-ingame.irx -------------------------------------------------------------------------------- /modules/debug/tifinet.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/modules/debug/tifinet.irx -------------------------------------------------------------------------------- /modules/debug/udptty-ingame/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = udptty.irx 2 | IOP_OBJS = udptty.o imports.o exports.o 3 | 4 | IOP_INCS += -I../../network/common 5 | IOP_CFLAGS += -DKPRTTY 6 | 7 | include $(PS2SDK)/Defs.make 8 | include ../../Rules.bin.make 9 | include $(PS2SDK)/samples/Makefile.iopglobal 10 | -------------------------------------------------------------------------------- /modules/debug/udptty-ingame/exports.tab: -------------------------------------------------------------------------------- 1 | void _retonly(void) {} 2 | 3 | DECLARE_EXPORT_TABLE(udptty, 1, 1) 4 | DECLARE_EXPORT(_start) 5 | DECLARE_EXPORT(_retonly) 6 | DECLARE_EXPORT(_shutdown) 7 | DECLARE_EXPORT(_retonly) 8 | DECLARE_EXPORT(_retonly) 9 | END_EXPORT_TABLE 10 | -------------------------------------------------------------------------------- /modules/debug/udptty-ingame/imports.lst: -------------------------------------------------------------------------------- 1 | thsemap_IMPORTS_start 2 | I_CreateSema 3 | I_DeleteSema 4 | I_SignalSema 5 | I_WaitSema 6 | thsemap_IMPORTS_end 7 | 8 | thbase_IMPORTS_start 9 | I_CreateThread 10 | I_StartThread 11 | thbase_IMPORTS_end 12 | 13 | thevent_IMPORTS_start 14 | I_CreateEventFlag 15 | I_WaitEventFlag 16 | I_SetEventFlag 17 | I_iSetEventFlag 18 | thevent_IMPORTS_end 19 | 20 | ioman_IMPORTS_start 21 | I_open 22 | I_write 23 | I_close 24 | I_AddDrv 25 | I_DelDrv 26 | ioman_IMPORTS_end 27 | 28 | stdio_IMPORTS_start 29 | I_printf 30 | stdio_IMPORTS_end 31 | 32 | sysclib_IMPORTS_start 33 | I_prnt 34 | sysclib_IMPORTS_end 35 | 36 | sysmem_IMPORTS_start 37 | I_KprintfSet 38 | sysmem_IMPORTS_end 39 | 40 | ps2ip_IMPORTS_start 41 | I_inet_addr 42 | I_lwip_socket 43 | I_lwip_close 44 | I_lwip_sendto 45 | ps2ip_IMPORTS_end 46 | 47 | loadcore_IMPORTS_start 48 | I_RegisterLibraryEntries 49 | loadcore_IMPORTS_end 50 | 51 | intrman_IMPORTS_start 52 | I_QueryIntrContext 53 | I_CpuInvokeInKmode 54 | intrman_IMPORTS_end 55 | 56 | -------------------------------------------------------------------------------- /modules/debug/udptty-ingame/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright (c) 2003 Marcus R. Brown 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id: irx_imports.h 629 2004-10-11 00:45:00Z mrbrown $ 11 | # Defines all IRX imports. 12 | */ 13 | 14 | #ifndef IOP_IRX_IMPORTS_H 15 | #define IOP_IRX_IMPORTS_H 16 | 17 | #include "irx.h" 18 | 19 | /* Please keep these in alphabetical order! */ 20 | #include "ioman.h" 21 | #include "intrman.h" 22 | #include "loadcore.h" 23 | #include "smstcpip.h" 24 | #include "stdio.h" 25 | #include "sysclib.h" 26 | #include "sysmem.h" 27 | #include "thbase.h" 28 | #include "thevent.h" 29 | #include "thsemap.h" 30 | 31 | #endif /* IOP_IRX_IMPORTS_H */ 32 | -------------------------------------------------------------------------------- /modules/ds34bt/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | $(MAKE) -C iop 3 | $(MAKE) -C ee 4 | 5 | clean: 6 | $(MAKE) -C iop clean 7 | $(MAKE) -C ee clean 8 | 9 | rebuild: 10 | $(MAKE) -C iop rebuild 11 | $(MAKE) -C ee rebuild 12 | -------------------------------------------------------------------------------- /modules/ds34bt/ee/Makefile: -------------------------------------------------------------------------------- 1 | EE_LIB = libds34bt.a 2 | 3 | EE_OBJS = libds34bt.o 4 | EE_LIBS = -lc 5 | EE_CFLAGS=-Wall 6 | 7 | all: $(EE_LIB) 8 | 9 | clean: 10 | rm -f -r $(EE_OBJS) $(EE_LIB) 11 | 12 | rebuild: clean all 13 | 14 | include $(PS2SDK)/samples/Makefile.pref 15 | include $(PS2SDK)/samples/Makefile.eeglobal 16 | -------------------------------------------------------------------------------- /modules/ds34bt/ee/libds34bt.h: -------------------------------------------------------------------------------- 1 | 2 | enum eDS34BTStatus { 3 | DS34BT_STATE_USB_DISCONNECTED = 0x00, 4 | DS34BT_STATE_USB_AUTHORIZED = 0x01, 5 | DS34BT_STATE_USB_CONFIGURED = 0x02, 6 | DS34BT_STATE_CONNECTED = 0x04, 7 | DS34BT_STATE_RUNNING = 0x08, 8 | }; 9 | 10 | typedef struct 11 | { 12 | u8 hci_ver; // Version of the Current HCI in the BR/EDR Controller 13 | u16 hci_rev; // Revision of the Current HCI in the BR/EDR Controller 14 | u8 lmp_ver; // Version of the Current LMP or PAL in the Controller 15 | u16 mf_name; // Manufacturer Name of the BR/EDR Controller 16 | u16 lmp_subver; // Subversion of the Current LMP or PAL in the Controller 17 | u16 vid; 18 | u16 pid; 19 | u16 rev; 20 | } __attribute__((packed)) hci_information_t; 21 | 22 | int ds34bt_init(); 23 | int ds34bt_deinit(); 24 | int ds34bt_reinit_ports(u8 ports); 25 | int ds34bt_init_charging(); 26 | int ds34bt_get_status(int port); 27 | int ds34bt_get_bdaddr(u8 *bdaddr); 28 | int ds34bt_set_rumble(int port, u8 lrum, u8 rrum); 29 | int ds34bt_set_led(int port, u8 *led); // rgb for ds4 30 | int ds34bt_get_data(int port, u8 *data); 31 | int ds34bt_reset(); 32 | int ds34bt_get_version(hci_information_t *info); 33 | int ds34bt_get_features(u8 *info); 34 | -------------------------------------------------------------------------------- /modules/ds34bt/iop/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = ds34bt.irx 2 | IOP_OBJS = ds34bt.o smsutils.o imports.o 3 | 4 | IOP_INCS += -I../../../include/ 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/ds34bt/iop/imports.lst: -------------------------------------------------------------------------------- 1 | sifcmd_IMPORTS_start 2 | I_sceSifInitRpc 3 | I_sceSifSetRpcQueue 4 | I_sceSifRegisterRpc 5 | I_sceSifRpcLoop 6 | sifcmd_IMPORTS_end 7 | 8 | sysclib_IMPORTS_start 9 | I_memcmp 10 | sysclib_IMPORTS_end 11 | 12 | thsemap_IMPORTS_start 13 | I_CreateSema 14 | I_SignalSema 15 | I_WaitSema 16 | I_PollSema 17 | thsemap_IMPORTS_end 18 | 19 | thbase_IMPORTS_start 20 | I_StartThread 21 | I_CreateThread 22 | I_DelayThread 23 | I_GetThreadId 24 | thbase_IMPORTS_end 25 | 26 | usbd_IMPORTS_start 27 | I_sceUsbdScanStaticDescriptor 28 | I_sceUsbdOpenPipe 29 | I_sceUsbdClosePipe 30 | I_sceUsbdOpenPipeAligned 31 | I_sceUsbdSetPrivateData 32 | I_sceUsbdTransferPipe 33 | I_sceUsbdRegisterLdd 34 | usbd_IMPORTS_end 35 | -------------------------------------------------------------------------------- /modules/ds34bt/iop/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright 2001-2004, ps2dev - http://www.ps2dev.org 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id$ 11 | # Defines all IRX imports. 12 | */ 13 | 14 | #ifndef IOP_IRX_IMPORTS_H 15 | #define IOP_IRX_IMPORTS_H 16 | 17 | #include "irx.h" 18 | 19 | /* Please keep these in alphabetical order! */ 20 | #include "dmacman.h" 21 | #include "intrman.h" 22 | #include "iomanX.h" 23 | #include "libsd.h" 24 | #include "loadcore.h" 25 | #include "sifcmd.h" 26 | #include "sifman.h" 27 | #include "stdio.h" 28 | #include "sysclib.h" 29 | #include "sysmem.h" 30 | #include "thbase.h" 31 | #include "thevent.h" 32 | #include "thmsgbx.h" 33 | #include "thsemap.h" 34 | #include "usbd.h" 35 | #include "vblank.h" 36 | 37 | #endif /* IOP_IRX_IMPORTS_H */ 38 | -------------------------------------------------------------------------------- /modules/ds34usb/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | $(MAKE) -C iop 3 | $(MAKE) -C ee 4 | 5 | clean: 6 | $(MAKE) -C iop clean 7 | $(MAKE) -C ee clean 8 | 9 | rebuild: 10 | $(MAKE) -C iop rebuild 11 | $(MAKE) -C ee rebuild 12 | -------------------------------------------------------------------------------- /modules/ds34usb/ee/Makefile: -------------------------------------------------------------------------------- 1 | EE_LIB = libds34usb.a 2 | 3 | EE_OBJS = libds34usb.o 4 | EE_LIBS = -lc 5 | EE_CFLAGS = -Wall 6 | 7 | all: $(EE_LIB) 8 | 9 | clean: 10 | rm -f -r $(EE_OBJS) $(EE_LIB) 11 | 12 | rebuild: clean all 13 | 14 | include $(PS2SDK)/samples/Makefile.pref 15 | include $(PS2SDK)/samples/Makefile.eeglobal 16 | -------------------------------------------------------------------------------- /modules/ds34usb/ee/libds34usb.h: -------------------------------------------------------------------------------- 1 | 2 | enum eDS34USBStatus { 3 | DS34USB_STATE_DISCONNECTED = 0x00, 4 | DS34USB_STATE_AUTHORIZED = 0x01, 5 | DS34USB_STATE_CONFIGURED = 0x02, 6 | DS34USB_STATE_CONNECTED = 0x04, 7 | DS34USB_STATE_RUNNING = 0x08, 8 | }; 9 | 10 | int ds34usb_init(); 11 | int ds34usb_deinit(); 12 | int ds34usb_reinit_ports(u8 ports); 13 | int ds34usb_get_status(int port); 14 | int ds34usb_get_bdaddr(int port, u8 *bdaddr); 15 | int ds34usb_set_bdaddr(int port, u8 *bdaddr); 16 | int ds34usb_set_rumble(int port, u8 lrum, u8 rrum); 17 | int ds34usb_set_led(int port, u8 led); 18 | int ds34usb_get_data(int port, u8 *data); 19 | int ds34usb_reset(); 20 | -------------------------------------------------------------------------------- /modules/ds34usb/iop/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = ds34usb.irx 2 | IOP_OBJS = ds34usb.o smsutils.o imports.o 3 | 4 | IOP_INCS += -I../../../include/ 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/ds34usb/iop/ds34usb.h: -------------------------------------------------------------------------------- 1 | #ifndef _DS34USB_H_ 2 | #define _DS34USB_H_ 3 | 4 | #include "irx.h" 5 | 6 | #include 7 | 8 | #define DS3 0 9 | #define DS4 1 10 | 11 | #define MAX_BUFFER_SIZE 64 // Size of general purpose data buffer 12 | 13 | typedef struct _usb_ds34 14 | { 15 | int devId; 16 | int sema; 17 | int cmd_sema; 18 | int controlEndp; 19 | int interruptEndp; 20 | int outEndp; 21 | u8 status; 22 | u8 enabled; 23 | u8 lrum; 24 | u8 rrum; 25 | u8 update_rum; 26 | u8 oldled[4]; // rgb for ds4 and blink 27 | union 28 | { 29 | struct ds2report ds2; 30 | u8 data[18]; 31 | }; 32 | u8 type; 33 | } ds34usb_device; 34 | 35 | enum eDS34USBStatus { 36 | DS34USB_STATE_DISCONNECTED = 0x00, 37 | DS34USB_STATE_AUTHORIZED = 0x01, 38 | DS34USB_STATE_CONFIGURED = 0x02, 39 | DS34USB_STATE_CONNECTED = 0x04, 40 | DS34USB_STATE_RUNNING = 0x08, 41 | }; 42 | 43 | enum eHID { 44 | // {{{ 45 | /* HID event flag */ 46 | HID_FLAG_STATUS_REPORTED = 0x01, 47 | HID_FLAG_BUTTONS_CHANGED = 0x02, 48 | HID_FLAG_EXTENSION = 0x04, 49 | HID_FLAG_COMMAND_SUCCESS = 0x08, 50 | 51 | /* USB HID Transaction Header (THdr) */ 52 | HID_USB_GET_REPORT_FEATURE = 0x03, 53 | HID_USB_SET_REPORT_OUTPUT = 0x02, 54 | HID_USB_DATA_INPUT = 0x01, 55 | 56 | /* Defines of various parameters for PS3 Game controller reports */ 57 | PS3_F4_REPORT_ID = 0xF4, 58 | PS3_F4_REPORT_LEN = 0x04, 59 | 60 | PS3_01_REPORT_ID = 0x01, 61 | PS3_01_REPORT_LEN = 0x30, 62 | 63 | PS4_02_REPORT_ID = 0x02, 64 | PS4_11_REPORT_ID = 0x11, 65 | PS4_11_REPORT_LEN = 0x4D, 66 | // }}} 67 | }; 68 | 69 | void mips_memcpy(void *, const void *, unsigned); 70 | void mips_memset(void *, int, unsigned); 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /modules/ds34usb/iop/imports.lst: -------------------------------------------------------------------------------- 1 | sifcmd_IMPORTS_start 2 | I_sceSifInitRpc 3 | I_sceSifSetRpcQueue 4 | I_sceSifRegisterRpc 5 | I_sceSifRpcLoop 6 | sifcmd_IMPORTS_end 7 | 8 | thsemap_IMPORTS_start 9 | I_CreateSema 10 | I_SignalSema 11 | I_WaitSema 12 | I_PollSema 13 | I_iSignalSema 14 | thsemap_IMPORTS_end 15 | 16 | thbase_IMPORTS_start 17 | I_StartThread 18 | I_CreateThread 19 | I_DelayThread 20 | I_GetThreadId 21 | I_SetAlarm 22 | I_CancelAlarm 23 | thbase_IMPORTS_end 24 | 25 | usbd_IMPORTS_start 26 | I_sceUsbdScanStaticDescriptor 27 | I_sceUsbdOpenPipe 28 | I_sceUsbdClosePipe 29 | I_sceUsbdOpenPipeAligned 30 | I_sceUsbdSetPrivateData 31 | I_sceUsbdTransferPipe 32 | I_sceUsbdRegisterLdd 33 | usbd_IMPORTS_end 34 | -------------------------------------------------------------------------------- /modules/ds34usb/iop/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright 2001-2004, ps2dev - http://www.ps2dev.org 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id$ 11 | # Defines all IRX imports. 12 | */ 13 | 14 | #ifndef IOP_IRX_IMPORTS_H 15 | #define IOP_IRX_IMPORTS_H 16 | 17 | #include "irx.h" 18 | 19 | /* Please keep these in alphabetical order! */ 20 | #include "dmacman.h" 21 | #include "intrman.h" 22 | #include "iomanX.h" 23 | #include "libsd.h" 24 | #include "loadcore.h" 25 | #include "sifcmd.h" 26 | #include "sifman.h" 27 | #include "stdio.h" 28 | #include "sysclib.h" 29 | #include "sysmem.h" 30 | #include "thbase.h" 31 | #include "thevent.h" 32 | #include "thmsgbx.h" 33 | #include "thsemap.h" 34 | #include "usbd.h" 35 | #include "vblank.h" 36 | 37 | #endif /* IOP_IRX_IMPORTS_H */ 38 | -------------------------------------------------------------------------------- /modules/hdd/common/opl-hdd-ioctl.h: -------------------------------------------------------------------------------- 1 | #ifndef OPL_HDD_IOCTL_H 2 | #define OPL_HDD_IOCTL_H 3 | 4 | // Commands and structures for XATAD.IRX 5 | #define ATA_DEVCTL_IS_48BIT 0x6840 6 | #define ATA_DEVCTL_SET_TRANSFER_MODE 0x6841 7 | 8 | #define ATA_XFER_MODE_MDMA 0x20 9 | #define ATA_XFER_MODE_UDMA 0x40 10 | 11 | // structs for DEVCTL commands 12 | 13 | typedef struct 14 | { 15 | int type; 16 | int mode; 17 | } hddAtaSetMode_t; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /modules/hdd/xhdd/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = xhdd.irx 2 | IOP_OBJS = xhdd.o xatad.o hdpro.o imports.o 3 | 4 | IOP_INCS += -I../common 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/hdd/xhdd/hdpro.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "opl-hdd-ioctl.h" 6 | #include "xhdd.h" 7 | 8 | int hdproata_device_set_transfer_mode(int device, int type, int mode) 9 | { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /modules/hdd/xhdd/imports.lst: -------------------------------------------------------------------------------- 1 | atad_IMPORTS_start 2 | I_sceAtaInit 3 | I_sceAtaExecCmd 4 | I_sceAtaWaitResult 5 | atad_IMPORTS_end 6 | 7 | ioman_IMPORTS_start 8 | I_AddDrv 9 | ioman_IMPORTS_end 10 | 11 | sysclib_IMPORTS_start 12 | I_strcmp 13 | sysclib_IMPORTS_end 14 | -------------------------------------------------------------------------------- /modules/hdd/xhdd/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /modules/hdd/xhdd/xatad.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "opl-hdd-ioctl.h" 6 | #include "xhdd.h" 7 | 8 | static void ata_multiword_dma_mode(int mode) 9 | { 10 | USE_SPD_REGS; 11 | u16 val; 12 | 13 | switch (mode) { 14 | case 1: 15 | val = 0x45; 16 | break; 17 | case 2: 18 | val = 0x24; 19 | break; 20 | default: 21 | val = 0xff; 22 | } 23 | 24 | SPD_REG16(SPD_R_MWDMA_MODE) = val; 25 | SPD_REG16(SPD_R_IF_CTRL) = (SPD_REG16(SPD_R_IF_CTRL) & 0xfffe) | 0x48; 26 | } 27 | 28 | static void ata_ultra_dma_mode(int mode) 29 | { 30 | USE_SPD_REGS; 31 | u16 val; 32 | 33 | switch (mode) { 34 | case 1: 35 | val = 0x85; 36 | break; 37 | case 2: 38 | val = 0x63; 39 | break; 40 | case 3: 41 | val = 0x62; 42 | break; 43 | case 4: 44 | val = 0x61; 45 | break; 46 | default: 47 | val = 0xa7; 48 | } 49 | 50 | SPD_REG16(SPD_R_UDMA_MODE) = val; 51 | SPD_REG16(SPD_R_IF_CTRL) |= 0x49; 52 | } 53 | 54 | /* Set features - set transfer mode. */ 55 | int ata_device_set_transfer_mode(int device, int type, int mode) 56 | { 57 | int res; 58 | 59 | res = sceAtaExecCmd(NULL, 1, 3, (type | mode) & 0xff, 0, 0, 0, (device << 4) & 0xffff, ATA_C_SET_FEATURES); 60 | if (res) 61 | return res; 62 | 63 | res = sceAtaWaitResult(); 64 | if (res) 65 | return res; 66 | 67 | // Note: PIO is not supported by sceAtaDmaTransfer. 68 | switch (type) { 69 | case ATA_XFER_MODE_MDMA: 70 | ata_multiword_dma_mode(mode); 71 | break; 72 | case ATA_XFER_MODE_UDMA: 73 | ata_ultra_dma_mode(mode); 74 | break; 75 | } 76 | 77 | return 0; 78 | } 79 | -------------------------------------------------------------------------------- /modules/hdd/xhdd/xhdd.h: -------------------------------------------------------------------------------- 1 | int ata_device_set_transfer_mode(int device, int type, int mode); 2 | int ata_device_set_write_cache(int device, int enable); 3 | int hdproata_device_set_transfer_mode(int device, int type, int mode); 4 | int hdproata_device_set_write_cache(int device, int enable); 5 | -------------------------------------------------------------------------------- /modules/iopcore/IOPRP.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/modules/iopcore/IOPRP.img -------------------------------------------------------------------------------- /modules/iopcore/cdvdfsv/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = cdvdfsv.irx 2 | IOP_OBJS = cdvdfsv.o searchfile.o ncmd.o scmd.o imports.o exports.o 3 | 4 | IOP_INCS += -I../common 5 | 6 | ifeq ($(DEBUG),1) 7 | IOP_CFLAGS += -DDEBUG 8 | endif 9 | 10 | include $(PS2SDK)/Defs.make 11 | include ../../Rules.bin.make 12 | include $(PS2SDK)/samples/Makefile.iopglobal 13 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdfsv/cdvdfsv-internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009, jimmikaelkael 3 | Licenced under Academic Free License version 3.0 4 | Review open-ps2-loader README & LICENSE files for further details. 5 | */ 6 | 7 | #ifndef __CDVDFSV_INTERNAL__ 8 | #define __CDVDFSV_INTERNAL__ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include "cdvdman_opl.h" 22 | 23 | #include "smsutils.h" 24 | 25 | #ifdef __IOPCORE_DEBUG 26 | #define DPRINTF(args...) printf(args) 27 | #define iDPRINTF(args...) Kprintf(args) 28 | #else 29 | #define DPRINTF(args...) 30 | #define iDPRINTF(args...) 31 | #endif 32 | 33 | extern void cdvdfsv_register_scmd_rpc(SifRpcDataQueue_t *rpc_DQ); 34 | extern void cdvdfsv_register_ncmd_rpc(SifRpcDataQueue_t *rpc_DQ); 35 | extern void cdvdfsv_register_searchfile_rpc(SifRpcDataQueue_t *rpc_DQ); 36 | extern void sysmemSendEE(void *buf, void *EE_addr, int size); 37 | extern int sceCdChangeThreadPriority(int priority); 38 | extern u8 *cdvdfsv_buf; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdfsv/exports.tab: -------------------------------------------------------------------------------- 1 | void _retonly(void) {} 2 | 3 | int _dummy(void) { 4 | return 0; 5 | } 6 | 7 | // cdvdfsv export table 8 | DECLARE_EXPORT_TABLE(cdvdfsv, 1, 1) 9 | DECLARE_EXPORT(_start) 10 | DECLARE_EXPORT(_retonly) 11 | DECLARE_EXPORT(_retonly) 12 | DECLARE_EXPORT(_retonly) 13 | DECLARE_EXPORT(_dummy) 14 | DECLARE_EXPORT(sceCdChangeThreadPriority) 15 | END_EXPORT_TABLE 16 | 17 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdfsv/imports.lst: -------------------------------------------------------------------------------- 1 | cdvdman_IMPORTS_start 2 | I_sceCdInit 3 | I_sceCdStandby 4 | I_sceCdRead 5 | I_sceCdSeek 6 | I_sceCdGetError 7 | I_sceCdGetToc 8 | I_sceCdSearchFile 9 | I_sceCdSync 10 | I_sceCdGetDiskType 11 | I_sceCdDiskReady 12 | I_sceCdTrayReq 13 | I_sceCdStop 14 | I_sceCdReadClock 15 | I_sceCdStatus 16 | I_sceCdApplySCmd 17 | I_sceCdPause 18 | I_sceCdBreak 19 | I_sceCdGetReadPos 20 | I_sceGetFsvRbuf 21 | I_sceCdSC 22 | I_sceCdStInit 23 | I_sceCdStRead 24 | I_sceCdStSeek 25 | I_sceCdStStart 26 | I_sceCdStStat 27 | I_sceCdStStop 28 | I_sceCdStPause 29 | I_sceCdStResume 30 | I_sceCdPowerOff 31 | I_sceCdMmode 32 | I_sceCdStSeekF 33 | I_sceCdReadDiskID 34 | I_sceCdReadGUID 35 | I_sceCdSetTimeout 36 | I_sceCdReadModelID 37 | I_sceCdReadDvdDualInfo 38 | I_sceCdLayerSearchFile 39 | cdvdman_IMPORTS_end 40 | 41 | intrman_IMPORTS_start 42 | I_CpuSuspendIntr 43 | I_CpuResumeIntr 44 | intrman_IMPORTS_end 45 | 46 | loadcore_IMPORTS_start 47 | I_RegisterLibraryEntries 48 | loadcore_IMPORTS_end 49 | 50 | sifcmd_IMPORTS_start 51 | I_sceSifInitRpc 52 | I_sceSifSetRpcQueue 53 | I_sceSifRegisterRpc 54 | I_sceSifRpcLoop 55 | sifcmd_IMPORTS_end 56 | 57 | sifman_IMPORTS_start 58 | I_sceSifSetDma 59 | I_sceSifDmaStat 60 | sifman_IMPORTS_end 61 | 62 | smsutils_IMPORTS_start 63 | I_mips_memset 64 | I_mips_memcpy 65 | smsutils_IMPORTS_end 66 | 67 | thbase_IMPORTS_start 68 | I_CreateThread 69 | I_StartThread 70 | I_DelayThread 71 | I_ExitDeleteThread 72 | I_GetThreadId 73 | I_ChangeThreadPriority 74 | thbase_IMPORTS_end 75 | 76 | thevent_IMPORTS_start 77 | I_ClearEventFlag 78 | I_WaitEventFlag 79 | thevent_IMPORTS_end 80 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdfsv/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "smsutils.h" 12 | #include 13 | #include 14 | #include 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/Makefile: -------------------------------------------------------------------------------- 1 | IOP_OBJS = cdvdman.o ioops.o ncmd.o scmd.o searchfile.o streaming.o ioplib_util.o smsutils.o imports.o exports.o ../../isofs/zso.o ../../isofs/lz4.o 2 | USE_DEV9 ?= 0 3 | 4 | ifeq ($(USE_HDD),1) 5 | IOP_BIN = hdd_cdvdman.irx 6 | IOP_OBJS_DIR = obj.hdd/ 7 | IOP_OBJS += device-hdd.o atad.o 8 | IOP_CFLAGS += -DHDD_DRIVER 9 | USE_DEV9 = 1 10 | endif 11 | 12 | ifeq ($(USE_HDPRO),1) 13 | IOP_BIN = hdd_hdpro_cdvdman.irx 14 | IOP_OBJS_DIR = obj.hdpro/ 15 | IOP_OBJS += device-hdd.o hdpro_atad.o 16 | IOP_CFLAGS += -DHDD_DRIVER -DHD_PRO 17 | ifeq ($(IOPCORE_DEBUG),1) 18 | USE_DEV9 = 1 19 | endif 20 | endif 21 | 22 | ifeq ($(USE_SMB),1) 23 | IOP_BIN = smb_cdvdman.irx 24 | IOP_OBJS_DIR = obj.smb/ 25 | IOP_OBJS += device-smb.o smb.o 26 | IOP_CFLAGS += -DSMB_DRIVER 27 | USE_DEV9 = 1 28 | IOP_INCS += -I../../network/common 29 | endif 30 | 31 | ifeq ($(USE_BDM),1) 32 | IOP_BIN = bdm_cdvdman.irx 33 | IOP_OBJS_DIR = obj.bdm/ 34 | IOP_OBJS += device-bdm.o 35 | IOP_CFLAGS += -DBDM_DRIVER 36 | IOP_LIBS += -L$(PS2SDK)/iop/lib -lbdm 37 | ifeq ($(IOPCORE_DEBUG),1) 38 | USE_DEV9 = 1 39 | endif 40 | endif 41 | 42 | IOP_INCS += -I../common 43 | 44 | ifeq ($(IOPCORE_DEBUG),1) 45 | IOP_CFLAGS += -D__IOPCORE_DEBUG 46 | endif 47 | 48 | ifeq ($(USE_DEV9),1) 49 | IOP_OBJS += dev9.o 50 | IOP_CFLAGS += -D__USE_DEV9 51 | endif 52 | 53 | include $(PS2SDK)/Defs.make 54 | include ../../Rules.bin.make 55 | include $(PS2SDK)/samples/Makefile.iopglobal 56 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/dev9.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright (c) 2003 Marcus R. Brown 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id: dev9.h 1454 2007-11-04 23:19:57Z roman_ps2dev $ 11 | # DEV9 Device Driver definitions and imports. 12 | */ 13 | 14 | #ifndef IOP_DEV9_H 15 | #define IOP_DEV9_H 16 | 17 | #include "types.h" 18 | #include "irx.h" 19 | 20 | #include "hdd-ioctl.h" 21 | 22 | typedef int (*dev9_intr_cb_t)(int flag); 23 | typedef void (*dev9_shutdown_cb_t)(void); 24 | typedef void (*dev9_dma_cb_t)(int bcr, int dir); 25 | 26 | int dev9d_init(void); 27 | void SpdRegisterIntrHandler(int intr, dev9_intr_cb_t cb); // #4 28 | int SpdDmaTransfer(int ctrl, void *buf, int bcr, int dir); // #5 29 | void Dev9CardStop(void); // #6 30 | void SpdIntrEnable(int mask); // #7 31 | void SpdIntrDisable(int mask); // #8 32 | int SpdGetEthernetID(u16 *buf); // #9 33 | void SpdSetLED(int ctl); // #10 34 | int Dev9RegisterPowerOffHandler(int idx, dev9_shutdown_cb_t cb); // #11 35 | void dev9RegisterPreDmaCb(int ctrl, dev9_dma_cb_t cb); // #12 36 | void dev9RegisterPostDmaCb(int ctrl, dev9_dma_cb_t cb); // #13 37 | 38 | #endif /* IOP_PS2DEV9_H */ 39 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/device.h: -------------------------------------------------------------------------------- 1 | void DeviceInit(void); // Called in _start() 2 | void DeviceDeinit(void); // Called in _exit(). Interrupts are disabled. 3 | int DeviceReady(void); // Check if device is ready 4 | 5 | void DeviceFSInit(void); // Called when the filesystem layer is initialized 6 | void DeviceLock(void); // Prevents further accesses to the device. 7 | void DeviceUnmount(void); // Called when OPL is shutting down. 8 | void DeviceStop(void); // Called before the PS2 is to be shut down. 9 | 10 | int DeviceReadSectors(u32 lsn, void *buffer, unsigned int sectors); 11 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/imports.lst: -------------------------------------------------------------------------------- 1 | ioman_IMPORTS_start 2 | I_AddDrv 3 | I_DelDrv 4 | ioman_IMPORTS_end 5 | 6 | stdio_IMPORTS_start 7 | I_printf 8 | stdio_IMPORTS_end 9 | 10 | dmacman_IMPORTS_start 11 | I_dmac_get_dpcr2 12 | I_dmac_set_dpcr2 13 | dmacman_IMPORTS_end 14 | 15 | intrman_IMPORTS_start 16 | I_CpuSuspendIntr 17 | I_CpuResumeIntr 18 | I_QueryIntrContext 19 | I_EnableIntr 20 | I_RegisterIntrHandler 21 | intrman_IMPORTS_end 22 | 23 | sysmem_IMPORTS_start 24 | I_Kprintf 25 | I_AllocSysMemory 26 | #ifdef __IOPCORE_DEBUG 27 | I_QueryTotalFreeMemSize 28 | #endif 29 | sysmem_IMPORTS_end 30 | 31 | loadcore_IMPORTS_start 32 | I_FlushDcache 33 | I_FlushIcache 34 | I_RegisterLibraryEntries 35 | I_GetLoadcoreInternalData 36 | I_QueryBootMode 37 | loadcore_IMPORTS_end 38 | 39 | sysclib_IMPORTS_start 40 | I_strcpy 41 | I_strlen 42 | I_strncmp 43 | I_strchr 44 | I_strrchr 45 | I_strstr 46 | I_strncpy 47 | I_sprintf 48 | I_memcpy 49 | sysclib_IMPORTS_end 50 | 51 | thsemap_IMPORTS_start 52 | I_CreateSema 53 | I_SignalSema 54 | I_iSignalSema 55 | I_WaitSema 56 | I_DeleteSema 57 | I_PollSema 58 | thsemap_IMPORTS_end 59 | 60 | thbase_IMPORTS_start 61 | I_CreateThread 62 | I_StartThread 63 | I_DelayThread 64 | I_SetAlarm 65 | I_iSetAlarm 66 | I_CancelAlarm 67 | I_USec2SysClock 68 | I_SleepThread 69 | I_iWakeupThread 70 | thbase_IMPORTS_end 71 | 72 | thevent_IMPORTS_start 73 | I_CreateEventFlag 74 | I_ClearEventFlag 75 | I_iClearEventFlag 76 | I_SetEventFlag 77 | I_iSetEventFlag 78 | I_WaitEventFlag 79 | I_PollEventFlag 80 | thevent_IMPORTS_end 81 | 82 | sifman_IMPORTS_start 83 | I_sceSifSetDma 84 | I_sceSifDmaStat 85 | sifman_IMPORTS_end 86 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/ioman_add.h: -------------------------------------------------------------------------------- 1 | #ifndef _IOMAN_ADD_H_ 2 | #define _IOMAN_ADD_H_ 3 | 4 | #include 5 | 6 | #define IOP_DT_FSEXT 0x10000000 7 | 8 | typedef struct _iop_ext_device 9 | { 10 | const char *name; 11 | unsigned int type; 12 | unsigned int version; /* Not so sure about this one. */ 13 | const char *desc; 14 | struct _iop_ext_device_ops *ops; 15 | } iop_ext_device_t; 16 | 17 | typedef struct _iop_ext_device_ops 18 | { 19 | int (*init)(iop_device_t *); 20 | int (*deinit)(iop_device_t *); 21 | int (*format)(iop_file_t *); 22 | int (*open)(iop_file_t *, const char *, int); 23 | int (*close)(iop_file_t *); 24 | int (*read)(iop_file_t *, void *, int); 25 | int (*write)(iop_file_t *, void *, int); 26 | int (*lseek)(iop_file_t *, int, int); 27 | int (*ioctl)(iop_file_t *, unsigned long, void *); 28 | int (*remove)(iop_file_t *, const char *); 29 | int (*mkdir)(iop_file_t *, const char *); 30 | int (*rmdir)(iop_file_t *, const char *); 31 | int (*dopen)(iop_file_t *, const char *); 32 | int (*dclose)(iop_file_t *); 33 | int (*dread)(iop_file_t *, iox_dirent_t *); 34 | int (*getstat)(iop_file_t *, const char *, iox_stat_t *); 35 | int (*chstat)(iop_file_t *, const char *, iox_stat_t *, unsigned int); 36 | /* Extended ops start here. */ 37 | int (*rename)(iop_file_t *, const char *, const char *); 38 | int (*chdir)(iop_file_t *, const char *); 39 | int (*sync)(iop_file_t *, const char *, int); 40 | int (*mount)(iop_file_t *, const char *, const char *, int, void *, unsigned int); 41 | int (*umount)(iop_file_t *, const char *); 42 | long long (*lseek64)(iop_file_t *, long long, int); 43 | int (*devctl)(iop_file_t *, const char *, int, void *, unsigned int, void *, unsigned int); 44 | int (*symlink)(iop_file_t *, const char *, const char *); 45 | int (*readlink)(iop_file_t *, const char *, char *, unsigned int); 46 | int (*ioctl2)(iop_file_t *, int, void *, unsigned int, void *, unsigned int); 47 | 48 | } iop_ext_device_ops_t; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/ioplib_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009-2010, jimmikaelkael 3 | Licenced under Academic Free License version 3.0 4 | Review Open PS2 Loader README & LICENSE files for further details. 5 | */ 6 | 7 | #ifndef IOPLIB_UTIL_H 8 | #define IOPLIB_UTIL_H 9 | 10 | typedef struct 11 | { 12 | int version; 13 | void **exports; 14 | } modinfo_t; 15 | 16 | int getModInfo(char *modname, modinfo_t *info); 17 | void hookMODLOAD(void); 18 | 19 | #endif /* IOPLIB_UTIL_H */ 20 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | * irx_imports.h - Defines all IRX imports. 3 | * 4 | * Copyright (c) 2003 Marcus R. Brown 5 | * 6 | * See the file LICENSE included with this distribution for licensing terms. 7 | */ 8 | 9 | #ifndef IOP_IRX_IMPORTS_H 10 | #define IOP_IRX_IMPORTS_H 11 | 12 | #include "irx.h" 13 | 14 | /* Please keep these in alphabetical order! */ 15 | #include "dmacman.h" 16 | #include "intrman.h" 17 | #include "ioman.h" 18 | #include "loadcore.h" 19 | #include "sifman.h" 20 | #include "stdio.h" 21 | #include "sysclib.h" 22 | #include "sysmem.h" 23 | #include "thbase.h" 24 | #include "thevent.h" 25 | #ifdef ALT_READ_CORE 26 | #include "thmsgbx.h" 27 | #endif 28 | #include "thsemap.h" 29 | 30 | #endif /* IOP_IRX_IMPORTS_H */ 31 | -------------------------------------------------------------------------------- /modules/iopcore/common/oplsmb.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __OPLSMB__ 3 | #define __OPLSMB__ 4 | 5 | typedef struct 6 | { 7 | u32 MaxBufferSize; 8 | u32 SessionKey; 9 | char PrimaryDomainServerName[32]; 10 | u8 EncryptionKey[8]; 11 | u32 Capabilities; 12 | u16 MaxMpxCount; 13 | u8 SecurityMode; // 0 = share level, 1 = user level 14 | u8 PasswordType; // 0 = PlainText passwords, 1 = use challenge/response 15 | char Username[36]; 16 | char Password[48]; // either PlainText, either hashed 17 | int PasswordLen; 18 | int HashedFlag; 19 | void *IOPaddr; 20 | } server_specs_t; 21 | 22 | typedef void (*OplSmbPwHashFunc_t)(server_specs_t *ss); 23 | 24 | #define oplsmb_IMPORTS_start DECLARE_IMPORT_TABLE(oplsmb, 1, 1) 25 | #define oplsmb_IMPORTS_end END_IMPORT_TABLE 26 | 27 | void smb_NegotiateProt(OplSmbPwHashFunc_t hash_callback); 28 | #define I_smb_NegotiateProt DECLARE_IMPORT(4, smb_NegotiateProt) 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /modules/iopcore/common/smsutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | # ___ _ _ ___ 3 | # | | | | | 4 | # ___| | | ___| PS2DEV Open Source Project. 5 | #---------------------------------------------------------- 6 | # (c) 2005 by Eugene Plotnikov 7 | # 8 | # Licensed under Academic Free License version 2.0 9 | # Review ps2sdk README & LICENSE files for further details. 10 | */ 11 | #ifndef __SMSUTILS_H 12 | #define __SMSUTILS_H 13 | 14 | #include 15 | 16 | #define smsutils_IMPORTS_start DECLARE_IMPORT_TABLE(smsutils, 1, 1) 17 | 18 | extern void *mips_memcpy(void *, const void *, size_t); 19 | #define I_mips_memcpy DECLARE_IMPORT(4, mips_memcpy) 20 | 21 | extern void *mips_memset(void *, int, size_t); 22 | #define I_mips_memset DECLARE_IMPORT(5, mips_memset) 23 | 24 | #define smsutils_IMPORTS_end END_IMPORT_TABLE 25 | 26 | #ifdef memcpy 27 | #undef memcpy 28 | #endif 29 | #define memcpy mips_memcpy 30 | #ifdef memset 31 | #undef memset 32 | #endif 33 | #define memset mips_memset 34 | 35 | #endif /* __SMSUTILS_H */ 36 | -------------------------------------------------------------------------------- /modules/iopcore/imgdrv/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = imgdrv.irx 2 | IOP_OBJS = imgdrv.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../Rules.bin.make 6 | include $(PS2SDK)/samples/Makefile.iopglobal 7 | -------------------------------------------------------------------------------- /modules/iopcore/imgdrv/imports.lst: -------------------------------------------------------------------------------- 1 | ioman_IMPORTS_start 2 | I_AddDrv 3 | I_DelDrv 4 | ioman_IMPORTS_end 5 | 6 | sysclib_IMPORTS_start 7 | I_memcpy 8 | sysclib_IMPORTS_end 9 | -------------------------------------------------------------------------------- /modules/iopcore/imgdrv/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright 2001-2004, ps2dev - http://www.ps2dev.org 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id: irx_imports.h 577 2004-09-14 14:41:46Z pixel $ 11 | # Defines all IRX imports. 12 | */ 13 | 14 | #ifndef IOP_IRX_IMPORTS_H 15 | #define IOP_IRX_IMPORTS_H 16 | 17 | #include "irx.h" 18 | 19 | /* Please keep these in alphabetical order! */ 20 | #include "ioman.h" 21 | #include "stdio.h" 22 | #include "sysclib.h" 23 | #include "thbase.h" 24 | 25 | #endif /* IOP_IRX_IMPORTS_H */ 26 | -------------------------------------------------------------------------------- /modules/iopcore/patches/apemodpatch/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = apemodpatch.irx 2 | IOP_OBJS = main.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../../Rules.bin.make 6 | include $(PS2SDK)/samples/Makefile.iopglobal 7 | -------------------------------------------------------------------------------- /modules/iopcore/patches/apemodpatch/imports.lst: -------------------------------------------------------------------------------- 1 | loadcore_IMPORTS_start 2 | I_GetLoadcoreInternalData 3 | I_FlushIcache 4 | loadcore_IMPORTS_end 5 | 6 | modload_IMPORTS_start 7 | I_LoadModule 8 | I_StartModule 9 | modload_IMPORTS_end 10 | 11 | stdio_IMPORTS_start 12 | I_printf 13 | stdio_IMPORTS_end 14 | 15 | thbase_IMPORTS_start 16 | I_SetAlarm 17 | I_CancelAlarm 18 | thbase_IMPORTS_end 19 | 20 | thevent_IMPORTS_start 21 | I_CreateEventFlag 22 | I_WaitEventFlag 23 | I_iSetEventFlag 24 | thevent_IMPORTS_end 25 | 26 | thsemap_IMPORTS_start 27 | I_CreateSema 28 | I_SignalSema 29 | I_PollSema 30 | thsemap_IMPORTS_end 31 | -------------------------------------------------------------------------------- /modules/iopcore/patches/apemodpatch/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include "irx.h" 5 | 6 | /* Please keep these in alphabetical order! */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #endif /* IOP_IRX_IMPORTS_H */ 16 | -------------------------------------------------------------------------------- /modules/iopcore/patches/cleareffects/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = cleareffects.irx 2 | IOP_OBJS = main.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../../Rules.bin.make 6 | include $(PS2SDK)/samples/Makefile.iopglobal 7 | -------------------------------------------------------------------------------- /modules/iopcore/patches/cleareffects/imports.lst: -------------------------------------------------------------------------------- 1 | libsd_IMPORTS_start 2 | I_sceSdInit 3 | I_sceSdSetEffectAttr 4 | libsd_IMPORTS_end 5 | 6 | sysclib_IMPORTS_start 7 | I_memset 8 | sysclib_IMPORTS_end 9 | -------------------------------------------------------------------------------- /modules/iopcore/patches/cleareffects/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include "irx.h" 5 | 6 | /* Please keep these in alphabetical order! */ 7 | #include 8 | #include 9 | #include 10 | 11 | #endif /* IOP_IRX_IMPORTS_H */ 12 | -------------------------------------------------------------------------------- /modules/iopcore/patches/cleareffects/main.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Patch for games (e.g. Half Life) that have the SPU2 Digital Effects function inadvertently enabled with old settings from previously-run software. 3 | * Solve this problem by disabling sound effects via sceSdSetEfectAttr(), which will clear the necessary registers. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #define MODNAME "cleareffects" 11 | IRX_ID(MODNAME, 1, 1); 12 | 13 | int _start(int argc, char **argv) 14 | { 15 | sceSdEffectAttr attr = { 16 | 0, 17 | SD_EFFECT_MODE_OFF, 18 | 0, 19 | 0, 20 | 0, 21 | 0, 22 | }; 23 | 24 | sceSdInit(0); 25 | 26 | sceSdSetEffectAttr(0, &attr); 27 | sceSdSetEffectAttr(1, &attr); 28 | 29 | return MODULE_NO_RESIDENT_END; 30 | } 31 | -------------------------------------------------------------------------------- /modules/iopcore/patches/f2techioppatch/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = f2techioppatch.irx 2 | IOP_OBJS = main.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../../Rules.bin.make 6 | include $(PS2SDK)/samples/Makefile.iopglobal 7 | -------------------------------------------------------------------------------- /modules/iopcore/patches/f2techioppatch/imports.lst: -------------------------------------------------------------------------------- 1 | loadcore_IMPORTS_start 2 | I_GetLoadcoreInternalData 3 | loadcore_IMPORTS_end 4 | 5 | modload_IMPORTS_start 6 | I_LoadModule 7 | I_StartModule 8 | modload_IMPORTS_end 9 | 10 | stdio_IMPORTS_start 11 | I_printf 12 | stdio_IMPORTS_end 13 | -------------------------------------------------------------------------------- /modules/iopcore/patches/f2techioppatch/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include "irx.h" 5 | 6 | /* Please keep these in alphabetical order! */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #endif /* IOP_IRX_IMPORTS_H */ 13 | -------------------------------------------------------------------------------- /modules/iopcore/patches/f2techioppatch/main.c: -------------------------------------------------------------------------------- 1 | /** Fix for Shadow Man: 2econd Coming. 2 | * The game does not allocate sufficient memory for holding compressed data before decompression. 3 | * The corruption happens when the game tries to read 17 sectors due to the sound driver 4 | * rounding up to 17 when the reading amount being not a multiple of CD-ROM sector sizes. 5 | * 6 | * Even if 17 sectors are read, the uncompressed data does not seem to exceed 32768 bytes. 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #define MODNAME "f2techioppatch" 15 | IRX_ID(MODNAME, 1, 1); 16 | 17 | #define JAL(addr) (0x0c000000 | (((addr)&0x03ffffff) >> 2)) 18 | #define JMP(addr) (0x08000000 | (0x3ffffff & ((addr) >> 2))) 19 | 20 | int _start(int argc, char **argv) 21 | { 22 | lc_internals_t *lc; 23 | ModuleInfo_t *m; 24 | int modId, modRet; 25 | 26 | if (argc != 2) { 27 | printf("Missing module arg.\n"); 28 | return MODULE_NO_RESIDENT_END; 29 | } 30 | 31 | modId = LoadModule(argv[1]); 32 | if (modId < 0) { 33 | printf("Failed to load %s (%d).\n", argv[1], modId); 34 | return MODULE_NO_RESIDENT_END; 35 | } 36 | 37 | lc = GetLoadcoreInternalData(); 38 | 39 | // Locate the specified module. 40 | m = lc->image_info; 41 | while (m != NULL) { 42 | if (modId == m->id) 43 | break; 44 | 45 | m = m->next; 46 | } 47 | 48 | if (m != NULL) { // Increase size of CompBuffers, to allow for 17 sectors to be stored. 49 | *(u16 *)(m->text_start + 0x000016b8) = 0x8800; // Original: 0x8000 50 | *(u16 *)(m->text_start + 0x000016bc) = 0x8800; // Original: 0x8000 51 | 52 | StartModule(modId, "", 0, NULL, &modRet); 53 | 54 | return MODULE_RESIDENT_END; 55 | } 56 | 57 | printf("Could not find module %d.\n", modId); 58 | 59 | return MODULE_NO_RESIDENT_END; 60 | } 61 | -------------------------------------------------------------------------------- /modules/iopcore/patches/iremsndpatch/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = iremsndpatch.irx 2 | IOP_OBJS = main.o asm.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../../Rules.bin.make 6 | include $(PS2SDK)/samples/Makefile.iopglobal 7 | -------------------------------------------------------------------------------- /modules/iopcore/patches/iremsndpatch/asm.S: -------------------------------------------------------------------------------- 1 | #include "as_reg_compat.h" 2 | 3 | .set noreorder 4 | 5 | .text 6 | 7 | .extern _lock 8 | .extern _unlock 9 | 10 | .globl _lock_RpcFunc 11 | .ent _lock_RpcFunc 12 | _lock_RpcFunc: 13 | move $s1, $a1 # $a0 already preserved in s2 14 | 15 | addiu $sp, $sp, -0x18 16 | sw $ra, 0x010($sp) 17 | 18 | jal _lock 19 | move $s0, $a2 20 | 21 | lw $ra, 0x010($sp) 22 | 23 | 24 | move $a0, $s2 # Restore $a0, $a1, $a2 25 | move $a1, $s1 26 | move $a2, $s0 27 | 28 | jr $ra 29 | addiu $sp, $sp, 0x18 30 | .end _lock_RpcFunc 31 | -------------------------------------------------------------------------------- /modules/iopcore/patches/iremsndpatch/imports.lst: -------------------------------------------------------------------------------- 1 | loadcore_IMPORTS_start 2 | I_GetLoadcoreInternalData 3 | I_FlushIcache 4 | loadcore_IMPORTS_end 5 | 6 | stdio_IMPORTS_start 7 | I_printf 8 | stdio_IMPORTS_end 9 | 10 | sysclib_IMPORTS_start 11 | I_strtol 12 | sysclib_IMPORTS_end 13 | 14 | thbase_IMPORTS_start 15 | I_WakeupThread 16 | thbase_IMPORTS_end 17 | 18 | thsemap_IMPORTS_start 19 | I_CreateSema 20 | I_SignalSema 21 | I_WaitSema 22 | thsemap_IMPORTS_end 23 | -------------------------------------------------------------------------------- /modules/iopcore/patches/iremsndpatch/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright 2001-2004, ps2dev - http://www.ps2dev.org 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id: irx_imports.h 577 2004-09-14 14:41:46Z pixel $ 11 | # Defines all IRX imports. 12 | */ 13 | 14 | #ifndef IOP_IRX_IMPORTS_H 15 | #define IOP_IRX_IMPORTS_H 16 | 17 | #include "irx.h" 18 | 19 | /* Please keep these in alphabetical order! */ 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #endif /* IOP_IRX_IMPORTS_H */ 28 | -------------------------------------------------------------------------------- /modules/iopcore/resetspu/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = resetspu.irx 2 | IOP_OBJS = resetspu.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../Rules.bin.make 6 | include $(PS2SDK)/samples/Makefile.iopglobal 7 | -------------------------------------------------------------------------------- /modules/iopcore/resetspu/imports.lst: -------------------------------------------------------------------------------- 1 | intrman_IMPORTS_start 2 | I_EnableIntr 3 | intrman_IMPORTS_end 4 | -------------------------------------------------------------------------------- /modules/iopcore/resetspu/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include "irx.h" 5 | 6 | /* Please keep these in alphabetical order! */ 7 | #include 8 | #include 9 | 10 | #endif /* IOP_IRX_IMPORTS_H */ 11 | -------------------------------------------------------------------------------- /modules/isofs/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = isofs.irx 2 | IOP_OBJS = isofs.o zso.o lz4.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../Rules.bin.make 6 | include $(PS2SDK)/samples/Makefile.iopglobal 7 | -------------------------------------------------------------------------------- /modules/isofs/imports.lst: -------------------------------------------------------------------------------- 1 | thsemap_IMPORTS_start 2 | I_CreateSema 3 | I_DeleteSema 4 | I_SignalSema 5 | I_WaitSema 6 | thsemap_IMPORTS_end 7 | 8 | iomanX_IMPORTS_start 9 | I_open 10 | I_close 11 | I_read 12 | I_lseek 13 | I_AddDrv 14 | iomanX_IMPORTS_end 15 | 16 | sysclib_IMPORTS_start 17 | I_memset 18 | I_memcmp 19 | I_memcpy 20 | I_strcmp 21 | I_strcpy 22 | I_strlen 23 | I_strncpy 24 | I_strchr 25 | I_strrchr 26 | sysclib_IMPORTS_end 27 | 28 | sysmem_IMPORTS_start 29 | I_AllocSysMemory 30 | sysmem_IMPORTS_end 31 | -------------------------------------------------------------------------------- /modules/isofs/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | /* Please keep these in alphabetical order! */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #endif /* IOP_IRX_IMPORTS_H */ 14 | -------------------------------------------------------------------------------- /modules/isofs/zso.h: -------------------------------------------------------------------------------- 1 | #ifndef ZSO_H 2 | #define ZSO_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #define ZSO_MAGIC 0x4F53495A // ZISO 10 | 11 | // no game should request more than 256 sectors per read (512KB of data) 12 | // should allow us to decompress all data with only 2 IO calls at most. 13 | #define ZISO_IDX_MAX_ENTRIES 257 14 | 15 | #define MIN(x, y) ((x < y) ? x : y) 16 | 17 | // CSO Header (same for ZSO) 18 | typedef struct 19 | { 20 | u32 magic; // 0 21 | u32 header_size; // 4 22 | u64 total_bytes; // 8 23 | u32 block_size; // 16 24 | u8 ver; // 20 25 | u8 align; // 21 26 | u8 rsv_06[2]; // 22 27 | } ZISO_header; 28 | 29 | 30 | // block offset cache, reduces IO access 31 | extern u32 *ziso_idx_cache; 32 | extern int ziso_idx_start_block; 33 | 34 | // header data that we need for the reader 35 | extern u32 ziso_align; 36 | extern u32 ziso_total_block; 37 | 38 | // temp block buffer (2048 bytes) 39 | extern u8 *ziso_tmp_buf; 40 | 41 | void ziso_init(ZISO_header *header, u32 first_block); 42 | int ziso_read_sector(u8 *buf, u32 sector, unsigned int count); 43 | 44 | // This must be implemented by isofs/cdvdman/frontend 45 | extern void *ziso_alloc(u32 size); 46 | extern int read_raw_data(u8 *addr, u32 size, u32 offset, u32 shift); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /modules/mcemu/Makefile: -------------------------------------------------------------------------------- 1 | IOP_OBJS = mcemu.o mcemu_io.o mcemu_sys.o mcemu_var.o mcemu_rpc.o imports.o 2 | 3 | ifeq ($(USE_HDD),1) 4 | IOP_BIN = hdd_mcemu.irx 5 | IOP_OBJS_DIR = obj.hdd/ 6 | IOP_OBJS += device-hdd.o 7 | IOP_CFLAGS += -DHDD_DRIVER 8 | endif 9 | 10 | ifeq ($(USE_SMB),1) 11 | IOP_BIN = smb_mcemu.irx 12 | IOP_OBJS_DIR = obj.smb/ 13 | IOP_OBJS += device-smb.o 14 | IOP_CFLAGS += -DSMB_DRIVER 15 | endif 16 | 17 | ifeq ($(USE_BDM),1) 18 | IOP_BIN = bdm_mcemu.irx 19 | IOP_OBJS_DIR = obj.bdm/ 20 | IOP_OBJS += device-bdm.o 21 | IOP_CFLAGS += -DBDM_DRIVER 22 | endif 23 | 24 | ifeq ($(IOPCORE_DEBUG),1) 25 | IOP_CFLAGS += -DDEBUG 26 | endif 27 | 28 | ifeq ($(PADEMU),1) 29 | IOP_CFLAGS += -DPADEMU 30 | endif 31 | 32 | include $(PS2SDK)/Defs.make 33 | include ../Rules.bin.make 34 | include $(PS2SDK)/samples/Makefile.iopglobal 35 | -------------------------------------------------------------------------------- /modules/mcemu/device-bdm.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006-2008, Romz 3 | Copyright 2010, Polo 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | */ 7 | 8 | #include "mcemu.h" 9 | 10 | int DeviceWritePage(int mc_num, void *buf, u32 page_num) 11 | { 12 | u32 lba; 13 | 14 | lba = vmcSpec[mc_num].stsec + page_num; 15 | DPRINTF("writing page 0x%lx at lba 0x%lx\n", page_num, lba); 16 | 17 | bdm_writeSector(lba, 1, buf); 18 | 19 | return 1; 20 | } 21 | 22 | int DeviceReadPage(int mc_num, void *buf, u32 page_num) 23 | { 24 | u32 lba; 25 | 26 | lba = vmcSpec[mc_num].stsec + page_num; 27 | DPRINTF("reading page 0x%lx at lba 0x%lx\n", page_num, lba); 28 | 29 | bdm_readSector(lba, 1, buf); 30 | 31 | return 1; 32 | } 33 | 34 | void DeviceShutdown(void) 35 | { 36 | } 37 | -------------------------------------------------------------------------------- /modules/mcemu/device-hdd.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006-2008, Romz 3 | Copyright 2010, Polo 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | */ 7 | 8 | #include "mcemu.h" 9 | 10 | /* Return ata sector corresponding to page number in vmc file */ 11 | static u32 Mcpage_to_Apasector(int mc_num, u32 mc_page) 12 | { 13 | register int i; 14 | register u32 sector_to_read, lbound, ubound; 15 | 16 | ubound = 0; 17 | sector_to_read = 0; 18 | 19 | for (i = 0; i < 10; i++) { 20 | lbound = ubound; 21 | ubound += vmcSpec[mc_num].blocks[i].count; 22 | 23 | if ((mc_page >= (lbound << 4)) && (mc_page < (ubound << 4))) 24 | sector_to_read = vmcSpec[mc_num].parts[vmcSpec[mc_num].blocks[i].subpart].start + (vmcSpec[mc_num].blocks[i].number << 4) + (mc_page - (lbound << 4)); 25 | } 26 | 27 | return sector_to_read; 28 | } 29 | 30 | int DeviceWritePage(int mc_num, void *buf, u32 page_num) 31 | { 32 | u32 lba; 33 | 34 | lba = Mcpage_to_Apasector(mc_num, page_num); 35 | DPRINTF("writing page 0x%lx at lba 0x%lx\n", page_num, lba); 36 | 37 | return (sceAtaDmaTransfer(0, buf, lba, 1, ATA_DIR_WRITE) == 0 ? 1 : 0); 38 | } 39 | 40 | int DeviceReadPage(int mc_num, void *buf, u32 page_num) 41 | { 42 | u32 lba; 43 | 44 | lba = Mcpage_to_Apasector(mc_num, page_num); 45 | DPRINTF("reading page 0x%lx at lba 0x%lx\n", page_num, lba); 46 | 47 | return (sceAtaDmaTransfer(0, buf, lba, 1, ATA_DIR_READ) == 0 ? 1 : 0); 48 | } 49 | 50 | void DeviceShutdown(void) 51 | { 52 | } 53 | -------------------------------------------------------------------------------- /modules/mcemu/device-smb.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006-2008, Romz 3 | Copyright 2010, Polo 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | */ 7 | 8 | #include "mcemu.h" 9 | 10 | int DeviceWritePage(int mc_num, void *buf, u32 page_num) 11 | { 12 | u32 offset; 13 | 14 | offset = page_num * vmcSpec[mc_num].cspec.PageSize; 15 | DPRINTF("writing page 0x%lx at offset 0x%lx\n", page_num, offset); 16 | 17 | return (smb_WriteFile(vmcSpec[mc_num].fid, offset, 0, buf, vmcSpec[mc_num].cspec.PageSize) != 0 ? 1 : 0); 18 | } 19 | 20 | int DeviceReadPage(int mc_num, void *buf, u32 page_num) 21 | { 22 | u32 offset; 23 | 24 | offset = page_num * vmcSpec[mc_num].cspec.PageSize; 25 | DPRINTF("reading page 0x%lx at offset 0x%lx\n", page_num, offset); 26 | 27 | if (vmcSpec[mc_num].fid == 0xFFFF) { 28 | if (!smb_OpenAndX(vmcSpec[mc_num].fname, &vmcSpec[mc_num].fid, 1)) 29 | return 0; 30 | } 31 | 32 | return (smb_ReadFile(vmcSpec[mc_num].fid, offset, 0, buf, vmcSpec[mc_num].cspec.PageSize) != 0 ? 1 : 0); 33 | } 34 | 35 | void DeviceShutdown(void) 36 | { 37 | int i; 38 | 39 | for (i = 0; i < 2; i++) { 40 | if (vmcSpec[i].active) { 41 | smb_Close(vmcSpec[i].fid); 42 | vmcSpec[i].fid = 0xFFFF; 43 | vmcSpec[i].active = 0; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /modules/mcemu/device.h: -------------------------------------------------------------------------------- 1 | int DeviceWritePage(int mc_num, void *buf, u32 page_num); 2 | int DeviceReadPage(int mc_num, void *buf, u32 page_num); 3 | void DeviceShutdown(void); 4 | -------------------------------------------------------------------------------- /modules/mcemu/imports.lst: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // File name: imports.lst 3 | // Description: Used to generate code for IRX function imports 4 | //--------------------------------------------------------------------------- 5 | intrman_IMPORTS_start 6 | I_CpuSuspendIntr 7 | I_CpuResumeIntr 8 | intrman_IMPORTS_end 9 | 10 | loadcore_IMPORTS_start 11 | I_GetLoadcoreInternalData 12 | I_QueryLibraryEntryTable 13 | I_FlushIcache 14 | I_FlushDcache 15 | I_ReleaseLibraryEntries 16 | loadcore_IMPORTS_end 17 | 18 | oplutils_IMPORTS_start 19 | I_getModInfo 20 | I_oplRegisterShutdownCallback 21 | #ifdef BDM_DRIVER 22 | I_bdm_readSector 23 | I_bdm_writeSector 24 | #endif 25 | #ifdef HDD_DRIVER 26 | I_sceAtaDmaTransfer 27 | #endif 28 | #ifdef SMB_DRIVER 29 | I_smb_OpenAndX 30 | I_smb_ReadFile 31 | I_smb_WriteFile 32 | I_smb_Close 33 | #endif 34 | oplutils_IMPORTS_end 35 | 36 | sifcmd_IMPORTS_start 37 | I_sceSifCallRpc 38 | I_sceSifGetOtherData 39 | I_sceSifInitRpc 40 | I_sceSifBindRpc 41 | I_sceSifSendCmd 42 | sifcmd_IMPORTS_end 43 | 44 | sifman_IMPORTS_start 45 | I_sceSifInit 46 | I_sceSifSetDma 47 | I_sceSifCheckInit 48 | I_sceSifDmaStat 49 | sifman_IMPORTS_end 50 | 51 | smsutils_IMPORTS_start 52 | I_mips_memset 53 | I_mips_memcpy 54 | smsutils_IMPORTS_end 55 | 56 | stdio_IMPORTS_start 57 | I_printf 58 | stdio_IMPORTS_end 59 | 60 | sysclib_IMPORTS_start 61 | I_prnt 62 | I_strcmp 63 | sysclib_IMPORTS_end 64 | 65 | sysmem_IMPORTS_start 66 | I_AllocSysMemory 67 | I_FreeSysMemory 68 | sysmem_IMPORTS_end 69 | 70 | thbase_IMPORTS_start 71 | I_CreateThread 72 | I_StartThread 73 | I_DeleteThread 74 | I_DelayThread 75 | thbase_IMPORTS_end 76 | 77 | dmacman_IMPORTS_start 78 | I_dmac_request 79 | I_dmac_transfer 80 | dmacman_IMPORTS_end 81 | 82 | //--------------------------------------------------------------------------- 83 | // End of file: imports.lst 84 | //--------------------------------------------------------------------------- 85 | -------------------------------------------------------------------------------- /modules/mcemu/ioman_add.h: -------------------------------------------------------------------------------- 1 | #ifndef _IOMAN_ADD_H_ 2 | #define _IOMAN_ADD_H_ 3 | 4 | #define IOP_DT_FSEXT 0x10000000 5 | 6 | typedef struct _iop_ext_device 7 | { 8 | const char *name; 9 | unsigned int type; 10 | unsigned int version; /* Not so sure about this one. */ 11 | const char *desc; 12 | struct _iop_ext_device_ops *ops; 13 | } iop_ext_device_t; 14 | 15 | typedef struct _iop_ext_device_ops 16 | { 17 | int (*init)(iop_device_t *); 18 | int (*deinit)(iop_device_t *); 19 | int (*format)(iop_file_t *); 20 | int (*open)(iop_file_t *, const char *, int); 21 | int (*close)(iop_file_t *); 22 | int (*read)(iop_file_t *, void *, int); 23 | int (*write)(iop_file_t *, void *, int); 24 | int (*lseek)(iop_file_t *, unsigned long, int); 25 | int (*ioctl)(iop_file_t *, unsigned long, void *); 26 | int (*remove)(iop_file_t *, const char *); 27 | int (*mkdir)(iop_file_t *, const char *); 28 | int (*rmdir)(iop_file_t *, const char *); 29 | int (*dopen)(iop_file_t *, const char *); 30 | int (*dclose)(iop_file_t *); 31 | int (*dread)(iop_file_t *, iox_dirent_t *); 32 | int (*getstat)(iop_file_t *, const char *, iox_stat_t *); 33 | int (*chstat)(iop_file_t *, const char *, iox_stat_t *, unsigned int); 34 | /* Extended ops start here. */ 35 | int (*rename)(iop_file_t *, const char *, const char *); 36 | int (*chdir)(iop_file_t *, const char *); 37 | int (*sync)(iop_file_t *, const char *, int); 38 | int (*mount)(iop_file_t *, const char *, const char *, int, void *, unsigned int); 39 | int (*umount)(iop_file_t *, const char *); 40 | long long (*lseek64)(iop_file_t *, long long, int); 41 | int (*devctl)(iop_file_t *, const char *, int, void *, unsigned int, void *, unsigned int); 42 | int (*symlink)(iop_file_t *, const char *, const char *); 43 | int (*readlink)(iop_file_t *, const char *, char *, unsigned int); 44 | int (*ioctl2)(iop_file_t *, int, void *, unsigned int, void *, unsigned int); 45 | 46 | } iop_ext_device_ops_t; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /modules/mcemu/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | * irx_imports.h - Defines all IRX imports. 3 | * 4 | * NB: inapplicable old copyright claim to this material removed, as that 5 | * NB: claim would only relate to the old material created by that author 6 | */ 7 | 8 | #ifndef IOP_IRX_IMPORTS_H 9 | #define IOP_IRX_IMPORTS_H 10 | 11 | #include 12 | 13 | /* Please keep these in alphabetical order! */ 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #include "mcemu_utils.h" 27 | 28 | #endif /* IOP_IRX_IMPORTS_H */ 29 | -------------------------------------------------------------------------------- /modules/mcemu/mcemu_io.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006-2008, Romz 3 | Copyright 2010, Polo 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | */ 7 | 8 | #include "mcemu.h" 9 | 10 | int mc_configure(MemoryCard *mcds) 11 | { 12 | register int i; 13 | 14 | DPRINTF("vmcSpec[0].active = %d\n", vmcSpec[0].active); 15 | DPRINTF("vmcSpec[1].active = %d\n", vmcSpec[1].active); 16 | 17 | if (vmcSpec[0].active == 0 && vmcSpec[1].active == 0) 18 | return 0; 19 | 20 | for (i = 0; i < MCEMU_PORTS; i++, mcds++) { 21 | DPRINTF("vmcSpec[%d].flags = 0x%X\n", i, vmcSpec[i].flags); 22 | DPRINTF("vmcSpec[%d].cspec.PageSize = 0x%X\n", i, vmcSpec[i].cspec.PageSize); 23 | DPRINTF("vmcSpec[%d].cspec.BlockSize = 0x%X\n", i, vmcSpec[i].cspec.BlockSize); 24 | DPRINTF("vmcSpec[%d].cspec.CardSize = 0x%X\n", i, (unsigned int)vmcSpec[i].cspec.CardSize); 25 | 26 | if (vmcSpec[i].active == 1) { 27 | // Set virtual memorycard informations 28 | mcds->mcnum = i; 29 | mcds->tcode = 0x5A; /* 'Z' */ 30 | mcds->cbufp = &mceccbuf[i][0]; 31 | mcds->dbufp = &mcdatabuf[0]; 32 | mcds->flags = vmcSpec[i].flags; 33 | mcds->cspec.PageSize = vmcSpec[i].cspec.PageSize; 34 | mcds->cspec.BlockSize = vmcSpec[i].cspec.BlockSize; 35 | mcds->cspec.CardSize = vmcSpec[i].cspec.CardSize; 36 | } else 37 | mcds->mcnum = -1; 38 | } 39 | 40 | return 1; 41 | } 42 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/Makefile: -------------------------------------------------------------------------------- 1 | #Enable to reduce memory usage (in-game use). 2 | INGAME_DRIVER ?= 0 3 | 4 | #Enable to enable support for packet input from the interrupt context. 5 | INTERRUPT_CTX_INPKT ?= 1 6 | 7 | #Enable to build with the functions that were removed since OPL does not use them. 8 | FULL_LWIP ?= 0 9 | 10 | IOP_BIN = SMSTCPIP.irx 11 | IOP_OBJS = ps2ip.o inet.o ip.o ip_addr.o ip_frag.o etharp.o tcp_in.o tcp_out.o \ 12 | tcp.o tcpip.o mem.o api_lib.o api_msg.o sockets.o netif.o udp.o memp.o \ 13 | icmp.o pbuf.o timers.o exports.o imports.o 14 | IOP_LIBS = 15 | 16 | IOP_INCS += -Iinclude -I../../iopcore/common 17 | IOP_CFLAGS += -DLWIP_NOASSERT 18 | 19 | ifeq ($(INGAME_DRIVER),1) 20 | IOP_CFLAGS += -DINGAME_DRIVER 21 | endif 22 | 23 | ifeq ($(INTERRUPT_CTX_INPKT),1) 24 | IOP_CFLAGS += -DINTERRUPT_CTX_INPKT 25 | endif 26 | 27 | ifeq ($(FULL_LWIP),1) 28 | IOP_CFLAGS += -DFULL_LWIP 29 | endif 30 | 31 | include $(PS2SDK)/Defs.make 32 | include ../../Rules.bin.make 33 | include $(PS2SDK)/samples/Makefile.iopglobal 34 | 35 | ifneq ($(IOP_CC_VERSION),3.2.2) 36 | ifneq ($(IOP_CC_VERSION),3.2.3) 37 | IOP_CFLAGS += -mno-memcpy 38 | # Ignore warnings due to the old version of lwIP being used. 39 | IOP_CFLAGS += -Wno-attributes -Wno-array-bounds -Wno-unused-but-set-variable 40 | endif 41 | endif 42 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/exports.tab: -------------------------------------------------------------------------------- 1 | DECLARE_EXPORT_TABLE(ps2ip,1,3) 2 | DECLARE_EXPORT(_start) 3 | DECLARE_EXPORT(ps2ip_Stub) 4 | DECLARE_EXPORT(ps2ip_ShutDown) 5 | DECLARE_EXPORT(ps2ip_Stub) 6 | 7 | DECLARE_EXPORT(lwip_accept) 8 | DECLARE_EXPORT(lwip_bind) //5 9 | DECLARE_EXPORT(lwip_close) 10 | DECLARE_EXPORT(lwip_connect) 11 | DECLARE_EXPORT(lwip_listen) 12 | DECLARE_EXPORT(lwip_recv) 13 | DECLARE_EXPORT(lwip_recvfrom) //10 14 | DECLARE_EXPORT(lwip_send) 15 | DECLARE_EXPORT(lwip_sendto) 16 | DECLARE_EXPORT(lwip_socket) 17 | DECLARE_EXPORT(ps2ip_Stub) //lwip_select 18 | DECLARE_EXPORT(ps2ip_Stub) //15 - lwip_ioctl 19 | DECLARE_EXPORT(ps2ip_Stub) //lwip_getpeername 20 | DECLARE_EXPORT(ps2ip_Stub) //lwip_getsockname 21 | DECLARE_EXPORT(ps2ip_Stub) //lwip_getsockopt 22 | DECLARE_EXPORT(lwip_setsockopt) 23 | DECLARE_EXPORT(ps2ip_Stub) //20 - ps2ip_setconfig 24 | DECLARE_EXPORT(ps2ip_Stub) //ps2ip_getconfig 25 | DECLARE_EXPORT(ps2ip_input) 26 | DECLARE_EXPORT(etharp_output) 27 | DECLARE_EXPORT(inet_addr) 28 | DECLARE_EXPORT(tcpip_input) //25 29 | DECLARE_EXPORT(netif_add) 30 | DECLARE_EXPORT(ps2ip_Stub) //netif_find 31 | DECLARE_EXPORT(netif_set_default) 32 | DECLARE_EXPORT(netif_set_ipaddr) 33 | DECLARE_EXPORT(netif_set_netmask) //30 34 | DECLARE_EXPORT(netif_set_gw) 35 | DECLARE_EXPORT(ps2ip_Stub) 36 | DECLARE_EXPORT(pbuf_alloc) 37 | DECLARE_EXPORT(pbuf_realloc) 38 | DECLARE_EXPORT(pbuf_header) //35 39 | DECLARE_EXPORT(pbuf_ref) 40 | DECLARE_EXPORT(ps2ip_Stub) 41 | DECLARE_EXPORT(pbuf_free) 42 | DECLARE_EXPORT(pbuf_clen) 43 | DECLARE_EXPORT(pbuf_chain) //40 44 | DECLARE_EXPORT(pbuf_take) 45 | END_EXPORT_TABLE 46 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/imports.lst: -------------------------------------------------------------------------------- 1 | 2 | loadcore_IMPORTS_start 3 | I_RegisterLibraryEntries 4 | loadcore_IMPORTS_end 5 | 6 | smsutils_IMPORTS_start 7 | I_mips_memset 8 | I_mips_memcpy 9 | smsutils_IMPORTS_end 10 | 11 | intrman_IMPORTS_start 12 | I_CpuSuspendIntr 13 | I_CpuResumeIntr 14 | I_QueryIntrContext 15 | intrman_IMPORTS_end 16 | 17 | thbase_IMPORTS_start 18 | I_CreateThread 19 | I_DeleteThread 20 | I_ExitDeleteThread 21 | I_StartThread 22 | I_iReleaseWaitThread 23 | I_USec2SysClock 24 | I_SysClock2USec 25 | I_GetThreadId 26 | I_GetSystemTime 27 | I_SetAlarm 28 | I_CancelAlarm 29 | thbase_IMPORTS_end 30 | 31 | thevent_IMPORTS_start 32 | I_CreateEventFlag 33 | I_iSetEventFlag 34 | I_WaitEventFlag 35 | thevent_IMPORTS_end 36 | 37 | thsemap_IMPORTS_start 38 | I_CreateSema 39 | I_SignalSema 40 | I_iSignalSema 41 | I_WaitSema 42 | I_PollSema 43 | I_DeleteSema 44 | thsemap_IMPORTS_end 45 | 46 | sysclib_IMPORTS_start 47 | I_strcpy 48 | sysclib_IMPORTS_end 49 | 50 | sysmem_IMPORTS_start 51 | I_AllocSysMemory 52 | I_FreeSysMemory 53 | sysmem_IMPORTS_end 54 | 55 | stdio_IMPORTS_start 56 | I_printf 57 | stdio_IMPORTS_end 58 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/include/arch/cc.h: -------------------------------------------------------------------------------- 1 | #ifndef __CC_H__ 2 | #define __CC_H__ 3 | 4 | #define BYTE_ORDER LITTLE_ENDIAN 5 | 6 | typedef unsigned char u8_t; 7 | typedef signed char s8_t; 8 | typedef unsigned short u16_t; 9 | typedef signed short s16_t; 10 | typedef unsigned long u32_t; 11 | typedef signed long s32_t; 12 | 13 | typedef u32_t mem_ptr_t; 14 | 15 | #define PACK_STRUCT_FIELD(x) x __attribute__((packed)) 16 | #define PACK_STRUCT_STRUCT __attribute__((packed)) 17 | #endif /* __CC_H__ */ 18 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYS_ARCH_H__ 2 | #define __SYS_ARCH_H__ 3 | 4 | typedef int sys_prot_t; 5 | typedef int sys_sem_t; 6 | typedef struct sys_mbox *sys_mbox_t; 7 | typedef int sys_thread_t; 8 | 9 | #define SYS_MBOX_NULL NULL 10 | #define SYS_SEM_NULL 0 11 | 12 | #if MEM_LIBC_MALLOC 13 | void *ps2ip_mem_malloc(int size); 14 | void ps2ip_mem_free(void *rmem); 15 | void *ps2ip_mem_realloc(void *rmem, int newsize); 16 | 17 | #define mem_clib_free ps2ip_mem_free 18 | #define mem_clib_malloc ps2ip_mem_malloc 19 | #define mem_clib_realloc ps2ip_mem_realloc 20 | #endif 21 | 22 | #endif /* __SYS_ARCH_H__ */ 23 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/include/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright (c) 2003 Marcus R. Brown 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id: irx_imports.h 629 2004-10-11 00:45:00Z mrbrown $ 11 | # Defines all IRX imports. 12 | */ 13 | #ifndef IOP_IRX_IMPORTS_H 14 | #define IOP_IRX_IMPORTS_H 15 | 16 | #include "irx.h" 17 | #include "intrman.h" 18 | #include "loadcore.h" 19 | #include "smsutils.h" 20 | #include "stdio.h" 21 | #include "sysclib.h" 22 | #include "sysmem.h" 23 | #include "thbase.h" 24 | #include "thsemap.h" 25 | #include "thevent.h" 26 | 27 | #endif /* IOP_IRX_IMPORTS_H */ 28 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/include/lwip/def.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __LWIP_DEF_H__ 33 | #define __LWIP_DEF_H__ 34 | 35 | /* this might define NULL already */ 36 | #include "arch/cc.h" 37 | 38 | #define LWIP_MAX(x, y) (x) > (y) ? (x) : (y) 39 | #define LWIP_MIN(x, y) (x) < (y) ? (x) : (y) 40 | 41 | #ifndef NULL 42 | #define NULL ((void *)0) 43 | #endif 44 | 45 | 46 | #endif /* __LWIP_DEF_H__ */ 47 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/include/lwip/ip_frag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Jani Monoses 30 | * 31 | */ 32 | 33 | #ifndef __LWIP_IP_FRAG_H__ 34 | #define __LWIP_IP_FRAG_H__ 35 | 36 | #include "lwip/err.h" 37 | #include "lwip/pbuf.h" 38 | #include "lwip/netif.h" 39 | #include "lwip/ip_addr.h" 40 | 41 | struct pbuf *ip_reass(struct pbuf *); 42 | err_t ip_frag(struct pbuf *, struct netif *, struct ip_addr *); 43 | 44 | #endif /* __LWIP_IP_FRAG_H__ */ 45 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/include/netif/loopif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __NETIF_LOOPIF_H__ 33 | #define __NETIF_LOOPIF_H__ 34 | 35 | #include "lwip/netif.h" 36 | 37 | err_t loopif_init(struct netif *netif); 38 | 39 | #endif /* __NETIF_LOOPIF_H__ */ 40 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/include/ps2ip_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright 2001-2004, ps2dev - http://www.ps2dev.org 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id: ps2ip_internal.h 577 2004-09-14 14:41:46Z pixel $ 11 | */ 12 | 13 | #if !defined(IOP_PS2IP_INTERNAL_H) 14 | #define IOP_PS2IP_INTERNAL_H 15 | 16 | #include "types.h" 17 | #include "lwip/sockets.h" 18 | 19 | 20 | typedef struct 21 | { 22 | char netif_name[4]; 23 | struct in_addr ipaddr; 24 | struct in_addr netmask; 25 | struct in_addr gw; 26 | u32 dhcp_enabled; 27 | u32 dhcp_status; 28 | u8 hw_addr[8]; 29 | } t_ip_info; 30 | 31 | int ps2ip_setconfig(t_ip_info *ip_info); 32 | #define I_ps2ip_setconfig DECLARE_IMPORT(20, ps2ip_setconfig) 33 | int ps2ip_getconfig(char *netif_name, t_ip_info *ip_info); 34 | #define I_ps2ip_getconfig DECLARE_IMPORT(21, ps2ip_getconfig) 35 | err_t ps2ip_input(struct pbuf *pBuf, struct netif *pNetIF); 36 | #define I_ps2ip_input DECLARE_IMPORT(22, ps2ip_input) 37 | 38 | #endif // !defined(IOP_PS2IP_INTERNAL_H) 39 | -------------------------------------------------------------------------------- /modules/network/SMSTCPIP/ip_addr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #include "lwip/ip_addr.h" 34 | #include "lwip/inet.h" 35 | 36 | /* used by IP_ADDR_ANY and IP_ADDR_BROADCAST in ip_addr.h */ 37 | const struct ip_addr ip_addr_any = {0x00000000UL}; 38 | const struct ip_addr ip_addr_broadcast = {0xffffffffUL}; 39 | -------------------------------------------------------------------------------- /modules/network/SMSUTILS/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = SMSUTILS.irx 2 | IOP_OBJS = SMSUTILS.o 3 | 4 | IOP_INCS += -I../../iopcore/common 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/network/common/httpclient.h: -------------------------------------------------------------------------------- 1 | #define HTTP_CMODE_CLOSED 0 2 | #define HTTP_CMODE_PERSISTENT 1 3 | 4 | // EE-side only 5 | int HttpInit(void); 6 | void HttpDeinit(void); 7 | 8 | int HttpEstabConnection(char *server, u16 port); 9 | void HttpCloseConnection(s32 HttpSocket); 10 | 11 | /* mtime[0] = Years since year 2000 12 | mtime[1] = Month, 0-11 13 | mtime[2] = day in month, 0-30 14 | mtime[3] = Hour (0-23) 15 | mtime[4] = Minute (0-59) 16 | mtime[5] = Second (0-59) 17 | */ 18 | 19 | int HttpSendGetRequest(s32 HttpSocket, const char *UserAgent, const char *host, s8 *mode, const u8 *mtime, const char *uri, char *output, u16 *out_len); 20 | 21 | #define HTTP_CLIENT_SERVER_NAME_MAX 30 22 | #define HTTP_CLIENT_USER_AGENT_MAX 16 23 | #define HTTP_CLIENT_URI_MAX 128 24 | 25 | enum HTTP_CLIENT_CMD { 26 | HTTP_CLIENT_CMD_CONN_ESTAB, 27 | HTTP_CLIENT_CMD_CONN_CLOSE, 28 | HTTP_CLIENT_CMD_SEND_GET_REQ, 29 | }; 30 | 31 | struct HttpClientConnEstabArgs 32 | { 33 | char server[HTTP_CLIENT_SERVER_NAME_MAX]; 34 | u16 port; 35 | }; 36 | 37 | struct HttpClientConnCloseArgs 38 | { 39 | s32 socket; 40 | }; 41 | 42 | struct HttpClientSendGetArgs 43 | { 44 | s32 socket; 45 | char UserAgent[HTTP_CLIENT_USER_AGENT_MAX]; 46 | char host[HTTP_CLIENT_SERVER_NAME_MAX]; 47 | s8 mode; 48 | u8 hasMtime; 49 | u8 mtime[6]; 50 | char uri[HTTP_CLIENT_URI_MAX]; 51 | u16 out_len; 52 | void *output; 53 | }; 54 | 55 | struct HttpClientSendGetResult 56 | { 57 | s32 result; 58 | s8 mode; 59 | u8 padding; 60 | u16 out_len; 61 | }; 62 | 63 | #ifdef _IOP 64 | #define httpc_IMPORTS_start DECLARE_IMPORT_TABLE(httpc, 1, 1) 65 | #define httpc_IMPORTS_end END_IMPORT_TABLE 66 | 67 | #define I_HttpEstabConnection DECLARE_IMPORT(4, HttpEstabConnection) 68 | #define I_HttpCloseConnection DECLARE_IMPORT(5, HttpCloseConnection) 69 | #define I_HttpSendGetRequest DECLARE_IMPORT(6, HttpSendGetRequest) 70 | #endif 71 | -------------------------------------------------------------------------------- /modules/network/httpclient/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = httpclient.irx 2 | IOP_OBJS = main.o httpclient.o imports.o exports.o 3 | 4 | IOP_INCS += -I../common 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/network/httpclient/exports.tab: -------------------------------------------------------------------------------- 1 | void _funcret(){}; 2 | 3 | DECLARE_EXPORT_TABLE(httpc, 1, 1) 4 | DECLARE_EXPORT(_start) 5 | DECLARE_EXPORT(_exit) 6 | DECLARE_EXPORT(_funcret) 7 | DECLARE_EXPORT(_funcret) 8 | DECLARE_EXPORT(HttpEstabConnection) 9 | DECLARE_EXPORT(HttpCloseConnection) 10 | DECLARE_EXPORT(HttpSendGetRequest) 11 | END_EXPORT_TABLE 12 | -------------------------------------------------------------------------------- /modules/network/httpclient/imports.lst: -------------------------------------------------------------------------------- 1 | intrman_IMPORTS_start 2 | I_CpuSuspendIntr 3 | I_CpuResumeIntr 4 | intrman_IMPORTS_end 5 | 6 | loadcore_IMPORTS_start 7 | I_RegisterLibraryEntries 8 | I_ReleaseLibraryEntries 9 | loadcore_IMPORTS_end 10 | 11 | ps2ip_IMPORTS_start 12 | I_lwip_recv 13 | I_lwip_send 14 | I_lwip_close 15 | I_lwip_select 16 | I_lwip_socket 17 | I_lwip_shutdown 18 | I_lwip_connect 19 | I_lwip_gethostbyname 20 | ps2ip_IMPORTS_end 21 | 22 | sifcmd_IMPORTS_start 23 | I_sceSifSetRpcQueue 24 | I_sceSifRegisterRpc 25 | I_sceSifRpcLoop 26 | sifcmd_IMPORTS_end 27 | 28 | sifman_IMPORTS_start 29 | I_sceSifSetDma 30 | sifman_IMPORTS_end 31 | 32 | stdio_IMPORTS_start 33 | I_printf 34 | stdio_IMPORTS_end 35 | 36 | sysclib_IMPORTS_start 37 | I_look_ctype_table 38 | I_memcpy 39 | I_memmove 40 | I_memset 41 | I_strcmp 42 | I_strncmp 43 | I_strlen 44 | I_strcat 45 | I_sprintf 46 | I_strtoul 47 | I_strchr 48 | I_strstr 49 | I_tolower 50 | sysclib_IMPORTS_end 51 | 52 | thbase_IMPORTS_start 53 | I_GetThreadId 54 | I_CreateThread 55 | I_DeleteThread 56 | I_StartThread 57 | I_TerminateThread 58 | thbase_IMPORTS_end 59 | -------------------------------------------------------------------------------- /modules/network/httpclient/irx_imports.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | -------------------------------------------------------------------------------- /modules/network/nbns/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = nbns.irx 2 | IOP_OBJS = main.o nbns.o imports.o exports.o 3 | 4 | IOP_INCS += -I../../../include 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/network/nbns/exports.tab: -------------------------------------------------------------------------------- 1 | void _funcret(){}; 2 | 3 | DECLARE_EXPORT_TABLE(nbnsman, 1, 1) 4 | DECLARE_EXPORT(_start) 5 | DECLARE_EXPORT(_exit) 6 | DECLARE_EXPORT(_funcret) 7 | DECLARE_EXPORT(_funcret) 8 | DECLARE_EXPORT(nbnsFindName) 9 | END_EXPORT_TABLE 10 | -------------------------------------------------------------------------------- /modules/network/nbns/imports.lst: -------------------------------------------------------------------------------- 1 | intrman_IMPORTS_start 2 | I_CpuSuspendIntr 3 | I_CpuResumeIntr 4 | intrman_IMPORTS_end 5 | 6 | loadcore_IMPORTS_start 7 | I_RegisterLibraryEntries 8 | I_ReleaseLibraryEntries 9 | loadcore_IMPORTS_end 10 | 11 | ps2ip_IMPORTS_start 12 | I_lwip_recv 13 | I_lwip_sendto 14 | I_lwip_close 15 | I_lwip_socket 16 | I_lwip_bind 17 | I_lwip_shutdown 18 | ps2ip_IMPORTS_end 19 | 20 | sifcmd_IMPORTS_start 21 | I_sceSifSetRpcQueue 22 | I_sceSifRegisterRpc 23 | I_sceSifRpcLoop 24 | sifcmd_IMPORTS_end 25 | 26 | stdio_IMPORTS_start 27 | I_printf 28 | stdio_IMPORTS_end 29 | 30 | sysclib_IMPORTS_start 31 | I_memset 32 | I_memcpy 33 | I_strcpy 34 | I_strcmp 35 | sysclib_IMPORTS_end 36 | 37 | thbase_IMPORTS_start 38 | I_GetThreadId 39 | I_CreateThread 40 | I_DeleteThread 41 | I_StartThread 42 | I_SleepThread 43 | I_DelayThread 44 | I_WakeupThread 45 | I_iWakeupThread 46 | I_SetAlarm 47 | I_CancelAlarm 48 | I_ReferThreadStatus 49 | thbase_IMPORTS_end 50 | -------------------------------------------------------------------------------- /modules/network/nbns/irx_imports.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | -------------------------------------------------------------------------------- /modules/network/nbns/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "nbns.h" 11 | 12 | IRX_ID("NetBIOS_Name_Service_resolver", 1, 1); 13 | 14 | static SifRpcDataQueue_t SifQueueData; 15 | static SifRpcServerData_t SifServerData; 16 | static int RpcThreadID; 17 | static unsigned char SifServerRxBuffer[64]; 18 | static unsigned char SifServerTxBuffer[32]; 19 | 20 | extern struct irx_export_table _exp_nbnsman; 21 | 22 | static void *SifRpc_handler(int fno, void *buffer, int nbytes) 23 | { 24 | switch (fno) { 25 | case NBNS_RPC_ID_FIND_NAME: 26 | ((struct nbnsFindNameResult *)SifServerTxBuffer)->result = nbnsFindName(buffer, ((struct nbnsFindNameResult *)SifServerTxBuffer)->address); 27 | break; 28 | default: 29 | *(int *)SifServerTxBuffer = -ENXIO; 30 | } 31 | 32 | return SifServerTxBuffer; 33 | } 34 | 35 | static void RpcThread(void *arg) 36 | { 37 | sceSifSetRpcQueue(&SifQueueData, GetThreadId()); 38 | sceSifRegisterRpc(&SifServerData, 0x00001B13, &SifRpc_handler, SifServerRxBuffer, NULL, NULL, &SifQueueData); 39 | sceSifRpcLoop(&SifQueueData); 40 | } 41 | 42 | int _start(int argc, char *argv[]) 43 | { 44 | int result; 45 | iop_thread_t thread; 46 | 47 | printf("NBNS resolver start\n"); 48 | 49 | if (RegisterLibraryEntries(&_exp_nbnsman) == 0) { 50 | nbnsInit(); 51 | 52 | thread.attr = TH_C; 53 | thread.option = 0x0B0B0001; 54 | thread.thread = &RpcThread; 55 | thread.priority = 0x20; 56 | thread.stacksize = 0x800; 57 | if ((RpcThreadID = CreateThread(&thread)) > 0) { 58 | StartThread(RpcThreadID, NULL); 59 | result = 0; 60 | } else { 61 | result = RpcThreadID; 62 | ReleaseLibraryEntries(&_exp_nbnsman); 63 | } 64 | } else { 65 | result = -1; 66 | } 67 | 68 | return (result == 0 ? MODULE_RESIDENT_END : MODULE_NO_RESIDENT_END); 69 | } 70 | 71 | int _exit(int argc, char *argv[]) 72 | { 73 | nbnsDeinit(); 74 | ReleaseLibraryEntries(&_exp_nbnsman); 75 | return MODULE_NO_RESIDENT_END; 76 | } 77 | -------------------------------------------------------------------------------- /modules/network/smap-ingame/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = smap.irx 2 | IOP_OBJS = main.o smap.o xfer.o imports.o 3 | 4 | IOP_INCS += -I../../iopcore/common -I../common 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/network/smap-ingame/imports.lst: -------------------------------------------------------------------------------- 1 | dmacman_IMPORTS_start 2 | I_dmac_request 3 | I_dmac_transfer 4 | I_dmac_ch_get_chcr 5 | dmacman_IMPORTS_end 6 | 7 | thbase_IMPORTS_start 8 | I_DelayThread 9 | I_SetAlarm 10 | I_USec2SysClock 11 | thbase_IMPORTS_end 12 | 13 | smsutils_IMPORTS_start 14 | I_mips_memcpy 15 | smsutils_IMPORTS_end 16 | 17 | stdio_IMPORTS_start 18 | I_printf 19 | stdio_IMPORTS_end 20 | 21 | sysclib_IMPORTS_start 22 | //I_memcpy 23 | I_strcmp 24 | I_bzero 25 | sysclib_IMPORTS_end 26 | 27 | ps2ip_IMPORTS_start 28 | I_pbuf_alloc 29 | I_netif_add 30 | I_netif_set_default 31 | I_ps2ip_input 32 | I_etharp_output 33 | I_inet_addr 34 | I_tcpip_input 35 | ps2ip_IMPORTS_end 36 | 37 | dev9_IMPORTS_start 38 | I_SpdIntrEnable 39 | I_SpdIntrDisable 40 | I_SpdRegisterIntrHandler 41 | I_dev9RegisterPreDmaCb 42 | I_dev9RegisterPostDmaCb 43 | I_SpdDmaTransfer 44 | I_SpdGetEthernetID 45 | dev9_IMPORTS_end 46 | -------------------------------------------------------------------------------- /modules/network/smap-ingame/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | /* Please keep these in alphabetical order! */ 7 | #include 8 | #include 9 | #include "smstcpip.h" 10 | #include "smsutils.h" 11 | #include 12 | #include 13 | #include 14 | 15 | #endif /* IOP_IRX_IMPORTS_H */ 16 | -------------------------------------------------------------------------------- /modules/network/smap-ingame/main.h: -------------------------------------------------------------------------------- 1 | // In the SONY original, all the calls to DEBUG_PRINTF() were to sceInetPrintf(). 2 | #define DEBUG_PRINTF(args...) // printf(args) 3 | 4 | #define MAX_FRAME_SIZE 1518 5 | 6 | #define PRE_LWIP_130_COMPAT 1 7 | 8 | struct SmapDriverData 9 | { 10 | volatile u8 *smap_regbase; 11 | volatile u8 *emac3_regbase; 12 | unsigned char TxBDIndex; 13 | unsigned char RxBDIndex; 14 | unsigned char TxDNVBDIndex; 15 | int Dev9IntrEventFlag; 16 | int TxEndEventFlag; 17 | int IntrHandlerThreadID; 18 | int TxHandlerThreadID; 19 | unsigned char SmapIsInitialized; 20 | unsigned char NetDevStopFlag; 21 | unsigned char EnableLinkCheckTimer; 22 | unsigned char LinkStatus; 23 | unsigned char LinkMode; 24 | iop_sys_clock_t LinkCheckTimer; 25 | }; 26 | 27 | /* Function prototypes */ 28 | int smap_init(int argc, char *argv[]); 29 | int SMAPStart(void); 30 | void SMAPStop(void); 31 | int SMAPGetMACAddress(unsigned char *buffer); 32 | 33 | void SMapLowLevelInput(struct pbuf *pBuf); 34 | 35 | #include "xfer.h" 36 | -------------------------------------------------------------------------------- /modules/network/smap-ingame/xfer.h: -------------------------------------------------------------------------------- 1 | int HandleRxIntr(struct SmapDriverData *SmapDrivPrivData); 2 | int SMAPSendPacket(const void *data, unsigned int length); 3 | -------------------------------------------------------------------------------- /modules/network/smbinit/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = smbinit.irx 2 | IOP_OBJS = main.o smbauth.o des.o md4.o imports.o 3 | 4 | IOP_INCS += -I../../iopcore/common 5 | 6 | include $(PS2SDK)/Defs.make 7 | include ../../Rules.bin.make 8 | include $(PS2SDK)/samples/Makefile.iopglobal 9 | -------------------------------------------------------------------------------- /modules/network/smbinit/des.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo 3 | Copyright 2006-2008 Polo 4 | Licenced under Academic Free License version 3.0 5 | Review Open-Ps2-Loader README & LICENSE files for further details. 6 | 7 | Some parts of the code are taken from HD Project by Polo 8 | */ 9 | 10 | #ifndef DES_H 11 | #define DES_H 12 | 13 | unsigned char *DES(unsigned char *key, unsigned char *message, unsigned char *cipher); 14 | 15 | #endif /* DES */ 16 | -------------------------------------------------------------------------------- /modules/network/smbinit/imports.lst: -------------------------------------------------------------------------------- 1 | sysclib_IMPORTS_start 2 | I_strncpy 3 | I_memcpy 4 | I_memset 5 | I_toupper 6 | I_strlen 7 | sysclib_IMPORTS_end 8 | 9 | oplsmb_IMPORTS_start 10 | I_smb_NegotiateProt 11 | oplsmb_IMPORTS_end 12 | -------------------------------------------------------------------------------- /modules/network/smbinit/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | /* Please keep these in alphabetical order! */ 7 | #include 8 | #include "oplsmb.h" 9 | 10 | #endif /* IOP_IRX_IMPORTS_H */ 11 | -------------------------------------------------------------------------------- /modules/network/smbinit/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "oplsmb.h" 5 | #include "smbauth.h" 6 | 7 | #define MODNAME "smb_init" 8 | IRX_ID(MODNAME, 1, 1); 9 | 10 | int _start(int argc, char *argv[]) 11 | { 12 | smb_NegotiateProt(&SmbInitHashPassword); 13 | 14 | return MODULE_NO_RESIDENT_END; 15 | } 16 | -------------------------------------------------------------------------------- /modules/network/smbinit/md4.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo 3 | Copyright 2006-2008 Polo 4 | Licenced under Academic Free License version 3.0 5 | Review Open-Ps2-Loader README & LICENSE files for further details. 6 | 7 | Some parts of the code are taken from HD Project by Polo 8 | */ 9 | 10 | #ifndef MD4_H 11 | #define MD4_H 12 | 13 | unsigned char *MD4(unsigned char *message, int len, unsigned char *cipher); 14 | 15 | #endif /* MD4 */ 16 | -------------------------------------------------------------------------------- /modules/network/smbinit/smbauth.h: -------------------------------------------------------------------------------- 1 | void SmbInitHashPassword(server_specs_t *ss); 2 | -------------------------------------------------------------------------------- /modules/pademu/Makefile: -------------------------------------------------------------------------------- 1 | IOP_OBJS = pademu.o sys_utils.o imports.o exports.o padmacro.o ds34common.o 2 | 3 | ifeq ($(USE_USB),1) 4 | IOP_BIN = usb_pademu.irx 5 | IOP_CFLAGS += -DUSB 6 | IOP_OBJS_DIR = obj.usb/ 7 | IOP_OBJS += ds34usb.o 8 | endif 9 | 10 | ifeq ($(USE_BT),1) 11 | IOP_BIN = bt_pademu.irx 12 | IOP_CFLAGS += -DBT 13 | IOP_OBJS_DIR = obj.bt/ 14 | IOP_OBJS += ds34bt.o 15 | endif 16 | 17 | ifeq ($(VMC),1) 18 | IOP_CFLAGS += -DVMC 19 | endif 20 | 21 | IOP_CFLAGS += -DUSE_SMSUTILS 22 | IOP_INCS += -I../../include/ 23 | 24 | include $(PS2SDK)/Defs.make 25 | include ../Rules.bin.make 26 | include $(PS2SDK)/samples/Makefile.iopglobal 27 | -------------------------------------------------------------------------------- /modules/pademu/ds34usb.h: -------------------------------------------------------------------------------- 1 | #ifndef _DS34USB_H_ 2 | #define _DS34USB_H_ 3 | 4 | #include "irx.h" 5 | 6 | #include 7 | 8 | #define DS3 0 9 | #define DS4 1 10 | #define GUITAR_GH 2 11 | #define GUITAR_RB 3 12 | 13 | #define MODEL_GUITAR 1 14 | #define MODEL_PS2 3 15 | 16 | #define MAX_BUFFER_SIZE 64 // Size of general purpose data buffer 17 | 18 | typedef struct _usb_ds34 19 | { 20 | int devId; 21 | int sema; 22 | int cmd_sema; 23 | int controlEndp; 24 | int interruptEndp; 25 | int outEndp; 26 | u8 enabled; 27 | u8 status; 28 | u8 type; // 0 - ds3, 1 - ds4, 2 - guitar hero guitar, 3 - rock band guitar 29 | u8 oldled[4]; // rgb for ds4 and blink 30 | u8 lrum; 31 | u8 rrum; 32 | u8 update_rum; 33 | union 34 | { 35 | struct ds2report ds2; 36 | u8 data[18]; 37 | }; 38 | u8 analog_btn; 39 | u8 btn_delay; 40 | } ds34usb_device; 41 | 42 | enum eDS34USBStatus { 43 | DS34USB_STATE_DISCONNECTED = 0x00, 44 | DS34USB_STATE_AUTHORIZED = 0x01, 45 | DS34USB_STATE_CONFIGURED = 0x02, 46 | DS34USB_STATE_CONNECTED = 0x04, 47 | DS34USB_STATE_RUNNING = 0x08, 48 | }; 49 | 50 | enum eHID { 51 | // {{{ 52 | /* HID event flag */ 53 | HID_FLAG_STATUS_REPORTED = 0x01, 54 | HID_FLAG_BUTTONS_CHANGED = 0x02, 55 | HID_FLAG_EXTENSION = 0x04, 56 | HID_FLAG_COMMAND_SUCCESS = 0x08, 57 | 58 | /* USB HID Transaction Header (THdr) */ 59 | HID_USB_GET_REPORT_FEATURE = 0x03, 60 | HID_USB_SET_REPORT_OUTPUT = 0x02, 61 | HID_USB_DATA_INPUT = 0x01, 62 | 63 | /* Defines of various parameters for PS3 Game controller reports */ 64 | PS3_F4_REPORT_ID = 0xF4, 65 | PS3_F4_REPORT_LEN = 0x04, 66 | 67 | PS3_01_REPORT_ID = 0x01, 68 | PS3_01_REPORT_LEN = 0x30, 69 | 70 | PS4_02_REPORT_ID = 0x02, 71 | PS4_11_REPORT_ID = 0x11, 72 | PS4_11_REPORT_LEN = 0x4D, 73 | // }}} 74 | }; 75 | 76 | int ds34usb_init(u8 pads, u8 options); 77 | int ds34usb_get_status(int port); 78 | int ds34usb_get_model(int port); 79 | void ds34usb_reset(); 80 | int ds34usb_get_data(u8 *dst, int size, int port); 81 | void ds34usb_set_rumble(u8 lrum, u8 rrum, int port); 82 | void ds34usb_set_mode(int mode, int lock, int port); 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /modules/pademu/exports.tab: -------------------------------------------------------------------------------- 1 | 2 | DECLARE_EXPORT_TABLE(pademu, 1, 1) 3 | DECLARE_EXPORT(_start) 4 | DECLARE_EXPORT(_retonly) 5 | DECLARE_EXPORT(_exit) 6 | DECLARE_EXPORT(_retonly) 7 | DECLARE_EXPORT(pademu_hookSio2man) 8 | END_EXPORT_TABLE 9 | 10 | void _retonly() {} 11 | -------------------------------------------------------------------------------- /modules/pademu/imports.lst: -------------------------------------------------------------------------------- 1 | loadcore_IMPORTS_start 2 | I_RegisterLibraryEntries 3 | I_ReleaseLibraryEntries 4 | I_QueryLibraryEntryTable 5 | I_SetRebootTimeLibraryHandlingMode 6 | loadcore_IMPORTS_end 7 | 8 | thsemap_IMPORTS_start 9 | I_CreateSema 10 | I_SignalSema 11 | I_WaitSema 12 | I_PollSema 13 | I_iSignalSema 14 | thsemap_IMPORTS_end 15 | 16 | thbase_IMPORTS_start 17 | I_DelayThread 18 | I_SetAlarm 19 | I_CancelAlarm 20 | thbase_IMPORTS_end 21 | 22 | intrman_IMPORTS_start 23 | I_CpuSuspendIntr 24 | I_CpuResumeIntr 25 | intrman_IMPORTS_end 26 | 27 | usbd_IMPORTS_start 28 | I_sceUsbdScanStaticDescriptor 29 | I_sceUsbdOpenPipe 30 | I_sceUsbdClosePipe 31 | I_sceUsbdOpenPipeAligned 32 | I_sceUsbdTransferPipe 33 | I_sceUsbdRegisterLdd 34 | usbd_IMPORTS_end 35 | 36 | sysclib_IMPORTS_start 37 | I_memcmp 38 | #ifndef USE_SMSUTILS 39 | I_memset 40 | I_memcpy 41 | #endif 42 | sysclib_IMPORTS_end 43 | 44 | #ifdef USE_SMSUTILS 45 | smsutils_IMPORTS_start 46 | I_mips_memset 47 | I_mips_memcpy 48 | smsutils_IMPORTS_end 49 | #endif 50 | -------------------------------------------------------------------------------- /modules/pademu/irx_imports.h: -------------------------------------------------------------------------------- 1 | /* 2 | # _____ ___ ____ ___ ____ 3 | # ____| | ____| | | |____| 4 | # | ___| |____ ___| ____| | \ PS2DEV Open Source Project. 5 | #----------------------------------------------------------------------- 6 | # Copyright 2001-2004, ps2dev - http://www.ps2dev.org 7 | # Licenced under Academic Free License version 2.0 8 | # Review ps2sdk README & LICENSE files for further details. 9 | # 10 | # $Id$ 11 | # Defines all IRX imports. 12 | */ 13 | 14 | #ifndef IOP_IRX_IMPORTS_H 15 | #define IOP_IRX_IMPORTS_H 16 | 17 | #include "irx.h" 18 | 19 | /* Please keep these in alphabetical order! */ 20 | #include "dmacman.h" 21 | #include "intrman.h" 22 | #include "iomanX.h" 23 | #include "libsd.h" 24 | #include "loadcore.h" 25 | #include "sifcmd.h" 26 | #include "sifman.h" 27 | #include "stdio.h" 28 | #include "sysclib.h" 29 | #include "sysmem.h" 30 | #include "thbase.h" 31 | #include "thevent.h" 32 | #include "thmsgbx.h" 33 | #include "thsemap.h" 34 | #include "usbd.h" 35 | #include "vblank.h" 36 | #include "xloadcore.h" 37 | 38 | #include "sys_utils.h" 39 | 40 | #endif /* IOP_IRX_IMPORTS_H */ 41 | -------------------------------------------------------------------------------- /modules/pademu/pademu.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006-2008, Romz 3 | Copyright 2010, Polo 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include "sys_utils.h" 22 | 23 | /* type for a pointer to LOADCORE's entry RegisterLibraryEntires */ 24 | typedef int (*PtrRegisterLibraryEntires)(iop_library_t *lib); 25 | 26 | struct _sio2_dma_arg 27 | { // size 12 28 | void *addr; 29 | int size; 30 | int count; 31 | }; 32 | 33 | typedef struct 34 | { 35 | u32 stat6c; 36 | 37 | u32 port_ctrl1[4]; 38 | u32 port_ctrl2[4]; 39 | 40 | u32 stat70; 41 | 42 | u32 regdata[16]; 43 | 44 | u32 stat74; 45 | 46 | u32 in_size; 47 | u32 out_size; 48 | u8 *in; 49 | u8 *out; 50 | 51 | struct _sio2_dma_arg in_dma; 52 | struct _sio2_dma_arg out_dma; 53 | } sio2_transfer_data_t; 54 | 55 | typedef void (*Sio2McProc)(sio2_transfer_data_t *arg); 56 | 57 | void *GetExportTable(char *libname, int version); 58 | u32 GetExportTableSize(void *table); 59 | void *GetExportEntry(void *table, u32 entry); 60 | void *HookExportEntry(void *table, u32 entry, void *func); 61 | -------------------------------------------------------------------------------- /modules/pademu/padmacro.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdbool.h" 4 | #include "types.h" 5 | 6 | #include "ds34common.h" 7 | 8 | enum PadMacroAxes { 9 | PadMacroAxisLX = 0, 10 | PadMacroAxisLY = 1, 11 | PadMacroAxisRX = 2, 12 | PadMacroAxisRY = 3, 13 | }; 14 | 15 | /** 16 | * Initialize macro settings 17 | * @param padMacroSettings Settings passed from the config 18 | */ 19 | void padMacroInit(u32 padMacroSettings); 20 | 21 | /** 22 | * React to button presses so the macro settings can be changed 23 | * @param rep DS2 controller report 24 | * @param special_button Is the "special button" pressed (e.g. PS button on DS3 controller) 25 | * @return true if the internal state of PadMacro was changed 26 | */ 27 | bool padMacroPerform(struct ds2report *rep, bool special_button); 28 | -------------------------------------------------------------------------------- /modules/pademu/sys_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006-2008, Romz 3 | Copyright 2010, Polo 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | */ 7 | 8 | #ifndef __SYS_UTILS_H 9 | #define __SYS_UTILS_H 10 | 11 | #include 12 | 13 | typedef struct 14 | { 15 | int version; 16 | void **exports; 17 | } modinfo_t; 18 | 19 | #ifdef USE_SMSUTILS 20 | /* SMS Utils Imports */ 21 | #define smsutils_IMPORTS_start DECLARE_IMPORT_TABLE(smsutils, 1, 1) 22 | 23 | void mips_memcpy(void *, const void *, unsigned); 24 | #define I_mips_memcpy DECLARE_IMPORT(4, mips_memcpy) 25 | 26 | void mips_memset(void *, int, unsigned); 27 | #define I_mips_memset DECLARE_IMPORT(5, mips_memset) 28 | 29 | #define smsutils_IMPORTS_end END_IMPORT_TABLE 30 | #else 31 | #define mips_memset memset 32 | #define mips_memcpy memcpy 33 | #endif 34 | 35 | #endif /* __MCEMU_UTILS_H */ 36 | -------------------------------------------------------------------------------- /modules/vmc/genvmc/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = genvmc.irx 2 | IOP_OBJS = genvmc.o imports.o 3 | 4 | ifeq ($(DEBUG),1) 5 | IOP_CFLAGS += -DDEBUG 6 | endif 7 | 8 | include $(PS2SDK)/Defs.make 9 | include ../../Rules.bin.make 10 | include $(PS2SDK)/samples/Makefile.iopglobal 11 | -------------------------------------------------------------------------------- /modules/vmc/genvmc/genvmc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010, jimmikaelkael 3 | Licenced under Academic Free License version 3.0 4 | Review Open PS2 Loader README & LICENSE files for further details. 5 | */ 6 | 7 | #ifndef __GENVMC_H__ 8 | #define __GENVMC_H__ 9 | 10 | // DEVCTL commands 11 | #define GENVMC_DEVCTL_CREATE_VMC 0xC0DE0001 12 | #define GENVMC_DEVCTL_ABORT 0xC0DE0002 13 | #define GENVMC_DEVCTL_STATUS 0xC0DE0003 14 | 15 | #define GENVMC_STAT_AVAIL 0x00 16 | #define GENVMC_STAT_BUSY 0x01 17 | 18 | // helpers for DEVCTL commands 19 | typedef struct 20 | { // size = 1036 21 | char VMC_filename[1024]; 22 | int VMC_size_mb; 23 | int VMC_blocksize; 24 | int VMC_thread_priority; 25 | int VMC_card_slot; // 0=slot 1, 1=slot 2, anything else=blank 26 | } createVMCparam_t; 27 | 28 | typedef struct 29 | { // size = 76 30 | int VMC_status; // 0=available, 1=busy 31 | int VMC_error; 32 | int VMC_progress; 33 | char VMC_msg[64]; 34 | } statusVMCparam_t; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /modules/vmc/genvmc/imports.lst: -------------------------------------------------------------------------------- 1 | cdvdman_IMPORTS_start 2 | I_sceCdRC 3 | cdvdman_IMPORTS_end 4 | 5 | iomanX_IMPORTS_start 6 | I_DelDrv 7 | I_AddDrv 8 | I_open 9 | I_lseek 10 | I_write 11 | I_close 12 | I_remove 13 | iomanX_IMPORTS_end 14 | 15 | intrman_IMPORTS_start 16 | I_CpuSuspendIntr 17 | I_CpuResumeIntr 18 | intrman_IMPORTS_end 19 | 20 | xmcman_IMPORTS_start 21 | I_McDetectCard 22 | I_McReadPage 23 | I_McGetMcType 24 | xmcman_IMPORTS_end 25 | 26 | sysmem_IMPORTS_start 27 | I_AllocSysMemory 28 | I_FreeSysMemory 29 | sysmem_IMPORTS_end 30 | 31 | thsemap_IMPORTS_start 32 | I_CreateSema //CreateMutex 33 | I_DeleteSema 34 | I_WaitSema 35 | I_SignalSema 36 | thsemap_IMPORTS_end 37 | 38 | sysclib_IMPORTS_start 39 | I_memset 40 | I_memcpy 41 | I_strcat 42 | I_strcpy 43 | I_memcmp 44 | sysclib_IMPORTS_end 45 | 46 | thbase_IMPORTS_start 47 | I_CreateThread 48 | I_StartThread 49 | I_ExitDeleteThread 50 | thbase_IMPORTS_end 51 | 52 | #ifdef DEBUG 53 | stdio_IMPORTS_start 54 | I_printf 55 | stdio_IMPORTS_end 56 | #endif 57 | -------------------------------------------------------------------------------- /modules/vmc/genvmc/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #ifdef DEBUG 11 | #include 12 | #endif 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /notes/xparam/xparamNotes.txt: -------------------------------------------------------------------------------- 1 | There are only two unique XPARAM modules out there, the first one appearing in SCPH-750xx models only (datever 20050620) and every single XPARAM after it from SCPH-770xx (bios datever 20060210-20100415) up to the very last one in Bravia TV is the same (the second one). 2 | 3 | Both params are included here for further research so it can be seen what was changed. The new XPARAM add some CPU delay to Tekken 5 games and add an entry for Tekken 5 Australia release that was missing. Together with it, a few more games were added that are: 4 | 5 | SLPM_660.22 Kaidou: Touge no Densetsu (Japan) 6 | SLPM_658.82 Duel Masters: Birth of Super Dragon (Japan) 7 | SLPM_658.16 Shin Bakusou Dekotora Densetsu: Tenka Touitsu Choujou Kessen (Japan) 8 | SLPM_653.08 Shutokou Battle 01 (Japan) 9 | SLPM_652.68 Initial D: Special Stage (Japan) 10 | SLPM_652.34 Bakusou Dekotora Densetsu: Otoko Hanamichi Yume Roman (Japan) 11 | 12 | 13 | 14 | XPARAM from the disc. 15 | Sony planned a way to have params applied from discs too. Some games will have an XPARAM entry in them in SYSTEM.CNF also has a hash for its integrity. This hash check and param parsing is done by PS2LOGO so all these launched without it always had problems in DECKARD. The code provided handles even this weird case. All known games have been found. They are the following: 16 | 17 | SLPS_256.23 Another Century's Episode 2 (Japan) 18 | SLPS_255.32 Critical Velocity (Japan) 19 | SLPS_255.56 Hissatsu Pachinko Station V11 (Japan) 20 | Hissatsu Pachinko Station V11 - CR Gyaatoruzu (Japan) 21 | SLPM_661.41 Matantei Loki Ragnarok - Mayouga - Ushinawareta Bishou (Japan) 22 | Ibara has the same hash but it's an error from the leftover file of the above game. Ibara does NOT need config applied. 23 | SLPM_627.09 Sega Ages 2500 Series Vol. 23 - Sega Memorial Selection (Japan) 24 | SLPM_663.87 Shin Bakusou Dekotora Densetsu - Tenka Touitsu Choujou Kessen (Japan) (Spike the Best) 25 | 26 | 27 | 28 | These notes serve more as research, it's better to use the xparam.c code for any launcher out there that is missing the DECKARD param stage (uLaunchElf, ESR, modchips, etc..). The code will handle any edge case needed for PS3/4 as well and has the benefit of saving space due to not needing to include all the config databases. 29 | 30 | by krat0s 31 | -------------------------------------------------------------------------------- /pc/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | ifeq ($(_WIN32),1) 3 | make _WIN32=1 -C iso2opl 4 | make _WIN32=1 -C opl2iso 5 | make _WIN32=1 -C genvmc 6 | else 7 | make -C iso2opl 8 | make -C opl2iso 9 | make -C genvmc 10 | endif 11 | 12 | clean: 13 | make -C iso2opl clean 14 | make -C opl2iso clean 15 | make -C genvmc clean 16 | 17 | rebuild: clean all 18 | -------------------------------------------------------------------------------- /pc/genvmc/Makefile: -------------------------------------------------------------------------------- 1 | ifndef CC 2 | CC = gcc 3 | endif 4 | 5 | CFLAGS = -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include 6 | #CFLAGS += -DDEBUG 7 | 8 | ifeq ($(_WIN32),1) 9 | CFLAGS += -D_WIN32 10 | endif 11 | 12 | 13 | all: bin/genvmc 14 | 15 | clean: 16 | rm -f -r bin 17 | rm -f src/*.o 18 | 19 | rebuild: clean all 20 | 21 | bin/genvmc: src/genvmc.o 22 | @mkdir -p bin 23 | $(CC) $(CFLAGS) src/genvmc.c -o bin/genvmc 24 | -------------------------------------------------------------------------------- /pc/genvmc/src/genvmc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010, jimmikaelkael 3 | 4 | Licenced under Academic Free License version 3.0 5 | Review Open PS2 Loader README & LICENSE files for further details. 6 | */ 7 | 8 | #ifndef __GENVMC_H__ 9 | #define __GENVMC_H__ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #define PROGRAM_NAME "genvmc" 23 | #define PROGRAM_EXTNAME "VMC file generator for Open PS2 Loader" 24 | #define PROGRAM_VER "0.1.0" 25 | 26 | typedef unsigned char u8; 27 | typedef unsigned short u16; 28 | typedef unsigned int u32; 29 | typedef unsigned long long u64; 30 | typedef signed char s8; 31 | typedef signed short s16; 32 | typedef signed int s32; 33 | typedef signed long long s64; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /pc/iso2opl/Makefile: -------------------------------------------------------------------------------- 1 | ifndef CC 2 | CC = gcc 3 | endif 4 | 5 | CFLAGS = -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 6 | #CFLAGS += -DDEBUG 7 | 8 | ifeq ($(_WIN32),1) 9 | CFLAGS += -D_WIN32 10 | endif 11 | 12 | 13 | all: bin/iso2opl 14 | 15 | clean: 16 | rm -f -r bin 17 | rm -f src/*.o 18 | 19 | rebuild: clean all 20 | 21 | bin/iso2opl: src/iso2opl.o 22 | @mkdir -p bin 23 | $(CC) $(CFLAGS) src/iso2opl.c src/isofs.c -o bin/iso2opl 24 | -------------------------------------------------------------------------------- /pc/iso2opl/libcvd_license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002, A.Lee & Nicholas Van Veen 2 | All rights reserved. 3 | 4 | Redistribution and use of this software, in source and binary forms, with or 5 | without modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. You are granted a license to use this software for academic, research and 16 | non-commercial purposes only. 17 | 18 | 4. The copyright holder imposes no restrictions on any code developed using 19 | this software. However, the copyright holder retains a non-exclusive 20 | royalty-free license to any modifications to the distribution made by the 21 | licensee. 22 | 23 | 5. Any licensee wishing to make commercial use of this software should contact 24 | the copyright holder to execute the appropriate license for such commercial 25 | use. Commercial use includes: 26 | 27 | - Integration of all or part of the source code into a product for sale 28 | or commercial license by or on behalf of Licensee to third parties, or 29 | 30 | - Distribution of the binary code or source code to third parties that 31 | need it to utilize a commercial product sold or licensed by or on 32 | behalf of Licensee. 33 | 34 | 35 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 36 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 37 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 38 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 39 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 40 | OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 41 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 42 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 43 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 44 | OF SUCH DAMAGE. 45 | 46 | -------------------------------------------------------------------------------- /pc/iso2opl/src/iso2opl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2009, jimmikaelkael 3 | Copyright (c) 2002, A.Lee & Nicholas Van Veen 4 | Licenced under Academic Free License version 3.0 5 | Review OpenUsbLd README & LICENSE files for further details. 6 | 7 | Some parts of the code are taken from libcdvd by A.Lee & Nicholas Van Veen 8 | Review license_libcdvd file for further details. 9 | */ 10 | 11 | #ifndef __ISO2OPL_H__ 12 | #define __ISO2OPL_H__ 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define PROGRAM_NAME "iso2opl" 25 | #define PROGRAM_EXTNAME "ISO installer for Open PS2 Loader" 26 | #define PROGRAM_VER "0.1.2" 27 | 28 | typedef unsigned char u8; 29 | typedef unsigned short u16; 30 | typedef unsigned int u32; 31 | typedef unsigned long long u64; 32 | typedef signed char s8; 33 | typedef signed short s16; 34 | typedef signed int s32; 35 | typedef signed long long s64; 36 | 37 | typedef struct 38 | { 39 | char name[32]; 40 | char image[15]; 41 | u8 parts; 42 | u8 media; 43 | u8 pad[15]; 44 | } cfg_t; 45 | 46 | s64 isofs_Init(const char *iso_path, int isBigEndian); 47 | int isofs_Reset(void); 48 | int isofs_Open(const char *filename); 49 | int isofs_Close(int fd); 50 | int isofs_Read(int fd, void *buf, u32 nbytes); 51 | int isofs_Seek(int fd, u32 offset, int origin); 52 | int isofs_ReadISO(s64 offset, u32 nbytes, void *buf); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /pc/opl2iso/Makefile: -------------------------------------------------------------------------------- 1 | ifndef CC 2 | CC = gcc 3 | endif 4 | 5 | CFLAGS = -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 6 | 7 | ifeq ($(_WIN32),1) 8 | CFLAGS += -D_WIN32 9 | endif 10 | 11 | all: bin/opl2iso 12 | 13 | clean: 14 | rm -f -r bin 15 | rm -f src/*.o 16 | 17 | rebuild: clean all 18 | 19 | bin/opl2iso: src/opl2iso.o 20 | @mkdir -p bin 21 | $(CC) $(CFLAGS) src/opl2iso.c -o bin/opl2iso 22 | -------------------------------------------------------------------------------- /pc/opl2iso/src/opl2iso.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010, volca 3 | Parts Copyright 2009, jimmikaelkael 4 | Copyright (c) 2002, A.Lee & Nicholas Van Veen 5 | Licenced under Academic Free License version 3.0 6 | Review OpenUsbLd README & LICENSE files for further details. 7 | 8 | Some parts of the code are taken from libcdvd by A.Lee & Nicholas Van Veen 9 | Review license_libcdvd file for further details. 10 | */ 11 | 12 | #ifndef __OPL2ISO_H__ 13 | #define __OPL2ISO_H__ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #define PROGRAM_NAME "opl2iso" 26 | #define PROGRAM_EXTNAME "UL.CFG to ISO converter" 27 | #define PROGRAM_VER "0.0.2" 28 | 29 | typedef unsigned char u8; 30 | typedef unsigned short u16; 31 | typedef unsigned int u32; 32 | typedef unsigned long long u64; 33 | typedef signed char s8; 34 | typedef signed short s16; 35 | typedef signed int s32; 36 | typedef signed long long s64; 37 | 38 | // padded for easy manipulation (e.g. the first two are one byte longer than needed) 39 | typedef struct 40 | { 41 | char name[33]; 42 | char image[16]; 43 | u8 parts; 44 | u8 media; 45 | u8 pad[15]; 46 | } cfg_t; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyYAML==6.0 2 | -------------------------------------------------------------------------------- /src/debug.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010, jimmikaelakel 3 | Licenced under Academic Free License version 3.0 4 | Review OpenUsbLd README & LICENSE files for further details. 5 | */ 6 | 7 | #include "include/opl.h" 8 | #include "include/ethsupport.h" 9 | #include "include/system.h" 10 | #include "include/ioman.h" 11 | #include "include/extern_irx.h" 12 | 13 | static u8 modulesLoaded = 0; 14 | 15 | int debugSetActive(void) 16 | { 17 | #ifndef _DTL_T10000 18 | int ret; 19 | 20 | #if defined(TTY_UDP) || defined(__DECI2_DEBUG) 21 | if ((ret = ethLoadInitModules()) != 0) 22 | return -1; 23 | #endif 24 | 25 | #ifdef __DECI2_DEBUG 26 | LOG("[DRVTIF]:\n"); 27 | ret = sysLoadModuleBuffer(&drvtif_irx, size_drvtif_irx, 0, NULL); 28 | if (ret < 0) 29 | return -8; 30 | 31 | LOG("[TIFNET]:\n"); 32 | ret = sysLoadModuleBuffer(&tifinet_irx, size_tifinet_irx, 0, NULL); 33 | if (ret < 0) 34 | return -9; 35 | #elif defined(TTY_UDP) 36 | LOG("[UDPTTY]:\n"); 37 | ret = sysLoadModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL); 38 | if (ret < 0) 39 | return -8; 40 | 41 | LOG("[IOPTRAP]:\n"); 42 | ret = sysLoadModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL); 43 | if (ret < 0) 44 | return -9; 45 | 46 | LOG("[PS2LINK]:\n"); 47 | ret = sysLoadModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL); 48 | if (ret < 0) 49 | return -10; 50 | #elif defined(TTY_PPC_UART) 51 | LOG("[PPCTTY]:\n"); 52 | ret = sysLoadModuleBuffer(&ppctty_irx, size_ppctty_irx, 0, NULL); 53 | if (ret < 0) 54 | return -8; 55 | 56 | LOG("[IOPTRAP]:\n"); 57 | ret = sysLoadModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL); 58 | if (ret < 0) 59 | return -9; 60 | #endif 61 | #endif 62 | 63 | modulesLoaded = 1; 64 | 65 | return 0; 66 | } 67 | 68 | void debugApplyConfig(void) 69 | { 70 | #ifndef _DTL_T10000 71 | if (modulesLoaded) 72 | ethApplyConfig(); 73 | #endif 74 | } 75 | -------------------------------------------------------------------------------- /src/lz4.c: -------------------------------------------------------------------------------- 1 | #include "../modules/isofs/lz4.c" -------------------------------------------------------------------------------- /src/nbns.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "nbns.h" 6 | #include "ioman.h" 7 | 8 | static SifRpcClientData_t SifRpcClient; 9 | static char RpcBuffer[64] ALIGNED(64); 10 | 11 | int nbnsInit(void) 12 | { 13 | while (SifBindRpc(&SifRpcClient, 0x00001B13, 0) < 0 || SifRpcClient.server == NULL) { 14 | LOG("libnbns: bind failed\n"); 15 | nopdelay(); 16 | } 17 | 18 | return 0; 19 | } 20 | 21 | void nbnsDeinit(void) 22 | { 23 | memset(&SifRpcClient, 0, sizeof(SifRpcClientData_t)); 24 | } 25 | 26 | int nbnsFindName(const char *name, unsigned char *ip_address) 27 | { 28 | int result; 29 | 30 | strncpy(RpcBuffer, name, 16); 31 | RpcBuffer[16] = '\0'; 32 | 33 | if ((result = SifCallRpc(&SifRpcClient, NBNS_RPC_ID_FIND_NAME, 0, RpcBuffer, 17, RpcBuffer, sizeof(struct nbnsFindNameResult), NULL, NULL)) >= 0) { 34 | result = ((struct nbnsFindNameResult *)RpcBuffer)->result; 35 | memcpy(ip_address, ((struct nbnsFindNameResult *)RpcBuffer)->address, 4); 36 | } 37 | 38 | return result; 39 | } 40 | -------------------------------------------------------------------------------- /thirdparty/PoeVeticaNew.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/israpps/Open-PS2-Loader/5a3ef8a83beb9d5fa0939e9aa79fed351a3fc918/thirdparty/PoeVeticaNew.ttf --------------------------------------------------------------------------------