trunk/src/emu/sound/t6w28.c
| r18565 | r18566 | |
| 37 | 37 | |
| 38 | 38 | #define STEP 0x10000 |
| 39 | 39 | |
| 40 | | struct t6w28_state |
| 40 | WRITE8_MEMBER( t6w28_device::write ) |
| 41 | 41 | { |
| 42 | | sound_stream * Channel; |
| 43 | | int SampleRate; |
| 44 | | int VolTable[16]; /* volume table */ |
| 45 | | INT32 Register[16]; /* registers */ |
| 46 | | INT32 LastRegister[2]; /* last register written */ |
| 47 | | INT32 Volume[8]; /* volume of voice 0-2 and noise */ |
| 48 | | UINT32 RNG[2]; /* noise generator */ |
| 49 | | INT32 NoiseMode[2]; /* active noise mode */ |
| 50 | | INT32 FeedbackMask; /* mask for feedback */ |
| 51 | | INT32 WhitenoiseTaps; /* mask for white noise taps */ |
| 52 | | INT32 WhitenoiseInvert; /* white noise invert flag */ |
| 53 | | INT32 Period[8]; |
| 54 | | INT32 Count[8]; |
| 55 | | INT32 Output[8]; |
| 56 | | }; |
| 57 | | |
| 58 | | |
| 59 | | INLINE t6w28_state *get_safe_token(device_t *device) |
| 60 | | { |
| 61 | | assert(device != NULL); |
| 62 | | assert(device->type() == T6W28); |
| 63 | | return (t6w28_state *)downcast<t6w28_device *>(device)->token(); |
| 64 | | } |
| 65 | | |
| 66 | | |
| 67 | | WRITE8_DEVICE_HANDLER( t6w28_w ) |
| 68 | | { |
| 69 | | t6w28_state *R = get_safe_token(device); |
| 70 | 42 | int n, r, c; |
| 71 | 43 | |
| 72 | 44 | |
| 73 | 45 | /* update the output buffer before changing the registers */ |
| 74 | | R->Channel->update(); |
| 46 | m_channel->update(); |
| 75 | 47 | |
| 76 | 48 | offset &= 1; |
| 77 | 49 | |
| 78 | 50 | if (data & 0x80) |
| 79 | 51 | { |
| 80 | 52 | r = (data & 0x70) >> 4; |
| 81 | | R->LastRegister[offset] = r; |
| 82 | | R->Register[offset * 8 + r] = (R->Register[offset * 8 + r] & 0x3f0) | (data & 0x0f); |
| 53 | m_last_register[offset] = r; |
| 54 | m_register[offset * 8 + r] = (m_register[offset * 8 + r] & 0x3f0) | (data & 0x0f); |
| 83 | 55 | } |
| 84 | 56 | else |
| 85 | 57 | { |
| 86 | | r = R->LastRegister[offset]; |
| 58 | r = m_last_register[offset]; |
| 87 | 59 | } |
| 88 | 60 | c = r/2; |
| 89 | 61 | switch (r) |
| r18565 | r18566 | |
| 91 | 63 | case 0: /* tone 0 : frequency */ |
| 92 | 64 | case 2: /* tone 1 : frequency */ |
| 93 | 65 | case 4: /* tone 2 : frequency */ |
| 94 | | if ((data & 0x80) == 0) R->Register[offset * 8 + r] = (R->Register[offset * 8 + r] & 0x0f) | ((data & 0x3f) << 4); |
| 95 | | R->Period[offset * 4 + c] = STEP * R->Register[offset * 8 + r]; |
| 96 | | if (R->Period[offset * 4 + c] == 0) R->Period[offset * 4 + c] = STEP; |
| 66 | if ((data & 0x80) == 0) m_register[offset * 8 + r] = (m_register[offset * 8 + r] & 0x0f) | ((data & 0x3f) << 4); |
| 67 | m_period[offset * 4 + c] = STEP * m_register[offset * 8 + r]; |
| 68 | if (m_period[offset * 4 + c] == 0) m_period[offset * 4 + c] = STEP; |
| 97 | 69 | if (r == 4) |
| 98 | 70 | { |
| 99 | 71 | /* update noise shift frequency */ |
| 100 | | if ((R->Register[offset * 8 + 6] & 0x03) == 0x03) |
| 101 | | R->Period[offset * 4 + 3] = 2 * R->Period[offset * 4 + 2]; |
| 72 | if ((m_register[offset * 8 + 6] & 0x03) == 0x03) |
| 73 | m_period[offset * 4 + 3] = 2 * m_period[offset * 4 + 2]; |
| 102 | 74 | } |
| 103 | 75 | break; |
| 104 | 76 | case 1: /* tone 0 : volume */ |
| 105 | 77 | case 3: /* tone 1 : volume */ |
| 106 | 78 | case 5: /* tone 2 : volume */ |
| 107 | 79 | case 7: /* noise : volume */ |
| 108 | | R->Volume[offset * 4 + c] = R->VolTable[data & 0x0f]; |
| 109 | | if ((data & 0x80) == 0) R->Register[offset * 8 + r] = (R->Register[offset * 8 + r] & 0x3f0) | (data & 0x0f); |
| 80 | m_volume[offset * 4 + c] = m_vol_table[data & 0x0f]; |
| 81 | if ((data & 0x80) == 0) m_register[offset * 8 + r] = (m_register[offset * 8 + r] & 0x3f0) | (data & 0x0f); |
| 110 | 82 | break; |
| 111 | 83 | case 6: /* noise : frequency, mode */ |
| 112 | 84 | { |
| 113 | | if ((data & 0x80) == 0) R->Register[offset * 8 + r] = (R->Register[offset * 8 + r] & 0x3f0) | (data & 0x0f); |
| 114 | | n = R->Register[offset * 8 + 6]; |
| 115 | | R->NoiseMode[offset] = (n & 4) ? 1 : 0; |
| 85 | if ((data & 0x80) == 0) m_register[offset * 8 + r] = (m_register[offset * 8 + r] & 0x3f0) | (data & 0x0f); |
| 86 | n = m_register[offset * 8 + 6]; |
| 87 | m_noise_mode[offset] = (n & 4) ? 1 : 0; |
| 116 | 88 | /* N/512,N/1024,N/2048,Tone #3 output */ |
| 117 | | R->Period[offset * 4 + 3] = ((n&3) == 3) ? 2 * R->Period[offset * 4 + 2] : (STEP << (5+(n&3))); |
| 89 | m_period[offset * 4 + 3] = ((n&3) == 3) ? 2 * m_period[offset * 4 + 2] : (STEP << (5+(n&3))); |
| 118 | 90 | /* Reset noise shifter */ |
| 119 | | R->RNG[offset] = R->FeedbackMask; /* this is correct according to the smspower document */ |
| 120 | | //R->RNG = 0xF35; /* this is not, but sounds better in do run run */ |
| 121 | | R->Output[offset * 4 + 3] = R->RNG[offset] & 1; |
| 91 | m_rng[offset] = m_feedback_mask; /* this is correct according to the smspower document */ |
| 92 | //m_rng = 0xF35; /* this is not, but sounds better in do run run */ |
| 93 | m_output[offset * 4 + 3] = m_rng[offset] & 1; |
| 122 | 94 | } |
| 123 | 95 | break; |
| 124 | 96 | } |
| r18565 | r18566 | |
| 126 | 98 | |
| 127 | 99 | |
| 128 | 100 | |
| 129 | | static STREAM_UPDATE( t6w28_update ) |
| 101 | //------------------------------------------------- |
| 102 | // sound_stream_update - handle a stream update |
| 103 | //------------------------------------------------- |
| 104 | |
| 105 | void t6w28_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) |
| 130 | 106 | { |
| 131 | 107 | int i; |
| 132 | | t6w28_state *R = (t6w28_state *)param; |
| 133 | 108 | stream_sample_t *buffer0 = outputs[0]; |
| 134 | 109 | stream_sample_t *buffer1 = outputs[1]; |
| 135 | 110 | |
| r18565 | r18566 | |
| 137 | 112 | /* If the volume is 0, increase the counter */ |
| 138 | 113 | for (i = 0;i < 8;i++) |
| 139 | 114 | { |
| 140 | | if (R->Volume[i] == 0) |
| 115 | if (m_volume[i] == 0) |
| 141 | 116 | { |
| 142 | 117 | /* note that I do count += samples, NOT count = samples + 1. You might think */ |
| 143 | 118 | /* it's the same since the volume is 0, but doing the latter could cause */ |
| 144 | 119 | /* interferencies when the program is rapidly modulating the volume. */ |
| 145 | | if (R->Count[i] <= samples*STEP) R->Count[i] += samples*STEP; |
| 120 | if (m_count[i] <= samples*STEP) m_count[i] += samples*STEP; |
| 146 | 121 | } |
| 147 | 122 | } |
| 148 | 123 | |
| r18565 | r18566 | |
| 159 | 134 | |
| 160 | 135 | for (i = 2;i < 3;i++) |
| 161 | 136 | { |
| 162 | | if (R->Output[i]) vol[i] += R->Count[i]; |
| 163 | | R->Count[i] -= STEP; |
| 164 | | /* Period[i] is the half period of the square wave. Here, in each */ |
| 165 | | /* loop I add Period[i] twice, so that at the end of the loop the */ |
| 137 | if (m_output[i]) vol[i] += m_count[i]; |
| 138 | m_count[i] -= STEP; |
| 139 | /* m_period[i] is the half period of the square wave. Here, in each */ |
| 140 | /* loop I add m_period[i] twice, so that at the end of the loop the */ |
| 166 | 141 | /* square wave is in the same status (0 or 1) it was at the start. */ |
| 167 | | /* vol[i] is also incremented by Period[i], since the wave has been 1 */ |
| 142 | /* vol[i] is also incremented by m_period[i], since the wave has been 1 */ |
| 168 | 143 | /* exactly half of the time, regardless of the initial position. */ |
| 169 | | /* If we exit the loop in the middle, Output[i] has to be inverted */ |
| 144 | /* If we exit the loop in the middle, m_output[i] has to be inverted */ |
| 170 | 145 | /* and vol[i] incremented only if the exit status of the square */ |
| 171 | 146 | /* wave is 1. */ |
| 172 | | while (R->Count[i] <= 0) |
| 147 | while (m_count[i] <= 0) |
| 173 | 148 | { |
| 174 | | R->Count[i] += R->Period[i]; |
| 175 | | if (R->Count[i] > 0) |
| 149 | m_count[i] += m_period[i]; |
| 150 | if (m_count[i] > 0) |
| 176 | 151 | { |
| 177 | | R->Output[i] ^= 1; |
| 178 | | if (R->Output[i]) vol[i] += R->Period[i]; |
| 152 | m_output[i] ^= 1; |
| 153 | if (m_output[i]) vol[i] += m_period[i]; |
| 179 | 154 | break; |
| 180 | 155 | } |
| 181 | | R->Count[i] += R->Period[i]; |
| 182 | | vol[i] += R->Period[i]; |
| 156 | m_count[i] += m_period[i]; |
| 157 | vol[i] += m_period[i]; |
| 183 | 158 | } |
| 184 | | if (R->Output[i]) vol[i] -= R->Count[i]; |
| 159 | if (m_output[i]) vol[i] -= m_count[i]; |
| 185 | 160 | } |
| 186 | 161 | |
| 187 | 162 | for (i = 4;i < 7;i++) |
| 188 | 163 | { |
| 189 | | if (R->Output[i]) vol[i] += R->Count[i]; |
| 190 | | R->Count[i] -= STEP; |
| 191 | | /* Period[i] is the half period of the square wave. Here, in each */ |
| 192 | | /* loop I add Period[i] twice, so that at the end of the loop the */ |
| 164 | if (m_output[i]) vol[i] += m_count[i]; |
| 165 | m_count[i] -= STEP; |
| 166 | /* m_period[i] is the half period of the square wave. Here, in each */ |
| 167 | /* loop I add m_period[i] twice, so that at the end of the loop the */ |
| 193 | 168 | /* square wave is in the same status (0 or 1) it was at the start. */ |
| 194 | | /* vol[i] is also incremented by Period[i], since the wave has been 1 */ |
| 169 | /* vol[i] is also incremented by m_period[i], since the wave has been 1 */ |
| 195 | 170 | /* exactly half of the time, regardless of the initial position. */ |
| 196 | | /* If we exit the loop in the middle, Output[i] has to be inverted */ |
| 171 | /* If we exit the loop in the middle, m_output[i] has to be inverted */ |
| 197 | 172 | /* and vol[i] incremented only if the exit status of the square */ |
| 198 | 173 | /* wave is 1. */ |
| 199 | | while (R->Count[i] <= 0) |
| 174 | while (m_count[i] <= 0) |
| 200 | 175 | { |
| 201 | | R->Count[i] += R->Period[i]; |
| 202 | | if (R->Count[i] > 0) |
| 176 | m_count[i] += m_period[i]; |
| 177 | if (m_count[i] > 0) |
| 203 | 178 | { |
| 204 | | R->Output[i] ^= 1; |
| 205 | | if (R->Output[i]) vol[i] += R->Period[i]; |
| 179 | m_output[i] ^= 1; |
| 180 | if (m_output[i]) vol[i] += m_period[i]; |
| 206 | 181 | break; |
| 207 | 182 | } |
| 208 | | R->Count[i] += R->Period[i]; |
| 209 | | vol[i] += R->Period[i]; |
| 183 | m_count[i] += m_period[i]; |
| 184 | vol[i] += m_period[i]; |
| 210 | 185 | } |
| 211 | | if (R->Output[i]) vol[i] -= R->Count[i]; |
| 186 | if (m_output[i]) vol[i] -= m_count[i]; |
| 212 | 187 | } |
| 213 | 188 | |
| 214 | 189 | left = STEP; |
| r18565 | r18566 | |
| 217 | 192 | int nextevent; |
| 218 | 193 | |
| 219 | 194 | |
| 220 | | if (R->Count[3] < left) nextevent = R->Count[3]; |
| 195 | if (m_count[3] < left) nextevent = m_count[3]; |
| 221 | 196 | else nextevent = left; |
| 222 | 197 | |
| 223 | | if (R->Output[3]) vol[3] += R->Count[3]; |
| 224 | | R->Count[3] -= nextevent; |
| 225 | | if (R->Count[3] <= 0) |
| 198 | if (m_output[3]) vol[3] += m_count[3]; |
| 199 | m_count[3] -= nextevent; |
| 200 | if (m_count[3] <= 0) |
| 226 | 201 | { |
| 227 | | if (R->NoiseMode[0] == 1) /* White Noise Mode */ |
| 202 | if (m_noise_mode[0] == 1) /* White Noise Mode */ |
| 228 | 203 | { |
| 229 | | if (((R->RNG[0] & R->WhitenoiseTaps) != R->WhitenoiseTaps) && ((R->RNG[0] & R->WhitenoiseTaps) != 0)) /* crappy xor! */ |
| 204 | if (((m_rng[0] & m_whitenoise_taps) != m_whitenoise_taps) && ((m_rng[0] & m_whitenoise_taps) != 0)) /* crappy xor! */ |
| 230 | 205 | { |
| 231 | | R->RNG[0] >>= 1; |
| 232 | | R->RNG[0] |= R->FeedbackMask; |
| 206 | m_rng[0] >>= 1; |
| 207 | m_rng[0] |= m_feedback_mask; |
| 233 | 208 | } |
| 234 | 209 | else |
| 235 | 210 | { |
| 236 | | R->RNG[0] >>= 1; |
| 211 | m_rng[0] >>= 1; |
| 237 | 212 | } |
| 238 | | R->Output[3] = R->WhitenoiseInvert ? !(R->RNG[0] & 1) : R->RNG[0] & 1; |
| 213 | m_output[3] = m_whitenoise_invert ? !(m_rng[0] & 1) : m_rng[0] & 1; |
| 239 | 214 | } |
| 240 | 215 | else /* Periodic noise mode */ |
| 241 | 216 | { |
| 242 | | if (R->RNG[0] & 1) |
| 217 | if (m_rng[0] & 1) |
| 243 | 218 | { |
| 244 | | R->RNG[0] >>= 1; |
| 245 | | R->RNG[0] |= R->FeedbackMask; |
| 219 | m_rng[0] >>= 1; |
| 220 | m_rng[0] |= m_feedback_mask; |
| 246 | 221 | } |
| 247 | 222 | else |
| 248 | 223 | { |
| 249 | | R->RNG[0] >>= 1; |
| 224 | m_rng[0] >>= 1; |
| 250 | 225 | } |
| 251 | | R->Output[3] = R->RNG[0] & 1; |
| 226 | m_output[3] = m_rng[0] & 1; |
| 252 | 227 | } |
| 253 | | R->Count[3] += R->Period[3]; |
| 254 | | if (R->Output[3]) vol[3] += R->Period[3]; |
| 228 | m_count[3] += m_period[3]; |
| 229 | if (m_output[3]) vol[3] += m_period[3]; |
| 255 | 230 | } |
| 256 | | if (R->Output[3]) vol[3] -= R->Count[3]; |
| 231 | if (m_output[3]) vol[3] -= m_count[3]; |
| 257 | 232 | |
| 258 | 233 | left -= nextevent; |
| 259 | 234 | } while (left > 0); |
| 260 | 235 | |
| 261 | | out0 = vol[4] * R->Volume[4] + vol[5] * R->Volume[5] + |
| 262 | | vol[6] * R->Volume[6] + vol[3] * R->Volume[7]; |
| 236 | out0 = vol[4] * m_volume[4] + vol[5] * m_volume[5] + |
| 237 | vol[6] * m_volume[6] + vol[3] * m_volume[7]; |
| 263 | 238 | |
| 264 | | out1 = vol[4] * R->Volume[0] + vol[5] * R->Volume[1] + |
| 265 | | vol[6] * R->Volume[2] + vol[3] * R->Volume[3]; |
| 239 | out1 = vol[4] * m_volume[0] + vol[5] * m_volume[1] + |
| 240 | vol[6] * m_volume[2] + vol[3] * m_volume[3]; |
| 266 | 241 | |
| 267 | 242 | if (out0 > MAX_OUTPUT * STEP) out0 = MAX_OUTPUT * STEP; |
| 268 | 243 | if (out1 > MAX_OUTPUT * STEP) out1 = MAX_OUTPUT * STEP; |
| r18565 | r18566 | |
| 276 | 251 | |
| 277 | 252 | |
| 278 | 253 | |
| 279 | | static void t6w28_set_gain(t6w28_state *R,int gain) |
| 254 | void t6w28_device::set_gain(int gain) |
| 280 | 255 | { |
| 281 | 256 | int i; |
| 282 | 257 | double out; |
| 283 | 258 | |
| 284 | | |
| 285 | 259 | gain &= 0xff; |
| 286 | 260 | |
| 287 | 261 | /* increase max output basing on gain (0.2 dB per step) */ |
| r18565 | r18566 | |
| 293 | 267 | for (i = 0;i < 15;i++) |
| 294 | 268 | { |
| 295 | 269 | /* limit volume to avoid clipping */ |
| 296 | | if (out > MAX_OUTPUT / 3) R->VolTable[i] = MAX_OUTPUT / 3; |
| 297 | | else R->VolTable[i] = out; |
| 270 | if (out > MAX_OUTPUT / 3) m_vol_table[i] = MAX_OUTPUT / 3; |
| 271 | else m_vol_table[i] = out; |
| 298 | 272 | |
| 299 | 273 | out /= 1.258925412; /* = 10 ^ (2/20) = 2dB */ |
| 300 | 274 | } |
| 301 | | R->VolTable[15] = 0; |
| 275 | m_vol_table[15] = 0; |
| 302 | 276 | } |
| 303 | 277 | |
| 304 | 278 | |
| 305 | 279 | |
| 306 | | static int t6w28_init(device_t *device, t6w28_state *R) |
| 280 | //------------------------------------------------- |
| 281 | // device_start - device-specific startup |
| 282 | //------------------------------------------------- |
| 283 | |
| 284 | void t6w28_device::device_start() |
| 307 | 285 | { |
| 308 | | int sample_rate = device->clock()/16; |
| 309 | 286 | int i; |
| 310 | 287 | |
| 311 | | R->Channel = device->machine().sound().stream_alloc(*device,0,2,sample_rate,R,t6w28_update); |
| 288 | m_sample_rate = clock() / 16; |
| 289 | m_channel = machine().sound().stream_alloc(*this, 0, 2, m_sample_rate, this); |
| 312 | 290 | |
| 313 | | R->SampleRate = sample_rate; |
| 291 | for (i = 0;i < 8;i++) m_volume[i] = 0; |
| 314 | 292 | |
| 315 | | for (i = 0;i < 8;i++) R->Volume[i] = 0; |
| 316 | | |
| 317 | | R->LastRegister[0] = 0; |
| 318 | | R->LastRegister[1] = 0; |
| 293 | m_last_register[0] = 0; |
| 294 | m_last_register[1] = 0; |
| 319 | 295 | for (i = 0;i < 8;i+=2) |
| 320 | 296 | { |
| 321 | | R->Register[i] = 0; |
| 322 | | R->Register[i + 1] = 0x0f; /* volume = 0 */ |
| 297 | m_register[i] = 0; |
| 298 | m_register[i + 1] = 0x0f; /* volume = 0 */ |
| 323 | 299 | } |
| 324 | 300 | |
| 325 | 301 | for (i = 0;i < 8;i++) |
| 326 | 302 | { |
| 327 | | R->Output[i] = 0; |
| 328 | | R->Period[i] = R->Count[i] = STEP; |
| 303 | m_output[i] = 0; |
| 304 | m_period[i] = m_count[i] = STEP; |
| 329 | 305 | } |
| 330 | 306 | |
| 331 | 307 | /* Default is SN76489 non-A */ |
| 332 | | R->FeedbackMask = 0x4000; /* mask for feedback */ |
| 333 | | R->WhitenoiseTaps = 0x03; /* mask for white noise taps */ |
| 334 | | R->WhitenoiseInvert = 1; /* white noise invert flag */ |
| 308 | m_feedback_mask = 0x4000; /* mask for feedback */ |
| 309 | m_whitenoise_taps = 0x03; /* mask for white noise taps */ |
| 310 | m_whitenoise_invert = 1; /* white noise invert flag */ |
| 335 | 311 | |
| 336 | | R->RNG[0] = R->FeedbackMask; |
| 337 | | R->RNG[1] = R->FeedbackMask; |
| 338 | | R->Output[3] = R->RNG[0] & 1; |
| 312 | m_rng[0] = m_feedback_mask; |
| 313 | m_rng[1] = m_feedback_mask; |
| 314 | m_output[3] = m_rng[0] & 1; |
| 339 | 315 | |
| 340 | | return 0; |
| 341 | | } |
| 316 | set_gain(0); |
| 342 | 317 | |
| 343 | | |
| 344 | | static DEVICE_START( t6w28 ) |
| 345 | | { |
| 346 | | t6w28_state *chip = get_safe_token(device); |
| 347 | | |
| 348 | | if (t6w28_init(device,chip) != 0) |
| 349 | | fatalerror("Error creating t6w28 chip\n"); |
| 350 | | t6w28_set_gain(chip, 0); |
| 351 | | |
| 352 | 318 | /* values from sn76489a */ |
| 353 | | chip->FeedbackMask = 0x8000; |
| 354 | | chip->WhitenoiseTaps = 0x06; |
| 355 | | chip->WhitenoiseInvert = FALSE; |
| 319 | m_feedback_mask = 0x8000; |
| 320 | m_whitenoise_taps = 0x06; |
| 321 | m_whitenoise_invert = FALSE; |
| 356 | 322 | |
| 357 | | device->save_item(NAME(chip->Register)); |
| 358 | | device->save_item(NAME(chip->LastRegister)); |
| 359 | | device->save_item(NAME(chip->Volume)); |
| 360 | | device->save_item(NAME(chip->RNG)); |
| 361 | | device->save_item(NAME(chip->NoiseMode)); |
| 362 | | device->save_item(NAME(chip->Period)); |
| 363 | | device->save_item(NAME(chip->Count)); |
| 364 | | device->save_item(NAME(chip->Output)); |
| 323 | save_item(NAME(m_register)); |
| 324 | save_item(NAME(m_last_register)); |
| 325 | save_item(NAME(m_volume)); |
| 326 | save_item(NAME(m_rng)); |
| 327 | save_item(NAME(m_noise_mode)); |
| 328 | save_item(NAME(m_period)); |
| 329 | save_item(NAME(m_count)); |
| 330 | save_item(NAME(m_output)); |
| 365 | 331 | } |
| 366 | 332 | |
| 367 | 333 | const device_type T6W28 = &device_creator<t6w28_device>; |
| r18565 | r18566 | |
| 370 | 336 | : device_t(mconfig, T6W28, "T6W28", tag, owner, clock), |
| 371 | 337 | device_sound_interface(mconfig, *this) |
| 372 | 338 | { |
| 373 | | m_token = global_alloc_clear(t6w28_state); |
| 374 | 339 | } |
| 375 | 340 | |
| 376 | | //------------------------------------------------- |
| 377 | | // device_config_complete - perform any |
| 378 | | // operations now that the configuration is |
| 379 | | // complete |
| 380 | | //------------------------------------------------- |
| 381 | | |
| 382 | | void t6w28_device::device_config_complete() |
| 383 | | { |
| 384 | | } |
| 385 | | |
| 386 | | //------------------------------------------------- |
| 387 | | // device_start - device-specific startup |
| 388 | | //------------------------------------------------- |
| 389 | | |
| 390 | | void t6w28_device::device_start() |
| 391 | | { |
| 392 | | DEVICE_START_NAME( t6w28 )(this); |
| 393 | | } |
| 394 | | |
| 395 | | //------------------------------------------------- |
| 396 | | // sound_stream_update - handle a stream update |
| 397 | | //------------------------------------------------- |
| 398 | | |
| 399 | | void t6w28_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) |
| 400 | | { |
| 401 | | // should never get here |
| 402 | | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); |
| 403 | | } |
| 404 | | |
| 405 | | |