├── .clang-format ├── .clang-format-ignore ├── .gitattributes ├── .gitignore ├── .travis.yml ├── CHANGELOG ├── CREDITS ├── LICENSE ├── Makefile ├── OLD_DETAILED_CHANGELOG ├── README.md ├── ee_core ├── Makefile ├── include │ ├── asm.h │ ├── cd_igr_rpc.h │ ├── cheat_api.h │ ├── cheat_engine.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 ├── elfldr ├── Makefile ├── crt0.S ├── elfldr.c └── linkfile ├── gfx ├── 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 ├── 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 ├── app.png ├── background.png ├── case.png ├── circle.png ├── config.png ├── cover.png ├── cross.png ├── disc.png ├── down.png ├── eth.png ├── exit.png ├── hdd.png ├── icon.sys ├── info.png ├── left.png ├── load0.png ├── load1.png ├── load2.png ├── load3.png ├── load4.png ├── load5.png ├── load6.png ├── load7.png ├── logo.png ├── opl.icn ├── right.png ├── save.png ├── screen.png ├── select.png ├── square.png ├── start.png ├── triangle.png ├── up.png └── usb.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 ├── freetype │ ├── config │ │ ├── ftconfig.h │ │ ├── ftheader.h │ │ ├── ftmodule.h │ │ ├── ftoption.h │ │ ├── ftstdlib.h │ │ ├── integer-types.h │ │ ├── mac-support.h │ │ └── public-macros.h │ ├── freetype.h │ ├── ftadvanc.h │ ├── ftbbox.h │ ├── ftbdf.h │ ├── ftbitmap.h │ ├── ftbzip2.h │ ├── ftcache.h │ ├── ftchapters.h │ ├── ftcid.h │ ├── ftcolor.h │ ├── ftdriver.h │ ├── fterrdef.h │ ├── fterrors.h │ ├── ftfntfmt.h │ ├── ftgasp.h │ ├── ftglyph.h │ ├── ftgxval.h │ ├── ftgzip.h │ ├── ftimage.h │ ├── ftincrem.h │ ├── ftlcdfil.h │ ├── ftlist.h │ ├── ftlogging.h │ ├── ftlzw.h │ ├── ftmac.h │ ├── ftmm.h │ ├── ftmodapi.h │ ├── ftmoderr.h │ ├── ftotval.h │ ├── ftoutln.h │ ├── ftparams.h │ ├── ftpfr.h │ ├── ftrender.h │ ├── ftsizes.h │ ├── ftsnames.h │ ├── ftstroke.h │ ├── ftsynth.h │ ├── ftsystem.h │ ├── fttrigon.h │ ├── fttypes.h │ ├── ftwinfnt.h │ ├── t1tables.h │ ├── ttnameid.h │ ├── tttables.h │ └── tttags.h ├── ft2build.h ├── gui.h ├── guigame.h ├── hdd.h ├── hddsupport.h ├── integers.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 ├── stdint.h ├── supportbase.h ├── system.h ├── texcache.h ├── textures.h ├── themes.h ├── utf8.h └── util.h ├── labs ├── genvmclab │ ├── Makefile │ └── genvmclab.c ├── hdldsvrlab │ ├── Makefile │ └── hdldsvrlab.c ├── lwnbdsvr │ ├── Makefile │ └── lwnbdsvrlab.c └── smblab │ ├── Makefile │ └── smblab.c ├── lng ├── lang_Arabic.lng ├── lang_Bulgarian.lng ├── lang_Cebuano.lng ├── lang_Croatian.lng ├── lang_Czech.lng ├── lang_Danish.lng ├── lang_Dutch.lng ├── lang_English.lng ├── lang_Filipino.lng ├── lang_French.lng ├── lang_German.lng ├── lang_Greek.lng ├── lang_Hungarian.lng ├── lang_Indonesian.lng ├── lang_Italian.lng ├── lang_Japanese.lng ├── lang_Korean.lng ├── lang_Laotian.lng ├── lang_Persian.lng ├── lang_Polish.lng ├── lang_Portuguese.lng ├── lang_Portuguese_BR.lng ├── lang_Romana.lng ├── lang_Russian.lng ├── lang_SChinese.lng ├── lang_Spanish.lng ├── lang_Swedish.lng ├── lang_TChinese.lng ├── lang_Turkish.lng └── lang_Vietnamese.lng ├── lng_pack.sh ├── misc ├── boot.adp ├── cancel.adp ├── conf_theme_OPL.cfg ├── confirm.adp ├── cursor.adp ├── icon_A.sys ├── icon_C.sys ├── icon_J.sys ├── message.adp └── transition.adp ├── modules ├── Rules.bin.make ├── Rules.make ├── bdmevent │ ├── Makefile │ ├── imports.lst │ ├── irx_imports.h │ └── main.c ├── debug │ ├── deci2.img │ ├── drvtif-ingame.irx │ ├── drvtif.irx │ ├── ioptrap │ │ ├── Makefile │ │ ├── breakpoint.c │ │ ├── exports.tab │ │ ├── handler.s │ │ ├── imports.lst │ │ ├── ioptrap.c │ │ ├── ioptrap.h │ │ └── irx_imports.h │ ├── 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 │ └── smsutils.s ├── ds34usb │ ├── Makefile │ ├── ee │ │ ├── Makefile │ │ ├── libds34usb.c │ │ └── libds34usb.h │ ├── iop │ │ ├── Makefile │ │ ├── ds34usb.c │ │ ├── ds34usb.h │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── smsutils.s │ └── smsutils.s ├── hdd │ ├── common │ │ └── opl-hdd-ioctl.h │ ├── hdldsvr │ │ ├── Makefile │ │ ├── exports.tab │ │ ├── hdldsvr.c │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── smsutils.h │ └── xhdd │ │ ├── Makefile │ │ ├── hdpro.c │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── xatad.c │ │ ├── xhdd.c │ │ └── xhdd.h ├── iopcore │ ├── IOPRP.img │ ├── cdvdfsv │ │ ├── Makefile │ │ ├── cdvdfsv.c │ │ ├── exports.tab │ │ ├── imports.lst │ │ └── irx_imports.h │ ├── 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 │ │ ├── ioplib_util.c │ │ ├── ioplib_util.h │ │ ├── irx_imports.h │ │ ├── obj.usb │ │ │ ├── cdvdman.o │ │ │ ├── device-usb.o │ │ │ ├── exports.o │ │ │ ├── imports.o │ │ │ ├── ioplib_util.o │ │ │ ├── mass_driver.o │ │ │ ├── smsutils.o │ │ │ └── streaming.o │ │ ├── smb.c │ │ ├── smb.h │ │ ├── smsutils.s │ │ ├── streaming.c │ │ └── usb_cdvdman.irx │ ├── common │ │ ├── cdvd_config.h │ │ ├── cdvdman.h │ │ ├── oplsmb.h │ │ └── smsutils.h │ ├── eesync │ │ ├── Makefile │ │ ├── eesync.c │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ └── loadcore_add.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 │ ├── udnl-t300 │ │ ├── IOPRP.img │ │ ├── Makefile │ │ ├── README.txt │ │ ├── imports.lst │ │ ├── include │ │ │ ├── COFF.h │ │ │ └── ELF.h │ │ ├── irx_imports.h │ │ ├── udnl.c │ │ └── udnl_asm.s │ └── udnl │ │ ├── IOPRP.img │ │ ├── IOPRP_DECI2.img │ │ ├── Makefile │ │ ├── README.txt │ │ ├── imports.lst │ │ ├── include │ │ ├── COFF.h │ │ └── ELF.h │ │ ├── irx_imports.h │ │ ├── udnl.c │ │ └── udnl_asm.s ├── isofs │ ├── Makefile │ ├── imports.lst │ ├── irx_imports.h │ └── isofs.c ├── 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 │ ├── obj.usb │ │ ├── device-usb.o │ │ ├── imports.o │ │ ├── mcemu.o │ │ ├── mcemu_io.o │ │ ├── mcemu_rpc.o │ │ ├── mcemu_sys.o │ │ └── mcemu_var.o │ └── usb_mcemu.irx ├── 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 │ ├── lwnbdsvr │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── drivers │ │ │ ├── atad_d.c │ │ │ └── atad_d.h │ │ ├── exports.tab │ │ ├── imports.lst │ │ ├── irx_imports.h │ │ ├── lwnbdsvr.c │ │ ├── nbd-protocol.h │ │ ├── nbd_opts.h │ │ ├── nbd_protocol.c │ │ ├── nbd_server.c │ │ ├── nbd_server.h │ │ └── stdint.h │ ├── 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 ├── usb │ └── usbhdfsdfsv │ │ └── usbhdfsdfsv.irx └── vmc │ └── genvmc │ ├── Makefile │ ├── genvmc.c │ ├── genvmc.h │ ├── imports.lst │ └── irx_imports.h ├── 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 ├── ps2-packer ├── lzma-packer.so └── stub │ └── lzma-1d00-stub ├── 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 ├── 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 └── thirdparty ├── PoeVeticaNew.ttf ├── font_Arabic.ttf ├── font_Bulgarian.ttf ├── font_Croatian.ttf ├── font_Czech.ttf ├── font_Danish.ttf ├── font_Dutch.ttf ├── font_Filipino.ttf ├── font_French.ttf ├── font_German.ttf ├── font_Greek.ttf ├── font_Hebrew.ttf ├── font_Hungarian.ttf ├── font_Indonesian.ttf ├── font_Italian.ttf ├── font_Japanese.otf ├── font_Korean.ttf ├── font_Laotian.ttf ├── font_Norvegian.ttf ├── font_Persian.ttf ├── font_Polish.ttf ├── font_Portuguese.ttf ├── font_Portuguese_BR.ttf ├── font_Romana.otf ├── font_Russian.ttf ├── font_SChinese.ttf ├── font_Spanish.ttf ├── font_Swedish.ttf ├── font_TChinese.ttf ├── font_Thai.ttf ├── font_Turkish.ttf └── font_Vietnamese.ttf /.clang-format-ignore: -------------------------------------------------------------------------------- 1 | ./modules/network/lwnbdsvr/nbd-protocol.h 2 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | *.exe 9 | *.zip 10 | *.ZIP 11 | DETAILED_CHANGELOG 12 | 13 | # 14 | # git files that we don't want to ignore even it they are dot-files 15 | # 16 | !.gitignore 17 | 18 | # 19 | # Generated source files 20 | # 21 | pc/iso2usbld/bin/iso2usbld 22 | IOPRP_img.c 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/LICENSE -------------------------------------------------------------------------------- /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/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 | //SMB mode modules 17 | OPL_MODULE_ID_SMSTCPIP, 18 | OPL_MODULE_ID_SMAP, 19 | OPL_MODULE_ID_SMBINIT, 20 | 21 | //VMC module 22 | OPL_MODULE_ID_MCEMU, 23 | 24 | OPL_MODULE_ID_PADEMU, 25 | 26 | //Debugging modules 27 | OPL_MODULE_ID_UDPTTY, 28 | OPL_MODULE_ID_IOPTRAP, 29 | OPL_MODULE_ID_DRVTIF, 30 | OPL_MODULE_ID_TIFINET, 31 | 32 | //Special patches 33 | OPL_MODULE_ID_IOP_PATCH, 34 | 35 | OPL_MODULE_ID_COUNT 36 | }; 37 | 38 | typedef struct 39 | { 40 | void *ptr; 41 | unsigned int info; //Upper 8 bits = module ID 42 | } irxptr_t; 43 | 44 | typedef struct 45 | { 46 | irxptr_t *modules; 47 | int count; 48 | } irxtab_t; 49 | 50 | //Macros for working with module information. 51 | #define GET_OPL_MOD_ID(x) ((x) >> 24) 52 | #define SET_OPL_MOD_ID(x) ((x) << 24) 53 | #define GET_OPL_MOD_SIZE(x) ((x)&0x00FFFFFF) 54 | -------------------------------------------------------------------------------- /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 | extern ConfigParam CustomOSDConfigParam; 17 | 18 | void Install_Kernel_Hooks(void); 19 | void Remove_Kernel_Hooks(void); 20 | 21 | extern u32 (*Old_SifSetDma)(SifDmaTransfer_t *sdd, s32 len); 22 | extern int (*Old_SifSetReg)(u32 register_num, int register_value); 23 | extern int (*Old_ExecPS2)(void *entry, void *gp, int num_args, char *args[]); 24 | extern int (*Old_CreateThread)(ee_thread_t *thread_param); 25 | extern void (*Old_Exit)(s32 exit_code); 26 | extern void (*Old_SetOsdConfigParam)(ConfigParam *config); 27 | extern void (*Old_GetOsdConfigParam)(ConfigParam *config); 28 | void sysLoadElf(char *filename, int argc, char **argv); 29 | void sysExit(s32 exit_code); 30 | 31 | #endif /* SYSHOOK */ 32 | -------------------------------------------------------------------------------- /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 | .set push 11 | .set noreorder 12 | .set noat 13 | #.set nomacro #Uncomment to set nomacro, to check for hidden macro instructions. 14 | 15 | /************************************************************************** 16 | * 17 | * .text section 18 | * 19 | **************************************************************************/ 20 | 21 | .text 22 | 23 | .globl SRWI_IncrementCntrlFlag 24 | .ent SRWI_IncrementCntrlFlag 25 | SRWI_IncrementCntrlFlag: 26 | #Wait for interrupts to be disabled, to avoid causing a hang if the di instruction binds within an interrupt handler. 27 | lui $at, 1 28 | 1: 29 | di 30 | sync.p 31 | mfc0 $v0, $12 32 | and $v0, $v0, $at #Wait until EIE == 0 33 | bne $v0, $zero, 1b 34 | nop 35 | lui $at, 0x003e 36 | lw $v0, -17388($at) 37 | addiu $v0, 1 38 | sw $v0, -17388($at) 39 | 40 | jr $ra 41 | ei 42 | .end SRWI_IncrementCntrlFlag 43 | 44 | .globl RnC3_AlwaysAllocMem 45 | .ent RnC3_AlwaysAllocMem 46 | RnC3_AlwaysAllocMem: //Read the comments on the "Ratchet and Clank: Up Your Arsenal" patch in patches.c 47 | addu $t0, $a0, $s1 48 | lui $v1, 0x2000 //Bypass the cache because the cache has already been flushed by the game. 49 | or $t0, $v1 50 | addiu $v1, $zero, 1 51 | jr $ra 52 | sb $v1, 0x3D8($t0) //Change "beqz $s7, 0x13" in iop_stash_daemon to "beqz $s7, 0x01" 53 | .end RnC3_AlwaysAllocMem 54 | 55 | .set pop 56 | 57 | -------------------------------------------------------------------------------- /elfldr/Makefile: -------------------------------------------------------------------------------- 1 | EE_BIN = elfldr.elf 2 | EE_OBJS = elfldr.o crt0.o 3 | 4 | EE_INCS := -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I. 5 | EE_CFLAGS := -D_EE -O2 -mgpopt -G8192 -Wall $(EE_INCS) 6 | 7 | EE_LDFLAGS = -nostartfiles -Tlinkfile -L$(PS2SDK)/ee/lib -s 8 | EE_LIBS += -lkernel-nopatch 9 | 10 | %.o : %.c 11 | $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@ 12 | 13 | %.o : %.S 14 | $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@ 15 | 16 | %.o : %.s 17 | $(EE_AS) $(EE_ASFLAGS) $< -o $@ 18 | 19 | $(EE_BIN) : $(EE_OBJS) 20 | $(EE_CC) $(EE_CFLAGS) $(EE_LDFLAGS) -o $(EE_BIN) $(EE_OBJS) $(EE_LIBS) -Xlinker -Map -Xlinker elfldr.map 21 | 22 | all: $(EE_BIN) 23 | 24 | clean: 25 | rm -f $(EE_BIN) $(EE_OBJS) elfldr.map 26 | 27 | include $(PS2SDK)/samples/Makefile.pref 28 | -------------------------------------------------------------------------------- /gfx/Aspect_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Aspect_s.png -------------------------------------------------------------------------------- /gfx/Aspect_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Aspect_w.png -------------------------------------------------------------------------------- /gfx/Aspect_w1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Aspect_w1.png -------------------------------------------------------------------------------- /gfx/Aspect_w2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Aspect_w2.png -------------------------------------------------------------------------------- /gfx/CD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/CD.png -------------------------------------------------------------------------------- /gfx/DVD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/DVD.png -------------------------------------------------------------------------------- /gfx/Device_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Device_1.png -------------------------------------------------------------------------------- /gfx/Device_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Device_2.png -------------------------------------------------------------------------------- /gfx/Device_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Device_3.png -------------------------------------------------------------------------------- /gfx/Device_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Device_4.png -------------------------------------------------------------------------------- /gfx/Device_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Device_5.png -------------------------------------------------------------------------------- /gfx/Device_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Device_6.png -------------------------------------------------------------------------------- /gfx/Device_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Device_all.png -------------------------------------------------------------------------------- /gfx/ELF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/ELF.png -------------------------------------------------------------------------------- /gfx/HDL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/HDL.png -------------------------------------------------------------------------------- /gfx/ISO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/ISO.png -------------------------------------------------------------------------------- /gfx/L1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/L1.png -------------------------------------------------------------------------------- /gfx/L2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/L2.png -------------------------------------------------------------------------------- /gfx/L3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/L3.png -------------------------------------------------------------------------------- /gfx/R1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/R1.png -------------------------------------------------------------------------------- /gfx/R2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/R2.png -------------------------------------------------------------------------------- /gfx/R3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/R3.png -------------------------------------------------------------------------------- /gfx/Rating_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Rating_0.png -------------------------------------------------------------------------------- /gfx/Rating_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Rating_1.png -------------------------------------------------------------------------------- /gfx/Rating_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Rating_2.png -------------------------------------------------------------------------------- /gfx/Rating_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Rating_3.png -------------------------------------------------------------------------------- /gfx/Rating_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Rating_4.png -------------------------------------------------------------------------------- /gfx/Rating_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Rating_5.png -------------------------------------------------------------------------------- /gfx/Scan_1080i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_1080i.png -------------------------------------------------------------------------------- /gfx/Scan_1080i2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_1080i2.png -------------------------------------------------------------------------------- /gfx/Scan_1080p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_1080p.png -------------------------------------------------------------------------------- /gfx/Scan_240p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_240p.png -------------------------------------------------------------------------------- /gfx/Scan_240p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_240p1.png -------------------------------------------------------------------------------- /gfx/Scan_480i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_480i.png -------------------------------------------------------------------------------- /gfx/Scan_480p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_480p.png -------------------------------------------------------------------------------- /gfx/Scan_480p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_480p1.png -------------------------------------------------------------------------------- /gfx/Scan_480p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_480p2.png -------------------------------------------------------------------------------- /gfx/Scan_480p3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_480p3.png -------------------------------------------------------------------------------- /gfx/Scan_480p4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_480p4.png -------------------------------------------------------------------------------- /gfx/Scan_480p5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_480p5.png -------------------------------------------------------------------------------- /gfx/Scan_576i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_576i.png -------------------------------------------------------------------------------- /gfx/Scan_576p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_576p.png -------------------------------------------------------------------------------- /gfx/Scan_720p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Scan_720p.png -------------------------------------------------------------------------------- /gfx/UL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/UL.png -------------------------------------------------------------------------------- /gfx/Vmode_multi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Vmode_multi.png -------------------------------------------------------------------------------- /gfx/Vmode_ntsc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Vmode_ntsc.png -------------------------------------------------------------------------------- /gfx/Vmode_pal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/Vmode_pal.png -------------------------------------------------------------------------------- /gfx/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/app.png -------------------------------------------------------------------------------- /gfx/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/background.png -------------------------------------------------------------------------------- /gfx/case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/case.png -------------------------------------------------------------------------------- /gfx/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/circle.png -------------------------------------------------------------------------------- /gfx/config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/config.png -------------------------------------------------------------------------------- /gfx/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/cover.png -------------------------------------------------------------------------------- /gfx/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/cross.png -------------------------------------------------------------------------------- /gfx/disc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/disc.png -------------------------------------------------------------------------------- /gfx/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/down.png -------------------------------------------------------------------------------- /gfx/eth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/eth.png -------------------------------------------------------------------------------- /gfx/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/exit.png -------------------------------------------------------------------------------- /gfx/hdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/hdd.png -------------------------------------------------------------------------------- /gfx/icon.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/icon.sys -------------------------------------------------------------------------------- /gfx/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/info.png -------------------------------------------------------------------------------- /gfx/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/left.png -------------------------------------------------------------------------------- /gfx/load0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load0.png -------------------------------------------------------------------------------- /gfx/load1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load1.png -------------------------------------------------------------------------------- /gfx/load2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load2.png -------------------------------------------------------------------------------- /gfx/load3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load3.png -------------------------------------------------------------------------------- /gfx/load4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load4.png -------------------------------------------------------------------------------- /gfx/load5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load5.png -------------------------------------------------------------------------------- /gfx/load6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load6.png -------------------------------------------------------------------------------- /gfx/load7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/load7.png -------------------------------------------------------------------------------- /gfx/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/logo.png -------------------------------------------------------------------------------- /gfx/opl.icn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/opl.icn -------------------------------------------------------------------------------- /gfx/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/right.png -------------------------------------------------------------------------------- /gfx/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/save.png -------------------------------------------------------------------------------- /gfx/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/screen.png -------------------------------------------------------------------------------- /gfx/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/select.png -------------------------------------------------------------------------------- /gfx/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/square.png -------------------------------------------------------------------------------- /gfx/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/start.png -------------------------------------------------------------------------------- /gfx/triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/triangle.png -------------------------------------------------------------------------------- /gfx/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/up.png -------------------------------------------------------------------------------- /gfx/usb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/gfx/usb.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 | #include 5 | 6 | struct atlas_allocation_t 7 | { 8 | int x, y; 9 | int w, h; 10 | 11 | struct atlas_allocation_t *leaf1, *leaf2; 12 | }; 13 | 14 | typedef struct 15 | { 16 | struct atlas_allocation_t *allocation; 17 | 18 | GSTEXTURE surface; 19 | } atlas_t; 20 | 21 | /** allocates a new atlas. Further settings should be set manually 22 | * on the atlas_t::surface. 23 | */ 24 | atlas_t *atlasNew(size_t width, size_t height, u8 psm); 25 | 26 | /// Frees the atlas 27 | void atlasFree(atlas_t *atlas); 28 | 29 | /** Allocates a place in atlas for the given pixmap data. 30 | * Atlas expects 32bit pixels - all the time 31 | */ 32 | struct atlas_allocation_t *atlasPlace(atlas_t *atlas, size_t width, 33 | size_t height, const void *surface); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /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 | void bdmInit(); 21 | item_list_t *bdmGetObject(int initOnly); 22 | int bdmFindPartition(char *target, const char *name, int write); 23 | void bdmLoadModules(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /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 | int addr; 59 | int val; 60 | } code_t; 61 | 62 | void InitCheatsConfig(config_set_t *configSet); 63 | int GetCheatsEnabled(void); 64 | const int *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(void); //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 | #include 5 | 6 | /// default (built-in) font id 7 | #define FNT_DEFAULT (0) 8 | /// Value returned on errors 9 | #define FNT_ERROR (-1) 10 | 11 | /** Initializes the font subsystem */ 12 | void fntInit(); 13 | 14 | /** Terminates the font subsystem */ 15 | void fntEnd(); 16 | 17 | /** Loads a font from a file path 18 | * @param path The path to the font file 19 | * @return font slot id (negative value means error happened) */ 20 | int fntLoadFile(char *path); 21 | 22 | /** Reloads the default font */ 23 | int fntLoadDefault(char *path); 24 | 25 | /** Releases a font slot */ 26 | void fntRelease(int id); 27 | 28 | /** Updates to the native display resolution and aspect ratio 29 | * @note Invalidates the whole glyph cache for all fonts! */ 30 | void fntUpdateAspectRatio(); 31 | 32 | /** Renders a text with specified window dimensions */ 33 | int fntRenderString(int id, int x, int y, short aligned, size_t width, size_t height, const char *string, u64 colour); 34 | 35 | /** replaces spaces with newlines so that the text fits into the specified width. 36 | * @note A destrutive operation - modifies the given string! 37 | */ 38 | void fntFitString(int id, char *string, size_t width); 39 | 40 | /** Calculates the width of the given text string 41 | * We can't use the height for alignment, as the horizontal center would depends of the contained text itself */ 42 | int fntCalcDimensions(int id, const char *str); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /include/freetype/config/ftconfig.h: -------------------------------------------------------------------------------- 1 | /* ftconfig.h. Generated from ftconfig.h.in by configure. */ 2 | /**************************************************************************** 3 | * 4 | * ftconfig.h.in 5 | * 6 | * UNIX-specific configuration file (specification only). 7 | * 8 | * Copyright (C) 1996-2021 by 9 | * David Turner, Robert Wilhelm, and Werner Lemberg. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | /************************************************************************** 21 | * 22 | * This header file contains a number of macro definitions that are used by 23 | * the rest of the engine. Most of the macros here are automatically 24 | * determined at compile time, and you should not need to change it to port 25 | * FreeType, except to compile the library with a non-ANSI compiler. 26 | * 27 | * Note however that if some specific modifications are needed, we advise 28 | * you to place a modified copy in your build directory. 29 | * 30 | * The build directory is usually `builds/`, and contains 31 | * system-specific files that are always included first when building the 32 | * library. 33 | * 34 | */ 35 | 36 | #ifndef FTCONFIG_H_ 37 | #define FTCONFIG_H_ 38 | 39 | #include 40 | #include FT_CONFIG_OPTIONS_H 41 | #include FT_CONFIG_STANDARD_LIBRARY_H 42 | 43 | #define HAVE_UNISTD_H 1 44 | #define HAVE_FCNTL_H 1 45 | 46 | #include 47 | #include 48 | #include 49 | 50 | #endif /* FTCONFIG_H_ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /include/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* This is a generated file. */ 2 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 3 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 4 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 5 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 6 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 7 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 8 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 9 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 10 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 11 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 12 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 13 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 14 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 15 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 16 | FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class ) 17 | FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class ) 18 | FT_USE_MODULE( FT_Module_Class, gxv_module_class ) 19 | FT_USE_MODULE( FT_Module_Class, otv_module_class ) 20 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 21 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 22 | /* EOF */ 23 | -------------------------------------------------------------------------------- /include/freetype/config/mac-support.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * config/mac-support.h 4 | * 5 | * Mac/OS X support configuration header. 6 | * 7 | * Copyright (C) 1996-2021 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | #ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_ 18 | #define FREETYPE_CONFIG_MAC_SUPPORT_H_ 19 | 20 | /************************************************************************** 21 | * 22 | * Mac support 23 | * 24 | * This is the only necessary change, so it is defined here instead 25 | * providing a new configuration file. 26 | */ 27 | #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) 28 | /* No Carbon frameworks for 64bit 10.4.x. */ 29 | /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ 30 | /* so guess the system version by maximum errno before inclusion. */ 31 | #include 32 | #ifdef ECANCELED /* defined since 10.2 */ 33 | #include "AvailabilityMacros.h" 34 | #endif 35 | #if defined( __LP64__ ) && \ 36 | ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) 37 | #undef FT_MACINTOSH 38 | #endif 39 | 40 | #elif defined( __SC__ ) || defined( __MRC__ ) 41 | /* Classic MacOS compilers */ 42 | #include "ConditionalMacros.h" 43 | #if TARGET_OS_MAC 44 | #define FT_MACINTOSH 1 45 | #endif 46 | 47 | #endif /* Mac support */ 48 | 49 | #endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */ 50 | -------------------------------------------------------------------------------- /include/ft2build.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ft2build.h 4 | * 5 | * FreeType 2 build and setup macros. 6 | * 7 | * Copyright (C) 1996-2021 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This is the 'entry point' for FreeType header file inclusions, to be 22 | * loaded before all other header files. 23 | * 24 | * A typical example is 25 | * 26 | * ``` 27 | * #include 28 | * #include 29 | * ``` 30 | * 31 | */ 32 | 33 | 34 | #ifndef FT2BUILD_H_ 35 | #define FT2BUILD_H_ 36 | 37 | #include 38 | 39 | #endif /* FT2BUILD_H_ */ 40 | 41 | 42 | /* END */ 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/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 | extern char gOPLPart[128]; 66 | void hddLaunchGame(int id, config_set_t *configSet); 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /include/integers.h: -------------------------------------------------------------------------------- 1 | #ifndef __INTEGERS_H 2 | #define __INTEGERS_H 3 | 4 | typedef unsigned char uint8_t; 5 | typedef unsigned long int uint32_t; 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /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/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, 6 | SFX_CANCEL, 7 | SFX_CONFIRM, 8 | SFX_CURSOR, 9 | SFX_MESSAGE, 10 | SFX_TRANSITION, 11 | 12 | SFX_COUNT 13 | }; 14 | 15 | int sfxInit(int bootSnd); 16 | void sfxEnd(void); 17 | void sfxVolume(void); 18 | int sfxGetSoundDuration(int id); 19 | void sfxPlay(int id); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /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 5 | #include "include/iosupport.h" 6 | 7 | /// A single cache entry... 8 | typedef struct 9 | { 10 | GSTEXTURE texture; 11 | 12 | // NULL not queued, otherwise queue request record 13 | void *qr; 14 | 15 | // 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 16 | // slot is free and can be used right now 17 | int lastUsed; 18 | 19 | int UID; 20 | } cache_entry_t; 21 | 22 | 23 | /// One texture cache instance 24 | typedef struct 25 | { 26 | /// User specified ID, not used in any way by the cache code (not even initialized!) 27 | int userId; 28 | 29 | /// count of entries (copy of the requested cache size upon cache initialization) 30 | int count; 31 | 32 | /// directory prefix for this cache (if any) 33 | char *prefix; 34 | int isPrefixRelative; 35 | char *suffix; 36 | 37 | int nextUID; 38 | 39 | /// the cache entries itself 40 | cache_entry_t *content; 41 | } image_cache_t; 42 | 43 | /** Initializes the cache subsystem. 44 | */ 45 | void cacheInit(); 46 | 47 | /** Terminates the cache. Does nothing currently. Users of this code have to destroy caches via cacheDestroyCache 48 | */ 49 | void cacheEnd(); 50 | 51 | /** Initializes a single cache 52 | */ 53 | image_cache_t *cacheInitCache(int userId, const char *prefix, int isPrefixRelative, const char *suffix, int count); 54 | 55 | /** Destroys a given cache (unallocates all memory stored there, disconnects the pixmaps from the usage points). 56 | */ 57 | void cacheDestroyCache(image_cache_t *cache); 58 | 59 | GSTEXTURE *cacheGetTexture(image_cache_t *cache, item_list_t *list, int *cacheId, int *UID, char *value); 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /include/util.h: -------------------------------------------------------------------------------- 1 | #ifndef __UTIL_H 2 | #define __UTIL_H 3 | 4 | #include 5 | 6 | int getmcID(void); 7 | int getFileSize(int fd); 8 | void checkMCFolder(void); 9 | int openFile(char *path, int mode); 10 | void *readFile(char *path, int align, int *size); 11 | int listDir(char *path, const char *separator, int maxElem, 12 | int (*readEntry)(int index, const char *path, const char *separator, const char *name, unsigned int mode)); 13 | 14 | typedef struct 15 | { 16 | int fd; 17 | int mode; 18 | char *buffer; 19 | unsigned int size; 20 | unsigned int available; 21 | char *lastPtr; 22 | short allocResult; 23 | } file_buffer_t; 24 | 25 | file_buffer_t *openFileBufferBuffer(short allocResult, const void *buffer, unsigned int size); 26 | file_buffer_t *openFileBuffer(char *fpath, int mode, short allocResult, unsigned int size); 27 | int readFileBuffer(file_buffer_t *readContext, char **outBuf); 28 | void writeFileBuffer(file_buffer_t *fileBuffer, char *inBuf, int size); 29 | void closeFileBuffer(file_buffer_t *fileBuffer); 30 | 31 | int max(int a, int b); 32 | int min(int a, int b); 33 | int fromHex(char digit); 34 | char toHex(int digit); 35 | 36 | enum CONSOLE_REGIONS { 37 | CONSOLE_REGION_INVALID = -1, 38 | CONSOLE_REGION_JAPAN = 0, 39 | CONSOLE_REGION_USA, //USA and HK/SG. 40 | CONSOLE_REGION_EUROPE, 41 | CONSOLE_REGION_CHINA, 42 | 43 | CONSOLE_REGION_COUNT 44 | }; 45 | 46 | int InitConsoleRegionData(void); 47 | const char *GetSystemDataPath(void); 48 | char GetSystemFolderLetter(void); 49 | int sysDeleteFolder(const char *folder); 50 | 51 | int CheckPS2Logo(int fd, u32 lba); 52 | 53 | void delay(int count); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /misc/boot.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/boot.adp -------------------------------------------------------------------------------- /misc/cancel.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/cancel.adp -------------------------------------------------------------------------------- /misc/confirm.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/confirm.adp -------------------------------------------------------------------------------- /misc/cursor.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/cursor.adp -------------------------------------------------------------------------------- /misc/icon_A.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/icon_A.sys -------------------------------------------------------------------------------- /misc/icon_C.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/icon_C.sys -------------------------------------------------------------------------------- /misc/icon_J.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/icon_J.sys -------------------------------------------------------------------------------- /misc/message.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/message.adp -------------------------------------------------------------------------------- /misc/transition.adp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/misc/transition.adp -------------------------------------------------------------------------------- /modules/Rules.bin.make: -------------------------------------------------------------------------------- 1 | all: $(IOP_BIN) 2 | 3 | clean: 4 | rm -f $(IOP_BIN) $(IOP_OBJS) 5 | 6 | rebuild: clean all 7 | 8 | run: 9 | ps2client -t 1 execiop host:$(IOP_BIN) 10 | -------------------------------------------------------------------------------- /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 ../Rules.make 9 | -------------------------------------------------------------------------------- /modules/bdmevent/imports.lst: -------------------------------------------------------------------------------- 1 | iomanX_IMPORTS_start 2 | I_AddDrv 3 | iomanX_IMPORTS_end 4 | 5 | bdm_IMPORTS_start 6 | I_bdm_RegisterCallback 7 | bdm_IMPORTS_end 8 | 9 | sifcmd_IMPORTS_start 10 | I_sceSifSendCmd 11 | sifcmd_IMPORTS_end 12 | -------------------------------------------------------------------------------- /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/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/debug/deci2.img -------------------------------------------------------------------------------- /modules/debug/drvtif-ingame.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/debug/drvtif-ingame.irx -------------------------------------------------------------------------------- /modules/debug/drvtif.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/debug/drvtif.irx -------------------------------------------------------------------------------- /modules/debug/ioptrap/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = ioptrap.irx 2 | IOP_OBJS = ioptrap.o handler.o breakpoint.o imports.o exports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../Rules.bin.make 6 | include ../../Rules.make 7 | -------------------------------------------------------------------------------- /modules/debug/ioptrap/breakpoint.c: -------------------------------------------------------------------------------- 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: breakpoint.c 577 2004-09-14 14:41:46Z pixel $ 11 | */ 12 | 13 | #include "ioptrap.h" 14 | 15 | void set_dba(u32 v) 16 | { 17 | __asm__ __volatile__("mtc0 %0, $5" 18 | : 19 | : "r"(v)); 20 | } 21 | 22 | void set_dbam(u32 v) 23 | { 24 | __asm__ __volatile__("mtc0 %0, $9" 25 | : 26 | : "r"(v)); 27 | } 28 | 29 | void set_dcic(u32 v) 30 | { 31 | __asm__ __volatile__("mtc0 %0, $7" 32 | : 33 | : "r"(v)); 34 | } 35 | 36 | u32 get_dba() 37 | { 38 | u32 v; 39 | __asm__ __volatile__("mfc0 %0, $5" 40 | : "=&r"(v)); 41 | return v; 42 | } 43 | 44 | u32 get_dbam() 45 | { 46 | u32 v; 47 | __asm__ __volatile__("mfc0 %0, $9" 48 | : "=&r"(v)); 49 | return v; 50 | } 51 | 52 | u32 get_dcic() 53 | { 54 | u32 v; 55 | __asm__ __volatile__("mfc0 %0, $7" 56 | : "=&r"(v)); 57 | return v; 58 | } 59 | -------------------------------------------------------------------------------- /modules/debug/ioptrap/exports.tab: -------------------------------------------------------------------------------- 1 | DECLARE_EXPORT_TABLE(ioptrap, 1, 1) 2 | DECLARE_EXPORT(_start) 3 | DECLARE_EXPORT(_retonly) 4 | DECLARE_EXPORT(shutdown) 5 | DECLARE_EXPORT(_retonly) 6 | 7 | DECLARE_EXPORT(get_exception_name) 8 | /*05*/ DECLARE_EXPORT(dbg_setjmp) 9 | DECLARE_EXPORT(set_exception_handler) 10 | DECLARE_EXPORT(get_exception_handler) 11 | DECLARE_EXPORT(set_dba) 12 | DECLARE_EXPORT(set_dbam) 13 | /*10*/ DECLARE_EXPORT(set_dcic) 14 | DECLARE_EXPORT(get_dba) 15 | DECLARE_EXPORT(get_dbam) 16 | DECLARE_EXPORT(get_dcic) 17 | 18 | END_EXPORT_TABLE 19 | 20 | void _retonly() {} 21 | -------------------------------------------------------------------------------- /modules/debug/ioptrap/imports.lst: -------------------------------------------------------------------------------- 1 | #ifdef TEST_TRAP 2 | thbase_IMPORTS_start 3 | I_CreateThread 4 | I_DelayThread 5 | I_StartThread 6 | I_ExitDeleteThread 7 | thbase_IMPORTS_end 8 | #endif 9 | 10 | loadcore_IMPORTS_start 11 | I_RegisterLibraryEntries 12 | loadcore_IMPORTS_end 13 | 14 | excepman_IMPORTS_start 15 | I_RegisterDefaultExceptionHandler 16 | I_RegisterPriorityExceptionHandler 17 | excepman_IMPORTS_end 18 | 19 | intrman_IMPORTS_start 20 | I_CpuSuspendIntr 21 | I_CpuResumeIntr 22 | intrman_IMPORTS_end 23 | 24 | stdio_IMPORTS_start 25 | I_printf 26 | stdio_IMPORTS_end 27 | 28 | sysclib_IMPORTS_start 29 | I_setjmp 30 | I_memset 31 | sysclib_IMPORTS_end 32 | -------------------------------------------------------------------------------- /modules/debug/ioptrap/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 1070 2005-04-30 15:26:50Z 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 "excepman.h" 21 | #include "loadcore.h" 22 | #include "intrman.h" 23 | #include "sifman.h" 24 | #include "stdio.h" 25 | #include "sysclib.h" 26 | #ifdef TEST_TRAP 27 | #include "thbase.h" 28 | #endif 29 | 30 | #endif /* IOP_IRX_IMPORTS_H */ 31 | -------------------------------------------------------------------------------- /modules/debug/ps2link/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/debug/ps2link/LICENSE -------------------------------------------------------------------------------- /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 ../../Rules.make 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 | 2 | stdio_IMPORTS_start 3 | I_printf 4 | stdio_IMPORTS_end 5 | 6 | sysclib_IMPORTS_start 7 | I_memset 8 | I_memcpy 9 | I_strlen 10 | I_strncpy 11 | I_strncmp 12 | sysclib_IMPORTS_end 13 | 14 | thsemap_IMPORTS_start 15 | I_CreateSema 16 | I_SignalSema 17 | I_WaitSema 18 | I_DeleteSema 19 | thsemap_IMPORTS_end 20 | 21 | thbase_IMPORTS_start 22 | I_CreateThread 23 | I_DeleteThread 24 | I_StartThread 25 | I_GetThreadId 26 | I_ExitDeleteThread 27 | thbase_IMPORTS_end 28 | 29 | ioman_IMPORTS_start 30 | I_open 31 | I_close 32 | I_AddDrv 33 | I_DelDrv 34 | ioman_IMPORTS_end 35 | 36 | ps2ip_IMPORTS_start 37 | I_lwip_send 38 | I_lwip_sendto 39 | I_lwip_socket 40 | I_lwip_listen 41 | I_lwip_recv 42 | I_lwip_recvfrom 43 | I_lwip_close 44 | I_lwip_bind 45 | I_lwip_accept 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_AddPowerOffHandler 85 | I_PoweroffShutdown 86 | poweroff_IMPORTS_end 87 | -------------------------------------------------------------------------------- /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 | // Entry points 18 | extern int fsysMount(void); 19 | extern int cmdHandlerInit(void); 20 | extern int ttyMount(void); 21 | extern int naplinkRpcInit(void); 22 | //////////////////////////////////////////////////////////////////////// 23 | // main 24 | // start threads & init rpc & filesys 25 | int _start(int argc, char **argv) 26 | { 27 | FlushDcache(); 28 | CpuEnableIntr(0); 29 | 30 | sceCdInit(1); 31 | sceCdStop(); 32 | 33 | SifInitRpc(0); 34 | 35 | fsysMount(); 36 | printf("host: mounted\n"); 37 | cmdHandlerInit(); 38 | printf("IOP cmd thread started\n"); 39 | naplinkRpcInit(); 40 | printf("Naplink thread started\n"); 41 | 42 | installExceptionHandlers(); 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /modules/debug/tifinet-ingame.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/debug/tifinet-ingame.irx -------------------------------------------------------------------------------- /modules/debug/tifinet.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/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 ../../Rules.make 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 | 2 | thsemap_IMPORTS_start 3 | I_CreateSema 4 | I_DeleteSema 5 | I_SignalSema 6 | I_WaitSema 7 | thsemap_IMPORTS_end 8 | 9 | thbase_IMPORTS_start 10 | I_CreateThread 11 | I_StartThread 12 | thbase_IMPORTS_end 13 | 14 | thevent_IMPORTS_start 15 | I_CreateEventFlag 16 | I_WaitEventFlag 17 | I_SetEventFlag 18 | I_iSetEventFlag 19 | thevent_IMPORTS_end 20 | 21 | ioman_IMPORTS_start 22 | I_open 23 | I_write 24 | I_close 25 | I_AddDrv 26 | I_DelDrv 27 | ioman_IMPORTS_end 28 | 29 | stdio_IMPORTS_start 30 | I_printf 31 | stdio_IMPORTS_end 32 | 33 | sysclib_IMPORTS_start 34 | I_prnt 35 | I_strncmp 36 | sysclib_IMPORTS_end 37 | 38 | sysmem_IMPORTS_start 39 | I_KprintfSet 40 | sysmem_IMPORTS_end 41 | 42 | ps2ip_IMPORTS_start 43 | I_inet_addr 44 | I_lwip_socket 45 | I_lwip_close 46 | I_lwip_sendto 47 | ps2ip_IMPORTS_end 48 | 49 | loadcore_IMPORTS_start 50 | I_RegisterLibraryEntries 51 | loadcore_IMPORTS_end 52 | 53 | intrman_IMPORTS_start 54 | I_QueryIntrContext 55 | I_CpuInvokeInKmode 56 | intrman_IMPORTS_end 57 | 58 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | IOP_INCS += -I../../../include/ 4 | 5 | include $(PS2SDK)/Defs.make 6 | include ../../Rules.bin.make 7 | include ../../Rules.make 8 | -------------------------------------------------------------------------------- /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 | stdio_IMPORTS_start 9 | I_printf 10 | stdio_IMPORTS_end 11 | 12 | sysclib_IMPORTS_start 13 | I_strncmp 14 | sysclib_IMPORTS_end 15 | 16 | thsemap_IMPORTS_start 17 | I_CreateSema 18 | I_SignalSema 19 | I_WaitSema 20 | I_PollSema 21 | I_DeleteSema 22 | I_iSignalSema 23 | thsemap_IMPORTS_end 24 | 25 | thbase_IMPORTS_start 26 | I_StartThread 27 | I_CreateThread 28 | I_DeleteThread 29 | I_DelayThread 30 | I_GetThreadId 31 | I_SetAlarm 32 | I_CancelAlarm 33 | thbase_IMPORTS_end 34 | 35 | usbd_IMPORTS_start 36 | I_sceUsbdScanStaticDescriptor 37 | I_sceUsbdOpenPipe 38 | I_sceUsbdClosePipe 39 | I_sceUsbdOpenPipeAligned 40 | I_sceUsbdSetPrivateData 41 | I_sceUsbdTransferPipe 42 | I_sceUsbdRegisterLdd 43 | usbd_IMPORTS_end 44 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | IOP_INCS += -I../../../include/ 4 | 5 | include $(PS2SDK)/Defs.make 6 | include ../../Rules.bin.make 7 | include ../../Rules.make 8 | -------------------------------------------------------------------------------- /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 | stdio_IMPORTS_start 9 | I_printf 10 | stdio_IMPORTS_end 11 | 12 | thsemap_IMPORTS_start 13 | I_CreateSema 14 | I_SignalSema 15 | I_WaitSema 16 | I_PollSema 17 | I_DeleteSema 18 | I_iSignalSema 19 | thsemap_IMPORTS_end 20 | 21 | thbase_IMPORTS_start 22 | I_StartThread 23 | I_CreateThread 24 | I_DeleteThread 25 | I_DelayThread 26 | I_GetThreadId 27 | I_SetAlarm 28 | I_CancelAlarm 29 | thbase_IMPORTS_end 30 | 31 | usbd_IMPORTS_start 32 | I_sceUsbdScanStaticDescriptor 33 | I_sceUsbdOpenPipe 34 | I_sceUsbdClosePipe 35 | I_sceUsbdOpenPipeAligned 36 | I_sceUsbdSetPrivateData 37 | I_sceUsbdTransferPipe 38 | I_sceUsbdRegisterLdd 39 | usbd_IMPORTS_end 40 | -------------------------------------------------------------------------------- /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/hdldsvr/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = hdldsvr.irx 2 | IOP_OBJS = hdldsvr.o imports.o exports.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 ../../Rules.make 11 | -------------------------------------------------------------------------------- /modules/hdd/hdldsvr/exports.tab: -------------------------------------------------------------------------------- 1 | void _retonly(void) {} 2 | 3 | DECLARE_EXPORT_TABLE(hdldsvr, 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/hdd/hdldsvr/imports.lst: -------------------------------------------------------------------------------- 1 | 2 | atad_IMPORTS_start 3 | I_ata_get_devinfo 4 | I_ata_device_sector_io 5 | I_ata_device_flush_cache 6 | atad_IMPORTS_end 7 | 8 | dev9_IMPORTS_start 9 | I_dev9Shutdown 10 | dev9_IMPORTS_end 11 | 12 | loadcore_IMPORTS_start 13 | I_RegisterLibraryEntries 14 | loadcore_IMPORTS_end 15 | 16 | poweroff_IMPORTS_start 17 | I_PoweroffShutdown 18 | poweroff_IMPORTS_end 19 | 20 | ps2ip_IMPORTS_start 21 | I_lwip_recv 22 | I_lwip_send 23 | I_lwip_close 24 | I_lwip_socket 25 | I_lwip_bind 26 | I_lwip_accept 27 | I_lwip_listen 28 | I_lwip_select 29 | I_inet_addr 30 | ps2ip_IMPORTS_end 31 | 32 | smsutils_IMPORTS_start 33 | I_mips_memset 34 | I_mips_memcpy 35 | smsutils_IMPORTS_end 36 | 37 | thbase_IMPORTS_start 38 | I_DelayThread 39 | I_CreateThread 40 | I_StartThread 41 | I_DeleteThread 42 | thbase_IMPORTS_end 43 | 44 | thsemap_IMPORTS_start 45 | I_CreateSema 46 | I_WaitSema 47 | I_SignalSema 48 | I_DeleteSema 49 | thsemap_IMPORTS_end 50 | 51 | sysclib_IMPORTS_start 52 | I_strlen 53 | sysclib_IMPORTS_end 54 | 55 | //stdio_IMPORTS_start 56 | //I_printf 57 | //stdio_IMPORTS_end 58 | -------------------------------------------------------------------------------- /modules/hdd/hdldsvr/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/hdd/hdldsvr/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 *, unsigned); 19 | #define I_mips_memcpy DECLARE_IMPORT(4, mips_memcpy) 20 | 21 | extern void mips_memset(void *, int, unsigned); 22 | #define I_mips_memset DECLARE_IMPORT(5, mips_memset) 23 | 24 | #define smsutils_IMPORTS_end END_IMPORT_TABLE 25 | 26 | #endif /* __SMSUTILS_H */ 27 | -------------------------------------------------------------------------------- /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 ../../Rules.make 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_ata_get_devinfo 3 | I_ata_io_start 4 | I_ata_io_finish 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 = ata_io_start(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 = ata_io_finish(); 64 | if (res) 65 | return res; 66 | 67 | //Note: PIO is not supported by ata_device_sector_io. 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/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/IOPRP.img -------------------------------------------------------------------------------- /modules/iopcore/cdvdfsv/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = cdvdfsv.irx 2 | IOP_OBJS = cdvdfsv.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 ../../Rules.make 13 | -------------------------------------------------------------------------------- /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_sceCdSearchFile 8 | I_sceCdSync 9 | I_sceCdGetDiskType 10 | I_sceCdDiskReady 11 | I_sceCdTrayReq 12 | I_sceCdStop 13 | I_sceCdReadClock 14 | I_sceCdStatus 15 | I_sceCdApplySCmd 16 | I_sceCdPause 17 | I_sceCdBreak 18 | I_sceCdGetReadPos 19 | I_sceGetFsvRbuf 20 | I_sceCdSC 21 | I_sceCdStInit 22 | I_sceCdStRead 23 | I_sceCdStSeek 24 | I_sceCdStStart 25 | I_sceCdStStat 26 | I_sceCdStStop 27 | I_sceCdStPause 28 | I_sceCdStResume 29 | I_sceCdPowerOff 30 | I_sceCdMmode 31 | I_sceCdStSeekF 32 | I_sceCdReadDiskID 33 | I_sceCdReadGUID 34 | I_sceCdSetTimeout 35 | I_sceCdReadModelID 36 | I_sceCdReadDvdDualInfo 37 | I_sceCdLayerSearchFile 38 | cdvdman_IMPORTS_end 39 | 40 | intrman_IMPORTS_start 41 | I_CpuEnableIntr 42 | I_CpuSuspendIntr 43 | I_CpuResumeIntr 44 | intrman_IMPORTS_end 45 | 46 | loadcore_IMPORTS_start 47 | I_FlushDcache 48 | I_RegisterLibraryEntries 49 | loadcore_IMPORTS_end 50 | 51 | sifcmd_IMPORTS_start 52 | I_sceSifInitRpc 53 | I_sceSifSetRpcQueue 54 | I_sceSifRegisterRpc 55 | I_sceSifRpcLoop 56 | sifcmd_IMPORTS_end 57 | 58 | sifman_IMPORTS_start 59 | I_sceSifSetDma 60 | I_sceSifDmaStat 61 | sifman_IMPORTS_end 62 | 63 | smsutils_IMPORTS_start 64 | I_mips_memset 65 | I_mips_memcpy 66 | smsutils_IMPORTS_end 67 | 68 | thbase_IMPORTS_start 69 | I_CreateThread 70 | I_StartThread 71 | I_DelayThread 72 | I_ExitDeleteThread 73 | I_GetThreadId 74 | I_ChangeThreadPriority 75 | thbase_IMPORTS_end 76 | 77 | thevent_IMPORTS_start 78 | I_ClearEventFlag 79 | I_WaitEventFlag 80 | thevent_IMPORTS_end 81 | 82 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdfsv/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | #include "cdvdman.h" 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 streaming.o ioplib_util.o smsutils.o imports.o exports.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 | ifeq ($(IOPCORE_DEBUG),1) 37 | USE_DEV9 = 1 38 | endif 39 | endif 40 | 41 | IOP_INCS += -I../common 42 | 43 | ifeq ($(IOPCORE_DEBUG),1) 44 | IOP_CFLAGS += -D__IOPCORE_DEBUG 45 | endif 46 | 47 | ifeq ($(USE_DEV9),1) 48 | IOP_OBJS += dev9.o 49 | IOP_CFLAGS += -D__USE_DEV9 50 | endif 51 | 52 | IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%) 53 | 54 | include $(PS2SDK)/Defs.make 55 | include ../../Rules.bin.make 56 | include ../../Rules.make 57 | -------------------------------------------------------------------------------- /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 dev9RegisterIntrCb(int intr, dev9_intr_cb_t cb); // #4 28 | int dev9DmaTransfer(int ctrl, void *buf, int bcr, int dir); // #5 29 | void dev9Shutdown(void); // #6 30 | void dev9IntrEnable(int mask); // #7 31 | void dev9IntrDisable(int mask); // #8 32 | int dev9GetEEPROM(u16 *buf); // #9 33 | void dev9LEDCtl(int ctl); // #10 34 | int dev9RegisterShutdownCb(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 | 4 | void DeviceFSInit(void); //Called when the filesystem layer is initialized 5 | void DeviceLock(void); //Prevents further accesses to the device. 6 | void DeviceUnmount(void); //Called when OPL is shutting down. 7 | void DeviceStop(void); //Called before the PS2 is to be shut down. 8 | 9 | int DeviceReadSectors(u32 lsn, void *buffer, unsigned int sectors); 10 | -------------------------------------------------------------------------------- /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_DisableIntr 21 | I_RegisterIntrHandler 22 | intrman_IMPORTS_end 23 | 24 | sysmem_IMPORTS_start 25 | I_AllocSysMemory 26 | I_FreeSysMemory 27 | I_Kprintf 28 | sysmem_IMPORTS_end 29 | 30 | loadcore_IMPORTS_start 31 | I_FlushDcache 32 | I_FlushIcache 33 | I_RegisterLibraryEntries 34 | I_GetLoadcoreInternalData 35 | I_QueryBootMode 36 | loadcore_IMPORTS_end 37 | 38 | sysclib_IMPORTS_start 39 | I_strcpy 40 | I_strlen 41 | I_strcmp 42 | I_strncmp 43 | I_strchr 44 | I_strrchr 45 | I_strstr 46 | I_strncpy 47 | I_strtok 48 | I_toupper 49 | I_sprintf 50 | sysclib_IMPORTS_end 51 | 52 | thsemap_IMPORTS_start 53 | I_CreateSema 54 | I_SignalSema 55 | I_iSignalSema 56 | I_WaitSema 57 | I_DeleteSema 58 | I_PollSema 59 | thsemap_IMPORTS_end 60 | 61 | thbase_IMPORTS_start 62 | I_CreateThread 63 | I_StartThread 64 | I_DelayThread 65 | I_SetAlarm 66 | I_iSetAlarm 67 | I_CancelAlarm 68 | I_USec2SysClock 69 | I_SleepThread 70 | I_WakeupThread 71 | I_iWakeupThread 72 | thbase_IMPORTS_end 73 | 74 | thevent_IMPORTS_start 75 | I_CreateEventFlag 76 | I_ClearEventFlag 77 | I_iClearEventFlag 78 | I_SetEventFlag 79 | I_iSetEventFlag 80 | I_WaitEventFlag 81 | I_PollEventFlag 82 | thevent_IMPORTS_end 83 | 84 | sifman_IMPORTS_start 85 | I_sceSifSetDma 86 | I_sceSifDmaStat 87 | sifman_IMPORTS_end 88 | -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/internal.h: -------------------------------------------------------------------------------- 1 | #ifdef __IOPCORE_DEBUG 2 | #define DPRINTF(args...) printf(args) 3 | #define iDPRINTF(args...) Kprintf(args) 4 | #else 5 | #define DPRINTF(args...) 6 | #define iDPRINTF(args...) 7 | #endif 8 | 9 | struct SteamingData 10 | { 11 | unsigned short int StBufmax; 12 | unsigned short int StBankmax; 13 | unsigned short int StBanksize; 14 | unsigned short int StWritePtr; 15 | unsigned short int StReadPtr; 16 | unsigned short int StStreamed; 17 | unsigned short int StStat; 18 | unsigned short int StIsReading; 19 | void *StIOP_bufaddr; 20 | u32 Stlsn; 21 | }; 22 | 23 | typedef struct 24 | { 25 | int err; 26 | int status; 27 | struct SteamingData StreamingData; 28 | int intr_ef; 29 | int disc_type_reg; 30 | u32 cdread_lba; 31 | u32 cdread_sectors; 32 | void *cdread_buf; 33 | } cdvdman_status_t; 34 | 35 | typedef void (*StmCallback_t)(void); 36 | 37 | //Internal (common) function prototypes 38 | void SetStm0Callback(StmCallback_t callback); 39 | int cdvdman_AsyncRead(u32 lsn, u32 sectors, void *buf); 40 | -------------------------------------------------------------------------------- /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(u8 *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/cdvdman/obj.usb/cdvdman.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/cdvdman.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/obj.usb/device-usb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/device-usb.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/obj.usb/exports.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/exports.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/obj.usb/imports.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/imports.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/obj.usb/ioplib_util.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/ioplib_util.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/obj.usb/mass_driver.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/mass_driver.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/obj.usb/smsutils.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/smsutils.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/obj.usb/streaming.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/obj.usb/streaming.o -------------------------------------------------------------------------------- /modules/iopcore/cdvdman/usb_cdvdman.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/cdvdman/usb_cdvdman.irx -------------------------------------------------------------------------------- /modules/iopcore/common/cdvd_config.h: -------------------------------------------------------------------------------- 1 | #define IOPCORE_COMPAT_ALT_READ 0x0001 2 | #define IOPCORE_COMPAT_0_SKIP_VIDEOS 0x0002 3 | #define IOPCORE_COMPAT_EMU_DVDDL 0x0004 4 | #define IOPCORE_COMPAT_ACCU_READS 0x0008 5 | #define IOPCORE_ENABLE_POFF 0x0100 6 | #define IOPCORE_SMB_FORMAT_USBLD 0x0200 7 | 8 | #define ISO_MAX_PARTS 10 9 | 10 | struct cdvdman_settings_common 11 | { 12 | u8 NumParts; 13 | u8 media; 14 | u16 flags; 15 | u32 layer1_start; 16 | u8 DiscID[5]; 17 | u8 padding[3]; 18 | } __attribute__((packed)); 19 | 20 | struct cdvdman_settings_hdd 21 | { 22 | struct cdvdman_settings_common common; 23 | u32 lba_start; 24 | } __attribute__((packed)); 25 | 26 | struct cdvdman_settings_smb 27 | { 28 | struct cdvdman_settings_common common; 29 | s8 filename[160]; 30 | union 31 | { 32 | struct 33 | { 34 | //Please keep the string lengths in-sync with the limits within the UI. 35 | s8 smb_ip[16]; 36 | u16 smb_port; 37 | s8 smb_share[32]; 38 | s8 smb_prefix[32]; 39 | s8 smb_user[32]; 40 | s8 smb_password[32]; 41 | }; 42 | u16 FIDs[ISO_MAX_PARTS]; 43 | }; 44 | } __attribute__((packed)); 45 | 46 | struct cdvdman_settings_bdm 47 | { 48 | struct cdvdman_settings_common common; 49 | u32 LBAs[ISO_MAX_PARTS]; 50 | } __attribute__((packed)); 51 | -------------------------------------------------------------------------------- /modules/iopcore/common/oplsmb.h: -------------------------------------------------------------------------------- 1 | typedef struct 2 | { 3 | u32 MaxBufferSize; 4 | u32 SessionKey; 5 | u8 PrimaryDomainServerName[32]; 6 | u8 EncryptionKey[8]; 7 | u32 Capabilities; 8 | u16 MaxMpxCount; 9 | u8 SecurityMode; // 0 = share level, 1 = user level 10 | u8 PasswordType; // 0 = PlainText passwords, 1 = use challenge/response 11 | char Username[36]; 12 | u8 Password[48]; // either PlainText, either hashed 13 | int PasswordLen; 14 | int HashedFlag; 15 | void *IOPaddr; 16 | } server_specs_t; 17 | 18 | typedef void (*OplSmbPwHashFunc_t)(server_specs_t *ss); 19 | 20 | #define oplsmb_IMPORTS_start DECLARE_IMPORT_TABLE(oplsmb, 1, 1) 21 | #define oplsmb_IMPORTS_end END_IMPORT_TABLE 22 | 23 | void smb_NegotiateProt(OplSmbPwHashFunc_t hash_callback); 24 | #define I_smb_NegotiateProt DECLARE_IMPORT(4, smb_NegotiateProt) 25 | -------------------------------------------------------------------------------- /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 *, unsigned); 19 | #define I_mips_memcpy DECLARE_IMPORT(4, mips_memcpy) 20 | 21 | extern void mips_memset(void *, int, unsigned); 22 | #define I_mips_memset DECLARE_IMPORT(5, mips_memset) 23 | 24 | #define smsutils_IMPORTS_end END_IMPORT_TABLE 25 | 26 | #endif /* __SMSUTILS_H */ 27 | -------------------------------------------------------------------------------- /modules/iopcore/eesync/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = eesync.irx 2 | IOP_OBJS = eesync.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../../Rules.bin.make 6 | include ../../Rules.make 7 | -------------------------------------------------------------------------------- /modules/iopcore/eesync/eesync.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "loadcore_add.h" 8 | 9 | #define MODNAME "SyncEE" 10 | IRX_ID(MODNAME, 0x01, 0x01); 11 | 12 | static int PostResetCallback(int *arg1, int arg2) 13 | { 14 | sceSifSetSMFlag(SIF_STAT_BOOTEND); 15 | 16 | return 0; 17 | } 18 | 19 | int _start(int argc, char **argv) 20 | { 21 | loadcore20(&PostResetCallback, 2, 0); 22 | 23 | return MODULE_RESIDENT_END; 24 | } 25 | -------------------------------------------------------------------------------- /modules/iopcore/eesync/imports.lst: -------------------------------------------------------------------------------- 1 | loadcore_IMPORTS_start 2 | I_loadcore20 3 | loadcore_IMPORTS_end 4 | 5 | sifman_IMPORTS_start 6 | I_sceSifSetSMFlag 7 | sifman_IMPORTS_end 8 | 9 | -------------------------------------------------------------------------------- /modules/iopcore/eesync/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 "loadcore_add.h" 23 | 24 | #endif /* IOP_IRX_IMPORTS_H */ 25 | -------------------------------------------------------------------------------- /modules/iopcore/eesync/loadcore_add.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOADCORE_ADD_H_ 2 | #define _LOADCORE_ADD_H_ 3 | 4 | typedef int (*Callback)(int *arg1, int arg2); 5 | 6 | int loadcore20(Callback func, int priority, int *pResult); 7 | #define I_loadcore20 DECLARE_IMPORT(20, loadcore20); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /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 ../../Rules.make 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 ../../../Rules.make 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 | sysclib_IMPORTS_start 16 | I_strtol 17 | sysclib_IMPORTS_end 18 | 19 | thbase_IMPORTS_start 20 | I_SetAlarm 21 | I_CancelAlarm 22 | thbase_IMPORTS_end 23 | 24 | thevent_IMPORTS_start 25 | I_CreateEventFlag 26 | I_WaitEventFlag 27 | I_iSetEventFlag 28 | thevent_IMPORTS_end 29 | 30 | thsemap_IMPORTS_start 31 | I_CreateSema 32 | I_SignalSema 33 | I_PollSema 34 | thsemap_IMPORTS_end 35 | 36 | -------------------------------------------------------------------------------- /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 ../../../Rules.make 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 | 10 | -------------------------------------------------------------------------------- /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 | int _start(int argc, char **argv) 11 | { 12 | sceSdEffectAttr attr = { 13 | 0, 14 | SD_EFFECT_MODE_OFF, 15 | 0, 16 | 0, 17 | 0, 18 | 0, 19 | }; 20 | 21 | sceSdInit(0); 22 | 23 | sceSdSetEffectAttr(0, &attr); 24 | sceSdSetEffectAttr(1, &attr); 25 | 26 | return MODULE_NO_RESIDENT_END; 27 | } 28 | -------------------------------------------------------------------------------- /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 ../../../Rules.make 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 | 14 | sysclib_IMPORTS_start 15 | I_strtol 16 | sysclib_IMPORTS_end 17 | 18 | -------------------------------------------------------------------------------- /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 JAL(addr) (0x0c000000 | (((addr)&0x03ffffff) >> 2)) 15 | #define JMP(addr) (0x08000000 | (0x3ffffff & ((addr) >> 2))) 16 | 17 | int _start(int argc, char **argv) 18 | { 19 | lc_internals_t *lc; 20 | ModuleInfo_t *m; 21 | int modId, modRet; 22 | 23 | if (argc != 2) { 24 | printf("Missing module arg.\n"); 25 | return MODULE_NO_RESIDENT_END; 26 | } 27 | 28 | modId = LoadModule(argv[1]); 29 | if (modId < 0) { 30 | printf("Failed to load %s (%d).\n", argv[1], modId); 31 | return MODULE_NO_RESIDENT_END; 32 | } 33 | 34 | lc = GetLoadcoreInternalData(); 35 | 36 | //Locate the specified module. 37 | m = lc->image_info; 38 | while (m != NULL) { 39 | if (modId == m->id) 40 | break; 41 | 42 | m = m->next; 43 | } 44 | 45 | if (m != NULL) { //Increase size of CompBuffers, to allow for 17 sectors to be stored. 46 | *(u16 *)(m->text_start + 0x000016b8) = 0x8800; //Original: 0x8000 47 | *(u16 *)(m->text_start + 0x000016bc) = 0x8800; //Original: 0x8000 48 | 49 | StartModule(modId, "", 0, NULL, &modRet); 50 | 51 | return MODULE_RESIDENT_END; 52 | } 53 | 54 | printf("Could not find module %d.\n", modId); 55 | 56 | return MODULE_NO_RESIDENT_END; 57 | } 58 | -------------------------------------------------------------------------------- /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 ../../../Rules.make 7 | -------------------------------------------------------------------------------- /modules/iopcore/patches/iremsndpatch/asm.S: -------------------------------------------------------------------------------- 1 | .set noreorder 2 | 3 | .text 4 | 5 | .extern _lock 6 | .extern _unlock 7 | 8 | .globl _lock_RpcFunc 9 | .ent _lock_RpcFunc 10 | _lock_RpcFunc: 11 | #$a0 already preserved in s2 12 | move $s1, $a1 13 | 14 | addiu $sp, $sp, -0x18 15 | sw $ra, 0x010($sp) 16 | 17 | jal _lock 18 | move $s0, $a2 19 | 20 | lw $ra, 0x010($sp) 21 | 22 | #Restore $a0, $a1, $a2 23 | move $a0, $s2 24 | move $a1, $s1 25 | move $a2, $s0 26 | 27 | jr $ra 28 | addiu $sp, $sp, 0x18 29 | .end _lock_RpcFunc 30 | 31 | -------------------------------------------------------------------------------- /modules/iopcore/patches/iremsndpatch/imports.lst: -------------------------------------------------------------------------------- 1 | intrman_IMPORTS_start 2 | I_CpuSuspendIntr 3 | I_CpuResumeIntr 4 | intrman_IMPORTS_end 5 | 6 | loadcore_IMPORTS_start 7 | I_GetLoadcoreInternalData 8 | I_FlushIcache 9 | loadcore_IMPORTS_end 10 | 11 | stdio_IMPORTS_start 12 | I_printf 13 | stdio_IMPORTS_end 14 | 15 | sysclib_IMPORTS_start 16 | I_strtol 17 | sysclib_IMPORTS_end 18 | 19 | thbase_IMPORTS_start 20 | I_WakeupThread 21 | thbase_IMPORTS_end 22 | 23 | thsemap_IMPORTS_start 24 | I_CreateSema 25 | I_SignalSema 26 | I_WaitSema 27 | thsemap_IMPORTS_end 28 | 29 | -------------------------------------------------------------------------------- /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 ../../Rules.make 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/iopcore/udnl-t300/IOPRP.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/udnl-t300/IOPRP.img -------------------------------------------------------------------------------- /modules/iopcore/udnl-t300/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = udnl.irx 2 | IOP_OBJS = udnl.o udnl_asm.o imports.o IOPRP_img.o 3 | 4 | IOP_INCS += -I./include 5 | 6 | all: $(IOP_BIN) 7 | 8 | clean: 9 | rm -f $(IOP_BIN) $(IOP_OBJS) IOPRP_img.c 10 | 11 | IOPRP_img.c: 12 | $(BIN2C) IOPRP.img IOPRP_img.c IOPRP_img 13 | 14 | include $(PS2SDK)/Defs.make 15 | include ../../Rules.make 16 | -------------------------------------------------------------------------------- /modules/iopcore/udnl-t300/imports.lst: -------------------------------------------------------------------------------- 1 | dmacman_IMPORTS_start 2 | I_dmac_set_dpcr 3 | I_dmac_set_dpcr2 4 | I_dmac_set_dpcr3 5 | dmacman_IMPORTS_end 6 | 7 | intrman_IMPORTS_start 8 | I_CpuDisableIntr 9 | intrman_IMPORTS_end 10 | 11 | ioman_IMPORTS_start 12 | I_open 13 | I_read 14 | I_close 15 | I_lseek 16 | ioman_IMPORTS_end 17 | 18 | loadcore_IMPORTS_start 19 | I_GetLoadcoreInternalData 20 | I_QueryBootMode 21 | loadcore_IMPORTS_end 22 | 23 | stdio_IMPORTS_start 24 | I_printf 25 | stdio_IMPORTS_end 26 | 27 | sysclib_IMPORTS_start 28 | I_memset 29 | I_strcmp 30 | I_strncmp 31 | I_memcpy 32 | sysclib_IMPORTS_end 33 | 34 | sysmem_IMPORTS_start 35 | I_AllocSysMemory 36 | I_QueryBlockSize 37 | I_QueryBlockTopAddress 38 | I_QueryMemSize 39 | sysmem_IMPORTS_end 40 | 41 | thbase_IMPORTS_start 42 | I_SleepThread 43 | thbase_IMPORTS_end 44 | 45 | -------------------------------------------------------------------------------- /modules/iopcore/udnl-t300/include/COFF.h: -------------------------------------------------------------------------------- 1 | /* coff.h 2 | * Data structures that describe the MIPS COFF format. 3 | */ 4 | 5 | struct coff_filehdr 6 | { 7 | u16 f_magic; /* magic number */ 8 | u16 f_nscns; /* number of sections */ 9 | u32 f_timdat; /* time & date stamp */ 10 | u32 f_symptr; /* file pointer to symbolic header */ 11 | u32 f_nsyms; /* sizeof(symbolic hdr) */ 12 | u16 f_opthdr; /* sizeof(optional hdr) */ 13 | u16 f_flags; /* flags */ 14 | }; 15 | 16 | #define MIPSELMAGIC 0x0162 17 | 18 | #define OMAGIC 0407 19 | #define SOMAGIC 0x0701 20 | 21 | typedef struct aouthdr 22 | { 23 | u16 magic; /* see above */ 24 | u16 vstamp; /* version stamp */ 25 | u32 tsize; /* text size in bytes, padded to DW bdry */ 26 | u32 dsize; /* initialized data " " */ 27 | u32 bsize; /* uninitialized data " " */ 28 | u32 entry; /* entry pt. */ 29 | u32 text_start; /* base of text used for this file */ 30 | u32 data_start; /* base of data used for this file */ 31 | u32 bss_start; /* base of bss used for this file */ 32 | //Instead of the GPR and CPR masks, these 5 fields exist. 33 | u32 field_20; 34 | u32 field_24; 35 | u32 field_28; 36 | u32 field_2C; 37 | struct iopmod_id *mod_id; 38 | u32 gp_value; /* the gp value used for this object */ 39 | } AOUTHDR; 40 | 41 | struct scnhdr 42 | { 43 | u8 s_name[8]; /* section name */ 44 | u32 s_paddr; /* physical address, aliased s_nlib */ 45 | u32 s_vaddr; /* virtual address */ 46 | u32 s_size; /* section size */ 47 | u32 s_scnptr; /* file ptr to raw data for section */ 48 | u32 s_relptr; /* file ptr to relocation */ 49 | u32 s_lnnoptr; /* file ptr to gp histogram */ 50 | u16 s_nreloc; /* number of relocation entries */ 51 | u16 s_nlnno; /* number of gp histogram entries */ 52 | u32 s_flags; /* flags */ 53 | }; 54 | -------------------------------------------------------------------------------- /modules/iopcore/udnl-t300/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | /* Please keep these in an alphabetical order! */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #endif /* IOP_IRX_IMPORTS_H */ 17 | -------------------------------------------------------------------------------- /modules/iopcore/udnl/IOPRP.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/udnl/IOPRP.img -------------------------------------------------------------------------------- /modules/iopcore/udnl/IOPRP_DECI2.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/iopcore/udnl/IOPRP_DECI2.img -------------------------------------------------------------------------------- /modules/iopcore/udnl/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = udnl.irx 2 | IOP_OBJS = udnl.o udnl_asm.o imports.o 3 | 4 | IOP_INCS += -I./include 5 | ifeq ($(DECI2_DEBUG),1) 6 | IOP_CFLAGS += -D__DECI2_DEBUG 7 | IOP_OBJS += IOPRP_DECI2_img.o 8 | else 9 | IOP_OBJS += IOPRP_img.o 10 | endif 11 | 12 | all: $(IOP_BIN) 13 | 14 | clean: 15 | rm -f $(IOP_BIN) $(IOP_OBJS) IOPRP_img.c IOPRP_DECI2_img.c IOPRP_DECI2_img.o IOPRP_img.o 16 | 17 | IOPRP_img.c: 18 | $(BIN2C) IOPRP.img IOPRP_img.c IOPRP_img 19 | 20 | IOPRP_DECI2_img.c: 21 | $(BIN2C) IOPRP_DECI2.img IOPRP_DECI2_img.c IOPRP_img 22 | 23 | include $(PS2SDK)/Defs.make 24 | include ../../Rules.make 25 | -------------------------------------------------------------------------------- /modules/iopcore/udnl/imports.lst: -------------------------------------------------------------------------------- 1 | dmacman_IMPORTS_start 2 | I_dmac_set_dpcr 3 | I_dmac_set_dpcr2 4 | I_dmac_set_dpcr3 5 | dmacman_IMPORTS_end 6 | 7 | intrman_IMPORTS_start 8 | I_CpuDisableIntr 9 | intrman_IMPORTS_end 10 | 11 | ioman_IMPORTS_start 12 | I_open 13 | I_read 14 | I_close 15 | I_lseek 16 | ioman_IMPORTS_end 17 | 18 | stdio_IMPORTS_start 19 | I_printf 20 | stdio_IMPORTS_end 21 | 22 | sysclib_IMPORTS_start 23 | I_memset 24 | I_strcmp 25 | I_strncmp 26 | I_memcpy 27 | sysclib_IMPORTS_end 28 | 29 | sysmem_IMPORTS_start 30 | I_AllocSysMemory 31 | I_QueryBlockSize 32 | I_QueryBlockTopAddress 33 | I_QueryMemSize 34 | sysmem_IMPORTS_end 35 | 36 | thbase_IMPORTS_start 37 | I_SleepThread 38 | thbase_IMPORTS_end 39 | 40 | -------------------------------------------------------------------------------- /modules/iopcore/udnl/include/COFF.h: -------------------------------------------------------------------------------- 1 | /* coff.h 2 | * Data structures that describe the MIPS COFF format. 3 | */ 4 | 5 | struct coff_filehdr 6 | { 7 | u16 f_magic; /* magic number */ 8 | u16 f_nscns; /* number of sections */ 9 | u32 f_timdat; /* time & date stamp */ 10 | u32 f_symptr; /* file pointer to symbolic header */ 11 | u32 f_nsyms; /* sizeof(symbolic hdr) */ 12 | u16 f_opthdr; /* sizeof(optional hdr) */ 13 | u16 f_flags; /* flags */ 14 | }; 15 | 16 | #define MIPSELMAGIC 0x0162 17 | 18 | #define OMAGIC 0407 19 | #define SOMAGIC 0x0701 20 | 21 | typedef struct aouthdr 22 | { 23 | u16 magic; /* see above */ 24 | u16 vstamp; /* version stamp */ 25 | u32 tsize; /* text size in bytes, padded to DW bdry */ 26 | u32 dsize; /* initialized data " " */ 27 | u32 bsize; /* uninitialized data " " */ 28 | u32 entry; /* entry pt. */ 29 | u32 text_start; /* base of text used for this file */ 30 | u32 data_start; /* base of data used for this file */ 31 | u32 bss_start; /* base of bss used for this file */ 32 | //Instead of the GPR and CPR masks, these 5 fields exist. 33 | u32 field_20; 34 | u32 field_24; 35 | u32 field_28; 36 | u32 field_2C; 37 | struct iopmod_id *mod_id; 38 | u32 gp_value; /* the gp value used for this object */ 39 | } AOUTHDR; 40 | 41 | struct scnhdr 42 | { 43 | u8 s_name[8]; /* section name */ 44 | u32 s_paddr; /* physical address, aliased s_nlib */ 45 | u32 s_vaddr; /* virtual address */ 46 | u32 s_size; /* section size */ 47 | u32 s_scnptr; /* file ptr to raw data for section */ 48 | u32 s_relptr; /* file ptr to relocation */ 49 | u32 s_lnnoptr; /* file ptr to gp histogram */ 50 | u16 s_nreloc; /* number of relocation entries */ 51 | u16 s_nlnno; /* number of gp histogram entries */ 52 | u32 s_flags; /* flags */ 53 | }; 54 | -------------------------------------------------------------------------------- /modules/iopcore/udnl/irx_imports.h: -------------------------------------------------------------------------------- 1 | #ifndef IOP_IRX_IMPORTS_H 2 | #define IOP_IRX_IMPORTS_H 3 | 4 | #include 5 | 6 | /* Please keep these in an alphabetical order! */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #endif /* IOP_IRX_IMPORTS_H */ 17 | -------------------------------------------------------------------------------- /modules/isofs/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = isofs.irx 2 | IOP_OBJS = isofs.o imports.o 3 | 4 | include $(PS2SDK)/Defs.make 5 | include ../Rules.bin.make 6 | include ../Rules.make 7 | -------------------------------------------------------------------------------- /modules/isofs/imports.lst: -------------------------------------------------------------------------------- 1 | thsemap_IMPORTS_start 2 | I_CreateSema 3 | I_DeleteSema 4 | I_SignalSema 5 | I_iSignalSema 6 | I_WaitSema 7 | thsemap_IMPORTS_end 8 | 9 | ioman_IMPORTS_start 10 | I_open 11 | I_close 12 | I_read 13 | I_lseek 14 | I_AddDrv 15 | I_DelDrv 16 | ioman_IMPORTS_end 17 | 18 | stdio_IMPORTS_start 19 | I_printf 20 | stdio_IMPORTS_end 21 | 22 | sysclib_IMPORTS_start 23 | I_memset 24 | I_memcpy 25 | I_strcmp 26 | I_strncmp 27 | I_strcpy 28 | I_strlen 29 | I_strncpy 30 | I_strchr 31 | I_strrchr 32 | sysclib_IMPORTS_end 33 | 34 | -------------------------------------------------------------------------------- /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 | 12 | #endif /* IOP_IRX_IMPORTS_H */ 13 | -------------------------------------------------------------------------------- /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 | IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%) 25 | 26 | ifeq ($(IOPCORE_DEBUG),1) 27 | IOP_CFLAGS += -DDEBUG 28 | endif 29 | 30 | ifeq ($(PADEMU),1) 31 | IOP_CFLAGS += -DPADEMU 32 | endif 33 | 34 | include $(PS2SDK)/Defs.make 35 | include ../Rules.bin.make 36 | include ../Rules.make 37 | -------------------------------------------------------------------------------- /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 | lbound = 0; 17 | ubound = 0; 18 | sector_to_read = 0; 19 | 20 | for (i = 0; i < 10; i++) { 21 | lbound = ubound; 22 | ubound += vmcSpec[mc_num].blocks[i].count; 23 | 24 | if ((mc_page >= (lbound << 4)) && (mc_page < (ubound << 4))) 25 | 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)); 26 | } 27 | 28 | return sector_to_read; 29 | } 30 | 31 | int DeviceWritePage(int mc_num, void *buf, u32 page_num) 32 | { 33 | u32 lba; 34 | 35 | lba = Mcpage_to_Apasector(mc_num, page_num); 36 | DPRINTF("writing page 0x%lx at lba 0x%lx\n", page_num, lba); 37 | 38 | return (ata_device_sector_io(0, buf, lba, 1, ATA_DIR_WRITE) == 0 ? 1 : 0); 39 | } 40 | 41 | int DeviceReadPage(int mc_num, void *buf, u32 page_num) 42 | { 43 | u32 lba; 44 | 45 | lba = Mcpage_to_Apasector(mc_num, page_num); 46 | DPRINTF("reading page 0x%lx at lba 0x%lx\n", page_num, lba); 47 | 48 | return (ata_device_sector_io(0, buf, lba, 1, ATA_DIR_READ) == 0 ? 1 : 0); 49 | } 50 | 51 | void DeviceShutdown(void) 52 | { 53 | } 54 | -------------------------------------------------------------------------------- /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/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/mcemu/obj.usb/device-usb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/obj.usb/device-usb.o -------------------------------------------------------------------------------- /modules/mcemu/obj.usb/imports.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/obj.usb/imports.o -------------------------------------------------------------------------------- /modules/mcemu/obj.usb/mcemu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/obj.usb/mcemu.o -------------------------------------------------------------------------------- /modules/mcemu/obj.usb/mcemu_io.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/obj.usb/mcemu_io.o -------------------------------------------------------------------------------- /modules/mcemu/obj.usb/mcemu_rpc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/obj.usb/mcemu_rpc.o -------------------------------------------------------------------------------- /modules/mcemu/obj.usb/mcemu_sys.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/obj.usb/mcemu_sys.o -------------------------------------------------------------------------------- /modules/mcemu/obj.usb/mcemu_var.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/obj.usb/mcemu_var.o -------------------------------------------------------------------------------- /modules/mcemu/usb_mcemu.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/mcemu/usb_mcemu.irx -------------------------------------------------------------------------------- /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 | ifneq ($(IOP_CC_VERSION),3.2.2) 19 | ifneq ($(IOP_CC_VERSION),3.2.3) 20 | IOP_CFLAGS += -mno-memcpy 21 | endif 22 | endif 23 | 24 | ifeq ($(INGAME_DRIVER),1) 25 | IOP_CFLAGS += -DINGAME_DRIVER 26 | endif 27 | 28 | ifeq ($(INTERRUPT_CTX_INPKT),1) 29 | IOP_CFLAGS += -DINTERRUPT_CTX_INPKT 30 | endif 31 | 32 | ifeq ($(FULL_LWIP),1) 33 | IOP_CFLAGS += -DFULL_LWIP 34 | endif 35 | 36 | include $(PS2SDK)/Defs.make 37 | include ../../Rules.bin.make 38 | include ../../Rules.make 39 | -------------------------------------------------------------------------------- /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/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 ../../Rules.make 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(s8 *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 | int HttpSendGetRequest(s32 HttpSocket, const s8 *UserAgent, const s8 *host, s8 *mode, const u8 *mtime, const s8 *uri, u8 *output, u16 *out_len); 19 | 20 | #define HTTP_CLIENT_SERVER_NAME_MAX 30 21 | #define HTTP_CLIENT_USER_AGENT_MAX 16 22 | #define HTTP_CLIENT_URI_MAX 128 23 | 24 | enum HTTP_CLIENT_CMD { 25 | HTTP_CLIENT_CMD_CONN_ESTAB, 26 | HTTP_CLIENT_CMD_CONN_CLOSE, 27 | HTTP_CLIENT_CMD_SEND_GET_REQ, 28 | }; 29 | 30 | struct HttpClientConnEstabArgs 31 | { 32 | char server[HTTP_CLIENT_SERVER_NAME_MAX]; 33 | u16 port; 34 | }; 35 | 36 | struct HttpClientConnCloseArgs 37 | { 38 | s32 socket; 39 | }; 40 | 41 | struct HttpClientSendGetArgs 42 | { 43 | s32 socket; 44 | s8 UserAgent[HTTP_CLIENT_USER_AGENT_MAX]; 45 | s8 host[HTTP_CLIENT_SERVER_NAME_MAX]; 46 | s8 mode; 47 | u8 hasMtime; 48 | u8 mtime[6]; 49 | s8 uri[HTTP_CLIENT_URI_MAX]; 50 | u16 out_len; 51 | void *output; 52 | }; 53 | 54 | struct HttpClientSendGetResult 55 | { 56 | s32 result; 57 | s8 mode; 58 | u8 padding; 59 | u16 out_len; 60 | }; 61 | 62 | #ifdef _IOP 63 | #define httpc_IMPORTS_start DECLARE_IMPORT_TABLE(httpc, 1, 1) 64 | #define httpc_IMPORTS_end END_IMPORT_TABLE 65 | 66 | #define I_HttpEstabConnection DECLARE_IMPORT(4, HttpEstabConnection) 67 | #define I_HttpCloseConnection DECLARE_IMPORT(5, HttpCloseConnection) 68 | #define I_HttpSendGetRequest DECLARE_IMPORT(6, HttpSendGetRequest) 69 | #endif 70 | -------------------------------------------------------------------------------- /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 ../../Rules.make 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_socket 13 | I_lwip_connect 14 | I_lwip_send 15 | I_lwip_recv 16 | I_lwip_select 17 | I_lwip_close 18 | I_lwip_shutdown 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_memset 40 | I_memmove 41 | I_strcpy 42 | I_strcmp 43 | I_strncmp 44 | I_strlen 45 | I_strcat 46 | I_sprintf 47 | I_strtoul 48 | I_strchr 49 | I_strstr 50 | I_tolower 51 | sysclib_IMPORTS_end 52 | 53 | thbase_IMPORTS_start 54 | I_GetThreadId 55 | I_CreateThread 56 | I_DeleteThread 57 | I_StartThread 58 | I_TerminateThread 59 | thbase_IMPORTS_end 60 | -------------------------------------------------------------------------------- /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/lwnbdsvr/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2021, Bignaux Ronan 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /modules/network/lwnbdsvr/Makefile: -------------------------------------------------------------------------------- 1 | IOP_BIN = lwnbdsvr.irx 2 | IOP_OBJS = lwnbdsvr.o imports.o exports.o drivers/atad_d.o nbd_server.o nbd_protocol.o 3 | 4 | IOP_CFLAGS += -DPS2SDK 5 | IOP_INCS += -I../../iopcore/common -I../../../include/ 6 | 7 | ifeq ($(DEBUG),1) 8 | IOP_CFLAGS += -DDEBUG -DNBD_DEBUG 9 | endif 10 | 11 | include $(PS2SDK)/Defs.make 12 | include ../../Rules.bin.make 13 | include $(PS2SDK)/samples/Makefile.iopglobal 14 | 15 | ifneq ($(IOP_CC_VERSION),3.2.2) 16 | ifneq ($(IOP_CC_VERSION),3.2.3) 17 | # Due to usage of 64 bit integers, support code for __ashldi3 and __lshrdi3 is needed 18 | IOP_LIBS += -lgcc 19 | endif 20 | endif 21 | -------------------------------------------------------------------------------- /modules/network/lwnbdsvr/drivers/atad_d.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "atad_d.h" 3 | 4 | static inline int atad_read_(nbd_context const *const me, void *buffer, uint64_t offset, uint32_t length) 5 | { 6 | return ata_device_sector_io(((atad_driver const *)me)->device, buffer, (uint32_t)offset, length, ATA_DIR_READ); 7 | } 8 | 9 | static inline int atad_write_(nbd_context const *const me, void *buffer, uint64_t offset, uint32_t length) 10 | { 11 | return ata_device_sector_io(((atad_driver const *)me)->device, buffer, (uint32_t)offset, length, ATA_DIR_WRITE); 12 | } 13 | 14 | static inline int atad_flush_(nbd_context const *const me) 15 | { 16 | return ata_device_flush_cache(((atad_driver const *)me)->device); 17 | } 18 | 19 | int atad_ctor(atad_driver *const me, int device) 20 | { 21 | me->device = device; 22 | ata_devinfo_t *dev_info = ata_get_devinfo(me->device); 23 | 24 | static struct nbd_context_Vtbl const vtbl = { 25 | &atad_read_, 26 | &atad_write_, 27 | &atad_flush_, 28 | }; 29 | nbd_context_ctor(&me->super); /* call the superclass' ctor */ 30 | me->super.vptr = &vtbl; /* override the vptr */ 31 | // int ata_device_sce_identify_drive(int device, void *data); 32 | strcpy(me->super.export_desc, "PlayStation 2 HDD via ATAD"); 33 | sprintf(me->super.export_name, "%s%d", "hdd", me->device); 34 | me->super.blocksize = 512; 35 | me->super.buffer = nbd_buffer; 36 | me->super.eflags = NBD_FLAG_HAS_FLAGS | NBD_FLAG_SEND_FLUSH; 37 | 38 | if (dev_info != NULL && dev_info->exists) { 39 | me->super.export_size = (uint64_t)dev_info->total_sectors * me->super.blocksize; 40 | return 0; 41 | } 42 | return 1; 43 | } 44 | -------------------------------------------------------------------------------- /modules/network/lwnbdsvr/drivers/atad_d.h: -------------------------------------------------------------------------------- 1 | #ifndef ATAD_DRIVERS_NBD_H 2 | #define ATAD_DRIVERS_NBD_H 3 | 4 | #include "../nbd_server.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct atad_driver 11 | { 12 | nbd_context super; 13 | int device; 14 | } atad_driver; 15 | 16 | int atad_ctor(atad_driver *const me, int device); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif /* ATAD_DRIVERS_NBD_H */ 22 | -------------------------------------------------------------------------------- /modules/network/lwnbdsvr/exports.tab: -------------------------------------------------------------------------------- 1 | void _retonly(void) {} 2 | 3 | DECLARE_EXPORT_TABLE(lwnbdsvr, 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/network/lwnbdsvr/imports.lst: -------------------------------------------------------------------------------- 1 | atad_IMPORTS_start 2 | I_ata_get_devinfo 3 | I_ata_device_sector_io 4 | I_ata_device_flush_cache 5 | atad_IMPORTS_end 6 | 7 | loadcore_IMPORTS_start 8 | I_RegisterLibraryEntries 9 | loadcore_IMPORTS_end 10 | 11 | ps2ip_IMPORTS_start 12 | I_lwip_recv 13 | I_lwip_send 14 | I_lwip_close 15 | I_lwip_socket 16 | I_lwip_bind 17 | I_lwip_accept 18 | I_lwip_listen 19 | ps2ip_IMPORTS_end 20 | 21 | thbase_IMPORTS_start 22 | I_CreateThread 23 | I_StartThread 24 | I_DeleteThread 25 | thbase_IMPORTS_end 26 | 27 | sysclib_IMPORTS_start 28 | I_sprintf 29 | I_strncmp 30 | I_strcpy 31 | I_strlen 32 | I_memset 33 | sysclib_IMPORTS_end 34 | 35 | stdio_IMPORTS_start 36 | I_printf 37 | stdio_IMPORTS_end 38 | -------------------------------------------------------------------------------- /modules/network/lwnbdsvr/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 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /modules/network/lwnbdsvr/lwnbdsvr.c: -------------------------------------------------------------------------------- 1 | 2 | #include "irx_imports.h" 3 | #include "nbd_server.h" 4 | #include "drivers/atad_d.h" 5 | 6 | #define MODNAME "lwnbdsvr" 7 | IRX_ID(MODNAME, 1, 1); 8 | static int nbd_tid; 9 | extern struct irx_export_table _exp_lwnbdsvr; 10 | 11 | //need to be global to be accessible from thread 12 | atad_driver hdd[2]; // could have 2 ATA disks 13 | nbd_context *nbd_contexts[10]; 14 | 15 | int i = 0; 16 | int _start(int argc, char **argv) 17 | { 18 | iop_thread_t nbd_thread; 19 | int ret, successed_exported_ctx = 0; 20 | 21 | if (argc > 1) { 22 | strcpy(gdefaultexport, argv[1]); 23 | printf("lwNBD: default export : %s\n", gdefaultexport); 24 | } 25 | 26 | for (i = 0; i < 2; i++) { 27 | ret = atad_ctor(&hdd[i], i); 28 | if (ret == 0) { 29 | nbd_contexts[successed_exported_ctx] = &hdd[i].super; 30 | successed_exported_ctx++; 31 | } 32 | } 33 | nbd_contexts[successed_exported_ctx] = NULL; 34 | 35 | if (!successed_exported_ctx) { 36 | printf("lwNBD: nothing to export.\n"); 37 | return -1; 38 | } 39 | 40 | printf("lwNBD: init %d exports.\n", successed_exported_ctx); 41 | 42 | // register exports 43 | RegisterLibraryEntries(&_exp_lwnbdsvr); 44 | 45 | nbd_thread.attr = TH_C; 46 | nbd_thread.thread = (void *)nbd_init; 47 | nbd_thread.priority = 0x10; 48 | nbd_thread.stacksize = 0x800; 49 | nbd_thread.option = 0; 50 | nbd_tid = CreateThread(&nbd_thread); 51 | 52 | // int StartThreadArgs(int thid, int args, void *argp); 53 | StartThread(nbd_tid, (struct nbd_context **)nbd_contexts); 54 | return MODULE_RESIDENT_END; 55 | } 56 | 57 | int _shutdown(void) 58 | { 59 | DeleteThread(nbd_tid); 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /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 ../../Rules.make 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_socket 13 | I_lwip_connect 14 | I_lwip_bind 15 | I_lwip_send 16 | I_lwip_sendto 17 | I_lwip_recv 18 | I_lwip_close 19 | I_lwip_shutdown 20 | ps2ip_IMPORTS_end 21 | 22 | sifcmd_IMPORTS_start 23 | I_sceSifSetRpcQueue 24 | I_sceSifRegisterRpc 25 | I_sceSifRpcLoop 26 | sifcmd_IMPORTS_end 27 | 28 | stdio_IMPORTS_start 29 | I_printf 30 | stdio_IMPORTS_end 31 | 32 | sysclib_IMPORTS_start 33 | I_memset 34 | I_memcpy 35 | I_strcpy 36 | I_strcmp 37 | sysclib_IMPORTS_end 38 | 39 | thbase_IMPORTS_start 40 | I_GetThreadId 41 | I_CreateThread 42 | I_DeleteThread 43 | I_StartThread 44 | I_SleepThread 45 | I_DelayThread 46 | I_WakeupThread 47 | I_iWakeupThread 48 | I_SetAlarm 49 | I_CancelAlarm 50 | I_ReferThreadStatus 51 | thbase_IMPORTS_end 52 | -------------------------------------------------------------------------------- /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/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 ../../Rules.make 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_pbuf_free 30 | I_netif_add 31 | I_netif_set_default 32 | I_ps2ip_input 33 | I_etharp_output 34 | I_inet_addr 35 | I_tcpip_input 36 | ps2ip_IMPORTS_end 37 | 38 | dev9_IMPORTS_start 39 | I_dev9IntrEnable 40 | I_dev9IntrDisable 41 | I_dev9RegisterIntrCb 42 | I_dev9RegisterPreDmaCb 43 | I_dev9RegisterPostDmaCb 44 | I_dev9DmaTransfer 45 | I_dev9GetEEPROM 46 | dev9_IMPORTS_end 47 | -------------------------------------------------------------------------------- /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 ../../Rules.make 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_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%) 22 | 23 | IOP_CFLAGS += -DUSE_SMSUTILS 24 | IOP_INCS += -I../../include/ 25 | 26 | include $(PS2SDK)/Defs.make 27 | include ../Rules.bin.make 28 | include ../Rules.make 29 | -------------------------------------------------------------------------------- /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_GetLoadcoreInternalData 5 | I_QueryLibraryEntryTable 6 | I_SetRebootTimeLibraryHandlingMode 7 | loadcore_IMPORTS_end 8 | 9 | stdio_IMPORTS_start 10 | I_printf 11 | stdio_IMPORTS_end 12 | 13 | thsemap_IMPORTS_start 14 | I_CreateSema 15 | I_SignalSema 16 | I_WaitSema 17 | I_PollSema 18 | I_DeleteSema 19 | I_iSignalSema 20 | thsemap_IMPORTS_end 21 | 22 | thbase_IMPORTS_start 23 | I_StartThread 24 | I_CreateThread 25 | I_DeleteThread 26 | I_DelayThread 27 | I_GetThreadId 28 | I_SleepThread 29 | I_WakeupThread 30 | I_TerminateThread 31 | I_SetAlarm 32 | I_CancelAlarm 33 | thbase_IMPORTS_end 34 | 35 | intrman_IMPORTS_start 36 | I_CpuSuspendIntr 37 | I_CpuResumeIntr 38 | intrman_IMPORTS_end 39 | 40 | usbd_IMPORTS_start 41 | I_sceUsbdScanStaticDescriptor 42 | I_sceUsbdOpenPipe 43 | I_sceUsbdClosePipe 44 | I_sceUsbdOpenPipeAligned 45 | I_sceUsbdSetPrivateData 46 | I_sceUsbdTransferPipe 47 | I_sceUsbdRegisterLdd 48 | usbd_IMPORTS_end 49 | 50 | sysclib_IMPORTS_start 51 | I_strncmp 52 | #ifndef USE_SMSUTILS 53 | I_memset 54 | I_memcpy 55 | #endif 56 | sysclib_IMPORTS_end 57 | 58 | #ifdef USE_SMSUTILS 59 | smsutils_IMPORTS_start 60 | I_mips_memset 61 | I_mips_memcpy 62 | smsutils_IMPORTS_end 63 | #endif 64 | -------------------------------------------------------------------------------- /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 | #include "stdbool.h" 2 | #include "types.h" 3 | 4 | #include "ds34common.h" 5 | 6 | enum PadMacroAxes { 7 | PadMacroAxisLX = 0, 8 | PadMacroAxisLY = 1, 9 | PadMacroAxisRX = 2, 10 | PadMacroAxisRY = 3, 11 | }; 12 | 13 | /** 14 | * Initialize macro settings 15 | * @param padMacroSettings Settings passed from the config 16 | */ 17 | void padMacroInit(u32 padMacroSettings); 18 | 19 | /** 20 | * React to button presses so the macro settings can be changed 21 | * @param rep DS2 controller report 22 | * @param special_button Is the "special button" pressed (e.g. PS button on DS3 controller) 23 | * @return true if the internal state of PadMacro was changed 24 | */ 25 | bool padMacroPerform(struct ds2report *rep, bool special_button); 26 | -------------------------------------------------------------------------------- /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/usb/usbhdfsdfsv/usbhdfsdfsv.irx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/modules/usb/usbhdfsdfsv/usbhdfsdfsv.irx -------------------------------------------------------------------------------- /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 ../../Rules.make 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 | ioman_IMPORTS_start 6 | I_DelDrv 7 | I_AddDrv 8 | I_open 9 | I_lseek 10 | I_write 11 | I_close 12 | I_remove 13 | ioman_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 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_DeleteThread 50 | I_TerminateThread 51 | I_ExitDeleteThread 52 | thbase_IMPORTS_end 53 | 54 | #ifdef DEBUG 55 | stdio_IMPORTS_start 56 | I_printf 57 | stdio_IMPORTS_end 58 | #endif 59 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /ps2-packer/lzma-packer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/ps2-packer/lzma-packer.so -------------------------------------------------------------------------------- /ps2-packer/stub/lzma-1d00-stub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/ps2-packer/stub/lzma-1d00-stub -------------------------------------------------------------------------------- /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 ((ret = ethLoadInitModules()) != 0) 21 | return -1; 22 | 23 | #ifdef __DECI2_DEBUG 24 | ret = sysLoadModuleBuffer(&drvtif_irx, size_drvtif_irx, 0, NULL); 25 | if (ret < 0) 26 | return -8; 27 | 28 | ret = sysLoadModuleBuffer(&tifinet_irx, size_tifinet_irx, 0, NULL); 29 | if (ret < 0) 30 | return -9; 31 | #else 32 | ret = sysLoadModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL); 33 | if (ret < 0) 34 | return -8; 35 | 36 | ret = sysLoadModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL); 37 | if (ret < 0) 38 | return -9; 39 | 40 | ret = sysLoadModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL); 41 | if (ret < 0) 42 | return -10; 43 | #endif 44 | #endif 45 | 46 | modulesLoaded = 1; 47 | 48 | return 0; 49 | } 50 | 51 | void debugApplyConfig(void) 52 | { 53 | #ifndef _DTL_T10000 54 | if (modulesLoaded) 55 | ethApplyConfig(); 56 | #endif 57 | } 58 | -------------------------------------------------------------------------------- /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 unsigned 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/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/PoeVeticaNew.ttf -------------------------------------------------------------------------------- /thirdparty/font_Arabic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Arabic.ttf -------------------------------------------------------------------------------- /thirdparty/font_Bulgarian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Bulgarian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Croatian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Croatian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Czech.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Czech.ttf -------------------------------------------------------------------------------- /thirdparty/font_Danish.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Danish.ttf -------------------------------------------------------------------------------- /thirdparty/font_Dutch.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Dutch.ttf -------------------------------------------------------------------------------- /thirdparty/font_Filipino.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Filipino.ttf -------------------------------------------------------------------------------- /thirdparty/font_French.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_French.ttf -------------------------------------------------------------------------------- /thirdparty/font_German.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_German.ttf -------------------------------------------------------------------------------- /thirdparty/font_Greek.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Greek.ttf -------------------------------------------------------------------------------- /thirdparty/font_Hebrew.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Hebrew.ttf -------------------------------------------------------------------------------- /thirdparty/font_Hungarian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Hungarian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Indonesian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Indonesian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Italian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Italian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Japanese.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Japanese.otf -------------------------------------------------------------------------------- /thirdparty/font_Korean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Korean.ttf -------------------------------------------------------------------------------- /thirdparty/font_Laotian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Laotian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Norvegian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Norvegian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Persian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Persian.ttf -------------------------------------------------------------------------------- /thirdparty/font_Polish.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Polish.ttf -------------------------------------------------------------------------------- /thirdparty/font_Portuguese.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Portuguese.ttf -------------------------------------------------------------------------------- /thirdparty/font_Portuguese_BR.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Portuguese_BR.ttf -------------------------------------------------------------------------------- /thirdparty/font_Romana.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Romana.otf -------------------------------------------------------------------------------- /thirdparty/font_Russian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Russian.ttf -------------------------------------------------------------------------------- /thirdparty/font_SChinese.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_SChinese.ttf -------------------------------------------------------------------------------- /thirdparty/font_Spanish.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Spanish.ttf -------------------------------------------------------------------------------- /thirdparty/font_Swedish.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Swedish.ttf -------------------------------------------------------------------------------- /thirdparty/font_TChinese.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_TChinese.ttf -------------------------------------------------------------------------------- /thirdparty/font_Thai.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Thai.ttf -------------------------------------------------------------------------------- /thirdparty/font_Turkish.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Turkish.ttf -------------------------------------------------------------------------------- /thirdparty/font_Vietnamese.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SvenGDK/Open-PS2-Loader/b7e6498143c6f8a7aff544cd13c57564d7cb1255/thirdparty/font_Vietnamese.ttf --------------------------------------------------------------------------------