Previous 15994 Revisions Next

r3860 Wednesday 17th December, 2008 at 15:29:08 UTC by Miodrag Milanović
[B2M] Code cleanup
[src/mess/machine]b2m.c

src/mess/machine/b2m.c
r3859r3860
161161
162162static PIT8253_OUTPUT_CHANGED(bm2_pit_out0)
163163{
164   logerror("bm2_pit_out0\n");
165164   pic8259_set_irq_line((device_config*)device_list_find_by_tag( device->machine->config->devicelist, PIC8259, "pic8259"),1,state);     
166165}
167166
r3859r3860
214213   b2m_video_page = (b2m_8255_portc >> 7) & 1;
215214}
216215
217static READ8_DEVICE_HANDLER (b2m_8255_porta_r )
218{
219   return 0xff;
220}
221216static READ8_DEVICE_HANDLER (b2m_8255_portb_r )
222217{
223218   return b2m_video_scroll;
224219}
225static READ8_DEVICE_HANDLER (b2m_8255_portc_r )
226{
227   return 0xff;
228}
220
229221const ppi8255_interface b2m_ppi8255_interface_1 =
230222{
231   b2m_8255_porta_r,
223   NULL,
232224   b2m_8255_portb_r,
233   b2m_8255_portc_r,
225   NULL,
234226   b2m_8255_porta_w,
235227   b2m_8255_portb_w,
236228   b2m_8255_portc_w
237229};
238230
239231
240static WRITE8_DEVICE_HANDLER (b2m_ext_8255_porta_w )
241{   
242}
243static WRITE8_DEVICE_HANDLER (b2m_ext_8255_portb_w )
244{   
245}
246232
247233static WRITE8_DEVICE_HANDLER (b2m_ext_8255_portc_w )
248234{     
r3859r3860
259245   }
260246}
261247
262static READ8_DEVICE_HANDLER (b2m_ext_8255_porta_r )
263{
264   return 0xff;
265}
266static READ8_DEVICE_HANDLER (b2m_ext_8255_portb_r )
267{
268   return 0xff;
269}
270static READ8_DEVICE_HANDLER (b2m_ext_8255_portc_r )
271{
272   return 0xff;
273}
274
275248const ppi8255_interface b2m_ppi8255_interface_2 =
276249{
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,
282255   b2m_ext_8255_portc_w
283256};
284257
r3859r3860
418391   return INIT_PASS;
419392}
420393
421static void *b2m_sh_start(const device_config *device, int clock, const custom_sound_interface *config);
422static void b2m_sh_update(void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length);
423394
424const custom_sound_interface b2m_sound_interface =
425{
426   b2m_sh_start,
427   NULL,
428   NULL
429};
430
431static 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
438395static void b2m_sh_update(void *param,stream_sample_t **inputs, stream_sample_t **buffer,int length)
439396{
440397   INT16 channel_1_signal;
r3859r3860
449406      sample_left++;
450407   }
451408}
452
453void b2m_sh_change_clock(double clock)
409static CUSTOM_START (b2m_sh_start)
454410{
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;
458414}
415
416const custom_sound_interface b2m_sound_interface =
417{
418   b2m_sh_start,
419   NULL,
420   NULL
421};

Previous 15994 Revisions Next


© 1998-2018 The MESS Team