Previous 199869 Revisions Next

r19743 Sunday 23rd December, 2012 at 07:24:34 UTC by Roberto Fresca
Kuru Kuru Pyon Pyon: Fixed YM2149 sound, fixed some memory map offsets,
Added some port mirrors, and added/corrected some technical documentation.
[Roberto Fresca, Charles MacDonald]
[src/mame/drivers]kurukuru.c

trunk/src/mame/drivers/kurukuru.c
r19742r19743
125125  will be cleared).
126126
127127
128  DSW2 bits 5 & 6 (maybe 4 too) seems to change the YM2149 sound quality, as a
129  side effect. Need to investigate more about...
130
131
132128*******************************************************************************
133129
134130  * How to play...
r19742r19743
195191
196192  TODO:
197193
198  - Hopper emulation.
194  - Out latch (Hopper emulation?).
199195  - Find why the use of payout always jam. Hopper related?
200  - Default DIP Switches, once the YM sound degrade issues were solved...
201    (see general notes about)
202196
203197******************************************************************************/
204198
r19742r19743
224218   UINT8 m_sound_irq_cause;
225219   UINT8 m_adpcm_data;
226220
227   DECLARE_WRITE8_MEMBER(kurukuru_hopper_w);
221   DECLARE_WRITE8_MEMBER(kurukuru_out_latch_w);
228222   DECLARE_WRITE8_MEMBER(kurukuru_bankswitch_w);
229223   DECLARE_WRITE8_MEMBER(kurukuru_soundlatch_w);
230224   DECLARE_READ8_MEMBER(kurukuru_soundlatch_r);
r19742r19743
306300
307301// Main CPU
308302
309WRITE8_MEMBER(kurukuru_state::kurukuru_hopper_w)
303WRITE8_MEMBER(kurukuru_state::kurukuru_out_latch_w)
310304{
311   /* assume hopper related.
312      $01 when coin 1 (jams)
313      $20 when coin 2
314      $40 when payout (jams) ...check
315   */
305/*
306   00-0f is output latch (controls jamma output pins)
307
308   assume hopper related:
309   $01 when coin 1
310   $20 when coin 2
311   $40 when payout (jams) ...to check
312
313*/
316314   if (data)
317      logerror("kurukuru_hopper_w %02X @ %04X\n", data, space.device().safe_pc());
315      logerror("kurukuru_out_latch_w %02X @ %04X\n", data, space.device().safe_pc());
318316}
319317
320318WRITE8_MEMBER(kurukuru_state::kurukuru_bankswitch_w)
r19742r19743
332330
333331
334332static ADDRESS_MAP_START( kurukuru_map, AS_PROGRAM, 8, kurukuru_state )
335   AM_RANGE(0x0000, 0x3fff) AM_ROM
333   AM_RANGE(0x0000, 0x5fff) AM_ROM
336334   AM_RANGE(0x6000, 0xdfff) AM_ROMBANK("bank1")
337335   AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("nvram")
338336ADDRESS_MAP_END
339337
340338static ADDRESS_MAP_START( kurukuru_io, AS_IO, 8, kurukuru_state )
341339   ADDRESS_MAP_GLOBAL_MASK(0xff)
342   AM_RANGE(0x00, 0x00) AM_WRITE(kurukuru_hopper_w)
343   AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW1")
344   AM_RANGE(0x20, 0x20) AM_WRITE(kurukuru_soundlatch_w)
340   AM_RANGE(0x00, 0x00) AM_MIRROR(0x0f) AM_WRITE(kurukuru_out_latch_w)
341   AM_RANGE(0x10, 0x10) AM_MIRROR(0x0f) AM_READ_PORT("DSW1")
342   AM_RANGE(0x20, 0x20) AM_MIRROR(0x0f) AM_WRITE(kurukuru_soundlatch_w)
345343   AM_RANGE(0x80, 0x83) AM_DEVREADWRITE( "v9938", v9938_device, read, write )
346344   AM_RANGE(0x90, 0x90) AM_WRITE(kurukuru_bankswitch_w)
347   AM_RANGE(0xa0, 0xa0) AM_READ_PORT("IN0")
348   AM_RANGE(0xb0, 0xb0) AM_READ_PORT("IN1")
349   AM_RANGE(0xc0, 0xc0) AM_DEVWRITE_LEGACY("ym2149", ay8910_address_w)
350   AM_RANGE(0xc8, 0xc8) AM_DEVREAD_LEGACY("ym2149", ay8910_r)
351   AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("ym2149", ay8910_data_w)
345   AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0f) AM_READ_PORT("IN0")   // need mirror confirmation
346   AM_RANGE(0xb0, 0xb0) AM_MIRROR(0x0f) AM_READ_PORT("IN1")
347   AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVREADWRITE_LEGACY("ym2149", ay8910_r, ay8910_address_w)
348   AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE_LEGACY("ym2149", ay8910_data_w)
352349ADDRESS_MAP_END
353350
354351
355
356352// Audio CPU
357353
358354WRITE8_MEMBER(kurukuru_state::kurukuru_adpcm_data_w)
359355{
356/*
357     6-bit latch. only 4 connected...
358       bit 0-3 = MSM5205 data.
359*/
360360   m_adpcm_data = data & 0xf;
361361}
362362
r19742r19743
364364{
365365   device_t *device = machine().device("adpcm");
366366/*
367     bit 0 = RESET
368     bit 1 = 4B/3B
369     bit 2 = S2
370     bit 3 = S1
367     6-bit latch. only 4 connected...
368       bit 0 = RESET
369       bit 1 = 4B/3B
370       bit 2 = S2
371       bit 3 = S1
371372*/
372373   msm5205_playmode_w(device, BITSWAP8((data>>1), 7,6,5,4,3,0,1,2));
373374   msm5205_reset_w(device, data & 1);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team