Page 1 of 2

Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Wed Feb 08, 2017 4:21 am
by TR3KT
Hi! i've been looking through the library of Codemasters games and noticed a problem with the roms and their compatibility with PAL consoles. The games don't work properly, effects are messed up, scrolling tiles are warped and major graphical glitches are everywhere. Using a PAL NES, i assumed Codemasters' region detection would work properly, but so far every game aside from Bee 52 and Fantastic Adventures of Dizzy (Aladdin version) fails horribly.

I've delved into my research and found that the real cartridges of Codemasters games have a switch which changes the region of the game. I feel like my Everdrive N8 could be the problem by not emulating this switch properly. I've checked mapper compatibility and it's guaranteed to work

Basically, the question i'm asking is: Does someone have decent knowledge of how codemasters region detection works and why my Everdrive N8 doesn't do anything to emulate it?

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Wed Feb 08, 2017 4:38 am
by rainwarrior
In my understanding the "region" A/B switch on the back of codemasters games was entirely to do with its anti-lockout device which tries to stun the CIC lockout chip inside the NES with "bad" voltages. It's not done in a way that is actually region specific, just it has to be disabled for a top-loader where there is no CIC, which is what the switch is for.

So... it should have nothing to do with the game emulation on an Everdrive N8, as far as I know? It doesn't have to be simulated to run the game, it was just how the original cartridges got past the lockout without a license. (No longer an issue with CIC clones available.)

I think the actual game code for a lot of the Codemasters games are region agnostic...? I can't seem to find any PAL region specific Codemasters ROMs.

The Codemasters games often use the forbidden $0D "too black" colour, which has been known to cause an unstable/shaky picture on some TVs (both NTSC or PAL). Maybe that's the problem here?

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Wed Feb 08, 2017 5:13 am
by TR3KT
I have heard of the "Too Black" Palette entry on the NES. But i have tested this on multiple TVs (including a modern flat-screen) and got identical responses to my normal TV. So it is down to the console. I know that Codemasters time their game code with tons of pseudo synchronisation to the CPU. RARE and beam software use this a lot too with tons of their games being unplayable on PAL unless you get PAL versions.

