src/mess/machine/b2m.c
| r3859 | r3860 | |
| 161 | 161 | |
| 162 | 162 | static PIT8253_OUTPUT_CHANGED(bm2_pit_out0) |
| 163 | 163 | { |
| 164 | | logerror("bm2_pit_out0\n"); |
| 165 | 164 | pic8259_set_irq_line((device_config*)device_list_find_by_tag( device->machine->config->devicelist, PIC8259, "pic8259"),1,state); |
| 166 | 165 | } |
| 167 | 166 | |
| r3859 | r3860 | |
| 214 | 213 | b2m_video_page = (b2m_8255_portc >> 7) & 1; |
| 215 | 214 | } |
| 216 | 215 | |
| 217 | | static READ8_DEVICE_HANDLER (b2m_8255_porta_r ) |
| 218 | | { |
| 219 | | return 0xff; |
| 220 | | } |
| 221 | 216 | static READ8_DEVICE_HANDLER (b2m_8255_portb_r ) |
| 222 | 217 | { |
| 223 | 218 | return b2m_video_scroll; |
| 224 | 219 | } |
| 225 | | static READ8_DEVICE_HANDLER (b2m_8255_portc_r ) |
| 226 | | { |
| 227 | | return 0xff; |
| 228 | | } |
| 220 | |
| 229 | 221 | const ppi8255_interface b2m_ppi8255_interface_1 = |
| 230 | 222 | { |
| 231 | | b2m_8255_porta_r, |
| 223 | NULL, |
| 232 | 224 | b2m_8255_portb_r, |
| 233 | | b2m_8255_portc_r, |
| 225 | NULL, |
| 234 | 226 | b2m_8255_porta_w, |
| 235 | 227 | b2m_8255_portb_w, |
| 236 | 228 | b2m_8255_portc_w |
| 237 | 229 | }; |
| 238 | 230 | |
| 239 | 231 | |
| 240 | | static WRITE8_DEVICE_HANDLER (b2m_ext_8255_porta_w ) |
| 241 | | { |
| 242 | | } |
| 243 | | static WRITE8_DEVICE_HANDLER (b2m_ext_8255_portb_w ) |
| 244 | | { |
| 245 | | } |
| 246 | 232 | |
| 247 | 233 | static WRITE8_DEVICE_HANDLER (b2m_ext_8255_portc_w ) |
| 248 | 234 | { |
| r3859 | r3860 | |
| 259 | 245 | } |
| 260 | 246 | } |
| 261 | 247 | |
| 262 | | static READ8_DEVICE_HANDLER (b2m_ext_8255_porta_r ) |
| 263 | | { |
| 264 | | return 0xff; |
| 265 | | } |
| 266 | | static READ8_DEVICE_HANDLER (b2m_ext_8255_portb_r ) |
| 267 | | { |
| 268 | | return 0xff; |
| 269 | | } |
| 270 | | static READ8_DEVICE_HANDLER (b2m_ext_8255_portc_r ) |
| 271 | | { |
| 272 | | return 0xff; |
| 273 | | } |
| 274 | | |
| 275 | 248 | const ppi8255_interface b2m_ppi8255_interface_2 = |
| 276 | 249 | { |
| 277 | | b2m_ext_8255_porta_r, |
| 278 | | b2m_ext_8255_portb_r, |
| 279 | | b2m_ext_8255_portc_r, |
| 280 | | b2m_ext_8255_porta_w, |
| 281 | | b2m_ext_8255_portb_w, |
| 250 | NULL, |
| 251 | NULL, |
| 252 | NULL, |
| 253 | NULL, |
| 254 | NULL, |
| 282 | 255 | b2m_ext_8255_portc_w |
| 283 | 256 | }; |
| 284 | 257 | |
| r3859 | r3860 | |
| 418 | 391 | return INIT_PASS; |
| 419 | 392 | } |
| 420 | 393 | |
| 421 | | static void *b2m_sh_start(const device_config *device, int clock, const custom_sound_interface *config); |
| 422 | | static void b2m_sh_update(void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length); |
| 423 | 394 | |
| 424 | | const custom_sound_interface b2m_sound_interface = |
| 425 | | { |
| 426 | | b2m_sh_start, |
| 427 | | NULL, |
| 428 | | NULL |
| 429 | | }; |
| 430 | | |
| 431 | | static void *b2m_sh_start(const device_config *device, int clock, const custom_sound_interface *config) |
| 432 | | { |
| 433 | | b2m_sound_input = 0; |
| 434 | | mixer_channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, b2m_sh_update); |
| 435 | | return (void *) ~0; |
| 436 | | } |
| 437 | | |
| 438 | 395 | static void b2m_sh_update(void *param,stream_sample_t **inputs, stream_sample_t **buffer,int length) |
| 439 | 396 | { |
| 440 | 397 | INT16 channel_1_signal; |
| r3859 | r3860 | |
| 449 | 406 | sample_left++; |
| 450 | 407 | } |
| 451 | 408 | } |
| 452 | | |
| 453 | | void b2m_sh_change_clock(double clock) |
| 409 | static CUSTOM_START (b2m_sh_start) |
| 454 | 410 | { |
| 455 | | if (mixer_channel!=NULL) { |
| 456 | | stream_update(mixer_channel); |
| 457 | | } |
| 411 | b2m_sound_input = 0; |
| 412 | mixer_channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, b2m_sh_update); |
| 413 | return (void *) ~0; |
| 458 | 414 | } |
| 415 | |
| 416 | const custom_sound_interface b2m_sound_interface = |
| 417 | { |
| 418 | b2m_sh_start, |
| 419 | NULL, |
| 420 | NULL |
| 421 | }; |