Previous 15994 Revisions Next

r5735 Monday 14th September, 2009 at 19:18:06 UTC by Wilbert Pol
lr35902 cpu: Improved handling of the DI+HALT cpu bug.
[src/emu/cpu/lr35902]lr35902.c opc_main.h

src/emu/cpu/lr35902/lr35902.c
r5734r5735
7777   int gb_speed_change_pending;
7878   int enable;
7979   int doHALTbug;
80   int haltIFstatus;
8180   UINT8   features;
8281   const lr35902_cpu_core *config;
8382} lr35902_16BitRegs;
r5734r5735
272271               if ( cpustate->w.features & LR35902_FEATURE_HALT_BUG ) {
273272                  if ( ! cpustate->w.enable & IME ) {
274273                     /* Old cpu core (dmg/mgb/sgb) */
275                     /* check if the HALT bug should be performed */
276                     if ( cpustate->w.haltIFstatus ) {
277                        cpustate->w.doHALTbug = 1;
278                     }
274                     cpustate->w.doHALTbug = 1;
279275                  }
280276               } else {
281277                  /* New cpu core (cgb/agb/ags) */
src/emu/cpu/lr35902/opc_main.h
r5734r5735
790790  break;
791791case 0x76: /*      HALT */
792792   cpustate->w.enable |= HALTED;
793   cpustate->w.haltIFstatus = cpustate->w.IF & cpustate->w.IE;
794793   cpustate->w.PC--;
795794  break;
796795case 0x77: /*      LD (HL),A */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team