Oh crap, that's probably the problem. Wow that was a bad mistake, I am thinking this microcontroller thing might have been a complete waste of effort because of that.... I know that I can't update the IO expanders that fast. Will have to rethink this I guess. Not sure, I might want to use a real Nintendo and flash PRG ROM now. That sucks...lidnariq wrote:Remember that Krzysiobal said that the timeout is 11us, not ms. You may need to have the PIC fake a series of dummy reads to some unrelated address (0 would be good) to speed things up enough.
Edit:
It takes me at least 74 usec to update an IO expander. I can't control precisely where each byte gets acknowledged and therefore makes it out to the IO expander pins. Deal breaker on that one. But there is always a way. I have these L'Empereurs, I will wire one up with a flashable PRG-ROM. I like not using the Nintendo because then I am in complete control of everything and I don't miss anything.
Edit 2:
I do have direct control of M2 and CPU R/W. In theory, I could keep M2 trotting along quite fast while setting up data and address busses and set/clear CPU R/W with high precision. But then reads get screwed up because I can't guarantee that the IO expander reads with M2 high. So I would have to make the CPU data bus all direct control too. Possible I guess but not sure I want to commit to invest more into this slow thing just yet. It is great for stuff that doesn't reset - Maybe it keep it as setup A for slow non-normal-NES controlled stuff and work on setup B with a real famicom. Setup B would not have been able to show us exactly how the scanline detection works, for example.
Edit 3:
You know, I don't have the +batt pin hooked up to anything -- I wonder if that is necessary in order to run the internal RAM? I will go back tomorrow and give that a try. Also, I will go ahead and give the hardware timer a try at this slow speed and see what happens.
Edit 4:
The +batt seems doubtful because I measured that pin tonight on a L'Empereur with a dead battery and it did not go up in voltage when run in a Famicom. I would have expected 5V to appear on this pin when running if it were necessary.