## Search found 1848 matches

Tue Jan 02, 2018 9:23 pm
Forum: SNESdev
Topic: How does SNES (mode 7) rotate tile pixels internally?
Replies: 13
Views: 7896

### Re: How does SNES (mode 7) rotate tile pixels internally?

Wow... I must be blind. The portion of Anomie's doc that I copy/pasted clearly shows the delta approach:

Code: Select all

``````          X[x,y] = X[x-1,y] + A
Y[x,y] = Y[x-1,y] + C
``````
Sun Dec 31, 2017 12:31 am
Forum: SNESdev
Topic: How does SNES (mode 7) rotate tile pixels internally?
Replies: 13
Views: 7896

### Re: How does SNES (mode 7) rotate tile pixels internally?

It does more or less the same thing as all 3D rendering systems: it has a transformation matrix. The typical way to think of a transformation matrix is you have a vector which holds your X,Y position of a pixel. You multiply that vector by a matrix to get a new vector, which is the new position afte...
Thu Dec 28, 2017 11:33 pm
Forum: SNESdev
Topic: Is there any SMP test ROM/SPC file?
Replies: 3
Views: 3897

### Re: Is there any SMP test ROM/SPC file?

Awesome. Thanks.
Thu Dec 28, 2017 8:14 pm
Forum: SNESdev
Topic: Is there any SMP test ROM/SPC file?
Replies: 3
Views: 3897

### Is there any SMP test ROM/SPC file?

I'm writing a dinky little SPC player for funsies and I have some bugs in my SMP code. Are there any test ROMs (preferably in SPC file format -- as that's easy to load) I can use to help track them down? I searched for forums and found a thread from back in 2012 where kevtris talked about writing on...
Wed Jan 25, 2017 7:34 pm
Forum: NESemdev
Topic: APU pulse channel pitch sounds low
Replies: 2
Views: 2894

### Re: APU pulse channel pitch sounds low

You **MUST** do some form of down sampling. The NES outputs ~1790 KHz but you'll usually only want to output ~48 Khz (or 44KHz). Outputting 1 sample every ~40 clocks is one form of downsampling (commonly referred to as "nearest neighbor"). It will work but will be very low quality. If the pitch soun...
Sat Jan 21, 2017 1:39 am
Forum: NESemdev
Topic: PPU Rendering Techniques
Replies: 1
Views: 4031

### Re: PPU Rendering Techniques

#3 is unworkable since most games will at least split the screen somewhere for a status bar -- meaning this approach will fail miserably for those games. The "logging writes" approach sounds good, until you realize that it doesn't solve the problem of \$2002 reads for things like sprite-0 hit... and ...
Sat Jan 21, 2017 1:30 am
Forum: NESemdev
Replies: 10
Views: 6295

if C just replace 'class' with 'struct'.

C++ is basically just C with goodies.
Fri Jan 20, 2017 10:13 am
Forum: NESemdev
Topic: A/V synchronization
Replies: 36
Views: 17382

### Re: A/V synchronization

In my emulator I allow the option. If you choose to sync to video frame rate, it will produce more or less audio to match.... which can be accomplished by running audio channels for more/fewer cycles as needed without actually changing the clock rate. This is complicated by the DMC, which has CPU-vi...
Wed Jan 18, 2017 10:44 pm
Forum: NESemdev
Replies: 10
Views: 6295

If you want some ideas: I have a 'Cpu' class and a 'Bus' class. When reading/writing, the Cpu class will call into the Bus class which will actually perform the read/write. Other parts of the system can hook into the Bus by adding callbacks for a specific range of addresses. So your PPU can tell the...
Mon Jan 16, 2017 5:39 pm
Forum: Newbie Help Center
Topic: How To Create a Ready Timer For Pong
Replies: 4
Views: 3013

### Re: How To Create a Ready Timer For Pong

Code executes as fast as the CPU can run it. Your 'ReadyTimerInc' loop is not waiting any significant amount of time --- each iteration does not represent a 'frame' like you seem to want it to. To wait for a full frame to pass, the general approach is to wait for an NMI to trigger. Another approach ...
Tue Dec 27, 2016 4:48 pm
Forum: NESemdev
Topic: Wiki: conflicting info (\$4017 writes)
Replies: 19
Views: 11703

### Re: Wiki: conflicting info (\$4017 writes)

Cool. I'm in the same boat as you, rainwarrior. Final question: I'm not super familiar with wikis. Is there like a separate 'temporary' area where I can build a page (or series of pages) on the wiki before replacing the existing pages? I'm thinking if this was something like git or some other versio...
Tue Dec 27, 2016 1:24 pm
Forum: NESemdev
Topic: Wiki: conflicting info (\$4017 writes)
Replies: 19
Views: 11703

### Re: Wiki: conflicting info (\$4017 writes)

I have this hunch that if you don't implement all the 2A03 peripherals on the 900kHz timebase, you'll never be able to accurately emulate the DPCM read glitches. Well there's two approaches. Either you use 900kHz and allow of half cycle granularity ... or you use 1.8MHz and keep track of even/odd c...
Tue Dec 27, 2016 12:39 pm
Forum: NESemdev
Topic: Wiki: conflicting info (\$4017 writes)
Replies: 19
Views: 11703

### Re: Wiki: conflicting info (\$4017 writes)

And once again, when you find there is something wrong or inconsistent, like this information about \$4017, once you've learned the truth, go back and fix it. Don't just complain about it!!! I'd love to. Sign me up. I'd be happy with doing some work to clean up the APU pages and adding a page on DMA...
Mon Dec 26, 2016 9:25 pm
Forum: NESemdev
Topic: Wiki: conflicting info (\$4017 writes)
Replies: 19
Views: 11703

### Re: Wiki: conflicting info (\$4017 writes)

Let me cut in with a little extra because I don't want to sound like a complainer. I love the wiki. It is infinitely better than a random mishmash of old docs and scattered forum posts. I know how much work it is to get a wiki up and running, keeping it maintained with constantly updating info, and ...
Mon Dec 26, 2016 7:01 pm
Forum: NESemdev
Topic: Wiki: conflicting info (\$4017 writes)
Replies: 19
Views: 11703

### Re: Wiki: conflicting info (\$4017 writes)

the frame counter reset and the quarter/half frame triggers happen simultaneously, but only on "odd" cycles (and only after the first "even" cycle after the write occurs) Sooo... the wiki is wrong about this too, then, because it says the quarter/half clocks happen immediately. Thanks Zepper. Regar...