| Previous | 199869 Revisions | Next |
| r19927 Saturday 29th December, 2012 at 17:48:04 UTC by Andrew Gardner |
|---|
| Reverted last change (nw). Will continue to stick to keeping my source changes to a minimum. |
| [src/emu/sound] | gaelco.c gaelco.h segapcm.c segapcm.h |
| r19926 | r19927 | |
|---|---|---|
| 5 | 5 | #include "emu.h" |
| 6 | 6 | #include "segapcm.h" |
| 7 | 7 | |
| 8 | #define BANK_256 (11) | |
| 9 | #define BANK_512 (12) | |
| 10 | #define BANK_12M (13) | |
| 11 | #define BANK_MASK7 (0x70<<16) | |
| 12 | #define BANK_MASKF (0xf0<<16) | |
| 13 | #define BANK_MASKF8 (0xf8<<16) | |
| 14 | 8 | |
| 15 | ||
| 16 | 9 | // device type definition |
| 17 | 10 | const device_type SEGAPCM = &device_creator<segapcm_device>; |
| 18 | 11 |
| r19926 | r19927 | |
|---|---|---|
| 7 | 7 | #ifndef __SEGAPCM_H__ |
| 8 | 8 | #define __SEGAPCM_H__ |
| 9 | 9 | |
| 10 | #define BANK_256 (11) | |
| 11 | #define BANK_512 (12) | |
| 12 | #define BANK_12M (13) | |
| 13 | #define BANK_MASK7 (0x70<<16) | |
| 14 | #define BANK_MASKF (0xf0<<16) | |
| 15 | #define BANK_MASKF8 (0xf8<<16) | |
| 10 | 16 | |
| 17 | ||
| 11 | 18 | //************************************************************************** |
| 12 | 19 | // INTERFACE CONFIGURATION MACROS |
| 13 | 20 | //************************************************************************** |
| r19926 | r19927 | |
|---|---|---|
| 249 | 249 | m_snd_data = *region(); |
| 250 | 250 | |
| 251 | 251 | /* init volume table */ |
| 252 | for (vol = 0; vol < VOLUME_LEVELS; vol++){ | |
| 252 | for (vol = 0; vol < GAELCO_VOLUME_LEVELS; vol++){ | |
| 253 | 253 | for (j = -128; j <= 127; j++){ |
| 254 | m_volume_table[vol][(j ^ 0x80) & 0xff] = (vol*j*256)/(VOLUME_LEVELS - 1); | |
| 254 | m_volume_table[vol][(j ^ 0x80) & 0xff] = (vol*j*256)/(GAELCO_VOLUME_LEVELS - 1); | |
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 |
| r19926 | r19927 | |
|---|---|---|
| 3 | 3 | #ifndef __GALELCO_H__ |
| 4 | 4 | #define __GALELCO_H__ |
| 5 | 5 | |
| 6 | const int GAELCO_NUM_CHANNELS = 0x07; | |
| 7 | const int VOLUME_LEVELS = 0x10; | |
| 6 | #define GAELCO_NUM_CHANNELS 0x07 | |
| 7 | #define GAELCO_VOLUME_LEVELS 0x10 | |
| 8 | 8 | |
| 9 | 9 | |
| 10 | 10 | //************************************************************************** |
| r19926 | r19927 | |
| 78 | 78 | UINT16 m_sndregs[0x38]; |
| 79 | 79 | |
| 80 | 80 | // Table for converting from 8 to 16 bits with volume control |
| 81 | INT16 m_volume_table[VOLUME_LEVELS][256]; | |
| 81 | INT16 m_volume_table[GAELCO_VOLUME_LEVELS][256]; | |
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | 84 | extern const device_type GAELCO_GAE1; |
| Previous | 199869 Revisions | Next |