Page 9 of 9

Re: Help fix a NES Clone (Phantom System)

Posted: Sat Oct 28, 2017 5:59 am
by Fisher
Got some news, not that good, but soo...

I almost think the problem was solved!
I got an old 60 to 72 pin adapter board and the game ran more stable.
It didn't crashed anymore, but it resets a lot.
Here is a picture of the guy:
New old adapter
New old adapter

The only diference I noticed from this adapter to my other is the existence of this circuit:

Code: Select all

      | C945P? |     22X (?)
      |________|  +---||----+
       |  |  |    |   10K   |
       |  |  +----+--/\/\/--+---> PPU A13
      GND |      1K
          +----/\/\/---> VCC
          = 1mf x 35V
    NES cart Pin 35 

I think it's a CIC stun circuit, pretty common on old pirates back in the day.
I've put an X on the capacitor's last digit is because it's erased, also, the transistor's identification is not very clear.
I read what I could. :oops:
The capacitor (22X) is disconnected from the resistor on the transistor's side. If I connect it the game resets when I navigate through the pause menu.
I also tried to add a resistor that seemed to cure the reset issue on the adapter, but the only thing I got different was corrupted graphics.

I also tried to take off some pullup resistors on the console's motherboard, but the only one that I could see a diference was the in the CPU's /IRQ pin.
Without it, the game didn't boot at all. So, I've put it back.

Just in case someone is curious on how it crashes on clashman's stage, I've made a video of it.
Hope someday I can finally solve this issue.
Thanks in advance!

Re: Help fix a NES Clone (Phantom System)

Posted: Sun Nov 19, 2017 1:42 pm
by Fisher
Well, I'm not surprised at all...
As I related in this post, I made a Crisis Force repro.
Unsurpringly, the game just crashes in this clone. :cry:
It seems to be random. Any clues on how to debug it?
Maybe measuting the tensions on the WRAM chip can give some clues??

The only differences I can see between this clone, the other clone that works and an NES/FC schematics is that the clock generation is made with 2 transistors, instead of 2 not gates.
Could this be the cause of the whole mess??

For now I have 3 games that crashes, any suggestion of some more I could try to see what happens?
Curiously the pirate Gradius 2 I have works just fine.

Re: Help fix a NES Clone (Phantom System)

Posted: Sun Nov 26, 2017 11:18 am
by Fisher
Again, I'm supposing a new possibility and asking if it makes sense:

On the clones that the games works as in the original NES and Famicom, the clock generator is made using basically 2 transistors and a Xtal.

In this clone that I'm having trouble it uses 2 not gates to generate it's clock.
Could this be the issue? Some thing going out of sync?

Also, the PPU clock comes from one transistor while the CPU comes from other.
What's the other transistor doing to the clock? Is it inverting it or it's just buffering?

Maybe I should try to replicate the original NES' clock generator as close as possible and see what happens...

Re: Help fix a NES clone (Phantom System)

