Nintendo 64 RGB Blur fixing

The place for all discussion on gaming hardware
Post Reply
User avatar
RGB32E
Posts: 1400
Joined: Thu Nov 05, 2009 12:50 am

Re: Nintendo 64 RGB Blur fixing

Post by RGB32E »

andykara2003 wrote:Same - for me, just the ability to switch the effect on or off with a physical switch would be amazing.
Which is why Tim added 3 pads to the new/current v1.2 N64RGB:

Image
User avatar
bobrocks95
Posts: 3471
Joined: Mon Apr 30, 2012 2:27 am
Location: Kentucky

Re: Nintendo 64 RGB Blur fixing

Post by bobrocks95 »

The pads are there, but according to Tim's earlier post the firmware is the same version it was before that hardware revision, so it doesn't have the de-blur functionality unless I'm mistaken.
Last edited by bobrocks95 on Sun Jul 17, 2016 8:10 pm, edited 1 time in total.
PS1 Disc-Based Game ID BIOS patch for MemCard Pro and SD2PSX automatic VMC switching.
mvsfan
Posts: 1209
Joined: Sat Oct 06, 2012 12:24 am

Re: Nintendo 64 RGB Blur fixing

Post by mvsfan »

so the n64rgb has been redesigned with a new board, but the firmware hasnt yet?
borti4938

Re: Nintendo 64 RGB Blur fixing

Post by borti4938 »

That's correct. One may use pad 'A' to switch between de-blur in 240p on (pad open or tied to Vcc) and off (pad tied to GND) with this firmware.

I will open a new GitHub repository for the firmware (my latest one with minor code changes (due to my tests with the guess) and switchable de-blur for 240p) tomorrow. I will delete my current fork then a few days later.
Maybe I will take a last look into the heuristic guess or I will start concentrating on controller input sniffing (or nothing of both) :P
User avatar
bobrocks95
Posts: 3471
Joined: Mon Apr 30, 2012 2:27 am
Location: Kentucky

Re: Nintendo 64 RGB Blur fixing

Post by bobrocks95 »

borti4938 wrote:That's correct. One may use pad 'A' to switch between de-blur in 240p on (pad open or tied to Vcc) and off (pad tied to GND) with this firmware.

I will open a new GitHub repository for the firmware (my latest one with minor code changes (due to my tests with the guess) and switchable de-blur for 240p) tomorrow. I will delete my current fork then a few days later.
Maybe I will take a last look into the heuristic guess or I will start concentrating on controller input sniffing (or nothing of both) :P
Ah, forgot about your firmware Borti. I don't have a USB Blaster though so I'll probably still wait for Tim to offer a newer firmware. I feel like I'm going a bit in circles so far, personally speaking.
PS1 Disc-Based Game ID BIOS patch for MemCard Pro and SD2PSX automatic VMC switching.
User avatar
Guspaz
Posts: 3147
Joined: Tue Oct 06, 2015 7:37 pm
Location: Montréal, Canada

Re: Nintendo 64 RGB Blur fixing

Post by Guspaz »

USB Blasters cost $4 with free worldwide shipping, so... you can just buy one.
User avatar
bobrocks95
Posts: 3471
Joined: Mon Apr 30, 2012 2:27 am
Location: Kentucky

Re: Nintendo 64 RGB Blur fixing

Post by bobrocks95 »

And it'll take 2 months to get here, my assumption is that Tim will beat that time frame.
PS1 Disc-Based Game ID BIOS patch for MemCard Pro and SD2PSX automatic VMC switching.
User avatar
Guspaz
Posts: 3147
Joined: Tue Oct 06, 2015 7:37 pm
Location: Montréal, Canada

Re: Nintendo 64 RGB Blur fixing

Post by Guspaz »

It took mine 10 days to arrive. Ordered it on the 5th, and it arrived this Friday, the 15th.
User avatar
bobrocks95
Posts: 3471
Joined: Mon Apr 30, 2012 2:27 am
Location: Kentucky

Re: Nintendo 64 RGB Blur fixing

Post by bobrocks95 »

