Skip to content

Commit 297f7b7

Browse files
authored
Merge pull request #450 from uyjulian/ioman_add
Add ioman module
2 parents 3369c4a + 0a6cc92 commit 297f7b7

File tree

7 files changed

+723
-0
lines changed

7 files changed

+723
-0
lines changed

iop/system/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ SUBDIRS = \
1313
eesync-nano \
1414
threadman \
1515
timrman \
16+
ioman \
1617
iomanx \
1718
iopmgr \
1819
loadfile \

iop/system/ioman/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# _____ ___ ____ ___ ____
2+
# ____| | ____| | | |____|
3+
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
4+
#-----------------------------------------------------------------------
5+
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
6+
# Licenced under Academic Free License version 2.0
7+
# Review ps2sdk README & LICENSE files for further details.
8+
9+
IOP_BIN ?= ioman.irx
10+
11+
IOP_OBJS = ioman.o exports.o imports.o
12+
13+
include $(PS2SDKSRC)/Defs.make
14+
include $(PS2SDKSRC)/iop/Rules.bin.make
15+
include $(PS2SDKSRC)/iop/Rules.make
16+
include $(PS2SDKSRC)/iop/Rules.release

iop/system/ioman/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# I/O Manager
2+
3+
This is an implementation of `ioman` for reference purposes only. You probably want to use `iomanx`, which is an extended version of this module, instead.
4+
5+
## How to use this module in your program
6+
7+
In order to use this module in your program, you must integrate the module into
8+
an IOPRP image, then load the image with `UDNL`.\
9+
Using `LoadModule` or `LoadModuleBuffer` directly will not work, because the
10+
module is already loaded at IOP boot.

iop/system/ioman/src/exports.tab

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
DECLARE_EXPORT_TABLE(ioman, 1, 1)
3+
DECLARE_EXPORT(_start)
4+
DECLARE_EXPORT(_retonly)
5+
DECLARE_EXPORT(_retonly)
6+
DECLARE_EXPORT(_retonly)
7+
8+
DECLARE_EXPORT(io_open)
9+
/*05*/ DECLARE_EXPORT(io_close)
10+
DECLARE_EXPORT(io_read)
11+
DECLARE_EXPORT(io_write)
12+
DECLARE_EXPORT(io_lseek)
13+
DECLARE_EXPORT(io_ioctl)
14+
/*10*/ DECLARE_EXPORT(io_remove)
15+
DECLARE_EXPORT(io_mkdir)
16+
DECLARE_EXPORT(io_rmdir)
17+
DECLARE_EXPORT(io_dopen)
18+
DECLARE_EXPORT(io_dclose)
19+
/*15*/ DECLARE_EXPORT(io_dread)
20+
DECLARE_EXPORT(io_getstat)
21+
DECLARE_EXPORT(io_chstat)
22+
DECLARE_EXPORT(io_format)
23+
DECLARE_EXPORT(_retonly)
24+
/*20*/ DECLARE_EXPORT(io_AddDrv)
25+
DECLARE_EXPORT(io_DelDrv)
26+
DECLARE_EXPORT(_retonly)
27+
DECLARE_EXPORT(_retonly)
28+
DECLARE_EXPORT(_retonly)
29+
END_EXPORT_TABLE
30+
31+
void _retonly() {}

iop/system/ioman/src/imports.lst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
sysmem_IMPORTS_start
3+
I_Kprintf
4+
sysmem_IMPORTS_end
5+
6+
loadcore_IMPORTS_start
7+
I_RegisterLibraryEntries
8+
I_FlushIcache
9+
loadcore_IMPORTS_end
10+
11+
sysclib_IMPORTS_start
12+
I_memset
13+
I_strcmp
14+
I_index
15+
I_strlen
16+
I_strncpy
17+
I_strtol
18+
sysclib_IMPORTS_end
19+
20+
intrman_IMPORTS_start
21+
I_CpuSuspendIntr
22+
I_CpuResumeIntr
23+
intrman_IMPORTS_end

0 commit comments

Comments
 (0)