Search found 1848 matches

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

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
by Disch
Sun Dec 31, 2017 12:31 am
Forum: SNESdev
Topic: How does SNES (mode 7) rotate tile pixels internally?
Replies: 13
Views: 8710

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...
by Disch
Thu Dec 28, 2017 11:33 pm
Forum: SNESdev
Topic: Is there any SMP test ROM/SPC file?
Replies: 3
Views: 4187

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

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

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...
by Disch
Wed Jan 25, 2017 7:34 pm
Forum: NESemdev
Topic: APU pulse channel pitch sounds low
Replies: 2
Views: 3123

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 ...
by Disch
Sat Jan 21, 2017 1:39 am
Forum: NESemdev
Topic: PPU Rendering Techniques
Replies: 1
Views: 4329

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 h...
by Disch
Sat Jan 21, 2017 1:30 am
Forum: NESemdev
Topic: $2002 reads
Replies: 10
Views: 6850

Re: $2002 reads

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

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

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...
by Disch
Wed Jan 18, 2017 10:44 pm
Forum: NESemdev
Topic: $2002 reads
Replies: 10
Views: 6850

Re: $2002 reads

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...
by Disch
Mon Jan 16, 2017 5:39 pm
Forum: Newbie Help Center
Topic: How To Create a Ready Timer For Pong
Replies: 4
Views: 3332

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 ...
by Disch
Tue Dec 27, 2016 4:48 pm
Forum: NESemdev
Topic: Wiki: conflicting info ($4017 writes)
Replies: 19
Views: 12550

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...
by Disch
Tue Dec 27, 2016 1:24 pm
Forum: NESemdev
Topic: Wiki: conflicting info ($4017 writes)
Replies: 19
Views: 12550

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...
by Disch
Tue Dec 27, 2016 12:39 pm
Forum: NESemdev
Topic: Wiki: conflicting info ($4017 writes)
Replies: 19
Views: 12550

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...
by Disch
Mon Dec 26, 2016 9:25 pm
Forum: NESemdev
Topic: Wiki: conflicting info ($4017 writes)
Replies: 19
Views: 12550

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 ...
by Disch
Mon Dec 26, 2016 7:01 pm
Forum: NESemdev
Topic: Wiki: conflicting info ($4017 writes)
Replies: 19
Views: 12550

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. ...