comparison src/gb/GB.cpp @ 39:3e36553d0cbf

got some speedruns to work!
author Robert McIntyre <rlm@mit.edu>
date Mon, 05 Mar 2012 16:37:38 -0600
parents 44974c3e093b
children
comparison
equal deleted inserted replaced
38:b374503a5b31 39:3e36553d0cbf
3151 return true; 3151 return true;
3152 } 3152 }
3153 3153
3154 void gbEmulate(int ticksToStop) 3154 void gbEmulate(int ticksToStop)
3155 { 3155 {
3156 printf("RLM: Inside the GB!\n"); 3156 //printf("RLM: Inside the GB!\n");
3157 gbRegister tempRegister; 3157 gbRegister tempRegister;
3158 u8 tempValue; 3158 u8 tempValue;
3159 s8 offset; 3159 s8 offset;
3160 3160
3161 int clockTicks = 0; 3161 int clockTicks = 0;
3162 gbDmaTicks = 0; 3162 gbDmaTicks = 0;
3163 3163
3164 register int opcode = 0; 3164 register int opcode = 0;
3165 3165
3166 u32 newmask = 0; 3166 u32 newmask = 0;
3167 printf("RLM: newframe = %d\n", newFrame); 3167 //printf("RLM: newframe = %d\n", newFrame);
3168 if (newFrame) 3168 if (newFrame)
3169 { 3169 {
3170 extern void VBAOnExitingFrameBoundary(); 3170 extern void VBAOnExitingFrameBoundary();
3171 VBAOnExitingFrameBoundary(); 3171 VBAOnExitingFrameBoundary();
3172 printf("RLM: exiting frame boundary?\n"); 3172 //printf("RLM: exiting frame boundary?\n");
3173 // update joystick information 3173 // update joystick information
3174 systemReadJoypads(); 3174 systemReadJoypads();
3175 3175
3176 bool sensor = (gbRom[0x147] == 0x22); 3176 bool sensor = (gbRom[0x147] == 0x22);
3177 3177
3210 3210
3211 extButtons = (newmask >> 18); 3211 extButtons = (newmask >> 18);
3212 speedup = (extButtons & 1) != 0; 3212 speedup = (extButtons & 1) != 0;
3213 3213
3214 VBAMovieResetIfRequested(); 3214 VBAMovieResetIfRequested();
3215 printf("RLM: before Lua functions\n"); 3215 //printf("RLM: before Lua functions\n");
3216 //CallRegisteredLuaFunctions(LUACALL_BEFOREEMULATION); 3216 //CallRegisteredLuaFunctions(LUACALL_BEFOREEMULATION);
3217 printf("RLM: after Lua functions\n"); 3217 //printf("RLM: after Lua functions\n");
3218 newFrame = false; 3218 newFrame = false;
3219 } 3219 }
3220 3220
3221 3221
3222 for (;; ) 3222 for (;; )