From a Chinese seller on ebay? Fair enough, might as well do that then.
PS1 Disc-Based Game ID BIOS patch for MemCard Pro and SD2PSX automatic VMC switching.
User avatar
Guspaz
Posts: 3147
Joined: Tue Oct 06, 2015 7:37 pm
Location: Montréal, Canada

Re: Nintendo 64 RGB Blur fixing

Post by Guspaz »

I bought this specific one:

http://www.ebay.com/itm/200943750380

Ordered on July 5th at 5:13 PM EST
Shipped from Shenzhen on July 6th at 5:16 PM EST
Left Hong Kong Post (no more tracking available) on July 7th at 3:06 PM EST
Arrived at my apartment in Montreal at some point on July 15th while I was at work.

Maybe I got lucky, but that was my experience.

I actually see that shipping is free to Canada, but is not free to the US. So they may not ship it via the same mechanism.
User avatar
mikejmoffitt
Posts: 629
Joined: Fri Jan 08, 2016 7:26 am
Location: Tokyo, Japan

Re: Nintendo 64 RGB Blur fixing

Post by mikejmoffitt »

Just a heads-up: you're going to have to bypass the driver signature enforcement on Windows 8 and up for those to work.
Image
User avatar
yxkalle
Posts: 135
Joined: Sun Feb 16, 2014 4:32 am
Location: Stockholm, Sweden

Re: Nintendo 64 RGB Blur fixing

Post by yxkalle »

I really wish Tim would design the board with a proper DAC instead of a R-2R-ladder. You need really precise laser trimmed resistors to get a good linear 7-bit DAC. 1% resistors are only good for 5 bits and below. As Wikipedia puts it:
Small inaccuracies in the MSB resistors can entirely overwhelm the contribution of the LSB resistors.
borti4938

Re: Nintendo 64 RGB Blur fixing

Post by borti4938 »

Please correct me if I'm wrong.
I would not care about the LSBs because the N64 uses a Gamma dither where the LSBs are just random values to get a very slight noise. One could think about just setting those (e.g. the 2 or 3 LSBs) to zero anyway.
User avatar
yxkalle
Posts: 135
Joined: Sun Feb 16, 2014 4:32 am
Location: Stockholm, Sweden

Re: Nintendo 64 RGB Blur fixing

Post by yxkalle »

It's mostly a problem in gradients. For example 100000 can turn out darker than 11111. I don't think discarding the LSB will look very good, but you could try it.
User avatar
mikejmoffitt
Posts: 629
Joined: Fri Jan 08, 2016 7:26 am
Location: Tokyo, Japan

Re: Nintendo 64 RGB Blur fixing

Post by mikejmoffitt »

Dropping the LSB won't make 100000 darker than 011111, it'll just make the gradient's steps more visible. What would cause problems is dropping the MSB, or any bit higher in weight than the LSB. An R-2R ladder is probably composed out of resistors from the same batch, so if they are inaccurate they are probably at least inaccurate together, which will in the end only affect the output impedance of the signal. R-2R ladders are all about proportions, not specific values. If the 2R parts are made out of a second resistor, though, there may be a problem.

Most of the games I tested didn't even use the LSB, though, opting for 15-bit color (5 bits per channel).
Image
borti4938

Re: Nintendo 64 RGB Blur fixing

Post by borti4938 »

nice to know that some of the game uses 15bit color. If I'm correct with the two LSBs (bit 0 and 1 are used for gamma dither in the case of 15bit color), the question is how to handle them.
Personally I have four options in mind:
  1. setting them to '0'
  2. setting them to '1'
  3. setting them equal to the bit 2 and 3
  4. setting them equal to bit 5 and 6
I attached a short simulation using the values given on viletims RGB board. Just to playing around with it.
Short discussion:
  • Method 1 and 2 always runs below and above the reference, respectively. This means a minor loss in the Vpp of around 16.4mV. I could live with that. The advantage is that these methods are monotonic and have a constant gradient with increasing number of bits 2 to 6.
  • Method 3 starts in every sector if four below the reference and ends above it. The worst behavior of all methods to my point of view as it is highly non-monotonic.
  • Method 4 starts below the reference and ends above the reference over the whole range. This method don't lose anything in Vpp, is monotonic but has three 'jumps' in the gradient (compared to method 1 and 2).
