X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=fce.c;h=5ad965ddc344a8c66216f5f59f953977c9b6c545;hp=fb285721188524c94c987077fd5a23b07840e829;hb=f12b1f316ca070bda860108b4e3901628d1a8398;hpb=e7f5287861e2da956537a6db8abb26f9a26255f8 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);