mirror of
https://github.com/libretro/pcsx2.git
synced 2024-12-22 01:40:19 +00:00
6ebfae8ef1
Added interface.cpp (plugin/pcsx2 interface) and savestate.cpp to SPU2ghz, to help clean up SPU2.cpp. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@463 96395faa-99c1-11dd-bbfe-3dabce05a288
51 lines
827 B
C
51 lines
827 B
C
#include <tamtypes.h>
|
|
#include "romdir.h"
|
|
|
|
static void Kputc(u8 c) {
|
|
*((u8*)0x1000f180) = c;
|
|
}
|
|
|
|
static void Kputs(u8 *s) {
|
|
while (*s != 0) {
|
|
Kputc(*s++);
|
|
}
|
|
}
|
|
|
|
static void Kmemcpy(void *dest, const void *src, int n) {
|
|
const u8 *s = (u8*)src;
|
|
u8 *d = (u8*)dest;
|
|
|
|
while (n > 0) {
|
|
*d++ = *s++; n--;
|
|
}
|
|
}
|
|
|
|
void _eestart() {
|
|
struct rominfo ri;
|
|
u8 *str;
|
|
|
|
romdirGetFile("ROMVER", &ri);
|
|
str = (u8*)(0xbfc00000 + ri.fileOffset);
|
|
Kputs("fps2bios v");
|
|
Kputc(str[1]); Kputc('.'); Kputc(str[3]); Kputc('\n');
|
|
|
|
romdirGetFile("EELOAD", &ri);
|
|
|
|
Kputs("loading EELOAD to 0x80000000\n");
|
|
|
|
Kmemcpy((void*)0x80000000, (void*)(0xbfc00000 + ri.fileOffset), ri.fileSize);
|
|
|
|
__asm__ (
|
|
"li $26, 0x80001000\n"
|
|
"jr $26\n");
|
|
for (;;);
|
|
}
|
|
|
|
__asm__ (
|
|
".global eestart\n"
|
|
"eestart:\n"
|
|
"li $sp, 0x80010000\n"
|
|
"j _eestart\n");
|
|
|
|
|