Previous 199869 Revisions Next

r23806 Thursday 20th June, 2013 at 05:46:27 UTC by Fabio Priuli
Modernized the TC0080VCO and the TC0100SCN video devices [Osso]
[src/mame/drivers]asuka.c galastrm.c groundfx.c ninjaw.c othunder.c taito_f2.c taito_h.c taito_o.c taito_z.c taitoair.c undrfire.c warriorb.c wgp.c
[src/mame/includes]galastrm.h groundfx.h ninjaw.h taito_o.h undrfire.h warriorb.h
[src/mame/video]asuka.c galastrm.c groundfx.c ninjaw.c othunder.c taito_f2.c taito_h.c taito_o.c taito_z.c taitoair.c taitoic.c taitoic.h undrfire.c warriorb.c wgp.c

trunk/src/mame/drivers/undrfire.c
r23805r23806
489489   AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("snd_shared")
490490   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_long_r, tc0480scp_long_w)        /* tilemaps */
491491   AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_long_r, tc0480scp_ctrl_long_w)
492   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_long_r, tc0100scn_long_w)        /* piv tilemaps */
493   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_long_r, tc0100scn_ctrl_long_w)
492   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, long_r, long_w)        /* piv tilemaps */
493   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_long_r, ctrl_long_w)
494494   AM_RANGE(0xa00000, 0xa0ffff) AM_RAM_WRITE(color_ram_w) AM_SHARE("paletteram")
495495   AM_RANGE(0xb00000, 0xb003ff) AM_RAM                         /* single bytes, blending ??? */
496496   AM_RANGE(0xd00000, 0xd00003) AM_WRITE(rotate_control_w)     /* perhaps port based rotate control? */
r23805r23806
508508   AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("snd_shared")
509509   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_long_r, tc0480scp_long_w)        /* tilemaps */
510510   AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_long_r, tc0480scp_ctrl_long_w)
511   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_long_r, tc0100scn_long_w)        /* piv tilemaps */
512   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_long_r, tc0100scn_ctrl_long_w)
511   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, long_r, long_w)        /* piv tilemaps */
512   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_long_r, ctrl_long_w)
513513   AM_RANGE(0xa00000, 0xa0ffff) AM_RAM_WRITE(color_ram_w) AM_SHARE("paletteram")
514514   AM_RANGE(0xb00000, 0xb0000f) AM_RAM /* ? */
515515   AM_RANGE(0xc00000, 0xc00007) AM_RAM /* LAN controller? */
trunk/src/mame/drivers/galastrm.c
r23805r23806
184184   AM_RANGE(0x900000, 0x900003) AM_WRITE(galastrm_palette_w)                               /* TC0110PCR */
185185   AM_RANGE(0xb00000, 0xb00003) AM_WRITE(galastrm_tc0610_0_w)                              /* TC0610 */
186186   AM_RANGE(0xc00000, 0xc00003) AM_WRITE(galastrm_tc0610_1_w)
187   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_long_r, tc0100scn_long_w)        /* piv tilemaps */
188   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_long_r, tc0100scn_ctrl_long_w)
187   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, long_r, long_w)        /* piv tilemaps */
188   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_long_r, ctrl_long_w)
189189ADDRESS_MAP_END
190190
191191/***********************************************************
trunk/src/mame/drivers/warriorb.c
r23805r23806
212212
213213WRITE16_MEMBER(warriorb_state::tc0100scn_dual_screen_w)
214214{
215   tc0100scn_word_w(m_tc0100scn_1, space, offset, data, mem_mask);
216   tc0100scn_word_w(m_tc0100scn_2, space, offset, data, mem_mask);
215   m_tc0100scn_1->word_w(space, offset, data, mem_mask);
216   m_tc0100scn_2->word_w(space, offset, data, mem_mask);
217217}
218218
219219/***********************************************************
r23805r23806
223223static ADDRESS_MAP_START( darius2d_map, AS_PROGRAM, 16, warriorb_state )
224224   AM_RANGE(0x000000, 0x0fffff) AM_ROM
225225   AM_RANGE(0x100000, 0x10ffff) AM_RAM     /* main ram */
226   AM_RANGE(0x200000, 0x213fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_dual_screen_w)   /* tilemaps (all screens) */
226   AM_RANGE(0x200000, 0x213fff) AM_DEVREAD("tc0100scn_1", tc0100scn_device, word_r) AM_WRITE(tc0100scn_dual_screen_w)   /* tilemaps (all screens) */
227227   AM_RANGE(0x214000, 0x2141ff) AM_WRITENOP                                            /* error in screen clearing code ? */
228   AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
229   AM_RANGE(0x240000, 0x253fff) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)      /* tilemaps (2nd screen) */
230   AM_RANGE(0x260000, 0x26000f) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
228   AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_device, ctrl_word_r, ctrl_word_w)
229   AM_RANGE(0x240000, 0x253fff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, word_r, word_w)      /* tilemaps (2nd screen) */
230   AM_RANGE(0x260000, 0x26000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, ctrl_word_r, ctrl_word_w)
231231   AM_RANGE(0x400000, 0x400007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)    /* palette (1st screen) */
232232   AM_RANGE(0x420000, 0x420007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)    /* palette (2nd screen) */
233233   AM_RANGE(0x600000, 0x6013ff) AM_RAM AM_SHARE("spriteram")
r23805r23806
239239static ADDRESS_MAP_START( warriorb_map, AS_PROGRAM, 16, warriorb_state )
240240   AM_RANGE(0x000000, 0x1fffff) AM_ROM
241241   AM_RANGE(0x200000, 0x213fff) AM_RAM
242   AM_RANGE(0x300000, 0x313fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_dual_screen_w)   /* tilemaps (all screens) */
243   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
244   AM_RANGE(0x340000, 0x353fff) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)      /* tilemaps (2nd screen) */
245   AM_RANGE(0x360000, 0x36000f) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
242   AM_RANGE(0x300000, 0x313fff) AM_DEVREAD("tc0100scn_1", tc0100scn_device, word_r) AM_WRITE(tc0100scn_dual_screen_w)   /* tilemaps (all screens) */
243   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_device, ctrl_word_r, ctrl_word_w)
244   AM_RANGE(0x340000, 0x353fff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, word_r, word_w)      /* tilemaps (2nd screen) */
245   AM_RANGE(0x360000, 0x36000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, ctrl_word_r, ctrl_word_w)
246246   AM_RANGE(0x400000, 0x400007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)    /* palette (1st screen) */
247247   AM_RANGE(0x420000, 0x420007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)    /* palette (2nd screen) */
248248   AM_RANGE(0x600000, 0x6013ff) AM_RAM AM_SHARE("spriteram")
trunk/src/mame/drivers/othunder.c
r23805r23806
457457//  AM_RANGE(0x090006, 0x090007) AM_WRITE(eeprom_w)
458458//  AM_RANGE(0x09000c, 0x09000d) AM_WRITENOP   /* ?? (keeps writing 0x77) */
459459   AM_RANGE(0x100000, 0x100007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_rbswap_word_w)   /* palette */
460   AM_RANGE(0x200000, 0x20ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
461   AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
460   AM_RANGE(0x200000, 0x20ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
461   AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
462462   AM_RANGE(0x300000, 0x300003) AM_READWRITE(othunder_sound_r, othunder_sound_w)
463463   AM_RANGE(0x400000, 0x4005ff) AM_RAM AM_SHARE("spriteram")
464464   AM_RANGE(0x500000, 0x500007) AM_READWRITE(othunder_lightgun_r, othunder_lightgun_w)
trunk/src/mame/drivers/taito_z.c
r23805r23806
14971497   AM_RANGE(0x084000, 0x087fff) AM_RAM AM_SHARE("share1")
14981498   AM_RANGE(0x090000, 0x090001) AM_WRITE(contcirc_out_w)    /* road palette bank, sub CPU reset, 3d glasses control */
14991499   AM_RANGE(0x100000, 0x100007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_rbswap_word_w)   /* palette */
1500   AM_RANGE(0x200000, 0x20ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1501   AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1500   AM_RANGE(0x200000, 0x20ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1501   AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
15021502   AM_RANGE(0x300000, 0x301fff) AM_DEVREADWRITE_LEGACY("tc0150rod", tc0150rod_word_r, tc0150rod_word_w)    /* "root ram" */
15031503   AM_RANGE(0x400000, 0x4006ff) AM_RAM AM_SHARE("spriteram")
15041504ADDRESS_MAP_END
r23805r23806
15231523   AM_RANGE(0x800000, 0x800001) AM_WRITE(chasehq_cpua_ctrl_w)
15241524   AM_RANGE(0x820000, 0x820003) AM_READWRITE(taitoz_sound_r, taitoz_sound_w)
15251525   AM_RANGE(0xa00000, 0xa00007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_word_w)  /* palette */
1526   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1527   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1526   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1527   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
15281528   AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_SHARE("spriteram")
15291529   AM_RANGE(0xe00000, 0xe003ff) AM_READWRITE(chasehq_motor_r, chasehq_motor_w) /* motor cpu */
15301530ADDRESS_MAP_END
r23805r23806
15451545   AM_RANGE(0x300000, 0x3006ff) AM_RAM AM_SHARE("spriteram")
15461546   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0150rod", tc0150rod_word_r, tc0150rod_word_w)    /* "root ram" ??? */
15471547   AM_RANGE(0x500000, 0x500007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_rbswap_word_w)   /* palette */
1548   AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1549   AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1548   AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1549   AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
15501550ADDRESS_MAP_END
15511551
15521552static ADDRESS_MAP_START( enforce_cpub_map, AS_PROGRAM, 16, taitoz_state )
r23805r23806
15681568   AM_RANGE(0x800000, 0x800007) AM_READWRITE(bshark_stick_r, bshark_stick_w)
15691569   AM_RANGE(0xa00000, 0xa01fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
15701570   AM_RANGE(0xc00000, 0xc00fff) AM_RAM AM_SHARE("spriteram")
1571   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1572   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1571   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1572   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
15731573ADDRESS_MAP_END
15741574
15751575static ADDRESS_MAP_START( bsharkjjs_map, AS_PROGRAM, 16, taitoz_state )
r23805r23806
15811581//  AM_RANGE(0x800000, 0x800007) AM_READWRITE(bshark_stick_r, bshark_stick_w) /* No analog stick, this is the Joystick version */
15821582   AM_RANGE(0xa00000, 0xa01fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
15831583   AM_RANGE(0xc00000, 0xc00fff) AM_RAM AM_SHARE("spriteram")
1584   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1585   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1584   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1585   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
15861586ADDRESS_MAP_END
15871587
15881588static ADDRESS_MAP_START( bshark_cpub_map, AS_PROGRAM, 16, taitoz_state )
r23805r23806
16081608//  AM_RANGE(0x400000, 0x400001) AM_WRITE(cpua_ctrl_w)  // ?? doesn't seem to fit what's written
16091609   AM_RANGE(0x420000, 0x420003) AM_READWRITE(taitoz_sound_r, taitoz_sound_w)
16101610   AM_RANGE(0x800000, 0x801fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
1611   AM_RANGE(0xa00000, 0xa0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1612   AM_RANGE(0xa20000, 0xa2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1611   AM_RANGE(0xa00000, 0xa0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1612   AM_RANGE(0xa20000, 0xa2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
16131613   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_SHARE("spriteram")
16141614   AM_RANGE(0xc08000, 0xc08001) AM_READWRITE(sci_spriteframe_r, sci_spriteframe_w)
16151615ADDRESS_MAP_END
r23805r23806
16301630   AM_RANGE(0x800000, 0x800001) AM_WRITE(cpua_ctrl_w)
16311631   AM_RANGE(0x820000, 0x820003) AM_READWRITE(taitoz_sound_r, taitoz_sound_w)
16321632   AM_RANGE(0xa00000, 0xa00007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_word_w)  /* palette */
1633   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1634   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1633   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1634   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
16351635   AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_SHARE("spriteram")
16361636   AM_RANGE(0xe00000, 0xe00011) AM_WRITE(nightstr_motor_w)    /* Motor outputs */
16371637   AM_RANGE(0xe40000, 0xe40007) AM_READWRITE(nightstr_stick_r, bshark_stick_w)
r23805r23806
16521652   AM_RANGE(0x200000, 0x200001) AM_WRITE(cpua_ctrl_w)  // not needed, but it's probably like the others
16531653   AM_RANGE(0x300000, 0x300007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_word_w)  /* palette */
16541654   AM_RANGE(0x800000, 0x801fff) AM_DEVREADWRITE_LEGACY("tc0150rod", tc0150rod_word_r, tc0150rod_word_w)
1655   AM_RANGE(0xa00000, 0xa0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1656   AM_RANGE(0xa20000, 0xa2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1655   AM_RANGE(0xa00000, 0xa0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1656   AM_RANGE(0xa20000, 0xa2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
16571657   AM_RANGE(0xc40000, 0xc403ff) AM_RAM AM_SHARE("spriteram")
16581658ADDRESS_MAP_END
16591659
r23805r23806
16741674   AM_RANGE(0x30c000, 0x30ffff) AM_RAM
16751675   AM_RANGE(0x310000, 0x31ffff) AM_RAM AM_SHARE("share1")
16761676   AM_RANGE(0x500000, 0x5005ff) AM_RAM AM_SHARE("spriteram")
1677   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1678   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1677   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1678   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
16791679   AM_RANGE(0xb00000, 0xb00007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_rbswap_word_w)   /* palette */
16801680ADDRESS_MAP_END
16811681
trunk/src/mame/drivers/ninjaw.c
r23805r23806
406406
407407WRITE16_MEMBER(ninjaw_state::tc0100scn_triple_screen_w)
408408{
409   tc0100scn_word_w(m_tc0100scn_1, space, offset, data, mem_mask);
410   tc0100scn_word_w(m_tc0100scn_2, space, offset, data, mem_mask);
411   tc0100scn_word_w(m_tc0100scn_3, space, offset, data, mem_mask);
409   m_tc0100scn_1->word_w(space, offset, data, mem_mask);
410   m_tc0100scn_2->word_w(space, offset, data, mem_mask);
411   m_tc0100scn_3->word_w(space, offset, data, mem_mask);
412412}
413413
414414/***********************************************************
r23805r23806
424424   AM_RANGE(0x220000, 0x220003) AM_READWRITE(ninjaw_sound_r,ninjaw_sound_w)
425425   AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
426426   AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
427   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
428   AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
429   AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)      /* tilemaps (2nd screen) */
430   AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
431   AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_word_r, tc0100scn_word_w)      /* tilemaps (3rd screen) */
432   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
427   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_device, word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
428   AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_device, ctrl_word_r, ctrl_word_w)
429   AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, word_r, word_w)      /* tilemaps (2nd screen) */
430   AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, ctrl_word_r, ctrl_word_w)
431   AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_device, word_r, word_w)      /* tilemaps (3rd screen) */
432   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_device, ctrl_word_r, ctrl_word_w)
433433   AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (1st screen) */
434434   AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (2nd screen) */
435435   AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE_LEGACY("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (3rd screen) */
r23805r23806
445445   AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, port_r, port_w, 0x00ff)
446446   AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
447447   AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
448   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
448   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_device, word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
449449   AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (1st screen) */
450450   AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (2nd screen) */
451451   AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE_LEGACY("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (3rd screen) */
r23805r23806
460460   AM_RANGE(0x220000, 0x220003) AM_READWRITE(ninjaw_sound_r,ninjaw_sound_w)
461461   AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
462462   AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
463   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
464   AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
465   AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)      /* tilemaps (2nd screen) */
466   AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
467   AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_word_r, tc0100scn_word_w)      /* tilemaps (3rd screen) */
468   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
463   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_device, word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
464   AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_device, ctrl_word_r, ctrl_word_w)
465   AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, word_r, word_w)      /* tilemaps (2nd screen) */
466   AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, ctrl_word_r, ctrl_word_w)
467   AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_device, word_r, word_w)      /* tilemaps (3rd screen) */
468   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_device, ctrl_word_r, ctrl_word_w)
469469   AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (1st screen) */
470470   AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (2nd screen) */
471471   AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE_LEGACY("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)        /* palette (3rd screen) */
r23805r23806
478478   AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, port_r, port_w, 0x00ff)
479479   AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
480480   AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
481   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
481   AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_device, word_r) AM_WRITE(tc0100scn_triple_screen_w) /* tilemaps (1st screen/all screens) */
482482ADDRESS_MAP_END
483483
484484
trunk/src/mame/drivers/asuka.c
r23805r23806
326326   AM_RANGE(0x800000, 0x8007ff) AM_READWRITE(bonzeadv_cchip_ram_r, bonzeadv_cchip_ram_w)
327327   AM_RANGE(0x800802, 0x800803) AM_READWRITE(bonzeadv_cchip_ctrl_r, bonzeadv_cchip_ctrl_w)
328328   AM_RANGE(0x800c00, 0x800c01) AM_WRITE(bonzeadv_cchip_bank_w)
329   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
330   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
329   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
330   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
331331   AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("pc090oj", pc090oj_device, word_r, word_w)  /* sprite ram */
332332ADDRESS_MAP_END
333333
r23805r23806
340340   AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
341341   AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
342342   AM_RANGE(0x400000, 0x40000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
343   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
343   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
344344   AM_RANGE(0xc10000, 0xc103ff) AM_WRITENOP    /* error in Asuka init code */
345   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
345   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
346346   AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("pc090oj", pc090oj_device, word_r, word_w)  /* sprite ram */
347347ADDRESS_MAP_END
348348
r23805r23806
356356   AM_RANGE(0x900000, 0x90000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
357357   AM_RANGE(0xa00000, 0xa0000f) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_4bpg_word_w)
358358   AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE("pc090oj", pc090oj_device, word_r, word_w)  /* sprite ram */
359   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
360   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
359   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
360   AM_RANGE(0xc20000, 0xc2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
361361ADDRESS_MAP_END
362362
363363static ADDRESS_MAP_START( eto_map, AS_PROGRAM, 16   /* N.B. tc100scn mirror overlaps spriteram */, asuka_state )
r23805r23806
370370   AM_RANGE(0x4e0000, 0x4e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
371371   AM_RANGE(0x4e0002, 0x4e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
372372   AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("pc090oj", pc090oj_device, word_r, word_w)  /* sprite ram */
373   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVWRITE_LEGACY("tc0100scn", tc0100scn_word_w)
374   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
375   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
373   AM_RANGE(0xc00000, 0xc0ffff) AM_DEVWRITE("tc0100scn", tc0100scn_device, word_w)
374   AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
375   AM_RANGE(0xd20000, 0xd2000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
376376ADDRESS_MAP_END
377377
378378
trunk/src/mame/drivers/taito_o.c
r23805r23806
3131#include "emu.h"
3232#include "cpu/z80/z80.h"
3333#include "cpu/m68000/m68000.h"
34#include "video/taitoic.h"
3534#include "sound/2203intf.h"
3635#include "includes/taito_o.h"
3736
r23805r23806
6564   AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM
6665   AM_RANGE(0x200000, 0x20000f) AM_READWRITE(io_r, io_w) /* TC0220IOC ? */
6766   AM_RANGE(0x300000, 0x300003) AM_DEVREADWRITE8("ymsnd", ym2203_device, read, write, 0x00ff)
68   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
67   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE("tc0080vco", tc0080vco_device, word_r, word_w)
6968   AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
7069ADDRESS_MAP_END
7170
trunk/src/mame/drivers/wgp.c
r23805r23806
636636   AM_RANGE(0x180000, 0x18000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0xff00)
637637   AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(cpua_ctrl_w)
638638   AM_RANGE(0x200000, 0x20000f) AM_READWRITE(wgp_adinput_r,wgp_adinput_w)
639   AM_RANGE(0x300000, 0x30ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)            /* tilemaps */
640   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
639   AM_RANGE(0x300000, 0x30ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)            /* tilemaps */
640   AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
641641   AM_RANGE(0x400000, 0x40bfff) AM_RAM AM_SHARE("spritemap")   /* sprite tilemaps */
642642   AM_RANGE(0x40c000, 0x40dfff) AM_RAM AM_SHARE("spriteram")   /* sprite ram */
643643   AM_RANGE(0x40fff0, 0x40fff1) AM_WRITENOP    /* ?? (writes 0x8000 and 0 alternately - Wgp2 just 0) */
trunk/src/mame/drivers/taitoair.c
r23805r23806
221221#include "includes/taitoipt.h"
222222#include "includes/taitoair.h"
223223#include "audio/taitosnd.h"
224#include "video/taitoic.h"
225224#include "cpu/tms32025/tms32025.h"
226225#include "sound/2610intf.h"
227226
r23805r23806
392391   AM_RANGE(0x140000, 0x140001) AM_WRITE(system_control_w) /* Pause the TMS32025 */
393392   AM_RANGE(0x180000, 0x187fff) AM_RAM_WRITE(airsys_gradram_w) AM_SHARE("gradram")                 /* "gradiation ram (0/1)" */
394393   AM_RANGE(0x188000, 0x189fff) AM_MIRROR(0x2000) AM_RAM_WRITE(airsys_paletteram16_w) AM_SHARE("paletteram")
395   AM_RANGE(0x800000, 0x820fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)    /* tilemaps, sprites */
394   AM_RANGE(0x800000, 0x820fff) AM_DEVREADWRITE("tc0080vco", tc0080vco_device, word_r, word_w)    /* tilemaps, sprites */
396395   AM_RANGE(0x906000, 0x906007) AM_RAM // DMA?
397396   AM_RANGE(0x908000, 0x90ffff) AM_RAM AM_SHARE("line_ram")    /* "line ram" */
398397   AM_RANGE(0x910000, 0x91ffff) AM_RAM AM_SHARE("dsp_ram") /* "dsp common ram" (TMS320C25) */
trunk/src/mame/drivers/taito_h.c
r23805r23806
246246   AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, port_r, port_w, 0x00ff)
247247   AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
248248   AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
249   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
249   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE("tc0080vco", tc0080vco_device, word_r, word_w)
250250   AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
251251ADDRESS_MAP_END
252252
r23805r23806
257257   AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, port_r, port_w, 0x00ff)
258258   AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
259259   AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
260   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
260   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE("tc0080vco", tc0080vco_device, word_r, word_w)
261261   AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
262262ADDRESS_MAP_END
263263
r23805r23806
267267   AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
268268   AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
269269   AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
270   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
270   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE("tc0080vco", tc0080vco_device, word_r, word_w)
271271   AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
272272   AM_RANGE(0x600000, 0x600001) AM_WRITENOP    /* ?? writes zero once per frame */
273273ADDRESS_MAP_END
trunk/src/mame/drivers/taito_f2.c
r23805r23806
693693   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
694694   AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
695695   AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
696   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
696   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
697697   AM_RANGE(0x810000, 0x81ffff) AM_WRITENOP   /* error in game init code ? */
698   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
698   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
699699   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
700700   AM_RANGE(0xb00002, 0xb00003) AM_WRITENOP   /* ?? */
701701ADDRESS_MAP_END
r23805r23806
707707   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
708708   AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
709709   AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
710   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
711   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
710   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
711   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
712712   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
713713   AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE_LEGACY("tc0280grd", tc0280grd_word_r, tc0280grd_word_w)    /* ROZ tilemap */
714714   AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE_LEGACY("tc0280grd", tc0280grd_ctrl_word_w)
r23805r23806
724724   AM_RANGE(0x200000, 0x20ffff) AM_RAM
725725   AM_RANGE(0x300000, 0x301fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
726726   AM_RANGE(0x400000, 0x40001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
727   AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
727   AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
728728   AM_RANGE(0x610000, 0x61ffff) AM_RAM   /* unused? */
729   AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
729   AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
730730   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("spriteram")
731731ADDRESS_MAP_END
732732
r23805r23806
737737   AM_RANGE(0x220000, 0x220001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
738738   AM_RANGE(0x220002, 0x220003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
739739   AM_RANGE(0x300000, 0x30ffff) AM_RAM
740   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_word_r, tc0100scn_word_w)  /* tilemaps */
741   AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
742   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)  /* tilemaps */
743   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
740   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_device, word_r, word_w)  /* tilemaps */
741   AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_device, ctrl_word_r, word_w)
742   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, word_r, word_w)  /* tilemaps */
743   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, ctrl_word_r, ctrl_word_w)
744744   AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_SHARE("spriteram")
745745   AM_RANGE(0x800000, 0x80001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
746746ADDRESS_MAP_END
r23805r23806
753753   AM_RANGE(0x300018, 0x30001f) AM_READ(cameltry_paddle_r)
754754   AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
755755   AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
756   AM_RANGE(0x800000, 0x813fff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
757   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
756   AM_RANGE(0x800000, 0x813fff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
757   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
758758   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
759759   AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE_LEGACY("tc0280grd", tc0280grd_word_r, tc0280grd_word_w)    /* ROZ tilemap */
760760   AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE_LEGACY("tc0280grd", tc0280grd_ctrl_word_w)
r23805r23806
768768   AM_RANGE(0x500000, 0x50000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
769769   AM_RANGE(0x600000, 0x600001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
770770   AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
771   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
772   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
771   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
772   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
773773   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
774774   AM_RANGE(0x910000, 0x9120ff) AM_WRITENOP   /* error in init code ? */
775775ADDRESS_MAP_END
r23805r23806
781781   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
782782   AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
783783   AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
784   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
785   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
784   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
785   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
786786   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
787787   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
788788ADDRESS_MAP_END
r23805r23806
802802   AM_RANGE(0x600000, 0x600001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
803803   AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
804804   AM_RANGE(0x680000, 0x680001) AM_WRITENOP   /* ??? */
805   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
805   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
806806   AM_RANGE(0x810000, 0x81ffff) AM_WRITENOP   /* error in init code ? */
807   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
807   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
808808   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
809809ADDRESS_MAP_END
810810
r23805r23806
816816   AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
817817   AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
818818//  AM_RANGE(0x500000, 0x500001) AM_WRITENOP   /* ?? */
819   AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps (not used) */
820   AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
819   AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps (not used) */
820   AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
821821   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("spriteram")   /* sprite ram */
822822ADDRESS_MAP_END
823823
r23805r23806
828828   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_wordswap_r, halfword_wordswap_w)
829829   AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
830830   AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
831   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
832   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
831   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
832   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
833833   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
834834//  AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP   /* ?? */
835835   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
r23805r23806
852852   AM_RANGE(0x504000, 0x504001) AM_WRITENOP    /* unknown... various values */
853853   AM_RANGE(0x508000, 0x50800f) AM_READ_PORT("IN3")
854854   AM_RANGE(0x50c000, 0x50c00f) AM_READ_PORT("IN4")
855   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
856   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
855   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
856   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
857857   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
858858   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
859859ADDRESS_MAP_END
r23805r23806
870870   AM_RANGE(0x350000, 0x350001) AM_WRITENOP   /* watchdog ? */
871871   AM_RANGE(0x360000, 0x360001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
872872   AM_RANGE(0x360002, 0x360003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
873   AM_RANGE(0x380000, 0x380001) AM_DEVWRITE_LEGACY("tc0100scn", tc0100scn_gfxbank_w)   /* scr gfx bank select */
874   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
875   AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
873   AM_RANGE(0x380000, 0x380001) AM_DEVWRITE("tc0100scn", tc0100scn_device, gfxbank_w)   /* scr gfx bank select */
874   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
875   AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
876876   AM_RANGE(0x500000, 0x50ffff) AM_RAM AM_SHARE("spriteram")
877877ADDRESS_MAP_END
878878
r23805r23806
905905   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
906906   AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
907907   AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
908   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
909   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
908   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
909   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
910910   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
911911   AM_RANGE(0xa20000, 0xa20001) AM_WRITE(koshien_spritebank_w)
912912   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
r23805r23806
917917   AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
918918   AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
919919   AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
920   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
921   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
920   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
921   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
922922   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
923923   AM_RANGE(0xa00000, 0xa01fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
924924   AM_RANGE(0xb00000, 0xb10fff) AM_RAM   /* deliberate writes to $b10xxx, I think */
r23805r23806
936936   AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
937937   AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
938938   AM_RANGE(0x600000, 0x60000f) AM_WRITE(taitof2_spritebank_w)
939   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
940   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
939   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
940   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
941941   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
942942   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* b00002 written like a watchdog?! */
943943ADDRESS_MAP_END
r23805r23806
957957   AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
958958   AM_RANGE(0x500000, 0x50000f) AM_WRITE(taitof2_spritebank_w)
959959   AM_RANGE(0x504000, 0x504001) AM_WRITENOP    /* unknown... various values */
960   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
961   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
960   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
961   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
962962   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
963963   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
964964ADDRESS_MAP_END
r23805r23806
971971   AM_RANGE(0x400000, 0x401fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
972972   AM_RANGE(0x500000, 0x50ffff) AM_RAM
973973   AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_SHARE("spriteram")
974   AM_RANGE(0x700000, 0x70ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
975   AM_RANGE(0x720000, 0x72000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
974   AM_RANGE(0x700000, 0x70ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
975   AM_RANGE(0x720000, 0x72000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
976976ADDRESS_MAP_END
977977
978978static ADDRESS_MAP_START( pulirula_map, AS_PROGRAM, 16, taitof2_state )
r23805r23806
985985//  AM_RANGE(0x500000, 0x500001) AM_WRITENOP   /* ??? */
986986   AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
987987   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
988   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
989   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
988   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
989   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
990990   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
991991   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
992992   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
r23805r23806
10151015   AM_RANGE(0x400000, 0x401fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
10161016   AM_RANGE(0x500000, 0x50ffff) AM_RAM
10171017   AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_SHARE("spriteram")
1018   AM_RANGE(0x700000, 0x70ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1019   AM_RANGE(0x720000, 0x72000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1018   AM_RANGE(0x700000, 0x70ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1019   AM_RANGE(0x720000, 0x72000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
10201020ADDRESS_MAP_END
10211021
10221022static ADDRESS_MAP_START( yesnoj_map, AS_PROGRAM, 16, taitof2_state )
10231023   AM_RANGE(0x000000, 0x07ffff) AM_ROM
10241024   AM_RANGE(0x200000, 0x20ffff) AM_RAM
10251025   AM_RANGE(0x400000, 0x40ffff) AM_RAM AM_SHARE("spriteram")
1026   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1027   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1026   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1027   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
10281028   AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
10291029//  AM_RANGE(0x700000, 0x70000b) AM_READ(yesnoj_unknown_r)   /* what's this? */
10301030   AM_RANGE(0x800000, 0x800001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
r23805r23806
10671067   AM_RANGE(0x600000, 0x60ffff) AM_RAM
10681068   AM_RANGE(0x700000, 0x70001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
10691069   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("spriteram")
1070   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1071   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1070   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1071   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
10721072   AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
10731073   AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
10741074   AM_RANGE(0xb00000, 0xb00001) AM_WRITENOP   /* watchdog? */
r23805r23806
10821082   AM_RANGE(0x500000, 0x500001) AM_WRITENOP   /* watchdog ? */
10831083   AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
10841084   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
1085   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1086   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1085   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1086   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
10871087   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
10881088   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
10891089   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
r23805r23806
10991099   AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
11001100   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
11011101   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("spriteram")
1102   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1103   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1102   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1103   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11041104   AM_RANGE(0xa00000, 0xa0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
11051105   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
11061106ADDRESS_MAP_END
r23805r23806
11101110   AM_RANGE(0x200000, 0x20ffff) AM_RAM
11111111   AM_RANGE(0x300000, 0x301fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
11121112   AM_RANGE(0x400000, 0x40ffff) AM_RAM AM_SHARE("spriteram")
1113   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1114   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1113   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1114   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11151115   AM_RANGE(0x600000, 0x67ffff) AM_ROM AM_REGION("extra", 0)   /* extra data rom */
11161116   AM_RANGE(0x700000, 0x70000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
11171117   AM_RANGE(0x900000, 0x90001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
r23805r23806
11281128   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0430grw", tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
11291129   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE_LEGACY("tc0430grw", tc0430grw_ctrl_word_w)
11301130   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
1131   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1132   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1131   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1132   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11331133   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
11341134   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
11351135   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
r23805r23806
11451145   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0430grw", tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
11461146   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE_LEGACY("tc0430grw", tc0430grw_ctrl_word_w)
11471147   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
1148   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)    /* tilemaps */
1149   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
1148   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
1149   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11501150   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
11511151   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
11521152   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
trunk/src/mame/drivers/groundfx.c
r23805r23806
230230   AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("snd_shared")
231231   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_long_r, tc0480scp_long_w)      /* tilemaps */
232232   AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_long_r, tc0480scp_ctrl_long_w)  // debugging
233   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_long_r, tc0100scn_long_w)    /* piv tilemaps */
234   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_long_r, tc0100scn_ctrl_long_w)
233   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, long_r, long_w)    /* piv tilemaps */
234   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_long_r, ctrl_long_w)
235235   AM_RANGE(0xa00000, 0xa0ffff) AM_RAM_WRITE(color_ram_w) AM_SHARE("paletteram") /* palette ram */
236236   AM_RANGE(0xb00000, 0xb003ff) AM_RAM                     // ?? single bytes, blending ??
237237   AM_RANGE(0xc00000, 0xc00007) AM_READNOP /* Network? */
trunk/src/mame/video/wgp.c
r23805r23806
5555   m_piv_tilemap[2]->set_scrolldy(-piv_yoffs, 0);
5656
5757   /* We don't need tilemap_set_scroll_rows, as the custom draw routine applies rowscroll manually */
58   tc0100scn_set_colbanks(m_tc0100scn, 0x80, 0xc0, 0x40);
58   m_tc0100scn->set_colbanks(0x80, 0xc0, 0x40);
5959
6060   save_item(NAME(m_piv_ctrl_reg));
6161   save_item(NAME(m_rotate_ctrl));
r23805r23806
670670      m_piv_tilemap[i]->set_scrolly(0, m_piv_scrolly[i]);
671671   }
672672
673   tc0100scn_tilemap_update(m_tc0100scn);
673   m_tc0100scn->tilemap_update();
674674
675675   bitmap.fill(0, cliprect);
676676
r23805r23806
704704   draw_sprites(bitmap, cliprect, 16);
705705
706706/* ... then here we should apply rotation from wgp_sate_ctrl[] to the bitmap before we draw the TC0100SCN layers on it */
707   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
707   layer[0] = m_tc0100scn->bottomlayer();
708708   layer[1] = layer[0] ^ 1;
709709   layer[2] = 2;
710710
711   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], 0, 0);
711   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], 0, 0);
712712
713713#ifdef MAME_DEBUG
714714   if (m_dislayer[3] == 0)
715715#endif
716   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 0);
717   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 0);
716   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 0);
717   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 0);
718718
719719#if 0
720720   {
trunk/src/mame/video/taito_o.c
r23805r23806
55***************************************************************************/
66
77#include "emu.h"
8#include "video/taitoic.h"
98#include "includes/taito_o.h"
109
1110
r23805r23806
4443      if (offs <  0x01b0 && priority == 0)    continue;
4544      if (offs >= 0x01b0 && priority == 1)    continue;
4645
47      x0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 1, 0xffff) & 0x3ff;
48      y0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 0, 0xffff) & 0x3ff;
49      zoomx     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x7f00) >> 8;
50      zoomy     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x007f);
51      tile_offs = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 3, 0xffff) & 0x1fff) << 2;
52      ysize     = size[(tc0080vco_sprram_r(m_tc0080vco, space, offs, 0xffff) & 0x0c00) >> 10];
46      x0        =  m_tc0080vco->sprram_r(space, offs + 1, 0xffff) & 0x3ff;
47      y0        =  m_tc0080vco->sprram_r(space, offs + 0, 0xffff) & 0x3ff;
48      zoomx     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x7f00) >> 8;
49      zoomy     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x007f);
50      tile_offs = (m_tc0080vco->sprram_r(space, offs + 3, 0xffff) & 0x1fff) << 2;
51      ysize     = size[(m_tc0080vco->sprram_r(space, offs, 0xffff) & 0x0c00) >> 10];
5352
5453      if (tile_offs)
5554      {
r23805r23806
8584         if (x0 >= 0x200) x0 -= 0x400;
8685         if (y0 >= 0x200) y0 -= 0x400;
8786
88         if (tc0080vco_flipscreen_r(m_tc0080vco))
87         if (m_tc0080vco->flipscreen_r())
8988         {
9089            x0 = 497 - x0;
9190            y0 = 498 - y0;
r23805r23806
108107               {
109108                  int tile, color, flipx, flipy;
110109
111                  tile  = tc0080vco_cram_0_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x7fff;
112                  color = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x001f;
113                  flipx = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0040;
114                  flipy = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0080;
110                  tile  = m_tc0080vco->cram_0_r(space, tile_offs, 0xffff) & 0x7fff;
111                  color = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x001f;
112                  flipx = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0040;
113                  flipy = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0080;
115114
116                  if (tc0080vco_flipscreen_r(m_tc0080vco))
115                  if (m_tc0080vco->flipscreen_r())
117116                  {
118117                     flipx ^= 0x0040;
119118                     flipy ^= 0x0080;
r23805r23806
140139
141140UINT32 taitoo_state::screen_update_parentj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
142141{
143   tc0080vco_tilemap_update(m_tc0080vco);
142   m_tc0080vco->tilemap_update();
144143
145144   bitmap.fill(0, cliprect);
146145
147   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
146   m_tc0080vco->tilemap_draw(bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
148147
149148   parentj_draw_sprites(bitmap, cliprect, 0);
150149   parentj_draw_sprites(bitmap, cliprect, 1);
151150
152   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0);
153   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0);
151   m_tc0080vco->tilemap_draw(bitmap, cliprect, 1, 0, 0);
152   m_tc0080vco->tilemap_draw(bitmap, cliprect, 2, 0, 0);
154153
155154   return 0;
156155}
trunk/src/mame/video/taito_f2.c
r23805r23806
138138{
139139   taitof2_core_vh_start(0, 0, 0);
140140
141   tc0100scn_set_bg_tilemask(m_tc0100scn, 0x7fff);
141   m_tc0100scn->set_bg_tilemask(0x7fff);
142142}
143143
144144VIDEO_START_MEMBER(taitof2_state,taitof2_footchmp)
r23805r23806
985985{
986986   taitof2_handle_sprite_buffering();
987987
988   tc0100scn_tilemap_update(m_tc0100scn);
988   m_tc0100scn->tilemap_update();
989989
990990   machine().priority_bitmap.fill(0, cliprect);
991991   bitmap.fill(0, cliprect);   /* wrong color? */
992992   draw_sprites(bitmap, cliprect, NULL, 0);
993   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn), 0, 0);
994   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn) ^ 1, 0, 0);
995   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, 2, 0, 0);
993   m_tc0100scn->tilemap_draw(bitmap, cliprect, m_tc0100scn->bottomlayer(), 0, 0);
994   m_tc0100scn->tilemap_draw(bitmap, cliprect, m_tc0100scn->bottomlayer() ^ 1, 0, 0);
995   m_tc0100scn->tilemap_draw(bitmap, cliprect, 2, 0, 0);
996996   return 0;
997997}
998998
r23805r23806
10011001{
10021002   taitof2_handle_sprite_buffering();
10031003
1004   tc0100scn_tilemap_update(m_tc0100scn);
1004   m_tc0100scn->tilemap_update();
10051005
10061006   machine().priority_bitmap.fill(0, cliprect);
10071007   bitmap.fill(0, cliprect);   /* wrong color? */
1008   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn), 0, 0);
1009   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn) ^ 1, 0, 0);
1008   m_tc0100scn->tilemap_draw(bitmap, cliprect, m_tc0100scn->bottomlayer(), 0, 0);
1009   m_tc0100scn->tilemap_draw(bitmap, cliprect, m_tc0100scn->bottomlayer() ^ 1, 0, 0);
10101010   draw_sprites(bitmap, cliprect, NULL, 0);
1011   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, 2, 0, 0);
1011   m_tc0100scn->tilemap_draw(bitmap, cliprect, 2, 0, 0);
10121012   return 0;
10131013}
10141014
r23805r23806
10201020
10211021   taitof2_handle_sprite_buffering();
10221022
1023   tc0100scn_tilemap_update(m_tc0100scn);
1023   m_tc0100scn->tilemap_update();
10241024
1025   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
1025   layer[0] = m_tc0100scn->bottomlayer();
10261026   layer[1] = layer[0] ^ 1;
10271027   layer[2] = 2;
10281028   m_tilepri[layer[0]] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f;
r23805r23806
10391039   machine().priority_bitmap.fill(0, cliprect);
10401040   bitmap.fill(0, cliprect);   /* wrong color? */
10411041
1042   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], 0, 1);
1043   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
1044   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
1042   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], 0, 1);
1043   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 2);
1044   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
10451045
10461046   draw_sprites(bitmap, cliprect, NULL, 1);
10471047   return 0;
r23805r23806
10761076   if (m_tc0430grw != NULL)
10771077      tc0430grw_tilemap_update(m_tc0430grw, roz_base_color);
10781078
1079   tc0100scn_tilemap_update(m_tc0100scn);
1079   m_tc0100scn->tilemap_update();
10801080
10811081   rozpri = (tc0360pri_r(m_tc0360pri, space, 1) & 0xc0) >> 6;
10821082   rozpri = (tc0360pri_r(m_tc0360pri, space, 8 + rozpri / 2) >> 4 * (rozpri & 1)) & 0x0f;
10831083
1084   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
1084   layer[0] = m_tc0100scn->bottomlayer();
10851085   layer[1] = layer[0] ^ 1;
10861086   layer[2] = 2;
10871087
r23805r23806
11131113      {
11141114         if (tilepri[layer[j]] == i)
11151115         {
1116            tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[j], 0, 1 << drawn);
1116            m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[j], 0, 1 << drawn);
11171117            m_tilepri[drawn] = i;
11181118            drawn++;
11191119         }
r23805r23806
11371137
11381138   taitof2_handle_sprite_buffering();
11391139
1140   tc0100scn_tilemap_update(m_tc0100scn_1);
1141   tc0100scn_tilemap_update(m_tc0100scn_2);
1140   m_tc0100scn_1->tilemap_update();
1141   m_tc0100scn_2->tilemap_update();
11421142
1143   layer[0][0] = tc0100scn_bottomlayer(m_tc0100scn_1);
1143   layer[0][0] = m_tc0100scn_1->bottomlayer();
11441144   layer[0][1] = layer[0][0] ^ 1;
11451145   layer[0][2] = 2;
11461146   tilepri[0][layer[0][0]] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f;
11471147   tilepri[0][layer[0][1]] = tc0360pri_r(m_tc0360pri, space, 5) >> 4;
11481148   tilepri[0][layer[0][2]] = tc0360pri_r(m_tc0360pri, space, 4) >> 4;
11491149
1150   layer[1][0] = tc0100scn_bottomlayer(m_tc0100scn_2);
1150   layer[1][0] = m_tc0100scn_2->bottomlayer();
11511151   layer[1][1] = layer[1][0] ^ 1;
11521152   layer[1][2] = 2;
11531153   tilepri[1][layer[1][0]] = tc0360pri_r(m_tc0360pri, space, 9) & 0x0f;
r23805r23806
11721172   while (drawn[0] < 2 && drawn[1] < 2)
11731173   {
11741174      int pick;
1175      device_t *tc0100scn;
1175      tc0100scn_device *tc0100scn;
11761176
11771177      if (tilepri[0][drawn[0]] < tilepri[1][drawn[1]])
11781178      {
r23805r23806
11851185         tc0100scn = m_tc0100scn_2;
11861186      }
11871187
1188      tc0100scn_tilemap_draw(tc0100scn , bitmap, cliprect, layer[pick][drawn[pick]], 0, 1 << (drawn[pick] + 2 * pick));
1188      tc0100scn->tilemap_draw(bitmap, cliprect, layer[pick][drawn[pick]], 0, 1 << (drawn[pick] + 2 * pick));
11891189      drawn[pick]++;
11901190   }
11911191   while (drawn[0] < 2)
11921192   {
1193      tc0100scn_tilemap_draw(m_tc0100scn_1, bitmap, cliprect, layer[0][drawn[0]], 0, 1 << drawn[0]);
1193      m_tc0100scn_1->tilemap_draw(bitmap, cliprect, layer[0][drawn[0]], 0, 1 << drawn[0]);
11941194      drawn[0]++;
11951195   }
11961196   while (drawn[1] < 2)
11971197   {
1198      tc0100scn_tilemap_draw(m_tc0100scn_2, bitmap, cliprect, layer[1][drawn[1]], 0, 1 << (drawn[1] + 2));
1198      m_tc0100scn_2->tilemap_draw(bitmap, cliprect, layer[1][drawn[1]], 0, 1 << (drawn[1] + 2));
11991199      drawn[1]++;
12001200   }
12011201
r23805r23806
12231223
12241224   if (tilepri[0][2] < tilepri[1][2])
12251225   {
1226      tc0100scn_tilemap_draw(m_tc0100scn_1, bitmap, cliprect, layer[0][2], 0, 0);
1227      tc0100scn_tilemap_draw(m_tc0100scn_2, bitmap, cliprect, layer[1][2], 0, 0);
1226      m_tc0100scn_1->tilemap_draw(bitmap, cliprect, layer[0][2], 0, 0);
1227      m_tc0100scn_2->tilemap_draw(bitmap, cliprect, layer[1][2], 0, 0);
12281228   }
12291229   else
12301230   {
1231      tc0100scn_tilemap_draw(m_tc0100scn_2, bitmap, cliprect, layer[1][2], 0, 0);
1232      tc0100scn_tilemap_draw(m_tc0100scn_1, bitmap, cliprect, layer[0][2], 0, 0);
1231      m_tc0100scn_2->tilemap_draw(bitmap, cliprect, layer[1][2], 0, 0);
1232      m_tc0100scn_1->tilemap_draw(bitmap, cliprect, layer[0][2], 0, 0);
12331233   }
12341234   return 0;
12351235}
trunk/src/mame/video/groundfx.c
r23805r23806
197197UINT32 groundfx_state::screen_update_groundfx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
198198{
199199   address_space &space = machine().driver_data()->generic_space();
200   device_t *tc0100scn = machine().device("tc0100scn");
201200   device_t *tc0480scp = machine().device("tc0480scp");
202201   UINT8 layer[5];
203202   UINT8 pivlayer[3];
204203   UINT16 priority;
205204
206   tc0100scn_tilemap_update(tc0100scn);
205   m_tc0100scn->tilemap_update();
207206   tc0480scp_tilemap_update(tc0480scp);
208207
209208   priority = tc0480scp_get_bg_priority(tc0480scp);
r23805r23806
214213   layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
215214   layer[4] = 4;   /* text layer always over bg layers */
216215
217   pivlayer[0] = tc0100scn_bottomlayer(tc0100scn);
216   pivlayer[0] = m_tc0100scn->bottomlayer();
218217   pivlayer[1] = pivlayer[0]^1;
219218   pivlayer[2] = 2;
220219
221220   machine().priority_bitmap.fill(0, cliprect);
222221   bitmap.fill(0, cliprect);   /* wrong color? */
223222
224   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
225   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[1], 0, 0);
223   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
224   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[1], 0, 0);
226225
227226   /*  BIG HACK!
228227
r23805r23806
240239       it's contents the usual way.
241240
242241   */
243   if (tc0100scn_long_r(tc0100scn, space, 0x4090 / 4, 0xffffffff) ||
242   if (m_tc0100scn->long_r(space, 0x4090 / 4, 0xffffffff) ||
244243         tc0480scp_long_r(tc0480scp, space, 0x20 / 4, 0xffffffff) == 0x240866)  /* Anything in text layer - really stupid hack */
245244   {
246245      tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 2);
247246      tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 4);
248247      tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 8);
249248
250      //tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, 0, pivlayer[2], 0, 0);
249      //m_tc0100scn->tilemap_draw(bitmap, cliprect, 0, pivlayer[2], 0, 0);
251250
252251      if (tc0480scp_long_r(tc0480scp, space, 0x20 / 4, 0xffffffff) != 0x240866) /* Stupid hack for start of race */
253252         tc0480scp_tilemap_draw(tc0480scp, bitmap, m_hack_cliprect, layer[0], 0, 0);
r23805r23806
260259      tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 4);
261260      tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 8);
262261
263      tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0);
262      m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[2], 0, 0);
264263
265264      draw_sprites(bitmap, cliprect, 0, 44, -574);
266265   }
trunk/src/mame/video/taitoic.c
r23805r23806
11631163/*                                                                         */
11641164/***************************************************************************/
11651165
1166struct tc0080vco_state
1167{
1168   UINT16 *       ram;
1169   UINT16 *       bg0_ram_0;
1170   UINT16 *       bg0_ram_1;
1171   UINT16 *       bg1_ram_0;
1172   UINT16 *       bg1_ram_1;
1173   UINT16 *       tx_ram_0;
1174   UINT16 *       tx_ram_1;
1175   UINT16 *       char_ram;
1176   UINT16 *       bgscroll_ram;
1177
1178/* FIXME: This sprite related stuff still needs to be accessed in
1179   video/taito_h */
1180   UINT16 *       chain_ram_0;
1181   UINT16 *       chain_ram_1;
1182   UINT16 *       spriteram;
1183   UINT16 *       scroll_ram;
1184
1185   UINT16         bg0_scrollx;
1186   UINT16         bg0_scrolly;
1187   UINT16         bg1_scrollx;
1188   UINT16         bg1_scrolly;
1189
1190   tilemap_t        *tilemap[3];
1191
1192   int            bg_gfx, tx_gfx;
1193   int            bg_xoffs, bg_yoffs;
1194   int            bg_flip_yoffs;
1195
1196   INT32          flipscreen;
1197   int            has_tx;
1198};
1199
12001166#define TC0080VCO_RAM_SIZE 0x21000
12011167#define TC0080VCO_CHAR_RAM_SIZE 0x2000
12021168#define TC0080VCO_TOTAL_CHARS 256
12031169
1170
12041171/*****************************************************************************
1205    INLINE FUNCTIONS
1172    DEVICE INTERFACE
12061173*****************************************************************************/
12071174
1208INLINE tc0080vco_state *tc0080vco_get_safe_token( device_t *device )
1175
1176const device_type TC0080VCO = &device_creator<tc0080vco_device>;
1177
1178tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1179   : device_t(mconfig, TC0080VCO, "Taito TC0080VCO", tag, owner, clock)
12091180{
1210   assert(device != NULL);
1211   assert(device->type() == TC0080VCO);
1181}
12121182
1213   return (tc0080vco_state *)downcast<tc0080vco_device *>(device)->token();
1183//-------------------------------------------------
1184//  device_config_complete - perform any
1185//  operations now that the configuration is
1186//  complete
1187//-------------------------------------------------
1188
1189void tc0080vco_device::device_config_complete()
1190{
1191   // inherit a copy of the static data
1192   const tc0080vco_interface *intf = reinterpret_cast<const tc0080vco_interface *>(static_config());
1193   if (intf != NULL)
1194   *static_cast<tc0080vco_interface *>(this) = *intf;
1195   
1196   // or initialize to defaults if none provided
1197   else
1198   {
1199   }
12141200}
12151201
1216INLINE const tc0080vco_interface *tc0080vco_get_interface( device_t *device )
1202//-------------------------------------------------
1203//  device_start - device-specific startup
1204//-------------------------------------------------
1205
1206void tc0080vco_device::device_start()
12171207{
1218   assert(device != NULL);
1219   assert((device->type() == TC0080VCO));
1220   return (const tc0080vco_interface *) device->static_config();
1208   /* Is this endian-correct ??? */
1209
1210   #define XOR(a) WORD_XOR_BE(a)
1211
1212   static const gfx_layout charlayout =
1213   {
1214   8, 8,   /* 8x8 pixels */
1215   256,    /* 256 chars */
1216   3,      /* 3 bits per pixel */
1217   { 0x10000*8 + XOR(2)*4, XOR(0)*4, XOR(2)*4 },
1218   { 0, 1, 2, 3, 4, 5, 6, 7 },
1219   { 16*0, 16*1, 16*2, 16*3, 16*4, 16*5, 16*6, 16*7 },
1220   16*8
1221   };
1222   
1223   m_tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::get_bg0_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
1224   m_tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::get_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
1225
1226   m_tilemap[0]->set_transparent_pen(0);
1227   m_tilemap[1]->set_transparent_pen(0);
1228
1229   m_tilemap[0]->set_scrolldx(m_bg_xoffs, 512);
1230   m_tilemap[1]->set_scrolldx(m_bg_xoffs, 512);
1231   m_tilemap[0]->set_scrolldy(m_bg_yoffs, m_bg_flip_yoffs);
1232   m_tilemap[1]->set_scrolldy(m_bg_yoffs, m_bg_flip_yoffs);
1233
1234   /* bg0 tilemap scrollable per pixel row */
1235   m_tilemap[0]->set_scroll_rows(512);
1236
1237   /* Perform extra initialisations for text layer */
1238   m_tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
1239
1240   m_tilemap[2]->set_scrolldx(0, 0);
1241   m_tilemap[2]->set_scrolldy(48, -448);
1242
1243   m_tilemap[2]->set_transparent_pen(0);
1244
1245   m_ram = auto_alloc_array_clear(machine(), UINT16, TC0080VCO_RAM_SIZE / 2);
1246
1247   m_char_ram      = m_ram + 0x00000 / 2;    /* continues at +0x10000 */
1248   m_tx_ram_0      = m_ram + 0x01000 / 2;
1249   m_chain_ram_0   = m_ram + 0x00000 / 2;    /* only used from +0x2000 */
1250
1251   m_bg0_ram_0     = m_ram + 0x0c000 / 2;
1252   m_bg1_ram_0     = m_ram + 0x0e000 / 2;
1253
1254   m_tx_ram_1      = m_ram + 0x11000 / 2;
1255   m_chain_ram_1   = m_ram + 0x10000 / 2;    /* only used from +0x12000 */
1256
1257   m_bg0_ram_1     = m_ram + 0x1c000 / 2;
1258   m_bg1_ram_1     = m_ram + 0x1e000 / 2;
1259   m_bgscroll_ram  = m_ram + 0x20000 / 2;
1260   m_spriteram     = m_ram + 0x20400 / 2;
1261   m_scroll_ram    = m_ram + 0x20800 / 2;
1262
1263   /* create the char set (gfx will then be updated dynamically from RAM) */
1264   machine().gfx[m_txnum] = auto_alloc(machine(), gfx_element(machine(), charlayout, (UINT8 *)m_char_ram, 64, 0));
1265
1266   save_pointer(NAME(m_ram), TC0080VCO_RAM_SIZE / 2);
1267   machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_device::postload), this));
12211268}
12221269
1270
12231271/*****************************************************************************
12241272    DEVICE HANDLERS
12251273*****************************************************************************/
r23805r23806
12421290#endif
12431291
12441292
1245TILE_GET_INFO_MEMBER(tc0080vco_device::tc0080vco_get_bg0_tile_info)
1293TILE_GET_INFO_MEMBER(tc0080vco_device::get_bg0_tile_info)
12461294{
1247   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this);
12481295   int color, tile;
12491296
1250   color = tc0080vco->bg0_ram_1[tile_index] & 0x001f;
1251   tile  = tc0080vco->bg0_ram_0[tile_index] & 0x7fff;
1297   color = m_bg0_ram_1[tile_index] & 0x001f;
1298   tile  = m_bg0_ram_0[tile_index] & 0x7fff;
12521299
12531300   tileinfo.category = 0;
12541301
12551302   SET_TILE_INFO_MEMBER(
1256         tc0080vco->bg_gfx,
1303         m_gfxnum,
12571304         tile,
12581305         color,
1259         TILE_FLIPYX((tc0080vco->bg0_ram_1[tile_index] & 0x00c0) >> 6));
1306         TILE_FLIPYX((m_bg0_ram_1[tile_index] & 0x00c0) >> 6));
12601307}
12611308
1262TILE_GET_INFO_MEMBER(tc0080vco_device::tc0080vco_get_bg1_tile_info)
1309TILE_GET_INFO_MEMBER(tc0080vco_device::get_bg1_tile_info)
12631310{
1264   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this);
12651311   int color, tile;
12661312
1267   color = tc0080vco->bg1_ram_1[tile_index] & 0x001f;
1268   tile  = tc0080vco->bg1_ram_0[tile_index] & 0x7fff;
1313   color = m_bg1_ram_1[tile_index] & 0x001f;
1314   tile  = m_bg1_ram_0[tile_index] & 0x7fff;
12691315
12701316   tileinfo.category = 0;
12711317
12721318   SET_TILE_INFO_MEMBER(
1273         tc0080vco->bg_gfx,
1319         m_gfxnum,
12741320         tile,
12751321         color,
1276         TILE_FLIPYX((tc0080vco->bg1_ram_1[tile_index] & 0x00c0) >> 6));
1322         TILE_FLIPYX((m_bg1_ram_1[tile_index] & 0x00c0) >> 6));
12771323}
12781324
1279TILE_GET_INFO_MEMBER(tc0080vco_device::tc0080vco_get_tx_tile_info)
1325TILE_GET_INFO_MEMBER(tc0080vco_device::get_tx_tile_info)
12801326{
1281   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this);
12821327   int tile;
12831328
1284   if (!tc0080vco->flipscreen)
1329   if (!m_flipscreen)
12851330   {
12861331      if ((tile_index & 1))
1287         tile = (tc0080vco->tx_ram_0[tile_index >> 1] & 0x00ff);
1332         tile = (m_tx_ram_0[tile_index >> 1] & 0x00ff);
12881333      else
1289         tile = (tc0080vco->tx_ram_0[tile_index >> 1] & 0xff00) >> 8;
1334         tile = (m_tx_ram_0[tile_index >> 1] & 0xff00) >> 8;
12901335      tileinfo.category = 0;
12911336   }
12921337   else
12931338   {
12941339      if ((tile_index & 1))
1295         tile = (tc0080vco->tx_ram_0[tile_index >> 1] & 0xff00) >> 8;
1340         tile = (m_tx_ram_0[tile_index >> 1] & 0xff00) >> 8;
12961341      else
1297         tile = (tc0080vco->tx_ram_0[tile_index >> 1] & 0x00ff);
1342         tile = (m_tx_ram_0[tile_index >> 1] & 0x00ff);
12981343      tileinfo.category = 0;
12991344   }
13001345
13011346   SET_TILE_INFO_MEMBER(
1302         tc0080vco->tx_gfx,
1347         m_txnum,
13031348         tile,
13041349         0x40,
13051350         0);     /* 0x20<<1 as 3bpp */
13061351}
13071352
13081353
1309/* Is this endian-correct ??? */
1310
1311#define XOR(a) WORD_XOR_BE(a)
1312
1313static const gfx_layout tc0080vco_charlayout =
1354WRITE16_MEMBER( tc0080vco_device::scrollram_w )
13141355{
1315   8, 8,   /* 8x8 pixels */
1316   256,    /* 256 chars */
1317   3,      /* 3 bits per pixel */
1318   { 0x10000*8 + XOR(2)*4, XOR(0)*4, XOR(2)*4 },
1319   { 0, 1, 2, 3, 4, 5, 6, 7 },
1320   { 16*0, 16*1, 16*2, 16*3, 16*4, 16*5, 16*6, 16*7 },
1321   16*8
1322};
1323
1324static WRITE16_DEVICE_HANDLER( tc0080vco_scrollram_w )
1325{
1326   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1327
13281356   switch (offset)
13291357   {
13301358      case 0x00:          /* screen invert control */
1331         tc0080vco->flipscreen = tc0080vco->scroll_ram[0] & 0x0c00;
1359         m_flipscreen = m_scroll_ram[0] & 0x0c00;
13321360
1333         tc0080vco->tilemap[0]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1334         tc0080vco->tilemap[1]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1335         tc0080vco->tilemap[2]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1361         m_tilemap[0]->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1362         m_tilemap[1]->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1363         m_tilemap[2]->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
13361364
1337         tc0080vco->bg0_scrollx = tc0080vco->scroll_ram[1] & 0x03ff;
1338         tc0080vco->bg1_scrollx = tc0080vco->scroll_ram[2] & 0x03ff;
1339         tc0080vco->bg0_scrolly = tc0080vco->scroll_ram[3] & 0x03ff;
1340         tc0080vco->bg1_scrolly = tc0080vco->scroll_ram[4] & 0x03ff;
1365         m_bg0_scrollx = m_scroll_ram[1] & 0x03ff;
1366         m_bg1_scrollx = m_scroll_ram[2] & 0x03ff;
1367         m_bg0_scrolly = m_scroll_ram[3] & 0x03ff;
1368         m_bg1_scrolly = m_scroll_ram[4] & 0x03ff;
13411369         break;
13421370
13431371      case 0x01:          /* BG0 scroll X */
1344         tc0080vco->bg0_scrollx = data & 0x03ff;
1372         m_bg0_scrollx = data & 0x03ff;
13451373         break;
13461374
13471375      case 0x02:          /* BG1 scroll X */
1348         tc0080vco->bg1_scrollx = data & 0x03ff;
1376         m_bg1_scrollx = data & 0x03ff;
13491377         break;
13501378
13511379      case 0x03:          /* BG0 scroll Y */
1352         tc0080vco->bg0_scrolly = data & 0x03ff;
1380         m_bg0_scrolly = data & 0x03ff;
13531381         break;
13541382
13551383      case 0x04:          /* BG1 scroll Y */
1356         tc0080vco->bg1_scrolly = data & 0x03ff;
1384         m_bg1_scrolly = data & 0x03ff;
13571385         break;
13581386
13591387      default:
r23805r23806
13611389   }
13621390}
13631391
1364READ16_DEVICE_HANDLER( tc0080vco_word_r )
1392READ16_MEMBER( tc0080vco_device::word_r )
13651393{
1366   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1367   return tc0080vco->ram[offset];
1394   return m_ram[offset];
13681395}
13691396
1370WRITE16_DEVICE_HANDLER( tc0080vco_word_w )
1397WRITE16_MEMBER( tc0080vco_device::word_w )
13711398{
1372   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1399   COMBINE_DATA(&m_ram[offset]);
13731400
1374   COMBINE_DATA(&tc0080vco->ram[offset]);
1375
13761401   /* A lot of tc0080vco writes require no action... */
13771402
13781403   if (offset < 0x1000 / 2)
13791404   {
1380      space.machine().gfx[tc0080vco->tx_gfx]->mark_dirty(offset / 8);
1405      space.machine().gfx[m_txnum]->mark_dirty(offset / 8);
13811406#if 0
1382      if (!tc0080vco->has_tx)
1407      if (!m_has_fg0)
13831408      {
1384         if (tc0080vco->ram[offset])
1409         if (m_ram[offset])
13851410         popmessage("Write non-zero to tc0080vco char ram\nPlease report to MAMEDEV");
13861411      }
13871412#endif
13881413   }
13891414   else if (offset < 0x2000 / 2)   /* fg0 (text layer) */
13901415   {
1391      tc0080vco->tilemap[2]->mark_tile_dirty((offset & 0x07ff) * 2);
1392      tc0080vco->tilemap[2]->mark_tile_dirty((offset & 0x07ff) * 2 + 1);
1416      m_tilemap[2]->mark_tile_dirty((offset & 0x07ff) * 2);
1417      m_tilemap[2]->mark_tile_dirty((offset & 0x07ff) * 2 + 1);
13931418#if 0
1394      if (!tc0080vco->has_tx)
1419      if (!m_has_fg0)
13951420      {
1396         if (tc0080vco->ram[offset])
1421         if (m_ram[offset])
13971422         popmessage("Write non-zero to tc0080vco fg0\nPlease report to MAMEDEV");
13981423      }
13991424#endif
r23805r23806
14011426   else if (offset < 0xc000 / 2)   /* chain ram */
14021427   {}
14031428   else if (offset < 0xe000 / 2)   /* bg0 (0) */
1404      tc0080vco->tilemap[0]->mark_tile_dirty((offset & 0xfff));
1429      m_tilemap[0]->mark_tile_dirty((offset & 0xfff));
14051430
14061431   else if (offset < 0x10000 / 2)  /* bg1 (0) */
1407      tc0080vco->tilemap[1]->mark_tile_dirty((offset & 0xfff));
1432      m_tilemap[1]->mark_tile_dirty((offset & 0xfff));
14081433
14091434   else if (offset < 0x11000 / 2)
14101435   {
1411      space.machine().gfx[tc0080vco->tx_gfx]->mark_dirty((offset - 0x10000 / 2) / 8);
1436      space.machine().gfx[m_txnum]->mark_dirty((offset - 0x10000 / 2) / 8);
14121437#if 0
1413      if (!tc0080vco->has_tx)
1438      if (!m_has_fg0)
14141439      {
1415         if (tc0080vco->ram[offset])
1440         if (m_ram[offset])
14161441         popmessage("Write non-zero to tc0080vco char-hi ram\nPlease report to MAMEDEV");
14171442      }
14181443#endif
r23805r23806
14201445   else if (offset < 0x12000 / 2)  /* unknown/unused */
14211446   {
14221447#if 1
1423      if (tc0080vco->ram[offset])
1448      if (m_ram[offset])
14241449      popmessage("Write non-zero to mystery tc0080vco area\nPlease report to MAMEDEV");
14251450#endif
14261451   }
14271452   else if (offset < 0x1c000 / 2)  /* chain ram */
14281453   {}
14291454   else if (offset < 0x1e000 / 2)  /* bg0 (1) */
1430      tc0080vco->tilemap[0]->mark_tile_dirty((offset & 0xfff));
1455      m_tilemap[0]->mark_tile_dirty((offset & 0xfff));
14311456
14321457   else if (offset < 0x20000 / 2)  /* bg1 (1) */
1433      tc0080vco->tilemap[1]->mark_tile_dirty((offset & 0xfff));
1458      m_tilemap[1]->mark_tile_dirty((offset & 0xfff));
14341459
14351460   else if (offset < 0x20400 / 2)  /* bg0 rowscroll */
14361461   {}
14371462   else if (offset < 0x20800 / 2)  /* sprite ram */
14381463   {}
14391464   else if (offset < 0x20fff / 2)
1440      tc0080vco_scrollram_w(device, space, offset - (0x20800 / 2), tc0080vco->ram[offset], mem_mask);
1465      scrollram_w(space, offset - (0x20800 / 2), m_ram[offset], mem_mask);
14411466}
14421467
1443void tc0080vco_tilemap_update( device_t *device )
1468void tc0080vco_device::tilemap_update( )
14441469{
1445   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
14461470   int j;
14471471
1448   if (!tc0080vco->flipscreen)
1472   if (!m_flipscreen)
14491473   {
14501474      for (j = 0; j < 0x400; j++)
1451         tc0080vco->tilemap[0]->set_scrollx((j + 0) & 0x3ff, -tc0080vco->bg0_scrollx - tc0080vco->bgscroll_ram[j & 0x1ff]);
1475         m_tilemap[0]->set_scrollx((j + 0) & 0x3ff, -m_bg0_scrollx - m_bgscroll_ram[j & 0x1ff]);
14521476   }
14531477   else
14541478   {
14551479      for (j = 0; j < 0x400; j++)
1456         tc0080vco->tilemap[0]->set_scrollx((j + 0) & 0x3ff, -tc0080vco->bg0_scrollx + tc0080vco->bgscroll_ram[j & 0x1ff]);
1480         m_tilemap[0]->set_scrollx((j + 0) & 0x3ff, -m_bg0_scrollx + m_bgscroll_ram[j & 0x1ff]);
14571481   }
14581482
1459   tc0080vco->tilemap[0]->set_scrolly(0,  tc0080vco->bg0_scrolly);
1460   tc0080vco->tilemap[1]->set_scrollx(0, -tc0080vco->bg1_scrollx);
1461   tc0080vco->tilemap[1]->set_scrolly(0,  tc0080vco->bg1_scrolly);
1462   tc0080vco->tilemap[2]->set_scrollx(0, 0);   /* no scroll (maybe) */
1463   tc0080vco->tilemap[2]->set_scrolly(0, 0);
1483   m_tilemap[0]->set_scrolly(0,  m_bg0_scrolly);
1484   m_tilemap[1]->set_scrollx(0, -m_bg1_scrollx);
1485   m_tilemap[1]->set_scrolly(0,  m_bg1_scrolly);
1486   m_tilemap[2]->set_scrollx(0, 0);   /* no scroll (maybe) */
1487   m_tilemap[2]->set_scrolly(0, 0);
14641488}
14651489
14661490
14671491/* NB: orientation_flipx code in following routine has not been tested */
14681492
1469static void tc0080vco_bg0_tilemap_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
1493void tc0080vco_device::bg0_tilemap_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
14701494{
1471   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1472   UINT16 zoom = tc0080vco->scroll_ram[6];
1495   UINT16 zoom = m_scroll_ram[6];
14731496   int zx, zy;
14741497
14751498   zx = (zoom & 0xff00) >> 8;
r23805r23806
14771500
14781501   if (zx == 0x3f && zy == 0x7f)       /* normal size */
14791502   {
1480      tc0080vco->tilemap[0]->draw(bitmap, cliprect, flags, priority);
1503      m_tilemap[0]->draw(bitmap, cliprect, flags, priority);
14811504   }
14821505   else        /* zoom + rowscroll = custom draw routine */
14831506   {
14841507      UINT16 *dst16, *src16;
14851508      UINT8 *tsrc;
14861509      UINT16 scanline[512];
1487      bitmap_ind16 &srcbitmap = tc0080vco->tilemap[0]->pixmap();
1488      bitmap_ind8 &flagsbitmap = tc0080vco->tilemap[0]->flagsmap();
1510      bitmap_ind16 &srcbitmap = m_tilemap[0]->pixmap();
1511      bitmap_ind8 &flagsbitmap = m_tilemap[0]->flagsmap();
14891512
14901513      int sx, zoomx, zoomy;
14911514      int dx, ex, dy, ey;
14921515      int i, y, y_index, src_y_index, row_index;
14931516      int x_index, x_step;
14941517
1495      int flip = tc0080vco->flipscreen;
1518      int flip = m_flipscreen;
14961519      int machine_flip = 0;   /* for  ROT 180 ? */
14971520
14981521      int min_x = cliprect.min_x;
r23805r23806
15391562
15401563      if (!flip)
15411564      {
1542         sx = (-tc0080vco->scroll_ram[1] - 1) << 16;
1543         y_index = (( tc0080vco->scroll_ram[3] - 1) << 16) + min_y * zoomy;
1565         sx = (-m_scroll_ram[1] - 1) << 16;
1566         y_index = (( m_scroll_ram[3] - 1) << 16) + min_y * zoomy;
15441567      }
15451568      else
15461569      {
15471570         /* adjustment for zx is entirely speculative */
1548         sx =  (( 0x200 + tc0080vco->scroll_ram[1]) << 16) - (max_x + min_x) * (zoomx - 0x10000);
1571         sx =  (( 0x200 + m_scroll_ram[1]) << 16) - (max_x + min_x) * (zoomx - 0x10000);
15491572
15501573         /* 0x130 correct for Dleague. Syvalion correct with 0x1f0. min_y is 0x20 and 0x30; max_y is 0x10f and 0x1bf; max_y + min_y seems a good bet... */
1551         y_index = ((-tc0080vco->scroll_ram[3] - 2) << 16) + min_y * zoomy - (max_y + min_y) * (zoomy - 0x10000);
1574         y_index = ((-m_scroll_ram[3] - 2) << 16) + min_y * zoomy - (max_y + min_y) * (zoomy - 0x10000);
15521575      }
15531576
15541577      if (!machine_flip)
r23805r23806
15651588         if (flip)
15661589            row_index = 0x1ff - row_index;
15671590
1568         x_index = sx - ((tc0080vco->bgscroll_ram[row_index] << 16));
1591         x_index = sx - ((m_bgscroll_ram[row_index] << 16));
15691592
15701593         src16 = &srcbitmap.pix16(src_y_index);
15711594         tsrc  = &flagsbitmap.pix8(src_y_index);
r23805r23806
15931616            }
15941617         }
15951618
1596         taitoic_drawscanline(bitmap, cliprect, 0, y, scanline, (flags & TILEMAP_DRAW_OPAQUE) ? 0 : 1 , ROT0, device->machine().priority_bitmap, priority);
1619         taitoic_drawscanline(bitmap, cliprect, 0, y, scanline, (flags & TILEMAP_DRAW_OPAQUE) ? 0 : 1 , ROT0, machine().priority_bitmap, priority);
15971620
15981621         y_index += zoomy;
15991622
r23805r23806
16181641   }                                                                               \
16191642}                                                                                   \
16201643while (0)
1621static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
1644void tc0080vco_device::bg1_tilemap_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
16221645{
1623   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
16241646   UINT8 layer = 1;
1625   UINT16 zoom = tc0080vco->scroll_ram[6 + layer];
1647   UINT16 zoom = m_scroll_ram[6 + layer];
16261648   int min_x = cliprect.min_x;
16271649   int max_x = cliprect.max_x;
16281650   int min_y = cliprect.min_y;
r23805r23806
16341656
16351657   if (zoomx == 0x3f && zoomy == 0x7f)     /* normal size */
16361658   {
1637      tc0080vco->tilemap[layer]->draw(bitmap, cliprect, flags, priority);
1659      m_tilemap[layer]->draw(bitmap, cliprect, flags, priority);
16381660   }
16391661   else        /* zoomed */
16401662   {
r23805r23806
16421664      int sx,sy;
16431665
16441666      /* shouldn't we set no_clip before doing this (see TC0480SCP) ? */
1645      bitmap_ind16 &srcbitmap = tc0080vco->tilemap[layer]->pixmap();
1667      bitmap_ind16 &srcbitmap = m_tilemap[layer]->pixmap();
16461668
16471669      if (zoomx < 63)
16481670      {
r23805r23806
16701692         zy = 0x10000 - ((zoomy - 0x7f) * 512);
16711693      }
16721694
1673      if (!tc0080vco->flipscreen)
1695      if (!m_flipscreen)
16741696      {
1675         sx = (-tc0080vco->scroll_ram[layer + 1] - 1) << 16;
1676         sy = ( tc0080vco->scroll_ram[layer + 3] - 1) << 16;
1697         sx = (-m_scroll_ram[layer + 1] - 1) << 16;
1698         sy = ( m_scroll_ram[layer + 3] - 1) << 16;
16771699      }
16781700      else
16791701      {
16801702         /* adjustment for zx is entirely speculative */
1681         sx =  (( 0x200 + tc0080vco->scroll_ram[layer + 1]) << 16) - (max_x + min_x) * (zx - 0x10000);
1682         sy =  (( 0x3fe - tc0080vco->scroll_ram[layer + 3]) << 16) - (max_y + min_y) * (zy - 0x10000);
1703         sx =  (( 0x200 + m_scroll_ram[layer + 1]) << 16) - (max_x + min_x) * (zx - 0x10000);
1704         sy =  (( 0x3fe - m_scroll_ram[layer + 3]) << 16) - (max_y + min_y) * (zy - 0x10000);
16831705      }
16841706
16851707      {
r23805r23806
16931715         INT32 incyy = zy;
16941716         int wraparound = 0;
16951717         UINT32 privalue = priority;
1696         bitmap_ind8 &priority = device->machine().priority_bitmap;
1718         bitmap_ind8 &priority = machine().priority_bitmap;
16971719
16981720         if (dest.bpp() == 16)
16991721            COPYROZBITMAP_CORE(UINT16, PIXEL_OP_COPY_TRANS0_SET_PRIORITY, UINT8);
r23805r23806
17041726}
17051727
17061728
1707void tc0080vco_tilemap_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
1729void tc0080vco_device::tilemap_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
17081730{
1709   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
17101731   int disable = 0x00; /* possibly layer disable bits do exist ?? */
17111732
17121733#if 0
r23805r23806
17181739      case 0:
17191740         if (disable & 0x01)
17201741            return;
1721         tc0080vco_bg0_tilemap_draw(device, bitmap, cliprect, flags, priority);
1742         bg0_tilemap_draw(bitmap, cliprect, flags, priority);
17221743         break;
17231744      case 1:
17241745         if (disable & 0x02)
17251746            return;
1726         tc0080vco_bg1_tilemap_draw(device, bitmap, cliprect, flags, priority);
1747         bg1_tilemap_draw(bitmap, cliprect, flags, priority);
17271748         break;
17281749      case 2:
17291750         if (disable & 0x04)
17301751            return;
1731         tc0080vco->tilemap[2]->draw(bitmap, cliprect, flags, priority);
1752         m_tilemap[2]->draw(bitmap, cliprect, flags, priority);
17321753         break;
17331754   }
17341755}
17351756
17361757/* FIXME: maybe it would be better to provide pointers to these RAM regions
17371758which can be accessed directly by the drivers... */
1738READ16_DEVICE_HANDLER( tc0080vco_cram_0_r )
1759READ16_MEMBER( tc0080vco_device::cram_0_r )
17391760{
1740   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1741   return tc0080vco->chain_ram_0[offset];
1761   return m_chain_ram_0[offset];
17421762}
17431763
1744READ16_DEVICE_HANDLER( tc0080vco_cram_1_r )
1764READ16_MEMBER( tc0080vco_device::cram_1_r )
17451765{
1746   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1747   return tc0080vco->chain_ram_1[offset];
1766   return m_chain_ram_1[offset];
17481767}
17491768
1750READ16_DEVICE_HANDLER( tc0080vco_sprram_r )
1769READ16_MEMBER( tc0080vco_device::sprram_r )
17511770{
1752   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1753   return tc0080vco->spriteram[offset];
1771   return m_spriteram[offset];
17541772}
17551773
1756READ16_DEVICE_HANDLER( tc0080vco_scrram_r )
1774READ16_MEMBER( tc0080vco_device::scrram_r )
17571775{
1758   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1759   return tc0080vco->scroll_ram[offset];
1776   return m_scroll_ram[offset];
17601777}
17611778
1762READ_LINE_DEVICE_HANDLER( tc0080vco_flipscreen_r )
1779READ_LINE_MEMBER( tc0080vco_device::flipscreen_r )
17631780{
1764   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
1765   return tc0080vco->flipscreen;
1781   return m_flipscreen;
17661782}
17671783
17681784
1769void tc0080vco_device::tc0080vco_postload()
1785void tc0080vco_device::postload()
17701786{
1771   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this);
1787   m_flipscreen = m_scroll_ram[0] & 0x0c00;
17721788
1773   tc0080vco->flipscreen = tc0080vco->scroll_ram[0] & 0x0c00;
1789   m_tilemap[0]->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1790   m_tilemap[1]->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1791   m_tilemap[2]->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
17741792
1775   tc0080vco->tilemap[0]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1776   tc0080vco->tilemap[1]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1777   tc0080vco->tilemap[2]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
1778
1779   tc0080vco->bg0_scrollx = tc0080vco->scroll_ram[1] & 0x03ff;
1780   tc0080vco->bg1_scrollx = tc0080vco->scroll_ram[2] & 0x03ff;
1781   tc0080vco->bg0_scrolly = tc0080vco->scroll_ram[3] & 0x03ff;
1782   tc0080vco->bg1_scrolly = tc0080vco->scroll_ram[4] & 0x03ff;
1793   m_bg0_scrollx = m_scroll_ram[1] & 0x03ff;
1794   m_bg1_scrollx = m_scroll_ram[2] & 0x03ff;
1795   m_bg0_scrolly = m_scroll_ram[3] & 0x03ff;
1796   m_bg1_scrolly = m_scroll_ram[4] & 0x03ff;
17831797}
17841798
1785/*****************************************************************************
1786    DEVICE INTERFACE
1787*****************************************************************************/
17881799
1800/***************************************************************************/
1801/*                                                                         */
1802/*                              TC0100SCN                                  */
1803/*                                                                         */
1804/***************************************************************************/
17891805
1790const device_type TC0080VCO = &device_creator<tc0080vco_device>;
17911806
1792tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1793   : device_t(mconfig, TC0080VCO, "Taito TC0080VCO", tag, owner, clock)
1807#define TC0100SCN_RAM_SIZE        0x14000   /* enough for double-width tilemaps */
1808#define TC0100SCN_TOTAL_CHARS     256
1809
1810const device_type TC0100SCN = &device_creator<tc0100scn_device>;
1811
1812tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1813   : device_t(mconfig, TC0100SCN, "Taito TC0100SCN", tag, owner, clock)
17941814{
1795   m_token = global_alloc_clear(tc0080vco_state);
17961815}
17971816
17981817//-------------------------------------------------
r23805r23806
18011820//  complete
18021821//-------------------------------------------------
18031822
1804void tc0080vco_device::device_config_complete()
1823void tc0100scn_device::device_config_complete()
18051824{
1825   // inherit a copy of the static data
1826   const tc0100scn_interface *intf = reinterpret_cast<const tc0100scn_interface *>(static_config());
1827   if (intf != NULL)
1828   *static_cast<tc0100scn_interface *>(this) = *intf;
1829   
1830   // or initialize to defaults if none provided
1831   else
1832   {
1833   }
18061834}
18071835
18081836//-------------------------------------------------
18091837//  device_start - device-specific startup
18101838//-------------------------------------------------
18111839
1812void tc0080vco_device::device_start()
1840void tc0100scn_device::device_start()
18131841{
1814   tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this);
1815   const tc0080vco_interface *intf = tc0080vco_get_interface(this);
1842   static const gfx_layout tc0100scn_charlayout =
1843   {
1844   8,8,    /* 8*8 characters */
1845   256,    /* 256 characters */
1846   2,  /* 2 bits per pixel */
1847   { XOR(0)*4, XOR(2)*4 },
1848   { 0, 1, 2, 3, 4, 5, 6, 7 },
1849   { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
1850   16*8    /* every sprite takes 16 consecutive bytes */
1851   };
1852   
1853   int xd, yd;
18161854
1817   /* use the given gfx sets for bg/tx tiles*/
1818   tc0080vco->bg_gfx = intf->gfxnum;
1819   tc0080vco->tx_gfx = intf->txnum;
1855   m_screen = machine().device<screen_device>(m_screen_tag);
18201856
1821   tc0080vco->bg_xoffs = intf->bg_xoffs;   /* usually 1 */
1822   tc0080vco->bg_yoffs = intf->bg_yoffs;   /* usually 1 */
1823   tc0080vco->bg_flip_yoffs = intf->bg_flip_yoffs; /* usually -2 */
1824   tc0080vco->has_tx = intf->has_fg0;  /* for debugging only */
1857   /* Set up clipping for multi-TC0100SCN games. We assume
1858      this code won't ever affect single screen games:
1859      Thundfox is the only one of those with two chips, and
1860      we're safe as it uses single width tilemaps. */
18251861
1826   tc0080vco->tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::tc0080vco_get_bg0_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
1827   tc0080vco->tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::tc0080vco_get_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
1862   m_cliprect = m_screen->visible_area();
18281863
1829   tc0080vco->tilemap[0]->set_transparent_pen(0);
1830   tc0080vco->tilemap[1]->set_transparent_pen(0);
1864   /* Single width versions */
1865   m_tilemap[0][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
1866   m_tilemap[1][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
1867   m_tilemap[2][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
18311868
1832   tc0080vco->tilemap[0]->set_scrolldx(tc0080vco->bg_xoffs, 512);
1833   tc0080vco->tilemap[1]->set_scrolldx(tc0080vco->bg_xoffs, 512);
1834   tc0080vco->tilemap[0]->set_scrolldy(tc0080vco->bg_yoffs, tc0080vco->bg_flip_yoffs);
1835   tc0080vco->tilemap[1]->set_scrolldy(tc0080vco->bg_yoffs, tc0080vco->bg_flip_yoffs);
1869   /* Double width versions */
1870   m_tilemap[0][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
1871   m_tilemap[1][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
1872   m_tilemap[2][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 32);
18361873
1837   /* bg0 tilemap scrollable per pixel row */
1838   tc0080vco->tilemap[0]->set_scroll_rows(512);
1874   m_tilemap[0][0]->set_transparent_pen(0);
1875   m_tilemap[1][0]->set_transparent_pen(0);
1876   m_tilemap[2][0]->set_transparent_pen(0);
18391877
1840   /* Perform extra initialisations for text layer */
1841   tc0080vco->tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::tc0080vco_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
1878   m_tilemap[0][1]->set_transparent_pen(0);
1879   m_tilemap[1][1]->set_transparent_pen(0);
1880   m_tilemap[2][1]->set_transparent_pen(0);
18421881
1843   tc0080vco->tilemap[2]->set_scrolldx(0, 0);
1844   tc0080vco->tilemap[2]->set_scrolldy(48, -448);
1882   /* Standard width tilemaps. I'm setting the optional chip #2
1883      7 bits higher and 2 pixels to the left than chip #1 because
1884      that's how thundfox wants it. */
18451885
1846   tc0080vco->tilemap[2]->set_transparent_pen(0);
1886   xd = (m_multiscrn_hack == 0) ?  (-m_x_offset) : (-m_x_offset - 2);
1887   yd = (m_multiscrn_hack == 0) ?  (8 - m_y_offset) : (1 - m_y_offset);
18471888
1848   tc0080vco->ram = auto_alloc_array_clear(machine(), UINT16, TC0080VCO_RAM_SIZE / 2);
1889   m_tilemap[0][0]->set_scrolldx(xd - 16, -m_flip_xoffs - xd - 16);
1890   m_tilemap[0][0]->set_scrolldy(yd,      -m_flip_yoffs - yd);
1891   m_tilemap[1][0]->set_scrolldx(xd - 16, -m_flip_xoffs - xd - 16);
1892   m_tilemap[1][0]->set_scrolldy(yd,      -m_flip_yoffs - yd);
1893   m_tilemap[2][0]->set_scrolldx(xd - 16, -m_flip_text_xoffs - xd - 16 - 7);
1894   m_tilemap[2][0]->set_scrolldy(yd,      -m_flip_text_yoffs - yd);
18491895
1850   tc0080vco->char_ram      = tc0080vco->ram + 0x00000 / 2;    /* continues at +0x10000 */
1851   tc0080vco->tx_ram_0      = tc0080vco->ram + 0x01000 / 2;
1852   tc0080vco->chain_ram_0   = tc0080vco->ram + 0x00000 / 2;    /* only used from +0x2000 */
1896   /* Double width tilemaps. We must correct offsets for
1897      extra chips, as MAME sees offsets from LHS of whole
1898      display not from the edges of individual screens.
1899      NB flipscreen tilemap offsets are based on Cameltry */
18531900
1854   tc0080vco->bg0_ram_0     = tc0080vco->ram + 0x0c000 / 2;
1855   tc0080vco->bg1_ram_0     = tc0080vco->ram + 0x0e000 / 2;
1901   xd = -m_x_offset - m_multiscrn_xoffs;
1902   yd = 8 - m_y_offset;
18561903
1857   tc0080vco->tx_ram_1      = tc0080vco->ram + 0x11000 / 2;
1858   tc0080vco->chain_ram_1   = tc0080vco->ram + 0x10000 / 2;    /* only used from +0x12000 */
1904   m_tilemap[0][1]->set_scrolldx(xd - 16, -m_flip_xoffs - xd - 16);
1905   m_tilemap[0][1]->set_scrolldy(yd,      -m_flip_yoffs - yd);
1906   m_tilemap[1][1]->set_scrolldx(xd - 16, -m_flip_xoffs - xd - 16);
1907   m_tilemap[1][1]->set_scrolldy(yd,      -m_flip_yoffs - yd);
1908   m_tilemap[2][1]->set_scrolldx(xd - 16, -m_flip_text_xoffs - xd - 16 - 7);
1909   m_tilemap[2][1]->set_scrolldy(yd,      -m_flip_text_yoffs - yd);
18591910
1860   tc0080vco->bg0_ram_1     = tc0080vco->ram + 0x1c000 / 2;
1861   tc0080vco->bg1_ram_1     = tc0080vco->ram + 0x1e000 / 2;
1862   tc0080vco->bgscroll_ram  = tc0080vco->ram + 0x20000 / 2;
1863   tc0080vco->spriteram     = tc0080vco->ram + 0x20400 / 2;
1864   tc0080vco->scroll_ram    = tc0080vco->ram + 0x20800 / 2;
1911   m_tilemap[0][0]->set_scroll_rows(512);
1912   m_tilemap[1][0]->set_scroll_rows(512);
1913   m_tilemap[0][1]->set_scroll_rows(512);
1914   m_tilemap[1][1]->set_scroll_rows(512);
18651915
1866   /* create the char set (gfx will then be updated dynamically from RAM) */
1867   machine().gfx[tc0080vco->tx_gfx] = auto_alloc(machine(), gfx_element(machine(), tc0080vco_charlayout, (UINT8 *)tc0080vco->char_ram, 64, 0));
1916   m_bg_tilemask = 0xffff;    /* Mjnquest has 0x7fff tilemask */
18681917
1869   save_pointer(NAME(tc0080vco->ram), TC0080VCO_RAM_SIZE / 2);
1870   machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_device::tc0080vco_postload), this));
1871}
1918   m_bg_col_mult = 1; /* multiplier for when bg gfx != 4bpp */
1919   m_tx_col_mult = 1; /* multiplier needed when bg gfx is 6bpp */
18721920
1873/***************************************************************************/
1874/*                                                                         */
1875/*                              TC0100SCN                                  */
1876/*                                                                         */
1877/***************************************************************************/
1921   if (machine().gfx[m_gfxnum]->granularity() == 2)    /* Yuyugogo, Yesnoj */
1922      m_bg_col_mult = 8;
18781923
1879struct tc0100scn_state
1880{
1881   UINT16       ctrl[8];
1924   if (machine().gfx[m_gfxnum]->granularity() == 0x40) /* Undrfire */
1925      m_tx_col_mult = 4;
18821926
1883   UINT16 *     ram;
1884   UINT16 *     bg_ram;
1885   UINT16 *     fg_ram;
1886   UINT16 *     tx_ram;
1887   UINT16 *     char_ram;
1888   UINT16 *     bgscroll_ram;
1889   UINT16 *     fgscroll_ram;
1890   UINT16 *     colscroll_ram;
1927//logerror("TC0100SCN bg gfx granularity %04x: multiplier %04x\n", machine().gfx[m_gfxnum]->granularity(), m_tx_col_mult);
18911928
1892   int          bgscrollx, bgscrolly, fgscrollx, fgscrolly;
1929   m_ram = auto_alloc_array_clear(machine(), UINT16, TC0100SCN_RAM_SIZE / 2);
18931930
1894   /* We keep two tilemaps for each of the 3 actual tilemaps: one at standard width, one double */
1895   tilemap_t      *tilemap[3][2];
1896   rectangle    cliprect;
1931   set_layer_ptrs();
18971932
1898   int          bg_gfx, tx_gfx;
1899   int          bg_col_mult, bg_tilemask, tx_col_mult;
1900   INT32        gfxbank, colbank;
1901   INT32        bg0_colbank, bg1_colbank, tx_colbank;
1902   int          dblwidth;
1933   set_colbanks(0, 0, 0);  /* standard values, only Wgp & multiscreen games change them */
1934                           /* we call this here, so that they can be modified at VIDEO_START*/
19031935
1904   screen_device *screen;
1905};
1936   /* create the char set (gfx will then be updated dynamically from RAM) */
1937   machine().gfx[m_txnum] = auto_alloc(machine(), gfx_element(machine(), tc0100scn_charlayout, (UINT8 *)m_char_ram, 64, 0));
19061938
1907#define TC0100SCN_RAM_SIZE        0x14000   /* enough for double-width tilemaps */
1908#define TC0100SCN_TOTAL_CHARS     256
1939   save_pointer(NAME(m_ram), TC0100SCN_RAM_SIZE / 2);
1940   save_item(NAME(m_ctrl));
1941   save_item(NAME(m_dblwidth));
1942   save_item(NAME(m_gfxbank));
1943   machine().save().register_postload(save_prepost_delegate(FUNC(tc0100scn_device::postload), this));
1944}
19091945
1910/*****************************************************************************
1911    INLINE FUNCTIONS
1912*****************************************************************************/
1946//-------------------------------------------------
1947//  device_reset - device-specific reset
1948//-------------------------------------------------
19131949
1914INLINE tc0100scn_state *tc0100scn_get_safe_token( device_t *device )
1950void tc0100scn_device::device_reset()
19151951{
1916   assert(device != NULL);
1917   assert(device->type() == TC0100SCN);
1952   int i;
19181953
1919   return (tc0100scn_state *)downcast<tc0100scn_device *>(device)->token();
1920}
1954   m_dblwidth = 0;
1955   m_colbank = 0;
1956   m_gfxbank = 0; /* Mjnquest uniquely banks tiles */
19211957
1922INLINE const tc0100scn_interface *tc0100scn_get_interface( device_t *device )
1923{
1924   assert(device != NULL);
1925   assert((device->type() == TC0100SCN));
1926   return (const tc0100scn_interface *) device->static_config();
1958   for (i = 0; i < 8; i++)
1959      m_ctrl[i] = 0;
19271960}
19281961
1962
19291963/*****************************************************************************
19301964    DEVICE HANDLERS
19311965*****************************************************************************/
19321966
1933INLINE void common_get_bg0_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
1967void tc0100scn_device::common_get_bg0_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
19341968{
1935   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
19361969   int code, attr;
19371970
19381971   if (!dblwidth)
19391972   {
19401973      /* Mahjong Quest (F2 system) inexplicably has a banking feature */
1941      code = (ram[2 * tile_index + 1] & tc0100scn->bg_tilemask) + (tc0100scn->gfxbank << 15);
1974      code = (ram[2 * tile_index + 1] & m_bg_tilemask) + (m_gfxbank << 15);
19421975      attr = ram[2 * tile_index];
19431976   }
19441977   else
19451978   {
1946      code = ram[2 * tile_index + 1] & tc0100scn->bg_tilemask;
1979      code = ram[2 * tile_index + 1] & m_bg_tilemask;
19471980      attr = ram[2 * tile_index];
19481981   }
19491982
1950   SET_TILE_INFO(
1983   SET_TILE_INFO_MEMBER(
19511984         gfxnum,
19521985         code,
1953         (((attr * tc0100scn->bg_col_mult) + tc0100scn->bg0_colbank) & 0xff) + colbank,
1986         (((attr * m_bg_col_mult) + m_bg0_colbank) & 0xff) + colbank,
19541987         TILE_FLIPYX((attr & 0xc000) >> 14));
19551988}
19561989
1957INLINE void common_get_bg1_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
1990void tc0100scn_device::common_get_bg1_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
19581991{
1959   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
19601992   int code, attr;
19611993
19621994   if (!dblwidth)
19631995   {
19641996      /* Mahjong Quest (F2 system) inexplicably has a banking feature */
1965      code = (ram[2 * tile_index + 1] & tc0100scn->bg_tilemask) + (tc0100scn->gfxbank << 15);
1997      code = (ram[2 * tile_index + 1] & m_bg_tilemask) + (m_gfxbank << 15);
19661998      attr = ram[2 * tile_index];
19671999   }
19682000   else
19692001   {
1970      code = ram[2 * tile_index + 1] & tc0100scn->bg_tilemask;
2002      code = ram[2 * tile_index + 1] & m_bg_tilemask;
19712003      attr = ram[2 * tile_index];
19722004   }
19732005
1974   SET_TILE_INFO(
2006   SET_TILE_INFO_MEMBER(
19752007         gfxnum,
19762008         code,
1977         (((attr * tc0100scn->bg_col_mult) + tc0100scn->bg1_colbank) & 0xff) + colbank,
2009         (((attr * m_bg_col_mult) + m_bg1_colbank) & 0xff) + colbank,
19782010         TILE_FLIPYX((attr & 0xc000) >> 14));
19792011}
19802012
1981INLINE void common_get_tx_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
2013void tc0100scn_device::common_get_tx_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
19822014{
1983   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
19842015   int attr = ram[tile_index];
19852016
1986   SET_TILE_INFO(
2017   SET_TILE_INFO_MEMBER(
19872018         gfxnum,
19882019         attr & 0xff,
1989         ((((attr >> 6) & 0xfc) * tc0100scn->tx_col_mult + (tc0100scn->tx_colbank << 2)) & 0x3ff) + colbank * 4,
2020         ((((attr >> 6) & 0xfc) * m_tx_col_mult + (m_tx_colbank << 2)) & 0x3ff) + colbank * 4,
19902021         TILE_FLIPYX((attr & 0xc000) >> 14));
19912022}
19922023
1993TILE_GET_INFO_MEMBER(tc0100scn_device::tc0100scn_get_bg_tile_info)
2024TILE_GET_INFO_MEMBER(tc0100scn_device::get_bg_tile_info)
19942025{
1995   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this);
1996   common_get_bg0_tile_info(machine(), this, tileinfo, tile_index, tc0100scn->bg_ram, tc0100scn->bg_gfx, tc0100scn->colbank, tc0100scn->dblwidth);
2026   common_get_bg0_tile_info(tileinfo, tile_index, m_bg_ram, m_gfxnum, m_colbank, m_dblwidth);
19972027}
19982028
1999TILE_GET_INFO_MEMBER(tc0100scn_device::tc0100scn_get_fg_tile_info)
2029TILE_GET_INFO_MEMBER(tc0100scn_device::get_fg_tile_info)
20002030{
2001   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this);
2002   common_get_bg1_tile_info(machine(), this, tileinfo, tile_index, tc0100scn->fg_ram, tc0100scn->bg_gfx, tc0100scn->colbank, tc0100scn->dblwidth);
2031   common_get_bg1_tile_info(tileinfo, tile_index, m_fg_ram, m_gfxnum, m_colbank, m_dblwidth);
20032032}
20042033
2005TILE_GET_INFO_MEMBER(tc0100scn_device::tc0100scn_get_tx_tile_info)
2034TILE_GET_INFO_MEMBER(tc0100scn_device::get_tx_tile_info)
20062035{
2007   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this);
2008   common_get_tx_tile_info(machine(), this, tileinfo, tile_index, tc0100scn->tx_ram, tc0100scn->tx_gfx, tc0100scn->colbank, tc0100scn->dblwidth);
2036   common_get_tx_tile_info(tileinfo, tile_index, m_tx_ram, m_txnum, m_colbank, m_dblwidth);
20092037}
20102038
2011static const gfx_layout tc0100scn_charlayout =
2039void tc0100scn_device::set_colbank( int col )
20122040{
2013   8,8,    /* 8*8 characters */
2014   256,    /* 256 characters */
2015   2,  /* 2 bits per pixel */
2016   { XOR(0)*4, XOR(2)*4 },
2017   { 0, 1, 2, 3, 4, 5, 6, 7 },
2018   { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
2019   16*8    /* every sprite takes 16 consecutive bytes */
2020};
2021
2022
2023void tc0100scn_set_colbank( device_t *device, int col )
2024{
2025   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2026   tc0100scn->colbank = col;
2041   m_colbank = col;
20272042}
20282043
2029void tc0100scn_set_colbanks( device_t *device, int bg0, int bg1, int tx )
2044void tc0100scn_device::set_colbanks( int bg0, int bg1, int tx )
20302045{
2031   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2032   tc0100scn->bg0_colbank = bg0;
2033   tc0100scn->bg1_colbank = bg1;
2034   tc0100scn->tx_colbank = tx;
2046   m_bg0_colbank = bg0;
2047   m_bg1_colbank = bg1;
2048   m_tx_colbank = tx;
20352049}
20362050
2037void tc0100scn_set_bg_tilemask( device_t *device, int mask )
2051void tc0100scn_device::set_bg_tilemask( int mask )
20382052{
2039   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2040   tc0100scn->bg_tilemask = mask;
2053   m_bg_tilemask = mask;
20412054}
20422055
2043WRITE16_DEVICE_HANDLER( tc0100scn_gfxbank_w )   /* Mjnquest banks its 2 sets of scr tiles */
2056WRITE16_MEMBER( tc0100scn_device::gfxbank_w )   /* Mjnquest banks its 2 sets of scr tiles */
20442057{
2045   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2046   tc0100scn->gfxbank = (data & 0x1);
2058   m_gfxbank = (data & 0x1);
20472059}
20482060
2049static void tc0100scn_set_layer_ptrs( tc0100scn_state *tc0100scn )
2061void tc0100scn_device::set_layer_ptrs()
20502062{
2051   if (!tc0100scn->dblwidth)
2063   if (!m_dblwidth)
20522064   {
2053      tc0100scn->bg_ram        = tc0100scn->ram + 0x0;
2054      tc0100scn->tx_ram        = tc0100scn->ram + 0x4000 /2;
2055      tc0100scn->char_ram      = tc0100scn->ram + 0x6000 /2;
2056      tc0100scn->fg_ram        = tc0100scn->ram + 0x8000 /2;
2057      tc0100scn->bgscroll_ram  = tc0100scn->ram + 0xc000 /2;
2058      tc0100scn->fgscroll_ram  = tc0100scn->ram + 0xc400 /2;
2059      tc0100scn->colscroll_ram = tc0100scn->ram + 0xe000 /2;
2065      m_bg_ram        = m_ram + 0x0;
2066      m_tx_ram        = m_ram + 0x4000 /2;
2067      m_char_ram      = m_ram + 0x6000 /2;
2068      m_fg_ram        = m_ram + 0x8000 /2;
2069      m_bgscroll_ram  = m_ram + 0xc000 /2;
2070      m_fgscroll_ram  = m_ram + 0xc400 /2;
2071      m_colscroll_ram = m_ram + 0xe000 /2;
20602072   }
20612073   else
20622074   {
2063      tc0100scn->bg_ram        = tc0100scn->ram + 0x0;
2064      tc0100scn->fg_ram        = tc0100scn->ram + 0x08000 /2;
2065      tc0100scn->bgscroll_ram  = tc0100scn->ram + 0x10000 /2;
2066      tc0100scn->fgscroll_ram  = tc0100scn->ram + 0x10400 /2;
2067      tc0100scn->colscroll_ram = tc0100scn->ram + 0x10800 /2;
2068      tc0100scn->char_ram      = tc0100scn->ram + 0x11000 /2;
2069      tc0100scn->tx_ram        = tc0100scn->ram + 0x12000 /2;
2075      m_bg_ram        = m_ram + 0x0;
2076      m_fg_ram        = m_ram + 0x08000 /2;
2077      m_bgscroll_ram  = m_ram + 0x10000 /2;
2078      m_fgscroll_ram  = m_ram + 0x10400 /2;
2079      m_colscroll_ram = m_ram + 0x10800 /2;
2080      m_char_ram      = m_ram + 0x11000 /2;
2081      m_tx_ram        = m_ram + 0x12000 /2;
20702082   }
20712083}
20722084
2073static void tc0100scn_dirty_tilemaps( device_t *device )
2085void tc0100scn_device::dirty_tilemaps()
20742086{
2075   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2076
2077   tc0100scn->tilemap[0][tc0100scn->dblwidth]->mark_all_dirty();
2078   tc0100scn->tilemap[1][tc0100scn->dblwidth]->mark_all_dirty();
2079   tc0100scn->tilemap[2][tc0100scn->dblwidth]->mark_all_dirty();
2087   m_tilemap[0][m_dblwidth]->mark_all_dirty();
2088   m_tilemap[1][m_dblwidth]->mark_all_dirty();
2089   m_tilemap[2][m_dblwidth]->mark_all_dirty();
20802090}
20812091
2082static void tc0100scn_restore_scroll( tc0100scn_state *tc0100scn )
2092void tc0100scn_device::restore_scroll()
20832093{
20842094   int flip;
20852095
2086   tc0100scn->bgscrollx = -tc0100scn->ctrl[0];
2087   tc0100scn->fgscrollx = -tc0100scn->ctrl[1];
2088   tc0100scn->tilemap[2][0]->set_scrollx(0, -tc0100scn->ctrl[2]);
2089   tc0100scn->tilemap[2][1]->set_scrollx(0, -tc0100scn->ctrl[2]);
2096   m_bgscrollx = -m_ctrl[0];
2097   m_fgscrollx = -m_ctrl[1];
2098   m_tilemap[2][0]->set_scrollx(0, -m_ctrl[2]);
2099   m_tilemap[2][1]->set_scrollx(0, -m_ctrl[2]);
20902100
2091   tc0100scn->bgscrolly = -tc0100scn->ctrl[3];
2092   tc0100scn->fgscrolly = -tc0100scn->ctrl[4];
2093   tc0100scn->tilemap[2][0]->set_scrolly(0, -tc0100scn->ctrl[5]);
2094   tc0100scn->tilemap[2][1]->set_scrolly(0, -tc0100scn->ctrl[5]);
2101   m_bgscrolly = -m_ctrl[3];
2102   m_fgscrolly = -m_ctrl[4];
2103   m_tilemap[2][0]->set_scrolly(0, -m_ctrl[5]);
2104   m_tilemap[2][1]->set_scrolly(0, -m_ctrl[5]);
20952105
2096   flip = (tc0100scn->ctrl[7] & 0x01) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0;
2097   tc0100scn->tilemap[0][0]->set_flip(flip);
2098   tc0100scn->tilemap[1][0]->set_flip(flip);
2099   tc0100scn->tilemap[2][0]->set_flip(flip);
2100   tc0100scn->tilemap[0][1]->set_flip(flip);
2101   tc0100scn->tilemap[1][1]->set_flip(flip);
2102   tc0100scn->tilemap[2][1]->set_flip(flip);
2106   flip = (m_ctrl[7] & 0x01) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0;
2107   m_tilemap[0][0]->set_flip(flip);
2108   m_tilemap[1][0]->set_flip(flip);
2109   m_tilemap[2][0]->set_flip(flip);
2110   m_tilemap[0][1]->set_flip(flip);
2111   m_tilemap[1][1]->set_flip(flip);
2112   m_tilemap[2][1]->set_flip(flip);
21032113}
21042114
21052115
2106void tc0100scn_device::tc0100scn_postload()
2116void tc0100scn_device::postload()
21072117{
2108   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this);
2118   set_layer_ptrs();
2119   restore_scroll();
21092120
2110   tc0100scn_set_layer_ptrs(tc0100scn);
2111   tc0100scn_restore_scroll(tc0100scn);
2112
2113   tc0100scn->tilemap[0][0]->mark_all_dirty();
2114   tc0100scn->tilemap[1][0]->mark_all_dirty();
2115   tc0100scn->tilemap[2][0]->mark_all_dirty();
2116   tc0100scn->tilemap[0][1]->mark_all_dirty();
2117   tc0100scn->tilemap[1][1]->mark_all_dirty();
2118   tc0100scn->tilemap[2][1]->mark_all_dirty();
2121   m_tilemap[0][0]->mark_all_dirty();
2122   m_tilemap[1][0]->mark_all_dirty();
2123   m_tilemap[2][0]->mark_all_dirty();
2124   m_tilemap[0][1]->mark_all_dirty();
2125   m_tilemap[1][1]->mark_all_dirty();
2126   m_tilemap[2][1]->mark_all_dirty();
21192127}
21202128
2121READ16_DEVICE_HANDLER( tc0100scn_word_r )
2129READ16_MEMBER( tc0100scn_device::word_r )
21222130{
2123   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2124   return tc0100scn->ram[offset];
2131   return m_ram[offset];
21252132}
21262133
2127WRITE16_DEVICE_HANDLER( tc0100scn_word_w )
2134WRITE16_MEMBER( tc0100scn_device::word_w )
21282135{
2129   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2130
2131   COMBINE_DATA(&tc0100scn->ram[offset]);
2132   if (!tc0100scn->dblwidth)
2136   COMBINE_DATA(&m_ram[offset]);
2137   if (!m_dblwidth)
21332138   {
21342139      if (offset < 0x2000)
2135         tc0100scn->tilemap[0][0]->mark_tile_dirty(offset / 2);
2140         m_tilemap[0][0]->mark_tile_dirty(offset / 2);
21362141      else if (offset < 0x3000)
2137         tc0100scn->tilemap[2][0]->mark_tile_dirty((offset & 0x0fff));
2142         m_tilemap[2][0]->mark_tile_dirty((offset & 0x0fff));
21382143      else if (offset < 0x3800)
2139         space.machine().gfx[tc0100scn->tx_gfx]->mark_dirty((offset - 0x3000) / 8);
2144         space.machine().gfx[m_txnum]->mark_dirty((offset - 0x3000) / 8);
21402145      else if (offset >= 0x4000 && offset < 0x6000)
2141         tc0100scn->tilemap[1][0]->mark_tile_dirty((offset & 0x1fff) / 2);
2146         m_tilemap[1][0]->mark_tile_dirty((offset & 0x1fff) / 2);
21422147   }
21432148   else    /* Double-width tilemaps have a different memory map */
21442149   {
21452150      if (offset < 0x4000)
2146         tc0100scn->tilemap[0][1]->mark_tile_dirty(offset / 2);
2151         m_tilemap[0][1]->mark_tile_dirty(offset / 2);
21472152      else if (offset >= 0x4000 && offset < 0x8000)
2148         tc0100scn->tilemap[1][1]->mark_tile_dirty((offset & 0x3fff) / 2);
2153         m_tilemap[1][1]->mark_tile_dirty((offset & 0x3fff) / 2);
21492154      else if (offset >= 0x8800 && offset < 0x9000)
2150         space.machine().gfx[tc0100scn->tx_gfx]->mark_dirty((offset - 0x8800) / 8);
2155         space.machine().gfx[m_txnum]->mark_dirty((offset - 0x8800) / 8);
21512156      else if (offset >= 0x9000)
2152         tc0100scn->tilemap[2][1]->mark_tile_dirty((offset & 0x0fff));
2157         m_tilemap[2][1]->mark_tile_dirty((offset & 0x0fff));
21532158   }
21542159}
21552160
2156READ16_DEVICE_HANDLER( tc0100scn_ctrl_word_r )
2161READ16_MEMBER( tc0100scn_device::ctrl_word_r )
21572162{
2158   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2159   return tc0100scn->ctrl[offset];
2163   return m_ctrl[offset];
21602164}
21612165
2162WRITE16_DEVICE_HANDLER( tc0100scn_ctrl_word_w )
2166WRITE16_MEMBER( tc0100scn_device::ctrl_word_w )
21632167{
2164   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2168   COMBINE_DATA(&m_ctrl[offset]);
21652169
2166   COMBINE_DATA(&tc0100scn->ctrl[offset]);
2170   data = m_ctrl[offset];
21672171
2168   data = tc0100scn->ctrl[offset];
2169
21702172   switch (offset)
21712173   {
21722174      case 0x00:
2173         tc0100scn->bgscrollx = -data;
2175         m_bgscrollx = -data;
21742176         break;
21752177
21762178      case 0x01:
2177         tc0100scn->fgscrollx = -data;
2179         m_fgscrollx = -data;
21782180         break;
21792181
21802182      case 0x02:
2181         tc0100scn->tilemap[2][0]->set_scrollx(0, -data);
2182         tc0100scn->tilemap[2][1]->set_scrollx(0, -data);
2183         m_tilemap[2][0]->set_scrollx(0, -data);
2184         m_tilemap[2][1]->set_scrollx(0, -data);
21832185         break;
21842186
21852187      case 0x03:
2186         tc0100scn->bgscrolly = -data;
2188         m_bgscrolly = -data;
21872189         break;
21882190
21892191      case 0x04:
2190         tc0100scn->fgscrolly = -data;
2192         m_fgscrolly = -data;
21912193         break;
21922194
21932195      case 0x05:
2194         tc0100scn->tilemap[2][0]->set_scrolly(0, -data);
2195         tc0100scn->tilemap[2][1]->set_scrolly(0, -data);
2196         m_tilemap[2][0]->set_scrolly(0, -data);
2197         m_tilemap[2][1]->set_scrolly(0, -data);
21962198         break;
21972199
21982200      case 0x06:
21992201      {
2200         int old_width = tc0100scn->dblwidth;
2201         tc0100scn->dblwidth = (data & 0x10) >> 4;
2202         int old_width = m_dblwidth;
2203         m_dblwidth = (data & 0x10) >> 4;
22022204
2203         if (tc0100scn->dblwidth != old_width)   /* tilemap width is changing */
2205         if (m_dblwidth != old_width)   /* tilemap width is changing */
22042206         {
22052207            /* Reinitialise layer pointers */
2206            tc0100scn_set_layer_ptrs(tc0100scn);
2208            set_layer_ptrs();
22072209
22082210            /* and ensure full redraw of the tilemaps */
2209            tc0100scn_dirty_tilemaps(device);
2211            dirty_tilemaps();
22102212
22112213            /* reset the pointer to the text characters (and dirty them all) */
2212            space.machine().gfx[tc0100scn->tx_gfx]->set_source((UINT8 *)tc0100scn->char_ram);
2214            space.machine().gfx[m_txnum]->set_source((UINT8 *)m_char_ram);
22132215         }
22142216
22152217         break;
r23805r23806
22192221      {
22202222         int flip = (data & 0x01) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0;
22212223
2222         tc0100scn->tilemap[0][0]->set_flip(flip);
2223         tc0100scn->tilemap[1][0]->set_flip(flip);
2224         tc0100scn->tilemap[2][0]->set_flip(flip);
2225         tc0100scn->tilemap[0][1]->set_flip(flip);
2226         tc0100scn->tilemap[1][1]->set_flip(flip);
2227         tc0100scn->tilemap[2][1]->set_flip(flip);
2224         m_tilemap[0][0]->set_flip(flip);
2225         m_tilemap[1][0]->set_flip(flip);
2226         m_tilemap[2][0]->set_flip(flip);
2227         m_tilemap[0][1]->set_flip(flip);
2228         m_tilemap[1][1]->set_flip(flip);
2229         m_tilemap[2][1]->set_flip(flip);
22282230
22292231         break;
22302232      }
r23805r23806
22322234}
22332235
22342236
2235READ32_DEVICE_HANDLER( tc0100scn_ctrl_long_r )
2237READ32_MEMBER( tc0100scn_device::ctrl_long_r )
22362238{
2237   return (tc0100scn_ctrl_word_r(device, space, offset * 2, 0xffff) << 16) | tc0100scn_ctrl_word_r(device, space, offset * 2 + 1, 0xffff);
2239   return (ctrl_word_r(space, offset * 2, 0xffff) << 16) | ctrl_word_r(space, offset * 2 + 1, 0xffff);
22382240}
22392241
2240WRITE32_DEVICE_HANDLER( tc0100scn_ctrl_long_w )
2242WRITE32_MEMBER( tc0100scn_device::ctrl_long_w )
22412243{
22422244   if (ACCESSING_BITS_16_31)
2243      tc0100scn_ctrl_word_w(device, space, offset * 2, data >> 16, mem_mask >> 16);
2245      ctrl_word_w(space, offset * 2, data >> 16, mem_mask >> 16);
22442246   if (ACCESSING_BITS_0_15)
2245      tc0100scn_ctrl_word_w(device, space, (offset * 2) + 1, data & 0xffff, mem_mask & 0xffff);
2247      ctrl_word_w(space, (offset * 2) + 1, data & 0xffff, mem_mask & 0xffff);
22462248}
22472249
2248READ32_DEVICE_HANDLER( tc0100scn_long_r )
2250READ32_MEMBER( tc0100scn_device::long_r )
22492251{
2250   return (tc0100scn_word_r(device, space, offset * 2, 0xffff) << 16) | tc0100scn_word_r(device, space, offset * 2 + 1, 0xffff);
2252   return (word_r(space, offset * 2, 0xffff) << 16) | word_r(space, offset * 2 + 1, 0xffff);
22512253}
22522254
2253WRITE32_DEVICE_HANDLER( tc0100scn_long_w )
2255WRITE32_MEMBER( tc0100scn_device::long_w )
22542256{
22552257   if (ACCESSING_BITS_16_31)
22562258   {
2257      int oldword = tc0100scn_word_r(device, space, offset * 2, 0xffff);
2259      int oldword = word_r(space, offset * 2, 0xffff);
22582260      int newword = data >> 16;
22592261      if (!ACCESSING_BITS_16_23)
22602262         newword |= (oldword & 0x00ff);
22612263      if (!ACCESSING_BITS_24_31)
22622264         newword |= (oldword & 0xff00);
2263      tc0100scn_word_w(device, space, offset * 2, newword, 0xffff);
2265      word_w(space, offset * 2, newword, 0xffff);
22642266   }
22652267   if (ACCESSING_BITS_0_15)
22662268   {
2267      int oldword = tc0100scn_word_r(device, space, (offset * 2) + 1, 0xffff);
2269      int oldword = word_r(space, (offset * 2) + 1, 0xffff);
22682270      int newword = data& 0xffff;
22692271      if (!ACCESSING_BITS_0_7)
22702272         newword |= (oldword & 0x00ff);
22712273      if (!ACCESSING_BITS_8_15)
22722274         newword |= (oldword & 0xff00);
2273      tc0100scn_word_w(device, space, (offset * 2) + 1, newword, 0xffff);
2275      word_w(space, (offset * 2) + 1, newword, 0xffff);
22742276   }
22752277}
22762278
22772279
2278void tc0100scn_tilemap_update( device_t *device )
2280void tc0100scn_device::tilemap_update()
22792281{
2280   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
22812282   int j;
22822283
2283   tc0100scn->tilemap[0][tc0100scn->dblwidth]->set_scrolly(0, tc0100scn->bgscrolly);
2284   tc0100scn->tilemap[1][tc0100scn->dblwidth]->set_scrolly(0, tc0100scn->fgscrolly);
2284   m_tilemap[0][m_dblwidth]->set_scrolly(0, m_bgscrolly);
2285   m_tilemap[1][m_dblwidth]->set_scrolly(0, m_fgscrolly);
22852286
22862287   for (j = 0; j < 256; j++)
2287      tc0100scn->tilemap[0][tc0100scn->dblwidth]->set_scrollx((j + tc0100scn->bgscrolly) & 0x1ff, tc0100scn->bgscrollx - tc0100scn->bgscroll_ram[j]);
2288      m_tilemap[0][m_dblwidth]->set_scrollx((j + m_bgscrolly) & 0x1ff, m_bgscrollx - m_bgscroll_ram[j]);
22882289   for (j = 0; j < 256; j++)
2289      tc0100scn->tilemap[1][tc0100scn->dblwidth]->set_scrollx((j + tc0100scn->fgscrolly) & 0x1ff, tc0100scn->fgscrollx - tc0100scn->fgscroll_ram[j]);
2290      m_tilemap[1][m_dblwidth]->set_scrollx((j + m_fgscrolly) & 0x1ff, m_fgscrollx - m_fgscroll_ram[j]);
22902291}
22912292
2292static void tc0100scn_tilemap_draw_fg( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, UINT32 priority )
2293void tc0100scn_device::tilemap_draw_fg( bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, UINT32 priority )
22932294{
2294   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
22952295   const bitmap_ind16 &src_bitmap = tmap->pixmap();
22962296   int width_mask, height_mask, x, y, p;
22972297   int column_offset, src_x = 0, src_y = 0;
r23805r23806
23012301   width_mask = src_bitmap.width() - 1;
23022302   height_mask = src_bitmap.height() - 1;
23032303
2304   src_y = (tc0100scn->fgscrolly + scrolly_delta) & height_mask;
2305   if (tc0100scn->ctrl[0x7] & 1) // Flipscreen
2304   src_y = (m_fgscrolly + scrolly_delta) & height_mask;
2305   if (m_ctrl[0x7] & 1) // Flipscreen
23062306      src_y = (256 - src_y) & height_mask;
23072307
23082308   //We use cliprect.max_y and cliprect.max_x to support games which use more than 1 screen
r23805r23806
23102310   // Row offsets are 'screen space' 0-255 regardless of Y scroll
23112311   for (y = 0; y <= cliprect.max_y; y++)
23122312   {
2313      src_x = (tc0100scn->fgscrollx - tc0100scn->fgscroll_ram[(y + scrolly_delta) & 0x1ff] + scrollx_delta + cliprect.min_x) & width_mask;
2314      if (tc0100scn->ctrl[0x7] & 1) // Flipscreen
2313      src_x = (m_fgscrollx - m_fgscroll_ram[(y + scrolly_delta) & 0x1ff] + scrollx_delta + cliprect.min_x) & width_mask;
2314      if (m_ctrl[0x7] & 1) // Flipscreen
23152315         src_x = (256 - 64 - src_x) & width_mask;
23162316
23172317      // Col offsets are 'tilemap' space 0-511, and apply to blocks of 8 pixels at once
23182318      for (x = 0; x < cliprect.width(); x++)
23192319      {
2320         column_offset = tc0100scn->colscroll_ram[(src_x & 0x3ff) / 8];
2320         column_offset = m_colscroll_ram[(src_x & 0x3ff) / 8];
23212321         p = src_bitmap.pix16((src_y - column_offset) & height_mask, src_x);
23222322
23232323         if ((p & 0xf)!= 0 || (flags & TILEMAP_DRAW_OPAQUE))
23242324         {
23252325            bitmap.pix16(y, x + cliprect.min_x) = p;
2326            if (device->machine().priority_bitmap.valid())
2326            if (machine().priority_bitmap.valid())
23272327            {
2328               UINT8 *pri = &device->machine().priority_bitmap.pix8(y);
2328               UINT8 *pri = &machine().priority_bitmap.pix8(y);
23292329               pri[x + cliprect.min_x] |= priority;
23302330            }
23312331         }
r23805r23806
23352335   }
23362336}
23372337
2338int tc0100scn_tilemap_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
2338int tc0100scn_device::tilemap_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
23392339{
2340   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2341   int disable = tc0100scn->ctrl[6] & 0xf7;
2340   int disable = m_ctrl[6] & 0xf7;
23422341   rectangle clip = cliprect;
2343   clip &= tc0100scn->cliprect;
2342   clip &= m_cliprect;
23442343
23452344#if 0
23462345if (disable != 0 && disable != 3 && disable != 7)
r23805r23806
23522351      case 0:
23532352         if (disable & 0x01)
23542353            return 1;
2355         tc0100scn->tilemap[0][tc0100scn->dblwidth]->draw(bitmap, clip, flags, priority);
2354         m_tilemap[0][m_dblwidth]->draw(bitmap, clip, flags, priority);
23562355         break;
23572356      case 1:
23582357         if (disable & 0x02)
23592358            return 1;
2360         tc0100scn_tilemap_draw_fg(device, bitmap, clip, tc0100scn->tilemap[1][tc0100scn->dblwidth], flags, priority);
2359         tilemap_draw_fg(bitmap, clip, m_tilemap[1][m_dblwidth], flags, priority);
23612360         break;
23622361      case 2:
23632362         if (disable & 0x04)
23642363            return 1;
2365         tc0100scn->tilemap[2][tc0100scn->dblwidth]->draw(bitmap, clip, flags, priority);
2364         m_tilemap[2][m_dblwidth]->draw(bitmap, clip, flags, priority);
23662365         break;
23672366   }
23682367   return 0;
23692368}
23702369
2371int tc0100scn_bottomlayer( device_t *device )
2370int tc0100scn_device::bottomlayer()
23722371{
2373   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
2374   return (tc0100scn->ctrl[6] & 0x8) >> 3;
2372   return (m_ctrl[6] & 0x8) >> 3;
23752373}
23762374
2377const device_type TC0100SCN = &device_creator<tc0100scn_device>;
23782375
2379tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2380   : device_t(mconfig, TC0100SCN, "Taito TC0100SCN", tag, owner, clock)
2381{
2382   m_token = global_alloc_clear(tc0100scn_state);
2383}
2384
2385//-------------------------------------------------
2386//  device_config_complete - perform any
2387//  operations now that the configuration is
2388//  complete
2389//-------------------------------------------------
2390
2391void tc0100scn_device::device_config_complete()
2392{
2393}
2394
2395//-------------------------------------------------
2396//  device_start - device-specific startup
2397//-------------------------------------------------
2398
2399void tc0100scn_device::device_start()
2400{
2401   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this);
2402   const tc0100scn_interface *intf = tc0100scn_get_interface(this);
2403   int xd, yd;
2404
2405   tc0100scn->screen = machine().device<screen_device>(intf->screen);
2406
2407   /* Set up clipping for multi-TC0100SCN games. We assume
2408      this code won't ever affect single screen games:
2409      Thundfox is the only one of those with two chips, and
2410      we're safe as it uses single width tilemaps. */
2411
2412   tc0100scn->cliprect = tc0100scn->screen->visible_area();
2413
2414   /* use the given gfx sets for bg/tx tiles*/
2415   tc0100scn->bg_gfx = intf->gfxnum;   /* 2nd/3rd chips will use the same gfx set */
2416   tc0100scn->tx_gfx = intf->txnum;
2417
2418   /* Single width versions */
2419   tc0100scn->tilemap[0][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
2420   tc0100scn->tilemap[1][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
2421   tc0100scn->tilemap[2][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
2422
2423   /* Double width versions */
2424   tc0100scn->tilemap[0][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
2425   tc0100scn->tilemap[1][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
2426   tc0100scn->tilemap[2][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 32);
2427
2428   tc0100scn->tilemap[0][0]->set_transparent_pen(0);
2429   tc0100scn->tilemap[1][0]->set_transparent_pen(0);
2430   tc0100scn->tilemap[2][0]->set_transparent_pen(0);
2431
2432   tc0100scn->tilemap[0][1]->set_transparent_pen(0);
2433   tc0100scn->tilemap[1][1]->set_transparent_pen(0);
2434   tc0100scn->tilemap[2][1]->set_transparent_pen(0);
2435
2436   /* Standard width tilemaps. I'm setting the optional chip #2
2437      7 bits higher and 2 pixels to the left than chip #1 because
2438      that's how thundfox wants it. */
2439
2440   xd = (intf->multiscrn_hack == 0) ?  (-intf->x_offset) : (-intf->x_offset - 2);
2441   yd = (intf->multiscrn_hack == 0) ?  (8 - intf->y_offset) : (1 - intf->y_offset);
2442
2443   tc0100scn->tilemap[0][0]->set_scrolldx(xd - 16, -intf->flip_xoffs - xd - 16);
2444   tc0100scn->tilemap[0][0]->set_scrolldy(yd,      -intf->flip_yoffs - yd);
2445   tc0100scn->tilemap[1][0]->set_scrolldx(xd - 16, -intf->flip_xoffs - xd - 16);
2446   tc0100scn->tilemap[1][0]->set_scrolldy(yd,      -intf->flip_yoffs - yd);
2447   tc0100scn->tilemap[2][0]->set_scrolldx(xd - 16, -intf->flip_text_xoffs - xd - 16 - 7);
2448   tc0100scn->tilemap[2][0]->set_scrolldy(yd,      -intf->flip_text_yoffs - yd);
2449
2450   /* Double width tilemaps. We must correct offsets for
2451      extra chips, as MAME sees offsets from LHS of whole
2452      display not from the edges of individual screens.
2453      NB flipscreen tilemap offsets are based on Cameltry */
2454
2455   xd = -intf->x_offset - intf->multiscrn_xoffs;
2456   yd = 8 - intf->y_offset;
2457
2458   tc0100scn->tilemap[0][1]->set_scrolldx(xd - 16, -intf->flip_xoffs - xd - 16);
2459   tc0100scn->tilemap[0][1]->set_scrolldy(yd,      -intf->flip_yoffs - yd);
2460   tc0100scn->tilemap[1][1]->set_scrolldx(xd - 16, -intf->flip_xoffs - xd - 16);
2461   tc0100scn->tilemap[1][1]->set_scrolldy(yd,      -intf->flip_yoffs - yd);
2462   tc0100scn->tilemap[2][1]->set_scrolldx(xd - 16, -intf->flip_text_xoffs - xd - 16 - 7);
2463   tc0100scn->tilemap[2][1]->set_scrolldy(yd,      -intf->flip_text_yoffs - yd);
2464
2465   tc0100scn->tilemap[0][0]->set_scroll_rows(512);
2466   tc0100scn->tilemap[1][0]->set_scroll_rows(512);
2467   tc0100scn->tilemap[0][1]->set_scroll_rows(512);
2468   tc0100scn->tilemap[1][1]->set_scroll_rows(512);
2469
2470   tc0100scn->bg_tilemask = 0xffff;    /* Mjnquest has 0x7fff tilemask */
2471
2472   tc0100scn->bg_col_mult = 1; /* multiplier for when bg gfx != 4bpp */
2473   tc0100scn->tx_col_mult = 1; /* multiplier needed when bg gfx is 6bpp */
2474
2475   if (machine().gfx[intf->gfxnum]->granularity() == 2)    /* Yuyugogo, Yesnoj */
2476      tc0100scn->bg_col_mult = 8;
2477
2478   if (machine().gfx[intf->gfxnum]->granularity() == 0x40) /* Undrfire */
2479      tc0100scn->tx_col_mult = 4;
2480
2481//logerror("TC0100SCN bg gfx granularity %04x: multiplier %04x\n", machine().gfx[intf->gfxnum]->granularity(), tc0100scn->tx_col_mult);
2482
2483   tc0100scn->ram = auto_alloc_array_clear(machine(), UINT16, TC0100SCN_RAM_SIZE / 2);
2484
2485   tc0100scn_set_layer_ptrs(tc0100scn);
2486
2487   tc0100scn_set_colbanks(this, 0, 0, 0);  /* standard values, only Wgp & multiscreen games change them */
2488                           /* we call this here, so that they can be modified at VIDEO_START*/
2489
2490   /* create the char set (gfx will then be updated dynamically from RAM) */
2491   machine().gfx[tc0100scn->tx_gfx] = auto_alloc(machine(), gfx_element(machine(), tc0100scn_charlayout, (UINT8 *)tc0100scn->char_ram, 64, 0));
2492
2493   save_pointer(NAME(tc0100scn->ram), TC0100SCN_RAM_SIZE / 2);
2494   save_item(NAME(tc0100scn->ctrl));
2495   save_item(NAME(tc0100scn->dblwidth));
2496   save_item(NAME(tc0100scn->gfxbank));
2497   machine().save().register_postload(save_prepost_delegate(FUNC(tc0100scn_device::tc0100scn_postload), this));
2498}
2499
2500//-------------------------------------------------
2501//  device_reset - device-specific reset
2502//-------------------------------------------------
2503
2504void tc0100scn_device::device_reset()
2505{
2506   tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this);
2507   int i;
2508
2509   tc0100scn->dblwidth = 0;
2510   tc0100scn->colbank = 0;
2511   tc0100scn->gfxbank = 0; /* Mjnquest uniquely banks tiles */
2512
2513   for (i = 0; i < 8; i++)
2514      tc0100scn->ctrl[i] = 0;
2515}
2516
2517
2518
25192376/***************************************************************************/
25202377/*                                                                         */
25212378/*                      TC0280GRD / TC0430GRW                              */
trunk/src/mame/video/taitoic.h
r23805r23806
3636
3737struct tc0080vco_interface
3838{
39   int                gfxnum;
40   int                txnum;
39   int                m_gfxnum;
40   int                m_txnum;
4141
42   int                bg_xoffs, bg_yoffs;
43   int                bg_flip_yoffs;
42   int                m_bg_xoffs, m_bg_yoffs;
43   int                m_bg_flip_yoffs;
4444
45   int                has_fg0; /* for debug */
45   int                m_has_fg0; /* for debug */
4646};
4747
4848struct tc0100scn_interface
4949{
50   const char         *screen;
50   const char         *m_screen_tag;
5151
52   int                gfxnum;
53   int                txnum;
52   int                m_gfxnum;
53   int                m_txnum;
5454
55   int                x_offset, y_offset;
56   int                flip_xoffs, flip_yoffs;
57   int                flip_text_xoffs, flip_text_yoffs;
55   int                m_x_offset, m_y_offset;
56   int                m_flip_xoffs, m_flip_yoffs;
57   int                m_flip_text_xoffs, m_flip_text_yoffs;
5858
59   int                multiscrn_xoffs;
60   int                multiscrn_hack;
59   int                m_multiscrn_xoffs;
60   int                m_multiscrn_hack;
6161};
6262
6363
r23805r23806
112112   DECLARE_WRITE16_MEMBER( xscroll_word_w );
113113   DECLARE_WRITE16_MEMBER( yscroll_word_w );
114114   DECLARE_WRITE16_MEMBER( ctrl_word_w );
115   DECLARE_WRITE16_MEMBER( scrollram_w );
115116   
116117   TILE_GET_INFO_MEMBER(get_bg_tile_info);
117118   TILE_GET_INFO_MEMBER(get_fg_tile_info);
r23805r23806
192193
193194extern const device_type PC090OJ;
194195
195class tc0080vco_device : public device_t
196class tc0080vco_device : public device_t,
197                                 public tc0080vco_interface
196198{
197199public:
198200   tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
199   ~tc0080vco_device() { global_free(m_token); }
201   ~tc0080vco_device() {}
200202
201   // access to legacy token
202   void *token() const { assert(m_token != NULL); return m_token; }
203   void tc0080vco_postload();
204protected:
203   DECLARE_READ16_MEMBER( word_r );
204   DECLARE_WRITE16_MEMBER( word_w );
205
206   void tilemap_update();
207   void tilemap_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
208
209   DECLARE_READ16_MEMBER( cram_0_r );
210   DECLARE_READ16_MEMBER( cram_1_r );
211   DECLARE_READ16_MEMBER( sprram_r );
212   DECLARE_READ16_MEMBER( scrram_r );
213   DECLARE_WRITE16_MEMBER( scrollram_w );
214   READ_LINE_MEMBER( flipscreen_r );
215   void postload();
216
217   protected:
205218   // device-level overrides
206219   virtual void device_config_complete();
207220   virtual void device_start();
208private:
221
222   private:
209223   // internal state
210   void *m_token;
224   UINT16 *       m_ram;
225   UINT16 *       m_bg0_ram_0;
226   UINT16 *       m_bg0_ram_1;
227   UINT16 *       m_bg1_ram_0;
228   UINT16 *       m_bg1_ram_1;
229   UINT16 *       m_tx_ram_0;
230   UINT16 *       m_tx_ram_1;
231   UINT16 *       m_char_ram;
232   UINT16 *       m_bgscroll_ram;
211233
212   TILE_GET_INFO_MEMBER(tc0080vco_get_bg0_tile_info);
213   TILE_GET_INFO_MEMBER(tc0080vco_get_bg1_tile_info);
214   TILE_GET_INFO_MEMBER(tc0080vco_get_tx_tile_info);
234/* FIXME: This sprite related stuff still needs to be accessed in
235   video/taito_h */
236   UINT16 *       m_chain_ram_0;
237   UINT16 *       m_chain_ram_1;
238   UINT16 *       m_spriteram;
239   UINT16 *       m_scroll_ram;
240
241   UINT16         m_bg0_scrollx;
242   UINT16         m_bg0_scrolly;
243   UINT16         m_bg1_scrollx;
244   UINT16         m_bg1_scrolly;
245
246   tilemap_t        *m_tilemap[3];
247
248   INT32          m_flipscreen;
249   
250   TILE_GET_INFO_MEMBER(get_bg0_tile_info);
251   TILE_GET_INFO_MEMBER(get_bg1_tile_info);
252   TILE_GET_INFO_MEMBER(get_tx_tile_info);
253   void bg0_tilemap_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority );
254   void bg1_tilemap_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority );
215255};
216256
217257extern const device_type TC0080VCO;
218258
219class tc0100scn_device : public device_t
259class tc0100scn_device : public device_t,
260                                 public tc0100scn_interface
220261{
221262public:
222263   tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
223   ~tc0100scn_device() { global_free(m_token); }
264   ~tc0100scn_device() {}
265   
266   #define TC0100SCN_SINGLE_VDU    1024
224267
225   // access to legacy token
226   void *token() const { assert(m_token != NULL); return m_token; }
227   void tc0100scn_postload();
268   /* Function to set separate color banks for the three tilemapped layers.
269   To change from the default (0,0,0) use after calling TC0100SCN_vh_start */
270   void set_colbanks(int bg0, int bg1, int tx);
271
272   /* Function to set separate color banks for each TC0100SCN.
273   To change from the default (0,0,0) use after calling TC0100SCN_vh_start */
274   void set_colbank(int colbank);
275
276   /* Function to set bg tilemask < 0xffff */
277   void set_bg_tilemask(int mask);
278
279   /* Function to for Mjnquest to select gfx bank */
280   DECLARE_WRITE16_MEMBER(gfxbank_w);
281
282   DECLARE_READ16_MEMBER(word_r);
283   DECLARE_WRITE16_MEMBER(word_w);
284   DECLARE_READ16_MEMBER(ctrl_word_r);
285   DECLARE_WRITE16_MEMBER(ctrl_word_w);
286
287   /* Functions for use with 68020 (Under Fire) */
288   DECLARE_READ32_MEMBER(long_r);
289   DECLARE_WRITE32_MEMBER(long_w);
290   DECLARE_READ32_MEMBER(ctrl_long_r);
291   DECLARE_WRITE32_MEMBER(ctrl_long_w);
292
293   void tilemap_update();
294   int tilemap_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
295
296   /* returns 0 or 1 depending on the lowest priority tilemap set in the internal
297   register. Use this function to draw tilemaps in the correct order. */
298   int bottomlayer();
299   
300   void postload();
301
228302protected:
229303   // device-level overrides
230304   virtual void device_config_complete();
231305   virtual void device_start();
232306   virtual void device_reset();
307
233308private:
234309   // internal state
235   void *m_token;
310   UINT16       m_ctrl[8];
236311
237   TILE_GET_INFO_MEMBER(tc0100scn_get_bg_tile_info);
238   TILE_GET_INFO_MEMBER(tc0100scn_get_fg_tile_info);
239   TILE_GET_INFO_MEMBER(tc0100scn_get_tx_tile_info);
312   UINT16 *     m_ram;
313   UINT16 *     m_bg_ram;
314   UINT16 *     m_fg_ram;
315   UINT16 *     m_tx_ram;
316   UINT16 *     m_char_ram;
317   UINT16 *     m_bgscroll_ram;
318   UINT16 *     m_fgscroll_ram;
319   UINT16 *     m_colscroll_ram;
320
321   int          m_bgscrollx, m_bgscrolly, m_fgscrollx, m_fgscrolly;
322
323   /* We keep two tilemaps for each of the 3 actual tilemaps: one at standard width, one double */
324   tilemap_t      *m_tilemap[3][2];
325   rectangle    m_cliprect;
326
327   int          m_bg_col_mult, m_bg_tilemask, m_tx_col_mult;
328   INT32        m_gfxbank, m_colbank;
329   INT32        m_bg0_colbank, m_bg1_colbank, m_tx_colbank;
330   int          m_dblwidth;
331
332   screen_device *m_screen;
333
334   TILE_GET_INFO_MEMBER(get_bg_tile_info);
335   TILE_GET_INFO_MEMBER(get_fg_tile_info);
336   TILE_GET_INFO_MEMBER(get_tx_tile_info);
337   
338   void common_get_bg0_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth);
339   void common_get_bg1_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth);
340   void common_get_tx_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth);
341   
342   void tilemap_draw_fg(bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, UINT32 priority);
343   void set_layer_ptrs();
344   void dirty_tilemaps();
345   void restore_scroll();
240346};
241347
242348extern const device_type TC0100SCN;
r23805r23806
428534    DEVICE I/O FUNCTIONS
429535***************************************************************************/
430536
431/** TC0080VCO **/
432DECLARE_READ16_DEVICE_HANDLER( tc0080vco_word_r );
433DECLARE_WRITE16_DEVICE_HANDLER( tc0080vco_word_w );
434537
435void tc0080vco_tilemap_update(device_t *device);
436void tc0080vco_tilemap_draw(device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
437
438DECLARE_READ16_DEVICE_HANDLER( tc0080vco_cram_0_r );
439DECLARE_READ16_DEVICE_HANDLER( tc0080vco_cram_1_r );
440DECLARE_READ16_DEVICE_HANDLER( tc0080vco_sprram_r );
441DECLARE_READ16_DEVICE_HANDLER( tc0080vco_scrram_r );
442READ_LINE_DEVICE_HANDLER( tc0080vco_flipscreen_r );
443
444
445/** TC0100SCN **/
446#define TC0100SCN_SINGLE_VDU    1024
447
448/* Function to set separate color banks for the three tilemapped layers.
449   To change from the default (0,0,0) use after calling TC0100SCN_vh_start */
450void tc0100scn_set_colbanks(device_t *device, int bg0, int bg1, int tx);
451
452/* Function to set separate color banks for each TC0100SCN.
453   To change from the default (0,0,0) use after calling TC0100SCN_vh_start */
454void tc0100scn_set_colbank(device_t *device, int colbank);
455
456/* Function to set bg tilemask < 0xffff */
457void tc0100scn_set_bg_tilemask(device_t *device, int mask);
458
459/* Function to for Mjnquest to select gfx bank */
460DECLARE_WRITE16_DEVICE_HANDLER( tc0100scn_gfxbank_w );
461
462DECLARE_READ16_DEVICE_HANDLER( tc0100scn_word_r );
463DECLARE_WRITE16_DEVICE_HANDLER( tc0100scn_word_w );
464DECLARE_READ16_DEVICE_HANDLER( tc0100scn_ctrl_word_r );
465DECLARE_WRITE16_DEVICE_HANDLER( tc0100scn_ctrl_word_w );
466
467/* Functions for use with 68020 (Under Fire) */
468DECLARE_READ32_DEVICE_HANDLER( tc0100scn_long_r );
469DECLARE_WRITE32_DEVICE_HANDLER( tc0100scn_long_w );
470DECLARE_READ32_DEVICE_HANDLER( tc0100scn_ctrl_long_r );
471DECLARE_WRITE32_DEVICE_HANDLER( tc0100scn_ctrl_long_w );
472
473void tc0100scn_tilemap_update(device_t *device);
474int tc0100scn_tilemap_draw(device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
475
476/* returns 0 or 1 depending on the lowest priority tilemap set in the internal
477   register. Use this function to draw tilemaps in the correct order. */
478int tc0100scn_bottomlayer(device_t *device);
479
480
481538/** TC0280GRD & TC0430GRW **/
482539DECLARE_READ16_DEVICE_HANDLER( tc0280grd_word_r );
483540DECLARE_WRITE16_DEVICE_HANDLER( tc0280grd_word_w );
trunk/src/mame/video/asuka.c
r23805r23806
11#include "emu.h"
2#include "video/taitoic.h"
32#include "includes/asuka.h"
43
54/**************************************************************
r23805r23806
2120{
2221   UINT8 layer[3];
2322
24   tc0100scn_tilemap_update(m_tc0100scn);
23   m_tc0100scn->tilemap_update();
2524
26   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
25   layer[0] = m_tc0100scn->bottomlayer();
2726   layer[1] = layer[0] ^ 1;
2827   layer[2] = 2;
2928
r23805r23806
3231   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
3332   bitmap.fill(0, cliprect);
3433
35   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
36   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
37   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
34   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
35   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 2);
36   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
3837
3938   /* Sprites may be over or under top bg layer */
4039   m_pc090oj->draw_sprites(bitmap, cliprect, 2);
r23805r23806
4645{
4746   UINT8 layer[3];
4847
49   tc0100scn_tilemap_update(m_tc0100scn);
48   m_tc0100scn->tilemap_update();
5049
51   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
50   layer[0] = m_tc0100scn->bottomlayer();
5251   layer[1] = layer[0] ^ 1;
5352   layer[2] = 2;
5453
r23805r23806
5756   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
5857   bitmap.fill(0, cliprect);
5958
60   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
61   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
62   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
59   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
60   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 2);
61   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
6362
6463   /* Sprites are always over both bg layers */
6564   m_pc090oj->draw_sprites(bitmap, cliprect, 0);
trunk/src/mame/video/undrfire.c
r23805r23806
346346
347347UINT32 undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
348348{
349   device_t *tc0100scn = machine().device("tc0100scn");
350349   device_t *tc0480scp = machine().device("tc0480scp");
351350   address_space &space = machine().driver_data()->generic_space();
352351   UINT8 layer[5];
r23805r23806
390389   }
391390#endif
392391
393   tc0100scn_tilemap_update(tc0100scn);
392   m_tc0100scn->tilemap_update();
394393   tc0480scp_tilemap_update(tc0480scp);
395394
396395   priority = tc0480scp_get_bg_priority(tc0480scp);
r23805r23806
401400   layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
402401   layer[4] = 4;   /* text layer always over bg layers */
403402
404   pivlayer[0] = tc0100scn_bottomlayer(tc0100scn);
403   pivlayer[0] = m_tc0100scn->bottomlayer();
405404   pivlayer[1] = pivlayer[0] ^ 1;
406405   pivlayer[2] = 2;
407406
r23805r23806
415414   pointless - it's always hidden by other layers. Does it
416415   serve some blending pupose ? */
417416
418   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
419   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[1], 0, 0);
417   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
418   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[1], 0, 0);
420419
421420#ifdef MAME_DEBUG
422421   if (m_dislayer[layer[0]]==0)
r23805r23806
458457#ifdef MAME_DEBUG
459458   if (m_dislayer[5]==0)
460459#endif
461   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0); /* piv text layer */
460   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[2], 0, 0); /* piv text layer */
462461
463462   tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0);    /* TC0480SCP text layer */
464463
r23805r23806
489488
490489UINT32 undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
491490{
492   device_t *tc0100scn = machine().device("tc0100scn");
493491   device_t *tc0480scp = machine().device("tc0480scp");
494492   address_space &space = machine().driver_data()->generic_space();
495493   UINT8 layer[5];
r23805r23806
533531   }
534532#endif
535533
536   tc0100scn_tilemap_update(tc0100scn);
534   m_tc0100scn->tilemap_update();
537535   tc0480scp_tilemap_update(tc0480scp);
538536
539537   priority = tc0480scp_get_bg_priority(tc0480scp);
r23805r23806
544542   layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
545543   layer[4] = 4;   /* text layer always over bg layers */
546544
547   pivlayer[0] = tc0100scn_bottomlayer(tc0100scn);
545   pivlayer[0] = m_tc0100scn->bottomlayer();
548546   pivlayer[1] = pivlayer[0] ^ 1;
549547   pivlayer[2] = 2;
550548
r23805r23806
558556   pointless - it's always hidden by other layers. Does it
559557   serve some blending pupose ? */
560558
561   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
562   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[1], 0, 0);
559   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
560   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[1], 0, 0);
563561
564562#ifdef MAME_DEBUG
565563   if (m_dislayer[layer[0]]==0)
r23805r23806
601599#ifdef MAME_DEBUG
602600   if (m_dislayer[5]==0)
603601#endif
604   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0); /* piv text layer */
602   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[2], 0, 0); /* piv text layer */
605603
606604   tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0);    /* TC0480SCP text layer */
607605
trunk/src/mame/video/ninjaw.c
r23805r23806
77void ninjaw_state::video_start()
88{
99   /* Ensure palette from correct TC0110PCR used for each screen */
10   tc0100scn_set_colbanks(m_tc0100scn_1, 0x0, 0x100, 0x200);
10   m_tc0100scn_1->set_colbanks(0x0, 0x100, 0x200);
1111}
1212
1313/************************************************************
r23805r23806
9494                SCREEN REFRESH
9595**************************************************************/
9696
97UINT32 ninjaw_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn)
97UINT32 ninjaw_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, tc0100scn_device *tc0100scn)
9898{
9999   UINT8 layer[3], nodraw;
100100
101   tc0100scn_tilemap_update(tc0100scn);
101   tc0100scn->tilemap_update();
102102
103   layer[0] = tc0100scn_bottomlayer(tc0100scn);
103   layer[0] = m_tc0100scn_1->bottomlayer();
104104   layer[1] = layer[0] ^ 1;
105105   layer[2] = 2;
106106
107107   /* chip 0 does tilemaps on the left, chip 1 center, chip 2 the right */
108108   // draw bottom layer
109   nodraw  = tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);    /* left */
109   nodraw  = tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);    /* left */
110110
111111   /* Ensure screen blanked even when bottom layers not drawn due to disable bit */
112112   if (nodraw)
r23805r23806
116116   draw_sprites(bitmap, cliprect, 1, xoffs, 8); // draw sprites with priority 1 which are under the mid layer
117117
118118   // draw middle layer
119   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[1], 0, 0);
119   tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 0);
120120
121121   draw_sprites(bitmap,cliprect,0,xoffs,8); // draw sprites with priority 0 which are over the mid layer
122122
123123   // draw top(text) layer
124   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[2], 0, 0);
124   tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 0);
125125   return 0;
126126}
127127
trunk/src/mame/video/taito_h.c
r23805r23806
8686
8787   for (offs = 0x03f8 / 2; offs >= 0; offs -= 0x008 / 2)
8888   {
89      x0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 1, 0xffff) & 0x3ff;
90      y0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 0, 0xffff) & 0x3ff;
91      zoomx     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x7f00) >> 8;
92      tile_offs = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 3, 0xffff) & 0x1fff) << 2;
93      ysize     = size[(tc0080vco_sprram_r(m_tc0080vco, space, offs, 0xffff) & 0x0c00) >> 10];
89      x0        =  m_tc0080vco->sprram_r(space, offs + 1, 0xffff) & 0x3ff;
90      y0        =  m_tc0080vco->sprram_r(space, offs + 0, 0xffff) & 0x3ff;
91      zoomx     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x7f00) >> 8;
92      tile_offs = (m_tc0080vco->sprram_r(space, offs + 3, 0xffff) & 0x1fff) << 2;
93      ysize     = size[(m_tc0080vco->sprram_r(space, offs, 0xffff) & 0x0c00) >> 10];
9494
9595      if (tile_offs)
9696      {
r23805r23806
112112         if (x0 >= 0x200) x0 -= 0x400;
113113         if (y0 >= 0x200) y0 -= 0x400;
114114
115         if (tc0080vco_flipscreen_r(m_tc0080vco))
115         if (m_tc0080vco->flipscreen_r())
116116         {
117117            x0 = 497 - x0;
118118            y0 = 498 - y0;
r23805r23806
134134               {
135135                  int tile, color, flipx, flipy;
136136
137                  tile  = tc0080vco_cram_0_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x7fff;
138                  color = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x001f;
139                  flipx = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0040;
140                  flipy = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0080;
137                  tile  = m_tc0080vco->cram_0_r(space, tile_offs, 0xffff) & 0x7fff;
138                  color = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x001f;
139                  flipx = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0040;
140                  flipy = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0080;
141141
142                  if (tc0080vco_flipscreen_r(m_tc0080vco))
142                  if (m_tc0080vco->flipscreen_r())
143143                  {
144144                     flipx ^= 0x0040;
145145                     flipy ^= 0x0080;
r23805r23806
182182      if (offs <  0x01b0 && priority == 0)    continue;
183183      if (offs >= 0x01b0 && priority == 1)    continue;
184184
185      x0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 1, 0xffff) & 0x3ff;
186      y0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 0, 0xffff) & 0x3ff;
187      zoomx     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x7f00) >> 8;
188      zoomy     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x007f);
189      tile_offs = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 3, 0xffff) & 0x1fff) << 2;
190      ysize     = size[(tc0080vco_sprram_r(m_tc0080vco, space, offs, 0xffff) & 0x0c00) >> 10];
185      x0        =  m_tc0080vco->sprram_r(space, offs + 1, 0xffff) & 0x3ff;
186      y0        =  m_tc0080vco->sprram_r(space, offs + 0, 0xffff) & 0x3ff;
187      zoomx     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x7f00) >> 8;
188      zoomy     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x007f);
189      tile_offs = (m_tc0080vco->sprram_r(space, offs + 3, 0xffff) & 0x1fff) << 2;
190      ysize     = size[(m_tc0080vco->sprram_r(space, offs, 0xffff) & 0x0c00) >> 10];
191191
192192      if (tile_offs)
193193      {
r23805r23806
223223         if (x0 >= 0x200) x0 -= 0x400;
224224         if (y0 >= 0x200) y0 -= 0x400;
225225
226         if (tc0080vco_flipscreen_r(m_tc0080vco))
226         if (m_tc0080vco->flipscreen_r())
227227         {
228228            x0 = 497 - x0;
229229            y0 = 498 - y0;
r23805r23806
246246               {
247247                  int tile, color, flipx, flipy;
248248
249                  tile  = tc0080vco_cram_0_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x7fff;
250                  color = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x001f;
251                  flipx = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0040;
252                  flipy = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0080;
249                  tile  = m_tc0080vco->cram_0_r(space, tile_offs, 0xffff) & 0x7fff;
250                  color = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x001f;
251                  flipx = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0040;
252                  flipy = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0080;
253253
254                  if (tc0080vco_flipscreen_r(m_tc0080vco))
254                  if (m_tc0080vco->flipscreen_r())
255255                  {
256256                     flipx ^= 0x0040;
257257                     flipy ^= 0x0080;
r23805r23806
292292
293293   for (offs = 0x03f8 / 2; offs >= 0; offs -= 0x008 / 2)
294294   {
295      x0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 1, 0xffff) & 0x3ff;
296      y0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 0, 0xffff) & 0x3ff;
297      zoomx     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x7f00) >> 8;
298      tile_offs = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 3, 0xffff) & 0x1fff) << 2;
299      pribit    = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 0, 0xffff) & 0x1000) >> 12;
300      ysize     = size[(tc0080vco_sprram_r(m_tc0080vco, space, offs, 0xffff) & 0x0c00) >> 10];
295      x0        =  m_tc0080vco->sprram_r(space, offs + 1, 0xffff) & 0x3ff;
296      y0        =  m_tc0080vco->sprram_r(space, offs + 0, 0xffff) & 0x3ff;
297      zoomx     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x7f00) >> 8;
298      tile_offs = (m_tc0080vco->sprram_r(space, offs + 3, 0xffff) & 0x1fff) << 2;
299      pribit    = (m_tc0080vco->sprram_r(space, offs + 0, 0xffff) & 0x1000) >> 12;
300      ysize     = size[(m_tc0080vco->sprram_r(space, offs, 0xffff) & 0x0c00) >> 10];
301301
302302      if (tile_offs)
303303      {
r23805r23806
317317            zx = (dx + ex) << 12;
318318         }
319319
320         if (tc0080vco_scrram_r(m_tc0080vco, space, 0x0002, 0xffff) & 0x8000)
320         if (m_tc0080vco->scrram_r(space, 0x0002, 0xffff) & 0x8000)
321321            pribit = 1;
322322
323323         if (x0 >= 0x200) x0 -= 0x400;
324324         if (y0 >= 0x200) y0 -= 0x400;
325325
326         if (tc0080vco_flipscreen_r(m_tc0080vco))
326         if (m_tc0080vco->flipscreen_r())
327327         {
328328            x0 = 497 - x0;
329329            y0 = 498 - y0;
r23805r23806
347347                  {
348348                     int tile, color, flipx, flipy;
349349
350                     tile  = tc0080vco_cram_0_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x7fff;
351                     color = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x001f;
352                     flipx = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0040;
353                     flipy = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0080;
350                     tile  = m_tc0080vco->cram_0_r(space, tile_offs, 0xffff) & 0x7fff;
351                     color = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x001f;
352                     flipx = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0040;
353                     flipy = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0080;
354354
355355
356                     if (tc0080vco_flipscreen_r(m_tc0080vco))
356                     if (m_tc0080vco->flipscreen_r())
357357                     {
358358                        flipx ^= 0x0040;
359359                        flipy ^= 0x0080;
r23805r23806
393393
394394UINT32 taitoh_state::screen_update_syvalion(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
395395{
396   tc0080vco_tilemap_update(m_tc0080vco);
396   m_tc0080vco->tilemap_update();
397397
398398   taitoh_log_vram();
399399
400400   bitmap.fill(0, cliprect);
401401
402   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
403   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0);
402   m_tc0080vco->tilemap_draw(bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
403   m_tc0080vco->tilemap_draw(bitmap, cliprect, 1, 0, 0);
404404   syvalion_draw_sprites(bitmap,cliprect);
405   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0);
405   m_tc0080vco->tilemap_draw(bitmap, cliprect, 2, 0, 0);
406406
407407   return 0;
408408}
r23805r23806
410410
411411UINT32 taitoh_state::screen_update_recordbr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
412412{
413   tc0080vco_tilemap_update(m_tc0080vco);
413   m_tc0080vco->tilemap_update();
414414
415415   taitoh_log_vram();
416416
r23805r23806
418418
419419#ifdef MAME_DEBUG
420420   if (!machine().input().code_pressed(KEYCODE_A))
421      tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
421      m_tc0080vco->tilemap_draw(bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
422422   if (!machine().input().code_pressed(KEYCODE_S))
423423      recordbr_draw_sprites(bitmap, cliprect, 0);
424424   if (!machine().input().code_pressed(KEYCODE_D))
425      tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0);
425      m_tc0080vco->tilemap_draw(bitmap, cliprect, 1, 0, 0);
426426   if (!machine().input().code_pressed(KEYCODE_F))
427427      recordbr_draw_sprites(bitmap, cliprect, 1);
428428#else
429   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
429   m_tc0080vco->tilemap_draw(bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
430430   recordbr_draw_sprites(bitmap, cliprect, 0);
431   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0);
431   m_tc0080vco->tilemap_draw(bitmap, cliprect, 1, 0, 0);
432432   recordbr_draw_sprites(bitmap, cliprect, 1);
433433#endif
434434
435   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0);
435   m_tc0080vco->tilemap_draw(bitmap, cliprect, 2, 0, 0);
436436   return 0;
437437}
438438
439439
440440UINT32 taitoh_state::screen_update_dleague(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
441441{
442   tc0080vco_tilemap_update(m_tc0080vco);
442   m_tc0080vco->tilemap_update();
443443
444444   taitoh_log_vram();
445445
r23805r23806
447447
448448#ifdef MAME_DEBUG
449449   if (!machine().input().code_pressed(KEYCODE_A))
450      tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
450      m_tc0080vco->tilemap_draw(bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
451451   if (!machine().input().code_pressed(KEYCODE_S))
452452      dleague_draw_sprites(bitmap, cliprect, 0);
453453   if (!machine().input().code_pressed(KEYCODE_D))
454      tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0);
454      m_tc0080vco->tilemap_draw(bitmap, cliprect, 1, 0, 0);
455455   if (!machine().input().code_pressed(KEYCODE_F))
456456      dleague_draw_sprites(bitmap, cliprect, 1);
457457#else
458   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
458   m_tc0080vco->tilemap_draw(bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
459459   dleague_draw_sprites (bitmap, cliprect, 0);
460   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0);
460   m_tc0080vco->tilemap_draw(bitmap, cliprect, 1, 0, 0);
461461   dleague_draw_sprites (bitmap, cliprect, 1);
462462#endif
463463
464   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0);
464   m_tc0080vco->tilemap_draw(bitmap, cliprect, 2, 0, 0);
465465   return 0;
466466}
trunk/src/mame/video/taito_z.c
r23805r23806
835835{
836836   UINT8 layer[3];
837837
838   tc0100scn_tilemap_update(m_tc0100scn);
838   m_tc0100scn->tilemap_update();
839839
840   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
840   layer[0] = m_tc0100scn->bottomlayer();
841841   layer[1] = layer[0] ^ 1;
842842   layer[2] = 2;
843843
r23805r23806
845845
846846   bitmap.fill(0, cliprect);
847847
848   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], 0, 0);
849   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
848   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], 0, 0);
849   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 1);
850850   tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -3, m_road_palbank << 6, 1, 0, 1, 2); // -6
851   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
851   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
852852
853853   contcirc_draw_sprites_16x8(bitmap, cliprect, 5); // 7
854854   return 0;
r23805r23806
861861{
862862   UINT8 layer[3];
863863
864   tc0100scn_tilemap_update(m_tc0100scn);
864   m_tc0100scn->tilemap_update();
865865
866   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
866   layer[0] = m_tc0100scn->bottomlayer();
867867   layer[1] = layer[0] ^ 1;
868868   layer[2] = 2;
869869
r23805r23806
872872   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
873873   bitmap.fill(0, cliprect);
874874
875   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
876   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
875   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
876   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 1);
877877   tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 0, 1, 2);
878   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
878   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
879879
880880   chasehq_draw_sprites_16x16(bitmap, cliprect, 7);
881881   return 0;
r23805r23806
886886{
887887   UINT8 layer[3];
888888
889   tc0100scn_tilemap_update(m_tc0100scn);
889   m_tc0100scn->tilemap_update();
890890
891   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
891   layer[0] = m_tc0100scn->bottomlayer();
892892   layer[1] = layer[0] ^ 1;
893893   layer[2] = 2;
894894
r23805r23806
897897   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
898898   bitmap.fill(0, cliprect);
899899
900   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
901   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
900   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
901   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 1);
902902   tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 1, 1, 2);
903   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
903   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
904904
905905   bshark_draw_sprites_16x8(bitmap, cliprect, 8);
906906   return 0;
r23805r23806
911911{
912912   UINT8 layer[3];
913913
914   tc0100scn_tilemap_update(m_tc0100scn);
914   m_tc0100scn->tilemap_update();
915915
916   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
916   layer[0] = m_tc0100scn->bottomlayer();
917917   layer[1] = layer[0] ^ 1;
918918   layer[2] = 2;
919919
r23805r23806
922922   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
923923   bitmap.fill(0, cliprect);
924924
925   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
926   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
925   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
926   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 1);
927927   tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 0, 1, 2);
928   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
928   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
929929
930930   sci_draw_sprites_16x8(bitmap, cliprect, 6);
931931   return 0;
r23805r23806
936936{
937937   UINT8 layer[3];
938938
939   tc0100scn_tilemap_update(m_tc0100scn);
939   m_tc0100scn->tilemap_update();
940940
941   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
941   layer[0] = m_tc0100scn->bottomlayer();
942942   layer[1] = layer[0] ^ 1;
943943   layer[2] = 2;
944944
r23805r23806
947947   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
948948   bitmap.fill(0, cliprect);
949949
950   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
951   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
950   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
951   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 1);
952952   tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0, 2, 1, 1, 2);
953   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
953   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
954954
955955   aquajack_draw_sprites_16x8(bitmap, cliprect, 3);
956956   return 0;
r23805r23806
961961{
962962   UINT8 layer[3];
963963
964   tc0100scn_tilemap_update(m_tc0100scn);
964   m_tc0100scn->tilemap_update();
965965
966   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
966   layer[0] = m_tc0100scn->bottomlayer();
967967   layer[1] = layer[0] ^ 1;
968968   layer[2] = 2;
969969
r23805r23806
972972   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
973973   bitmap.fill(0, cliprect);
974974
975   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
976   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
977   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
975   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
976   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 2);
977   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
978978
979979   spacegun_draw_sprites_16x8(bitmap, cliprect, 4);
980980
trunk/src/mame/video/galastrm.c
r23805r23806
429429
430430UINT32 galastrm_state::screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
431431{
432   device_t *tc0100scn = machine().device("tc0100scn");
433432   device_t *tc0480scp = machine().device("tc0480scp");
434433   UINT8 layer[5];
435434   UINT8 pivlayer[3];
r23805r23806
439438
440439   rectangle clip(0, screen.width() -1, 0, screen.height() -1);
441440
442   tc0100scn_tilemap_update(tc0100scn);
441   m_tc0100scn->tilemap_update();
443442   tc0480scp_tilemap_update(tc0480scp);
444443
445444   priority = tc0480scp_get_bg_priority(tc0480scp);
r23805r23806
449448   layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
450449   layer[4] = 4;   /* text layer always over bg layers */
451450
452   pivlayer[0] = tc0100scn_bottomlayer(tc0100scn);
451   pivlayer[0] = m_tc0100scn->bottomlayer();
453452   pivlayer[1] = pivlayer[0] ^ 1;
454453   pivlayer[2] = 2;
455454
r23805r23806
457456   priority_bitmap.fill(0, clip);
458457   m_tmpbitmaps.fill(0, clip);
459458
460   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[0], 0, 0);
461   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[1], 0, 0);
459   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[0], 0, 0);
460   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[1], 0, 0);
462461
463462#if 0
464463   if (layer[0]==0 && layer[1]==3 && layer[2]==2 && layer[3]==1)
r23805r23806
503502   draw_sprites(machine(),bitmap,cliprect,primasks,0);
504503
505504   if (!machine().input().code_pressed(KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0);
506   if (!machine().input().code_pressed(KEYCODE_M)) tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0);
505   if (!machine().input().code_pressed(KEYCODE_M)) m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[2], 0, 0);
507506
508507
509508
r23805r23806
550549   draw_sprites(bitmap,cliprect,primasks,0);
551550
552551   tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0);
553   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0);
552   m_tc0100scn->tilemap_draw(bitmap, cliprect, pivlayer[2], 0, 0);
554553#endif
555554
556555   return 0;
trunk/src/mame/video/taitoair.c
r23805r23806
4646***************************************************************************/
4747
4848#include "emu.h"
49#include "video/taitoic.h"
5049#include "includes/taitoair.h"
5150
5251
r23805r23806
8988      if (offs <  0x01b0 && priority == 0)    continue;
9089      if (offs >= 0x01b0 && priority == 1)    continue;
9190
92      x0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 1, 0xffff) & 0x3ff;
93      y0        =  tc0080vco_sprram_r(m_tc0080vco, space, offs + 0, 0xffff) & 0x3ff;
94      zoomx     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x7f00) >> 8;
95      zoomy     = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 2, 0xffff) & 0x007f);
96      tile_offs = (tc0080vco_sprram_r(m_tc0080vco, space, offs + 3, 0xffff) & 0x1fff) << 2;
97      ysize     = size[(tc0080vco_sprram_r(m_tc0080vco, space, offs, 0xffff) & 0x0c00) >> 10];
91      x0        =  m_tc0080vco->sprram_r(space, offs + 1, 0xffff) & 0x3ff;
92      y0        =  m_tc0080vco->sprram_r(space, offs + 0, 0xffff) & 0x3ff;
93      zoomx     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x7f00) >> 8;
94      zoomy     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x007f);
95      tile_offs = (m_tc0080vco->sprram_r(space, offs + 3, 0xffff) & 0x1fff) << 2;
96      ysize     = size[(m_tc0080vco->sprram_r(space, offs, 0xffff) & 0x0c00) >> 10];
9897
9998      if (tile_offs)
10099      {
r23805r23806
130129         if (x0 >= 0x200) x0 -= 0x400;
131130         if (y0 >= 0x200) y0 -= 0x400;
132131
133         if (tc0080vco_flipscreen_r(m_tc0080vco))
132         if (m_tc0080vco->flipscreen_r())
134133         {
135134            x0 = 497 - x0;
136135            y0 = 498 - y0;
r23805r23806
153152               {
154153                  int tile, color, flipx, flipy;
155154
156                  tile  = tc0080vco_cram_0_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x7fff;
157                  color = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x001f;
158                  flipx = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0040;
159                  flipy = tc0080vco_cram_1_r(m_tc0080vco, space, tile_offs, 0xffff) & 0x0080;
155                  tile  = m_tc0080vco->cram_0_r(space, tile_offs, 0xffff) & 0x7fff;
156                  color = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x001f;
157                  flipx = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0040;
158                  flipy = m_tc0080vco->cram_1_r(space, tile_offs, 0xffff) & 0x0080;
160159
161                  if (tc0080vco_flipscreen_r(m_tc0080vco))
160                  if (m_tc0080vco->flipscreen_r())
162161                  {
163162                     flipx ^= 0x0040;
164163                     flipy ^= 0x0080;
r23805r23806
559558
560559UINT32 taitoair_state::screen_update_taitoair(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
561560{
562   tc0080vco_tilemap_update(m_tc0080vco);
561   m_tc0080vco->tilemap_update();
563562
564563   bitmap.fill(0, cliprect);
565564
r23805r23806
592591      #endif
593592   }
594593
595   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, 0, 0);
594   m_tc0080vco->tilemap_draw(bitmap, cliprect, 0, 0, 0);
596595
597596   draw_sprites(bitmap, cliprect, 0);
598597
599598   copybitmap_trans(bitmap, *m_framebuffer[1], 0, 0, 0, 0, cliprect, 0);
600599
601   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0);
600   m_tc0080vco->tilemap_draw(bitmap, cliprect, 1, 0, 0);
602601
603602   draw_sprites(bitmap, cliprect, 1);
604603
605   tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0);
604   m_tc0080vco->tilemap_draw(bitmap, cliprect, 2, 0, 0);
606605
607606   /* Hacky 3d bitmap */
608607   //copybitmap_trans(bitmap, m_buffer3d, 0, 0, 0, 0, cliprect, 0);
trunk/src/mame/video/warriorb.c
r23805r23806
77void warriorb_state::video_start()
88{
99   /* Ensure palette from correct TC0110PCR used for each screen */
10   tc0100scn_set_colbanks(m_tc0100scn_1, 0x0, 0x100, 0x0);
10   m_tc0100scn_1->set_colbanks(0x0, 0x100, 0x0);
1111}
1212
1313
r23805r23806
8181                SCREEN REFRESH
8282**************************************************************/
8383
84UINT32 warriorb_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn)
84UINT32 warriorb_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, tc0100scn_device *tc0100scn)
8585{
8686   UINT8 layer[3], nodraw;
8787
88   tc0100scn_tilemap_update(tc0100scn);
88   tc0100scn->tilemap_update();
8989
90   layer[0] = tc0100scn_bottomlayer(tc0100scn);
90   layer[0] = tc0100scn->bottomlayer();
9191   layer[1] = layer[0] ^ 1;
9292   layer[2] = 2;
9393
r23805r23806
9696
9797   /* chip 0 does tilemaps on the left, chip 1 does the ones on the right */
9898   // draw bottom layer
99   nodraw  = tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);    /* left */
99   nodraw  = tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);    /* left */
100100
101101   /* Ensure screen blanked even when bottom layers not drawn due to disable bit */
102102   if (nodraw)
103103      bitmap.fill(get_black_pen(machine()), cliprect);
104104
105105   // draw middle layer
106   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[1], 0, 1);
106   tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 1);
107107
108108   /* Sprites can be under/over the layer below text layer */
109109   draw_sprites(bitmap, cliprect, xoffs, 8); // draw sprites
110110
111111   // draw top(text) layer
112   tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[2], 0, 0);
112   tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 0);
113113   return 0;
114114}
115115
trunk/src/mame/video/othunder.c
r23805r23806
202202{
203203   int layer[3];
204204
205   tc0100scn_tilemap_update(m_tc0100scn);
205   m_tc0100scn->tilemap_update();
206206
207   layer[0] = tc0100scn_bottomlayer(m_tc0100scn);
207   layer[0] = m_tc0100scn->bottomlayer();
208208   layer[1] = layer[0] ^ 1;
209209   layer[2] = 2;
210210
r23805r23806
213213   /* Ensure screen blanked even when bottom layer not drawn due to disable bit */
214214   bitmap.fill(0, cliprect);
215215
216   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
217   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
218   tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4);
216   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
217   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[1], 0, 2);
218   m_tc0100scn->tilemap_draw(bitmap, cliprect, layer[2], 0, 4);
219219
220220   /* Sprites can be under/over the layer below text layer */
221221   {
trunk/src/mame/includes/galastrm.h
r23805r23806
1#include "video/taitoic.h"
12#include "video/poly.h"
23#include "machine/eeprom.h"
34
r23805r23806
2425      m_ram(*this,"ram"),
2526      m_spriteram(*this,"spriteram") ,
2627      m_maincpu(*this, "maincpu"),
27      m_eeprom(*this, "eeprom") { }
28      m_eeprom(*this, "eeprom"),
29      m_tc0100scn(*this, "tc0100scn") { }
2830
2931   required_shared_ptr<UINT32> m_ram;
3032   required_shared_ptr<UINT32> m_spriteram;
3133
34   required_device<cpu_device> m_maincpu;
35   required_device<eeprom_device> m_eeprom;
36   required_device<tc0100scn_device> m_tc0100scn;
3237   UINT16 m_coin_word;
3338   UINT16 m_frame_counter;
3439   int m_tc0110pcr_addr;
r23805r23806
6166   void draw_sprites_pre(int x_offs, int y_offs);
6267   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int *primasks, int priority);
6368   void tc0610_rotate_draw(bitmap_ind16 &bitmap, bitmap_ind16 &srcbitmap, const rectangle &clip);
64   required_device<cpu_device> m_maincpu;
65   required_device<eeprom_device> m_eeprom;
6669
6770protected:
6871   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
trunk/src/mame/includes/warriorb.h
r23805r23806
5757   UINT32 screen_update_warriorb_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5858   void reset_sound_region();
5959   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int x_offs, int y_offs );
60   UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn);
60   UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, tc0100scn_device *tc0100scn);
6161   DECLARE_WRITE_LINE_MEMBER(irqhandler);
6262};
trunk/src/mame/includes/groundfx.h
r23805r23806
1#include "video/taitoic.h"
2
13struct tempsprite
24{
35   int gfx;
r23805r23806
2022      : driver_device(mconfig, type, tag),
2123      m_ram(*this,"ram"),
2224      m_spriteram(*this,"spriteram") ,
23      m_maincpu(*this, "maincpu") { }
25      m_maincpu(*this, "maincpu"),
26      m_tc0100scn(*this, "tc0100scn")   { }
2427
2528   required_shared_ptr<UINT32> m_ram;
2629   required_shared_ptr<UINT32> m_spriteram;
2730
31   required_device<cpu_device> m_maincpu;
32   required_device<tc0100scn_device> m_tc0100scn;
33   
2834   UINT16 m_coin_word;
2935   UINT16 m_frame_counter;
3036   UINT16 m_port_sel;
r23805r23806
4652   UINT32 screen_update_groundfx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4753   INTERRUPT_GEN_MEMBER(groundfx_interrupt);
4854   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int do_hack,int x_offs,int y_offs);
49   required_device<cpu_device> m_maincpu;
55   
5056
5157protected:
5258   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
trunk/src/mame/includes/ninjaw.h
r23805r23806
6464   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int primask, int x_offs, int y_offs );
6565   void parse_control(  )   /* assumes Z80 sandwiched between 68Ks */;
6666   void reset_sound_region(  );
67   UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn);
67   UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, tc0100scn_device *tc0100scn);
6868   DECLARE_WRITE_LINE_MEMBER(irqhandler);
6969};
trunk/src/mame/includes/taito_o.h
r23805r23806
44
55*************************************************************************/
66
7#include "video/taitoic.h"
8
79class taitoo_state : public driver_device
810{
911public:
trunk/src/mame/includes/undrfire.h
r23805r23806
1919
2020   undrfire_state(const machine_config &mconfig, device_type type, const char *tag)
2121      : driver_device(mconfig, type, tag),
22         m_ram(*this, "ram"),
23         m_shared_ram(*this, "shared_ram"),
24         m_spriteram(*this, "spriteram") ,
2522      m_maincpu(*this, "maincpu"),
2623      m_subcpu(*this, "sub"),
27      m_eeprom(*this, "eeprom") { }
24      m_tc0100scn(*this, "tc0100scn"),
25      m_eeprom(*this, "eeprom"),
26      m_ram(*this, "ram"),
27      m_shared_ram(*this, "shared_ram"),
28      m_spriteram(*this, "spriteram") { }
2829
30   required_device<cpu_device> m_maincpu;
31   optional_device<cpu_device> m_subcpu;
32   required_device<tc0100scn_device> m_tc0100scn;
33   required_device<eeprom_device> m_eeprom;
34   optional_shared_ptr<UINT32> m_ram;
35   optional_shared_ptr<UINT32> m_shared_ram;
2936   UINT16 m_coin_word;
3037   UINT16 m_port_sel;
3138   int m_frame_counter;
32   optional_shared_ptr<UINT32> m_ram;
33   optional_shared_ptr<UINT32> m_shared_ram;
3439   struct tempsprite *m_spritelist;
3540   UINT16 m_rotate_ctrl[8];
3641   UINT8 m_dislayer[6];
r23805r23806
5762   INTERRUPT_GEN_MEMBER(undrfire_interrupt);
5863   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs);
5964   void draw_sprites_cbombers(bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs);
60   required_device<cpu_device> m_maincpu;
61   optional_device<cpu_device> m_subcpu;
62   required_device<eeprom_device> m_eeprom;
6365
6466protected:
6567   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team