It is currently Sat Nov 18, 2017 8:20 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Nov 13, 2017 8:08 pm 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 245
Location: Poland
One man gave me NTSC NES to fix. The problem was that all games were running correctly, but instead of background - there was just random checkboard of tiles (sprites are displayed correctly). At first glance I thought that VRAM is broken, but no.. it is the PPU itself!

Image

I replaced it with UA6528 and all works fine, but I kept that broken PPU for myself. Because I have not many NTSC PPUs in my collection -> I thought it would be good exercise to take closer look at the problem and maybe fix it.

So for all CHR-ROM games, it displays just random set of sprites:
Image

But if it's CHR-RAM game, there is complete mess:
Image

So now I was sure that PPU has problems with writing to its external memory. I thought that maybe !WR signal is broken, but no - it is asserted correctly. Then I wrote simple testing program that forces PPU to write 0 to consecutive addresses (attachment):
Code:
   set_ppu_addr_to $0000
loop:
   lda #0
   sta PPUDATA
   jmp loop

and I viewed signals on logic analyzer what is going on (and compared them against another working PPU).

Good PPU (second photo is magnified view at the moment data is driven)
Image Image

Bad PPU:
Image

Now I was sure - PPU is not driving its data bus with data to be written, so instead of data.. low 8 bits of address are written!

Because the data that PPU writes to its memory always comes from CPU (and it is always from $2007), I thought of making small addon board that would latch all writes to $2007 and when !WE is asserted - output it, instead of `invalid` PPU data - good idea?
What about games that make use of raster effects?

Image


Attachments:
hello_instant_load.asm [1.43 KiB]
Downloaded 1 time
Top
 Profile  
 
PostPosted: Tue Nov 14, 2017 10:03 am 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 245
Location: Poland
Haha, it works! I've projected the PCB as I described:
Image

But then I changed my mind and replaced buffer with just 8x1k resistors, because I wanted everything to fit under broken PPU:
Image Image

Image Image Image Image Image Image Image

I even left place for soldering deglitching cap and /WE delay, but just ommited them -> everything works perfect! Welcome to second life, mr PPU =)


Top
 Profile  
 
PostPosted: Tue Nov 14, 2017 10:33 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6442
Location: UK (temporarily)
Nicely done!


Top
 Profile  
 
PostPosted: Tue Nov 14, 2017 8:10 pm 
Online
User avatar

Joined: Mon Oct 06, 2014 5:09 pm
Posts: 27
Location: Joisey City, New Joisey (NTSC)
I’m in awe!

Have you tried any games with raster effects?

I wonder what kind of internal fault would cause this behavior by the PPU...


Top
 Profile  
 
PostPosted: Wed Nov 15, 2017 12:10 pm 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 245
Location: Poland
I tested it against:

RasterChromaLuma.NES
RasterTest1.NES
RasterTest2.NES
RasterTest3.NES
RasterTest3a.NES
RasterTest3b.NES
RasterTest3c.NES
RasterTest3d.NES
RasterTest3e.NES

and results are the same like on UA6528 (NTSC-clone PPU).

Sometimes when I load any of those demos, background is blinking black-white (as visible in attached video) but after restarting console, it is displayed correctly so maybe those demos are sensible for CPU/PPU cycle allignment.

Comparision video - First half - fixed RP2C02, second half: UA6528
https://www.youtube.com/watch?v=XSraj76AYvQ


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group