src/emu/sound/sn76496.c
| r7003 | r7004 | |
| 16 | 16 | ** SN76489 uses a 15-bit shift register with taps on bits D and E, output on E, |
| 17 | 17 | XOR function; SN94624 is identical to SN76489. |
| 18 | 18 | It uses a 15-bit ring buffer for periodic noise/arbitrary duty cycle. |
| 19 | | ** SN76489A uses a 16-bit shift register with taps on bits D and E, output on F, |
| 19 | ** SN76489A uses a 15-bit shift register with taps on bits D and E, output on F, |
| 20 | 20 | XNOR function |
| 21 | | It uses a 16-bit ring buffer for periodic noise/arbitrary duty cycle. |
| 21 | It uses a 15-bit ring buffer for periodic noise/arbitrary duty cycle. |
| 22 | 22 | ** SN76494 and SN76496 are PROBABLY identical in operation to the SN76489A |
| 23 | 23 | They have an audio input line which is mixed with the 4 channels of output. |
| 24 | 24 | ** Sega Master System III/MD/Genesis PSG uses a 16-bit shift register with taps |
| r7003 | r7004 | |
| 70 | 70 | based on testing. Got rid of R->OldNoise and fixed taps accordingly. |
| 71 | 71 | Added stereo support for game gear. |
| 72 | 72 | |
| 73 | 11/01/2010 : Lord Nightmare |
| 74 | Fix an issue with SN76489 and SN76489A having the wrong periodic noise periods. |
| 75 | Note that properly emulating the noise cycle accurately may require extensive rewriting. |
| 76 | |
| 73 | 77 | TODO: * Implement the TMS9919 which is an earlier version, possibly |
| 74 | 78 | lacking the /8 clock divider, of the SN76489, and hence would |
| 75 | 79 | have a max clock of 500Khz and 4 clocks per sample, as opposed to |
| r7003 | r7004 | |
| 79 | 83 | * Test the NCR7496; Smspower says the whitenoise taps are A and E, |
| 80 | 84 | but this needs verification on real hardware. |
| 81 | 85 | * Factor out common code so that the SAA1099 can share some code. |
| 86 | * Implement periodic noise as using a pointer to a table rather than a |
| 87 | self feeding lfsr. Kold666's recording of dorunrun proves this is the |
| 88 | right way. |
| 82 | 89 | ***************************************************************************/ |
| 83 | 90 | |
| 84 | 91 | #include "sndintrf.h" |
| r7003 | r7004 | |
| 403 | 410 | |
| 404 | 411 | static DEVICE_START( sn76489 ) |
| 405 | 412 | { |
| 406 | | generic_start(device, 0x8000, 0x06, FALSE, FALSE, FALSE); // todo: verify; assumed to be the same as sn94624 |
| 413 | generic_start(device, 0x4000, 0x03, FALSE, FALSE, FALSE); // todo: verify; assumed to be the same as sn94624 |
| 407 | 414 | } |
| 408 | 415 | |
| 409 | 416 | static DEVICE_START( sn76489a ) |
| 410 | 417 | { |
| 411 | | generic_start(device, 0x10000, 0x0C, TRUE, FALSE, FALSE); // verified by plgdavid |
| 418 | generic_start(device, 0x4000, 0x03, TRUE, FALSE, FALSE); // verified by plgdavid |
| 412 | 419 | } |
| 413 | 420 | |
| 414 | 421 | static DEVICE_START( sn76494 ) |
| 415 | 422 | { |
| 416 | | generic_start(device, 0x10000, 0x0C, TRUE, FALSE, FALSE); // todo: verify; assumed to be the same as sn76489a |
| 423 | generic_start(device, 0x4000, 0x03, TRUE, FALSE, FALSE); // todo: verify; assumed to be the same as sn76489a |
| 417 | 424 | } |
| 418 | 425 | |
| 419 | 426 | static DEVICE_START( sn76496 ) |
| 420 | 427 | { |
| 421 | | generic_start(device, 0x10000, 0x0C, TRUE, FALSE, FALSE); // todo: verify; assumed to be the same as sn76489a |
| 428 | generic_start(device, 0x4000, 0x03, TRUE, FALSE, FALSE); // todo: verify; assumed to be the same as sn76489a |
| 422 | 429 | } |
| 423 | 430 | |
| 424 | 431 | static DEVICE_START( sn94624 ) |
| 425 | 432 | { |
| 426 | | generic_start(device, 0x10000, 0x0C, FALSE, FALSE, FALSE); // verified by plgdavid |
| 433 | generic_start(device, 0x4000, 0x03, FALSE, FALSE, FALSE); // verified by plgdavid |
| 427 | 434 | } |
| 428 | 435 | |
| 429 | 436 | static DEVICE_START( ncr7496 ) |