mirror of https://github.com/zeldaret/mm.git
Add a few already decompiled files
This commit is contained in:
parent
4edcdeb811
commit
21b019c010
|
@ -14,3 +14,4 @@ __pychahe__/*
|
||||||
*.pyc
|
*.pyc
|
||||||
test.txt
|
test.txt
|
||||||
*.xlsx
|
*.xlsx
|
||||||
|
src/test.c
|
|
@ -33,7 +33,7 @@ SECTIONS
|
||||||
build/asm/boot_0x800882A0.o(.text)
|
build/asm/boot_0x800882A0.o(.text)
|
||||||
build/asm/sinf.o(.text)
|
build/asm/sinf.o(.text)
|
||||||
build/asm/sins.o(.text)
|
build/asm/sins.o(.text)
|
||||||
build/asm/sptask.o(.text)
|
build/src/libultra/io/sptask.o(.text)
|
||||||
build/asm/ll.o(.text)
|
build/asm/ll.o(.text)
|
||||||
build/asm/exceptasm.o(.text)
|
build/asm/exceptasm.o(.text)
|
||||||
build/src/libultra/os/thread.o(.text)
|
build/src/libultra/os/thread.o(.text)
|
||||||
|
@ -160,11 +160,12 @@ SECTIONS
|
||||||
build/asm/xldtob.o(.text)
|
build/asm/xldtob.o(.text)
|
||||||
build/asm/ldiv.o(.text)
|
build/asm/ldiv.o(.text)
|
||||||
build/asm/xlitob.o(.text)
|
build/asm/xlitob.o(.text)
|
||||||
build/asm/sirawread.o(.text)
|
build/src/libultra/io/sirawread.o(.text)
|
||||||
build/asm/spgetstat.o(.text)
|
build/src/libultra/io/spgetstat.o(.text)
|
||||||
build/asm/spsetstat.o(.text)
|
build/src/libultra/io/spsetstat.o(.text)
|
||||||
|
. = ALIGN(0x20); /* XXX insert NOPs to pad the file */
|
||||||
build/asm/vimgr.o(.text)
|
build/asm/vimgr.o(.text)
|
||||||
build/asm/vigetcurrcontext.o(.text)
|
build/src/libultra/io/vigetcurrcontext.o(.text)
|
||||||
build/asm/writebackdcacheall.o(.text)
|
build/asm/writebackdcacheall.o(.text)
|
||||||
build/src/libultra/os/getcurrfaultthread.o(.text)
|
build/src/libultra/os/getcurrfaultthread.o(.text)
|
||||||
build/asm/boot_0x80095600.o(.text)
|
build/asm/boot_0x80095600.o(.text)
|
||||||
|
|
39
src/test.c
39
src/test.c
|
@ -1,39 +0,0 @@
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
unsigned char* strchr(const unsigned char* s, int c)
|
|
||||||
{
|
|
||||||
const unsigned char ch = c;
|
|
||||||
|
|
||||||
while ( *s != ch) {
|
|
||||||
if (*s == '\0') {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
s++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (unsigned char*)s;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t strlen(const unsigned char* s)
|
|
||||||
{
|
|
||||||
const unsigned char* sc = s;
|
|
||||||
|
|
||||||
while (*sc != '\0') sc++;
|
|
||||||
|
|
||||||
return (size_t)(sc - s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void* memcpy(void* s1, const void* s2, size_t n)
|
|
||||||
{
|
|
||||||
unsigned char* su1 = (unsigned char*)s1;
|
|
||||||
const unsigned char* su2 = (const unsigned char*)s2;
|
|
||||||
|
|
||||||
while (n > 0) {
|
|
||||||
*su1 = *su2;
|
|
||||||
su1++;
|
|
||||||
su2++;
|
|
||||||
n--;
|
|
||||||
}
|
|
||||||
|
|
||||||
return s1;
|
|
||||||
}
|
|
Loading…
Reference in New Issue