Different methods against the reference (full resolution of 7 bits)
Spoiler
Image

Zoom:
Image
Error of the different methods against the reference (full resolution of 7 bits)
Spoiler
Image

Zoom:
Image
Personally I would go for method 1 or 2. However, I want to mention that no difference should be noted if someone uses a e.g. a 4bit ADC (in front of an upscaling unit) behind the N64 anyway.
Last edited by borti4938 on Wed Feb 01, 2017 7:07 am, edited 1 time in total.
User avatar
yxkalle
Posts: 135
Joined: Sun Feb 16, 2014 4:32 am
Location: Stockholm, Sweden

Re: Nintendo 64 RGB Blur fixing

Post by yxkalle »

mikejmoffitt wrote:An R-2R ladder is probably composed out of resistors from the same batch, so if they are inaccurate they are probably at least inaccurate together, which will in the end only affect the output impedance of the signal.
Interesting. Is it really like that, that resistors from the same "batch" has a higher accuracy than ones picked at random? And can you be sure that two resistors next to eachother on the same reel were made in a succession? If so, I agree with you. I didn't knew that 15 bit color depth was most commonly used either.

This article describes pretty well what I thought was true about resistors: Actual values of 10% tolerance resistors
User avatar
Unseen
Posts: 724
Joined: Sun May 25, 2014 8:12 pm
Contact:

Re: Nintendo 64 RGB Blur fixing

Post by Unseen »

yxkalle wrote:Interesting. Is it really like that, that resistors from the same "batch" has a higher accuracy than ones picked at random?
Dave Jones did a Video on that, he got a gaussian distribution around the nominal value.
meneerbeer
Posts: 50
Joined: Thu Mar 26, 2015 9:14 am

Re: Nintendo 64 RGB Blur fixing

Post by meneerbeer »

If you pick ones from the same batch, then they will have had similar circumstances during production. For instance, all of them were produced while it was the same temperature in the fab/machine. This will give the resistors from the same batch a similar offset from the intended specification. On top of that, you have all kinds of variations that are random, which will give it the gaussian distribution Unseen linked to.

It is really similar to chips. Chips that are cut from the same wafer have a more similar speed than chips from a different wafer.
User avatar
mikejmoffitt
Posts: 629
Joined: Fri Jan 08, 2016 7:26 am
Location: Tokyo, Japan

Re: Nintendo 64 RGB Blur fixing

Post by mikejmoffitt »

It's also worth noting that an 'actual' DAC is going to be expensive in one of two ways. A parallel DAC would be easier to work with, but those can be pricy. On the other hand, a DAC with a serialized input would require the CPLD to run at a higher clock rate, and it would need to serialize the pixel data.
Image
User avatar
zeruel85
Posts: 150
Joined: Mon Nov 30, 2015 3:47 pm
Location: Italy

Re: Nintendo 64 RGB Blur fixing

Post by zeruel85 »

What about the GCVideo Lite in RGB mode for N64? It has an Exar triple Video DAC. Did someone give it a try?
User avatar
mikejmoffitt
Posts: 629
Joined: Fri Jan 08, 2016 7:26 am
Location: Tokyo, Japan

Re: Nintendo 64 RGB Blur fixing

Post by mikejmoffitt »

I'd expect it to work just as well as my PCB (also has an active triple video DAC). Without having been programmed to de-blur the image, though, it'll have the same blur as the normal N64 RGB solutions.

By the way, I'm not sure if I posted it, but I meant to make the N64 stuff I have public in case anyone wants to mess with it or play with introducing a detection heuristic: https://github.com/Mikejmoffitt/N6480/b ... _pixel.vhd
Image
Ikaruga11
Posts: 1454
Joined: Thu Apr 07, 2016 1:32 pm

Re: Nintendo 64 RGB Blur fixing

