Plug and Play work (#6330)

* split story reader dumps by glob [Sean Riddle]

* new NOT WORKING software list entry
---
pi_storyreader_cart.xml : Scooby Doo - Miniature Golf Mystery / Museum Mystery / Haunted Theater [Porchy]

* new NOT WORKING software list entries
---
mobigo_cart.xml [Sean Riddle]
Tangled
Toy Story 3
Mickey Mouse

* some sunplus refactoring, including removal of rowscroll offset hack, fixing some problematic cases where different games in a multigame required different values

* comment (nw)

* these work (nw)

* (nw)

* (nw)
This commit is contained in:
David Haywood 2020-02-19 20:16:27 +00:00 committed by GitHub
parent 6b7ead8d5d
commit f436f6edc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 200 additions and 86 deletions

View File

@ -147,6 +147,39 @@
</part>
</software>
<software name="tstory3a" supported="no"> <!-- part #? full title? region? -->
<description>Toy Story 3</description>
<year>201?</year>
<publisher>VTech</publisher>
<part name="cart" interface="mobigo_cart">
<dataarea name="rom" size="0x1000000">
<rom name="mobigotoystory3.bin" size="0x1000000" crc="bf7bc6e1" sha1="cc86160f29848d6620923cffd0f740a593ba2d94"/>
</dataarea>
</part>
</software>
<software name="mickey" supported="no"> <!-- part #? full title? region? -->
<description>Mickey Mouse</description>
<year>201?</year>
<publisher>VTech</publisher>
<part name="cart" interface="mobigo_cart">
<dataarea name="rom" size="0x1000000">
<rom name="mobigomickey.bin" size="0x1000000" crc="51671cd0" sha1="73a2d1a0a8701d3a5daaa98972af545b4b448bf2"/>
</dataarea>
</part>
</software>
<software name="tangled" supported="no"> <!-- part #? full title? region? -->
<description>Tangled</description>
<year>201?</year>
<publisher>VTech</publisher>
<part name="cart" interface="mobigo_cart">
<dataarea name="rom" size="0x1000000">
<rom name="mobigotangled.bin" size="0x1000000" crc="8883ecf6" sha1="b51cff0333644e758a4cc7ef26b2365e9a58877c"/>
</dataarea>
</part>
</software>
<!-- this is from a special large scale Kiosk unit, which should also have a unique BIOS. Maybe move into driver as a hardcodd cart once BIOS is dumped rather than having it here? -->
<software name="kiosk" supported="no">

View File

@ -2,13 +2,16 @@
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
<softwarelist name="pi_storyreader_cart" description="Publications International Ltd. Story Reader cartridges">
<!-- carts have either one or two globs in them -->
<software name="srbamltpetp3" supported="no">
<description>Disney's Bambi / Lady and the Tramp / Peter Pan</description>
<year>200?</year>
<publisher>Publications International Ltd. / Disney</publisher>
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x200000">
<rom name="storyreaderv1_bambiladyandthetramppeterpan.bin" size="0x200000" crc="68e5c946" sha1="34cce52e203223e6d306a8a568094ea543968ca2" />
<rom name="storyreaderv1_bambiladyandthetramppeterpan.1.bin" offset="0x000000" size="0x100000" crc="954b3315" sha1="37d104bb67cd02a5a86c3653adc2df955bb11f11" />
<rom name="storyreaderv1_bambiladyandthetramppeterpan.2.bin" offset="0x100000" size="0x100000" crc="ebba94f6" sha1="b9bca7225e174eea19f95a7bd84a0226bff327f8" />
</dataarea>
</part>
</software>
@ -20,7 +23,8 @@
<info name="serial" value="30473" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_barneycaresbestmannersshowletsworktogether.bin" size="0x400000" crc="89e6df6a" sha1="f5d598c7f695f4f7e09060c05e58ba14bf8f805c" />
<rom name="storyreaderv1_barneycaresbestmannersshowletsworktogether.1.bin" offset="0x000000" size="0x200000" crc="5fffe4ec" sha1="b4bc4a19bd1df16d41c134fca902f3e7c729d26a" />
<rom name="storyreaderv1_barneycaresbestmannersshowletsworktogether.2.bin" offset="0x200000" size="0x100000" crc="2a80e6e7" sha1="fcd9903c6a55101ab64ab0d1f74ba2dfb62bcd37" />
</dataarea>
</part>
</software>
@ -44,7 +48,8 @@
<info name="serial" value="62823" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_carsincrediblesmonstersinc.bin" size="0x400000" crc="88ba4b2b" sha1="f30d95476d120b1fca1b8fc9004baf7951f7cb67" />
<rom name="storyreaderv1_carsincrediblesmonstersinc.1.bin" offset="0x000000" size="0x200000" crc="c12a2cd9" sha1="35032bd6b494cf082f1227b8c24bd0297aff53a6" />
<rom name="storyreaderv1_carsincrediblesmonstersinc.2.bin" offset="0x200000" size="0x100000" crc="5251f391" sha1="857e41f0bde573a0a9a2ff218e5019f2fefae4ce" />
</dataarea>
</part>
</software>
@ -68,7 +73,8 @@
<info name="serial" value="33618" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_dorasgardenadventuregingerbreadboydorasartadventure.bin" size="0x400000" crc="891472a9" sha1="cdc78012a41283032fabe4977e37b330be50d320" />
<rom name="storyreaderv1_dorasgardenadventuregingerbreadboydorasartadventure.1.bin" offset="0x000000" size="0x200000" crc="8840f754" sha1="1d0270db79dc0a92fcce494cc14dcad9cb7194a4" />
<rom name="storyreaderv1_dorasgardenadventuregingerbreadboydorasartadventure.2.bin" offset="0x200000" size="0x100000" crc="29bb4c9b" sha1="b82cce833dcafc2e17952d79e09a875636c7e7bb" />
</dataarea>
</part>
</software>
@ -126,7 +132,8 @@
<info name="serial" value="06238" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_peterrabbitjemimapuddleducktomkitten.bin" size="0x400000" crc="1eb175a8" sha1="1ead97956e5d2866dbfe9878ff48522fac8818f9" />
<rom name="storyreaderv1_peterrabbitjemimapuddleducktomkitten.1.bin" offset="0x000000" size="0x200000" crc="e8859dd3" sha1="69304c73a8d4fd9fe6cd4fc37209372e294c0ad8" />
<rom name="storyreaderv1_peterrabbitjemimapuddleducktomkitten.2.bin" offset="0x200000" size="0x100000" crc="64d50d09" sha1="c842df62fe0767768da1a314f47c091737a12738" />
</dataarea>
</part>
</software>
@ -137,7 +144,8 @@
<publisher>Publications International Ltd. / Disney</publisher>
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x200000">
<rom name="storyreaderv1_pinocchiotoystory2junglebook.bin" size="0x200000" crc="3530ac76" sha1="4722dac345f754ea72d1de082f8f9f401a0b1975" />
<rom name="storyreaderv1_pinocchiotoystory2junglebook.1.bin" offset="0x000000" size="0x100000" crc="d5529c3a" sha1="af4ca3595169852dad1ddbb68506b830197c4069" />
<rom name="storyreaderv1_pinocchiotoystory2junglebook.2.bin" offset="0x100000" size="0x100000" crc="ec7cb5f1" sha1="70a51e2cb905e261cabc7429bcddb59f2276c1bf" />
</dataarea>
</part>
</software>
@ -173,7 +181,8 @@
<info name="serial" value="67224" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_jasminemulanpocahontas.bin" size="0x400000" crc="d0c4b8d9" sha1="affe7f6f13be2e391a430fd602b0069f095bd2fa" />
<rom name="storyreaderv1_jasminemulanpocahontas.1.bin" offset="0x000000" size="0x200000" crc="dad388cb" sha1="d92a6e66a38cf21ee41a644ae0849c959dcd7847" />
<rom name="storyreaderv1_jasminemulanpocahontas.2.bin" offset="0x200000" size="0x100000" crc="d8f3bb4f" sha1="6980bae41faac9e3d0412ab88cf72ad817e0b7e8" />
</dataarea>
</part>
</software>
@ -184,7 +193,8 @@
<publisher>Publications International Ltd. / Disney</publisher>
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x200000">
<rom name="storyreaderv1_littlemermaidsnowwhitebeautyandthebeast.bin" size="0x200000" crc="3c1623da" sha1="a7b6b7a251aa6d53b47f599ea57663aa096f5206" />
<rom name="storyreaderv1_littlemermaidsnowwhitebeautyandthebeast.1.bin" offset="0x000000" size="0x100000" crc="dd96327b" sha1="fd9213696760b049fadf8e0157cd0692e0c6fb95" />
<rom name="storyreaderv1_littlemermaidsnowwhitebeautyandthebeast.2.bin" offset="0x100000" size="0x100000" crc="628c816d" sha1="fd2b13189ee3ecc8f9a335fffcd9f50b5b98cac9" />
</dataarea>
</part>
</software>
@ -208,7 +218,8 @@
<info name="serial" value="30481" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_elmoscolorfuladventuregroverstaysupverylatemelovecookies.bin" size="0x400000" crc="54bc8b1f" sha1="f11d90fd2ff032b6a93e50d61e471005fe0c8710" />
<rom name="storyreaderv1_elmoscolorfuladventuregroverstaysupverylatemelovecookies.1.bin" offset="0x000000" size="0x200000" crc="31cc421a" sha1="751aa570612782577249685765ccf7fe608e0cb6" />
<rom name="storyreaderv1_elmoscolorfuladventuregroverstaysupverylatemelovecookies.2.bin" offset="0x200000" size="0x100000" crc="73eaba54" sha1="2726b6711a6a2d8f2eaead5f9f1ef556ba8e3892" />
</dataarea>
</part>
</software>
@ -232,7 +243,8 @@
<info name="serial" value="30376" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_grandprizewinnerdorasgardenadventurebluesperfectpicnicspot.bin" size="0x400000" crc="1ea36f2f" sha1="bb63e6988b629f531fca081d3f5c611a8ba3cca0" />
<rom name="storyreaderv1_grandprizewinnerdorasgardenadventurebluesperfectpicnicspot.1.bin" offset="0x000000" size="0x200000" crc="a2c1648d" sha1="4dedde521cc8862fd93b441df330f92968eadd19" />
<rom name="storyreaderv1_grandprizewinnerdorasgardenadventurebluesperfectpicnicspot.2.bin" offset="0x200000" size="0x100000" crc="f59b9ba9" sha1="545c6db2fa4ba2ab1269a7788d1f2f5c4037bf6e" />
</dataarea>
</part>
</software>
@ -244,7 +256,8 @@
<info name="serial" value="84009" />
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="storyreaderv1_cheerupcrankythebigracecarnivalcapers.bin" size="0x400000" crc="4ddcadbc" sha1="78e8ee67da04111c17039bbbcbfc665ec2729372" />
<rom name="storyreaderv1_cheerupcrankythebigracecarnivalcapers.1.bin" offset="0x000000" size="0x200000" crc="9d58dc21" sha1="2f77e9b850749a1e0975edfdee1eb6ff0c8dc66d" />
<rom name="storyreaderv1_cheerupcrankythebigracecarnivalcapers.2.bin" offset="0x200000" size="0x100000" crc="2bd1adaf" sha1="21082583d720a3c432a32080f0eed3e5da47ae4e" />
</dataarea>
</part>
</software>
@ -260,4 +273,16 @@
</part>
</software>
<software name="srscooby" supported="no">
<description>Scooby Doo - Miniature Golf Mystery / Museum Mystery / Haunted Theater</description>
<year>200?</year>
<publisher>Publications International Ltd.</publisher>
<part name="cart" interface="pi_storyreader_cart">
<dataarea name="rom" size="0x400000">
<rom name="srscooby.1.bin" offset="0x000000" size="0x200000" crc="13b5a30a" sha1="294c9a7c2afa81fc038feaf2f89a36f8b2c9b0c6" />
<rom name="srscooby.2.bin" offset="0x200000" size="0x100000" crc="e8b9214e" sha1="7ca6b5ca2726904990f5987397a768926117fa09" />
</dataarea>
</part>
</software>
</softwarelist>

View File

@ -14,8 +14,9 @@
#include "emu.h"
#include "spg2xx.h"
DEFINE_DEVICE_TYPE(SPG24X, spg24x_device, "spg24x", "SPG240-series System-on-a-Chip")
DEFINE_DEVICE_TYPE(SPG28X, spg28x_device, "spg28x", "SPG280-series System-on-a-Chip")
DEFINE_DEVICE_TYPE(SPG24X, spg24x_device, "spg24x", "SPG240-series System-on-a-Chip") // 256 sprites
DEFINE_DEVICE_TYPE(SPG2XX_128, spg2xx_128_device, "spg2xx_128", "SPG2xx-series System-on-a-Chip (128 sprites)") // exact SPG part number unknown
DEFINE_DEVICE_TYPE(SPG28X, spg28x_device, "spg28x", "SPG280-series System-on-a-Chip") // 64 sprites
spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) :
@ -26,7 +27,6 @@ spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, co
m_spg_sysdma(*this, "spgsysdma"),
m_spg_video(*this, "spgvideo"),
m_sprite_limit(sprite_limit),
m_rowscrolloffset(15),
m_porta_out(*this),
m_portb_out(*this),
m_portc_out(*this),
@ -50,8 +50,19 @@ spg24x_device::spg24x_device(const machine_config &mconfig, const char *tag, dev
{
}
spg24x_device::spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) :
spg2xx_device(mconfig, type, tag, owner, clock, sprite_limit, internal)
{
}
spg2xx_128_device::spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
spg24x_device(mconfig, SPG2XX_128, tag, owner, clock, 128, address_map_constructor(FUNC(spg2xx_128_device::internal_map), this))
{
}
spg28x_device::spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
spg2xx_device(mconfig, SPG28X, tag, owner, clock, 64, address_map_constructor(FUNC(spg28x_device::internal_map), this))
spg24x_device(mconfig, SPG28X, tag, owner, clock, 64, address_map_constructor(FUNC(spg28x_device::internal_map), this))
{
}
@ -77,6 +88,7 @@ void spg2xx_device::device_start()
m_porta_out.resolve_safe();
m_portb_out.resolve_safe();
m_portc_out.resolve_safe();
m_portc_out.resolve_safe();
m_porta_in.resolve_safe(0);
m_portb_in.resolve_safe(0);
m_portc_in.resolve_safe(0);
@ -203,31 +215,7 @@ void spg24x_device::device_add_mconfig(machine_config &config)
SPG24X_VIDEO(config, m_spg_video, DERIVED_CLOCK(1, 1), DEVICE_SELF, m_screen);
m_spg_video->sprlimit_read_callback().set(FUNC(spg24x_device::get_sprlimit));
m_spg_video->rowscrolloffset_read_callback().set(FUNC(spg24x_device::get_rowscrolloffset));
m_spg_video->write_video_irq_callback().set(FUNC(spg24x_device::videoirq_w));
configure_spg_io(m_spg_io);
}
void spg28x_device::device_add_mconfig(machine_config &config)
{
SPG2XX_AUDIO(config, m_spg_audio, DERIVED_CLOCK(1, 1));
m_spg_audio->write_irq_callback().set(FUNC(spg28x_device::audioirq_w));
m_spg_audio->channel_irq_callback().set(FUNC(spg28x_device::audiochirq_w));
m_spg_audio->space_read_callback().set(FUNC(spg28x_device::space_r));
m_spg_audio->add_route(0, *this, 1.0, AUTO_ALLOC_INPUT, 0);
m_spg_audio->add_route(1, *this, 1.0, AUTO_ALLOC_INPUT, 1);
SPG28X_IO(config, m_spg_io, DERIVED_CLOCK(1, 1), DEVICE_SELF, m_screen);
SPG2XX_SYSDMA(config, m_spg_sysdma, DERIVED_CLOCK(1, 1), DEVICE_SELF);
SPG24X_VIDEO(config, m_spg_video, DERIVED_CLOCK(1, 1), DEVICE_SELF, m_screen);
m_spg_video->sprlimit_read_callback().set(FUNC(spg28x_device::get_sprlimit));
m_spg_video->rowscrolloffset_read_callback().set(FUNC(spg28x_device::get_rowscrolloffset));
m_spg_video->write_video_irq_callback().set(FUNC(spg28x_device::videoirq_w));
configure_spg_io(m_spg_io);
}

