Merge remote-tracking branch 'origin/master' into release0195

This commit is contained in:
Vas Crabb 2018-02-28 06:06:39 +11:00
commit 81f1918bf9
103 changed files with 1760 additions and 1244 deletions

View File

@ -16,6 +16,18 @@
</part>
</software>
<software name="ghouse">
<description>A Ghost in the House</description>
<year>1981</year>
<publisher>Texas Instruments</publisher>
<info name="serial" value="CD3536"/>
<part name="cart" interface="snread">
<dataarea name="rom" size="0x4000">
<rom name="cd3536.vsm" size="0x4000" crc="9a26e0c8" sha1="a7c5bba2174ad3f53ee4f492d47205fe3d8f267d" offset="0" />
</dataarea>
</part>
</software>
<software name="ontrack">
<description>On the Track</description>
<year>1981</year>
@ -64,6 +76,18 @@
</part>
</software>
<software name="3circle">
<description>The Third Circle</description>
<year>1981</year>
<publisher>Texas Instruments</publisher>
<info name="serial" value="CD3539"/>
<part name="cart" interface="snread">
<dataarea name="rom" size="0x4000">
<rom name="cd3539.vsm" size="0x4000" crc="496ce890" sha1="d005447a74afc612809cc5de72d7cb6f711693ce" offset="0" />
</dataarea>
</part>
</software>
<software name="whoszoo">
<description>Who's Who at the Zoo</description>
<year>1980</year>

View File

@ -133,7 +133,7 @@
<software name="motsbase">
<description>Les Mots de Base (Module No. 1)</description>
<!-- 1st release was called "Module No. 1 de Jacques Capelovici" -->
<year>1980</year>
<year>1981</year>
<publisher>Texas Instruments</publisher>
<info name="serial" value="CD2353"/>
<part name="cart" interface="snspell">
@ -143,6 +143,19 @@
</part>
</software>
<software name="motsdiff">
<description>Les Mots Difficiles (Module No. 2)</description>
<!-- called "Les Mots de Base" on the cartridge label -->
<year>1981</year>
<publisher>Texas Instruments</publisher>
<info name="serial" value="CD62177"/>
<part name="cart" interface="snspell">
<dataarea name="rom" size="0x4000">
<rom name="cd62177a.vsm" size="0x4000" crc="2848c133" sha1="1d611f4a15d05f55f0da1773bddbfd64f2d63a49" offset="0" />
</dataarea>
</part>
</software>
<software name="magasrue">
<description>Les Magasins de la Rue (Module No. 4)</description>
<year>1981</year>

View File

@ -129,7 +129,7 @@ Game cartridges
| | 80-092002(NL) | Alfabet Pretpark |
| | 80-092003(UK) | Alphabet Park Adventure (Red Haired Girl Version) |
| XX | 80-092004(GE) | Abenteuer im ABC Park |
| | 80-092005(FR) | ABC Land Aventure |
| XX | 80-092005(FR) | ABC Land Aventure |
| | 80-092006(PT) | ABC Adventure (EAN is 3417768920162 cart#92016) |
| | 80-092007(SP) | Aventuras en el Parque Alfabeto (purple) |
| | 80-092007(SP) | Aventuras en el Parque Alfabeto (translucent) (No # on label) |
@ -153,7 +153,7 @@ Game cartridges
| | 80-092064(GE) | My Friends Tigger and Pooh - Die Honigjagd (yes, Tigger on this one) |
| XX | 80-092064-104(GE) | My Friends Tigger and Pooh - Die Honigjagd (yes, Tigger on this one) |
| XX | 80-092065(FR) | Winnie l'Ourson - La Chasse au miel de Winnie |
| | 80-092065-105(FR) | Winnie Rourson - La Chasse au miel de Winnie (ALT) |
| XX | 80-092065-105(FR) | Winnie l'Ourson - La Chasse au miel de Winnie (ALT) |
| | 80-092066(PT) | Winnie the Pooh - Em Busca Do Mel (92076 on cart) |
| | 80-092067(SP) | Winnie the Pooh (My Friends Tigger and Pooh) - En Busca de la Miel (no # on label)
| | 80-092067-122(SP) | Winnie the Pooh (My Friends Tigger and Pooh) - En Busca de la Miel |
@ -181,7 +181,7 @@ Game cartridges
| | 80-092102(NL) | Leeuwenkoning - De wonderwereld van Simba |
| | 80-092103(UK) | The Lion King: Simba's Big Adventure |
| | 80-092104(GE) | Der Koenig der Loewen - Simbas grosses Abenteuer |
| | 80-092105(FR) | Roi Lion - Simba Decouvre la Jungle |
| XX | 80-092105(FR) | Roi Lion - Simba Decouvre la Jungle |
| | 80-092106(PT) | O Rei Leao - A grande aventura de Simba (92116 on cart) |
| | 80-092107(SP) | Rey Leon - La Gran Aventura de Simba |
| XX | 80-092113(DK) | Løvernes Konge - Simbas store eventyr |
@ -280,7 +280,7 @@ Game cartridges
+========+===================+============================================================================+
| | 80-092260(US) | Elmo's World - Elmo's Big Discoveries |
| XX | 80-092264(GE) | Elmos großes Abenteuer |
| | 80-092265(FR) | Le Monde d'ELMO - Les Grandes Decouvertes D'Elmo |
| XX | 80-092265(FR) | Le Monde d'ELMO - Les Grandes Decouvertes D'Elmo |
+========+===================+============================================================================+
| XX | 80-092280(US) | Dora The Explorer - Dora's Fit-it Adventure |
| | 80-092280-101(US) | Dora The Explorer - Dora's Fit-it Adventure (ALT) |
@ -321,7 +321,7 @@ Game cartridges
| | 80-092343-203(UK) | Thomas and Friends: Engines Working Together (ALT) |
| XX | 80-092344(GE) | Thomas and Seine Freunde - Freunde Halten Zusammen |
| XX | 80-092344-104(GE) | Thomas and Seine Freunde - Freunde Halten Zusammen |
| | 80-092345(FR) | Thomas er ses Amis - Les locomotives s'entraident |
| XX | 80-092345(FR) | Thomas er ses Amis - Les locomotives s'entraident |
| | 80-092347(SP) | Thomas and Friends: Juego de Aprendizaje |
| | (DK) | Thomas and Friends: Togene arbejder sammen |
| XX | 80-092354(SE) | Thomas and Friends: Tågen hjälps åt |
@ -393,7 +393,7 @@ Game cartridges
| | 80-092543-103(UK) | Noddy - Detective for a Day (ALT) |
| | 80-092544(GE) | Noddy - Detektiv fuer einen Tag <- need pic to confirm, manual cover says -104
| XX | 80-092544-104(GE) | Noddy - Detektiv fuer einen Tag (ALT) |
| | 80-092545(FR) | Oui-Oui - Detective d'un Jour |
| XX | 80-092545(FR) | Oui-Oui - Detective d'un Jour |
| | 80-092545-105(FR) | Oui-Oui - Detective d'un Jour (ALT) |
| | 80-092546(PT) | Noddy - Detective por um dia (92556 on cart) |
+========+===================+============================================================================+
@ -581,6 +581,22 @@ Game cartridges
</part>
</software>
<software name="alphaprkf" cloneof="alphaprk" supported="no">
<description>ABC Land Aventure (Fra)</description>
<year>200?</year>
<publisher>VTech</publisher>
<info name="serial" value="80-092005(FR)" />
<part name="cart" interface="vsmile_cart">
<feature name="pcb" value="707180" />
<feature name="pcb_model" value="707180-1" />
<feature name="cart_type" value="lilac" />
<feature name="u1" value="U1" /> <!-- EPOXY BLOB ROM -->
<dataarea name="rom" size="8388608">
<rom name="92005.u1" size="8388608" crc="fe2650d7" sha1="cf07b676ce11f9db6b00ab1fecf8ae6720965cab" offset="0" />
</dataarea>
</part>
</software>
<software name="ariel" supported="no">
<description>Disneys Arielle die Meerjungfrau - Arielles aufregendes Abenteuer (Ger, Rev. 3?)</description>
<year>2004?</year>
@ -1032,6 +1048,22 @@ Game cartridges
</part>
</software>
<software name="elmof" cloneof="elmo" supported="no">
<description>Le Monde d'ELMO - Les Grandes Decouvertes D'Elmo (Fra)</description>
<year>2005?</year>
<publisher>VTech</publisher>
<info name="serial" value="80-092265(FR)" />
<part name="cart" interface="vsmile_cart">
<feature name="pcb" value="706714" />
<feature name="pcb_model" value="706714-1" />
<feature name="cart_type" value="lilac" />
<feature name="u1" value="" /> <!-- EPOXY BLOB ROM -->
<dataarea name="rom" size="8388608">
<rom name="92265.u1" size="8388608" crc="def351e7" sha1="95d005b6e2bf36add42916025558744ccffc8863" offset="0" />
</dataarea>
</part>
</software>
<software name="footschl" supported="no">
<description>V.Smile Fußball Schule (Ger)</description>
<year>200?</year>
@ -1144,6 +1176,22 @@ Game cartridges
</part>
</software>
<software name="lionkingf" cloneof="lionking" supported="no">
<description>Roi Lion - Simba Decouvre la Jungle (Fra)</description>
<year>200?</year>
<publisher>VTech</publisher>
<info name="serial" value="80-092105(FR)" />
<part name="cart" interface="vsmile_cart">
<feature name="pcb" value="707180" />
<feature name="pcb_model" value="707180-2" />
<feature name="cart_type" value="lilac" />
<feature name="u1" value="U1" /> <!-- EPOXY BLOB ROM -->
<dataarea name="rom" size="8388608">
<rom name="92105.u1" size="8388608" crc="d756c029" sha1="9fbb3a031498682b05c5950e6e07fd5e83a308ad" offset="0" />
</dataarea>
</part>
</software>
<software name="lionkingdk" cloneof="lionking" supported="no">
<description>Disney Løvernes Konge - Simbas store eventyr (Den)</description>
<year>200?</year>
@ -1376,6 +1424,22 @@ Game cartridges
</part>
</software>
<software name="noddyf" cloneof="noddy" supported="no">
<description>Oui-Oui - Detective d'un Jour (Fra)</description>
<year>200?</year>
<publisher>VTech</publisher>
<info name="serial" value="80-092545(FR)" />
<part name="cart" interface="vsmile_cart">
<feature name="pcb" value="707180" />
<feature name="pcb_model" value="707180-2" />
<feature name="cart_type" value="lilac" />
<feature name="u1" value="" /> <!-- EPOXY BLOB ROM -->
<dataarea name="rom" size="8388608">
<rom name="92545.u1" size="8388608" crc="f4825273" sha1="8ef2852687e0a6820b97268e6613450ab164c90d" offset="0" />
</dataarea>
</part>
</software>
<software name="oben" supported="no">
<description>Disney/Pixar Oben (Ger)</description>
<year>2009?</year>
@ -1762,6 +1826,22 @@ Game cartridges
</part>
</software>
<software name="thomasf" cloneof="thomas" supported="no">
<description>Thomas er ses Amis - Les locomotives s'entraident (Fra)</description>
<year>2007?</year>
<publisher>VTech</publisher>
<info name="serial" value="80-092345(FR)" />
<part name="cart" interface="vsmile_cart">
<feature name="pcb" value="707180" />
<feature name="pcb_model" value="707180-2" />
<feature name="cart_type" value="lilac" />
<feature name="u1" value="" /> <!-- EPOXY BLOB ROM -->
<dataarea name="rom" size="8388608">
<rom name="92345.u1" size="8388608" crc="281a7d69" sha1="479a9f9c27a08316ef605d39d3fa2fc1b09bd4ff" offset="0" />
</dataarea>
</part>
</software>
<software name="thomassw" cloneof="thomas" supported="no">
<description>Thomas &amp; Friends - Tågen hjälps åt (Swe)</description>
<year>2007?</year>
@ -1918,6 +1998,22 @@ Game cartridges
</part>
</software>
<software name="poohfa" cloneof="pooh" supported="no">
<description>Disney Winnie l'Ourson - La Chasse au miel de Winnie (Fra, Rev. 2)</description>
<year>2004?</year>
<publisher>VTech</publisher>
<info name="serial" value="80-092065-2(FR)" />
<part name="cart" interface="vsmile_cart">
<feature name="pcb" value="706714" />
<feature name="pcb_model" value="706714-1" />
<feature name="cart_type" value="lilac" />
<feature name="u1" value="U1" /> <!-- EPOXY BLOB ROM -->
<dataarea name="rom" size="8388608">
<rom name="92065-2.u1" size="8388608" crc="07403b58" sha1="1b9625a173d552888a92d032e91504441fca6229" offset="0" />
</dataarea>
</part>
</software>
<software name="poohdk" cloneof="pooh" supported="no">
<description>Disney Peter Plys - Honningjagten (Den)</description>
<year>200?</year>

View File

@ -637,6 +637,19 @@ Plus, some games crash MESS at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="dkong3dg">
<description>Donkey Kong 3 - Dai Gyakushuu</description>
<year>1985</year>
<publisher>ハドソン (Hudson Soft)</publisher>
<info name="release" value="198506xx"/>
<info name="alt_title" value="ドンキーコング3 大逆襲"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size = "339648">
<rom name="donkey kong 3 dai gyakushuu.d88" size="339648" crc="2fd68d39" sha1="cfe4c16b972ec00fc8e2380d1219bdf5d75fa11f" offset="0"/>
</dataarea>
</part>
</software>
<software name="dbuster">
<description>Dragon Buster</description>
<year>1987</year>

View File

@ -3206,6 +3206,7 @@ files {
MAME_DIR .. "src/mame/audio/dsbz80.cpp",
MAME_DIR .. "src/mame/audio/dsbz80.h",
MAME_DIR .. "src/mame/drivers/model2.cpp",
MAME_DIR .. "src/mame/machine/model2.cpp",
MAME_DIR .. "src/mame/includes/model2.h",
MAME_DIR .. "src/mame/video/model2rd.hxx",
MAME_DIR .. "src/mame/video/model2.cpp",

View File

@ -1519,7 +1519,7 @@ void geneve_mapper_device::device_reset()
// Allow for configuring the VRAM size
uint32_t videoram = (machine().root_device().ioport("VRAM")->read()!=0)? 0x30000 : 0x20000;
v99x8_device::static_set_vram_size(*m_video.target(), videoram);
downcast<v99x8_device &>(*m_video.target()).set_vram_size(videoram);
LOGMASKED(LOG_SETTING, "Video RAM set to %d KiB\n", videoram / 1024);
}

View File

@ -34,6 +34,11 @@ retf_imp
TMP2 = read(SP);
m_farbank = TMP2;
}
else
{
// namcons2: because apparently 0x0300ea isn't correctly mirroring 0x0000ea despite logic in xavix.cpp looking correct?
m_farbank = 0;
}
read_pc();
prefetch();

View File

@ -52,11 +52,11 @@ public:
// construction/destruction
sega315_5124_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_signal_type(device_t &device, bool is_pal) { downcast<sega315_5124_device &>(device).m_is_pal = is_pal; }
void set_signal_type(bool is_pal) { m_is_pal = is_pal; }
template <class Object> static devcb_base &set_int_callback(device_t &device, Object &&cb) { return downcast<sega315_5124_device &>(device).m_int_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_csync_callback(device_t &device, Object &&cb) { return downcast<sega315_5124_device &>(device).m_csync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_pause_callback(device_t &device, Object &&cb) { return downcast<sega315_5124_device &>(device).m_pause_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_int_callback(Object &&cb) { return m_int_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_csync_callback(Object &&cb) { return m_csync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_pause_callback(Object &&cb) { return m_pause_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( vram_read );
DECLARE_WRITE8_MEMBER( vram_write );
@ -216,46 +216,46 @@ private:
#define MCFG_SEGA315_5124_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_SEGA315_5124_IS_PAL(_bool) \
sega315_5124_device::set_signal_type(*device, _bool);
downcast<sega315_5124_device &>(*device).set_signal_type(_bool);
#define MCFG_SEGA315_5124_INT_CB(_devcb) \
devcb = &sega315_5124_device::set_int_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5124_device &>(*device).set_int_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5124_CSYNC_CB(_devcb) \
devcb = &sega315_5124_device::set_csync_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5124_device &>(*device).set_csync_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5124_PAUSE_CB(_devcb) \
devcb = &sega315_5124_device::set_pause_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5124_device &>(*device).set_pause_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_SEGA315_5246_IS_PAL(_bool) \
sega315_5246_device::set_signal_type(*device, _bool);
downcast<sega315_5246_device &>(*device).set_signal_type(_bool);
#define MCFG_SEGA315_5246_INT_CB(_devcb) \
devcb = &sega315_5246_device::set_int_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5246_device &>(*device).set_int_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5246_CSYNC_CB(_devcb) \
devcb = &sega315_5246_device::set_csync_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5246_device &>(*device).set_csync_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5246_PAUSE_CB(_devcb) \
devcb = &sega315_5246_device::set_pause_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5246_device &>(*device).set_pause_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5378_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_SEGA315_5378_IS_PAL(_bool) \
sega315_5378_device::set_signal_type(*device, _bool);
downcast<sega315_5378_device &>(*device).set_signal_type(_bool);
#define MCFG_SEGA315_5378_INT_CB(_devcb) \
devcb = &sega315_5378_device::set_int_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5378_device &>(*device).set_int_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5378_CSYNC_CB(_devcb) \
devcb = &sega315_5378_device::set_csync_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5378_device &>(*device).set_csync_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5378_PAUSE_CB(_devcb) \
devcb = &sega315_5378_device::set_pause_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5378_device &>(*device).set_pause_callback(DEVCB_##_devcb);
#endif // MAME_VIDEO_315_5124_H

View File

@ -168,16 +168,6 @@ sega315_5313_device::sega315_5313_device(const machine_config &mconfig, const ch
m_palwrite_base = -1;
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void sega315_5313_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<sega315_5313_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// device_add_mconfig
// add machine configuration
@ -200,21 +190,6 @@ TIMER_CALLBACK_MEMBER(sega315_5313_device::irq4_on_timer_callback)
m_lv4irqline_callback(true);
}
void sega315_5313_device::set_alt_timing(device_t &device, int use_alt_timing)
{
sega315_5313_device &dev = downcast<sega315_5313_device &>(device);
dev.m_use_alt_timing = use_alt_timing;
}
void sega315_5313_device::set_palwrite_base(device_t &device, int palwrite_base)
{
sega315_5313_device &dev = downcast<sega315_5313_device &>(device);
dev.m_palwrite_base = palwrite_base;
}
void sega315_5313_device::device_start()
{
m_sndirqline_callback.resolve_safe();

View File

@ -12,42 +12,42 @@
#define MCFG_SEGA315_5313_IS_PAL(_bool) \
sega315_5313_device::set_signal_type(*device, _bool);
downcast<sega315_5313_device &>(*device).set_signal_type(_bool);
#define MCFG_SEGA315_5313_INT_CB(_devcb) \
devcb = &sega315_5313_device::set_int_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5313_device &>(*device).set_int_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5313_PAUSE_CB(_devcb) \
devcb = &sega315_5313_device::set_pause_callback(*device, DEVCB_##_devcb);
devcb = &downcast<sega315_5313_device &>(*device).set_pause_callback(DEVCB_##_devcb);
#define MCFG_SEGA315_5313_SND_IRQ_CALLBACK(_write) \
devcb = &sega315_5313_device::set_sndirqline_callback(*device, DEVCB_##_write);
devcb = &downcast<sega315_5313_device &>(*device).set_sndirqline_callback(DEVCB_##_write);
#define MCFG_SEGA315_5313_LV6_IRQ_CALLBACK(_write) \
devcb = &sega315_5313_device::set_lv6irqline_callback(*device, DEVCB_##_write);
devcb = &downcast<sega315_5313_device &>(*device).set_lv6irqline_callback(DEVCB_##_write);
#define MCFG_SEGA315_5313_LV4_IRQ_CALLBACK(_write) \
devcb = &sega315_5313_device::set_lv4irqline_callback(*device, DEVCB_##_write);
devcb = &downcast<sega315_5313_device &>(*device).set_lv4irqline_callback(DEVCB_##_write);
#define MCFG_SEGA315_5313_ALT_TIMING(_data) \
sega315_5313_device::set_alt_timing(*device, _data);
downcast<sega315_5313_device &>(*device).set_alt_timing(_data);
#define MCFG_SEGA315_5313_PAL_WRITE_BASE(_data) \
sega315_5313_device::set_palwrite_base(*device, _data);
downcast<sega315_5313_device &>(*device).set_palwrite_base(_data);
#define MCFG_SEGA315_5313_PALETTE(_palette_tag) \
sega315_5313_device::static_set_palette_tag(*device, "^" _palette_tag);
downcast<sega315_5313_device &>(*device).set_palette_tag("^" _palette_tag);
// Temporary solution while 32x VDP mixing and scanline interrupting is moved outside MD VDP
#define MCFG_SEGA315_5313_32X_SCANLINE_CB(_class, _method) \
sega315_5313_device::set_md_32x_scanline(*device, sega315_5313_device::md_32x_scanline_delegate(&_class::_method, #_class "::" #_method, this));
downcast<sega315_5313_device &>(*device).set_md_32x_scanline(sega315_5313_device::md_32x_scanline_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_SEGA315_5313_32X_INTERRUPT_CB(_class, _method) \
sega315_5313_device::set_md_32x_interrupt(*device, sega315_5313_device::md_32x_interrupt_delegate(&_class::_method, #_class "::" #_method, this));
downcast<sega315_5313_device &>(*device).set_md_32x_interrupt(sega315_5313_device::md_32x_interrupt_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_SEGA315_5313_32X_SCANLINE_HELPER_CB(_class, _method) \
sega315_5313_device::set_md_32x_scanline_helper(*device, sega315_5313_device::md_32x_scanline_helper_delegate(&_class::_method, #_class "::" #_method, this));
downcast<sega315_5313_device &>(*device).set_md_32x_scanline_helper(sega315_5313_device::md_32x_scanline_helper_delegate(&_class::_method, #_class "::" #_method, this));
class sega315_5313_device : public sega315_5124_device
@ -59,16 +59,16 @@ public:
sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_sndirqline_callback(device_t &device, Object &&cb) { return downcast<sega315_5313_device &>(device).m_sndirqline_callback.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_lv6irqline_callback(device_t &device, Object &&cb) { return downcast<sega315_5313_device &>(device).m_lv6irqline_callback.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_lv4irqline_callback(device_t &device, Object &&cb) { return downcast<sega315_5313_device &>(device).m_lv4irqline_callback.set_callback(std::forward<Object>(cb)); }
static void set_alt_timing(device_t &device, int use_alt_timing);
static void set_palwrite_base(device_t &device, int palwrite_base);
static void static_set_palette_tag(device_t &device, const char *tag);
template <class Object> devcb_base &set_sndirqline_callback(Object &&cb) { return m_sndirqline_callback.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_lv6irqline_callback(Object &&cb) { return m_lv6irqline_callback.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_lv4irqline_callback(Object &&cb) { return m_lv4irqline_callback.set_callback(std::forward<Object>(cb)); }
void set_alt_timing(int use_alt_timing) { m_use_alt_timing = use_alt_timing; }
void set_palwrite_base(int palwrite_base) { m_palwrite_base = palwrite_base; }
void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }
static void set_md_32x_scanline(device_t &device, md_32x_scanline_delegate &&cb) { downcast<sega315_5313_device &>(device).m_32x_scanline_func = std::move(cb); }
static void set_md_32x_interrupt(device_t &device, md_32x_interrupt_delegate &&cb) { downcast<sega315_5313_device &>(device).m_32x_interrupt_func = std::move(cb); }
static void set_md_32x_scanline_helper(device_t &device, md_32x_scanline_helper_delegate &&cb) { downcast<sega315_5313_device &>(device).m_32x_scanline_helper_func = std::move(cb); }
template <typename Object> void set_md_32x_scanline(Object &&cb) { m_32x_scanline_func = std::forward<Object>(cb); }
template <typename Object> void set_md_32x_interrupt(Object &&cb) { m_32x_interrupt_func = std::forward<Object>(cb); }
template <typename Object> void set_md_32x_scanline_helper(Object &&cb) { m_32x_scanline_helper_func = std::forward<Object>(cb); }
int m_use_alt_timing; // use MAME scanline timer instead, render only one scanline to a single line buffer, to be rendered by a partial update call.. experimental

View File

@ -34,13 +34,13 @@
//**************************************************************************
#define MCFG_CDP1861_IRQ_CALLBACK(_write) \
devcb = &cdp1861_device::set_irq_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<cdp1861_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_CDP1861_DMA_OUT_CALLBACK(_write) \
devcb = &cdp1861_device::set_dma_out_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<cdp1861_device &>(*device).set_dma_out_wr_callback(DEVCB_##_write);
#define MCFG_CDP1861_EFX_CALLBACK(_write) \
devcb = &cdp1861_device::set_efx_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<cdp1861_device &>(*device).set_efx_wr_callback(DEVCB_##_write);
#define MCFG_CDP1861_SCREEN_ADD(_cdptag, _tag, _clock) \
@ -88,9 +88,9 @@ public:
// construction/destruction
cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_irq_wr_callback(device_t &device, Object &&cb) { return downcast<cdp1861_device &>(device).m_write_irq.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_dma_out_wr_callback(device_t &device, Object &&cb) { return downcast<cdp1861_device &>(device).m_write_dma_out.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_efx_wr_callback(device_t &device, Object &&cb) { return downcast<cdp1861_device &>(device).m_write_efx.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_out_wr_callback(Object &&cb) { return m_write_dma_out.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_efx_wr_callback(Object &&cb) { return m_write_efx.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE8_MEMBER( dma_w );
DECLARE_WRITE_LINE_MEMBER( disp_on_w );

View File

@ -42,19 +42,19 @@
//**************************************************************************
#define MCFG_CDP1861_RD_CALLBACK(_read) \
devcb = &cdp1862_device::set_rd_rd_callback(*device, DEVCB_##_read);
devcb = &downcast<cdp1862_device &>(*device).set_rd_rd_callback(DEVCB_##_read);
#define MCFG_CDP1861_BD_CALLBACK(_read) \
devcb = &cdp1862_device::set_bd_rd_callback(*device, DEVCB_##_read);
devcb = &downcast<cdp1862_device &>(*device).set_bd_rd_callback(DEVCB_##_read);
#define MCFG_CDP1861_GD_CALLBACK(_read) \
devcb = &cdp1862_device::set_gd_rd_callback(*device, DEVCB_##_read);
devcb = &downcast<cdp1862_device &>(*device).set_gd_rd_callback(DEVCB_##_read);
#define MCFG_CDP1862_LUMINANCE(_r, _b, _g, _bkg) \
cdp1862_device::static_set_luminance(*device, _r, _b, _g, _bkg);
downcast<cdp1862_device &>(*device).set_luminance(_r, _b, _g, _bkg);
#define MCFG_CDP1862_CHROMINANCE(_r, _b, _g, _bkg) \
cdp1862_device::static_set_chrominance(*device, _r, _b, _g, _bkg);
downcast<cdp1862_device &>(*device).set_chrominance(_r, _b, _g, _bkg);
@ -71,12 +71,12 @@ public:
// construction/destruction
cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_rd_rd_callback(device_t &device, Object &&cb) { return downcast<cdp1862_device &>(device).m_read_rd.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_bd_rd_callback(device_t &device, Object &&cb) { return downcast<cdp1862_device &>(device).m_read_bd.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_gd_rd_callback(device_t &device, Object &&cb) { return downcast<cdp1862_device &>(device).m_read_gd.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_rd_rd_callback(Object &&cb) { return m_read_rd.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_bd_rd_callback(Object &&cb) { return m_read_bd.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_gd_rd_callback(Object &&cb) { return m_read_gd.set_callback(std::forward<Object>(cb)); }
static void static_set_luminance(device_t &device, double r, double b, double g, double bkg) { downcast<cdp1862_device &>(device).m_lum_r = r; downcast<cdp1862_device &>(device).m_lum_b = b; downcast<cdp1862_device &>(device).m_lum_g = g; downcast<cdp1862_device &>(device).m_lum_bkg = bkg; }
static void static_set_chrominance(device_t &device, double r, double b, double g, double bkg) { downcast<cdp1862_device &>(device).m_chr_r = r; downcast<cdp1862_device &>(device).m_chr_b = b; downcast<cdp1862_device &>(device).m_chr_g = g; downcast<cdp1862_device &>(device).m_chr_bkg = bkg; }
void set_luminance(double r, double b, double g, double bkg) { m_lum_r = r; m_lum_b = b; m_lum_g = g; m_lum_bkg = bkg; }
void set_chrominance(double r, double b, double g, double bkg) { m_chr_r = r; m_chr_b = b; m_chr_g = g; m_chr_bkg = bkg; }
DECLARE_WRITE8_MEMBER( dma_w );
DECLARE_WRITE_LINE_MEMBER( bkg_w );

View File

@ -22,10 +22,10 @@
#define MCFG_CESBLIT_MAP MCFG_DEVICE_PROGRAM_MAP
#define MCFG_CESBLIT_COMPUTE_ADDR(_compute_addr) \
cesblit_device::static_set_compute_addr(*device, _compute_addr);
downcast<cesblit_device &>(*device).set_compute_addr(_compute_addr);
#define MCFG_CESBLIT_IRQ_CB(_devcb) \
devcb = &cesblit_device::static_set_irq_callback(*device, DEVCB_##_devcb);
devcb = &downcast<cesblit_device &>(*device).set_irq_callback(DEVCB_##_devcb);
/***************************************************************************
TYPE DEFINITIONS
@ -43,10 +43,9 @@ public:
// construction/destruction
cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
// configuration
void set_compute_addr(compute_addr_t compute_addr) { m_compute_addr = compute_addr; }
static void static_set_compute_addr(device_t &device, compute_addr_t compute_addr) { downcast<cesblit_device &>(device).set_compute_addr(compute_addr); }
template <class Object> static devcb_base &static_set_irq_callback(device_t &device, Object &&cb) { return downcast<cesblit_device &>(device).m_blit_irq_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_blit_irq_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE16_MEMBER(color_w);
DECLARE_WRITE16_MEMBER(addr_hi_w);

View File

@ -42,40 +42,40 @@
//**************************************************************************
#define MCFG_CRT9007_CHARACTER_WIDTH(_value) \
crt9007_device::static_set_character_width(*device, _value);
downcast<crt9007_device &>(*device).config_set_character_width(_value);
#define MCFG_CRT9007_INT_CALLBACK(_write) \
devcb = &crt9007_device::set_int_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_int_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_DMAR_CALLBACK(_write) \
devcb = &crt9007_device::set_dmar_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_dmar_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_VS_CALLBACK(_write) \
devcb = &crt9007_device::set_vs_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_vs_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_HS_CALLBACK(_write) \
devcb = &crt9007_device::set_hs_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_hs_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_VLT_CALLBACK(_write) \
devcb = &crt9007_device::set_vlt_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_vlt_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_CURS_CALLBACK(_write) \
devcb = &crt9007_device::set_curs_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_curs_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_DRB_CALLBACK(_write) \
devcb = &crt9007_device::set_drb_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_drb_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_WBEN_CALLBACK(_write) \
devcb = &crt9007_device::set_wben_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_wben_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_CBLANK_CALLBACK(_write) \
devcb = &crt9007_device::set_cblank_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_cblank_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_SLG_CALLBACK(_write) \
devcb = &crt9007_device::set_slg_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_slg_wr_callback(DEVCB_##_write);
#define MCFG_CRT9007_SLD_CALLBACK(_write) \
devcb = &crt9007_device::set_sld_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9007_device &>(*device).set_sld_wr_callback(DEVCB_##_write);
@ -93,19 +93,19 @@ public:
// construction/destruction
crt9007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_character_width(device_t &device, int value) { downcast<crt9007_device &>(device).m_hpixels_per_column = value; }
void config_set_character_width(int value) { m_hpixels_per_column = value; }
template <class Object> static devcb_base &set_int_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_int.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_dmar_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_dmar.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vs_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_vs.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hs_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_hs.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vlt_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_vlt.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_curs_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_curs.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_drb_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_drb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_wben_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_wben.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_cblank_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_cblank.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_slg_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_slg.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_sld_wr_callback(device_t &device, Object &&cb) { return downcast<crt9007_device &>(device).m_write_sld.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_int_wr_callback(Object &&cb) { return m_write_int.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dmar_wr_callback(Object &&cb) { return m_write_dmar.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vs_wr_callback(Object &&cb) { return m_write_vs.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hs_wr_callback(Object &&cb) { return m_write_hs.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vlt_wr_callback(Object &&cb) { return m_write_vlt.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_curs_wr_callback(Object &&cb) { return m_write_curs.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_drb_wr_callback(Object &&cb) { return m_write_drb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_wben_wr_callback(Object &&cb) { return m_write_wben.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_cblank_wr_callback(Object &&cb) { return m_write_cblank.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_slg_wr_callback(Object &&cb) { return m_write_slg.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_sld_wr_callback(Object &&cb) { return m_write_sld.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -39,7 +39,7 @@
#define MCFG_CRT9021_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \
crt9021_device::static_set_display_callback(*device, crt9021_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
downcast<crt9021_device &>(*device).set_display_callback(crt9021_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
//**************************************************************************
@ -57,7 +57,7 @@ public:
// construction/destruction
crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_display_callback(device_t &device, draw_character_delegate &&cb) { downcast<crt9021_device &>(device).m_display_cb = std::move(cb); }
template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
void write(uint8_t data) { m_data = data; }
DECLARE_WRITE8_MEMBER( write ) { write(data); }

View File

@ -36,16 +36,16 @@
//**************************************************************************
#define MCFG_CRT9212_WEN2_VCC() \
crt9212_device::static_set_wen2(*device, 1);
downcast<crt9212_device &>(*device).set_wen2(1);
#define MCFG_CRT9212_DOUT_CALLBACK(_write) \
devcb = &crt9212_device::set_dout_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9212_device &>(*device).set_dout_wr_callback(DEVCB_##_write);
#define MCFG_CRT9212_ROF_CALLBACK(_write) \
devcb = &crt9212_device::set_rof_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9212_device &>(*device).set_rof_wr_callback(DEVCB_##_write);
#define MCFG_CRT9212_WOF_CALLBACK(_write) \
devcb = &crt9212_device::set_wof_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<crt9212_device &>(*device).set_wof_wr_callback(DEVCB_##_write);
@ -61,11 +61,11 @@ public:
// construction/destruction
crt9212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_wen2(device_t &device, int state) { downcast<crt9212_device &>(device).m_wen2 = state; }
void set_wen2(int state) { m_wen2 = state; }
template <class Object> static devcb_base &set_dout_wr_callback(device_t &device, Object &&cb) { return downcast<crt9212_device &>(device).m_write_dout.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_rof_wr_callback(device_t &device, Object &&cb) { return downcast<crt9212_device &>(device).m_write_rof.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_wof_wr_callback(device_t &device, Object &&cb) { return downcast<crt9212_device &>(device).m_write_wof.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dout_wr_callback(Object &&cb) { return m_write_dout.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_rof_wr_callback(Object &&cb) { return m_write_rof.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_wof_wr_callback(Object &&cb) { return m_write_wof.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE8_MEMBER( write ) { m_data = data; }
DECLARE_WRITE_LINE_MEMBER( clrcnt_w );

View File

@ -21,28 +21,28 @@
#define MCFG_CRTC_EGA_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_CRTC_EGA_BEGIN_UPDATE_CB(_class, _method) \
crtc_ega_device::set_begin_update_callback(*device, crtc_ega_device::begin_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<crtc_ega_device &>(*device).set_begin_update_callback(crtc_ega_device::begin_update_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_CRTC_EGA_ROW_UPDATE_CB(_class, _method) \
crtc_ega_device::set_row_update_callback(*device, crtc_ega_device::row_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<crtc_ega_device &>(*device).set_row_update_callback(crtc_ega_device::row_update_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_CRTC_EGA_END_UPDATE_CB(_class, _method) \
crtc_ega_device::set_end_update_callback(*device, crtc_ega_device::end_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<crtc_ega_device &>(*device).set_end_update_callback(crtc_ega_device::end_update_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_CRTC_EGA_HPIXELS_PER_COLUMN(_pix) \
crtc_ega_device::set_hpixels_per_column(*device, _pix);
downcast<crtc_ega_device &>(*device).config_set_hpixels_per_column(_pix);
#define MCFG_CRTC_EGA_RES_OUT_DE_CB(_devcb) \
devcb = &crtc_ega_device::set_res_out_de_callback(*device, DEVCB_##_devcb);
devcb = &downcast<crtc_ega_device &>(*device).set_res_out_de_callback(DEVCB_##_devcb);
#define MCFG_CRTC_EGA_RES_OUT_HSYNC_CB(_devcb) \
devcb = &crtc_ega_device::set_res_out_hsync_callback(*device, DEVCB_##_devcb);
devcb = &downcast<crtc_ega_device &>(*device).set_res_out_hsync_callback(DEVCB_##_devcb);
#define MCFG_CRTC_EGA_RES_OUT_VSYNC_CB(_devcb) \
devcb = &crtc_ega_device::set_res_out_vsync_callback(*device, DEVCB_##_devcb);
devcb = &downcast<crtc_ega_device &>(*device).set_res_out_vsync_callback(DEVCB_##_devcb);
#define MCFG_CRTC_EGA_RES_OUT_VBLANK_CB(_devcb) \
devcb = &crtc_ega_device::set_res_out_vblank_callback(*device, DEVCB_##_devcb);
devcb = &downcast<crtc_ega_device &>(*device).set_res_out_vblank_callback(DEVCB_##_devcb);
class crtc_ega_device : public device_t,
@ -57,19 +57,15 @@ public:
crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_res_out_de_callback(device_t &device, Object &&cb)
{ return downcast<crtc_ega_device &>(device).m_res_out_de_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_res_out_hsync_callback(device_t &device, Object &&cb)
{ return downcast<crtc_ega_device &>(device).m_res_out_hsync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_res_out_vsync_callback(device_t &device, Object &&cb)
{ return downcast<crtc_ega_device &>(device).m_res_out_vsync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_res_out_vblank_callback(device_t &device, Object &&cb)
{ return downcast<crtc_ega_device &>(device).m_res_out_vblank_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_res_out_de_callback(Object &&cb) { return m_res_out_de_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_res_out_hsync_callback(Object &&cb) { return m_res_out_hsync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_res_out_vsync_callback(Object &&cb) { return m_res_out_vsync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_res_out_vblank_callback(Object &&cb) { return m_res_out_vblank_cb.set_callback(std::forward<Object>(cb)); }
static void set_begin_update_callback(device_t &device, begin_update_delegate &&cb) { downcast<crtc_ega_device &>(device).m_begin_update_cb = std::move(cb); }
static void set_row_update_callback(device_t &device, row_update_delegate &&cb) { downcast<crtc_ega_device &>(device).m_row_update_cb = std::move(cb); }
static void set_end_update_callback(device_t &device, end_update_delegate &&cb) { downcast<crtc_ega_device &>(device).m_end_update_cb = std::move(cb); }
static void set_hpixels_per_column(device_t &device, int hpixels_per_column) { downcast<crtc_ega_device &>(device).m_hpixels_per_column = hpixels_per_column; }
template <typename Object> void set_begin_update_callback(Object &&cb) { m_begin_update_cb = std::forward<Object>(cb); }
template <typename Object> void set_row_update_callback(Object &&cb) { m_row_update_cb = std::forward<Object>(cb); }
template <typename Object> void set_end_update_callback(Object &&cb) { m_end_update_cb = std::forward<Object>(cb); }
void config_set_hpixels_per_column(int hpixels_per_column) { m_hpixels_per_column = hpixels_per_column; }
/* select one of the registers for reading or writing */
DECLARE_WRITE8_MEMBER( address_w );

View File

@ -31,10 +31,10 @@ extern device_type const DL1416T;
***************************************************************************/
#define MCFG_DL1414_UPDATE_HANDLER(_devcb) \
devcb = &dl1414_device::set_update_handler(*device, DEVCB_##_devcb);
devcb = &downcast<dl1414_device &>(*device).set_update_handler(DEVCB_##_devcb);
#define MCFG_DL1416_UPDATE_HANDLER(_devcb) \
devcb = &dl1416_device::set_update_handler(*device, DEVCB_##_devcb);
devcb = &downcast<dl1414_device &>(*device).set_update_handler(DEVCB_##_devcb);
/***************************************************************************
@ -44,8 +44,7 @@ extern device_type const DL1416T;
class dl1414_device : public device_t
{
public:
template <typename Object> static devcb_base &set_update_handler(device_t &device, Object &&cb)
{ return downcast<dl1414_device &>(device).m_update_cb.set_callback(std::forward<Object>(cb)); }
template <typename Object> devcb_base &set_update_handler(Object &&cb) { return m_update_cb.set_callback(std::forward<Object>(cb)); }
// signal-level interface
DECLARE_WRITE_LINE_MEMBER(wr_w); // write strobe (rising edge)

View File

@ -124,16 +124,6 @@ ts9347_device::ts9347_device(const machine_config &mconfig, const char *tag, dev
{
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void ef9345_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<ef9345_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------

View File

@ -15,7 +15,7 @@
#define MCFG_EF9345_PALETTE(_palette_tag) \
ef9345_device::static_set_palette_tag(*device, "^" _palette_tag);
downcast<ef9345_device &>(*device).set_palette_tag("^" _palette_tag);
//**************************************************************************
// TYPE DEFINITIONS
@ -31,8 +31,8 @@ public:
// construction/destruction
ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
static void static_set_palette_tag(device_t &device, const char *tag);
// configuration
void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }
// device interface
DECLARE_READ8_MEMBER( data_r );

View File

@ -72,28 +72,6 @@ ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, dev
clock_freq = clock;
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void ef9364_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<ef9364_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// static_set_nb_of_pages: Set the number of hardware pages
//-------------------------------------------------
void ef9364_device::static_set_nb_of_pages(device_t &device, int nb_of_pages )
{
if( nb_of_pages > 0 && nb_of_pages <= 8 )
{
downcast<ef9364_device &>(device).nb_of_pages = nb_of_pages;
}
}
//-------------------------------------------------
// set_color_entry: Set the color value
// into the palette

View File

@ -14,13 +14,13 @@
#pragma once
#define MCFG_EF9364_PALETTE(_palette_tag) \
ef9364_device::static_set_palette_tag(*device, "^" _palette_tag);
downcast<ef9364_device &>(*device).set_palette_tag("^" _palette_tag);
#define MCFG_EF9364_PAGES_CNT(_pages_number) \
ef9364_device::static_set_nb_of_pages(*device,_pages_number);
downcast<ef9364_device &>(*device).set_nb_of_pages(_pages_number);
#define MCFG_EF9364_IRQ_HANDLER(_devcb) \
devcb = &ef9364_device::set_irq_handler(*device, DEVCB_##_devcb);
devcb = &downcast<ef9364_device &>(*device).set_irq_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@ -42,9 +42,14 @@ public:
// construction/destruction
ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_nb_of_pages(device_t &device, int nb_bitplanes );
// configuration
void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }
void set_nb_of_pages(int nb_bitplanes) {
if (nb_bitplanes > 0 && nb_bitplanes <= 8)
{
nb_of_pages = nb_bitplanes;
}
}
// device interface
void update_scanline(uint16_t scanline);

View File

@ -208,78 +208,68 @@ ef9365_device::ef9365_device(const machine_config &mconfig, const char *tag, dev
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
// set_nb_of_bitplanes: Set the number of bitplanes
//-------------------------------------------------
void ef9365_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<ef9365_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// static_set_nb_of_bitplanes: Set the number of bitplanes
//-------------------------------------------------
void ef9365_device::static_set_nb_bitplanes(device_t &device, int nb_bitplanes )
void ef9365_device::set_nb_bitplanes(int nb_bitplanes)
{
if( nb_bitplanes > 0 && nb_bitplanes <= 8 )
{
downcast<ef9365_device &>(device).nb_of_bitplanes = nb_bitplanes;
downcast<ef9365_device &>(device).nb_of_colors = pow(2,nb_bitplanes);
nb_of_bitplanes = nb_bitplanes;
nb_of_colors = pow(2, nb_bitplanes);
}
}
//-------------------------------------------------
// static_set_display_mode: Set the display mode
// set_display_mode: Set the display mode
//-------------------------------------------------
void ef9365_device::static_set_display_mode(device_t &device, int display_mode )
void ef9365_device::set_display_mode(int display_mode)
{
switch(display_mode)
{
case DISPLAY_MODE_256x256:
downcast<ef9365_device &>(device).bitplane_xres = 256;
downcast<ef9365_device &>(device).bitplane_yres = 256;
downcast<ef9365_device &>(device).vsync_scanline_pos = 250;
downcast<ef9365_device &>(device).overflow_mask_x = 0xFF00;
downcast<ef9365_device &>(device).overflow_mask_y = 0xFF00;
bitplane_xres = 256;
bitplane_yres = 256;
vsync_scanline_pos = 250;
overflow_mask_x = 0xFF00;
overflow_mask_y = 0xFF00;
break;
case DISPLAY_MODE_512x512:
downcast<ef9365_device &>(device).bitplane_xres = 512;
downcast<ef9365_device &>(device).bitplane_yres = 512;
downcast<ef9365_device &>(device).vsync_scanline_pos = 506;
downcast<ef9365_device &>(device).overflow_mask_x = 0xFE00;
downcast<ef9365_device &>(device).overflow_mask_y = 0xFE00;
bitplane_xres = 512;
bitplane_yres = 512;
vsync_scanline_pos = 506;
overflow_mask_x = 0xFE00;
overflow_mask_y = 0xFE00;
break;
case DISPLAY_MODE_512x256:
downcast<ef9365_device &>(device).bitplane_xres = 512;
downcast<ef9365_device &>(device).bitplane_yres = 256;
downcast<ef9365_device &>(device).vsync_scanline_pos = 250;
downcast<ef9365_device &>(device).overflow_mask_x = 0xFE00;
downcast<ef9365_device &>(device).overflow_mask_y = 0xFF00;
bitplane_xres = 512;
bitplane_yres = 256;
vsync_scanline_pos = 250;
overflow_mask_x = 0xFE00;
overflow_mask_y = 0xFF00;
break;
case DISPLAY_MODE_128x128:
downcast<ef9365_device &>(device).bitplane_xres = 128;
downcast<ef9365_device &>(device).bitplane_yres = 128;
downcast<ef9365_device &>(device).vsync_scanline_pos = 124;
downcast<ef9365_device &>(device).overflow_mask_x = 0xFF80;
downcast<ef9365_device &>(device).overflow_mask_y = 0xFF80;
bitplane_xres = 128;
bitplane_yres = 128;
vsync_scanline_pos = 124;
overflow_mask_x = 0xFF80;
overflow_mask_y = 0xFF80;
break;
case DISPLAY_MODE_64x64:
downcast<ef9365_device &>(device).bitplane_xres = 64;
downcast<ef9365_device &>(device).bitplane_yres = 64;
downcast<ef9365_device &>(device).vsync_scanline_pos = 62;
downcast<ef9365_device &>(device).overflow_mask_x = 0xFFC0;
downcast<ef9365_device &>(device).overflow_mask_y = 0xFFC0;
bitplane_xres = 64;
bitplane_yres = 64;
vsync_scanline_pos = 62;
overflow_mask_x = 0xFFC0;
overflow_mask_y = 0xFFC0;
break;
default:
downcast<ef9365_device &>(device).logerror("Invalid EF9365 Display mode: %02x\n", display_mode);
downcast<ef9365_device &>(device).bitplane_xres = 256;
downcast<ef9365_device &>(device).bitplane_yres = 256;
downcast<ef9365_device &>(device).vsync_scanline_pos = 250;
downcast<ef9365_device &>(device).overflow_mask_x = 0xFF00;
downcast<ef9365_device &>(device).overflow_mask_y = 0xFF00;
logerror("Invalid EF9365 Display mode: %02x\n", display_mode);
bitplane_xres = 256;
bitplane_yres = 256;
vsync_scanline_pos = 250;
overflow_mask_x = 0xFF00;
overflow_mask_y = 0xFF00;
break;
}
}

View File

@ -14,16 +14,16 @@
#pragma once
#define MCFG_EF936X_PALETTE(palette_tag) \
ef9365_device::static_set_palette_tag(*device, ("^" palette_tag));
downcast<ef9365_device &>(*device).set_palette_tag(("^" palette_tag));
#define MCFG_EF936X_BITPLANES_CNT(bitplanes_number) \
ef9365_device::static_set_nb_bitplanes(*device, (bitplanes_number));
downcast<ef9365_device &>(*device).set_nb_bitplanes((bitplanes_number));
#define MCFG_EF936X_DISPLAYMODE(display_mode) \
ef9365_device::static_set_display_mode(*device, (ef9365_device::display_mode));
downcast<ef9365_device &>(*device).set_display_mode((ef9365_device::display_mode));
#define MCFG_EF936X_IRQ_HANDLER(cb) \
devcb = &ef9365_device::set_irq_handler(*device, (DEVCB_##cb));
devcb = &downcast<ef9365_device &>(*device).set_irq_handler((DEVCB_##cb));
//**************************************************************************
// TYPE DEFINITIONS
@ -48,11 +48,11 @@ public:
// construction/destruction
ef9365_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_nb_bitplanes(device_t &device, int nb_bitplanes );
static void static_set_display_mode(device_t &device, int display_mode );
template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<ef9365_device &>(device).m_irq_handler.set_callback(object); }
// configuration
void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }
void set_nb_bitplanes(int nb_bitplanes );
void set_display_mode(int display_mode );
template<class Object> devcb_base &set_irq_handler(Object object) { return m_irq_handler.set_callback(std::forward<Object>(object)); }
// device interface
DECLARE_READ8_MEMBER( data_r );

View File

@ -39,7 +39,7 @@
MCFG_DEVICE_ADD(_tag, EF9369, 0) \
#define MCFG_EF9369_COLOR_UPDATE_CB(_class, _method) \
ef9369_device::set_color_update_callback(*device, ef9369_device::color_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<ef9369_device &>(*device).set_color_update_callback(ef9369_device::color_update_delegate(&_class::_method, #_class "::" #_method, this));
//**************************************************************************
@ -59,7 +59,7 @@ public:
ef9369_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
static void set_color_update_callback(device_t &device, color_update_delegate &&cb) { downcast<ef9369_device &>(device).m_color_update_cb = std::move(cb); }
template <typename Object> void set_color_update_callback(Object &&cb) { m_color_update_cb = std::forward<Object>(cb); }
DECLARE_READ8_MEMBER(data_r);
DECLARE_WRITE8_MEMBER(data_w);

View File

@ -10,7 +10,7 @@
MCFG_DEVICE_ADD(_tag, EPIC12, 0)
#define MCFG_EPIC12_SET_MAINRAMSIZE( _rgn ) \
epic12_device::set_mainramsize(*device, _rgn);
downcast<epic12_device &>(*device).set_mainramsize(_rgn);
class epic12_device : public device_t, public device_video_interface
@ -25,11 +25,10 @@ public:
inline uint16_t READ_NEXT_WORD(offs_t *addr);
static void set_mainramsize(device_t &device, int ramsize)
void set_mainramsize(int ramsize)
{
epic12_device &dev = downcast<epic12_device &>(device);
dev.m_main_ramsize = ramsize;
dev.m_main_rammask = ramsize-1;
m_main_ramsize = ramsize;
m_main_rammask = ramsize-1;
}
static void *blit_request_callback(void *param, int threadid);

View File

@ -29,22 +29,22 @@
MCFG_VIDEO_SET_SCREEN(_screen_tag)
#define MCFG_FIXFREQ_MONITOR_CLOCK(_clock) \
fixedfreq_device::set_minitor_clock(*device, _clock);
downcast<fixedfreq_device &>(*device).set_minitor_clock(_clock);
#define MCFG_FIXFREQ_HORZ_PARAMS(_visible, _frontporch, _sync, _backporch) \
fixedfreq_device::set_horz_params(*device, _visible, _frontporch, _sync, _backporch);
downcast<fixedfreq_device &>(*device).set_horz_params(_visible, _frontporch, _sync, _backporch);
#define MCFG_FIXFREQ_VERT_PARAMS(_visible, _frontporch, _sync, _backporch) \
fixedfreq_device::set_vert_params(*device, _visible, _frontporch, _sync, _backporch);
downcast<fixedfreq_device &>(*device).set_vert_params(_visible, _frontporch, _sync, _backporch);
#define MCFG_FIXFREQ_FIELDCOUNT(_count) \
fixedfreq_device::set_fieldcount(*device, _count);
downcast<fixedfreq_device &>(*device).set_fieldcount(_count);
#define MCFG_FIXFREQ_SYNC_THRESHOLD(_threshold) \
fixedfreq_device::set_threshold(*device, _threshold);
downcast<fixedfreq_device &>(*device).set_threshold(_threshold);
#define MCFG_FIXFREQ_GAIN(_gain) \
fixedfreq_device::set_gain(*device, _gain);
downcast<fixedfreq_device &>(*device).set_gain(_gain);
// pre-defined configurations
@ -74,25 +74,23 @@ public:
fixedfreq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
static void set_minitor_clock(device_t &device, uint32_t clock) { downcast<fixedfreq_device &>(device).m_monitor_clock = clock; }
static void set_fieldcount(device_t &device, int count) { downcast<fixedfreq_device &>(device).m_fieldcount = count; }
static void set_threshold(device_t &device, double threshold) { downcast<fixedfreq_device &>(device).m_sync_threshold = threshold; }
static void set_gain(device_t &device, double gain) { downcast<fixedfreq_device &>(device).m_gain = gain; }
static void set_horz_params(device_t &device, int visible, int frontporch, int sync, int backporch)
void set_minitor_clock(uint32_t clock) { m_monitor_clock = clock; }
void set_fieldcount(int count) { m_fieldcount = count; }
void set_threshold(double threshold) { m_sync_threshold = threshold; }
void set_gain(double gain) { m_gain = gain; }
void set_horz_params(int visible, int frontporch, int sync, int backporch)
{
fixedfreq_device &dev = downcast<fixedfreq_device &>(device);
dev.m_hvisible = visible;
dev.m_hfrontporch = frontporch;
dev.m_hsync = sync;
dev.m_hbackporch = backporch;
m_hvisible = visible;
m_hfrontporch = frontporch;
m_hsync = sync;
m_hbackporch = backporch;
}
static void set_vert_params(device_t &device, int visible, int frontporch, int sync, int backporch)
void set_vert_params(int visible, int frontporch, int sync, int backporch)
{
fixedfreq_device &dev = downcast<fixedfreq_device &>(device);
dev.m_vvisible = visible;
dev.m_vfrontporch = frontporch;
dev.m_vsync = sync;
dev.m_vbackporch = backporch;
m_vvisible = visible;
m_vfrontporch = frontporch;
m_vsync = sync;
m_vbackporch = backporch;
}
virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);

View File

@ -21,7 +21,7 @@ class dmg_ppu_device : public device_t,
public:
dmg_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_lr35902_tag(device_t &device, const char *tag) { downcast<dmg_ppu_device &>(device).m_lr35902.set_tag(tag); }
void set_lr35902_tag(const char *tag) { m_lr35902.set_tag(tag); }
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -295,19 +295,19 @@ DECLARE_DEVICE_TYPE(CGB_PPU, cgb_ppu_device)
#define MCFG_DMG_PPU_ADD(_tag, _cpu_tag ) \
MCFG_DEVICE_ADD( _tag, DMG_PPU, 0 ) \
dmg_ppu_device::static_set_lr35902_tag(*device, "^" _cpu_tag);
downcast<dmg_ppu_device &>(*device).set_lr35902_tag("^" _cpu_tag);
#define MCFG_MGB_PPU_ADD(_tag, _cpu_tag ) \
MCFG_DEVICE_ADD( _tag, MGB_PPU, 0 ) \
dmg_ppu_device::static_set_lr35902_tag(*device, "^" _cpu_tag);
downcast<dmg_ppu_device &>(*device).set_lr35902_tag("^" _cpu_tag);
#define MCFG_SGB_PPU_ADD(_tag, _cpu_tag ) \
MCFG_DEVICE_ADD( _tag, SGB_PPU, 0 ) \
dmg_ppu_device::static_set_lr35902_tag(*device, "^" _cpu_tag);
downcast<dmg_ppu_device &>(*device).set_lr35902_tag("^" _cpu_tag);
#define MCFG_CGB_PPU_ADD(_tag, _cpu_tag ) \
MCFG_DEVICE_ADD( _tag, CGB_PPU, 0 ) \
dmg_ppu_device::static_set_lr35902_tag(*device, "^" _cpu_tag);
downcast<dmg_ppu_device &>(*device).set_lr35902_tag("^" _cpu_tag);
#endif // MAME_VIDEO_GB_LCD_H

View File

@ -33,19 +33,19 @@ DECLARE_DEVICE_TYPE(GBA_LCD, gba_lcd_device)
MCFG_DEVICE_ADD(_tag, GBA_LCD, 0)
#define MCFG_GBA_LCD_INT_HBLANK(_devcb) \
devcb = &gba_lcd_device::set_int_hblank_callback(*device, DEVCB_##_devcb);
devcb = &downcast<gba_lcd_device &>(*device).set_int_hblank_callback(DEVCB_##_devcb);
#define MCFG_GBA_LCD_INT_VBLANK(_devcb) \
devcb = &gba_lcd_device::set_int_vblank_callback(*device, DEVCB_##_devcb);
devcb = &downcast<gba_lcd_device &>(*device).set_int_vblank_callback(DEVCB_##_devcb);
#define MCFG_GBA_LCD_INT_VCOUNT(_devcb) \
devcb = &gba_lcd_device::set_int_vcount_callback(*device, DEVCB_##_devcb);
devcb = &downcast<gba_lcd_device &>(*device).set_int_vcount_callback(DEVCB_##_devcb);
#define MCFG_GBA_LCD_DMA_HBLANK(_devcb) \
devcb = &gba_lcd_device::set_dma_hblank_callback(*device, DEVCB_##_devcb);
devcb = &downcast<gba_lcd_device &>(*device).set_dma_hblank_callback(DEVCB_##_devcb);
#define MCFG_GBA_LCD_DMA_VBLANK(_devcb) \
devcb = &gba_lcd_device::set_dma_vblank_callback(*device, DEVCB_##_devcb);
devcb = &downcast<gba_lcd_device &>(*device).set_dma_vblank_callback(DEVCB_##_devcb);
//**************************************************************************
@ -99,30 +99,11 @@ public:
TIMER_CALLBACK_MEMBER(perform_hbl);
TIMER_CALLBACK_MEMBER(perform_scan);
template <class Object> static devcb_base &set_int_hblank_callback(device_t &device, Object &&cb)
{
return downcast<gba_lcd_device &>(device).m_int_hblank_cb.set_callback(std::forward<Object>(cb));
}
template <class Object> static devcb_base &set_int_vblank_callback(device_t &device, Object &&cb)
{
return downcast<gba_lcd_device &>(device).m_int_vblank_cb.set_callback(std::forward<Object>(cb));
}
template <class Object> static devcb_base &set_int_vcount_callback(device_t &device, Object &&cb)
{
return downcast<gba_lcd_device &>(device).m_int_vcount_cb.set_callback(std::forward<Object>(cb));
}
template <class Object> static devcb_base &set_dma_hblank_callback(device_t &device, Object &&cb)
{
return downcast<gba_lcd_device &>(device).m_dma_hblank_cb.set_callback(std::forward<Object>(cb));
}
template <class Object> static devcb_base &set_dma_vblank_callback(device_t &device, Object &&cb)
{
return downcast<gba_lcd_device &>(device).m_dma_vblank_cb.set_callback(std::forward<Object>(cb));
}
template <class Object> devcb_base &set_int_hblank_callback(Object &&cb) { return m_int_hblank_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_int_vblank_callback(Object &&cb) { return m_int_vblank_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_int_vcount_callback(Object &&cb) { return m_int_vcount_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_hblank_callback(Object &&cb) { return m_dma_hblank_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_vblank_callback(Object &&cb) { return m_dma_vblank_cb.set_callback(std::forward<Object>(cb)); }
protected:
// device-level overrides

View File

@ -78,19 +78,6 @@ hd44102_device::hd44102_device(const machine_config &mconfig, const char *tag, d
}
//-------------------------------------------------
// static_set_offsets - configuration helper
//-------------------------------------------------
void hd44102_device::static_set_offsets(device_t &device, int sx, int sy)
{
hd44102_device &hd44102 = downcast<hd44102_device &>(device);
hd44102.m_sx = sx;
hd44102.m_sy = sy;
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------

View File

@ -21,7 +21,7 @@
#define MCFG_HD44102_ADD(_tag, _screen_tag, _sx, _sy) \
MCFG_DEVICE_ADD(_tag, HD44102, 0) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
hd44102_device::static_set_offsets(*device, _sx, _sy);
downcast<hd44102_device &>(*device).set_offsets(_sx, _sy);
@ -39,7 +39,7 @@ public:
hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
static void static_set_offsets(device_t &device, int sx, int sy);
void set_offsets(int sx, int sy) { m_sx = sx; m_sy = sy; }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -13,7 +13,7 @@
#define MCFG_HD44352_ON_CB(_devcb) \
devcb = &hd44352_device::set_on_callback(*device, DEVCB_##_devcb);
devcb = &downcast<hd44352_device &>(*device).set_on_callback(DEVCB_##_devcb);
//**************************************************************************
@ -28,7 +28,7 @@ public:
// construction/destruction
hd44352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_on_callback(device_t &device, Object &&cb) { return downcast<hd44352_device &>(device).m_on_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_on_callback(Object &&cb) { return m_on_cb.set_callback(std::forward<Object>(cb)); }
// device interface
uint8_t data_read();

View File

@ -19,10 +19,10 @@
MCFG_DEVICE_ADD( _tag, KS0066_F05, 0 )
#define MCFG_HD44780_LCD_SIZE(_lines, _chars) \
hd44780_device::static_set_lcd_size(*device, _lines, _chars);
downcast<hd44780_device &>(*device).set_lcd_size(_lines, _chars);
#define MCFG_HD44780_PIXEL_UPDATE_CB(_class, _method) \
hd44780_device::static_set_pixel_update_cb(*device, hd44780_device::pixel_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<hd44780_device &>(*device).set_pixel_update_cb(hd44780_device::pixel_update_delegate(&_class::_method, #_class "::" #_method, this));
//**************************************************************************
// TYPE DEFINITIONS
@ -42,8 +42,8 @@ public:
hd44780_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
static void static_set_lcd_size(device_t &device, int _lines, int _chars) { hd44780_device &dev=downcast<hd44780_device &>(device); dev.m_lines = _lines; dev.m_chars = _chars; }
static void static_set_pixel_update_cb(device_t &device, pixel_update_delegate &&cb) { downcast<hd44780_device &>(device).m_pixel_update_cb = std::move(cb); }
void set_lcd_size(int lines, int chars) { m_lines = lines; m_chars = chars; }
template <typename Object> void set_pixel_update_cb(Object &&cb) { m_pixel_update_cb = std::forward<Object>(cb); }
// device interface
virtual DECLARE_WRITE8_MEMBER(write);

View File

@ -19,7 +19,7 @@
//**************************************************************************
#define MCFG_HD61830_RD_CALLBACK(_read) \
devcb = &hd61830_device::set_rd_rd_callback(*device, DEVCB_##_read);
devcb = &downcast<hd61830_device &>(*device).set_rd_rd_callback(DEVCB_##_read);
@ -37,7 +37,7 @@ public:
// construction/destruction
hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_rd_rd_callback(device_t &device, Object &&cb) { return downcast<hd61830_device &>(device).m_read_rd.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_rd_rd_callback(Object &&cb) { return m_read_rd.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( status_r );
DECLARE_WRITE8_MEMBER( control_w );

View File

@ -26,15 +26,15 @@
MCFG_DEVICE_ADDRESS_MAP(0, _map)
#define MCFG_HD63484_DISPLAY_CALLBACK_OWNER(_class, _method) \
hd63484_device::static_set_display_callback(*device, hd63484_device::display_delegate(&_class::_method, #_class "::" #_method, this));
downcast<hd63484_device &>(*device).set_display_callback(hd63484_device::display_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_HD63484_AUTO_CONFIGURE_SCREEN(_val) \
hd63484_device::static_set_auto_configure_screen(*device, _val);
downcast<hd63484_device &>(*device).set_auto_configure_screen(_val);
#define HD63484_DISPLAY_PIXELS_MEMBER(_name) void _name(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, int x, uint16_t data)
#define MCFG_HD63484_EXTERNAL_SKEW(_val) \
hd63484_device::static_set_external_skew(*device, _val);
downcast<hd63484_device &>(*device).set_external_skew(_val);
// ======================> hd63484_device
@ -49,9 +49,9 @@ public:
// construction/destruction
hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_display_callback(device_t &device, display_delegate &&cb) { downcast<hd63484_device &>(device).m_display_cb = std::move(cb); }
static void static_set_auto_configure_screen(device_t &device, bool auto_configure_screen) { downcast<hd63484_device &>(device).m_auto_configure_screen = auto_configure_screen; }
static void static_set_external_skew(device_t &device, int skew) { downcast<hd63484_device &>(device).m_external_skew = skew; }
template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
void set_auto_configure_screen(bool auto_configure_screen) { m_auto_configure_screen = auto_configure_screen; }
void set_external_skew(int skew) { m_external_skew = skew; }
DECLARE_WRITE16_MEMBER( address16_w );
DECLARE_WRITE16_MEMBER( data16_w );

View File

@ -43,11 +43,11 @@
// COL/ROW pins (offset for ROW)
#define MCFG_HLCD0515_WRITE_COLS_CB(_devcb) \
devcb = &hlcd0515_device::set_write_cols_callback(*device, DEVCB_##_devcb);
devcb = &downcast<hlcd0515_device &>(*device).set_write_cols_callback(DEVCB_##_devcb);
// DATA OUT pin, don't use on HLCD0569
#define MCFG_HLCD0515_WRITE_DATA_CB(_devcb) \
devcb = &hlcd0515_device::set_write_data_callback(*device, DEVCB_##_devcb);
devcb = &downcast<hlcd0515_device &>(*device).set_write_data_callback(DEVCB_##_devcb);
class hlcd0515_device : public device_t
@ -55,9 +55,9 @@ class hlcd0515_device : public device_t
public:
hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// static configuration helpers
template <typename Object> static devcb_base &set_write_cols_callback(device_t &device, Object &&cb) { return downcast<hlcd0515_device &>(device).m_write_cols.set_callback(std::forward<Object>(cb)); }
template <typename Object> static devcb_base &set_write_data_callback(device_t &device, Object &&cb) { return downcast<hlcd0515_device &>(device).m_write_data.set_callback(std::forward<Object>(cb)); }
// configuration helpers
template <typename Object> devcb_base &set_write_cols_callback(Object &&cb) { return m_write_cols.set_callback(std::forward<Object>(cb)); }
template <typename Object> devcb_base &set_write_data_callback(Object &&cb) { return m_write_data.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE_LINE_MEMBER(write_clock);
DECLARE_WRITE_LINE_MEMBER(write_cs);

View File

@ -42,11 +42,11 @@
// C/R pins (0538: d0-d7 for rows)
#define MCFG_HLCD0538_WRITE_COLS_CB(_devcb) \
devcb = &hlcd0538_device::set_write_cols_callback(*device, DEVCB_##_devcb);
devcb = &downcast<hlcd0538_device &>(*device).set_write_cols_callback(DEVCB_##_devcb);
// INTERRUPT pin
#define MCFG_HLCD0538_INTERRUPT_CB(_devcb) \
devcb = &hlcd0538_device::set_write_interrupt_callback(*device, DEVCB_##_devcb);
devcb = &downcast<hlcd0538_device &>(*device).set_write_interrupt_callback(DEVCB_##_devcb);
class hlcd0538_device : public device_t
@ -54,9 +54,9 @@ class hlcd0538_device : public device_t
public:
hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// static configuration helpers
template <typename Object> static devcb_base &set_write_cols_callback(device_t &device, Object &&cb) { return downcast<hlcd0538_device &>(device).m_write_cols.set_callback(std::forward<Object>(cb)); }
template <typename Object> static devcb_base &set_write_interrupt_callback(device_t &device, Object &&cb) { return downcast<hlcd0538_device &>(device).m_write_interrupt.set_callback(std::forward<Object>(cb)); }
// configuration helpers
template <typename Object> devcb_base &set_write_cols_callback(Object &&cb) { return m_write_cols.set_callback(std::forward<Object>(cb)); }
template <typename Object> devcb_base &set_write_interrupt_callback(Object &&cb) { return m_write_interrupt.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE_LINE_MEMBER(write_clk);
DECLARE_WRITE_LINE_MEMBER(write_lcd);

View File

@ -13,40 +13,40 @@
#define MCFG_HUC6202_NEXT_PIXEL_0_CB(_devcb) \
devcb = &huc6202_device::set_next_pixel_0_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_next_pixel_0_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_TIME_TIL_NEXT_EVENT_0_CB(_devcb) \
devcb = &huc6202_device::set_time_til_next_event_0_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_time_til_next_event_0_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_VSYNC_CHANGED_0_CB(_devcb) \
devcb = &huc6202_device::set_vsync_changed_0_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_vsync_changed_0_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_HSYNC_CHANGED_0_CB(_devcb) \
devcb = &huc6202_device::set_hsync_changed_0_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_hsync_changed_0_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_READ_0_CB(_devcb) \
devcb = &huc6202_device::set_read_0_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_read_0_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_WRITE_0_CB(_devcb) \
devcb = &huc6202_device::set_write_0_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_write_0_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_NEXT_PIXEL_1_CB(_devcb) \
devcb = &huc6202_device::set_next_pixel_1_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_next_pixel_1_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_TIME_TIL_NEXT_EVENT_1_CB(_devcb) \
devcb = &huc6202_device::set_time_til_next_event_1_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_time_til_next_event_1_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_VSYNC_CHANGED_1_CB(_devcb) \
devcb = &huc6202_device::set_vsync_changed_1_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_vsync_changed_1_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_HSYNC_CHANGED_1_CB(_devcb) \
devcb = &huc6202_device::set_hsync_changed_1_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_hsync_changed_1_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_READ_1_CB(_devcb) \
devcb = &huc6202_device::set_read_1_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_read_1_callback(DEVCB_##_devcb);
#define MCFG_HUC6202_WRITE_1_CB(_devcb) \
devcb = &huc6202_device::set_write_1_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6202_device &>(*device).set_write_1_callback(DEVCB_##_devcb);
class huc6202_device : public device_t
@ -55,18 +55,18 @@ public:
// construction/destruction
huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_next_pixel_0_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_next_pixel_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_time_til_next_event_0_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_time_til_next_event_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vsync_changed_0_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_vsync_changed_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hsync_changed_0_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_hsync_changed_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_read_0_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_read_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_write_0_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_write_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_next_pixel_1_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_next_pixel_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_time_til_next_event_1_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_time_til_next_event_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vsync_changed_1_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_vsync_changed_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hsync_changed_1_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_hsync_changed_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_read_1_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_read_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_write_1_callback(device_t &device, Object &&cb) { return downcast<huc6202_device &>(device).m_write_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_next_pixel_0_callback(Object &&cb) { return m_next_pixel_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_time_til_next_event_0_callback(Object &&cb) { return m_time_til_next_event_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vsync_changed_0_callback(Object &&cb) { return m_vsync_changed_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hsync_changed_0_callback(Object &&cb) { return m_hsync_changed_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_read_0_callback(Object &&cb) { return m_read_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_write_0_callback(Object &&cb) { return m_write_0_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_next_pixel_1_callback(Object &&cb) { return m_next_pixel_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_time_til_next_event_1_callback(Object &&cb) { return m_time_til_next_event_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vsync_changed_1_callback(Object &&cb) { return m_vsync_changed_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hsync_changed_1_callback(Object &&cb) { return m_hsync_changed_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_read_1_callback(Object &&cb) { return m_read_1_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_write_1_callback(Object &&cb) { return m_write_1_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -13,16 +13,16 @@
#define MCFG_HUC6260_NEXT_PIXEL_DATA_CB(_devcb) \
devcb = &huc6260_device::set_next_pixel_data_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6260_device &>(*device).set_next_pixel_data_callback(DEVCB_##_devcb);
#define MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(_devcb) \
devcb = &huc6260_device::set_time_til_next_event_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6260_device &>(*device).set_time_til_next_event_callback(DEVCB_##_devcb);
#define MCFG_HUC6260_VSYNC_CHANGED_CB(_devcb) \
devcb = &huc6260_device::set_vsync_changed_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6260_device &>(*device).set_vsync_changed_callback(DEVCB_##_devcb);
#define MCFG_HUC6260_HSYNC_CHANGED_CB(_devcb) \
devcb = &huc6260_device::set_hsync_changed_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6260_device &>(*device).set_hsync_changed_callback(DEVCB_##_devcb);
class huc6260_device : public device_t,
@ -39,10 +39,10 @@ public:
// construction/destruction
huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_next_pixel_data_callback(device_t &device, Object &&cb) { return downcast<huc6260_device &>(device).m_next_pixel_data_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_time_til_next_event_callback(device_t &device, Object &&cb) { return downcast<huc6260_device &>(device).m_time_til_next_event_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vsync_changed_callback(device_t &device, Object &&cb) { return downcast<huc6260_device &>(device).m_vsync_changed_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hsync_changed_callback(device_t &device, Object &&cb) { return downcast<huc6260_device &>(device).m_hsync_changed_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_next_pixel_data_callback(Object &&cb) { return m_next_pixel_data_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_time_til_next_event_callback(Object &&cb) { return m_time_til_next_event_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vsync_changed_callback(Object &&cb) { return m_vsync_changed_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hsync_changed_callback(Object &&cb) { return m_hsync_changed_cb.set_callback(std::forward<Object>(cb)); }
void video_update(bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_READ8_MEMBER( read );

View File

@ -16,13 +16,13 @@
#define MCFG_HUC6261_VDC1(_tag) \
huc6261_device::set_vdc1_tag(*device, _tag);
downcast<huc6261_device &>(*device).set_vdc1_tag(_tag);
#define MCFG_HUC6261_VDC2(_tag) \
huc6261_device::set_vdc2_tag(*device, _tag);
downcast<huc6261_device &>(*device).set_vdc2_tag(_tag);
#define MCFG_HUC6261_KING(_tag) \
huc6261_device::set_king_tag(*device, _tag);
downcast<huc6261_device &>(*device).set_king_tag(_tag);
class huc6261_device : public device_t,
@ -36,9 +36,9 @@ public:
// construction/destruction
huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_vdc1_tag(device_t &device, const char *tag) { downcast<huc6261_device &>(device).m_huc6270_a_tag = tag; }
static void set_vdc2_tag(device_t &device, const char *tag) { downcast<huc6261_device &>(device).m_huc6270_b_tag = tag; }
static void set_king_tag(device_t &device, const char *tag) { downcast<huc6261_device &>(device).m_huc6272_tag = tag; }
void set_vdc1_tag(const char *tag) { m_huc6270_a_tag = tag; }
void set_vdc2_tag(const char *tag) { m_huc6270_b_tag = tag; }
void set_king_tag(const char *tag) { m_huc6272_tag = tag; }
void video_update(bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_READ16_MEMBER( read );

View File

@ -13,10 +13,10 @@
#define MCFG_HUC6270_VRAM_SIZE(_size) \
huc6270_device::set_vram_size(*device, _size);
downcast<huc6270_device &>(*device).set_vram_size(_size);
#define MCFG_HUC6270_IRQ_CHANGED_CB(_devcb) \
devcb = &huc6270_device::set_irq_changed_callback(*device, DEVCB_##_devcb);
devcb = &downcast<huc6270_device &>(*device).set_irq_changed_callback(DEVCB_##_devcb);
class huc6270_device : public device_t
{
@ -24,8 +24,8 @@ public:
// construction/destruction
huc6270_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_vram_size(device_t &device, uint32_t vram_size) { downcast<huc6270_device &>(device).m_vram_size = vram_size; }
template <class Object> static devcb_base &set_irq_changed_callback(device_t &device, Object &&cb) { return downcast<huc6270_device &>(device).m_irq_changed_cb.set_callback(std::forward<Object>(cb)); }
void set_vram_size(uint32_t vram_size) { m_vram_size = vram_size; }
template <class Object> devcb_base &set_irq_changed_callback(Object &&cb) { return m_irq_changed_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -24,10 +24,10 @@
MCFG_DEVICE_ADD((tag), HUC6272, (freq))
#define MCFG_HUC6272_IRQ_CHANGED_CB(cb) \
devcb = &huc6272_device::set_irq_changed_callback(*device, (DEVCB_##cb));
devcb = &downcast<huc6272_device &>(*device).set_irq_changed_callback((DEVCB_##cb));
#define MCFG_HUC6272_RAINBOW(tag) \
huc6272_device::set_rainbow_tag(*device, (tag));
downcast<huc6272_device &>(*device).set_rainbow_tag((tag));
//**************************************************************************
@ -43,8 +43,8 @@ public:
// construction/destruction
huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_irq_changed_callback(device_t &device, Object &&cb) { return downcast<huc6272_device &>(device).m_irq_changed_cb.set_callback(std::forward<Object>(cb)); }
static void set_rainbow_tag(device_t &device, const char *tag) { downcast<huc6272_device &>(device).m_huc6271_tag = tag; }
template <class Object> devcb_base &set_irq_changed_callback(Object &&cb) { return m_irq_changed_cb.set_callback(std::forward<Object>(cb)); }
void set_rainbow_tag(const char *tag) { m_huc6271_tag = tag; }
// I/O operations
DECLARE_WRITE32_MEMBER( write );

View File

@ -25,9 +25,9 @@
MCFG_I8244_IRQ_CB(_irq_cb) \
MCFG_I8244_POSTPROCESS_CB(_postprocess_cb)
#define MCFG_I8244_IRQ_CB(_devcb) \
devcb = &i8244_device::set_irq_cb(*device, DEVCB_##_devcb);
devcb = &downcast<i8244_device &>(*device).set_irq_cb(DEVCB_##_devcb);
#define MCFG_I8244_POSTPROCESS_CB(_devcb) \
devcb = &i8244_device::set_postprocess_cb(*device, DEVCB_##_devcb);
devcb = &downcast<i8244_device &>(*device).set_postprocess_cb(DEVCB_##_devcb);
#define MCFG_I8245_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \
MCFG_DEVICE_ADD(_tag, I8245, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
@ -49,9 +49,9 @@ public:
// construction/destruction
i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template <class Object> static devcb_base &set_irq_cb(device_t &device, Object &&cb) { return downcast<i8244_device &>(device).m_irq_func.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_postprocess_cb(device_t &device, Object &&cb) { return downcast<i8244_device &>(device).m_postprocess_func.set_callback(std::forward<Object>(cb)); }
// configuration helpers
template <class Object> devcb_base &set_irq_cb(Object &&cb) { return m_irq_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_postprocess_cb(Object &&cb) { return m_postprocess_func.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);

View File

@ -72,16 +72,6 @@ i82730_device::i82730_device(const machine_config &mconfig, const char *tag, dev
{
}
//-------------------------------------------------
// set_cpu_tag - set cpu we are attached to
//-------------------------------------------------
void i82730_device::set_cpu_tag(device_t &device, device_t *owner, const char *tag)
{
i82730_device &dev = dynamic_cast<i82730_device &>(device);
dev.m_cpu_tag = tag;
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------

View File

@ -21,13 +21,13 @@
#define MCFG_I82730_ADD(_tag, _cpu_tag, _clock) \
MCFG_DEVICE_ADD(_tag, I82730, _clock) \
i82730_device::set_cpu_tag(*device, this, _cpu_tag);
downcast<i82730_device &>(*device).set_cpu_tag(_cpu_tag);
#define MCFG_I82730_SINT_HANDLER(_devcb) \
devcb = &i82730_device::set_sint_handler(*device, DEVCB_##_devcb);
devcb = &downcast<i82730_device &>(*device).set_sint_handler(DEVCB_##_devcb);
#define MCFG_I82730_UPDATE_ROW_CB(_class, _method) \
i82730_device::set_update_row_callback(*device, i82730_device::update_row_delegate(&_class::_method, #_class "::" #_method, this));
downcast<i82730_device &>(*device).set_update_row_callback(i82730_device::update_row_delegate(&_class::_method, #_class "::" #_method, this));
//**************************************************************************
@ -49,12 +49,11 @@ public:
i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// callbacks
template <class Object> static devcb_base &set_sint_handler(device_t &device, Object &&cb)
{ return downcast<i82730_device &>(device).m_sint_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_sint_handler(Object &&cb) { return m_sint_handler.set_callback(std::forward<Object>(cb)); }
// inline configuration
static void set_cpu_tag(device_t &device, device_t *owner, const char *tag);
static void set_update_row_callback(device_t &device, update_row_delegate &&cb) { downcast<i82730_device &>(device).m_update_row_cb = std::move(cb); }
void set_cpu_tag(const char *tag) { m_cpu_tag = tag; }
template <typename Object> void set_update_row_callback(Object &&cb) { m_update_row_cb = std::forward<Object>(cb); }
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);

View File

@ -45,22 +45,22 @@
#define MCFG_I8275_CHARACTER_WIDTH(_value) \
i8275_device::static_set_character_width(*device, _value);
downcast<i8275_device &>(*device).set_character_width(_value);
#define MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \
i8275_device::static_set_display_callback(*device, i8275_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
downcast<i8275_device &>(*device).set_display_callback(i8275_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_I8275_DRQ_CALLBACK(_write) \
devcb = &i8275_device::set_drq_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<i8275_device &>(*device).set_drq_wr_callback(DEVCB_##_write);
#define MCFG_I8275_IRQ_CALLBACK(_write) \
devcb = &i8275_device::set_irq_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<i8275_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_I8275_HRTC_CALLBACK(_write) \
devcb = &i8275_device::set_hrtc_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<i8275_device &>(*device).set_hrtc_wr_callback(DEVCB_##_write);
#define MCFG_I8275_VRTC_CALLBACK(_write) \
devcb = &i8275_device::set_vrtc_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<i8275_device &>(*device).set_vrtc_wr_callback(DEVCB_##_write);
@ -80,13 +80,13 @@ public:
// construction/destruction
i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_character_width(device_t &device, int value) { downcast<i8275_device &>(device).m_hpixels_per_column = value; }
static void static_set_display_callback(device_t &device, draw_character_delegate &&cb) { downcast<i8275_device &>(device).m_display_cb = std::move(cb); }
void set_character_width(int value) { m_hpixels_per_column = value; }
template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
template <class Object> static devcb_base &set_drq_wr_callback(device_t &device, Object &&cb) { return downcast<i8275_device &>(device).m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_irq_wr_callback(device_t &device, Object &&cb) { return downcast<i8275_device &>(device).m_write_irq.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hrtc_wr_callback(device_t &device, Object &&cb) { return downcast<i8275_device &>(device).m_write_hrtc.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vrtc_wr_callback(device_t &device, Object &&cb) { return downcast<i8275_device &>(device).m_write_vrtc.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_drq_wr_callback(Object &&cb) { return m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hrtc_wr_callback(Object &&cb) { return m_write_hrtc.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vrtc_wr_callback(Object &&cb) { return m_write_vrtc.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -252,33 +252,6 @@ MACHINE_CONFIG_START(imagetek_i4100_device::device_add_mconfig)
MACHINE_CONFIG_END
//-------------------------------------------------
// static_set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
void imagetek_i4100_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
{
downcast<imagetek_i4100_device &>(device).m_gfxdecode.set_tag(tag);
}
void imagetek_i4100_device::static_set_tmap_xoffsets(device_t &device, int x1, int x2, int x3)
{
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldx[0] = x1;
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldx[1] = x2;
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldx[2] = x3;
}
void imagetek_i4100_device::static_set_tmap_yoffsets(device_t &device, int y1, int y2, int y3)
{
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldy[0] = y1;
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldy[1] = y2;
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldy[2] = y3;
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------

View File

@ -19,16 +19,16 @@
//**************************************************************************
#define MCFG_I4100_GFXDECODE(gfxtag) \
imagetek_i4100_device::static_set_gfxdecode_tag(*device, ("^" gfxtag));
downcast<imagetek_i4100_device &>(*device).set_gfxdecode_tag(("^" gfxtag));
#define MCFG_I4100_BLITTER_END_CALLBACK(_devcb) \
devcb = &imagetek_i4100_device::static_set_blitter_irq_callback(*device, DEVCB_##_devcb);
devcb = &downcast<imagetek_i4100_device &>(*device).set_blitter_irq_callback(DEVCB_##_devcb);
#define MCFG_I4100_TILEMAP_XOFFSETS(_a, _b, _c) \
imagetek_i4100_device::static_set_tmap_xoffsets(*device, _a, _b, _c);
downcast<imagetek_i4100_device &>(*device).set_tmap_xoffsets(_a, _b, _c);
#define MCFG_I4100_TILEMAP_YOFFSETS(_a, _b, _c) \
imagetek_i4100_device::static_set_tmap_yoffsets(*device, _a, _b, _c);
downcast<imagetek_i4100_device &>(*device).set_tmap_yoffsets(_a, _b, _c);
//**************************************************************************
@ -46,11 +46,11 @@ public:
void map(address_map &map);
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
static void static_set_tmap_xoffsets(device_t &device, int x1, int x2, int x3);
static void static_set_tmap_yoffsets(device_t &device, int y1, int y2, int y3);
void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); }
void set_tmap_xoffsets(int x1, int x2, int x3) { m_tilemap_scrolldx[0] = x1; m_tilemap_scrolldx[1] = x2; m_tilemap_scrolldx[2] = x3; }
void set_tmap_yoffsets(int y1, int y2, int y3) { m_tilemap_scrolldy[0] = y1; m_tilemap_scrolldy[1] = y2; m_tilemap_scrolldy[2] = y3; }
template <class Object> static devcb_base &static_set_blitter_irq_callback(device_t &device, Object &&cb) { return downcast<imagetek_i4100_device &>(device).m_blit_irq_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_blitter_irq_callback(Object &&cb) { return m_blit_irq_cb.set_callback(std::forward<Object>(cb)); }
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -35,16 +35,6 @@ TODO:
// device type definition
DEFINE_DEVICE_TYPE(MB_VCU, mb_vcu_device, "mb_vcu", "Mazer Blazer custom VCU")
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void mb_vcu_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<mb_vcu_device &>(device).m_palette.set_tag(tag);
}
ADDRESS_MAP_START(mb_vcu_device::mb_vcu_vram)
AM_RANGE(0x00000,0x7ffff) AM_RAM // enough for a 256x256x4 x 2 pages of framebuffer with 4 layers (TODO: doubled for simplicity)

View File

@ -20,9 +20,9 @@ public:
// construction/destruction
mb_vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
static void static_set_palette_tag(device_t &device, const char *tag);
static void set_cpu_tag(device_t &device, const char *tag) { downcast<mb_vcu_device &>(device).m_cpu.set_tag(tag); }
// configuration
void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }
void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); }
// I/O operations
DECLARE_WRITE8_MEMBER( write_vregs );
@ -90,9 +90,9 @@ DECLARE_DEVICE_TYPE(MB_VCU, mb_vcu_device)
//**************************************************************************
#define MCFG_MB_VCU_CPU(_tag) \
mb_vcu_device::set_cpu_tag(*device, "^" _tag);
downcast<mb_vcu_device &>(*device).set_cpu_tag("^" _tag);
#define MCFG_MB_VCU_PALETTE(_palette_tag) \
mb_vcu_device::static_set_palette_tag(*device, "^" _palette_tag);
downcast<mb_vcu_device &>(*device).set_palette_tag("^" _palette_tag);
#endif // MAME_VIDEO_MB_VCU_H

View File

@ -28,40 +28,40 @@
#define MCFG_MC6845_SHOW_BORDER_AREA(_show) \
mc6845_device::set_show_border_area(*device, _show);
downcast<mc6845_device &>(*device).set_show_border_area(_show);
#define MCFG_MC6845_VISAREA_ADJUST(_minx, _maxx, _miny, _maxy) \
mc6845_device::set_visarea_adjust(*device, _minx, _maxx, _miny, _maxy);
downcast<mc6845_device &>(*device).set_visarea_adjust(_minx, _maxx, _miny, _maxy);
#define MCFG_MC6845_CHAR_WIDTH(_pixels) \
mc6845_device::set_char_width(*device, _pixels);
downcast<mc6845_device &>(*device).set_char_width(_pixels);
#define MCFG_MC6845_RECONFIGURE_CB(_class, _method) \
mc6845_device::set_reconfigure_callback(*device, mc6845_device::reconfigure_delegate(&_class::_method, #_class "::" #_method, this));
downcast<mc6845_device &>(*device).set_reconfigure_callback(mc6845_device::reconfigure_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6845_BEGIN_UPDATE_CB(_class, _method) \
mc6845_device::set_begin_update_callback(*device, mc6845_device::begin_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<mc6845_device &>(*device).set_begin_update_callback(mc6845_device::begin_update_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6845_UPDATE_ROW_CB(_class, _method) \
mc6845_device::set_update_row_callback(*device, mc6845_device::update_row_delegate(&_class::_method, #_class "::" #_method, this));
downcast<mc6845_device &>(*device).set_update_row_callback(mc6845_device::update_row_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6845_END_UPDATE_CB(_class, _method) \
mc6845_device::set_end_update_callback(*device, mc6845_device::end_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<mc6845_device &>(*device).set_end_update_callback(mc6845_device::end_update_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6845_ADDR_CHANGED_CB(_class, _method) \
mc6845_device::set_on_update_addr_change_callback(*device, mc6845_device::on_update_addr_changed_delegate(&_class::_method, #_class "::" #_method, this));
downcast<mc6845_device &>(*device).set_on_update_addr_change_callback(mc6845_device::on_update_addr_changed_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6845_OUT_DE_CB(_write) \
devcb = &mc6845_device::set_out_de_callback(*device, DEVCB_##_write);
devcb = &downcast<mc6845_device &>(*device).set_out_de_callback(DEVCB_##_write);
#define MCFG_MC6845_OUT_CUR_CB(_write) \
devcb = &mc6845_device::set_out_cur_callback(*device, DEVCB_##_write);
devcb = &downcast<mc6845_device &>(*device).set_out_cur_callback(DEVCB_##_write);
#define MCFG_MC6845_OUT_HSYNC_CB(_write) \
devcb = &mc6845_device::set_out_hsync_callback(*device, DEVCB_##_write);
devcb = &downcast<mc6845_device &>(*device).set_out_hsync_callback(DEVCB_##_write);
#define MCFG_MC6845_OUT_VSYNC_CB(_write) \
devcb = &mc6845_device::set_out_vsync_callback(*device, DEVCB_##_write);
devcb = &downcast<mc6845_device &>(*device).set_out_vsync_callback(DEVCB_##_write);
/* callback definitions */
@ -91,27 +91,26 @@ public:
// construction/destruction
mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_show_border_area(device_t &device, bool show) { downcast<mc6845_device &>(device).m_show_border_area = show; }
static void set_visarea_adjust(device_t &device, int min_x, int max_x, int min_y, int max_y)
void set_show_border_area(bool show) { m_show_border_area = show; }
void set_visarea_adjust(int min_x, int max_x, int min_y, int max_y)
{
mc6845_device &dev = downcast<mc6845_device &>(device);
dev.m_visarea_adjust_min_x = min_x;
dev.m_visarea_adjust_max_x = max_x;
dev.m_visarea_adjust_min_y = min_y;
dev.m_visarea_adjust_max_y = max_y;
m_visarea_adjust_min_x = min_x;
m_visarea_adjust_max_x = max_x;
m_visarea_adjust_min_y = min_y;
m_visarea_adjust_max_y = max_y;
}
static void set_char_width(device_t &device, int pixels) { downcast<mc6845_device &>(device).m_hpixels_per_column = pixels; }
void set_char_width(int pixels) { m_hpixels_per_column = pixels; }
static void set_reconfigure_callback(device_t &device, reconfigure_delegate &&cb) { downcast<mc6845_device &>(device).m_reconfigure_cb = std::move(cb); }
static void set_begin_update_callback(device_t &device, begin_update_delegate &&cb) { downcast<mc6845_device &>(device).m_begin_update_cb = std::move(cb); }
static void set_update_row_callback(device_t &device, update_row_delegate &&cb) { downcast<mc6845_device &>(device).m_update_row_cb = std::move(cb); }
static void set_end_update_callback(device_t &device, end_update_delegate &&cb) { downcast<mc6845_device &>(device).m_end_update_cb = std::move(cb); }
static void set_on_update_addr_change_callback(device_t &device, on_update_addr_changed_delegate &&cb) { downcast<mc6845_device &>(device).m_on_update_addr_changed_cb = std::move(cb); }
template <typename Object> void set_reconfigure_callback(Object &&cb) { m_reconfigure_cb = std::forward<Object>(cb); }
template <typename Object> void set_begin_update_callback(Object &&cb) { m_begin_update_cb = std::forward<Object>(cb); }
template <typename Object> void set_update_row_callback(Object &&cb) { m_update_row_cb = std::forward<Object>(cb); }
template <typename Object> void set_end_update_callback(Object &&cb) { m_end_update_cb = std::forward<Object>(cb); }
template <typename Object> void set_on_update_addr_change_callback(Object &&cb) { m_on_update_addr_changed_cb = std::forward<Object>(cb); }
template <class Object> static devcb_base &set_out_de_callback(device_t &device, Object &&cb) { return downcast<mc6845_device &>(device).m_out_de_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_out_cur_callback(device_t &device, Object &&cb) { return downcast<mc6845_device &>(device).m_out_cur_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_out_hsync_callback(device_t &device, Object &&cb) { return downcast<mc6845_device &>(device).m_out_hsync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_out_vsync_callback(device_t &device, Object &&cb) { return downcast<mc6845_device &>(device).m_out_vsync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_de_callback(Object &&cb) { return m_out_de_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_cur_callback(Object &&cb) { return m_out_cur_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_hsync_callback(Object &&cb) { return m_out_hsync_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_vsync_callback(Object &&cb) { return m_out_vsync_cb.set_callback(std::forward<Object>(cb)); }
/* select one of the registers for reading or writing */
DECLARE_WRITE8_MEMBER( address_w );

View File

@ -36,22 +36,22 @@
MCFG_SCREEN_VBLANK_TIME(0)
#define MCFG_MC6847_HSYNC_CALLBACK(_write) \
devcb = &mc6847_friend_device::set_hsync_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<mc6847_friend_device &>(*device).set_hsync_wr_callback(DEVCB_##_write);
#define MCFG_MC6847_FSYNC_CALLBACK(_write) \
devcb = &mc6847_friend_device::set_fsync_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<mc6847_friend_device &>(*device).set_fsync_wr_callback(DEVCB_##_write);
#define MCFG_MC6847_CHARROM_CALLBACK(_class, _method) \
mc6847_friend_device::set_get_char_rom(*device, mc6847_friend_device::get_char_rom_delegate(&_class::_method, #_class "::" #_method, this));
downcast<mc6847_friend_device &>(*device).set_get_char_rom(mc6847_friend_device::get_char_rom_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6847_INPUT_CALLBACK(_read) \
devcb = &mc6847_base_device::set_input_callback(*device, DEVCB_##_read);
devcb = &downcast<mc6847_base_device &>(*device).set_input_callback(DEVCB_##_read);
#define MCFG_MC6847_FIXED_MODE(_mode) \
mc6847_base_device::set_get_fixed_mode(*device, _mode);
downcast<mc6847_base_device &>(*device).set_get_fixed_mode(_mode);
#define MCFG_MC6847_BW(_bw) \
mc6847_base_device::set_black_and_white(*device, _bw);
downcast<mc6847_base_device &>(*device).set_black_and_white(_bw);
#define MC6847_GET_CHARROM_MEMBER(_name) uint8_t _name(uint8_t ch, int line)
@ -86,10 +86,10 @@ public:
bool hs_r() const { return m_horizontal_sync; }
bool fs_r() const { return m_field_sync; }
template <class Object> static devcb_base &set_hsync_wr_callback(device_t &device, Object &&cb) { return downcast<mc6847_friend_device &>(device).m_write_hsync.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_fsync_wr_callback(device_t &device, Object &&cb) { return downcast<mc6847_friend_device &>(device).m_write_fsync.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hsync_wr_callback(Object &&cb) { return m_write_hsync.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_fsync_wr_callback(Object &&cb) { return m_write_fsync.set_callback(std::forward<Object>(cb)); }
static void set_get_char_rom(device_t &device, get_char_rom_delegate &&cb) { downcast<mc6847_friend_device &>(device).m_charrom_cb = std::move(cb); }
template <typename Object> void set_get_char_rom(Object &&cb) { m_charrom_cb = std::forward<Object>(cb); }
protected:
mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock,
@ -511,10 +511,10 @@ private:
class mc6847_base_device : public mc6847_friend_device
{
public:
template <class Object> static devcb_base &set_input_callback(device_t &device, Object &&cb) { return downcast<mc6847_base_device &>(device).m_input_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_input_callback(Object &&cb) { return m_input_cb.set_callback(std::forward<Object>(cb)); }
static void set_get_fixed_mode(device_t &device, uint8_t mode) { downcast<mc6847_base_device &>(device).m_fixed_mode = mode; }
static void set_black_and_white(device_t &device, bool bw) { downcast<mc6847_base_device &>(device).m_black_and_white = bw; }
void set_get_fixed_mode(uint8_t mode) { m_fixed_mode = mode; }
void set_black_and_white(bool bw) { m_black_and_white = bw; }
/* updates the screen -- this will call begin_update(),
followed by update_row() repeatedly and after all row

View File

@ -90,19 +90,19 @@
//***************************************************************************
#define MCFG_MOS6566_CPU(_tag) \
mos6566_device::static_set_cpu_tag(*device, "^" _tag);
downcast<mos6566_device &>(*device).set_cpu_tag("^" _tag);
#define MCFG_MOS6566_IRQ_CALLBACK(_write) \
devcb = &mos6566_device::set_irq_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<mos6566_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_MOS6566_BA_CALLBACK(_write) \
devcb = &mos6566_device::set_ba_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<mos6566_device &>(*device).set_ba_wr_callback(DEVCB_##_write);
#define MCFG_MOS6566_AEC_CALLBACK(_write) \
devcb = &mos6566_device::set_aec_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<mos6566_device &>(*device).set_aec_wr_callback(DEVCB_##_write);
#define MCFG_MOS8564_K_CALLBACK(_write) \
devcb = &mos6566_device::set_k_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<mos6566_device &>(*device).set_k_wr_callback(DEVCB_##_write);
@ -212,11 +212,11 @@ public:
// construction/destruction
mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_cpu_tag(device_t &device, const char *tag) { downcast<mos6566_device &>(device).m_cpu.set_tag(tag); }
template <class Object> static devcb_base &set_irq_wr_callback(device_t &device, Object &&cb) { return downcast<mos6566_device &>(device).m_write_irq.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_ba_wr_callback(device_t &device, Object &&cb) { return downcast<mos6566_device &>(device).m_write_ba.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_aec_wr_callback(device_t &device, Object &&cb) { return downcast<mos6566_device &>(device).m_write_aec.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_k_wr_callback(device_t &device, Object &&cb) { return downcast<mos6566_device &>(device).m_write_k.set_callback(std::forward<Object>(cb)); }
void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); }
template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ba_wr_callback(Object &&cb) { return m_write_ba.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_aec_wr_callback(Object &&cb) { return m_write_aec.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_k_wr_callback(Object &&cb) { return m_write_k.set_callback(std::forward<Object>(cb)); }
virtual space_config_vector memory_space_config() const override;

View File

@ -16,7 +16,7 @@
MCFG_DEVICE_ADD( _tag, NT7534, 0 )
#define MCFG_NT7534_PIXEL_UPDATE_CB(_class, _method) \
nt7534_device::static_set_pixel_update_cb(*device, nt7534_device::pixel_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<nt7534_device &>(*device).set_pixel_update_cb(nt7534_device::pixel_update_delegate(&_class::_method, #_class "::" #_method, this));
//**************************************************************************
// TYPE DEFINITIONS
@ -35,7 +35,7 @@ public:
// construction/destruction
nt7534_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_pixel_update_cb(device_t &device, pixel_update_delegate &&cb) { downcast<nt7534_device &>(device).m_pixel_update_cb = std::move(cb); }
template <typename Object> void set_pixel_update_cb(Object &&cb) { m_pixel_update_cb = std::forward<Object>(cb); }
// device interface
virtual DECLARE_WRITE8_MEMBER(write);

View File

@ -22,7 +22,7 @@
MCFG_DEVICE_ADD( _tag, PCD8544, 0 )
#define MCFG_PCD8544_SCREEN_UPDATE_CALLBACK(_class, _method) \
pcd8544_device::static_set_screen_update_cb(*device, pcd8544_device::screen_update_delegate(&_class::_method, #_class "::" #_method, this));
downcast<pcd8544_device &>(*device).set_screen_update_cb(pcd8544_device::screen_update_delegate(&_class::_method, #_class "::" #_method, this));
// ======================> pcd8544_device
@ -34,7 +34,7 @@ public:
// construction/destruction
pcd8544_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_screen_update_cb(device_t &device, screen_update_delegate &&cb) { downcast<pcd8544_device &>(device).m_screen_update_cb = std::move(cb); }
template <typename Object> void set_screen_update_cb(Object &&cb) { m_screen_update_cb = std::forward<Object>(cb); }
// device interface
DECLARE_WRITE_LINE_MEMBER(sdin_w);

View File

@ -106,12 +106,6 @@ device_memory_interface::space_config_vector ppu2c0x_device::memory_space_config
}
// static
void ppu2c0x_device::set_nmi_delegate(device_t &device, nmi_delegate &&cb)
{
ppu2c0x_device &dev = downcast<ppu2c0x_device &>(device);
dev.m_nmi_callback_proc = std::move(cb);
}
//-------------------------------------------------
// ppu2c0x_device - constructor
//-------------------------------------------------

View File

@ -59,16 +59,16 @@
#define MCFG_PPU2C0X_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_PPU2C0X_CPU(_tag) \
ppu2c0x_device::set_cpu_tag(*device, "^" _tag);
downcast<ppu2c0x_device &>(*device).set_cpu_tag("^" _tag);
#define MCFG_PPU2C0X_COLORBASE(_color) \
ppu2c0x_device::set_color_base(*device, _color);
downcast<ppu2c0x_device &>(*device).set_color_base(_color);
#define MCFG_PPU2C0X_SET_NMI(_class, _method) \
ppu2c0x_device::set_nmi_delegate(*device, ppu2c0x_device::nmi_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
downcast<ppu2c0x_device &>(*device).set_nmi_delegate(ppu2c0x_device::nmi_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_PPU2C0X_IGNORE_SPRITE_WRITE_LIMIT \
ppu2c0x_device::use_sprite_write_limitation_disable(*device);
downcast<ppu2c0x_device &>(*device).use_sprite_write_limitation_disable();
///*************************************************************************
// TYPE DEFINITIONS
@ -107,9 +107,9 @@ public:
virtual DECLARE_READ8_MEMBER( palette_read );
virtual DECLARE_WRITE8_MEMBER( palette_write );
static void set_cpu_tag(device_t &device, const char *tag) { downcast<ppu2c0x_device &>(device).m_cpu.set_tag(tag); }
static void set_color_base(device_t &device, int colorbase) { downcast<ppu2c0x_device &>(device).m_color_base = colorbase; }
static void set_nmi_delegate(device_t &device, nmi_delegate &&cb);
void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); }
void set_color_base(int colorbase) { m_color_base = colorbase; }
template <typename Object> void set_nmi_delegate(Object &&cb) { m_nmi_callback_proc = std::forward<Object>(cb); }
/* routines */
virtual void init_palette(palette_device &palette, int first_entry);
@ -153,11 +153,7 @@ public:
// void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
// some bootleg / clone hardware appears to ignore this
static void use_sprite_write_limitation_disable(device_t &device)
{
ppu2c0x_device &dev = downcast<ppu2c0x_device &>(device);
dev.m_use_sprite_write_limitation = false;
}
void use_sprite_write_limitation_disable() { m_use_sprite_write_limitation = false; }
uint16_t get_vram_dest();
void set_vram_dest(uint16_t dest);

View File

@ -20,18 +20,18 @@
MCFG_PPU2C0X_ADD(_tag, PPU_VT03)
#define MCFG_PPU_VT03_READ_BG_CB(_devcb) \
devcb = &ppu_vt03_device::set_read_bg_callback(*device, DEVCB_##_devcb);
devcb = &downcast<ppu_vt03_device &>(*device).set_read_bg_callback(DEVCB_##_devcb);
#define MCFG_PPU_VT03_READ_SP_CB(_devcb) \
devcb = &ppu_vt03_device::set_read_sp_callback(*device, DEVCB_##_devcb);
devcb = &downcast<ppu_vt03_device &>(*device).set_read_sp_callback(DEVCB_##_devcb);
#define MCFG_PPU_VT03_MODIFY MCFG_DEVICE_MODIFY
#define MCFG_PPU_VT03_SET_PAL_MODE(pmode) \
ppu_vt03_device::set_palette_mode(*device, pmode);
downcast<ppu_vt03_device &>(*device).set_palette_mode(pmode);
#define MCFG_PPU_VT03_SET_DESCRAMBLE(dsc) \
ppu_vt03_device::set_201x_descramble(*device, dsc);
downcast<ppu_vt03_device &>(*device).set_201x_descramble(dsc);
enum vtxx_pal_mode {
@ -45,11 +45,11 @@ class ppu_vt03_device : public ppu2c0x_device {
public:
ppu_vt03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_read_bg_callback(device_t &device, Object &&cb) { return downcast<ppu_vt03_device &>(device).m_read_bg.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_read_sp_callback(device_t &device, Object &&cb) { return downcast<ppu_vt03_device &>(device).m_read_sp.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_read_bg_callback(Object &&cb) { return m_read_bg.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_read_sp_callback(Object &&cb) { return m_read_sp.set_callback(std::forward<Object>(cb)); }
static void set_palette_mode(device_t &device, vtxx_pal_mode pmode) { downcast<ppu_vt03_device &>(device).m_pal_mode = pmode; }
static void set_201x_descramble(device_t &device, const uint8_t descramble[6]) { for (int i = 0; i < 6; i++) downcast<ppu_vt03_device &>(device).m_2012_2017_descramble[i] = descramble[i]; }
void set_palette_mode(vtxx_pal_mode pmode) { m_pal_mode = pmode; }
void set_201x_descramble(const uint8_t descramble[6]) { for (int i = 0; i < 6; i++) m_2012_2017_descramble[i] = descramble[i]; }
virtual DECLARE_READ8_MEMBER(read) override;
virtual DECLARE_WRITE8_MEMBER(write) override;

View File

@ -16,14 +16,14 @@
#define MCFG_PSX_GPU_VBLANK_HANDLER(_devcb) \
devcb = &psxgpu_device::set_vblank_handler(*device, DEVCB_##_devcb);
devcb = &downcast<psxgpu_device &>(*device).set_vblank_handler(DEVCB_##_devcb);
#define MCFG_PSXGPU_ADD( cputag, tag, type, _vramSize, clock ) \
MCFG_DEVICE_MODIFY( cputag ) \
MCFG_PSX_GPU_READ_HANDLER(DEVREAD32(tag, psxgpu_device, read)) \
MCFG_PSX_GPU_WRITE_HANDLER(DEVWRITE32(tag, psxgpu_device, write)) \
MCFG_DEVICE_ADD( tag, type, clock ) \
psxgpu_device::set_vram_size(*device, _vramSize); \
downcast<psxgpu_device &>(*device).set_vram_size(_vramSize); \
MCFG_PSX_GPU_VBLANK_HANDLER(DEVWRITELINE(cputag ":irq", psxirq_device, intin0)) \
MCFG_PSX_DMA_CHANNEL_READ( cputag, 2, psxdma_device::write_delegate(&psxgpu_device::dma_read, (psxgpu_device *) device ) ) \
MCFG_PSX_DMA_CHANNEL_WRITE( cputag, 2, psxdma_device::read_delegate(&psxgpu_device::dma_write, (psxgpu_device *) device ) )
@ -33,7 +33,7 @@
MCFG_PSX_GPU_READ_HANDLER(DEVREAD32(tag, psxgpu_device, read)) \
MCFG_PSX_GPU_WRITE_HANDLER(DEVWRITE32(tag, psxgpu_device, write)) \
MCFG_DEVICE_REPLACE( tag, type, clock ) \
psxgpu_device::set_vram_size(*device, _vramSize); \
downcast<psxgpu_device &>(*device).set_vram_size(_vramSize); \
MCFG_PSX_GPU_VBLANK_HANDLER(DEVWRITELINE(cputag ":irq", psxirq_device, intin0)) \
MCFG_PSX_DMA_CHANNEL_READ( cputag, 2, psxdma_device::write_delegate(&psxgpu_device::dma_read, (psxgpu_device *) device ) ) \
MCFG_PSX_DMA_CHANNEL_WRITE( cputag, 2, psxdma_device::read_delegate(&psxgpu_device::dma_write, (psxgpu_device *) device ) )
@ -51,9 +51,9 @@ DECLARE_DEVICE_TYPE(CXD8654Q, cxd8654q_device)
class psxgpu_device : public device_t
{
public:
// static configuration helpers
template <class Object> static devcb_base &set_vblank_handler(device_t &device, Object &&cb) { return downcast<psxgpu_device &>(device).m_vblank_handler.set_callback(std::forward<Object>(cb)); }
static void set_vram_size(device_t &device, int size) { downcast<psxgpu_device &>(device).vramSize = size; }
// configuration helpers
template <class Object> devcb_base &set_vblank_handler(Object &&cb) { return m_vblank_handler.set_callback(std::forward<Object>(cb)); }
void set_vram_size(int size) { vramSize = size; }
DECLARE_WRITE32_MEMBER( write );
DECLARE_READ32_MEMBER( read );

View File

@ -50,16 +50,6 @@ ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, dev
{
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void ramdac_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<ramdac_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// memory_space_config - return a description of
// any address spaces owned by this device

View File

@ -20,13 +20,13 @@
#define MCFG_RAMDAC_ADD(_tag, _map, _palette_tag) \
MCFG_DEVICE_ADD(_tag, RAMDAC, 0) \
MCFG_DEVICE_ADDRESS_MAP(0, _map) \
ramdac_device::static_set_palette_tag(*device, "^" _palette_tag);
downcast<ramdac_device &>(*device).set_palette_tag("^" _palette_tag);
#define MCFG_RAMDAC_COLOR_BASE(_color_base) \
ramdac_device::static_set_color_base(*device, _color_base);
downcast<ramdac_device &>(*device).set_color_base(_color_base);
#define MCFG_RAMDAC_SPLIT_READ(_split) \
ramdac_device::set_split_read(*device, _split);
downcast<ramdac_device &>(*device).set_split_read(_split);
//**************************************************************************
@ -42,10 +42,10 @@ public:
// construction/destruction
ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_color_base(device_t &device, uint32_t color_base) { downcast<ramdac_device &>(device).m_color_base = color_base; }
static void set_split_read(device_t &device, int split) { downcast<ramdac_device &>(device).m_split_read_reg = split; }
// configuration
void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }
void set_color_base(uint32_t color_base) { m_color_base = color_base; }
void set_split_read(int split) { m_split_read_reg = split; }
// I/O operations
DECLARE_READ8_MEMBER( index_r );

View File

@ -36,11 +36,11 @@
//**************************************************************************
#define MCFG_SAA5050_D_CALLBACK(_read) \
devcb = &saa5050_device::set_d_rd_callback(*device, DEVCB_##_read);
devcb = &downcast<saa5050_device &>(*device).set_d_rd_callback(DEVCB_##_read);
#define MCFG_SAA5050_SCREEN_SIZE(_cols, _rows, _size) \
saa5050_device::static_set_screen_size(*device, _cols, _rows, _size);
downcast<saa5050_device &>(*device).set_screen_size(_cols, _rows, _size);
@ -56,9 +56,9 @@ public:
// construction/destruction
saa5050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_screen_size(device_t &device, int cols, int rows, int size) { downcast<saa5050_device &>(device).m_cols = cols; downcast<saa5050_device &>(device).m_rows = rows; downcast<saa5050_device &>(device).m_size = size; }
void set_screen_size(int cols, int rows, int size) { m_cols = cols; m_rows = rows; m_size = size; }
template <class Object> static devcb_base &set_d_rd_callback(device_t &device, Object &&cb) { return downcast<saa5050_device &>(device).m_read_d.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_d_rd_callback(Object &&cb) { return m_read_d.set_callback(std::forward<Object>(cb)); }
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;

View File

@ -7,16 +7,16 @@
#define MCFG_SCN2674_INTR_CALLBACK(_intr) \
devcb = &scn2674_device::set_intr_callback(*device, DEVCB_##_intr);
devcb = &downcast<scn2674_device &>(*device).set_intr_callback(DEVCB_##_intr);
#define MCFG_SCN2674_TEXT_CHARACTER_WIDTH(_value) \
scn2674_device::static_set_character_width(*device, _value);
downcast<scn2674_device &>(*device).set_character_width(_value);
#define MCFG_SCN2674_GFX_CHARACTER_WIDTH(_value) \
scn2674_device::static_set_gfx_character_width(*device, _value);
downcast<scn2674_device &>(*device).set_gfx_character_width(_value);
#define MCFG_SCN2674_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \
scn2674_device::static_set_display_callback(*device, scn2674_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
downcast<scn2674_device &>(*device).set_display_callback(scn2674_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
#define SCN2674_DRAW_CHARACTER_MEMBER(_name) void _name(bitmap_rgb32 &bitmap, int x, int y, uint8_t linecount, uint8_t charcode, uint16_t address, uint8_t cursor, uint8_t dw, uint8_t lg, uint8_t ul, uint8_t blink)
@ -30,10 +30,10 @@ public:
typedef device_delegate<void (bitmap_rgb32 &bitmap, int x, int y, uint8_t linecount, uint8_t charcode, uint16_t address, uint8_t cursor, uint8_t dw, uint8_t lg, uint8_t ul, uint8_t blink)> draw_character_delegate;
// static configuration
template <class Object> static devcb_base &set_intr_callback(device_t &device, Object &&cb) { return downcast<scn2674_device &>(device).m_intr_cb.set_callback(std::forward<Object>(cb)); }
static void static_set_character_width(device_t &device, int value) { downcast<scn2674_device &>(device).m_text_hpixels_per_column = value; }
static void static_set_gfx_character_width(device_t &device, int value) { downcast<scn2674_device &>(device).m_gfx_hpixels_per_column = value; }
static void static_set_display_callback(device_t &device, draw_character_delegate &&cb) { downcast<scn2674_device &>(device).m_display_cb = std::move(cb); }
template <class Object> devcb_base &set_intr_callback(Object &&cb) { return m_intr_cb.set_callback(std::forward<Object>(cb)); }
void set_character_width(int value) { m_text_hpixels_per_column = value; }
void set_gfx_character_width(int value) { m_gfx_hpixels_per_column = value; }
template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -14,7 +14,7 @@
#define MCFG_SED1520_ADD( _tag, _cb ) \
MCFG_DEVICE_ADD( _tag, SED1520, 0 ) \
sed1520_device::static_set_screen_update_cb(*device, _cb);
downcast<sed1520_device &>(*device).set_screen_update_cb(_cb);
//**************************************************************************
// TYPE DEFINITIONS
@ -33,8 +33,8 @@ public:
// construction/destruction
sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
static void static_set_screen_update_cb(device_t &device, screen_update_func _cb) { downcast<sed1520_device &>(device).m_screen_update_func = _cb; }
// sconfiguration helpers
template <typename Object> void set_screen_update_cb(Object &&cb) { m_screen_update_func = std::forward<Object>(cb); }
// device interface
virtual DECLARE_WRITE8_MEMBER(write);

View File

@ -44,7 +44,7 @@ public:
snes_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
template <class Object> static devcb_base &static_set_open_bus_callback(device_t &device, Object &&cb) { return downcast<snes_ppu_device &>(device).m_openbus_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_open_bus_callback(Object &&cb) { return m_openbus_cb.set_callback(std::forward<Object>(cb)); }
void refresh_scanline(bitmap_rgb32 &bitmap, uint16_t curline);
@ -319,6 +319,6 @@ DECLARE_DEVICE_TYPE(SNES_PPU, snes_ppu_device)
***************************************************************************/
#define MCFG_SNES_PPU_OPENBUS_CB(_read) \
devcb = &snes_ppu_device::static_set_open_bus_callback(*device, DEVCB_##_read);
devcb = &downcast<snes_ppu_device &>(*device).set_open_bus_callback(DEVCB_##_read);
#endif // MAME_VIDEO_SNES_PPU_H

View File

@ -104,11 +104,6 @@ public:
uint32_t spriteram_elements() const { return m_spriteram_bytes / sizeof(_SpriteRAMType); }
_SpriteRAMType *buffer() { return &m_buffer[0]; }
// static configuration
static void static_set_xorigin(device_t &device, int origin) { downcast<sprite_device &>(device).m_xorigin = origin; }
static void static_set_yorigin(device_t &device, int origin) { downcast<sprite_device &>(device).m_yorigin = origin; }
static void static_set_origin(device_t &device, int xorigin, int yorigin) { static_set_xorigin(device, xorigin); static_set_yorigin(device, yorigin); }
// configuration
void set_spriteram(_SpriteRAMType *base, uint32_t bytes) { m_spriteram = base; m_spriteram_bytes = bytes; m_buffer.resize(m_spriteram_bytes / sizeof(_SpriteRAMType)); }
void set_origin(int32_t xorigin = 0, int32_t yorigin = 0) { m_xorigin = xorigin; m_yorigin = yorigin; }

View File

@ -23,11 +23,10 @@ public:
// construction/destruction
t6a04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_size(device_t &device, int w, int h)
void set_size(int w, int h)
{
t6a04_device &dev = downcast<t6a04_device &>(device);
dev.m_width = w;
dev.m_height = h;
m_width = w;
m_height = h;
}
// device interface
@ -67,6 +66,6 @@ private:
DECLARE_DEVICE_TYPE(T6A04, t6a04_device)
#define MCFG_T6A04_SIZE(_width, _height) \
t6a04_device::set_size(*device, _width, _height);
downcast<t6a04_device &>(*device).set_size(_width, _height);
#endif // MAME_VIDEO_T6A04_H

View File

@ -48,16 +48,6 @@ tlc34076_device::tlc34076_device(const machine_config &mconfig, const char *tag,
}
//-------------------------------------------------
// static_set_bits - set DAC resolution
//-------------------------------------------------
void tlc34076_device::static_set_bits(device_t &device, tlc34076_bits bits)
{
tlc34076_device &tlc = downcast<tlc34076_device &>(device);
tlc.m_dacbits = bits;
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------

View File

@ -31,8 +31,8 @@ public:
// construction/destruction
tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
static void static_set_bits(device_t &device, tlc34076_bits bits);
// configuration helpers
void set_bits(tlc34076_bits bits) { m_dacbits = bits; }
// public interface
const rgb_t *get_pens();
@ -62,7 +62,7 @@ private:
#define MCFG_TLC34076_ADD(tag, bits) \
MCFG_DEVICE_ADD((tag), TLC34076, 0) \
tlc34076_device::static_set_bits(*device, (tlc34076_device::bits));
downcast<tlc34076_device &>(*device).set_bits((tlc34076_device::bits));
DECLARE_DEVICE_TYPE(TLC34076, tlc34076_device)

View File

@ -16,13 +16,13 @@
#define MCFG_TMS34061_ROWSHIFT(_shift) \
tms34061_device::set_rowshift(*device, _shift);
downcast<tms34061_device &>(*device).set_rowshift(_shift);
#define MCFG_TMS34061_VRAM_SIZE(_size) \
tms34061_device::set_vram_size(*device, _size);
downcast<tms34061_device &>(*device).set_vram_size(_size);
#define MCFG_TMS34061_INTERRUPT_CB(_devcb) \
devcb = &tms34061_device::set_interrupt_callback(*device, DEVCB_##_devcb);
devcb = &downcast<tms34061_device &>(*device).set_interrupt_callback(DEVCB_##_devcb);
@ -44,9 +44,9 @@ public:
// construction/destruction
tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_rowshift(device_t &device, uint8_t rowshift) { downcast<tms34061_device &>(device).m_rowshift = rowshift; }
static void set_vram_size(device_t &device, uint32_t vramsize) { downcast<tms34061_device &>(device).m_vramsize = vramsize; }
template <class Object> static devcb_base &set_interrupt_callback(device_t &device, Object &&cb) { return downcast<tms34061_device &>(device).m_interrupt_cb.set_callback(std::forward<Object>(cb)); }
void set_rowshift(uint8_t rowshift) { m_rowshift = rowshift; }
void set_vram_size(uint32_t vramsize) { m_vramsize = vramsize; }
template <class Object> devcb_base &set_interrupt_callback(Object &&cb) { return m_interrupt_cb.set_callback(std::forward<Object>(cb)); }
/* reads/writes to the 34061 */
uint8_t read(address_space &space, int col, int row, int func);

View File

@ -11,36 +11,35 @@
#define MCFG_TMS9927_VSYN_CALLBACK(_write) \
devcb = &tms9927_device::set_vsyn_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<tms9927_device &>(*device).set_vsyn_wr_callback(DEVCB_##_write);
#define MCFG_TMS9927_HSYN_CALLBACK(_write) \
devcb = &tms9927_device::set_hsyn_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<tms9927_device &>(*device).set_hsyn_wr_callback(DEVCB_##_write);
#define MCFG_TMS9927_CHAR_WIDTH(_pixels) \
tms9927_device::set_char_width(*device, _pixels);
downcast<tms9927_device &>(*device).set_char_width(_pixels);
#define MCFG_TMS9927_REGION(_tag) \
tms9927_device::set_region_tag(*device, "^" _tag);
downcast<tms9927_device &>(*device).set_region_tag("^" _tag);
#define MCFG_TMS9927_OVERSCAN(_left, _right, _top, _bottom) \
tms9927_device::set_overscan(*device, _left, _right, _top, _bottom);
downcast<tms9927_device &>(*device).set_overscan(_left, _right, _top, _bottom);
class tms9927_device : public device_t, public device_video_interface
{
public:
tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_vsyn_wr_callback(device_t &device, Object &&cb) { return downcast<tms9927_device &>(device).m_write_vsyn.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hsyn_wr_callback(device_t &device, Object &&cb) { return downcast<tms9927_device &>(device).m_write_hsyn.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vsyn_wr_callback(Object &&cb) { return m_write_vsyn.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hsyn_wr_callback(Object &&cb) { return m_write_hsyn.set_callback(std::forward<Object>(cb)); }
static void set_char_width(device_t &device, int pixels) { downcast<tms9927_device &>(device).m_hpixels_per_column = pixels; }
static void set_region_tag(device_t &device, const char *tag) { downcast<tms9927_device &>(device).m_selfload.set_tag(tag); }
static void set_overscan(device_t &device, int left, int right, int top, int bottom) {
tms9927_device &dev = downcast<tms9927_device &>(device);
dev.m_overscan_left = left;
dev.m_overscan_right = right;
dev.m_overscan_top = top;
dev.m_overscan_bottom = bottom;
void set_char_width(int pixels) { m_hpixels_per_column = pixels; }
void set_region_tag(const char *tag) { m_selfload.set_tag(tag); }
void set_overscan(int left, int right, int top, int bottom) {
m_overscan_left = left;
m_overscan_right = right;
m_overscan_top = top;
m_overscan_bottom = bottom;
}
DECLARE_WRITE8_MEMBER(write);

View File

@ -34,15 +34,15 @@
// MCFG_DEVICE_ADD(_tag, _variant, XTAL(10'738'635) / 2 )
#define MCFG_TMS9928A_VRAM_SIZE(_size) \
tms9928a_device::set_vram_size(*device, _size);
downcast<tms9928a_device &>(*device).set_vram_size(_size);
#define MCFG_TMS9928A_OUT_INT_LINE_CB(_devcb) \
devcb = &tms9928a_device::set_out_int_line_callback(*device, DEVCB_##_devcb);
devcb = &downcast<tms9928a_device &>(*device).set_out_int_line_callback(DEVCB_##_devcb);
#define MCFG_TMS9928A_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_TMS9928A_OUT_GROMCLK_CB(_devcb) \
devcb = &tms9928a_device::set_out_gromclk_callback(*device, DEVCB_##_devcb);
devcb = &downcast<tms9928a_device &>(*device).set_out_gromclk_callback(DEVCB_##_devcb);
#define MCFG_TMS9928A_SCREEN_ADD_NTSC(_screen_tag) \
@ -88,9 +88,9 @@ public:
// construction/destruction
tms9928a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_vram_size(device_t &device, int vram_size) { downcast<tms9928a_device &>(device).m_vram_size = vram_size; }
template <class Object> static devcb_base &set_out_int_line_callback(device_t &device, Object &&cb) { return downcast<tms9928a_device &>(device).m_out_int_line_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_out_gromclk_callback(device_t &device, Object &&cb) { return downcast<tms9928a_device &>(device).m_out_gromclk_cb.set_callback(std::forward<Object>(cb)); }
void set_vram_size(int vram_size) { m_vram_size = vram_size; }
template <class Object> devcb_base &set_out_int_line_callback(Object &&cb) { return m_out_int_line_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_gromclk_callback(Object &&cb) { return m_out_gromclk_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -44,22 +44,22 @@
#define MCFG_UPD3301_CHARACTER_WIDTH(_value) \
upd3301_device::static_set_character_width(*device, _value);
downcast<upd3301_device &>(*device).set_character_width(_value);
#define MCFG_UPD3301_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \
upd3301_device::static_set_display_callback(*device, upd3301_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
downcast<upd3301_device &>(*device).set_display_callback(upd3301_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_UPD3301_DRQ_CALLBACK(_write) \
devcb = &upd3301_device::set_drq_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd3301_device &>(*device).set_drq_wr_callback(DEVCB_##_write);
#define MCFG_UPD3301_INT_CALLBACK(_write) \
devcb = &upd3301_device::set_int_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd3301_device &>(*device).set_int_wr_callback(DEVCB_##_write);
#define MCFG_UPD3301_HRTC_CALLBACK(_write) \
devcb = &upd3301_device::set_hrtc_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd3301_device &>(*device).set_hrtc_wr_callback(DEVCB_##_write);
#define MCFG_UPD3301_VRTC_CALLBACK(_write) \
devcb = &upd3301_device::set_vrtc_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd3301_device &>(*device).set_vrtc_wr_callback(DEVCB_##_write);
@ -79,13 +79,13 @@ public:
// construction/destruction
upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_character_width(device_t &device, int value) { downcast<upd3301_device &>(device).m_width = value; }
static void static_set_display_callback(device_t &device, draw_character_delegate &&cb) { downcast<upd3301_device &>(device).m_display_cb = std::move(cb); }
void set_character_width(int value) { m_width = value; }
template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
template <class Object> static devcb_base &set_drq_wr_callback(device_t &device, Object &&cb) { return downcast<upd3301_device &>(device).m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_int_wr_callback(device_t &device, Object &&cb) { return downcast<upd3301_device &>(device).m_write_int.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hrtc_wr_callback(device_t &device, Object &&cb) { return downcast<upd3301_device &>(device).m_write_hrtc.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vrtc_wr_callback(device_t &device, Object &&cb) { return downcast<upd3301_device &>(device).m_write_vrtc.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_drq_wr_callback(Object &&cb) { return m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_int_wr_callback(Object &&cb) { return m_write_int.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hrtc_wr_callback(Object &&cb) { return m_write_hrtc.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vrtc_wr_callback(Object &&cb) { return m_write_vrtc.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -45,22 +45,22 @@
#define MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(_class, _method) \
upd7220_device::static_set_display_pixels_callback(*device, upd7220_device::display_pixels_delegate(&_class::_method, #_class "::" #_method, this));
downcast<upd7220_device &>(*device).set_display_pixels_callback(upd7220_device::display_pixels_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(_class, _method) \
upd7220_device::static_set_draw_text_callback(*device, upd7220_device::draw_text_delegate(&_class::_method, #_class "::" #_method, this));
downcast<upd7220_device &>(*device).set_draw_text_callback(upd7220_device::draw_text_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_UPD7220_DRQ_CALLBACK(_write) \
devcb = &upd7220_device::set_drq_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd7220_device &>(*device).set_drq_wr_callback(DEVCB_##_write);
#define MCFG_UPD7220_HSYNC_CALLBACK(_write) \
devcb = &upd7220_device::set_hsync_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd7220_device &>(*device).set_hsync_wr_callback(DEVCB_##_write);
#define MCFG_UPD7220_VSYNC_CALLBACK(_write) \
devcb = &upd7220_device::set_vsync_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd7220_device &>(*device).set_vsync_wr_callback(DEVCB_##_write);
#define MCFG_UPD7220_BLANK_CALLBACK(_write) \
devcb = &upd7220_device::set_blank_wr_callback(*device, DEVCB_##_write);
devcb = &downcast<upd7220_device &>(*device).set_blank_wr_callback(DEVCB_##_write);
@ -82,13 +82,13 @@ public:
// construction/destruction
upd7220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_display_pixels_callback(device_t &device, display_pixels_delegate &&cb) { downcast<upd7220_device &>(device).m_display_cb = std::move(cb); }
static void static_set_draw_text_callback(device_t &device, draw_text_delegate &&cb) { downcast<upd7220_device &>(device).m_draw_text_cb = std::move(cb); }
template <typename Object> void set_display_pixels_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
template <typename Object> void set_draw_text_callback(Object &&cb) { m_draw_text_cb = std::forward<Object>(cb); }
template <class Object> static devcb_base &set_drq_wr_callback(device_t &device, Object &&cb) { return downcast<upd7220_device &>(device).m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_hsync_wr_callback(device_t &device, Object &&cb) { return downcast<upd7220_device &>(device).m_write_hsync.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_vsync_wr_callback(device_t &device, Object &&cb) { return downcast<upd7220_device &>(device).m_write_vsync.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_blank_wr_callback(device_t &device, Object &&cb) { return downcast<upd7220_device &>(device).m_write_blank.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_drq_wr_callback(Object &&cb) { return m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_hsync_wr_callback(Object &&cb) { return m_write_hsync.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vsync_wr_callback(Object &&cb) { return m_write_vsync.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_blank_wr_callback(Object &&cb) { return m_write_blank.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );

View File

@ -49,19 +49,6 @@ upd7227_device::upd7227_device(const machine_config &mconfig, const char *tag, d
}
//-------------------------------------------------
// static_set_offsets - configuration helper
//-------------------------------------------------
void upd7227_device::static_set_offsets(device_t &device, int sx, int sy)
{
upd7227_device &upd7227 = downcast<upd7227_device &>(device);
upd7227.m_sx = sx;
upd7227.m_sy = sy;
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------

View File

@ -19,7 +19,7 @@
#define MCFG_UPD7227_ADD(_tag, _sx, _sy) \
MCFG_DEVICE_ADD(_tag, UPD7227, 0) \
upd7227_device::static_set_offsets(*device, _sx, _sy);
downcast<upd7227_device &>(*device).set_offsets(_sx, _sy);
@ -37,7 +37,7 @@ public:
upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
static void static_set_offsets(device_t &device, int sx, int sy);
void set_offsets(int sx, int sy) { m_sx = sx; m_sy = sy; }
DECLARE_WRITE_LINE_MEMBER( cs_w );
DECLARE_WRITE_LINE_MEMBER( cd_w );

View File

@ -565,11 +565,6 @@ void v99x8_device::register_w(uint8_t data)
m_cont_reg[17] = (m_cont_reg[17] + 1) & 0x3f;
}
void v99x8_device::static_set_vram_size(device_t &device, uint32_t vram_size)
{
downcast<v99x8_device &>(device).m_vram_size = vram_size;
}
/***************************************************************************
Init/stop/reset/Interrupt functions

View File

@ -21,11 +21,11 @@
#define MCFG_V9938_ADD(_tag, _screen, _vramsize, _clock) \
MCFG_DEVICE_ADD(_tag, V9938, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen) \
v9938_device::static_set_vram_size(*device, _vramsize);
downcast<v99x8_device &>(*device).set_vram_size(_vramsize);
#define MCFG_V9958_ADD(_tag, _screen, _vramsize, _clock) \
MCFG_DEVICE_ADD(_tag, V9958, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen) \
v9938_device::static_set_vram_size(*device, _vramsize);
downcast<v99x8_device &>(*device).set_vram_size(_vramsize);
#define MCFG_V99X8_SCREEN_ADD_NTSC(_screen_tag, _v9938_tag, _clock) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@ -91,7 +91,7 @@ public:
void command_w(uint8_t data);
void register_w(uint8_t data);
static void static_set_vram_size(device_t &device, uint32_t vram_size);
void set_vram_size(uint32_t vram_size) { m_vram_size = vram_size; }
/* RESET pin */
void reset_line(int state) { if (state==ASSERT_LINE) device_reset(); }

View File

@ -109,16 +109,16 @@ public:
vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_cpu_tag(device_t &device, const char *tag) { downcast<vic3_device &>(device).m_cpu.set_tag(tag); }
static void set_vic3_type(device_t &device, vic3_type type) { downcast<vic3_device &>(device).m_type = type; }
template <class Object> static devcb_base &set_dma_read_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_dma_read_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_dma_read_color_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_dma_read_color_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_interrupt_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_interrupt_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_port_changed_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_port_changed_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_lightpen_button_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_lightpen_button_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_lightpen_x_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_lightpen_x_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_lightpen_y_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_lightpen_y_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_c64_mem_r_callback(device_t &device, Object &&cb) { return downcast<vic3_device &>(device).m_c64_mem_r_cb.set_callback(std::forward<Object>(cb)); }
void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); }
void set_vic3_type(vic3_type type) { m_type = type; }
template <class Object> devcb_base &set_dma_read_callback(Object &&cb) { return m_dma_read_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_read_color_callback(Object &&cb) { return m_dma_read_color_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_interrupt_callback(Object &&cb) { return m_interrupt_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_port_changed_callback(Object &&cb) { return m_port_changed_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_lightpen_button_callback(Object &&cb) { return m_lightpen_button_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_lightpen_x_callback(Object &&cb) { return m_lightpen_x_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_lightpen_y_callback(Object &&cb) { return m_lightpen_y_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_c64_mem_r_callback(Object &&cb) { return m_c64_mem_r_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE8_MEMBER(port_w);
DECLARE_WRITE8_MEMBER(palette_w);
@ -237,33 +237,33 @@ DECLARE_DEVICE_TYPE(VIC3, vic3_device)
#define MCFG_VIC3_CPU(tag) \
vic3_device::static_set_cpu_tag(*device, ("^" tag));
downcast<vic3_device &>(*device).set_cpu_tag(("^" tag));
#define MCFG_VIC3_TYPE(type) \
vic3_device::set_vic3_type(*device, (vic3_device::vic3_type::type));
downcast<vic3_device &>(*device).set_vic3_type((vic3_device::vic3_type::type));
#define MCFG_VIC3_DMA_READ_CB(cb) \
devcb = &vic3_device::set_dma_read_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_dma_read_callback((DEVCB_##cb));
#define MCFG_VIC3_DMA_READ_COLOR_CB(cb) \
devcb = &vic3_device::set_dma_read_color_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_dma_read_color_callback((DEVCB_##cb));
#define MCFG_VIC3_INTERRUPT_CB(cb) \
devcb = &vic3_device::set_interrupt_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_interrupt_callback((DEVCB_##cb));
#define MCFG_VIC3_PORT_CHANGED_CB(cb) \
devcb = &vic3_device::set_port_changed_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_port_changed_callback((DEVCB_##cb));
#define MCFG_VIC3_LIGHTPEN_BUTTON_CB(cb) \
devcb = &vic3_device::set_lightpen_button_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_lightpen_button_callback((DEVCB_##cb));
#define MCFG_VIC3_LIGHTPEN_X_CB(cb) \
devcb = &vic3_device::set_lightpen_x_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_lightpen_x_callback((DEVCB_##cb));
#define MCFG_VIC3_LIGHTPEN_Y_CB(cb) \
devcb = &vic3_device::set_lightpen_y_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_lightpen_y_callback((DEVCB_##cb));
#define MCFG_VIC3_C64_MEM_R_CB(cb) \
devcb = &vic3_device::set_c64_mem_r_callback(*device, (DEVCB_##cb));
devcb = &downcast<vic3_device &>(*device).set_c64_mem_r_callback((DEVCB_##cb));
#endif // MAME_VIDEO_VIC4567_H

View File

@ -1435,25 +1435,25 @@ enum
***************************************************************************/
#define MCFG_VOODOO_FBMEM(_value) \
voodoo_device::static_set_fbmem(*device, _value);
downcast<voodoo_device &>(*device).set_fbmem(_value);
#define MCFG_VOODOO_TMUMEM(_value1, _value2) \
voodoo_device::static_set_tmumem(*device, _value1, _value2);
downcast<voodoo_device &>(*device).set_tmumem(_value1, _value2);
#define MCFG_VOODOO_SCREEN_TAG(_tag) \
voodoo_device::static_set_screen_tag(*device, _tag);
downcast<voodoo_device &>(*device).set_screen_tag(_tag);
#define MCFG_VOODOO_CPU_TAG(_tag) \
voodoo_device::static_set_cpu_tag(*device, _tag);
downcast<voodoo_device &>(*device).set_cpu_tag(_tag);
#define MCFG_VOODOO_VBLANK_CB(_devcb) \
devcb = &voodoo_device::static_set_vblank_callback(*device, DEVCB_##_devcb);
devcb = &downcast<voodoo_device &>(*device).set_vblank_callback(DEVCB_##_devcb);
#define MCFG_VOODOO_STALL_CB(_devcb) \
devcb = &voodoo_device::static_set_stall_callback(*device, DEVCB_##_devcb);
devcb = &downcast<voodoo_device &>(*device).set_stall_callback(DEVCB_##_devcb);
#define MCFG_VOODOO_PCIINT_CB(_devcb) \
devcb = &voodoo_device::static_set_pciint_callback(*device, DEVCB_##_devcb);
devcb = &downcast<voodoo_device &>(*device).set_pciint_callback(DEVCB_##_devcb);
/***************************************************************************
FUNCTION PROTOTYPES
@ -1466,13 +1466,13 @@ class voodoo_device : public device_t
public:
~voodoo_device();
static void static_set_fbmem(device_t &device, int value) { downcast<voodoo_device &>(device).m_fbmem = value; }
static void static_set_tmumem(device_t &device, int value1, int value2) { downcast<voodoo_device &>(device).m_tmumem0 = value1; downcast<voodoo_device &>(device).m_tmumem1 = value2; }
static void static_set_screen_tag(device_t &device, const char *tag) { downcast<voodoo_device &>(device).m_screen = tag; }
static void static_set_cpu_tag(device_t &device, const char *tag) { downcast<voodoo_device &>(device).m_cputag = tag; }
template <class Object> static devcb_base &static_set_vblank_callback(device_t &device, Object &&cb) { return downcast<voodoo_device &>(device).m_vblank.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &static_set_stall_callback(device_t &device, Object &&cb) { return downcast<voodoo_device &>(device).m_stall.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &static_set_pciint_callback(device_t &device, Object &&cb) { return downcast<voodoo_device &>(device).m_pciint.set_callback(std::forward<Object>(cb)); }
void set_fbmem(int value) { m_fbmem = value; }
void set_tmumem(int value1, int value2) { m_tmumem0 = value1; m_tmumem1 = value2; }
void set_screen_tag(const char *tag) { m_screen = tag; }
void set_cpu_tag(const char *tag) { m_cputag = tag; }
template <class Object> devcb_base &set_vblank_callback(Object &&cb) { return m_vblank.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_stall_callback(Object &&cb) { return m_stall.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_pciint_callback(Object &&cb) { return m_pciint.set_callback(std::forward<Object>(cb)); }
DECLARE_READ32_MEMBER( voodoo_r );
DECLARE_WRITE32_MEMBER( voodoo_w );

View File

@ -73,9 +73,9 @@ void voodoo_pci_device::set_cpu_tag(const char *_cpu_tag)
void voodoo_pci_device::device_start()
{
voodoo_device::static_set_cpu_tag(*m_voodoo, m_cpu_tag);
voodoo_device::static_set_fbmem(*m_voodoo, m_fbmem);
voodoo_device::static_set_tmumem(*m_voodoo, m_tmumem0, m_tmumem1);
m_voodoo->set_cpu_tag(m_cpu_tag);
m_voodoo->set_fbmem(m_fbmem);
m_voodoo->set_tmumem(m_tmumem0, m_tmumem1);
switch (m_type) {
//void set_ids(uint32_t main_id, uint8_t revision, uint32_t pclass, uint32_t subsystem_id);
case TYPE_VOODOO_1:

View File

@ -102,10 +102,10 @@ typedef zeus2_renderer::extent_t z2_poly_extent;
* Zeus2 Video Device
*************************************/
#define MCFG_ZEUS2_VBLANK_CB(_devcb) \
devcb = &zeus2_device::set_vblank_callback(*device, DEVCB_##_devcb);
devcb = &downcast<zeus2_device &>(*device).set_vblank_callback(DEVCB_##_devcb);
#define MCFG_ZEUS2_IRQ_CB(_devcb) \
devcb = &zeus2_device::set_irq_callback(*device, DEVCB_##_devcb);
devcb = &downcast<zeus2_device &>(*device).set_irq_callback(DEVCB_##_devcb);
#define MCFG_ZEUS2_FLOAT_MODE(_mode) \
downcast<zeus2_device *>(device)->set_float_mode(_mode);
@ -121,8 +121,8 @@ public:
TIMER_CALLBACK_MEMBER(display_irq_off);
TIMER_CALLBACK_MEMBER(display_irq);
template <class Object> static devcb_base &set_vblank_callback(device_t &device, Object &&cb) { return downcast<zeus2_device &>(device).m_vblank.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_irq_callback(device_t &device, Object &&cb) { return downcast<zeus2_device &>(device).m_irq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_vblank_callback(Object &&cb) { return m_vblank.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq.set_callback(std::forward<Object>(cb)); }
devcb_write_line m_vblank;
devcb_write_line m_irq;

View File

@ -72,6 +72,7 @@
#include "machine/i8251.h"
#include "machine/wd_fdc.h"
#include "machine/pic8259.h"
#include "machine/pit8253.h"
#include "video/tms9927.h"
#include "sound/beep.h"
#include "screen.h"
@ -100,6 +101,14 @@ public:
m_gfx(*this, "gfx"),
m_ram(*this, "ram")
{ }
void alphatp1(machine_config &config);
void alphatp2(machine_config &config);
void alphatp2u(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@ -119,16 +128,9 @@ public:
DECLARE_WRITE8_MEMBER(beep_w);
DECLARE_WRITE8_MEMBER(bank_w);
void alphatp1(machine_config &config);
void alphatp2(machine_config &config);
void alphatp2u(machine_config &config);
void alphatp2_io(address_map &map);
void alphatp2_map(address_map &map);
void alphatp2_mem(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
required_device<address_map_bank_device> m_bankdev;
required_device<i8041_device> m_kbdmcu;
@ -138,7 +140,6 @@ protected:
required_device<beep_device> m_beep;
required_ioport_array<16> m_keycols;
private:
uint8_t m_kbdclk, m_kbdread, m_kbdport2;
required_device<palette_device> m_palette;
required_shared_ptr<u8> m_vram;
@ -164,13 +165,23 @@ public:
m_floppy(*this, "fdc:%u", 0),
m_i8088(*this, "i8088"),
m_beep(*this, "beeper"),
m_pic(*this, "pic8259"),
m_keycols(*this, "COL.%u", 0),
m_scncfg(*this, "SCREEN"),
m_palette(*this, "palette"),
m_gfxdecode(*this, "gfxdecode"),
m_vram(*this, "vram"),
m_gfx(*this, "gfx"),
m_ram(*this, "ram")
{ }
void alphatp3(machine_config &config);
void alphatp30(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_READ_LINE_MEMBER(kbd_matrix_r);
@ -189,18 +200,23 @@ public:
DECLARE_WRITE8_MEMBER(beep_w);
DECLARE_WRITE8_MEMBER(bank_w);
DECLARE_READ8_MEMBER(start88_r);
DECLARE_READ8_MEMBER(comm85_r);
DECLARE_WRITE8_MEMBER(comm85_w);
DECLARE_READ8_MEMBER(comm88_r);
DECLARE_WRITE8_MEMBER(comm88_w);
DECLARE_READ8_MEMBER(gfxext_r);
DECLARE_WRITE8_MEMBER(gfxext_w);
DECLARE_WRITE8_MEMBER(gfxext1_w);
DECLARE_WRITE8_MEMBER(gfxext2_w);
DECLARE_WRITE8_MEMBER(gfxext3_w);
void alphatp3(machine_config &config);
void alphatp30(machine_config &config);
u8* vramext_addr_xlate(offs_t offset);
void alphatp30_8088_io(address_map &map);
void alphatp30_8088_map(address_map &map);
void alphatp3_io(address_map &map);
void alphatp3_map(address_map &map);
void alphatp3_mem(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
required_device<address_map_bank_device> m_bankdev;
required_device<i8041_device> m_kbdmcu;
@ -209,16 +225,24 @@ protected:
required_device_array<floppy_connector, 2> m_floppy;
optional_device<cpu_device> m_i8088;
required_device<beep_device> m_beep;
optional_device<pic8259_device> m_pic;
required_ioport_array<16> m_keycols;
required_ioport m_scncfg;
private:
uint8_t m_kbdclk, m_kbdread, m_kbdport2;
required_device<palette_device> m_palette;
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<u8> m_vram;
required_region_ptr<u8> m_gfx;
required_shared_ptr<u8> m_ram;
floppy_image_device *m_curfloppy;
bool m_fdc_irq, m_fdc_drq, m_fdc_hld;
u8 m_85_data, m_88_data;
bool m_88_da, m_85_da, m_88_started;
u8 m_gfxext1, m_gfxext2, m_vramlatch;
u16 m_gfxext3;
u8 m_vramext[371*80];
u8 m_vramchr[256*12]; // these are one 32K ram region but with complex mapping
};
//**************************************************************************
@ -277,11 +301,14 @@ ADDRESS_MAP_END
ADDRESS_MAP_START(alphatp_34_state::alphatp3_io)
ADDRESS_MAP_UNMAP_HIGH
//AM_RANGE(0x00, 0x00) AM_READ // unknown
AM_RANGE(0x04, 0x04) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w)
AM_RANGE(0x05, 0x05) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
AM_RANGE(0x08, 0x09) AM_READWRITE(comm88_r, comm88_w)
AM_RANGE(0x10, 0x11) AM_DEVREADWRITE("kbdmcu", i8041_device, upi41_master_r, upi41_master_w)
AM_RANGE(0x12, 0x12) AM_WRITE(beep_w)
AM_RANGE(0x40, 0x40) AM_READ(start88_r)
AM_RANGE(0x40, 0x41) AM_READ(start88_r)
//AM_RANGE(0x42, 0x42) AM_WRITE // unknown
AM_RANGE(0x50, 0x53) AM_READWRITE(fdc_r, fdc_w)
AM_RANGE(0x54, 0x54) AM_READWRITE(fdc_stat_r, fdc_cmd_w)
AM_RANGE(0x78, 0x78) AM_WRITE(bank_w)
@ -289,17 +316,34 @@ ADDRESS_MAP_END
ADDRESS_MAP_START(alphatp_34_state::alphatp30_8088_map)
AM_RANGE(0x00000, 0x1ffff) AM_RAM
AM_RANGE(0xe0000, 0xeffff) AM_READWRITE(gfxext_r, gfxext_w)
AM_RANGE(0xfe000, 0xfffff) AM_ROM AM_REGION("16bit", 0)
ADDRESS_MAP_END
ADDRESS_MAP_START(alphatp_34_state::alphatp30_8088_io)
//AM_RANGE(0x008a, 0x008a) AM_READ // unknown
AM_RANGE(0xf800, 0xf800) AM_WRITE(gfxext1_w)
AM_RANGE(0xf900, 0xf900) AM_WRITE(gfxext2_w)
AM_RANGE(0xfa00, 0xfa01) AM_WRITE(gfxext3_w)
//AM_RANGE(0xfb00, 0xfb0f) AM_WRITE // unknown possibly gfx ext
AM_RANGE(0xffe0, 0xffe1) AM_DEVREADWRITE("pic8259", pic8259_device, read, write)
AM_RANGE(0xffe4, 0xffe7) AM_DEVREADWRITE("pit", pit8253_device, read, write)
AM_RANGE(0xffe9, 0xffea) AM_READWRITE(comm85_r, comm85_w)
ADDRESS_MAP_END
READ8_MEMBER(alphatp_34_state::start88_r)
{
if(m_i8088)
m_i8088->resume(SUSPEND_REASON_DISABLE);
if(!offset)
{
if(m_i8088 && !m_88_started)
{
m_i8088->resume(SUSPEND_REASON_DISABLE);
m_88_started = true;
}
m_i8088->set_input_line(INPUT_LINE_TEST, ASSERT_LINE);
}
else
m_i8088->set_input_line(INPUT_LINE_TEST, CLEAR_LINE);
return 0;
}
@ -308,6 +352,106 @@ WRITE8_MEMBER(alphatp_34_state::bank_w)
m_bankdev->set_bank(BIT(data, 6));
}
READ8_MEMBER(alphatp_34_state::comm88_r)
{
if(!offset)
return (m_85_da ? 0 : 1) | (m_88_da ? 0 : 0x80);
if(m_i8088)
m_i8088->set_input_line(INPUT_LINE_TEST, ASSERT_LINE);
m_85_da = false;
return m_85_data;
}
WRITE8_MEMBER(alphatp_34_state::comm88_w)
{
m_88_data = data;
if(m_pic)
m_pic->ir2_w(ASSERT_LINE);
m_88_da = true;
}
READ8_MEMBER(alphatp_34_state::comm85_r)
{
if(!offset)
return m_88_da ? 0 : 1;
m_pic->ir2_w(CLEAR_LINE);
m_88_da = false;
return m_88_data;
}
WRITE8_MEMBER(alphatp_34_state::comm85_w)
{
m_85_data = data;
m_85_da = true;
m_i8088->set_input_line(INPUT_LINE_TEST, CLEAR_LINE);
}
WRITE8_MEMBER(alphatp_34_state::gfxext1_w)
{
m_gfxext1 = data;
}
WRITE8_MEMBER(alphatp_34_state::gfxext2_w)
{
m_gfxext2 = data;
}
WRITE8_MEMBER(alphatp_34_state::gfxext3_w)
{
u16 mask = 0xff << (offset ? 0 : 8);
m_gfxext3 = (m_gfxext3 & mask) | (data << (offset * 8));
}
u8* alphatp_34_state::vramext_addr_xlate(offs_t offset)
{
offset = offset >> 3;
int bank = offset >> 7;
int offs = offset & 0x7f;
if(offs < 80)
return &m_vramext[(((((m_gfxext2 & 0xf8) << 2) + bank) * 80) + offs) % (371*80)];
else
return &m_vramchr[(((((m_gfxext2 & 0x8) << 2) ^ bank) * 48) + (offs - 80)) % (256*12)];
}
READ8_MEMBER(alphatp_34_state::gfxext_r)
{
switch(m_gfxext1)
{
case 0x33:
m_vramlatch = *vramext_addr_xlate(offset);
return 0;
}
logerror("gfxext read offset %x %x\n", offset, m_gfxext1);
return 0;
}
WRITE8_MEMBER(alphatp_34_state::gfxext_w)
{
switch(m_gfxext1)
{
case 5:
{
if(m_gfxext3 == 0xe0f)
data = ~data;
u8 mask = 1 << (offset & 7);
u8 *addr = vramext_addr_xlate(offset);
*addr &= ~mask;
*addr |= data & mask;
break;
}
case 6:
*vramext_addr_xlate(offset) ^= 1 << (offset & 7);
break;
case 0x33:
*vramext_addr_xlate(offset) = m_vramlatch;
break;
default:
logerror("gfxext write offset %x %x %x\n", offset, data, m_gfxext1);
}
if((offset & 0x3ff) > 0x280)
m_gfxdecode->gfx(1)->mark_dirty(((uintptr_t)vramext_addr_xlate(offset) - (uintptr_t)m_vramchr) / 12);
}
//**************************************************************************
// INPUTS - Alphatronic P1, P2, P2S, P2U and Hell 2069
//**************************************************************************
@ -352,8 +496,9 @@ READ_LINE_MEMBER(alphatp_34_state::kbd_matrix_r)
WRITE8_MEMBER(alphatp_34_state::kbd_matrix_w)
{
if ((data & 0x80) && (!m_kbdclk))
if (data & 0x80)
{
data--; // FIXME: the p30 kbc program doesn't clock the keyboard but gets the wrong value from t0
const ioport_value tmp_read = m_keycols[(data >> 3) & 0xf]->read() & (1 << (data & 0x7));
m_kbdread = (tmp_read != 0) ? 1 : 0;
}
@ -710,6 +855,12 @@ PORT_START("COL.15")
PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_UNKNOWN)
PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) // 7Dh -> 85H func. F1 ok
PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SM") PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK))// SM (typewriter) mode key */
PORT_START("SCREEN")
PORT_CONFNAME(0x01, 0x00, "Screen")
PORT_CONFSETTING(0x00, "Main")
PORT_CONFSETTING(0x01, "Extension")
INPUT_PORTS_END
//**************************************************************************
@ -727,6 +878,17 @@ static const gfx_layout charlayout =
8*16
};
static const gfx_layout extcharlayout =
{
8, 12,
256,
1,
{ 0 },
{ 7, 6, 5, 4, 3, 2, 1, 0 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8 },
8*12
};
//**************************************************************************
// VIDEO - Alphatronic P1, P2, P2S, P2U and Hell 2069
//**************************************************************************
@ -744,7 +906,7 @@ uint32_t alphatp_12_state::screen_update(screen_device &screen, bitmap_rgb32 &bi
{
uint8_t code = m_vram[(vramy * 128) + x]; // helwie44 must be 128d is 080h physical display-ram step line
// draw 12 lines of the character
bool cursoren = cursor.contains(x * 8, vramy * 12);
bool cursoren = cursor.contains(x * 8, y * 12);
for (int line = 0; line < 12; line++)
{
uint8_t data = m_gfx[((code & 0x7f) * 16) + line];
@ -779,6 +941,7 @@ uint32_t alphatp_34_state::screen_update(screen_device &screen, bitmap_rgb32 &bi
int start = m_crtc->upscroll_offset();
rectangle cursor;
m_crtc->cursor_bounds(cursor);
bool scrext = m_scncfg->read() ? true : false;
for (int y = 0; y < 24; y++)
{
int vramy = (start + y) % 24;
@ -789,9 +952,20 @@ uint32_t alphatp_34_state::screen_update(screen_device &screen, bitmap_rgb32 &bi
bool cursoren = cursor.contains(x * 8, y * 12);
for (int line = 0; line < 12; line++)
{
uint8_t data = m_gfx[((code & 0x7f) * 16) + line];
if (cursoren)
data ^= 0xff;
u8 data = 0;
if(scrext)
{
offs_t offset = (((vramy * 12) + line) * 80) + x;
if(offset < (371 * 80))
data = m_vramext[offset];
code = 0;
}
else
{
data = m_gfx[((code & 0x7f) * 16) + line];
if (cursoren)
data ^= 0xff;
}
bitmap.pix32(y * 12 + line, x * 8 + 0) = pen[BIT(data, 0) ^ BIT(code, 7)];
bitmap.pix32(y * 12 + line, x * 8 + 1) = pen[BIT(data, 1) ^ BIT(code, 7)];
bitmap.pix32(y * 12 + line, x * 8 + 2) = pen[BIT(data, 2) ^ BIT(code, 7)];
@ -879,7 +1053,7 @@ WRITE8_MEMBER(alphatp_12_state::fdc_cmd_w)
{
floppy_image_device *floppy = nullptr;
logerror("%02x to fdc_cmd_w: motor %d side %d\n", data, (data & 0x10)>>4, (data & 4)>>2);
//logerror("%02x to fdc_cmd_w: motor %d side %d\n", data, (data & 0x10)>>4, (data & 4)>>2);
// select drive
if (!(data & 0x80))
@ -958,7 +1132,7 @@ WRITE8_MEMBER(alphatp_34_state::fdc_cmd_w)
{
floppy_image_device *floppy = nullptr;
logerror("%02x to fdc_cmd_w: motor %d side %d\n", data, (data & 0x10)>>4, (data & 4)>>2);
//logerror("%02x to fdc_cmd_w: motor %d side %d\n", data, (data & 0x10)>>4, (data & 4)>>2);
// select drive
if (!(data & 0x80))
@ -1087,9 +1261,11 @@ void alphatp_34_state::machine_start()
{
// setup banking
membank("ram_0000")->set_base(m_ram.target());
save_item(NAME(m_vramext));
m_kbdclk = 0; // must be initialized here b/c mcs48_reset() causes write of 0xff to all ports
if(m_i8088)
m_gfxdecode->set_gfx(1, std::make_unique<gfx_element>(m_palette, extcharlayout, &m_vramchr[0], 0, 1, 0));
}
void alphatp_34_state::machine_reset()
@ -1097,6 +1273,7 @@ void alphatp_34_state::machine_reset()
m_kbdread = 1;
m_kbdclk = 1; m_fdc_irq = m_fdc_drq = m_fdc_hld = 0;
m_curfloppy = nullptr;
m_88_da = m_85_da = m_88_started = false;
}
MACHINE_CONFIG_START(alphatp_34_state::alphatp3)
MCFG_CPU_ADD("maincpu", I8085A, XTAL(6'000'000))
@ -1160,6 +1337,12 @@ MACHINE_CONFIG_START(alphatp_34_state::alphatp30)
MCFG_DEVICE_ADD("pic8259", PIC8259, 0)
MCFG_PIC8259_OUT_INT_CB(INPUTLINE("i8088", 0))
MCFG_PIC8259_IN_SP_CB(GND)
MCFG_DEVICE_ADD("pit", PIT8253, 0)
MCFG_PIT8253_CLK0(1000000) // 15Mhz osc with unknown divisor
MCFG_PIT8253_CLK1(1000000)
MCFG_PIT8253_CLK2(1000000)
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
MACHINE_CONFIG_END
//**************************************************************************

View File

@ -91,6 +91,11 @@ Canon cat credits easter egg:
* hit EXPLAIN (use front + N) and the credits screen will be displayed
Canon Cat credits details: (WIP)
Jef Raskin
John "Sandy" Bumgarner
Charles Springer
Jonathan Sand
Terry Holmes - wrote tForth, the language in which the cat is programmed
Scott Kim - responsible for fonts on swyft and cat
Ralph Voorhees - Model construction and mockups (swyft 'flat cat')

View File

@ -1574,18 +1574,18 @@ ROM_END
ROM_START( dblplay )
ROM_REGION( 0x38000, "master", 0 )
ROM_LOAD( "15018-01.u101", 0x00000, 0x02000, CRC(17b6af29) SHA1(00865927d74f735ed9bbe635bb554d408bf7f856) )
ROM_LOAD( "15019-01.u102", 0x10000, 0x02000, CRC(9fc8205e) SHA1(2b783c406539a3d06adacd6b15c8edd86b994561) )
ROM_LOAD( "15018-01.u101", 0x00000, 0x02000, CRC(17b6af29) SHA1(00865927d74f735ed9bbe635bb554d408bf7f856) )
ROM_LOAD( "15019-01.u102", 0x10000, 0x02000, CRC(9fc8205e) SHA1(2b783c406539a3d06adacd6b15c8edd86b994561) )
ROM_CONTINUE( 0x1c000, 0x02000 )
ROM_LOAD( "15020-01.u103", 0x12000, 0x02000, CRC(4edcc091) SHA1(5db2641fb92eeba22b731074e2818484aaa247a0) )
ROM_LOAD( "15020-01.u103", 0x12000, 0x02000, CRC(4edcc091) SHA1(5db2641fb92eeba22b731074e2818484aaa247a0) )
ROM_CONTINUE( 0x1e000, 0x02000 )
ROM_LOAD( "15021-01.u104", 0x14000, 0x02000, CRC(a0eba1c7) SHA1(5d1afd2e6f694416ab64aec334ce6f7803dac93e) )
ROM_LOAD( "15021-01.u104", 0x14000, 0x02000, CRC(a0eba1c7) SHA1(5d1afd2e6f694416ab64aec334ce6f7803dac93e) )
ROM_CONTINUE( 0x20000, 0x02000 )
ROM_LOAD( "15022-01.u105", 0x16000, 0x02000, CRC(7bbfe0b7) SHA1(551e4d48ffc8f3660d59bb4e59f73d438f4eb20d) )
ROM_LOAD( "15022-01.u105", 0x16000, 0x02000, CRC(7bbfe0b7) SHA1(551e4d48ffc8f3660d59bb4e59f73d438f4eb20d) )
ROM_CONTINUE( 0x22000, 0x02000 )
ROM_LOAD( "15023-01.u106", 0x18000, 0x02000, CRC(bbedae34) SHA1(4c15f63ea6ac822a6c9bc5c3b9f9e5a62e57b88c) )
ROM_LOAD( "15023-01.u106", 0x18000, 0x02000, CRC(bbedae34) SHA1(4c15f63ea6ac822a6c9bc5c3b9f9e5a62e57b88c) )
ROM_CONTINUE( 0x24000, 0x02000 )
ROM_LOAD( "15024-01.u107", 0x1a000, 0x02000, CRC(02afcf52) SHA1(686332740733d92f87fb004de85be4cb9cbaabc0) )
ROM_LOAD( "15024-01.u107", 0x1a000, 0x02000, CRC(02afcf52) SHA1(686332740733d92f87fb004de85be4cb9cbaabc0) )
ROM_CONTINUE( 0x26000, 0x02000 )
/* Extra banks ( referred to as the "top" board) */
ROM_LOAD( "15025-01.u2t", 0x28000, 0x02000, CRC(1c959895) SHA1(efd40c1775f8283162602fdb490bfc18ee784a12) )
@ -1640,18 +1640,18 @@ For Strike Zone, the label format is:
*/
ROM_START( strkzone )
ROM_REGION( 0x38000, "master", 0 )
ROM_LOAD( "strkzone.u101", 0x00000, 0x04000, CRC(8d83a611) SHA1(d17114559c8d60e3107895bdcb1886cc843b624c) )
ROM_LOAD( "strkzone.u102", 0x10000, 0x02000, CRC(3859e67d) SHA1(0a0d18c16fa5becae2ecc147dfafadc16dee8d2f) )
ROM_LOAD( "strkzone.u101", 0x00000, 0x04000, CRC(8d83a611) SHA1(d17114559c8d60e3107895bdcb1886cc843b624c) )
ROM_LOAD( "strkzone.u102", 0x10000, 0x02000, CRC(3859e67d) SHA1(0a0d18c16fa5becae2ecc147dfafadc16dee8d2f) )
ROM_CONTINUE( 0x1c000, 0x02000 )
ROM_LOAD( "strkzone.u103", 0x12000, 0x02000, CRC(cdd83bfb) SHA1(6d5c1e9e951a0bfdd79fd54b06e2e4f1bf8e37b4) )
ROM_LOAD( "strkzone.u103", 0x12000, 0x02000, CRC(cdd83bfb) SHA1(6d5c1e9e951a0bfdd79fd54b06e2e4f1bf8e37b4) )
ROM_CONTINUE( 0x1e000, 0x02000 )
ROM_LOAD( "strkzone.u104", 0x14000, 0x02000, CRC(be280212) SHA1(f48f2edd41bd4f2729ee6c15fb228c758da40ea1) )
ROM_LOAD( "strkzone.u104", 0x14000, 0x02000, CRC(be280212) SHA1(f48f2edd41bd4f2729ee6c15fb228c758da40ea1) )
ROM_CONTINUE( 0x20000, 0x02000 )
ROM_LOAD( "strkzone.u105", 0x16000, 0x02000, CRC(afb63390) SHA1(42df802ca2a247b971ae274bd6f7d1f1e5893fe3) )
ROM_LOAD( "strkzone.u105", 0x16000, 0x02000, CRC(afb63390) SHA1(42df802ca2a247b971ae274bd6f7d1f1e5893fe3) )
ROM_CONTINUE( 0x22000, 0x02000 )
ROM_LOAD( "strkzone.u106", 0x18000, 0x02000, CRC(e853b9f6) SHA1(07cc7bd0053422d68526a6e1b68165db60af6429) )
ROM_LOAD( "strkzone.u106", 0x18000, 0x02000, CRC(e853b9f6) SHA1(07cc7bd0053422d68526a6e1b68165db60af6429) )
ROM_CONTINUE( 0x24000, 0x02000 )
ROM_LOAD( "strkzone.u107", 0x1a000, 0x02000, CRC(1b4b6c2d) SHA1(9cd5e5ce7bc3088f14b6cbbd7c2d5b5e69a7bc11) )
ROM_LOAD( "strkzone.u107", 0x1a000, 0x02000, CRC(1b4b6c2d) SHA1(9cd5e5ce7bc3088f14b6cbbd7c2d5b5e69a7bc11) )
ROM_CONTINUE( 0x26000, 0x02000 )
/* Extra banks ( referred to as the "top" board) */
ROM_LOAD( "strkzone.u2t", 0x28000, 0x02000, CRC(8e0af06f) SHA1(ad277433a2c97c388e626a0ce9119466dff85d37) )
@ -2420,44 +2420,52 @@ ROM_START( offroadt2p )
ROM_END
/*
Pig Out: Dine Like a Swine!, the label format is:
------------------------
|(C)1990 Leland Corp. | -> Copyright & Manufacturer
|P/N 03-29020-01 | -> Part number with revision
|PIGOUT U58T | -> Game name & ROM PCB location
------------------------
*/
ROM_START( pigout )
ROM_REGION( 0x040000, "master", 0 )
ROM_LOAD( "poutu58t.bin", 0x00000, 0x10000, CRC(8fe4b683) SHA1(6f98a4e54a558a642b7193af85823b29ade46919) )
ROM_LOAD( "poutu59t.bin", 0x10000, 0x10000, CRC(ab907762) SHA1(971c34ae42c17aa27880665966dc15a98387bebb) )
ROM_LOAD( "poutu57t.bin", 0x20000, 0x10000, CRC(c22be0ff) SHA1(52b76918358046f40ea4b74e53a38d8984125dbb) )
ROM_LOAD( "03-29020.u58t", 0x00000, 0x10000, CRC(8fe4b683) SHA1(6f98a4e54a558a642b7193af85823b29ade46919) ) /* more likely rev 02 than rev 00 */
ROM_LOAD( "03-29021.u59t", 0x10000, 0x10000, CRC(ab907762) SHA1(971c34ae42c17aa27880665966dc15a98387bebb) ) /* more likely rev 02 than rev 00 */
ROM_LOAD( "03-29019-01.u57t", 0x20000, 0x10000, CRC(c22be0ff) SHA1(52b76918358046f40ea4b74e53a38d8984125dbb) )
ROM_REGION( 0x080000, "slave", 0 )
ROM_LOAD( "poutu3.bin", 0x00000, 0x02000, CRC(af213cb7) SHA1(cf31ee09ee3685274f5ce1df954e7e87199e2e80) )
ROM_LOAD( "poutu2t.bin", 0x10000, 0x10000, CRC(b23164c6) SHA1(11edbea7bf54a68cb85df36345f39654d726a7f2) )
ROM_LOAD( "poutu3t.bin", 0x20000, 0x10000, CRC(d93f105f) SHA1(9fe469d674e84209eb55704fd2ad317d11e4caac) )
ROM_LOAD( "poutu4t.bin", 0x30000, 0x10000, CRC(b7c47bfe) SHA1(42b1ce4401e3754f6fb1453ab4a661dc4237770d) )
ROM_LOAD( "poutu5t.bin", 0x40000, 0x10000, CRC(d9b9dfbf) SHA1(a6f663638d9f6e14c1a6a99ca811d1d495664412) )
ROM_LOAD( "poutu6t.bin", 0x50000, 0x10000, CRC(728c7c1a) SHA1(cc3211313a6b3998a0458d3865e3d2a0f9eb8a94) )
ROM_LOAD( "poutu7t.bin", 0x60000, 0x10000, CRC(393bd990) SHA1(d66d3c5c6d97bb983549d5037bd69c481751b9bf) )
ROM_LOAD( "poutu8t.bin", 0x70000, 0x10000, CRC(cb9ffaad) SHA1(f39fb33e5a30619cd3017574739ccace80afbe1f) )
ROM_LOAD( "03-29000-01.u3", 0x00000, 0x02000, CRC(af213cb7) SHA1(cf31ee09ee3685274f5ce1df954e7e87199e2e80) )
ROM_LOAD( "03-29001-01.u2t", 0x10000, 0x10000, CRC(b23164c6) SHA1(11edbea7bf54a68cb85df36345f39654d726a7f2) )
ROM_LOAD( "03-29002-01.u3t", 0x20000, 0x10000, CRC(d93f105f) SHA1(9fe469d674e84209eb55704fd2ad317d11e4caac) )
ROM_LOAD( "03-29003-01.u4t", 0x30000, 0x10000, CRC(b7c47bfe) SHA1(42b1ce4401e3754f6fb1453ab4a661dc4237770d) )
ROM_LOAD( "03-29004-01.u5t", 0x40000, 0x10000, CRC(d9b9dfbf) SHA1(a6f663638d9f6e14c1a6a99ca811d1d495664412) )
ROM_LOAD( "03-29005-01.u6t", 0x50000, 0x10000, CRC(728c7c1a) SHA1(cc3211313a6b3998a0458d3865e3d2a0f9eb8a94) )
ROM_LOAD( "03-29006-01.u7t", 0x60000, 0x10000, CRC(393bd990) SHA1(d66d3c5c6d97bb983549d5037bd69c481751b9bf) )
ROM_LOAD( "03-29007-01.u8t", 0x70000, 0x10000, CRC(cb9ffaad) SHA1(f39fb33e5a30619cd3017574739ccace80afbe1f) )
ROM_REGION( 0x100000, "audiocpu", 0 )
ROM_LOAD16_BYTE( "poutu25t.bin", 0x040001, 0x10000, CRC(92cd2617) SHA1(88e318f4a41c67fd9e91f013b3c29b6275b69c31) )
ROM_LOAD16_BYTE( "poutu13t.bin", 0x040000, 0x10000, CRC(9448c389) SHA1(7bb0bd49044ba4b302048d2922ed300f799a2efb) )
ROM_LOAD16_BYTE( "poutu26t.bin", 0x060001, 0x10000, CRC(ab57de8f) SHA1(28a366e7441bc85dfb814f7a7797aa704a0277ba) )
ROM_LOAD16_BYTE( "poutu14t.bin", 0x060000, 0x10000, CRC(30678e93) SHA1(6d2c8f5c9de3d016538dc1da99ec0017fefdf35a) )
ROM_LOAD16_BYTE( "poutu27t.bin", 0x0e0001, 0x10000, CRC(37a8156e) SHA1(a0b44b1ba6701daaa26576c6c892fd97ec82d5e3) )
ROM_LOAD16_BYTE( "poutu15t.bin", 0x0e0000, 0x10000, CRC(1c60d58b) SHA1(93f83a231d06cd958d3539a528e6ee6c2d9904ed) )
ROM_LOAD16_BYTE( "03-29025-01.u25t", 0x040001, 0x10000, CRC(92cd2617) SHA1(88e318f4a41c67fd9e91f013b3c29b6275b69c31) )
ROM_LOAD16_BYTE( "03-29022-01.u13t", 0x040000, 0x10000, CRC(9448c389) SHA1(7bb0bd49044ba4b302048d2922ed300f799a2efb) )
ROM_LOAD16_BYTE( "03-29026-01.u26t", 0x060001, 0x10000, CRC(ab57de8f) SHA1(28a366e7441bc85dfb814f7a7797aa704a0277ba) )
ROM_LOAD16_BYTE( "03-29023-01.u14t", 0x060000, 0x10000, CRC(30678e93) SHA1(6d2c8f5c9de3d016538dc1da99ec0017fefdf35a) )
ROM_LOAD16_BYTE( "03-29027-01.u27t", 0x0e0001, 0x10000, CRC(37a8156e) SHA1(a0b44b1ba6701daaa26576c6c892fd97ec82d5e3) )
ROM_LOAD16_BYTE( "03-29024-01.u15t", 0x0e0000, 0x10000, CRC(1c60d58b) SHA1(93f83a231d06cd958d3539a528e6ee6c2d9904ed) )
ROM_REGION( 0x18000, "gfx1", 0 )
ROM_LOAD( "poutu93.bin", 0x000000, 0x08000, CRC(f102a04d) SHA1(3ecc0ab34a5d6e760679dc5fd7d32dd439f797d5) )
ROM_LOAD( "poutu94.bin", 0x008000, 0x08000, CRC(ec63c015) SHA1(10010a17ffda468dbe2940fae6aae49c56e1ad78) )
ROM_LOAD( "poutu95.bin", 0x010000, 0x08000, CRC(ba6e797e) SHA1(135f905b7663026a99fd9aca8e0247a72bf43cdb) )
ROM_LOAD( "03-29016-01.u93", 0x000000, 0x08000, CRC(f102a04d) SHA1(3ecc0ab34a5d6e760679dc5fd7d32dd439f797d5) )
ROM_LOAD( "03-29017-01.u94", 0x008000, 0x08000, CRC(ec63c015) SHA1(10010a17ffda468dbe2940fae6aae49c56e1ad78) )
ROM_LOAD( "03-29018-01.u95", 0x010000, 0x08000, CRC(ba6e797e) SHA1(135f905b7663026a99fd9aca8e0247a72bf43cdb) )
ROM_REGION( 0x40000, "user1", 0 ) /* Ordering: 70/92/69/91/68/90/67/89 */
ROM_LOAD( "poutu70.bin", 0x00000, 0x4000, CRC(7db4eaa1) SHA1(e1ec186a8359b3302071e87577092008065c39de) )
ROM_LOAD( "poutu92.bin", 0x04000, 0x4000, CRC(20fa57bb) SHA1(7e94698a25c5459991f0e99a50e5e98f392cda41) )
ROM_LOAD( "poutu69.bin", 0x08000, 0x4000, CRC(a16886f3) SHA1(48a0cbbea80cc38cd4d5594d3367282690724c59) )
ROM_LOAD( "poutu91.bin", 0x0c000, 0x4000, CRC(482a3581) SHA1(bab1140a5c0a2ff4c3ef076155429e35cbfe2335) )
ROM_LOAD( "poutu68.bin", 0x10000, 0x4000, CRC(7b62a3ed) SHA1(fc707626a3fa78d38f5b2cbe3b8786e8c4382563) )
ROM_LOAD( "poutu90.bin", 0x14000, 0x4000, CRC(9615d710) SHA1(a9b2d2bf4d6edecdc212f5d96eec8095833bee22) )
ROM_LOAD( "poutu67.bin", 0x18000, 0x4000, CRC(af85ce79) SHA1(76e421772dfdf4d27e36aa51993a987883e015b0) )
ROM_LOAD( "poutu89.bin", 0x1c000, 0x4000, CRC(6c874a05) SHA1(a931ba5ac41facfaf32c5e940eb011e780ab234a) )
ROM_LOAD( "03-29011-01.u70", 0x00000, 0x4000, CRC(7db4eaa1) SHA1(e1ec186a8359b3302071e87577092008065c39de) )
ROM_LOAD( "03-29015-01.u92", 0x04000, 0x4000, CRC(20fa57bb) SHA1(7e94698a25c5459991f0e99a50e5e98f392cda41) )
ROM_LOAD( "03-29010-01.u69", 0x08000, 0x4000, CRC(a16886f3) SHA1(48a0cbbea80cc38cd4d5594d3367282690724c59) )
ROM_LOAD( "03-29014-01.u91", 0x0c000, 0x4000, CRC(482a3581) SHA1(bab1140a5c0a2ff4c3ef076155429e35cbfe2335) )
ROM_LOAD( "03-29009-01.u68", 0x10000, 0x4000, CRC(7b62a3ed) SHA1(fc707626a3fa78d38f5b2cbe3b8786e8c4382563) )
ROM_LOAD( "03-29013-01.u90", 0x14000, 0x4000, CRC(9615d710) SHA1(a9b2d2bf4d6edecdc212f5d96eec8095833bee22) )
ROM_LOAD( "03-29008-01.u67", 0x18000, 0x4000, CRC(af85ce79) SHA1(76e421772dfdf4d27e36aa51993a987883e015b0) )
ROM_LOAD( "03-29012-01.u89", 0x1c000, 0x4000, CRC(6c874a05) SHA1(a931ba5ac41facfaf32c5e940eb011e780ab234a) )
ROM_REGION16_BE( 0x80, "eeprom", 0 )
ROM_LOAD16_WORD( "eeprom-pigout.bin", 0x0000, 0x0080, CRC(9646fa72) SHA1(80311bd6ba8988afc4ad1aabf3f452266686917f) )
@ -2468,40 +2476,40 @@ ROM_START( pigouta )
ROM_REGION( 0x040000, "master", 0 )
ROM_LOAD( "03-29020-01.u58t", 0x00000, 0x10000, CRC(6c815982) SHA1(0720b22afd16e9bdc5d4a9e9a0071674ea46d038) )
ROM_LOAD( "03-29021-01.u59t", 0x10000, 0x10000, CRC(9de7a763) SHA1(9a612730a9d80d84114c1afc4a1887277d1ad5bc) )
ROM_LOAD( "poutu57t.bin", 0x20000, 0x10000, CRC(c22be0ff) SHA1(52b76918358046f40ea4b74e53a38d8984125dbb) )
ROM_LOAD( "03-29019-01.u57t", 0x20000, 0x10000, CRC(c22be0ff) SHA1(52b76918358046f40ea4b74e53a38d8984125dbb) )
ROM_REGION( 0x80000, "slave", 0 )
ROM_LOAD( "poutu3.bin", 0x00000, 0x02000, CRC(af213cb7) SHA1(cf31ee09ee3685274f5ce1df954e7e87199e2e80) )
ROM_LOAD( "poutu2t.bin", 0x10000, 0x10000, CRC(b23164c6) SHA1(11edbea7bf54a68cb85df36345f39654d726a7f2) )
ROM_LOAD( "poutu3t.bin", 0x20000, 0x10000, CRC(d93f105f) SHA1(9fe469d674e84209eb55704fd2ad317d11e4caac) )
ROM_LOAD( "poutu4t.bin", 0x30000, 0x10000, CRC(b7c47bfe) SHA1(42b1ce4401e3754f6fb1453ab4a661dc4237770d) )
ROM_LOAD( "poutu5t.bin", 0x40000, 0x10000, CRC(d9b9dfbf) SHA1(a6f663638d9f6e14c1a6a99ca811d1d495664412) )
ROM_LOAD( "poutu6t.bin", 0x50000, 0x10000, CRC(728c7c1a) SHA1(cc3211313a6b3998a0458d3865e3d2a0f9eb8a94) )
ROM_LOAD( "poutu7t.bin", 0x60000, 0x10000, CRC(393bd990) SHA1(d66d3c5c6d97bb983549d5037bd69c481751b9bf) )
ROM_LOAD( "poutu8t.bin", 0x70000, 0x10000, CRC(cb9ffaad) SHA1(f39fb33e5a30619cd3017574739ccace80afbe1f) )
ROM_LOAD( "03-29000-01.u3", 0x00000, 0x02000, CRC(af213cb7) SHA1(cf31ee09ee3685274f5ce1df954e7e87199e2e80) )
ROM_LOAD( "03-29001-01.u2t", 0x10000, 0x10000, CRC(b23164c6) SHA1(11edbea7bf54a68cb85df36345f39654d726a7f2) )
ROM_LOAD( "03-29002-01.u3t", 0x20000, 0x10000, CRC(d93f105f) SHA1(9fe469d674e84209eb55704fd2ad317d11e4caac) )
ROM_LOAD( "03-29003-01.u4t", 0x30000, 0x10000, CRC(b7c47bfe) SHA1(42b1ce4401e3754f6fb1453ab4a661dc4237770d) )
ROM_LOAD( "03-29004-01.u5t", 0x40000, 0x10000, CRC(d9b9dfbf) SHA1(a6f663638d9f6e14c1a6a99ca811d1d495664412) )
ROM_LOAD( "03-29005-01.u6t", 0x50000, 0x10000, CRC(728c7c1a) SHA1(cc3211313a6b3998a0458d3865e3d2a0f9eb8a94) )
ROM_LOAD( "03-29006-01.u7t", 0x60000, 0x10000, CRC(393bd990) SHA1(d66d3c5c6d97bb983549d5037bd69c481751b9bf) )
ROM_LOAD( "03-29007-01.u8t", 0x70000, 0x10000, CRC(cb9ffaad) SHA1(f39fb33e5a30619cd3017574739ccace80afbe1f) )
ROM_REGION( 0x100000, "audiocpu", 0 )
ROM_LOAD16_BYTE( "poutu25t.bin", 0x040001, 0x10000, CRC(92cd2617) SHA1(88e318f4a41c67fd9e91f013b3c29b6275b69c31) )
ROM_LOAD16_BYTE( "poutu13t.bin", 0x040000, 0x10000, CRC(9448c389) SHA1(7bb0bd49044ba4b302048d2922ed300f799a2efb) )
ROM_LOAD16_BYTE( "poutu26t.bin", 0x060001, 0x10000, CRC(ab57de8f) SHA1(28a366e7441bc85dfb814f7a7797aa704a0277ba) )
ROM_LOAD16_BYTE( "poutu14t.bin", 0x060000, 0x10000, CRC(30678e93) SHA1(6d2c8f5c9de3d016538dc1da99ec0017fefdf35a) )
ROM_LOAD16_BYTE( "poutu27t.bin", 0x0e0001, 0x10000, CRC(37a8156e) SHA1(a0b44b1ba6701daaa26576c6c892fd97ec82d5e3) )
ROM_LOAD16_BYTE( "poutu15t.bin", 0x0e0000, 0x10000, CRC(1c60d58b) SHA1(93f83a231d06cd958d3539a528e6ee6c2d9904ed) )
ROM_LOAD16_BYTE( "03-29025-01.u25t", 0x040001, 0x10000, CRC(92cd2617) SHA1(88e318f4a41c67fd9e91f013b3c29b6275b69c31) )
ROM_LOAD16_BYTE( "03-29022-01.u13t", 0x040000, 0x10000, CRC(9448c389) SHA1(7bb0bd49044ba4b302048d2922ed300f799a2efb) )
ROM_LOAD16_BYTE( "03-29026-01.u26t", 0x060001, 0x10000, CRC(ab57de8f) SHA1(28a366e7441bc85dfb814f7a7797aa704a0277ba) )
ROM_LOAD16_BYTE( "03-29023-01.u14t", 0x060000, 0x10000, CRC(30678e93) SHA1(6d2c8f5c9de3d016538dc1da99ec0017fefdf35a) )
ROM_LOAD16_BYTE( "03-29027-01.u27t", 0x0e0001, 0x10000, CRC(37a8156e) SHA1(a0b44b1ba6701daaa26576c6c892fd97ec82d5e3) )
ROM_LOAD16_BYTE( "03-29024-01.u15t", 0x0e0000, 0x10000, CRC(1c60d58b) SHA1(93f83a231d06cd958d3539a528e6ee6c2d9904ed) )
ROM_REGION( 0x18000, "gfx1", 0 )
ROM_LOAD( "poutu93.bin", 0x000000, 0x08000, CRC(f102a04d) SHA1(3ecc0ab34a5d6e760679dc5fd7d32dd439f797d5) )
ROM_LOAD( "poutu94.bin", 0x008000, 0x08000, CRC(ec63c015) SHA1(10010a17ffda468dbe2940fae6aae49c56e1ad78) )
ROM_LOAD( "poutu95.bin", 0x010000, 0x08000, CRC(ba6e797e) SHA1(135f905b7663026a99fd9aca8e0247a72bf43cdb) )
ROM_LOAD( "03-29016-01.u93", 0x000000, 0x08000, CRC(f102a04d) SHA1(3ecc0ab34a5d6e760679dc5fd7d32dd439f797d5) )
ROM_LOAD( "03-29017-01.u94", 0x008000, 0x08000, CRC(ec63c015) SHA1(10010a17ffda468dbe2940fae6aae49c56e1ad78) )
ROM_LOAD( "03-29018-01.u95", 0x010000, 0x08000, CRC(ba6e797e) SHA1(135f905b7663026a99fd9aca8e0247a72bf43cdb) )
ROM_REGION( 0x40000, "user1", 0 ) /* Ordering: 70/92/69/91/68/90/67/89 */
ROM_LOAD( "poutu70.bin", 0x00000, 0x4000, CRC(7db4eaa1) SHA1(e1ec186a8359b3302071e87577092008065c39de) )
ROM_LOAD( "poutu92.bin", 0x04000, 0x4000, CRC(20fa57bb) SHA1(7e94698a25c5459991f0e99a50e5e98f392cda41) )
ROM_LOAD( "poutu69.bin", 0x08000, 0x4000, CRC(a16886f3) SHA1(48a0cbbea80cc38cd4d5594d3367282690724c59) )
ROM_LOAD( "poutu91.bin", 0x0c000, 0x4000, CRC(482a3581) SHA1(bab1140a5c0a2ff4c3ef076155429e35cbfe2335) )
ROM_LOAD( "poutu68.bin", 0x10000, 0x4000, CRC(7b62a3ed) SHA1(fc707626a3fa78d38f5b2cbe3b8786e8c4382563) )
ROM_LOAD( "poutu90.bin", 0x14000, 0x4000, CRC(9615d710) SHA1(a9b2d2bf4d6edecdc212f5d96eec8095833bee22) )
ROM_LOAD( "poutu67.bin", 0x18000, 0x4000, CRC(af85ce79) SHA1(76e421772dfdf4d27e36aa51993a987883e015b0) )
ROM_LOAD( "poutu89.bin", 0x1c000, 0x4000, CRC(6c874a05) SHA1(a931ba5ac41facfaf32c5e940eb011e780ab234a) )
ROM_LOAD( "03-29011-01.u70", 0x00000, 0x4000, CRC(7db4eaa1) SHA1(e1ec186a8359b3302071e87577092008065c39de) )
ROM_LOAD( "03-29015-01.u92", 0x04000, 0x4000, CRC(20fa57bb) SHA1(7e94698a25c5459991f0e99a50e5e98f392cda41) )
ROM_LOAD( "03-29010-01.u69", 0x08000, 0x4000, CRC(a16886f3) SHA1(48a0cbbea80cc38cd4d5594d3367282690724c59) )
ROM_LOAD( "03-29014-01.u91", 0x0c000, 0x4000, CRC(482a3581) SHA1(bab1140a5c0a2ff4c3ef076155429e35cbfe2335) )
ROM_LOAD( "03-29009-01.u68", 0x10000, 0x4000, CRC(7b62a3ed) SHA1(fc707626a3fa78d38f5b2cbe3b8786e8c4382563) )
ROM_LOAD( "03-29013-01.u90", 0x14000, 0x4000, CRC(9615d710) SHA1(a9b2d2bf4d6edecdc212f5d96eec8095833bee22) )
ROM_LOAD( "03-29008-01.u67", 0x18000, 0x4000, CRC(af85ce79) SHA1(76e421772dfdf4d27e36aa51993a987883e015b0) )
ROM_LOAD( "03-29012-01.u89", 0x1c000, 0x4000, CRC(6c874a05) SHA1(a931ba5ac41facfaf32c5e940eb011e780ab234a) )
ROM_REGION16_BE( 0x80, "eeprom", 0 )
ROM_LOAD16_WORD( "eeprom-pigout.bin", 0x0000, 0x0080, CRC(9646fa72) SHA1(80311bd6ba8988afc4ad1aabf3f452266686917f) )
@ -3301,8 +3309,8 @@ GAME( 1989, offroad, 0, lelandi, offroad, leland_state, offroad, R
GAME( 1989, offroad3, offroad, lelandi, offroad, leland_state, offroad, ROT0, "Leland Corporation", "Ironman Ivan Stewart's Super Off-Road (rev 3)", 0 )
GAME( 1989, offroadt, 0, lelandi, offroad, leland_state, offroadt, ROT0, "Leland Corporation", "Ironman Ivan Stewart's Super Off-Road Track-Pak", 0 )
GAME( 1989, offroadt2p, offroadt,lelandi, offroadt2p, leland_state, offroadt, ROT0, "Leland Corporation", "Ironman Ivan Stewart's Super Off-Road Track-Pak (rev 4, 2 Players)", 0 )
GAME( 1990, pigout, 0, lelandi, pigout, leland_state, pigout, ROT0, "Leland Corporation", "Pig Out: Dine Like a Swine! (set 1)", 0 )
GAME( 1990, pigouta, pigout, lelandi, pigout, leland_state, pigout, ROT0, "Leland Corporation", "Pig Out: Dine Like a Swine! (set 2)", 0 )
GAME( 1990, pigout, 0, lelandi, pigout, leland_state, pigout, ROT0, "Leland Corporation", "Pig Out: Dine Like a Swine! (rev 2?)", 0 ) /* need to verify revision */
GAME( 1990, pigouta, pigout, lelandi, pigout, leland_state, pigout, ROT0, "Leland Corporation", "Pig Out: Dine Like a Swine! (rev 1)", 0 )
/* Ataxx-era PCB, 80186 sound */
GAME( 1990, ataxx, 0, ataxx, ataxx, leland_state, ataxx, ROT0, "Leland Corporation", "Ataxx (set 1)", 0 )

View File

@ -1892,8 +1892,8 @@ static INPUT_PORTS_START( daitorid )
COINS_SOUND
PORT_START("IN1") // $c00002
JOY_LSB(1, BUTTON1, UNKNOWN, UNKNOWN, UNKNOWN) // BUTTON2 and BUTTON3 in "test mode" only
JOY_MSB(2, BUTTON1, UNKNOWN, UNKNOWN, UNKNOWN) // BUTTON2 and BUTTON3 in "test mode" only
JOY_LSB(1, BUTTON1, BUTTON2, UNKNOWN, UNKNOWN) // BUTTON3 in "test mode" only
JOY_MSB(2, BUTTON1, BUTTON2, UNKNOWN, UNKNOWN) // BUTTON3 in "test mode" only
PORT_START("DSW0") // $c00004
COINAGE_SERVICE_LOC(SW1)

View File

@ -390,6 +390,9 @@ MACHINE_START_MEMBER(model2_state,model2)
m_port_1c00010 = 0;
m_port_1c00012 = 1;
m_port_1c00014 = 2;
// initialize custom debugger pool, @see machine/model2.cpp
debug_init();
}
MACHINE_START_MEMBER(model2_state,srallyc)
@ -1280,70 +1283,6 @@ WRITE32_MEMBER(model2_state::model2_serial_w)
}
}
/* Protection handling */
READ32_MEMBER(model2_state::model2_5881prot_r)
{
uint32_t retval = 0;
if (offset == 0x0000/4)
{
// status: bit 0 = 1 for busy, 0 for ready
retval = 0; // we're always ready
}
else if (offset == 0x000e/4)
{
if (first_read == 1)
{
// the RAM based schemes expect a dummy value before the start of the stream
// to match the previous simulation (dynamite cop) I use 0x0000 here
first_read = 0;
retval = 0;
}
else
{
uint8_t* base;
retval = m_cryptdevice->do_decrypt(base);
retval = ((retval & 0xff00) >> 8) | ((retval & 0x00ff) << 8);
retval <<= 16;
}
}
else logerror("Unhandled Protection READ @ %x mask %x (PC=%x)\n", offset, mem_mask, m_maincpu->pc());
logerror("model2_5881prot_r %08x: %08x (%08x)\n", offset*4, retval, mem_mask);
return retval;
}
WRITE32_MEMBER(model2_state::model2_5881prot_w)
{
logerror("model2_5881prot_w %08x: %08x (%08x)\n", offset*4, data, mem_mask);
if (offset == 0x0008/4)
{
// Zero Gunner uses this, it's encrypted data in prot.RAM consists of several small chunks, selected using low address
// so far this is only known game with 315-5881 which uses not 0 offset in prot.RAM
if (mem_mask == 0x0000ffff)
m_cryptdevice->set_addr_low(data&0xffff);
else if (mem_mask == 0xffff0000)
{
m_cryptdevice->set_addr_high(0);
if (data != 0)
printf("model2_5881prot_w not zero high address %08x (%08x)\n", data, mem_mask);
}
first_read = 1;
}
else if (offset == 0x000c/4)
{
printf("subkey %08x (%08x)\n", data, mem_mask);
m_cryptdevice->set_subkey(data&0xffff);
}
else printf("Unhandled Protection WRITE %x @ %x mask %x (PC=%x)\n", data, offset, mem_mask, m_maincpu->pc());
}
/* Daytona "To The MAXX" PIC protection simulation */
@ -1529,6 +1468,12 @@ ADDRESS_MAP_START(model2_state::model2_base_mem)
AM_RANGE(0x12800000, 0x1281ffff) AM_READWRITE16(lumaram_r,lumaram_w,0x0000ffff) // polygon "luma" RAM
ADDRESS_MAP_END
/* common map for 5881 protection */
ADDRESS_MAP_START(model2_state::model2_5881_mem)
AM_RANGE(0x01d80000,0x01d8ffff) AM_RAM
AM_RANGE(0x01d90000,0x01d9ffff) AM_DEVICE16("315_5881", sega_315_5881_crypt_device, iomap_le, 0xffffffff)
ADDRESS_MAP_END
READ8_MEMBER(model2_state::virtuacop_lightgun_r)
{
uint8_t res;
@ -1650,6 +1595,11 @@ ADDRESS_MAP_START(model2a_state::model2a_crx_mem)
AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE(model2_serial_r, model2_serial_w)
ADDRESS_MAP_END
ADDRESS_MAP_START(model2a_state::model2a_5881_mem)
AM_IMPORT_FROM(model2a_crx_mem)
AM_IMPORT_FROM(model2_5881_mem)
ADDRESS_MAP_END
/* 2B-CRX overrides */
ADDRESS_MAP_START(model2b_state::model2b_crx_mem)
AM_IMPORT_FROM(model2_base_mem)
@ -1688,6 +1638,11 @@ ADDRESS_MAP_START(model2b_state::model2b_crx_mem)
AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE(model2_serial_r, model2_serial_w)
ADDRESS_MAP_END
ADDRESS_MAP_START(model2b_state::model2b_5881_mem)
AM_IMPORT_FROM(model2b_crx_mem)
AM_IMPORT_FROM(model2_5881_mem)
ADDRESS_MAP_END
/* 2C-CRX overrides */
ADDRESS_MAP_START(model2c_state::model2c_crx_mem)
AM_IMPORT_FROM(model2_base_mem)
@ -1715,6 +1670,11 @@ ADDRESS_MAP_START(model2c_state::model2c_crx_mem)
AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE(model2_serial_r, model2_serial_w )
ADDRESS_MAP_END
ADDRESS_MAP_START(model2c_state::model2c_5881_mem)
AM_IMPORT_FROM(model2c_crx_mem)
AM_IMPORT_FROM(model2_5881_mem)
ADDRESS_MAP_END
/* Input definitions */
#define MODEL2_PLAYER_INPUTS(_n_, _b1_, _b2_, _b3_, _b4_) \
@ -2404,6 +2364,10 @@ uint16_t model2_state::crypt_read_callback(uint32_t addr)
MACHINE_CONFIG_START(model2a_state::model2a_5881)
model2a(config);
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(model2a_5881_mem)
MCFG_DEVICE_ADD("315_5881", SEGA315_5881_CRYPT, 0)
MCFG_SET_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
@ -2467,6 +2431,10 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(model2b_state::model2b_5881)
model2b(config);
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(model2b_5881_mem)
MCFG_DEVICE_ADD("315_5881", SEGA315_5881_CRYPT, 0)
MCFG_SET_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
@ -2556,6 +2524,10 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(model2c_state::model2c_5881)
model2c(config);
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(model2c_5881_mem)
MCFG_DEVICE_ADD("315_5881", SEGA315_5881_CRYPT, 0)
MCFG_SET_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
@ -6077,17 +6049,8 @@ ROM_START( desert ) /* Desert Tank, Model 2 */
MODEL2_CPU_BOARD
ROM_END
DRIVER_INIT_MEMBER(model2_state,genprot)
{
//std::string key = parameter(":315_5881:key");
m_maincpu->space(AS_PROGRAM).install_ram(0x01d80000, 0x01d8ffff);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x01d90000, 0x01d9ffff, read32_delegate(FUNC(model2_state::model2_5881prot_r), this), write32_delegate(FUNC(model2_state::model2_5881prot_w), this));
}
DRIVER_INIT_MEMBER(model2_state,pltkids)
{
DRIVER_INIT_CALL(genprot);
// fix bug in program: it destroys the interrupt table and never fixes it
uint32_t *ROM = (uint32_t *)memregion("maincpu")->base();
ROM[0x730/4] = 0x08000004;
@ -6095,8 +6058,6 @@ DRIVER_INIT_MEMBER(model2_state,pltkids)
DRIVER_INIT_MEMBER(model2_state,zerogun)
{
DRIVER_INIT_CALL(genprot);
// fix bug in program: it destroys the interrupt table and never fixes it
uint32_t *ROM = (uint32_t *)memregion("maincpu")->base();
ROM[0x700/4] = 0x08000004;
@ -6104,8 +6065,6 @@ DRIVER_INIT_MEMBER(model2_state,zerogun)
DRIVER_INIT_MEMBER(model2_state,sgt24h)
{
// DRIVER_INIT_CALL(genprot);
uint32_t *ROM = (uint32_t *)memregion("maincpu")->base();
ROM[0x56578/4] = 0x08000004;
//ROM[0x5b3e8/4] = 0x08000004;
@ -6161,8 +6120,8 @@ GAME( 1997, zeroguna, zerogun, model2a_5881, model2, model2a_state, zerogun,
GAME( 1997, zerogunaj, zerogun, model2a_5881, model2, model2a_state, zerogun, ROT0, "Psikyo", "Zero Gunner (Japan, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, motoraid, 0, manxtt, motoraid, model2a_state, 0, ROT0, "Sega", "Motor Raid - Twin", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, motoraiddx,motoraid,manxtt, motoraid, model2a_state, 0, ROT0, "Sega", "Motor Raid - Twin/DX", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dynamcop, 0, model2a_5881, model2, model2a_state, genprot, ROT0, "Sega", "Dynamite Cop (Export, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dyndeka2, dynamcop,model2a_5881, model2, model2a_state, genprot, ROT0, "Sega", "Dynamite Deka 2 (Japan, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dynamcop, 0, model2a_5881, model2, model2a_state, 0, ROT0, "Sega", "Dynamite Cop (Export, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dyndeka2, dynamcop,model2a_5881, model2, model2a_state, 0, ROT0, "Sega", "Dynamite Deka 2 (Japan, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, pltkidsa, pltkids, model2a_5881, model2, model2a_state, pltkids, ROT0, "Psikyo", "Pilot Kids (Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
// Model 2B-CRX (SHARC, SCSP sound board)
@ -6189,8 +6148,8 @@ GAME( 1997, dynabb97, 0, model2b, dynabb, model2b_state, 0,
GAME( 1997, overrevb, overrev, indy500, srallyc, model2b_state, 0, ROT0, "Jaleco", "Over Rev (Model 2B, Revision B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, zerogun, 0, model2b_5881, model2, model2b_state, zerogun, ROT0, "Psikyo", "Zero Gunner (Export, Model 2B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, zerogunj, zerogun, model2b_5881, model2, model2b_state, zerogun, ROT0, "Psikyo", "Zero Gunner (Japan, Model 2B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dynamcopb, dynamcop, model2b_5881, model2, model2b_state, genprot, ROT0, "Sega", "Dynamite Cop (Export, Model 2B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dyndeka2b, dynamcop, model2b_5881, model2, model2b_state, genprot, ROT0, "Sega", "Dynamite Deka 2 (Japan, Model 2B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dynamcopb, dynamcop, model2b_5881, model2, model2b_state, 0, ROT0, "Sega", "Dynamite Cop (Export, Model 2B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dyndeka2b, dynamcop, model2b_5881, model2, model2b_state, 0, ROT0, "Sega", "Dynamite Deka 2 (Japan, Model 2B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, pltkids, 0, model2b_5881, model2, model2b_state, pltkids, ROT0, "Psikyo", "Pilot Kids (Model 2B, Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
// Model 2C-CRX (TGPx4, SCSP sound board)
@ -6208,4 +6167,4 @@ GAME( 1997, topskatr, 0, model2c, model2, model2c_state, 0,
GAME( 1997, topskatru, topskatr, model2c, model2, model2c_state, 0, ROT0, "Sega", "Top Skater (USA, Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, topskatruo,topskatr, model2c, model2, model2c_state, 0, ROT0, "Sega", "Top Skater (USA)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, topskatrj, topskatr, model2c, model2, model2c_state, 0, ROT0, "Sega", "Top Skater (Japan)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dynamcopc, dynamcop, model2c_5881, model2, model2c_state, genprot, ROT0, "Sega", "Dynamite Cop (USA, Model 2C)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dynamcopc, dynamcop, model2c_5881, model2, model2c_state, 0, ROT0, "Sega", "Dynamite Cop (USA, Model 2C)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )

View File

@ -1749,71 +1749,6 @@ WRITE8_MEMBER(model3_state::model3_sound_w)
}
}
READ64_MEMBER(model3_state::model3_5881prot_r)
{
uint64_t retvalue = 0xffffffffffffffffU;
if (offset == 0x00 / 8)
{
retvalue = 0;
}
else if (offset == 0x18 / 8)
{
if (first_read == 1)
{
// the RAM based schemes expect a dummy value before the start of the stream
// to match the previous simulation I use 0xffff here
first_read = 0;
retvalue = 0xffff << 16;
}
else
{
uint8_t* base;
retvalue = m_cryptdevice->do_decrypt(base);
// retvalue = ((retvalue & 0xff00) >> 8) | ((retvalue & 0x00ff) << 8); // don't endian swap the return value on this hardware
retvalue <<= 16;
}
// printf("model3_5881prot_r offset %08x : %08x%08x (%08x%08x)\n", offset * 8, (uint32_t)(retvalue >> 32), (uint32_t)(retvalue & 0xffffffff), (uint32_t)(mem_mask >> 32), (uint32_t)(mem_mask & 0xffffffff));
}
else
{
printf("model3_5881prot_r offset %08x : %08x%08x (%08x%08x)\n", offset * 8, (uint32_t)(retvalue >> 32), (uint32_t)(retvalue & 0xffffffff), (uint32_t)(mem_mask >> 32), (uint32_t)(mem_mask & 0xffffffff));
}
return retvalue;
}
WRITE64_MEMBER(model3_state::model3_5881prot_w)
{
if (offset == 0x10 / 8)
{
// code is copied to RAM first, so base address is always 0
m_cryptdevice->set_addr_low(0);
m_cryptdevice->set_addr_high(0);
if (data != 0)
printf("model3_5881prot_w address isn't 0?\n");
first_read = 1;
}
else if (offset == 0x18 / 8)
{
uint16_t subkey = data >> (32 + 16);
subkey = ((subkey & 0xff00) >> 8) | ((subkey & 0x00ff) << 8); // endian swap the sub-key for this hardware
printf("model3_5881prot_w setting subkey %04x\n", subkey);
m_cryptdevice->set_subkey(subkey);
}
else
{
printf("model3_5881prot_w offset %08x : %08x%08x (%08x%08x)\n", offset * 8, (uint32_t)(data >> 32), (uint32_t)(data & 0xffffffff), (uint32_t)(mem_mask >> 32), (uint32_t)(mem_mask & 0xffffffff));
}
}
WRITE64_MEMBER(model3_state::daytona2_rombank_w)
{
if (ACCESSING_BITS_56_63)
@ -1852,6 +1787,12 @@ ADDRESS_MAP_START(model3_state::model3_mem)
AM_RANGE(0xc0000000, 0xc003ffff) AM_DEVICE32("comm_board", m3comm_device, m3_map, 0xffffffffffffffffU )
ADDRESS_MAP_END
ADDRESS_MAP_START(model3_state::model3_5881_mem)
AM_IMPORT_FROM( model3_mem )
AM_RANGE(0xf0180000, 0xf019ffff) AM_MIRROR(0x0e000000) AM_RAM
AM_RANGE(0xf01a0000, 0xf01a003f) AM_MIRROR(0x0e000000) AM_DEVICE16("315_5881", sega_315_5881_crypt_device, iomap_64be, 0xffffffffffffffffU )
ADDRESS_MAP_END
static INPUT_PORTS_START( common )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
@ -5950,8 +5891,26 @@ MACHINE_CONFIG_START(model3_state::model3_20)
MCFG_M3COMM_ADD("comm_board")
MACHINE_CONFIG_END
uint16_t model3_state::crypt_read_callback(uint32_t addr)
{
uint16_t dat = 0;
if (addr < 0x8000)
{
dat = m_maincpu->space().read_word((0xf0180000 + 4 * addr)); // every other word is unused in this RAM, probably 32-bit ram on 64-bit bus?
}
// dat = ((dat & 0xff00) >> 8) | ((dat & 0x00ff) << 8);
// printf("reading %04x\n", dat);
return dat;
}
MACHINE_CONFIG_START(model3_state::model3_20_5881)
model3_20(config);
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(model3_5881_mem)
MCFG_DEVICE_ADD("315_5881", SEGA315_5881_CRYPT, 0)
MCFG_SET_READ_CALLBACK(model3_state, crypt_read_callback)
MACHINE_CONFIG_END
@ -5996,23 +5955,12 @@ MACHINE_CONFIG_START(model3_state::model3_21)
MCFG_M3COMM_ADD("comm_board")
MACHINE_CONFIG_END
uint16_t model3_state::crypt_read_callback(uint32_t addr)
{
uint16_t dat = 0;
if (addr < 0x8000)
{
dat = m_maincpu->space().read_word((0xf0180000 + 4 * addr)); // every other word is unused in this RAM, probably 32-bit ram on 64-bit bus?
}
// dat = ((dat & 0xff00) >> 8) | ((dat & 0x00ff) << 8);
// printf("reading %04x\n", dat);
return dat;
}
MACHINE_CONFIG_START(model3_state::model3_21_5881)
model3_21(config);
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(model3_5881_mem)
MCFG_DEVICE_ADD("315_5881", SEGA315_5881_CRYPT, 0)
MCFG_SET_READ_CALLBACK(model3_state, crypt_read_callback)
MACHINE_CONFIG_END
@ -6048,15 +5996,6 @@ void model3_state::interleave_vroms()
}
}
DRIVER_INIT_MEMBER(model3_state, genprot)
{
// std::string key = parameter(":315_5881:key");
m_maincpu->space(AS_PROGRAM).install_ram(0xf0180000, 0xf019ffff, 0x0e000000);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, 0, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) );
}
DRIVER_INIT_MEMBER(model3_state,model3_10)
{
@ -6221,16 +6160,11 @@ DRIVER_INIT_MEMBER(model3_state,vs2)
DRIVER_INIT_MEMBER(model3_state,vs298)
{
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,vs299)
{
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,harley)
@ -6243,12 +6177,10 @@ DRIVER_INIT_MEMBER(model3_state,harleya)
DRIVER_INIT_CALL(model3_20);
}
DRIVER_INIT_MEMBER(model3_state,srally2)
{
DRIVER_INIT_CALL(model3_20);
uint32_t *rom = (uint32_t*)memregion("user1")->base();
rom[(0x7c0c4^4)/4] = 0x60000000;
rom[(0x7c0c8^4)/4] = 0x60000000;
@ -6271,17 +6203,12 @@ DRIVER_INIT_MEMBER(model3_state,swtrilgy)
rom[(0x043dc^4)/4] = 0x48000090; // skip force feedback setup
rom[(0xf6e44^4)/4] = 0x60000000;
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,swtrilga)
{
//uint32_t *rom = (uint32_t*)memregion("user1")->base();
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
//rom[(0xf6dd0^4)/4] = 0x60000000;
}
@ -6291,7 +6218,6 @@ DRIVER_INIT_MEMBER(model3_state,von2)
m_step20_with_old_real3d = true;
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,dirtdvls)
@ -6299,7 +6225,6 @@ DRIVER_INIT_MEMBER(model3_state,dirtdvls)
m_step20_with_old_real3d = true;
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,daytona2)
@ -6314,8 +6239,6 @@ DRIVER_INIT_MEMBER(model3_state,daytona2)
//rom[(0x6063c4^4)/4] = 0x60000000;
//rom[(0x616434^4)/4] = 0x60000000;
//rom[(0x69f4e4^4)/4] = 0x60000000;
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,dayto2pe)
@ -6331,8 +6254,6 @@ DRIVER_INIT_MEMBER(model3_state,dayto2pe)
// rom[(0x618b28^4)/4] = 0x60000000; // jump to encrypted code
// rom[(0x64ca34^4)/4] = 0x60000000; // dec
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,spikeout)
@ -6342,7 +6263,6 @@ DRIVER_INIT_MEMBER(model3_state,spikeout)
rom[(0x6059cc^4)/4] = 0x60000000;
rom[(0x6059ec^4)/4] = 0x60000000;
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,spikeofe)
@ -6352,13 +6272,11 @@ DRIVER_INIT_MEMBER(model3_state,spikeofe)
rom[(0x6059cc^4)/4] = 0x60000000;
rom[(0x6059ec^4)/4] = 0x60000000;
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,eca)
{
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
// base = 0xffc80000
uint32_t *rom = (uint32_t*)memregion("user1")->base();
@ -6390,8 +6308,6 @@ DRIVER_INIT_MEMBER(model3_state,oceanhun)
DRIVER_INIT_CALL(model3_20);
rom[(0x57995c^4)/4] = 0x60000000; // decrementer
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,magtruck)
@ -6399,7 +6315,6 @@ DRIVER_INIT_MEMBER(model3_state,magtruck)
m_step20_with_old_real3d = true;
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
}
DRIVER_INIT_MEMBER(model3_state,lamachin)
@ -6407,7 +6322,6 @@ DRIVER_INIT_MEMBER(model3_state,lamachin)
m_step20_with_old_real3d = true;
DRIVER_INIT_CALL(model3_20);
DRIVER_INIT_CALL(genprot);
}

View File

@ -1338,7 +1338,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(msx_state::msx2_64kb_vram)
MCFG_DEVICE_MODIFY("v9938")
v9938_device::static_set_vram_size(*device, 0x10000);
downcast<v99x8_device &>(*device).set_vram_size(0x10000);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(msx_state::msx)

View File

@ -1147,7 +1147,7 @@ void nes_vt_state::do_dma(uint8_t data, bool broken)
&& !(m_ppu->get_201x_reg(0x1) & 0x80)) {
// Legacy mode for DGUN-2573 compat
m_ppu->set_vram_dest(0x3F00);
ppu_vt03_device::set_palette_mode(*m_ppu, PAL_MODE_VT0x);
m_ppu->set_palette_mode(PAL_MODE_VT0x);
}
for (int i = 0; i < length; i++)
{

View File

@ -1131,24 +1131,6 @@ ADDRESS_MAP_START(nmk16_state::bjtwin_map)
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_SHARE("mainram")
ADDRESS_MAP_END
ADDRESS_MAP_START(nmk16_state::atombjt_map)
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0x080014, 0x080015) AM_NOP // always 1 in this bootleg. Flip-screen switch not present according to dip sheet.
AM_RANGE(0x088000, 0x0887ff) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette")
AM_RANGE(0x094000, 0x094001) AM_WRITE(nmk_tilebank_w)
AM_RANGE(0x094002, 0x094003) AM_WRITENOP /* IRQ enable? */
AM_RANGE(0x09c000, 0x09cfff) AM_MIRROR(0x1000) AM_RAM_WRITE(nmk_bgvideoram_w<0>) AM_SHARE("nmk_bgvideoram0")
AM_RANGE(0x0c2010, 0x0c2011) AM_READ_PORT("IN0")
AM_RANGE(0x0c2012, 0x0c2013) AM_READ_PORT("IN1")
AM_RANGE(0x0c2014, 0x0c2015) AM_READ(atombjt_unkr_r)
AM_RANGE(0x0c2016, 0x0c2017) AM_READ_PORT("DSW1")
AM_RANGE(0x0c2018, 0x0c2019) AM_READ_PORT("DSW2")
// AM_RANGE(0x0c201c, 0x0c201d) // oki banking related?
AM_RANGE(0x0c201e, 0x0c201f) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0x00ff)
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0x100000, 0x101fff) AM_RAM
ADDRESS_MAP_END
static INPUT_PORTS_START( vandyke )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
@ -2957,20 +2939,6 @@ static INPUT_PORTS_START( bjtwin )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
INPUT_PORTS_END
static INPUT_PORTS_START( atombjt ) // verified with dip sheet
PORT_INCLUDE(bjtwin)
PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_MODIFY("DSW2")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( nouryoku )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
@ -3764,36 +3732,6 @@ static GFXDECODE_START( strahl )
GFXDECODE_END
static const gfx_layout atombjt_charlayout =
{
8,8,
RGN_FRAC(1,1),
4,
{ 0,8,16,24},
{ 0,1,2,3,4,5,6,7 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8
};
static const gfx_layout atombjt_tilelayout =
{
16,16,
RGN_FRAC(1,1),
4,
{ 0,8,16,24},
{ 0,1,2,3,4,5,6,7, 512,513,514,515,516,517,518,519 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 256+0*32, 256+1*32, 256+2*32, 256+3*32, 256+4*32, 256+5*32, 256+6*32, 256+7*32 },
128*8
};
static GFXDECODE_START( atombjt )
GFXDECODE_ENTRY( "fgtile", 0, atombjt_charlayout, 0x000, 16 ) /* color 0x000-0x0ff */
GFXDECODE_ENTRY( "bgtile", 0, atombjt_charlayout, 0x000, 16 ) /* color 0x000-0x0ff */
GFXDECODE_ENTRY( "sprites", 0, atombjt_tilelayout, 0x100, 16 ) /* color 0x100-0x1ff */
GFXDECODE_END
/*
----
@ -4649,36 +4587,6 @@ MACHINE_CONFIG_START(nmk16_state::bjtwin)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(nmk16_state::atombjt)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* there is a 28mhz crystal and a 10mhz crystal near the 12 rated CPU */
MCFG_CPU_PROGRAM_MAP(atombjt_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq6_line_hold) // recoded to use this irq
/* video hardware */
NMK_HACKY_SCREEN_HIRES
MCFG_SCREEN_UPDATE_DRIVER(nmk16_state, screen_update_bjtwin)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", atombjt)
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx)
MCFG_VIDEO_START_OVERRIDE(nmk16_state,bjtwin)
// the bootleg just has a single OKI
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki1", 10000000/8, PIN7_LOW) // divider and pin not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_DEVICE_ADDRESS_MAP(0, oki1_map)
MACHINE_CONFIG_END
TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::manybloc_scanline)
{
int scanline = param;
@ -4990,11 +4898,6 @@ DRIVER_INIT_MEMBER(nmk16_state,bjtwin)
}
DRIVER_INIT_MEMBER(nmk16_state,atombjt)
{
m_okibank[0]->configure_entries(0, 4, memregion("oki1")->base() + 0x20000, 0x20000);
}
/* NO NMK004, it has a PIC instead */
READ16_MEMBER(nmk16_state::vandykeb_r){ return 0x0000; }
DRIVER_INIT_MEMBER(nmk16_state,vandykeb)
@ -6852,34 +6755,6 @@ ROM_START( bjtwinpa )
ROM_LOAD( "bottom.ic27", 0x0c0000, 0x80000, CRC(6ebeb9e4) SHA1(b547b2fbcc0a35d6183dd4f19684b04839690a2b) )
ROM_END
ROM_START( atombjt ) // based off bjtwina set
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "22.u67", 0x00000, 0x20000, CRC(bead8c70) SHA1(2694bb0639f6b94119c21faf3810f00ef20b50da) )
ROM_LOAD16_BYTE( "21.u66", 0x00001, 0x20000, CRC(73e3d488) SHA1(7deed6e3aeda1902b75746a9b0a2737632425867) )
ROM_REGION( 0x200000, "gfxtemp", ROMREGION_ERASEFF ) // first half of these is the text tiles (repeated multiple times) second half the bgs
ROM_LOAD32_BYTE( "23.u36", 0x000003, 0x80000, CRC(a3fb6b91) SHA1(477f5722a6bb23f089f32b677efbf69e9dce4b74) )
ROM_LOAD32_BYTE( "24.u42", 0x000002, 0x80000, CRC(4c30e15f) SHA1(f92185743594e4e4573ac3f6c0c091802a08d5bd) )
ROM_LOAD32_BYTE( "25.u39", 0x000001, 0x80000, CRC(ff1af60f) SHA1(4fe626c9d59ab9b945535b2f796f13adc900f1ed) )
ROM_LOAD32_BYTE( "26.u45", 0x000000, 0x80000, CRC(6cc4e817) SHA1(70f2ab50e228a029d3157c94fe0a79e7aad010bd) )
ROM_REGION( 0x100000, "fgtile", 0 )
ROM_COPY( "gfxtemp", 0x000000, 0x00000, 0x100000 )
ROM_REGION( 0x100000, "bgtile", 0 )
ROM_COPY( "gfxtemp", 0x100000, 0x00000, 0x100000 )
ROM_REGION( 0x100000, "sprites", 0 )
ROM_LOAD32_BYTE( "27.u86", 0x000003, 0x40000, CRC(5a853e5c) SHA1(dfa4e891f716bbf8a038a14a24276cb690f65230) )
ROM_LOAD32_BYTE( "28.u85", 0x000002, 0x40000, CRC(41970bf6) SHA1(85b5677585dbdf96acabb59e6369d62d4c2f0e8e) )
ROM_LOAD32_BYTE( "29.u84", 0x000001, 0x40000, CRC(59a7d610) SHA1(0dc39c09f7f55dbd12ddb5e2e4ba9d86a2ba24d8) )
ROM_LOAD32_BYTE( "30.u83", 0x000000, 0x40000, CRC(9b2dfebd) SHA1(562ab22dc01a129e1b8c201665bbab0561254c2a) )
ROM_REGION( 0x80000, "oki1", 0 ) /* OKIM6295 samples */
ROM_LOAD( "20.u16", 0x00000, 0x80000, CRC(71c74ff9) SHA1(3c22fb2976ab332e9bb1e208432ca985f274adac) )
ROM_END
ROM_START( nouryoku )
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "ic76.1", 0x00000, 0x40000, CRC(26075988) SHA1(c3d0eef0417be3f78008c026915fd7e2fd589563) )
@ -8086,7 +7961,6 @@ GAME( 1993, bjtwin, 0, bjtwin, bjtwin, nmk16_state, bjtwin, ROT27
GAME( 1993, bjtwina, bjtwin, bjtwin, bjtwin, nmk16_state, bjtwin, ROT270, "NMK", "Bombjack Twin (set 2)", MACHINE_NO_COCKTAIL )
GAME( 1993, bjtwinp, bjtwin, bjtwin, bjtwin, nmk16_state, 0, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 1)", MACHINE_NO_COCKTAIL ) // Cheap looking PCB, but Genuine NMK PCB, GFX aren't encrypted (maybe Korean version not proto?)
GAME( 1993, bjtwinpa, bjtwin, bjtwin, bjtwin, nmk16_state, bjtwin, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 2)", MACHINE_NO_COCKTAIL ) // same PCB as above, different program revision, GFX are encrypted
GAME( 1993, atombjt, bjtwin, atombjt, atombjt, nmk16_state, atombjt, ROT270, "bootleg (Kyon K.)", "Atom (bootleg of Bombjack Twin)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // some non-trivial mods to the gfx and sound hw (playmark hardware?)
GAME( 1995, nouryoku, 0, bjtwin, nouryoku, nmk16_state, nmk, ROT0, "Tecmo", "Nouryoku Koujou Iinkai", MACHINE_NO_COCKTAIL )

View File

@ -32,27 +32,34 @@ public:
: playmark_state(mconfig, type, tag)
{ }
/* powerbal-specific */
DECLARE_DRIVER_INIT(powerbal);
DECLARE_DRIVER_INIT(magicstk);
void magicstk(machine_config &config);
void powerbal(machine_config &config);
void atombjt(machine_config &config);
private:
int m_tilebank;
int m_bg_yoffset;
DECLARE_DRIVER_INIT(powerbal);
DECLARE_DRIVER_INIT(magicstk);
TILE_GET_INFO_MEMBER(powerbal_get_bg_tile_info);
DECLARE_MACHINE_START(powerbal);
DECLARE_MACHINE_RESET(powerbal);
DECLARE_VIDEO_START(powerbal);
DECLARE_VIDEO_START(atombjt);
uint32_t screen_update_powerbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites_powerbal( bitmap_ind16 &bitmap, const rectangle &cliprect );
DECLARE_WRITE16_MEMBER(magicstk_coin_eeprom_w);
DECLARE_WRITE16_MEMBER(magicstk_bgvideoram_w);
DECLARE_WRITE16_MEMBER(tile_banking_w);
DECLARE_WRITE16_MEMBER(atombjt_tile_banking_w);
DECLARE_WRITE16_MEMBER(oki_banking);
void magicstk(machine_config &config);
void powerbal(machine_config &config);
void magicstk_main_map(address_map &map);
void oki_map(address_map &map);
void powerbal_main_map(address_map &map);
void atombjt_map(address_map &map);
};
@ -83,6 +90,15 @@ WRITE16_MEMBER(powerbal_state::tile_banking_w)
}
}
WRITE16_MEMBER(powerbal_state::atombjt_tile_banking_w)
{
if ((data & 0x0f) != m_tilebank)
{
m_tilebank = data & 0x0f;
m_bg_tilemap->mark_all_dirty();
}
}
WRITE16_MEMBER(powerbal_state::oki_banking)
{
int bank = data & 3;
@ -130,6 +146,27 @@ ADDRESS_MAP_START(powerbal_state::powerbal_main_map)
AM_RANGE(0x103000, 0x103fff) AM_RAM
ADDRESS_MAP_END
ADDRESS_MAP_START(powerbal_state::atombjt_map)
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0x080008, 0x080009) AM_READNOP // remnant of the original?
AM_RANGE(0x080014, 0x080015) AM_NOP // always 1 in this bootleg. Flip-screen switch not present according to dip sheet.
AM_RANGE(0x088000, 0x0883ff) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette")
AM_RANGE(0x094000, 0x094001) AM_WRITE(atombjt_tile_banking_w)
AM_RANGE(0x094002, 0x094003) AM_NOP /* IRQ enable? */
AM_RANGE(0x09c000, 0x09cfff) AM_MIRROR(0x1000) AM_RAM_WRITE(magicstk_bgvideoram_w) AM_SHARE("videoram1")
AM_RANGE(0x0c2010, 0x0c2011) AM_READ_PORT("IN0")
AM_RANGE(0x0c2012, 0x0c2013) AM_READ_PORT("IN1")
AM_RANGE(0x0c2014, 0x0c2015) AM_READ_PORT("IN2")
AM_RANGE(0x0c2016, 0x0c2017) AM_READ_PORT("DSW1")
AM_RANGE(0x0c2018, 0x0c2019) AM_READ_PORT("DSW2")
AM_RANGE(0x0c201c, 0x0c201d) AM_WRITE(oki_banking)
AM_RANGE(0x0c201e, 0x0c201f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
AM_RANGE(0x0c4000, 0x0c4001) AM_WRITENOP // always 0?
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0x100000, 0x100fff) AM_RAM
AM_RANGE(0x101000, 0x101fff) AM_RAM AM_SHARE("spriteram")
ADDRESS_MAP_END
ADDRESS_MAP_START(powerbal_state::oki_map)
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank")
@ -394,6 +431,89 @@ static INPUT_PORTS_START( hotminda )
PORT_DIPSETTING( 0xe0, "Easy 9" )
INPUT_PORTS_END
static INPUT_PORTS_START( atombjt ) // verified with dip sheet
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* shown in service mode, but no effect */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Maybe unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Maybe unused */
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPNAME( 0x0e, 0x0e, "Starting level" ) PORT_DIPLOCATION("SW1:7,6,5")
PORT_DIPSETTING( 0x08, "Germany" )
PORT_DIPSETTING( 0x04, "Thailand" )
PORT_DIPSETTING( 0x0c, "Nevada" )
PORT_DIPSETTING( 0x0e, DEF_STR( Japan ) )
PORT_DIPSETTING( 0x06, DEF_STR( Korea ) )
PORT_DIPSETTING( 0x0a, "England" )
PORT_DIPSETTING( 0x02, DEF_STR( Hong_Kong ) )
PORT_DIPSETTING( 0x00, DEF_STR( China ) )
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4,3")
PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:2,1")
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x40, "2" )
PORT_DIPSETTING( 0xc0, "3" )
PORT_DIPSETTING( 0x80, "4" )
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:6,5,4")
PORT_DIPSETTING( 0x10, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:3,2,1")
PORT_DIPSETTING( 0x80, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x60, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
INPUT_PORTS_END
TILE_GET_INFO_MEMBER(powerbal_state::powerbal_get_bg_tile_info)
{
int code = (m_videoram1[tile_index] & 0x07ff) + m_tilebank * 0x800;
@ -407,23 +527,21 @@ TILE_GET_INFO_MEMBER(powerbal_state::powerbal_get_bg_tile_info)
void powerbal_state::draw_sprites_powerbal(bitmap_ind16 &bitmap, const rectangle &cliprect )
{
uint16_t *spriteram = m_spriteram;
int offs;
int height = m_gfxdecode->gfx(0)->height();
for (offs = 4; offs < m_spriteram.bytes() / 2; offs += 4)
for (int offs = 4; offs < m_spriteram.bytes() / 2; offs += 4)
{
int sx, sy, code, color, flipx;
sy = spriteram[offs + 3 - 4]; /* typical Playmark style... */
sy = m_spriteram[offs + 3 - 4]; /* typical Playmark style... */
if (sy & 0x8000)
return; /* end of list marker */
flipx = sy & 0x4000;
sx = (spriteram[offs + 1] & 0x01ff) - 16 - 7;
sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7;
sy = (256 - 8 - height - sy) & 0xff;
code = spriteram[offs + 2];
color = (spriteram[offs + 1] & 0xf000) >> 12;
code = m_spriteram[offs + 2];
color = (m_spriteram[offs + 1] & 0xf000) >> 12;
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
code,
@ -442,6 +560,16 @@ VIDEO_START_MEMBER(powerbal_state,powerbal)
m_bg_tilemap->set_scrolly(0, m_bg_yoffset);
}
VIDEO_START_MEMBER(powerbal_state,atombjt)
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(powerbal_state::powerbal_get_bg_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 64, 32);
m_xoffset = 32;
m_yoffset = 8;
m_bg_tilemap->set_scrollx(0, -64);
}
uint32_t powerbal_state::screen_update_powerbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
@ -562,6 +690,20 @@ MACHINE_CONFIG_START(powerbal_state::magicstk)
MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(powerbal_state::atombjt)
powerbal(config);
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(atombjt_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", powerbal_state, irq6_line_hold)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_SIZE(512, 256) \
MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 2*8, 30*8-1) \
MCFG_VIDEO_START_OVERRIDE(powerbal_state,atombjt)
MACHINE_CONFIG_END
/*
Power Balls
@ -690,6 +832,28 @@ ROM_START( hotminda )
ROM_LOAD( "rom10.rom", 0x00000, 0x40000, CRC(0bf3a3e5) SHA1(2ae06f37a6bcd20bc5fbaa90d970aba2ebf3cf5a) )
ROM_END
ROM_START( atombjt ) // based off bjtwina set
ROM_REGION( 0x40000, "maincpu", 0 )
ROM_LOAD16_BYTE( "22.u67", 0x00000, 0x20000, CRC(bead8c70) SHA1(2694bb0639f6b94119c21faf3810f00ef20b50da) )
ROM_LOAD16_BYTE( "21.u66", 0x00001, 0x20000, CRC(73e3d488) SHA1(7deed6e3aeda1902b75746a9b0a2737632425867) )
ROM_REGION( 0x200000, "gfx1", 0 )
ROM_LOAD( "23.u36", 0x000000, 0x80000, CRC(a3fb6b91) SHA1(477f5722a6bb23f089f32b677efbf69e9dce4b74) )
ROM_LOAD( "24.u42", 0x080000, 0x80000, CRC(4c30e15f) SHA1(f92185743594e4e4573ac3f6c0c091802a08d5bd) )
ROM_LOAD( "25.u39", 0x100000, 0x80000, CRC(ff1af60f) SHA1(4fe626c9d59ab9b945535b2f796f13adc900f1ed) )
ROM_LOAD( "26.u45", 0x180000, 0x80000, CRC(6cc4e817) SHA1(70f2ab50e228a029d3157c94fe0a79e7aad010bd) )
ROM_REGION( 0x100000, "gfx2", 0 )
ROM_LOAD( "27.u86", 0x000000, 0x40000, CRC(5a853e5c) SHA1(dfa4e891f716bbf8a038a14a24276cb690f65230) )
ROM_LOAD( "28.u85", 0x040000, 0x40000, CRC(41970bf6) SHA1(85b5677585dbdf96acabb59e6369d62d4c2f0e8e) )
ROM_LOAD( "29.u84", 0x080000, 0x40000, CRC(59a7d610) SHA1(0dc39c09f7f55dbd12ddb5e2e4ba9d86a2ba24d8) )
ROM_LOAD( "30.u83", 0x0c0000, 0x40000, CRC(9b2dfebd) SHA1(562ab22dc01a129e1b8c201665bbab0561254c2a) )
ROM_REGION( 0x80000, "oki", 0 )
ROM_LOAD( "20.u16", 0x00000, 0x80000, CRC(71c74ff9) SHA1(3c22fb2976ab332e9bb1e208432ca985f274adac) )
ROM_END
DRIVER_INIT_MEMBER(powerbal_state,powerbal)
{
m_bg_yoffset = 16;
@ -706,7 +870,8 @@ DRIVER_INIT_MEMBER(powerbal_state,magicstk)
* Game Drivers *
*************************/
// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
GAME( 1994, powerbal, 0, powerbal, powerbal, powerbal_state, powerbal, ROT0, "Playmark", "Power Balls", MACHINE_SUPPORTS_SAVE )
GAME( 1995, magicstk, 0, magicstk, magicstk, powerbal_state, magicstk, ROT0, "Playmark", "Magic Sticks", MACHINE_SUPPORTS_SAVE )
GAME( 1995, hotminda, hotmind, magicstk, hotminda, powerbal_state, magicstk, ROT0, "Playmark", "Hot Mind (adjustable prize)", MACHINE_SUPPORTS_SAVE )
// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
GAME( 1994, powerbal, 0, powerbal, powerbal, powerbal_state, powerbal, ROT0, "Playmark", "Power Balls", MACHINE_SUPPORTS_SAVE )
GAME( 1995, magicstk, 0, magicstk, magicstk, powerbal_state, magicstk, ROT0, "Playmark", "Magic Sticks", MACHINE_SUPPORTS_SAVE )
GAME( 1995, hotminda, hotmind, magicstk, hotminda, powerbal_state, magicstk, ROT0, "Playmark", "Hot Mind (adjustable prize)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, atombjt, bjtwin, atombjt, atombjt, powerbal_state, 0, ROT270, "bootleg (Kyon K.)", "Atom (bootleg of Bombjack Twin)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // some non-trivial mods to the gfx and sound hw wrt nmk16 hw original

View File

@ -20,6 +20,12 @@
Tetris
Space Invaders
Possible other games on this hardawre
ConnecTV Football (aka ConnecTV International Football)
- Soccer game, not the same as Play TV Football, or Play TV Soccer
(it has the same XTAL etc. as this driver at least)
---
The XaviX ones seem to have a XaviX logo on the external packaging while the
ones for this driver don't seem to have any specific marking.

View File

@ -139,9 +139,9 @@ Note that they are interchangeable, eg. you can use a French module on a US Spea
French:
- No.1: Les Mots de Base: VSM: 16KB CD2353 (1st release was called "Module No. 1 de Jacques Capelovici")
- No.2: Les Mots Difficilies: VSM: 16KB? CD62177*
- No.2: Les Mots Difficiles (aka Les Mots de Base): VSM: 16KB CD62177A
- No.3: Les Animaux Familiers: VSM: 16KB? CD62047*
- No.4: Les Magasins De La Rue: VSM: 16KB CD62048
- No.4: Les Magasins de la Rue: VSM: 16KB CD62048
- No.5: Les Extra-Terrestres: VSM: 16KB? CD62178*
Italian:
@ -191,9 +191,9 @@ Speak & Read modules:
- Who's Who at the Zoo: VSM: 16KB CD2397
- A Dog on a Log: VSM: 16KB CD3534(rev.A)
- The Seal That Could Fly: VSM: 16KB CD3535
- A Ghost in the House: VSM: 16KB CD3536*
- A Ghost in the House: VSM: 16KB CD3536
- On the Track: VSM: 16KB CD3538
- The Third Circle: VSM: 16KB CD3539*
- The Third Circle: VSM: 16KB CD3539
- The Millionth Knight: VSM: 16KB CD3540

View File

@ -21,9 +21,17 @@
SSD COMPANY LIMITED is already working on their next chip called "XaviX II" that is said to be a 32-bit RISC processor
with 3D capabilities.
Important addresses
Notes:
0x18340 in Monster Truck is the self-test mode, shows me which registers need to retain their values etc.
To access service mode in Monster Truck hold Horn and Nitro on startup
Some games have Serial EEPROMs
Nostalgia 24LC04
XaviXTennis 24C08
Jedi 24C02
LOTR 24C02
***************************************************************************/
@ -34,7 +42,7 @@
#include "screen.h"
#include "speaker.h"
// not confirmed for all games
#define MAIN_CLOCK XTAL(21'477'272)
class xavix_state : public driver_device
@ -154,7 +162,6 @@ public:
DECLARE_DRIVER_INIT(xavix);
DECLARE_DRIVER_INIT(taitons1);
DECLARE_DRIVER_INIT(rad_box);
DECLARE_DRIVER_INIT(rad_crdn);
void xavix_map(address_map &map);
protected:
@ -1605,6 +1612,34 @@ static INPUT_PORTS_START( rad_boxp )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_snow )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Go") // is this a button, or 'up' ?
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_snowp )
PORT_INCLUDE(rad_snow)
PORT_MODIFY("REGION") // PAL/NTSC flag
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL )
INPUT_PORTS_END
static INPUT_PORTS_START( namcons2 )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 )
INPUT_PORTS_END
/* correct, 4bpp gfxs */
static const gfx_layout charlayout =
{
@ -1741,6 +1776,7 @@ MACHINE_CONFIG_START(xavix_state::xavix)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",XAVIX,MAIN_CLOCK)
MCFG_CPU_PROGRAM_MAP(xavix_map)
MCFG_M6502_DISABLE_DIRECT()
MCFG_CPU_VBLANK_INT_DRIVER("screen", xavix_state, interrupt)
MCFG_XAVIX_VECTOR_CALLBACK(xavix_state, get_vectors)
@ -1796,12 +1832,6 @@ DRIVER_INIT_MEMBER(xavix_state, rad_box)
m_alt_addressing = 2;
}
DRIVER_INIT_MEMBER(xavix_state, rad_crdn)
{
DRIVER_INIT_CALL(xavix);
m_alt_addressing = 2;
}
/***************************************************************************
Game driver(s)
@ -1813,6 +1843,11 @@ ROM_START( taitons1 )
ROM_LOAD( "taitonostalgia1.u3", 0x000000, 0x200000, CRC(25bd8c67) SHA1(a109cd2da6aa4596e3ca3abd1afce2d0001a473f) )
ROM_END
ROM_START( namcons2 )
ROM_REGION( 0x100000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "nostalgia.bin", 0x000000, 0x100000, CRC(03f7f755) SHA1(bdf1b10ab0104ed580951b0c428c4e93e7373afe) )
ROM_END
ROM_START( rad_box )
ROM_REGION(0x200000, "bios", ROMREGION_ERASE00)
ROM_LOAD("boxing.bin", 0x000000, 0x200000, CRC(5cd40714) SHA1(165260228c029a9502ca0598c84c24fd9bdeaebe) )
@ -1833,6 +1868,17 @@ ROM_START( rad_bassp )
ROM_LOAD("bassfishin.bin", 0x000000, 0x100000, CRC(b54eb1c5) SHA1(084faa9349369f2b8846950765f9c8f758db3e9e) )
ROM_END
ROM_START( rad_snow )
ROM_REGION(0x100000, "bios", ROMREGION_ERASE00)
ROM_LOAD("snoblu.bin", 0x000000, 0x100000, CRC(593e40b3) SHA1(03483ac39eddd7746470fb60018e704382b0da59) )
ROM_END
ROM_START( rad_snowp )
ROM_REGION(0x100000, "bios", ROMREGION_ERASE00)
ROM_LOAD("snoblu.bin", 0x000000, 0x100000, CRC(593e40b3) SHA1(03483ac39eddd7746470fb60018e704382b0da59) )
ROM_END
ROM_START( rad_ping )
ROM_REGION( 0x100000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "pingpong.bin", 0x000000, 0x100000, CRC(629f7f47) SHA1(2bb19fd202f1e6c319d2f7d18adbfed8a7669235) )
@ -1872,6 +1918,8 @@ ROM_END
CONS( 2006, taitons1, 0, 0, xavix, xavix, xavix_state, taitons1, "Bandai / SSD Company LTD / Taito", "Let's! TV Play Classic - Taito Nostalgia 1", MACHINE_IS_SKELETON )
CONS( 2006, namcons2, 0, 0, xavix, namcons2, xavix_state, taitons1, "Bandai / SSD Company LTD / Namco", "Let's! TV Play Classic - Namco Nostalgia 2", MACHINE_IS_SKELETON )
CONS( 2000, rad_ping, 0, 0, xavix, xavix, xavix_state, xavix, "Radica / SSD Company LTD / Simmer Technology", "Play TV Ping Pong", MACHINE_IS_SKELETON ) // "Simmer Technology" is also known as "Hummer Technology Co., Ltd"
CONS( 2003, rad_mtrk, 0, 0, xavix, rad_mtrk, xavix_state, xavix, "Radica / SSD Company LTD", "Play TV Monster Truck (NTSC)", MACHINE_IS_SKELETON )
@ -1880,14 +1928,18 @@ CONS( 2003, rad_mtrkp, rad_mtrk, 0, xavixp, rad_mtrkp,xavix_state, xavix,
CONS( 200?, rad_box, 0, 0, xavix, rad_box, xavix_state, rad_box, "Radica / SSD Company LTD", "Play TV Boxing (NTSC)", MACHINE_IS_SKELETON)
CONS( 200?, rad_boxp, rad_box, 0, xavixp, rad_boxp, xavix_state, rad_box, "Radica / SSD Company LTD", "ConnecTV Boxing (PAL)", MACHINE_IS_SKELETON)
CONS( 200?, rad_crdn, 0, 0, xavix, rad_crdn, xavix_state, rad_crdn, "Radica / SSD Company LTD", "Play TV Card Night (NTSC)", MACHINE_IS_SKELETON)
CONS( 200?, rad_crdnp, rad_crdn, 0, xavixp, rad_crdnp,xavix_state, rad_crdn, "Radica / SSD Company LTD", "ConnecTV Card Night (PAL)", MACHINE_IS_SKELETON)
CONS( 200?, rad_crdn, 0, 0, xavix, rad_crdn, xavix_state, rad_box, "Radica / SSD Company LTD", "Play TV Card Night (NTSC)", MACHINE_IS_SKELETON)
CONS( 200?, rad_crdnp, rad_crdn, 0, xavixp, rad_crdnp,xavix_state, rad_box, "Radica / SSD Company LTD", "ConnecTV Card Night (PAL)", MACHINE_IS_SKELETON)
CONS( 2002, rad_bb2, 0, 0, xavix, xavix, xavix_state, xavix, "Radica / SSD Company LTD", "Play TV Baseball 2", MACHINE_IS_SKELETON ) // contains string "Radica RBB2 V1.0"
CONS( 2001, rad_bass, 0, 0, xavix, xavix, xavix_state, rad_box, "Radica / SSD Company LTD", "Play TV Bass Fishin'", MACHINE_IS_SKELETON)
CONS( 2001, rad_bassp, rad_bass, 0, xavixp, xavixp, xavix_state, rad_box, "Radica / SSD Company LTD", "ConnecTV Bass Fishin'", MACHINE_IS_SKELETON)
// there is another 'Snowboarder' with a white coloured board, it appears to be a newer game closer to 'SSX Snowboarder' but without the SSX license.
CONS( 2001, rad_snow, 0, 0, xavix, rad_snow, xavix_state, rad_box, "Radica / SSD Company LTD", "Play TV Snowboarder (Blue)", MACHINE_IS_SKELETON)
CONS( 2001, rad_snowp, rad_snow, 0, xavixp, rad_snowp,xavix_state, rad_box, "Radica / SSD Company LTD", "ConnecTV Snowboarder (Blue)", MACHINE_IS_SKELETON)
CONS (200?, eka_strt, 0, 0, xavix, xavix, xavix_state, xavix, "Takara / SSD Company LTD", "e-kara Starter", MACHINE_IS_SKELETON)
/* The 'XaviXPORT' isn't a real console, more of a TV adapter, all the actual hardware (CPU including video hw, sound hw) is in the cartridges and controllers
@ -1923,8 +1975,12 @@ ROM_START( ttv_sw )
ROM_LOAD( "jedi.bin", 0x000000, 0x800000, CRC(51cae5fd) SHA1(1ed8d556f31b4182259ca8c766d60c824d8d9744) )
ROM_END
ROM_START( ttv_lotr )
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "lotr.bin", 0x000000, 0x800000, CRC(a034ecd5) SHA1(264a9d4327af0a075841ad6129db67d82cf741f1) )
ROM_END
CONS( 2004, xavtenni, 0, 0, xavix, xavix, xavix_state, xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_IS_SKELETON )
CONS( 2005, ttv_sw, 0, 0, xavix, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_IS_SKELETON )
CONS( 2005, ttv_lotr, 0, 0, xavix, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "Lord Of The Rings - Warrior of Middle-Earth", MACHINE_IS_SKELETON )

View File

@ -179,9 +179,6 @@ public:
DECLARE_READ32_MEMBER(model2_serial_r);
DECLARE_WRITE32_MEMBER(model2o_serial_w);
DECLARE_WRITE32_MEMBER(model2_serial_w);
DECLARE_READ32_MEMBER(model2_5881prot_r);
DECLARE_WRITE32_MEMBER(model2_5881prot_w);
int first_read;
void raster_init(memory_region *texture_rom);
void geo_init(memory_region *polygon_rom);
@ -210,7 +207,6 @@ public:
DECLARE_DRIVER_INIT(overrev);
DECLARE_DRIVER_INIT(pltkids);
DECLARE_DRIVER_INIT(rchase2);
DECLARE_DRIVER_INIT(genprot);
DECLARE_DRIVER_INIT(manxttdx);
DECLARE_DRIVER_INIT(srallyc);
DECLARE_DRIVER_INIT(doa);
@ -246,6 +242,7 @@ public:
void model2_3d_frame_start( void );
void geo_parse( void );
void model2_3d_frame_end( bitmap_rgb32 &bitmap, const rectangle &cliprect );
void model2_timers(machine_config &config);
@ -259,14 +256,23 @@ public:
void drive_map(address_map &map);
void geo_sharc_map(address_map &map);
void model2_base_mem(address_map &map);
void model2_5881_mem(address_map &map);
void model2_snd(address_map &map);
uint8_t m_gamma_table[256];
void debug_init();
void debug_commands( int ref, const std::vector<std::string> &params );
void debug_geo_dasm_command(int ref, const std::vector<std::string> &params);
void debug_tri_dump_command(int ref, const std::vector<std::string> &params);
void debug_help_command(int ref, const std::vector<std::string> &params);
protected:
virtual void video_start() override;
private:
void tri_list_dump(FILE *dst);
bool m_render_unk;
bool m_render_mode;
};
@ -334,6 +340,7 @@ public:
void model2a_5881(machine_config &config);
void srallyc(machine_config &config);
void model2a_crx_mem(address_map &map);
void model2a_5881_mem(address_map &map);
};
/*****************************
@ -355,6 +362,8 @@ public:
void indy500(machine_config &config);
void rchase2(machine_config &config);
void model2b_crx_mem(address_map &map);
void model2b_5881_mem(address_map &map);
// TODO: split into own class
void rchase2_iocpu_map(address_map &map);
void rchase2_ioport_map(address_map &map);
};
@ -377,6 +386,7 @@ public:
void overrev2c(machine_config &config);
void stcc(machine_config &config);
void model2c_crx_mem(address_map &map);
void model2c_5881_mem(address_map &map);
};
/*****************************

View File

@ -235,7 +235,6 @@ public:
void pci_device_set_reg(uint32_t value);
void configure_fast_ram();
void interleave_vroms();
DECLARE_DRIVER_INIT(genprot);
DECLARE_DRIVER_INIT(lemans24);
DECLARE_DRIVER_INIT(vs298);
DECLARE_DRIVER_INIT(vs299);
@ -335,9 +334,6 @@ public:
void tap_reset();
void tap_set_asic_ids();
DECLARE_READ64_MEMBER(model3_5881prot_r);
DECLARE_WRITE64_MEMBER(model3_5881prot_w);
int first_read;
uint16_t crypt_read_callback(uint32_t addr);
void model3_21_5881(machine_config &config);
@ -347,6 +343,7 @@ public:
void model3_20(machine_config &config);
void model3_21(machine_config &config);
void scud(machine_config &config);
void model3_5881_mem(address_map &map);
void model3_10_mem(address_map &map);
void model3_mem(address_map &map);
void model3_snd(address_map &map);

View File

@ -110,7 +110,6 @@ public:
DECLARE_WRITE16_MEMBER(bioship_bank_w);
DECLARE_WRITE8_MEMBER(spec2k_oki1_banking_w);
DECLARE_WRITE8_MEMBER(twinactn_oki_bank_w);
DECLARE_READ16_MEMBER(atombjt_unkr_r) {return 0x0000;}
DECLARE_WRITE16_MEMBER(nmk16_x0016_w);
DECLARE_WRITE16_MEMBER(nmk16_bioship_x0016_w);
DECLARE_DRIVER_INIT(nmk);

View File

@ -1,6 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Andreas Naive, Olivier Galibert, David Haywood
/*
TODO:
- merge interface for ST-V and NAOMI too.
re: Tecmo World Cup '98 (ST-V) (from ANY)
I got one of the card in subject open it up to check the rom version
@ -19,6 +22,24 @@
DEFINE_DEVICE_TYPE(SEGA315_5881_CRYPT, sega_315_5881_crypt_device, "sega315_5881", "Sega 315-5881 Encryption")
// TODO: standard hookup doesn't work properly (causes a crash in LA Machine Gun)
// might be due of high address variables not properly set (@see sega_315_5881_crypt_device::set_addr_high)
ADDRESS_MAP_START(sega_315_5881_crypt_device::iomap_64be)
AM_RANGE(0x0000, 0x0001) AM_READ(ready_r)
// TODO: it is unknown if the
AM_RANGE(0x0010, 0x0011) AM_WRITE(addrlo_w)
AM_RANGE(0x0012, 0x0013) AM_WRITE(addrhi_w)
AM_RANGE(0x0018, 0x0019) AM_WRITE(subkey_be_w)
AM_RANGE(0x001c, 0x001d) AM_READ(decrypt_be_r)
ADDRESS_MAP_END
ADDRESS_MAP_START(sega_315_5881_crypt_device::iomap_le)
AM_RANGE(0x0000, 0x0001) AM_READ(ready_r)
AM_RANGE(0x0008, 0x0009) AM_WRITE(addrlo_w)
AM_RANGE(0x000a, 0x000b) AM_WRITE(addrhi_w)
AM_RANGE(0x000c, 0x000d) AM_WRITE(subkey_le_w)
AM_RANGE(0x000e, 0x000f) AM_READ(decrypt_le_r)
ADDRESS_MAP_END
sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGA315_5881_CRYPT, tag, owner, clock)
@ -68,6 +89,7 @@ void sega_315_5881_crypt_device::device_reset()
dec_hist = 0;
dec_header = 0;
enc_ready = false;
first_read = false;
buffer_pos = 0;
line_buffer_pos = 0;
@ -75,6 +97,76 @@ void sega_315_5881_crypt_device::device_reset()
buffer_bit = 0;
}
/*************************************************
*
* Chip I/O interface (Model 2/3)
*
************************************************/
READ16_MEMBER(sega_315_5881_crypt_device::ready_r)
{
// bit 0: busy flag
return 0;
}
WRITE16_MEMBER(sega_315_5881_crypt_device::addrlo_w)
{
set_addr_low(data&0xffff);
first_read = true;
}
WRITE16_MEMBER(sega_315_5881_crypt_device::addrhi_w)
{
set_addr_high(0);
if (data != 0)
printf("sega_315_5881_crypt_device not zero high address %08x (%08x)\n", data, mem_mask);
first_read = true;
}
WRITE16_MEMBER(sega_315_5881_crypt_device::subkey_le_w)
{
printf("subkey %08x (%08x)\n", data, mem_mask);
set_subkey(data & 0xffff);
}
WRITE16_MEMBER(sega_315_5881_crypt_device::subkey_be_w)
{
uint16_t subkey;
printf("subkey %08x (%08x)\n", data, mem_mask);
// endian swap the sub-key for big endian CPUs
subkey = ((data & 0xff00) >> 8) | ((data & 0x00ff) << 8);
set_subkey(subkey);
}
READ16_MEMBER(sega_315_5881_crypt_device::decrypt_le_r)
{
uint16_t retval = decrypt_be_r(space,offset,mem_mask);
// endian swap the sub-key for little endian CPUs
retval = ((retval & 0xff00) >> 8) | ((retval & 0x00ff) << 8);
return retval;
}
READ16_MEMBER(sega_315_5881_crypt_device::decrypt_be_r)
{
if (first_read == true)
{
// the RAM based schemes expect a dummy value before the start of the stream
// to match the previous simulation (dynamite cop) I use 0x0000 here
// this is actually header data?
first_read = false;
return 0;
}
uint8_t* base;
uint16_t retval;
retval = do_decrypt(base);
// retval = ((retval & 0xff00) >> 8) | ((retval & 0x00ff) << 8);
return retval;
}
uint16_t sega_315_5881_crypt_device::do_decrypt(uint8_t *&base)
{
if(!enc_ready)

View File

@ -20,6 +20,16 @@ public:
// construction/destruction
sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ16_MEMBER(ready_r);
DECLARE_WRITE16_MEMBER(subkey_le_w);
DECLARE_WRITE16_MEMBER(subkey_be_w);
DECLARE_WRITE16_MEMBER(addrlo_w);
DECLARE_WRITE16_MEMBER(addrhi_w);
DECLARE_READ16_MEMBER(decrypt_le_r);
DECLARE_READ16_MEMBER(decrypt_be_r);
void iomap_64be(address_map &map);
void iomap_le(address_map &map);
uint16_t do_decrypt(uint8_t *&base);
void set_addr_low(uint16_t data);
@ -36,6 +46,8 @@ protected:
private:
bool first_read;
enum {
// BUFFER_SIZE = 32768, LINE_SIZE = 512,
BUFFER_SIZE = 2, LINE_SIZE = 512, // this should be a stream, without any 'BUFFER_SIZE' ? I guess the SH4 DMA implementation isn't on a timer tho?

Some files were not shown because too many files have changed in this diff Show More