Ok, as you all know, I am porting/optimizing the FPSE emulator. Well, I was stepping though the code today, and the program hung on the spot where it calls the function screen_update() (which updates the screen or course). After a few seconds, I get a message saying that the connection has been lost, and I need to restart evc++. It has done this like 7 times (at this very spot). I have my e200 pluged in, and firmly in the cradel. Now, the function screen_update is located in a different c file than the function that calls it, and is defined in a header which is shared by both files. Does anyone know why it may be hanging as I try and step into the function?
here is the code to the function I am stepping into (just in case I am doing something illegal in it)
this is where it is called
here is the code to the function I am stepping into (just in case I am doing something illegal in it)
- Code:
void screen_update()
{
static long nf = 0;
if(++framecount>frameskip)
{
if (!NoRender) {
if (!FullScreen) Dsp.render_frame((UINT32*)buffer,0,endW);
else {
UINT16 tmp[fullscrW*fullscrH];
soft_scale((UINT16*)buffer,CurW,CurH,tmp,fullscrW,fullscrH);
Dsp.render_frame((UINT32*)tmp,0,fullscrW);
}
}
framecount=0;
if (joy0_ret) {
switch (joy0_ret) {
case KEY_F6: FullScreen = 1 - FullScreen;
if (!FullScreen) Dsp.resize(CurW,CurH);
else Dsp.resize(fullscrW,fullscrH);
break;
case KEY_F7: FpsCount = 1 - FpsCount; Dsp.change_title("FPSE");
break;
case KEY_F8: NoRender = 1 - NoRender; break;
case KEY_KP_PLUS:
case KEY_PLUS: frameskip++; break;
case KEY_KP_MINUS:
case KEY_MINUS: frameskip--; break;
}
joy0_ret = 0;
}
}
}
this is where it is called
- Code:
void GPU_Update(void)
{
/* interlace odd/even */
gpu.status^=0x80000000;
/* Update Image */
if (toUpdate)
{
screen_update();
toUpdate = 0;
}
}