View File

@ -44,7 +44,6 @@ class spg2xx_device : public unsp_device, public device_mixer_interface
{
public:
void set_pal(bool pal) { m_pal_flag = pal ? 1 : 0; }
void set_rowscroll_offset(int offset) { m_rowscrolloffset = offset; }
auto porta_out() { return m_porta_out.bind(); }
auto portb_out() { return m_portb_out.bind(); }
@ -100,10 +99,8 @@ protected:
// TODO: these are fixed values, put them in relevant devices?
uint16_t m_sprite_limit;
uint16_t m_rowscrolloffset; // auto racing in 'zone60' minigames needs this to be 15, the JAKKS games (Star Wars Revenge of the sith - Gunship Battle, Wheel of Fortune, Namco Ms. Pac-Man 5-in-1 Pole Position) need it to be 0, where does it come from?
uint16_t m_pal_flag;
DECLARE_READ16_MEMBER(get_sprlimit) { return m_sprite_limit; }
DECLARE_READ16_MEMBER(get_rowscrolloffset) { return m_rowscrolloffset; }
DECLARE_READ16_MEMBER(get_pal_ntsc) { return m_pal_flag; }
devcb_write16 m_porta_out;
@ -162,13 +159,28 @@ public:
m_screen.set_tag(std::forward<T>(screen_tag));
}
spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal);
spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void device_add_mconfig(machine_config &config) override;
};
class spg28x_device : public spg2xx_device
class spg2xx_128_device : public spg24x_device
{
public:
template <typename T>
spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag)
: spg2xx_128_device(mconfig, tag, owner, clock)
{
m_screen.set_tag(std::forward<T>(screen_tag));
}
spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class spg28x_device : public spg24x_device
{
public:
template <typename T>
@ -180,10 +192,9 @@ public:
spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void device_add_mconfig(machine_config &config) override;
};
DECLARE_DEVICE_TYPE(SPG2XX_128, spg2xx_128_device)
DECLARE_DEVICE_TYPE(SPG24X, spg24x_device)
DECLARE_DEVICE_TYPE(SPG28X, spg28x_device)

