Regarding the timing issues with Blast Corps and DK64

Discuss ROM-compatibility related issues here.
Post Reply
User avatar
GPDP
Posts: 3
Joined: Wed Sep 09, 2015 8:00 pm

Regarding the timing issues with Blast Corps and DK64

Post by GPDP » Wed Sep 09, 2015 8:48 pm

As we know, both these games boot, and Donkey Kong 64 even goes in-game, with Blast Corps not letting you go past a certain screen. However, they have heavy stutter on certain parts.

I believe this may have to do with the DP_FREEZE setting that as of this May 24 commit is now ignored, which apparently fixed Banjo Kazooie in Cen64.

However, some time ago, the libretro team, while investigating why their fork of Mupen64Plus refused to work with several Rare games (namely Banjo-Kazooie, Banjo-Tooie, Perfect Dark, Blast Corps, and Donkey Kong 64) while using Angrylion's plugin (they boot fine using any of the HLE plugins), tested out doing the same thing that MAME and Cen64 do. It indeed did fix the issue with both Banjos and Perfect Dark, allowing them to boot with Angrylion, but it also resulted in very similar issues with Blast Corps and DK64 that Cen64 currently exhibits.

A deeper investigation revealed that earlier versions of Mupen64Plus, even going back to the original Mupen64, also had the same timing issues, extending to the Banjo games even. Some code was put in somewhere in Mupen64Plus's development to fix the problem with these games, but it seems like it was only ever tested with HLE graphics, so it was not known until recently that it made these five Rare games fail to work with LLE.

To find a proper fix that would make these games work with both HLE and LLE graphics, they ended up looking at Project64's RSP code. The resulting backport fixed all of these games save for Perfect Dark in LLE, without causing any timing issues and without needing to ignore DP_FREEZE.

It may be worthwhile to take another look at Cen64's RSP code and attempt to backport some of what was done in Mupen64Plus-libretro to fix these games.

AIO
Posts: 51
Joined: Wed Nov 05, 2014 4:56 pm

Re: Regarding the timing issues with Blast Corps and DK64

Post by AIO » Wed Sep 09, 2015 10:24 pm

GPDP wrote:It may be worthwhile to take another look at Cen64's RSP code and attempt to backport some of what was done in Mupen64Plus-libretro to fix these games.
I can say from experience that it is better to look at Project64's code instead of Mupen64Plus-libretro.

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: Regarding the timing issues with Blast Corps and DK64

Post by MarathonMan » Wed Sep 09, 2015 10:30 pm

Thanks, I'll try to take a peek at this.

The flickering in all the Rare titles was present before the DP_FREEZE commit as well.

I think at least part of the issue is due to CEN64's, admittedly, piss poor VI emulation*. By delaying 'emulated VI DMA' (from framebuffer in memory to the host's graphic buffer), I've actually been able to make most of the flicking disappear in DK64. Haven't tried other titles.

* CEN64 currently doesn't even respect things like VI_INTR_REG, which control exactly when (in terms of scanlines) the VI interrupt should be raised. CEN64 just always emits a VI interrupt every 62.5 million cycles starting and uses the cycle counter as an offset (so effectively, always the first scanline). Oftentimes, many carts will use other scanlines in the NTSC blanking period, but hardly ever do they use the first scanline.

User avatar
GPDP
Posts: 3
Joined: Wed Sep 09, 2015 8:00 pm

Re: Regarding the timing issues with Blast Corps and DK64

Post by GPDP » Wed Sep 09, 2015 10:46 pm

AIO wrote:I can say from experience that it is better to look at Project64's code instead of Mupen64Plus-libretro.
The problem is that Project64's codebase is a bit more troublesome to trudge through, whereas Mupen64Plus's is closer in organization to Cen64's, so backporting changes back and forth is easier. Granted, Project64 IS the most compatible N64 emulator of the whole bunch, so in that sense it does make more sense to look there for answers to issues. It's just harder to those unfamiliar with its codebase.

AIO
Posts: 51
Joined: Wed Nov 05, 2014 4:56 pm

Re: Regarding the timing issues with Blast Corps and DK64

Post by AIO » Wed Sep 09, 2015 11:30 pm

GPDP wrote: The problem is that Project64's codebase is a bit more troublesome to trudge through, whereas Mupen64Plus's is closer in organization to Cen64's, so backporting changes back and forth is easier. Granted, Project64 IS the most compatible N64 emulator of the whole bunch, so in that sense it does make more sense to look there for answers to issues. It's just harder to those unfamiliar with its codebase.
Fair point. I think Project64 was the first N64 emulator source code I've ever looked at, so I'm more familiar with it than most people. My main reason for suggesting looking at Project64's code is because, as you said, it's the most compatible N64 emulator.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests