some irq hacks

notes to self (derived from Nemesis):

H32: 0x10A .. 0x127 0x1D2 .. 0x1FF 0x000 0x001
pclk       30             46          1 |0x109
mclk                 770                | 2650   = 3420
68kclk              110                   378.5 ~= 488.5

H40: 0x14A .. 0x16C 0x1C9 .. 0x1FF 0x000 0x001
pclk       35             55          1
mclk     35*8       4*8+314+10+19*8     |0x149*8
                  788                   | 2632   = 3420
68kclk           112.5                    376   ~= 488.5
This commit is contained in:
notaz 2017-10-07 00:08:05 +03:00
parent e015ad3c1b
commit 22814963cc
5 changed files with 39 additions and 38 deletions

View file

@ -7,7 +7,7 @@
*/
#define CYCLES_M68K_LINE 488 // suitable for both PAL/NTSC
#define CYCLES_M68K_VINT_LAG 68
#define CYCLES_M68K_VINT_LAG 112
// pad delay (for 6 button pads)
#define PAD_DELAY() { \
@ -206,7 +206,6 @@ static int PicoFrameHints(void)
}
pv->status |= SR_VB; // go into vblank
pv->pending_ints |= 0x20;
// the following SekRun is there for several reasons:
// there must be a delay after vblank bit is set and irq is asserted (Mazin Saga)
@ -216,7 +215,10 @@ static int PicoFrameHints(void)
do_timing_hacks_vb();
CPUS_RUN(CYCLES_M68K_VINT_LAG);
pv->pending_ints |= 0x20;
if (pv->reg[1] & 0x20) {
Pico.t.m68c_aim = Pico.t.m68c_cnt + 11; // HACK
SekSyncM68k();
elprintf(EL_INTS, "vint: @ %06x [%u]", SekPc, SekCyclesDone());
SekInterrupt(6);
}