Garbled sprites on FDS

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Zycrow
Posts: 15
Joined: Tue Apr 29, 2014 2:47 pm

Re: Garbled sprites on FDS

Post by Zycrow »

Well, that answers some of our questions! :?

To answer yours, I have been powering my FDS with batteries. I believe I have an AC Adaptor that would be usable, based on Famicom World's guide, but I haven't tried it as of yet.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Garbled sprites on FDS

Post by koitsu »

The FDS AC adapter I have is the official one, with the following information:

Input: AC 100V, 50/60Hz, 9VA
Output: DC 9V 400mA
Polarity: Negative polarity, i.e. positive outer, negative inner

I use this on a standard US AC outlet without any problem (i.e. no 120V-->100V step-down transformer).
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Garbled sprites on FDS

Post by lidnariq »

Given my observation about how only some of the reflected sprites in SMB seem to be damaged ... I'm not convinced it's the disk drive.

But if it's not been tickled using ordinary cartridges also... I don't know? Could it be voltage supply sag?
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Garbled sprites on FDS

Post by koitsu »

Is it the same sprites every time, even between full system power-cycles?
Zycrow
Posts: 15
Joined: Tue Apr 29, 2014 2:47 pm

Re: Garbled sprites on FDS

Post by Zycrow »

It is the same sprites every time, yes.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Garbled sprites on FDS

Post by koitsu »

For those following thread: plan of action is to send my working FDS, FDS RAM adapter, FDS AC adapter, and an FDS game (Kid Icarus) to Zycrow so he can mix-and-match working pieces with his own system in attempt to find out which piece is malfunctioning.
LocalH
Posts: 180
Joined: Thu Mar 02, 2006 12:30 pm

Re: Garbled sprites on FDS

Post by LocalH »

If the only thing that's ever corrupted are sprites (which seems to be the case), that would seem to point to an issue with the PPU (possibly some bad logic when reading sprite tile data?). However, the fact that the system works with cart games would seem to rule that out, as I'm not aware that SMB and SMB2 have too many differences in their handling of OAM that would manifest here. I would suggest checking the RAM adapter for a bad address line or similar, but koitsu has already made that moot.

Not sure where the tiles are actually stored in CHR RAM for SMB2, but if it helps in deconding the relevant addresses, the incorrect tile in place of Mario's foot looks like the Mushroom Retainers' foot tile (which I'm pretty sure is also mirrored for both feet from the same tile). Perhaps it may be prudent to specifically check cart games that use CHR RAM? Games that use CHR ROM (like many early games) probably wouldn't exhibit the same problem in such a case.
Zycrow
Posts: 15
Joined: Tue Apr 29, 2014 2:47 pm

Re: Garbled sprites on FDS

Post by Zycrow »

I haven't received Koitsu's FDS yet, but when I do, I'll post a report of what configurations I try and how it all looks.
Zycrow
Posts: 15
Joined: Tue Apr 29, 2014 2:47 pm

Re: Garbled sprites on FDS

Post by Zycrow »

OK, you guys ready for some weirdness? I got Koitsu's hardware in the mail yesterday and this morning I did some tests.
Here are the results:

- My FDS with my RAM adapter (again): Garbling
- Koitsu's RAM adapter with my FDS: No garbling (tried all games)
- Koitsu's RAM adapter with his FDS: No garbling
- Koitsu's FDS with my RAM adapter: Garbling

I haven't done any tests regarding power supplies, but I think the results show something pretty clearly here. The problem lies with my Famicom unit and my RAM adapter, since my RAM worked perfectly on Koitsu's system. Crazy!
LocalH
Posts: 180
Joined: Thu Mar 02, 2006 12:30 pm

Re: Garbled sprites on FDS

Post by LocalH »

My suggestion is, if you have any of the games on this list (which contains all Famicom carts with CHR RAM) is to test one of those games and see if you also have corruption. The only thing to throw a wrench into that line of reasoning is that your FC worked with koitsu's RAM adapter but not your own. That should rule out the FC itself, except for the fact that your RAM adapter worked on koitsu's FCs but not your own.

Maybe it's an issue of dodgy pins on both your FC and your RAM adapter, but the pins aren't dodgy enough to fail when used with other hardware, but when used together you have a pin not making a connection at all. Sort of like how the Guitar Hero 3 guitars with removable necks inevitably get dodgy connector pins, but swapping necks can cause different behavior from the pins being worn differently.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Garbled sprites on FDS

Post by lidnariq »

What if the timing on the RAM in the adapter is really borderline, perhaps due to slight undervoltage, and the extra time taken in the PPU to flip a sprite is enough to get from "data arrived in time" to "didn't" ?
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Garbled sprites on FDS

Post by tepples »

But does it really take extra time in the PPU to flip a sprite horizontally? I thought it'd be just a mux between the flipped version of the sliver and the not-flipped version, selected by the H bit of the sprite's attribute 2. Vertical flip is just an XOR gate between the line-within-sprite and the V bit.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Garbled sprites on FDS

Post by koitsu »

Dang it -- this makes me wish I had sent you my Famicom AV (and AC adapter) as well. I thought about doing that just as a "worst-case scenario".

It really sounds like there's something physical going on with the combination of your FDS RAM adapter and your Famicom. It's probably something pin/edge-connector-related like what LocalH mentioned.

Also, did you try your FDS + my FDS AC adapter + your FDS RAM adapter? Part of me ponders voltage, since you're normally driving your FDS off of C batteries.

Another test would involve $$, and that'd be getting yourself another Famicom to see if the problem goes away.

This is where I wish all the hardware that's malfunctioning could be shipped to someone like, say, lidnariq or blargg to do all sorts of EE-related tests on it (dudes with oscilloscopes tend to be able to track strange things down, but I don't have the knowledge -- just a simple caveman... :-) )
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: Garbled sprites on FDS