View File

@ -33,7 +33,6 @@ spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_t
m_guny_in(*this),
m_gunx_in(*this),
m_sprlimit_read_cb(*this),
m_rowscrolloffset_read_cb(*this),
m_cpu(*this, finder_base::DUMMY_TAG),
m_screen(*this, finder_base::DUMMY_TAG),
m_scrollram(*this, "scrollram"),
@ -78,7 +77,6 @@ void spg2xx_video_device::device_start()
save_item(NAME(m_video_regs));
m_sprlimit_read_cb.resolve_safe(0);
m_rowscrolloffset_read_cb.resolve_safe(0);
m_video_irq_cb.resolve();
}
@ -113,7 +111,7 @@ inline uint8_t spg2xx_video_device::mix_channel(uint8_t bottom, uint8_t top)
}
template<spg2xx_video_device::blend_enable_t Blend, spg2xx_video_device::rowscroll_enable_t RowScroll, spg2xx_video_device::flipx_t FlipX>
void spg2xx_video_device::draw(const rectangle &cliprect, uint32_t line, uint32_t xoff, uint32_t yoff, uint32_t bitmap_addr, uint16_t tile, int32_t h, int32_t w, uint8_t bpp, uint32_t yflipmask, uint32_t palette_offset)
void spg2xx_video_device::draw(const rectangle &cliprect, uint32_t line, uint32_t xoff, uint32_t yoff, uint32_t bitmap_addr, uint16_t tile, int32_t h, int32_t w, uint8_t bpp, uint32_t yflipmask, uint32_t palette_offset, int yscroll)
{
address_space &space = m_cpu->space(AS_PROGRAM);
@ -174,7 +172,9 @@ void spg2xx_video_device::draw(const rectangle &cliprect, uint32_t line, uint32_
bits &= 0xffff;
if (RowScroll)
xx -= (int16_t)m_scrollram[(yy + m_rowscrolloffset_read_cb()) & 0x1ff];
{
xx -= (int16_t)m_scrollram[(yy + yscroll) & 0xff];
}
xx &= 0x01ff;
if (xx >= 0x01c0)
@ -355,16 +355,16 @@ void spg2xx_video_device::draw_page(const rectangle &cliprect, uint32_t scanline
if (row_scroll)
{
if (flip_x)
draw<BlendOn, RowScrollOn, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOn, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
else
draw<BlendOn, RowScrollOn, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOn, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
}
else
{
if (flip_x)
draw<BlendOn, RowScrollOff, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOff, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
else
draw<BlendOn, RowScrollOff, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOff, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
}
}
else
@ -372,16 +372,16 @@ void spg2xx_video_device::draw_page(const rectangle &cliprect, uint32_t scanline
if (row_scroll)
{
if (flip_x)
draw<BlendOff, RowScrollOn, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOn, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
else
draw<BlendOff, RowScrollOn, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOn, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
}
else
{
if (flip_x)
draw<BlendOff, RowScrollOff, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOff, FlipXOn>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
else
draw<BlendOff, RowScrollOff, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOff, FlipXOff>(cliprect, tile_scanline, xx, yy, bitmap_addr, tile, tile_h, tile_w, bpp, yflipmask, palette_offset, yscroll);
}
}
}
@ -441,32 +441,32 @@ void spg2xx_video_device::draw_sprite(const rectangle &cliprect, uint32_t scanli
if (blend)
{
if (flip_x)
draw<BlendOn, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
else
draw<BlendOn, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
}
else
{
if (flip_x)
draw<BlendOff, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
else
draw<BlendOff, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
}
m_debug_blit = false;
#else
if (blend)
{
if (flip_x)
draw<BlendOn, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
else
draw<BlendOn, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOn, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
}
else
{
if (flip_x)
draw<BlendOff, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOff, FlipXOn>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
else
draw<BlendOff, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset);
draw<BlendOff, RowScrollOff, FlipXOff>(cliprect, tile_line, x, y, bitmap_addr, tile, h, w, bpp, yflipmask, palette_offset, 0);
}
#endif
}