Post by Ikaruga11 »

No RGB De-blur :(
User avatar
andykara2003
Posts: 1338
Joined: Sat Apr 27, 2013 3:26 pm

Re: Nintendo 64 RGB Blur fixing

Post by andykara2003 »

We just have to be patient I think. We can't expect Tim & Borti to immediately drop everything and work on this as life gets in the way sometimes. I'm with you though - I bought mint PAL & NTSC N64s ready for this mod, but will wait until the guys are ready...
User avatar
zeruel85
Posts: 150
Joined: Mon Nov 30, 2015 3:47 pm
Location: Italy

Re: Nintendo 64 RGB Blur fixing

Post by zeruel85 »

Check borti4938's GitHub. He added new files for the N64RGB project. In these days I'm gonna test them. And I also have a nice feature to combine with it, if it'll work. :)
borti4938

Re: Nintendo 64 RGB Blur fixing

Post by borti4938 »

Just committed a few minutes ago - you are too fast man :D

I'll write a few words to it quite soon ;)
User avatar
zeruel85
Posts: 150
Joined: Mon Nov 30, 2015 3:47 pm
Location: Italy

Re: Nintendo 64 RGB Blur fixing

Post by zeruel85 »

borti4938 wrote:Just committed a few minutes ago - you are too fast man :D

I'll write a few words to it quite soon ;)
LOL, you're amazing and I always check for news about your projects. :D

Thanks for the hard work!

P.S.: my feature was to use the PIC12F629 that I've previously installed for N64 overclock, and to reassign pin 6 and pin 7 of the PIC to pin 99 and pin 100 from the CPLD MAXII. In this way I should be able to toggle De-Blur and 15bit color mode using the reset button, but your idea with the controller is far superior, congratulation! :)
borti4938

Re: Nintendo 64 RGB Blur fixing

Post by borti4938 »

Well, using the PIC is not a bad idea. However, you have to change the code a bit to have the opportunity to output low on both pins (6 and 7) as it is not used at the moment.

However - back to the new firmware:
As my heuristic guess implementation failed I decided to do something different. I end up with the controller for switching the de-blur in 240p on and off (default on) as well as the 15bit mode (default off). One can use (d-pad ri + L + R + C ri) to toggle de-blur on and off and (d-pad le + L + R + C le) to toggle the 15bit mode. The defaults are set on each power cycle.

To use the IGR one has to connect pin 100 of the CPLD (pad A) with the communication wire of controller 1. The is the middle pin on the ctrl. port or on most consoles pin 16 of the PIF-NUS.

At my latest test yesterday (viletims board v1.0) the controller switch worked. However, due to the lack of time I can only do short tests. If someone found a game / a certain situation where the IGR does not work or toggle de-blur / 15bit mode without pressing the given button combination or any other strange behaviors, please report this to me (with as much information as possible, such that I can hopefully reproduce it). :)

Pin 99 of the CPLD (pad M) is currently unused. But I planned to implement a reset there. Yesterday it didn't work - I hope it was just a bad solder joint or something like that ;)

BTW:
I have connected yesterday my testing N64 directly to the TV (without any scaler in between) and for me it seems that the picture in the 15bit mode is less noisy (as expected). Will further test it with some other games and will put it probably as the default in future releases.
User avatar
LDigital
Posts: 346
Joined: Sun Jan 17, 2016 9:15 am

Nintendo 64 RGB Blur fixing

Post by LDigital »

Any idea when the pre flashed deblur kits will be available to buy?
User avatar
bobrocks95
Posts: 3471
Joined: Mon Apr 30, 2012 2:27 am
Location: Kentucky

Re: Nintendo 64 RGB Blur fixing

Post by bobrocks95 »

What does 15-bit color mode do?
LDigital wrote:Any idea when the pre flashed deblur kits will be available to buy?
As I talked with Guspaz at the top of this page, if you have the skills to install the board, getting a USB Blaster clone is cheap and easy to use.
PS1 Disc-Based Game ID BIOS patch for MemCard Pro and SD2PSX automatic VMC switching.
Post Reply