I
Itay
While going through the code of the open source project PCSX2
(www.pcsx2.net - PS2 emulator for windows and linux. source code can be
d/led from here: http://tinyurl.com/6242p), I saw a strange (at least
for me...) thing:
in the R5900.h header (hmm..emulating a CPU...), there's a struct which
looks like this:
typedef struct {
int (*Init)();
void (*Reset)();
void (*Step)();
void (*Execute)();
void (*ExecuteBlock)();
void (*ExecuteVU0Block)();
void (*ExecuteVU1Block)();
void (*EnableVU0micro)(int enable);
void (*EnableVU1micro)(int enable);
void (*Clear)(u32 Addr, u32 Size);
void (*ClearVU0)(u32 Addr, u32 Size);
void (*ClearVU1)(u32 Addr, u32 Size);
void (*Shutdown)();
} R5900cpu;
and then
R5900cpu *Cpu;
and somewhere in R5900.c:
Cpu->ExecuteBlock();
ExecuteBlock is not defined anywhere. I did a "search in files" in the
whole project, and the whole project dir...Only references to
ExecuteBlock found..no definition. What's going on here?!
It must be found somehwere, because it's in a function that's - CMIIW -
always called (indirectly) from WinMain ...and it doesn't make sense
that it's accidently there...
Any explanation?
thanks,
Itay
(www.pcsx2.net - PS2 emulator for windows and linux. source code can be
d/led from here: http://tinyurl.com/6242p), I saw a strange (at least
for me...) thing:
in the R5900.h header (hmm..emulating a CPU...), there's a struct which
looks like this:
typedef struct {
int (*Init)();
void (*Reset)();
void (*Step)();
void (*Execute)();
void (*ExecuteBlock)();
void (*ExecuteVU0Block)();
void (*ExecuteVU1Block)();
void (*EnableVU0micro)(int enable);
void (*EnableVU1micro)(int enable);
void (*Clear)(u32 Addr, u32 Size);
void (*ClearVU0)(u32 Addr, u32 Size);
void (*ClearVU1)(u32 Addr, u32 Size);
void (*Shutdown)();
} R5900cpu;
and then
R5900cpu *Cpu;
and somewhere in R5900.c:
Cpu->ExecuteBlock();
ExecuteBlock is not defined anywhere. I did a "search in files" in the
whole project, and the whole project dir...Only references to
ExecuteBlock found..no definition. What's going on here?!
It must be found somehwere, because it's in a function that's - CMIIW -
always called (indirectly) from WinMain ...and it doesn't make sense
that it's accidently there...
Any explanation?
thanks,
Itay