File tree Expand file tree Collapse file tree 6 files changed +115
-0
lines changed
Expand file tree Collapse file tree 6 files changed +115
-0
lines changed Original file line number Diff line number Diff line change 88
99SUBDIRS = \
1010 alloc \
11+ boardinf \
1112 dmacman \
1213 eeconf \
1314 eesync \
Original file line number Diff line number Diff line change 1+ # _____ ___ ____ ___ ____
2+ # ____| | ____| | | |____|
3+ # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
4+ # -----------------------------------------------------------------------
5+ # Copyright 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_INCS += \
10+ -I$(PS2SDKSRC ) /iop/system/loadcore/include
11+
12+ IOP_OBJS = \
13+ boardinf.o \
14+ imports.o
15+
16+ include $(PS2SDKSRC ) /Defs.make
17+ include $(PS2SDKSRC ) /iop/Rules.bin.make
18+ include $(PS2SDKSRC ) /iop/Rules.make
19+ include $(PS2SDKSRC ) /iop/Rules.release
Original file line number Diff line number Diff line change 1+ # Board information module
2+
3+ This module registers boot modes 6 and 7 to values related to DTL-T boards.
4+
5+ ## Configurations
6+
7+ There are multiple configurations of this library, allowing the choice of
8+ balancing between size, speed, and features.
9+
10+ * ` boardinf ` -> The recommended version.
11+
12+ ## How to use this module in your program
13+
14+ In order to use this module in your program, you must integrate the module into
15+ an IOPRP image, then load the image with ` UDNL ` .\
16+ Using ` LoadModule ` or ` LoadModuleBuffer ` directly will not work, because the
17+ module is already loaded at IOP boot.
Original file line number Diff line number Diff line change 1+ /*
2+ # _____ ___ ____ ___ ____
3+ # ____| | ____| | | |____|
4+ # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5+ #-----------------------------------------------------------------------
6+ # Copyright 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+
11+ #include "irx_imports.h"
12+
13+ #include "iop_mmio_hwport.h"
14+
15+ // Based on the module from SDK 3.1.0.
16+
17+ int _start (int ac , char * * av )
18+ {
19+ u16 bootmode_7_val ;
20+ USE_IOP_MMIO_HWPORT ();
21+
22+ (void )av ;
23+ if ( ac > 0 )
24+ {
25+ return 1 ;
26+ }
27+ {
28+ u32 bootmode_tmp [1 ];
29+
30+ bootmode_tmp [0 ] = (iop_mmio_hwport -> exp2_r2 [4612 ] & 0xFFFF ) | 0x60000 ;
31+ RegisterBootMode ((iop_bootmode_t * )bootmode_tmp );
32+ }
33+ switch ( iop_mmio_hwport -> exp2_r2 [4612 ] & 0xF8 )
34+ {
35+ case 0 :
36+ case 16 :
37+ case 32 :
38+ case 48 :
39+ bootmode_7_val = 0x00C8 ;
40+ break ;
41+ case 64 :
42+ case 80 :
43+ bootmode_7_val = 0x012C ;
44+ break ;
45+ default :
46+ bootmode_7_val = 0x0126 ;
47+ break ;
48+ }
49+ {
50+ u32 bootmode_tmp [1 ];
51+
52+ bootmode_tmp [0 ] = (bootmode_7_val & 0xFFFF ) | 0x70000 ;
53+ RegisterBootMode ((iop_bootmode_t * )bootmode_tmp );
54+ }
55+ return 1 ;
56+ }
Original file line number Diff line number Diff line change 1+
2+ loadcore_IMPORTS_start
3+ I_RegisterBootMode
4+ loadcore_IMPORTS_end
Original file line number Diff line number Diff line change 1+ /*
2+ # _____ ___ ____ ___ ____
3+ # ____| | ____| | | |____|
4+ # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5+ #-----------------------------------------------------------------------
6+ # Copyright 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+
11+ #ifndef IOP_IRX_IMPORTS_H
12+ #define IOP_IRX_IMPORTS_H
13+
14+ #include <irx.h>
15+
16+ #include <loadcore.h>
17+
18+ #endif /* IOP_IRX_IMPORTS_H */
You can’t perform that action at this time.
0 commit comments