Previous 199869 Revisions Next

r24855 Monday 12th August, 2013 at 04:45:15 UTC by David Haywood
cheap hacks, but gets some stuff to boot (nw)
[src/mess/drivers]segapico.c

trunk/src/mess/drivers/segapico.c
r24854r24855
22/****************************************** PICO emulation ****************************************/
33
44/* todo, make this more independent of the Genesis emulation, it's really only the same CPU + VDP
5   and doesn't need to be connected to the Genesis at all. */
5   and doesn't need to be connected to the Genesis at all.
66
7   sound is the 315-5641 / D77591, should be compatible with the 7759? but probably wants us to maintain
8   an external buffer of at least 0x40 bytes and feed it on a timer in sync with the timer in the chip?
9
10   currently no way to select (or display) the story book area of the games? (will require layout and
11   external artwork)
12
13*/
14
15
716/*
817
918Pico mainboard (PAL version)
r24854r24855
229238            retdata = m_page_register;
230239            break;
231240         }
232      case 7:
241
242
243
244      case 8: // toy story 2 checks this for 0x3f (is that 'empty'?)
233245         /* Returns free bytes left in the PCM FIFO buffer */
234         retdata = 0x00;
246         retdata = 0x3f;
235247         break;
236      case 8:
248      case 9:
237249      /*
238250         For reads, if bit 15 is cleared, it means PCM is 'busy' or
239251         something like that, as games sometimes wait for it to become 1.
240252      */
241         retdata = 0x00;
253         return (m_upd7759->busy_r()^1) << 15;
254
255
256      case 7:
257      case 10:
258      case 11:
259      case 12:
260      case 13:
261      case 14:
262      case 15:
263         logerror("pico_68k_io_read %d\n", offset);
264
242265   }
243266
244267   return retdata | retdata << 8;
r24854r24855
247270
248271static void sound_cause_irq( device_t *device, int chip )
249272{
250//   pico_base_state *state = device->machine().driver_data<pico_base_state>();
251   printf("sound irq\n");
273   pico_base_state *state = device->machine().driver_data<pico_base_state>();
274//   printf("sound irq\n");
252275   /* upd7759 callback */
253//   state->m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
276   state->m_maincpu->set_input_line(3, HOLD_LINE);
254277}
255278
256279
r24854r24855
262285
263286WRITE16_MEMBER(pico_base_state::pico_68k_io_write )
264287{
265   printf("pico_68k_io_write %04x %04x %04x\n", offset*2, data, mem_mask);
288//   printf("pico_68k_io_write %04x %04x %04x\n", offset*2, data, mem_mask);
266289
267290   switch (offset)
268291   {
292
269293      case 0x12/2: // guess
294         m_upd7759->reset_w(0);
295         m_upd7759->start_w(0);
296         m_upd7759->reset_w(1);
297         m_upd7759->start_w(1);
298
270299         if (mem_mask&0x00ff) m_upd7759->port_w(space,0,data&0xff);
271300         if (mem_mask&0xff00) m_upd7759->port_w(space,0,(data>>8)&0xff);
272301
r24854r24855
323352   m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
324353   m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));
325354
326   m_upd7759->reset_w(0);
327   m_upd7759->start_w(0);
328   m_upd7759->reset_w(1);
329   m_upd7759->start_w(1);
355
330356}
331357
332358static MACHINE_CONFIG_START( pico, pico_state )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team