Search found 115 matches

by ArsonIzer
Tue Feb 03, 2015 2:19 pm
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

Update: I fixed the bug that makes the emulator pick the wrong pattern table from the CHR data in a rom. This fixes a lot of the wrong graphics, but some MMC1 ROMs still crash (double dragon, abadox), and some still have confusing nametable issues (mega man 2, final fantasy, adventures in the magic ...
by ArsonIzer
Sun Jan 18, 2015 4:35 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

When the PPU is disabled (sprite/background rendering turned off), make sure that the PPU renderer is not modifying the V and T loopy registers; only the CPU should be messing around with them. Yes, I saw your thread about that, but that's not the case with mine. I made a 100% sure that it doesn't ...
by ArsonIzer
Sat Jan 17, 2015 3:17 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

zeroone wrote:As an experiment, run the CPU much longer in the VBlank period (~75000 CPU cycles).
I tried running the PPU only one cycle per CPU cycle while VBlank is active, i.e. the CPU runs 3 times faster/the PPU runs 3 times slower during VBlank. This does not have any effect on any of the games.
by ArsonIzer
Mon Jan 12, 2015 12:19 pm
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

I haven't touched the NES for several months again, so bear with me if I seem forgetful. @ArsonIzer I ran into exactly the same problem that you are experiencing with MMC1 with my experimental NES emulator. The images generated by my emulator look identical to yours. I managed to solve the problem d...
by ArsonIzer
Sat Jun 21, 2014 3:53 pm
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

It may seem like a waste of time at this point to implement stuff like a nametable viewer, pattern table viewer, hex editor (CPU/PPU memory), etc, but if you did implement them, you would probably end up saving time in the long run. It doesn't seem like a waste of time at all. I'm just the kind of ...
by ArsonIzer
Sat Jun 21, 2014 2:45 pm
Forum: NESemdev
Topic: NES vs GB(C) (vs SNES vs GBA) in terms of emulation?
Replies: 25
Views: 9696

Re: NES vs GB(C) (vs SNES vs GBA) in terms of emulation?

How long did it take you (and everyone else here) to make your first ever emulator? 1 day sounds pretty insane. I wrote the first iteration of my NES emulator in about a week or two. Basic mappers, mediocre accuracy, no sound. That's really quick. I assume you had a lot of experience with programmi...
by ArsonIzer
Sat Jun 21, 2014 2:24 pm
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

For that, I guess someone might need to write a specific MMC1 test. Do you have a nametable viewer, PPU memory hex viewer, etc. in your emulator? No, no and no. Right now I'm comparing logs (my emu vs nintendulator) with a test called mmc1_a12.nes. I'm not sure what exactly it tests, but it makes m...
by ArsonIzer
Sat Jun 21, 2014 7:23 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

Try making a graph of on which frames the beeper is on by drawing a pixel as light if it's on or dark if it's off. You should see the dots and dashes of Morse code emerge from that. Holy crap. I didn't make a graph but I simply filled a string with dots and spaces and this ended up being the morse ...
by ArsonIzer
Sat Jun 21, 2014 5:17 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

That or log the timing and value of writes to $4008, so that you can at least tell when the key makes and breaks. I did this. I have no clue how the APU works but I got writes alternating between 0 and 176. This was the output (delay being the amount of ms between each write to 0x4008): *beep* data...
by ArsonIzer
Fri Jun 20, 2014 10:54 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

Did you get a black screen with beeped Morse code, or a black screen with silence? I have no APU. Do I have to implement sound for this? That could take a while since I don't even have a basic understanding of audio. Is there something else I could do, for instance make a CPU log and check it again...
by ArsonIzer
Fri Jun 20, 2014 9:41 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

@cpow Thanks for the explanation. I'm now masking it with 0x1E. The issue remains though, but I don't think the graphics problems have anything to do with that. Mega Man 2 for instance, uses only 1 CHR bank and since it's combined with modulo chrCount, whatever number comes out, it's always going to...
by ArsonIzer
Fri Jun 20, 2014 7:11 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

I'm not sure you need the >>>1 on the 8KB CHR-switching case. My MMC1 implementation uses the register bits identically for 8KB or 4KB switching, and I don't see graphics messed up like that. From the wiki: Select 4 KB or 8 KB CHR bank at PPU $0000 ( low bit ignored in 8 KB mode ) If I don't do tha...
by ArsonIzer
Fri Jun 20, 2014 5:33 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

Hard to say. Note that many games like Mega Man 2 use CHR-RAM, so usually they'll use the 8 KB banking mode. Since Mega Man 2 crashes after a while, there could be a bug unrelated to CHR banking as well. Mega Man 2 never crashes, the graphics are just f'd up. Here's what happens further into the ga...
by ArsonIzer
Fri Jun 20, 2014 3:10 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Re: Why does my MMC1 mapper act like this?

Quite obviously your CHR bankswitching is wrong, so just keep looking. private void setBanks() { //4K CHR banks if (isSet(control, 4)) { switchCHR(4, (chrReg0 & 0x1F) % chrCount, 0); switchCHR(4, (chrReg1 & 0x1F) % chrCount, 1); } else { switchCHR(8, ((chrReg0 & 0x1F) >>> 1) % chrCount, 0); } if (!...
by ArsonIzer
Fri Jun 20, 2014 1:47 am
Forum: NESemdev
Topic: Why does my MMC1 mapper act like this?
Replies: 37
Views: 16681

Why does my MMC1 mapper act like this?

A couple of months ago I tried implementing MMC1 and I got suck on it for a while, got demotivated, and had a break from the NES. Now I'm trying to get things rolling again and I thought I'd ask about it here. My MMC1 mapper messes up pretty much every game. My other mappers (0, 2, 3, 7) work perfec...