mirror of https://github.com/PCSX2/pcsx2.git
Make fps2bios compilable with latest PS2 toolchain
This commit is contained in:
parent
500d2e076d
commit
607e01690c
|
@ -0,0 +1,5 @@
|
|||
*.o
|
||||
EXTINFO
|
||||
ROMDIR
|
||||
build
|
||||
*.map
|
|
@ -1,54 +1,44 @@
|
|||
#
|
||||
#
|
||||
|
||||
all: ps2romgen_exe romdir_exe romver_exe fps2bios
|
||||
|
||||
VERSION = 0
|
||||
BUILD = 1
|
||||
BUILD = 1
|
||||
|
||||
CC = gcc
|
||||
RM = rm -f
|
||||
STRIP = strip
|
||||
|
||||
OPTIMIZE = -O2 -fomit-frame-pointer -finline-functions -ffast-math
|
||||
CFLAGS = -Wall ${OPTIMIZE} -I.
|
||||
CFLAGS = -Wall -O2 -I.
|
||||
DIRS = kernel intro loader
|
||||
FILES = RESET ROMDIR ROMVER IOPBOOT EELOAD \
|
||||
SYSMEM LOADCORE EXCEPMAN INTRMAN SSBUSC DMACMAN \
|
||||
TIMRMAN SYSCLIB HEAPLIB THREADMAN VBLANK STDIO \
|
||||
SIFMAN SIFCMD SIO2MAN LOADER INTRO IOPBTCONF FP2BLOGO
|
||||
|
||||
ps2romgen_exe: ps2romgen.o
|
||||
${CC} ${CFLAGS} ps2romgen.o -o build/ps2romgen_exe
|
||||
.PHONY: clean
|
||||
|
||||
romdir_exe: romdir.o
|
||||
${CC} ${CFLAGS} romdir.o -o build/romdir_exe
|
||||
|
||||
romver_exe: romver.o
|
||||
${CC} ${CFLAGS} romver.o -o build/romver_exe
|
||||
|
||||
fps2bios:
|
||||
build/fps2bios: build/ps2romgen_exe build/romdir_exe build/romver_exe | build
|
||||
for i in $(DIRS); do \
|
||||
(cd $$i; make; cd ..) \
|
||||
make -C $$i; \
|
||||
done;
|
||||
cp -f FP2BLOGO build
|
||||
cp -f IOPBTCONF build/
|
||||
cp -f IOPBTCONF build
|
||||
(cd build; \
|
||||
./romver_exe $(VERSION) $(BUILD); \
|
||||
./romdir_exe $(FILES); \
|
||||
./ps2romgen_exe fps2bios; \
|
||||
cd ..)
|
||||
cp build/fps2bios ../bin/bios
|
||||
|
||||
.PHONY: clean ps2romgen_exe romdir_exe fps2bios
|
||||
build/ps2romgen_exe: ps2romgen.c | build
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
build/romdir_exe: romdir.c | build
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
build/romver_exe: romver.c | build
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
build:
|
||||
mkdir -p $@
|
||||
|
||||
clean:
|
||||
${RM} *.o build/*
|
||||
rm -f -r *.o build
|
||||
for i in $(DIRS); do \
|
||||
(cd $$i; make clean; cd ..) \
|
||||
make -C $$i clean; \
|
||||
done;
|
||||
|
||||
%.o: %.c
|
||||
${CC} ${CFLAGS} -c -o $@ $<
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# Free PS2 BIOS (fps2bios)
|
||||
|
||||
An open source (but "unfree" because of no licenses) and incomplete implementation of the PS2's boot ROM.
|
||||
Requires latest PS2 toolchain from https://github.com/ps2dev/ps2toolchain
|
||||
This, currently, does not work as a full replacement for the PS2's boot ROM.
|
Binary file not shown.
|
@ -0,0 +1,199 @@
|
|||
This is a collection of notes which should help anyone looking at the PS2 BIOS. The goal is to fully document the public interface so that a free (GPL) replacement BIOS can be developed for use in emulators such as PCSX2. Where source code examples are given, these refer to the fps2bios source code and not to any original Sony code. The information contained in here has been collected from a number of sources but the main sources are the PCSX2 source code which documents the machine hardware and the open source ps2sdk found at ps2dev.org.
|
||||
|
||||
The PS2 BIOS is a collection of files packed into a single file. A file called ROMDIR contains the name and size of each file in the archive. The first file in the archive is called RESET and contains a minimal boot program. The ROMDIR structure is found by looking for the character sequence RESET from the start of the BIOS
|
||||
|
||||
# The boot process
|
||||
|
||||
The BIOS file is initialized to the memory address 0xBFC00000. The program counter is set to this address and execution started. This is true for both the EE and IOP and so the first few lines of code need to figure out which CPU is currently executing and branch to the relevant initialization code. This code is contained in kernel/start.c. The files kernel/eestart.c and kernel/iopstart.c contain the boot code for the EE and IOP respectively
|
||||
|
||||
# The IOP boot process
|
||||
|
||||
The IOP boot code is stored in kernel/iopstart.c. This locates the file IOPLOAD in the BIOS image and loads it to the memory address 0x80000000. It then executes the code at 0x80001000. The directory kernel/iopload contains all of the IOP releated BIOS code. Note the linkfile in this directory – this is required to enforce the magic numbers described above. It makes sure that the iopirq.o object is linked at the address 0x80000000 and that iopload is linked starting at 0x80001000.
|
||||
|
||||
The boot code found at 0x80001000 is _start() located in iopload.c. This loads the SYSMEM file from the BIOS image and executes its defined entry point. The LOADCORE file is then loaded and its entry point executed. When the LOADCORE entry point returns, the IOP enters an endless loop waiting for an exception.
|
||||
|
||||
# IRX linking
|
||||
|
||||
The LOADCORE module is responsible mainly for managing the dynamic link relationship between IRX modules. An IRX module is a dynamically linked module – it both exports and imports functions in addition to having an execution entry point. IRX dynamic linking is ordinal based rather than symbolic and, as the public interface is defined by the function export table, this makes figuring it out quite complex. Fortunately, some games have been distributed with debugging symbols and thus this allows us to associate symbolic names with the export ordinals.
|
||||
|
||||
The IRX export table is defined as follows:
|
||||
|
||||
```
|
||||
struct irx_export_table {
|
||||
u32 magic;
|
||||
struct irx_export_table *next;
|
||||
u16 version;
|
||||
u16 mode;
|
||||
u8 name[8];
|
||||
void *fptrs[0];
|
||||
};
|
||||
```
|
||||
|
||||
Where magic is `0x41c00000` and fptrs is a list of exported functions terminated by a NULL entry.
|
||||
|
||||
The IRX import table definition is very similar.
|
||||
|
||||
```
|
||||
struct irx_import_table
|
||||
{
|
||||
u32 magic;
|
||||
struct irx_import_table *next;
|
||||
u16 version;
|
||||
u16 mode;
|
||||
char name[8];
|
||||
void *stubs[0];
|
||||
}
|
||||
```
|
||||
|
||||
The magic number for the import table is `0x41e00000` and in the same manner as the export table, the stubs list is NULL terminated. An IRX will contain an import table for each module (IRX) that it needs to link with.
|
||||
|
||||
To give a concrete example, an IRX that wants to import the `GetLibraryEntryTable` function from the LOADCORE module, could define the import table as follows:
|
||||
|
||||
```
|
||||
loadcore_stub:
|
||||
.word 0x41e00000
|
||||
.word 0
|
||||
.word 0x00000101
|
||||
.ascii "loadcore"
|
||||
.align 2
|
||||
|
||||
.globl GetLibraryEntryTable # 0x03
|
||||
GetLibraryEntryTable:
|
||||
j $31
|
||||
li $0, 3
|
||||
|
||||
.word 0
|
||||
.word 0
|
||||
```
|
||||
|
||||
The label `GetLibraryEntryTable` does not define the linkage itself – this is done by the number (or ordinal) 3. The `li $0, 3` instruction defines that this entry should be linked to the 3rd function exported by the loadcore export table. The function of the LOADCORE module is to resolve the import stub functions with the export tables from the other IRX modules that have been previously registered. It does this by modifying the import table and changing the `j $31` to a `j imm` instruction where imm is the relative address of the exported function.
|
||||
|
||||
The LOADCORE code that actually does the linking is in `fix_imports()` and is shown below:
|
||||
|
||||
```
|
||||
int fix_imports(struct import *imp, struct export *exp){
|
||||
func *ef;
|
||||
struct func_stub *fs;
|
||||
int count=0;
|
||||
|
||||
for (ef=exp->func; *ef; ef++){
|
||||
count++; //count number of exported functions
|
||||
}
|
||||
for (fs=imp->func; fs->jr_ra; fs++) {
|
||||
int ordinal = fs->addiu0 & 0xFFFF;
|
||||
if (ordinal < count) {
|
||||
fs->jr_ra=(((u32)exp->func[ordinal]>>2) & 0x3FFFFFF) | INS_J;
|
||||
} else {
|
||||
fs->jr_ra=INS_JR_RA;
|
||||
}
|
||||
}
|
||||
imp->flags |=FLAG_IMPORT_QUEUED;
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
# Module loading
|
||||
|
||||
The first 2 modules loaded are SYSMEM and LOADCORE. After these have been successfully loaded, the remaining modules are loaded in the order specified in iopload.c. The IRX dynamic linking mechanism is very simple and does not account for forward references, so this list must be carefully ordered. Details of the individual modules follow.
|
||||
|
||||
# The Exception Manager (EXCEPMAN – version 1.1)
|
||||
|
||||
The exception manager is the 3rd module loaded and as the name suggests is responsible for managing the exception handling code. It does not actually implement any of the exception routines but rather provides the plumbing to allow other modules to register exception handlers and to provide for exception handlers to be chained together in priority order.
|
||||
|
||||
The Exception Manager maintains an array of 16 pointers (one for each of the 16 possible exceptions) starting at address 0x0440. This address should be an implementation detail but it is used by some modules and so effectively is part of the public interface.
|
||||
|
||||
|Ordinal|Function Definition |
|
||||
|-------|-----------------------------------------------------------------------------------------|
|
||||
|`0x00` |`void _start()` |
|
||||
|`0x01` |`int excepman_reinit()` |
|
||||
|`0x02` |`int excepman_deinit()` |
|
||||
|`0x03` |`void *GetExHandlersTable()` |
|
||||
|`0x04` |`int RegisterExceptionHandler(int code, struct exHandler *handler)` |
|
||||
|`0x05` |`int RegisterPriorityExceptionHandler(int code, int priority, struct exHandler *handler)`|
|
||||
|`0x06` |`int RegisterDefaultExceptionHandler(struct exHandler *handler)` |
|
||||
|`0x07` |`int ReleaseExceptionHandler(int code, struct exHandler *handler)` |
|
||||
|`0x08` |`int ReleaseDefaultExceptionHandler(struct exHandler *handler)` |
|
||||
|
||||
# The Interrupt Manager (INTRMAN – version 1.2)
|
||||
|
||||
The interrupt manager builds upon the services of the exception manager. Its main task is to service the interrupt exception and to call the correct interrupt service for the current interrupt. It installs an exception handler for exception code 0 (interrupt) and exception code 8 (syscall exception). It also deals with context switching of the stack which is used by the thread manager.
|
||||
The interrupt table is located directly after the exception table (so starting at 0x0480) – but I don’t think this is important for the public interface.
|
||||
|
||||
|Ordinal|Function Definition |
|
||||
|-------|---------------------------------------------------------------------------------|
|
||||
|`0x00` |`void _start()` |
|
||||
|`0x01` |`int intrmanDeinit()` |
|
||||
|`0x02` | |
|
||||
|`0x03` | |
|
||||
|`0x04` |`int RegisterIntrHandler(int interrupt, int mode, intrh_func handler, void *arg)`|
|
||||
|`0x05` |`int ReleaseIntrHandler(int interrupt)` |
|
||||
|`0x06` |`int EnableIntr(int interrupt)` |
|
||||
|`0x07` |`int DisableIntr(int interrupt, int *oldstat)` |
|
||||
|`0x08` |`int CpuDisableIntr()` |
|
||||
|`0x09` |`int CpuEnableIntr()` |
|
||||
|`0x0A` |`void intrman_syscall_04()` |
|
||||
|`0x0B` |`void intrman_syscall_08()` |
|
||||
|`0x0C` |`int CpuGetICTRL()` |
|
||||
|`0x0D` |`int CpuEnableICTRL()` |
|
||||
|`0x0E` |`void intrman_syscall_0C()` |
|
||||
|`0x0F` | |
|
||||
|`0x10` | |
|
||||
|`0x11` |`int CpuSuspendIntr(u32 *ictrl)` |
|
||||
|`0x12` |`int CpuResumeIntr(u32 ictrl)` |
|
||||
|`0x13` |`int CpuSuspendIntr(u32 *ictrl)` |
|
||||
|`0x14` |`int CpuResumeIntr(u32 ictrl)` |
|
||||
|`0x15` |`void intrman_syscall_10()` |
|
||||
|`0x16` |`void intrman_syscall_14()` |
|
||||
|`0x17` |`int QueryIntrContext()` |
|
||||
|`0x18` |`int QueryIntrStack(int stack_pointer)` |
|
||||
|`0x19` |`int iCatchMultiIntr()` |
|
||||
|`0x1A` |`void retonly()` |
|
||||
|`0x1B` | |
|
||||
|`0x1C` |`void SetCtxSwitchHandler(func handler)` |
|
||||
|`0x1D` |`func ResetCtxSwitchHandler()` |
|
||||
|`0x1E` |`void SetCtxSwitchReqHandler(func handler)` |
|
||||
|`0x1F` |`func ResetCtxSwitchReqHandler()` |
|
||||
|
||||
# Stack frame layout
|
||||
|
||||
The interrupt manager also handles the management of the stackframe when context switching between threads. The stack frame is a reserved area on the stack that is large enough to hold the entire processor state. This enables the processor state to be saved and restored between interrupts and context switches. For performance reasons, the entire state is not always stored – an interrupt can define via the mode setting what processor registers it will not preserve and so need saving.
|
||||
The stack frame contains a status field which defines how much of it is currently valid so that incremental saving and restoring from it can be achieved. In general, the layout of the stack frame could (and should) be considered as private to the interrupt manager. Given that it is exposed publicly though and the information is available to games, it is documented below.
|
||||
|
||||
|Offset|Stored value | | | | |
|
||||
|------|----------------------|----------------------|----------------------|----------------------|------------|
|
||||
|`0x00`|`FrameID` |`0xAC0000FE Mode = 0`|`0xFF00FFFE Mode = 1`|`0xFFFFFFFE Mode = 2`|`0xF0FF000C`|
|
||||
|`0x04`|`AT ($1)` |x |x |x | |
|
||||
|`0x08`|`V0 ($2)` |x |x |x |x |
|
||||
|`0x0C`|`V1 ($3)` |x |x |x |x |
|
||||
|`0x10`|`A0 ($4)` |x |x |x |x |
|
||||
|`0x14`|`A1 ($5)` |x |x |x |x |
|
||||
|`0x18`|`A2 ($6)` |x |x |x |x |
|
||||
|`0x1C`|`A3 ($7)` |x |x |x |x |
|
||||
|`0x20`|`T0 ($8)` | |x |x | |
|
||||
|`0x24`|`T1 ($9)` | |x |x | |
|
||||
|`0x28`|`T2 ($10)` | |x |x | |
|
||||
|`0x2C`|`T3 ($11)` | |x |x | |
|
||||
|`0x30`|`T4 ($12)` | |x |x | |
|
||||
|`0x34`|`T5 ($13)` | |x |x | |
|
||||
|`0x38`|`T6 ($14)` | |x |x | |
|
||||
|`0x3C`|`T7 ($15)` | |x |x | |
|
||||
|`0x40`|`S0 ($16)` | | |x | |
|
||||
|`0x44`|`S1 ($17)` | | |x |x |
|
||||
|`0x48`|`S2 ($18)` | | |x |x |
|
||||
|`0x4C`|`S3 ($19)` | | |x |x |
|
||||
|`0x50`|`S4 ($20)` | | |x |x |
|
||||
|`0x54`|`S5 ($21)` | | |x |x |
|
||||
|`0x58`|`S6 ($22)` | | |x |x |
|
||||
|`0x5C`|`S7 ($23)` | | |x |x |
|
||||
|`0x60`|`T8 ($24)` | |x |x | |
|
||||
|`0x64`|`T9 ($25)` | |x |x | |
|
||||
|`0x68`|`Unused (k0)` | | | | |
|
||||
|`0x6C`|`Unused (k1)` | | | | |
|
||||
|`0x70`|`GP` | |x |x | |
|
||||
|`0x74`|`SP` |x |x |x |x |
|
||||
|`0x78`|`FP` | |x |x |x |
|
||||
|`0x7C`|`RA` |x |x |x |x |
|
||||
|`0x80`|`HI` |x |x |x | |
|
||||
|`0x84`|`LO` |x |x |x | |
|
||||
|`0x88`|`COP0 STATUS` |x |x |x |x |
|
||||
|`0x8C`|`EPC before exception`|x |x |x |x |
|
|
@ -3,55 +3,21 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
INTRO_BIN = ../build/INTRO
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
EE_INCS += -Iinclude
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
EE_LIBS += -lmc -lpad -lc -lkernel -lm
|
||||
|
||||
EE_OBJS = intro.o eedebug.o crt0.o romdir.o
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles -G0 -D_EE
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: intro
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/ee/lib
|
||||
LDADD = -lmc -lpad -lc -lkernel -lm
|
||||
OBJECTS = intro.o eedebug.o crt0.o romdir.o
|
||||
DEST = ../build/INTRO
|
||||
|
||||
intro: $(OBJECTS)
|
||||
$(EELD) -T linkfile $(EECFLAGS) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $(DEST)
|
||||
|
||||
%.o: %.c
|
||||
$(EECC) $(EEINCLUDES) $(EECFLAGS) -o $@ -c $<
|
||||
|
||||
%.o: %.s
|
||||
$(EECC) $(EEINCLUDES) $(EECFLAGS) -o $@ -c $<
|
||||
|
||||
$(INTRO_BIN): $(EE_OBJS)
|
||||
$(EE_CC) -nostartfiles -Tlinkfile $(EE_CFLAGS) \
|
||||
-o $(INTRO_BIN) $(EE_OBJS) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(DEST)
|
||||
|
||||
|
||||
rm -f -r $(EE_OBJS) $(INTRO_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
|
|
|
@ -3,71 +3,37 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles -G0
|
||||
EEINCLUDES = -I. -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: start
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
OBJS = eestart.o iopstart.o start.o romdir.o
|
||||
DIRS = eeload iopload
|
||||
|
||||
start: $(OBJS)
|
||||
RESET_BIN = ../build/RESET
|
||||
|
||||
EE_INCS += -Iinclude
|
||||
|
||||
EE_OBJS = eestart.ee.o
|
||||
IOP_OBJS = iopstart.iop.o romdir.iop.o start.iop.o
|
||||
|
||||
all: $(RESET_BIN)
|
||||
for i in $(DIRS); do \
|
||||
(cd $$i; make; cd ..) \
|
||||
make -C $$i; \
|
||||
done;
|
||||
$(EELD) -Wl,--oformat,binary -T linkfile $(EECFLAGS) $(OBJS) -o ../build/RESET
|
||||
|
||||
iopstart.o: iopstart.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
eestart.o: eestart.c
|
||||
$(EECC) $(EEINCLUDES) $(EECFLAGS) -o $@ -c $<
|
||||
|
||||
romdir.o: romdir.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
start.o: start.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
$(RESET_BIN): $(EE_OBJS) $(IOP_OBJS)
|
||||
$(EE_CC) -Wl,--oformat,binary -Tlinkfile -nostartfiles $(EE_CFLAGS) \
|
||||
-o $(RESET_BIN) $(EE_OBJS) $(IOP_OBJS) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
|
||||
%.ee.o: %.c
|
||||
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
|
||||
|
||||
%.iop.o: %.c
|
||||
$(IOP_CC) $(IOP_CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
for i in $(DIRS); do \
|
||||
(cd $$i; make clean; cd ..) \
|
||||
make -C $$i clean; \
|
||||
done;
|
||||
rm -f $(OBJS) start
|
||||
|
||||
|
||||
rm -f -r $(RESET_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,59 +3,25 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
EELOAD_BIN = ../../build/EELOAD
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
EE_INCS += -Iinclude
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
EE_LIBS += -lmc -lpad -lc -lkernel
|
||||
|
||||
EE_OBJS = eeirq.o eedata.o eekernel.o eeinit.o eeload.o eeelf.o eedebug.o romdir.o
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles -G0 -D_EE --save-temps
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles
|
||||
IOPINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: eeload
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/ee/lib
|
||||
LDADD = -lmc -lpad -lc -lkernel
|
||||
OBJECTS = eeirq.o eedata.o eekernel.o eeinit.o eeload.o eeelf.o eedebug.o romdir.o
|
||||
|
||||
eeload: $(OBJECTS)
|
||||
$(EELD) -Wl,--oformat,binary,--Map,eeload.map -T linkfile $(EECFLAGS) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../build/EELOAD
|
||||
$(EELOAD_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
|
||||
$(EE_CC) -nostartfiles -Wl,--oformat,binary,--Map,eeload.map -Tlinkfile $(EE_CFLAGS) \
|
||||
-o $(EELOAD_BIN) $(EE_OBJS) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
|
||||
# restrict all but the kernel registers
|
||||
eeirq.o: eeirq.c
|
||||
$(EECC) $(EEINCLUDES) $(EECFLAGS) -ffixed-2 -ffixed-3 -ffixed-4 -ffixed-5 -ffixed-6 -ffixed-7 -ffixed-8 -ffixed-9 -ffixed-10 -ffixed-11 -ffixed-12 -ffixed-13 -ffixed-14 -ffixed-15 -ffixed-16 -ffixed-17 -ffixed-18 -ffixed-19 -ffixed-20 -ffixed-21 -ffixed-22 -ffixed-23 -ffixed-24 -ffixed-25 -fcall-used-26 -fcall-used-27 -ffixed-30 -o $@ -c $<
|
||||
%.o: %.c
|
||||
$(EECC) $(EEINCLUDES) $(EECFLAGS) -o $@ -c $<
|
||||
|
||||
$(EE_C_COMPILE) -ffixed-2 -ffixed-3 -ffixed-4 -ffixed-5 -ffixed-6 -ffixed-7 -ffixed-8 -ffixed-9 -ffixed-10 -ffixed-11 -ffixed-12 -ffixed-13 -ffixed-14 -ffixed-15 -ffixed-16 -ffixed-17 -ffixed-18 -ffixed-19 -ffixed-20 -ffixed-21 -ffixed-22 -ffixed-23 -ffixed-24 -ffixed-25 -fcall-used-26 -fcall-used-27 -ffixed-30 $< -c -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) eeload
|
||||
|
||||
|
||||
rm -f -r $(EELOAD_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -149,13 +149,13 @@
|
|||
#define SRInitVal 0x70030C13
|
||||
#define ConfigInitVal 0x73003
|
||||
|
||||
enum {
|
||||
THS_RUN = 0x01,
|
||||
THS_READY = 0x02,
|
||||
THS_WAIT = 0x04,
|
||||
THS_SUSPEND = 0x08,
|
||||
THS_DORMANT = 0x10,
|
||||
};
|
||||
//enum {
|
||||
#define THS_RUN 0x01
|
||||
#define THS_READY 0x02
|
||||
#define THS_WAIT 0x04
|
||||
#define THS_SUSPEND 0x08
|
||||
#define THS_DORMANT 0x10
|
||||
//};
|
||||
|
||||
typedef struct {
|
||||
u128 gpr[24]; // v0-t9 (skip r0,at,k0-ra)
|
||||
|
|
|
@ -3,65 +3,16 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: iopload
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -nostartfiles -L$(PS2LIB)/iop/lib
|
||||
LDADD =
|
||||
OBJECTS = romdir.o iopelf.o iopdebug.o
|
||||
DIRS = iopboot sysmem loadcore excepman intrman stdio timrman \
|
||||
dmacman sifman sifcmd ssbusc sysclib heaplib \
|
||||
vblank threadman sio2man
|
||||
|
||||
iopload: $(OBJECTS)
|
||||
for i in $(DIRS); do \
|
||||
(cd $$i; make; cd ..) \
|
||||
make -C $$i; \
|
||||
done;
|
||||
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
|
||||
clean:
|
||||
for i in $(DIRS); do \
|
||||
(cd $$i; make clean; cd ..) \
|
||||
make -C $$i clean; \
|
||||
done;
|
||||
rm -f $(OBJECTS)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,58 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/DMACMAN
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = dmacman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_sysmem.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: dmacman
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = dmacman.o ../iopdebug.o ../libkernel/iop_loadcore.o \
|
||||
../libkernel/iop_intrman.o ../libkernel/iop_sysmem.o
|
||||
|
||||
dmacman: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/DMACMAN
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,58 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/EXCEPMAN
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = excepman.o ../libkernel/iop_loadcore.o ex_handler.o ../iopdebug.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc -nostartfiles
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: excepman
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS =
|
||||
LDADD =
|
||||
OBJECTS = excepman.o ../libkernel/iop_loadcore.o ex_handler.o ../iopdebug.o
|
||||
|
||||
excepman: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/EXCEPMAN
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
|
||||
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/HEAPLIB
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = heaplib.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_sysmem.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: heaplib
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = heaplib.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_sysmem.o
|
||||
|
||||
heaplib: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/HEAPLIB
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,59 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/INTRMAN
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = int_handler.o intrman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_excepman.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O0 -g -fomit-frame-pointer -nostartfiles -G0 --save-temps
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: intrman
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = int_handler.o intrman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_excepman.o
|
||||
|
||||
intrman: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/INTRMAN
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.S
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,18 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOPBOOT_BIN = ../../../build/IOPBOOT
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = iopboot.o ../iopdebug.o ../iopelf.o ../romdir.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: iopboot
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -nostartfiles -L$(PS2LIB)/iop/lib
|
||||
LDADD =
|
||||
OBJECTS = iopboot.o ../iopdebug.o ../iopelf.o ../romdir.o
|
||||
|
||||
iopboot: $(OBJECTS)
|
||||
$(EELD) -Wl,--oformat,binary,--Map,iopboot.map -T linkfile $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/IOPBOOT
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
$(IOPBOOT_BIN): $(IOP_OBJS)
|
||||
$(EE_CC) -Wl,--oformat,binary,--Map,iopboot.map -T linkfile $(IOP_OBJS) -nostartfiles -o $(IOPBOOT_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOPBOOT_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/LOADCORE
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = loadcore.o ../iopdebug.o ../iopelf.o ../romdir.o ../libkernel/iop_sysmem.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: loadcore
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib
|
||||
LDADD =
|
||||
OBJECTS = loadcore.o ../iopdebug.o ../iopelf.o ../romdir.o ../libkernel/iop_sysmem.o
|
||||
|
||||
loadcore: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/LOADCORE
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -926,7 +926,7 @@ void loadcore_start(BOOT_PARAMS *pInitParams)
|
|||
if (params.pos)
|
||||
params.pos = (u32)AllocSysMemory(2, params.size, (void*)params.pos);
|
||||
|
||||
sp=(u32)alloca(0x10);
|
||||
sp=(u32)__builtin_alloca(0x10);
|
||||
s0 = (void**)((sp - 0xDF0) & 0x1FFFFF00);//=0x001ff100
|
||||
recursive_set_a2((int*)s0, (void*)(sp+0x10), 0x11111111);
|
||||
if ((u32)s0 < QueryMemSize())
|
||||
|
@ -934,7 +934,7 @@ void loadcore_start(BOOT_PARAMS *pInitParams)
|
|||
|
||||
if (params.udnlString){
|
||||
int v0 = lc_strlen(params.udnlString);
|
||||
int* v1 = (int*)alloca((v0 + 8 + 8) >> 3 << 3);
|
||||
int* v1 = (int*)__builtin_alloca((v0 + 8 + 8) >> 3 << 3);
|
||||
lc_memcpy_overlapping((char*)&v1[6], params.udnlString, v0+1);
|
||||
params.udnlString = (char*)&v1[6];
|
||||
v1[4] = 0x01050000;
|
||||
|
@ -943,12 +943,12 @@ void loadcore_start(BOOT_PARAMS *pInitParams)
|
|||
}
|
||||
|
||||
a2 = (params.numConfLines+1) * 4;
|
||||
s0 = alloca((a2 + 7) >> 3 << 3) + 0x10;
|
||||
s0 = __builtin_alloca((a2 + 7) >> 3 << 3) + 0x10;
|
||||
lc_memcpy_overlapping((char*)s0, (char*)params.moduleAddrs, a2); //0x30020
|
||||
|
||||
s1 = 0;
|
||||
params.moduleAddrs = (u32**)s0;
|
||||
s2 = (u32)alloca(params.numConfLines << 3) + 0x10;
|
||||
s2 = (u32)__builtin_alloca(params.numConfLines << 3) + 0x10;
|
||||
place = (u32*)s2;
|
||||
*place = 0;
|
||||
i = -1;
|
||||
|
|
|
@ -3,60 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/SIFCMD
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = sifcmd.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_sifman.o ../libkernel/iop_thbase.o ../libkernel/iop_thevent.o ../libkernel/iop_stdio.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: sifcmd
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = sifcmd.o ../iopdebug.o ../libkernel/iop_loadcore.o \
|
||||
../libkernel/iop_intrman.o ../libkernel/iop_sifman.o \
|
||||
../libkernel/iop_thbase.o ../libkernel/iop_thevent.o \
|
||||
../libkernel/iop_stdio.o
|
||||
|
||||
sifcmd: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/SIFCMD
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/SIFMAN
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = sifman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: sifman
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = sifman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
sifman: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/SIFMAN
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,61 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/SIO2MAN
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = sio2man.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_dmacman.o ../libkernel/iop_thbase.o ../libkernel/iop_thevent.o ../libkernel/iop_stdio.o ../libkernel/iop_sysclib.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc -nostartfiles
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: sio2man
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = sio2man.o ../iopdebug.o \
|
||||
../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o \
|
||||
../libkernel/iop_dmacman.o ../libkernel/iop_thbase.o \
|
||||
../libkernel/iop_thevent.o ../libkernel/iop_stdio.o \
|
||||
../libkernel/iop_sysclib.o
|
||||
|
||||
sio2man: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/SIO2MAN
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/SSBUSC
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = ssbusc.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: ssbusc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib
|
||||
LDADD =
|
||||
OBJECTS = ssbusc.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
ssbusc: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/SSBUSC
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,56 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/STDIO
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(NEWLIB)/include #-I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc -nostartfiles
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: stdio
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = stdio.o
|
||||
|
||||
stdio: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/STDIO
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
IOP_OBJS = stdio.o
|
||||
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
|
||||
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/SYSCLIB
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = sysclib.o ../iopdebug.o ../libkernel/iop_loadcore.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: sysclib
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib
|
||||
LDADD =
|
||||
OBJECTS = sysclib.o ../iopdebug.o ../libkernel/iop_loadcore.o
|
||||
|
||||
sysclib: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/SYSCLIB
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -299,7 +299,7 @@ char *rindex(const char *s, int c) {
|
|||
return strrchr(s, c);
|
||||
}
|
||||
|
||||
size_t strlen(const char *s) {
|
||||
int strlen (const char *s) {
|
||||
const char *start = s;
|
||||
|
||||
while (*s) s++;
|
||||
|
|
|
@ -3,55 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/SYSMEM
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: sysmem
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib
|
||||
LDADD =
|
||||
OBJECTS = sysmem.o
|
||||
|
||||
sysmem: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/SYSMEM
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
IOP_OBJS = sysmem.o
|
||||
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
|
||||
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/THREADMAN
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = threadman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: threadman
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = threadman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
threadman: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/THREADMAN
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,57 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/TIMRMAN
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = timrman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: timrman
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/iop/lib -L$(NEWLIB)/lib
|
||||
LDADD =
|
||||
OBJECTS = timrman.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o
|
||||
|
||||
timrman: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/TIMRMAN
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -3,59 +3,17 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
IOP_BIN = ../../../build/VBLANK
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
IOP_INCS += -I../include
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
IOP_OBJS = vblank.o ../iopdebug.o ../libkernel/iop_loadcore.o ../libkernel/iop_intrman.o ../libkernel/iop_sysclib.o ../libkernel/iop_thbase.o ../libkernel/iop_thevent.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include
|
||||
|
||||
IOPCFLAGS = -O2 -fomit-frame-pointer -nostartfiles -G0
|
||||
IOPINCLUDES = -I. -I../include -I$(PS2LIB)/common/include -I$(PS2LIB)/iop/include
|
||||
IOPCOMPILE = $(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS)
|
||||
IOPLINK = $(IOPLD) -dc
|
||||
IOPASFLAGS := -EL -G0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: vblank
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS =
|
||||
LDADD =
|
||||
OBJECTS = vblank.o ../iopdebug.o ../libkernel/iop_loadcore.o \
|
||||
../libkernel/iop_intrman.o ../libkernel/iop_sysclib.o \
|
||||
../libkernel/iop_thbase.o ../libkernel/iop_thevent.o
|
||||
|
||||
vblank: $(OBJECTS)
|
||||
$(IOPLINK) $(OBJECTS) $(LDFLAGS) $(LDADD) -o ../../../build/VBLANK
|
||||
|
||||
%.o: %.c
|
||||
$(IOPCC) $(IOPINCLUDES) $(IOPCFLAGS) -o $@ -c $<
|
||||
|
||||
%.o : %.s
|
||||
$(IOPAS) $(IOPASFLAGS) $< -o $@
|
||||
all: $(IOP_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS)
|
||||
rm -f -r $(IOP_OBJS) $(IOP_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.iopglobal
|
||||
|
|
|
@ -5,7 +5,7 @@ ENTRY(_start);
|
|||
SECTIONS {
|
||||
|
||||
.text 0xbfc00000 : {
|
||||
start.o
|
||||
start.iop.o
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
}
|
||||
|
|
|
@ -3,55 +3,21 @@
|
|||
# | ___| |____ (C)2002, David Ryan ( Oobles@hotmail.com )
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#.SUFFIXES: .S .c .o .s .elf .irx
|
||||
LOADER_BIN = ../build/LOADER
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# COMPILERS
|
||||
EE_INCS += -Iinclude
|
||||
|
||||
IOPCC = iop-gcc
|
||||
IOPAR = iop-ar
|
||||
IOPLD = iop-ld
|
||||
IOPAS = iop-as
|
||||
EECC = ee-gcc
|
||||
EEAR = ee-ar
|
||||
EELD = ee-gcc
|
||||
EE_LIBS += -lkernel -lmc -lkernel -lpad -lc -lkernel
|
||||
|
||||
EE_OBJS = loader.o menu.o eedebug.o crt0.o romdir.o
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# DIRECTORY PATHS & FLAGS
|
||||
|
||||
|
||||
EECFLAGS = -O2 -fomit-frame-pointer -mips3 -EL -nostartfiles -G0 -D_EE
|
||||
EEINCLUDES = -I. -Iinclude -I$(PS2LIB)/common/include -I$(PS2LIB)/ee/include -I$(NEWLIB)/include
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# PROJECTS TO BUILD
|
||||
|
||||
all: loader
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# KERNEL BUILD INSTRUCTIONS
|
||||
|
||||
LDFLAGS = -L$(PS2LIB)/ee/lib -L$(NEWLIB)/lib -L$(LIBITO)/lib
|
||||
LDADD = -lkernel -lmc -lkernel -lpad -lc -lkernel
|
||||
OBJECTS = loader.o menu.o eedebug.o crt0.o romdir.o
|
||||
DEST = ../build/LOADER
|
||||
|
||||
loader: $(OBJECTS)
|
||||
$(EELD) -T linkfile $(EECFLAGS) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $(DEST)
|
||||
|
||||
%.o: %.c
|
||||
$(EECC) $(EEINCLUDES) $(EECFLAGS) -o $@ -c $<
|
||||
|
||||
%.o: %.s
|
||||
$(EECC) $(EEINCLUDES) $(EECFLAGS) -o $@ -c $<
|
||||
|
||||
$(LOADER_BIN): $(EE_OBJS)
|
||||
$(EE_CC) -nostartfiles -Tlinkfile $(EE_CFLAGS) \
|
||||
-o $(LOADER_BIN) $(EE_OBJS) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(DEST)
|
||||
|
||||
|
||||
rm -f -r $(EE_OBJS) $(LOADER_BIN)
|
||||
|
||||
include $(PS2SDK)/Defs.make
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
# base-files version 3.7-1
|
||||
|
||||
# WARNING
|
||||
#
|
||||
# IF THIS bash IS MODIFIED IT WILL NOT BE UPDATED BY THE CYGWIN
|
||||
# SETUP PROGRAM. IT BECOMES YOUR RESPONSIBILITY.
|
||||
#
|
||||
# The latest version as installed by the Cygwin Setup program can
|
||||
# always be found at /etc/defaults/etc/bash.bashrc
|
||||
|
||||
# System-wide .bashrc file
|
||||
export PS2DEV=/usr/local/ps2dev
|
||||
export PS2SDK=$PS2DEV/ps2sdk
|
||||
export PS2LIB=$PS2SDK
|
||||
export LIBITO=$PS2DEV/libito
|
||||
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin
|
||||
export PATH=$PATH:$PS2DEV/dvp/bin:$PS2SDK/bin
|
||||
|
Loading…
Reference in New Issue