From 23029e883eb440e32c3aaf9c29dee9a0d4ebd28d Mon Sep 17 00:00:00 2001 From: anon <unknown> Date: Sun, 29 Jun 2008 10:07:15 +0800 Subject: [PATCH] nagra: fix partial cpu instr cycle count --- systems/nagra/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/systems/nagra/cpu.c b/systems/nagra/cpu.c index a740dce..5afd70e 100644 --- a/systems/nagra/cpu.c +++ b/systems/nagra/cpu.c @@ -543,9 +543,9 @@ int c6805::Run(int max_count) ins=Get(pc++); break; } - int postCycles=0; -//XXX if(ins<=0x1F) postCycles=2; // btjt/btjf/bres/bset - AddCycles(cycles+clock_cycles[ins]-postCycles); + cycles+=clock_cycles[ins]; + int readCycles=clock_cycles[ins]>=2 ? 2:0; + AddCycles(readCycles); if(doDisAsm) { char str[8]; @@ -691,7 +691,7 @@ int c6805::Run(int max_count) } } - if(postCycles) AddCycles(postCycles); + AddCycles(cycles-readCycles); // command decoding stats[ins]++; -- 2.39.5