Search found 161 matches
- Wed May 15, 2019 7:25 am
- Forum: NESdev
- Topic: Efficient technique for improving DMC timing accuracy
- Replies: 20
- Views: 17482
Re: Efficient technique for improving DMC timing accuracy
You still have to generate the synchronization i.e. there's still no magic to restart the FIFO. Synchronization only needs to happen once-- ever --if one never lets the DMC run dry. Individual IRQ responses may have up to 7 cycles of uncertainty, depending upon the longest opcode that may be runnin...
- Tue May 14, 2019 4:21 pm
- Forum: NESdev
- Topic: Efficient technique for improving DMC timing accuracy
- Replies: 20
- Views: 17482
Efficient technique for improving DMC timing accuracy
Most of the approaches I've seen described for using DMC interrupts for raster timing require compensation for some rather large timing uncertainties. From what I can tell, at least on MESEN and my own console, there's a much easier and more efficient technique. I haven't figured out the best way to...
- Tue May 14, 2019 9:40 am
- Forum: Newbie Help Center
- Topic: Techniques to detect scanline
- Replies: 14
- Views: 13613
Re: Techniques to detect scanline
dougeff, your description completely omits the compensation for the APU-PPU desynchronization, which is the "heart" of this technique. Without this compensation, there's not nearly enough precision to do raster effects (the time at which the IRQ fired can vary by up to 4 scanlines). This ...
- Tue May 14, 2019 8:34 am
- Forum: NESdev
- Topic: Very strange comparison behavior
- Replies: 15
- Views: 16320
Re: Very strange comparison behavior
Can anybody please tell me how a proper comparison of an unsigned int variable with a constant value (that is also in the range of unsigned int) has to look like in assembly, so that I can write it in inline assembly? There are a number of optimal variations for different constant values. For (cons...
- Mon May 13, 2019 12:52 am
- Forum: NESdev
- Topic: Is this raster-split demo stable on NTSC Famiclones?
- Replies: 2
- Views: 8716
Is this raster-split demo stable on NTSC Famiclones?
i just wrote a little table-driven test which uses DMC interrupts to produce raster splits at mostly-eight-line intervals. For purposes of this demo, the raster IRQ simply changes the RGB emphasis bits (as as to make the effects visible in the screen borders) and all stores occur the same amount of ...
- Sun May 12, 2019 10:20 pm
- Forum: General Stuff
- Topic: "Modern compilers will outperform handwritten assembly."
- Replies: 19
- Views: 18173
Re: "Modern compilers will outperform handwritten assembly."
Also if you wait long enough things that everybody implements anyway do usually eventually make it into the standard spec . Only if it's something that the authors of the Standard hadn't expected to be supported by any compiler writers who weren't being deliberately obtuse. Unfortunately, the autho...
- Sun May 12, 2019 10:05 pm
- Forum: NES Hardware and Flash Equipment
- Topic: Placing register at PPU memory for multi-cart, possible?
- Replies: 8
- Views: 11475
Re: Placing register at PPU memory for multi-cart, possible?
BUT IT DIDN'T WORK! I watched the Q0~Q3 of 74'161 using LEDs to show the status and noticed that: 1. Data latched successfully. 2. Once switched to the selected game, data on Q0~Q3 disappeared immediately(all 0). Then the game crashed. Removed the OR gate and tried again: 1. Data latched successful...
- Sun May 12, 2019 10:59 am
- Forum: NES Hardware and Flash Equipment
- Topic: circuitry explanation for a cart hardware fix
- Replies: 8
- Views: 10806
Re: circuitry explanation for a cart hardware fix
They didn't really reevaluate what they were doing after the Famicom; they just stuck an extra 10 pins on to subsume the FDS cable, and another 4 for the CIC. There's lots of little things that seem obvious in hindsight that would have either saved money or simplified certain things afterwards. Add...
- Sat May 11, 2019 4:10 pm
- Forum: NES Hardware and Flash Equipment
- Topic: circuitry explanation for a cart hardware fix
- Replies: 8
- Views: 10806
Re: circuitry explanation for a cart hardware fix
It'll delay reads from and writes to RAM by a little bit. If there's a glitch because /ROMSEL arrives later than M2, and that glitch causes an erroneous write to RAM when the game tries to set the IRQ, then the capacitor might help with that. Slower RAMs should also work. I wonder why the NES decid...
- Sat May 11, 2019 4:07 pm
- Forum: General Stuff
- Topic: "Modern compilers will outperform handwritten assembly."
- Replies: 19
- Views: 18173
Re: "Modern compilers will outperform handwritten assembly."
I think the cases where people even try to hand-write assembly, and to optimize it, are now so rare that basically no engineers are able to do that anymore. The performance gain is not just the code but the time it takes to actually hand-write highly performing assembly code. In the industry it's n...
- Sat May 11, 2019 10:16 am
- Forum: NES Hardware and Flash Equipment
- Topic: Placing register at PPU memory for multi-cart, possible?
- Replies: 8
- Views: 11475
Re: Placing register at PPU memory for multi-cart, possible?
The signal on /LOAD needs to become valid after the signal on CLK, so I think you have the roles of /PPUWR and PPUA13 reversed. While what you drew could work, it would preclude the use of CHRAM. I think I'd favor triggering on addresses in the range $3000-$3FFF. If you're only using this thing for ...
- Sat May 11, 2019 9:57 am
- Forum: NESdev
- Topic: posting code in hopes of peer reviews.
- Replies: 21
- Views: 17290
Re: posting code in hopes of peer reviews.
i think if the incoming ID to the subroutine is #0 or otherwise has no modulo left from AND #7, a BNE would have the Y-loop wrap around for 255 more iterations. [ There are two approaches one can take here: plan on the loop running 1-8 times, or handle the zero-case specially and then have it loop ...
- Sat May 11, 2019 9:42 am
- Forum: General Stuff
- Topic: "Modern compilers will outperform handwritten assembly."
- Replies: 19
- Views: 18173
Re: "Modern compilers will outperform handwritten assembly."
I think that's a very small part of programming though; and even then, you could write assembly macros that would generate the optimum code for the needed array size. If you decide to change the array size, there's no need to re-write the code that calls the macros. I've had macro definitions that ...
- Fri May 10, 2019 2:50 pm
- Forum: General Stuff
- Topic: "Modern compilers will outperform handwritten assembly."
- Replies: 19
- Views: 18173
Re: "Modern compilers will outperform handwritten assembly."
I suspect the idea that compilers can outperform handwritten assembly comes from modern 32- and 64-bit multi-core high-end processors that have super-complex instructions, deep pipelines that must be kept full, multi-level cache, out-of order execution, and things that simply don't apply to the 650...
- Fri May 10, 2019 11:52 am
- Forum: NESdev
- Topic: posting code in hopes of peer reviews.
- Replies: 21
- Views: 17290
Re: posting code in hopes of peer reviews.
Your code looks fine to me. I'd be tempted to replace the loop with a lookup table, which would be faster and I think might be clearer, but it shouldn't matter. I don't think dey affects condition flags, so the loop exit condition is wrong. Also, if y holds a value 0 to 7 and the accumulator holds ...