View File

@ -30,7 +30,6 @@ public:
DECLARE_WRITE16_MEMBER(video_w);
auto sprlimit_read_callback() { return m_sprlimit_read_cb.bind(); };
auto rowscrolloffset_read_callback() { return m_rowscrolloffset_read_cb.bind(); };
auto write_video_irq_callback() { return m_video_irq_cb.bind(); };
@ -90,7 +89,7 @@ protected:
void apply_fade(const rectangle &cliprect);
template<blend_enable_t Blend, rowscroll_enable_t RowScroll, flipx_t FlipX>
void draw(const rectangle &cliprect, uint32_t line, uint32_t xoff, uint32_t yoff, uint32_t bitmap_addr, uint16_t tile, int32_t h, int32_t w, uint8_t bpp, uint32_t yflipmask, uint32_t palette_offset);
void draw(const rectangle &cliprect, uint32_t line, uint32_t xoff, uint32_t yoff, uint32_t bitmap_addr, uint16_t tile, int32_t h, int32_t w, uint8_t bpp, uint32_t yflipmask, uint32_t palette_offset, int yscroll);
void draw_bitmap(const rectangle& cliprect, uint32_t scanline, int priority, uint32_t bitmap_addr, uint16_t* regs);
void draw_page(const rectangle &cliprect, uint32_t scanline, int priority, uint32_t bitmap_addr, uint16_t *regs);
void draw_sprite(const rectangle &cliprect, uint32_t scanline, int priority, uint32_t base_addr);
@ -113,7 +112,6 @@ protected:
uint16_t m_video_regs[0x100];
devcb_read16 m_sprlimit_read_cb;
devcb_read16 m_rowscrolloffset_read_cb;
emu_timer *m_screenpos_timer;

