What's new
Really good topic!
I also met this kind of bad U2 NAND issue on a CV-1000D board.
It's a long story.
I bid one issue DDP-SDOJ board on Yahoo Auction 2 years ago at a low price. The seller described that the game almost 100% freezes at character selection. There was little chance that the game could be played through.
I did some test after i received it. The game would randomly hang when playing demo. And it would 100% freeze after selecting any of the 3 characters. I reboot the board many times and only 1 time i could play through the game without any issue. I didn't find any graphic glitch in game, either.
I checked the board under microscope, nothing abnormal.
At first, I thought there might be some problem with the DRAM chips on board.
I bought brand new DRAM chips and replaced them all on board, but the issue was still there.

I didn't have a clue where the problem really comes from.
Then I thought if there was any data corruption in the NOR and NAND chips. But there was no SDOJ game rom available on internet at that time.
I temporarily give up repairing this board and kept it in the drawer.

By chance, i got another good CV-1000D board this year. I decided to continue repairing the issue DDP-SDOJ board.
I did a swap test , I moved the 4 SDOJ rom chips to the good CV-1000D board, and the same issue was still there. So I could confirm there was data corruption in any of the 4 chips.
DDP-SDOJ mame rom is now available on internet. I downloaded a copy and tried to burn the data into new NAND/NOR chips with a NAND programmer.
I first burned U2 chip and did a quick test. The game was OK and could be played through without issue.
So moved the rom chips back to the original CV-1000D PCB. Yeah! It's completely back to normal. I played many times in the following few days, no more freeze issue occurred.
 
I wrote a Python script "u2_compare.py" to identify bad U2 assets from a U2 dump of a faulty PCB by comparing to a known good U2 dump, such as a MAME ROM set, relocate the bad assets to free NAND blocks, and generate replacement NAND blocks for writing to the PCB via JTAG using buffi's tools. I've posted the script on Github. I haven't tested it on PCB yet, but the fixed U2 appears to work in MAME.

Link:
https://github.com/alamone/u2_compare

Here's a sample output of the script:

D:\console\Projects\CAVE CV1000\cv1k_research-main\U2_ExtractData>py u2_compare.py u2-original u2 u2-fixed
Starting
Reading u2-original...done.
Reading u2...done.

Asset #960: data mismatch!
TOC entry position = 4440

Original:
NAND Block = 15E
Block Offset = 1AC9E
File Offset = 2D38C9E
Size = E1A7

Test:
NAND Block = 15E
Block Offset = 1AC9E
File Offset = 2D38C9E
Size = E1A7

Asset 960 crosses block boundary, stored on blocks 15E and 15F

Asset #990: data mismatch!
TOC entry position = 4620

Original:
NAND Block = 16B
Block Offset = 15BAD
File Offset = 2EE0BAD
Size = E750

Test:
NAND Block = 16C
Block Offset = 15BAD
File Offset = 2F01BAD
Size = E750

Asset 990 crosses block boundary, stored on blocks 16C and 16D

Bad assets:
960
990

Bad blocks:
15F
16D

Bad assets detected, attempting fix.
Starting free NAND block 2D3, offset 5D33000
Fixing Asset #960
Relocating block 15E to 2D3 using data from original block 15E
Relocating block 15F to 2D4 using data from original block 15F
Fixing Asset #990
Relocating block 16C to 2D5 using data from original block 16B
Relocating block 16D to 2D6 using data from original block 16C
Writing u2-fixed...done.

These blocks need to be written to NAND:
block-0.bin
block-723.bin
block-724.bin
block-725.bin
block-726.bin

Done.
 
Update - I applied the fix to the PCB and it appears to have been fixed, the glitches that used to happen don't appear.

Here's an example of the commands that would be applied to write the NAND blocks. In my example I had to remove the bad block check from buffi's tool since the PCB had bad blocks already.
sudo python3 K9F1G08U0M_JTAG.py write_block --block 0 --filename block-0.bin
sudo python3 K9F1G08U0M_JTAG.py write_block --block 723 --filename block-723.bin
sudo python3 K9F1G08U0M_JTAG.py write_block --block 724 --filename block-724.bin
sudo python3 K9F1G08U0M_JTAG.py write_block --block 725 --filename block-725.bin
sudo python3 K9F1G08U0M_JTAG.py write_block --block 726 --filename block-726.bin
 
Update - I applied the fix to the PCB and it appears to have been fixed, the glitches that used to happen don't appear.

Here's an example of the commands that would be applied to write the NAND blocks. In my example I had to remove the bad block check from buffi's tool since the PCB had bad blocks already.

Fantastic addition to an already excellent CV1000 toolset - thank you @alamone and @buffi for creating and sharing these recovery tools!
 
Back
Top