Search found 248 matches

by Bisqwit
Mon Oct 17, 2011 5:23 am
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

beannaich wrote:

Code: Select all

for (scanline = 241; ; scanline = scanline < 260 ? scanline + 1 : -1) {
...
}
Oh. That is completely irrelevant. If just means that the reset state begins from vblank rather than from the pre-render line. The tests are designed to ignore that aspect.
by Bisqwit
Mon Oct 17, 2011 5:17 am
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

beannaich wrote:Does the timing change if you don't start at scanline 241? That's the only real difference I can see between your PPU and mine. I start at scanline -1.
Start what?
by Bisqwit
Mon Oct 17, 2011 4:40 am
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

How are you handling $4014? In the way shown above. When a write to $4014 is encountered, 256 reads and writes will be issued, each consuming one cpu tick (three ppu ticks). The write() call will therefore last 256*2+1 = 513 cpu cycles total (instead of the normal 1 cpu cycle), plus the additional ...
by Bisqwit
Mon Oct 17, 2011 2:48 am
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

http://bisqwit.iki.fi/src/nesemu1_vbl_test_skeleton.cc Here is a link to my V-Blank / NMI timing test skeleton, stripped of all features not related to V-Blank / NMI timing testing (370 lines remain). It can be used to run Blargg's tests. Note that it does not include any graphical / audio output. ...
by Bisqwit
Sun Oct 16, 2011 11:23 pm
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

Are you clearing the sprite 0 hit only when rendering begins? I'd believe the test ROM's would fail for that but you never know, good luck. I initially cleared it at the same time as I clear the vblank flag, but in order to make the "sprite_hit_tests_2005.10.05" test "09.timing_basic...
by Bisqwit
Sun Oct 16, 2011 9:14 pm
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

beannaich wrote:I'd also make sure you check the contents of your OAM and $2003, sprite 0 reordering might also be causing SMB to hang.

Do you pass the sprite overflow tests?
Yes, all OAM related tests. Thanks for the suggestions, I'll look into them.
by Bisqwit
Sun Oct 16, 2011 5:12 pm
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

I have another problem... My emulator causes the game to crash. This nice 187 kilobyte animated screenshot illustrates the problem. Repeat frames were removed from the first part to bring the intro faster to motion. http://bisqwit.iki.fi/kala/snap/nesemu1_smbfail.gif When the mushroom appears, the g...
by Bisqwit
Sun Oct 16, 2011 4:31 pm
Forum: NESemdev
Topic: PPUSTATUS lower bits
Replies: 8
Views: 3145

Re: PPUSTATUS lower bits

1. How many bits are written to PPUSTATUS as a result of data being written into a PPU register - 4 bits or 5 bits? I'm not aware of any test ROM for PPU open bus behavior, and I'm not aware of any game that depends on it. I think it has something to do with how the pin drivers are set up inside th...
by Bisqwit
Sun Oct 16, 2011 1:12 pm
Forum: NESemdev
Topic: NTSC color palette emulation, with the square wave modulator
Replies: 149
Views: 95797

Yeah, I would like to, but I don't have the information about how either the PAL NES or the PAL circuitry works. Well, the latter I can find out. The PAL color subcarrier is exactly 4,433,618.75 Hz. The PAL NES master clock is six times that, and the PPU generates one pixel for every 5 master clock ...
by Bisqwit
Sun Oct 16, 2011 10:34 am
Forum: NESemdev
Topic: NTSC color palette emulation, with the square wave modulator
Replies: 149
Views: 95797

Where accuracy is concerned, I am not entirely sure whether the overall hue for my palette is correct. I assumed that it begins from 0.000 degrees, but this assumption may be wrong. It just looks neat in code, and authentic on the screen as well. It may also depend on the particular TV/display devic...
by Bisqwit
Sat Oct 15, 2011 3:57 pm
Forum: NESemdev
Topic: NTSC color palette emulation, with the square wave modulator
Replies: 149
Views: 95797

tool

http://bisqwit.iki.fi/utils/nespalette.php -- create and download tailor made NTSC palette with this tool. EDIT: The closest match to mr. Firebrandx's palette that can be generated by my tool is by selecting hue -0.081, saturation level 1.53, contrast 0.94, brightness 1.07 and gamma 1.99. (Brute for...
by Bisqwit
Sat Oct 15, 2011 5:42 am
Forum: NESemdev
Topic: [My emulator] Graphics glitches - SuperMarioBros
Replies: 44
Views: 14874

Re: oddly green

Thanks for the help. Though I already mentioned it in IRC; I got it working.
Turns out my PPU rendering loop was changing the nametable address mid-frame even while background rendering was disabled.
by Bisqwit
Sat Oct 15, 2011 3:26 am
Forum: NESemdev
Topic: NTSC color palette emulation, with the square wave modulator
Replies: 149
Views: 95797

I changed the color order to same as Blargg's and added the sawtooth scanline effect (the graphics is generated by native code, not NES code). Oddly, the color-de-emphasis bits are issued in a different order. I don't know why Blargg used that particular order. Are mine possibly wrong? His seem to b...
by Bisqwit
Fri Oct 14, 2011 2:50 pm
Forum: NESemdev
Topic: NTSC color palette emulation, with the square wave modulator
Replies: 149
Views: 95797

Ok. Made the single-attenuator code default, and added brightness and contrast controls. The single-attenuator code is mathematically unequivocal even in the presence of multiple de-emphasis bits. Now can someone confirm whether the outcome from this de-emphasis code actually agrees with observation...
by Bisqwit
Fri Oct 14, 2011 12:12 pm
Forum: NESemdev
Topic: NTSC color palette emulation, with the square wave modulator
Replies: 149
Views: 95797

Here is a version with saturation and hue controls (as function parameters). I don't know what the tint control could possibly be that differs from hue. If you want to adjust the de-emphasis bits, they are the bits 6,7,8 of the "pixel" parameter. To adjust the hue by N°, pass N * 12 / 360 ...