View File

@ -788,6 +788,33 @@ static INPUT_PORTS_START( pballpup )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( swclone ) // TODO
PORT_START("GUNY")
PORT_BIT(0x0ff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 256.0f / 240.0f, 0.0, 0) PORT_MINMAX(0x000, 0x0ff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
PORT_START("GUNX")
PORT_BIT(0x1ff, 0x100, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 512.0f / 320.0f, -0.03f, 0) PORT_MINMAX(0x000, 0x1ff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
PORT_START("P1")
PORT_BIT( 0x003f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P2")
PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P3")
PORT_BIT( 0x000f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON4 ) // pause
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // trigger
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // hide
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON3 ) // reload
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( tmntmutm )
PORT_START("GUNY")
PORT_BIT(0x0ff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 256.0f / 240.0f, 0.0, 0) PORT_MINMAX(0x000, 0x0ff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
@ -1034,8 +1061,6 @@ void spg2xx_game_state::abltenni(machine_config &config)
m_maincpu->porta_in().set_ioport("P1");
m_maincpu->portb_in().set_ioport("P2");
m_maincpu->portc_in().set_ioport("P3");
m_maincpu->set_rowscroll_offset(8);
}
void spg2xx_game_state::guitarfv(machine_config &config)
@ -1123,6 +1148,28 @@ void spg2xx_game_pballpup_state::pballpup(machine_config &config)
EEPROM_93C66_16BIT(config, m_eeprom); // type?
}
void spg2xx_game_swclone_state::swclone(machine_config &config)
{
SPG2XX_128(config, m_maincpu, XTAL(27'000'000), m_screen);
m_maincpu->set_addrmap(AS_PROGRAM, &spg2xx_game_swclone_state::mem_map_4m);
spg2xx_base(config);
m_maincpu->porta_in().set(FUNC(spg2xx_game_swclone_state::base_porta_r));
m_maincpu->portb_in().set(FUNC(spg2xx_game_swclone_state::base_portb_r));
m_maincpu->portc_in().set(FUNC(spg2xx_game_swclone_state::base_portc_r));
m_maincpu->porta_out().set(FUNC(spg2xx_game_swclone_state::porta_w));
m_maincpu->portb_out().set(FUNC(spg2xx_game_swclone_state::portb_w));
m_maincpu->portc_out().set(FUNC(spg2xx_game_swclone_state::portc_w));
m_maincpu->guny_in().set(FUNC(spg2xx_game_swclone_state::base_guny_r));
m_maincpu->gunx_in().set(FUNC(spg2xx_game_swclone_state::base_gunx_r));
I2C_24C08(config, "i2cmem", 0);
}
READ16_MEMBER(spg2xx_game_dreamlss_state::porta_r)
{
@ -1180,7 +1227,7 @@ void spg2xx_game_dreamlss_state::dreamlss(machine_config &config)
m_maincpu->portb_out().set(FUNC(spg2xx_game_dreamlss_state::portb_w));
m_maincpu->portc_out().set(FUNC(spg2xx_game_dreamlss_state::portc_w));
I2C_24C08(config, "i2cmem", 0); // 24LC08
I2C_24C08(config, "i2cmem", 0);
}
@ -1302,6 +1349,9 @@ ROM_END
ROM_START( pballpup )
ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD16_WORD_SWAP( "paintballpoweredup.bin", 0x000000, 0x1000000, CRC(57dbdfd1) SHA1(d98cb7321cc7af092f6f4f83e85fabbdbc1bbd95) )
ROM_REGION16_BE( 0x200, "eeprom", ROMREGION_ERASE00 )
// ensure eeprom defaults to 00 or there are unwanted invalid entries already saved
ROM_END
ROM_START( dreamlss )
@ -1309,8 +1359,6 @@ ROM_START( dreamlss )
ROM_LOAD16_WORD_SWAP( "dreamlifesuperstar.bin", 0x000000, 0x1000000, CRC(aefad2c3) SHA1(cf962082f09e27d7d24cfc722ae978d9aa735a57) )
ROM_END
ROM_START( swclone )
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD16_WORD_SWAP( "swclone.bin", 0x000000, 0x800000, CRC(2c983509) SHA1(6138f21fe0b82a7121c4639b6833d4014d5aeb74) )
@ -1355,11 +1403,10 @@ void spg2xx_game_state::init_tvsprt10()
if (rom[0x179911] == 0x9240) rom[0x179911] ^= 0x0001; // decathln
}
void spg2xx_game_state::init_dreamlss()
void spg2xx_game_swclone_state::init_swclone()
{
// temp hack! skip I2CMEM loading / test!
//uint16_t* rom = (uint16_t*)memregion("maincpu")->base();
//rom[0x4bb37] = 0x9640;
uint16_t* rom = (uint16_t*)memregion("maincpu")->base();
rom[0x2649d1] = 0x0000; // don't write 0x1234 to the start of the RAM that is copied to spriteram on startup (this is an explicit write, probably actually a failure condition for something?)
}
@ -1376,8 +1423,8 @@ CONS( 2007, rad_fb2, 0, 0, rad_skat, rad_fb2, spg2xx_game_state, ini
CONS( 2006, abltenni, 0, 0, abltenni, abltenni, spg2xx_game_state, empty_init, "Advance Bright Ltd / V-Tac Technology Co Ltd.", "Wireless Tennis (WT2000, ABL TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// same as Excalibur Decathlon? not the same as the ABL game
CONS( 2006, tvsprt10, 0, 0, tvsprt10, tvsprt10, spg2xx_game_state, init_tvsprt10, "Simba / V-Tac Technology Co Ltd.", "TV Sports 10-in-1 / Decathlon Atlhetic Sport Games", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
CONS( 200?, decathln, 0, 0, tvsprt10, decathln, spg2xx_game_state, init_tvsprt10, "Advance Bright Ltd / V-Tac Technology Co Ltd.", "Decathlon", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // unit found in Spain
CONS( 2006, tvsprt10, 0, 0, tvsprt10, tvsprt10, spg2xx_game_state, init_tvsprt10, "Simba / V-Tac Technology Co Ltd.", "TV Sports 10-in-1 / Decathlon Atlhetic Sport Games", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
CONS( 200?, decathln, 0, 0, tvsprt10, decathln, spg2xx_game_state, init_tvsprt10, "Advance Bright Ltd / V-Tac Technology Co Ltd.", "Decathlon", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // unit found in Spain
CONS( 2007, guitarfv, 0, 0, guitarfv, guitarfv, spg2xx_game_state, empty_init, "Advance Bright Ltd", "Guitar Fever (2007.07.03 Ver 2.7)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
@ -1390,11 +1437,11 @@ CONS( 2005, tmntmutm, 0, 0, tmntmutm, tmntmutm, spg2xx_gam
CONS( 2006, pballpup, 0, 0, pballpup, pballpup, spg2xx_game_pballpup_state, empty_init, "Hasbro / Tiger Electronics", "Mission: Paintball Powered Up", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
CONS( 2007, dreamlss, 0, 0, dreamlss, dreamlss, spg2xx_game_dreamlss_state, init_dreamlss, "Hasbro / Tiger Electronics", "Dream Life Superstar (Version 0.3, Mar 16 2007)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
CONS( 2007, dreamlss, 0, 0, dreamlss, dreamlss, spg2xx_game_dreamlss_state, empty_init, "Hasbro / Tiger Electronics", "Dream Life Superstar (Version 0.3, Mar 16 2007)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// some garbage sprites (not meant to be displayed at all) seeprom hookup (24LC08), gun fine-tuning etc.
CONS( 2008, swclone, 0, 0, pballpup, pballpup, spg2xx_game_pballpup_state, empty_init, "Hasbro / Tiger Electronics", "Star Wars - The Clone Wars", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// meeds a hack to not show garbage sprite on startup, seeprom hookup (24LC08), gun fine-tuning etc.
CONS( 2008, swclone, 0, 0, swclone, swclone, spg2xx_game_swclone_state, init_swclone, "Hasbro / Tiger Electronics", "Star Wars - The Clone Wars", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// Mattel games
CONS( 2005, mattelcs, 0, 0, rad_skat, mattelcs, spg2xx_game_state, empty_init, "Mattel", "Mattel Classic Sports", MACHINE_IMPERFECT_SOUND )

View File

@ -440,7 +440,6 @@ void jakks_gkr_state::jakks_gkr(machine_config &config)
m_maincpu->portb_out().set(FUNC(jakks_gkr_state::jakks_portb_w));
m_maincpu->portc_in().set_ioport("P3");
m_maincpu->portc_out().set(FUNC(jakks_gkr_state::gkr_portc_w));
m_maincpu->set_rowscroll_offset(0);
JAKKS_GAMEKEY_SLOT(config, m_cart, 0, jakks_gamekey, nullptr);
}

View File

@ -317,8 +317,6 @@ void spg2xx_game_mysprtch_state::mysprtch(machine_config& config)
m_maincpu->portc_in().set(FUNC(spg2xx_game_mysprtch_state::base_portc_r));
m_maincpu->porta_out().set(FUNC(spg2xx_game_mysprtch_state::porta_w));
m_maincpu->set_rowscroll_offset(8); // for Tennis
}
void spg2xx_game_mysprtch_state::mgt20in1(machine_config& config)

View File

@ -48,7 +48,6 @@ public:
void init_crc();
void init_wiwi18();
void init_tvsprt10();
void init_dreamlss();
protected:
virtual void machine_start() override;
@ -106,6 +105,22 @@ private:
required_device<eeprom_serial_93cxx_device> m_eeprom;
};
class spg2xx_game_swclone_state : public spg2xx_game_state
{
public:
spg2xx_game_swclone_state(const machine_config &mconfig, device_type type, const char *tag) :
spg2xx_game_state(mconfig, type, tag),
m_i2cmem(*this, "i2cmem")
{ }
void swclone(machine_config &config);
void init_swclone();
private:
required_device<i2cmem_device> m_i2cmem;
};
class spg2xx_game_dreamlss_state : public spg2xx_game_state
{
public: