From: notaz Date: Sat, 26 May 2007 19:20:03 +0000 (+0000) Subject: smb3 and addams family hacks X-Git-Tag: r1~45 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=commitdiff_plain;h=f12b1f316ca070bda860108b4e3901628d1a8398 smb3 and addams family hacks git-svn-id: file:///home/notaz/opt/svn/fceu@137 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/fce.c b/fce.c index fb28572..5ad965d 100644 --- a/fce.c +++ b/fce.c @@ -977,9 +977,9 @@ static void DoHBlank(void) { X6502_Run(6); Fixit2(); - X6502_Run(4); + X6502_Run(4+3); // original value was 4, but adding 3 fixes glitch in smb3 (and breaks something?) GameHBIRQHook(); - X6502_Run(85-16-10); + X6502_Run(85-10-16-3); } else { @@ -1221,14 +1221,17 @@ static INLINE void Thingo(void) if(MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline); - // check: Battletoads & Double Dragon + // check: Battletoads & Double Dragon, Addams Family + // sky glitches in SMB1 if done wrong if(tosprite>=256) { X6502_Run(256); } else { - // sky glitches in SMB1 if done wrong + // a dirty hack for Addams Family and inaccurate sprite hit emulation + if(tosprite<8) tosprite-=tosprite*3>>2; + X6502_Run(tosprite); PPU[2]|=0x40; X6502_Run(256-tosprite); diff --git a/ncpu_debug.c b/ncpu_debug.c index 774218a..9736204 100644 --- a/ncpu_debug.c +++ b/ncpu_debug.c @@ -180,8 +180,6 @@ void X6502_Run_d(int32 c) TriggerIRQ_a(); } if (pending_irq & 0xff) { - TriggerIRQ_c(); - TriggerIRQ_a(); X6502_IRQBegin_c(pending_irq & 0xff); X6502_IRQBegin_a(pending_irq & 0xff); } diff --git a/x6502.c b/x6502.c index d81cdab..0d9729d 100644 --- a/x6502.c +++ b/x6502.c @@ -543,7 +543,7 @@ void X6502_Run_c(void/*int32 cycles*/) { extern uint8 SIRQStat; SIRQStat|=0x80; - X6502_IRQBegin_c(FCEU_IQDPCM); + X6502_IRQBegin(FCEU_IQDPCM); } } }