Ejemplo n.º 1
0
Int32 main(Int32 argc, Int8 *argv[]) {
	if (!RomLoad("./NESTRESS.nes")) {
		CpuRst();
		do {
			if (CpuRun(1)) {
				RomUnload();
				break;
			}
		} while (1);
	}
	return -1;
}
Ejemplo n.º 2
0
static void RunLine()
{

  if (MastY<=192)
  {
    Hint--;
    if (Hint<0)
    {
      if (Masta.v.Reg[0]&0x10) // Do hint
      { 
#ifdef EMU_DOZE
        nDozeInterrupt=0xff;
#elif defined(EMU_Z80JB)
        Z80Vector=0xff;
        Z80SetIrqLine(0x38, 1);
#elif defined(EMU_DRZ80)
        DrZ80_Set_Irq(0x38);
#endif
      }
      Hint=Masta.v.Reg[10];
    }
  }
  else
    Hint=Masta.v.Reg[10];

#ifdef EMU_DOZE
  if (MastY==193)
#elif defined(EMU_Z80JB) || defined(EMU_DRZ80)
  if (Masta.v.Stat&0x80)
#endif
  {
    if (Masta.v.Reg[1]&0x20) // Do vint
    { 
#ifdef EMU_DOZE
      nDozeInterrupt=0xff;
#elif defined(EMU_Z80JB)
      Z80Vector=0xff;
      Z80SetIrqLine(0x38, 1);
#elif defined(EMU_DRZ80)
      DrZ80_Set_Irq(0x38);
#endif
    }
  }

  CpuRun(LineCyc);
}