diff --git a/src/devices/machine/spg110.cpp b/src/devices/machine/spg110.cpp index f8b16b3700e..dd40a3457fe 100644 --- a/src/devices/machine/spg110.cpp +++ b/src/devices/machine/spg110.cpp @@ -15,7 +15,8 @@ DEFINE_DEVICE_TYPE(SPG110, spg110_device, "spg110", "SPG110 System-on-a-Chip") spg110_device::spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, type, tag, owner, clock) + : device_t(mconfig, type, tag, owner, clock), + m_cpu(*this, finder_base::DUMMY_TAG) { } @@ -24,14 +25,47 @@ spg110_device::spg110_device(const machine_config &mconfig, const char *tag, dev { } +READ16_MEMBER(spg110_device::spg110_2062_r) +{ + return 0x1fff; // DMA related? +} + +// irq source or similar? +READ16_MEMBER(spg110_device::spg110_2063_r) +{ + // checks for bits 0x20 and 0x08 in the IRQ function (all IRQs point to the same place) + return 0x0008; +} + +WRITE16_MEMBER(spg110_device::spg110_2063_w) +{ + // writes 0x28, probably clears the IRQ / IRQ sources? 0x63 is the same offset for this in spg2xx but bits used seem to be different + m_cpu->set_state_unsynced(UNSP_IRQ0_LINE, CLEAR_LINE); +} + void spg110_device::map(address_map &map) { map(0x000000, 0x000fff).ram(); + // vregs are at 2000? + map(0x002060, 0x002060).nopw(); + map(0x002062, 0x002062).r(FUNC(spg110_device::spg110_2062_r)).nopw();; + map(0x002063, 0x002063).rw(FUNC(spg110_device::spg110_2063_r),FUNC(spg110_device::spg110_2063_w)); + map(0x002066, 0x002066).nopw(); + + map(0x002200, 0x0022ff).ram(); + map(0x003000, 0x0030ff).ram(); } +/* +TIMER_CALLBACK_MEMBER(spg110_device::test_timer) +{ + // +} +*/ void spg110_device::device_start() { +// m_test_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(spg110_device::test_timer), this)); } void spg110_device::device_reset() @@ -47,5 +81,10 @@ uint32_t spg110_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma WRITE_LINE_MEMBER(spg110_device::vblank) { if (!state) - return; + { + m_cpu->set_state_unsynced(UNSP_IRQ0_LINE, ASSERT_LINE); + // m_test_timer->adjust(attotime::from_usec(100), 0); + } + + return; } diff --git a/src/devices/machine/spg110.h b/src/devices/machine/spg110.h index d9e8810baf0..0726bbf73ae 100644 --- a/src/devices/machine/spg110.h +++ b/src/devices/machine/spg110.h @@ -7,6 +7,7 @@ #pragma once //#include "spg2xx.h" +#include "cpu/unsp/unsp.h" class spg110_device : public device_t { @@ -14,6 +15,13 @@ public: spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template + spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + : spg110_device(mconfig, tag, owner, clock) + { + m_cpu.set_tag(std::forward(cpu_tag)); + } + void map(address_map &map); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -22,6 +30,14 @@ public: protected: virtual void device_start() override; virtual void device_reset() override; + +private: + required_device m_cpu; + //TIMER_CALLBACK_MEMBER(test_timer); + //emu_timer *m_test_timer; + DECLARE_READ16_MEMBER(spg110_2062_r); + DECLARE_READ16_MEMBER(spg110_2063_r); + DECLARE_WRITE16_MEMBER(spg110_2063_w); }; diff --git a/src/mame/drivers/rad_eu3a14.cpp b/src/mame/drivers/rad_eu3a14.cpp index 05eb14775f3..25d0c4af2ae 100644 --- a/src/mame/drivers/rad_eu3a14.cpp +++ b/src/mame/drivers/rad_eu3a14.cpp @@ -76,6 +76,7 @@ public: m_scrollregs(*this, "scrollregs"), m_tilecfg(*this, "tilecfg"), m_tilebase(*this, "tilebase"), + m_spriteaddr(*this, "spriteaddr"), m_spritebase(*this, "spritebase"), m_mainram(*this, "mainram"), m_dmaparams(*this, "dmaparams"), @@ -114,6 +115,15 @@ private: DECLARE_WRITE8_MEMBER(radicasi_rombank_lo_w); DECLARE_WRITE8_MEMBER(radicasi_rombank_hi_w); + DECLARE_WRITE8_MEMBER(porta_dir_w); + DECLARE_WRITE8_MEMBER(portb_dir_w); + DECLARE_WRITE8_MEMBER(portc_dir_w); + + DECLARE_WRITE8_MEMBER(porta_dat_w); + DECLARE_WRITE8_MEMBER(portb_dat_w); + DECLARE_WRITE8_MEMBER(portc_dat_w); + + DECLARE_READ8_MEMBER(radica_5009_unk_r) { return machine().rand(); }; DECLARE_READ8_MEMBER(random_r) { return machine().rand(); }; @@ -140,6 +150,7 @@ private: required_shared_ptr m_scrollregs; required_shared_ptr m_tilecfg; required_shared_ptr m_tilebase; + required_shared_ptr m_spriteaddr; required_shared_ptr m_spritebase; required_shared_ptr m_mainram; required_shared_ptr m_dmaparams; @@ -154,6 +165,9 @@ private: int m_spriterambase; int m_pagewidth; int m_pageheight; + int m_bytespertile; + + uint8_t m_portdir[3]; void draw_tile(bitmap_ind16 &bitmap, const rectangle &cliprect, int gfxno, int tileno, int base, int palette, int flipx, int flipy, int xpos, int ypos, int transpen, int size); void handle_palette(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -308,9 +322,17 @@ void radica_eu3a14_state::draw_page(screen_device &screen, bitmap_ind16 &bitmap, int ydraw = ybase; int count = 0; - for (int i = m_tilerambase + pagesize * which; i < m_tilerambase + pagesize * (which + 1); i += 2) + for (int i = m_tilerambase + pagesize * which; i < m_tilerambase + pagesize * (which + 1); i += m_bytespertile) { - int tile = m_mainram[i + 0] | (m_mainram[i + 1] << 8); + int tile = 0; + if (m_bytespertile == 2) + { + tile = m_mainram[i + 0] | (m_mainram[i + 1] << 8); + } + else if (m_bytespertile == 4) // rad_foot hidden test mode, rad_hnt3 shooting range (not yet correct) + { + tile = m_mainram[i + 0] | (m_mainram[i + 1] << 8);// | (m_mainram[i + 2] << 16) | | (m_mainram[i + 3] << 24); + } draw_tile(bitmap, cliprect, gfxno, tile, base, 0, 0, 0, xdraw, ydraw, 0, size); @@ -331,7 +353,11 @@ void radica_eu3a14_state::draw_background(screen_device &screen, bitmap_ind16 &b int yscroll = m_scrollregs[2] | (m_scrollregs[3] << 8); int size; - // or 0x80? + + // m_tilecfg[0] b-as h-?? b = bytes per tile s = tilesize / page size? a = always set when tilemaps are in use - check? h = related to page positions, when set uses 2x2 pages? ? = used (3/0 in various places in football and some others) + // m_tilecfg[1] ---- ---? ? = used foot + // m_tilecfg[2] ---- -B-- B = 4bpp tiles + if (m_tilecfg[0] & 0x10) { size = 8; @@ -345,6 +371,15 @@ void radica_eu3a14_state::draw_background(screen_device &screen, bitmap_ind16 &b m_pageheight = 14; } + if (m_tilecfg[0] & 0x80) + { + m_bytespertile = 4; + } + else + { + m_bytespertile = 2; + } + // normal draw_page(screen, bitmap, cliprect, 0, 0 - xscroll, 0 - yscroll, size); @@ -497,6 +532,8 @@ void radica_eu3a14_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitm uint32_t radica_eu3a14_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + m_spriterambase = (m_spriteaddr[0] * 0x200) - 0x200; + bitmap.fill(0, cliprect); handle_palette(screen, bitmap, cliprect); @@ -575,6 +612,38 @@ READ8_MEMBER(radica_eu3a14_state::radicasi_pal_ntsc_r) return m_tvtype->read(); } +WRITE8_MEMBER(radica_eu3a14_state::porta_dir_w) +{ + m_portdir[0] = data; + // update state +} + +WRITE8_MEMBER(radica_eu3a14_state::portb_dir_w) +{ + m_portdir[1] = data; + // update state +} + +WRITE8_MEMBER(radica_eu3a14_state::portc_dir_w) +{ + m_portdir[2] = data; + // update state +} + +WRITE8_MEMBER(radica_eu3a14_state::porta_dat_w) +{ +} + +WRITE8_MEMBER(radica_eu3a14_state::portb_dat_w) +{ +} + +WRITE8_MEMBER(radica_eu3a14_state::portc_dat_w) +{ +} + + + void radica_eu3a14_state::bank_map(address_map &map) { map(0x000000, 0x3fffff).rom().region("maincpu", 0); @@ -588,8 +657,11 @@ void radica_eu3a14_state::radica_eu3a14_map(address_map &map) map(0x4800, 0x4bff).ram().share("palram"); // similar to eu3a05, at least for pal flags and rom banking + // 5001 write + // 5004 write + // 5006 write map(0x5007, 0x5007).noprw(); - map(0x5008, 0x5008).nopw(); // startup + map(0x5008, 0x5008).nopw(); // startup (read too) map(0x5009, 0x5009).r(FUNC(radica_eu3a14_state::radica_5009_unk_r)); // rad_hnt3 polls this on startup map(0x500a, 0x500a).nopw(); // startup map(0x500b, 0x500b).r(FUNC(radica_eu3a14_state::radicasi_pal_ntsc_r)).nopw(); // PAL / NTSC flag at least @@ -599,18 +671,23 @@ void radica_eu3a14_state::radica_eu3a14_map(address_map &map) // DMA is similar to, but not the same as eu3a05 map(0x500f, 0x5017).ram().share("dmaparams"); map(0x5018, 0x5018).rw(FUNC(radica_eu3a14_state::dma_trigger_r), FUNC(radica_eu3a14_state::dma_trigger_w)); + // 5019 - 46 on startup (hnt3) 22 (bb3, foot) na (gtg) 09 (rsg) + // 501a - 01 on startup (hnt3) 03 (bb3, foot) na (gtg) 02,01 (rsg) // probably GPIO like eu3a05, although it access 47/48 as unknown instead of 48/49/4a - map(0x5040, 0x5040).nopw(); - map(0x5041, 0x5041).portr("IN0"); - map(0x5042, 0x5042).nopw(); - map(0x5043, 0x5043).noprw(); - map(0x5044, 0x5044).nopw(); - map(0x5045, 0x5045).portr("IN1").nopw(); + map(0x5040, 0x5040).w(FUNC(radica_eu3a14_state::porta_dir_w)); + map(0x5041, 0x5041).portr("IN0").w(FUNC(radica_eu3a14_state::porta_dat_w)); + map(0x5042, 0x5042).w(FUNC(radica_eu3a14_state::portb_dir_w)); + map(0x5043, 0x5043).portr("IN1").w(FUNC(radica_eu3a14_state::portb_dat_w)); + map(0x5044, 0x5044).w(FUNC(radica_eu3a14_state::portc_dir_w)); + map(0x5045, 0x5045).portr("IN2").w(FUNC(radica_eu3a14_state::portc_dat_w)); + map(0x5046, 0x5046).nopw(); map(0x5047, 0x5047).nopw(); map(0x5048, 0x5048).nopw(); + // 5060 - 506e r/w during startup on foot + // sound appears to be the same as eu3a05 map(0x5080, 0x5091).rw("6ch_sound", FUNC(radica6502_sound_device::radicasi_sound_addr_r), FUNC(radica6502_sound_device::radicasi_sound_addr_w)); map(0x5092, 0x50a3).rw("6ch_sound", FUNC(radica6502_sound_device::radicasi_sound_size_r), FUNC(radica6502_sound_device::radicasi_sound_size_w)); @@ -619,19 +696,22 @@ void radica_eu3a14_state::radica_eu3a14_map(address_map &map) map(0x50a6, 0x50a6).nopw(); // startup map(0x50a7, 0x50a7).nopw(); // startup map(0x50a8, 0x50a8).r("6ch_sound", FUNC(radica6502_sound_device::radicasi_50a8_r)); - map(0x50a9, 0x50a9).nopw(); // startup + map(0x50a9, 0x50a9).nopw(); // startup, read foot // video regs are here this time map(0x5100, 0x5100).ram(); + map(0x5101, 0x5101).ram(); + map(0x5102, 0x5102).ram(); map(0x5103, 0x5106).ram(); map(0x5107, 0x5107).ram(); // on transitions, maybe layer disables? - map(0x5110, 0x5112).ram().share("tilecfg"); map(0x5113, 0x5113).ram(); // written with tilebase? map(0x5114, 0x5115).ram().share("tilebase"); map(0x5116, 0x5117).ram(); map(0x5121, 0x5124).ram().share("scrollregs"); - map(0x5150, 0x5150).ram(); // startup + + map(0x5140, 0x5140).ram(); + map(0x5150, 0x5150).ram().share("spriteaddr"); // startup 01 bb3,gtg,rsg, (na) foot 0c hnt3 map(0x5151, 0x5152).ram().share("spritebase"); map(0x5153, 0x5153).ram(); // startup @@ -691,6 +771,32 @@ static INPUT_PORTS_START( rad_gtg ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_START("IN1") + PORT_DIPNAME( 0x01, 0x01, "IN1" ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("IN2") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x08, 0x08, "Track Y test" ) // trackball up/down direction bit? (read in interrupt, increases / decreases a counter) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) @@ -748,6 +854,32 @@ static INPUT_PORTS_START( rad_rsg ) // base unit just has 4 directions + enter a PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("IN2") + PORT_DIPNAME( 0x01, 0x01, "IN2" ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("TV") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END @@ -807,6 +939,32 @@ static INPUT_PORTS_START( radica_foot ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("IN2") + PORT_DIPNAME( 0x01, 0x01, "IN2" ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("TV") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END @@ -823,7 +981,27 @@ static INPUT_PORTS_START( radica_hnt3 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) // pause? PORT_START("IN1") - PORT_DIPNAME( 0x01, 0x01, "IN1" ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Fire Gun") // maybe + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Safety") PORT_TOGGLE + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Fire Gun (alt)") // maybe + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("IN2") + PORT_DIPNAME( 0x01, 0x01, "IN2" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) @@ -902,6 +1080,32 @@ static INPUT_PORTS_START( radica_bb3 ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("IN2") + PORT_DIPNAME( 0x01, 0x01, "IN2" ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("TV") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END @@ -923,6 +1127,12 @@ void radica_eu3a14_state::machine_reset() m_maincpu->set_state_int(M6502_S, 0x1ff); m_bank->set_bank(0x01); + + m_portdir[0] = 0x00; + m_portdir[1] = 0x00; + m_portdir[2] = 0x00; + + m_spriteaddr[0] = 0x14; // ?? rad_foot never writes, other games seem to use it to se sprite location } @@ -1097,22 +1307,18 @@ void radica_eu3a14_state::init_rad_gtg() { // must be registers to control this m_tilerambase = 0x0a00 - 0x200; - m_spriterambase = 0x0220 - 0x200; } void radica_eu3a14_state::init_rad_foot() { // must be registers to control this m_tilerambase = 0x0200 - 0x200; - m_spriterambase = 0x2800 - 0x200; } - void radica_eu3a14_state::init_rad_hnt3() { // must be registers to control this m_tilerambase = 0x0200 - 0x200; - m_spriterambase = 0x1800 - 0x200; } diff --git a/src/mame/drivers/spg110.cpp b/src/mame/drivers/spg110.cpp index 3e865b52322..ce9a230aae4 100644 --- a/src/mame/drivers/spg110.cpp +++ b/src/mame/drivers/spg110.cpp @@ -70,7 +70,7 @@ void spg110_game_state::spg110_base(machine_config &config) // m_spg->add_route(ALL_OUTPUTS, "lspeaker", 0.5); // m_spg->add_route(ALL_OUTPUTS, "rspeaker", 0.5); - SPG110(config, m_spg, XTAL(27'000'000)); + SPG110(config, m_spg, XTAL(27'000'000), "maincpu"); } ROM_START( jak_capb ) diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp index e19ab6c1d64..674c2c7767a 100644 --- a/src/mame/drivers/vii.cpp +++ b/src/mame/drivers/vii.cpp @@ -969,7 +969,10 @@ ROM_START( jak_dora ) ROM_LOAD16_WORD_SWAP( "jakksdoragkr.bin", 0x000000, 0x200000, CRC(bcaa132d) SHA1(3894b980fbc4144731b2a7a94acebb29e30de67c) ) ROM_END - +ROM_START( jak_sdoo ) + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "jakksscoobydoogkr.bin", 0x000000, 0x400000, CRC(61062ce5) SHA1(9d21767fd855385ef83e4209c429ecd4bf7e5384) ) +ROM_END @@ -1165,11 +1168,11 @@ CONS( 2004, jak_batm, 0, 0, jakks, batman, spg2xx_game_state, empty_init, "JAKKS CONS( 2008, jak_wall, 0, 0, walle, walle, spg2xx_game_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Wall-E (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // 'Game-Key-Ready' JAKKS games (these can also take per-game specific expansion cartridges, although not all games had them released) -CONS( 2005, jak_wwe, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "WWE (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WW (no game-keys released) -CONS( 2005, jak_fan4, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Fantastic Four (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // F4 (no game-keys released) -CONS( 2005, jak_just, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Taniko", "Justice League (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DC (no game-keys released) -CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3+ released) -// Other Game-Key-Ready systems (not all releases of them?, only Sunplus SPG240 [Sunplus PAC300] versions?) +CONS( 2005, jak_wwe, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "WWE (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WW (no game-keys released) +CONS( 2005, jak_fan4, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Fantastic Four (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // F4 (no game-keys released) +CONS( 2005, jak_just, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Taniko", "Justice League (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DC (no game-keys released) +CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3+ released) +CONS( 2005, jak_sdoo, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Jolliford Management","Scooby-Doo! and the Mystery of the Castle (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // SD (no game-keys released) // Nicktoons NK (3? keys available) (same keys as Dora the Explorer) // SpongeBob SquarePants: The Fry Cook Games NK (3? keys available) ^^ // Namco Ms. Pac-Man NM (3 keys available [Dig Dug, New Rally-X], [Rally-X, Pac-Man, Bosconian], [Pac-Man, Bosconian]) @@ -1177,10 +1180,10 @@ CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr,jakks_gkr_state, empty_init, " // Disney DY (3? keys available) // Disney Princess DP (? keys available) // Spider-Man MV (1? key available) + // no keys released for the following, some were in development but cancelled // Dragon Ball Z DB (no game-keys released) // Capcom 3-in-1 CC (no game-keys released) -// Scooby-Doo SD (no game-keys released) // Care Bears CB (no game-keys released) // Wheel of Fortune WF (no game-keys released) // Winnie the Pooh WP (no game-keys released) diff --git a/src/mame/drivers/xavix.cpp b/src/mame/drivers/xavix.cpp index 24b4cd6caf6..cec21133f67 100644 --- a/src/mame/drivers/xavix.cpp +++ b/src/mame/drivers/xavix.cpp @@ -1307,6 +1307,11 @@ ROM_START( epo_efdx ) ROM_LOAD("excitefishing.bin", 0x000000, 0x400000, CRC(9c85b261) SHA1(6a363faed2ec89c5176e46554a98ca1e20132579) ) ROM_END +ROM_START( epo_epp ) + ROM_REGION(0x100000, "bios", ROMREGION_ERASE00) + ROM_LOAD("excitepingpong.bin", 0x000000, 0x100000, CRC(1fdb9cbd) SHA1(8ed0c1f6d2708ab6e79f0b9553e587c6446e8338) ) +ROM_END + ROM_START( epo_guru ) ROM_REGION(0x400000, "bios", ROMREGION_ERASE00) ROM_LOAD("gururinworld.bin", 0x000000, 0x400000, CRC(e5ae4523) SHA1(0e39ef8f94203d34e49422081667805f50a339a1) ) @@ -1418,6 +1423,9 @@ CONS( 200?, rad_fb, 0, 0, xavix_madfb, rad_fb, xavix_madfb_s CONS( 200?, rad_rh, 0, 0, xavix, rad_rh, xavix_state, init_xavix, "Radica / Fisher-Price / SSD Company LTD", "Play TV Rescue Heroes (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2000, epo_epp, 0, 0, xavix, epo_efdx, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Excite Ping Pong (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +// Excite Ping Pong 2 is from 2003, and there's a 3rd game from 2006 also + CONS( 200?, epo_efdx, 0, 0, xavix_i2c_24c08, epo_efdx, xavix_i2c_state, init_epo_efdx, "Epoch / SSD Company LTD", "Excite Fishing DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2005, epo_guru, 0, 0, xavix, xavix, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Gururin World (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) @@ -1491,4 +1499,11 @@ ROM_START( xavtenni ) ROM_LOAD( "xavixtennis.bin", 0x000000, 0x800000, CRC(23a1d918) SHA1(2241c59e8ea8328013e55952ebf9060ea0a4675b) ) ROM_END +ROM_START( xavbaseb ) + ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) + ROM_LOAD( "xpbaseball.bin", 0x000000, 0x800000, CRC(e9ed692d) SHA1(537e390e972156dc7da66ee127ae4c8052038ee5) ) +ROM_END + CONS( 2004, xavtenni, 0, 0, xavix2000_i2c_24c04, xavix, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +CONS( 2004, xavbaseb, 0, 0, xavix2000_i2c_24c04, xavix, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Baseball (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 23bb1e8d478..43f9b31fba2 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -38568,6 +38568,7 @@ jak_wwe // jak_fan4 // jak_just // jak_dora // +jak_sdoo // vii // KenSingTon / Jungle Soft / Siatronics Vii wrlshunt // Wireless: Hunting Video Game System wirels60 // Wireless 60 @@ -39725,6 +39726,7 @@ rad_snow // rad_snowp // rad_madf // rad_fb // +epo_epp // epo_efdx // epo_sdb // epo_guru // @@ -39738,6 +39740,7 @@ ddrfammt // popira // taikodp // xavtenni // +xavbaseb // ttv_sw // ttv_lotr // ttv_mx // diff --git a/src/mame/video/xavix.cpp b/src/mame/video/xavix.cpp index 89571158df1..2613683e49c 100644 --- a/src/mame/video/xavix.cpp +++ b/src/mame/video/xavix.cpp @@ -785,26 +785,49 @@ uint32_t xavix_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, // temp, needs priority, transparency etc. also it's far bigger than the screen, I guess it must get scaled?! if (m_bmp_base) { - if (m_bmp_base[0x14] & 0x01) - { - popmessage("bitmap %02x %02x %02x %02x %02x %02x %02x %02x -- -- %02x %02x %02x %02x %02x %02x -- -- %02x %02x %02x %02x %02x %02x", - m_bmp_base[0x00], m_bmp_base[0x01], m_bmp_base[0x02], m_bmp_base[0x03], m_bmp_base[0x04], m_bmp_base[0x05], m_bmp_base[0x06], m_bmp_base[0x07], - /*m_bmp_base[0x08], m_bmp_base[0x09],*/ m_bmp_base[0x0a], m_bmp_base[0x0b], m_bmp_base[0x0c], m_bmp_base[0x0d], m_bmp_base[0x0e], m_bmp_base[0x0f], - /*m_bmp_base[0x10], m_bmp_base[0x11],*/ m_bmp_base[0x12], m_bmp_base[0x13], m_bmp_base[0x14], m_bmp_base[0x15], m_bmp_base[0x16], m_bmp_base[0x17]); + // looks like it can zoom the bitmap using these? + uint16_t top = ((m_bmp_base[0x01] << 8) | m_bmp_base[0x00]); + uint16_t bot = ((m_bmp_base[0x03] << 8) | m_bmp_base[0x02]); + uint16_t lft = ((m_bmp_base[0x05] << 8) | m_bmp_base[0x04]); + uint16_t rgt = ((m_bmp_base[0x07] << 8) | m_bmp_base[0x06]); - int base = ((m_bmp_base[0x11] << 8) | m_bmp_base[0x10]) * 0x800; - int base2 = ((m_bmp_base[0x09] << 8) | m_bmp_base[0x08]) * 0x8; + // and can specify base address relative start / end positions with these for data reading to be cut off? + uint16_t topadr = ((m_bmp_base[0x09] << 8) | m_bmp_base[0x08]); + uint16_t botadr = ((m_bmp_base[0x0b] << 8) | m_bmp_base[0x0a]); + uint16_t lftadr = ((m_bmp_base[0x0d] << 8) | m_bmp_base[0x0c]); + uint16_t rgtadr = ((m_bmp_base[0x0f] << 8) | m_bmp_base[0x0e]); + + uint16_t start = ((m_bmp_base[0x11] << 8) | m_bmp_base[0x10]); + uint8_t end = m_bmp_base[0x12]; // ?? related to width? + uint8_t size = m_bmp_base[0x13]; // some kind of additional scaling? + uint8_t mode = m_bmp_base[0x14]; // eanble,bpp, zval etc. + + uint32_t unused = ((m_bmp_base[0x15] << 16) | (m_bmp_base[0x16] << 8) | (m_bmp_base[0x17] << 0)); + + if (mode & 0x01) + { + popmessage("bitmap t:%04x b:%04x l:%04x r:%04x -- -- ba:%04x la:%04x ra:%04x -- -- end:%02x - size:%02x unused:%08x", + top, bot, lft, rgt, + /*topadr*/ botadr, lftadr, rgtadr, + /*start*/ end, size, unused); + + int base = start * 0x800; + int base2 = topadr * 0x8; + + int bpp = ((mode & 0x0e) >> 1) + 1; + int zval = ((mode & 0xf0) >> 4); + + int width = (rgtadr * 8) / bpp; //int count = 0; set_data_address(base + base2, 0); - for (int y = 0; y < 256; y++) + for (int y = top; y < 256; y++) { - for (int x = 0; x < 512; x++) + for (int x = 0; x < width; x++) { uint16_t* yposptr = &bitmap.pix16(y); - - int bpp = 6; + uint16_t* zyposptr = &m_zbuffer.pix16(y); uint8_t dat = 0; for (int i = 0; i < bpp; i++) @@ -812,8 +835,17 @@ uint32_t xavix_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, dat |= (get_next_bit() << i); } - if (x < cliprect.max_x) - yposptr[x] = dat + 0x100; + if (((x <= cliprect.max_x) && (x >= cliprect.min_x)) && ((y <= cliprect.max_y) && (y >= cliprect.min_y))) + { + if ((m_bmp_palram_sh[dat] & 0x1f) < 24) // same transparency logic as everything else? (baseball title) + { + if (zval >= zyposptr[x]) + { + yposptr[x] = dat + 0x100; + zyposptr[x] = zval; + } + } + } } }