| Forum Index | FAQ | New User | Login | Search |
![]() |
| Subject | DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | blargg | |
| Posted on | 11/24/03 12:33 PM | |
| From IP | 199.170.89.44 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Memblers | |
| Posted on | 11/24/03 9:46 PM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | blargg | |
| Posted on | 11/25/03 06:31 AM | |
| From IP | 199.170.89.189 | |
|
dec irq_count ; reset wave every N IRQs For the Tetris song, 8 IRQs are used per wave period, but it's not kept at max volume, so most of the time it's at 0. This seems to reduce bass a bit. I tried lessening the slope per DMC sample by using a non-zero value (i.e. $00 gives -16, $10 gives -12, $22 gives -8, etc.) but then when it was silent it was still toggling and resulted in an audible high pitch. This could be avoided by switching to an zero DMC sample once the wave hit the bottom, but I wasn't interested in dealing with that complexity yet. | ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Memblers | |
| Posted on | 11/25/03 10:40 AM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | blargg | |
| Posted on | 11/25/03 2:59 PM | |
| From IP | 199.170.89.22 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Anonymous | |
| Posted on | 11/25/03 4:15 PM | |
| From IP | 165.173.124.92 | |
|
| ||
| Subject | Re: verifying DMC IRQ timing ![]() |
|
| Posted by | blargg | |
| Posted on | 11/25/03 10:41 PM | |
| From IP | 199.170.89.41 | |
|
| ||
| Subject | Re: verifying DMC IRQ timing ![]() |
|
| Posted by | Xodnizel | |
| Posted on | 11/25/03 11:01 PM | |
| From IP | 68.86.57.74 | |
|
| ||
| Subject | Re: verifying DMC IRQ timing ![]() |
|
| Posted by | Memblers | |
| Posted on | 11/26/03 11:07 AM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: verifying DMC IRQ timing ![]() |
|
| Posted by | Memblers | |
| Posted on | 11/27/03 07:25 AM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU | |
| Posted by | Anonymous | |
| Posted on | 11/27/03 11:09 PM | |
| From IP | 130.236.154.216 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | blargg | |
| Posted on | 11/28/03 06:52 AM | |
| From IP | 199.170.89.63 | |
|
_ _ A: Start DMC. Immediate IRQ. Set DMC to start again after current sample finishes. | ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Anonymous | |
| Posted on | 11/28/03 11:34 AM | |
| From IP | 130.236.245.71 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Memblers | |
| Posted on | 11/28/03 7:41 PM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | blargg | |
| Posted on | 11/28/03 11:30 PM | |
| From IP | 199.170.89.112 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Memblers | |
| Posted on | 12/3/03 10:37 PM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | blargg | |
| Posted on | 12/4/03 00:21 AM | |
| From IP | 199.170.89.178 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | tepples | |
| Posted on | 12/4/03 04:32 AM | |
| From IP | 68.53.188.31 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Memblers | |
| Posted on | 12/4/03 06:00 AM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: DMC Saw and Square without hogging CPU ![]() |
|
| Posted by | Disch | |
| Posted on | 12/4/03 08:19 AM | |
| From IP | 66.127.105.177 | |
|
| ||
| Subject | Finally works on NES hardware! ![]() |
|
| Posted by | blargg | |
| Posted on | 12/4/03 09:35 AM | |
| From IP | 199.170.89.94 | |
|
![]() Even though the shape of the wave is (slightly) different for each note, they sound about the same. This was my concern when I had mentioned this idea a few days ago. This method seems to be literally the only way to do this without using a lot of CPU time. The only improvement to this scheme I can think of is changing the DMC frequency of individual sample bit cycles, rather than every DMC sample byte (i.e. every 8 sample bit cycles). This would require a delay loop in the IRQ handler, and precise timing to wait until a single sample bit has played. I plan on updating the web page and posting the source to the Tetris music player. | ||
| Subject | Re: Finally works on NES hardware! ![]() |
|
| Posted by | tepples | |
| Posted on | 12/4/03 4:21 PM | |
| From IP | 68.53.188.31 | |
|
| ||
| Subject | Re: Finally works on NES hardware! ![]() |
|
| Posted by | blargg | |
| Posted on | 12/5/03 00:21 AM | |
| From IP | 199.170.89.35 | |
|
| ||
| Subject | Re: Finally works on NES hardware! ![]() |
|
| Posted by | tepples | |
| Posted on | 12/5/03 01:30 AM | |
| From IP | 68.53.188.31 | |
|
| ||
| Subject | Re: Finally works on NES hardware! ![]() |
|
| Posted by | Memblers | |
| Posted on | 12/6/03 01:32 AM | |
| From IP | 68.58.99.218 | |
|
| ||
| Subject | Re: Finally works on NES hardware! ![]() |
|
| Posted by | blargg | |
| Posted on | 12/6/03 10:46 PM | |
| From IP | 199.170.89.108 | |
|
| ||
| Subject | Re: Finally works on NES hardware! ![]() |
|
| Posted by | blargg | |
| Posted on | 12/7/03 09:27 AM | |
| From IP | 199.170.89.70 | |
|
| ||
| Subject | Re: Finally works on NES hardware! ![]() |
|
| Posted by | Memblers | |
| Posted on | 12/7/03 10:33 PM | |
| From IP | 68.58.99.218 | |
|
| ||
![]() ![]() ![]() ![]() ![]() |