Previous 199869 Revisions Next

r22629 Wednesday 1st May, 2013 at 11:38:32 UTC by hap
(small cleanup)
[src/mame/drivers]fromanc2.c

trunk/src/mame/drivers/fromanc2.c
r22628r22629
55    Taisen Idol-Mahjong Final Romance 2 (Japan)
66    (c)1995 Video System Co.,Ltd.
77
8    Taisen Mahjong FinalRomance R (Japan)
8    Taisen Mahjong Final Romance R (Japan)
99    (c)1995 Video System Co.,Ltd.
1010
11    Taisen Mahjong FinalRomance 4 (Japan)
11    Taisen Mahjong Final Romance 4 (Japan)
1212    (c)1998 Video System Co.,Ltd.
1313
1414    Driver by Takahiro Nogi <nogi@kt.rim.or.jp> 2001/02/28 -
r22628r22629
240240
241241   AM_RANGE(0xd00000, 0xd00001) AM_WRITE(fromanc2_portselect_w)    // PORT SELECT (1P/2P)
242242
243   AM_RANGE(0xd10000, 0xd10001) AM_WRITENOP                // ?
244   AM_RANGE(0xd30000, 0xd30001) AM_WRITENOP                // ?
243   AM_RANGE(0xd10000, 0xd10001) AM_WRITENOP                        // ?
244   AM_RANGE(0xd30000, 0xd30001) AM_WRITENOP                        // ?
245245   AM_RANGE(0xd50000, 0xd50001) AM_WRITE(fromanc4_eeprom_w)        // EEPROM DATA
246246
247247   AM_RANGE(0xd70000, 0xd70001) AM_WRITE(fromanc2_sndcmd_w)        // SOUND REQ (1P/2P)
r22628r22629
253253   AM_RANGE(0xdb0000, 0xdb0fff) AM_READWRITE(fromanc4_paletteram_0_r, fromanc4_paletteram_0_w) // PALETTE (1P)
254254   AM_RANGE(0xdc0000, 0xdc0fff) AM_READWRITE(fromanc4_paletteram_1_r, fromanc4_paletteram_1_w) // PALETTE (2P)
255255
256   AM_RANGE(0xd10000, 0xd10001) AM_READ(fromanc2_keymatrix_r)  // INPUT KEY MATRIX
256   AM_RANGE(0xd10000, 0xd10001) AM_READ(fromanc2_keymatrix_r)      // INPUT KEY MATRIX
257257   AM_RANGE(0xd20000, 0xd20001) AM_READ_PORT("SYSTEM")
258258
259   AM_RANGE(0xe00000, 0xe0001d) AM_WRITE(fromanc4_gfxreg_0_w)  // SCROLL, GFXBANK (1P/2P)
260   AM_RANGE(0xe10000, 0xe1001d) AM_WRITE(fromanc4_gfxreg_1_w)  // SCROLL, GFXBANK (1P/2P)
261   AM_RANGE(0xe20000, 0xe2001d) AM_WRITE(fromanc4_gfxreg_2_w)  // SCROLL, GFXBANK (1P/2P)
259   AM_RANGE(0xe00000, 0xe0001d) AM_WRITE(fromanc4_gfxreg_0_w)      // SCROLL, GFXBANK (1P/2P)
260   AM_RANGE(0xe10000, 0xe1001d) AM_WRITE(fromanc4_gfxreg_1_w)      // SCROLL, GFXBANK (1P/2P)
261   AM_RANGE(0xe20000, 0xe2001d) AM_WRITE(fromanc4_gfxreg_2_w)      // SCROLL, GFXBANK (1P/2P)
262262
263   AM_RANGE(0xe30000, 0xe30013) AM_WRITENOP                // ???
264   AM_RANGE(0xe40000, 0xe40013) AM_WRITENOP                // ???
263   AM_RANGE(0xe30000, 0xe30013) AM_WRITENOP                        // ???
264   AM_RANGE(0xe40000, 0xe40013) AM_WRITENOP                        // ???
265265
266   AM_RANGE(0xe50000, 0xe50009) AM_WRITENOP                // EXT-COMM PORT ?
267   AM_RANGE(0xe5000c, 0xe5000d) AM_READNOP             // EXT-COMM PORT ?
266   AM_RANGE(0xe50000, 0xe50009) AM_WRITENOP                        // EXT-COMM PORT ?
267   AM_RANGE(0xe5000c, 0xe5000d) AM_READNOP                         // EXT-COMM PORT ?
268268ADDRESS_MAP_END
269269
270270
271271static ADDRESS_MAP_START( fromanc2_sub_map, AS_PROGRAM, 8, fromanc2_state )
272   AM_RANGE(0x0000, 0x3fff) AM_ROM                             // ROM
273   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")                        // ROM(BANK)
274   AM_RANGE(0x8000, 0xbfff) AM_RAM                             // RAM(WORK)
275   AM_RANGE(0xc000, 0xffff) AM_RAMBANK("bank2")                        // RAM(BANK)
272   AM_RANGE(0x0000, 0x3fff) AM_ROM                                 // ROM
273   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")                    // ROM(BANK)
274   AM_RANGE(0x8000, 0xbfff) AM_RAM                                 // RAM(WORK)
275   AM_RANGE(0xc000, 0xffff) AM_RAMBANK("bank2")                    // RAM(BANK)
276276ADDRESS_MAP_END
277277
278278static ADDRESS_MAP_START( fromanc2_sub_io_map, AS_IO, 8, fromanc2_state )
279279   ADDRESS_MAP_GLOBAL_MASK(0xff)
280280   AM_RANGE(0x00, 0x00) AM_WRITE(fromanc2_subcpu_rombank_w)
281   AM_RANGE(0x02, 0x02) AM_READWRITE(fromanc2_maincpu_r_l, fromanc2_maincpu_w_l)   // to/from MAIN CPU
282   AM_RANGE(0x04, 0x04) AM_READWRITE(fromanc2_maincpu_r_h, fromanc2_maincpu_w_h)   // to/from MAIN CPU
281   AM_RANGE(0x02, 0x02) AM_READWRITE(fromanc2_maincpu_r_l, fromanc2_maincpu_w_l) // to/from MAIN CPU
282   AM_RANGE(0x04, 0x04) AM_READWRITE(fromanc2_maincpu_r_h, fromanc2_maincpu_w_h) // to/from MAIN CPU
283283   AM_RANGE(0x06, 0x06) AM_WRITE(fromanc2_subcpu_nmi_clr)
284284ADDRESS_MAP_END
285285
r22628r22629
291291
292292static ADDRESS_MAP_START( fromanc2_sound_io_map, AS_IO, 8, fromanc2_state )
293293   ADDRESS_MAP_GLOBAL_MASK(0xff)
294   AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_WRITENOP         // snd cmd (1P) / ?
295   AM_RANGE(0x04, 0x04) AM_READ(soundlatch2_byte_r)                            // snd cmd (2P)
294   AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_WRITENOP     // snd cmd (1P) / ?
295   AM_RANGE(0x04, 0x04) AM_READ(soundlatch2_byte_r)                // snd cmd (2P)
296296   AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
297297   AM_RANGE(0x0c, 0x0c) AM_READ(fromanc2_sndcpu_nmi_clr)
298298ADDRESS_MAP_END
r22628r22629
310310   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
311311   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
312312   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 )
313   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_int_r, NULL)      // SUBCPU INT FLAG
314   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL)      // SNDCPU NMI FLAG
315   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_nmi_r, NULL)      // SUBCPU NMI FLAG
313   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_int_r, NULL) // SUBCPU INT FLAG
314   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG
315   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_nmi_r, NULL) // SUBCPU NMI FLAG
316316   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit)
317   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (1P)" ) PORT_CODE(KEYCODE_F2)   // TEST (1P)
318   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (2P)" ) PORT_CODE(KEYCODE_F2)   // TEST (2P)
317   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (1P)" ) PORT_CODE(KEYCODE_F2) // TEST (1P)
318   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (2P)" ) PORT_CODE(KEYCODE_F2) // TEST (2P)
319319   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
320320   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
321321   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED )
r22628r22629
401401   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_cs_line)
402402INPUT_PORTS_END
403403
404#ifdef UNREFERENCED_CODE
405static INPUT_PORTS_START( fromancr )
406   PORT_INCLUDE( fromanc2 )
407
408   PORT_MODIFY("EEPROMOUT")
409   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, write_bit)
410   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_clock_line)
411   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_cs_line)
412INPUT_PORTS_END
413#endif
414
415404static INPUT_PORTS_START( fromanc4 )
416405   PORT_INCLUDE( fromanc2 )
417406
r22628r22629
421410   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
422411   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN3 )
423412   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN4 )
424   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL)      // SNDCPU NMI FLAG
413   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG
425414   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
426415   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit)
427416   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
r22628r22629
814803 *************************************/
815804
816805GAME( 1995, fromanc2, 0, fromanc2, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Idol-Mahjong Final Romance 2 (Japan)", GAME_SUPPORTS_SAVE )
817GAME( 1995, fromancr, 0, fromancr, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Mahjong FinalRomance R (Japan)", GAME_SUPPORTS_SAVE )
818GAME( 1998, fromanc4, 0, fromanc4, fromanc4, fromanc2_state, fromanc4, ROT0, "Video System Co.", "Taisen Mahjong FinalRomance 4 (Japan)", GAME_SUPPORTS_SAVE )
806GAME( 1995, fromancr, 0, fromancr, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Mahjong Final Romance R (Japan)", GAME_SUPPORTS_SAVE )
807GAME( 1998, fromanc4, 0, fromanc4, fromanc4, fromanc2_state, fromanc4, ROT0, "Video System Co.", "Taisen Mahjong Final Romance 4 (Japan)", GAME_SUPPORTS_SAVE )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team