This still doesn't explain why Dizzy and Bee 52 work perfectly on my system but both Ultimate Stuntman and Micro Machines (Tested US rom and Aladdin deck enhancer versions. I cant find legitimate European Rom of it). have the same looking problems. With tracks don't generate properly and scrolling effects that either loop or generate broken graphics. Many sources claim that most Codemasters games should work on PAL consoles which is obviously wrong. Only a few US ones do and the games that got a seperate release in Europe i cant find a rom dump of anywhere on the internet. :(

EDIT: I found a PAL Rom of Linus Spacehead on Emuparidise and it functions properly, still not clear on the problem though.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Wed Feb 08, 2017 4:06 pm
by mikejmoffitt
Micro machines has minimal problems with the Everdrive N8, if I remember correctly. It is possible that your ROMs have incorrect mirroring specified in the header as well.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 12:54 am
by TR3KT
Nope, not that either, i downloaded 3 roms of micro machines (aladdin) and all run the same way. US Cart dump doesn't even boot.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 1:30 am
by Memblers
I've not looked into their code, but I would be extremely surprised if ALL their games were dual NTSC/PAL compatible. Try running the roms in Nintendulator's PAL mode and see how it looks.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 7:33 am
by rainwarrior
I find that in Nintendulator, "Micro Machines (U)" can't proceed past the title screen in PAL mode but "Micro Machines (Aladdin) (UE)" can. There is cosmetic glitching on the menu screens, but the game otherwise seems to run fine there. The actual racing has no problems.

Micro Machines is known to rely on reading the OAM registers which doesn't work on all revisions of the PPU. Even a Famicom gets some glitchiness on the menu screens. Not sure if it would be siginificantly different on a PAL PPU (or if Nintendulator emulates it differently for PAL). This has been notoriously difficult to emulate, and most emulators have some sort of graphical problems on its menus.

Mapper 71 is a really simple mapper, though. There's no IRQ or anything. The usual problems with Micro Machines are due to the system hardware, not really the cart. I'd be kinda surprised if Everdrive N8 did something wrong with the mapper itself? Aside from fine IRQ details, the most common culprit for incompatibility is usually open bus behaviour in "empty" regions, but I don't think MM relies on that.

I also wouldn't be surprised if Camerica actually released a version in PAL regions that just has slightly glitchy menu screens. Publishers often decide to ship with bugs, rather than go through the cost of further revision. I've got no strong evidence either way, but I'd kind of expect it to be easier to find a PAL-specific dump if one existed? Kinda hard to tell you whether the ROMs you have are correct without having the real thing to dump and compare.


I see no problems with "Ultimate Stuntman (U)" in PAL mode in emulators though. What kind of problems are you seeing? I'm a bit curious what emulators might still be missing about PAL.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 7:50 am
by rainwarrior
mikejmoffitt wrote:Micro machines has minimal problems with the Everdrive N8, if I remember correctly. It is possible that your ROMs have incorrect mirroring specified in the header as well.
Actually, after some testing I think the problem is the Everdrive N8.

When I compared running it on the PowerPak side by side with the Everdrive N8, I noticed the tracks in Micro Machines are getting corrupted on the N8 version. This screenshot is from an NTSC Famicom running Micro Machines (U) on an N8.
micro_machines_corrupt_track_everdrive_n8.jpg
So, I think the N8 might have a problem specifically with this game, or possibly all mapper 71 games? (I'm a bit surprised by this!) I think at least some of the problems OP is seeing aren't due to PAL/region differences at all, but just the Everdrive failing in some way.

(On my PowerPak the same ROM runs without the track corruption, and with less visual problems in the menus too.)

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 8:03 am
by rainwarrior
More or less the same problem with Ultimate Stuntman (U). The start of the first track:
ultimate_stuntman_corrupt_track_everdrive_n8.jpg
Again, runs flawlessly from PowerPak but is corrupted on Everdrive N8, and this is an NTSC system, so the problem seems to be regardless of region?

I'll report this on the Everdrive forums... (thread)

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 8:37 am
by rainwarrior
As a test, I changed the Ultimate Stuntman (U) header to use mapper 2 (UNROM) instead of mapper 71, which it appears to be compatible with (it stops pinging the stunner early on?).

With that header change it appears to run perfectly on the Everdrive N8.

Edit: Aha, this track corruption in both Micro Machines and Ultimate Stuntman seem to be perfectly duplicated in an emulator by the mapper implementation presuming single screen instead of using fixed mirroring. Both games write $00 to $8000-BFFF region on startup; probably the implementation incorrectly presumes this means it has mapper controlled single screen mirroring.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 11:10 am
by Great Hierophant
rainwarrior wrote:As a test, I changed the Ultimate Stuntman (U) header to use mapper 2 (UNROM) instead of mapper 71, which it appears to be compatible with (it stops pinging the stunner early on?).

With that header change it appears to run perfectly on the Everdrive N8.

Edit: Aha, this track corruption in both Micro Machines and Ultimate Stuntman seem to be perfectly duplicated in an emulator by the mapper implementation presuming single screen instead of using fixed mirroring. Both games write $00 to $8000-BFFF region on startup; probably the implementation incorrectly presumes this means it has mapper controlled single screen mirroring.
I found that all my Camerica EverDrive problems went away when I changed the header from 71 to 2. The only exception are FireHawk, which requires the unique feature of 71 and the Quattro titles, which use 232.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 11:45 am
by NewRisingSun
Mapper 71 describes two Camerica boards, one with hard-wired mirroring, one with software-controlled mirroring. The Everdrive N8 always assumes software-controlled mirroring. The solution is, as Great Hierophant pointed out, to change the mapper number from 71 to 2 (UNROM). To be safe, I also removed all writes to E000-EFFF, which control the CIC stun control on the original PCB. With those changes, all Camerica games should work flawlessly. Micro Machines will have shaky menu screens on consoles with PPU revisions earlier than G, but that has nothing to do with the Everdrive N8.

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Thu Feb 09, 2017 11:30 pm
by TR3KT
Thank you for all the replies in such short notice.

The screenshots that rainwarrior posted were exactly what I was getting on my everdrive setup, so it's a mapper problem, huh?

So all I have to do to get codemasters games functioning properly is to mod the header?

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Fri Feb 10, 2017 1:24 am
by Avery12
TR3KT wrote:Thank you for all the replies in such short notice.

The screenshots that rainwarrior posted were exactly what I was getting on my everdrive setup, so it's a mapper problem, huh?

So all I have to do to get codemasters games functioning properly is to mod the header?

i am having the same issue that rainwarrior mention, did you find a way to solve this yet?

Re: Codemasters Roms, Everdrive N8 and a PAL NES.

Posted: Sat Feb 11, 2017 6:39 pm
by TR3KT
Which bytes in the INES header (i assume you're talking about that) do i change on Micro Machines/ Ultimate Stuntman to make it a UNROM game? i attempted to replicate headers on other UNROM games with no success.