Posted: Mon Dec 04, 2017 4:31 am
by Fisher
Some more news!!
First, I tried to socket the WRAM and have the same results.
Even with 3 different SRAM chips :-(

Them, I tried to build another clock generator and substitute the actual one.
I ended like this:
New Clock Gen
New Clock Gen

At first it seemed to be the deal, I was playing Crisis Force and everything was smooth.
Them the game froze for about a second, but continued. Weird!!
But when I arrived at the part near the 1st boss where the floor opens, it crashed!
I tried Megaman 2, and got he same Crashman's crash. Gradius was the same thing too.

So, with no other ideas, I just tried an original NES CPU I have from that flooded NES.
Intestingly, the games worked flawslessly!! Only Gradius is still giving me trouble.
By the logic, the problem would be on the clone's CPU.
I tested it on the other clone and again, it worked flawlessly! This time even Gradius worked fine.

Taking a better look at Gradius' board, after supposing it was some kind of protection related to the diodes that some of original famicom boards use without success, I noticed the the 74'161 pin 3 is with a steady voltage of 0.8V on the Phantom System, while in the other clone the same pin gets a voltage of around 4,5 volts.
I think this means that D0 is getting pulled to the logical level 0 on the Phantom System, while in the other clone it's floating, as it should in normal operation.
I tried some pullups on this pin and all that I could get was a non working game, that was cured as soon as I removed the resistor.
Could this possibly be ralated to a bus conflict?

Interstingly, there's an empty space on the board wich ressembles a 14pin IC and is like this:

Code: Select all

         O       O--Vcc
/ROMSEL--O       O

         O       O
         O       O

CPU R/W--O       O
PRG /CE--O       O

GND------O       O

The PRG /CE pin comes from the PRG epoxy ROM and is bridged to /ROMSEL. The other pins (including /ROMSEL) come from the cartrige edge connector.
I just could not imagine what IC should be put in there to possibly avoid bus conflicts, any suggestions?
Looks like I should try to cut the PRG ROM's /OE and add an inverter to R/W on it. Could this possibly solve the problem?
I just don't understand why this happens with an clone and not with another. :|

I thing this is really weird!! How come this stuff have trouble just like this!!?
I really hope that someone that is reading this can help me to throw some light on it, at least the Gradius problem...
Anyway, the problems are almost all solved! And I sincerelly hope that this discussion can be useful to someone else in the future.

Sorry for this big wall of text... :roll:
Thanks in advance.

Pictures of the Gradius' PCB.
Unfortunatelly it's not mine, but it's the same model.
Gradius cce - Componentes.png

Gradius cce - Solda.png

Mine is without the transistors and resistors, I added 2 diodes and is a lot more wornout.

Re: Help fix a NES Clone (Phantom System)

Posted: Mon Dec 04, 2017 8:37 pm
by lidnariq
Fisher wrote:Interstingly, there's an empty space on the board wich ressembles a 14pin IC and is like this:

Code: Select all

         O       O--Vcc
/ROMSEL--O       O

         O       O
         O       O

CPU R/W--O       O
PRG /CE--O       O

GND------O       O
I just could not imagine what IC should be put in there to possibly avoid bus conflicts, any suggestions?
That's for a 74'00.

pins 1,2, 3 -> invert /ROMSEL, generate +ROMSEL.

pins 4,5,6, evaluate NAND(+ROMSEL,+READ) → PRG/CE is only low if both ROMSEL and READ.

Re: Help fix a NES Clone (Phantom System)

Posted: Wed Dec 06, 2017 2:53 am
by Fisher
lidnariq wrote:That's for a 74'00.

Thanks! That was it.

Unfortunatelly that didn't solve the problem :-(
Now I'm sure it's not a bus conflict.

Just in case there's someone interested, i got p0rn pics from this board.
It is with the epoxy blobs, since I still want to make it work perfectly one day...
Component Side
Component Side

Solder side
Solder side

Interestingly the component side is placed on the back of the cartridge, while the solder side faces the cartridge's label.
If someone can try to throw an educated guess of what kind of transistors the CIC defeater circuit uses I'll also be glad, since I got this board without this circuit parts.

I also tried it with the GameGenie, same deal...
If someone have an idea, please, share.

Re: Help fix a NES Clone (Phantom System)

Posted: Wed Dec 06, 2017 7:30 pm
by krzysiobal
I read somewhere that circuit generator for crystal cannot be built using HC (CMOS) gates, there must be LS (TTL). Somewhere in time when I was tempted to build generator for my famicom i wanted to use gates due to less elements but I failed. The only trusting generator that always work is the 2 transistor one, from famicom schematics.
There are two transistors to buffer the signal and minimize interferences between them.

Also, I see you use sockets. When I bought lot of CPU/PPUs from aliexpress, I tested every one (using ZIF socket). Almost half of them did not work and I put them into `broken` parts bin. After some time I got idea of cleaning the pins with sharp knife to remove oxidation and most of the non-working chips started to work.

The nature of your problem sounds like somethink is floating and after time it get noise which breaks it. Maybe IRQ/NMI inputs of cpu are not pulled to VCC? Try also replacing PPU.

If you have chip tester (for example TL866), check if all those 74 chips from console are OK.
Image Image Image

Now the lockout - I would assume both are NPN with ECB pinout (for example 2S945).
It produces negative voltage spikes.
When PPU-D1=5V, T1.B = 0.7V, T1 is saturated, T2 is cut off, upper terminal of C1 gets preloaded through R1 to 5 V (so C1 preloads to 4.3V)
When PPU-D1=0V, base of T1 does not gets any more current and T1 becomes cut off, T2.B=5V, T2 becomes saturated, upper terminal of C1 drops to ~0V (C1 is preloaded to 4.3 from previous cycle), so lower terminal of C1 (and thus output) goes to -4.3V (but C1 is quickly discharged throught R2 and maybe because of breakdown voltage of T1.EB


Here is simulation:


Re: Help fix a NES Clone (Phantom System)

Posted: Sat Dec 09, 2017 5:54 pm
by Fisher
Thanks Krzysiobal! :beer:
It was a great help and I've restored the cartrige as it was, or what it should have been.
Not that it matters much, but...
I haven't test the output of the CIC defeater yet, but I think it should be just fine.

About the problem on the clone, except for testing every individual chip (since I don't have a tester), I've done everything you recommended.
I've exchanged all the socketed chips, including the CPU and PPU. I tried many combinations of the 3 couples I have and got the same results.
However I didn't test the CHR RAM and the latch, but I think the chances that they're involved with the problem are abysmal, aren't they?
I checked the pullups. They're there, they're showing continuity on both ends (VCC and CPU pin) and they're 10K. Should I lower them?
About the clock generator, I tried again the "spider" I've built with the same results.
I also cleaned the sockets and the chips. I remade some suspicious solder joints too, but again, no deal. :cry:
I really think that it must be something related to the PCB or some bad soldering, but just can't find exacly where it is.

Just by curiosity, I used TapeDump to dump the cartrige.
The NES file I've got ran fine on Nestopia and FCEU.
I think it's not fine fo post the ROM here, so, that's the CRC32 I've got:

Code: Select all

GRADIUS.NES = c1c040bf
GRADIUS.CHR = de963bec
GRADIUS.PRG = 25e485b8

I took a look at BootGod's site and find no Gradius version with matching CRC, weird!!
Could it be an undumped version? I don't know how to take a look at goodNES database :-(
By the title screen I think it's a japanese version:
GRADIUS-0.png (2.28 KiB) Viewed 3761 times

I used the same console that are giving me problems to dump.
For curiosity, I've padded the PRG ROM to 256kB, wrote to a flash and used my UNROM test board to boot it.
Except for the graphics corruption, the game ran fine.
I didn't played the game to the end either on an emulator or on the "new" flash.

This is getting even weirder!!

Re: Help fix a NES Clone (Phantom System)

Posted: Sat Dec 09, 2017 6:38 pm
by lidnariq
CHR is unchanged-

To search by CRC32, select [Search] / [ROMs] / [CRC-32 / SHA-1]

Re: Help fix a NES Clone (Phantom System)

Posted: Sun Dec 10, 2017 9:35 am
by Fisher
lidnariq wrote:CHR is unchanged

My bad!
Since I got the Konami one Gradius ten message, I assumed the CHR was edited. :mrgreen:
Maybe I misunderstood the meanings...
Konami one<br />Gradius ten
Konami one
Gradius ten
Gradius test.png (5.43 KiB) Viewed 3729 times

Or the ROM was (badly) edited...

Looks like my brain is not very multitask friendly, since I totally forgot I can generate an IPS patch to share the modifications made in the ROM. :oops:
I think that putting the file here won't be troublesome, at least not as posting the full ROM:
(37 Bytes) Downloaded 107 times

To be sure of the file's integrity:

Code: Select all

Original file:
Gradius (J).nes, CRC32 = 97c4eac3
Resulting file CRC32 = c1c040bf

Again, I'm out of ideas...
Is it a problem with the clone or with the cartrige?
Maybe the ROM is just a bit slow and something on this clone's board design makes this bug appear...
If I remember correctly, when this board was given to me years ago it was on the "works sometimes" bin.
I can try to get in touch with the guy who gave it to me, but I doubt if he would remember something about this.

Re: Help fix a NES Clone (Phantom System)

Posted: Sun Dec 10, 2017 10:12 am
by Gilbert
As the Konami logo and the copyright text are missing, that Gradius cart is indeed a hacked game.

Re: Help fix a NES Clone (Phantom System)

Posted: Sun Dec 10, 2017 11:24 am
by Fisher
I agree.
If I've looked at the PRG correctly, it has 22 zeroed bytes.

Code: Select all

Address    Original  Pirate     
00000734    61         00
00000736    0E         00
00000737    05         00
00000738    0F         00
00000739    02         00
0000073A    03         00
0000073B    11         00
0000073D    31         00
0000073E    39         00
0000073F    38         00
00000740    36         00
00000CC2    C0         00
00000CC3    C1         00
00000CC7    C0         00
00000CCB    D0         00
00000CCC    D1         00
00000CCD    D2         00
00000CCE    D3         00
00000CCF    D0         00
00000CD0    D1         00
00000CD1    D2         00
00000CD2    D3         00

I'm not sure if all them are to erase logo and copyright information.

I just don't understand why all this work.
Would this make the piracy harder to spot?

Re: Help fix a NES Clone (Phantom System)

Posted: Sun Dec 10, 2017 10:42 pm
by zxbdragon
Great!!!Every rom is useful

Re: Help fix a NES Clone (Phantom System)

Posted: Sun Dec 10, 2017 10:57 pm
by Gilbert
Fisher wrote:I just don't understand why all this work.
Would this make the piracy harder to spot?

It's just common practice (used to be, at least) for crackers/hackers/pirates to change or blank out copyright texts (or adding something like "cracked by your captain sparrow!"), even though this may not really help hiding the blatant act of piracy(actually it DOES help, when the pirated games are distributed to places where people are less aware of such info., ESPECIALLY in places where console clones dominate the market, that people may not even know about the original systems).
Also, Gradius came with almost no protection, so it's really easy to hack, like I've done 20 years ago.

Later games from Konami usually included harsher copy protections, which were usually triggered (especially) when someone tampered with their copyright text.

Re: Help fix a NES Clone (Phantom System)

Posted: Wed Dec 13, 2017 5:54 am
by Fisher
So, what to try next?
I have some ideas, but I'm just short in time:

- Totally disassemble the clone's board, clean, check for bad traces and put it back together. Very time consuming and possibly will take me nowhere.
- Put a buffer on the PRG ROM's output controlled through /ROMSEL, in this case, i think the PRG ROM can be always enabled. Good point since I probably can get the part from discarded boards but again, a high chance of unsuccess.
- Write a new PRG ROM and put on place of that one. Unfortunatelly, the smallest flash I could find is 64KB, wich will waste half of it if I do it.
- Change the LS part to an HC part. I doubt it would make such a big difference...
- Ask someone to design and make another board that fits on the case. Seems a good option, but probably would cost me money and I'm completelly broke :-(
- Buy an original oficial US NES. I think it's the best solution, but again they're not cheap here and...
- Forget this clone, take its cartridge connector out and put on the other clone that works. It's a nice idea, since some games that have smaller edge connectors don't work properly on the other clone, also there's something weird in the other clone's sound path. Maybe it's missing a transistor...

I really don't know what's the best thing to do.
Please, share your opinions.
Thanks in advance!!