/[pcsx2_0.9.7]/branch/debug/0.X/0.9.X/0.9.7/r3113/fps2bios/kernel/eestart.c
ViewVC logotype

Annotation of /branch/debug/0.X/0.9.X/0.9.7/r3113/fps2bios/kernel/eestart.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (hide annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years, 10 months ago) by william
Original Path: trunk/fps2bios/kernel/eestart.c
File MIME type: text/plain
File size: 827 byte(s)
committing r3113 initial commit again...
1 william 31 #include <tamtypes.h>
2     #include "romdir.h"
3    
4     static void Kputc(u8 c) {
5     *((u8*)0x1000f180) = c;
6     }
7    
8     static void Kputs(u8 *s) {
9     while (*s != 0) {
10     Kputc(*s++);
11     }
12     }
13    
14     static void Kmemcpy(void *dest, const void *src, int n) {
15     const u8 *s = (u8*)src;
16     u8 *d = (u8*)dest;
17    
18     while (n > 0) {
19     *d++ = *s++; n--;
20     }
21     }
22    
23     void _eestart() {
24     struct rominfo ri;
25     u8 *str;
26    
27     romdirGetFile("ROMVER", &ri);
28     str = (u8*)(0xbfc00000 + ri.fileOffset);
29     Kputs("fps2bios v");
30     Kputc(str[1]); Kputc('.'); Kputc(str[3]); Kputc('\n');
31    
32     romdirGetFile("EELOAD", &ri);
33    
34     Kputs("loading EELOAD to 0x80000000\n");
35    
36     Kmemcpy((void*)0x80000000, (void*)(0xbfc00000 + ri.fileOffset), ri.fileSize);
37    
38     __asm__ (
39     "li $26, 0x80001000\n"
40     "jr $26\n");
41     for (;;);
42     }
43    
44     __asm__ (
45     ".global eestart\n"
46     "eestart:\n"
47     "li $sp, 0x80010000\n"
48     "j _eestart\n");
49    
50    

  ViewVC Help
Powered by ViewVC 1.1.22