trunk/src/mame/drivers/fromanc2.c
| r22628 | r22629 | |
| 5 | 5 | Taisen Idol-Mahjong Final Romance 2 (Japan) |
| 6 | 6 | (c)1995 Video System Co.,Ltd. |
| 7 | 7 | |
| 8 | | Taisen Mahjong FinalRomance R (Japan) |
| 8 | Taisen Mahjong Final Romance R (Japan) |
| 9 | 9 | (c)1995 Video System Co.,Ltd. |
| 10 | 10 | |
| 11 | | Taisen Mahjong FinalRomance 4 (Japan) |
| 11 | Taisen Mahjong Final Romance 4 (Japan) |
| 12 | 12 | (c)1998 Video System Co.,Ltd. |
| 13 | 13 | |
| 14 | 14 | Driver by Takahiro Nogi <nogi@kt.rim.or.jp> 2001/02/28 - |
| r22628 | r22629 | |
| 240 | 240 | |
| 241 | 241 | AM_RANGE(0xd00000, 0xd00001) AM_WRITE(fromanc2_portselect_w) // PORT SELECT (1P/2P) |
| 242 | 242 | |
| 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 // ? |
| 245 | 245 | AM_RANGE(0xd50000, 0xd50001) AM_WRITE(fromanc4_eeprom_w) // EEPROM DATA |
| 246 | 246 | |
| 247 | 247 | AM_RANGE(0xd70000, 0xd70001) AM_WRITE(fromanc2_sndcmd_w) // SOUND REQ (1P/2P) |
| r22628 | r22629 | |
| 253 | 253 | AM_RANGE(0xdb0000, 0xdb0fff) AM_READWRITE(fromanc4_paletteram_0_r, fromanc4_paletteram_0_w) // PALETTE (1P) |
| 254 | 254 | AM_RANGE(0xdc0000, 0xdc0fff) AM_READWRITE(fromanc4_paletteram_1_r, fromanc4_paletteram_1_w) // PALETTE (2P) |
| 255 | 255 | |
| 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 |
| 257 | 257 | AM_RANGE(0xd20000, 0xd20001) AM_READ_PORT("SYSTEM") |
| 258 | 258 | |
| 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) |
| 262 | 262 | |
| 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 // ??? |
| 265 | 265 | |
| 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 ? |
| 268 | 268 | ADDRESS_MAP_END |
| 269 | 269 | |
| 270 | 270 | |
| 271 | 271 | static 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) |
| 276 | 276 | ADDRESS_MAP_END |
| 277 | 277 | |
| 278 | 278 | static ADDRESS_MAP_START( fromanc2_sub_io_map, AS_IO, 8, fromanc2_state ) |
| 279 | 279 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 280 | 280 | 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 |
| 283 | 283 | AM_RANGE(0x06, 0x06) AM_WRITE(fromanc2_subcpu_nmi_clr) |
| 284 | 284 | ADDRESS_MAP_END |
| 285 | 285 | |
| r22628 | r22629 | |
| 291 | 291 | |
| 292 | 292 | static ADDRESS_MAP_START( fromanc2_sound_io_map, AS_IO, 8, fromanc2_state ) |
| 293 | 293 | 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) |
| 296 | 296 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) |
| 297 | 297 | AM_RANGE(0x0c, 0x0c) AM_READ(fromanc2_sndcpu_nmi_clr) |
| 298 | 298 | ADDRESS_MAP_END |
| r22628 | r22629 | |
| 310 | 310 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 311 | 311 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 312 | 312 | 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 |
| 316 | 316 | 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) |
| 319 | 319 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 320 | 320 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 321 | 321 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r22628 | r22629 | |
| 401 | 401 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_cs_line) |
| 402 | 402 | INPUT_PORTS_END |
| 403 | 403 | |
| 404 | | #ifdef UNREFERENCED_CODE |
| 405 | | static 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) |
| 412 | | INPUT_PORTS_END |
| 413 | | #endif |
| 414 | | |
| 415 | 404 | static INPUT_PORTS_START( fromanc4 ) |
| 416 | 405 | PORT_INCLUDE( fromanc2 ) |
| 417 | 406 | |
| r22628 | r22629 | |
| 421 | 410 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 422 | 411 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 423 | 412 | 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 |
| 425 | 414 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 426 | 415 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 427 | 416 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r22628 | r22629 | |
| 814 | 803 | *************************************/ |
| 815 | 804 | |
| 816 | 805 | GAME( 1995, fromanc2, 0, fromanc2, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Idol-Mahjong Final Romance 2 (Japan)", GAME_SUPPORTS_SAVE ) |
| 817 | | GAME( 1995, fromancr, 0, fromancr, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Mahjong FinalRomance R (Japan)", GAME_SUPPORTS_SAVE ) |
| 818 | | GAME( 1998, fromanc4, 0, fromanc4, fromanc4, fromanc2_state, fromanc4, ROT0, "Video System Co.", "Taisen Mahjong FinalRomance 4 (Japan)", GAME_SUPPORTS_SAVE ) |
| 806 | GAME( 1995, fromancr, 0, fromancr, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Mahjong Final Romance R (Japan)", GAME_SUPPORTS_SAVE ) |
| 807 | GAME( 1998, fromanc4, 0, fromanc4, fromanc4, fromanc2_state, fromanc4, ROT0, "Video System Co.", "Taisen Mahjong Final Romance 4 (Japan)", GAME_SUPPORTS_SAVE ) |