mirror of
https://github.com/holub/mame
synced 2025-05-11 16:48:52 +03:00
Merge pull request #4672 from cam900/tc0480scp_args
tc0480scp.cpp : Updates
This commit is contained in:
commit
71c338e68f
@ -97,8 +97,8 @@ void galastrm_state::main_map(address_map &map)
|
||||
map(0x40fff0, 0x40fff3).nopw();
|
||||
map(0x500000, 0x500007).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w)).umask32(0xffffffff);
|
||||
map(0x600000, 0x6007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w)); /* Sound shared ram */
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::long_r), FUNC(tc0480scp_device::long_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_long_r), FUNC(tc0480scp_device::ctrl_long_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x900000, 0x900003).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* TC0110PCR */
|
||||
map(0xb00000, 0xb00003).w(FUNC(galastrm_state::tc0610_w<0>)); /* TC0610 */
|
||||
map(0xc00000, 0xc00003).w(FUNC(galastrm_state::tc0610_w<1>));
|
||||
|
@ -137,8 +137,8 @@ void groundfx_state::groundfx_map(address_map &map)
|
||||
map(0x500000, 0x500007).rw("tc0510nio", FUNC(tc0510nio_device::read), FUNC(tc0510nio_device::write));
|
||||
map(0x600000, 0x600007).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w)).umask32(0xffffffff);
|
||||
map(0x700000, 0x7007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::long_r), FUNC(tc0480scp_device::long_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_long_r), FUNC(tc0480scp_device::ctrl_long_w)); // debugging
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w)); // debugging
|
||||
map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* 6bpp tilemaps */
|
||||
map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w));
|
||||
map(0xa00000, 0xa0ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
|
||||
|
@ -126,8 +126,8 @@ void gunbustr_state::gunbustr_map(address_map &map)
|
||||
map(0x390000, 0x3907ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w)); /* Sound shared ram */
|
||||
map(0x400000, 0x400007).rw("tc0510nio", FUNC(tc0510nio_device::read), FUNC(tc0510nio_device::write));
|
||||
map(0x500000, 0x500003).rw(FUNC(gunbustr_state::gunbustr_gun_r), FUNC(gunbustr_state::gunbustr_gun_w)); /* gun coord read */
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::long_r), FUNC(tc0480scp_device::long_w));
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_long_r), FUNC(tc0480scp_device::ctrl_long_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w));
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x900000, 0x901fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
|
||||
map(0xc00000, 0xc03fff).ram(); /* network ram ?? */
|
||||
}
|
||||
|
@ -213,8 +213,8 @@ void slapshot_state::slapshot_map(address_map &map)
|
||||
map(0x500000, 0x50ffff).ram(); /* main RAM */
|
||||
map(0x600000, 0x60ffff).ram().share("spriteram"); /* sprite ram */
|
||||
map(0x700000, 0x701fff).ram().share("spriteext"); /* debugging */
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_word_r), FUNC(tc0480scp_device::ctrl_word_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x900000, 0x907fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
map(0xa00000, 0xa03fff).rw("mk48t08", FUNC(timekeeper_device::read), FUNC(timekeeper_device::write)).umask16(0xff00); /* nvram (only low bytes used) */
|
||||
map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0xff00); /* priority chip */
|
||||
@ -230,8 +230,8 @@ void slapshot_state::opwolf3_map(address_map &map)
|
||||
map(0x500000, 0x50ffff).ram(); /* main RAM */
|
||||
map(0x600000, 0x60ffff).ram().share("spriteram"); /* sprite ram */
|
||||
map(0x700000, 0x701fff).ram().share("spriteext"); /* debugging */
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_word_r), FUNC(tc0480scp_device::ctrl_word_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x900000, 0x907fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
map(0xa00000, 0xa03fff).rw("mk48t08", FUNC(timekeeper_device::read), FUNC(timekeeper_device::write)).umask16(0xff00); /* nvram (only low bytes used) */
|
||||
map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0xff00); /* priority chip */
|
||||
|
@ -122,8 +122,8 @@ void superchs_state::superchs_map(address_map &map)
|
||||
map(0x000000, 0x0fffff).rom();
|
||||
map(0x100000, 0x11ffff).ram().share("ram");
|
||||
map(0x140000, 0x141fff).ram().share("spriteram");
|
||||
map(0x180000, 0x18ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::long_r), FUNC(tc0480scp_device::long_w));
|
||||
map(0x1b0000, 0x1b002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_long_r), FUNC(tc0480scp_device::ctrl_long_w));
|
||||
map(0x180000, 0x18ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w));
|
||||
map(0x1b0000, 0x1b002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x200000, 0x20ffff).ram().share("shared_ram");
|
||||
map(0x240000, 0x240003).w(FUNC(superchs_state::cpua_ctrl_w));
|
||||
map(0x280000, 0x287fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
|
||||
@ -136,7 +136,7 @@ void superchs_state::superchs_cpub_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x200000, 0x20ffff).ram();
|
||||
map(0x600000, 0x60ffff).w(m_tc0480scp, FUNC(tc0480scp_device::word_w)); /* Only written upon errors */
|
||||
map(0x600000, 0x60ffff).w(m_tc0480scp, FUNC(tc0480scp_device::ram_w)); /* Only written upon errors */
|
||||
map(0x800000, 0x80ffff).rw(FUNC(superchs_state::shared_ram_r), FUNC(superchs_state::shared_ram_w));
|
||||
map(0xa00000, 0xa001ff).ram(); /* Extra road control?? */
|
||||
}
|
||||
@ -146,7 +146,7 @@ void superchs_state::chase3_cpub_map(address_map &map)
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x200000, 0x20ffff).ram();
|
||||
map(0x400000, 0x40ffff).ram();
|
||||
map(0x600000, 0x60ffff).w(m_tc0480scp, FUNC(tc0480scp_device::word_w)); /* Only written upon errors */
|
||||
map(0x600000, 0x60ffff).w(m_tc0480scp, FUNC(tc0480scp_device::ram_w)); /* Only written upon errors */
|
||||
map(0x800000, 0x80ffff).rw(FUNC(superchs_state::shared_ram_r), FUNC(superchs_state::shared_ram_w));
|
||||
map(0xa00000, 0xa001ff).ram(); /* Extra road control?? */
|
||||
}
|
||||
|
@ -856,8 +856,8 @@ void taitof2_state::footchmp_map(address_map &map)
|
||||
map(0x100000, 0x10ffff).ram();
|
||||
map(0x200000, 0x20ffff).ram().share("spriteram");
|
||||
map(0x300000, 0x30000f).w(FUNC(taitof2_state::taitof2_spritebank_w)); /* updated at $a6e, off irq5 */
|
||||
map(0x400000, 0x40ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemaps */
|
||||
map(0x430000, 0x43002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_word_r), FUNC(tc0480scp_device::ctrl_word_w));
|
||||
map(0x400000, 0x40ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x430000, 0x43002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x500000, 0x50001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* 500002 written like a watchdog?! */
|
||||
map(0x600000, 0x601fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
map(0x700000, 0x70001f).rw("te7750", FUNC(te7750_device::read), FUNC(te7750_device::write)).umask16(0x00ff);
|
||||
@ -971,8 +971,8 @@ void taitof2_state::metalb_map(address_map &map)
|
||||
map(0x100000, 0x10ffff).ram();
|
||||
map(0x300000, 0x30ffff).ram().share("spriteram");
|
||||
// AM_RANGE(0x42000c, 0x42000f) AM_WRITENOP /* zeroed */
|
||||
map(0x500000, 0x50ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemaps */
|
||||
map(0x530000, 0x53002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_word_r), FUNC(tc0480scp_device::ctrl_word_w));
|
||||
map(0x500000, 0x50ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x530000, 0x53002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x600000, 0x60001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff);
|
||||
map(0x700000, 0x703fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
map(0x800000, 0x80000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_wordswap_r), FUNC(tc0510nio_device::halfword_wordswap_w));
|
||||
@ -1020,9 +1020,9 @@ void taitof2_state::deadconx_map(address_map &map)
|
||||
map(0x100000, 0x10ffff).ram();
|
||||
map(0x200000, 0x20ffff).ram().share("spriteram");
|
||||
map(0x300000, 0x30000f).w(FUNC(taitof2_state::taitof2_spritebank_w));
|
||||
map(0x400000, 0x40ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemaps */
|
||||
map(0x400000, 0x40ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
// AM_RANGE(0x42000c, 0x42000f) AM_WRITENOP /* zeroed */
|
||||
map(0x430000, 0x43002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_word_r), FUNC(tc0480scp_device::ctrl_word_w));
|
||||
map(0x430000, 0x43002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x500000, 0x50001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* uses 500002 like a watchdog !? */
|
||||
map(0x600000, 0x601fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
map(0x700000, 0x70001f).rw("te7750", FUNC(te7750_device::read), FUNC(te7750_device::write)).umask16(0x00ff);
|
||||
|
@ -1844,9 +1844,9 @@ void taitoz_state::dblaxle_map(address_map &map)
|
||||
map(0x620001, 0x620001).w(m_tc0140syt, FUNC(tc0140syt_device::master_port_w));
|
||||
map(0x620003, 0x620003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w));
|
||||
map(0x800000, 0x801fff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
|
||||
map(0x900000, 0x90ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemap mirror */
|
||||
map(0xa00000, 0xa0ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemaps */
|
||||
map(0xa30000, 0xa3002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_word_r), FUNC(tc0480scp_device::ctrl_word_w));
|
||||
map(0x900000, 0x90ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemap mirror */
|
||||
map(0xa00000, 0xa0ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0xa30000, 0xa3002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0xc00000, 0xc03fff).ram().share("spriteram"); /* mostly unused ? */
|
||||
map(0xc08000, 0xc08001).rw(FUNC(taitoz_state::sci_spriteframe_r), FUNC(taitoz_state::sci_spriteframe_w)); /* set in int6, seems to stay zero */
|
||||
}
|
||||
@ -1872,8 +1872,8 @@ void taitoz_state::racingb_map(address_map &map)
|
||||
map(0x520001, 0x520001).w(m_tc0140syt, FUNC(tc0140syt_device::master_port_w));
|
||||
map(0x520003, 0x520003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w));
|
||||
map(0x700000, 0x701fff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
|
||||
map(0x900000, 0x90ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::word_r), FUNC(tc0480scp_device::word_w)); /* tilemaps */
|
||||
map(0x930000, 0x93002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_word_r), FUNC(tc0480scp_device::ctrl_word_w));
|
||||
map(0x900000, 0x90ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x930000, 0x93002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0xb00000, 0xb03fff).ram().share("spriteram"); /* mostly unused ? */
|
||||
map(0xb08000, 0xb08001).rw(FUNC(taitoz_state::sci_spriteframe_r), FUNC(taitoz_state::sci_spriteframe_w)); /* alternates 0/0x100 */
|
||||
}
|
||||
|
@ -76,6 +76,8 @@
|
||||
|
||||
Chase Bombers proto sports lots of gfx bugs;
|
||||
|
||||
Chase Bombers PCB has TC0360PRI but not hooked up
|
||||
|
||||
Gun calibration
|
||||
---------------
|
||||
|
||||
@ -350,8 +352,8 @@ void undrfire_state::undrfire_map(address_map &map)
|
||||
map(0x500000, 0x500007).rw("tc0510nio", FUNC(tc0510nio_device::read), FUNC(tc0510nio_device::write));
|
||||
map(0x600000, 0x600007).noprw(); // space for ADC0809, not fitted on pcb
|
||||
map(0x700000, 0x7007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::long_r), FUNC(tc0480scp_device::long_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_long_r), FUNC(tc0480scp_device::ctrl_long_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* 6bpp tilemaps */
|
||||
map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w));
|
||||
map(0xa00000, 0xa0ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
|
||||
@ -370,12 +372,12 @@ void undrfire_state::cbombers_cpua_map(address_map &map)
|
||||
map(0x500000, 0x500007).rw("tc0510nio", FUNC(tc0510nio_device::read), FUNC(tc0510nio_device::write));
|
||||
map(0x600000, 0x600007).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w)).umask32(0xffffffff);
|
||||
map(0x700000, 0x7007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::long_r), FUNC(tc0480scp_device::long_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_long_r), FUNC(tc0480scp_device::ctrl_long_w));
|
||||
map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */
|
||||
map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w));
|
||||
map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* 6bpp tilemaps */
|
||||
map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w));
|
||||
map(0xa00000, 0xa0ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
|
||||
map(0xb00000, 0xb0000f).ram(); /* ? */
|
||||
map(0xb00000, 0xb0000f).ram(); /* TC0360PRI */
|
||||
map(0xc00000, 0xc00007).ram(); /* LAN controller? */
|
||||
map(0xd00000, 0xd00003).w(FUNC(undrfire_state::rotate_control_w)); /* perhaps port based rotate control? */
|
||||
map(0xe00000, 0xe0ffff).ram().share("shared_ram");
|
||||
@ -385,9 +387,9 @@ void undrfire_state::cbombers_cpub_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x400000, 0x40ffff).ram(); /* local ram */
|
||||
// AM_RANGE(0x600000, 0x60ffff) AM_DEVWRITE("tc0480scp", tc0480scp_device, word_w) /* Only written upon errors */
|
||||
// map(0x600000, 0x60ffff).w(m_tc0480scp, FUNC(tc0480scp_device::ram_w)); /* Only written upon errors */
|
||||
map(0x800000, 0x80ffff).rw(FUNC(undrfire_state::shared_ram_r), FUNC(undrfire_state::shared_ram_w));
|
||||
// AM_RANGE(0xa00000, 0xa001ff) AM_RAM /* Extra road control?? */
|
||||
// map(0xa00000, 0xa001ff).ram(); /* Extra road control?? */
|
||||
}
|
||||
|
||||
|
||||
|
@ -241,7 +241,7 @@ uint32_t groundfx_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
|
||||
*/
|
||||
if (m_tc0100scn->long_r(space, 0x4090 / 4, 0xffffffff) ||
|
||||
m_tc0480scp->long_r(space, 0x20 / 4, 0xffffffff) == 0x240866) /* Anything in text layer - really stupid hack */
|
||||
((m_tc0480scp->ram_r(0x20 / 2) == 0x24) && (m_tc0480scp->ram_r(0x22 / 2) == 0x0866))) /* Anything in text layer - really stupid hack */
|
||||
{
|
||||
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 2);
|
||||
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[2], 0, 4);
|
||||
@ -249,7 +249,7 @@ uint32_t groundfx_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
|
||||
//m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, 0, scclayer[2], 0, 0);
|
||||
|
||||
if (m_tc0480scp->long_r(space, 0x20 / 4, 0xffffffff) != 0x240866) /* Stupid hack for start of race */
|
||||
if ((m_tc0480scp->ram_r(0x20 / 2) != 0x24) && (m_tc0480scp->ram_r(0x22 / 2) != 0x0866)) /* Stupid hack for start of race */
|
||||
m_tc0480scp->tilemap_draw(screen, bitmap, m_hack_cliprect, layer[0], 0, 0);
|
||||
draw_sprites(screen, bitmap, cliprect, 1, 44, -574);
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ void tc0480scp_device::device_reset()
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
void tc0480scp_device::common_get_tc0480bg_tile_info( tile_data &tileinfo, int tile_index, uint16_t *ram, int gfxnum )
|
||||
void tc0480scp_device::common_get_tc0480bg_tile_info( tile_data &tileinfo, int tile_index, u16 *ram, int gfxnum )
|
||||
{
|
||||
int code = ram[2 * tile_index + 1] & 0x7fff;
|
||||
int attr = ram[2 * tile_index];
|
||||
@ -316,7 +316,7 @@ void tc0480scp_device::common_get_tc0480bg_tile_info( tile_data &tileinfo, int t
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
void tc0480scp_device::common_get_tc0480tx_tile_info( tile_data &tileinfo, int tile_index, uint16_t *ram, int gfxnum )
|
||||
void tc0480scp_device::common_get_tc0480tx_tile_info( tile_data &tileinfo, int tile_index, u16 *ram, int gfxnum )
|
||||
{
|
||||
int attr = ram[tile_index];
|
||||
SET_TILE_INFO_MEMBER(gfxnum,
|
||||
@ -398,12 +398,12 @@ void tc0480scp_device::set_layer_ptrs()
|
||||
}
|
||||
}
|
||||
|
||||
READ16_MEMBER( tc0480scp_device::word_r )
|
||||
u16 tc0480scp_device::ram_r(offs_t offset)
|
||||
{
|
||||
return m_ram[offset];
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( tc0480scp_device::word_w )
|
||||
void tc0480scp_device::ram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_ram[offset]);
|
||||
|
||||
@ -445,12 +445,12 @@ WRITE16_MEMBER( tc0480scp_device::word_w )
|
||||
}
|
||||
}
|
||||
|
||||
READ16_MEMBER( tc0480scp_device::ctrl_word_r )
|
||||
u16 tc0480scp_device::ctrl_r(offs_t offset)
|
||||
{
|
||||
return m_ctrl[offset];
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( tc0480scp_device::ctrl_word_w )
|
||||
void tc0480scp_device::ctrl_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
int flip = m_pri_reg & 0x40;
|
||||
|
||||
@ -568,51 +568,6 @@ WRITE16_MEMBER( tc0480scp_device::ctrl_word_w )
|
||||
}
|
||||
|
||||
|
||||
READ32_MEMBER( tc0480scp_device::ctrl_long_r )
|
||||
{
|
||||
return (ctrl_word_r(space, offset * 2, 0xffff) << 16) | ctrl_word_r(space, offset * 2 + 1, 0xffff);
|
||||
}
|
||||
|
||||
/* TODO: byte access ? */
|
||||
|
||||
WRITE32_MEMBER( tc0480scp_device::ctrl_long_w )
|
||||
{
|
||||
if (ACCESSING_BITS_16_31)
|
||||
ctrl_word_w(space, offset * 2, data >> 16, mem_mask >> 16);
|
||||
if (ACCESSING_BITS_0_15)
|
||||
ctrl_word_w(space, (offset * 2) + 1, data & 0xffff, mem_mask & 0xffff);
|
||||
}
|
||||
|
||||
READ32_MEMBER( tc0480scp_device::long_r )
|
||||
{
|
||||
return (word_r(space, offset * 2, 0xffff) << 16) | word_r(space, offset * 2 + 1, 0xffff);
|
||||
}
|
||||
|
||||
WRITE32_MEMBER( tc0480scp_device::long_w )
|
||||
{
|
||||
if (ACCESSING_BITS_16_31)
|
||||
{
|
||||
int oldword = word_r(space, offset * 2, 0xffff);
|
||||
int newword = data >> 16;
|
||||
if (!ACCESSING_BITS_16_23)
|
||||
newword |= (oldword & 0x00ff);
|
||||
if (!ACCESSING_BITS_24_31)
|
||||
newword |= (oldword & 0xff00);
|
||||
word_w(space, offset * 2, newword, 0xffff);
|
||||
}
|
||||
if (ACCESSING_BITS_0_15)
|
||||
{
|
||||
int oldword = word_r(space, (offset * 2) + 1, 0xffff);
|
||||
int newword = data & 0xffff;
|
||||
if (!ACCESSING_BITS_0_7)
|
||||
newword |= (oldword & 0x00ff);
|
||||
if (!ACCESSING_BITS_8_15)
|
||||
newword |= (oldword & 0xff00);
|
||||
word_w(space, (offset * 2) + 1, newword, 0xffff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void tc0480scp_device::tilemap_update()
|
||||
{
|
||||
int layer, zoom, i, j;
|
||||
@ -691,9 +646,9 @@ void tc0480scp_device::bg01_draw( screen_device &screen, bitmap_ind16 &bitmap, c
|
||||
}
|
||||
else /* zoom */
|
||||
{
|
||||
uint16_t *dst16, *src16;
|
||||
u16 *dst16, *src16;
|
||||
uint8_t *tsrc;
|
||||
uint16_t scanline[512];
|
||||
u16 scanline[512];
|
||||
uint32_t sx;
|
||||
bitmap_ind16 &srcbitmap = m_tilemap[layer][m_dblwidth]->pixmap();
|
||||
bitmap_ind8 &flagsbitmap = m_tilemap[layer][m_dblwidth]->flagsmap();
|
||||
@ -701,9 +656,9 @@ void tc0480scp_device::bg01_draw( screen_device &screen, bitmap_ind16 &bitmap, c
|
||||
int y_index, src_y_index, row_index;
|
||||
int x_index, x_step;
|
||||
|
||||
uint16_t screen_width = 512; //cliprect.width();
|
||||
uint16_t min_y = cliprect.min_y;
|
||||
uint16_t max_y = cliprect.max_y;
|
||||
u16 screen_width = 512; //cliprect.width();
|
||||
u16 min_y = cliprect.min_y;
|
||||
u16 max_y = cliprect.max_y;
|
||||
|
||||
int width_mask = 0x1ff;
|
||||
if (m_dblwidth)
|
||||
@ -812,17 +767,17 @@ void tc0480scp_device::bg23_draw(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
bitmap_ind16 &srcbitmap = m_tilemap[layer][m_dblwidth]->pixmap();
|
||||
bitmap_ind8 &flagsbitmap = m_tilemap[layer][m_dblwidth]->flagsmap();
|
||||
|
||||
uint16_t *dst16, *src16;
|
||||
u16 *dst16, *src16;
|
||||
uint8_t *tsrc;
|
||||
int y_index, src_y_index, row_index, row_zoom;
|
||||
int sx, x_index, x_step;
|
||||
uint32_t zoomx, zoomy;
|
||||
uint16_t scanline[512];
|
||||
u16 scanline[512];
|
||||
int flipscreen = m_pri_reg & 0x40;
|
||||
|
||||
uint16_t screen_width = 512; //cliprect.width();
|
||||
uint16_t min_y = cliprect.min_y;
|
||||
uint16_t max_y = cliprect.max_y;
|
||||
u16 screen_width = 512; //cliprect.width();
|
||||
u16 min_y = cliprect.min_y;
|
||||
u16 max_y = cliprect.max_y;
|
||||
|
||||
int width_mask = 0x1ff;
|
||||
if (m_dblwidth)
|
||||
@ -941,7 +896,7 @@ void tc0480scp_device::tilemap_draw( screen_device &screen, bitmap_ind16 &bitmap
|
||||
|
||||
/* For evidence table of TC0480SCP bg layer priorities, refer to mame55 source */
|
||||
|
||||
static const uint16_t tc0480scp_bg_pri_lookup[8] =
|
||||
static const u16 tc0480scp_bg_pri_lookup[8] =
|
||||
{
|
||||
0x0123,
|
||||
0x1230,
|
||||
@ -958,8 +913,8 @@ int tc0480scp_device::get_bg_priority()
|
||||
return tc0480scp_bg_pri_lookup[(m_pri_reg & 0x1c) >> 2];
|
||||
}
|
||||
|
||||
// undrfire.c also needs to directly access the priority reg
|
||||
READ8_MEMBER( tc0480scp_device::pri_reg_r )
|
||||
// undrfire.cpp also needs to directly access the priority reg
|
||||
u8 tc0480scp_device::pri_reg_r()
|
||||
{
|
||||
return m_pri_reg;
|
||||
}
|
||||
|
@ -35,16 +35,10 @@ public:
|
||||
then tweak them once you have the 4 bg layer positions correct. Col_base
|
||||
may be needed when tilemaps use a palette area from sprites. */
|
||||
|
||||
DECLARE_READ16_MEMBER( word_r );
|
||||
DECLARE_WRITE16_MEMBER( word_w );
|
||||
DECLARE_READ16_MEMBER( ctrl_word_r );
|
||||
DECLARE_WRITE16_MEMBER( ctrl_word_w );
|
||||
|
||||
/* Functions for use with 68020 (Super-Z system) */
|
||||
DECLARE_READ32_MEMBER( long_r );
|
||||
DECLARE_WRITE32_MEMBER( long_w );
|
||||
DECLARE_READ32_MEMBER( ctrl_long_r );
|
||||
DECLARE_WRITE32_MEMBER( ctrl_long_w );
|
||||
u16 ram_r(offs_t offset);
|
||||
void ram_w(offs_t offset, u16 data, u16 mem_mask);
|
||||
u16 ctrl_r(offs_t offset);
|
||||
void ctrl_w(offs_t offset, u16 data, u16 mem_mask);
|
||||
|
||||
void tilemap_update();
|
||||
void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, uint32_t priority);
|
||||
@ -55,7 +49,7 @@ public:
|
||||
int get_bg_priority();
|
||||
|
||||
/* Undrfire needs to read this for a sprite/tile priority hack */
|
||||
DECLARE_READ8_MEMBER( pri_reg_r );
|
||||
u8 pri_reg_r();
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
@ -65,35 +59,35 @@ protected:
|
||||
|
||||
private:
|
||||
// internal state
|
||||
uint16_t m_ctrl[0x18];
|
||||
u16 m_ctrl[0x18];
|
||||
|
||||
std::vector<uint16_t> m_ram;
|
||||
uint16_t * m_bg_ram[4];
|
||||
uint16_t * m_tx_ram;
|
||||
uint16_t * m_char_ram;
|
||||
uint16_t * m_bgscroll_ram[4];
|
||||
uint16_t * m_rowzoom_ram[4];
|
||||
uint16_t * m_bgcolumn_ram[4];
|
||||
int m_bgscrollx[4];
|
||||
int m_bgscrolly[4];
|
||||
int m_pri_reg;
|
||||
std::vector<u16> m_ram;
|
||||
u16 * m_bg_ram[4];
|
||||
u16 * m_tx_ram;
|
||||
u16 * m_char_ram;
|
||||
u16 * m_bgscroll_ram[4];
|
||||
u16 * m_rowzoom_ram[4];
|
||||
u16 * m_bgcolumn_ram[4];
|
||||
int m_bgscrollx[4];
|
||||
int m_bgscrolly[4];
|
||||
int m_pri_reg;
|
||||
|
||||
/* We keep two tilemaps for each of the 5 actual tilemaps: one at standard width, one double */
|
||||
tilemap_t *m_tilemap[5][2];
|
||||
tilemap_t *m_tilemap[5][2];
|
||||
int32_t m_dblwidth;
|
||||
|
||||
int m_gfxnum;
|
||||
int m_txnum;
|
||||
int m_x_offset, m_y_offset;
|
||||
int m_text_xoffs, m_text_yoffs;
|
||||
int m_flip_xoffs, m_flip_yoffs;
|
||||
int m_gfxnum;
|
||||
int m_txnum;
|
||||
int m_x_offset, m_y_offset;
|
||||
int m_text_xoffs, m_text_yoffs;
|
||||
int m_flip_xoffs, m_flip_yoffs;
|
||||
|
||||
int m_col_base;
|
||||
int m_col_base;
|
||||
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
void common_get_tc0480bg_tile_info( tile_data &tileinfo, int tile_index, uint16_t *ram, int gfxnum );
|
||||
void common_get_tc0480tx_tile_info( tile_data &tileinfo, int tile_index, uint16_t *ram, int gfxnum );
|
||||
void common_get_tc0480bg_tile_info( tile_data &tileinfo, int tile_index, u16 *ram, int gfxnum );
|
||||
void common_get_tc0480tx_tile_info( tile_data &tileinfo, int tile_index, u16 *ram, int gfxnum );
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_bg0_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
|
||||
|
@ -348,7 +348,6 @@ void undrfire_state::draw_sprites_cbombers(screen_device &screen, bitmap_ind16 &
|
||||
|
||||
uint32_t undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
address_space &space = machine().dummy_space();
|
||||
uint8_t layer[5];
|
||||
uint8_t scclayer[3];
|
||||
uint16_t priority;
|
||||
@ -443,7 +442,7 @@ uint32_t undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_in
|
||||
#endif
|
||||
/* Sprites have variable priority (we kludge this on road levels) */
|
||||
{
|
||||
if ((m_tc0480scp->pri_reg_r(space, 0) & 0x3) == 3) /* on road levels kludge sprites up 1 priority */
|
||||
if ((m_tc0480scp->pri_reg_r() & 0x3) == 3) /* on road levels kludge sprites up 1 priority */
|
||||
{
|
||||
static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0};
|
||||
draw_sprites(screen, bitmap, cliprect, primasks, 44, -574);
|
||||
@ -489,7 +488,6 @@ uint32_t undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_in
|
||||
|
||||
uint32_t undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
address_space &space = machine().dummy_space();
|
||||
uint8_t layer[5];
|
||||
uint8_t scclayer[3];
|
||||
uint16_t priority;
|
||||
@ -556,6 +554,7 @@ uint32_t undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_in
|
||||
pointless - it's always hidden by other layers. Does it
|
||||
serve some blending pupose ? */
|
||||
|
||||
// TODO : Wrong; TC0360PRI isn't hooked up
|
||||
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, scclayer[0], TILEMAP_DRAW_OPAQUE, 0);
|
||||
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, scclayer[1], 0, 0);
|
||||
|
||||
@ -584,7 +583,7 @@ uint32_t undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_in
|
||||
#endif
|
||||
/* Sprites have variable priority (we kludge this on road levels) */
|
||||
{
|
||||
if ((m_tc0480scp->pri_reg_r(space, 0) & 0x3) == 3) /* on road levels kludge sprites up 1 priority */
|
||||
if ((m_tc0480scp->pri_reg_r() & 0x3) == 3) /* on road levels kludge sprites up 1 priority */
|
||||
{
|
||||
static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0};
|
||||
draw_sprites_cbombers(screen, bitmap, cliprect, primasks, 80, -208);
|
||||
|
Loading…
Reference in New Issue
Block a user