Post by Bregalad »

So, if you exchange your RAM adapter with Koitsu's, you'll both end up with fully working FDSes, no ? Although it doesn't answer to why a particular combination doesn't work, honestly this is really crazy.

Getting a new Famicom or FDS is expensive, but plain RAM Adapters are very common and cheap on EBay (or at least were last time I checked), so it shouldn't be too hard to have a solid stock of a few adapters if there is a need to.

@koitsu : I honestly doubt this kind of problem would be "easy" to trace with an oscilloscope. You'd rather need a logic analyser and look at the timings on the CHR bus, but that equipment is much more expensive and complex to set up than a simple 2-trace analog oscilloscope.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Garbled sprites on FDS

Post by koitsu »

@Bregalad -- ahh okay. (See, EE isn't my thing... heh :-) )

Yeah, I suppose a worthwhile thing to do would be to buy an FDS RAM adapter off eBay or somewhere and try it out (using Zycrow's Famicom + FDS).

Part of me thinks it's got something to do with the edge connector contacts between the FDS RAM adapter and the Famicom, which could explain why Zycrow's FDS RAM adapter worked just fine on my Famicom AV. I should have tried wiggling it or applying more pressure to it while it was inserted. Zycrow, you might try that -- just try shifting around or applying a bit of pressure to your FDS RAM adapter while attached to your system (doesn't matter whose FDS from the sound of it).

If a replacement FDS RAM adapter fixes the problem, then it might be possible to repair the questionable one by replacing the cartridge connector in it.

For an unrelated yet equally bizarre-as-hell issue with someone's FDS RAM adapter, check out this thread at Famicomworld. It starts getting interesting (and into specific models of chips in the FDS RAM adapter that are glitchy/buggy in some way?) at the 2nd page. Ignore the crap on page 3 onward -- just adolescents fighting over nonsense -- although there is an interesting tidbit on page 5 (talking about FDS RAM adapters with two different kinds of CHR RAM chips I think).

P.S. -- Zycrow, there was something I noticed about your FDS RAM adapter -- one of the screws in one of the corners looked like it wasn't screwed in all the way. I didn't touch this/change it at all, but if you didn't open it then someone in the past may have, indicating someone may have tried to repair or fix something previously. Totally speculative, but thought I'd mention it.
Post Reply