From e09782d11ab3837748722800a338bbbef621fd8a Mon Sep 17 00:00:00 2001 From: cam900 Date: Wed, 24 Jun 2020 20:00:56 +0900 Subject: saa1099.cpp: Fix output, frequency behavior, Add notes Reduce unnecessary, unused valutes, Reduce duplicates, macros gblaster.cpp, sblaster.cpp: Fix output, clock inputs, verified from real hardware vgmplay.cpp: Support SAA1099 stereo output, reference: pinout, datasheet --- src/devices/bus/isa/gblaster.cpp | 12 ++++---- src/devices/bus/isa/sblaster.cpp | 12 ++++---- src/devices/sound/saa1099.cpp | 66 +++++++++++++++------------------------- src/devices/sound/saa1099.h | 14 +++------ src/mame/drivers/vgmplay.cpp | 10 +++--- 5 files changed, 48 insertions(+), 66 deletions(-) diff --git a/src/devices/bus/isa/gblaster.cpp b/src/devices/bus/isa/gblaster.cpp index 26778703ef1..1cbd9458c04 100644 --- a/src/devices/bus/isa/gblaster.cpp +++ b/src/devices/bus/isa/gblaster.cpp @@ -72,12 +72,12 @@ void isa8_gblaster_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - SAA1099(config, m_saa1099_1, 7159090); - m_saa1099_1->add_route(ALL_OUTPUTS, "lspeaker", 0.50); - m_saa1099_1->add_route(ALL_OUTPUTS, "rspeaker", 0.50); - SAA1099(config, m_saa1099_2, 7159090); - m_saa1099_2->add_route(ALL_OUTPUTS, "lspeaker", 0.50); - m_saa1099_2->add_route(ALL_OUTPUTS, "rspeaker", 0.50); + SAA1099(config, m_saa1099_1, XTAL(14'318'181) / 2); // or CMS-301, from OSC pin in ISA bus + m_saa1099_1->add_route(0, "lspeaker", 0.50); + m_saa1099_1->add_route(1, "rspeaker", 0.50); + SAA1099(config, m_saa1099_2, XTAL(14'318'181) / 2); // or CMS-301, from OSC pin in ISA bus + m_saa1099_2->add_route(0, "lspeaker", 0.50); + m_saa1099_2->add_route(1, "rspeaker", 0.50); } //************************************************************************** diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index 68120388f8a..ab6c899bdf8 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -1171,13 +1171,13 @@ void isa8_sblaster1_0_device::device_add_mconfig(machine_config &config) m_ym3812->add_route(ALL_OUTPUTS, "lspeaker", 3.0); m_ym3812->add_route(ALL_OUTPUTS, "rspeaker", 3.0); - SAA1099(config, m_saa1099_1, 7159090); - m_saa1099_1->add_route(ALL_OUTPUTS, "lspeaker", 0.5); - m_saa1099_1->add_route(ALL_OUTPUTS, "rspeaker", 0.5); + SAA1099(config, m_saa1099_1, XTAL(14'318'181) / 2); // or CMS-301, from OSC pin in ISA bus + m_saa1099_1->add_route(0, "lspeaker", 0.5); + m_saa1099_1->add_route(1, "rspeaker", 0.5); - SAA1099(config, m_saa1099_2, 7159090); - m_saa1099_2->add_route(ALL_OUTPUTS, "lspeaker", 0.5); - m_saa1099_2->add_route(ALL_OUTPUTS, "rspeaker", 0.5); + SAA1099(config, m_saa1099_2, XTAL(14'318'181) / 2); // or CMS-301, from OSC pin in ISA bus + m_saa1099_2->add_route(0, "lspeaker", 0.5); + m_saa1099_2->add_route(1, "rspeaker", 0.5); } void isa8_sblaster1_5_device::device_add_mconfig(machine_config &config) diff --git a/src/devices/sound/saa1099.cpp b/src/devices/sound/saa1099.cpp index 9c41ca7a939..9edec91113a 100644 --- a/src/devices/sound/saa1099.cpp +++ b/src/devices/sound/saa1099.cpp @@ -70,8 +70,10 @@ #include "emu.h" #include "saa1099.h" -#define LEFT 0x00 -#define RIGHT 0x01 +static constexpr int clock_divider = 256; + +static constexpr int LEFT = 0x00; +static constexpr int RIGHT = 0x01; static constexpr u16 amplitude_lookup[16] = { 0*32767/16, 1*32767/16, 2*32767/16, 3*32767/16, @@ -123,7 +125,6 @@ static constexpr u8 envelope[8][64] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15 } }; - // device type definition DEFINE_DEVICE_TYPE(SAA1099, saa1099_device, "saa1099", "Philips SAA1099") @@ -149,7 +150,6 @@ saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, d , m_all_ch_enable(false) , m_sync_state(false) , m_selected_reg(0) - , m_sample_rate(0.0) { } @@ -160,11 +160,8 @@ saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, d void saa1099_device::device_start() { - /* copy global parameters */ - m_sample_rate = clock() / 256; - /* for each chip allocate one stream */ - m_stream = stream_alloc(0, 2, m_sample_rate); + m_stream = stream_alloc(0, 2, clock()/clock_divider); save_item(NAME(m_noise_params)); save_item(NAME(m_env_enable)); @@ -184,7 +181,6 @@ void saa1099_device::device_start() save_item(STRUCT_MEMBER(m_channels, amplitude)); save_item(STRUCT_MEMBER(m_channels, envelope)); save_item(STRUCT_MEMBER(m_channels, counter)); - save_item(STRUCT_MEMBER(m_channels, freq)); save_item(STRUCT_MEMBER(m_channels, level)); save_item(STRUCT_MEMBER(m_noise, counter)); @@ -199,9 +195,7 @@ void saa1099_device::device_start() void saa1099_device::device_clock_changed() { - m_sample_rate = clock() / 256; - - m_stream->set_sample_rate(m_sample_rate); + m_stream->set_sample_rate(clock()/clock_divider); } @@ -225,10 +219,10 @@ void saa1099_device::sound_stream_update(sound_stream &stream, stream_sample_t * { switch (m_noise_params[ch]) { - case 0: m_noise[ch].freq = clock()/256.0 * 2; break; - case 1: m_noise[ch].freq = clock()/512.0 * 2; break; - case 2: m_noise[ch].freq = clock()/1024.0 * 2; break; - case 3: m_noise[ch].freq = m_channels[ch * 3].freq; break; // todo: this case will be clock()/[ch*3's octave divisor, 0 is = 256*2, higher numbers are higher] * 2 if the tone generator phase reset bit (0x1c bit 1) is set. + case 0: + case 1: + case 2: m_noise[ch].freq = 256 << m_noise_params[ch]; break; + case 3: m_noise[ch].freq = m_channels[ch * 3].freq(); break; // todo: this case will be clock()/[ch*3's octave divisor, 0 is = 256*2, higher numbers are higher] * 2 if the tone generator phase reset bit (0x1c bit 1) is set. } } @@ -240,19 +234,11 @@ void saa1099_device::sound_stream_update(sound_stream &stream, stream_sample_t * /* for each channel */ for (ch = 0; ch < 6; ch++) { - if (m_channels[ch].freq == 0.0) - m_channels[ch].freq = (double)((2 * clock() / 512) << m_channels[ch].octave) / - (511.0 - (double)m_channels[ch].frequency); - /* check the actual position in the square wave */ - m_channels[ch].counter -= m_channels[ch].freq; - while (m_channels[ch].counter < 0) + while (m_channels[ch].counter <= 0) { /* calculate new frequency now after the half wave is updated */ - m_channels[ch].freq = (double)((2 * clock() / 512) << m_channels[ch].octave) / - (511.0 - (double)m_channels[ch].frequency); - - m_channels[ch].counter += m_sample_rate; + m_channels[ch].counter += m_channels[ch].freq(); m_channels[ch].level ^= 1; /* eventually clock the envelope counters */ @@ -261,27 +247,25 @@ void saa1099_device::sound_stream_update(sound_stream &stream, stream_sample_t * if (ch == 4 && m_env_clock[1] == 0) envelope_w(1); } + m_channels[ch].counter -= clock_divider; // if the noise is enabled + u8 level = 0; if (m_channels[ch].noise_enable) { // if the noise level is high (noise 0: chan 0-2, noise 1: chan 3-5) - if (m_noise[ch/3].level & 1) - { - // subtract to avoid overflows, also use only half amplitude - output_l -= m_channels[ch].amplitude[ LEFT] * m_channels[ch].envelope[ LEFT] / 16 / 2; - output_r -= m_channels[ch].amplitude[RIGHT] * m_channels[ch].envelope[RIGHT] / 16 / 2; - } + level ^= m_noise[ch/3].level & 1; } // if the square wave is enabled if (m_channels[ch].freq_enable) { // if the channel level is high - if (m_channels[ch].level & 1) - { - output_l += m_channels[ch].amplitude[ LEFT] * m_channels[ch].envelope[ LEFT] / 16; - output_r += m_channels[ch].amplitude[RIGHT] * m_channels[ch].envelope[RIGHT] / 16; - } + level ^= m_channels[ch].level & 1; + } + if (level) + { + output_l += m_channels[ch].amplitude[ LEFT] * m_channels[ch].envelope[ LEFT] / 16; + output_r += m_channels[ch].amplitude[RIGHT] * m_channels[ch].envelope[RIGHT] / 16; } } @@ -290,15 +274,15 @@ void saa1099_device::sound_stream_update(sound_stream &stream, stream_sample_t * /* update the state of the noise generator * polynomial is x^18 + x^11 + x (i.e. 0x20400) and is a plain XOR, initial state is probably all 1s * see http://www.vogons.org/viewtopic.php?f=9&t=51695 */ - m_noise[ch].counter -= m_noise[ch].freq; - while (m_noise[ch].counter < 0) + while (m_noise[ch].counter <= 0) { - m_noise[ch].counter += m_sample_rate; + m_noise[ch].counter += m_noise[ch].freq; // clock / ((511 - frequency) * 2^(8 - octave)) or clock / 2^(8 + noise period) if( ((m_noise[ch].level & 0x20000) == 0) != ((m_noise[ch].level & 0x0400) == 0) ) m_noise[ch].level = (m_noise[ch].level << 1) | 1; else m_noise[ch].level <<= 1; } + m_noise[ch].counter -= clock_divider; } /* write sound data to the buffer */ outputs[LEFT][j] = output_l / 6; @@ -434,7 +418,7 @@ void saa1099_device::data_w(u8 data) for (int i = 0; i < 6; i++) { m_channels[i].level = 0; - m_channels[i].counter = 0.0; + m_channels[i].counter = m_channels[i].freq(); } } break; diff --git a/src/devices/sound/saa1099.h b/src/devices/sound/saa1099.h index c6b7382e38e..2831b4b1f73 100644 --- a/src/devices/sound/saa1099.h +++ b/src/devices/sound/saa1099.h @@ -47,22 +47,19 @@ private: u8 envelope[2]; // envelope (0x00..0x0f or 0x10 == off) /* vars to simulate the square wave */ - double counter = 0.0; - double freq = 0.0; + inline u32 freq() const { return (511 - frequency) << (8 - octave); } // clock / ((511 - frequency) * 2^(8 - octave)) + int counter = 0; u8 level = 0; }; struct saa1099_noise { - saa1099_noise() { (void)pad; } + saa1099_noise() { } /* vars to simulate the noise generator output */ - double counter = 0.0; - double freq = 0.0; + int counter = 0; + int freq = 0; u32 level = 0xffffffffU; // noise polynomial shifter - - private: - u32 pad; // pad out structure to multiple of sizeof(double) }; void envelope_w(int ch); @@ -80,7 +77,6 @@ private: u8 m_selected_reg; // selected register saa1099_channel m_channels[6]; // channels saa1099_noise m_noise[2]; // noise generators - double m_sample_rate; }; DECLARE_DEVICE_TYPE(SAA1099, saa1099_device) diff --git a/src/mame/drivers/vgmplay.cpp b/src/mame/drivers/vgmplay.cpp index 42439e94f22..c5ca70fc50d 100644 --- a/src/mame/drivers/vgmplay.cpp +++ b/src/mame/drivers/vgmplay.cpp @@ -3935,12 +3935,12 @@ void vgmplay_state::vgmplay(machine_config &config) m_vsu_vue[1]->add_route(1, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); SAA1099(config, m_saa1099[0], 0); - m_saa1099[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); - m_saa1099[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); + m_saa1099[0]->add_route(0, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); + m_saa1099[0]->add_route(1, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); SAA1099(config, m_saa1099[1], 0); - m_saa1099[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); - m_saa1099[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); + m_saa1099[1]->add_route(0, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); + m_saa1099[1]->add_route(1, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); ES5503(config, m_es5503[0], 0); m_es5503[0]->set_channels(2); @@ -3956,12 +3956,14 @@ void vgmplay_state::vgmplay(machine_config &config) ES5505(config, m_es5505[0], 0); // TODO m_es5505[0]->set_addrmap(0, &vgmplay_state::es5505_map<0>); + // TODO m_es5505[0]->set_addrmap(1, &vgmplay_state::es5505_map<0>); m_es5505[0]->set_channels(1); m_es5505[0]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_es5505[0]->add_route(1, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); ES5505(config, m_es5505[1], 0); // TODO m_es5505[1]->set_addrmap(0, &vgmplay_state::es5505_map<1>); + // TODO m_es5505[1]->set_addrmap(1, &vgmplay_state::es5505_map<1>); m_es5505[1]->set_channels(1); m_es5505[1]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_es5505[1]->add_route(1, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); -- cgit v1.2.3 From 630ff9a3e41518a2357156a6233431c99a5bb36b Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 3 Jul 2020 07:20:38 +0200 Subject: New working clones ------------------ Space Trek (Video Game S.A., Spanish bootleg of Scramble) [Rubén Casaña (Retro Arcadia Valencia), Isaías Hernández] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mame/drivers/galaxian.cpp | 56 ++++++++++++++++++++++++++++++------------- src/mame/mame.lst | 1 + 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 01e4838c562..9952573e9fa 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -11919,6 +11919,29 @@ ROM_START( scramblebf ) ROM_LOAD( "c01s.6e", 0x0000, 0x0020, BAD_DUMP CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) ROM_END +ROM_START( spctrek ) // Two PCBs, one labeled MU-1 and the other probably MU-2 (partially covered with a sticker, not readable) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "7301.bin", 0x0000, 0x0800, CRC(65cc2c6d) SHA1(75f6317da58ac0ef42c63fc8a641135036c2082c) ) // only different ROM from scrambp (4 bytes at 0x134-x137 and BURROS instead of KONAMI) + ROM_LOAD( "7202.bin", 0x0800, 0x0800, CRC(66ebc070) SHA1(ada52d7880185d1ac3a39c94896d5127ea05b14a) ) + ROM_LOAD( "7103.bin", 0x1000, 0x0800, CRC(317548fd) SHA1(687c309d476cd5fc830d90e9e6293d1dcab96df7) ) + ROM_LOAD( "t4.bin", 0x1800, 0x0800, CRC(dd380a22) SHA1(125e713a58cc5f2c1e38f67dad29f8c985ce5a8b) ) + ROM_LOAD( "7105.bin", 0x2000, 0x0800, CRC(fa4f1a70) SHA1(9d797eaab0f19a2ed003f782716719c9d752bd56) ) + ROM_LOAD( "t6.bin", 0x2800, 0x0800, CRC(9fd96374) SHA1(c8456dd8a012353a023a2d3fa5d508e49c36ace8) ) + ROM_LOAD( "t7.bin", 0x3000, 0x0800, CRC(88ac07a0) SHA1(c57061db5984b472039356bf84a050b5b66e3813) ) + ROM_LOAD( "7108.bin", 0x3800, 0x0800, CRC(d20088ee) SHA1(4b2deb64f1185780e5b6d1527ed5f691591b9ea0) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "s1.bin", 0x0000, 0x0800, CRC(be037cf6) SHA1(f28e5ead496e70beaada24775aa58bd5d75f2d25) ) + ROM_LOAD( "s2.bin", 0x0800, 0x0800, CRC(de7912da) SHA1(8558b4eff5d7e63029b325edef9914feda5834c3) ) + ROM_LOAD( "s3.bin", 0x1000, 0x0800, CRC(ba2fa933) SHA1(1f976d8595706730e29f93027e7ab4620075c078) ) + + ROM_REGION( 0x1000, "gfx1", 0 ) + ROM_LOAD( "t9.bin", 0x0000, 0x0800, CRC(4708845b) SHA1(a8b1ad19a95a9d35050a2ab7194cc96fc5afcdc9) ) + ROM_LOAD( "10.bin", 0x0800, 0x0800, CRC(11fd2887) SHA1(69844e48bb4d372cac7ae83c953df573c7ecbb7f) ) + + ROM_REGION( 0x0020, "proms", 0 ) // not dumped for this set, probably same as others + ROM_LOAD( "c01s.6e", 0x0000, 0x0020, BAD_DUMP CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) +ROM_END ROM_START( scrambp ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -13337,22 +13360,23 @@ GAME( 1980, theends, theend, theend, theend, galaxian_state, init_ GAME( 1981, theendss, theend, theend, theend, galaxian_state, init_theend, ROT90, "bootleg (Sonic)", "The End (SegaSA / Sonic)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, takeoff, theend, takeoff, explorer, galaxian_state, init_explorer, ROT90, "bootleg (Sidam)", "Take Off (bootleg of The End)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // colors likely need bitswap<8> somewhere; needs different sound timer. reference: https://www.youtube.com/watch?v=iPYX3yJORTE -GAME( 1981, scramble, 0, scramble, scramble, galaxian_state, init_scramble, ROT90, "Konami", "Scramble", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, scrambles, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "Konami (Stern Electronics license)", "Scramble (Stern Electronics set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, scrambles2, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "Konami (Stern Electronics license)", "Scramble (Stern Electronics set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, strfbomb, scramble, scramble, strfbomb, galaxian_state, init_scramble, ROT90, "bootleg (Omni)", "Strafe Bomb (bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, explorer, scramble, explorer, explorer, galaxian_state, init_explorer, ROT90, "bootleg (Sidam)", "Explorer (bootleg of Scramble)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // needs different sound timer -GAME( 1981, scramblebf, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Karateco)", "Scramble (Karateco, French bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, scrambp, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Billport S.A.)", "Impacto (Billport S.A., Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) // similar to the Karateco set above -GAME( 1981, scramce, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Centromatic S.A.)", "Scramble (Centromatic S.A., Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) // similar to above -GAME( 1981, scrampt, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Petaco S.A.)", "Scramble (Petaco S.A., Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) // ^^ -GAME( 1981, scramrf, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Recreativos Franco)", "Scramble (Recreativos Franco, Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, offensiv, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Video Dens)", "Offensive (Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, ncentury, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Petaco S.A.)", "New Century (Spanish bootleg of Scramble)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // irq isn't enabled correctly -GAME( 1981, scrammr, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Model Racing)", "Scramble (Model Racing, Italian bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // irq isn't enabled correctly -GAME( 1981, scramblebb, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg?", "Scramble (bootleg?)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, kamikazesp, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Euromatic S.A.)", "Kamikaze (Euromatic S.A., Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) -GAME( 198?, bomber, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Alca)", "Bomber (bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, scramble, 0, scramble, scramble, galaxian_state, init_scramble, ROT90, "Konami", "Scramble", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, scrambles, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "Konami (Stern Electronics license)", "Scramble (Stern Electronics set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, scrambles2, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "Konami (Stern Electronics license)", "Scramble (Stern Electronics set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, strfbomb, scramble, scramble, strfbomb, galaxian_state, init_scramble, ROT90, "bootleg (Omni)", "Strafe Bomb (bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, explorer, scramble, explorer, explorer, galaxian_state, init_explorer, ROT90, "bootleg (Sidam)", "Explorer (bootleg of Scramble)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // needs different sound timer +GAME( 1981, scramblebf, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Karateco)", "Scramble (Karateco, French bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, scrambp, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Billport S.A.)", "Impacto (Billport S.A., Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) // similar to the Karateco set above +GAME( 1981, spctrek, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Video Game S.A.)", "Space Trek (Video Game S.A., Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, scramce, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Centromatic S.A.)", "Scramble (Centromatic S.A., Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) // similar to above +GAME( 1981, scrampt, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Petaco S.A.)", "Scramble (Petaco S.A., Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) // ^^ +GAME( 1981, scramrf, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Recreativos Franco)", "Scramble (Recreativos Franco, Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, offensiv, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Video Dens)", "Offensive (Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, ncentury, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Petaco S.A.)", "New Century (Spanish bootleg of Scramble)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // irq isn't enabled correctly +GAME( 1981, scrammr, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Model Racing)", "Scramble (Model Racing, Italian bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // irq isn't enabled correctly +GAME( 1981, scramblebb, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg?", "Scramble (bootleg?)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, kamikazesp, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Euromatic S.A.)", "Kamikaze (Euromatic S.A., Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) +GAME( 198?, bomber, scramble, scramble, scramble, galaxian_state, init_scramble, ROT90, "bootleg (Alca)", "Bomber (bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, atlantis, 0, theend, atlantis, galaxian_state, init_atlantis, ROT90, "Comsoft", "Battle of Atlantis (set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, atlantis2, atlantis, theend, atlantis, galaxian_state, init_atlantis, ROT90, "Comsoft", "Battle of Atlantis (set 2)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 8ef8a06fd62..6c9b31eb3f7 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14230,6 +14230,7 @@ spacempr // bootleg spactrai // spcdrag // bootleg spcdraga // bootleg +spctrek // bootleg spctbird // (c) Fortrek spdcoin // (c) 1984 Stern sstarcrs // Taito (Brazil) -- cgit v1.2.3 From c6fe2bed3fbb40155d39d77bcd5b8f07ee86e212 Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Fri, 3 Jul 2020 13:21:39 +0300 Subject: New working clone ------------------- Dead Or Alive ++ (Korea) [chacal231077] --- src/mame/drivers/zn.cpp | 18 ++++++++++++++++++ src/mame/mame.lst | 1 + 2 files changed, 19 insertions(+) diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp index 6b4d627ea21..2688208c1d9 100644 --- a/src/mame/drivers/zn.cpp +++ b/src/mame/drivers/zn.cpp @@ -3998,6 +3998,23 @@ ROM_START( doapp ) ROM_LOAD( "mg05", 0x000000, 0x000008, CRC(5748a4ca) SHA1(c88d73f6a646a9ddefdfd84cba70d591759c069f) ) ROM_END +ROM_START( doappk ) + TPS_BIOS + + ROM_REGION32_LE( 0x02800000, "bankedroms", 0 ) + ROM_LOAD16_BYTE( "doapp_u0119.119", 0x0000001, 0x100000, CRC(9084704e) SHA1(616b3e65a32768767209ae77c48ad34d11b31754) ) + ROM_LOAD16_BYTE( "doapp_u0120.120", 0x0000000, 0x100000, CRC(720a6983) SHA1(d38783110440ffa00036b86f97bff5edb6a5673f) ) + ROM_LOAD( "doapp-0.216", 0x0400000, 0x400000, CRC(acc6c539) SHA1(a744567a3d75634098b1749103307981be9acbdd) ) + ROM_LOAD( "doapp-1.217", 0x0800000, 0x400000, CRC(14b961c4) SHA1(3fae1fcb4665ba8bad391881b26c2d087718d42f) ) + ROM_LOAD( "doapp-2.218", 0x0c00000, 0x400000, CRC(134f698f) SHA1(6422972cf5d30a0f09f0c20f042691d5969207b4) ) + ROM_LOAD( "doapp-3.219", 0x1000000, 0x400000, CRC(1c6540f3) SHA1(8631fde93a1da6325d7b31c7edf12c964f0ac4fc) ) + ROM_LOAD( "doapp-4.220", 0x1400000, 0x400000, CRC(f83bacf7) SHA1(5bd66da993f0db966581dde80dd7e5b377754412) ) + ROM_LOAD( "doapp-5.221", 0x1800000, 0x400000, CRC(e11e8b71) SHA1(b1d1b9532b5f074ce216a603436d5674d136865d) ) + + ROM_REGION( 0x8, "cat702_2", 0 ) + ROM_LOAD( "mg05", 0x000000, 0x000008, CRC(5748a4ca) SHA1(c88d73f6a646a9ddefdfd84cba70d591759c069f) ) +ROM_END + ROM_START( tondemo ) TPS_BIOS @@ -5258,6 +5275,7 @@ GAME( 1997, glpracr2, coh1002m, coh1002m, zn, tecmo_zn_state, empty_in GAME( 1997, glpracr2j, glpracr2, coh1002m, zn, tecmo_zn_state, empty_init, ROT0, "Tecmo", "Gallop Racer 2 (Japan)", MACHINE_IMPERFECT_SOUND ) GAME( 1997, glpracr2l, glpracr2, coh1002ml, zn, tecmo_zn_state, empty_init, ROT0, "Tecmo", "Gallop Racer 2 Link HW (Japan)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, doapp, coh1002m, coh1002m, zn, tecmo_zn_state, empty_init, ROT0, "Tecmo", "Dead Or Alive ++ (Japan)", MACHINE_IMPERFECT_SOUND ) +GAME( 1998, doappk, doapp, coh1002m, zn, tecmo_zn_state, empty_init, ROT0, "Tecmo", "Dead Or Alive ++ (Korea)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, cbaj, coh1002m, cbaj, zn, cbaj_state, empty_init, ROT0, "UEP Systems", "Cool Boarders Arcade Jam", MACHINE_IMPERFECT_SOUND ) GAME( 1998, shngmtkb, coh1002m, coh1002m, zn, tecmo_zn_state, empty_init, ROT0, "Sunsoft / Activision", "Shanghai Matekibuyuu", MACHINE_IMPERFECT_SOUND ) GAME( 1999, tondemo, coh1002m, coh1002m, zn, tecmo_zn_state, empty_init, ROT0, "Tecmo", "Tondemo Crisis (Japan)", MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 6c9b31eb3f7..ec2117f1c81 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -42156,6 +42156,7 @@ coh1002e // coh1002m // coh3002c // doapp // Dead Or Alive ++ (JAPAN) +doappk // Dead Or Alive ++ (Korea) flamegun // Flame Gunner (USA) flamegunj // Flame Gunner (JAPAN) ftimpact // Fighters' Impact (Ver 2.02O) -- cgit v1.2.3 From 1292022f0311b80864d07df957d9afe79458b153 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 3 Jul 2020 22:54:58 +1000 Subject: galeb: cleanup, preliminary cassette, notes --- scripts/target/mame/mess.lua | 2 - src/mame/drivers/galeb.cpp | 256 ++++++++++++++++++++++++++++++++++--------- src/mame/drivers/orao.cpp | 8 +- src/mame/includes/galeb.h | 59 ---------- src/mame/video/galeb.cpp | 45 -------- 5 files changed, 210 insertions(+), 160 deletions(-) delete mode 100644 src/mame/includes/galeb.h delete mode 100644 src/mame/video/galeb.cpp diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index ab012a1b084..eed568b9681 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3202,8 +3202,6 @@ files { createMESSProjects(_target, _subtarget, "pel") files { MAME_DIR .. "src/mame/drivers/galeb.cpp", - MAME_DIR .. "src/mame/includes/galeb.h", - MAME_DIR .. "src/mame/video/galeb.cpp", MAME_DIR .. "src/mame/drivers/orao.cpp", } diff --git a/src/mame/drivers/galeb.cpp b/src/mame/drivers/galeb.cpp index 5df4892a2bf..091a1a362ee 100644 --- a/src/mame/drivers/galeb.cpp +++ b/src/mame/drivers/galeb.cpp @@ -2,82 +2,183 @@ // copyright-holders:Miodrag Milanovic /*************************************************************************** - Galeb driver by Miodrag Milanovic - - 01/03/2008 Updated to work with latest SVN code - 23/02/2008 Sound support added. - 22/02/2008 Preliminary driver. - - Driver is based on work of Josip Perusanec +Galeb driver by Miodrag Milanovic + +2008-02-22 Preliminary driver. +2008-02-23 Sound support added. +2008-03-01 Updated to work with latest SVN code + +Driver is based on work of Josip Perusanec. + +Galeb (seagull) based on the OSI UK101. Due to its expense it is quite rare. +It was succeeded by the Orao (eagle). + +All commands in Monitor and in Basic must be in UPPERCASE. So, the very first +thing to do is to press ^A to enter caps mode. + +Commands: +A nnnn Mini-assembler +B +C aaaabbbb show checksum of memory from a to b +E aaaabbbb Hex dump from a to b +F aaaabbbbcc Fill memory from a to b with c +L Load tape +M nnnn Modify memory starting at byte nnnn (enter to escape) +P +Q ccccaaaabbbb Copy memory range a to b, over to c +R +S +T +U nnnn Go to nnnn +X nnnn disassemble +$ +^A caps lock +^B Start Basic +^G keyclick +^L clear screen +Alt\ + + +Cassette: +- Unable to locate a schematic, but it appears that a 6850 is the uart. + The UK101 used a 6850 and Kansas City tape encoding, and so it is assumed + that this computer is the same. + +Screen: +- The T command can cause the system to expand the video to 4k + instead of 1k. Therefore the writing goes off the bottom and doesn't scroll. + It is not known if this is intentional, or a bug. The video routine has been + modified to cope, in case it's a real feature. (T 0000 0022 is an example) + +ToDo: +- BASIC SAVE command is weird... need instructions +- Therefore, cassette is considered to be not working. ****************************************************************************/ #include "emu.h" -#include "includes/galeb.h" - #include "cpu/m6502/m6502.h" +#include "machine/clock.h" #include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" +#include "machine/6850acia.h" +#include "machine/timer.h" +#include "imagedev/cassette.h" +#include "sound/dac.h" +#include "emupal.h" - -static GFXDECODE_START( gfx_galeb ) - GFXDECODE_ENTRY( "gfx1", 0x0000, galeb_charlayout, 0, 1 ) -GFXDECODE_END +class galeb_state : public driver_device +{ +public: + galeb_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_ram(*this, "mainram") + , m_vram(*this, "videoram") + , m_maincpu(*this, "maincpu") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") + , m_io_keyboard(*this, "LINE%u", 0U) + , m_cass(*this, "cassette") + , m_acia(*this, "acia") + , m_dac(*this, "dac") + { } + + void galeb(machine_config &config); + +private: + TIMER_DEVICE_CALLBACK_MEMBER(kansas_w); + TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); + void dac_w(u8 data); + u8 keyboard_r(offs_t offset); + u32 screen_update_galeb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u8 m_cass_data[4]; + bool m_cassbit; + bool m_cassold; + required_shared_ptr m_ram; + required_shared_ptr m_vram; + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_palette; + required_ioport_array<8> m_io_keyboard; + required_device m_cass; + required_device m_acia; + required_device m_dac; + + void mem_map(address_map &map); + + virtual void machine_start() override; + virtual void machine_reset() override; + + bool m_dac_state; +}; void galeb_state::machine_start() { save_item(NAME(m_dac_state)); + save_item(NAME(m_cass_data)); + save_item(NAME(m_cassbit)); + save_item(NAME(m_cassold)); +} +void galeb_state::machine_reset() +{ + m_dac_state = 0; m_dac->write(m_dac_state); } void galeb_state::dac_w(uint8_t data) { - m_dac_state = !m_dac_state; + m_dac_state ^= 1; m_dac->write(m_dac_state); } -uint8_t galeb_state::keyboard_r(offs_t offset) +u8 galeb_state::keyboard_r(offs_t offset) { - return m_keyboard[offset]->read(); + return m_io_keyboard[offset]->read(); } -uint8_t galeb_state::tape_status_r() +TIMER_DEVICE_CALLBACK_MEMBER( galeb_state::kansas_w ) { - int status = 0; - status |= 2; /// send ready - status |= 1; /// receive ready - return status; + m_cass_data[3]++; + + if (m_cassbit != m_cassold) + { + m_cass_data[3] = 0; + m_cassold = m_cassbit; + } + + if (m_cassbit) + m_cass->output(BIT(m_cass_data[3], 0) ? -1.0 : +1.0); // 2400Hz + else + m_cass->output(BIT(m_cass_data[3], 1) ? -1.0 : +1.0); // 1200Hz } -void galeb_state::tape_data_w(uint8_t data) +TIMER_DEVICE_CALLBACK_MEMBER( galeb_state::kansas_r) { - logerror("tape_data_w %02x\n", data); + /* cassette - turn 1200/2400Hz to a bit */ + m_cass_data[1]++; + u8 cass_ws = (m_cass->input() > +0.03) ? 1 : 0; + + if (cass_ws != m_cass_data[0]) + { + m_cass_data[0] = cass_ws; + m_acia->write_rxd((m_cass_data[1] < 12) ? 1 : 0); + m_cass_data[1] = 0; + } } -uint8_t galeb_state::tape_data_r() -{ - logerror("tape_data_r (press escape to cancel load)\n"); - return 0x00; -} /* Address maps */ -void galeb_state::galeb_mem(address_map &map) +void galeb_state::mem_map(address_map &map) { - map(0x0000, 0x1fff).ram(); // RAM + map(0x0000, 0x1fff).ram().share("mainram"); + map(0xb000, 0xbfdf).ram().share("videoram"); map(0xbfe0, 0xbfe7).r(FUNC(galeb_state::keyboard_r)); map(0xbfe0, 0xbfe0).w(FUNC(galeb_state::dac_w)); - map(0xbffe, 0xbffe).r(FUNC(galeb_state::tape_status_r)); - map(0xbfff, 0xbfff).rw(FUNC(galeb_state::tape_data_r), FUNC(galeb_state::tape_data_w)); - map(0xb000, 0xb3ff).ram().share("video_ram"); // video ram - map(0xc000, 0xc7ff).rom(); // BASIC 01 ROM - map(0xc800, 0xcfff).rom(); // BASIC 02 ROM - map(0xd000, 0xd7ff).rom(); // BASIC 03 ROM - map(0xd800, 0xdfff).rom(); // BASIC 04 ROM - map(0xf000, 0xf7ff).rom(); // Monitor ROM - map(0xf800, 0xffff).rom(); // System ROM + map(0xbffe, 0xbfff).rw(m_acia, FUNC(acia6850_device::read), FUNC(acia6850_device::write)); + map(0xc000, 0xffff).rom().region("maincpu",0); } /* Input ports */ @@ -163,12 +264,46 @@ static INPUT_PORTS_START( galeb ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END +const gfx_layout charlayout = +{ + 8, 8, /* 8x8 characters */ + 256, /* 256 characters */ + 1, /* 1 bits per pixel */ + {0}, /* no bitplanes; 1 bit per pixel */ + {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 /* size of one char */ +}; + +static GFXDECODE_START( gfx_galeb ) + GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 ) +GFXDECODE_END + +u32 galeb_state::screen_update_galeb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + u16 ma = (m_ram[0xff]*256+m_ram[0xfe]) & 0xfff; + if (ma < 0x400) + ma = 15; + else + ma -= 0x3bb; + + for(u8 y = 0; y < 16; y++ ) + { + for(u8 x = 0; x < 48; x++ ) + { + u8 code = m_vram[ma + x + y*64]; + m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, code , 0, 0, 0, x*8,y*8); + } + } + return 0; +} + /* Machine driver */ void galeb_state::galeb(machine_config &config) { /* basic machine hardware */ M6502(config, m_maincpu, 1000000); - m_maincpu->set_addrmap(AS_PROGRAM, &galeb_state::galeb_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &galeb_state::mem_map); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -184,26 +319,43 @@ void galeb_state::galeb(machine_config &config) PALETTE(config, m_palette, palette_device::MONOCHROME); /* audio hardware */ - SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.0625); // unknown DAC + SPEAKER(config, "mono").front_center(); + DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.0625); // unknown DAC voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0)); vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); + + clock_device &acia_clock(CLOCK(config, "acia_clock", 4'800)); // 300 baud x 16(divider) = 4800 + acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); + acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); + + ACIA6850(config, m_acia, 0); + m_acia->txd_handler().set([this] (bool state) { m_cassbit = state; }); + + /* cassette */ + CASSETTE(config, m_cass); + m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); + TIMER(config, "kansas_w").configure_periodic(FUNC(galeb_state::kansas_w), attotime::from_hz(4800)); // cass write + TIMER(config, "kansas_r").configure_periodic(FUNC(galeb_state::kansas_r), attotime::from_hz(40000)); // cass read } /* ROM definition */ ROM_START( galeb ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "bas01.rom", 0xc000, 0x0800, CRC(9b19ed58) SHA1(ebfc27af8dbabfb233f9888e6a0a0dfc87ae1691) ) - ROM_LOAD( "bas02.rom", 0xc800, 0x0800, CRC(3f320a84) SHA1(4ea082b4269dca6152426b1f720c7508122d3cb7) ) - ROM_LOAD( "bas03.rom", 0xd000, 0x0800, CRC(f122ad10) SHA1(3c7c1dd67268230d179a00b0f8b35be80c2b7035) ) - ROM_LOAD( "bas04.rom", 0xd800, 0x0800, CRC(b5372a83) SHA1(f93b73d98b943c6791f46617418fb5e4238d75bd) ) - ROM_LOAD( "exmd.rom", 0xf000, 0x0800, CRC(1bcb1375) SHA1(fda3361d238720a3d309644093da9832d5aff661) ) - ROM_LOAD( "makbug.rom",0xf800, 0x0800, CRC(91e38e79) SHA1(2b6439a09a470cda9c81b9d453c6380b99716989) ) - ROM_REGION(0x0800, "gfx1",0) - ROM_LOAD ("chrgen.bin", 0x0000, 0x0800, CRC(409a800e) SHA1(0efe429dd6c0568032636e691d9865a623afeb55)) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) + // BASIC ROMS + ROM_LOAD( "bas01.rom", 0x0000, 0x0800, CRC(9b19ed58) SHA1(ebfc27af8dbabfb233f9888e6a0a0dfc87ae1691) ) + ROM_LOAD( "bas02.rom", 0x0800, 0x0800, CRC(3f320a84) SHA1(4ea082b4269dca6152426b1f720c7508122d3cb7) ) + ROM_LOAD( "bas03.rom", 0x1000, 0x0800, CRC(f122ad10) SHA1(3c7c1dd67268230d179a00b0f8b35be80c2b7035) ) + ROM_LOAD( "bas04.rom", 0x1800, 0x0800, CRC(b5372a83) SHA1(f93b73d98b943c6791f46617418fb5e4238d75bd) ) + // MONITOR + ROM_LOAD( "exmd.rom", 0x3000, 0x0800, CRC(1bcb1375) SHA1(fda3361d238720a3d309644093da9832d5aff661) ) + // SYSTEM + ROM_LOAD( "makbug.rom", 0x3800, 0x0800, CRC(91e38e79) SHA1(2b6439a09a470cda9c81b9d453c6380b99716989) ) + + ROM_REGION(0x0800, "chargen",0) + ROM_LOAD ("chrgen.bin", 0x0000, 0x0800, CRC(409a800e) SHA1(0efe429dd6c0568032636e691d9865a623afeb55) ) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1981, galeb, 0, 0, galeb, galeb, galeb_state, empty_init, "PEL Varazdin", "Galeb", 0 ) +COMP( 1981, galeb, 0, 0, galeb, galeb, galeb_state, empty_init, "PEL Varazdin", "Galeb", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/orao.cpp b/src/mame/drivers/orao.cpp index 83f5f42fd42..d6ec83ef9b3 100644 --- a/src/mame/drivers/orao.cpp +++ b/src/mame/drivers/orao.cpp @@ -13,8 +13,12 @@ Driver is based on work of Josip Perusanec Ctrl-V turns on keyclick Ctrl-S turns on reversed video +BC starts BASIC. orao103: EXIT to quit. orao: unknown how to quit. + Todo: - When pasting, shift key doesn't work +- orao103: loads its own tapes, but can't load software items +- orao: can't load anything ****************************************************************************/ @@ -236,7 +240,7 @@ u8 orao_state::kbd_r(offs_t offset) case 0x03FE : return m_io_keyboard[18]->read(); case 0x03FF : return m_io_keyboard[19]->read(); /* Tape */ - case 0x07FF : return (m_cassette->input() > 0.004) ? 0xff : 0; + case 0x07FF : return (m_cassette->input() > 0.002) ? 0xff : 0; } return 0xff; @@ -315,5 +319,5 @@ ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1984, orao, 0, 0, orao, orao, orao_state, init_orao, "PEL Varazdin", "Orao 102", MACHINE_SUPPORTS_SAVE ) +COMP( 1984, orao, 0, 0, orao, orao, orao_state, init_orao, "PEL Varazdin", "Orao 102", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) COMP( 1985, orao103, orao, 0, orao, orao, orao_state, init_orao, "PEL Varazdin", "Orao 103", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/galeb.h b/src/mame/includes/galeb.h deleted file mode 100644 index 64356ef7526..00000000000 --- a/src/mame/includes/galeb.h +++ /dev/null @@ -1,59 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/galeb.h - * - ****************************************************************************/ -#ifndef MAME_INCLUDES_GALEB_H -#define MAME_INCLUDES_GALEB_H - -#pragma once - -#include "sound/dac.h" -#include "emupal.h" - -class galeb_state : public driver_device -{ -public: - galeb_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_keyboard(*this, "LINE%u", 0), - m_dac(*this, "dac"), - m_dac_state(0) - { - } - - void galeb(machine_config &config); - -private: - required_shared_ptr m_video_ram; - void dac_w(uint8_t data); - uint8_t keyboard_r(offs_t offset); - uint8_t tape_status_r(); - uint8_t tape_data_r(); - void tape_data_w(uint8_t data); - virtual void video_start() override; - uint32_t screen_update_galeb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; - required_ioport_array<8> m_keyboard; - required_device m_dac; - - void galeb_mem(address_map &map); - - virtual void machine_start() override; - - int m_dac_state; -}; - -/*----------- defined in video/galeb.c -----------*/ - -extern const gfx_layout galeb_charlayout; - -#endif // MAME_INCLUDES_GALEB_H diff --git a/src/mame/video/galeb.cpp b/src/mame/video/galeb.cpp deleted file mode 100644 index e7c4b132442..00000000000 --- a/src/mame/video/galeb.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/*************************************************************************** - - Galeb video driver by Miodrag Milanovic - - 01/03/2008 Updated to work with latest SVN code - 22/02/2008 Preliminary driver. - -****************************************************************************/ - - -#include "emu.h" -#include "includes/galeb.h" - - -const gfx_layout galeb_charlayout = -{ - 8, 8, /* 8x8 characters */ - 256, /* 256 characters */ - 1, /* 1 bits per pixel */ - {0}, /* no bitplanes; 1 bit per pixel */ - {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 /* size of one char */ -}; - -void galeb_state::video_start() -{ -} - -uint32_t galeb_state::screen_update_galeb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - int x,y; - - for(y = 0; y < 16; y++ ) - { - for(x = 0; x < 48; x++ ) - { - int code = m_video_ram[15 + x + y*64]; - m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, code , 0, 0,0, x*8,y*8); - } - } - return 0; -} -- cgit v1.2.3 From d11915345311eba87c25ee5aec29285badd839af Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Fri, 3 Jul 2020 18:07:41 +0300 Subject: spectrum/mgt.cpp minor inhibit logic and reset fixes --- src/devices/bus/spectrum/mgt.cpp | 15 +++++++++------ src/devices/bus/spectrum/mgt.h | 2 ++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/devices/bus/spectrum/mgt.cpp b/src/devices/bus/spectrum/mgt.cpp index 4a869d45fae..605c54591a2 100644 --- a/src/devices/bus/spectrum/mgt.cpp +++ b/src/devices/bus/spectrum/mgt.cpp @@ -197,7 +197,7 @@ INPUT_PORTS_START(disciple) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) PORT_NAME("Sinclair P2 Button 1") PORT_CODE(KEYCODE_0_PAD) PORT_START("INH") - PORT_CONFNAME(0x01, 0x01, "Inhibit Button") + PORT_CONFNAME(0x01, 0x01, "Inhibit Button") PORT_CHANGED_MEMBER(DEVICE_SELF, spectrum_disciple_device, inhibit_button, 0) PORT_CONFSETTING(0x01, "Off (Disciple enabled)") PORT_CONFSETTING(0x00, "On (Disciple disabled)") INPUT_PORTS_END @@ -351,7 +351,7 @@ spectrum_disciple_device::spectrum_disciple_device(const machine_config &mconfig , m_joy1(*this, "JOY1") , m_joy2(*this, "JOY2") , m_inhibit(*this, "INH") - , m_control(0xff) // check me + , m_control(0) // CHECKME: what is 74LS374 power-on state ? { } @@ -361,6 +361,7 @@ spectrum_disciple_device::spectrum_disciple_device(const machine_config &mconfig void spectrum_plusd_device::device_start() { + m_romcs = 0; std::fill(std::begin(m_ram), std::end(m_ram), 0); save_item(NAME(m_romcs)); save_item(NAME(m_ram)); @@ -381,12 +382,12 @@ void spectrum_disciple_device::device_start() void spectrum_plusd_device::device_reset() { - m_romcs = 0; + m_centronics->write_strobe(0); } void spectrum_disciple_device::device_reset() { - spectrum_plusd_device::device_reset(); + m_romcs = 0; m_map = false; m_reset_delay = true; timer_set(attotime::from_usec(10), TIMER_RESET); // delay time is a guess @@ -550,7 +551,7 @@ void spectrum_disciple_device::pre_opcode_fetch(offs_t offset) case 0x0008: case 0x0066: case 0x028e: - if (!m_reset_delay && (m_inhibit->read() || !BIT(m_control, 4))) + if (!m_reset_delay && (m_inhibit->read() || BIT(m_control, 4))) m_romcs = 1; break; } @@ -579,7 +580,7 @@ uint8_t spectrum_disciple_device::iorq_r(offs_t offset) m_map = false; break; case 0xbb: // page in - if (!machine().side_effects_disabled() && !m_reset_delay) + if (!machine().side_effects_disabled() && !m_reset_delay && (m_inhibit->read() || BIT(m_control, 4))) m_romcs = 1; break; case 0xfe: // sinclair joysticks @@ -615,6 +616,8 @@ void spectrum_disciple_device::iorq_w(offs_t offset, uint8_t data) m_centronics->write_strobe(BIT(data, 6)); // 7: network... m_control = data; + if (!m_inhibit->read() && !BIT(m_control, 4)) + m_romcs = 0; } break; case 0x3b: // wait when net=1 diff --git a/src/devices/bus/spectrum/mgt.h b/src/devices/bus/spectrum/mgt.h index ee3a7c9fe82..4fb385f50e7 100644 --- a/src/devices/bus/spectrum/mgt.h +++ b/src/devices/bus/spectrum/mgt.h @@ -71,6 +71,8 @@ public: // construction/destruction spectrum_disciple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + DECLARE_INPUT_CHANGED_MEMBER(inhibit_button) { if (!newval) m_romcs = 0; }; + protected: enum { -- cgit v1.2.3 From 5f7e034a13da226d035e43b6c653705e083c42cd Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 3 Jul 2020 20:34:07 +0200 Subject: devices/machine/iwm.cpp, device/machine/ncr539x.cpp, mame/machine/abc1600mac.cpp: fixed initializations issues that were causing problems in devnoclear debug builds (nw) --- src/devices/machine/iwm.cpp | 4 ++-- src/devices/machine/ncr539x.cpp | 1 + src/mame/machine/abc1600mac.cpp | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/devices/machine/iwm.cpp b/src/devices/machine/iwm.cpp index 9c5002672e2..385561978b2 100644 --- a/src/devices/machine/iwm.cpp +++ b/src/devices/machine/iwm.cpp @@ -2,7 +2,7 @@ // copyright-holders:Olivier Galibert /********************************************************************* - iwm.c + iwm.cpp Implementation of the Apple IWM floppy disk controller @@ -15,6 +15,7 @@ DEFINE_DEVICE_TYPE(IWM, iwm_device, "iwm", "Apple IWM floppy controller") iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock) : applefdintf_device(mconfig, IWM, tag, owner, clock), + m_floppy(nullptr), m_q3_clock(q3_clock) { if (q3_clock != 0) @@ -62,7 +63,6 @@ void iwm_device::device_reset() { applefdintf_device::device_reset(); - m_floppy = nullptr; m_last_sync = machine().time().as_ticks(clock()); m_next_state_change = 0; m_active = MODE_IDLE; diff --git a/src/devices/machine/ncr539x.cpp b/src/devices/machine/ncr539x.cpp index 09e0bee9f21..1ddd46b2c18 100644 --- a/src/devices/machine/ncr539x.cpp +++ b/src/devices/machine/ncr539x.cpp @@ -160,6 +160,7 @@ void ncr539x_device::device_reset() m_control1 = m_control2 = m_control3 = m_control4 = 0; m_chipid_available = false; m_chipid_lock = false; + m_fifo_internal_state = 0; m_out_irq_cb(CLEAR_LINE); m_out_drq_cb(CLEAR_LINE); diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp index 37c70a11433..4b051edf785 100644 --- a/src/mame/machine/abc1600mac.cpp +++ b/src/mame/machine/abc1600mac.cpp @@ -116,7 +116,8 @@ abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char m_page_ram(*this, "page_ram"), m_watchdog(*this, "watchdog"), m_cpu(*this, finder_base::DUMMY_TAG), - m_task(0) + m_task(0), + m_cause(0) { } -- cgit v1.2.3 From b8c8b0b2fc7b24bd43e4bd908d1cb53a5c731358 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 3 Jul 2020 20:35:12 +0200 Subject: ddragon.cpp: modified ddragon6809 machine config to actually reflect what's on the PCB --- src/mame/drivers/ddragon.cpp | 56 +++++++++++++++++++++++++++++++------------- src/mame/includes/ddragon.h | 2 ++ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp index d32b4d9a610..3de10c7f244 100644 --- a/src/mame/drivers/ddragon.cpp +++ b/src/mame/drivers/ddragon.cpp @@ -59,6 +59,7 @@ Dip locations verified with manual for ddragon & ddragon2 #include "cpu/m6800/m6801.h" #include "cpu/m6809/m6809.h" #include "cpu/z80/z80.h" +#include "sound/2203intf.h" #include "sound/okim6295.h" #include "sound/ym2151.h" @@ -559,6 +560,11 @@ void ddragon_state::sub_6309_map(address_map &map) map(0xc000, 0xffff).rom(); } +void ddragon_state::sub_6809_map(address_map &map) // TODO: everything +{ + map(0x8000, 0xffff).rom().region("sub", 0); +} + void ddragon_state::ddragonba_sub_map(address_map &map) { map(0x0100, 0x0fff).ram(); @@ -591,6 +597,12 @@ void ddragon_state::sound_map(address_map &map) map(0x8000, 0xffff).rom(); } +void ddragon_state::ddragon6809_sound_map(address_map &map) // TODO: everything +{ + // 2x YM2203, 2xMSM5205 + map(0x8000, 0xffff).rom(); +} + void ddragon_state::dd2_sound_map(address_map &map) { map(0x0000, 0x7fff).rom(); @@ -1013,18 +1025,29 @@ void ddragon_state::ddragonba(machine_config &config) } +/* +3x EF68B09EP (main) +2x YM2203C (sound) +2x OKI M5202 (sound) +2x Y3014B (sound) +2x LM324N (sound) +1x TDA2003 (sound) +1x oscillator 20.000 near sound section +1x oscillator 24.575 (24.000 on another PCB) near main and sub CPU +1x orange resonator CSB445E (CSB500E on another PCB) +*/ void ddragon_state::ddragon6809(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, MAIN_CLOCK / 8); /* 1.5 MHz */ + MC6809E(config, m_maincpu, 24_MHz_XTAL / 16); // divisor not verified m_maincpu->set_addrmap(AS_PROGRAM, &ddragon_state::ddragon_map); TIMER(config, "scantimer").configure_scanline(FUNC(ddragon_state::ddragon_scanline), "screen", 0, 1); - MC6809E(config, m_subcpu, MAIN_CLOCK / 8); /* 1.5 Mhz */ - m_subcpu->set_addrmap(AS_PROGRAM, &ddragon_state::sub_6309_map); // wrong + MC6809E(config, m_subcpu, 24_MHz_XTAL / 16); // divisor not verified + m_subcpu->set_addrmap(AS_PROGRAM, &ddragon_state::sub_6809_map); - MC6809E(config, m_soundcpu, MAIN_CLOCK / 8); /* 1.5 MHz */ - m_soundcpu->set_addrmap(AS_PROGRAM, &ddragon_state::sound_map); + MC6809E(config, m_soundcpu, 20_MHz_XTAL / 12); // divisor not verified + m_soundcpu->set_addrmap(AS_PROGRAM, &ddragon_state::ddragon6809_sound_map); config.set_maximum_quantum(attotime::from_hz(60000)); /* heavy interleaving to sync up sprite<->main CPUs */ @@ -1048,17 +1071,18 @@ void ddragon_state::ddragon6809(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, M6809_IRQ_LINE); - ym2151_device &fmsnd(YM2151(config, "fmsnd", SOUND_CLOCK)); - fmsnd.irq_handler().set_inputline(m_soundcpu, M6809_FIRQ_LINE); - fmsnd.add_route(0, "mono", 0.60); - fmsnd.add_route(1, "mono", 0.60); + ym2203_device &ym1(YM2203(config, "ym1", 20_MHz_XTAL / 6)); // divisor not verified + ym1.add_route(ALL_OUTPUTS, "mono", 0.60); - MSM5205(config, m_adpcm[0], MAIN_CLOCK/32); + ym2203_device &ym2(YM2203(config, "ym2", 20_MHz_XTAL / 6)); // divisor not verified + ym2.add_route(ALL_OUTPUTS, "mono", 0.60); + + MSM5205(config, m_adpcm[0], 500_kHz_XTAL); m_adpcm[0]->vck_legacy_callback().set(FUNC(ddragon_state::dd_adpcm_int_1)); /* interrupt function */ m_adpcm[0]->set_prescaler_selector(msm5205_device::S48_4B); /* 8kHz */ m_adpcm[0]->add_route(ALL_OUTPUTS, "mono", 0.50); - MSM5205(config, m_adpcm[1], MAIN_CLOCK/32); + MSM5205(config, m_adpcm[1], 500_kHz_XTAL); m_adpcm[1]->vck_legacy_callback().set(FUNC(ddragon_state::dd_adpcm_int_2)); /* interrupt function */ m_adpcm[1]->set_prescaler_selector(msm5205_device::S48_4B); /* 8kHz */ m_adpcm[1]->add_route(ALL_OUTPUTS, "mono", 0.50); @@ -1544,8 +1568,8 @@ ROM_START( ddragon6809 ) ROM_LOAD( "6809_18.bin", 0x18000, 0x08000, CRC(154d50c4) SHA1(4ffdd29406b6c6b552344f820f83715b1c7727d1) ) /* banked at 0x4000-0x8000 */ ROM_LOAD( "6809_17.bin", 0x20000, 0x08000, CRC(6489d637) SHA1(fd17fd870e9386a3e3bdd56c8d731c73d8c70b88) ) /* banked at 0x4000-0x8000 */ - ROM_REGION( 0x10000, "sub", 0 ) /* sprite cpu */ - ROM_LOAD( "21.bin", 0x08000, 0x08000, CRC(4437fc51) SHA1(fffcf2bec50d0b79861904b4abc607206b7794e6) ) + ROM_REGION( 0x8000, "sub", 0 ) /* sprite cpu */ + ROM_LOAD( "21.bin", 0x00000, 0x08000, CRC(4437fc51) SHA1(fffcf2bec50d0b79861904b4abc607206b7794e6) ) ROM_REGION( 0x10000, "soundcpu", 0 ) /* audio cpu */ ROM_LOAD( "6809_16.bin", 0x08000, 0x08000, CRC(f4c72690) SHA1(c70d032355acf3f7f6586b6e57a94f80e099bf1a) ) @@ -1625,8 +1649,8 @@ ROM_START( ddragon6809a ) ROM_LOAD( "18.7h", 0x18000, 0x08000, CRC(154d50c4) SHA1(4ffdd29406b6c6b552344f820f83715b1c7727d1) ) /* banked at 0x4000-0x8000 */ ROM_LOAD( "17.7j", 0x20000, 0x08000, CRC(4052f37a) SHA1(9444a30ce32a2d35c601324d79c0ba602be4f288) ) /* banked at 0x4000-0x8000 */ - ROM_REGION( 0x10000, "sub", 0 ) /* sprite cpu */ - ROM_LOAD( "21.7d", 0x08000, 0x8000, CRC(4437fc51) SHA1(fffcf2bec50d0b79861904b4abc607206b7794e6) ) + ROM_REGION( 0x8000, "sub", 0 ) /* sprite cpu */ + ROM_LOAD( "21.7d", 0x00000, 0x8000, CRC(4437fc51) SHA1(fffcf2bec50d0b79861904b4abc607206b7794e6) ) ROM_REGION( 0x10000, "soundcpu", 0 ) /* audio cpu */ ROM_LOAD( "16.7n", 0x08000, 0x08000, CRC(f4c72690) SHA1(c70d032355acf3f7f6586b6e57a94f80e099bf1a) ) @@ -1639,7 +1663,7 @@ ROM_START( ddragon6809a ) ROM_REGION( 0x80000, "gfx2", 0 ) ROM_LOAD( "1.1t", 0x00000, 0x10000, CRC(5e810a6d) SHA1(5eba3e982b271bc284ca333429cd0b3759c9c8d1) ) - ROM_LOAD( "1.1r", 0x10000, 0x10000, CRC(7300b785) SHA1(6d3b72bd7208e2bd790517a753c9d5192c88d20f) ) + ROM_LOAD( "2.1r", 0x10000, 0x10000, CRC(7300b785) SHA1(6d3b72bd7208e2bd790517a753c9d5192c88d20f) ) ROM_LOAD( "3.1q", 0x20000, 0x10000, CRC(19405de8) SHA1(ac1aa40478b92af5ccdde89812be78b7c9f7d20d) ) ROM_LOAD( "4.1p", 0x30000, 0x10000, CRC(4b10defd) SHA1(fb43eba7c8a7f77f0fdd6253d51b40b0e64598f5) ) ROM_LOAD( "5.1n", 0x40000, 0x10000, CRC(5b1bb493) SHA1(dd947d7d381af5952acece4b2cefc9fc4847ec68) ) diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 117d0c4e1d4..98b0e720947 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -157,8 +157,10 @@ private: void ddragon_map(address_map &map); void ddragonba_sub_map(address_map &map); void sound_map(address_map &map); + void ddragon6809_sound_map(address_map &map); void sub_map(address_map &map); void sub_6309_map(address_map &map); + void sub_6809_map(address_map &map); }; -- cgit v1.2.3 From 0eccd6adc7929ab533cf7be13b5e7367d5b362c0 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 3 Jul 2020 20:31:16 +0200 Subject: netlist: Add log() to pfunction. --- src/lib/netlist/plib/pfunction.cpp | 3 +++ src/lib/netlist/plib/pfunction.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp index bc8f50434e2..f6096de6953 100644 --- a/src/lib/netlist/plib/pfunction.cpp +++ b/src/lib/netlist/plib/pfunction.cpp @@ -100,6 +100,8 @@ namespace plib { { rc.m_cmd = IF; stk -= 2; } else if (cmd == "pow") { rc.m_cmd = POW; stk -= 1; } + else if (cmd == "log") + { rc.m_cmd = LOG; stk -= 0; } else if (cmd == "sin") { rc.m_cmd = SIN; stk -= 0; } else if (cmd == "cos") @@ -350,6 +352,7 @@ namespace plib { OP(GE, 1, ST2 >= ST1 ? 1.0 : 0.0) OP(IF, 1, (ST3 != 0.0) ? ST2 : ST1) OP(POW, 1, plib::pow(ST2, ST1)) + OP(LOG, 0, plib::log(ST2)) OP(SIN, 0, plib::sin(ST2)) OP(COS, 0, plib::cos(ST2)) OP(MAX, 1, std::max(ST2, ST1)) diff --git a/src/lib/netlist/plib/pfunction.h b/src/lib/netlist/plib/pfunction.h index fe5a5dd1dc6..00206afe677 100644 --- a/src/lib/netlist/plib/pfunction.h +++ b/src/lib/netlist/plib/pfunction.h @@ -40,6 +40,7 @@ namespace plib { GE, IF, POW, + LOG, SIN, COS, MIN, -- cgit v1.2.3 From fa54fa1b658be057b5c04188a69bbecab06e5a67 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 3 Jul 2020 20:32:04 +0200 Subject: netlist: Add a parameter to varclock. --- src/lib/netlist/devices/nlid_system.h | 38 +++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h index 2fea9014e5b..42671caa5fc 100644 --- a/src/lib/netlist/devices/nlid_system.h +++ b/src/lib/netlist/devices/nlid_system.h @@ -88,14 +88,27 @@ namespace devices NETLIB_OBJECT(varclock) { NETLIB_CONSTRUCTOR(varclock) + , m_N(*this, "N", 1) + , m_func(*this,"FUNC", "T") , m_feedback(*this, "FB") , m_Q(*this, "Q") - , m_func(*this,"FUNC", "") , m_compiled(*this, "m_compiled") - , m_funcparam({nlconst::zero()}) + , m_supply(*this) { if (!m_func().empty()) - m_compiled->compile(m_func(), std::vector({{pstring("T")}})); + { + std::vector inps; + inps.push_back(pstring("T")); + m_vals.push_back(nlconst::zero()); + for (int i=0; i < m_N(); i++) + { + pstring inpname = plib::pfmt("A{1}")(i); + m_I.push_back(state().make_pool_object(*this, inpname)); + inps.push_back(inpname); + m_vals.push_back(nlconst::zero()); + } + m_compiled->compile(m_func(), inps); + } connect(m_feedback, m_Q); } //NETLIB_RESETI(); @@ -103,18 +116,27 @@ namespace devices NETLIB_UPDATEI() { - m_funcparam[0] = exec().time().as_fp(); - const netlist_time m_inc = netlist_time::from_fp(m_compiled->evaluate(m_funcparam)); + m_vals[0] = exec().time().as_fp(); + for (std::size_t i = 0; i < static_cast(m_N()); i++) + { + m_vals[i+1] = (*m_I[i])(); + } + const netlist_time m_inc = netlist_time::from_fp(m_compiled->evaluate(m_vals)); m_Q.push(m_feedback() ^ 1, m_inc); } private: + using pf_type = plib::pfunction; + param_int_t m_N; + param_str_t m_func; logic_input_t m_feedback; logic_output_t m_Q; + std::vector> m_I; - param_str_t m_func; - state_var> m_compiled; - std::vector m_funcparam; + pf_type::values_container m_vals; + state_var m_compiled; + + NETLIB_NAME(power_pins) m_supply; }; // ----------------------------------------------------------------------------- -- cgit v1.2.3 From 0718a20df23aa377663ce6e90d98b35ae33f1225 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 3 Jul 2020 02:24:13 -0700 Subject: netlist: Align design VARCLOCK to AFUNC. --- src/lib/netlist/devices/nld_system.cpp | 2 +- src/lib/netlist/devices/nld_system.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/netlist/devices/nld_system.cpp b/src/lib/netlist/devices/nld_system.cpp index 547581ec590..c987ef7065a 100644 --- a/src/lib/netlist/devices/nld_system.cpp +++ b/src/lib/netlist/devices/nld_system.cpp @@ -63,7 +63,7 @@ namespace devices NETLIB_DEVICE_IMPL(function, "AFUNC", "N,FUNC") NETLIB_DEVICE_IMPL(analog_input, "ANALOG_INPUT", "IN") NETLIB_DEVICE_IMPL(clock, "CLOCK", "FREQ") - NETLIB_DEVICE_IMPL(varclock, "VARCLOCK", "FUNC") + NETLIB_DEVICE_IMPL(varclock, "VARCLOCK", "N,FUNC") NETLIB_DEVICE_IMPL(extclock, "EXTCLOCK", "FREQ,PATTERN") NETLIB_DEVICE_IMPL(sys_dsw1, "SYS_DSW", "+I,+1,+2") NETLIB_DEVICE_IMPL(sys_dsw2, "SYS_DSW2", "") diff --git a/src/lib/netlist/devices/nld_system.h b/src/lib/netlist/devices/nld_system.h index aedf171afcd..36317a6b1b9 100644 --- a/src/lib/netlist/devices/nld_system.h +++ b/src/lib/netlist/devices/nld_system.h @@ -40,8 +40,9 @@ NET_REGISTER_DEV(CLOCK, name) \ PARAM(name.FREQ, freq) -#define VARCLOCK(name, func) \ +#define VARCLOCK(name, n, func) \ NET_REGISTER_DEV(VARCLOCK, name) \ + PARAM(name.N, n) \ PARAM(name.FUNC, func) #define EXTCLOCK(name, freq, pattern) \ -- cgit v1.2.3 From f6e93867452d78eca4ba42e4837f0a36d7822340 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 3 Jul 2020 20:36:25 +0200 Subject: netlist: add more constructors and () operator to pfunction. --- src/lib/netlist/plib/pfunction.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/lib/netlist/plib/pfunction.h b/src/lib/netlist/plib/pfunction.h index 00206afe677..6b5e94b2900 100644 --- a/src/lib/netlist/plib/pfunction.h +++ b/src/lib/netlist/plib/pfunction.h @@ -70,27 +70,45 @@ namespace plib { { } + /// \brief Constructor with compile + /// + pfunction(const pstring &expr, const inputs_container &inputs = inputs_container()) + : m_lfsr(0xace1U) // NOLINT + { + compile(expr, inputs); + } + + /// \brief Evaluate the expression + /// + /// \param values for input variables, e.g. {1.1, 2.2} + /// \return value of expression + /// + value_type operator()(const values_container &values = values_container()) noexcept + { + return evaluate(values); + } + /// \brief Compile an expression /// /// \param expr infix or postfix expression. default is infix, postrix /// to be prefixed with rpn, e.g. "rpn:A B + 1.3 /" /// \param inputs Vector of input variables, e.g. {"A","B"} /// - void compile(const pstring &expr, const inputs_container &inputs) noexcept(false); + void compile(const pstring &expr, const inputs_container &inputs = inputs_container()) noexcept(false); /// \brief Compile a rpn expression /// /// \param expr Reverse polish notation expression, e.g. "A B + 1.3 /" /// \param inputs Vector of input variables, e.g. {"A","B"} /// - void compile_postfix(const pstring &expr, const inputs_container &inputs) noexcept(false); + void compile_postfix(const pstring &expr, const inputs_container &inputs = inputs_container()) noexcept(false); /// \brief Compile an infix expression /// /// \param expr Infix expression, e.g. "(A+B)/1.3" /// \param inputs Vector of input variables, e.g. {"A","B"} /// - void compile_infix(const pstring &expr, const inputs_container &inputs) noexcept(false); + void compile_infix(const pstring &expr, const inputs_container &inputs = inputs_container()) noexcept(false); /// \brief Evaluate the expression /// -- cgit v1.2.3 From edd20eaf7015e351da312af5d5de52243c1bad8a Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 3 Jul 2020 20:32:44 +0100 Subject: Add Monkey King 3B SoC skeleton and RS-70 system (#6906) New machines marked as NOT_WORKING ---------------------------------- RS-70 648-in-1 [David Shah] -mk3b: Added a skeleton driver for the Monkey King 3B SoC. [David Shah] --- scripts/target/mame/mess.lua | 1 + src/mame/drivers/monkey_king_3b.cpp | 252 ++++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 3 + src/mame/mess.flt | 1 + 4 files changed, 257 insertions(+) create mode 100644 src/mame/drivers/monkey_king_3b.cpp diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index eed568b9681..14e43e370ff 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -4016,6 +4016,7 @@ files { MAME_DIR .. "src/mame/drivers/actions_atj2279b.cpp", MAME_DIR .. "src/mame/drivers/pubint_storyreader.cpp", MAME_DIR .. "src/mame/drivers/magiceyes_pollux_vr3520f.cpp", + MAME_DIR .. "src/mame/drivers/monkey_king_3b.cpp", } createMESSProjects(_target, _subtarget, "ultimachine") diff --git a/src/mame/drivers/monkey_king_3b.cpp b/src/mame/drivers/monkey_king_3b.cpp new file mode 100644 index 00000000000..52cefa6447e --- /dev/null +++ b/src/mame/drivers/monkey_king_3b.cpp @@ -0,0 +1,252 @@ +// license:BSD-3-Clause +// copyright-holders:David Shah + +/* + +Monkey King SoCs (currently only 3B is supported) + +Presumably-custom ARM-based system-on-chips by Digital Media Cartridge (DMC). +Intended to run NES and Genesis emulators, primarily for ATgames systems. + +Sometimes abbreviated MK. It is a successor of the Titan SoC used in previous +emulation based ATgames systems. + +Monkey King and Monkey 2: Presumed custom. Used in some ATgames/Blaze +Genesis systems and the Atari Flashback Portable. + +Monkey King 3 and Monkey King 3B: Presumed custom. Used in the ATgames +BLAST system and the RS-70 648-in-1 "PS1 form factor" clone. Supports +HDMI output. + +Monkey King 3.6: not a custom part but a rebranded RK3036, usually +running a cut-down Android based OS. Used in newer ATgames systems. + +The typical configuration of the Monkey King SoCs (other than the +3.6) is with 8/16MB of SDRAM, NOR flash for the firmware and +built-in games, and a SD card for additional games. + +The RS-70 is notable for having a debug UART on the USB port +(serial TX on D+, 115200). It prints the following messages on boot: + + EXEC: Executing 'boot' with 0 args (ZLib ON)... + EXEC: Loading 'boot' at 0x18000000... + EXEC: Loaded 372272 bytes of 2097152 available. + +This is different from the serial output that this emulation model +currently produces. Perhaps one of the unimplemented IO is causing +it to go into some kind of debug mode. The log output produced by +this machine is: + + Modes:0x00000000 + PUT: Setting joystick to mode 0x0, timer to 250us + + ****************************************************** + MK FIRMWARE INFORMATION + Mode: 0xB4 + Build Time: May 8 2019 14:09:21 + CPU Clock: 240MHz + TFS Start: 0x8070000 + Video Buf: 0x6000000 + Stack Top: 0x3001EE8 + IWRAM Size: 32kB + EVRAM Size: 16384kB + Heap Size: 6144kB at 0x18200000 + Video Mode: 0 + Video Size: 1280x720x16bpp + ****************************************************** + +There are other strings in the ROM that imply there may be more serial +debug possibilities. + +TODO: + implement everything + add dumps of more Monkey King systems +*/ + +#include "emu.h" +#include "cpu/arm7/arm7.h" +#include "cpu/arm7/arm7core.h" +#include "emupal.h" +#include "screen.h" + +class mk3b_soc_state : public driver_device +{ +public: + mk3b_soc_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_iram0(*this, "iram0"), + m_iram3(*this, "iram3"), + m_sdram(*this, "sdram"), + m_maincpu(*this, "maincpu"), + m_screen(*this, "screen") + { } + + void mk3b_soc(machine_config &config); + + void init_rs70(); + +private: + required_shared_ptr m_iram0, m_iram3; + required_shared_ptr m_sdram; + required_device m_maincpu; + required_device m_screen; + + virtual void machine_reset() override; + virtual void video_start() override; + uint32_t io4_r(offs_t offset, uint32_t mem_mask = ~0); + void io4_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + + uint32_t io7_r(offs_t offset, uint32_t mem_mask = ~0); + void io7_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + + uint32_t io10_r(offs_t offset, uint32_t mem_mask = ~0); + void io10_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + + uint32_t screen_update_mk3b_soc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void map(address_map &map); + std::string debug_buf; +}; + + +void mk3b_soc_state::map(address_map &map) +{ + // 64MB external NOR flash + map(0x08000000, 0x0BFFFFFF).rom().share("norflash").region("norflash", 0x0);; + // unknown amount and configuration of internal RAM + map(0x00000000, 0x0000FFFF).ram().share("iram0"); + // This section of RAM seems to contain the stack + map(0x03000000, 0x0300FFFF).ram().share("iram3"); + + // 16MB of external SDRAM + map(0x18000000, 0x18FFFFFF).ram().share("sdram"); + // IO is totally unknown for now + map(0x04000000, 0x0400FFFF).rw(FUNC(mk3b_soc_state::io4_r), FUNC(mk3b_soc_state::io4_w)); + map(0x07000000, 0x0700FFFF).rw(FUNC(mk3b_soc_state::io7_r), FUNC(mk3b_soc_state::io7_w)); + map(0x10000000, 0x1000FFFF).rw(FUNC(mk3b_soc_state::io10_r), FUNC(mk3b_soc_state::io10_w)); +} + +static INPUT_PORTS_START( mk3b_soc ) + +INPUT_PORTS_END + +void mk3b_soc_state::video_start() +{ +} + +void mk3b_soc_state::machine_reset() +{ + // In practice, this will probably be done by a small + // internal boot ROM. + m_iram0[0] = 0xe59f0000; // ldr r0, [pc] + m_iram0[1] = 0xe12fff10; // bx, r0 + m_iram0[2] = 0x08000000; // target address +} + +uint32_t mk3b_soc_state::screen_update_mk3b_soc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + return 0; +} + +void mk3b_soc_state::mk3b_soc(machine_config &config) +{ + // type unknown (should actually have VFP?) + // debug output suggests 240MHz clock + ARM920T(config, m_maincpu, 240000000); + m_maincpu->set_addrmap(AS_PROGRAM, &mk3b_soc_state::map); + + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(60); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); + m_screen->set_size(1280, 720); + m_screen->set_visarea(0, 1280-1, 0, 720-1); + m_screen->set_screen_update(FUNC(mk3b_soc_state::screen_update_mk3b_soc)); +} + +uint32_t mk3b_soc_state::io4_r(offs_t offset, uint32_t mem_mask) +{ + switch (offset) { + case 0x01: + return (m_screen->vblank() << 27) | m_screen->vblank(); // who knows? seems to need to toggle between 0 and 1 + default: + logerror("%s: IO 0x04 read 0x%04X\n", machine().describe_context(), offset); + return 0x00; + } +} + +void mk3b_soc_state::io4_w(offs_t offset, uint32_t data, uint32_t mem_mask) +{ + logerror("%s: IO 0x04 write 0x%04X 0x%08X & 0x%08X\n", machine().describe_context(), offset, data, mem_mask); +} + + +uint32_t mk3b_soc_state::io7_r(offs_t offset, uint32_t mem_mask) +{ + switch (offset) { + case 0x21: // video size + return (1280 << 16) | (720); + default: + logerror("%s: IO 0x07 read 0x%04X\n", machine().describe_context(), offset); + return 0x00; + } +} + +void mk3b_soc_state::io7_w(offs_t offset, uint32_t data, uint32_t mem_mask) +{ + logerror("%s: IO 0x07 write 0x%04X 0x%08X & 0x%08X\n", machine().describe_context(), offset, data, mem_mask); +} + +uint32_t mk3b_soc_state::io10_r(offs_t offset, uint32_t mem_mask) +{ + switch (offset) { + // Definitely not correct, but toggling somehow keeps things moving + case 0x148: + case 0x149: + return m_screen->vblank() ? 0x00000000 : 0xFFFFFFFF; + default: + logerror("%s: IO 0x10 read 0x%04X\n", machine().describe_context(), offset); + return 0x00; + } +} + +void mk3b_soc_state::io10_w(offs_t offset, uint32_t data, uint32_t mem_mask) +{ + switch (offset) { + case 0x148: { // debug UART + char c = data & 0xFF; + logerror("%s: UART W: %c\n", machine().describe_context(), c); + if (c == '\n') { + logerror("%s: [DEBUG] %s\n", machine().describe_context(), debug_buf.c_str()); + debug_buf.clear(); + } else if (c != '\r') { + debug_buf += c; + } + break; + } + default: + logerror("%s: IO 0x10 write 0x%04X 0x%08X & 0x%08X\n", machine().describe_context(), offset, data, mem_mask); + } +} + +void mk3b_soc_state::init_rs70() +{ + // Uppermost address bit seems to be inverted + uint8_t *ROM = memregion("norflash")->base(); + int size = memregion("norflash")->bytes(); + + for (int i = 0; i < (size / 2); i++) { + std::swap(ROM[i], ROM[i + (size / 2)]); + } + // FIXME: Work around missing FPU for now + ROM[0x32f24] = 0x00; + ROM[0x32f25] = 0x00; + ROM[0x32f26] = 0x00; + ROM[0x32f27] = 0x00; +} + + +ROM_START( rs70_648 ) + ROM_REGION(0x04000000, "norflash", 0) + ROM_LOAD("s29gl512p.bin", 0x000000, 0x04000000, CRC(cb452bd7) SHA1(0b19a13a3d0b829725c10d64d7ff852ff5202ed0) ) +ROM_END + +CONS( 2019, rs70_648, 0, 0, mk3b_soc, mk3b_soc, mk3b_soc_state, init_rs70, "", "RS-70 648-in-1", MACHINE_IS_SKELETON ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ec2117f1c81..bc784375bfb 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -23148,6 +23148,9 @@ momokoe // (c) 1986 Jaleco (English text) monacogp // (c) 1980 Sega monacogpa // (c) 1980 Sega +@source:monkey_king_3b.cpp +rs70_648 // + @source:monon_color.cpp mononcol // (c) 2011 M&D diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 3e624ecbc95..da396e31736 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -587,6 +587,7 @@ mmd2.cpp mod8.cpp modellot.cpp molecular.cpp +monkey_king_3b.cpp monon_color.cpp monty.cpp mpc3000.cpp -- cgit v1.2.3 From 9f4ef58eed886b3e2f8ba1c0c596d5a932d6e6f0 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 3 Jul 2020 21:42:08 +0200 Subject: devices/machine/6850acia.cpp, device/machine/upd4992.cpp, mame/video/jangou_blitter.cpp: fixed initializations issues that were causing problems in devnoclear debug builds (nw) --- src/devices/machine/6850acia.cpp | 3 ++- src/devices/machine/upd4992.cpp | 1 + src/devices/video/jangou_blitter.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/6850acia.cpp b/src/devices/machine/6850acia.cpp index 0a89b94d337..d428851ad8f 100644 --- a/src/devices/machine/6850acia.cpp +++ b/src/devices/machine/6850acia.cpp @@ -2,7 +2,7 @@ // copyright-holders:smf /********************************************************************* - 6850acia.c + 6850acia.cpp 6850 ACIA code @@ -92,6 +92,7 @@ acia6850_device::acia6850_device(const machine_config &mconfig, device_type type , m_irq(0) , m_txc(0) , m_txd(0) + , m_tx_state(0) , m_tx_counter(0) , m_tx_irq_enable(false) , m_rxc(0) diff --git a/src/devices/machine/upd4992.cpp b/src/devices/machine/upd4992.cpp index 5d28bb3037c..60a2eece92b 100644 --- a/src/devices/machine/upd4992.cpp +++ b/src/devices/machine/upd4992.cpp @@ -38,6 +38,7 @@ upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, d , device_rtc_interface(mconfig, *this) , m_timer_clock(nullptr) { + std::fill(std::begin(m_rtc_regs), std::end(m_rtc_regs), 0); } diff --git a/src/devices/video/jangou_blitter.cpp b/src/devices/video/jangou_blitter.cpp index a866d13777d..326bf98fc6a 100644 --- a/src/devices/video/jangou_blitter.cpp +++ b/src/devices/video/jangou_blitter.cpp @@ -94,6 +94,7 @@ void jangou_blitter_device::device_reset() { memset(m_pen_data, 0, ARRAY_LENGTH(m_pen_data)); m_bltflip = false; + m_src_addr = 0; } -- cgit v1.2.3 From ca5b662bd96d7eec74c1930dfea9eef6ac8dbf62 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 3 Jul 2020 21:58:18 +0200 Subject: devices/video/dp8350: initialized one variable which caused issues in debug devnoclear builds (nw) --- src/devices/video/dp8350.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/devices/video/dp8350.cpp b/src/devices/video/dp8350.cpp index bf77c913f89..22e918b3374 100644 --- a/src/devices/video/dp8350.cpp +++ b/src/devices/video/dp8350.cpp @@ -98,6 +98,7 @@ dp835x_device::dp835x_device(const machine_config &mconfig, device_type type, co , m_dots_per_line(char_width * chars_per_line) , m_dots_per_row(char_width * chars_per_row) , m_video_scan_lines(char_height * rows_per_frame) + , m_half_shift(false) , m_lrc_callback(*this) , m_clc_callback(*this) , m_lc_callback(*this) -- cgit v1.2.3 From 3582726d0016271116589ff01429b42d416110a3 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 3 Jul 2020 22:59:10 +0200 Subject: sothello: simplify maincpu-subcpu comms, game works again --- src/devices/cpu/m6809/base6x09.ops | 4 +- src/mame/drivers/gticlub.cpp | 2 +- src/mame/drivers/nwk-tr.cpp | 2 +- src/mame/drivers/sothello.cpp | 157 +++++++++++++++++-------------------- src/mame/drivers/zr107.cpp | 2 +- 5 files changed, 77 insertions(+), 90 deletions(-) diff --git a/src/devices/cpu/m6809/base6x09.ops b/src/devices/cpu/m6809/base6x09.ops index 2bad6eec6f8..d41df55ecef 100644 --- a/src/devices/cpu/m6809/base6x09.ops +++ b/src/devices/cpu/m6809/base6x09.ops @@ -82,7 +82,7 @@ ROR8: ASR8: @m_temp.b.l = read_operand(); - m_cc &= ~CC_NZC; + m_cc &= ~CC_C; m_cc |= (m_temp.b.l & 1) ? CC_C : 0; m_temp.b.l = set_flags(CC_NZ, ((int8_t) m_temp.b.l) >> 1); @eat(hd6309_native_mode() ? 0 : 1); @@ -168,7 +168,7 @@ ROR16: ASR16: @m_temp.b.h = read_operand(0); @m_temp.b.l = read_operand(1); - m_cc &= ~CC_NZC; + m_cc &= ~CC_C; m_cc |= (m_temp.w & 1) ? CC_C : 0; m_temp.w = set_flags(CC_NZ, ((int16_t) m_temp.w) >> 1); @eat(hd6309_native_mode() ? 0 : 1); diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp index 90514217c1e..d55a26e8a6d 100644 --- a/src/mame/drivers/gticlub.cpp +++ b/src/mame/drivers/gticlub.cpp @@ -461,7 +461,7 @@ void gticlub_state::sysreg_w(offs_t offset, uint8_t data) { case 0: case 1: - m_pcb_digit[offset] = bitswap<8>(~data,7,0,1,2,3,4,5,6) & 0x7f; + m_pcb_digit[offset] = bitswap<7>(~data,0,1,2,3,4,5,6); break; case 3: diff --git a/src/mame/drivers/nwk-tr.cpp b/src/mame/drivers/nwk-tr.cpp index 9270faf21a9..a0bcb11d334 100644 --- a/src/mame/drivers/nwk-tr.cpp +++ b/src/mame/drivers/nwk-tr.cpp @@ -458,7 +458,7 @@ void nwktr_state::sysreg_w(offs_t offset, uint8_t data) { case 0: case 1: - m_pcb_digit[offset] = bitswap<8>(~data,7,0,1,2,3,4,5,6) & 0x7f; + m_pcb_digit[offset] = bitswap<7>(~data,0,1,2,3,4,5,6); break; case 4: diff --git a/src/mame/drivers/sothello.cpp b/src/mame/drivers/sothello.cpp index 49b1837ad3d..20a4980831f 100644 --- a/src/mame/drivers/sothello.cpp +++ b/src/mame/drivers/sothello.cpp @@ -46,11 +46,13 @@ OSC : 8.0000MHz(X1) 21.477 MHz(X2) 384kHz(X3) #include "speaker.h" +namespace { + class sothello_state : public driver_device { public: - sothello_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + sothello_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), m_subcpu(*this, "subcpu"), @@ -66,18 +68,17 @@ protected: private: void bank_w(uint8_t data); - uint8_t subcpu_halt_set(); - uint8_t subcpu_halt_clear(); - uint8_t subcpu_comm_status(); + uint8_t subcpu_comm_clear_r(); + uint8_t subcpu_comm_nmi_r(); + uint8_t subcpu_comm_status_r(); uint8_t soundcpu_status_r(); void msm_data_w(uint8_t data); void soundcpu_busyflag_set_w(uint8_t data); void soundcpu_busyflag_reset_w(uint8_t data); void soundcpu_int_clear_w(uint8_t data); void subcpu_status_w(uint8_t data); - uint8_t subcpu_status_r(); void msm_cfg_w(uint8_t data); - DECLARE_WRITE_LINE_MEMBER(adpcm_int); + DECLARE_WRITE_LINE_MEMBER(adpcm_int_w); void maincpu_io_map(address_map &map); void maincpu_mem_map(address_map &map); @@ -89,10 +90,6 @@ private: int m_soundcpu_busy; int m_msm_data; - TIMER_CALLBACK_MEMBER(subcpu_suspend); - TIMER_CALLBACK_MEMBER(subcpu_resume); - void unlock_shared_ram(); - required_device m_maincpu; required_device m_soundcpu; required_device m_subcpu; @@ -100,14 +97,6 @@ private: required_memory_bank m_mainbank; }; - -#define VDP_MEM 0x40000 - - - - -/* main Z80 */ - void sothello_state::machine_start() { m_mainbank->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000); @@ -117,6 +106,21 @@ void sothello_state::machine_start() save_item(NAME(m_msm_data)); } +void sothello_state::machine_reset() +{ + m_subcpu_status = 0; + m_soundcpu_busy = 0; + m_msm_data = 0; +} + + + +/****************************************************************************** + I/O & Address Maps +******************************************************************************/ + +// main Z80 + void sothello_state::bank_w(uint8_t data) { int bank=0; @@ -130,33 +134,21 @@ void sothello_state::bank_w(uint8_t data) m_mainbank->set_entry(bank); } -TIMER_CALLBACK_MEMBER(sothello_state::subcpu_suspend) -{ - m_subcpu->suspend(SUSPEND_REASON_HALT, 1); -} - -TIMER_CALLBACK_MEMBER(sothello_state::subcpu_resume) +uint8_t sothello_state::subcpu_comm_clear_r() { - m_subcpu->resume(SUSPEND_REASON_HALT); - m_subcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); -} - -uint8_t sothello_state::subcpu_halt_set() -{ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(sothello_state::subcpu_suspend), this)); - m_subcpu_status|=2; + if(!machine().side_effects_disabled()) + m_subcpu_status = 0; return 0; } -uint8_t sothello_state::subcpu_halt_clear() +uint8_t sothello_state::subcpu_comm_nmi_r() { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(sothello_state::subcpu_resume), this)); - m_subcpu_status&=~1; - m_subcpu_status&=~2; + if(!machine().side_effects_disabled()) + m_subcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); return 0; } -uint8_t sothello_state::subcpu_comm_status() +uint8_t sothello_state::subcpu_comm_status_r() { return m_subcpu_status; } @@ -180,19 +172,26 @@ void sothello_state::maincpu_io_map(address_map &map) map(0x00, 0x0f).portr("INPUT1"); map(0x10, 0x1f).portr("INPUT2"); map(0x20, 0x2f).portr("SYSTEM"); - map(0x30, 0x30).r(FUNC(sothello_state::subcpu_halt_set)); - map(0x31, 0x31).r(FUNC(sothello_state::subcpu_halt_clear)); - map(0x32, 0x32).r(FUNC(sothello_state::subcpu_comm_status)); + map(0x30, 0x30).r(FUNC(sothello_state::subcpu_comm_clear_r)); + map(0x31, 0x31).r(FUNC(sothello_state::subcpu_comm_nmi_r)); + map(0x32, 0x32).r(FUNC(sothello_state::subcpu_comm_status_r)); map(0x33, 0x33).r(FUNC(sothello_state::soundcpu_status_r)); map(0x40, 0x4f).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0x50, 0x50).w(FUNC(sothello_state::bank_w)); - map(0x60, 0x61).mirror(0x02).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); - // not sure, but the A1 line is ignored, code @ $8b8 + map(0x60, 0x61).mirror(0x02).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); // not sure, but the A1 line is ignored, code @ $8b8 map(0x70, 0x73).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); } + // sound Z80 +WRITE_LINE_MEMBER(sothello_state::adpcm_int_w) +{ + // only 4 bits are used + m_msm->data_w(m_msm_data & 0x0f); + m_soundcpu->set_input_line(0, ASSERT_LINE); +} + void sothello_state::msm_cfg_w(uint8_t data) { /* @@ -201,7 +200,7 @@ void sothello_state::msm_cfg_w(uint8_t data) bit 2 = S2 1 bit 3 = S1 2 */ - m_msm->playmode_w(bitswap<8>((data>>1), 7,6,5,4,3,0,1,2)); + m_msm->playmode_w(bitswap<3>(data,1,2,3)); m_msm->reset_w(data & 1); } @@ -242,39 +241,28 @@ void sothello_state::soundcpu_io_map(address_map &map) map(0x05, 0x05).w(FUNC(sothello_state::soundcpu_int_clear_w)); } -// sub 6809 -void sothello_state::unlock_shared_ram() -{ - if(!m_subcpu->suspended(SUSPEND_REASON_HALT)) - { - m_subcpu_status|=1; - } - else - { - //logerror("%s Sub cpu active!\n",machine().describe_context()); - } -} +// sub 6809 void sothello_state::subcpu_status_w(uint8_t data) { - unlock_shared_ram(); -} - -uint8_t sothello_state::subcpu_status_r() -{ - unlock_shared_ram(); - return 0; + m_subcpu_status = 3; } void sothello_state::subcpu_mem_map(address_map &map) { - map(0x0000, 0x1fff).rw(FUNC(sothello_state::subcpu_status_r), FUNC(sothello_state::subcpu_status_w)); + map(0x0000, 0x0000).w(FUNC(sothello_state::subcpu_status_w)).nopr(); map(0x2000, 0x77ff).ram(); - map(0x7800, 0x7fff).ram().share("mainsub"); // upper 0x800 of 6264 is shared with main cpu + map(0x7800, 0x7fff).ram().share("mainsub"); // upper 0x800 of 6264 is shared with main cpu map(0x8000, 0xffff).rom().region("subcpu", 0); } + + +/****************************************************************************** + Input Ports +******************************************************************************/ + static INPUT_PORTS_START( sothello ) PORT_START("INPUT1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) @@ -341,19 +329,10 @@ static INPUT_PORTS_START( sothello ) INPUT_PORTS_END -WRITE_LINE_MEMBER(sothello_state::adpcm_int) -{ - // only 4 bits are used - m_msm->data_w(m_msm_data & 0x0f); - m_soundcpu->set_input_line(0, ASSERT_LINE); -} -void sothello_state::machine_reset() -{ - m_subcpu_status = 0; - m_soundcpu_busy = 0; - m_msm_data = 0; -} +/****************************************************************************** + Machine Configs +******************************************************************************/ void sothello_state::sothello(machine_config &config) { @@ -369,12 +348,12 @@ void sothello_state::sothello(machine_config &config) MC6809(config, m_subcpu, XTAL(8'000'000)); // divided by 4 internally m_subcpu->set_addrmap(AS_PROGRAM, &sothello_state::subcpu_mem_map); - config.set_maximum_quantum(attotime::from_hz(600)); + config.set_perfect_quantum(m_maincpu); // video hardware v9938_device &v9938(V9938(config, "v9938", XTAL(21'477'272))); v9938.set_screen_ntsc("screen"); - v9938.set_vram_size(VDP_MEM); + v9938.set_vram_size(0x40000); v9938.int_cb().set_inputline("maincpu", 0); SCREEN(config, "screen", SCREEN_TYPE_RASTER); @@ -393,16 +372,16 @@ void sothello_state::sothello(machine_config &config) ymsnd.add_route(3, "mono", 0.50); MSM5205(config, m_msm, XTAL(384'000)); - m_msm->vck_legacy_callback().set(FUNC(sothello_state::adpcm_int)); // interrupt function - m_msm->set_prescaler_selector(msm5205_device::S48_4B); // changed on the fly + m_msm->vck_legacy_callback().set(FUNC(sothello_state::adpcm_int_w)); // interrupt function + m_msm->set_prescaler_selector(msm5205_device::S48_4B); // changed on the fly m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); } -/*************************************************************************** - Game driver(s) -***************************************************************************/ +/****************************************************************************** + ROM Definitions +******************************************************************************/ ROM_START( sothello ) ROM_REGION( 0x18000, "maincpu", 0 ) @@ -418,4 +397,12 @@ ROM_START( sothello ) ROM_LOAD( "6.7f", 0x0000, 0x8000, CRC(ee80fc78) SHA1(9a9d7925847d7a36930f0761c70f67a9affc5e7c) ) ROM_END -GAME( 1986, sothello, 0, sothello, sothello, sothello_state, empty_init, ROT0, "Success / Fujiwara", "Super Othello", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // long time regression, see MT06033 +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +GAME( 1986, sothello, 0, sothello, sothello, sothello_state, empty_init, ROT0, "Success / Fujiwara", "Super Othello", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/zr107.cpp b/src/mame/drivers/zr107.cpp index df3a81a72b4..aeeaacf4d81 100644 --- a/src/mame/drivers/zr107.cpp +++ b/src/mame/drivers/zr107.cpp @@ -392,7 +392,7 @@ void zr107_state::sysreg_w(offs_t offset, uint8_t data) { case 0: /* 7seg LEDs on PCB */ case 1: - m_pcb_digit[offset] = bitswap<8>(~data,7,0,1,2,3,4,5,6) & 0x7f; + m_pcb_digit[offset] = bitswap<7>(~data,0,1,2,3,4,5,6); break; case 2: /* Parallel data register */ -- cgit v1.2.3 From 57c8f2ea82e583fe15085e3c172da648563f4401 Mon Sep 17 00:00:00 2001 From: Ted Green Date: Fri, 3 Jul 2020 20:09:54 -0600 Subject: Fix visual build. Change return value to same type as expected. --- src/mame/drivers/s11.cpp | 2 +- src/mame/drivers/s3.cpp | 2 +- src/mame/drivers/s4.cpp | 2 +- src/mame/drivers/s6.cpp | 2 +- src/mame/drivers/s6a.cpp | 2 +- src/mame/drivers/s7.cpp | 2 +- src/mame/drivers/s8.cpp | 2 +- src/mame/drivers/s8a.cpp | 2 +- src/mame/drivers/s9.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mame/drivers/s11.cpp b/src/mame/drivers/s11.cpp index e30a0f2b20b..9b8a51abad3 100644 --- a/src/mame/drivers/s11.cpp +++ b/src/mame/drivers/s11.cpp @@ -291,7 +291,7 @@ void s11_state::pia2c_pb_w(uint8_t data) uint8_t s11_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s3.cpp b/src/mame/drivers/s3.cpp index 92a58d4538d..c2f3b4c39d7 100644 --- a/src/mame/drivers/s3.cpp +++ b/src/mame/drivers/s3.cpp @@ -411,7 +411,7 @@ void s3_state::dig1_w(uint8_t data) uint8_t s3_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s4.cpp b/src/mame/drivers/s4.cpp index acc8b3441cd..699d0fecb27 100644 --- a/src/mame/drivers/s4.cpp +++ b/src/mame/drivers/s4.cpp @@ -406,7 +406,7 @@ void s4_state::dig1_w(uint8_t data) uint8_t s4_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s6.cpp b/src/mame/drivers/s6.cpp index a6a18523393..7a55a8bee15 100644 --- a/src/mame/drivers/s6.cpp +++ b/src/mame/drivers/s6.cpp @@ -345,7 +345,7 @@ void s6_state::dig1_w(uint8_t data) uint8_t s6_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s6a.cpp b/src/mame/drivers/s6a.cpp index b7d128f0633..35a4ebecd29 100644 --- a/src/mame/drivers/s6a.cpp +++ b/src/mame/drivers/s6a.cpp @@ -328,7 +328,7 @@ void s6a_state::dig1_w(uint8_t data) uint8_t s6a_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s7.cpp b/src/mame/drivers/s7.cpp index 8e737b7d501..306258bc279 100644 --- a/src/mame/drivers/s7.cpp +++ b/src/mame/drivers/s7.cpp @@ -349,7 +349,7 @@ uint8_t s7_state::dips_r() uint8_t s7_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s8.cpp b/src/mame/drivers/s8.cpp index 562cd21c8c8..805c608c5c8 100644 --- a/src/mame/drivers/s8.cpp +++ b/src/mame/drivers/s8.cpp @@ -253,7 +253,7 @@ void s8_state::dig1_w(uint8_t data) uint8_t s8_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s8a.cpp b/src/mame/drivers/s8a.cpp index 9dc1bb2e969..89e691a1dae 100644 --- a/src/mame/drivers/s8a.cpp +++ b/src/mame/drivers/s8a.cpp @@ -225,7 +225,7 @@ void s8a_state::dig1_w(uint8_t data) uint8_t s8a_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { diff --git a/src/mame/drivers/s9.cpp b/src/mame/drivers/s9.cpp index 697cbf27288..b9a1801b84d 100644 --- a/src/mame/drivers/s9.cpp +++ b/src/mame/drivers/s9.cpp @@ -259,7 +259,7 @@ void s9_state::dig1_w(uint8_t data) uint8_t s9_state::switch_r() { - char retval = 0xff; + uint8_t retval = 0xff; // scan all 8 input columns, since multiple can be selected at once for (int i = 0; i < 7; i++) { -- cgit v1.2.3 From 19dfc7e9786e011cf28eefe4517307e903f515ef Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 4 Jul 2020 08:11:33 +0200 Subject: devices/machine/saa1043, mame/video/k057714: fixed some initialization problems noticed in debug devnoclear builds --- src/devices/machine/saa1043.cpp | 1 + src/mame/video/k057714.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/devices/machine/saa1043.cpp b/src/devices/machine/saa1043.cpp index 7e480ddcf4b..c6766cf5b7e 100644 --- a/src/devices/machine/saa1043.cpp +++ b/src/devices/machine/saa1043.cpp @@ -22,6 +22,7 @@ DEFINE_DEVICE_TYPE(SAA1043, saa1043_device, "saa1043", "Philips SAA1043") saa1043_device::saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SAA1043, tag, owner, clock) , m_outputs(*this) + , m_type(PAL) { std::fill(std::begin(m_outputs_hooked), std::end(m_outputs_hooked), false); } diff --git a/src/mame/video/k057714.cpp b/src/mame/video/k057714.cpp index 4771c5898cf..6e336987041 100644 --- a/src/mame/video/k057714.cpp +++ b/src/mame/video/k057714.cpp @@ -40,6 +40,8 @@ void k057714_device::device_reset() m_fb_origin_x = 0; m_fb_origin_y = 0; + m_reg_6c = 0; + for (auto & elem : m_frame) { elem.base = 0; -- cgit v1.2.3 From edab7d1a40941edc9f242ce5ca6f95baeda81ad6 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 3 Jul 2020 23:09:36 +0200 Subject: netlist: add progress indicator to nltool. When running a netlist "--progress" may be used to display a progress indicator. --- src/lib/netlist/plib/pstream.h | 1 + src/lib/netlist/prg/nltool.cpp | 44 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h index 9333681b007..96da8b91c1f 100644 --- a/src/lib/netlist/plib/pstream.h +++ b/src/lib/netlist/plib/pstream.h @@ -161,6 +161,7 @@ public: write(t); } + void flush() { m_strm->flush(); } private: std::ostream *m_strm; }; diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index c1ce206bbf6..e177b1e0429 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -31,6 +31,10 @@ extern const plib::dynlib_static_sym nl_static_solver_syms[]; +// Forward declarations + +class netlist_tool_t; + class tool_app_t : public plib::app { public: @@ -47,6 +51,7 @@ public: opt_verb(*this, "v", "verbose", "be verbose - this produces lots of output"), opt_quiet(*this, "q", "quiet", "be quiet - no warnings"), opt_prepro(*this, "", "prepro", "output preprocessor output to stderr"), + opt_progress(*this, "", "progress", "show progress bar on longer operations"), opt_files(*this, "files to process"), @@ -118,6 +123,7 @@ private: plib::option_bool opt_verb; plib::option_bool opt_quiet; plib::option_bool opt_prepro; + plib::option_bool opt_progress; plib::option_args opt_files; plib::option_bool opt_version; plib::option_bool opt_help; @@ -163,6 +169,8 @@ private: using compile_map = std::map; + void run_with_progress(netlist_tool_t &nt, netlist::netlist_time_ext nlstart, netlist::netlist_time_ext ttr); + void run(); void validate(); void convert(); @@ -404,6 +412,36 @@ static std::vector read_input(const netlist::setup_t &setup, const pstr return ret; } +void tool_app_t::run_with_progress(netlist_tool_t &nt, netlist::netlist_time_ext nlstart, netlist::netlist_time_ext ttr) +{ + if (!opt_progress()) + nt.exec().process_queue(ttr); + else + { + auto now = nt.exec().time(); + auto end = now + ttr; + // run to next_sec + while (now < end) + { + auto elapsed = now - nlstart; + auto elapsed_sec = elapsed.in_sec() + 1; + + auto next_sec = nlstart + netlist::netlist_time_ext::from_sec(elapsed_sec); + if (end < next_sec) + { + nt.exec().process_queue(end - now); + } + else + { + nt.exec().process_queue(next_sec - now); + pout("progress {1:4}s : {2}\r", elapsed_sec, pstring(elapsed_sec, '*')); + pout.flush(); + } + now = nt.exec().time(); + } + } +} + void tool_app_t::run() { plib::chrono::timer t; @@ -470,14 +508,14 @@ void tool_app_t::run() && inps[pos].m_time < ttr && inps[pos].m_time >= nlt) { - nt.exec().process_queue(inps[pos].m_time - nlt); + run_with_progress(nt, nlstart, inps[pos].m_time - nlt); inps[pos].setparam(); nlt = inps[pos].m_time; pos++; } if (ttr > nlt) - nt.exec().process_queue(ttr - nlt); + run_with_progress(nt, nlstart, ttr - nlt); else { pout("end time {1:.6f} less than saved time {2:.6f}\n", @@ -499,6 +537,8 @@ void tool_app_t::run() } nt.exec().stop(); + if (opt_progress()) + pout("\n"); auto emutime(t.as_seconds()); pout("{1:f} seconds emulation took {2:f} real time ==> {3:5.2f}%\n", (ttr - nlstart).as_fp(), emutime, -- cgit v1.2.3 From bdc1bb4778aaa4cbf75d6bfc7340859a9858590c Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 4 Jul 2020 09:28:49 +0200 Subject: netlist: fix pfunction if The if postfix evaluation corrupted the stack. --- src/lib/netlist/plib/pfunction.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp index f6096de6953..f977059ff69 100644 --- a/src/lib/netlist/plib/pfunction.cpp +++ b/src/lib/netlist/plib/pfunction.cpp @@ -295,6 +295,8 @@ namespace plib { postfix.push_back(opstk.top()); opstk.pop(); } + //for (auto &e : postfix) + // printf("\t %s\n", e.c_str()); compile_postfix(inputs, postfix, expr); } @@ -320,9 +322,9 @@ namespace plib { return narrow_cast(lfsr); } + #define ST0 stack[ptr+1] #define ST1 stack[ptr] #define ST2 stack[ptr-1] - #define ST3 stack[ptr-2] #define OP(OP, ADJ, EXPR) \ case OP: \ @@ -350,7 +352,7 @@ namespace plib { OP(LT, 1, ST2 < ST1 ? 1.0 : 0.0) OP(LE, 1, ST2 <= ST1 ? 1.0 : 0.0) OP(GE, 1, ST2 >= ST1 ? 1.0 : 0.0) - OP(IF, 1, (ST3 != 0.0) ? ST2 : ST1) + OP(IF, 2, (ST2 != 0.0) ? ST1 : ST0) OP(POW, 1, plib::pow(ST2, ST1)) OP(LOG, 0, plib::log(ST2)) OP(SIN, 0, plib::sin(ST2)) -- cgit v1.2.3 From 207fd27e8cf8030176b08f5f5e56e747284c3f2f Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 4 Jul 2020 10:22:01 +0200 Subject: netlist: Fix polarity of 74LS125 tristate input. --- src/lib/netlist/devices/nld_74125.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/netlist/devices/nld_74125.cpp b/src/lib/netlist/devices/nld_74125.cpp index d2c873a0e17..28118f8248e 100644 --- a/src/lib/netlist/devices/nld_74125.cpp +++ b/src/lib/netlist/devices/nld_74125.cpp @@ -37,7 +37,7 @@ namespace netlist NETLIB_CONSTRUCTOR(74125_base) , m_TE(*this, "FORCE_TRISTATE_LOGIC", 0) , m_A(*this, "A", NETLIB_DELEGATE(A)) - , m_G(*this, pstring(D::invert_g::value ? "GQ" : "G"), NETLIB_DELEGATE(G)) + , m_G(*this, pstring(D::invert_g::value ? "G" : "GQ"), NETLIB_DELEGATE(G)) , m_Y(*this, "Y", m_TE()) //, m_Y(*this, "Y") , m_power_pins(*this) @@ -78,7 +78,7 @@ namespace netlist struct desc_74125 : public desc_base { - using invert_g = desc_const<1>; + using invert_g = desc_const<0>; using ts_off_on = time_ns<11>; using ts_on_off = time_ns<13>; using sig_off_on = time_ns<8>; @@ -87,7 +87,7 @@ namespace netlist struct desc_74126 : public desc_74125 { - using invert_g = desc_const<0>; + using invert_g = desc_const<1>; }; using NETLIB_NAME(74125) = NETLIB_NAME(74125_base); -- cgit v1.2.3 From e2b6f6edb0fdce6f7274609ccaa9ff7f90ac3ce3 Mon Sep 17 00:00:00 2001 From: 68bit Date: Sat, 4 Jul 2020 21:28:03 +1000 Subject: mdos dsk: fix the cells size and gaps, make clear its Motorola MDOS --- src/lib/formats/mdos_dsk.cpp | 44 +++++++++++++++++++++++++++++++++++++++----- src/lib/formats/mdos_dsk.h | 2 +- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/lib/formats/mdos_dsk.cpp b/src/lib/formats/mdos_dsk.cpp index 0344392e409..fc80d6b5bd9 100644 --- a/src/lib/formats/mdos_dsk.cpp +++ b/src/lib/formats/mdos_dsk.cpp @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders: 68bit /* - * mdos_dsk.c - MDOS compatible disk images + * mdos_dsk.c - Motorola MDOS compatible disk images * * The format is largely IBM 3740 compatible, with 77 tracks, and 26 sectors * per track, and a sector size of 128 bytes. Single sided disks were initially @@ -10,6 +10,40 @@ * second side continue from the first side rather than starting again at * one. * + * The disk drives run at 360rpm, and the bit clock frequency at 500kHz. This + * gives 6 revs per second, and 500000 / 6 = 83333 cells per track. MAME uses + * disk rotation position units of 1/200000000 of a turn and the cells size in + * this unit is 200000000 / (500000 / 6) = 2400. + * + * The M68SFDC2 user guide details the format gaps. "The Post-Index Gap is + * defined as the 32 bytes between Index Address Mark and the ID Address Mark + * for sector 1 (excluding the address mark bytes). This gap is always 32 bytes + * in length and is not affect by any up-dating process. The ID Gap consists of + * 17 bytes between the ID Field and the Data Field. This gap may vary in size + * slightly after the Data Field has been updated. The Data Gap consists of 33 + * bytes between the Data Field and the next ID File. This gap may also vary + * slightly after the Data Field has been updated. The Pre-Index Gap is a space + * of 320 bytes between the last data field on the track and the Index Address + * Mark. This gap may also vary in length." + * + * These gaps do appear to include the leading zero bytes before the sync + * marks, in contrast to the gaps defined in the formats below so corrections + * have been applied. The trailing gap has been checked and it close to the 320 + * bytes expected. + * + * The MDOS 3.05 FORMAT command with (the current emulator timing) varies from + * the above slightly. An index marker has been added, 106 bytes after the + * start of the track - a 100 byte gap and then 6 bytes of zeros and an index + * marker 0xf77a. This index marker does not appear to be used. The post-index + * marker gap is 30 bytes between the index marker and the address marker - a + * gap of 24 bytes and then 6 bytes of zeros and then the address marker + * 0xf57e. The ID Gap consist of roughly 18 bytes between the ID Field and the + * Data file - 12 bytes gap and 6 bytes of zero, and then the data marker + * 0xf565. The Data Gap consists of 33 bytes - a gap of 27 bytes and 6 bytes of + * zeros and then the address marker 0xf57e. The Pre-Index gap is a space of + * 209 bytes, but this now extends to the start of the track to the index + * marker. + * * TODO The MDOS 3 FORMAT command writes a zero in the address mark 'head' * field irrespective of the disk head and the software ignores this field when * read. @@ -30,7 +64,7 @@ const char *mdos_format::name() const const char *mdos_format::description() const { - return "MDOS compatible disk image"; + return "Motorola MDOS compatible disk image"; } const char *mdos_format::extensions() const @@ -228,11 +262,11 @@ const wd177x_format::format &mdos_format::get_track_format(const format &f, int const mdos_format::format mdos_format::formats[] = { { // 55 250.25K 8 inch single sided single density floppy_image::FF_8, floppy_image::SSSD, floppy_image::FM, - 2000, 26, 77, 1, 128, {}, 1, {}, 32, 17, 33 + 2400, 26, 77, 1, 128, {}, 1, {}, 32-6, 17-6, 33-6 }, { // 57 500.5K 8 inch double sided single density floppy_image::FF_8, floppy_image::DSSD, floppy_image::FM, - 2000, 26, 77, 2, 128, {}, 1, {}, 32, 17, 33 + 2400, 26, 77, 2, 128, {}, 1, {}, 32-6, 17-6, 33-6 }, {} }; @@ -242,7 +276,7 @@ const mdos_format::format mdos_format::formats_head1[] = { }, { // 57 500.5K 8 inch double sided single density floppy_image::FF_8, floppy_image::DSSD, floppy_image::FM, - 2000, 26, 77, 2, 128, {}, 27, {}, 32, 17, 33 + 2400, 26, 77, 2, 128, {}, 27, {}, 32-6, 17-6, 33-6 }, {} }; diff --git a/src/lib/formats/mdos_dsk.h b/src/lib/formats/mdos_dsk.h index 10a4fcd2809..744c9b97ed2 100644 --- a/src/lib/formats/mdos_dsk.h +++ b/src/lib/formats/mdos_dsk.h @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:68bit /* - * mdos_dsk.h + * mdos_dsk.h - Motorola MDOS compatible disk images */ #ifndef MAME_FORMATS_MDOS_DSK_H #define MAME_FORMATS_MDOS_DSK_H -- cgit v1.2.3 From 5469e30f3c19e41cfef1e2021236e0203521aefa Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 4 Jul 2020 13:44:14 +0200 Subject: devices/cpu/h8/h8dma, devices/machine/generalplus_gpl16250soc, devices/machine/spg110_video: initialize some variables which were causing malfunctions in debug devnoclear builds (nw) --- src/devices/cpu/h8/h8_dma.cpp | 1 + src/devices/machine/generalplus_gpl16250soc.h | 1 + src/devices/machine/spg110_video.cpp | 3 +++ 3 files changed, 5 insertions(+) diff --git a/src/devices/cpu/h8/h8_dma.cpp b/src/devices/cpu/h8/h8_dma.cpp index c295b77f330..7687de7a68d 100644 --- a/src/devices/cpu/h8/h8_dma.cpp +++ b/src/devices/cpu/h8/h8_dma.cpp @@ -154,6 +154,7 @@ void h8_dma_channel_device::device_reset() mar[0] = mar[1] = 0; ioar[0] = ioar[1] = 0; etcr[0] = etcr[1] = 0; + dtcr[0] = dtcr[1] = 0; fae = sae = false; dta = dte = dtie = 0; } diff --git a/src/devices/machine/generalplus_gpl16250soc.h b/src/devices/machine/generalplus_gpl16250soc.h index 93c097e2d82..8df8e780f78 100644 --- a/src/devices/machine/generalplus_gpl16250soc.h +++ b/src/devices/machine/generalplus_gpl16250soc.h @@ -45,6 +45,7 @@ public: m_portd_out(*this), m_nand_read_cb(*this), m_csbase(0x20000), + m_cs_space(nullptr), m_romtype(0), m_space_read_cb(*this), m_space_write_cb(*this), diff --git a/src/devices/machine/spg110_video.cpp b/src/devices/machine/spg110_video.cpp index 93ad10ae0c0..a76fef3bb60 100644 --- a/src/devices/machine/spg110_video.cpp +++ b/src/devices/machine/spg110_video.cpp @@ -564,6 +564,9 @@ void spg110_video_device::device_reset() m_bg_scrolly = 0; m_2036_scroll = 0; + std::fill(std::begin(tmap0_regs), std::end(tmap0_regs), 0); + std::fill(std::begin(tmap1_regs), std::end(tmap1_regs), 0); + // is there actually an enable register here? m_video_irq_enable = 0xffff; m_video_irq_status = 0x0000; -- cgit v1.2.3 From 98b7a3a646400089ed7bbcec0eed3708563192f5 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 4 Jul 2020 14:07:22 +0200 Subject: taito_l: remove old debug logging, fix fhawk rombank mask --- src/mame/drivers/taito_l.cpp | 81 ++++++++++---------------------------------- src/mame/includes/taito_l.h | 14 +++----- 2 files changed, 22 insertions(+), 73 deletions(-) diff --git a/src/mame/drivers/taito_l.cpp b/src/mame/drivers/taito_l.cpp index b91ac388579..37bd3a4f1b9 100644 --- a/src/mame/drivers/taito_l.cpp +++ b/src/mame/drivers/taito_l.cpp @@ -77,7 +77,6 @@ puzznici note void taitol_state::state_register() { save_item(NAME(m_last_irq_level)); - save_item(NAME(m_main_high)); } void taitol_2cpu_state::state_register() @@ -94,7 +93,6 @@ void fhawk_state::state_register() taitol_2cpu_state::state_register(); save_item(NAME(m_slave_rombank)); - save_item(NAME(m_slave_high)); } void champwr_state::state_register() @@ -119,7 +117,6 @@ MACHINE_START_MEMBER(taitol_state, taito_l) void taitol_state::taito_machine_reset() { m_last_irq_level = 0; - m_main_high = 0; } void taitol_2cpu_state::taito_machine_reset() @@ -134,7 +131,6 @@ void fhawk_state::taito_machine_reset() m_slave_rombank = 0; m_slave_bnk->set_entry(m_slave_rombank); - m_slave_high = 0; m_audio_bnk->set_entry(1); } @@ -202,38 +198,10 @@ void taitol_state::irq_enable_w(u8 data) } -void taitol_state::rombankswitch_w(u8 data) -{ - if (m_vdp->rom_bank_r() != data) - { - if (data > m_main_high) - { - m_main_high = data; - logerror("New rom size : %x\n", (m_main_high + 1) * 0x2000); - } - - //logerror("robs %d, %02x (%04x)\n", offset, data, m_main_cpu->pc()); - m_vdp->rom_bank_w(data); - } -} - void fhawk_state::slave_rombank_w(u8 data) { - data &= 0xf; - - if (m_slave_rombank != data) - { - if (data > m_slave_high) - { - m_slave_high = data; - logerror("New rom2 size : %x\n", (m_slave_high + 1) * 0x4000); - } - - //logerror("robs2 %02x (%04x)\n", data, m_main_cpu->pc()); - - m_slave_rombank = data; - m_slave_bnk->set_entry(m_slave_rombank); - } + m_slave_rombank = data & 0xf; + m_slave_bnk->set_entry(m_slave_rombank); } u8 fhawk_state::slave_rombank_r() @@ -313,10 +281,10 @@ void taitol_state::common_banks_map(address_map &map) { map(0x0000, 0xfdff).m(m_vdp, FUNC(tc0090lvc_device::cpu_map)); map(0xfe00, 0xfeff).rw(m_vdp, FUNC(tc0090lvc_device::vregs_r), FUNC(tc0090lvc_device::vregs_w)); - map(0xff00, 0xff02).rw(m_vdp, FUNC(tc0090lvc_device::irq_vector_r), FUNC(tc0090lvc_device::irq_vector_w)); - map(0xff03, 0xff03).r(m_vdp, FUNC(tc0090lvc_device::irq_enable_r)).w(FUNC(taitol_state::irq_enable_w)); - map(0xff04, 0xff07).rw(m_vdp, FUNC(tc0090lvc_device::ram_bank_r), FUNC(tc0090lvc_device::ram_bank_w)); - map(0xff08, 0xff08).r(m_vdp, FUNC(tc0090lvc_device::rom_bank_r)).w(FUNC(taitol_state::rombankswitch_w)); + map(0xff00, 0xff02).mirror(0x00f0).rw(m_vdp, FUNC(tc0090lvc_device::irq_vector_r), FUNC(tc0090lvc_device::irq_vector_w)); + map(0xff03, 0xff03).mirror(0x00f0).r(m_vdp, FUNC(tc0090lvc_device::irq_enable_r)).w(FUNC(taitol_state::irq_enable_w)); + map(0xff04, 0xff07).mirror(0x00f0).rw(m_vdp, FUNC(tc0090lvc_device::ram_bank_r), FUNC(tc0090lvc_device::ram_bank_w)); + map(0xff08, 0xff08).mirror(0x00f0).rw(m_vdp, FUNC(tc0090lvc_device::rom_bank_r), FUNC(tc0090lvc_device::rom_bank_w)); } void fhawk_state::fhawk_map(address_map &map) @@ -379,10 +347,10 @@ void taitol_2cpu_state::raimais_3_map(address_map &map) map(0xe000, 0xe003).rw("ymsnd", FUNC(ym2610_device::read), FUNC(ym2610_device::write)); map(0xe200, 0xe200).nopr().w("tc0140syt", FUNC(tc0140syt_device::slave_port_w)); map(0xe201, 0xe201).rw("tc0140syt", FUNC(tc0140syt_device::slave_comm_r), FUNC(tc0140syt_device::slave_comm_w)); - map(0xe400, 0xe403).nopw(); /* pan */ - map(0xe600, 0xe600).nopw(); /* ? */ - map(0xee00, 0xee00).nopw(); /* ? */ - map(0xf000, 0xf000).nopw(); /* ? */ + map(0xe400, 0xe403).nopw(); // pan + map(0xe600, 0xe600).nopw(); // ? + map(0xee00, 0xee00).nopw(); // ? + map(0xf000, 0xf000).nopw(); // ? map(0xf200, 0xf200).w(FUNC(taitol_2cpu_state::sound_bankswitch_w)); } @@ -448,7 +416,7 @@ void taitol_1cpu_state::puzznic_map(address_map &map) map(0xa800, 0xa800).nopr(); // Watchdog map(0xb800, 0xb800).rw("mcu", FUNC(arkanoid_68705p3_device::data_r), FUNC(arkanoid_68705p3_device::data_w)); map(0xb801, 0xb801).rw(FUNC(taitol_1cpu_state::mcu_control_r), FUNC(taitol_1cpu_state::mcu_control_w)); - map(0xbc00, 0xbc00).nopw(); // Control register, function unknown + map(0xbc00, 0xbc00).nopw(); // Control register, function unknown } /* bootleg, doesn't have the MCU */ @@ -460,7 +428,7 @@ void taitol_1cpu_state::puzznici_map(address_map &map) map(0xa800, 0xa800).nopr(); // Watchdog map(0xb801, 0xb801).r(FUNC(taitol_1cpu_state::mcu_control_r)); // map(0xb801, 0xb801).w(FUNC(taitol_1cpu_state::mcu_control_w)); - map(0xbc00, 0xbc00).nopw(); // Control register, function unknown + map(0xbc00, 0xbc00).nopw(); // Control register, function unknown } @@ -469,8 +437,8 @@ void taitol_1cpu_state::plotting_map(address_map &map) common_banks_map(map); map(0x8000, 0x9fff).ram(); map(0xa000, 0xa003).r(FUNC(taitol_1cpu_state::extport_select_and_ym2203_r)).w(m_ymsnd, FUNC(ym2203_device::write)); - map(0xa800, 0xa800).nopw(); // Watchdog or interrupt ack - map(0xb800, 0xb800).nopw(); // Control register, function unknown + map(0xa800, 0xa800).nopw(); // Watchdog or interrupt ack + map(0xb800, 0xb800).nopw(); // Control register, function unknown } @@ -480,27 +448,17 @@ void taitol_1cpu_state::palamed_map(address_map &map) map(0x8000, 0x9fff).ram(); map(0xa000, 0xa003).rw(m_ymsnd, FUNC(ym2203_device::read), FUNC(ym2203_device::write)); map(0xa800, 0xa803).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0xb000, 0xb000).nopw(); // Control register, function unknown (copy of 8822) + map(0xb000, 0xb000).nopw(); // Control register, function unknown (copy of 8822) map(0xb001, 0xb001).nopr(); // Watchdog or interrupt ack (value ignored in cachat) } -void taitol_1cpu_state::cachat_map(address_map &map) -{ - palamed_map(map); - map(0xfff8, 0xfff8).r(m_vdp, FUNC(tc0090lvc_device::rom_bank_r)).w(FUNC(taitol_1cpu_state::rombankswitch_w)); -} - - void horshoes_state::horshoes_map(address_map &map) { common_banks_map(map); map(0x8000, 0x9fff).ram(); map(0xa000, 0xa003).r(FUNC(horshoes_state::extport_select_and_ym2203_r)).w(m_ymsnd, FUNC(ym2203_device::write)); - map(0xa800, 0xa800).select(0x000c).lr8(NAME( - [this](offs_t offset) { - return m_upd4701->read_xy(offset >> 2); - })); + map(0xa800, 0xa800).select(0x000c).lr8(NAME([this](offs_t offset) { return m_upd4701->read_xy(offset >> 2); })); map(0xa802, 0xa802).r(m_upd4701, FUNC(upd4701_device::reset_x_r)); map(0xa803, 0xa803).r(m_upd4701, FUNC(upd4701_device::reset_y_r)); map(0xb801, 0xb801).nopr(); // Watchdog or interrupt ack @@ -1585,9 +1543,6 @@ void taitol_1cpu_state::cachat(machine_config &config) { palamed(config); - /* basic machine hardware */ - m_main_cpu->set_addrmap(AS_PROGRAM, &taitol_1cpu_state::cachat_map); - // NEC D70155C for inputs, instead TMP8255AP-5 } @@ -1690,7 +1645,7 @@ ROM_START( raimaisjo ) ROM_END ROM_START( fhawk ) - ROM_REGION( 0xa0000, "tc0090lvc", 0 ) + ROM_REGION( 0x100000, "tc0090lvc", ROMREGION_ERASEFF ) ROM_LOAD( "b70-11.ic3", 0x00000, 0x20000, CRC(7d9f7583) SHA1(d8fa7c66a81fb356fa9c72f377bfc31b1837eafb) ) ROM_LOAD( "b70-03.ic2", 0x20000, 0x80000, CRC(42d5a9b8) SHA1(10714fe95c372cec12376e615a9abe213aff12bc) ) @@ -1706,7 +1661,7 @@ ROM_START( fhawk ) ROM_END ROM_START( fhawkj ) - ROM_REGION( 0xa0000, "tc0090lvc", 0 ) + ROM_REGION( 0x100000, "tc0090lvc", ROMREGION_ERASEFF ) ROM_LOAD( "b70-07.ic3", 0x00000, 0x20000, CRC(939114af) SHA1(66218536dcb3b34ffa01d3c9c2fee365d91cfe00) ) ROM_LOAD( "b70-03.ic2", 0x20000, 0x80000, CRC(42d5a9b8) SHA1(10714fe95c372cec12376e615a9abe213aff12bc) ) diff --git a/src/mame/includes/taito_l.h b/src/mame/includes/taito_l.h index 83f853c74d5..c71566928c3 100644 --- a/src/mame/includes/taito_l.h +++ b/src/mame/includes/taito_l.h @@ -37,10 +37,7 @@ public: protected: /* misc */ int m_last_irq_level; - int m_main_high; - void irq_enable_w(u8 data); - void rombankswitch_w(u8 data); void mcu_control_w(u8 data); u8 mcu_control_r(); @@ -54,10 +51,10 @@ protected: virtual void state_register(); virtual void taito_machine_reset(); - required_device m_main_cpu; - required_device m_vdp; - optional_device m_upd4701; - required_memory_region m_main_prg; + required_device m_main_cpu; + required_device m_vdp; + optional_device m_upd4701; + required_memory_region m_main_prg; }; @@ -104,7 +101,6 @@ public: , m_slave_prg(*this, "slave") , m_slave_bnk(*this, "slavebank") , m_slave_rombank(0) - , m_slave_high(0) { } @@ -126,7 +122,6 @@ protected: required_memory_bank m_slave_bnk; u8 m_slave_rombank; - u8 m_slave_high; }; @@ -199,7 +194,6 @@ protected: virtual void state_register() override; virtual void taito_machine_reset() override; - void cachat_map(address_map &map); void palamed_map(address_map &map); void plotting_map(address_map &map); void puzznic_map(address_map &map); -- cgit v1.2.3 From b1e205081cc775de4fe194487eb6e1690e37b03e Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Sat, 4 Jul 2020 15:35:52 +0300 Subject: naomi.cpp minor bios version note --- src/mame/drivers/naomi.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index e17f3276694..f988d3e99b8 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -3265,9 +3265,10 @@ EPR-21577g - NAOMI BOOT ROM 2001 09/10 1.70 (USA) EPR-21578g - NAOMI BOOT ROM 2001 09/10 1.70 (Export) Korea and Australia is missing. -EPR-21576h - NAOMI BOOT ROM 2002 07/08 1.8- (Japan) -EPR-21577h - NAOMI BOOT ROM 2002 07/08 1.8- (USA) -EPR-21578h - NAOMI BOOT ROM 2002 07/08 1.8- (Export) +version text at 0x1ffd60 / version shown in test mode +EPR-21576h - NAOMI BOOT ROM 2002 07/08 1.8- / NAOMI GAME BOOT ROM Ver 2.01 (Japan) +EPR-21577h - NAOMI BOOT ROM 2002 07/08 1.8- / NAOMI GAME BOOT ROM Ver 2.01 (USA) +EPR-21578h - NAOMI BOOT ROM 2002 07/08 1.8- / NAOMI GAME BOOT ROM Ver 2.01 (Export) Korea and Australia is missing. EPR-21336 - No known dumps (Development BOOT ROM) @@ -3514,9 +3515,10 @@ EPR-23608B - NAOMI BOOT ROM 2001 09/10 1.70 (Export) EPR-23609B - NAOMI BOOT ROM 2001 09/10 1.70 (Korea) Australia is missing. -EPR-23605C - NAOMI BOOT ROM 2002 07/08 1.8- (Japan) -EPR-23607C - NAOMI BOOT ROM 2002 07/08 1.8- (USA) -EPR-23608C - NAOMI BOOT ROM 2002 07/08 1.8- (Export) +version text at 0x1ffd60 / version shown in test mode +EPR-23605C - NAOMI BOOT ROM 2002 07/08 1.8- / NAOMI2 GAME BOOT ROM Ver 2.01 (Japan) +EPR-23607C - NAOMI BOOT ROM 2002 07/08 1.8- / NAOMI2 GAME BOOT ROM Ver 2.01 (USA) +EPR-23608C - NAOMI BOOT ROM 2002 07/08 1.8- / NAOMI2 GAME BOOT ROM Ver 2.01 (Export) Korea and Australia is missing. Actual build date Dec 19 2005. @@ -6402,7 +6404,8 @@ ROM_START( shootplmp ) ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated ROM_END -/* Oinori-daimyoujin Matsuri (medal) */ +// Oinori-daimyoujin Matsuri (medal) +// 837-14391-01 SATL BD OND CRX MATSURI ROM_START( oinori ) NAOMI_BIOS NAOMI_DEFAULT_EEPROM -- cgit v1.2.3 From c1bef3b1d270eaf10e6125606d6e9f9c72871f5f Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 4 Jul 2020 09:24:58 -0400 Subject: eprom: Fix MT 07691 --- src/mame/drivers/eprom.cpp | 9 +++------ src/mame/includes/eprom.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp index 4521a775625..fd2336f9837 100644 --- a/src/mame/drivers/eprom.cpp +++ b/src/mame/drivers/eprom.cpp @@ -44,11 +44,8 @@ void eprom_state::video_int_ack_w(uint16_t data) { m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE); -} - -void eprom_state::video_int_ack_extra_w(uint16_t data) -{ - m_extra->set_input_line(M68K_IRQ_4, CLEAR_LINE); + if (m_extra.found()) + m_extra->set_input_line(M68K_IRQ_4, CLEAR_LINE); } void eprom_state::machine_start() @@ -198,7 +195,7 @@ void eprom_state::extra_map(address_map &map) map(0x260010, 0x26001f).portr("260010"); map(0x260020, 0x260027).mirror(0x8).r(FUNC(eprom_state::adc_r)).umask16(0x00ff); map(0x260031, 0x260031).r(m_jsa, FUNC(atari_jsa_base_device::main_response_r)); - map(0x360000, 0x360001).w(FUNC(eprom_state::video_int_ack_extra_w)); + map(0x360000, 0x360001).w(FUNC(eprom_state::video_int_ack_w)); map(0x360011, 0x360011).w(FUNC(eprom_state::eprom_latch_w)); map(0x360020, 0x360021).w(m_jsa, FUNC(atari_jsa_base_device::sound_reset_w)); map(0x360031, 0x360031).w(m_jsa, FUNC(atari_jsa_base_device::main_command_w)); diff --git a/src/mame/includes/eprom.h b/src/mame/includes/eprom.h index 6ac451644c2..d17085ab57c 100644 --- a/src/mame/includes/eprom.h +++ b/src/mame/includes/eprom.h @@ -45,7 +45,6 @@ protected: virtual void machine_start() override; virtual void machine_reset() override; void video_int_ack_w(uint16_t data); - void video_int_ack_extra_w(uint16_t data); TIMER_DEVICE_CALLBACK_MEMBER(scanline_update); uint8_t adc_r(offs_t offset); void eprom_latch_w(uint8_t data); -- cgit v1.2.3 From c1b7b2f0976aaae3b1867feddb23745d65afc532 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 4 Jul 2020 10:04:08 -0400 Subject: cowrace: Fix MT 07690 --- src/mame/drivers/kingdrby.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/kingdrby.cpp b/src/mame/drivers/kingdrby.cpp index 8b4fda046a4..95b6552e9aa 100644 --- a/src/mame/drivers/kingdrby.cpp +++ b/src/mame/drivers/kingdrby.cpp @@ -283,7 +283,7 @@ uint32_t kingdrby_state::screen_update_kingdrby(screen_device &screen, bitmap_rg m_sc0w_tilemap->set_scrolly(0, 32); /* maybe it needs two window tilemaps? (one at the top, the other at the bottom)*/ - clip.set(visarea.min_x, 256, 192, visarea.max_y); + clip.set(visarea.min_x, 255, 192, visarea.max_y); /*TILEMAP_DRAW_CATEGORY + TILEMAP_DRAW_OPAQUE doesn't suit well?*/ m_sc0_tilemap->draw(screen, bitmap, cliprect, 0,0); -- cgit v1.2.3 From 9eb34bea94ecb8bb2c3a3e78d3c0bbe197bf4963 Mon Sep 17 00:00:00 2001 From: cam900 Date: Sun, 5 Jul 2020 00:54:19 +0900 Subject: rf5c400.cpp: Minor revert PR #6887 (#6889) --- src/devices/sound/rf5c400.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/devices/sound/rf5c400.cpp b/src/devices/sound/rf5c400.cpp index 9fafa101e23..43fef5db852 100644 --- a/src/devices/sound/rf5c400.cpp +++ b/src/devices/sound/rf5c400.cpp @@ -209,8 +209,8 @@ void rf5c400_device::sound_stream_update(sound_stream &stream, stream_sample_t * stream_sample_t *buf1 = outputs[1]; // start = ((channel->startH & 0xFF00) << 8) | channel->startL; - end = ((((channel->endHloopH & 0xFF) << 16) | channel->endL) << 16) | 0xffffULL; - loop = ((((channel->endHloopH & 0xFF00) << 8) | channel->loopL) << 16); + end = ((channel->endHloopH & 0xFF) << 16) | channel->endL; + loop = ((channel->endHloopH & 0xFF00) << 8) | channel->loopL; pos = channel->pos; vol = channel->volume & 0xFF; lvol = channel->pan & 0xFF; @@ -296,10 +296,10 @@ void rf5c400_device::sound_stream_update(sound_stream &stream, stream_sample_t * *buf1++ += sample * pan_table[rvol]; pos += channel->step; - if (pos > end) + if ((pos>>16) > end) { - pos -= loop; - pos &= ~0xffffULL; + pos -= loop<<16; + pos &= 0xFFFFFF0000ULL; } } -- cgit v1.2.3 From a80557b4124a9bb496ab07b657d8103e26a06b58 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 4 Jul 2020 19:22:34 +0200 Subject: devices/bus/hp_hil/hlemouse, devices/machine/arm_iomd, mame/machine/mct_adr: initialize some variables that were causing problems in debug devnoclear builds --- src/devices/bus/hp_hil/hlemouse.cpp | 2 ++ src/devices/machine/arm_iomd.cpp | 3 +++ src/mame/machine/mct_adr.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/src/devices/bus/hp_hil/hlemouse.cpp b/src/devices/bus/hp_hil/hlemouse.cpp index 2303f011272..a54ef33a0e7 100644 --- a/src/devices/bus/hp_hil/hlemouse.cpp +++ b/src/devices/bus/hp_hil/hlemouse.cpp @@ -41,6 +41,8 @@ hle_hp_46060b_device::hle_hp_46060b_device(machine_config const &mconfig, char c void hle_hp_46060b_device::device_reset() { m_fifo.clear(); + + mouse_x_delta = mouse_y_delta = 0; } int hle_hp_46060b_device::hil_poll() diff --git a/src/devices/machine/arm_iomd.cpp b/src/devices/machine/arm_iomd.cpp index e33863976ba..d6ce9557716 100644 --- a/src/devices/machine/arm_iomd.cpp +++ b/src/devices/machine/arm_iomd.cpp @@ -308,7 +308,10 @@ void arm_iomd_device::device_reset() m_sound_dma_on = false; for (i=0; i Date: Sun, 5 Jul 2020 04:21:07 +1000 Subject: ondra: cleanup, added sound. --- scripts/target/mame/mess.lua | 1 - src/mame/drivers/ondra.cpp | 193 +++++++++++++++++++++++++------------------ src/mame/includes/ondra.h | 62 +++++++------- src/mame/machine/ondra.cpp | 131 ++++++++++++++++++----------- src/mame/video/ondra.cpp | 47 ----------- 5 files changed, 226 insertions(+), 208 deletions(-) delete mode 100644 src/mame/video/ondra.cpp diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 14e43e370ff..641676290a8 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3776,7 +3776,6 @@ files { MAME_DIR .. "src/mame/drivers/ondra.cpp", MAME_DIR .. "src/mame/includes/ondra.h", MAME_DIR .. "src/mame/machine/ondra.cpp", - MAME_DIR .. "src/mame/video/ondra.cpp", MAME_DIR .. "src/mame/drivers/pmd85.cpp", MAME_DIR .. "src/mame/includes/pmd85.h", MAME_DIR .. "src/mame/machine/pmd85.cpp", diff --git a/src/mame/drivers/ondra.cpp b/src/mame/drivers/ondra.cpp index 4b24420ba71..b97086182c6 100644 --- a/src/mame/drivers/ondra.cpp +++ b/src/mame/drivers/ondra.cpp @@ -1,119 +1,153 @@ // license:BSD-3-Clause // copyright-holders:Miodrag Milanovic -/*************************************************************************** +/***************************************************************************** - Ondra driver by Miodrag Milanovic +Ondra driver by Miodrag Milanovic - 08/09/2008 Preliminary driver. +2008-09-08 Preliminary driver. -****************************************************************************/ +ToDo: +- Paste/Natural keyboard are useless because 3rd modifier key is not supported. +- Add 2x i8253 pits which are part of the video timing circuit. They are not + connected to the data bus, and are always selected. +- The video is somewhat similar to the standard super80, in that the CPU is + turned off by BUSRQ about half the time, so that the video can be drawn + without causing snow. The CPU can gain full control by disabling the video. +- Sound is a speaker connected to a multivibrator circuit. There are 3 diodes + from this circuit to allow a choice of 7 frequencies. We have used a buzzer + with selected arbitrary frequencies, not having any idea what they should be. +- Ondrav doesn't seem to accept any commands, only producing KOD 1 followed + by halt. You have to press Esc before trying again. +- Cassette not working. Doesn't load from softlist, and don't know how to save. + +******************************************************************************/ #include "emu.h" #include "includes/ondra.h" - #include "cpu/z80/z80.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" #include "emupal.h" #include "screen.h" -#include "softlist.h" #include "speaker.h" /* Address maps */ -void ondra_state::ondra_mem(address_map &map) +void ondra_state::mem_map(address_map &map) { map(0x0000, 0x3fff).bankrw("bank1"); map(0x4000, 0xdfff).bankrw("bank2"); map(0xe000, 0xffff).bankrw("bank3"); } -void ondra_state::ondra_io(address_map &map) +void ondra_state::io_map(address_map &map) { - map.global_mask(0x0b); + //map.global_mask(0x0b); map.unmap_value_high(); - map(0x03, 0x03).w(FUNC(ondra_state::ondra_port_03_w)); - //map(0x09, 0x09).w(FUNC(ondra_state::ondra_port_09_w); - //map(0x0a, 0x0a).w(FUNC(ondra_state::ondra_port_0a_w); + map(0x03, 0x03).mirror(0xff00).w(FUNC(ondra_state::port03_w)); + //map(0x09, 0x09).mirror(0xff00).r(FUNC(ondra_state::port09_r)); + map(0x0a, 0x0a).mirror(0xff00).w(FUNC(ondra_state::port0a_w)); } /* Input ports */ static INPUT_PORTS_START( ondra ) PORT_START("LINE0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R 4 $") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r') PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E 3 #") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e') PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W 2 \"") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w') PORT_CHAR('2') PORT_CHAR('\"') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T 5 %") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t') PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q 1 !") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q') PORT_CHAR('1') PORT_CHAR('!') PORT_START("LINE1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F ^") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') PORT_CHAR('^') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D =") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d') PORT_CHAR('=') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S +") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') PORT_CHAR('+') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G _") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') PORT_CHAR('_') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A -") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a') PORT_CHAR('-') PORT_START("LINE2") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C :") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') PORT_CHAR(':') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X /") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') PORT_CHAR('/') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z *") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z') PORT_CHAR('*') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V ;") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') PORT_CHAR(';') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) //PORT_CHAR(UCHAR_SHIFT_3) not supported yet PORT_START("LINE3") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("LINE4") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0-9") PORT_CODE(KEYCODE_RALT) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0-9") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_SHIFT_2) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CS") PORT_CODE(KEYCODE_LALT) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("UpCase") PORT_CODE(KEYCODE_LSHIFT) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("UpCase") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_START("LINE5") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J >") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') PORT_CHAR('>') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K [") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') PORT_CHAR('[') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L ]") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') PORT_CHAR(']') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H <") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') PORT_CHAR('<') PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("LINE6") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U 7 \'") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u') PORT_CHAR('7') PORT_CHAR('\'') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I 8 (") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O 9 )") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o') PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y 6 &") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y') PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P 0 @") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p') PORT_CHAR('0') PORT_CHAR('@') PORT_START("LINE7") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N ,") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') PORT_CHAR(',') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M .") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') PORT_CHAR('.') PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B ?") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') PORT_CHAR('?') PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("LINE8") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("LINE9") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(1) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(1) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(1) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT)PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) - PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("NMI") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NMI") PORT_CODE(KEYCODE_ESC) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NMI") PORT_CODE(KEYCODE_ESC) PORT_CHANGED_MEMBER(DEVICE_SELF, ondra_state, nmi_button, 0) INPUT_PORTS_END +INPUT_CHANGED_MEMBER(ondra_state::nmi_button) +{ + m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE); +} + +u32 ondra_state::screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + u8 *r = m_ram->pointer(); + + u8 code1=0,code2=0; + int y, x, b; + int Vaddr = 0x2800; + + for (x = 0; x < 40; x++) + { + for (y = 127; y >=0; y--) + { + if (m_video_enable) + { + code1 = r[0xd700 + Vaddr + 0x80]; + code2 = r[0xd700 + Vaddr + 0x00]; + } + for (b = 0; b < 8; b++) + { + bitmap.pix16(2*y, x*8+b) = ((code1 << b) & 0x80) ? 1 : 0; + bitmap.pix16(2*y+1, x*8+b) = ((code2 << b) & 0x80) ? 1 : 0; + } + Vaddr++; + } + Vaddr = (Vaddr - 128) - 256; + } + return 0; +} + WRITE_LINE_MEMBER(ondra_state::vblank_irq) { if (state) @@ -124,9 +158,9 @@ WRITE_LINE_MEMBER(ondra_state::vblank_irq) void ondra_state::ondra(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2000000); - m_maincpu->set_addrmap(AS_PROGRAM, &ondra_state::ondra_mem); - m_maincpu->set_addrmap(AS_IO, &ondra_state::ondra_io); + Z80(config, m_maincpu, 8_MHz_XTAL / 4); + m_maincpu->set_addrmap(AS_PROGRAM, &ondra_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &ondra_state::io_map); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -140,12 +174,13 @@ void ondra_state::ondra(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - // sound hardware SPEAKER(config, "mono").front_center(); + BEEP(config, m_beep, 950); // guess + m_beep->add_route(ALL_OUTPUTS, "mono", 0.25); CASSETTE(config, m_cassette); - m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); + m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); m_cassette->set_interface("ondra_cass"); @@ -158,31 +193,31 @@ void ondra_state::ondra(machine_config &config) /* ROM definition */ ROM_START( ondrat ) - ROM_REGION( 0x14000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "tesla_a.rom", 0x10000, 0x0800, CRC(6d56b815) SHA1(7feb4071d5142e4c2f891747b75fa4d48ccad262) ) - ROM_COPY( "maincpu", 0x10000, 0x10800, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x11000, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x11800, 0x0800 ) - ROM_LOAD( "tesla_b.rom", 0x12000, 0x0800, CRC(5f145eaa) SHA1(c1eac68b13fedc4d0d6f98b15e2a5397f0139dc3) ) - ROM_COPY( "maincpu", 0x10000, 0x12800, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x13000, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x13800, 0x0800 ) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD( "tesla_a.d22", 0x0000, 0x0800, CRC(6d56b815) SHA1(7feb4071d5142e4c2f891747b75fa4d48ccad262) ) + ROM_LOAD( "tesla_b.d21", 0x2000, 0x0800, CRC(5f145eaa) SHA1(c1eac68b13fedc4d0d6f98b15e2a5397f0139dc3) ) + + ROM_REGION( 0x0040, "proms", 0 ) + ROM_LOAD( "mh74188.d27", 0x0000, 0x0040, CRC(7faceafe) SHA1(597f867e38b1c66d4622662cb01b3aefa680f234) ) ROM_END ROM_START( ondrav ) - ROM_REGION( 0x14000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "vili_a.rom", 0x10000, 0x0800, CRC(76932657) SHA1(1f3700f670f158e4bed256aed751e2c1331a28e8) ) - ROM_COPY( "maincpu", 0x10000, 0x10800, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x11000, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x11800, 0x0800 ) - ROM_LOAD( "vili_b.rom", 0x12000, 0x0800, CRC(03a6073f) SHA1(66f198e63f473e09350bcdbb10fe0cf440111bec) ) - ROM_COPY( "maincpu", 0x10000, 0x12800, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x13000, 0x0800 ) - ROM_COPY( "maincpu", 0x10000, 0x13800, 0x0800 ) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD( "vili_a.d22", 0x0000, 0x0800, CRC(76932657) SHA1(1f3700f670f158e4bed256aed751e2c1331a28e8) ) + ROM_RELOAD(0x0800, 0x0800) + ROM_RELOAD(0x1000, 0x0800) + ROM_RELOAD(0x1800, 0x0800) + ROM_LOAD( "vili_b.d21", 0x2000, 0x0800, CRC(03a6073f) SHA1(66f198e63f473e09350bcdbb10fe0cf440111bec) ) + ROM_RELOAD(0x2800, 0x0800) + ROM_RELOAD(0x3000, 0x0800) + ROM_RELOAD(0x3800, 0x0800) + + ROM_REGION( 0x0040, "proms", 0 ) + ROM_LOAD( "mh74188.d27", 0x0000, 0x0040, CRC(7faceafe) SHA1(597f867e38b1c66d4622662cb01b3aefa680f234) ) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1989, ondrat, 0, 0, ondra, ondra, ondra_state, empty_init, "Tesla", "Ondra", 0 ) -COMP( 1989, ondrav, ondrat, 0, ondra, ondra, ondra_state, empty_init, "ViLi", "Ondra ViLi", 0 ) +COMP( 1989, ondrat, 0, 0, ondra, ondra, ondra_state, empty_init, "Tesla", "Ondra", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1989, ondrav, ondrat, 0, ondra, ondra, ondra_state, empty_init, "ViLi", "Ondra ViLi", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/ondra.h b/src/mame/includes/ondra.h index b1021b1f900..c3ec2d4a9b4 100644 --- a/src/mame/includes/ondra.h +++ b/src/mame/includes/ondra.h @@ -11,63 +11,57 @@ #pragma once #include "imagedev/cassette.h" +#include "sound/beep.h" #include "machine/ram.h" class ondra_state : public driver_device { public: - ondra_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_video_enable(0), - m_bank1_status(0), - m_bank2_status(0), - m_nmi_check_timer(nullptr), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_region_maincpu(*this, "maincpu"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_lines(*this, "LINE%u", 0), - m_nmi(*this, "NMI") - { - } + ondra_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_cassette(*this, "cassette") + , m_ram(*this, RAM_TAG) + , m_rom(*this, "maincpu") + , m_bank1(*this, "bank1") + , m_bank2(*this, "bank2") + , m_bank3(*this, "bank3") + , m_beep(*this, "beeper") + , m_io_keyboard(*this, "LINE%u", 0U) + { } void ondra(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(nmi_button); private: - uint8_t ondra_keyboard_r(offs_t offset); - void ondra_port_03_w(uint8_t data); - void ondra_port_09_w(uint8_t data); - void ondra_port_0a_w(uint8_t data); - uint32_t screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u8 keyboard_r(offs_t offset); + void port03_w(u8 data); + u8 port09_r(); + void port0a_w(u8 data); + u32 screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - TIMER_CALLBACK_MEMBER(nmi_check_callback); - void ondra_io(address_map &map); - void ondra_mem(address_map &map); + void io_map(address_map &map); + void mem_map(address_map &map); virtual void machine_start() override; virtual void machine_reset() override; - virtual void video_start() override; - void ondra_update_banks(); + void update_banks(); - uint8_t m_video_enable; - uint8_t m_bank1_status; - uint8_t m_bank2_status; - emu_timer *m_nmi_check_timer; + bool m_video_enable; + u8 m_bank_status; + u8 m_bank_old; required_device m_maincpu; required_device m_cassette; required_device m_ram; - required_memory_region m_region_maincpu; + required_memory_region m_rom; required_memory_bank m_bank1; required_memory_bank m_bank2; required_memory_bank m_bank3; - required_ioport_array<10> m_lines; - required_ioport m_nmi; + required_device m_beep; + required_ioport_array<10> m_io_keyboard; }; #endif // MAME_INCLUDES_ONDRA_H diff --git a/src/mame/machine/ondra.cpp b/src/mame/machine/ondra.cpp index 35614a3f950..75c9875f9a5 100644 --- a/src/mame/machine/ondra.cpp +++ b/src/mame/machine/ondra.cpp @@ -12,81 +12,118 @@ #include "emu.h" #include "includes/ondra.h" -#include "cpu/z80/z80.h" - -uint8_t ondra_state::ondra_keyboard_r(offs_t offset) +u8 ondra_state::keyboard_r(offs_t offset) { - uint8_t retVal = 0x00; + u8 data = 0x60; + offset &= 15; - double const valcas = m_cassette->input(); - if (valcas < 0.00) - retVal |= 0x80; + data |= (m_cassette->input() < 0.00) ? 0x80: 0; - if ((offset & 0x0f) < m_lines.size()) - retVal |= m_lines[offset & 0x0f]->read(); + if (offset < m_io_keyboard.size()) + data |= (m_io_keyboard[offset]->read() & 0x1f); else - retVal |= 0x1f; + data |= 0x1f; - return retVal; + return data; } -void ondra_state::ondra_update_banks() +void ondra_state::update_banks() { address_space &space = m_maincpu->space(AS_PROGRAM); - uint8_t *mem = m_region_maincpu->base(); - - if (m_bank1_status==0) { - space.unmap_write(0x0000, 0x3fff); - m_bank1->set_base(mem + 0x010000); - } else { - space.install_write_bank(0x0000, 0x3fff, "bank1"); - m_bank1->set_base(m_ram->pointer() + 0x0000); + u8 *m = m_rom->base(); + u8 *r = m_ram->pointer(); + + if (BIT(m_bank_status, 0) != BIT(m_bank_old, 0)) + { + if (BIT(m_bank_status, 0)) + { + space.install_write_bank(0x0000, 0x3fff, "bank1"); + m_bank1->set_base(r); + } + else + { + space.unmap_write(0x0000, 0x3fff); + m_bank1->set_base(m); + } } - m_bank2->set_base(m_ram->pointer() + 0x4000); - if (m_bank2_status==0) { - space.install_readwrite_bank(0xe000, 0xffff, "bank3"); - m_bank3->set_base(m_ram->pointer() + 0xe000); - } else { - space.unmap_write(0xe000, 0xffff); - space.install_read_handler (0xe000, 0xffff, read8sm_delegate(*this, FUNC(ondra_state::ondra_keyboard_r))); + + if (BIT(m_bank_status, 1) != BIT(m_bank_old, 1)) + { + if (BIT(m_bank_status, 1)) + { + space.unmap_write(0xe000, 0xffff); + space.install_read_handler (0xe000, 0xffff, read8sm_delegate(*this, FUNC(ondra_state::keyboard_r))); + } + else + { + space.install_readwrite_bank(0xe000, 0xffff, "bank3"); + m_bank3->set_base(r + 0xe000); + } } -} -void ondra_state::ondra_port_03_w(uint8_t data) -{ - m_video_enable = data & 1; - m_bank1_status = (data >> 1) & 1; - m_bank2_status = (data >> 2) & 1; - ondra_update_banks(); - m_cassette->output(((data >> 3) & 1) ? -1.0 : +1.0); + m_bank_old = m_bank_status; } -void ondra_state::ondra_port_09_w(uint8_t data) +/* +0 - video on/off +1 - banking +2 - banking +3 - cassette out +4 - A0 on pits +5 - A1 on pits */ +void ondra_state::port03_w(u8 data) { + if (BIT(data, 1, 2) != m_bank_status) + { + m_bank_status = BIT(data, 1, 2); + update_banks(); + } + + m_video_enable = BIT(data, 0); + m_cassette->output(BIT(data, 3) ? -1.0 : +1.0); } -void ondra_state::ondra_port_0a_w(uint8_t data) + +// external connection +u8 ondra_state::port09_r() { + return 0xff; } -TIMER_CALLBACK_MEMBER(ondra_state::nmi_check_callback) +/* +0 - a LED next to keyboard +1 - a LED next to keyboard +2 - external +3 - external +4 - cassette relay +5 - speaker +6 - speaker +7 - speaker */ +void ondra_state::port0a_w(u8 data) { - if ((m_nmi->read() & 1) == 1) - { - m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); - } + static u16 tones[8] = { 0, 110, 156, 220, 311, 440, 622, 880 }; // a guess + + m_cassette->change_state(BIT(data,4) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR); + u16 tone = tones[BIT(data, 5, 3)]; + m_beep->set_state(tone? 1 : 0); + if (tone) + m_beep->set_clock(tone); } void ondra_state::machine_reset() { - m_bank1_status = 0; - m_bank2_status = 0; - ondra_update_banks(); + m_beep->set_state(0); + m_video_enable = 0; + m_bank_status = 0; + m_bank_old = 0xff; + update_banks(); + m_bank2->set_base(m_ram->pointer() + 0x4000); } void ondra_state::machine_start() { - m_nmi_check_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ondra_state::nmi_check_callback), this)); - m_nmi_check_timer->adjust(attotime::from_hz(10), 0, attotime::from_hz(10)); + save_item(NAME(m_video_enable)); + save_item(NAME(m_bank_status)); + save_item(NAME(m_bank_old)); } diff --git a/src/mame/video/ondra.cpp b/src/mame/video/ondra.cpp deleted file mode 100644 index 92b56e0ba19..00000000000 --- a/src/mame/video/ondra.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/*************************************************************************** - - Ondra driver by Miodrag Milanovic - - 08/09/2008 Preliminary driver. - -****************************************************************************/ - - -#include "emu.h" -#include "includes/ondra.h" -#include "machine/ram.h" - - - -void ondra_state::video_start() -{ - m_video_enable = 0; -} - -uint32_t ondra_state::screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - uint8_t code1,code2; - int y, x, b; - int Vaddr = 0x2800; - - if (m_video_enable==1) { - for (x = 0; x < 40; x++) - { - for (y = 127; y >=0; y--) - { - code1 = m_ram->pointer()[0xd700 + Vaddr + 0x80]; - code2 = m_ram->pointer()[0xd700 + Vaddr + 0x00]; - for (b = 0; b < 8; b++) - { - bitmap.pix16(2*y, x*8+b) = ((code1 << b) & 0x80) ? 1 : 0; - bitmap.pix16(2*y+1, x*8+b) = ((code2 << b) & 0x80) ? 1 : 0; - } - Vaddr++; - } - Vaddr = (Vaddr - 128) - 256; - } - } - return 0; -} -- cgit v1.2.3 From 22bca00cef5dec3ded5fb0478747c5c5dde2c64c Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Sat, 4 Jul 2020 20:42:13 +0200 Subject: New NOT_WORKING software list additions (mobigo_cart.xml) (#6902) --------------------------------------- Dreamworks Shrek - Forever After (US) [TeamEurope] Disney Princess (USA, alt) [TeamEurope] Sesame Street - Elmo and Abby - Nature Explorers (USA) [TeamEurope] Disney/Pixar Brave (USA) [TeamEurope] Disney Jake and the Neverland Pirates (USA, alt) [TeamEurope] * Also Fixed 'tbell' hash and sorted the list (nw) --- hash/mobigo_cart.xml | 120 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 90 insertions(+), 30 deletions(-) diff --git a/hash/mobigo_cart.xml b/hash/mobigo_cart.xml index 41d0920f36a..0adbeb5aeea 100644 --- a/hash/mobigo_cart.xml +++ b/hash/mobigo_cart.xml @@ -21,7 +21,19 @@ license:CC0 - + + Disney/Pixar Brave (USA) + 2012 + VTech + + + + + + + + + Disney/Pixar Merida - Legende der Highlands (Germany) 2012 VTech @@ -81,26 +93,14 @@ license:CC0 - - DreamWorks/Nickelodeon The Penguins of Madagascar - Mission Madness (USA) - 2010 - VTech - - - - - - - - - - DreamWorks/Nickelodeon Die Pinguine aus Madagascar - Operation Krone (Germany) + + Sesame Street - Elmo and Abby - Nature Explorers (USA) 2011 VTech - + - + @@ -129,6 +129,18 @@ license:CC0 + + Disney Princess (USA, alt) + 2010 + VTech + + + + + + + + Disney Princess (Germany) 2011 @@ -153,18 +165,6 @@ license:CC0 - - DreamWorks Für immer Shrek (Germany) - 201? - VTech - - - - - - - - Hello Kitty - Hello Kitty feiert Geburtstag! (Germany) 2012 @@ -189,6 +189,18 @@ license:CC0 + + Disney Jake and the Neverland Pirates (USA, alt) + 2012 + VTech + + + + + + + + Jake und die Nimmerland Piraten (Germany) 2012 @@ -260,6 +272,30 @@ license:CC0 + + DreamWorks/Nickelodeon The Penguins of Madagascar - Mission Madness (USA) + 2010 + VTech + + + + + + + + + + DreamWorks/Nickelodeon Die Pinguine aus Madagascar - Operation Krone (Germany) + 2011 + VTech + + + + + + + + Disney Planes (Germany) 2013 @@ -296,6 +332,30 @@ license:CC0 + + Dreamworks Shrek - Forever After (US) + 2010 + VTech + + + + + + + + + + DreamWorks Für immer Shrek (Germany) + 201? + VTech + + + + + + + + Sofia die Erste (Germany) 2013 @@ -410,7 +470,7 @@ license:CC0 - + -- cgit v1.2.3 From dc3dbe04578d4235090736925e7265d4af6be7cb Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Sat, 4 Jul 2020 20:42:43 +0200 Subject: vsmilem_cart.xml: Add some serials, update notes, and rename a set to follow naming convention (nw) (#6900) --- hash/vsmilem_cart.xml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/hash/vsmilem_cart.xml b/hash/vsmilem_cart.xml index 51e0c85d971..5fa9bc90739 100644 --- a/hash/vsmilem_cart.xml +++ b/hash/vsmilem_cart.xml @@ -24,6 +24,7 @@ Language: *******?? = Finland +========+===================+===========================================================================================+ +| XX | 80-084000(US) | Action Mania | | XX | 80-084000(US) | Action Mania (Rev, 4?) | | XX | 80-084000(US) | Action Mania (Rev, 6?) | | | (IT) | ????? | @@ -68,7 +69,7 @@ Language: | XX | 80-084124(GE) | Kung Fu Panda - Der Weg des Panda | | XX | 80-084125(FR) | Kung Fu Panda - La mission de Po | +========+===================+===========================================================================================+ -| | 80-084140(US) | Spider-Man & Friends - Secret Missions (AKA Professor V's Secret Missions with diff label)| +| XX | 80-084140(US) | Spider-Man & Friends - Secret Missions (AKA Professor V's Secret Missions with diff label)| | | 80-084143(UK) | Spider-Man & Friends - Secret Missions | | XX | 80-084144(GE) | Spider-Man & Freunde - Geheime Missionen | | XX | 80-084145(FR) | Spider-Man & ses amis - Missions Secrètes | @@ -100,7 +101,7 @@ Language: +========+===================+===========================================================================================+ | XX | 80-084240(US) | Ni Hao Kai Lan | | XX | 80-084245(FR) | Ni Hao Kai Lan - Joyeux Nouvel an chinois! | -+========+===================+===========================================================================================+ ++========+===================+===========================================================================================+ | | 80-084260(US) | My Pet Puppy (unreleased in USA? UK version plays OK on NTSC console) | | XX | 80-084262(NL) | Mijn Puppy! | | | 80-084263(UK) | My Pet Puppy | @@ -114,7 +115,7 @@ Language: | | 80-084284(GE) | Dolphis Wasser-abenteuer | | XX | 80-084285(FR) | Martin le Dauphin | +========+===================+===========================================================================================+ -| | 80-084300(US) | Soccer Challenge | +| XX | 80-084300(US) | Soccer Challenge | | | 80-084303(UK) | Football Challenge | | XX | 80-084304(GE) | Fussball Meisterschaft | | XX | 80-084305(FR) | Football Challenge | @@ -161,7 +162,7 @@ Language: | | 80-084406(PT) | Cars - Aventura Em Radiator Springs (84416 on cart) | | XX | 80-084407(SP) | Cars - Acelera el Motor en Radiador Springs | +========+===================+===========================================================================================+ -| | 80-084420(US) | Toy Story 3 | +| XX | 80-084420(US) | Toy Story 3 | | | 80-084421(US) | Toy Story 3 (pocket version) | | | (IT) | Toy Story 3 (EAN 8033836704196, GP470419?) | | | 80-084422(NL) | Toy Story 3 | @@ -263,6 +264,7 @@ Language: Action Mania (USA) 201? VTech + @@ -1006,7 +1008,7 @@ Language: Soccer Challenge (USA) 200? VTech - + @@ -1042,12 +1044,11 @@ Language: - Marvel Spider-Man & Friends - Secret Missions (USA) 200? VTech - + @@ -1151,10 +1152,11 @@ Language: - + Toy Story 3 (USA) 2010 VTech + @@ -1162,7 +1164,7 @@ Language: - + Toy Story 3 (Germany) 2010 VTech @@ -1179,7 +1181,7 @@ Language: - + Toy Story 3 (France) 2010 VTech @@ -1192,7 +1194,7 @@ Language: - + Disney/Pixar Toy Story 3 (Spain) 2010 VTech -- cgit v1.2.3 From e4b7bb8c8842d6e24dba751740c9b56e771d2aa3 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Sat, 4 Jul 2020 20:43:35 +0200 Subject: New machines marked as NOT_WORKING (#6892) * New machines marked as NOT_WORKING ---------------------------------- Far West [Victor Fernandez (City Game), ClawGrip] * Add 'cfarwest' (nw) --- src/mame/drivers/microdar.cpp | 114 ++++++++++++++++++++++++++++++++++++++---- src/mame/mame.lst | 1 + 2 files changed, 106 insertions(+), 9 deletions(-) diff --git a/src/mame/drivers/microdar.cpp b/src/mame/drivers/microdar.cpp index 21bf927a6bb..287cef68e2c 100644 --- a/src/mame/drivers/microdar.cpp +++ b/src/mame/drivers/microdar.cpp @@ -59,15 +59,16 @@ IC10 = Hitachi HD74HC244P ************************************************************************** Known machines using this hardware: -___________________________________________________________________________________________________________ -|Dumped | Name | Manufacturer | Notes | -|-------|------------|--------------|---------------------------------------------------------------------| -| NO | Sagitario | CIC Play | CPU silkscreened "REF 0034 9115S", without manufacturer logos | -| YES | Unknown | Bifuca | Added as "microdar". Standard Microdar SPD with Philips REF34VA | -| NO | Party Darts| Compumatic | More info: http://www.recreativas.org/party-darts-4906-compumatic | -| NO | Diamant | Unknown | Newer PCB with Philips REF34VA and additional Compumatic custom ICs | -| NO | Tiger Dart | Unknown | Standard Microdar SPD with Philips REF34VA | -|_______|____________|______________|_____________________________________________________________________| +_______________________________________________________________________________________________________________________________________________ +|Dumped | Name | Manufacturer | Notes | Machine type | +|-------|------------|--------------|---------------------------------------------------------------------|------------------------------------| +| NO | Sagitario | CIC Play | CPU silkscreened "REF 0034 9115S", without manufacturer logos | Darts | +| YES | Unknown | Bifuca | Added as "microdar". Standard Microdar SPD with Philips REF34VA | Darts | +| NO | Party Darts| Compumatic | More info: http://www.recreativas.org/party-darts-4906-compumatic | Darts | +| NO | Diamant | Unknown | Newer PCB with Philips REF34VA and additional Compumatic custom ICs | Darts | +| NO | Tiger Dart | Unknown | Standard Microdar SPD with Philips REF34VA | Darts | +| YES | Far West | Compumatic | Standard Microdar SPD with Philips REF34VA | Electromechanical shooting machine | +|_______|____________|______________|_____________________________________________________________________|____________________________________| There's a later revision of the Compumatic Microdar PCB (V5), smaller, with a standard Atmel AT89S51 instead of the REF34 CPU. @@ -220,4 +221,99 @@ ROM_START(microdar) ROM_LOAD("24lc16b.ic8", 0x000, 0x800, CRC(1cae70db) SHA1(575d4c787fd65950417e85fdb34d2961fc327c74)) ROM_END +ROM_START(cfarwest) + ROM_REGION(0x1000, "maincpu", ROMREGION_ERASE00) + ROM_LOAD("ref34va_k8v2873_phr9920_0.ic12", 0x0000, 0x1000, NO_DUMP) + // Fills copied from 'microdar' without checking + ROM_FILL(0x0000, 1, 0x02) // temporary LJMP to external init code + ROM_FILL(0x0001, 1, 0x10) + ROM_FILL(0x0002, 1, 0x1b) + ROM_FILL(0x000b, 1, 0x02) // temporary LJMP to interrupt handler + ROM_FILL(0x000c, 1, 0x10) + ROM_FILL(0x000d, 1, 0x15) + ROM_FILL(0x001b, 1, 0x02) // temporary LJMP to interrupt handler + ROM_FILL(0x001c, 1, 0x10) + ROM_FILL(0x001d, 1, 0x18) + ROM_FILL(0x0058, 1, 0x32) // RETI stubs + ROM_FILL(0x00af, 1, 0x32) + ROM_FILL(0x00c9, 1, 0x02) // temporary LJMP to end of interrupt handler + ROM_FILL(0x00ca, 1, 0x12) + ROM_FILL(0x00cb, 1, 0xd1) + ROM_FILL(0x0135, 1, 0x22) // RET stubs + ROM_FILL(0x0163, 1, 0x22) + ROM_FILL(0x0185, 1, 0x22) + ROM_FILL(0x01cf, 1, 0x22) + ROM_FILL(0x02de, 1, 0x22) + ROM_FILL(0x02fa, 1, 0x22) + ROM_FILL(0x0308, 1, 0x22) + ROM_FILL(0x0313, 1, 0x22) + ROM_FILL(0x037d, 1, 0x22) + ROM_FILL(0x03be, 1, 0x22) + ROM_FILL(0x0496, 1, 0x22) + ROM_FILL(0x04ce, 1, 0x22) + ROM_FILL(0x0514, 1, 0x22) + ROM_FILL(0x0520, 1, 0x22) + ROM_FILL(0x0550, 1, 0x22) + ROM_FILL(0x0574, 1, 0x22) + ROM_FILL(0x05b4, 1, 0x22) + ROM_FILL(0x05bb, 1, 0x22) + ROM_FILL(0x05ca, 1, 0x22) + ROM_FILL(0x05d8, 1, 0x22) + ROM_FILL(0x0605, 1, 0x22) + ROM_FILL(0x0638, 1, 0x22) + ROM_FILL(0x068a, 1, 0x22) + ROM_FILL(0x06a2, 1, 0x22) + ROM_FILL(0x06bd, 1, 0x22) + ROM_FILL(0x06db, 1, 0x22) + ROM_FILL(0x0708, 1, 0x22) + ROM_FILL(0x0715, 1, 0x22) + ROM_FILL(0x072d, 1, 0x22) + ROM_FILL(0x0744, 1, 0x22) + ROM_FILL(0x0751, 1, 0x22) + ROM_FILL(0x0767, 1, 0x22) + ROM_FILL(0x0772, 1, 0x22) + ROM_FILL(0x077d, 1, 0x22) + ROM_FILL(0x07a4, 1, 0x22) + ROM_FILL(0x07c2, 1, 0x22) + ROM_FILL(0x0802, 1, 0x22) + ROM_FILL(0x0836, 1, 0x22) + ROM_FILL(0x087d, 1, 0x22) + ROM_FILL(0x0893, 1, 0x22) + ROM_FILL(0x0930, 1, 0x22) + ROM_FILL(0x094a, 1, 0x22) + ROM_FILL(0x095a, 1, 0x22) + ROM_FILL(0x096a, 1, 0x22) + ROM_FILL(0x097b, 1, 0x22) + ROM_FILL(0x098f, 1, 0x22) + ROM_FILL(0x09a3, 1, 0x22) + ROM_FILL(0x09c0, 1, 0x22) + ROM_FILL(0x0a21, 1, 0x22) + ROM_FILL(0x0a54, 1, 0x22) + ROM_FILL(0x0a63, 1, 0x22) + ROM_FILL(0x0a73, 1, 0x22) + ROM_FILL(0x0a90, 1, 0x22) + ROM_FILL(0x0ae8, 1, 0x22) + ROM_FILL(0x0abf, 1, 0x22) + ROM_FILL(0x0ac7, 1, 0x22) + ROM_FILL(0x0b11, 1, 0x22) + ROM_FILL(0x0b7f, 1, 0x22) + ROM_FILL(0x0bf1, 1, 0x22) + ROM_FILL(0x0bf6, 1, 0x22) + ROM_FILL(0x0c4a, 1, 0x22) + ROM_FILL(0x0c59, 1, 0x22) + ROM_FILL(0x0c64, 1, 0x22) + ROM_FILL(0x0c99, 1, 0x22) + ROM_FILL(0x0ca8, 1, 0x22) + ROM_FILL(0x0cbd, 1, 0x22) + ROM_FILL(0x0dac, 1, 0x22) + ROM_FILL(0x0dca, 1, 0x22) + ROM_FILL(0x0e6a, 1, 0x22) + + ROM_REGION(0x20000, "program", 0) + ROM_LOAD("farwest_pistola.ic3", 0x00000, 0x20000, CRC(ad68a0e8) SHA1(157a6a84f31e05d289e2fc67099fcff2887a84b9)) + + // No EEPROM on this PCB +ROM_END + GAME(199?, microdar, 0, microdar, microdar, microdar_state, empty_init, ROT0, "Compumatic / Bifuca", "Microdar SPD", MACHINE_IS_SKELETON_MECHANICAL) +GAME(1997, cfarwest, 0, microdar, microdar, microdar_state, empty_init, ROT0, "Compumatic", "Far West", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index bc784375bfb..f8db685be1c 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -22608,6 +22608,7 @@ dm3270 // @source:microdar.cpp microdar // +cfarwest // (c) 1997 Compumatic @source:microdec.cpp md2 // -- cgit v1.2.3 From f16e2ef835d7986f982c127efc45c238d1c7db2c Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 4 Jul 2020 21:00:12 +0200 Subject: microdar.cpp: fixed validation error --- src/mame/drivers/microdar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/microdar.cpp b/src/mame/drivers/microdar.cpp index 287cef68e2c..b290dc6d996 100644 --- a/src/mame/drivers/microdar.cpp +++ b/src/mame/drivers/microdar.cpp @@ -315,5 +315,5 @@ ROM_START(cfarwest) // No EEPROM on this PCB ROM_END -GAME(199?, microdar, 0, microdar, microdar, microdar_state, empty_init, ROT0, "Compumatic / Bifuca", "Microdar SPD", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1997, cfarwest, 0, microdar, microdar, microdar_state, empty_init, ROT0, "Compumatic", "Far West", MACHINE_IS_SKELETON_MECHANICAL) +GAME(199?, microdar, 0, microdar, microdar, microdar_state, empty_init, ROT0, "Compumatic / Bifuca", "Microdar SPD", MACHINE_IS_SKELETON_MECHANICAL) +GAME(1997, cfarwest, 0, microdar, microdar, microdar_state, empty_init, ROT0, "Compumatic", "Far West (Compumatic)", MACHINE_IS_SKELETON_MECHANICAL) -- cgit v1.2.3 From 9cd4f31d8f3d5cee3697b764d7b3eb4b343a9bf8 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 4 Jul 2020 22:34:57 +0200 Subject: devices/machine/8042kbdc, mame/machine/s32comm: initialize variables which caused problems in debug devnoclear builds --- src/devices/machine/8042kbdc.cpp | 1 + src/mame/machine/s32comm.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index 18338dd14d9..b2ce8b6743e 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -72,6 +72,7 @@ void kbdc8042_device::device_start() m_last_write_to_control = 0; m_status_read_mode = 0; m_speaker = 0; + m_offset1 = 0; m_update_timer = timer_alloc(TIMER_UPDATE); m_update_timer->adjust(attotime::never); diff --git a/src/mame/machine/s32comm.cpp b/src/mame/machine/s32comm.cpp index 26797685c55..b53448b46d3 100644 --- a/src/mame/machine/s32comm.cpp +++ b/src/mame/machine/s32comm.cpp @@ -133,6 +133,8 @@ void s32comm_device::device_reset() m_zfg = 0; m_cn = 0; m_fg = 0; + + std::fill(std::begin(m_shared), std::end(m_shared), 0); } uint8_t s32comm_device::zfg_r(offs_t offset) -- cgit v1.2.3 From a647659aa80d391cdc4d167d45bc0c6985273183 Mon Sep 17 00:00:00 2001 From: MASH Date: Sun, 5 Jul 2020 02:13:27 +0100 Subject: Fixed arcade build (#6910) * Fixed arcade build Added special_gambl.cpp to arcade.flt * Fixed arcade build Added audio\special.cpp/h to arcade.lua --- scripts/target/mame/arcade.lua | 2 ++ src/mame/arcade.flt | 1 + 2 files changed, 3 insertions(+) diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 194e14655b8..1fed9499742 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -4984,6 +4984,8 @@ files { MAME_DIR .. "src/mame/drivers/smsmcorp.cpp", MAME_DIR .. "src/mame/drivers/sothello.cpp", MAME_DIR .. "src/mame/drivers/special_gambl.cpp", + MAME_DIR .. "src/mame/audio/special.cpp", + MAME_DIR .. "src/mame/audio/special.h", MAME_DIR .. "src/mame/drivers/spool99.cpp", MAME_DIR .. "src/mame/drivers/sprcros2.cpp", MAME_DIR .. "src/mame/drivers/sshot.cpp", diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt index 30bd4922eb0..5abdcf1ff85 100644 --- a/src/mame/arcade.flt +++ b/src/mame/arcade.flt @@ -1169,6 +1169,7 @@ spbactn.cpp spcforce.cpp spdheat.cpp spdodgeb.cpp +special_gambl.cpp spectra.cpp speedatk.cpp speedbal.cpp -- cgit v1.2.3 From 4f7c52ac1e7116ad2816d5ed541f3115c73eca1b Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Sat, 4 Jul 2020 20:11:53 -0700 Subject: sgi_mips_hdd: new software list additions (#6903) --- hash/sgi_mips_hdd.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hash/sgi_mips_hdd.xml b/hash/sgi_mips_hdd.xml index eab2f2065d6..f16a286c6bd 100644 --- a/hash/sgi_mips_hdd.xml +++ b/hash/sgi_mips_hdd.xml @@ -18,6 +18,17 @@ license:CC0 corresponding sgi_mips sets. --> + + IRIX 5.2 + 1994 + Silicon Graphics + + + + + + + IRIX 5.3 1994 -- cgit v1.2.3 From 2901f896ebf6e0a4bda7840fa79dddca95d3d9ca Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sun, 5 Jul 2020 08:18:44 +0200 Subject: bus/qbus/qbus.cpp: fixed missing initialization that was causing crashes in devnoclear debug builds --- src/devices/bus/qbus/qbus.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/devices/bus/qbus/qbus.cpp b/src/devices/bus/qbus/qbus.cpp index 293be5bcf27..8f00fb3e01e 100644 --- a/src/devices/bus/qbus/qbus.cpp +++ b/src/devices/bus/qbus/qbus.cpp @@ -57,6 +57,7 @@ qbus_slot_device::qbus_slot_device(const machine_config &mconfig, const char *ta m_write_birq6(*this), m_write_birq7(*this), m_write_bdmr(*this), + m_card(nullptr), m_bus(*this, DEVICE_SELF_OWNER) { } -- cgit v1.2.3 From ad6505ba636ecf8336eae91dce0b20bd5055b4ad Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sun, 5 Jul 2020 08:41:20 +0200 Subject: New clones marked as NOT_WORKING -------------------------------- Last Action Hero (1.04 France) [PinMAME] Added correct ROMs for pentacup2 [PinMAME] --- src/mame/drivers/de_3.cpp | 14 ++++++++++++++ src/mame/drivers/micropin.cpp | 8 ++++---- src/mame/mame.lst | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/de_3.cpp b/src/mame/drivers/de_3.cpp index d91f3c9a3a0..0feaccdfea5 100644 --- a/src/mame/drivers/de_3.cpp +++ b/src/mame/drivers/de_3.cpp @@ -823,6 +823,19 @@ ROM_START(lah_107) ROM_LOAD("lahsnd.u21", 0x080000, 0x40000, CRC(4571dc2e) SHA1(a1068cb080c30dbc07d164eddfc5dfd0afd52d3b)) ROM_END +ROM_START(lah_f104) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD("lahcpua.104", 0x0000, 0x10000, CRC(49b9e5e9) SHA1(cf6198e4c93ce839dc6e5231090d4ca56e9bdea2)) + ROM_REGION(0x10000, "cpu3", ROMREGION_ERASEFF) + ROM_REGION(0x80000, "gfx3", 0) + ROM_LOAD("lahdispf.101", 0x00000, 0x80000, CRC(826a0a8b) SHA1(daad062edd8b6f468991d941e40d86711f8505df)) + ROM_REGION(0x010000, "soundcpu", 0) + ROM_LOAD("lahsnd.u7", 0x0000, 0x10000, CRC(0279c45b) SHA1(14daf6b711d1936352209e90240f51812ebe76e0)) + ROM_REGION(0x1000000, "bsmt", 0) + ROM_LOAD("lahsnd.u17", 0x000000, 0x80000, CRC(d0c15fa6) SHA1(5dcd13b578fa53c82353cda5aa774ca216c5ddfe)) + ROM_LOAD("lahsnd.u21", 0x080000, 0x40000, CRC(4571dc2e) SHA1(a1068cb080c30dbc07d164eddfc5dfd0afd52d3b)) +ROM_END + /*---------------------------------------------------------------- / Lethal Weapon 3 - CPU Rev 3 /DMD Type 2 512K Rom - 64K CPU Rom /---------------------------------------------------------------*/ @@ -1387,6 +1400,7 @@ GAME(1993, lah_l108, lah_112, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, GAME(1993, lah_110, lah_112, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, "Data East", "Last Action Hero (1.10)", MACHINE_IS_SKELETON_MECHANICAL) GAME(1993, lah_106c, lah_112, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, "Data East", "Last Action Hero (1.06 Canada)", MACHINE_IS_SKELETON_MECHANICAL) GAME(1993, lah_107, lah_112, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, "Data East", "Last Action Hero (1.07)", MACHINE_IS_SKELETON_MECHANICAL) +GAME(1993, lah_f104, lah_112, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, "Data East", "Last Action Hero (1.04 France)", MACHINE_IS_SKELETON_MECHANICAL) GAME(1992, lw3_208, 0, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, "Data East", "Lethal Weapon 3 (2.08)", MACHINE_IS_SKELETON_MECHANICAL) GAME(1992, lw3_207, lw3_208, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, "Data East", "Lethal Weapon 3 (2.07)", MACHINE_IS_SKELETON_MECHANICAL) GAME(1992, lw3_207c, lw3_208, de_3_dmd2, de_3, de_3_state, empty_init, ROT0, "Data East", "Lethal Weapon 3 (2.07 Canada)", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/micropin.cpp b/src/mame/drivers/micropin.cpp index a4a08825974..d8dd1a32538 100644 --- a/src/mame/drivers/micropin.cpp +++ b/src/mame/drivers/micropin.cpp @@ -365,10 +365,10 @@ ROM_END ROM_START(pentacup2) ROM_REGION(0x2000, "v2cpu", 0) - ROM_LOAD("micro_1.bin", 0x0000, 0x0800, CRC(4d6dc218) SHA1(745c553f3a42124f925ca8f2e52fd08d05999594)) - ROM_LOAD("micro_2.bin", 0x0800, 0x0800, CRC(33cd226d) SHA1(d1dff8445a0f35da09d560a16038c969845ff21f)) - ROM_LOAD("micro_3.bin", 0x1000, 0x0800, CRC(997bde74) SHA1(c3ea33f7afbdc7f2a22798a13ec323d7c6628dd4)) - ROM_LOAD("micro_4.bin", 0x1800, 0x0800, CRC(a804e7d6) SHA1(f414d6a5308266744645849940c00cd422e920d2)) + ROM_LOAD("micro_1.bin", 0x0000, 0x0800, CRC(62d04111) SHA1(f0ce705c06a43a81293d8610394ce7c4143148e9)) + ROM_LOAD("micro_2.bin", 0x0800, 0x0800, CRC(832e4223) SHA1(1409b0c7de35012b9d0eba9bb73b52aecc93c0f2)) + ROM_LOAD("micro_3.bin", 0x1000, 0x0800, CRC(9d5d04d1) SHA1(1af32c418b73ee457f06ee9a8362cfec75e61f30)) + ROM_LOAD("micro_4.bin", 0x1800, 0x0800, CRC(358ffd6a) SHA1(f5299e39d991bf882f827a62a1d9bb18e46dbcfc)) // 2 undumped proms DMA-01, DMA-02 ROM_END diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f8db685be1c..666639d2d80 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -11768,6 +11768,7 @@ lah_106c // lah_107 // lah_110 // lah_112 // +lah_f104 // lah_l104 // lah_l108 // lw3_200 // -- cgit v1.2.3 From 9e86f5e86612c4f61b27e5ada86ac9bdebcbc272 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sun, 5 Jul 2020 11:40:22 +0200 Subject: netlist: Add basic unit testing support. * Add google test syntax compatible unit testing support. This is a very limited subset of the google test framework and not intended ever to be a replacement. Adding a dependency to google test for the functionality required was considered to be an overkill. * nltool -c tests runs unit tests if linked in. This is *not* the case for the version of nltool compiled with TOOLS=1. * Added unit tests for plib::pfunction. --- src/lib/netlist/build/makefile | 14 +++- src/lib/netlist/plib/ptests.h | 140 +++++++++++++++++++++++++++++++ src/lib/netlist/prg/nltool.cpp | 13 ++- src/lib/netlist/tests/test_pfunction.cpp | 43 ++++++++++ 4 files changed, 205 insertions(+), 5 deletions(-) create mode 100644 src/lib/netlist/plib/ptests.h create mode 100644 src/lib/netlist/tests/test_pfunction.cpp diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 1d442953fb6..3591c5317b2 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -103,6 +103,7 @@ TARGETS = nltool$(EXESUFFIX) nlwav$(EXESUFFIX) NLOBJ = $(OBJ) POBJ = $(OBJ)/plib +TESTOBJ = $(OBJ)/tests DEPEND = $(OBJ)/.depend @@ -113,12 +114,13 @@ OBJDIRS = $(OBJ) \ $(OBJ)/plib \ $(OBJ)/devices \ $(OBJ)/macro \ + $(OBJ)/tests \ $(OBJ)/tools \ $(OBJ)/prg \ $(OBJ)/generated \ -OBJS = $(POBJS) $(NLOBJS) +OBJS = $(POBJS) $(NLOBJS) $(TESTOBJS) POBJS := \ $(POBJ)/pstring.o \ @@ -212,6 +214,9 @@ NLOBJS := \ $(NLOBJ)/macro/nlm_roms.o \ $(NLOBJ)/macro/nlm_ttl74xx.o \ +TESTOBJS := \ + $(TESTOBJ)/test_pfunction.o \ + VSBUILDS = \ $(VSBUILD/netlistlib.vcxproj) \ $(VSBUILD/netlistlib.vcxproj.user \ @@ -234,7 +239,7 @@ ALL_TIDY_FILES = $(ALL_OBJS:.o=.json) SOURCES = $(patsubst $(OBJ)%, $(SRC)%, $(ALL_OBJS:.o=.cpp)) ALLFILES = $(SOURCES) $(VSBUILDS) $(DOCS) -MAKEFILE_TARGETS_WITHOUT_INCLUDE := gcc9 clang clang-5 mingw doc native maketree tidy +MAKEFILE_TARGETS_WITHOUT_INCLUDE := gcc9 clang clang-5 mingw doc native maketree tidy runtests # git archive HEAD --prefix=project-name-version/ \ @@ -244,7 +249,7 @@ MAKEFILE_TARGETS_WITHOUT_INCLUDE := gcc9 clang clang-5 mingw doc native maketree # PHONY #------------------------------------------------- -.PHONY: all gcc9 clang clang-5 mingw doc native maketree $(DEPEND) depend +.PHONY: all gcc9 clang clang-5 mingw doc native maketree $(DEPEND) depend runtests #------------------------------------------------- # all @@ -328,6 +333,9 @@ nvcc: -Xcompiler -O6 -Xcompiler -march=native -ccbin g++-8 " \ DEPENDCC=g++ +runtests: + ./nltool$(EXESUFFIX) -c tests + tidy_db: compile_commands_prefix $(ALL_TIDY_FILES) compile_commands_postfix # diff --git a/src/lib/netlist/plib/ptests.h b/src/lib/netlist/plib/ptests.h new file mode 100644 index 00000000000..1f4bbd5e866 --- /dev/null +++ b/src/lib/netlist/plib/ptests.h @@ -0,0 +1,140 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud + +#ifndef PTESTS_H_ +#define PTESTS_H_ + +/// +/// \file ptests.h +/// +/// google tests compatible (hopefully) test macros. This is work in progress! +/// + +#include +#include +#include +#include + +#define EXPECT_EQ(exp1, exp2) PINT_EXPECT(eq, exp1, exp2) +#define EXPECT_NE(exp1, exp2) PINT_EXPECT(ne, exp1, exp2) +#define EXPECT_GT(exp1, exp2) PINT_EXPECT(gt, exp1, exp2) +#define EXPECT_LT(exp1, exp2) PINT_EXPECT(lt, exp1, exp2) +#define EXPECT_GE(exp1, exp2) PINT_EXPECT(ge, exp1, exp2) +#define EXPECT_LE(exp1, exp2) PINT_EXPECT(le, exp1, exp2) + +#define EXPECT_TRUE(exp1) PINT_EXPECT(eq, exp1, true) +#define EXPECT_FALSE(exp1) PINT_EXPECT(eq, exp1, false) + +#define TEST(name, desc) PINT_TEST(name, desc) +#define TEST_F(name, desc) PINT_TEST_F(name, desc, name) +#define RUN_ALL_TESTS() plib::testing::run_all_tests() + +#define PINT_TEST(name, desc) PINT_TEST_F(name, desc, plib::testing::Test) + +#define PINT_TEST_F(name, desc, base) \ + class name ## _ ## desc : public base \ + { public:\ + void desc (); \ + void run() override { desc (); } \ + }; \ + plib::testing::reg_entry name ## _ ## desc ## _reg(#name, #desc); \ + void name ## _ ## desc :: desc () + +#define PINT_EXPECT(comp, exp1, exp2) \ + if (!plib::testing::internal_assert(plib::testing::comp_ ## comp (), # exp1, # exp2, exp1, exp2)) \ + std::cout << __FILE__ << ":" << __LINE__ << ":1: error: test failed\n"; + +namespace plib +{ +namespace testing +{ + + class Test + { + public: + virtual ~Test() {} + virtual void run() {} + virtual void SetUp() {} + virtual void TearDown() {} + }; + + struct reg_entry_base + { + using list_t = std::vector; + reg_entry_base(const std::string &n, const std::string &d) + : name(n), desc(d) + { + registry().push_back(this); + } + virtual ~reg_entry_base() = default; + virtual Test *create() { return nullptr; } + + std::string name; + std::string desc; + public: + static list_t & registry() + { + static list_t prlist; + return prlist; + } + }; + + template + struct reg_entry : public reg_entry_base + { + using reg_entry_base::reg_entry_base; + + virtual Test *create() override { return new T(); } + }; + + template + bool internal_assert(C comp, + const char* exp1, const char* exp2, + const T1& val1, const T2& val2) + { + if (comp(val1, val2)) + { + std::cout << "\tOK: " << exp1 << " " << C::opstr() << " " << exp2 << "\n"; + return true; + } + std::cout << "\tFAIL: " << exp1 << " " << C::opstr() << " " << exp2 + << " <" << val1 << ">,<" << val2 << ">\n"; + return false; + } + + static inline int run_all_tests() + { + for (auto &e : reg_entry_base::registry()) + { + std::cout << e->name << "::" << e->desc << ":\n"; + Test *t = e->create(); + t->SetUp(); + t->run(); + t->TearDown(); + delete t; + } + return 0; + } + +#define DEF_COMP(name, op) \ + struct comp_ ## name \ + { \ + static const char * opstr() { return #op ; } \ + template \ + bool operator()(const T1 &v1, const T2 &v2) { return v1 op v2; } \ + }; \ + + DEF_COMP(eq, ==) + DEF_COMP(ne, !=) + DEF_COMP(gt, >) + DEF_COMP(lt, <) + DEF_COMP(ge, >=) + DEF_COMP(le, <=) + +#undef DEF_COMP + +} // namespace testing +} // namespace plib + + +#endif // PTESTS_H_ diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index e177b1e0429..d849e15c755 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -20,6 +20,8 @@ #include "netlist/solver/nld_solver.h" #include "netlist/tools/nl_convert.h" +#include "plib/ptests.h" + #include // scanf #include // scanf #include @@ -44,7 +46,7 @@ public: m_errors(0), opt_grp1(*this, "General options", "The following options apply to all commands."), - opt_cmd (*this, "c", "cmd", 0, std::vector({"run","validate","convert","listdevices","static","header","docheader"}), "run|validate|convert|listdevices|static|header|docheader"), + opt_cmd (*this, "c", "cmd", 0, std::vector({"run","validate","convert","listdevices","static","header","docheader","tests"}), "run|validate|convert|listdevices|static|header|docheader|tests"), opt_includes(*this, "I", "include", "Add the directory to the list of directories to be searched for header files. This option may be specified repeatedly."), opt_defines(*this, "D", "define", "predefine value as macro, e.g. -Dname=value. If '=value' is omitted predefine it as 1. This option may be specified repeatedly."), opt_rfolders(*this, "r", "rom", "where to look for data files"), @@ -94,7 +96,9 @@ public: opt_ex3(*this, "nltool --cmd=header --tab-width=8 --line-width=80", "Create the header file needed for including netlists as code."), opt_ex4(*this, "nltool --cmd static --output src/lib/netlist/generated/static_solvers.cpp src/mame/audio/nl_*.cpp src/mame/machine/nl_*.cpp", - "Create static solvers for the MAME project.") + "Create static solvers for the MAME project."), + opt_ex5(*this, "nltool --cmd tests", + "Run unit tests. In case the unit tests are not linked in, this will do nothing.") {} int execute() override; @@ -158,6 +162,7 @@ private: plib::option_example opt_ex2; plib::option_example opt_ex3; plib::option_example opt_ex4; + plib::option_example opt_ex5; struct compile_map_entry { @@ -1267,6 +1272,10 @@ int tool_app_t::execute() create_docheader(); else if (cmd == "convert") convert(); + else if (cmd == "tests") + { + return RUN_ALL_TESTS(); + } else { perr("Unknown command {}\n", cmd.c_str()); diff --git a/src/lib/netlist/tests/test_pfunction.cpp b/src/lib/netlist/tests/test_pfunction.cpp new file mode 100644 index 00000000000..847865b4a4f --- /dev/null +++ b/src/lib/netlist/tests/test_pfunction.cpp @@ -0,0 +1,43 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud + +/// +/// \file pfunction_test.cpp +/// +/// tests for pfunction +/// + +#include "plib/ptests.h" + +#include "plib/pfunction.h" + +#define PFUNCEXPECT(formula, val) \ + EXPECT_EQ(val, plib::pfunction(formula)()); + +TEST(pfunction, operators) +{ + PFUNCEXPECT("1==1", 1.0) + PFUNCEXPECT("1 *0 == 2-1-1", 1.0) + PFUNCEXPECT("0!=1", 1.0) + PFUNCEXPECT("0<1", 1.0) + PFUNCEXPECT("1>0", 1.0) + PFUNCEXPECT("0<=1", 1.0) + PFUNCEXPECT("1>=0", 1.0) + PFUNCEXPECT("1<=1", 1.0) + PFUNCEXPECT("1>=1", 1.0) + EXPECT_EQ(1.0, plib::pfunction("0!=a", {"a"})({1.0})); +} + +TEST(pfunction, func_if) +{ + PFUNCEXPECT("if(1>0, 2, 0)", 2.0) + PFUNCEXPECT("if(0>1, 2, 3)", 3.0) + PFUNCEXPECT("if(sin(1)>0, 2, 3)", 3.0) // fail + EXPECT_EQ( 1.0, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,-1.0,3.0})); + EXPECT_EQ(-0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,1.0,1.0})); + EXPECT_EQ( 0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({3.0,1.0,1.0})); + //EXPECT(plib::pfunction("if(A2>2.5, A1, if(A0>2.5,1,(0-1)))", {"A0","A1","A2"})({1.0,1.0,1.0}), -1.0) + //PFUNCEXPECT("-1>-2", 1.0) + EXPECT_TRUE(1.0 == plib::pfunction("0!=a", {"a"})({1.0})); +} + -- cgit v1.2.3 From e339a280f4292aa3dc74baffb0c8a22018a14711 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sun, 5 Jul 2020 15:49:59 +0200 Subject: netlist: remove soft reset support. * Electronic circuits and base components like resistors or capacitors do not have a reset line. You can use them to create reset circuits. There is thus no point to support soft reset, the equivalent to pressing the reset button. * Fixed some bugs around reset and start up logic. * This also fixes the "scramble F3" crash. --- src/devices/machine/netlist.cpp | 22 ++++++++++++++++++---- src/devices/machine/netlist.h | 1 + src/devices/video/fixfreq.cpp | 4 ++-- src/devices/video/fixfreq.h | 15 ++++----------- src/lib/netlist/analog/nlid_twoterm.h | 9 +++++++++ src/lib/netlist/nl_base.cpp | 18 ++++++++++++++---- src/lib/netlist/nl_base.h | 23 ++++++++++++++++++----- src/lib/netlist/nl_interface.h | 9 ++++----- src/lib/netlist/prg/nltool.cpp | 2 ++ src/lib/netlist/solver/nld_matrix_solver.cpp | 2 +- 10 files changed, 73 insertions(+), 32 deletions(-) diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index cf839c876ea..757d084c415 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -824,8 +824,10 @@ void netlist_mame_stream_output_device::device_start() void netlist_mame_stream_output_device::device_reset() { LOGDEVCALLS("reset %s\n", name()); +#if 0 m_cur = 0.0; m_last_buffer_time = netlist::netlist_time_ext::zero(); +#endif } void netlist_mame_stream_output_device::sound_update_fill(std::size_t samples, stream_sample_t *target) @@ -906,6 +908,7 @@ netlist_mame_device::netlist_mame_device(const machine_config &mconfig, device_t , m_attotime_per_clock(attotime::zero) , m_old(netlist::netlist_time_ext::zero()) , m_setup_func(nullptr) + , m_device_reset_called(false) { } @@ -1045,6 +1048,10 @@ void netlist_mame_device::device_start() m_old = netlist::netlist_time_ext::zero(); m_rem = netlist::netlist_time_ext::zero(); + m_cur_time = attotime::zero; + + m_device_reset_called = false; + LOGDEVCALLS("device_start exit\n"); } @@ -1061,10 +1068,17 @@ void netlist_mame_device::device_clock_changed() void netlist_mame_device::device_reset() { LOGDEVCALLS("device_reset\n"); - m_cur_time = attotime::zero; - m_old = netlist::netlist_time_ext::zero(); - m_rem = netlist::netlist_time_ext::zero(); - netlist().exec().reset(); + if (!m_device_reset_called) + { + // netlists don't have a reset line, doing a soft-reset is pointless + // the only reason we call these here once after device_start + // is that netlist input devices may be started after the netlist device + // and because the startup code may trigger actions which need all + // devices set up. + netlist().free_setup_resources(); + netlist().exec().reset(); + m_device_reset_called = true; + } } void netlist_mame_device::device_stop() diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h index 4486eb729a6..22e3a185fe7 100644 --- a/src/devices/machine/netlist.h +++ b/src/devices/machine/netlist.h @@ -127,6 +127,7 @@ private: std::unique_ptr m_netlist; func_type m_setup_func; + bool m_device_reset_called; }; // ---------------------------------------------------------------------------------------- diff --git a/src/devices/video/fixfreq.cpp b/src/devices/video/fixfreq.cpp index 732a6994ae4..44c332c066e 100644 --- a/src/devices/video/fixfreq.cpp +++ b/src/devices/video/fixfreq.cpp @@ -119,7 +119,7 @@ void fixedfreq_monitor_state::update_sync_channel(const time_type &time, const d /* falling composite */ //LOG("HSYNC down %f %d %f\n", time * 1e6, m_last_x, m_sync_signal); } - m_last_sync = newval; + m_last_sync_val = newval; m_last_sync_time = time; } @@ -237,7 +237,7 @@ void fixedfreq_device::device_start() m_state.start(); // FIXME: will be done by netlist going forward - save_item(NAME(m_state.m_last_sync)); + save_item(NAME(m_state.m_last_sync_val)); save_item(NAME(m_state.m_last_x)); save_item(NAME(m_state.m_last_y)); save_item(NAME(m_state.m_last_sync_time)); diff --git a/src/devices/video/fixfreq.h b/src/devices/video/fixfreq.h index 6d1da4f22f7..6deeab2f639 100644 --- a/src/devices/video/fixfreq.h +++ b/src/devices/video/fixfreq.h @@ -123,7 +123,7 @@ struct fixedfreq_monitor_state fixedfreq_monitor_state(fixedfreq_monitor_desc &desc, fixedfreq_monitor_intf &intf) : m_desc(desc), m_intf(intf), - m_last_sync(0), + m_last_sync_val(0), m_col(0), m_last_x(0), m_last_y(0), @@ -145,7 +145,7 @@ struct fixedfreq_monitor_state // FIXME: once moved to netlist this may no longer be necessary. // Only copies constructor init - m_last_sync = 0.0; + m_last_sync_val = 0.0; m_col = rgb_t(0,0,0); m_last_x = 0; m_last_y = 0; @@ -177,18 +177,11 @@ struct fixedfreq_monitor_state void reset() { - m_last_sync = 0; + m_last_sync_val = 0; m_col = 0; m_last_x = 0; m_last_y = 0; - //m_last_sync_time = time_type(0); - //m_line_time = time_type(0); - //m_last_hsync_time = time_type(0); - //m_last_vsync_time = time_type(0); - //m_clock_period = time_type(0); m_vsync_filter = 0; - //m_vsync_threshold = 0; - //m_vsync_filter_timeconst = 0; m_sig_vsync = 0; m_sig_composite = 0; m_sig_field = 0; @@ -206,7 +199,7 @@ struct fixedfreq_monitor_state const fixedfreq_monitor_desc &m_desc; fixedfreq_monitor_intf &m_intf; - double m_last_sync; + double m_last_sync_val; uint32_t m_col; float m_last_x; int m_last_y; diff --git a/src/lib/netlist/analog/nlid_twoterm.h b/src/lib/netlist/analog/nlid_twoterm.h index de2a69a23f7..12a8ce3ffa1 100644 --- a/src/lib/netlist/analog/nlid_twoterm.h +++ b/src/lib/netlist/analog/nlid_twoterm.h @@ -126,6 +126,14 @@ namespace analog m_N.set_go_gt_I(a21, a22, rhs2); } + void clear_mat() const noexcept + { + const auto z = nlconst::zero(); + // GO, GT, I + m_P.set_go_gt_I(z, z, z); + m_N.set_go_gt_I(z, z, z); + } + /// \brief Get a const reference to the m_P terminal /// /// This is typically called during initialization to connect @@ -317,6 +325,7 @@ namespace analog NETLIB_RESETI() { m_cap.setparams(exec().gmin()); + clear_mat(); } /// \brief Set capacitance diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index f5e276c7601..f546056ec30 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -272,19 +272,24 @@ namespace netlist log().debug("Searching for solver\n"); m_solver = m_state.get_single_device("solver"); - m_time = netlist_time_ext::zero(); + // Don't reset time + //m_time = netlist_time_ext::zero(); m_queue.clear(); if (m_mainclock != nullptr) - m_mainclock->m_Q.net().set_next_scheduled_time(netlist_time_ext::zero()); + m_mainclock->m_Q.net().set_next_scheduled_time(m_time); //if (m_solver != nullptr) // m_solver->reset(); m_state.reset(); } - void netlist_state_t::reset() + void netlist_state_t::free_setup_resources() { m_setup = nullptr; + } + + void netlist_state_t::reset() + { // Reset all nets once ! log().verbose("Call reset on all nets:"); for (auto & n : nets()) @@ -637,7 +642,7 @@ namespace netlist void detail::net_t::reset() noexcept { - m_next_scheduled_time = netlist_time_ext::zero(); + m_next_scheduled_time = exec().time(); m_in_queue = queue_status::DELIVERED; m_new_Q = 0; @@ -680,6 +685,11 @@ namespace netlist { } + void analog_net_t::reset() noexcept + { + net_t::reset(); + m_cur_Analog = nlconst::zero(); + } // ---------------------------------------------------------------------------------------- // core_terminal_t // ---------------------------------------------------------------------------------------- diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 4e2c84794dc..0891e81c6b4 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -691,7 +691,7 @@ namespace netlist virtual ~net_t() noexcept = default; - void reset() noexcept; + virtual void reset() noexcept; void toggle_new_Q() noexcept { m_new_Q = (m_cur_Q ^ 1); } @@ -952,6 +952,8 @@ namespace netlist analog_net_t(netlist_state_t &nl, const pstring &aname, detail::core_terminal_t *railterminal = nullptr); + void reset() noexcept override; + nl_fptype Q_Analog() const noexcept { return m_cur_Analog; } void set_Q_Analog(nl_fptype v) noexcept { m_cur_Analog = v; } // used by solver code ... @@ -1744,8 +1746,14 @@ namespace netlist /// void print_stats(stats_info &si) const; + /// \brief call reset on all netlist components + /// void reset(); + /// \brief prior to running free no longer needed resources + /// + void free_setup_resources(); + private: device_arena m_pool; // must be deleted last! @@ -1785,10 +1793,7 @@ namespace netlist m_inc = netlist_time::from_fp(plib::reciprocal(m_freq()*nlconst::two())); } - NETLIB_RESETI() - { - m_Q.net().set_next_scheduled_time(netlist_time_ext::zero()); - } + NETLIB_RESETI(); NETLIB_UPDATE_PARAMI() { @@ -2147,6 +2152,14 @@ namespace netlist analog_input_t m_GND; }; + namespace devices + { + inline NETLIB_RESET(mainclock) + { + m_Q.net().set_next_scheduled_time(exec().time()); + } + } // namespace devices + // ----------------------------------------------------------------------------- // Hot section // diff --git a/src/lib/netlist/nl_interface.h b/src/lib/netlist/nl_interface.h index dba7bd5248a..fc87855d014 100644 --- a/src/lib/netlist/nl_interface.h +++ b/src/lib/netlist/nl_interface.h @@ -149,14 +149,13 @@ namespace netlist , m_param_offsets(*this, 0, "OFFSET{}", 0.0) { connect(m_feedback, m_Q); + for (auto & elem : m_buffers) + elem = nullptr; } protected: NETLIB_RESETI() { - m_pos = 0; - for (auto & elem : m_buffers) - elem = nullptr; } NETLIB_UPDATEI() @@ -232,8 +231,8 @@ namespace netlist object_array_t m_param_names; object_array_t m_param_mults; object_array_t m_param_offsets; - std::array m_params; - std::array m_buffers; + std::array m_params; + std::array m_buffers; }; } // namespace interface diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index d849e15c755..a4946c00d3e 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -478,6 +478,7 @@ void tool_app_t::run() // Inputs must be read before reset -> will clear setup and parser inps = read_input(nt.setup(), opt_inp()); + nt.free_setup_resources(); nt.exec().reset(); ttr = netlist::netlist_time_ext::from_fp(opt_ttr()); @@ -608,6 +609,7 @@ void tool_app_t::compile_one_and_add_to_map(const pstring &file, // need to reset ... + nt.free_setup_resources(); nt.exec().reset(); auto mp(nt.exec().solver()->create_solver_code(target)); diff --git a/src/lib/netlist/solver/nld_matrix_solver.cpp b/src/lib/netlist/solver/nld_matrix_solver.cpp index ec457b934d3..10ce81754ec 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.cpp +++ b/src/lib/netlist/solver/nld_matrix_solver.cpp @@ -428,7 +428,7 @@ namespace solver void matrix_solver_t::reset() { - m_last_step = netlist_time_ext::zero(); + //m_last_step = netlist_time_ext::zero(); } void matrix_solver_t::step(netlist_time delta) noexcept -- cgit v1.2.3 From 7c730c7be381a5c178f6b35f3e11cf8166342d24 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Mon, 6 Jul 2020 00:07:40 +1000 Subject: ondra: removed bank2 since it is just fixed ram --- src/mame/drivers/ondra.cpp | 2 +- src/mame/includes/ondra.h | 2 -- src/mame/machine/ondra.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mame/drivers/ondra.cpp b/src/mame/drivers/ondra.cpp index b97086182c6..947043689ec 100644 --- a/src/mame/drivers/ondra.cpp +++ b/src/mame/drivers/ondra.cpp @@ -35,7 +35,7 @@ ToDo: void ondra_state::mem_map(address_map &map) { map(0x0000, 0x3fff).bankrw("bank1"); - map(0x4000, 0xdfff).bankrw("bank2"); + map(0x4000, 0xdfff).ram(); map(0xe000, 0xffff).bankrw("bank3"); } diff --git a/src/mame/includes/ondra.h b/src/mame/includes/ondra.h index c3ec2d4a9b4..cbd06467788 100644 --- a/src/mame/includes/ondra.h +++ b/src/mame/includes/ondra.h @@ -24,7 +24,6 @@ public: , m_ram(*this, RAM_TAG) , m_rom(*this, "maincpu") , m_bank1(*this, "bank1") - , m_bank2(*this, "bank2") , m_bank3(*this, "bank3") , m_beep(*this, "beeper") , m_io_keyboard(*this, "LINE%u", 0U) @@ -58,7 +57,6 @@ private: required_device m_ram; required_memory_region m_rom; required_memory_bank m_bank1; - required_memory_bank m_bank2; required_memory_bank m_bank3; required_device m_beep; required_ioport_array<10> m_io_keyboard; diff --git a/src/mame/machine/ondra.cpp b/src/mame/machine/ondra.cpp index 75c9875f9a5..a525537b609 100644 --- a/src/mame/machine/ondra.cpp +++ b/src/mame/machine/ondra.cpp @@ -118,7 +118,6 @@ void ondra_state::machine_reset() m_bank_status = 0; m_bank_old = 0xff; update_banks(); - m_bank2->set_base(m_ram->pointer() + 0x4000); } void ondra_state::machine_start() -- cgit v1.2.3 From 4ff68576b75afeecff27b184bb9bfcaec7dc2c58 Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Sun, 5 Jul 2020 16:54:16 +0200 Subject: -m6809: Still perform an IRQ acknowledge cycle on software interrupts. Fixes Fairlight CMI IIx memory-map diagnostics. [Ryan Holtz] --- src/devices/cpu/m6809/base6x09.ops | 3 +++ src/devices/cpu/m6809/m6809.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/devices/cpu/m6809/base6x09.ops b/src/devices/cpu/m6809/base6x09.ops index d41df55ecef..7e29ba116e8 100644 --- a/src/devices/cpu/m6809/base6x09.ops +++ b/src/devices/cpu/m6809/base6x09.ops @@ -504,6 +504,7 @@ SWI: // doesn't use SOFTWARE_INTERRUPT label because SWI will // inhibit IRQ/FIRQ set_ea(VECTOR_SWI); + standard_irq_callback(M6809_SWI); m_cc |= CC_E; set_regop16(m_s); m_temp.w = entire_state_registers(); @@ -513,10 +514,12 @@ SWI: SWI2: set_ea(VECTOR_SWI2); + standard_irq_callback(M6809_SWI); goto SOFTWARE_INTERRUPT; SWI3: set_ea(VECTOR_SWI3); + standard_irq_callback(M6809_SWI); goto SOFTWARE_INTERRUPT; SOFTWARE_INTERRUPT: diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h index 50ceef45615..de8e5988236 100644 --- a/src/devices/cpu/m6809/m6809.h +++ b/src/devices/cpu/m6809/m6809.h @@ -332,5 +332,6 @@ enum #define M6809_IRQ_LINE 0 /* IRQ line number */ #define M6809_FIRQ_LINE 1 /* FIRQ line number */ +#define M6809_SWI 2 /* Virtual SWI line to be used during SWI acknowledge cycle */ #endif // MAME_CPU_M6809_M6809_H -- cgit v1.2.3 From b154888e582742695d0bfa7c685ace30da4703b8 Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Sun, 5 Jul 2020 16:54:37 +0200 Subject: -cmi01a: Initial framework for ticking envelope timer. [Ryan Holtz] --- src/mame/audio/cmi01a.cpp | 86 ++++++++++++++++++++++++++++++++++++----------- src/mame/audio/cmi01a.h | 10 ++++++ 2 files changed, 76 insertions(+), 20 deletions(-) diff --git a/src/mame/audio/cmi01a.cpp b/src/mame/audio/cmi01a.cpp index 37fa308d452..3fc6196addf 100644 --- a/src/mame/audio/cmi01a.cpp +++ b/src/mame/audio/cmi01a.cpp @@ -50,6 +50,8 @@ void cmi01a_device::device_add_mconfig(machine_config &config) PTM6840(config, m_ptm, DERIVED_CLOCK(1, 1)); // ptm_cmi01a_config m_ptm->o1_callback().set(FUNC(cmi01a_device::ptm_o1)); + m_ptm->o2_callback().set(FUNC(cmi01a_device::ptm_o2)); + m_ptm->o3_callback().set(FUNC(cmi01a_device::ptm_o3)); m_ptm->irq_callback().set(FUNC(cmi01a_device::ptm_irq)); INPUT_MERGER_ANY_HIGH(config, m_irq_merger).output_handler().set(FUNC(cmi01a_device::cmi01a_irq)); @@ -115,11 +117,15 @@ void cmi01a_device::device_reset() m_ws = 0; m_dir = 0; m_pia0_cb2_state = 1; + m_zx_flag = 0; m_freq = 0.0; m_status = 0; m_ptm_o1 = 0; + m_ptm_o2 = 0; + m_ptm_o3 = 0; + m_eclk = false; m_zx_timer->adjust(attotime::never); m_eosi_timer->adjust(attotime::never); @@ -186,35 +192,62 @@ void cmi01a_device::device_timer(emu_timer &timer, device_timer_id id, int param void cmi01a_device::eosi_timer_cb() { - m_pia[1]->cb1_w(0); + m_segment_cnt &= ~0x4000; // printf("End of sound\n"); } void cmi01a_device::zx_timer_cb() { - /* Set ZX */ - if (m_zx_flag == 0) - m_pia[1]->ca1_w(1); - else - m_pia[1]->ca1_w(0); - + // Toggle ZX m_zx_flag ^= 1; + // Update ZX input to PIA 1 + m_pia[1]->ca1_w(m_zx_flag); + + // 74LS74 A12 (1) is clocked by /ZX, so a 1->0 transition of the ZX flag is a positive clock transition if (m_zx_flag == 0) { - /* Low to high transition - clock flip flop */ - int op = m_ptm_o1; - - /* Set /ZCINT */ - if (op != m_zx_ff) + // Pulse /ZCINT if the O1 output of the PTM has changed + if (m_ptm_o1 != m_zx_ff) m_pia[0]->ca1_w(0); - m_zx_ff = op; + m_zx_ff = m_ptm_o1; m_pia[0]->ca1_w(1); + + // Update ECLK + bool eclk = (m_ptm_o2 && m_zx_ff) || (m_ptm_o3 && !m_zx_ff); + set_eclk(eclk); } } +void cmi01a_device::tick_ediv() +{ +} + +void cmi01a_device::set_eclk(bool eclk) +{ + bool old_eclk = m_eclk; + m_eclk = eclk; + + if (old_eclk == m_eclk) + return; + + tick_ediv(); + + // A B !(A && B) !A || !B + // 0 0 1 1 + // 0 1 1 1 + // 1 0 1 1 + // 1 1 0 0 + + //const bool load = (m_status & CHANNEL_STATUS_LOAD); + //const bool a = !load || !eclk; + //const bool b = load || m_ediv_out; + + //const bool div_clk = !a || !b; +} + void cmi01a_device::run_voice() { int val_a = m_pia[1]->a_output(); @@ -253,7 +286,8 @@ void cmi01a_device::run_voice() m_stream->set_sample_rate(cfreq); - // Set timers and things? + // Set timers and things + m_zx_flag = 0; attotime zx_period = attotime::from_ticks(64, cfreq); m_zx_timer->adjust(zx_period, 0, zx_period); @@ -324,17 +358,16 @@ void cmi01a_device::update_wave_addr(int inc) ++m_segment_cnt; /* Update end of sound interrupt flag */ - m_pia[1]->cb1_w((m_segment_cnt & 0x4000) >> 14); + //m_pia[1]->cb1_w((m_segment_cnt & 0x4000) >> 14); /* TODO Update zero crossing flag */ - m_pia[1]->ca1_w((m_segment_cnt & 0x40) >> 6); + //m_pia[1]->ca1_w((m_segment_cnt & 0x40) >> 6); /* Clock a latch on a transition */ if ((old_cnt & 0x40) && !(m_segment_cnt & 0x40)) { - // TODO: ECLK - m_pia[1]->ca2_w(1); - m_pia[1]->ca2_w(0); + //m_pia[1]->ca2_w(1); + //m_pia[1]->ca2_w(0); } /* Zero crossing interrupt is a pulse */ @@ -348,11 +381,24 @@ WRITE_LINE_MEMBER( cmi01a_device::ptm_irq ) WRITE_LINE_MEMBER( cmi01a_device::ptm_o1 ) { m_ptm_o1 = state; + // TODO: Update ECLK +} + +WRITE_LINE_MEMBER( cmi01a_device::ptm_o2 ) +{ + m_ptm_o2 = state; + // TODO: Update ECLK +} + +WRITE_LINE_MEMBER( cmi01a_device::ptm_o3 ) +{ + m_ptm_o3 = state; + // TODO: Update ECLK } READ_LINE_MEMBER( cmi01a_device::eosi_r ) { - return (m_segment_cnt & 0x4000) >> 14; + return BIT(m_segment_cnt, 14); } READ_LINE_MEMBER( cmi01a_device::zx_r ) diff --git a/src/mame/audio/cmi01a.h b/src/mame/audio/cmi01a.h index 6a11f655e63..60503cc90ff 100644 --- a/src/mame/audio/cmi01a.h +++ b/src/mame/audio/cmi01a.h @@ -57,6 +57,9 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(cmi01a_irq); + void tick_ediv(); + void set_eclk(bool eclk); + void zx_timer_cb(); void eosi_timer_cb(); void run_voice(); @@ -84,6 +87,11 @@ private: uint8_t m_status; int m_ptm_o1; + int m_ptm_o2; + int m_ptm_o3; + + bool m_eclk; + bool m_ediv_out; devcb_write_line m_irq_cb; @@ -99,6 +107,8 @@ private: void pia_1_b_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( ptm_o1 ); + DECLARE_WRITE_LINE_MEMBER( ptm_o2 ); + DECLARE_WRITE_LINE_MEMBER( ptm_o3 ); DECLARE_WRITE_LINE_MEMBER( ptm_irq ); }; -- cgit v1.2.3 From e91cc18ec033bf361fa4b118ea62b52ea9748a71 Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Sun, 5 Jul 2020 16:55:01 +0200 Subject: -cmi2x: Completely reworked memory mapping. Performance no logner tanks during disk or screen accesses. [Ryan Holtz] --- src/mame/drivers/cmi.cpp | 573 +++++++++++++++++++++++++++++++---------------- 1 file changed, 376 insertions(+), 197 deletions(-) diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp index 5da94aebe20..76f5435da7c 100644 --- a/src/mame/drivers/cmi.cpp +++ b/src/mame/drivers/cmi.cpp @@ -92,6 +92,7 @@ #include "machine/6850acia.h" #include "machine/6840ptm.h" #include "machine/7474.h" +#include "machine/bankdev.h" #include "machine/clock.h" #include "machine/i8214.h" #include "machine/input_merger.h" @@ -181,7 +182,6 @@ static const int ch_int_levels[8] = #define FDC_STATUS_INTERRUPT (1 << 6) #define FDC_STATUS_DRIVER_LOAD (1 << 7) - class cmi_state : public driver_device { public: @@ -219,6 +219,8 @@ public: , m_lp_y_port(*this, "LP_Y") , m_lp_touch_port(*this, "LP_TOUCH") , m_cmi07_ram(*this, "cmi07_ram") + , m_cpu1_periphs(*this, "cpu1_periphs") + , m_cpu2_periphs(*this, "cpu2_periphs") { } @@ -274,8 +276,19 @@ public: void video_w(offs_t offset, uint8_t data); void vscroll_w(uint8_t data); void video_attr_w(uint8_t data); + uint8_t vram_r(offs_t offset); void vram_w(offs_t offset, uint8_t data); + + template uint8_t ram_range_r(offs_t offset); + template void ram_range_w(offs_t offset, uint8_t data); + template uint8_t vram_range_r(offs_t offset); + template void vram_range_w(offs_t offset, uint8_t data); + template uint8_t cards_range_r(offs_t offset); + template void cards_range_w(offs_t offset, uint8_t data); + template uint8_t periphs_range_r(offs_t offset); + template void periphs_range_w(offs_t offset, uint8_t data); + uint8_t tvt_r(); void tvt_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( pia_q219_irqa ); @@ -295,6 +308,10 @@ public: void mapsel_w(offs_t offset, uint8_t data); template uint8_t irq_ram_r(offs_t offset); template void irq_ram_w(offs_t offset, uint8_t data); + template uint8_t scratch_ram_r(offs_t offset); + template void scratch_ram_w(offs_t offset, uint8_t data); + template uint8_t scratch_ram_fa_r(offs_t offset); + template void scratch_ram_fa_w(offs_t offset, uint8_t data); // MIDI/SMPTE void midi_dma_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -336,6 +353,9 @@ public: void maincpu2_map(address_map &map); void midicpu_map(address_map &map); + void cpu1_periphs_map(address_map &map); + void cpu2_periphs_map(address_map &map); + protected: required_device m_maincpu1; required_device m_maincpu2; @@ -380,6 +400,9 @@ protected: required_shared_ptr m_cmi07_ram; + required_device m_cpu1_periphs; + required_device m_cpu2_periphs; + address_space *m_cpu1space; address_space *m_cpu2space; @@ -393,8 +416,6 @@ private: // Memory bool map_is_active(int cpunum, int map, uint8_t *map_info); void update_address_space(int cpunum, uint8_t mapinfo); - void install_video_ram(int cpunum); - void install_peripherals(int cpunum); // Video void hblank(); @@ -420,8 +441,9 @@ private: std::unique_ptr m_q256_ram[2]; uint8_t m_ram_indices[2][PAGE_COUNT]; uint8_t m_map_ram_latch; - int m_cpu_active_space[2]; // TODO: Make one register + int m_cpu_active_space[2]; int m_cpu_map_switch[2]; + uint8_t m_curr_mapinfo[2]; uint8_t m_irq_address[2][2]; int m_m6809_bs_hack_cnt[2]; @@ -435,21 +457,23 @@ private: /* QFC9 floppy disk controller card */ uint8_t * m_qfc9_region_ptr; - int m_fdc_drq; + int m_fdc_drq; uint8_t m_fdc_addr; uint8_t m_fdc_ctrl; uint8_t m_fdc_status; - PAIR m_fdc_dma_addr; - PAIR m_fdc_dma_cnt; + PAIR m_fdc_dma_addr; + PAIR m_fdc_dma_cnt; /* CMI-07 */ uint8_t m_cmi07_ctrl; + bool m_cmi07_base_enable[2]; + uint16_t m_cmi07_base_addr; uint8_t m_msm5832_addr; // Master card (CMI-02) - int m_cmi02_ptm_irq; - uint8_t m_cmi02_pia_chsel; + int m_cmi02_ptm_irq; + uint8_t m_cmi02_pia_chsel; }; /************************************** @@ -631,11 +655,6 @@ void cmi_state::video_attr_w(uint8_t data) // TODO } -void cmi_state::vram_w(offs_t offset, uint8_t data) -{ - m_video_ram[offset] = data; -} - void cmi_state::tvt_w(uint8_t data) { if ((data >= 0x20 && data <= 0x7e) || data == 0x0a || data == 0x0d) @@ -649,6 +668,11 @@ uint8_t cmi_state::tvt_r() return 0; } +void cmi_state::vram_w(offs_t offset, uint8_t data) +{ + m_video_ram[offset] = data; +} + uint8_t cmi_state::vram_r(offs_t offset) { if (machine().side_effects_disabled()) @@ -671,6 +695,220 @@ template uint8_t cmi_state::rom_r(offs_t offset) return *(((uint8_t *)m_q133_region->base()) + base + offset); } +template uint8_t cmi_state::perr_r(offs_t offset) +{ + m_maincpu2_irq0_merger->in_w<1>(1); + + const uint8_t page = offset >> 11; + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + const uint8_t data = m_q256_ram[0][(page_info & 0x7f) * PAGE_SIZE + (offset & 0x7ff)]; + return data; +} + +template void cmi_state::perr_w(offs_t offset, uint8_t data) +{ + const uint8_t page = offset >> 11; + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + m_q256_ram[0][(page_info & 0x7f) * PAGE_SIZE + (offset & 0x7ff)] = data; +} + +template uint8_t cmi_state::ram_range_r(offs_t offset) +{ + const uint16_t addr = base + offset; + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + const bool perr_en = BIT(mapinfo, 6); + const uint8_t page = addr >> 11; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (m_cmi07_base_enable[cpunum] && (addr & 0xc000) == m_cmi07_base_addr) + { + return m_cmi07_ram[(page * PAGE_SIZE) & 0x3fff]; + } + + if (perr_en) + { + return perr_r(addr); + } + else if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + return m_q256_ram[0][ram_base | (addr & 0x7ff)]; + } + + return 0x00; +} + +template void cmi_state::ram_range_w(offs_t offset, uint8_t data) +{ + const uint16_t addr = base + offset; + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + const bool perr_en = BIT(mapinfo, 6); + const uint8_t page = addr >> 11; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (m_cmi07_base_enable[cpunum] && (addr & 0xc000) == m_cmi07_base_addr) + { + m_cmi07_ram[(page * PAGE_SIZE) & 0x3fff] = data; + return; + } + + if (perr_en) + { + perr_w(addr, data); + } + else if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + m_q256_ram[0][ram_base | (addr & 0x7ff)] = data; + } +} + +template uint8_t cmi_state::vram_range_r(offs_t offset) +{ + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + if (!BIT(mapinfo, 5)) + { + return vram_r(offset); + } + else + { + const uint16_t address = 0x8000 + offset; + const uint8_t page = (offset >> 11) + 16; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (m_cmi07_base_enable[cpunum] && (address & 0xc000) == m_cmi07_base_addr) + { + return m_cmi07_ram[(page * PAGE_SIZE) & 0x3fff]; + } + + if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + return m_q256_ram[0][ram_base | (offset & 0x7ff)]; + } + } + + return 0x00; +} + +template void cmi_state::vram_range_w(offs_t offset, uint8_t data) +{ + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + if (!BIT(mapinfo, 5)) + { + vram_w(offset, data); + } + else + { + const uint16_t address = 0x8000 + offset; + const uint8_t page = (offset >> 11) + 16; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (m_cmi07_base_enable[cpunum] && (address & 0xc000) == m_cmi07_base_addr) + { + m_cmi07_ram[(page * PAGE_SIZE) & 0x3fff] = data; + return; + } + + if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + m_q256_ram[0][ram_base | (offset & 0x7ff)] = data; + } + } +} + +template uint8_t cmi_state::cards_range_r(offs_t offset) +{ + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + if (!BIT(mapinfo, 7) && offset < 0x40) + { + return cmi02_r(offset); + } + else + { + const uint8_t page = (offset >> 11) + 28; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + return m_q256_ram[0][ram_base | (offset & 0x7ff)]; + } + } + return 0x00; +} + +template void cmi_state::cards_range_w(offs_t offset, uint8_t data) +{ + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + if (!BIT(mapinfo, 7) && offset < 0x40) + { + cmi02_w(offset, data); + } + else + { + const uint8_t page = (offset >> 11) + 28; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + m_q256_ram[0][ram_base | (offset & 0x7ff)] = data; + } + } +} + +template uint8_t cmi_state::periphs_range_r(offs_t offset) +{ + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + if (!BIT(mapinfo, 7)) + { + if (cpunum) + return m_cpu2_periphs->read8(offset); + else + return m_cpu1_periphs->read8(offset); + } + else + { + const uint8_t page = (offset >> 11) + 30; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + return m_q256_ram[0][ram_base | (offset & 0x7ff)]; + } + } + + return 0x00; +} + +template void cmi_state::periphs_range_w(offs_t offset, uint8_t data) +{ + const uint8_t mapinfo = m_curr_mapinfo[cpunum]; + if (!BIT(mapinfo, 7)) + { + if (cpunum) + m_cpu2_periphs->write8(offset, data); + else + m_cpu1_periphs->write8(offset, data); + } + else + { + const uint8_t page = (offset >> 11) + 30; + const uint8_t page_info = m_map_ram[0][((mapinfo & 0x1f) << PAGE_SHIFT) + page]; + + if (BIT(page_info, 7)) + { + const uint32_t ram_base = (page_info & 0x7f) << 11; + m_q256_ram[0][ram_base | (offset & 0x7ff)] = data; + } + } +} + void cmi_state::map_ram_w(offs_t offset, uint8_t data) { if ((offset & 1) == 0) @@ -679,21 +917,18 @@ void cmi_state::map_ram_w(offs_t offset, uint8_t data) } else { - for (int i = 0; i < NUM_Q256_CARDS; ++i) - { - uint8_t map_info; - int map = (offset >> 6); - int page_enable = ((m_map_ram_latch & 0x80) && (i == (m_map_ram_latch & 7))) ? 0x80 : 0; + uint8_t map_info; + int map = (offset >> 6); + int page_enable = ((m_map_ram_latch & 0x80) && (0 == (m_map_ram_latch & 7))) ? 0x80 : 0; - m_map_ram[i][offset >> 1] = page_enable | (data & 0x7f); + m_map_ram[0][offset >> 1] = page_enable | (data & 0x7f); - /* Determine if this map is in use by either CPU */ - if (map_is_active(CPU_1, map, &map_info)) - update_address_space(0, map_info); + /* Determine if this map is in use by either CPU */ + if (map_is_active(CPU_1, map, &map_info)) + update_address_space(0, map_info); - if (map_is_active(CPU_2, map, &map_info)) - update_address_space(1, map_info); - } + if (map_is_active(CPU_2, map, &map_info)) + update_address_space(1, map_info); } } @@ -790,7 +1025,7 @@ uint8_t cmi_state::parity_r(offs_t offset) { m_maincpu2_irq0_merger->in_w<1>(0); LOG("%s: parity_r %04x\n", machine().describe_context(), offset); - return 0x00; + return 0xff; } void cmi_state::mapsel_w(offs_t offset, uint8_t data) @@ -884,15 +1119,26 @@ void cmi_state::midi_latch_w(uint8_t data) } } -/* The maps are dynamically populated */ void cmi_state::maincpu1_map(address_map &map) { - map(0xfffe, 0xffff).r(FUNC(cmi_state::vector_r<0>)); + map(0x0000, 0x7fff).rw(&cmi_state::ram_range_r<0, 0x0000>, "cmi_state::ram_range_r<0, 0x0000>", + &cmi_state::ram_range_w<0, 0x0000>, "cmi_state::ram_range_w<0, 0x0000>"); + map(0x8000, 0xbfff).rw(FUNC(cmi_state::vram_range_r<0>), FUNC(cmi_state::vram_range_w<0>)); + map(0xc000, 0xdfff).rw(&cmi_state::ram_range_r<0, 0xc000>, "cmi_state::ram_range_r<0, 0xc000>", + &cmi_state::ram_range_w<0, 0xc000>, "cmi_state::ram_range_w<0, 0xc000>"); + map(0xe000, 0xefff).rw(FUNC(cmi_state::cards_range_r<0>), FUNC(cmi_state::cards_range_w<0>)); + map(0xf000, 0xffff).rw(FUNC(cmi_state::periphs_range_r<0>), FUNC(cmi_state::periphs_range_w<0>)); } void cmi_state::maincpu2_map(address_map &map) { - map(0xfffe, 0xffff).r(FUNC(cmi_state::vector_r<1>)); + map(0x0000, 0x7fff).rw(&cmi_state::ram_range_r<1, 0x0000>, "cmi_state::ram_range_r<1, 0x0000>", + &cmi_state::ram_range_w<1, 0x0000>, "cmi_state::ram_range_w<1, 0x0000>"); + map(0x8000, 0xbfff).rw(FUNC(cmi_state::vram_range_r<1>), FUNC(cmi_state::vram_range_w<1>)); + map(0xc000, 0xdfff).rw(&cmi_state::ram_range_r<1, 0xc000>, "cmi_state::ram_range_r<1, 0xc000>", + &cmi_state::ram_range_w<1, 0xc000>, "cmi_state::ram_range_w<1, 0xc000>"); + map(0xe000, 0xefff).rw(FUNC(cmi_state::cards_range_r<1>), FUNC(cmi_state::cards_range_w<1>)); + map(0xf000, 0xffff).rw(FUNC(cmi_state::periphs_range_r<1>), FUNC(cmi_state::periphs_range_w<1>)); } void cmi_state::midicpu_map(address_map &map) @@ -923,6 +1169,69 @@ void cmi_state::cmi07cpu_map(address_map &map) map(0xc000, 0xffff).ram().share("cmi07_ram"); } +void cmi_state::cpu1_periphs_map(address_map &map) +{ + map(0x0000, 0x07ff).rw(FUNC(cmi_state::rom_r<0>), FUNC(cmi_state::map_ram_w)); + map(0x0800, 0x0bff).rom().region("q133", 0x2800); + map(0x0c40, 0x0c4f).rw(FUNC(cmi_state::parity_r), FUNC(cmi_state::mapsel_w)); + map(0x0c5a, 0x0c5b).noprw(); // Q077 HDD controller - not installed + map(0x0c5e, 0x0c5e).rw(FUNC(cmi_state::atomic_r), FUNC(cmi_state::cpufunc_w)); + map(0x0c5f, 0x0c5f).rw(FUNC(cmi_state::map_r<0>), FUNC(cmi_state::map_w<0>)); + map(0x0c80, 0x0c83).rw(m_q133_acia[0], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c84, 0x0c87).rw(m_q133_acia[1], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c88, 0x0c8b).rw(m_q133_acia[2], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c8c, 0x0c8f).rw(m_q133_acia[3], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c90, 0x0c97).rw(m_q133_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)); + //map(0x0ca0, 0x0ca0).w(FUNC(cmi_state::midi_latch_w)); + map(0x0cbc, 0x0cbc).rw(FUNC(cmi_state::cmi07_r), FUNC(cmi_state::cmi07_w)); + map(0x0cc0, 0x0cc3).r(FUNC(cmi_state::lightpen_r)); + map(0x0cc4, 0x0cc7).rw(m_q219_pia, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0cc8, 0x0ccf).rw(m_q219_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)); + map(0x0cd0, 0x0cdc).rw(FUNC(cmi_state::video_r), FUNC(cmi_state::video_w)); + map(0x0ce0, 0x0ce1).rw(FUNC(cmi_state::fdc_r), FUNC(cmi_state::fdc_w)); + map(0x0ce2, 0x0cef).noprw(); // Monitor ROM will attempt to detect floppy disk controller cards in this entire range + map(0x0cf0, 0x0cf7).rw(m_q133_pia[0], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0cf8, 0x0cff).rw(m_q133_pia[1], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0cfc, 0x0cfc).w(FUNC(cmi_state::i8214_cpu1_w)); + map(0x0cfd, 0x0cfd).w(FUNC(cmi_state::i8214_cpu2_w)); + map(0x0d00, 0x0eff).rw(FUNC(cmi_state::shared_ram_r), FUNC(cmi_state::shared_ram_w)); + map(0x0f00, 0x0ff7).rw(FUNC(cmi_state::scratch_ram_r<0>), FUNC(cmi_state::scratch_ram_w<0>)); + map(0x0ff8, 0x0ff9).rw(FUNC(cmi_state::irq_ram_r<0>), FUNC(cmi_state::irq_ram_w<0>)); + map(0x0ffa, 0x0ffd).rw(FUNC(cmi_state::scratch_ram_fa_r<0>), FUNC(cmi_state::scratch_ram_fa_w<0>)); + map(0x0ffe, 0x0fff).r(FUNC(cmi_state::vector_r<0>)); +} + +void cmi_state::cpu2_periphs_map(address_map &map) +{ + map(0x0000, 0x07ff).rw(FUNC(cmi_state::rom_r<1>), FUNC(cmi_state::map_ram_w)); + map(0x0800, 0x0bff).rom().region("q133", 0x1800); + map(0x0c40, 0x0c4f).rw(FUNC(cmi_state::parity_r), FUNC(cmi_state::mapsel_w)); + map(0x0c5a, 0x0c5b).noprw(); // Q077 HDD controller - not installed + map(0x0c5e, 0x0c5e).rw(FUNC(cmi_state::atomic_r), FUNC(cmi_state::cpufunc_w)); + map(0x0c5f, 0x0c5f).rw(FUNC(cmi_state::map_r<1>), FUNC(cmi_state::map_w<1>)); + map(0x0c80, 0x0c83).rw(m_q133_acia[0], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c84, 0x0c87).rw(m_q133_acia[1], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c88, 0x0c8b).rw(m_q133_acia[2], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c8c, 0x0c8f).rw(m_q133_acia[3], FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x0c90, 0x0c97).rw(m_q133_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)); + //map(0x0ca0, 0x0ca0).w(FUNC(cmi_state::midi_latch_w)); + map(0x0cc0, 0x0cc3).r(FUNC(cmi_state::lightpen_r)); + map(0x0cc4, 0x0cc7).rw(m_q219_pia, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0cc8, 0x0ccf).rw(m_q219_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)); + map(0x0cd0, 0x0cdc).rw(FUNC(cmi_state::video_r), FUNC(cmi_state::video_w)); + map(0x0ce0, 0x0ce1).rw(FUNC(cmi_state::fdc_r), FUNC(cmi_state::fdc_w)); + map(0x0ce2, 0x0cef).noprw(); // Monitor ROM will attempt to detect floppy disk controller cards in this entire range + map(0x0cf0, 0x0cf7).rw(m_q133_pia[0], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0cf8, 0x0cff).rw(m_q133_pia[1], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0cfc, 0x0cfc).w(FUNC(cmi_state::i8214_cpu1_w)); + map(0x0cfd, 0x0cfd).w(FUNC(cmi_state::i8214_cpu2_w)); + map(0x0d00, 0x0eff).rw(FUNC(cmi_state::shared_ram_r), FUNC(cmi_state::shared_ram_w)); + map(0x0f00, 0x0ff7).rw(FUNC(cmi_state::scratch_ram_r<1>), FUNC(cmi_state::scratch_ram_w<1>)); + map(0x0ff8, 0x0ff9).rw(FUNC(cmi_state::irq_ram_r<1>), FUNC(cmi_state::irq_ram_w<1>)); + map(0x0ffa, 0x0ffd).rw(FUNC(cmi_state::scratch_ram_fa_r<1>), FUNC(cmi_state::scratch_ram_fa_w<1>)); + map(0x0ffe, 0x0fff).r(FUNC(cmi_state::vector_r<1>)); +} + /* Input ports */ static INPUT_PORTS_START( cmi2x ) PORT_START("LP_X") @@ -935,6 +1244,26 @@ static INPUT_PORTS_START( cmi2x ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME ( "Lightpen Touch" ) PORT_CODE( MOUSECODE_BUTTON1 ) INPUT_PORTS_END +template uint8_t cmi_state::scratch_ram_r(offs_t offset) +{ + return m_scratch_ram[cpunum][offset]; +} + +template void cmi_state::scratch_ram_w(offs_t offset, uint8_t data) +{ + m_scratch_ram[cpunum][offset] = data; +} + +template uint8_t cmi_state::scratch_ram_fa_r(offs_t offset) +{ + return m_scratch_ram[cpunum][0xfa + offset]; +} + +template void cmi_state::scratch_ram_fa_w(offs_t offset, uint8_t data) +{ + m_scratch_ram[cpunum][0xfa + offset] = data; +} + bool cmi_state::map_is_active(int cpunum, int map, uint8_t *map_info) { if (m_cpu_active_space[cpunum] == MAPPING_A) @@ -957,85 +1286,7 @@ bool cmi_state::map_is_active(int cpunum, int map, uint8_t *map_info) void cmi_state::update_address_space(int cpunum, uint8_t mapinfo) { - int map = mapinfo & 0x1f; - bool vram_en = !BIT(mapinfo, 5); - bool perr_en = BIT(mapinfo, 6); - bool periph_en = !BIT(mapinfo, 7); - int i; - - address_space *space = (cpunum == 0 ? m_cpu1space : m_cpu2space); - - space->unmap_readwrite(0x0000, 0xffff); - - if (perr_en) - { - if (cpunum == CPU_1) - { - space->install_readwrite_handler(0x0000, 0xffff, read8sm_delegate(*this, FUNC(cmi_state::perr_r)), write8sm_delegate(*this, FUNC(cmi_state::perr_w))); - } - else - { - space->install_readwrite_handler(0x0000, 0xffff, read8sm_delegate(*this, FUNC(cmi_state::perr_r)), write8sm_delegate(*this, FUNC(cmi_state::perr_w))); - } - } - - /* Step through the map RAM assignments */ - for (int page = 0; page < PAGE_COUNT; ++page) - { - int address = page * PAGE_SIZE; - uint8_t page_info = 0; - - /* Scan through the cards */ - for (i = 0; i < NUM_Q256_CARDS; ++i) - { - page_info = m_map_ram[i][(map << PAGE_SHIFT) + page]; - - /* Page is enabled in this bank */ - if (page_info & 0x80) - break; - } - - if (BIT(m_cmi07_ctrl, 6)) - { - if ((cpunum == 0) || !BIT(m_cmi07_ctrl, 7)) - { - if ((m_cmi07_ctrl & 0x30) && (address & 0xc000) == ((m_cmi07_ctrl & 0x30) << 10)) - { - space->install_ram(address, address + PAGE_SIZE - 1, &m_cmi07_ram[(page * PAGE_SIZE) & 0x3fff]); - continue; - } - } - } - - /* No banks had this page enabled - skip */ - if ((page_info & 0x80) == 0) - continue; - - /* If Video RAM is enabled, don't install RAM here */ - if (vram_en && address >= 0x8000 && address <= 0xbfff) - continue; - - /* If peripherals are enabled, don't install RAM here */ - if (periph_en && address >= 0xf000 && address <= 0xffff) - continue; - - /* Now map the RAM page */ - if (perr_en) - { - m_ram_indices[cpunum][page] = (i << 7) | (page_info & 0x7f); - LOG("update_address_space: m_ram_indices[%d][%02x] = %02x\n", cpunum, page, m_ram_indices[cpunum][page]); - } - else - { - space->install_ram(address, address + PAGE_SIZE - 1, &m_q256_ram[i][(page_info & 0x7f) * PAGE_SIZE]); - } - } - - if (vram_en) - install_video_ram(cpunum); - - if (periph_en) - install_peripherals(cpunum); + m_curr_mapinfo[cpunum] = mapinfo; } void cmi_state::cmi07_w(uint8_t data) @@ -1050,6 +1301,10 @@ void cmi_state::cmi07_w(uint8_t data) const uint8_t prev = m_cmi07_ctrl; m_cmi07_ctrl = data; + m_cmi07_base_enable[0] = BIT(data, 6) && (data & 0x30); + m_cmi07_base_enable[1] = m_cmi07_base_enable[0] && !BIT(data, 7); + m_cmi07_base_addr = (data & 0x30) << 10; + m_cmi07cpu->set_input_line(INPUT_LINE_RESET, BIT(data, 0) ? CLEAR_LINE : ASSERT_LINE); m_cmi07cpu->set_input_line(M6809_FIRQ_LINE, BIT(data, 1) ? CLEAR_LINE : ASSERT_LINE); m_cmi07cpu->set_input_line(INPUT_LINE_NMI, BIT(data, 2) ? CLEAR_LINE : ASSERT_LINE); @@ -1463,13 +1718,6 @@ WRITE_LINE_MEMBER(cmi_state::channel_irq) set_interrupt(CPU_1, ch_int_levels[Channel], state); } -void cmi_state::install_video_ram(int cpunum) -{ - address_space *space = (cpunum == CPU_1 ? m_cpu1space : m_cpu2space); - - space->install_readwrite_handler(0x8000, 0xbfff, read8sm_delegate(*this, FUNC(cmi_state::vram_r)), write8sm_delegate(*this, FUNC(cmi_state::vram_w))); -} - void cmi_state::i8214_cpu1_w(uint8_t data) { //LOG("%s: i8214_cpu1_w, clearing IRQ merger bit 0: %02x\n", machine().describe_context(), data); @@ -1488,21 +1736,6 @@ void cmi_state::i8214_cpu2_w(uint8_t data) m_i8214[1]->b_sgs_w(~(data & 0xf)); } -template uint8_t cmi_state::perr_r(offs_t offset) -{ - m_maincpu2_irq0_merger->in_w<1>(1); - const uint8_t ram_index = m_ram_indices[cpunum][offset / PAGE_SIZE]; - const uint8_t data = m_q256_ram[BIT(ram_index, 7)][(ram_index & 0x7f) * PAGE_SIZE + offset % PAGE_SIZE]; - LOG("%s: perr_r: offset %04x, RAM index %02x, value %02x\n", machine().describe_context(), offset, ram_index, data); - return data; -} - -template void cmi_state::perr_w(offs_t offset, uint8_t data) -{ - const uint8_t ram_index = m_ram_indices[cpunum][offset / PAGE_SIZE]; - m_q256_ram[BIT(ram_index, 7)][(ram_index & 0x7f) * PAGE_SIZE + offset % PAGE_SIZE] = data; -} - uint8_t cmi_state::shared_ram_r(offs_t offset) { return m_shared_ram[offset]; @@ -1562,68 +1795,6 @@ void cmi_state::aic_ad565_lsb_w(uint8_t data) m_aic_ad565_in[m_aic_mux_latch & 0x07] |= data; } -void cmi_state::install_peripherals(int cpunum) -{ - address_space *space = (cpunum == CPU_1 ? m_cpu1space : m_cpu2space); - - space->install_readwrite_handler(0xe000, 0xe03f, read8sm_delegate(*this, FUNC(cmi_state::cmi02_r)), write8sm_delegate(*this, FUNC(cmi_state::cmi02_w))); - - if (cpunum) - space->install_readwrite_handler(0xf000, 0xf7ff, read8sm_delegate(*this, FUNC(cmi_state::rom_r<1>)), write8sm_delegate(*this, FUNC(cmi_state::map_ram_w))); - else - space->install_readwrite_handler(0xf000, 0xf7ff, read8sm_delegate(*this, FUNC(cmi_state::rom_r<0>)), write8sm_delegate(*this, FUNC(cmi_state::map_ram_w))); - - space->install_rom(0xf800, 0xfbff, m_q133_rom + (cpunum == CPU_2 ? 0x1800 : 0x2800)); - - space->install_readwrite_handler(0xfc40, 0xfc4f, read8sm_delegate(*this, FUNC(cmi_state::parity_r)), write8sm_delegate(*this, FUNC(cmi_state::mapsel_w))); - space->nop_readwrite(0xfc5a, 0xfc5b); // Q077 HDD controller - not installed - space->install_readwrite_handler(0xfc5e, 0xfc5e, read8smo_delegate(*this, FUNC(cmi_state::atomic_r)), write8smo_delegate(*this, FUNC(cmi_state::cpufunc_w))); - if (cpunum) - space->install_readwrite_handler(0xfc5f, 0xfc5f, read8smo_delegate(*this, FUNC(cmi_state::map_r<1>)), write8smo_delegate(*this, FUNC(cmi_state::map_w<1>))); - else - space->install_readwrite_handler(0xfc5f, 0xfc5f, read8smo_delegate(*this, FUNC(cmi_state::map_r<0>)), write8smo_delegate(*this, FUNC(cmi_state::map_w<0>))); - - space->install_readwrite_handler(0xfc80, 0xfc83, read8sm_delegate(*m_q133_acia[0], FUNC(mos6551_device::read)), write8sm_delegate(*m_q133_acia[0], FUNC(mos6551_device::write))); - space->install_readwrite_handler(0xfc84, 0xfc87, read8sm_delegate(*m_q133_acia[1], FUNC(mos6551_device::read)), write8sm_delegate(*m_q133_acia[1], FUNC(mos6551_device::write))); - space->install_readwrite_handler(0xfc88, 0xfc8b, read8sm_delegate(*m_q133_acia[2], FUNC(mos6551_device::read)), write8sm_delegate(*m_q133_acia[2], FUNC(mos6551_device::write))); - space->install_readwrite_handler(0xfc8c, 0xfc8f, read8sm_delegate(*m_q133_acia[3], FUNC(mos6551_device::read)), write8sm_delegate(*m_q133_acia[3], FUNC(mos6551_device::write))); - space->install_readwrite_handler(0xfc90, 0xfc97, read8sm_delegate(*m_q133_ptm, FUNC(ptm6840_device::read)), write8sm_delegate(*m_q133_ptm, FUNC(ptm6840_device::write))); - - //space->install_write_handler(0xfca0, 0xfca0, write8smo_delegate(*this, FUNC(cmi_state::midi_latch_w))); - - space->install_readwrite_handler(0xfcbc, 0xfcbc, read8smo_delegate(*this, FUNC(cmi_state::cmi07_r)), write8smo_delegate(*this, FUNC(cmi_state::cmi07_w))); - - space->install_read_handler(0xfcc0, 0xfcc3, read8sm_delegate(*this, FUNC(cmi_state::lightpen_r))); - space->install_readwrite_handler(0xfcc4, 0xfcc7, read8sm_delegate(*m_q219_pia, FUNC(pia6821_device::read)), write8sm_delegate(*m_q219_pia, FUNC(pia6821_device::write))); - space->install_readwrite_handler(0xfcc8, 0xfccf, read8sm_delegate(*m_q219_ptm, FUNC(ptm6840_device::read)), write8sm_delegate(*m_q219_ptm, FUNC(ptm6840_device::write))); - space->install_readwrite_handler(0xfcd0, 0xfcdc, read8sm_delegate(*this, FUNC(cmi_state::video_r)), write8sm_delegate(*this, FUNC(cmi_state::video_w))); - space->install_readwrite_handler(0xfce0, 0xfce1, read8sm_delegate(*this, FUNC(cmi_state::fdc_r)), write8sm_delegate(*this, FUNC(cmi_state::fdc_w))); - space->nop_readwrite(0xfce2, 0xfcef); // Monitor ROM will attempt to detect floppy disk controller cards in this entire range - space->install_readwrite_handler(0xfcf0, 0xfcf7, read8sm_delegate(*m_q133_pia[0], FUNC(pia6821_device::read)), write8sm_delegate(*m_q133_pia[0], FUNC(pia6821_device::write))); - space->install_readwrite_handler(0xfcf8, 0xfcff, read8sm_delegate(*m_q133_pia[1], FUNC(pia6821_device::read)), write8sm_delegate(*m_q133_pia[1], FUNC(pia6821_device::write))); - - space->install_write_handler(0xfcfc, 0xfcfc, write8smo_delegate(*this, FUNC(cmi_state::i8214_cpu1_w))); - space->install_write_handler(0xfcfd, 0xfcfd, write8smo_delegate(*this, FUNC(cmi_state::i8214_cpu2_w))); - - space->install_readwrite_handler(0xfd00, 0xfeff, read8sm_delegate(*this, FUNC(cmi_state::shared_ram_r)), write8sm_delegate(*this, FUNC(cmi_state::shared_ram_w))); - - space->install_ram(0xff00, 0xfff7, &m_scratch_ram[cpunum][0]); - space->install_ram(0xfffa, 0xfffd, &m_scratch_ram[cpunum][0xfa]); - - if (cpunum) - { - space->install_readwrite_handler(0xfff8, 0xfff9, read8sm_delegate(*this, FUNC(cmi_state::irq_ram_r<1>)), write8sm_delegate(*this, FUNC(cmi_state::irq_ram_w<1>))); - space->install_read_handler(0xfffe, 0xffff, read8sm_delegate(*this, FUNC(cmi_state::vector_r<1>))); - } - else - { - space->install_readwrite_handler(0xd000, 0xdfff, read8smo_delegate(*this, FUNC(cmi_state::tvt_r)), write8smo_delegate(*this, FUNC(cmi_state::tvt_w))); - space->install_readwrite_handler(0xfff8, 0xfff9, read8sm_delegate(*this, FUNC(cmi_state::irq_ram_r<0>)), write8sm_delegate(*this, FUNC(cmi_state::irq_ram_w<0>))); - space->install_read_handler(0xfffe, 0xffff, read8sm_delegate(*this, FUNC(cmi_state::vector_r<0>))); - } -} - - /************************************* * * Interrupt Handling @@ -1850,13 +2021,9 @@ void cmi_state::machine_reset() { address_space *space = (cpunum == CPU_1 ? m_cpu1space : m_cpu2space); - space->unmap_readwrite(0x0000, 0xffff); - /* Select A (system) spaces */ m_cpu_active_space[cpunum] = MAPPING_A; - install_peripherals(cpunum); - m_irq_address[cpunum][0] = space->read_byte(0xfff8); m_irq_address[cpunum][1] = space->read_byte(0xfff9); } @@ -1866,6 +2033,9 @@ void cmi_state::machine_reset() /* CMI-07 */ m_cmi07_ctrl = 0; + m_cmi07_base_enable[0] = false; + m_cmi07_base_enable[1] = false; + m_cmi07_base_addr = 0; m_cmi07cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); // SMIDI @@ -1886,6 +2056,9 @@ void cmi_state::machine_reset() m_q133_acia[i]->write_dsr(0); m_q133_acia[i]->write_dcd(0); } + + m_curr_mapinfo[0] = 0x00; + m_curr_mapinfo[1] = 0x00; } void cmi_state::machine_start() @@ -1952,6 +2125,12 @@ void cmi_state::cmi2x(machine_config &config) m_maincpu2->set_addrmap(AS_PROGRAM, &cmi_state::maincpu2_map); m_maincpu2->set_irq_acknowledge_callback(FUNC(cmi_state::cpu2_interrupt_callback)); + ADDRESS_MAP_BANK(config, m_cpu1_periphs).set_options(ENDIANNESS_BIG, 8, 16, 0x1000); + m_cpu1_periphs->set_addrmap(AS_PROGRAM, &cmi_state::cpu1_periphs_map); + + ADDRESS_MAP_BANK(config, m_cpu2_periphs).set_options(ENDIANNESS_BIG, 8, 16, 0x1000); + m_cpu2_periphs->set_addrmap(AS_PROGRAM, &cmi_state::cpu2_periphs_map); + M68000(config, m_midicpu, 20_MHz_XTAL / 2); m_midicpu->set_addrmap(AS_PROGRAM, &cmi_state::midicpu_map); -- cgit v1.2.3 From 625339d7ab035c452b346f8a69d156926ee8a40b Mon Sep 17 00:00:00 2001 From: fulivi Date: Sun, 5 Jul 2020 17:37:35 +0200 Subject: hp_ipc: fixed timer reloading in COP452 (#6914) --- src/devices/machine/cop452.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/devices/machine/cop452.cpp b/src/devices/machine/cop452.cpp index e70cf1db868..09e31df2c82 100644 --- a/src/devices/machine/cop452.cpp +++ b/src/devices/machine/cop452.cpp @@ -180,12 +180,9 @@ void cop452_device::device_reset() void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - attotime target = attotime::never; - switch (m_mode) { case MODE_DUAL_FREQ: toggle_n_reload(id); - target = counts_to_attotime(m_cnt[ id ]); break; case MODE_TRIG_PULSE: @@ -195,7 +192,6 @@ void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param case MODE_NUMBER_PULSES: if (id == 0) { toggle_n_reload(0); - target = counts_to_attotime(m_cnt[ 0 ]); if (!m_out[ 0 ]) { // It seems that cnt B decrements each time OA goes low if (m_cnt[ 1 ] != 0) { @@ -204,7 +200,6 @@ void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param // End of pulse train toggle_n_reload(1); m_mode = MODE_RESET; - target = attotime::never; } } } @@ -256,7 +251,7 @@ void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param break; } - timer.adjust(target); + set_timer(id); } attotime cop452_device::counts_to_attotime(unsigned counts) const -- cgit v1.2.3 From 07e7e599a0414d549c8bdc1c1ca3fc09f6575fa9 Mon Sep 17 00:00:00 2001 From: David Haywood <28625134+DavidHaywood@users.noreply.github.com> Date: Sun, 5 Jul 2020 16:39:33 +0100 Subject: new WORKING machines (plug and play) (#6909) new WORKING machines --- Totally Spies! (France) [TeamEurope, David Haywood] PDC150 Tactile - Pocket Dream Console (VideoJet, France) [TeamEurope, David Haywood] PDC200 - Pocket Dream Console (VideoJet, France) [TeamEurope, David Haywood] Guitar Buster [Sean Riddle, David Haywood] new NOT WORKING machines --- Marvel Avengers TV Game Console (32-bit) (Lexibook) [TeamEurope, David Haywood] Wireless Duet Play Ping-Pong [Sean Riddle, David Haywood, Dave 'Foxhack' Silva] new NOT WORKING software list entries --- tvgogo.xml: Basketball (US) [Sean Riddle, David Haywood] --- hash/tvgogo.xml | 13 ++- src/mame/drivers/generalplus_gpl16250_nand.cpp | 2 +- src/mame/drivers/nes_vt.cpp | 80 +++++++++++++ src/mame/drivers/spg29x_lexibook_jg7425.cpp | 12 +- src/mame/drivers/spg2xx.cpp | 42 ++++++- src/mame/drivers/spg2xx_pdc.cpp | 154 +++++++++++++++++++++---- src/mame/drivers/spg2xx_wiwi.cpp | 137 ++++++++++++++++++++-- src/mame/includes/spg2xx.h | 4 +- src/mame/mame.lst | 6 + 9 files changed, 413 insertions(+), 37 deletions(-) diff --git a/hash/tvgogo.xml b/hash/tvgogo.xml index af2624f51c7..db1b18e9143 100644 --- a/hash/tvgogo.xml +++ b/hash/tvgogo.xml @@ -9,7 +9,7 @@ Dumped | Dumped | Name |Notes _(EU)__|__(US)__|____________|_____________________________________ Y* | Y | 4 in 1 |No controller Y | Y | Whac-A-Mole|Hammer-shaped IR motion controller - Y | - | Basketball |Ball-shaped motion controller + Y | Y | Basketball |Ball-shaped motion controller Y | | Tennis |Racquet-shaped IR motion controller | Y | Dodgeball |Motion controller | Y | Baseball |Baseball Bat shaped motion controller @@ -115,5 +115,16 @@ _(EU)__|__(US)__|____________|_____________________________________ + + + Basketball (US) + 2005 + Toyquest + + + + + + diff --git a/src/mame/drivers/generalplus_gpl16250_nand.cpp b/src/mame/drivers/generalplus_gpl16250_nand.cpp index e1eae87e606..11f3458faa4 100644 --- a/src/mame/drivers/generalplus_gpl16250_nand.cpp +++ b/src/mame/drivers/generalplus_gpl16250_nand.cpp @@ -840,7 +840,7 @@ void generalplus_gpac800_game_state::nand_beambox() // NAND dumps w/ internal bootstrap (and u'nSP 2.0 extended opcodes) (have gpnandnand strings) // the JAKKS ones seem to be known as 'Generalplus GPAC800' hardware -CONS(2010, wlsair60, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_wlsair60, "Jungle Soft / Kids Station Toys Inc", "Wireless Air 60", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) +CONS(2010, wlsair60, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_wlsair60, "Jungle Soft / Kids Station Toys Inc", "Wireless Air 60", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // some of th games seem to be based on ones found in the 'Millennium Arcade' multigames (WinFun related) so might have the same external timer check CONS(200?, beambox, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_beambox, "Hasbro", "Playskool Heroes Transformers Rescue Bots Beam Box (Spain)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) CONS(200?, mgtfit, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_wlsair60, "MGT", "Fitness Konsole (NC1470)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // probably has other names in English too? menus don't appear to be in German CONS(200?, vbaby, 0, 0, generalplus_gpac800_vbaby, jak_car2, generalplus_gpac800_vbaby_game_state, nand_vbaby, "VTech", "V.Baby", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp index 653ef17ac1c..ebfaf854049 100644 --- a/src/mame/drivers/nes_vt.cpp +++ b/src/mame/drivers/nes_vt.cpp @@ -176,6 +176,24 @@ public: void nes_vt_waixing_alt_pal_8mb(machine_config& config); }; +class nes_vt_waixing_alt_duetpp_state : public nes_vt_waixing_alt_state +{ +public: + nes_vt_waixing_alt_duetpp_state(const machine_config& mconfig, device_type type, const char* tag) : + nes_vt_waixing_alt_state(mconfig, type, tag) + { } + + void nes_vt_waixing_alt_4mb_duetpp(machine_config& config); + +private: + uint8_t in1_r() override + { + uint8_t i = machine().rand() & 0x18; + uint8_t ret = m_io1->read() & ~0x18; + return i | ret; + } +}; + class nes_vt_timetp36_state : public nes_vt_state { @@ -356,6 +374,8 @@ public: m_ablpinb_in0_val(0), m_plunger(*this, "PLUNGER") { } + + void nes_vt_waixing_alt_4mb_duetpp(machine_config& config); protected: virtual void machine_start() override; @@ -881,6 +901,19 @@ void nes_vt_waixing_alt_state::nes_vt_waixing_alt_pal_8mb(machine_config &config m_soc->set_8000_scramble(0x5, 0x4, 0x3, 0x2, 0x7, 0x6, 0x7, 0x8); } +void nes_vt_waixing_alt_duetpp_state::nes_vt_waixing_alt_4mb_duetpp(machine_config& config) +{ + NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK); + configure_soc(m_soc); + + m_soc->set_addrmap(AS_PROGRAM, &nes_vt_ablping_state::vt_external_space_map_4mbyte); + m_soc->set_201x_descramble(0x3, 0x2, 0x7, 0x6, 0x5, 0x4); + m_soc->set_8000_scramble(0x5, 0x4, 0x3, 0x2, 0x7, 0x6, 0x7, 0x8); + + GFXDECODE(config, "gfxdecode", "soc:ppu", vt03_gfx_helper); +} + + void nes_vt_hum_state::nes_vt_hummer_2mb(machine_config& config) { NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK); @@ -1364,6 +1397,46 @@ static INPUT_PORTS_START( ablpinb ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("NUDGE" ) INPUT_PORTS_END + +static INPUT_PORTS_START( duetpp ) + PORT_START("IO0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY + + PORT_START("IO1") + PORT_DIPNAME( 0x0001, 0x0001, "P2:0001" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0001, "0001" ) + PORT_DIPNAME( 0x0002, 0x0002, "P2:0002" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0002, "0002" ) + PORT_DIPNAME( 0x0004, 0x0004, "P2:0004" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0004, "0004" ) + PORT_DIPNAME( 0x0008, 0x0008, "P2:0008" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0008, "0008" ) + PORT_DIPNAME( 0x0010, 0x0010, "P2:0010" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0010, "0010" ) + PORT_DIPNAME( 0x0020, 0x0020, "P2:0020" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0020, "0020" ) + PORT_DIPNAME( 0x0040, 0x0040, "P2:0040" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0040, "0040" ) + PORT_DIPNAME( 0x0080, 0x0080, "P2:0080" ) + PORT_DIPSETTING( 0x0000, "0000" ) + PORT_DIPSETTING( 0x0080, "0080" ) +INPUT_PORTS_END + + static INPUT_PORTS_START( sudoku ) PORT_INCLUDE(nes_vt) INPUT_PORTS_END @@ -1637,6 +1710,11 @@ ROM_START( silv35 ) ROM_LOAD( "silverlit35.bin", 0x00000, 0x400000, CRC(7540e350) SHA1(a0cb456136560fa4d8a365dd44d815ec0e9fc2e7) ) ROM_END +ROM_START( duetpp ) + ROM_REGION( 0x400000, "mainrom", 0 ) + ROM_LOAD( "gamesporzduetpingpong.bin", 0x00000, 0x400000, CRC(96af199b) SHA1(c14ff15683545c1edf03376cebcee7ac408da733) ) +ROM_END + ROM_START( lpgm240 ) ROM_REGION( 0x800000, "mainrom", 0 ) ROM_LOAD( "w25q64jv.u1", 0x00000, 0x800000, CRC(b973e65b) SHA1(36ff137068ea56b4679c2db386ac0067de0a9eaf) ) @@ -1957,6 +2035,8 @@ CONS( 200?, vtboxing, 0, 0, nes_vt_512kb, nes_vt, nes_vt_state, empty_init // 050329 (29th March 2005) date on PCB CONS( 2005, ablpinb, 0, 0, nes_vt_pal_2mb, ablpinb, nes_vt_ablpinb_state, empty_init, "Advance Bright Ltd", "Pinball (P8002, ABL TV Game)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +// need to map 2 player controls for Ping Pong, 'Eat-Bean' (the PacMan hack) gets stuck during intermission? +CONS( 200?, duetpp, 0, 0, nes_vt_waixing_alt_4mb_duetpp, duetpp, nes_vt_waixing_alt_duetpp_state, empty_init, "Game Sporz", "Wireless Duet Play Ping-Pong", MACHINE_NOT_WORKING ) // Black pad marked 'SUDOKU' with tails on the S and U characters looping over the logo. Box says "Plug and Play Sudoku" // Has 2 sets of 4 buttons in circular 'direction pad' layouts (on the left for directions, on the right for functions) and 9 red numbered buttons with red power LED on left of them, and reset button on right diff --git a/src/mame/drivers/spg29x_lexibook_jg7425.cpp b/src/mame/drivers/spg29x_lexibook_jg7425.cpp index c8fecbcb964..24efca6eed2 100644 --- a/src/mame/drivers/spg29x_lexibook_jg7425.cpp +++ b/src/mame/drivers/spg29x_lexibook_jg7425.cpp @@ -12,7 +12,7 @@ compressed with "chdman createhd -i 4GBSD.img -o lexibook_jg7425_4gbsd.chd" (is TODO: is there an internal ROM / bootstrap area, or does this SunPlus core use vectors in a different way to the one in hyperscan.cpp? -If SPG290, should probably be merged with hyperscan.cpp +If SPG290, should probably be merged with hyperscan.cpp (it is) (only noteworthy features of PCB are ROM + RAM + Cpu Glob) @@ -106,4 +106,14 @@ ROM_START( lx_jg7425 ) DISK_IMAGE( "lexibook_jg7425_4gbsd", 0, SHA1(dc0985103edec3992efdd493feef6185daedb3fd) ) ROM_END +ROM_START( lx_aven ) + ROM_REGION( 0x200000, "maincpu", ROMREGION_32BIT | ROMREGION_LE ) + ROM_LOAD32_DWORD( "29lv800.bin", 0x000000, 0x100000, CRC(7b107f6c) SHA1(3a8e37e51dab5cab9977261e0ac17ba5194a9370) ) + + DISK_REGION( "ata:0:hdd:image" ) /* 4GB SD Card */ + DISK_IMAGE( "sd-card", 0, SHA1(911da7bf7dac391e3329e17e3f411caafac52f0f) ) +ROM_END + + CONS( 2015, lx_jg7425, 0, 0, lexibook_jg7425, lexibook_jg7425, lexibook_jg7425_state, empty_init, "Lexibook", "Lexibook JG7425 221-in-1", MACHINE_IS_SKELETON ) +CONS( 201?, lx_aven, 0, 0, lexibook_jg7425, lexibook_jg7425, lexibook_jg7425_state, empty_init, "Lexibook", "Marvel Avengers TV Game Console (32-bit) (Lexibook)", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/spg2xx.cpp b/src/mame/drivers/spg2xx.cpp index da737f067dd..0c94f913a2d 100644 --- a/src/mame/drivers/spg2xx.cpp +++ b/src/mame/drivers/spg2xx.cpp @@ -662,6 +662,30 @@ static INPUT_PORTS_START( fordrace ) PORT_BIT(0x1fff, 0x0000, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x1fff) PORT_NAME("Wheel") INPUT_PORTS_END +static INPUT_PORTS_START( totspies ) + PORT_INCLUDE( spg2xx ) + + PORT_MODIFY("P1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("B") + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("A") + PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_MODIFY("P2") + PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + // unit also has a 'select' button next to 'OK' and while test mode shows it onscreen too, it doesn't get tested, so probably isn't connected to anything? + PORT_MODIFY("P3") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("OK") + PORT_BIT( 0xfffe, IP_ACTIVE_LOW, IPT_UNKNOWN ) +INPUT_PORTS_END + + + CUSTOM_INPUT_MEMBER(spg2xx_game_fordrace_state::wheel_r) { return ioport("WHEEL_REAL")->read() >> 1; @@ -1025,6 +1049,13 @@ void spg2xx_game_state::spg2xx(machine_config &config) m_maincpu->portc_in().set(FUNC(spg2xx_game_state::base_portc_r)); } +void spg2xx_game_state::spg2xx_pal(machine_config& config) +{ + spg2xx(config); + + m_maincpu->set_pal(true); + m_screen->set_refresh_hz(50); +} void spg2xx_game_fordrace_state::fordrace(machine_config &config) { @@ -1481,6 +1512,11 @@ ROM_START( abltenni ) ROM_LOAD16_WORD_SWAP( "ablpnpwirelesstennis.bin", 0x000000, 0x400000, CRC(66bd8ef1) SHA1(a83640d5d9e84e10d29a065a61e0d7bbec16c6e4) ) ROM_END +ROM_START( totspies ) + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "w321tg.u2", 0x000000, 0x400000, CRC(76152ad7) SHA1(b37ea950670eb927f3f0ab5e38d0e2a5f3ca7904) ) +ROM_END + ROM_START( ablkickb ) ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD_SWAP( "ablkickboxing.bin", 0x000000, 0x800000, CRC(61394c45) SHA1(291d28a39edcb32a8f5d776a5e5c05e6fd0abece) ) @@ -1657,11 +1693,13 @@ CONS( 2006, rad_crik, 0, 0, rad_crik, rad_crik, spg2xx_game_state, CONS( 2007, rad_fb2, 0, 0, rad_skat, rad_fb2, spg2xx_game_state, init_crc, "Radica", "Play TV Football 2", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // offers a 2 player option in menus, but seems to have only been programmed for, and released as, a single player unit, P2 controls appear unfinished. // ABL TV Games -CONS( 2006, abltenni, 0, 0, spg2xx, abltenni, spg2xx_game_state, empty_init, "f / V-Tac Technology Co Ltd.", "Wireless Tennis (WT2000, ABL TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2006, abltenni, 0, 0, spg2xx, abltenni, spg2xx_game_state, empty_init, "Advance Bright Ltd / V-Tac Technology Co Ltd.", "Wireless Tennis (WT2000, ABL TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) CONS( 2006, ablkickb, 0, 0, ablkickb, ablkickb, spg2xx_game_albkickb_state, init_ablkickb, "Advance Bright Ltd / Coleco / V-Tac Technology Co Ltd.", "Kick Boxing (BJ8888, ABL TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // 4 motion sensors, one for each limb -CONS( 2007, lxspidaj, 0, 0, spg2xx, lxspidaj, spg2xx_game_albkickb_state, init_ablkickb, "Lexibook", "Spider-Man Super TV Air Jet (Lexibook Junior, JG6000SP)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2007, lxspidaj, 0, 0, spg2xx_pal,lxspidaj, spg2xx_game_albkickb_state, init_ablkickb, "Lexibook", "Spider-Man Super TV Air Jet (Lexibook Junior, JG6000SP)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) + +CONS( 2006, totspies, 0, 0, spg2xx_pal,totspies, spg2xx_game_state, empty_init, "Senario / Marathon - Mystery Animation Inc.", "Totally Spies! (France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) CONS( 2006, fordrace, 0, 0, fordrace, fordrace, spg2xx_game_fordrace_state, empty_init, "Excalibur Electronics", "Ford Racing", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/drivers/spg2xx_pdc.cpp b/src/mame/drivers/spg2xx_pdc.cpp index 04f17451600..431a4dd9deb 100644 --- a/src/mame/drivers/spg2xx_pdc.cpp +++ b/src/mame/drivers/spg2xx_pdc.cpp @@ -5,10 +5,10 @@ #include "includes/spg2xx.h" -class spg2xx_pdc100_game_state : public spg2xx_game_state +class spg2xx_pdc_game_state : public spg2xx_game_state { public: - spg2xx_pdc100_game_state(const machine_config &mconfig, device_type type, const char *tag) : + spg2xx_pdc_game_state(const machine_config &mconfig, device_type type, const char *tag) : spg2xx_game_state(mconfig, type, tag), m_numbanks(-1) { } @@ -17,6 +17,8 @@ public: void pdc_tactile(machine_config& config); void init_pdc40t(); + void init_pdc150t(); + void init_pdc200(); protected: virtual void machine_start() override; @@ -36,10 +38,30 @@ protected: return ret; } -private: int m_numbanks; }; +class spg2xx_pdc150t_game_state : public spg2xx_pdc_game_state +{ +public: + spg2xx_pdc150t_game_state(const machine_config& mconfig, device_type type, const char* tag) : + spg2xx_pdc_game_state(mconfig, type, tag) + { } + +protected: + virtual void porta_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; +}; + +class spg2xx_pdc200_game_state : public spg2xx_pdc_game_state +{ +public: + spg2xx_pdc200_game_state(const machine_config& mconfig, device_type type, const char* tag) : + spg2xx_pdc_game_state(mconfig, type, tag) + { } + +protected: + virtual void porta_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; +}; static INPUT_PORTS_START( pdc100 ) PORT_START("P1") @@ -123,39 +145,66 @@ static INPUT_PORTS_START( vjpp2 ) PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) INPUT_PORTS_END -void spg2xx_pdc100_game_state::machine_start() +void spg2xx_pdc_game_state::machine_start() { spg2xx_game_state::machine_start(); m_numbanks = memregion("maincpu")->bytes() / 0x800000; } -void spg2xx_pdc100_game_state::machine_reset() +void spg2xx_pdc_game_state::machine_reset() { m_current_bank = -1; switch_bank(m_numbanks - 1); // pdc100 must boot from upper bank m_maincpu->reset(); } -void spg2xx_pdc100_game_state::porta_w(offs_t offset, uint16_t data, uint16_t mem_mask) +// pdc100 simply writes 0000 at times during bootup while initializing stuff, which causes an invalid bankswitch mid-code execution +// pdc200 does similar +// direction bits don't appear to be being set correctly on port writes (similar issue to many other systems) + +void spg2xx_pdc_game_state::porta_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + if ((m_maincpu->pc() < 0x2800) && (data & 0xff00)) + { + int bank = data & 0x7; + bank &= (m_numbanks - 1); + switch_bank(bank); + } +} + +void spg2xx_pdc150t_game_state::porta_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + if ((m_maincpu->pc() < 0x2800) && (data & 0xff00)) + { + int bank = data & 0x7; + bank |= (data & 0x0100) ? 8 : 0; + bank &= (m_numbanks - 1); + switch_bank(bank); + } +} + +void spg2xx_pdc200_game_state::porta_w(offs_t offset, uint16_t data, uint16_t mem_mask) { - // pdc100 simply writes 0000 at times during bootup while initializing stuff, which causes an invalid bankswitch mid-code execution - if (data & 0xff00) + if ((m_maincpu->pc() < 0x2800) && (data & 0xff00)) { - switch_bank(data & (m_numbanks - 1)); + int bank = data & 0x7; + bank |= (data & 0x8000) ? 8 : 0; + bank &= (m_numbanks - 1); + switch_bank(bank); } } -void spg2xx_pdc100_game_state::pdc100(machine_config &config) +void spg2xx_pdc_game_state::pdc100(machine_config &config) { non_spg_base(config); - m_maincpu->porta_out().set(FUNC(spg2xx_pdc100_game_state::porta_w)); + m_maincpu->porta_out().set(FUNC(spg2xx_pdc_game_state::porta_w)); m_maincpu->porta_in().set_ioport("P1"); m_maincpu->portb_in().set_ioport("P2"); m_maincpu->portc_in().set_ioport("P3"); // not used? } -void spg2xx_pdc100_game_state::pdc_tactile(machine_config& config) +void spg2xx_pdc_game_state::pdc_tactile(machine_config& config) { pdc100(config); @@ -163,13 +212,13 @@ void spg2xx_pdc100_game_state::pdc_tactile(machine_config& config) m_maincpu->portb_in().set_ioport("P2"); m_maincpu->portc_in().set_ioport("P3"); - m_maincpu->adc_in<0>().set(FUNC(spg2xx_pdc100_game_state::touch_xpos_r)); - m_maincpu->adc_in<1>().set(FUNC(spg2xx_pdc100_game_state::touch_ypos_r)); + m_maincpu->adc_in<0>().set(FUNC(spg2xx_pdc_game_state::touch_xpos_r)); + m_maincpu->adc_in<1>().set(FUNC(spg2xx_pdc_game_state::touch_ypos_r)); m_maincpu->adc_in<2>().set_ioport("AD3"); } -void spg2xx_pdc100_game_state::init_pdc40t() +void spg2xx_pdc_game_state::init_pdc40t() { uint8_t *src = memregion("maincpu")->base(); int len = memregion("maincpu")->bytes(); @@ -184,6 +233,51 @@ void spg2xx_pdc100_game_state::init_pdc40t() } +void spg2xx_pdc_game_state::init_pdc150t() +{ + uint16_t *src = (uint16_t*)memregion("maincpu")->base(); + int len = memregion("maincpu")->bytes(); + + for (int i = 0; i < len/2; i++) + { + src[i] = bitswap<16>(src[i], 3^8,11^8,2^8,10^8,1^8,9^8,0^8,8^8, 12^8,4^8,13^8,5^8,14^8,6^8,15^8,7^8 ); + } + +#if 0 + { + for (int bank = 0; bank < 16; bank++) + { + const int length = 0x800000 - 0x10; + const int start = (0x800000 * bank) + 0x10; + const uint8_t* rom = memregion("maincpu")->base(); + + uint32_t checksum = 0x00000000; + // the first 0x10 bytes are where the "chksum:xxxxxxxx " string is listed, so skip over them + for (int i = start; i < start + length; i++) + { + checksum += rom[i]; + } + + printf("Calculated Byte Sum of bytes is %08x)\n", checksum); + + + FILE *fp; + char filename[256]; + sprintf(filename,"decrypted_%s_%d", machine().system().name, bank); + fp=fopen(filename, "w+b"); + if (fp) + { + fwrite(&rom[0x800000*bank], 0x800000, 1, fp); + fclose(fp); + } + } + } +#endif +} + + + + ROM_START( pdc100 ) ROM_REGION( 0x4000000, "maincpu", ROMREGION_ERASE00 ) // only 1st half of this is used "Jumper resistor (0 ohm) that short A25 to ground" @@ -200,13 +294,22 @@ ROM_START( pdc50 ) ROM_RELOAD(0x3000000,0x1000000) ROM_END - +ROM_START( pdc200 ) + ROM_REGION( 0x8000000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "pdc200.bin", 0x000000, 0x8000000, CRC(9da99f0f) SHA1(0dda8a3deb794e493685d3d41790ee371f9b736e) ) +ROM_END ROM_START( pdc40t ) ROM_REGION( 0x4000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD_SWAP( "pdc_5060.bin", 0x000000, 0x4000000, CRC(28e0c16e) SHA1(fef4af00c737fab2716eef550badbbe0628f26a8) ) ROM_END +ROM_START( pdc150t ) + ROM_REGION( 0x8000000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "pdc5070.bin", 0x000000, 0x8000000, CRC(b10e9f29) SHA1(551d62a9ffc18159f7ace12e4363223e0c5cf3c8) ) +ROM_END + + ROM_START( tmntpdc ) ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD_SWAP( "pdc_turtles.bin", 0x000000, 0x800000, CRC(ee9e70a3) SHA1(7620f1b7aeaec8032faa8eb7552f775e8d6d14ba) ) @@ -228,18 +331,23 @@ ROM_END // Other known units // PDC 30 // PDC 40 -// PDC 200 +// PDC 20 Sports +// + more // This was dumped from an Anncia branded unit, although there's no ingame branding, so ROM is probably the same for all PDC100 units -CONS( 2008, pdc100, 0, 0, pdc100, pdc100, spg2xx_pdc100_game_state, empty_init, "Conny / Anncia", "PDC100 - Pocket Dream Console (Anncia, US)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2008, pdc100, 0, 0, pdc100, pdc100, spg2xx_pdc_game_state, empty_init, "Conny / Anncia", "PDC100 - Pocket Dream Console (Anncia, US)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // interestingly this is newer than the PDC100 above, despite containing fewer games -CONS( 2010, pdc50, 0, 0, pdc100, pdc100, spg2xx_pdc100_game_state, empty_init , "Conny / VideoJet", "PDC50 - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2010, pdc50, 0, 0, pdc100, pdc100, spg2xx_pdc_game_state, empty_init, "Conny / VideoJet", "PDC50 - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) + +CONS( 2012, pdc200, 0, 0, pdc100, pdc100, spg2xx_pdc200_game_state, init_pdc150t, "Conny / VideoJet", "PDC200 - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) + +CONS( 2011, pdc40t, 0, 0, pdc_tactile, pdc_tactile, spg2xx_pdc_game_state, init_pdc40t, "Conny / VideoJet", "PDC40 Tactile - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // needs touch input -CONS( 2011, pdc40t, 0, 0, pdc_tactile, pdc_tactile, spg2xx_pdc100_game_state, init_pdc40t, "Conny / VideoJet", "PDC40 Tactile - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // needs touch input +CONS( 2011, pdc150t, 0, 0, pdc_tactile, pdc_tactile, spg2xx_pdc150t_game_state, init_pdc150t, "Conny / VideoJet", "PDC150 Tactile - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // needs touch input -CONS( 2013, tmntpdc, 0, 0, pdc100, pdc100, spg2xx_pdc100_game_state, empty_init, "Conny / VideoJet", "Teenage Mutant Ninja Turtles - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2013, tmntpdc, 0, 0, pdc100, pdc100, spg2xx_pdc_game_state, empty_init, "Conny / VideoJet", "Teenage Mutant Ninja Turtles - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -CONS( 2013, dorapdc, 0, 0, pdc100, pdc100, spg2xx_pdc100_game_state, empty_init, "Conny / VideoJet", "Dora l'exploratrice - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2013, dorapdc, 0, 0, pdc100, pdc100, spg2xx_pdc_game_state, empty_init, "Conny / VideoJet", "Dora l'exploratrice - Pocket Dream Console (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -CONS( 200?, vjpp2, 0, 0, pdc100, vjpp2, spg2xx_pdc100_game_state, empty_init, "Conny / VideoJet", "Plug Play TV Games 2 (4-in-1) (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 200?, vjpp2, 0, 0, pdc100, vjpp2, spg2xx_pdc_game_state, empty_init, "Conny / VideoJet", "Plug Play TV Games 2 (4-in-1) (VideoJet, France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/drivers/spg2xx_wiwi.cpp b/src/mame/drivers/spg2xx_wiwi.cpp index 7d3836ec0a2..afcc1124f9f 100644 --- a/src/mame/drivers/spg2xx_wiwi.cpp +++ b/src/mame/drivers/spg2xx_wiwi.cpp @@ -30,13 +30,12 @@ public: spg2xx_game_marc101_state(const machine_config &mconfig, device_type type, const char *tag) : spg2xx_game_state(mconfig, type, tag), m_prev_porta(0), + m_prev_portb(0), m_toggle(false) { } void marc101(machine_config &config); - void init_m489(); - protected: void machine_start() override; void machine_reset() override; @@ -48,6 +47,7 @@ protected: virtual void portb_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; uint16_t m_prev_porta; + uint16_t m_prev_portb; bool m_toggle; emu_timer *m_pulse_timer; @@ -55,6 +55,22 @@ private: }; +class spg2xx_game_guitrbus_state : public spg2xx_game_marc101_state +{ +public: + spg2xx_game_guitrbus_state(const machine_config &mconfig, device_type type, const char *tag) : + spg2xx_game_marc101_state(mconfig, type, tag) + { } + + void guitrbus(machine_config &config); + +protected: + + virtual uint16_t portb_r(); + virtual void porta_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual void portb_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; +}; + class spg2xx_game_marc250_state : public spg2xx_game_marc101_state { public: @@ -121,6 +137,7 @@ void spg2xx_game_marc101_state::machine_reset() spg2xx_game_state::machine_reset(); m_pulse_timer->adjust(attotime::never); m_prev_porta = 0; + m_prev_portb = 0; m_toggle = false; } @@ -157,6 +174,15 @@ void spg2xx_game_marc101_state::marc101(machine_config &config) m_maincpu->porta_out().set(FUNC(spg2xx_game_marc101_state::porta_w)); } +void spg2xx_game_guitrbus_state::guitrbus(machine_config &config) +{ + spg2xx(config); + + m_maincpu->portb_in().set(FUNC(spg2xx_game_guitrbus_state::portb_r)); + m_maincpu->porta_out().set(FUNC(spg2xx_game_guitrbus_state::porta_w)); + m_maincpu->portb_out().set(FUNC(spg2xx_game_guitrbus_state::portb_w)); +} + // are these Port A behaviors related to IO A Special mode on the SoC? // the bits being tested do seem to be 'ExtClk2 / ExtClk1' @@ -170,6 +196,72 @@ uint16_t spg2xx_game_marc101_state::porta_r() return ret; } +uint16_t spg2xx_game_guitrbus_state::portb_r() +{ + uint16_t ret = m_io_p2->read() &~ 0x0008; + + ret |= m_toggle ? 0x0000 : 0x0008; + + return ret; +} + +void spg2xx_game_guitrbus_state::porta_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + logerror("%s: porta_w %04x (%04x) %c %c %c %c | %c %c %c %c | %c %c %c %c | %c %c %c %c \n", machine().describe_context(), data, mem_mask, + (mem_mask & 0x8000) ? ((data & 0x8000) ? '1' : '0') : 'x', + (mem_mask & 0x4000) ? ((data & 0x4000) ? '1' : '0') : 'x', + (mem_mask & 0x2000) ? ((data & 0x2000) ? '1' : '0') : 'x', + (mem_mask & 0x1000) ? ((data & 0x1000) ? '1' : '0') : 'x', + (mem_mask & 0x0800) ? ((data & 0x0800) ? '1' : '0') : 'x', + (mem_mask & 0x0400) ? ((data & 0x0400) ? '1' : '0') : 'x', + (mem_mask & 0x0200) ? ((data & 0x0200) ? '1' : '0') : 'x', + (mem_mask & 0x0100) ? ((data & 0x0100) ? '1' : '0') : 'x', + (mem_mask & 0x0080) ? ((data & 0x0080) ? '1' : '0') : 'x', + (mem_mask & 0x0040) ? ((data & 0x0040) ? '1' : '0') : 'x', + (mem_mask & 0x0020) ? ((data & 0x0020) ? '1' : '0') : 'x', + (mem_mask & 0x0010) ? ((data & 0x0010) ? '1' : '0') : 'x', + (mem_mask & 0x0008) ? ((data & 0x0008) ? '1' : '0') : 'x', + (mem_mask & 0x0004) ? ((data & 0x0004) ? '1' : '0') : 'x', + (mem_mask & 0x0002) ? ((data & 0x0002) ? '1' : '0') : 'x', + (mem_mask & 0x0001) ? ((data & 0x0001) ? '1' : '0') : 'x'); + + m_prev_porta = data; +} + +void spg2xx_game_guitrbus_state::portb_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + logerror("%s: portb_w %04x (%04x) %c %c %c %c | %c %c %c %c | %c %c %c %c | %c %c %c %c \n", machine().describe_context(), data, mem_mask, + (mem_mask & 0x8000) ? ((data & 0x8000) ? '1' : '0') : 'x', + (mem_mask & 0x4000) ? ((data & 0x4000) ? '1' : '0') : 'x', + (mem_mask & 0x2000) ? ((data & 0x2000) ? '1' : '0') : 'x', + (mem_mask & 0x1000) ? ((data & 0x1000) ? '1' : '0') : 'x', + (mem_mask & 0x0800) ? ((data & 0x0800) ? '1' : '0') : 'x', + (mem_mask & 0x0400) ? ((data & 0x0400) ? '1' : '0') : 'x', + (mem_mask & 0x0200) ? ((data & 0x0200) ? '1' : '0') : 'x', + (mem_mask & 0x0100) ? ((data & 0x0100) ? '1' : '0') : 'x', + (mem_mask & 0x0080) ? ((data & 0x0080) ? '1' : '0') : 'x', + (mem_mask & 0x0040) ? ((data & 0x0040) ? '1' : '0') : 'x', + (mem_mask & 0x0020) ? ((data & 0x0020) ? '1' : '0') : 'x', + (mem_mask & 0x0010) ? ((data & 0x0010) ? '1' : '0') : 'x', + (mem_mask & 0x0008) ? ((data & 0x0008) ? '1' : '0') : 'x', + (mem_mask & 0x0004) ? ((data & 0x0004) ? '1' : '0') : 'x', + (mem_mask & 0x0002) ? ((data & 0x0002) ? '1' : '0') : 'x', + (mem_mask & 0x0001) ? ((data & 0x0001) ? '1' : '0') : 'x'); + + if ((data & 0x0002) != (m_prev_portb & 0x0002)) + { + if ((data & 0x0002)) + { + logerror("ext timer reset\n"); + m_pulse_timer->adjust(attotime::from_hz(32), 0, attotime::from_hz(32)); + } + } + + m_prev_portb = data; +} + + + void spg2xx_game_marc101_state::porta_w(offs_t offset, uint16_t data, uint16_t mem_mask) { @@ -499,6 +591,28 @@ static INPUT_PORTS_START( m489 ) PORT_BIT( 0xfffc, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END +static INPUT_PORTS_START( guitrbus ) + PORT_START("P1") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Red / Do") + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Yellow / Re") + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Purple / Mi") + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Green / Fa") + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Menu") + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Blue / Sol") + + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Logo (either WinFun or no logo) + + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Whammy Bar") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Strum") + + PORT_START("P2") + PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("P3") + PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + void spg2xx_game_wiwi18_state::init_wiwi18() { @@ -542,9 +656,7 @@ void spg2xx_game_wiwi18_state::portb_w(offs_t offset, uint16_t data, uint16_t me } } -void spg2xx_game_marc101_state::init_m489() -{ -} + void spg2xx_game_marc101_state::portb_w(offs_t offset, uint16_t data, uint16_t mem_mask) { @@ -750,7 +862,6 @@ void spg2xx_game_marc250_state::portb_w(offs_t offset, uint16_t data, uint16_t m } } - ROM_START( foxsport ) ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD_SWAP( "foxsports.bin", 0x000000, 0x1000000, CRC(a5092f49) SHA1(feb4d432486b17d6cd2aed8cefd3d084f77c1733) ) // only a tiny amount of data in the 2nd half, what's it used for (if anything) @@ -775,7 +886,12 @@ ROM_END ROM_START( marc250 ) ROM_REGION( 0x10000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD_SWAP( "m527.u6", 0x0000000, 0x10000000, CRC(4b856cab) SHA1(41c66bbdb0bb1442d7e11da18e9e6b20048445ba) ) -ROM_END +ROM_END + +ROM_START( guitrbus ) + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "winfunguitar.bin", 0x000000, 0x400000, CRC(17419a27) SHA1(19377fcd18b08d3ae8e20de0244b3aaef1b5a66a) ) +ROM_END // box marked 'Wireless game console' 'Drahtlose Spielekonsole' 87 Sports games included : 18 hyper sports games, 69 arcade games. // Unit marked 'Hamy System' 'WiWi' @@ -788,6 +904,11 @@ CONS( 200?, foxsport, 0, 0, rad_skat, wiwi18, spg2xx_game_wiwi18_state, // thtere is another 'Drahtlose Spielekonsole 48-in-1' with '11 hyper sports games' (including Running) which are clearly SunPlus and would fit here, with the 37 non-hyper sports games presumably again being a NES/Famiclone cart -CONS( 2014, marc101, 0, 0, marc101, m489, spg2xx_game_marc101_state, init_m489, "Millennium 2000 GmbH", "Millennium Arcade 101 (M489) (Game Station 2 101-in-1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2014, marc101, 0, 0, marc101, m489, spg2xx_game_marc101_state, empty_init, "Millennium 2000 GmbH", "Millennium Arcade 101 (M489) (Game Station 2 101-in-1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) CONS( 2015, marc250, 0, 0, marc101, m489, spg2xx_game_marc250_state, init_m527, "Millennium 2000 GmbH", "Millennium Arcade 250 (M527)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) + +// has the following strings at the start of the ROM +// "Copyright(C) 2009-2012 ShenZhen Multi-Content Software CO., LTD" +// "LisencedTo: MCS" +CONS( 2012, guitrbus, 0, 0, guitrbus, guitrbus, spg2xx_game_guitrbus_state, empty_init, "WinFun", "Guitar Buster", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/includes/spg2xx.h b/src/mame/includes/spg2xx.h index ba46e8f0e5b..43d9477952f 100644 --- a/src/mame/includes/spg2xx.h +++ b/src/mame/includes/spg2xx.h @@ -34,12 +34,14 @@ public: { } void spg2xx_base(machine_config &config); + void spg2xx(machine_config &config); + void spg2xx_pal(machine_config &config); + void rad_skat(machine_config &config); void rad_skatp(machine_config &config); void rad_sktv(machine_config &config); void rad_crik(machine_config &config); void non_spg_base(machine_config &config); - void spg2xx(machine_config &config); void comil(machine_config &config); void tvsprt10(machine_config &config); void guitarfv(machine_config &config); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 666639d2d80..d5da00f4a7f 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -31760,6 +31760,7 @@ zdog otrail denv150 techni4 +duetpp ablmini senwld @@ -37542,6 +37543,7 @@ zone3d @source:spg29x_lexibook_jg7425.cpp lx_jg7425 +lx_aven @source:spg2xx.cpp rad_skat // @@ -37551,6 +37553,7 @@ rad_fb2 // mattelcs // comil // abltenni // +totspies fordrace tvsprt10 // decathln @@ -37634,7 +37637,9 @@ mgt20in1 @source:spg2xx_pdc.cpp pdc100 pdc50 +pdc200 pdc40t +pdc150t tmntpdc dorapdc vjpp2 @@ -37681,6 +37686,7 @@ foxsport lexifit marc101 marc250 +guitrbus @source:spg2xx_zone.cpp wirels60 // Wireless 60 -- cgit v1.2.3 From a633e603cd1bc18131e25a0b65b693a3efcce480 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 5 Jul 2020 18:21:26 +0200 Subject: taitogn: sianniv doesn't have zsg2 sound --- src/devices/cpu/m6809/m6809.cpp | 2 +- src/mame/drivers/simpsons.cpp | 2 +- src/mame/drivers/taitogn.cpp | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp index e2a83a17e00..39ba49cda10 100644 --- a/src/devices/cpu/m6809/m6809.cpp +++ b/src/devices/cpu/m6809/m6809.cpp @@ -616,7 +616,7 @@ mc6809_device::mc6809_device(const machine_config &mconfig, const char *tag, dev //------------------------------------------------- mc6809e_device::mc6809e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : m6809_base_device(mconfig, tag, owner, clock, MC6809E, 1) + : m6809_base_device(mconfig, tag, owner, clock, MC6809E, 1) { } diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp index 1af75d6c70f..c95545fb141 100644 --- a/src/mame/drivers/simpsons.cpp +++ b/src/mame/drivers/simpsons.cpp @@ -569,7 +569,7 @@ ROM_START( simpsons2pa ) /* Asia 2 Player */ ROM_REGION( 0x80000, "maincpu", 0 ) /* code + banked roms */ ROM_LOAD( "072-g02.16c", 0x00000, 0x20000, CRC(580ce1d6) SHA1(5b07fb8e8041e1663980aa35d853fdc13b22dac5) ) /* Same as both world 2p sets */ ROM_LOAD( "072-p01.17c", 0x20000, 0x20000, CRC(07ceeaea) SHA1(c18255ae1d578c2d53de80d6323cdf41cbe47b57) ) /* Same as both world 2p sets */ - ROM_LOAD( "072-113.13c", 0x40000, 0x20000, CRC(8781105a) SHA1(ef2f16f7a56d3715536511c674df4b3aab1be2bd) ) /* Same as world set simpsn2p */ + ROM_LOAD( "072-113.13c", 0x40000, 0x20000, CRC(8781105a) SHA1(ef2f16f7a56d3715536511c674df4b3aab1be2bd) ) /* Same as world set simpsons2p */ ROM_LOAD( "072-112.15c", 0x60000, 0x20000, CRC(3bd69404) SHA1(e055fed7e9bde8315ae2f9b2d35bc05fece6b80b) ) ROM_REGION( 0x28000, "audiocpu", 0 ) /* Z80 code + banks */ diff --git a/src/mame/drivers/taitogn.cpp b/src/mame/drivers/taitogn.cpp index 8f39e83094f..0e60a2a9ae5 100644 --- a/src/mame/drivers/taitogn.cpp +++ b/src/mame/drivers/taitogn.cpp @@ -357,7 +357,7 @@ public: { } - void init_coh3002t_nz(); + void init_nozoom(); void base_config(machine_config &config); void coh3002t_t2_mp(machine_config &config); @@ -569,7 +569,7 @@ void taitogn_state::machine_reset() m_flashbank->set_bank(m_jp1->read() << 1); } -void taitogn_state::init_coh3002t_nz() +void taitogn_state::init_nozoom() { m_has_zoom = false; } @@ -1095,18 +1095,18 @@ GAME( 1999, rcdego, gobyrc, coh3002t_t1, gobyrc, taitogn_state, em GAME( 1999, flipmaze, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT0, "MOSS / Taito", "Flip Maze (V2.04J 1999/09/02 20:00)", MACHINE_IMPERFECT_SOUND ) GAME( 2001, shikigam, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Alfa System / Taito", "Shikigami no Shiro (V2.03J 2001/08/07 18:11)", MACHINE_IMPERFECT_SOUND ) GAME( 2001, shikigama, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Alfa System / Taito", "Shikigami no Shiro - internal build (V1.02J 2001/09/27 18:45)", MACHINE_IMPERFECT_SOUND ) -GAME( 2003, sianniv, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Taito", "Space Invaders Anniversary (V2.02J)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // IRQ at the wrong time +GAME( 2003, sianniv, coh3002t, coh3002t_t1, coh3002t, taitogn_state, init_nozoom,ROT270, "Taito", "Space Invaders Anniversary (V2.02J)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // IRQ at the wrong time GAME( 2003, kollon, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT0, "Taito", "Kollon (V2.04JA 2003/11/01 12:00)", MACHINE_IMPERFECT_SOUND ) GAME( 2003, kollonc, kollon, coh3002t_cf, coh3002t_jp1, taitogn_state, empty_init, ROT0, "Taito", "Kollon (V2.04JC 2003/11/01 12:00)", MACHINE_IMPERFECT_SOUND ) /* Success */ -GAME( 1999, otenamih, coh3002t, coh3002t_t1, coh3002t, taitogn_state, init_coh3002t_nz, ROT0, "Success", "Otenami Haiken (V2.04J 1999/02/01 18:00:00)", 0 ) -GAME( 2000, psyvaria, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Success", "Psyvariar -Medium Unit- (V2.02O 2000/02/22 13:00)", MACHINE_IMPERFECT_SOUND ) -GAME( 2000, psyvarij, psyvaria, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Success", "Psyvariar -Medium Unit- (V2.04J 2000/02/15 11:00)", MACHINE_IMPERFECT_SOUND ) -GAME( 2000, psyvarrv, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Success", "Psyvariar -Revision- (V2.04J 2000/08/11 22:00)", MACHINE_IMPERFECT_SOUND ) -GAME( 2001, zokuoten, coh3002t, coh3002t_t1, coh3002t, taitogn_state, init_coh3002t_nz, ROT0, "Success", "Zoku Otenamihaiken (V2.03J 2001/02/16 16:00)", 0 ) // boots the soundcpu without any valid code, causing an infinite NMI loop (currently circumvented) -GAME( 2004, zooo, coh3002t, coh3002t_t1, coh3002t, taitogn_state, init_coh3002t_nz, ROT0, "Success", "Zooo (V2.01JA 2004/04/13 12:00)", 0 ) -GAME( 2005, otenamhf, coh3002t, coh3002t_cf, coh3002t_jp1, taitogn_state, init_coh3002t_nz, ROT0, "Success / Warashi", "Otenami Haiken Final (V2.07JC 2005/04/20 15:36)", 0 ) +GAME( 1999, otenamih, coh3002t, coh3002t_t1, coh3002t, taitogn_state, init_nozoom,ROT0, "Success", "Otenami Haiken (V2.04J 1999/02/01 18:00:00)", 0 ) +GAME( 2000, psyvaria, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Success", "Psyvariar -Medium Unit- (V2.02O 2000/02/22 13:00)", MACHINE_IMPERFECT_SOUND ) +GAME( 2000, psyvarij, psyvaria, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Success", "Psyvariar -Medium Unit- (V2.04J 2000/02/15 11:00)", MACHINE_IMPERFECT_SOUND ) +GAME( 2000, psyvarrv, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT270, "Success", "Psyvariar -Revision- (V2.04J 2000/08/11 22:00)", MACHINE_IMPERFECT_SOUND ) +GAME( 2001, zokuoten, coh3002t, coh3002t_t1, coh3002t, taitogn_state, init_nozoom,ROT0, "Success", "Zoku Otenamihaiken (V2.03J 2001/02/16 16:00)", 0 ) // boots the soundcpu without any valid code, causing an infinite NMI loop (currently circumvented) +GAME( 2004, zooo, coh3002t, coh3002t_t1, coh3002t, taitogn_state, init_nozoom,ROT0, "Success", "Zooo (V2.01JA 2004/04/13 12:00)", 0 ) +GAME( 2005, otenamhf, coh3002t, coh3002t_cf, coh3002t_jp1, taitogn_state, init_nozoom,ROT0, "Success / Warashi", "Otenami Haiken Final (V2.07JC 2005/04/20 15:36)", 0 ) /* Takumi */ GAME( 2001, nightrai, coh3002t, coh3002t_t1, coh3002t, taitogn_state, empty_init, ROT0, "Takumi", "Night Raid (V2.03J 2001/02/26 17:00)", MACHINE_IMPERFECT_SOUND ) -- cgit v1.2.3 From a337931b5bb11c971c3dffd3191b6d4472fe1f43 Mon Sep 17 00:00:00 2001 From: James Wallace Date: Sun, 5 Jul 2020 20:45:14 +0100 Subject: mpu4vid.cpp: Added AY8913 sound chip back to MPU4Video boards to fix the 'lock in warning' sounds in The Crystal Maze. Adjusted internal layouts to fix ESCAPE button alignment. v4mate and clones: adjusted clock speed of sampled sound board, fixes playback. Adjusted inputs to match reports in test mode. --- src/mame/drivers/mpu4vid.cpp | 150 ++++++++++++++++++++++++++++++++----------- src/mame/includes/mpu4.h | 1 - src/mame/layout/crmaze2p.lay | 4 +- src/mame/layout/crmaze4p.lay | 4 +- src/mame/machine/mpu4.cpp | 6 +- 5 files changed, 120 insertions(+), 45 deletions(-) diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp index 9f493fa7131..2931a1fc23a 100644 --- a/src/mame/drivers/mpu4vid.cpp +++ b/src/mame/drivers/mpu4vid.cpp @@ -170,10 +170,7 @@ TODO: - Get the BwB games running * They have a slightly different 68k memory map. The 6850 is at e00000 and the 6840 is at e01000 They appear to hang on the handshake with the MPU4 board - - Find out what causes the games to hang/reset in service mode - Probably down to AVDC interrupt timing, there seem to be a number of race conditions re: masks - that need sorting out with proper blank handling, etc. I'm using a scanline timer to drive an - approximation of the SCN2674 scanline logic, but this is perhaps better served as a proper device. + - EF9369 colour palette is still wrong in test modes. ***********************************************************************************************************/ #include "emu.h" #include "includes/mpu4.h" @@ -237,6 +234,7 @@ public: void crmaze(machine_config &config); void bwbvid5(machine_config &config); void mating(machine_config &config); + void vid_oki(machine_config &config); void init_crmazea(); void init_v4barqst2(); @@ -303,6 +301,7 @@ private: DECLARE_WRITE_LINE_MEMBER(mpu_video_reset); void vram_w(offs_t offset, uint8_t data); uint8_t vram_r(offs_t offset); + void ic3ss_vid_w(offs_t offset, uint8_t data); void bwbvid5_68k_map(address_map &map); void bwbvid_68k_map(address_map &map); @@ -708,18 +707,18 @@ static INPUT_PORTS_START( mating ) PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Test Button") PORT_CODE(KEYCODE_W) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Refill/Meter Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_INTERLOCK) PORT_NAME("Cashbox Door") PORT_CODE(KEYCODE_Q) PORT_TOGGLE PORT_START("BLACK2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Yellow") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Right Red") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Red") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Left Yellow") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Left Yellow") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Left Red") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Right Yellow") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Right Red") PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("100p Service?") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_START("DIL1") PORT_DIPNAME( 0x01, 0x00, "DIL101" ) PORT_DIPLOCATION("DIL1:01") @@ -1155,7 +1154,7 @@ void mpu4vid_state::machine_start() { mpu4_config_common(); - m_mod_number=4; //No AY chip + m_mod_number=2; /* setup communications */ m_link7a_connected = 1; } @@ -1186,8 +1185,8 @@ void mpu4vid_state::mpu4_68k_map(address_map &map) map(0x800000, 0x80ffff).ram().share("vid_mainram"); // map(0x810000, 0x81ffff).ram(); /* ? */ map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); - map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)); - map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)); + map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); + map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); // map(0xa00004, 0xa0000f).rw(FUNC(mpu4vid_state::mpu4_vid_unmap_r), FUNC(mpu4vid_state::mpu4_vid_unmap_w)); map(0xb00000, 0xb0000f).rw(m_scn2674, FUNC(scn2674_device::read), FUNC(scn2674_device::write)).umask16(0x00ff); map(0xc00000, 0xc1ffff).rw(FUNC(mpu4vid_state::mpu4_vid_vidram_r), FUNC(mpu4vid_state::mpu4_vid_vidram_w)).share("vid_vidram"); @@ -1203,14 +1202,14 @@ void mpu4vid_state::mpu4oki_68k_map(address_map &map) // map(0x640000, 0x7fffff).noprw(); /* Possible bug, reads and writes here */ map(0x800000, 0x80ffff).ram().share("vid_mainram"); map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); - map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)); - map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)); + map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); + map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); map(0xb00000, 0xb0000f).rw(m_scn2674, FUNC(scn2674_device::read), FUNC(scn2674_device::write)).umask16(0x00ff); map(0xc00000, 0xc1ffff).rw(FUNC(mpu4vid_state::mpu4_vid_vidram_r), FUNC(mpu4vid_state::mpu4_vid_vidram_w)).share("vid_vidram"); map(0xff8000, 0xff8003).rw(m_acia_1, FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0x00ff); map(0xff9000, 0xff900f).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)).umask16(0x00ff); map(0xffa040, 0xffa04f).r("ptm_ic3ss", FUNC(ptm6840_device::read)).umask16(0x00ff); // 6840PTM on sampled sound board - map(0xffa040, 0xffa04f).w(FUNC(mpu4vid_state::ic3ss_w)).umask16(0x00ff); // 6840PTM on sampled sound board + map(0xffa040, 0xffa04f).w(FUNC(mpu4vid_state::ic3ss_vid_w)).umask16(0x00ff); // 6840PTM on sampled sound board map(0xffa060, 0xffa067).rw("pia_ic4ss", FUNC(pia6821_device::read), FUNC(pia6821_device::write)).umask16(0x00ff); // PIA6821 on sampled sound board map(0xffd000, 0xffd00f).rw(FUNC(mpu4vid_state::vidcharacteriser_r), FUNC(mpu4vid_state::vidcharacteriser_w)).umask16(0x00ff); // map(0xfff000, 0xffffff).noprw(); /* Possible bug, reads and writes here */ @@ -1222,8 +1221,8 @@ void mpu4vid_state::bwbvid_68k_map(address_map &map) map(0x800000, 0x80ffff).ram().share("vid_mainram"); map(0x810000, 0x81ffff).ram(); /* ? */ map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); - map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)); - map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)); + map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); + map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); // map(0xa00000, 0xa0000f).rw(FUNC(mpu4vid_state::bt471_r), FUNC(mpu4vid_state::bt471_w)); //Some games use this // map(0xa00004, 0xa0000f).rw(FUNC(mpu4vid_state::mpu4_vid_unmap_r), FUNC(mpu4vid_state::mpu4_vid_unmap_w)); map(0xb00000, 0xb0000f).rw(m_scn2674, FUNC(scn2674_device::read), FUNC(scn2674_device::write)).umask16(0x00ff); @@ -1239,8 +1238,8 @@ void mpu4vid_state::bwbvid5_68k_map(address_map &map) map(0x800000, 0x80ffff).ram().share("vid_mainram"); map(0x810000, 0x81ffff).ram(); /* ? */ map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); - map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)); - map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)); + map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); //BT RAMDAC? + map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); // map(0xa00000, 0xa00003).rw(FUNC(mpu4vid_state::bt471_r), FUNC(mpu4vid_state::bt471_w)).umask16(0x00ff); Some games use this // map(0xa00004, 0xa0000f).rw(FUNC(mpu4vid_state::mpu4_vid_unmap_r), FUNC(mpu4vid_state::mpu4_vid_unmap_w)); map(0xb00000, 0xb0000f).rw(m_scn2674, FUNC(scn2674_device::read), FUNC(scn2674_device::write)).umask16(0x00ff); @@ -1249,7 +1248,7 @@ void mpu4vid_state::bwbvid5_68k_map(address_map &map) map(0xe01000, 0xe0100f).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)).umask16(0x00ff); map(0xe02000, 0xe02007).rw("pia_ic4ss", FUNC(pia6821_device::read), FUNC(pia6821_device::write)).umask16(0xff00); //Seems odd... map(0xe03000, 0xe0300f).r("ptm_ic3ss", FUNC(ptm6840_device::read)).umask16(0xff00); // 6840PTM on sampled sound board - map(0xe03000, 0xe0300f).w(FUNC(mpu4vid_state::ic3ss_w)).umask16(0xff00); // 6840PTM on sampled sound board + map(0xe03000, 0xe0300f).w(FUNC(mpu4vid_state::ic3ss_vid_w)).umask16(0xff00); // 6840PTM on sampled sound board map(0xe04000, 0xe0400f).rw(FUNC(mpu4vid_state::bwb_characteriser_r), FUNC(mpu4vid_state::bwb_characteriser_w)).umask16(0x00ff); //.rw(FUNC(mpu4vid_state::adpcm_r), FUNC(mpu4vid_state::adpcm_w)); CHR ? } @@ -1272,12 +1271,65 @@ void mpu4_state::mpu4_6809_map(address_map &map) } +//Sampled sound timer +/* +Unlike the standard setup, in MPU4 Video, the E clock is used for computation, so the chip frequency +freq = (1000000/((t3L+1)(t3H+1)))*[(t3H(T3L+1)+1)/(2(t1+1))] +where [] means rounded up integer, +t3L is the LSB of Clock 3, +t3H is the MSB of Clock 3, +and t1 is the initial value in clock 1. +*/ + +//O3 -> G1 O1 -> c2 o2 -> c1 + +/* This is a bit of a cheat - since we don't clock into the OKI chip directly, we need to +calculate the oscillation frequency in advance. We're running the timer for interrupt +purposes, but the frequency calculation is done by plucking the values out as they are written.*/ +void mpu4vid_state::ic3ss_vid_w(offs_t offset, uint8_t data) +{ + m_ptm_ic3ss->write(offset,data); + + if (offset == 3) + { + m_t1 = data; + } + if (offset == 6) + { + m_t3h = data; + } + if (offset == 7) + { + m_t3l = data; + } + + // E clock = VIDEO_MASTER_CLOCK / 10 + + float num = (1000000/((m_t3l + 1)*(m_t3h + 1))); + float denom1 = ((m_t3h *(m_t3l + 1)+ 1)/(2*(m_t1 + 1))); + + int denom2 = denom1 + 0.5f;//need to round up, this gives same precision as chip + int freq=num*denom2; + + if (freq) + { + m_msm6376->set_unscaled_clock(freq); + } +} + void mpu4vid_state::mpu4_vid(machine_config &config) { MC6809(config, m_maincpu, MPU4_MASTER_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &mpu4vid_state::mpu4_6809_map); + + AY8913(config, m_ay8913, MPU4_MASTER_CLOCK/4); + m_ay8913->set_flags(AY8910_SINGLE_OUTPUT); + m_ay8913->set_resistors_load(820, 0, 0); + m_ay8913->add_route(ALL_OUTPUTS, "lspeaker", 1.0); + m_ay8913->add_route(ALL_OUTPUTS, "rspeaker", 1.0); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* confirm */ mpu4_common(config); @@ -1300,7 +1352,6 @@ void mpu4vid_state::mpu4_vid(machine_config &config) m_videocpu->set_addrmap(AS_PROGRAM, &mpu4vid_state::mpu4_68k_map); m_videocpu->set_reset_callback(FUNC(mpu4vid_state::mpu_video_reset)); -// config.set_maximum_quantum(attotime::from_hz(960)); PALETTE(config, m_palette).set_entries(ef9369_device::NUMCOLORS); @@ -1339,14 +1390,33 @@ void mpu4vid_state::crmaze(machine_config &config) m_pia5->writepb_handler().set_nop(); } +void mpu4vid_state::vid_oki(machine_config &config) +{ + //On MPU4 Video, the sound board is clocked via the 68k E clock, + //and all samples are adjusted to fit the different clock speed. + PTM6840(config, m_ptm_ic3ss, VIDEO_MASTER_CLOCK / 10); + m_ptm_ic3ss->set_external_clocks(0, 0, 0); + m_ptm_ic3ss->o1_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_c2)); + m_ptm_ic3ss->o2_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_c1)); + //m_ptm_ic3ss->o3_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_g1)); + //m_ptm_ic3ss->irq_callback().set(FUNC(mpu4_state::cpu1_ptm_irq)); + + pia6821_device &pia_ic4ss(PIA6821(config, "pia_ic4ss", 0)); + pia_ic4ss.readpb_handler().set(FUNC(mpu4vid_state::pia_gb_portb_r)); + pia_ic4ss.writepa_handler().set(FUNC(mpu4vid_state::pia_gb_porta_w)); + pia_ic4ss.writepb_handler().set(FUNC(mpu4vid_state::pia_gb_portb_w)); + pia_ic4ss.ca2_handler().set(FUNC(mpu4vid_state::pia_gb_ca2_w)); + pia_ic4ss.cb2_handler().set(FUNC(mpu4vid_state::pia_gb_cb2_w)); +} + void mpu4vid_state::mating(machine_config &config) { crmaze(config); + vid_oki(config); m_videocpu->set_addrmap(AS_PROGRAM, &mpu4vid_state::mpu4oki_68k_map); - mpu4_common2(config); - okim6376_device &msm6376(OKIM6376(config, "msm6376", 128000)); //? + okim6376_device &msm6376(OKIM6376(config, "msm6376", 128000)); //Adjusted by IC3 on sound board msm6376.add_route(0, "lspeaker", 0.5); msm6376.add_route(1, "rspeaker", 0.5); } @@ -1584,15 +1654,15 @@ static mpu4_chr_table quidgrid_data[64] = { }; static mpu4_chr_table blank_data[72] = { -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, -{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, + {0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff}, }; @@ -3618,7 +3688,10 @@ ROM_END /* Complete sets */ /* Standard sets are the most common setups, while Datapak releases use a BACTA datalogger (not emulated) to record more information about the game operation, for security etc. AMLD versions do not pay out, and instead just feature highscore tables. These were mainly intended for locations unwilling to pay for gaming licenses. -The AMLD Crystal Maze versions appear to be a mixture of the original game modules and Team Challenge's scoring system. This would suggest they were all made ~1994. */ +The AMLD Crystal Maze versions appear to be a mixture of the original game modules and Team Challenge's scoring system. This would suggest they were all made ~1994, despite +the copyright dates recorded. +TODO: Sort these better given the wide variation in dates/versions/core code (SWP version id, for one thing). +*/ GAME( 199?, v4bios, 0, mod2, mpu4, mpu4_state, empty_init, ROT0, "Barcrest","MPU4 Video Firmware",MACHINE_IS_BIOS_ROOT ) @@ -3626,23 +3699,26 @@ GAME( 199?, v4bios, 0, mod2, mpu4, mpu4_state, empty_in GAMEL( 1993, v4cmaze, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.3) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 GAMEL( 1993, v4cmazedat, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.3, Datapak) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9D -GAMEL( 1993, v4cmazea, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmazea, ROT0, "Barcrest","The Crystal Maze (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 (actually newer than the 1.1 set then??) GAMEL( 1993, v4cmazeb, v4cmaze, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze (v1.2) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 GAMEL( 1993, v4cmazec, v4cmaze, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze (v1.3 alt) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 GAMEL( 1993, v4cmazed, v4cmaze, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze (v1.1) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.6 +GAMEL( 1993, v4cmazea, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmazea, ROT0, "Barcrest","The Crystal Maze (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 (actually newer than the 1.1 set then??) + GAMEL( 1993, v4cmaze2, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze2, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.2) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0 GAMEL( 1993, v4cmaze2d, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze2, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.2, Datapak) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0D -GAMEL( 1993, v4cmaze2a, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze2a, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0 /* unprotected? proto? */ GAMEL( 1993, v4cmaze2b, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze2, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.0) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0 GAMEL( 1993, v4cmaze2c, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze2, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v?.?) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )// bad rom? +GAMEL( 1993, v4cmaze2a, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze2a, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0 /* unprotected? proto? */ + GAMEL( 1994, v4cmaze3, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze3, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.9) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 0.7 GAMEL( 1994, v4cmaze3d, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze3, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.9, Datapak) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 0.7D -GAMEL( 1994, v4cmaze3a, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze3a, ROT0, "Barcrest","The Crystal Maze Team Challenge (v1.2, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 0.7 GAMEL( 1994, v4cmaze3b, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.8) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 0.7 GAMEL( 1994, v4cmaze3c, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze Team Challenge (v?.?) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )// missing one program rom +GAMEL( 1994, v4cmaze3a, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze3a, ROT0, "Barcrest","The Crystal Maze Team Challenge (v1.2, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 0.7 + GAME( 199?, v4turnov, v4bios, mpu4_vid, turnover, mpu4vid_state, init_turnover, ROT0, "Barcrest","Turnover (v2.3) (MPU4 Video)",GAME_FLAGS ) GAME( 1990, v4skltrk, v4bios, mpu4_vid, skiltrek, mpu4vid_state, init_skiltrek, ROT0, "Barcrest","Skill Trek (v1.1) (MPU4 Video, set 1)",GAME_FLAGS ) // 10 pound max diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h index dee32473408..780832db214 100644 --- a/src/mame/includes/mpu4.h +++ b/src/mame/includes/mpu4.h @@ -20,7 +20,6 @@ #define MPU4_MASTER_CLOCK XTAL(6'880'000) #define VIDEO_MASTER_CLOCK XTAL(10'000'000) - #ifdef MAME_DEBUG #define MPU4VIDVERBOSE 1 #else diff --git a/src/mame/layout/crmaze2p.lay b/src/mame/layout/crmaze2p.lay index ae7754a56d0..a377010d7c3 100644 --- a/src/mame/layout/crmaze2p.lay +++ b/src/mame/layout/crmaze2p.lay @@ -18,11 +18,11 @@ license:CC0 - + - + diff --git a/src/mame/layout/crmaze4p.lay b/src/mame/layout/crmaze4p.lay index 8c2afff0b99..7c6613636e7 100644 --- a/src/mame/layout/crmaze4p.lay +++ b/src/mame/layout/crmaze4p.lay @@ -18,11 +18,11 @@ license:CC0 - + - + diff --git a/src/mame/machine/mpu4.cpp b/src/mame/machine/mpu4.cpp index 246ccb03e03..03521465965 100644 --- a/src/mame/machine/mpu4.cpp +++ b/src/mame/machine/mpu4.cpp @@ -3143,7 +3143,7 @@ void mpu4_state::mod4oki_alt(machine_config &config) mpu4_common2(config); mpu4_type2_6reel(config); - OKIM6376(config, m_msm6376, 128000); //16KHz sample Can also be 85430 at 10.5KHz and 64000 at 8KHz + OKIM6376(config, m_msm6376, 128000); //Adjusted by IC3, default to 16KHz sample. Can also be 85430 at 10.5KHz and 64000 at 8KHz m_msm6376->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm6376->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -3156,7 +3156,7 @@ void mpu4_state::mod4oki_5r(machine_config &config) mpu4_common2(config); mpu4_std_5reel(config); - OKIM6376(config, m_msm6376, 128000); //16KHz sample Can also be 85430 at 10.5KHz and 64000 at 8KHz + OKIM6376(config, m_msm6376, 128000); //Adjusted by IC3, default to 16KHz sample. Can also be 85430 at 10.5KHz and 64000 at 8KHz m_msm6376->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm6376->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -3168,7 +3168,7 @@ void mpu4_state::bwboki(machine_config &config) mpu4_common2(config); mpu4_bwb_5reel(config); - OKIM6376(config, m_msm6376, 128000); //16KHz sample Can also be 85430 at 10.5KHz and 64000 at 8KHz + OKIM6376(config, m_msm6376, 128000); //Adjusted by IC3, default to 16KHz sample. Can also be 85430 at 10.5KHz and 64000 at 8KHz m_msm6376->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm6376->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } -- cgit v1.2.3 From d71717e75b11caa2bd5370246b36e455917312d8 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sun, 5 Jul 2020 21:49:47 +0200 Subject: netlist: pfunction now supports unary minus operators. --- src/lib/netlist/plib/pfunction.cpp | 108 +++++++++++++++++++------------ src/lib/netlist/plib/pfunction.h | 1 + src/lib/netlist/tests/test_pfunction.cpp | 37 +++++++---- 3 files changed, 91 insertions(+), 55 deletions(-) diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp index f977059ff69..7113ab7bd4e 100644 --- a/src/lib/netlist/plib/pfunction.cpp +++ b/src/lib/netlist/plib/pfunction.cpp @@ -98,7 +98,9 @@ namespace plib { { rc.m_cmd = GE; stk -= 1; } else if (cmd == "if") { rc.m_cmd = IF; stk -= 2; } - else if (cmd == "pow") + else if (cmd == "neg") + { rc.m_cmd = NEG; stk -= 0; } + else if (cmd == "pow" || cmd == "^") { rc.m_cmd = POW; stk -= 1; } else if (cmd == "log") { rc.m_cmd = LOG; stk -= 0; } @@ -149,25 +151,43 @@ namespace plib { m_precompiled.push_back(rc); } if (stk != 1) - throw pexception(plib::pfmt("pfunction: stack count different to one on <{2}>")(expr)); + throw pexception(plib::pfmt("pfunction: stack count {1] different to one on <{2}>")(stk, expr)); + } + + static bool is_number(const pstring &n) + { + if (n.empty()) + return false; + const auto l = n.substr(0,1); + return (l >= "0" && l <= "9"); + } + + static bool is_id(const pstring &n) + { + if (n.empty()) + return false; + const auto l = n.substr(0,1); + return ((l >= "a" && l <= "z") || (l >= "A" && l <= "Z")); } static int get_prio(const pstring &v) { - if (v == "(" || v == ")") - return 1; + if (v == "neg") + return 25; if (plib::left(v, 1) >= "a" && plib::left(v, 1) <= "z") return 0; - if (v == "^") - return 30; - if (v == "*" || v == "/") - return 20; - if (v == "+" || v == "-") - return 10; - if (v == "<" || v == ">" || v == "<=" || v == ">=") - return 9; + if (v == "(" || v == ")") + return 1; if (v == "==" || v == "!=") return 8; + if (v == "<" || v == ">" || v == "<=" || v == ">=") + return 9; + if (v == "+" || v == "-") + return 10; + if (v == "*" || v == "/") + return 20; + if (v == "^") + return 30; return -1; } @@ -186,52 +206,55 @@ namespace plib { { // Shunting-yard infix parsing std::vector sep = {"(", ")", ",", "*", "/", "+", "-", "^", "<=", ">=", "==", "!=", "<", ">"}; - std::vector sexpr1(plib::psplit(plib::replace_all(expr, " ", ""), sep)); + std::vector sexpr2(plib::psplit(plib::replace_all(expr, " ", ""), sep)); std::stack opstk; std::vector postfix; + std::vector sexpr1; std::vector sexpr; // FIXME: We really need to switch to ptokenizer and fix negative number // handling in ptokenizer. - // Fix numbers - for (std::size_t i = 0; i < sexpr1.size(); ) + // Fix numbers exponential numbers + for (std::size_t i = 0; i < sexpr2.size(); ) { - if ((i == 0) && (sexpr1.size() > 1) && (sexpr1[0] == "-") - && (plib::left(sexpr1[1],1) >= "0") && (plib::left(sexpr1[1],1) <= "9")) + if (i + 2 < sexpr2.size() && sexpr2[i].length() > 1) { - if (sexpr1.size() < 4) + auto r(plib::right(sexpr2[i], 1)); + auto ne(sexpr2[i+1]); + if ((is_number(sexpr2[i])) + && (r == "e" || r == "E") + && (ne == "-" || ne == "+")) { - sexpr.push_back(sexpr1[0] + sexpr1[1]); - i+=2; + sexpr1.push_back(sexpr2[i] + ne + sexpr2[i+2]); + i+=3; } else + sexpr1.push_back(sexpr2[i++]); + } + else + sexpr1.push_back(sexpr2[i++]); + } + // Fix numbers with unary minus/plus + for (std::size_t i = 0; i < sexpr1.size(); ) + { + if (sexpr1[i]=="-" && (i+1 < sexpr1.size()) && is_number(sexpr1[i+1])) + { + if (i==0 || !(is_number(sexpr1[i-1]) || sexpr1[i-1] == ")" || is_id(sexpr1[i-1]))) { - auto r(plib::right(sexpr1[1], 1)); - auto ne(sexpr1[2]); - if ((r == "e" || r == "E") && (ne == "-" || ne == "+")) - { - sexpr.push_back(sexpr1[0] + sexpr1[1] + ne + sexpr1[3]); - i+=4; - } - else - { - sexpr.push_back(sexpr1[0] + sexpr1[1]); - i+=2; - } + sexpr.push_back("-" + sexpr1[i+1]); + i+=2; } + else + sexpr.push_back(sexpr1[i++]); } - else if (i + 2 < sexpr1.size() && sexpr1[i].length() > 1) + else if (sexpr1[i]=="-" && (i+1 < sexpr1.size()) && (is_id(sexpr1[i+1]) || sexpr1[i+1] == "(")) { - auto l(plib::left(sexpr1[i], 1)); - auto r(plib::right(sexpr1[i], 1)); - auto ne(sexpr1[i+1]); - if ((l >= "0") && (l <= "9") - && (r == "e" || r == "E") - && (ne == "-" || ne == "+")) + if (i==0 || !(is_number(sexpr1[i-1]) || sexpr1[i-1] == ")" || is_id(sexpr1[i-1]))) { - sexpr.push_back(sexpr1[i] + ne + sexpr1[i+2]); - i+=3; + sexpr.push_back("neg"); + sexpr.push_back(sexpr1[i+1]); + i+=2; } else sexpr.push_back(sexpr1[i++]); @@ -296,7 +319,7 @@ namespace plib { opstk.pop(); } //for (auto &e : postfix) - // printf("\t %s\n", e.c_str()); + // printf("\t%s\n", e.c_str()); compile_postfix(inputs, postfix, expr); } @@ -353,6 +376,7 @@ namespace plib { OP(LE, 1, ST2 <= ST1 ? 1.0 : 0.0) OP(GE, 1, ST2 >= ST1 ? 1.0 : 0.0) OP(IF, 2, (ST2 != 0.0) ? ST1 : ST0) + OP(NEG, 0, -ST2) OP(POW, 1, plib::pow(ST2, ST1)) OP(LOG, 0, plib::log(ST2)) OP(SIN, 0, plib::sin(ST2)) diff --git a/src/lib/netlist/plib/pfunction.h b/src/lib/netlist/plib/pfunction.h index 6b5e94b2900..7f754d3cfad 100644 --- a/src/lib/netlist/plib/pfunction.h +++ b/src/lib/netlist/plib/pfunction.h @@ -39,6 +39,7 @@ namespace plib { LE, GE, IF, + NEG, // unary minus POW, LOG, SIN, diff --git a/src/lib/netlist/tests/test_pfunction.cpp b/src/lib/netlist/tests/test_pfunction.cpp index 847865b4a4f..c82617659ec 100644 --- a/src/lib/netlist/tests/test_pfunction.cpp +++ b/src/lib/netlist/tests/test_pfunction.cpp @@ -12,27 +12,27 @@ #include "plib/pfunction.h" #define PFUNCEXPECT(formula, val) \ - EXPECT_EQ(val, plib::pfunction(formula)()); + EXPECT_EQ(val, plib::pfunction(formula)()) TEST(pfunction, operators) { - PFUNCEXPECT("1==1", 1.0) - PFUNCEXPECT("1 *0 == 2-1-1", 1.0) - PFUNCEXPECT("0!=1", 1.0) - PFUNCEXPECT("0<1", 1.0) - PFUNCEXPECT("1>0", 1.0) - PFUNCEXPECT("0<=1", 1.0) - PFUNCEXPECT("1>=0", 1.0) - PFUNCEXPECT("1<=1", 1.0) - PFUNCEXPECT("1>=1", 1.0) + PFUNCEXPECT("1==1", 1.0); + PFUNCEXPECT("1 *0 == 2-1-1", 1.0); + PFUNCEXPECT("0!=1", 1.0); + PFUNCEXPECT("0<1", 1.0); + PFUNCEXPECT("1>0", 1.0); + PFUNCEXPECT("0<=1", 1.0); + PFUNCEXPECT("1>=0", 1.0); + PFUNCEXPECT("1<=1", 1.0); + PFUNCEXPECT("1>=1", 1.0); EXPECT_EQ(1.0, plib::pfunction("0!=a", {"a"})({1.0})); } TEST(pfunction, func_if) { - PFUNCEXPECT("if(1>0, 2, 0)", 2.0) - PFUNCEXPECT("if(0>1, 2, 3)", 3.0) - PFUNCEXPECT("if(sin(1)>0, 2, 3)", 3.0) // fail + PFUNCEXPECT("if(1>0, 2, 0)", 2.0); + PFUNCEXPECT("if(0>1, 2, 3)", 3.0); + PFUNCEXPECT("if(sin(1)>0, 2, 3)", 3.0); // fail EXPECT_EQ( 1.0, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,-1.0,3.0})); EXPECT_EQ(-0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,1.0,1.0})); EXPECT_EQ( 0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({3.0,1.0,1.0})); @@ -41,3 +41,14 @@ TEST(pfunction, func_if) EXPECT_TRUE(1.0 == plib::pfunction("0!=a", {"a"})({1.0})); } +TEST(pfunction, unary_minus) +{ + PFUNCEXPECT("-1>-2", 1.0); + PFUNCEXPECT("(-3)*(-4)", 12.0); + PFUNCEXPECT("(-3)*-4", 12.0); + PFUNCEXPECT("-3*-4", 12.0); + EXPECT_EQ( -3.0, plib::pfunction("-A0", {"A0"})({3.0})); + PFUNCEXPECT("3*-trunc(3.2)", -9.0); + PFUNCEXPECT("3*-(3*2)", -18.0); + PFUNCEXPECT("3*-(2*1)^2", -12.0); +} -- cgit v1.2.3 From c4b9b2a3acde05e528e4607f96f4e3720f9e54a6 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sun, 5 Jul 2020 21:50:14 +0200 Subject: netlist: update documenation on noise sources. --- src/lib/netlist/devices/nlid_system.h | 33 ++++++++++++++++++++++++++++----- src/lib/netlist/examples/noise.cpp | 4 ++-- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h index 42671caa5fc..958c40087e0 100644 --- a/src/lib/netlist/devices/nlid_system.h +++ b/src/lib/netlist/devices/nlid_system.h @@ -582,12 +582,35 @@ namespace devices state_var m_last_state; }; + /// + /// \brief noise source + /// + /// An externally clocked noise source. The noise acts as a voltage source + /// with internal resistance RI. + /// + /// Typical application: + /// + /// VCC + /// | + /// R + /// R + /// R + /// | + /// +-----> Output + /// | + /// +-------+ + /// | 1 | + /// --->| I | + /// | 2 | + /// +-------+ + /// | + /// R + /// R + /// R + /// | + /// GND + /// // ----------------------------------------------------------------------------- - // nld_sys_noise - noise source - // - // An externally clocked noise source. - // ----------------------------------------------------------------------------- - template class D> NETLIB_OBJECT(sys_noise) { diff --git a/src/lib/netlist/examples/noise.cpp b/src/lib/netlist/examples/noise.cpp index 870d526e477..5fcda7a01dc 100644 --- a/src/lib/netlist/examples/noise.cpp +++ b/src/lib/netlist/examples/noise.cpp @@ -9,7 +9,7 @@ //! [noise_example] #include "netlist/devices/net_lib.h" -// ./nltool -t 1 -l X.3 -l X.4 -n oscillator src/lib/netlist/examples/noise.cpp +// ./nltool -t 1 -l R1.2 -n noise src/lib/netlist/examples/noise.cpp // X.3 : Square out // X.4 : Triangle out @@ -19,7 +19,7 @@ NETLIST_START(noise) CLOCK(nclk, 2000) - SYS_NOISE_MT_N(noise, 0.5) + SYS_NOISE_MT_U(noise, 2.5) RES(R1,1000) RES(R2,1000) -- cgit v1.2.3 From 0fa6e8255b5a866ad0b42157653d7194cbc1738c Mon Sep 17 00:00:00 2001 From: cam900 Date: Mon, 6 Jul 2020 06:27:22 +0900 Subject: k007232.cpp: Updates sound routines (#6857) k007232.cpp: Updates and cleanup [cam900] - Use device_memory_interface for fetching sample - Fix frequency behavior - Allow dynamic clock changes - Use shorter/correct type values - Simplify update routine --- src/devices/sound/k007232.cpp | 174 +++++++++++++++++++++++------------------- src/devices/sound/k007232.h | 50 +++++++----- 2 files changed, 128 insertions(+), 96 deletions(-) diff --git a/src/devices/sound/k007232.cpp b/src/devices/sound/k007232.cpp index d7bc1cdc144..2795053520d 100644 --- a/src/devices/sound/k007232.cpp +++ b/src/devices/sound/k007232.cpp @@ -26,18 +26,24 @@ #include "emu.h" #include "k007232.h" #include "wavwrite.h" +#include #define K007232_LOG_PCM (0) -#define BASE_SHIFT (12) DEFINE_DEVICE_TYPE(K007232, k007232_device, "k007232", "K007232 PCM Controller") -k007232_device::k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k007232_device::k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, K007232, tag, owner, clock) , device_sound_interface(mconfig, *this) + , device_memory_interface(mconfig, *this) + , m_data_config("data", ENDIANNESS_LITTLE, 8, 17) // 17 bit address, 8 bit data, can be bankswitched per each voices , m_rom(*this, DEVICE_SELF) + , m_pcmlimit(~0) + , m_bank(0) + , m_stream(nullptr) , m_port_write_handler(*this) { + std::fill(std::begin(m_wreg), std::end(m_wreg), 0); } //------------------------------------------------- @@ -46,59 +52,77 @@ k007232_device::k007232_device(const machine_config &mconfig, const char *tag, d void k007232_device::device_start() { - /* Set up the chips */ - m_pcmlimit = m_rom.bytes(); + m_pcmlimit = 1 << 17; + // default mapping (bankswitched ROM) + if ((m_rom.target() != nullptr) && (!has_configured_map(0))) + { + if (m_rom.bytes() > 0x20000) + space(0).install_read_handler(0x00000, std::min(0x1ffff, m_rom.bytes() - 1), read8sm_delegate(*this, FUNC(k007232_device::read_rom_default))); + else + { + space(0).install_rom(0x00000, m_rom.mask(), m_rom.target()); + m_pcmlimit = m_rom.bytes(); + } + } + space(0).cache(m_cache); + /* Set up the chips */ m_port_write_handler.resolve_safe(); for (int i = 0; i < KDAC_A_PCM_MAX; i++) { - m_addr[i] = 0; - m_start[i] = 0; - m_step[i] = 0; - m_play[i] = 0; - m_bank[i] = 0; + m_channel[i].addr = 0; + m_channel[i].start = 0; + m_channel[i].counter = 0x200; + m_channel[i].step = 0; + m_channel[i].play = 0; + m_channel[i].bank = 0; } - m_vol[0][0] = 255; /* channel A output to output A */ - m_vol[0][1] = 0; - m_vol[1][0] = 0; - m_vol[1][1] = 255; /* channel B output to output B */ + m_channel[0].vol[0] = 255; /* channel A output to output A */ + m_channel[0].vol[1] = 0; + m_channel[1].vol[0] = 0; + m_channel[1].vol[1] = 255; /* channel B output to output B */ for (auto & elem : m_wreg) elem = 0; - m_stream = machine().sound().stream_alloc(*this, 0 , 2, clock()/128); - - make_fncodes(); + m_stream = machine().sound().stream_alloc(*this, 0, 2, clock()/128); - save_item(NAME(m_vol)); - save_item(NAME(m_addr)); - save_item(NAME(m_start)); - save_item(NAME(m_step)); - save_item(NAME(m_bank)); - save_item(NAME(m_play)); + save_item(STRUCT_MEMBER(m_channel, vol)); + save_item(STRUCT_MEMBER(m_channel, addr)); + save_item(STRUCT_MEMBER(m_channel, counter)); + save_item(STRUCT_MEMBER(m_channel, start)); + save_item(STRUCT_MEMBER(m_channel, step)); + save_item(STRUCT_MEMBER(m_channel, bank)); + save_item(STRUCT_MEMBER(m_channel, play)); save_item(NAME(m_wreg)); } -void k007232_device::make_fncodes() +//------------------------------------------------- +// device_clock_changed - called if the clock +// changes +//------------------------------------------------- + +void k007232_device::device_clock_changed() { - for (int i = 0; i < 0x200; i++) - { - m_fncode[i] = (32 << BASE_SHIFT) / (0x200 - i); - } + m_stream->set_sample_rate(clock()/128); } -uint32_t k007232_device::get_start_address(int channel) +//------------------------------------------------- +// memory_space_config - return a description of +// any address spaces owned by this device +//------------------------------------------------- + +device_memory_interface::space_config_vector k007232_device::memory_space_config() const { - const uint32_t reg_index = (channel ? 6 : 0); - return (BIT(m_wreg[reg_index + 4], 0) << 16) | (m_wreg[reg_index + 3] << 8) | m_wreg[reg_index + 2] | m_bank[channel]; + return space_config_vector{ std::make_pair(0, &m_data_config) }; } /************************************************/ /* Konami PCM write register */ /************************************************/ -void k007232_device::write(offs_t offset, uint8_t data) +void k007232_device::write(offs_t offset, u8 data) { m_stream->update(); @@ -115,7 +139,7 @@ void k007232_device::write(offs_t offset, uint8_t data) } else { - int channel = (offset >= 6 ? 1 : 0); + channel_t *channel = &m_channel[(offset >= 6 ? 1 : 0)]; int reg_index = (offset >= 6 ? 6 : 0); if (offset >= 6) offset -= 6; @@ -124,19 +148,20 @@ void k007232_device::write(offs_t offset, uint8_t data) { case 0: // address step, LSB case 1: // address step, MSB - m_step[channel] = m_fncode[(BIT(m_wreg[reg_index + 1], 0) << 8) | m_wreg[reg_index]]; + channel->step = (BIT(m_wreg[reg_index + 1], 0) << 8) | m_wreg[reg_index]; break; case 2: case 3: case 4: // working data for start address + channel->start = (BIT(m_wreg[reg_index + 4], 0) << 16) | (m_wreg[reg_index + 3] << 8) | m_wreg[reg_index + 2]; break; case 5: // start address - m_start[channel] = get_start_address(channel); - if (m_start[channel] < m_pcmlimit) + if (channel->start < m_pcmlimit) { - m_play[channel] = 1; - m_addr[channel] = 0; + channel->play = true; + channel->addr = channel->start; + channel->counter = 0x200; } break; } @@ -147,18 +172,17 @@ void k007232_device::write(offs_t offset, uint8_t data) /* Konami PCM read register */ /************************************************/ -uint8_t k007232_device::read(offs_t offset) +u8 k007232_device::read(offs_t offset) { if (offset == 5 || offset == 11) { - int channel = (offset == 11) ? 1 : 0; + channel_t *channel = &m_channel[(offset == 11) ? 1 : 0]; - m_start[channel] = get_start_address(channel); - - if (m_start[channel] < m_pcmlimit) + if (channel->start < m_pcmlimit) { - m_play[channel] = 1; - m_addr[channel] = 0; + channel->play = true; + channel->addr = channel->start; + channel->counter = 0x200; } } return 0; @@ -168,14 +192,14 @@ uint8_t k007232_device::read(offs_t offset) void k007232_device::set_volume(int channel, int vol_a, int vol_b) { - m_vol[channel][0] = vol_a; - m_vol[channel][1] = vol_b; + m_channel[channel].vol[0] = vol_a; + m_channel[channel].vol[1] = vol_b; } void k007232_device::set_bank(int chan_a_bank, int chan_b_bank) { - m_bank[0] = chan_a_bank << 17; - m_bank[1] = chan_b_bank << 17; + m_channel[0].bank = chan_a_bank << 17; + m_channel[1].bank = chan_b_bank << 17; } /*****************************************************************************/ @@ -194,17 +218,18 @@ void k007232_device::sound_stream_update(sound_stream &stream, stream_sample_t * { for (int i = 0; i < KDAC_A_PCM_MAX; i++) { - if (m_play[i]) + channel_t *channel = &m_channel[i]; + if (channel->play) { char filebuf[256]; - snprintf(filebuf, 256, "pcm%08x.wav", m_start[i]); + snprintf(filebuf, 256, "pcm%08x.wav", channel->start); wav_file *file = wav_open(filebuf, stream.sample_rate(), 1); if (file != nullptr) { - uint32_t addr = m_start[i]; - while (!BIT(m_rom[addr], 7) && addr < m_pcmlimit) + u32 addr = channel->start; + while (!BIT(read_sample(i, addr), 7) && addr < m_pcmlimit) { - int16_t out = ((m_rom[addr] & 0x7f) - 0x40) << 7; + int16_t out = ((read_sample(i, addr) & 0x7f) - 0x40) << 7; wav_add_data_16(file, &out, 1); addr++; } @@ -214,50 +239,45 @@ void k007232_device::sound_stream_update(sound_stream &stream, stream_sample_t * } } - for (int i = 0; i < KDAC_A_PCM_MAX; i++) + for (int j = 0; j < samples; j++) { - if (m_play[i]) + for (int i = 0; i < KDAC_A_PCM_MAX; i++) { - /**** PCM setup ****/ - uint32_t addr_lsb = (m_addr[i] >> BASE_SHIFT) & 0x000fffff; - uint32_t addr = m_start[i] + addr_lsb; - int vol_a = m_vol[i][0] * 2; - int vol_b = m_vol[i][1] * 2; - - for (int j = 0; j < samples; j++) + channel_t *channel = &m_channel[i]; + if (channel->play) { - uint32_t old_addr = addr; - addr_lsb = (m_addr[i] >> BASE_SHIFT) & 0x000fffff; - addr = m_start[i] + addr_lsb; - while (old_addr <= addr) + /**** PCM setup ****/ + int vol_a = channel->vol[0] * 2; + int vol_b = channel->vol[1] * 2; + + u32 addr = channel->addr & 0x1ffff; + while (channel->counter <= channel->step) // result : clock / (4 * (512 - frequency)) { - if (BIT(m_rom[old_addr], 7) || old_addr >= m_pcmlimit) + if (BIT(read_sample(i, addr++), 7) || addr >= m_pcmlimit) { // end of sample if (BIT(m_wreg[13], i)) { /* loop to the beginning */ - m_start[i] = get_start_address(i); - addr = m_start[i]; - m_addr[i] = 0; - old_addr = addr; /* skip loop */ + addr = channel->start; } else { /* stop sample */ - m_play[i] = 0; + channel->play = false; + break; } - break; } - old_addr++; + channel->counter += (0x200 - channel->step); } + channel->addr = addr; - if (m_play[i] == 0) + if (!channel->play) break; - m_addr[i] += m_step[i]; + channel->counter -= 32; - int out = (m_rom[addr] & 0x7f) - 0x40; + int out = (read_sample(i, addr) & 0x7f) - 0x40; outputs[0][j] += out * vol_a; outputs[1][j] += out * vol_b; diff --git a/src/devices/sound/k007232.h b/src/devices/sound/k007232.h index e32cfd24053..72d5e701dc9 100644 --- a/src/devices/sound/k007232.h +++ b/src/devices/sound/k007232.h @@ -9,15 +9,15 @@ #pragma once -class k007232_device : public device_t, public device_sound_interface +class k007232_device : public device_t, public device_sound_interface, public device_memory_interface { public: - k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); auto port_write() { return m_port_write_handler.bind(); } - void write(offs_t offset, uint8_t data); - uint8_t read(offs_t offset); + void write(offs_t offset, u8 data); + u8 read(offs_t offset); /* The 007232 has two channels and produces two outputs. The volume control @@ -34,34 +34,46 @@ public: protected: // device-level overrides virtual void device_start() override; + virtual void device_clock_changed() override; // sound stream update overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; - void make_fncodes(); + // device_memory_interface configuration + virtual space_config_vector memory_space_config() const override; -private: - uint32_t get_start_address(int channel); + address_space_config m_data_config; +private: static constexpr unsigned KDAC_A_PCM_MAX = 2; /* Channels per chip */ // internal state - required_region_ptr m_rom; + memory_access<17, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + optional_region_ptr m_rom; + + struct channel_t + { + u8 vol[2]; /* volume for the left and right channel */ + u32 addr; + int counter; + u32 start; + u16 step; + u32 bank; + bool play; + }; + + u8 read_rom_default(offs_t offset) { return m_rom[(m_bank + (offset & 0x1ffff)) & m_rom.mask()]; } + inline u8 read_sample(int channel, u32 addr) { m_bank = m_channel[channel].bank; return m_cache.read_byte(addr & 0x1ffff); } - uint8_t m_vol[KDAC_A_PCM_MAX][2]; /* volume for the left and right channel */ - uint32_t m_addr[KDAC_A_PCM_MAX]; - uint32_t m_start[KDAC_A_PCM_MAX]; - uint32_t m_step[KDAC_A_PCM_MAX]; - uint32_t m_bank[KDAC_A_PCM_MAX]; - int m_play[KDAC_A_PCM_MAX]; + channel_t m_channel[KDAC_A_PCM_MAX]; // 2 channels - uint8_t m_wreg[0x10]; /* write data */ + u8 m_wreg[0x10]; /* write data */ - uint32_t m_pcmlimit; + u32 m_pcmlimit; + u32 m_bank; - sound_stream * m_stream; - uint32_t m_fncode[0x200]; - devcb_write8 m_port_write_handler; + sound_stream *m_stream; + devcb_write8 m_port_write_handler; }; DECLARE_DEVICE_TYPE(K007232, k007232_device) -- cgit v1.2.3 From 261fe5d3bd85a277df42c3e6264d1a2b105b3830 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Sun, 5 Jul 2020 22:21:22 -0400 Subject: Williams System 11C "background" Audio Board: Add PIA portb and cb2 write callbacks and synchronize fences, and hook them up, this fixes the "MUSIC ERROR" and various bg-music feedback-triggered sounds in Williams System 11C pinballs, i.e. the "song" in Dr. Dude works correctly now. This is also preparation for renaming this device to "Williams D-11581 Audio Board" as the same PCB is also used on some Midway Y-unit arcade games, some Williams System 11A pinballs and all Williams System 11B pinballs (except Jokerz), not just on Williams System 11C pinballs. [Lord Nightmare] --- src/mame/audio/s11c_bg.cpp | 50 ++++++++++++++++++++++++++++++++-------------- src/mame/audio/s11c_bg.h | 29 +++++++++++++++++++-------- src/mame/drivers/s11c.cpp | 21 ++----------------- src/mame/includes/s11c.h | 2 -- 4 files changed, 58 insertions(+), 44 deletions(-) diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp index c57804523ad..acb8850242b 100644 --- a/src/mame/audio/s11c_bg.cpp +++ b/src/mame/audio/s11c_bg.cpp @@ -24,6 +24,8 @@ s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, d , m_pia40(*this, "pia40") , m_cpubank(*this, "bgbank") , m_rom(*this, finder_base::DUMMY_TAG) + , m_cb2_cb(*this) + , m_pb_cb(*this) { } @@ -38,19 +40,42 @@ void s11c_bg_device::s11c_bg_map(address_map &map) map(0x8000, 0xffff).bankr("bgbank"); } +TIMER_CALLBACK_MEMBER(s11c_bg_device::deferred_cb2_w) +{ + if (!m_cb2_cb.isnull()) + m_cb2_cb(param); + else + logerror("S11C_BG CB2 writeback called, but callback is not registered!\n"); +} + +TIMER_CALLBACK_MEMBER(s11c_bg_device::deferred_pb_w) +{ + if (!m_pb_cb.isnull()) + m_pb_cb(param); + else + logerror("S11C_BG PB writeback called, but callback is not registered!\n"); +} + + WRITE_LINE_MEMBER( s11c_bg_device::pia40_cb2_w) { -// m_pia34->cb1_w(state); // To Widget MCB1 through CPU Data interface + machine().scheduler().synchronize(timer_expired_delegate(FUNC(s11c_bg_device::deferred_cb2_w),this), state); } void s11c_bg_device::pia40_pb_w(uint8_t data) { -// m_pia34->portb_w(data); + machine().scheduler().synchronize(timer_expired_delegate(FUNC(s11c_bg_device::deferred_pb_w),this), data); } -void s11c_bg_device::ctrl_w(uint8_t data) + +WRITE_LINE_MEMBER( s11c_bg_device::extra_w ) +{ + m_pia40->cb2_w(state); +} + +WRITE_LINE_MEMBER( s11c_bg_device::ctrl_w ) { - m_pia40->cb1_w(data); + m_pia40->cb1_w(state); } void s11c_bg_device::data_w(uint8_t data) @@ -65,15 +90,15 @@ void s11c_bg_device::device_add_mconfig(machine_config &config) config.set_maximum_quantum(attotime::from_hz(50)); YM2151(config, m_ym2151, XTAL(3'579'545)); // "3.58 MHz" on schematics and parts list - m_ym2151->irq_handler().set(FUNC(s11c_bg_device::ym2151_irq_w)); - m_ym2151->add_route(ALL_OUTPUTS, *this, 0.25); + m_ym2151->irq_handler().set(m_pia40, FUNC(pia6821_device::ca1_w)).invert(); // IRQ is not true state + m_ym2151->add_route(ALL_OUTPUTS, *this, 0.1); MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); - HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.5); + HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.6); PIA6821(config, m_pia40, 0); m_pia40->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w)); @@ -86,6 +111,9 @@ void s11c_bg_device::device_add_mconfig(machine_config &config) void s11c_bg_device::device_start() { + /* resolve lines */ + m_cb2_cb.resolve(); + m_pb_cb.resolve(); } void s11c_bg_device::device_reset() @@ -96,14 +124,6 @@ void s11c_bg_device::device_reset() m_cpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); } -WRITE_LINE_MEMBER( s11c_bg_device::ym2151_irq_w) -{ - if(state == CLEAR_LINE) - m_pia40->ca1_w(1); - else - m_pia40->ca1_w(0); -} - void s11c_bg_device::bg_cvsd_clock_set_w(uint8_t data) { m_hc55516->clock_w(1); diff --git a/src/mame/audio/s11c_bg.h b/src/mame/audio/s11c_bg.h index b5d9330c677..34f7734e9af 100644 --- a/src/mame/audio/s11c_bg.h +++ b/src/mame/audio/s11c_bg.h @@ -23,11 +23,16 @@ public: // construction/destruction s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - void bg_cvsd_clock_set_w(uint8_t data); - void bg_cvsd_digit_clock_clear_w(uint8_t data); - void bgbank_w(uint8_t data); - void ctrl_w(uint8_t data); - void data_w(uint8_t data); + // note to keep synchronization working, the host machine should have synchronization timer expired delegates + // before writing to the following 3 things: + DECLARE_WRITE_LINE_MEMBER(extra_w); // external write to board CB2 (J4 pin 12), does anything actually do this? + DECLARE_WRITE_LINE_MEMBER(ctrl_w); // external write to board CB1 (J4 pin 13) + void data_w(uint8_t data); // external write to board data bus (J4 pins 3 thru 10 for D0-D7) + virtual void device_reset() override; // external write to board /RESET (J4 pin 18) + + // callbacks + auto cb2_cb() { return m_cb2_cb.bind(); } + auto pb_cb() { return m_pb_cb.bind(); } template void set_romregion(T &&tag) { m_rom.set_tag(std::forward(tag)); } @@ -35,9 +40,11 @@ public: protected: // overrides virtual void device_start() override; - virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override; + TIMER_CALLBACK_MEMBER(deferred_cb2_w); + TIMER_CALLBACK_MEMBER(deferred_pb_w); + private: required_device m_cpu; required_device m_ym2151; @@ -46,9 +53,15 @@ private: required_memory_bank m_cpubank; required_region_ptr m_rom; - DECLARE_WRITE_LINE_MEMBER(ym2151_irq_w); - void pia40_pb_w(uint8_t data); + devcb_write_line m_cb2_cb; + devcb_write8 m_pb_cb; + DECLARE_WRITE_LINE_MEMBER(pia40_cb2_w); + void pia40_pb_w(uint8_t data); + + void bg_cvsd_clock_set_w(uint8_t data); + void bg_cvsd_digit_clock_clear_w(uint8_t data); + void bgbank_w(uint8_t data); }; DECLARE_DEVICE_TYPE(S11C_BG, s11c_bg_device) diff --git a/src/mame/drivers/s11c.cpp b/src/mame/drivers/s11c.cpp index 44e0e214c0f..87d74381e65 100644 --- a/src/mame/drivers/s11c.cpp +++ b/src/mame/drivers/s11c.cpp @@ -26,25 +26,6 @@ void s11c_state::s11c_main_map(address_map &map) map(0x4000, 0xffff).rom(); } -void s11c_state::s11c_audio_map(address_map &map) -{ - map(0x0000, 0x07ff).mirror(0x0800).ram(); - map(0x1000, 0x1000).mirror(0x0fff).w(FUNC(s11c_state::bank_w)); - map(0x2000, 0x2003).mirror(0x0ffc).rw(m_pias, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - map(0x8000, 0xbfff).bankr("bank0"); - map(0xc000, 0xffff).bankr("bank1"); -} - -void s11c_state::s11c_bg_map(address_map &map) -{ - map(0x0000, 0x07ff).mirror(0x1800).ram(); - map(0x2000, 0x2001).mirror(0x1ffe).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write)); - map(0x4000, 0x4003).mirror(0x1ffc).rw(m_pia40, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - map(0x6000, 0x6000).mirror(0x07ff).w(FUNC(s11c_state::bg_cvsd_digit_clock_clear_w)); - map(0x6800, 0x6800).mirror(0x07ff).w(FUNC(s11c_state::bg_cvsd_clock_set_w)); - map(0x7800, 0x7800).mirror(0x07ff).w(FUNC(s11c_state::bgbank_w)); - map(0x8000, 0xffff).bankr("bgbank"); -} static INPUT_PORTS_START( s11c ) PORT_START("SW.0") @@ -219,6 +200,8 @@ void s11c_state::s11c(machine_config &config) /* Add the background music card */ SPEAKER(config, "speaker").front_center(); S11C_BG(config, m_bg); + m_bg->pb_cb().set(m_pia34, FUNC(pia6821_device::portb_w)); + m_bg->cb2_cb().set(m_pia34, FUNC(pia6821_device::cb1_w)); m_bg->set_romregion(m_bgcpu); m_bg->add_route(ALL_OUTPUTS, "speaker", 1.0); } diff --git a/src/mame/includes/s11c.h b/src/mame/includes/s11c.h index cabdfaf44b3..ee1ccae5442 100644 --- a/src/mame/includes/s11c.h +++ b/src/mame/includes/s11c.h @@ -28,8 +28,6 @@ protected: private: void s11c_main_map(address_map &map); - void s11c_audio_map(address_map &map); - void s11c_bg_map(address_map &map); }; -- cgit v1.2.3 From 84689414be250a30e6ccac1d222a7677dc66debc Mon Sep 17 00:00:00 2001 From: cam900 Date: Mon, 6 Jul 2020 12:53:07 +0900 Subject: rf5c400.cpp: Modernized save states, Allow clock changed behavior Add imperfect_features related to unemulated effects and unverified envelope issues --- src/devices/sound/rf5c400.cpp | 54 +++++++++++++++++++++++++------------------ src/devices/sound/rf5c400.h | 3 +++ 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/src/devices/sound/rf5c400.cpp b/src/devices/sound/rf5c400.cpp index 43fef5db852..d61ccb65337 100644 --- a/src/devices/sound/rf5c400.cpp +++ b/src/devices/sound/rf5c400.cpp @@ -159,33 +159,41 @@ void rf5c400_device::device_start() save_item(NAME(m_ext_mem_address)); save_item(NAME(m_ext_mem_data)); - for (int i = 0; i < ARRAY_LENGTH(m_channels); i++) - { - save_item(NAME(m_channels[i].startH), i); - save_item(NAME(m_channels[i].startL), i); - save_item(NAME(m_channels[i].freq), i); - save_item(NAME(m_channels[i].endL), i); - save_item(NAME(m_channels[i].endHloopH), i); - save_item(NAME(m_channels[i].loopL), i); - save_item(NAME(m_channels[i].pan), i); - save_item(NAME(m_channels[i].effect), i); - save_item(NAME(m_channels[i].volume), i); - save_item(NAME(m_channels[i].attack), i); - save_item(NAME(m_channels[i].decay), i); - save_item(NAME(m_channels[i].release), i); - save_item(NAME(m_channels[i].cutoff), i); - save_item(NAME(m_channels[i].pos), i); - save_item(NAME(m_channels[i].step), i); - save_item(NAME(m_channels[i].keyon), i); - save_item(NAME(m_channels[i].env_phase), i); - save_item(NAME(m_channels[i].env_level), i); - save_item(NAME(m_channels[i].env_step), i); - save_item(NAME(m_channels[i].env_scale), i); - } + save_item(STRUCT_MEMBER(m_channels, startH)); + save_item(STRUCT_MEMBER(m_channels, startL)); + save_item(STRUCT_MEMBER(m_channels, freq)); + save_item(STRUCT_MEMBER(m_channels, endL)); + save_item(STRUCT_MEMBER(m_channels, endHloopH)); + save_item(STRUCT_MEMBER(m_channels, loopL)); + save_item(STRUCT_MEMBER(m_channels, pan)); + save_item(STRUCT_MEMBER(m_channels, effect)); + save_item(STRUCT_MEMBER(m_channels, volume)); + save_item(STRUCT_MEMBER(m_channels, attack)); + save_item(STRUCT_MEMBER(m_channels, decay)); + save_item(STRUCT_MEMBER(m_channels, release)); + save_item(STRUCT_MEMBER(m_channels, cutoff)); + save_item(STRUCT_MEMBER(m_channels, pos)); + save_item(STRUCT_MEMBER(m_channels, step)); + save_item(STRUCT_MEMBER(m_channels, keyon)); + save_item(STRUCT_MEMBER(m_channels, env_phase)); + save_item(STRUCT_MEMBER(m_channels, env_level)); + save_item(STRUCT_MEMBER(m_channels, env_step)); + save_item(STRUCT_MEMBER(m_channels, env_scale)); m_stream = stream_alloc(0, 2, clock() / 384); } +//------------------------------------------------- +// device_clock_changed - called if the clock +// changes +//------------------------------------------------- + +void rf5c400_device::device_clock_changed() +{ + m_env_tables.init(clock()); + m_stream->set_sample_rate(clock() / 384); +} + //------------------------------------------------- // sound_stream_update - handle a stream update //------------------------------------------------- diff --git a/src/devices/sound/rf5c400.h b/src/devices/sound/rf5c400.h index 6971c8fc283..faccf327bf2 100644 --- a/src/devices/sound/rf5c400.h +++ b/src/devices/sound/rf5c400.h @@ -21,6 +21,8 @@ class rf5c400_device : public device_t, public device_rom_interface<25, 1, 0, ENDIANNESS_LITTLE> { public: + static constexpr feature_type imperfect_features() { return feature::SOUND; } // unemulated and/or unverified effects and envelopes + rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); uint16_t rf5c400_r(offs_t offset, uint16_t mem_mask = ~0); @@ -29,6 +31,7 @@ public: protected: // device-level overrides virtual void device_start() override; + virtual void device_clock_changed() override; // sound stream update overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; -- cgit v1.2.3 From 47da5905af206162ab5b0fd38ac4d3e247f6f30d Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Mon, 6 Jul 2020 05:25:28 -0400 Subject: Add notes to Williams D-11581 Audio Board device [Lord Nightmare] --- src/mame/audio/s11c_bg.cpp | 131 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 130 insertions(+), 1 deletion(-) diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp index acb8850242b..1036b04b9f3 100644 --- a/src/mame/audio/s11c_bg.cpp +++ b/src/mame/audio/s11c_bg.cpp @@ -1,10 +1,139 @@ // license:BSD-3-Clause // copyright-holders:Barry Rodewald /* - * s11c_bg.c - Williams System 11C background music (M68B09E + YM2151 + HC55516 + DAC) + * s11c_bg.cpp - Williams D-11581 "Audio Board" (M68B09E + YM2151 + HC55516 + DAC) + * Used by Williams System 11A (F-14), all System 11V (except Jokerz) and all System 11C pinballs + * Used by Midway Y-Unit Arcade Hardware (for Smash TV and High Impact Football) + * + * The mixing resistors before the MC1458 differ between the D-11581, D-11581-20xx (System 11C), and D-1129x board schematics: + * D-1129x D-11581 D-11581-20xx + * CPU_SOUND R32 2.2k R12 2.2k R12 4.7k + * YM2151 CH1 R33 10k R14 10k R14 20k + * YM2151 CH2 R34 10k R15 10k R15 20k + * MC1408 DAC R35 10k R16 6.3k R16 13k + * CVSD [R30 10k] [R13 4.99k 2%] R13 4.99k 2% + * MC1458 Feedback R38 10k R17 10k R17 10k + * MC1458 +-to-gnd R36 4.7k R11 4.7k R11 4.7k + * [] - if CVSD section present + + * Note that some D-11581 boards have the D-11297/8 mixing resistors in place, possibly those + * originally intended for use as replacement parts for D-1129x boards + * See https://pinwiki.com/wiki/images/f/fc/System_11_Sound_Board.JPG for an example, which + * may have originally been a D-11298 replacement, as the CVSD section is unpopulated. + + * Note that the System11C D-11581-20xx boards have the mixing resistors changed to make the CVSD sound twice + * as loud as it typically would be, by doubling the resistor values for the other mixer inputs, see + * https://pinwiki.com/wiki/images/7/7e/System11CSoundBoard.jpg + + * D-11581 Jumpers: + * W1 - exclusive w/W4, W6 : YM2151 reset comes from Board PIA CA2 + * W2 - exclusive w/W3 : EPROMS U4, U19, [U20] are 27512 + * W3 - exclusive w/W2 : EPROMS U4, U19, [U20] are 2764, 27128 or 27256 (where pin 1 must be high) [Pre-System 11C boards (i.e. D-11581) have a trace shorting W3 closed permanently which must be cut if 27512 EPROMs are to be used] + * W4 -'exclusive'w/W4, W6 : YM2151 reset comes from PIA CB2/J4 P12 (internal or external) + * W5 : Board Reset comes from J4 P18 (if absent, Board Reset is generated from power up) + * W6 - exclusive w/W4, W6 : YM2151 reset comes from Board Reset + * W7 : if present, the VCC/+5v rail is shorted to the +12v rail. (This is used in the case where the board is only run on +5v and -12v instead of +5v, +12v, and -12v) + * W8 - exclusive w/W9 : U5 is a 6164 SRAM (pin 23/A11 is grounded) + * W9 - exclusive w/W8 : U5 is a 6116 SRAM (pin 21, footprint pin 23, is /WE) + These two jumpers are only on the D-11581-20xx (System 11C) version, and W2 and W3 do not affect U20 on this PCB version: + * W10 - linked w/W2+W3 : (only if W2 is also set) EPROM U20 is a 27512 + * W11 - linked w/W2+W3 : EPROM U20 is a 2764, 27128 or 27256 (where pin 1 must be high) + + + + * Williams D-11297/D-11298 "BG Music & Speech Board": + * D-11297/D-11298 is the predecessor to D-11581, and is fully compatible with it. + * It is a larger board, physically. + * It is used on the following Williams System 11A games: + * D-11297 (CVSD populated) : PIN*BOT + * D-11298 (CVSD unpopulated): Millionaire! + + * Unlike the later D-11581 board which has mono output only, the D-11297/8 board + * has provisions for stereo output from the ym2151, but it is unclear if these were + * ever populated on any shipping boards. + + * D-1129x Jumpers: + * W1 : Board Reset comes from J4 P18 (if absent, Board Reset is generated from power up or a manual test switch sw1) + * W2 - exclusive w/W3 : EPROMS U4, U19, U20 are 27512 + * W3 - exclusive w/W2 : EPROMS U4, U19, U20 are 2764, 27128 or 27256 (where pin 1 must be high) + * W4 : if present, the VCC/+5v rail is shorted to the +12v rail. (This is used in the case where the board is only run on +5v and -12v instead of +5v, +12v, and -12v) + * W5 - exclusive w/W6, W7 : YM2151 reset comes from Board Reset + * W6 -'exclusive'w/W5, W7 : YM2151 reset comes from PIA CB2/J4 P12 (internal or external) + * W7 - exclusive w/W5, W6 : YM2151 reset comes from Board PIA CA2 + + + * The CVSD filter on all of these boards has the same components: + * + * .--------+---------. .--------+---------. + * | | | | | | + * Z --- c2 | Z --- c12 | + * Z r3 --- 180pf | Z r13 --- 1200pf | + * Z 180k | | Z 27k | | + * + c10 r1 | r2 | |\ | r11 | r12 | |\ | + * In >----|(------ZZZZ----+---------+--ZZZZ--+ | \ +----ZZZZ----+---------+--ZZZZ--+ | \ | + * 1uf 43k | 36k '--|- \ | 27k | 15k '--|- \ | + c20 + * --- c1 | >--' --- c11 | >--+----|(----> to mix resistor + * --- 0uf[1] .--|+ / --- 4700pf .--|+ / 10uf + * | r4 | | / | r14 | | / + * gnd .--ZZZZ--' |/ gnd .--ZZZZ--' |/ + * | 220k MC1458 | 27k MC1458 + * gnd gnd + * + * + * [1] Logically there should be a capacitor to ground at c1 of value 1800uf, + * but this was omitted on the D-11297 board, possibly in error, and this + * omission carried over to future sound boards including all versions of the D-11581. + * The WPC-AN sound board, A-12738-50xxx, fixed this by completely redesigning the filters for both the ym2151 and cvsd. + * + * This circuit would be a 4th order (cascaded 2nd order) op-amp multifeedback lowpass filter, + * but because of the capacitor omitted, it is actually a first order-with-gain lowpass, + * cascaded into a 2nd order lowpass, forming a 3rd order filter. + * + * This same exact circuit, same component values (but including the capacitor missing here), + * appears on the System 11 and System 11A mainboards. + * System 11B changed the components slightly, presumably so the CVSD produced on the mainboard + * sounded a bit different tone-wise to the CVSD produced from the Audio Board. + + + + * Williams "BG Music Board" D-11197-542 16-8972 + * * used on Williams System 11 'Road Kings' only + * * has DAC and YM2151/YM3012 + * * PIA CA2 EPROM banking + * * This board, like D-1129x, has provisions for YM2151 stereo via two amplifiers to be + * populated on the board itself, but like D-1129x they and their supporting passives are not populated. + + * The mixing resistors on this board are the same as D-1129x, except the CPU_SOUND input resistor is 2.7k instead of 2.2k + * There is no CVSD section at all. + + * D-11197 Jumpers: + * W1 : Board Reset comes from J4 P18 (if absent, Board Reset is generated from power up or a manual test switch sw1) + * W2 - exclusive w/W3 : EPROMS U4 is a 27512 + * W3 - exclusive w/W2 : EPROMS U4 is a 2764, 27128 or 27256 (where pin 1 must be high) + * W4 : if present, the VCC/+5v rail is shorted to the +12v rail. (This is used in the case where the board is only run on +5v and -12v instead of +5v, +12v, and -12v) + * W5 - exclusive w/W6, W7 : YM2151 reset comes from Board Reset + * W6 -'exclusive'w/W5, W7 : YM2151 reset comes from PIA CB2/J4 P12 (internal or external) + + + + * Williams "BG Sound Board" C-11029/C-11030 5766-10929-00 + * * used on Williams System 11 'High Speed' and 'Grand Lizard' only + * * has DAC only + * * no EPROM banking hardware, 1 28-pin ROM socket (2764/27128/27256 only) + * * PIA CA1 and CA2 are labeled 'HAND1' and 'HAND2' on schematics and are tied high/unused. + * * This board has some provisions for what looks like incoming and outgoing octal latch + * for data to be read from/writen to by the PIA, but this is unpopulated/bypassed on the pcb + + * C-11029/C-11030 Jumpers: + * W1 : Board Reset comes from J4 P18 (if absent, Board Reset is generated from power up or a manual test switch sw1) + + + * * Created on: 2/10/2013 * Author: bsr + * Updated on: 7/6/2020 + * Author: lord nightmare */ #include "emu.h" -- cgit v1.2.3 From 175154ad1483e668d71c35e05c3cab6ebe081cfc Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 6 Jul 2020 16:55:30 +0200 Subject: tigeroad.cpp: enabled save state support, minor cleanups (nw) --- src/mame/drivers/tigeroad.cpp | 353 +++++++++++++++++++++--------------------- src/mame/includes/tigeroad.h | 88 ++++++----- src/mame/machine/tigeroad.cpp | 12 +- src/mame/video/tigeroad.cpp | 66 ++++---- 4 files changed, 260 insertions(+), 259 deletions(-) diff --git a/src/mame/drivers/tigeroad.cpp b/src/mame/drivers/tigeroad.cpp index 428da5cfd63..1c8292e94fc 100644 --- a/src/mame/drivers/tigeroad.cpp +++ b/src/mame/drivers/tigeroad.cpp @@ -53,19 +53,12 @@ single plane board. #include "emu.h" #include "includes/tigeroad.h" +#include "machine/gen_latch.h" #include "screen.h" #include "speaker.h" - -void tigeroad_state::tigeroad_soundcmd_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - if (ACCESSING_BITS_8_15) - m_soundlatch->write(data >> 8); -} - - -void tigeroad_state::msm5205_w(uint8_t data) +void tigeroad_state::msm5205_w(u8 data) { m_msm->reset_w(BIT(data, 7)); m_msm->data_w(data); @@ -73,7 +66,7 @@ void tigeroad_state::msm5205_w(uint8_t data) m_msm->vclk_w(0); } -void f1dream_state::out3_w(uint8_t data) +void f1dream_state::out3_w(u8 data) { if ((m_old_p3 & 0x20) != (data & 0x20)) { @@ -92,7 +85,7 @@ void f1dream_state::out3_w(uint8_t data) m_old_p3 = data; } -void f1dream_state::blktiger_to_mcu_w(uint16_t data) +void f1dream_state::to_mcu_w(u16 data) { m_mcu->set_input_line(MCS51_INT0_LINE, HOLD_LINE); @@ -110,26 +103,28 @@ void tigeroad_state::main_map(address_map &map) map(0x000000, 0x03ffff).rom(); map(0xfe0800, 0xfe0cff).ram().share("spriteram"); - map(0xfe0d00, 0xfe1807).ram(); /* still part of OBJ RAM */ - map(0xfe4000, 0xfe4001).portr("P1_P2").w(FUNC(tigeroad_state::tigeroad_videoctrl_w)); /* char bank, coin counters, + ? */ - map(0xfe4002, 0xfe4003).portr("SYSTEM").w(FUNC(tigeroad_state::tigeroad_soundcmd_w)); /* .w(FUNC(tigeroad_state::tigeroad_soundcmd_w)); is replaced in init for for f1dream protection */ + map(0xfe0d00, 0xfe1807).ram(); // still part of OBJ RAM + map(0xfe4000, 0xfe4001).portr("P1_P2"); + map(0xfe4000, 0xfe4000).w(FUNC(tigeroad_state::videoctrl_w)); // char bank, coin counters, + ? + map(0xfe4002, 0xfe4003).portr("SYSTEM"); + map(0xfe4002, 0xfe4002).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0xfe4004, 0xfe4005).portr("DSW"); - map(0xfe8000, 0xfe8003).w(FUNC(tigeroad_state::tigeroad_scroll_w)); - map(0xfe800e, 0xfe800f).writeonly(); /* fe800e = watchdog or IRQ acknowledge */ - map(0xfec000, 0xfec7ff).ram().w(FUNC(tigeroad_state::tigeroad_videoram_w)).share("videoram"); + map(0xfe8000, 0xfe8003).w(FUNC(tigeroad_state::scroll_w)); + map(0xfe800e, 0xfe800f).writeonly(); // fe800e = watchdog or IRQ acknowledge + map(0xfec000, 0xfec7ff).ram().w(FUNC(tigeroad_state::videoram_w)).share("videoram"); map(0xff8000, 0xff87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xffc000, 0xffffff).ram().share("ram16"); } -uint8_t f1dream_state::mcu_shared_r(offs_t offset) +u8 f1dream_state::mcu_shared_r(offs_t offset) { - uint8_t ret = m_ram16[(0x3fe0 / 2) + offset]; + u8 ret = m_ram16[(0x3fe0 / 2) + offset]; return ret; } -void f1dream_state::mcu_shared_w(offs_t offset, uint8_t data) +void f1dream_state::mcu_shared_w(offs_t offset, u8 data) { m_ram16[(0x3fe0 / 2) + offset] = (m_ram16[(0x3fe0 / 2) + offset] & 0xff00) | data; } @@ -137,7 +132,7 @@ void f1dream_state::mcu_shared_w(offs_t offset, uint8_t data) void f1dream_state::f1dream_map(address_map &map) { main_map(map); - map(0xfe4002, 0xfe4003).portr("SYSTEM").w(FUNC(f1dream_state::blktiger_to_mcu_w)); + map(0xfe4002, 0xfe4003).portr("SYSTEM").w(FUNC(f1dream_state::to_mcu_w)); } void f1dream_state::f1dream_mcu_io(address_map &map) @@ -162,25 +157,27 @@ void pushman_state::bballs_map(address_map &map) map(0x60000, 0x60001).w(FUNC(pushman_state::bballs_mcu_comm_w)); // are these mirror addresses or does this PCB have a different addressing? map(0xe0800, 0xe17ff).ram().share("spriteram"); - map(0xe4000, 0xe4001).portr("P1_P2").w(FUNC(pushman_state::tigeroad_videoctrl_w)); - map(0xe4002, 0xe4003).portr("SYSTEM").w(FUNC(pushman_state::tigeroad_soundcmd_w)); + map(0xe4000, 0xe4001).portr("P1_P2"); + map(0xe4000, 0xe4000).w(FUNC(pushman_state::videoctrl_w)); + map(0xe4002, 0xe4003).portr("SYSTEM"); + map(0xe4002, 0xe4002).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0xe4004, 0xe4005).portr("DSW"); - map(0xe8000, 0xe8003).w(FUNC(pushman_state::tigeroad_scroll_w)); - map(0xe800e, 0xe800f).nopw(); /* ? */ - map(0xec000, 0xec7ff).ram().w(FUNC(pushman_state::tigeroad_videoram_w)).share("videoram"); + map(0xe8000, 0xe8003).w(FUNC(pushman_state::scroll_w)); + map(0xe800e, 0xe800f).nopw(); // ? + map(0xec000, 0xec7ff).ram().w(FUNC(pushman_state::videoram_w)).share("videoram"); map(0xf8000, 0xf87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xfc000, 0xfffff).ram().share("ram16"); } -/* Capcom games ONLY */ +// Capcom games ONLY void tigeroad_state::sound_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0x8000, 0x8001).rw("ym1", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); map(0xa000, 0xa001).rw("ym2", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); map(0xc000, 0xc7ff).ram(); - map(0xe000, 0xe000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); + map(0xe000, 0xe000).r("soundlatch", FUNC(generic_latch_8_device::read)); } void tigeroad_state::sound_port_map(address_map &map) @@ -189,7 +186,7 @@ void tigeroad_state::sound_port_map(address_map &map) map(0x7f, 0x7f).w("soundlatch2", FUNC(generic_latch_8_device::write)); } -/* toramich ONLY */ +// toramich ONLY void tigeroad_state::sample_map(address_map &map) { map(0x0000, 0xffff).rom(); @@ -202,12 +199,12 @@ void tigeroad_state::sample_port_map(address_map &map) map(0x01, 0x01).w(FUNC(tigeroad_state::msm5205_w)); } -/* Pushman / Bouncing Balls */ +// Pushman / Bouncing Balls void tigeroad_state::comad_sound_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0xc000, 0xc7ff).ram(); - map(0xe000, 0xe000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); + map(0xe000, 0xe000).r("soundlatch", FUNC(generic_latch_8_device::read)); } void tigeroad_state::comad_sound_io_map(address_map &map) @@ -473,7 +470,7 @@ static INPUT_PORTS_START( pushman ) PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* not sure, probably wrong */ + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // not sure, probably wrong PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE1 ) @@ -481,7 +478,7 @@ static INPUT_PORTS_START( pushman ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START("DSW") - PORT_DIPNAME( 0x0001, 0x0001, "Debug Mode (Cheat)") PORT_DIPLOCATION("SW1:1") /* Listed as "Screen Skip" */ + PORT_DIPNAME( 0x0001, 0x0001, "Debug Mode (Cheat)") PORT_DIPLOCATION("SW1:1") // Listed as "Screen Skip" PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_DIPNAME( 0x0002, 0x0002, "Pull Option" ) PORT_DIPLOCATION("SW1:2") @@ -540,7 +537,7 @@ static INPUT_PORTS_START( bballs ) PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* not sure, probably wrong */ + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // not sure, probably wrong PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE1 ) @@ -621,26 +618,26 @@ GFXDECODE_END void tigeroad_state::tigeroad(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(10'000'000)); /* verified on pcb */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(10'000'000)); // verified on pcb m_maincpu->set_addrmap(AS_PROGRAM, &tigeroad_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(tigeroad_state::irq2_line_hold)); - Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */ + Z80(config, m_audiocpu, XTAL(3'579'545)); // verified on pcb m_audiocpu->set_addrmap(AS_PROGRAM, &tigeroad_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &tigeroad_state::sound_port_map); - /* IRQs are triggered by the YM2203 */ + // IRQs are triggered by the YM2203 - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, "spriteram"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60.08); /* verified on pcb */ + screen.set_refresh_hz(60.08); // verified on pcb screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(32*8, 32*8); screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(tigeroad_state::screen_update_tigeroad)); + screen.set_screen_update(FUNC(tigeroad_state::screen_update)); screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); @@ -652,20 +649,24 @@ void tigeroad_state::tigeroad(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 1024); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - GENERIC_LATCH_8(config, m_soundlatch); + GENERIC_LATCH_8(config, "soundlatch"); GENERIC_LATCH_8(config, "soundlatch2"); - ym2203_device &ym1(YM2203(config, "ym1", XTAL(3'579'545))); /* verified on pcb */ - ym1.irq_handler().set_inputline("audiocpu", 0); + ym2203_device &ym1(YM2203(config, "ym1", XTAL(3'579'545))); // verified on pcb + ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(ALL_OUTPUTS, "mono", 0.25); - ym2203_device &ym2(YM2203(config, "ym2", XTAL(3'579'545))); /* verified on pcb */ + ym2203_device &ym2(YM2203(config, "ym2", XTAL(3'579'545))); // verified on pcb ym2.add_route(ALL_OUTPUTS, "mono", 0.25); } +void f1dream_state::machine_start() +{ + save_item(NAME(m_old_p3)); +} void f1dream_state::f1dream(machine_config &config) { @@ -673,33 +674,33 @@ void f1dream_state::f1dream(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &f1dream_state::f1dream_map); - I8751(config, m_mcu, XTAL(10'000'000)); /* ??? */ + I8751(config, m_mcu, XTAL(10'000'000)); // ??? m_mcu->set_addrmap(AS_IO, &f1dream_state::f1dream_mcu_io); - m_mcu->port_out_cb<1>().set(m_soundlatch, FUNC(generic_latch_8_device::write)); + m_mcu->port_out_cb<1>().set("soundlatch", FUNC(generic_latch_8_device::write)); m_mcu->port_out_cb<3>().set(FUNC(f1dream_state::out3_w)); } -/* same as above but with additional Z80 for samples playback */ +// same as above but with additional Z80 for samples playback void tigeroad_state::toramich(machine_config &config) { tigeroad(config); - /* basic machine hardware */ + // basic machine hardware - z80_device &sample(Z80(config, "sample", 3579545)); /* ? */ + z80_device &sample(Z80(config, "sample", 3579545)); // ? sample.set_addrmap(AS_PROGRAM, &tigeroad_state::sample_map); sample.set_addrmap(AS_IO, &tigeroad_state::sample_port_map); - sample.set_periodic_int(FUNC(tigeroad_state::irq0_line_hold), attotime::from_hz(4000)); /* ? */ + sample.set_periodic_int(FUNC(tigeroad_state::irq0_line_hold), attotime::from_hz(4000)); // ? - /* sound hardware */ + // sound hardware MSM5205(config, m_msm, 384000); - m_msm->set_prescaler_selector(msm5205_device::SEX_4B); /* 4KHz playback ? */ + m_msm->set_prescaler_selector(msm5205_device::SEX_4B); // 4KHz playback ? m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); } void tigeroad_state::f1dream_comad(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware M68000(config, m_maincpu, 8000000); m_maincpu->set_addrmap(AS_PROGRAM, &tigeroad_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(tigeroad_state::irq2_line_hold)); @@ -710,15 +711,15 @@ void tigeroad_state::f1dream_comad(machine_config &config) config.set_maximum_quantum(attotime::from_hz(3600)); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, "spriteram"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60.08); /* verified on pcb */ - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_refresh_hz(60.08); // verified on pcb + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(32*8, 32*8); screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(tigeroad_state::screen_update_tigeroad)); + screen.set_screen_update(FUNC(tigeroad_state::screen_update)); screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); @@ -730,10 +731,10 @@ void tigeroad_state::f1dream_comad(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 1024); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - GENERIC_LATCH_8(config, m_soundlatch); + GENERIC_LATCH_8(config, "soundlatch"); ym2203_device &ym1(YM2203(config, "ym1", 2000000)); ym1.irq_handler().set_inputline("audiocpu", 0); @@ -759,7 +760,7 @@ void pushman_state::pushman(machine_config &config) f1dream_comad(config); m_maincpu->set_addrmap(AS_PROGRAM, &pushman_state::pushman_map); - M68705R3(config, m_mcu, 4000000); /* No idea */ + M68705R3(config, m_mcu, 4000000); // No idea m_mcu->porta_w().set(FUNC(pushman_state::mcu_pa_w)); m_mcu->portb_w().set(FUNC(pushman_state::mcu_pb_w)); m_mcu->portc_w().set(FUNC(pushman_state::mcu_pc_w)); @@ -779,138 +780,138 @@ void pushman_state::bballs(machine_config &config) ***************************************************************************/ -ROM_START( tigeroad ) /* N86614A-5 + N86614B-6 board combo - ECT program roms */ - ROM_REGION( 0x40000, "maincpu", 0 ) /* 256K for 68000 code */ - ROM_LOAD16_BYTE( "tre_02.6j", 0x00000, 0x20000, CRC(c394add0) SHA1(f71cceca92ed7d2211f508df9ddfa97e0dd28d11) ) /* Blue ink underline */ - ROM_LOAD16_BYTE( "tre_04.6k", 0x00001, 0x20000, CRC(73bfbf4a) SHA1(821af477953f7a64f4f1b09e8978fb2bce4138ff) ) /* Blue ink underline */ +ROM_START( tigeroad ) // N86614A-5 + N86614B-6 board combo - ECT program roms + ROM_REGION( 0x40000, "maincpu", 0 ) // 256K for 68000 code + ROM_LOAD16_BYTE( "tre_02.6j", 0x00000, 0x20000, CRC(c394add0) SHA1(f71cceca92ed7d2211f508df9ddfa97e0dd28d11) ) // Blue ink underline + ROM_LOAD16_BYTE( "tre_04.6k", 0x00001, 0x20000, CRC(73bfbf4a) SHA1(821af477953f7a64f4f1b09e8978fb2bce4138ff) ) // Blue ink underline - ROM_REGION( 0x10000, "audiocpu", 0 ) /* audio CPU */ - ROM_LOAD( "tru_05.12k", 0x0000, 0x8000, CRC(f9a7c9bf) SHA1(4d37c71aa6523ac21c6e8b23f9957e75ec4304bf) ) /* Red ink underline */ + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "tru_05.12k", 0x0000, 0x8000, CRC(f9a7c9bf) SHA1(4d37c71aa6523ac21c6e8b23f9957e75ec4304bf) ) // Red ink underline - /* i8751 microcontroller not populated */ + // i8751 microcontroller not populated - /* no samples player in the English version */ + // no samples player in the English version ROM_REGION( 0x008000, "text", 0 ) - ROM_LOAD( "tr_01.10d", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) /* 8x8 text */ + ROM_LOAD( "tr_01.10d", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) // 8x8 text ROM_REGION( 0x100000, "tiles", 0 ) - ROM_LOAD( "tr-01a.3f", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) /* tiles */ + ROM_LOAD( "tr-01a.3f", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) ROM_LOAD( "tr-04a.3h", 0x20000, 0x20000, CRC(8863a63c) SHA1(11bfce5b09c5b8a781c658f035d5658c3710d189) ) ROM_LOAD( "tr-02a.3j", 0x40000, 0x20000, CRC(1a2c5f89) SHA1(2a2aa2f1e2a0cdd4bbdb25236e49c7cc573db9e9) ) ROM_LOAD( "tr-05.3l", 0x60000, 0x20000, CRC(5bf453b3) SHA1(5eef151974c6b818a17756549d24a702e1f3a859) ) ROM_LOAD( "tr-03a.2f", 0x80000, 0x20000, CRC(1e0537ea) SHA1(bc65f7104d5f7728b68b3dcb45151c41fc30aa0d) ) ROM_LOAD( "tr-06a.2h", 0xa0000, 0x20000, CRC(b636c23a) SHA1(417e289745996bd00114df6ade591e702265d3a5) ) ROM_LOAD( "tr-07a.2j", 0xc0000, 0x20000, CRC(5f907d4d) SHA1(1820c5c6e0b078db9c64655c7983ea115ad81036) ) - ROM_LOAD( "tr_08.2l", 0xe0000, 0x20000, CRC(adee35e2) SHA1(6707cf43a697eb9465449a144ae4508afe2e6496) ) /* EPROM */ + ROM_LOAD( "tr_08.2l", 0xe0000, 0x20000, CRC(adee35e2) SHA1(6707cf43a697eb9465449a144ae4508afe2e6496) ) // EPROM ROM_REGION( 0x080000, "spritegen", 0 ) - ROM_LOAD32_BYTE( "tr-09a.3b", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) /* sprites */ + ROM_LOAD32_BYTE( "tr-09a.3b", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) ROM_LOAD32_BYTE( "tr-10a.2b", 0x00002, 0x20000, CRC(8f6f03d7) SHA1(08a02cfb373040ea5ffbf5604f68df92a1338bb0) ) ROM_LOAD32_BYTE( "tr-11a.3d", 0x00001, 0x20000, CRC(cd9152e5) SHA1(6df3c43c0c41289890296c2b2aeca915dfdae3b0) ) ROM_LOAD32_BYTE( "tr-12a.2d", 0x00000, 0x20000, CRC(7d8a99d0) SHA1(af8221cfd2ce9aa3bf296981fb7fddd1e9ef4599) ) - ROM_REGION( 0x08000, "bgmap", 0 ) /* background tilemaps */ + ROM_REGION( 0x08000, "bgmap", 0 ) ROM_LOAD( "tr_13.7l", 0x0000, 0x8000, CRC(a79be1eb) SHA1(4191ccd48f7650930f9a4c2be0790239d7420bb1) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) - N82S129A or compatible */ + ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) - N82S129A or compatible ROM_END -ROM_START( tigeroadu ) /* N86614A-5 + N86614B-6 board combo - US ROMSTAR program roms */ - ROM_REGION( 0x40000, "maincpu", 0 ) /* 256K for 68000 code */ - ROM_LOAD16_BYTE( "tru_02.6j", 0x00000, 0x20000, CRC(8d283a95) SHA1(eb6c9225f79f62c22ae1e8980a557d896f598947) ) /* Red ink underline */ - ROM_LOAD16_BYTE( "tru_04.6k", 0x00001, 0x20000, CRC(72e2ef20) SHA1(57ab7df2050042690ccfb1f2d170840f926dcf46) ) /* Red ink underline */ +ROM_START( tigeroadu ) // N86614A-5 + N86614B-6 board combo - US ROMSTAR program roms + ROM_REGION( 0x40000, "maincpu", 0 ) // 256K for 68000 code + ROM_LOAD16_BYTE( "tru_02.6j", 0x00000, 0x20000, CRC(8d283a95) SHA1(eb6c9225f79f62c22ae1e8980a557d896f598947) ) // Red ink underline + ROM_LOAD16_BYTE( "tru_04.6k", 0x00001, 0x20000, CRC(72e2ef20) SHA1(57ab7df2050042690ccfb1f2d170840f926dcf46) ) // Red ink underline - ROM_REGION( 0x10000, "audiocpu", 0 ) /* audio CPU */ - ROM_LOAD( "tru_05.12k", 0x0000, 0x8000, CRC(f9a7c9bf) SHA1(4d37c71aa6523ac21c6e8b23f9957e75ec4304bf) ) /* Red ink underline */ + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "tru_05.12k", 0x0000, 0x8000, CRC(f9a7c9bf) SHA1(4d37c71aa6523ac21c6e8b23f9957e75ec4304bf) ) // Red ink underline - /* i8751 microcontroller not populated */ + // i8751 microcontroller not populated - /* no samples player in the English version */ + // no samples player in the English version ROM_REGION( 0x008000, "text", 0 ) - ROM_LOAD( "tr_01.10d", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) /* 8x8 text */ + ROM_LOAD( "tr_01.10d", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) // 8x8 text ROM_REGION( 0x100000, "tiles", 0 ) - ROM_LOAD( "tr-01a.3f", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) /* tiles */ + ROM_LOAD( "tr-01a.3f", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) ROM_LOAD( "tr-04a.3h", 0x20000, 0x20000, CRC(8863a63c) SHA1(11bfce5b09c5b8a781c658f035d5658c3710d189) ) ROM_LOAD( "tr-02a.3j", 0x40000, 0x20000, CRC(1a2c5f89) SHA1(2a2aa2f1e2a0cdd4bbdb25236e49c7cc573db9e9) ) ROM_LOAD( "tr-05.3l", 0x60000, 0x20000, CRC(5bf453b3) SHA1(5eef151974c6b818a17756549d24a702e1f3a859) ) ROM_LOAD( "tr-03a.2f", 0x80000, 0x20000, CRC(1e0537ea) SHA1(bc65f7104d5f7728b68b3dcb45151c41fc30aa0d) ) ROM_LOAD( "tr-06a.2h", 0xa0000, 0x20000, CRC(b636c23a) SHA1(417e289745996bd00114df6ade591e702265d3a5) ) ROM_LOAD( "tr-07a.2j", 0xc0000, 0x20000, CRC(5f907d4d) SHA1(1820c5c6e0b078db9c64655c7983ea115ad81036) ) - ROM_LOAD( "tr_08.2l", 0xe0000, 0x20000, CRC(adee35e2) SHA1(6707cf43a697eb9465449a144ae4508afe2e6496) ) /* EPROM */ + ROM_LOAD( "tr_08.2l", 0xe0000, 0x20000, CRC(adee35e2) SHA1(6707cf43a697eb9465449a144ae4508afe2e6496) ) // EPROM ROM_REGION( 0x080000, "spritegen", 0 ) - ROM_LOAD32_BYTE( "tr-09a.3b", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) /* sprites */ + ROM_LOAD32_BYTE( "tr-09a.3b", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) ROM_LOAD32_BYTE( "tr-10a.2b", 0x00002, 0x20000, CRC(8f6f03d7) SHA1(08a02cfb373040ea5ffbf5604f68df92a1338bb0) ) ROM_LOAD32_BYTE( "tr-11a.3d", 0x00001, 0x20000, CRC(cd9152e5) SHA1(6df3c43c0c41289890296c2b2aeca915dfdae3b0) ) ROM_LOAD32_BYTE( "tr-12a.2d", 0x00000, 0x20000, CRC(7d8a99d0) SHA1(af8221cfd2ce9aa3bf296981fb7fddd1e9ef4599) ) - ROM_REGION( 0x08000, "bgmap", 0 ) /* background tilemaps */ + ROM_REGION( 0x08000, "bgmap", 0 ) ROM_LOAD( "tr_13.7l", 0x0000, 0x8000, CRC(a79be1eb) SHA1(4191ccd48f7650930f9a4c2be0790239d7420bb1) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) - N82S129A or compatible */ + ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) - N82S129A or compatible ROM_END -ROM_START( toramich ) /* N86614A-5 + N86614B-6 board combo */ - ROM_REGION( 0x40000, "maincpu", 0 ) /* 256K for 68000 code */ +ROM_START( toramich ) // N86614A-5 + N86614B-6 board combo + ROM_REGION( 0x40000, "maincpu", 0 ) // 256K for 68000 code ROM_LOAD16_BYTE( "tr_02.6j", 0x00000, 0x20000, CRC(b54723b1) SHA1(dfad82e96dff072c967dd59e3db71fb3b43b6dcb) ) ROM_LOAD16_BYTE( "tr_04.6k", 0x00001, 0x20000, CRC(ab432479) SHA1(b8ec547f7bab67107a7c83931c7ed89142a7af69) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* audio CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "tr_05.12k", 0x0000, 0x8000, CRC(3ebe6e62) SHA1(6f5708b6ff8c91bc706f73300e0785f15999d570) ) - /* i8751 microcontroller not populated */ + // i8751 microcontroller not populated - ROM_REGION( 0x10000, "sample", 0 ) /* samples player */ + ROM_REGION( 0x10000, "sample", 0 ) ROM_LOAD( "tr_03.11j", 0x0000, 0x10000, CRC(ea1807ef) SHA1(f856e7b592c6df81586821284ea2220468c5ea9d) ) ROM_REGION( 0x008000, "text", 0 ) - ROM_LOAD( "tr_01.10d", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) /* 8x8 text */ + ROM_LOAD( "tr_01.10d", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) // 8x8 text ROM_REGION( 0x100000, "tiles", 0 ) - ROM_LOAD( "tr-01a.3f", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) /* tiles */ + ROM_LOAD( "tr-01a.3f", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) ROM_LOAD( "tr-04a.3h", 0x20000, 0x20000, CRC(8863a63c) SHA1(11bfce5b09c5b8a781c658f035d5658c3710d189) ) ROM_LOAD( "tr-02a.3j", 0x40000, 0x20000, CRC(1a2c5f89) SHA1(2a2aa2f1e2a0cdd4bbdb25236e49c7cc573db9e9) ) ROM_LOAD( "tr-05.3l", 0x60000, 0x20000, CRC(5bf453b3) SHA1(5eef151974c6b818a17756549d24a702e1f3a859) ) ROM_LOAD( "tr-03a.2f", 0x80000, 0x20000, CRC(1e0537ea) SHA1(bc65f7104d5f7728b68b3dcb45151c41fc30aa0d) ) ROM_LOAD( "tr-06a.2h", 0xa0000, 0x20000, CRC(b636c23a) SHA1(417e289745996bd00114df6ade591e702265d3a5) ) ROM_LOAD( "tr-07a.2j", 0xc0000, 0x20000, CRC(5f907d4d) SHA1(1820c5c6e0b078db9c64655c7983ea115ad81036) ) - ROM_LOAD( "tr_08.2l", 0xe0000, 0x20000, CRC(adee35e2) SHA1(6707cf43a697eb9465449a144ae4508afe2e6496) ) /* EPROM */ + ROM_LOAD( "tr_08.2l", 0xe0000, 0x20000, CRC(adee35e2) SHA1(6707cf43a697eb9465449a144ae4508afe2e6496) ) // EPROM ROM_REGION( 0x080000, "spritegen", 0 ) - ROM_LOAD32_BYTE( "tr-09a.3b", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) /* sprites */ + ROM_LOAD32_BYTE( "tr-09a.3b", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) ROM_LOAD32_BYTE( "tr-10a.2b", 0x00002, 0x20000, CRC(8f6f03d7) SHA1(08a02cfb373040ea5ffbf5604f68df92a1338bb0) ) ROM_LOAD32_BYTE( "tr-11a.3d", 0x00001, 0x20000, CRC(cd9152e5) SHA1(6df3c43c0c41289890296c2b2aeca915dfdae3b0) ) ROM_LOAD32_BYTE( "tr-12a.2d", 0x00000, 0x20000, CRC(7d8a99d0) SHA1(af8221cfd2ce9aa3bf296981fb7fddd1e9ef4599) ) - ROM_REGION( 0x08000, "bgmap", 0 ) /* background tilemaps */ + ROM_REGION( 0x08000, "bgmap", 0 ) ROM_LOAD( "tr_13.7l", 0x0000, 0x8000, CRC(a79be1eb) SHA1(4191ccd48f7650930f9a4c2be0790239d7420bb1) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) - N82S129A or compatible */ + ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) - N82S129A or compatible ROM_END ROM_START( tigeroadb ) - ROM_REGION( 0x40000, "maincpu", 0 ) /* 256K for 68000 code */ + ROM_REGION( 0x40000, "maincpu", 0 ) // 256K for 68000 code ROM_LOAD16_BYTE( "tgrroad.3", 0x00000, 0x10000, CRC(14c87e07) SHA1(31363b56dd9d387f3ebd7ca1c209148c389ec1aa) ) ROM_LOAD16_BYTE( "tgrroad.5", 0x00001, 0x10000, CRC(0904254c) SHA1(9ce7b8a699bc21618032db9b0c5494242ad77a6b) ) ROM_LOAD16_BYTE( "tgrroad.2", 0x20000, 0x10000, CRC(cedb1f46) SHA1(bc2d5730ff809fb0f38327d72485d472ab9da54d) ) ROM_LOAD16_BYTE( "tgrroad.4", 0x20001, 0x10000, CRC(e117f0b1) SHA1(ed0050247789bedaeb213c3d7c2d2cdb239bb4b4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* audio CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "tru05.bin", 0x0000, 0x8000, CRC(f9a7c9bf) SHA1(4d37c71aa6523ac21c6e8b23f9957e75ec4304bf) ) - /* no samples player in the English version */ + // no samples player in the English version ROM_REGION( 0x008000, "text", 0 ) - ROM_LOAD( "tr01.bin", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) /* 8x8 text */ + ROM_LOAD( "tr01.bin", 0x00000, 0x08000, CRC(74a9f08c) SHA1(458958c8d9a2af5df88bb24c9c5bcbd37d6856bc) ) // 8x8 text ROM_REGION( 0x100000, "tiles", 0 ) - ROM_LOAD( "tr-01a.bin", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) /* tiles */ + ROM_LOAD( "tr-01a.bin", 0x00000, 0x20000, CRC(a8aa2e59) SHA1(792f50d688a4ffb574e41257816bc304d41f0458) ) ROM_LOAD( "tr-04a.bin", 0x20000, 0x20000, CRC(8863a63c) SHA1(11bfce5b09c5b8a781c658f035d5658c3710d189) ) ROM_LOAD( "tr-02a.bin", 0x40000, 0x20000, CRC(1a2c5f89) SHA1(2a2aa2f1e2a0cdd4bbdb25236e49c7cc573db9e9) ) ROM_LOAD( "tr05.bin", 0x60000, 0x20000, CRC(5bf453b3) SHA1(5eef151974c6b818a17756549d24a702e1f3a859) ) @@ -921,34 +922,34 @@ ROM_START( tigeroadb ) ROM_LOAD( "tgrroad.18", 0xf0000, 0x10000, CRC(e2e053cb) SHA1(eb9432140fc167dec5d3273112933201be2be1b3) ) ROM_REGION( 0x080000, "spritegen", 0 ) - ROM_LOAD32_BYTE( "tr-09a.bin", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) /* sprites */ + ROM_LOAD32_BYTE( "tr-09a.bin", 0x00003, 0x20000, CRC(3d98ad1e) SHA1(f12cdf50e1708ddae092b9784d4319a7d5f092bc) ) ROM_LOAD32_BYTE( "tr-10a.bin", 0x00002, 0x20000, CRC(8f6f03d7) SHA1(08a02cfb373040ea5ffbf5604f68df92a1338bb0) ) ROM_LOAD32_BYTE( "tr-11a.bin", 0x00001, 0x20000, CRC(cd9152e5) SHA1(6df3c43c0c41289890296c2b2aeca915dfdae3b0) ) ROM_LOAD32_BYTE( "tr-12a.bin", 0x00000, 0x20000, CRC(7d8a99d0) SHA1(af8221cfd2ce9aa3bf296981fb7fddd1e9ef4599) ) - ROM_REGION( 0x08000, "bgmap", 0 ) /* background tilemaps */ + ROM_REGION( 0x08000, "bgmap", 0 ) ROM_LOAD( "tr13.bin", 0x0000, 0x8000, CRC(a79be1eb) SHA1(4191ccd48f7650930f9a4c2be0790239d7420bb1) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "trprom.bin", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) */ + ROM_LOAD( "trprom.bin", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) ROM_END -ROM_START( f1dream ) /* N86614A-5 + N86614B-6 board combo */ - ROM_REGION( 0x40000, "maincpu", 0 ) /* 256K for 68000 code */ +ROM_START( f1dream ) // N86614A-5 + N86614B-6 board combo + ROM_REGION( 0x40000, "maincpu", 0 ) // 256K for 68000 code ROM_LOAD16_BYTE( "f1_02.6j", 0x00000, 0x20000, CRC(3c2ec697) SHA1(bccb431ad92455484420f91770e91db6d69b09ec) ) ROM_LOAD16_BYTE( "f1_03.6k", 0x00001, 0x20000, CRC(85ebad91) SHA1(000f5c617417ff20ee9b378166776fecfacdff95) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* audio CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "f1_04.12k", 0x0000, 0x8000, CRC(4b9a7524) SHA1(19004958c19ac0af35f2c97790b0082ee2c15bc4) ) - ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */ - ROM_LOAD( "f1.9j", 0x0000, 0x1000, CRC(c8e6075c) SHA1(d98bd358d30d22a8009cd2728dde1871a8140c23) ) /* labeled F1 */ + ROM_REGION( 0x1000, "mcu", 0 ) // i8751 microcontroller + ROM_LOAD( "f1.9j", 0x0000, 0x1000, CRC(c8e6075c) SHA1(d98bd358d30d22a8009cd2728dde1871a8140c23) ) // labeled F1 ROM_REGION( 0x008000, "text", 0 ) - ROM_LOAD( "f1_01.10d", 0x00000, 0x08000, CRC(361caf00) SHA1(8a109e4e116d0c5eea86f9c57c05359754daa5b9) ) /* 8x8 text */ + ROM_LOAD( "f1_01.10d", 0x00000, 0x08000, CRC(361caf00) SHA1(8a109e4e116d0c5eea86f9c57c05359754daa5b9) ) // 8x8 text ROM_REGION( 0x060000, "tiles", 0 ) - ROM_LOAD( "f1_12.3f", 0x00000, 0x10000, CRC(bc13e43c) SHA1(f9528839858d7a45395062a43b71d80400c73173) ) /* tiles */ + ROM_LOAD( "f1_12.3f", 0x00000, 0x10000, CRC(bc13e43c) SHA1(f9528839858d7a45395062a43b71d80400c73173) ) ROM_LOAD( "f1_10.1f", 0x10000, 0x10000, CRC(f7617ad9) SHA1(746a0ec433d5246ac4dbae17d6498e3d154e2df1) ) ROM_LOAD( "f1_14.3h", 0x20000, 0x10000, CRC(e33cd438) SHA1(89a6faea19e8a01b38ba45413609603e559877e9) ) ROM_LOAD( "f1_11.2f", 0x30000, 0x10000, CRC(4aa49cd7) SHA1(b7052d51a3cb570299f4db1492a1293c4d8b067f) ) @@ -956,33 +957,33 @@ ROM_START( f1dream ) /* N86614A-5 + N86614B-6 board combo */ ROM_LOAD( "f1_13.2h", 0x50000, 0x10000, CRC(2a63961e) SHA1(a35e9bf0408716f460487a8d2ae336572a98d2fb) ) ROM_REGION( 0x040000, "spritegen", 0 ) - ROM_LOAD32_BYTE( "f1_06.3b", 0x00003, 0x10000, CRC(5e54e391) SHA1(475c968bfeb41b0448e621f59724c7b70d184d36) ) /* sprites */ + ROM_LOAD32_BYTE( "f1_06.3b", 0x00003, 0x10000, CRC(5e54e391) SHA1(475c968bfeb41b0448e621f59724c7b70d184d36) ) ROM_LOAD32_BYTE( "f1_05.2b", 0x00002, 0x10000, CRC(cdd119fd) SHA1(e279ada53f5a1e2ada0195b93399731af213f518) ) ROM_LOAD32_BYTE( "f1_08.3d", 0x00001, 0x10000, CRC(811f2e22) SHA1(cca7e8cc43408c2c3067a731a98a8a6418a000aa) ) ROM_LOAD32_BYTE( "f1_07.2d", 0x00000, 0x10000, CRC(aa9a1233) SHA1(c2079ad81d67b54483ea5f69ac2edf276ad58ca9) ) - ROM_REGION( 0x08000, "bgmap", 0 ) /* background tilemaps */ + ROM_REGION( 0x08000, "bgmap", 0 ) ROM_LOAD( "f1_15.7l", 0x0000, 0x8000, CRC(978758b7) SHA1(ebd415d70e2f1af3b1bd51f40e7d60f22369638c) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) - N82S129A or compatible */ + ROM_LOAD( "tr.9e", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) - N82S129A or compatible ROM_END ROM_START( f1dreamb ) - ROM_REGION( 0x40000, "maincpu", 0 ) /* 256K for 68000 code */ + ROM_REGION( 0x40000, "maincpu", 0 ) // 256K for 68000 code ROM_LOAD16_BYTE( "f1d_04.bin", 0x00000, 0x10000, CRC(903febad) SHA1(73726b220ce45e1f13798e50fb6455671f1150f3) ) ROM_LOAD16_BYTE( "f1d_05.bin", 0x00001, 0x10000, CRC(666fa2a7) SHA1(f38e71293368ddc586f437c38ced1d8ce91527ea) ) ROM_LOAD16_BYTE( "f1d_02.bin", 0x20000, 0x10000, CRC(98973c4c) SHA1(a73d396a1c3e43e6250d9e0ab1902d6f754d1ed9) ) ROM_LOAD16_BYTE( "f1d_03.bin", 0x20001, 0x10000, CRC(3d21c78a) SHA1(edee180131a5b4d507ce0490fd3890bdd03ce62f) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* audio CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "12k_04.bin", 0x0000, 0x8000, CRC(4b9a7524) SHA1(19004958c19ac0af35f2c97790b0082ee2c15bc4) ) ROM_REGION( 0x008000, "text", 0 ) - ROM_LOAD( "10d_01.bin", 0x00000, 0x08000, CRC(361caf00) SHA1(8a109e4e116d0c5eea86f9c57c05359754daa5b9) ) /* 8x8 text */ + ROM_LOAD( "10d_01.bin", 0x00000, 0x08000, CRC(361caf00) SHA1(8a109e4e116d0c5eea86f9c57c05359754daa5b9) ) // 8x8 text ROM_REGION( 0x060000, "tiles", 0 ) - ROM_LOAD( "03f_12.bin", 0x00000, 0x10000, CRC(bc13e43c) SHA1(f9528839858d7a45395062a43b71d80400c73173) ) /* tiles */ + ROM_LOAD( "03f_12.bin", 0x00000, 0x10000, CRC(bc13e43c) SHA1(f9528839858d7a45395062a43b71d80400c73173) ) ROM_LOAD( "01f_10.bin", 0x10000, 0x10000, CRC(f7617ad9) SHA1(746a0ec433d5246ac4dbae17d6498e3d154e2df1) ) ROM_LOAD( "03h_14.bin", 0x20000, 0x10000, CRC(e33cd438) SHA1(89a6faea19e8a01b38ba45413609603e559877e9) ) ROM_LOAD( "02f_11.bin", 0x30000, 0x10000, CRC(4aa49cd7) SHA1(b7052d51a3cb570299f4db1492a1293c4d8b067f) ) @@ -990,33 +991,33 @@ ROM_START( f1dreamb ) ROM_LOAD( "02h_13.bin", 0x50000, 0x10000, CRC(2a63961e) SHA1(a35e9bf0408716f460487a8d2ae336572a98d2fb) ) ROM_REGION( 0x040000, "spritegen", 0 ) - ROM_LOAD32_BYTE( "03b_06.bin", 0x00003, 0x10000, CRC(5e54e391) SHA1(475c968bfeb41b0448e621f59724c7b70d184d36) ) /* sprites */ + ROM_LOAD32_BYTE( "03b_06.bin", 0x00003, 0x10000, CRC(5e54e391) SHA1(475c968bfeb41b0448e621f59724c7b70d184d36) ) ROM_LOAD32_BYTE( "02b_05.bin", 0x00002, 0x10000, CRC(cdd119fd) SHA1(e279ada53f5a1e2ada0195b93399731af213f518) ) ROM_LOAD32_BYTE( "03d_08.bin", 0x00001, 0x10000, CRC(811f2e22) SHA1(cca7e8cc43408c2c3067a731a98a8a6418a000aa) ) ROM_LOAD32_BYTE( "02d_07.bin", 0x00000, 0x10000, CRC(aa9a1233) SHA1(c2079ad81d67b54483ea5f69ac2edf276ad58ca9) ) - ROM_REGION( 0x08000, "bgmap", 0 ) /* background tilemaps */ + ROM_REGION( 0x08000, "bgmap", 0 ) ROM_LOAD( "07l_15.bin", 0x0000, 0x8000, CRC(978758b7) SHA1(ebd415d70e2f1af3b1bd51f40e7d60f22369638c) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "09e_tr.bin", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) */ + ROM_LOAD( "09e_tr.bin", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) ROM_END ROM_START( f1dreamba ) - ROM_REGION( 0x40000, "maincpu", 0 ) /* 256K for 68000 code */ + ROM_REGION( 0x40000, "maincpu", 0 ) // 256K for 68000 code ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x10000, CRC(bdfbbbec) SHA1(08e058f0e612463a2975c4283b7210a3247a90ad) ) ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x10000, CRC(cc47cfb2) SHA1(2a6c66f4e7e81550af2d94e4a219a0c03173039e) ) ROM_LOAD16_BYTE( "2.bin", 0x20000, 0x10000, CRC(a34f63fb) SHA1(db1ce7ff3a2496649d8357c3999c1ea1a06ba043) ) ROM_LOAD16_BYTE( "4.bin", 0x20001, 0x10000, CRC(f98db083) SHA1(07e3e611eed1a77b7cd99c231e401c18465445ce) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* audio CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "12k_04.bin", 0x0000, 0x8000, CRC(4b9a7524) SHA1(19004958c19ac0af35f2c97790b0082ee2c15bc4) ) ROM_REGION( 0x008000, "text", 0 ) - ROM_LOAD( "10d_01.bin", 0x00000, 0x08000, CRC(361caf00) SHA1(8a109e4e116d0c5eea86f9c57c05359754daa5b9) ) /* 8x8 text */ + ROM_LOAD( "10d_01.bin", 0x00000, 0x08000, CRC(361caf00) SHA1(8a109e4e116d0c5eea86f9c57c05359754daa5b9) ) // 8x8 text ROM_REGION( 0x060000, "tiles", 0 ) - ROM_LOAD( "03f_12.bin", 0x00000, 0x10000, CRC(bc13e43c) SHA1(f9528839858d7a45395062a43b71d80400c73173) ) /* tiles */ + ROM_LOAD( "03f_12.bin", 0x00000, 0x10000, CRC(bc13e43c) SHA1(f9528839858d7a45395062a43b71d80400c73173) ) ROM_LOAD( "01f_10.bin", 0x10000, 0x10000, CRC(f7617ad9) SHA1(746a0ec433d5246ac4dbae17d6498e3d154e2df1) ) ROM_LOAD( "03h_14.bin", 0x20000, 0x10000, CRC(e33cd438) SHA1(89a6faea19e8a01b38ba45413609603e559877e9) ) ROM_LOAD( "02f_11.bin", 0x30000, 0x10000, CRC(4aa49cd7) SHA1(b7052d51a3cb570299f4db1492a1293c4d8b067f) ) @@ -1024,16 +1025,16 @@ ROM_START( f1dreamba ) ROM_LOAD( "02h_13.bin", 0x50000, 0x10000, CRC(2a63961e) SHA1(a35e9bf0408716f460487a8d2ae336572a98d2fb) ) ROM_REGION( 0x040000, "spritegen", 0 ) - ROM_LOAD32_BYTE( "03b_06.bin", 0x00003, 0x10000, CRC(5e54e391) SHA1(475c968bfeb41b0448e621f59724c7b70d184d36) ) /* sprites */ + ROM_LOAD32_BYTE( "03b_06.bin", 0x00003, 0x10000, CRC(5e54e391) SHA1(475c968bfeb41b0448e621f59724c7b70d184d36) ) ROM_LOAD32_BYTE( "02b_05.bin", 0x00002, 0x10000, CRC(cdd119fd) SHA1(e279ada53f5a1e2ada0195b93399731af213f518) ) ROM_LOAD32_BYTE( "03d_08.bin", 0x00001, 0x10000, CRC(811f2e22) SHA1(cca7e8cc43408c2c3067a731a98a8a6418a000aa) ) ROM_LOAD32_BYTE( "02d_07.bin", 0x00000, 0x10000, CRC(aa9a1233) SHA1(c2079ad81d67b54483ea5f69ac2edf276ad58ca9) ) - ROM_REGION( 0x08000, "bgmap", 0 ) /* background tilemaps */ + ROM_REGION( 0x08000, "bgmap", 0 ) ROM_LOAD( "07l_15.bin", 0x0000, 0x8000, CRC(978758b7) SHA1(ebd415d70e2f1af3b1bd51f40e7d60f22369638c) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "09e_tr.bin", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) */ + ROM_LOAD( "09e_tr.bin", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) ROM_END @@ -1045,7 +1046,7 @@ ROM_START( pushman ) ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "pushman.013", 0x00000, 0x08000, CRC(adfe66c1) SHA1(fa4ed13d655c664b06e9b91292d2c0a88cb5a569) ) - ROM_REGION( 0x01000, "mcu", 0 ) /* Verified same for all 4 currently dumped versions */ + ROM_REGION( 0x01000, "mcu", 0 ) // Verified same for all 4 currently dumped versions ROM_LOAD( "pushman68705r3p.ic23", 0x00000, 0x01000, CRC(d7916657) SHA1(89c14c6044f082fffe2a8f86d0a82336f4a110a2) ) ROM_REGION( 0x10000, "text", 0 ) @@ -1063,11 +1064,11 @@ ROM_START( pushman ) ROM_LOAD( "pushman.007", 0x00000, 0x10000, CRC(b70020bd) SHA1(218ca4a08b87b7dc5c1eed99960f4098c4fc7e0c) ) ROM_LOAD( "pushman.009", 0x10000, 0x10000, CRC(cc555667) SHA1(6c79e14fc18d1d836392044779cb3219494a3447) ) - ROM_REGION( 0x10000, "bgmap", 0 ) /* bg tilemaps */ + ROM_REGION( 0x10000, "bgmap", 0 ) ROM_LOAD( "pushman.010", 0x00000, 0x08000, CRC(a500132d) SHA1(26b02c9fea69b51c5f7dc1b43b838cd336ebf862) ) - ROM_REGION( 0x0100, "proms", 0 ) /* this is the same as tiger road / f1-dream */ - ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) */ + ROM_REGION( 0x0100, "proms", 0 ) // this is the same as tiger road / f1-dream + ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) ROM_END ROM_START( pushmana ) @@ -1078,7 +1079,7 @@ ROM_START( pushmana ) ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "pushman.013", 0x00000, 0x08000, CRC(adfe66c1) SHA1(fa4ed13d655c664b06e9b91292d2c0a88cb5a569) ) // missing from this set? - ROM_REGION( 0x01000, "mcu", 0 ) /* Verified same for all 4 currently dumped versions */ + ROM_REGION( 0x01000, "mcu", 0 ) // Verified same for all 4 currently dumped versions ROM_LOAD( "pushman68705r3p.ic23", 0x00000, 0x01000, CRC(d7916657) SHA1(89c14c6044f082fffe2a8f86d0a82336f4a110a2) ) ROM_REGION( 0x10000, "text", 0 ) @@ -1096,11 +1097,11 @@ ROM_START( pushmana ) ROM_LOAD( "pushman.007", 0x00000, 0x10000, CRC(b70020bd) SHA1(218ca4a08b87b7dc5c1eed99960f4098c4fc7e0c) ) // .132 ROM_LOAD( "pushman.009", 0x10000, 0x10000, CRC(cc555667) SHA1(6c79e14fc18d1d836392044779cb3219494a3447) ) // .149 - ROM_REGION( 0x10000, "bgmap", 0 ) /* bg tilemaps */ + ROM_REGION( 0x10000, "bgmap", 0 ) ROM_LOAD( "pushmana.189", 0x00000, 0x10000, CRC(59f25598) SHA1(ace33afd6e6d07376ed01048db99b13bcec790d7) ) - ROM_REGION( 0x0100, "proms", 0 ) /* this is the same as tiger road / f1-dream */ - ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) */ + ROM_REGION( 0x0100, "proms", 0 ) // this is the same as tiger road / f1-dream + ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) ROM_END ROM_START( pushmans ) @@ -1111,7 +1112,7 @@ ROM_START( pushmans ) ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "pman-13.ic216", 0x00000, 0x08000, CRC(bc03827a) SHA1(b4d6ae164bbb7ba19e4934392fe2ba29575f28b9) ) - ROM_REGION( 0x01000, "mcu", 0 ) /* Verified same for all 4 currently dumped versions */ + ROM_REGION( 0x01000, "mcu", 0 ) // Verified same for all 4 currently dumped versions ROM_LOAD( "pushman68705r3p.ic23", 0x00000, 0x01000, CRC(d7916657) SHA1(89c14c6044f082fffe2a8f86d0a82336f4a110a2) ) ROM_REGION( 0x10000, "text", 0 ) @@ -1129,26 +1130,26 @@ ROM_START( pushmans ) ROM_LOAD( "pman-7.ic132", 0x00000, 0x10000, CRC(208cb197) SHA1(161633b6b0acf25447a5c0b3c6fbf18adc6e2243) ) ROM_LOAD( "pman-9.ic149", 0x10000, 0x10000, CRC(77ee8577) SHA1(63d13683dd097d8e7cb71ad3abe04e11f2a58bd3) ) - ROM_REGION( 0x10000, "bgmap", 0 ) /* bg tilemaps */ + ROM_REGION( 0x10000, "bgmap", 0 ) ROM_LOAD( "pman-10.ic189", 0x00000, 0x08000, CRC(5f9ae9a1) SHA1(87619918c28c942780f6dbd3818d4cc69932eefc) ) - ROM_REGION( 0x0100, "proms", 0 ) /* this is the same as tiger road / f1-dream */ - ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) */ + ROM_REGION( 0x0100, "proms", 0 ) // this is the same as tiger road / f1-dream + ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) ROM_END -ROM_START( pushmant ) /* Single plane PCB */ +ROM_START( pushmant ) // Single plane PCB ROM_REGION( 0x40000, "maincpu", 0 ) ROM_LOAD16_BYTE( "12.ic212", 0x000000, 0x10000, CRC(f5c77d86) SHA1(66d2d5dc9f4662efc5a865c9cc1bba653e86a674) ) ROM_LOAD16_BYTE( "11.ic197", 0x000001, 0x10000, CRC(2e09ff08) SHA1(9bb05c51c985c3a12fb8d6fd915276e304651eb1) ) ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "13.ic216", 0x00000, 0x08000, CRC(adfe66c1) SHA1(fa4ed13d655c664b06e9b91292d2c0a88cb5a569) ) /* Same as the Comad set */ + ROM_LOAD( "13.ic216", 0x00000, 0x08000, CRC(adfe66c1) SHA1(fa4ed13d655c664b06e9b91292d2c0a88cb5a569) ) // Same as the Comad set - ROM_REGION( 0x01000, "mcu", 0 ) /* Verified same for all 4 currently dumped versions */ + ROM_REGION( 0x01000, "mcu", 0 ) // Verified same for all 4 currently dumped versions ROM_LOAD( "pushman68705r3p.ic23", 0x00000, 0x01000, CRC(d7916657) SHA1(89c14c6044f082fffe2a8f86d0a82336f4a110a2) ) ROM_REGION( 0x10000, "text", 0 ) - ROM_LOAD( "1.ic130", 0x00000, 0x08000, CRC(14497754) SHA1(a47d03c56add18c5d9aed221990550b18589ff43) ) /* Same as the Sammy set */ + ROM_LOAD( "1.ic130", 0x00000, 0x08000, CRC(14497754) SHA1(a47d03c56add18c5d9aed221990550b18589ff43) ) // Same as the Sammy set ROM_REGION( 0x40000, "spritegen", 0 ) ROM_LOAD32_BYTE( "4.ic58", 0x00000, 0x10000, CRC(69209214) SHA1(c5b527234aefbdfb39864806e2b1784fdf2dd49c) ) @@ -1157,16 +1158,16 @@ ROM_START( pushmant ) /* Single plane PCB */ ROM_LOAD32_BYTE( "3.ic57", 0x00003, 0x10000, CRC(5f1c4e7a) SHA1(751caf2365eccbab6d7de5434c4656ac5bd7f13b) ) ROM_REGION( 0x40000, "tiles", 0 ) - ROM_LOAD( "6.ic131", 0x20000, 0x10000, CRC(bd0f9025) SHA1(7262410d4631f1b051c605d5cea5b91e9f68327e) ) /* These 4 are the same as the Sammy set */ + ROM_LOAD( "6.ic131", 0x20000, 0x10000, CRC(bd0f9025) SHA1(7262410d4631f1b051c605d5cea5b91e9f68327e) ) // These 4 are the same as the Sammy set ROM_LOAD( "8.ic148", 0x30000, 0x10000, CRC(591bd5c0) SHA1(6e0e18e0912fa38e113420ac31c7f36853b830ec) ) ROM_LOAD( "7.ic132", 0x00000, 0x10000, CRC(208cb197) SHA1(161633b6b0acf25447a5c0b3c6fbf18adc6e2243) ) ROM_LOAD( "9.ic149", 0x10000, 0x10000, CRC(77ee8577) SHA1(63d13683dd097d8e7cb71ad3abe04e11f2a58bd3) ) - ROM_REGION( 0x10000, "bgmap", 0 ) /* bg tilemaps */ - ROM_LOAD( "10.ic189", 0x00000, 0x08000, CRC(5f9ae9a1) SHA1(87619918c28c942780f6dbd3818d4cc69932eefc) ) /* Same as the Sammy set */ + ROM_REGION( 0x10000, "bgmap", 0 ) + ROM_LOAD( "10.ic189", 0x00000, 0x08000, CRC(5f9ae9a1) SHA1(87619918c28c942780f6dbd3818d4cc69932eefc) ) // Same as the Sammy set - ROM_REGION( 0x0100, "proms", 0 ) /* this is the same as tiger road / f1-dream */ - ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) */ + ROM_REGION( 0x0100, "proms", 0 ) // this is the same as tiger road / f1-dream + ROM_LOAD( "n82s129an.ic82", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) ROM_END ROM_START( bballs ) @@ -1177,7 +1178,7 @@ ROM_START( bballs ) ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "bb13.n4", 0x00000, 0x08000, CRC(1ef78175) SHA1(2e7dcbab3a572c2a6bb67a36ba283a5faeb14a88) ) - ROM_REGION( 0x01000, "mcu", 0 ) /* using dump from bballsa set */ + ROM_REGION( 0x01000, "mcu", 0 ) // using dump from bballsa set ROM_LOAD( "mc68705r3.bin", 0x00000, 0x01000, CRC(4b37b853) SHA1(c95b7b1dcc6f4730fd08535001e2f02b34ea14c2) BAD_DUMP ) ROM_REGION( 0x10000, "text", 0 ) @@ -1195,11 +1196,11 @@ ROM_START( bballs ) ROM_LOAD( "bb7.h2", 0x00000, 0x10000, CRC(a352d53b) SHA1(c71e976b7c28630d7af11fffe0d1cfd7d611ee8b) ) ROM_LOAD( "bb9.j2", 0x10000, 0x10000, CRC(78d185ac) SHA1(6ed6e1f5eeb93129eeeab6bae22b640c9782f7fc) ) - ROM_REGION( 0x10000, "bgmap", 0 ) /* bg tilemaps */ + ROM_REGION( 0x10000, "bgmap", 0 ) ROM_LOAD( "bb10.l6", 0x00000, 0x08000, CRC(d06498f9) SHA1(9f33bbc40ebe11c03aec29289f76f1c3ca5bf009) ) - ROM_REGION( 0x0100, "proms", 0 ) /* this is the same as tiger road / f1-dream */ - ROM_LOAD( "bb_prom.e9", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) N82S129 BPROM */ + ROM_REGION( 0x0100, "proms", 0 ) // this is the same as tiger road / f1-dream + ROM_LOAD( "bb_prom.e9", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) N82S129 BPROM ROM_END ROM_START( bballsa ) @@ -1228,11 +1229,11 @@ ROM_START( bballsa ) ROM_LOAD( "7.ic132", 0x00000, 0x10000, CRC(2289393a) SHA1(e1370925a92f7d9f96c9431cf1b8dd262c41017e) ) ROM_LOAD( "9.ic149", 0x10000, 0x10000, CRC(1fe3d172) SHA1(f7415e8633507a507ec1cd68de224722a726a473) ) - ROM_REGION( 0x10000, "bgmap", 0 ) /* bg tilemaps */ + ROM_REGION( 0x10000, "bgmap", 0 ) ROM_LOAD( "10.ic189", 0x00000, 0x08000, CRC(52e4ab27) SHA1(c9ae15f970b4bf120a4bbee9adcf0e5e4de001e7) ) - ROM_REGION( 0x0100, "proms", 0 ) /* this is the same as tiger road / f1-dream */ - ROM_LOAD( "bb_prom.e9", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) /* priority (not used) N82S129 BPROM */ + ROM_REGION( 0x0100, "proms", 0 ) // this is the same as tiger road / f1-dream + ROM_LOAD( "bb_prom.e9", 0x0000, 0x0100, CRC(ec80ae36) SHA1(397ec8fc1b106c8b8d4bf6798aa429e8768a101a) ) // priority (not used) N82S129 BPROM ROM_END @@ -1240,21 +1241,21 @@ ROM_END /***************************************************************************/ -GAME( 1987, tigeroad, 0, tigeroad, tigeroad, tigeroad_state, empty_init, ROT0, "Capcom", "Tiger Road (US)", 0 ) -GAME( 1987, tigeroadu,tigeroad, tigeroad, tigeroad, tigeroad_state, empty_init, ROT0, "Capcom (Romstar license)", "Tiger Road (US, Romstar license)", 0 ) -GAME( 1987, toramich, tigeroad, toramich, toramich, tigeroad_state, empty_init, ROT0, "Capcom", "Tora e no Michi (Japan)", 0 ) -GAME( 1987, tigeroadb,tigeroad, tigeroad, tigeroad, tigeroad_state, empty_init, ROT0, "bootleg", "Tiger Road (US bootleg)", 0 ) +GAME( 1987, tigeroad, 0, tigeroad, tigeroad, tigeroad_state, empty_init, ROT0, "Capcom", "Tiger Road (US)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, tigeroadu, tigeroad, tigeroad, tigeroad, tigeroad_state, empty_init, ROT0, "Capcom (Romstar license)", "Tiger Road (US, Romstar license)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, toramich, tigeroad, toramich, toramich, tigeroad_state, empty_init, ROT0, "Capcom", "Tora e no Michi (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, tigeroadb, tigeroad, tigeroad, tigeroad, tigeroad_state, empty_init, ROT0, "bootleg", "Tiger Road (US bootleg)", MACHINE_SUPPORTS_SAVE ) -/* F1 Dream has an Intel 8751 microcontroller for protection */ -GAME( 1988, f1dream, 0, f1dream, f1dream, f1dream_state, empty_init, ROT0, "Capcom (Romstar license)", "F-1 Dream", 0 ) -GAME( 1988, f1dreamb, f1dream, tigeroad, f1dream, tigeroad_state, empty_init, ROT0, "bootleg", "F-1 Dream (bootleg, set 1)", 0 ) -GAME( 1988, f1dreamba,f1dream, tigeroad, f1dream, tigeroad_state, empty_init, ROT0, "bootleg", "F-1 Dream (bootleg, set 2)", 0 ) +// F1 Dream has an Intel 8751 microcontroller for protection +GAME( 1988, f1dream, 0, f1dream, f1dream, f1dream_state, empty_init, ROT0, "Capcom (Romstar license)", "F-1 Dream", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, f1dreamb, f1dream, tigeroad, f1dream, tigeroad_state, empty_init, ROT0, "bootleg", "F-1 Dream (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, f1dreamba,f1dream, tigeroad, f1dream, tigeroad_state, empty_init, ROT0, "bootleg", "F-1 Dream (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) -/* This Comad hardware is based around the F1 Dream design */ -GAME( 1990, pushman, 0, pushman, pushman, pushman_state, empty_init, ROT0, "Comad", "Pushman (Korea, set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pushmana, pushman, pushman, pushman, pushman_state, empty_init, ROT0, "Comad", "Pushman (Korea, set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pushmans, pushman, pushman, pushman, pushman_state, empty_init, ROT0, "Comad (American Sammy license)", "Pushman (American Sammy license)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pushmant, pushman, pushman, pushman, pushman_state, empty_init, ROT0, "Comad (Top Tronic license)", "Pushman (Top Tronic license)", MACHINE_SUPPORTS_SAVE ) +// This Comad hardware is based around the F1 Dream design +GAME( 1990, pushman, 0, pushman, pushman, pushman_state, empty_init, ROT0, "Comad", "Pushman (Korea, set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pushmana, pushman, pushman, pushman, pushman_state, empty_init, ROT0, "Comad", "Pushman (Korea, set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pushmans, pushman, pushman, pushman, pushman_state, empty_init, ROT0, "Comad (American Sammy license)", "Pushman (American Sammy license)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pushmant, pushman, pushman, pushman, pushman_state, empty_init, ROT0, "Comad (Top Tronic license)", "Pushman (Top Tronic license)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, bballs, 0, bballs, bballs, pushman_state, empty_init, ROT0, "Comad", "Bouncing Balls", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, bballsa, bballs, bballs, bballs, pushman_state, empty_init, ROT0, "Comad", "Bouncing Balls (Adult)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, bballs, 0, bballs, bballs, pushman_state, empty_init, ROT0, "Comad", "Bouncing Balls", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, bballsa, bballs, bballs, bballs, pushman_state, empty_init, ROT0, "Comad", "Bouncing Balls (Adult)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/tigeroad.h b/src/mame/includes/tigeroad.h index e81d8620b25..b272f303b5c 100644 --- a/src/mame/includes/tigeroad.h +++ b/src/mame/includes/tigeroad.h @@ -8,8 +8,6 @@ #include "cpu/z80/z80.h" #include "cpu/mcs51/mcs51.h" -#include "machine/gen_latch.h" - #include "sound/2203intf.h" #include "sound/msm5205.h" @@ -24,17 +22,15 @@ class tigeroad_state : public driver_device public: tigeroad_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_palette(*this, "palette") + , m_has_coinlock(true) , m_spriteram(*this, "spriteram") , m_videoram(*this, "videoram") - , m_ram16(*this, "ram16") - , m_maincpu(*this, "maincpu") , m_audiocpu(*this, "audiocpu") , m_msm(*this, "msm") , m_gfxdecode(*this, "gfxdecode") - , m_palette(*this, "palette") , m_spritegen(*this, "spritegen") - , m_soundlatch(*this, "soundlatch") - , m_has_coinlock(true) { } void toramich(machine_config &config); @@ -42,39 +38,43 @@ public: void f1dream_comad(machine_config &config); protected: - required_device m_spriteram; - required_shared_ptr m_videoram; - required_shared_ptr m_ram16; - int m_bgcharbank; - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; - void tigeroad_soundcmd_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void tigeroad_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void tigeroad_videoctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void tigeroad_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void msm5205_w(uint8_t data); - TILE_GET_INFO_MEMBER(get_bg_tile_info); - TILE_GET_INFO_MEMBER(get_fg_tile_info); - TILEMAP_MAPPER_MEMBER(tigeroad_tilemap_scan); - virtual void video_start() override; - uint32_t screen_update_tigeroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; + required_device m_palette; + + void soundcmd_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void videoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void videoctrl_w(u8 data); + void scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); + + void main_map(address_map &map); + // misc + bool m_has_coinlock; + +private: + required_device m_spriteram; + required_shared_ptr m_videoram; required_device m_audiocpu; optional_device m_msm; required_device m_gfxdecode; - required_device m_palette; required_device m_spritegen; - required_device m_soundlatch; + + u8 m_bgcharbank; + tilemap_t *m_bg_tilemap; + tilemap_t *m_fg_tilemap; void comad_sound_io_map(address_map &map); void comad_sound_map(address_map &map); - void main_map(address_map &map); void sample_map(address_map &map); void sample_port_map(address_map &map); void sound_map(address_map &map); void sound_port_map(address_map &map); - /* misc */ - bool m_has_coinlock; + + void msm5205_w(u8 data); + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_fg_tile_info); + TILEMAP_MAPPER_MEMBER(tigeroad_tilemap_scan); + virtual void video_start() override; + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -97,20 +97,21 @@ public: void pushman(machine_config &config); void bballs(machine_config &config); +protected: + virtual void machine_start() override; + private: - uint16_t mcu_comm_r(offs_t offset, uint16_t mem_mask = ~0); - void pushman_mcu_comm_w(offs_t offset, uint16_t data); - void bballs_mcu_comm_w(uint16_t data); + u16 mcu_comm_r(offs_t offset, u16 mem_mask = ~0); + void pushman_mcu_comm_w(offs_t offset, u16 data); + void bballs_mcu_comm_w(u16 data); - void mcu_pa_w(uint8_t data); - void mcu_pb_w(uint8_t data); - void mcu_pc_w(uint8_t data); + void mcu_pa_w(u8 data); + void mcu_pb_w(u8 data); + void mcu_pc_w(u8 data); void bballs_map(address_map &map); void pushman_map(address_map &map); - virtual void machine_start() override; - required_device m_mcu; bool m_host_semaphore, m_mcu_semaphore; @@ -125,23 +126,28 @@ public: f1dream_state(const machine_config &mconfig, device_type type, const char *tag) : tigeroad_state(mconfig, type, tag) , m_mcu(*this, "mcu") + , m_ram16(*this, "ram16") , m_old_p3(0xff) { } void f1dream(machine_config &config); +protected: + virtual void machine_start() override; + private: void f1dream_map(address_map &map); void f1dream_mcu_io(address_map &map); - void out3_w(uint8_t data); + void out3_w(u8 data); - uint8_t mcu_shared_r(offs_t offset); - void mcu_shared_w(offs_t offset, uint8_t data); + u8 mcu_shared_r(offs_t offset); + void mcu_shared_w(offs_t offset, u8 data); - void blktiger_to_mcu_w(uint16_t data); + void to_mcu_w(u16 data); required_device m_mcu; - uint8_t m_old_p3; + required_shared_ptr m_ram16; + u8 m_old_p3; }; diff --git a/src/mame/machine/tigeroad.cpp b/src/mame/machine/tigeroad.cpp index 3a25afcd373..7515190ba90 100644 --- a/src/mame/machine/tigeroad.cpp +++ b/src/mame/machine/tigeroad.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "includes/tigeroad.h" -uint16_t pushman_state::mcu_comm_r(offs_t offset, uint16_t mem_mask) +u16 pushman_state::mcu_comm_r(offs_t offset, u16 mem_mask) { switch (offset & 0x03) { @@ -20,7 +20,7 @@ uint16_t pushman_state::mcu_comm_r(offs_t offset, uint16_t mem_mask) return 0xffff; } -void pushman_state::pushman_mcu_comm_w(offs_t offset, uint16_t data) +void pushman_state::pushman_mcu_comm_w(offs_t offset, u16 data) { switch (offset & 0x01) { @@ -35,24 +35,24 @@ void pushman_state::pushman_mcu_comm_w(offs_t offset, uint16_t data) } } -void pushman_state::bballs_mcu_comm_w(uint16_t data) +void pushman_state::bballs_mcu_comm_w(u16 data) { m_host_latch = data; m_host_semaphore = true; m_mcu->set_input_line(M68705_IRQ_LINE, ASSERT_LINE); } -void pushman_state::mcu_pa_w(uint8_t data) +void pushman_state::mcu_pa_w(u8 data) { m_mcu_output = (m_mcu_output & 0xff00) | (u16(data) & 0x00ff); } -void pushman_state::mcu_pb_w(uint8_t data) +void pushman_state::mcu_pb_w(u8 data) { m_mcu_output = (m_mcu_output & 0x00ff) | (u16(data) << 8); } -void pushman_state::mcu_pc_w(uint8_t data) +void pushman_state::mcu_pc_w(u8 data) { if (BIT(data, 0)) { diff --git a/src/mame/video/tigeroad.cpp b/src/mame/video/tigeroad.cpp index ec39168588c..647355588dc 100644 --- a/src/mame/video/tigeroad.cpp +++ b/src/mame/video/tigeroad.cpp @@ -4,53 +4,46 @@ #include "includes/tigeroad.h" -void tigeroad_state::tigeroad_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void tigeroad_state::videoram_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_videoram[offset]); m_fg_tilemap->mark_tile_dirty(offset); } -void tigeroad_state::tigeroad_videoctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void tigeroad_state::videoctrl_w(u8 data) { - int bank; + // bit 1 flips screen - if (ACCESSING_BITS_8_15) + if (flip_screen() != (data & 0x02)) { - data = (data >> 8) & 0xff; - - /* bit 1 flips screen */ - - if (flip_screen() != (data & 0x02)) - { - flip_screen_set(data & 0x02); - machine().tilemap().mark_all_dirty(); - } + flip_screen_set(data & 0x02); + machine().tilemap().mark_all_dirty(); + } - /* bit 2 selects bg char bank */ + // bit 2 selects bg char bank - bank = (data & 0x04) >> 2; + u8 bank = (data & 0x04) >> 2; - if (m_bgcharbank != bank) - { - m_bgcharbank = bank; - m_bg_tilemap->mark_all_dirty(); - } + if (m_bgcharbank != bank) + { + m_bgcharbank = bank; + m_bg_tilemap->mark_all_dirty(); + } - /* bits 4-5 are coin lockouts */ - if (m_has_coinlock) - { - machine().bookkeeping().coin_lockout_w(0, !(data & 0x10)); - machine().bookkeeping().coin_lockout_w(1, !(data & 0x20)); - } + // bits 4-5 are coin lockouts + if (m_has_coinlock) + { + machine().bookkeeping().coin_lockout_w(0, !(data & 0x10)); + machine().bookkeeping().coin_lockout_w(1, !(data & 0x20)); + } - /* bits 6-7 are coin counters */ + // bits 6-7 are coin counters - machine().bookkeeping().coin_counter_w(0, data & 0x40); - machine().bookkeeping().coin_counter_w(1, data & 0x80); - } + machine().bookkeeping().coin_counter_w(0, data & 0x40); + machine().bookkeeping().coin_counter_w(1, data & 0x80); } -void tigeroad_state::tigeroad_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void tigeroad_state::scroll_w(offs_t offset, u16 data, u16 mem_mask) { int scroll = 0; @@ -71,7 +64,7 @@ void tigeroad_state::tigeroad_scroll_w(offs_t offset, uint16_t data, uint16_t me TILE_GET_INFO_MEMBER(tigeroad_state::get_bg_tile_info) { - uint8_t *tilerom = memregion("bgmap")->base(); + u8 *tilerom = memregion("bgmap")->base(); int data = tilerom[tile_index]; int attr = tilerom[tile_index + 1]; @@ -85,8 +78,7 @@ TILE_GET_INFO_MEMBER(tigeroad_state::get_bg_tile_info) TILE_GET_INFO_MEMBER(tigeroad_state::get_fg_tile_info) { - uint16_t *videoram = m_videoram; - int data = videoram[tile_index]; + int data = m_videoram[tile_index]; int attr = data >> 8; int code = (data & 0xff) + ((attr & 0xc0) << 2) + ((attr & 0x20) << 5); int color = attr & 0x0f; @@ -97,7 +89,7 @@ TILE_GET_INFO_MEMBER(tigeroad_state::get_fg_tile_info) TILEMAP_MAPPER_MEMBER(tigeroad_state::tigeroad_tilemap_scan) { - /* logical (col,row) -> memory offset */ + // logical (col,row) -> memory offset return 2 * (col % 8) + 16 * ((127 - row) % 8) + 128 * (col / 8) + 2048 * ((127 - row) / 8); } @@ -115,9 +107,11 @@ void tigeroad_state::video_start() m_bg_tilemap->set_transmask(1, 0x1ff, 0xfe00); m_fg_tilemap->set_transparent_pen(3); + + save_item(NAME(m_bgcharbank)); } -uint32_t tigeroad_state::screen_update_tigeroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 tigeroad_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), m_spriteram->bytes(), flip_screen(), true); -- cgit v1.2.3 From 54e19d5cddbec32dd4be231191fce7cd122f8c0d Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 6 Jul 2020 16:57:21 +0200 Subject: sfkick.cpp: switched to bankdev (adapting pengadvb.cpp implementation), enabled save state support --- src/mame/drivers/sfkick.cpp | 375 +++++++++++--------------------------------- 1 file changed, 92 insertions(+), 283 deletions(-) diff --git a/src/mame/drivers/sfkick.cpp b/src/mame/drivers/sfkick.cpp index 825517c15b3..4954e996796 100644 --- a/src/mame/drivers/sfkick.cpp +++ b/src/mame/drivers/sfkick.cpp @@ -155,6 +155,7 @@ DIPSW-2 #include "emu.h" #include "cpu/z80/z80.h" #include "video/v9938.h" +#include "machine/bankdev.h" #include "machine/gen_latch.h" #include "machine/i8255.h" #include "sound/2203intf.h" @@ -169,18 +170,8 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), - m_region_bios(*this, "bios"), - m_region_extrom(*this, "extrom"), - m_region_banked(*this, "banked"), - m_region_cartridge(*this, "cartridge"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_bank5(*this, "bank5"), - m_bank6(*this, "bank6"), - m_bank7(*this, "bank7"), - m_bank8(*this, "bank8"), + m_page(*this, "page%u", 0U), + m_bank(*this, "bank%u", 0U), m_in0(*this, "IN0"), m_in1(*this, "IN1"), m_dial(*this, "DIAL"), @@ -190,44 +181,31 @@ public: void sfkick(machine_config &config); - void init_sfkick(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; private: - void page0_w(offs_t offset, uint8_t data); - void page1_w(offs_t offset, uint8_t data); - void page2_w(offs_t offset, uint8_t data); - void page3_w(offs_t offset, uint8_t data); + uint8_t mem_r(offs_t offset); + void mem_w(offs_t offset, uint8_t data); + void bank_w(offs_t offset, uint8_t data); uint8_t ppi_port_b_r(); void ppi_port_a_w(uint8_t data); void ppi_port_c_w(uint8_t data); - virtual void machine_reset() override; - void sfkick_remap_banks(); - void sfkick_bank_set(int num, int data); DECLARE_WRITE_LINE_MEMBER(irqhandler); void sfkick_io_map(address_map &map); void sfkick_map(address_map &map); void sfkick_sound_io_map(address_map &map); void sfkick_sound_map(address_map &map); + void bank_mem(address_map &map); - std::unique_ptr m_main_mem; - int m_bank_cfg; - int m_bank[8]; + uint8_t m_primary_slot_reg; int m_input_mux; required_device m_maincpu; required_device m_soundcpu; - required_memory_region m_region_bios; - required_memory_region m_region_extrom; - required_memory_region m_region_banked; - required_memory_region m_region_cartridge; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_memory_bank m_bank5; - required_memory_bank m_bank6; - required_memory_bank m_bank7; - required_memory_bank m_bank8; + required_device_array m_page; + required_memory_bank_array<8> m_bank; required_ioport m_in0; required_ioport m_in1; required_ioport m_dial; @@ -238,245 +216,72 @@ private: #define MASTER_CLOCK XTAL(21'477'272) - -uint8_t sfkick_state::ppi_port_b_r() -{ - switch(m_input_mux&0x0f) - { - case 0: return m_in0->read(); - case 1: return m_in1->read(); - case 2: return bitswap<8>(m_dial->read(),4,5,6,7,3,2,1,0); - case 3: return m_dsw1->read(); - case 4: return m_dsw2->read(); - } - return 0xff; -} - -void sfkick_state::sfkick_remap_banks() +uint8_t sfkick_state::mem_r(offs_t offset) { - /* 0000-3fff */ - switch(m_bank_cfg&3) - { - case 0: /* bios */ - { - uint8_t *mem = m_region_bios->base(); - m_bank1->set_base(mem); - m_bank2->set_base(mem+0x2000); - } - break; - - case 1: /* ext rom */ - { - uint8_t *mem = m_region_extrom->base(); - m_bank1->set_base(mem+0x4000); - m_bank2->set_base(mem+0x6000); - } - break; - - case 2: /* banked */ - { - uint8_t *mem = m_region_banked->base(); - m_bank1->set_base(mem+0x2000*m_bank[0]); - m_bank2->set_base(mem+0x2000*m_bank[1]); - } - break; - - case 3: /* unknown */ - { - uint8_t *mem = m_region_banked->base(); - m_bank1->set_base(mem+0x18000); - m_bank2->set_base(mem+0x18000); - } - break; - } - - /* 4000-7fff */ - switch((m_bank_cfg>>2)&3) - { - case 0: /* bios - upper part */ - { - uint8_t *mem = m_region_bios->base(); - m_bank3->set_base(mem+0x4000); - m_bank4->set_base(mem+0x6000); - } - break; - - case 1: /* unknown */ - case 3: - { - uint8_t *mem = m_region_banked->base(); - m_bank3->set_base(mem+0x18000); - m_bank4->set_base(mem+0x18000); - } - break; - - case 2: /* banked */ - { - uint8_t *mem = m_region_banked->base(); - m_bank3->set_base(mem+0x2000*m_bank[2]); - m_bank4->set_base(mem+0x2000*m_bank[3]); - } - break; - } - - /* 8000-bfff */ - switch((m_bank_cfg>>4)&3) - { - case 0: /* cartridge */ - { - uint8_t *mem = m_region_cartridge->base(); - m_bank5->set_base(mem+0x4000); - m_bank6->set_base(mem+0x6000); - } - break; - - case 1: /* unknown */ - case 3: - { - uint8_t *mem = m_region_banked->base(); - m_bank5->set_base(mem+0x18000); - m_bank6->set_base(mem+0x18000); - } - break; - - case 2: /* banked */ - { - uint8_t *mem = m_region_banked->base(); - m_bank5->set_base(mem+0x2000*m_bank[4]); - m_bank6->set_base(mem+0x2000*m_bank[5]); - } - break; - } - - /* c000-ffff */ - switch((m_bank_cfg>>6)&3) - { - case 0: /* unknown */ - case 1: - { - uint8_t *mem = m_region_banked->base(); - m_bank7->set_base(mem+0x18000); - m_bank8->set_base(mem+0x18000); - } - break; - - case 2: /* banked */ - { - uint8_t *mem = m_region_banked->base(); - m_bank7->set_base(mem+0x2000*m_bank[6]); - m_bank8->set_base(mem+0x2000*m_bank[7]); - } - break; - - case 3: /* RAM */ - { - m_bank7->set_base(m_main_mem.get()); - m_bank8->set_base(m_main_mem.get()+0x2000); - } - break; - } + return m_page[offset >> 14 & 3]->read8(offset); } -void sfkick_state::ppi_port_a_w(uint8_t data) +void sfkick_state::mem_w(offs_t offset, uint8_t data) { - m_bank_cfg=data; - sfkick_remap_banks(); + m_page[offset >> 14 & 3]->write8(offset, data); } -void sfkick_state::sfkick_bank_set(int num, int data) +void sfkick_state::bank_w(offs_t offset, uint8_t data) { - /* ignore bit 1 */ - data&=0xf; - num&=5; - m_bank[num]=data; - num|=2; - m_bank[num]=data; - sfkick_remap_banks(); + m_bank[offset >> 13 & 7]->set_entry(data & 0xf); } -void sfkick_state::page0_w(offs_t offset, uint8_t data) +uint8_t sfkick_state::ppi_port_b_r() { - if((m_bank_cfg&3)==2) + switch(m_input_mux & 0x0f) { - if(offset<0x2000) - { - sfkick_bank_set(0,data); - } - else - { - sfkick_bank_set(1,data); - } + case 0: return m_in0->read(); + case 1: return m_in1->read(); + case 2: return bitswap<8>(m_dial->read(), 4, 5, 6, 7, 3, 2, 1, 0); + case 3: return m_dsw1->read(); + case 4: return m_dsw2->read(); } + return 0xff; } -void sfkick_state::page1_w(offs_t offset, uint8_t data) +void sfkick_state::ppi_port_a_w(uint8_t data) { - if(((m_bank_cfg>>2)&3)==2) + if (data != m_primary_slot_reg) { - if(offset<0x2000) - { - sfkick_bank_set(2,data); - } - else - { - sfkick_bank_set(3,data); - } - } -} + for (int i = 0; i < 4; i++) + m_page[i]->set_bank(data >> (i * 2) & 3); -void sfkick_state::page2_w(offs_t offset, uint8_t data) -{ - if(((m_bank_cfg>>4)&3)==2) - { - if(offset<0x2000) - { - sfkick_bank_set(4,data); - } - else - { - sfkick_bank_set(5,data); - } + m_primary_slot_reg = data; } } -void sfkick_state::page3_w(offs_t offset, uint8_t data) +void sfkick_state::sfkick_map(address_map &map) { - if(((m_bank_cfg>>6)&3)==2) - { - if(offset<0x2000) - { - sfkick_bank_set(6,data); - } - else - { - sfkick_bank_set(7,data); - } - } - else - { - if(((m_bank_cfg>>6)&3)==3) - { - m_main_mem[offset]=data; - } - } + map(0x0000, 0xffff).rw(FUNC(sfkick_state::mem_r), FUNC(sfkick_state::mem_w)); // 4 pages of 16KB } - - -void sfkick_state::sfkick_map(address_map &map) +void sfkick_state::bank_mem(address_map &map) { - map(0x0000, 0x1fff).bankr("bank1"); - map(0x2000, 0x3fff).bankr("bank2"); - map(0x4000, 0x5fff).bankr("bank3"); - map(0x6000, 0x7fff).bankr("bank4"); - map(0x8000, 0x9fff).bankr("bank5"); - map(0xa000, 0xbfff).bankr("bank6"); - map(0xc000, 0xdfff).bankr("bank7"); - map(0xe000, 0xffff).bankr("bank8"); - map(0x0000, 0x3fff).w(FUNC(sfkick_state::page0_w)); - map(0x4000, 0x7fff).w(FUNC(sfkick_state::page1_w)); - map(0x8000, 0xbfff).w(FUNC(sfkick_state::page2_w)); - map(0xc000, 0xffff).w(FUNC(sfkick_state::page3_w)); + // slot 0, MSX BIOS + map(0x00000, 0x07fff).rom().region("bios", 0); + map(0x08000, 0x0bfff).rom().region("cartridge", 0x4000); + + // slot 1, extrom + map(0x10000, 0x13fff).rom().region("extrom", 0x4000); + + // slot 2, banked + map(0x20000, 0x21fff).bankr(m_bank[0]); + map(0x22000, 0x23fff).bankr(m_bank[1]); + map(0x24000, 0x25fff).bankr(m_bank[2]); + map(0x26000, 0x27fff).bankr(m_bank[3]); + map(0x28000, 0x29fff).bankr(m_bank[4]); + map(0x2a000, 0x2bfff).bankr(m_bank[5]); + map(0x2c000, 0x2dfff).bankr(m_bank[6]); + map(0x2e000, 0x2ffff).bankr(m_bank[7]); + map(0x20000, 0x2ffff).w(FUNC(sfkick_state::bank_w)); + + // slot 3, 16KB RAM + map(0x3c000, 0x3ffff).ram(); } void sfkick_state::sfkick_io_map(address_map &map) @@ -486,7 +291,7 @@ void sfkick_state::sfkick_io_map(address_map &map) map(0xa0, 0xa7).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0x98, 0x9b).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); map(0xa8, 0xab).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0xb4, 0xb5).ram(); /* loopback ? req by sfkicka (MSX Bios leftover)*/ + map(0xb4, 0xb5).ram(); // loopback ? req by sfkicka (MSX Bios leftover) } void sfkick_state::sfkick_sound_map(address_map &map) @@ -504,17 +309,17 @@ void sfkick_state::sfkick_sound_io_map(address_map &map) void sfkick_state::ppi_port_c_w(uint8_t data) { - m_input_mux=data; + m_input_mux = data; } static INPUT_PORTS_START( sfkick ) PORT_START("IN0") - PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) /* unused ? */ + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) // unused ? PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_START("IN1") - PORT_BIT( 0x71, IP_ACTIVE_LOW, IPT_UNUSED ) /* unused ? */ + PORT_BIT( 0x71, IP_ACTIVE_LOW, IPT_UNUSED ) // unused ? PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -523,11 +328,11 @@ static INPUT_PORTS_START( sfkick ) PORT_START("DIAL") PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(-20) - PORT_START("DSW1") /* bitswapped at read! 76543210 -> 45673210 */ + PORT_START("DSW1") // bitswapped at read! 76543210 -> 45673210 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x01, 0x01, "Stage Select" ) PORT_DIPLOCATION("SW1:2") /* How does this work?? */ + PORT_DIPNAME( 0x01, 0x01, "Stage Select" ) PORT_DIPLOCATION("SW1:2") // How does this work?? PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, "Freeze" ) PORT_DIPLOCATION("SW1:3") @@ -549,8 +354,8 @@ static INPUT_PORTS_START( sfkick ) PORT_DIPSETTING( 0x0c, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) - PORT_START("DSW2") /* bitswapped at read! 76543210 -> 45673210 */ - PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:1" ) /* Manual states "No Comment" */ + PORT_START("DSW2") // bitswapped at read! 76543210 -> 45673210 + PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:1" ) // Manual states "No Comment" PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) @@ -571,19 +376,25 @@ static INPUT_PORTS_START( sfkick ) PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) INPUT_PORTS_END +void sfkick_state::machine_start() +{ + // init banks + for (int i = 0; i < 8; i++) + m_bank[i]->configure_entries(0, 0x10, memregion("banked")->base(), 0x2000); + + save_item(NAME(m_primary_slot_reg)); + save_item(NAME(m_input_mux)); +} void sfkick_state::machine_reset() { - m_bank_cfg=0; - m_bank[0]=0; - m_bank[1]=0; - m_bank[2]=0; - m_bank[3]=0; - m_bank[4]=0; - m_bank[5]=0; - m_bank[6]=0; - m_bank[7]=0; - sfkick_remap_banks(); + m_primary_slot_reg = 0; + m_input_mux = 0; + + for (int i = 0; i < 4; i++) + m_page[i]->set_bank(0); + for (int i = 0; i < 8; i++) + m_bank[i]->set_entry(i); } WRITE_LINE_MEMBER(sfkick_state::irqhandler) @@ -603,10 +414,15 @@ void sfkick_state::sfkick(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &sfkick_state::sfkick_sound_map); m_soundcpu->set_addrmap(AS_IO, &sfkick_state::sfkick_sound_io_map); + ADDRESS_MAP_BANK(config, m_page[0]).set_map(&sfkick_state::bank_mem).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); + ADDRESS_MAP_BANK(config, m_page[1]).set_map(&sfkick_state::bank_mem).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); + ADDRESS_MAP_BANK(config, m_page[2]).set_map(&sfkick_state::bank_mem).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); + ADDRESS_MAP_BANK(config, m_page[3]).set_map(&sfkick_state::bank_mem).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); + v9938_device &v9938(V9938(config, "v9938", MASTER_CLOCK)); v9938.set_screen_ntsc("screen"); v9938.set_vram_size(0x80000); - v9938.int_cb().set_inputline("maincpu", 0); + v9938.int_cb().set_inputline(m_maincpu, 0); SCREEN(config, "screen", SCREEN_TYPE_RASTER); i8255_device &ppi(I8255A(config, "ppi8255")); @@ -626,13 +442,6 @@ void sfkick_state::sfkick(machine_config &config) ym1.add_route(3, "mono", 0.50); } -void sfkick_state::init_sfkick() -{ - m_main_mem = std::make_unique(0x4000); -} - - - ROM_START( sfkick ) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) @@ -641,7 +450,7 @@ ROM_START( sfkick ) ROM_LOAD( "sfkick2.a7", 0x00000, 0x8000, CRC(1dcaec5e) SHA1(7e063d46fb6606df2d772866cc55f207035b98c4) ) ROM_LOAD( "sfkick3.c7", 0x08000, 0x8000, CRC(639d3cf2) SHA1(950fd28058d32e4532eb6e99454dcaef092a955e) ) ROM_LOAD( "sfkick4.d7", 0x10000, 0x8000, CRC(ee1b344e) SHA1(d33fbad017cc4838192e9c540621537edb7e8dc4) ) - /* 0x18000-0x1ffff = empty */ + // 0x18000-0x1ffff = empty ROM_REGION(0x8000, "extrom", 0) ROM_LOAD( "sfkick5.h7", 0x00000, 0x8000, CRC(8e8bd9cf) SHA1(f493de40147fdd67a48d4c90b01170fbd6ea074e) ) @@ -664,10 +473,10 @@ ROM_START( sfkicka ) ROM_LOAD( "c145.bin", 0x00000, 0x8000, CRC(1dcaec5e) SHA1(7e063d46fb6606df2d772866cc55f207035b98c4) ) ROM_LOAD( "c146.bin", 0x08000, 0x8000, CRC(57afc4c6) SHA1(ee28b3f74e3175c22f542855b09f1673d048b1fa) ) ROM_LOAD( "c147.bin", 0x10000, 0x8000, CRC(ee1b344e) SHA1(d33fbad017cc4838192e9c540621537edb7e8dc4) ) - /* 0x18000-0x1ffff = empty */ + // 0x18000-0x1ffff = empty ROM_REGION(0x8000, "extrom", 0) - ROM_LOAD( "c149.bin", 0x00000, 0x8000, CRC(2edbf61f) SHA1(23dcff43faf222a4b69001312ce4b1c920e2f4c2) ) + ROM_LOAD( "c149.bin", 0x00000, 0x8000, CRC(2edbf61f) SHA1(23dcff43faf222a4b69001312ce4b1c920e2f4c2) ) ROM_REGION(0x8000, "cartridge", 0) ROM_LOAD( "c150.bin", 0x0000, 0x8000, CRC(20412918) SHA1(b0fefa957b20373ffb84d9ff97a2e84a9a3af56c) ) @@ -687,7 +496,7 @@ ROM_START( spinkick ) ROM_LOAD( "spinkick.r2", 0x00000, 0x8000, CRC(1dcaec5e) SHA1(7e063d46fb6606df2d772866cc55f207035b98c4) ) ROM_LOAD( "spinkick.r3", 0x08000, 0x8000, CRC(e86a194a) SHA1(19a02375ec463e795770403c3e948d754919458b) ) ROM_LOAD( "spinkick.r4", 0x10000, 0x8000, CRC(ee1b344e) SHA1(d33fbad017cc4838192e9c540621537edb7e8dc4) ) - /* 0x18000-0x1ffff = empty */ + // 0x18000-0x1ffff = empty ROM_REGION(0x8000, "extrom", 0) ROM_LOAD( "spinkick.r5", 0x00000, 0x8000, CRC(8e8bd9cf) SHA1(f493de40147fdd67a48d4c90b01170fbd6ea074e) ) @@ -703,6 +512,6 @@ ROM_START( spinkick ) ROM_END -GAME( 1988, sfkick, 0, sfkick, sfkick, sfkick_state, init_sfkick, ROT90, "Haesung/HJ Corp", "Super Free Kick (set 1)", 0 ) -GAME( 198?, sfkicka, sfkick, sfkick, sfkick, sfkick_state, init_sfkick, ROT90, "Haesung", "Super Free Kick (set 2)", 0 ) -GAME( 1988, spinkick, sfkick, sfkick, sfkick, sfkick_state, init_sfkick, ROT90, "Haesung/Seojin", "Hec's Spinkick", 0 ) +GAME( 1988, sfkick, 0, sfkick, sfkick, sfkick_state, empty_init, ROT90, "Haesung/HJ Corp", "Super Free Kick (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 198?, sfkicka, sfkick, sfkick, sfkick, sfkick_state, empty_init, ROT90, "Haesung", "Super Free Kick (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, spinkick, sfkick, sfkick, sfkick, sfkick_state, empty_init, ROT90, "Haesung/Seojin", "Hec's Spinkick", MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3 From 780609f4f2e675af9bb164e82afffbb54890312f Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 6 Jul 2020 16:58:41 +0200 Subject: devices/bus/amiga/zorro/a590.cpp: dumped bios version 5.92 for the A2091 [Guru] --- src/devices/bus/amiga/zorro/a590.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/devices/bus/amiga/zorro/a590.cpp b/src/devices/bus/amiga/zorro/a590.cpp index 5f4944d29ad..c183ed93c3b 100644 --- a/src/devices/bus/amiga/zorro/a590.cpp +++ b/src/devices/bus/amiga/zorro/a590.cpp @@ -159,10 +159,10 @@ ROM_START( dmac_hdc ) ROMX_LOAD("390388-02.u12", 0x4001, 0x2000, NO_DUMP, ROM_SKIP(1) | ROM_BIOS(0)) ROM_SYSTEM_BIOS(1, "v592", "Version 5.92") // a2091 only? - ROMX_LOAD("390508-02.u13", 0x0000, 0x2000, NO_DUMP, ROM_SKIP(1) | ROM_BIOS(1)) // checksum-16: ? - ROMX_LOAD("390509-02.u12", 0x0001, 0x2000, NO_DUMP, ROM_SKIP(1) | ROM_BIOS(1)) // checksum-16: 288c - ROMX_LOAD("390508-02.u13", 0x4000, 0x2000, NO_DUMP, ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD("390509-02.u12", 0x4001, 0x2000, NO_DUMP, ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD("390508-02_a2091_low_byte_u13_v5.92.u13", 0x0000, 0x2000, CRC(4bedbcb1) SHA1(0b97991d7058a8d0c8d000409b4b82bb96ca1dc9), ROM_SKIP(1) | ROM_BIOS(1)) // checksum-16: 23d8 (?) + ROMX_LOAD("390509-02_a2091_high_byte_u12_v5.92.u12", 0x0001, 0x2000, CRC(8f9dd6f8) SHA1(3a8a4639a498bf9a95cb11c45c13687efa714942), ROM_SKIP(1) | ROM_BIOS(1)) // checksum-16: 288c (ok) + ROMX_LOAD("390508-02_a2091_low_byte_u13_v5.92.u13", 0x4000, 0x2000, CRC(4bedbcb1) SHA1(0b97991d7058a8d0c8d000409b4b82bb96ca1dc9), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD("390509-02_a2091_high_byte_u12_v5.92.u12", 0x4001, 0x2000, CRC(8f9dd6f8) SHA1(3a8a4639a498bf9a95cb11c45c13687efa714942), ROM_SKIP(1) | ROM_BIOS(1)) ROM_SYSTEM_BIOS(2, "v60", "Version 6.0") // a590 only? ROMX_LOAD("390389-03.u13", 0x0000, 0x2000, CRC(2e77bbff) SHA1(8a098845068f32cfa4d34a278cd290f61d35a52c), ROM_SKIP(1) | ROM_BIOS(2)) // checksum-16: cbe8 (ok) -- cgit v1.2.3 From 8425638709dfe3c0c6d51cfd24e4c2190eaa5311 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 6 Jul 2020 16:59:14 +0200 Subject: supertnk.cpp: enabled save state support --- src/mame/drivers/supertnk.cpp | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/mame/drivers/supertnk.cpp b/src/mame/drivers/supertnk.cpp index 400c9308617..32c3b059d65 100644 --- a/src/mame/drivers/supertnk.cpp +++ b/src/mame/drivers/supertnk.cpp @@ -127,6 +127,10 @@ public: void init_supertnk(); +protected: + virtual void machine_start() override; + virtual void video_start() override; + private: DECLARE_WRITE_LINE_MEMBER(bankswitch_0_w); DECLARE_WRITE_LINE_MEMBER(bankswitch_1_w); @@ -139,9 +143,6 @@ private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_interrupt); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; void supertnk_io_map(address_map &map); void supertnk_map(address_map &map); @@ -159,6 +160,10 @@ private: void supertnk_state::machine_start() { membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x1000); + + save_item(NAME(m_rom_bank)); + save_item(NAME(m_bitplane_select)); + save_item(NAME(m_interrupt_enable)); } @@ -228,9 +233,11 @@ void supertnk_state::video_start() m_pens[i] = rgb_t(pal1bit(data >> 2), pal1bit(data >> 5), pal1bit(data >> 6)); } - m_videoram[0] = std::make_unique(0x2000); - m_videoram[1] = std::make_unique(0x2000); - m_videoram[2] = std::make_unique(0x2000); + for (int i = 0; i < 3; i++) + { + m_videoram[i] = std::make_unique(0x2000); + save_pointer(NAME(m_videoram[i]), 0x2000, i); + } } @@ -305,18 +312,6 @@ uint32_t supertnk_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm -/************************************* - * - * Machine reset - * - *************************************/ - -void supertnk_state::machine_reset() -{ -} - - - /************************************* * * Memory handlers @@ -515,4 +510,4 @@ void supertnk_state::init_supertnk() } -GAME( 1981, supertnk, 0, supertnk, supertnk, supertnk_state, init_supertnk, ROT90, "Video Games GmbH", "Super Tank", 0 ) +GAME( 1981, supertnk, 0, supertnk, supertnk, supertnk_state, init_supertnk, ROT90, "Video Games GmbH", "Super Tank", MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3 From c765c94c43703f6c83882b927a7a4fa52d89823b Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Mon, 6 Jul 2020 11:12:59 -0400 Subject: Williams System 11B: switched to use the Williams D-11581 "Audio Board" device instead of its own implementation. Document the switches needing to be held to get in-game in all of the System 11B pinballs. Fill out the remainder of the System 11B switch matrix to allow all 64 possible switches to be hit. [Lord Nightmare] --- src/mame/drivers/s11a.cpp | 9 +- src/mame/drivers/s11b.cpp | 498 ++++++++++++++++++++++++++++------------------ src/mame/includes/s11b.h | 8 - 3 files changed, 314 insertions(+), 201 deletions(-) diff --git a/src/mame/drivers/s11a.cpp b/src/mame/drivers/s11a.cpp index 3bc29d603c9..49a961938b5 100644 --- a/src/mame/drivers/s11a.cpp +++ b/src/mame/drivers/s11a.cpp @@ -164,9 +164,12 @@ void s11a_state::bgbank_w(uint8_t data) void s11a_state::init_s11a() { - uint8_t *BGROM = memregion("bgcpu")->base(); - membank("bgbank")->configure_entries(0, 4, &BGROM[0x10000], 0x8000); - membank("bgbank")->set_entry(0); + if (m_bgcpu) + { + uint8_t *BGROM = memregion("bgcpu")->base(); + membank("bgbank")->configure_entries(0, 4, &BGROM[0x10000], 0x8000); + membank("bgbank")->set_entry(0); + } s11_state::init_s11(); } diff --git a/src/mame/drivers/s11b.cpp b/src/mame/drivers/s11b.cpp index 11754cd13b2..2f1c3128382 100644 --- a/src/mame/drivers/s11b.cpp +++ b/src/mame/drivers/s11b.cpp @@ -4,7 +4,6 @@ Williams System 11b Known issues: - - Background music is not working in some games - Black Knight 2000 sometimes goes nuts or resets, although this is largely dependent on whether the 'ball 1' animation was played or not. if you insert 2 or more credits and hit start 2 times quickly so it doesn't @@ -15,11 +14,26 @@ Proximate cause is smashing the stack, after which the RTS at 61DE (in bk2k_l4) transfers to 0000 (where no valid code exists). - Black Knight 2000 LG-1 set reports U26 ROM FAILURE. Bad/hacked dump or original bug? - - Jokerz has an entirely different "Pin Sound '88" stereo audio board (D-12338-567) + - Jokerz has an entirely different "Pin Sound '88" stereo audio board (D-12338-567) which has to be emulated + - Taxi and Police Force both have issues with the display showing garbage overlaid by the alphanumerics. Known keys necessary to get games to start (so the proper number of balls are detected): - - Black Knight 2000: Hold "D" "F" "Y" and press "1" after inserting 1 or more credits. press 'x' to get the main music started. - - Cyclone: Nothing. The game doesn't bother to check if the ball is ready before allowing start. Insert 1 or more credits first, of course. + (Hold these keys and press "1" after inserting 1 or more credits.) + Almost universally, these will be listed in the switch matrix as "Ball Trough Right" "Ball Trough Center" and "Ball Shooter" + - Bad Cats: "H" "Enter" + - Banzai Run: "S" "D" "F" (won't start due to calibration? needs more investigation, try hitting E and / and lots of keys until calibration finishes); - starts music + - Big Guns: "D" "F" "U" + - Black Knight 2000: "D" "F" "Y"; 'x' starts music + - Cyclone: Nothing, game does not have switches to check for balls in the trough. + - Earthshaker: "D" "F" "W" + - Elvira and the Party Monsters: "D" "F" "U" + - Mousin' Around: "D" "F" "H" + - Police Force: "D" "F" + - Space Station: "D" "F" "End" + - Swords of Fury: "D" "F" "H" + - Taxi: "D" "F" + - Transporter the Rescue: "D" "F" "H" + - Whirlwind: "D" "F" "H" */ #include "emu.h" @@ -54,17 +68,6 @@ void s11b_state::s11b_audio_map(address_map &map) map(0xc000, 0xffff).bankr("bank1"); } -void s11b_state::s11b_bg_map(address_map &map) -{ - map(0x0000, 0x07ff).mirror(0x1800).ram(); - map(0x2000, 0x2001).mirror(0x1ffe).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write)); - map(0x4000, 0x4003).mirror(0x1ffc).rw(m_pia40, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - map(0x6000, 0x6000).mirror(0x07ff).w(FUNC(s11b_state::bg_cvsd_digit_clock_clear_w)); - map(0x6800, 0x6800).mirror(0x07ff).w(FUNC(s11b_state::bg_cvsd_clock_set_w)); - map(0x7800, 0x7800).mirror(0x07ff).w(FUNC(s11b_state::bgbank_w)); - map(0x8000, 0xffff).bankr("bgbank"); -} - static INPUT_PORTS_START( s11b ) PORT_START("SW.0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) @@ -117,7 +120,14 @@ static INPUT_PORTS_START( s11b ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN) PORT_START("SW.5") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DEL) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_HOME) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_END) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_PGUP) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_PGDN) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_0_PAD) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DEL_PAD) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_START("SW.6") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) @@ -130,7 +140,14 @@ static INPUT_PORTS_START( s11b ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) PORT_START("SW.7") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_9_PAD) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH_PAD) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ASTERISK) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_START("DIAGS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Audio Diag") PORT_CODE(KEYCODE_1_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, s11b_state, audio_nmi, 1) @@ -146,26 +163,10 @@ MACHINE_RESET_MEMBER( s11b_state, s11b ) { membank("bank0")->set_entry(0); membank("bank1")->set_entry(0); - membank("bgbank")->set_entry(0); // reset the CPUs again, so that the CPUs are starting with the right vectors (otherwise sound may die on reset) m_audiocpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); - if(m_bgcpu) - m_bgcpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); -} - -void s11b_state::bg_cvsd_clock_set_w(uint8_t data) -{ - if(m_bg_hc55516) - m_bg_hc55516->clock_w(1); -} - -void s11b_state::bg_cvsd_digit_clock_clear_w(uint8_t data) -{ - if(m_bg_hc55516) - { - m_bg_hc55516->clock_w(0); - m_bg_hc55516->digit_w(data&1); - } + if(m_bg) + m_bg->device_reset(); } void s11b_state::dig1_w(uint8_t data) @@ -320,7 +321,6 @@ void s11b_state::s11b(machine_config &config) MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); - vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT); SPEAKER(config, "speech").front_center(); HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 0.50); @@ -336,26 +336,12 @@ void s11b_state::s11b(machine_config &config) m_pias->irqb_handler().set(m_audioirq, FUNC(input_merger_device::in_w<1>)); /* Add the background music card */ - MC6809E(config, m_bgcpu, XTAL(8'000'000) / 4); // MC68B09E - m_bgcpu->set_addrmap(AS_PROGRAM, &s11b_state::s11b_bg_map); - config.set_maximum_quantum(attotime::from_hz(50)); - SPEAKER(config, "bg").front_center(); - YM2151(config, m_ym2151, 3580000); - m_ym2151->irq_handler().set(FUNC(s11b_state::ym2151_irq_w)); - m_ym2151->add_route(ALL_OUTPUTS, "bg", 0.25); - - MC1408(config, "dac1", 0).add_route(ALL_OUTPUTS, "bg", 0.25); - - HC55516(config, m_bg_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 0.50); - - PIA6821(config, m_pia40, 0); - m_pia40->writepa_handler().set("dac1", FUNC(dac_byte_interface::data_w)); - m_pia40->writepb_handler().set(FUNC(s11_state::pia40_pb_w)); - m_pia40->ca2_handler().set(m_ym2151, FUNC(ym2151_device::reset_w)); - m_pia40->cb2_handler().set(FUNC(s11_state::pia40_cb2_w)); - m_pia40->irqa_handler().set_inputline(m_bgcpu, M6809_FIRQ_LINE); - m_pia40->irqb_handler().set_inputline(m_bgcpu, INPUT_LINE_NMI); + S11C_BG(config, m_bg); + m_bg->pb_cb().set(m_pia34, FUNC(pia6821_device::portb_w)); + m_bg->cb2_cb().set(m_pia34, FUNC(pia6821_device::cb1_w)); + m_bg->set_romregion(m_bgcpu); + m_bg->add_route(ALL_OUTPUTS, "bg", 1.0); } /*----------------------- @@ -368,10 +354,13 @@ ROM_START(bcats_l5) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("cats_u21.l1", 0x18000, 0x8000, CRC(04110d08) SHA1(4b44b26983cb5d14a93c16a19dc2bdbaa665dc69)) ROM_LOAD("cats_u22.l1", 0x10000, 0x8000, CRC(7e152c78) SHA1(b4ab770fdd9420a5d35e55bf8fb84c99ac544b8b)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("cats_u4.l1", 0x10000, 0x8000, CRC(18c62813) SHA1(a4fb69cfedd0b92c22b599913df3cdf8b3eef42c)) - ROM_LOAD("cats_u19.l1", 0x18000, 0x8000, CRC(f2fea68b) SHA1(9a41823e71342b7a162420378f122bba34ce0636)) - ROM_LOAD("cats_u20.l1", 0x20000, 0x8000, CRC(bf4dc35a) SHA1(9920ce90d93fb6ecf98792c35bb6eb8862a969f3)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("cats_u19.l1", 0x20000, 0x8000, CRC(f2fea68b) SHA1(9a41823e71342b7a162420378f122bba34ce0636)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("cats_u20.l1", 0x30000, 0x8000, CRC(bf4dc35a) SHA1(9920ce90d93fb6ecf98792c35bb6eb8862a969f3)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(bcats_l2) @@ -381,10 +370,13 @@ ROM_START(bcats_l2) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("cats_u21.l1", 0x18000, 0x8000, CRC(04110d08) SHA1(4b44b26983cb5d14a93c16a19dc2bdbaa665dc69)) ROM_LOAD("cats_u22.l1", 0x10000, 0x8000, CRC(7e152c78) SHA1(b4ab770fdd9420a5d35e55bf8fb84c99ac544b8b)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("cats_u4.l1", 0x10000, 0x8000, CRC(18c62813) SHA1(a4fb69cfedd0b92c22b599913df3cdf8b3eef42c)) - ROM_LOAD("cats_u19.l1", 0x18000, 0x8000, CRC(f2fea68b) SHA1(9a41823e71342b7a162420378f122bba34ce0636)) - ROM_LOAD("cats_u20.l1", 0x20000, 0x8000, CRC(bf4dc35a) SHA1(9920ce90d93fb6ecf98792c35bb6eb8862a969f3)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("cats_u19.l1", 0x20000, 0x8000, CRC(f2fea68b) SHA1(9a41823e71342b7a162420378f122bba34ce0636)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("cats_u20.l1", 0x30000, 0x8000, CRC(bf4dc35a) SHA1(9920ce90d93fb6ecf98792c35bb6eb8862a969f3)) + ROM_RELOAD(0x38000,0x8000) ROM_END /*-------------------- @@ -397,10 +389,13 @@ ROM_START(bnzai_l3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("banz_u21.l1", 0x18000, 0x8000, CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b)) ROM_LOAD("banz_u22.l1", 0x10000, 0x8000, CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("banz_u4.l1", 0x10000, 0x8000, CRC(8fd69c69) SHA1(c024cda85c6616943c3a12ab5943a7be8709bfe3)) - ROM_LOAD("banz_u19.l1", 0x18000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) - ROM_LOAD("banz_u20.l1", 0x20000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("banz_u19.l1", 0x20000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("banz_u20.l1", 0x30000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(bnzai_g3) @@ -410,10 +405,13 @@ ROM_START(bnzai_g3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("banz_u21.l1", 0x18000, 0x8000, CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b)) ROM_LOAD("banz_u22.l1", 0x10000, 0x8000, CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("banz_u4.l1", 0x10000, 0x8000, CRC(8fd69c69) SHA1(c024cda85c6616943c3a12ab5943a7be8709bfe3)) - ROM_LOAD("banz_u19.l1", 0x18000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) - ROM_LOAD("banz_u20.l1", 0x20000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("banz_u19.l1", 0x20000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("banz_u20.l1", 0x30000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(bnzai_l1) @@ -423,10 +421,13 @@ ROM_START(bnzai_l1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("banz_u21.l1", 0x18000, 0x8000, CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b)) ROM_LOAD("banz_u22.l1", 0x10000, 0x8000, CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("banz_u4.l1", 0x10000, 0x8000, CRC(8fd69c69) SHA1(c024cda85c6616943c3a12ab5943a7be8709bfe3)) - ROM_LOAD("banz_u19.l1", 0x18000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) - ROM_LOAD("banz_u20.l1", 0x20000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("banz_u19.l1", 0x20000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("banz_u20.l1", 0x30000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(bnzai_pa) @@ -436,10 +437,13 @@ ROM_START(bnzai_pa) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("banz_u21.l1", 0x18000, 0x8000, CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b)) ROM_LOAD("banz_u22.l1", 0x10000, 0x8000, CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("u4-p7.rom", 0x10000, 0x8000, CRC(630d1ce9) SHA1(fb7f6004b94bf20281216519f18b53949eef4405)) - ROM_LOAD("banz_u19.l1", 0x18000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) - ROM_LOAD("banz_u20.l1", 0x20000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("banz_u19.l1", 0x20000, 0x8000, CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("banz_u20.l1", 0x30000, 0x8000, CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) + ROM_RELOAD(0x38000,0x8000) ROM_END /*-------------------- @@ -452,9 +456,11 @@ ROM_START(bguns_l8) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("guns_u21.l1", 0x18000, 0x8000, CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703)) ROM_LOAD("guns_u22.l1", 0x10000, 0x8000, CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("gund_u4.l1", 0x10000, 0x8000, CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d)) - ROM_LOAD("guns_u19.l1", 0x18000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("guns_u19.l1", 0x20000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bguns_l7) @@ -464,9 +470,11 @@ ROM_START(bguns_l7) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("guns_u21.l1", 0x18000, 0x8000, CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703)) ROM_LOAD("guns_u22.l1", 0x10000, 0x8000, CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("gund_u4.l1", 0x10000, 0x8000, CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d)) - ROM_LOAD("guns_u19.l1", 0x18000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("guns_u19.l1", 0x20000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bguns_la) @@ -476,9 +484,11 @@ ROM_START(bguns_la) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("guns_u21.l1", 0x18000, 0x8000, CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703)) ROM_LOAD("guns_u22.l1", 0x10000, 0x8000, CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("gund_u4.l1", 0x10000, 0x8000, CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d)) - ROM_LOAD("guns_u19.l1", 0x18000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("guns_u19.l1", 0x20000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bguns_p1) @@ -488,9 +498,11 @@ ROM_START(bguns_p1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("guns_u21.l1", 0x18000, 0x8000, CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703)) ROM_LOAD("guns_u22.l1", 0x10000, 0x8000, CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("gund_u4.l1", 0x10000, 0x8000, CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d)) - ROM_LOAD("guns_u19.l1", 0x18000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("guns_u19.l1", 0x20000, 0x8000, CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) + ROM_RELOAD(0x28000,0x8000) ROM_END /*----------------------- @@ -503,9 +515,11 @@ ROM_START(bk2k_l4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bk2k_lg1) // the rom at u26 is reported as bad when the game is booted, but appears to run nonetheless; bad dump or original bug in the LG-1 set fixed in LG-2 and LG-3? @@ -515,9 +529,11 @@ ROM_START(bk2k_lg1) // the rom at u26 is reported as bad when the game is booted ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bk2k_lg3) @@ -527,9 +543,11 @@ ROM_START(bk2k_lg3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bk2k_pu1) @@ -539,9 +557,11 @@ ROM_START(bk2k_pu1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bk2k_pf1) @@ -551,9 +571,11 @@ ROM_START(bk2k_pf1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bk2k_la2) @@ -563,9 +585,11 @@ ROM_START(bk2k_la2) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bk2k_pa7) @@ -575,9 +599,11 @@ ROM_START(bk2k_pa7) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(bk2k_pa5) @@ -587,9 +613,11 @@ ROM_START(bk2k_pa5) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u21.l1", 0x18000, 0x8000, CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027)) ROM_LOAD("bk2k_u22.l1", 0x10000, 0x8000, CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("bk2k_u4.l2", 0x10000, 0x8000, CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c)) - ROM_LOAD("bk2k_u19.l1", 0x18000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("bk2k_u19.l1", 0x20000, 0x8000, CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) + ROM_RELOAD(0x28000,0x8000) ROM_END /*-------------------- @@ -602,9 +630,11 @@ ROM_START(cycln_l5) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("cycl_u21.l1", 0x18000, 0x8000, CRC(d4f69a7c) SHA1(da0ce27d92b22583be54a41fc8083cee803c987a)) ROM_LOAD("cycl_u22.l1", 0x10000, 0x8000, CRC(28dc8f13) SHA1(bccce3a9b6b2f52da919c6df8db07e5e3de12657)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("cycl_u4.l5", 0x10000, 0x8000, CRC(d04b663b) SHA1(f54c6df08ec73b733cfeb2a989e44e5c04da3d9e)) - ROM_LOAD("cycl_u19.l1", 0x18000, 0x8000, CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("cycl_u19.l1", 0x20000, 0x8000, CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(cycln_l4) @@ -614,9 +644,11 @@ ROM_START(cycln_l4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("cycl_u21.l1", 0x18000, 0x8000, CRC(d4f69a7c) SHA1(da0ce27d92b22583be54a41fc8083cee803c987a)) ROM_LOAD("cycl_u22.l1", 0x10000, 0x8000, CRC(28dc8f13) SHA1(bccce3a9b6b2f52da919c6df8db07e5e3de12657)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("cycl_u4.l5", 0x10000, 0x8000, CRC(d04b663b) SHA1(f54c6df08ec73b733cfeb2a989e44e5c04da3d9e)) - ROM_LOAD("cycl_u19.l1", 0x18000, 0x8000, CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("cycl_u19.l1", 0x20000, 0x8000, CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(cycln_l1) @@ -626,9 +658,11 @@ ROM_START(cycln_l1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("cycl_u21.l1", 0x18000, 0x8000, CRC(d4f69a7c) SHA1(da0ce27d92b22583be54a41fc8083cee803c987a)) ROM_LOAD("cycl_u22.l1", 0x10000, 0x8000, CRC(28dc8f13) SHA1(bccce3a9b6b2f52da919c6df8db07e5e3de12657)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("cycl_u4.l5", 0x10000, 0x8000, CRC(d04b663b) SHA1(f54c6df08ec73b733cfeb2a989e44e5c04da3d9e)) - ROM_LOAD("cycl_u19.l1", 0x18000, 0x8000, CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("cycl_u19.l1", 0x20000, 0x8000, CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) + ROM_RELOAD(0x28000,0x8000) ROM_END /*-------------------- @@ -641,9 +675,11 @@ ROM_START(esha_pr4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u4.l1", 0x10000, 0x8000, CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(esha_la3) @@ -653,9 +689,11 @@ ROM_START(esha_la3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u4.l1", 0x10000, 0x8000, CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(esha_ma3) @@ -665,9 +703,11 @@ ROM_START(esha_ma3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u4.l1", 0x10000, 0x8000, CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(esha_lg1) @@ -677,9 +717,11 @@ ROM_START(esha_lg1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u4.l1", 0x10000, 0x8000, CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(esha_lg2) @@ -689,9 +731,11 @@ ROM_START(esha_lg2) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u4.l1", 0x10000, 0x8000, CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(esha_la1) @@ -701,9 +745,11 @@ ROM_START(esha_la1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u4.l1", 0x10000, 0x8000, CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(esha_pa1) @@ -713,9 +759,11 @@ ROM_START(esha_pa1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("u4-p1.rom", 0x10000, 0x8000, CRC(7219ffc2) SHA1(b8585b7d12f401d8ba4d95a5e2f20d35ff0ac26a)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(esha_pa4) @@ -725,9 +773,11 @@ ROM_START(esha_pa4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("eshk_u21.l1", 0x18000, 0x8000, CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b)) ROM_LOAD("eshk_u22.l1", 0x10000, 0x8000, CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("u4-p1.rom", 0x10000, 0x8000, CRC(7219ffc2) SHA1(b8585b7d12f401d8ba4d95a5e2f20d35ff0ac26a)) - ROM_LOAD("eshk_u19.l1", 0x18000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("eshk_u19.l1", 0x20000, 0x8000, CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + ROM_RELOAD(0x28000,0x8000) ROM_END /*-------------------- @@ -740,10 +790,13 @@ ROM_START(eatpm_l4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u21.l1", 0x18000, 0x8000, CRC(68d44545) SHA1(8c3ea8521a44b1539cd148f142cca14184174ba7)) ROM_LOAD("elvi_u22.l1", 0x10000, 0x8000, CRC(e525b4fe) SHA1(be728ec33a00b93c3346428a9248b588460af945)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u4.l1", 0x10000, 0x8000, CRC(b5afa4db) SHA1(59b72dac5301a4befa01b93da5162478682e6021)) - ROM_LOAD("elvi_u19.l1", 0x18000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) - ROM_LOAD("elvi_u20.l1", 0x20000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("elvi_u19.l1", 0x20000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("elvi_u20.l1", 0x30000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(eatpm_l1) @@ -753,10 +806,13 @@ ROM_START(eatpm_l1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u21.l1", 0x18000, 0x8000, CRC(68d44545) SHA1(8c3ea8521a44b1539cd148f142cca14184174ba7)) ROM_LOAD("elvi_u22.l1", 0x10000, 0x8000, CRC(e525b4fe) SHA1(be728ec33a00b93c3346428a9248b588460af945)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u4.l1", 0x10000, 0x8000, CRC(b5afa4db) SHA1(59b72dac5301a4befa01b93da5162478682e6021)) - ROM_LOAD("elvi_u19.l1", 0x18000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) - ROM_LOAD("elvi_u20.l1", 0x20000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("elvi_u19.l1", 0x20000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("elvi_u20.l1", 0x30000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(eatpm_l2) @@ -766,10 +822,13 @@ ROM_START(eatpm_l2) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u21.l1", 0x18000, 0x8000, CRC(68d44545) SHA1(8c3ea8521a44b1539cd148f142cca14184174ba7)) ROM_LOAD("elvi_u22.l1", 0x10000, 0x8000, CRC(e525b4fe) SHA1(be728ec33a00b93c3346428a9248b588460af945)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u4.l1", 0x10000, 0x8000, CRC(b5afa4db) SHA1(59b72dac5301a4befa01b93da5162478682e6021)) - ROM_LOAD("elvi_u19.l1", 0x18000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) - ROM_LOAD("elvi_u20.l1", 0x20000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("elvi_u19.l1", 0x20000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("elvi_u20.l1", 0x30000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(eatpm_4g) @@ -779,10 +838,13 @@ ROM_START(eatpm_4g) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u21.l1", 0x18000, 0x8000, CRC(68d44545) SHA1(8c3ea8521a44b1539cd148f142cca14184174ba7)) ROM_LOAD("elvi_u22.l1", 0x10000, 0x8000, CRC(e525b4fe) SHA1(be728ec33a00b93c3346428a9248b588460af945)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u4.l1", 0x10000, 0x8000, CRC(b5afa4db) SHA1(59b72dac5301a4befa01b93da5162478682e6021)) - ROM_LOAD("elvi_u19.l1", 0x18000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) - ROM_LOAD("elvi_u20.l1", 0x20000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("elvi_u19.l1", 0x20000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("elvi_u20.l1", 0x30000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(eatpm_4u) @@ -792,10 +854,13 @@ ROM_START(eatpm_4u) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u21.l1", 0x18000, 0x8000, CRC(68d44545) SHA1(8c3ea8521a44b1539cd148f142cca14184174ba7)) ROM_LOAD("elvi_u22.l1", 0x10000, 0x8000, CRC(e525b4fe) SHA1(be728ec33a00b93c3346428a9248b588460af945)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u4.l1", 0x10000, 0x8000, CRC(b5afa4db) SHA1(59b72dac5301a4befa01b93da5162478682e6021)) - ROM_LOAD("elvi_u19.l1", 0x18000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) - ROM_LOAD("elvi_u20.l1", 0x20000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("elvi_u19.l1", 0x20000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("elvi_u20.l1", 0x30000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(eatpm_f1) @@ -805,10 +870,13 @@ ROM_START(eatpm_f1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u21.l1", 0x18000, 0x8000, CRC(68d44545) SHA1(8c3ea8521a44b1539cd148f142cca14184174ba7)) ROM_LOAD("elvi_u22.l1", 0x10000, 0x8000, CRC(e525b4fe) SHA1(be728ec33a00b93c3346428a9248b588460af945)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u4.l1", 0x10000, 0x8000, CRC(b5afa4db) SHA1(59b72dac5301a4befa01b93da5162478682e6021)) - ROM_LOAD("elvi_u19.l1", 0x18000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) - ROM_LOAD("elvi_u20.l1", 0x20000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("elvi_u19.l1", 0x20000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("elvi_u20.l1", 0x30000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(eatpm_p7) @@ -818,10 +886,13 @@ ROM_START(eatpm_p7) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u21.l1", 0x18000, 0x8000, CRC(68d44545) SHA1(8c3ea8521a44b1539cd148f142cca14184174ba7)) ROM_LOAD("elvi_u22.l1", 0x10000, 0x8000, CRC(e525b4fe) SHA1(be728ec33a00b93c3346428a9248b588460af945)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("elvi_u4.l1", 0x10000, 0x8000, CRC(b5afa4db) SHA1(59b72dac5301a4befa01b93da5162478682e6021)) - ROM_LOAD("elvi_u19.l1", 0x18000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) - ROM_LOAD("elvi_u20.l1", 0x20000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("elvi_u19.l1", 0x20000, 0x8000, CRC(806bc350) SHA1(d170aef11001096da9f2f7240726662009e26f5f)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("elvi_u20.l1", 0x30000, 0x8000, CRC(3d92d5fd) SHA1(834d40a59be57057103d1d8ab48fdaaf7dc5eda2)) + ROM_RELOAD(0x38000,0x8000) ROM_END /*-------------------- @@ -834,7 +905,7 @@ ROM_START(jokrz_l6) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("jokeru21.l1", 0x18000, 0x8000, CRC(9e2be4f6) SHA1(6e26b55935d0c8138176b54a11c1a9ab58366628)) ROM_LOAD("jokeru22.l1", 0x10000, 0x8000, CRC(2f67160c) SHA1(f1e179fde41f9bf8226069c24b0bd5152a13e518)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("jokeru5.l2", 0x10000, 0x10000, CRC(e9dc0095) SHA1(23a99555e50461ccc8e67de01796642c080294c2)) ROM_END @@ -845,7 +916,7 @@ ROM_START(jokrz_l3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("jokeru21.l1", 0x18000, 0x8000, CRC(9e2be4f6) SHA1(6e26b55935d0c8138176b54a11c1a9ab58366628)) ROM_LOAD("jokeru22.l1", 0x10000, 0x8000, CRC(2f67160c) SHA1(f1e179fde41f9bf8226069c24b0bd5152a13e518)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("jokeru5.l2", 0x10000, 0x10000, CRC(e9dc0095) SHA1(23a99555e50461ccc8e67de01796642c080294c2)) ROM_END @@ -856,7 +927,7 @@ ROM_START(jokrz_g4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("jokeru21.l1", 0x18000, 0x8000, CRC(9e2be4f6) SHA1(6e26b55935d0c8138176b54a11c1a9ab58366628)) ROM_LOAD("jokeru22.l1", 0x10000, 0x8000, CRC(2f67160c) SHA1(f1e179fde41f9bf8226069c24b0bd5152a13e518)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("jokeru5.l2", 0x10000, 0x10000, CRC(e9dc0095) SHA1(23a99555e50461ccc8e67de01796642c080294c2)) ROM_END @@ -870,10 +941,13 @@ ROM_START(mousn_l4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u20.l2", 0x18000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) ROM_LOAD("mous_u22.l1", 0x10000, 0x8000, CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u4.l2", 0x10000, 0x8000, CRC(643add1e) SHA1(45dea0f4c6f24d17e6f7dda75afaa7caefdc6b96)) - ROM_LOAD("mous_u19.l2", 0x18000, 0x8000, CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91)) - ROM_LOAD("mous_u20.l2", 0x20000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("mous_u19.l2", 0x20000, 0x8000, CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("mous_u20.l2", 0x30000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(mousn_l1) @@ -883,10 +957,13 @@ ROM_START(mousn_l1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u20.l2", 0x18000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) ROM_LOAD("mous_u22.l1", 0x10000, 0x8000, CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u4.l2", 0x10000, 0x8000, CRC(643add1e) SHA1(45dea0f4c6f24d17e6f7dda75afaa7caefdc6b96)) - ROM_LOAD("mous_u19.l2", 0x18000, 0x8000, CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91)) - ROM_LOAD("mous_u20.l2", 0x20000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("mous_u19.l2", 0x20000, 0x8000, CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("mous_u20.l2", 0x30000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(mousn_lu) @@ -896,10 +973,13 @@ ROM_START(mousn_lu) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u20.l2", 0x18000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) ROM_LOAD("mous_u22.l1", 0x10000, 0x8000, CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u4.l2", 0x10000, 0x8000, CRC(643add1e) SHA1(45dea0f4c6f24d17e6f7dda75afaa7caefdc6b96)) - ROM_LOAD("mous_u19.l2", 0x18000, 0x8000, CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91)) - ROM_LOAD("mous_u20.l2", 0x20000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("mous_u19.l2", 0x20000, 0x8000, CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("mous_u20.l2", 0x30000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(mousn_lx) @@ -909,10 +989,13 @@ ROM_START(mousn_lx) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u20.l2", 0x18000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) ROM_LOAD("mous_u22.l1", 0x10000, 0x8000, CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("mous_u4.lx", 0x10000, 0x8000, CRC(d311db4a) SHA1(d9d20921eb42c19c5074c976608bfec0d3130204)) - ROM_LOAD("mous_u19.lx", 0x18000, 0x8000, CRC(c7a6f494) SHA1(272f0bd3885bb81da13ee6ed3d66f9424ccf4b0d)) - ROM_LOAD("mous_u20.l2", 0x20000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("mous_u19.lx", 0x20000, 0x8000, CRC(c7a6f494) SHA1(272f0bd3885bb81da13ee6ed3d66f9424ccf4b0d)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("mous_u20.l2", 0x30000, 0x8000, CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) + ROM_RELOAD(0x18000,0x8000) ROM_END /*----------------------- @@ -925,9 +1008,11 @@ ROM_START(polic_l4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u21.l1", 0x18000, 0x8000, CRC(7729afd3) SHA1(9cd2898a7a4203cf3b2dcd203e25cde5dd582ee7)) ROM_LOAD("pfrc_u22.l1", 0x10000, 0x8000, CRC(40f5e6b2) SHA1(4af2e2658720b08d03d24c9d314a6e5074b2c747)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u4.l2", 0x10000, 0x8000, CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2)) - ROM_LOAD("pfrc_u19.l1", 0x18000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("pfrc_u19.l1", 0x20000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(polic_l3) @@ -937,9 +1022,11 @@ ROM_START(polic_l3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u21.l1", 0x18000, 0x8000, CRC(7729afd3) SHA1(9cd2898a7a4203cf3b2dcd203e25cde5dd582ee7)) ROM_LOAD("pfrc_u22.l1", 0x10000, 0x8000, CRC(40f5e6b2) SHA1(4af2e2658720b08d03d24c9d314a6e5074b2c747)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u4.l2", 0x10000, 0x8000, CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2)) - ROM_LOAD("pfrc_u19.l1", 0x18000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("pfrc_u19.l1", 0x20000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(polic_l2) @@ -949,9 +1036,11 @@ ROM_START(polic_l2) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u21.l1", 0x18000, 0x8000, CRC(7729afd3) SHA1(9cd2898a7a4203cf3b2dcd203e25cde5dd582ee7)) ROM_LOAD("pfrc_u22.l1", 0x10000, 0x8000, CRC(40f5e6b2) SHA1(4af2e2658720b08d03d24c9d314a6e5074b2c747)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u4.l2", 0x10000, 0x8000, CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2)) - ROM_LOAD("pfrc_u19.l1", 0x18000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("pfrc_u19.l1", 0x20000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(polic_g4) @@ -961,9 +1050,11 @@ ROM_START(polic_g4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u21.l1", 0x18000, 0x8000, CRC(7729afd3) SHA1(9cd2898a7a4203cf3b2dcd203e25cde5dd582ee7)) ROM_LOAD("pfrc_u22.l1", 0x10000, 0x8000, CRC(40f5e6b2) SHA1(4af2e2658720b08d03d24c9d314a6e5074b2c747)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("pfrc_u4.l2", 0x10000, 0x8000, CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2)) - ROM_LOAD("pfrc_u19.l1", 0x18000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("pfrc_u19.l1", 0x20000, 0x8000, CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) + ROM_RELOAD(0x28000,0x8000) ROM_END /*-------------------- @@ -976,8 +1067,9 @@ ROM_START(spstn_l5) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("sstn_u21.l1", 0x18000, 0x8000, CRC(a2ceccaa) SHA1(4c23713543e06458e49e3f2d472543c4a4246a93)) ROM_LOAD("sstn_u22.l1", 0x10000, 0x8000, CRC(2b745994) SHA1(67ebfe13db6670237496b033611bf9d4ba8d5c30)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("sstn_u4.l1", 0x10000, 0x8000, CRC(ad7a0511) SHA1(9aa6412de12599fd0d10faef8fffb5d535f49015)) + ROM_RELOAD(0x18000,0x8000) ROM_END /*-------------------- @@ -990,9 +1082,11 @@ ROM_START(swrds_l2) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("swrd_u21.l1", 0x18000, 0x8000, CRC(ee8b0a64) SHA1(c2c52059a9a5f7c0abcfdd76cfc6d5b5451f7d1e)) ROM_LOAD("swrd_u22.l1", 0x10000, 0x8000, CRC(73dcdbb0) SHA1(66f5b3804442a1742b6fb3cccf539c4df956b3f2)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("swrd_u4.l1", 0x10000, 0x8000, CRC(272b509c) SHA1(756d3783f664ca1c41dd1d12032330b74c3f89ea)) - ROM_LOAD("swrd_u19.l1", 0x18000, 0x8000, CRC(a22f84fa) SHA1(1731e86e85cca2d283512d5048c787df3970c9c5)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("swrd_u19.l1", 0x20000, 0x8000, CRC(a22f84fa) SHA1(1731e86e85cca2d283512d5048c787df3970c9c5)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(swrds_l1) @@ -1002,9 +1096,11 @@ ROM_START(swrds_l1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("swrd_u21.l1", 0x18000, 0x8000, CRC(ee8b0a64) SHA1(c2c52059a9a5f7c0abcfdd76cfc6d5b5451f7d1e)) ROM_LOAD("swrd_u22.l1", 0x10000, 0x8000, CRC(73dcdbb0) SHA1(66f5b3804442a1742b6fb3cccf539c4df956b3f2)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("swrd_u4.l1", 0x10000, 0x8000, CRC(272b509c) SHA1(756d3783f664ca1c41dd1d12032330b74c3f89ea)) - ROM_LOAD("swrd_u19.l1", 0x18000, 0x8000, CRC(a22f84fa) SHA1(1731e86e85cca2d283512d5048c787df3970c9c5)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("swrd_u19.l1", 0x20000, 0x8000, CRC(a22f84fa) SHA1(1731e86e85cca2d283512d5048c787df3970c9c5)) + ROM_RELOAD(0x28000,0x8000) ROM_END /*-------------------- @@ -1017,9 +1113,11 @@ ROM_START(taxi_l4) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u21.l1", 0x18000, 0x8000, CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f)) ROM_LOAD("taxi_u22.l1", 0x10000, 0x8000, CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u4.l1", 0x10000, 0x8000, CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d)) - ROM_LOAD("taxi_u19.l1", 0x18000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("taxi_u19.l1", 0x20000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(taxi_l3) @@ -1029,9 +1127,11 @@ ROM_START(taxi_l3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u21.l1", 0x18000, 0x8000, CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f)) ROM_LOAD("taxi_u22.l1", 0x10000, 0x8000, CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u4.l1", 0x10000, 0x8000, CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d)) - ROM_LOAD("taxi_u19.l1", 0x18000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("taxi_u19.l1", 0x20000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(taxi_lu1) @@ -1041,9 +1141,11 @@ ROM_START(taxi_lu1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u21.l1", 0x0000, 0x8000, CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f)) ROM_LOAD("taxi_u22.l1", 0x8000, 0x8000, CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u4.l1", 0x10000, 0x8000, CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d)) - ROM_LOAD("taxi_u19.l1", 0x18000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("taxi_u19.l1", 0x20000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(taxi_lg1) @@ -1053,9 +1155,11 @@ ROM_START(taxi_lg1) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u21.l1", 0x0000, 0x8000, CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f)) ROM_LOAD("taxi_u22.l1", 0x8000, 0x8000, CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u4.l1", 0x10000, 0x8000, CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d)) - ROM_LOAD("taxi_u19.l1", 0x18000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("taxi_u19.l1", 0x20000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x28000,0x8000) ROM_END ROM_START(taxi_p5) @@ -1065,9 +1169,11 @@ ROM_START(taxi_p5) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u21.l1", 0x18000, 0x8000, CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f)) ROM_LOAD("taxi_u22.l1", 0x10000, 0x8000, CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("taxi_u4.l1", 0x10000, 0x8000, CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d)) - ROM_LOAD("taxi_u19.l1", 0x18000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("taxi_u19.l1", 0x20000, 0x8000, CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) + ROM_RELOAD(0x28000,0x8000) ROM_END /*----------------------------- @@ -1080,10 +1186,13 @@ ROM_START(tsptr_l3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("tran_u21.l2", 0x18000, 0x8000, CRC(b10120ee) SHA1(305a898a8b762c27dba26921ef169556bf96e518)) ROM_LOAD("tran_u22.l2", 0x10000, 0x8000, CRC(337784b5) SHA1(30c17afd8f76118940982db946cd3a2a29445d10)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("tran_u4.l2", 0x10000, 0x8000, CRC(a06ddd61) SHA1(630fe7ab94516930c4876a95f822024a44371170)) - ROM_LOAD("tran_u19.l2", 0x18000, 0x8000, CRC(3cfde8b0) SHA1(7bdc71ba1ba4fd337f052354323c86fd97b2b881)) - ROM_LOAD("tran_u20.l2", 0x20000, 0x8000, CRC(e9890cf1) SHA1(0ae37504c704401101c79ce49df11044f8d8caa9)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("tran_u19.l2", 0x20000, 0x8000, CRC(3cfde8b0) SHA1(7bdc71ba1ba4fd337f052354323c86fd97b2b881)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("tran_u20.l2", 0x30000, 0x8000, CRC(e9890cf1) SHA1(0ae37504c704401101c79ce49df11044f8d8caa9)) + ROM_RELOAD(0x38000,0x8000) ROM_END /*----------------------- @@ -1096,10 +1205,13 @@ ROM_START(whirl_l3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("whir_u21.l1", 0x18000, 0x8000, CRC(fa3da322) SHA1(732107eace9eecdb97eff4abb4420a2febef7425)) ROM_LOAD("whir_u22.l1", 0x10000, 0x8000, CRC(fcaf8c4e) SHA1(8e8cab1923a56bcef4671dce28aef1e39303c04a)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("whir_u4.l1", 0x10000, 0x8000, CRC(29952d84) SHA1(26479a341b0552c5f9d9bf9dd013855e51a7b857)) - ROM_LOAD("whir_u19.l1", 0x18000, 0x8000, CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c)) - ROM_LOAD("whir_u20.l1", 0x20000, 0x8000, CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("whir_u19.l1", 0x20000, 0x8000, CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("whir_u20.l1", 0x30000, 0x8000, CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(whirl_lg3) @@ -1109,10 +1221,13 @@ ROM_START(whirl_lg3) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("whir_u21.l1", 0x18000, 0x8000, CRC(fa3da322) SHA1(732107eace9eecdb97eff4abb4420a2febef7425)) ROM_LOAD("whir_u22.l1", 0x10000, 0x8000, CRC(fcaf8c4e) SHA1(8e8cab1923a56bcef4671dce28aef1e39303c04a)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("whir_u4.l1", 0x10000, 0x8000, CRC(29952d84) SHA1(26479a341b0552c5f9d9bf9dd013855e51a7b857)) - ROM_LOAD("whir_u19.l1", 0x18000, 0x8000, CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c)) - ROM_LOAD("whir_u20.l1", 0x20000, 0x8000, CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("whir_u19.l1", 0x20000, 0x8000, CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("whir_u20.l1", 0x30000, 0x8000, CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) + ROM_RELOAD(0x38000,0x8000) ROM_END ROM_START(whirl_l2) @@ -1122,10 +1237,13 @@ ROM_START(whirl_l2) ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF) ROM_LOAD("whir_u21.l1", 0x18000, 0x8000, CRC(fa3da322) SHA1(732107eace9eecdb97eff4abb4420a2febef7425)) ROM_LOAD("whir_u22.l1", 0x10000, 0x8000, CRC(fcaf8c4e) SHA1(8e8cab1923a56bcef4671dce28aef1e39303c04a)) - ROM_REGION(0x30000, "bgcpu", ROMREGION_ERASEFF) + ROM_REGION(0x40000, "bgcpu", ROMREGION_ERASEFF) ROM_LOAD("whir_u4.l1", 0x10000, 0x8000, CRC(29952d84) SHA1(26479a341b0552c5f9d9bf9dd013855e51a7b857)) - ROM_LOAD("whir_u19.l1", 0x18000, 0x8000, CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c)) - ROM_LOAD("whir_u20.l1", 0x20000, 0x8000, CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) + ROM_RELOAD(0x18000,0x8000) + ROM_LOAD("whir_u19.l1", 0x20000, 0x8000, CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c)) + ROM_RELOAD(0x28000,0x8000) + ROM_LOAD("whir_u20.l1", 0x30000, 0x8000, CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) + ROM_RELOAD(0x38000,0x8000) ROM_END GAME(1989, bcats_l5, 0, s11b, s11b, s11b_state, init_s11b_invert, ROT0, "Williams", "Bad Cats (L-5)", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/includes/s11b.h b/src/mame/includes/s11b.h index 9630c62531a..9d41388521d 100644 --- a/src/mame/includes/s11b.h +++ b/src/mame/includes/s11b.h @@ -16,7 +16,6 @@ class s11b_state : public s11a_state public: s11b_state(const machine_config &mconfig, device_type type, const char *tag) : s11a_state(mconfig, type, tag) - , m_bg_hc55516(*this, "hc55516_bg") { } void s11b(machine_config &config); @@ -29,9 +28,6 @@ public: void pia2c_pb_w(uint8_t data); void pia34_pa_w(uint8_t data); - void bg_cvsd_clock_set_w(uint8_t data); - void bg_cvsd_digit_clock_clear_w(uint8_t data); - protected: void set_invert(bool inv) { m_invert = inv; } @@ -39,12 +35,8 @@ private: DECLARE_MACHINE_RESET(s11b); void s11b_audio_map(address_map &map); - void s11b_bg_map(address_map &map); void s11b_main_map(address_map &map); - optional_device m_bg_hc55516; - - bool m_invert; // later System 11B games start expecting inverted data to the display LED segments. }; -- cgit v1.2.3 From 413792c4171a4ebdec9c21ac16ff63cf1ad70bd5 Mon Sep 17 00:00:00 2001 From: David Haywood <28625134+DavidHaywood@users.noreply.github.com> Date: Mon, 6 Jul 2020 18:21:06 +0100 Subject: Plug and Play (Wireless Fitness) + some GBA pirate stuff (#6921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * new WORKING machine ---- Wireless Fitness / Dance Fit (Senario) [Sean Riddle, David Haywood, anonymous, Kev (FBN)] * new software list entries ------------- gba.xml: Rayman IV (Rayman - Sunshine of Trip) (unlicensed) (protection hacked) [RibShark] Rayman IV (Rayman - Puteshestviye Solnechnogo Sveta) (unlicensed) (Russian) (protection hacked) [taizou] Leiman IV - Guangming Zhi Lv (unlicensed) (Chinese) (protection hacked) [侵蚀你的私处] Super Mario DX (unlicensed) (protection hacked) [taizou] Chaoji Maliou DX (unlicensed) (Chinese) (protection hacked) [yy小龙虾] Crash Advance IV (unlicensed) (protection hacked) [taizou] Digimon - Ruby and Sapphire (unlicensed) (protection hacked) [taizou] Pokemon - Sapphire Version (unlicensed) (protection hacked) [taizou] Sonic 3 - Fighter Sonic (unlicensed) (protection hacked) [taizou] Teenage Mutant Ninja Turtles 2 (unlicensed) (protection hacked) [taizou] The Lord of the Rings IV - The Fellowship of the Ring (unlicensed) (protection hacked) [taizou] Ultraman - Confrontation Between Justice And Evil (Ul'traman - Konfrontatsiya mezhdu spravedlivost'yu i zlom) (unlicensed) (Russian) (protection hacked) [taizou] X-Man - Armour of Might (X-men) (unlicensed) (Russian) (protection hacked) [taizou] --- hash/gba.xml | 157 ++++++++++++++++++++++++++++++++++++++++++++ src/mame/drivers/spg2xx.cpp | 89 ++++++++++++++++++++++++- src/mame/includes/spg2xx.h | 19 +++++- src/mame/mame.lst | 1 + 4 files changed, 263 insertions(+), 3 deletions(-) diff --git a/hash/gba.xml b/hash/gba.xml index c439ed883cd..dcf26139ef7 100644 --- a/hash/gba.xml +++ b/hash/gba.xml @@ -41517,5 +41517,162 @@ license:CC0 + + + + Rayman IV (Rayman - Sunshine of Trip) (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + Rayman IV (Rayman - Puteshestviye Solnechnogo Sveta) (unlicensed) (Russian) (protection hacked) + 200? + Sintax + + + + + + + + + Leiman IV - Guangming Zhi Lv (unlicensed) (Chinese) (protection hacked) + 200? + Sintax + + + + + + + + + Super Mario DX (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + + Chaoji Maliou DX (unlicensed) (Chinese) (protection hacked) + 200? + Sintax + + + + + + + + Crash Advance IV (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + Digimon - Ruby and Sapphire (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + Pokemon - Sapphire Version (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + Sonic 3 - Fighter Sonic (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + Teenage Mutant Ninja Turtles 2 (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + The Lord of the Rings IV - The Fellowship of the Ring (unlicensed) (protection hacked) + 200? + Sintax + + + + + + + + + Ultraman - Confrontation Between Justice And Evil (Ul'traman - Konfrontatsiya mezhdu spravedlivost'yu i zlom) (unlicensed) (Russian) (protection hacked) + 200? + Sintax + + + + + + + + + X-Man - Armour of Might (X-men) (unlicensed) (Russian) (protection hacked) + 200? + Sintax + + + + + + + diff --git a/src/mame/drivers/spg2xx.cpp b/src/mame/drivers/spg2xx.cpp index 0c94f913a2d..4f88caa7ed9 100644 --- a/src/mame/drivers/spg2xx.cpp +++ b/src/mame/drivers/spg2xx.cpp @@ -845,6 +845,31 @@ static INPUT_PORTS_START( guitarss ) INPUT_PORTS_END + +static INPUT_PORTS_START( senwfit ) + PORT_START("P1") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Select") + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start") + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Weight Left") + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Weight Right") + PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Up-Left") + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Down-Left") + PORT_BIT( 0x1c00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Up-Right") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Down-Right") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START("P2") + PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // unused? + + PORT_START("P3") + PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // unused? +INPUT_PORTS_END + static INPUT_PORTS_START( jjstrip ) PORT_START("P1") // active LOW or HIGH? PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) @@ -1426,7 +1451,7 @@ void spg2xx_game_gssytts_state::portc_w(offs_t offset, uint16_t data, uint16_t m void spg2xx_game_gssytts_state::machine_start() { - m_upperbank->configure_entries(0, 4, memregion("maincpu")->base(), 0x400000); + m_upperbank->configure_entries(0, memregion("maincpu")->bytes()/0x400000, memregion("maincpu")->base(), 0x400000); m_upperbank->set_entry(1); spg2xx_game_state::machine_start(); @@ -1457,6 +1482,61 @@ void spg2xx_game_gssytts_state::gssytts(machine_config &config) } +void spg2xx_game_senwfit_state::portc_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + int bank = 0; + + logerror("%s: portc_w %04x (%04x) %c %c %c %c | %c %c %c %c | %c %c %c %c | %c %c %c %c \n", machine().describe_context(), data, mem_mask, + (mem_mask & 0x8000) ? ((data & 0x8000) ? '1' : '0') : 'x', + (mem_mask & 0x4000) ? ((data & 0x4000) ? '1' : '0') : 'x', + (mem_mask & 0x2000) ? ((data & 0x2000) ? '1' : '0') : 'x', + (mem_mask & 0x1000) ? ((data & 0x1000) ? '1' : '0') : 'x', + (mem_mask & 0x0800) ? ((data & 0x0800) ? '1' : '0') : 'x', + (mem_mask & 0x0400) ? ((data & 0x0400) ? '1' : '0') : 'x', + (mem_mask & 0x0200) ? ((data & 0x0200) ? '1' : '0') : 'x', + (mem_mask & 0x0100) ? ((data & 0x0100) ? '1' : '0') : 'x', + (mem_mask & 0x0080) ? ((data & 0x0080) ? '1' : '0') : 'x', + (mem_mask & 0x0040) ? ((data & 0x0040) ? '1' : '0') : 'x', + (mem_mask & 0x0020) ? ((data & 0x0020) ? '1' : '0') : 'x', + (mem_mask & 0x0010) ? ((data & 0x0010) ? '1' : '0') : 'x', + (mem_mask & 0x0008) ? ((data & 0x0008) ? '1' : '0') : 'x', + (mem_mask & 0x0004) ? ((data & 0x0004) ? '1' : '0') : 'x', + (mem_mask & 0x0002) ? ((data & 0x0002) ? '1' : '0') : 'x', + (mem_mask & 0x0001) ? ((data & 0x0001) ? '1' : '0') : 'x'); + + if (mem_mask & 1) + if (data & 1) + bank |= 1; + + if (mem_mask & 2) + if (data & 2) + bank |= 2; + + if (mem_mask & 4) + if (data & 4) + bank |= 4; + + m_upperbank->set_entry(bank); + m_maincpu->invalidate_cache(); +} + + +void spg2xx_game_senwfit_state::init_senwfit() +{ + uint8_t *src = memregion("maincpu")->base(); + int len = memregion("maincpu")->bytes(); + + std::vector buffer(len); + + for (int i = 0; i < len; i++) + { + int newaddr = bitswap<25>(i, 24,23,22,20,9,19,18,21,17,16,15,14,13,12,11,10,8,7,6,5,4,3,2,1,0); + buffer[i] = src[newaddr]; + } + std::copy(buffer.begin(), buffer.end(), &src[0]); + +} + void spg2xx_game_state::rad_skatp(machine_config &config) { rad_skat(config); @@ -1584,7 +1664,10 @@ ROM_START( gssytts ) ROM_CONTINUE(0x800000, 0x800000) // 2nd 8mb ROM_END - +ROM_START( senwfit ) + ROM_REGION( 0x2000000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "wirelessfit.bin", 0x000000, 0x2000000, CRC(bfdc9c56) SHA1(dd0d4262720fcc3fab5b66d39df9be3419b07178) ) +ROM_END ROM_START( jjstrip ) @@ -1720,6 +1803,8 @@ CONS( 200?, guitarssa, guitarss, 0, spg2xx, guitarss, spg2xx_game_state, // The sequel has 'You Take The Stage' on both the box and title screen CONS( 2009, gssytts, 0, 0, gssytts, guitarss, spg2xx_game_gssytts_state, empty_init, "Senario", "Guitar Super Star: You Take The Stage", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2009, senwfit, 0, 0, gssytts, senwfit, spg2xx_game_senwfit_state, init_senwfit, "Senario", "Wireless Fitness / Dance Fit (Senario)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) + // VTech "TV Station" / "TV Learning Station" / "Nitro Vision" CONS( 2006, vtechtvssp, 0, 0, spg2xx, spg2xx, spg2xx_game_state, empty_init, "VTech", "TV Station (VTech, Spain)", MACHINE_NOT_WORKING ) CONS( 2006, vtechtvsgr, 0, 0, spg2xx, spg2xx, spg2xx_game_state, empty_init, "VTech", "TV Learning Station (VTech, Germany)", MACHINE_NOT_WORKING ) diff --git a/src/mame/includes/spg2xx.h b/src/mame/includes/spg2xx.h index 43d9477952f..9f4f562e6fd 100644 --- a/src/mame/includes/spg2xx.h +++ b/src/mame/includes/spg2xx.h @@ -220,12 +220,29 @@ protected: virtual void portc_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; -private: required_memory_bank m_upperbank; +private: + void mem_map_upperbank(address_map& map); }; +class spg2xx_game_senwfit_state : public spg2xx_game_gssytts_state +{ +public: + spg2xx_game_senwfit_state(const machine_config &mconfig, device_type type, const char *tag) : + spg2xx_game_gssytts_state(mconfig, type, tag) + { } + + void init_senwfit(); +protected: + + virtual void portc_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + +private: +}; + + class spg2xx_game_senspeed_state : public spg2xx_game_state { public: diff --git a/src/mame/mame.lst b/src/mame/mame.lst index d5da00f4a7f..1625fa968bc 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -37565,6 +37565,7 @@ guitarss guitarssa tmntbftc gssytts +senwfit jjstrip vtechtvssp // (c) 2006 VTech vtechtvsgr // (c) 2006 VTech -- cgit v1.2.3 From afcf3a059cd3cb33f51f3817e471098a716608ef Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Mon, 6 Jul 2020 13:27:30 -0400 Subject: Minor System 11 Audio notes updates/fixes, --- src/mame/audio/s11c_bg.cpp | 10 ++++++---- src/mame/drivers/s11b.cpp | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp index 1036b04b9f3..2346f4305de 100644 --- a/src/mame/audio/s11c_bg.cpp +++ b/src/mame/audio/s11c_bg.cpp @@ -2,8 +2,9 @@ // copyright-holders:Barry Rodewald /* * s11c_bg.cpp - Williams D-11581 "Audio Board" (M68B09E + YM2151 + HC55516 + DAC) - * Used by Williams System 11A (F-14), all System 11V (except Jokerz) and all System 11C pinballs + * Used by Williams System 11A (F-14), all System 11B (except Jokerz) and all System 11C pinballs * Used by Midway Y-Unit Arcade Hardware (for Smash TV and High Impact Football) + * Used by the prototype version of Funhouse pinball for the WPC Alphanumeric system * * The mixing resistors before the MC1458 differ between the D-11581, D-11581-20xx (System 11C), and D-1129x board schematics: * D-1129x D-11581 D-11581-20xx @@ -83,7 +84,8 @@ * [1] Logically there should be a capacitor to ground at c1 of value 1800uf, * but this was omitted on the D-11297 board, possibly in error, and this * omission carried over to future sound boards including all versions of the D-11581. - * The WPC-AN sound board, A-12738-50xxx, fixed this by completely redesigning the filters for both the ym2151 and cvsd. + * The WPC-AN sound board, A-12738-50xxx, fixed this by completely redesigning the filters + * for both the ym2151 and cvsd. * * This circuit would be a 4th order (cascaded 2nd order) op-amp multifeedback lowpass filter, * but because of the capacitor omitted, it is actually a first order-with-gain lowpass, @@ -113,11 +115,11 @@ * W4 : if present, the VCC/+5v rail is shorted to the +12v rail. (This is used in the case where the board is only run on +5v and -12v instead of +5v, +12v, and -12v) * W5 - exclusive w/W6, W7 : YM2151 reset comes from Board Reset * W6 -'exclusive'w/W5, W7 : YM2151 reset comes from PIA CB2/J4 P12 (internal or external) - + * Williams "BG Sound Board" C-11029/C-11030 5766-10929-00 - * * used on Williams System 11 'High Speed' and 'Grand Lizard' only + * * used on Williams System 11 'High Speed' and 'Grand Lizard' only (as well as the "Wreck'n Ball" prototype, see https://www.ipdb.org/machine.cgi?id=6167 ) * * has DAC only * * no EPROM banking hardware, 1 28-pin ROM socket (2764/27128/27256 only) * * PIA CA1 and CA2 are labeled 'HAND1' and 'HAND2' on schematics and are tied high/unused. diff --git a/src/mame/drivers/s11b.cpp b/src/mame/drivers/s11b.cpp index 2f1c3128382..47cd2c23805 100644 --- a/src/mame/drivers/s11b.cpp +++ b/src/mame/drivers/s11b.cpp @@ -15,11 +15,11 @@ transfers to 0000 (where no valid code exists). - Black Knight 2000 LG-1 set reports U26 ROM FAILURE. Bad/hacked dump or original bug? - Jokerz has an entirely different "Pin Sound '88" stereo audio board (D-12338-567) which has to be emulated - - Taxi and Police Force both have issues with the display showing garbage overlaid by the alphanumerics. + - Taxi and Police Force both have issues with the display showing garbage overlaid by the alphanumerics. Known keys necessary to get games to start (so the proper number of balls are detected): (Hold these keys and press "1" after inserting 1 or more credits.) - Almost universally, these will be listed in the switch matrix as "Ball Trough Right" "Ball Trough Center" and "Ball Shooter" + Almost universally, these will be listed in the switch matrix as "Ball Trough Right" "Ball Trough Center" and "Ball Shooter" - Bad Cats: "H" "Enter" - Banzai Run: "S" "D" "F" (won't start due to calibration? needs more investigation, try hitting E and / and lots of keys until calibration finishes); - starts music - Big Guns: "D" "F" "U" -- cgit v1.2.3 From e761179a3d60ca9b31e2dad52ea66f93f9d4a6b9 Mon Sep 17 00:00:00 2001 From: cam900 Date: Tue, 7 Jul 2020 21:21:57 +0900 Subject: cave.cpp: Use gfxdecode for sprite decoding (#6920) Use generic gfx layout for 4bpp tilemap, Reduce duplicates, Unnecessary values --- src/mame/drivers/cave.cpp | 372 ++++++++++++++++++++++++---------------------- src/mame/includes/cave.h | 11 +- src/mame/video/cave.cpp | 36 ++--- 3 files changed, 215 insertions(+), 204 deletions(-) diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp index 646445cc771..fd30f06e933 100644 --- a/src/mame/drivers/cave.cpp +++ b/src/mame/drivers/cave.cpp @@ -1220,7 +1220,7 @@ template void cave_state::z80_rombank_w(u8 data) { if (data & ~Mask) - logerror("%s: Bank %02X\n", machine().describe_context(), data); + logerror("%s: Z80 Bank %02X\n", machine().describe_context(), data); m_z80bank->set_entry(data & Mask); } @@ -1741,19 +1741,7 @@ INPUT_PORTS_END // 6bpp tiles are accessible only 0x400 colors -/* 8x8x4 tiles */ -static const gfx_layout layout_8x8x4 = -{ - 8,8, - RGN_FRAC(1,1), - 4, - {STEP4(0,1)}, - {STEP8(0,4)}, - {STEP8(0,4*8)}, - 8*8*4 -}; - -/* 8x8x6 tiles (in a 8x8x8 layout) */ +// 8x8x6 tiles (in a 8x8x8 layout) static const gfx_layout layout_8x8x6 = { 8,8, @@ -1765,8 +1753,8 @@ static const gfx_layout layout_8x8x6 = 8*8*8 }; -/* 8x8x6 tiles (4 bits in one rom, 2 bits in the other, - unpacked in 2 pages of 4 bits) */ +// 8x8x6 tiles (4 bits in one rom, 2 bits in the other, +// unpacked in 2 pages of 4 bits) static const gfx_layout layout_8x8x6_2 = { 8,8, @@ -1778,7 +1766,7 @@ static const gfx_layout layout_8x8x6_2 = 8*8*4 }; -/* 8x8x8 tiles */ +// 8x8x8 tiles static const gfx_layout layout_8x8x8 = { 8,8, @@ -1790,39 +1778,68 @@ static const gfx_layout layout_8x8x8 = 8*8*8 }; -#if 0 -/* 16x16x8 Zooming Sprites - No need to decode them */ +// 16~x16~x4 Zooming Sprites - decode each 16 pixel lines static const gfx_layout layout_sprites = { - 16,16, + 16,1, + RGN_FRAC(1,1), + 4, + {STEP4(0,1)}, + {1*4,0*4,3*4,2*4,5*4,4*4,7*4,6*4,9*4,8*4,11*4,10*4,13*4,12*4,15*4,14*4}, + {0}, + 16*4 +}; + +// 16~x16~x4 Non-zooming Sprites - decode each 16 pixel lines +static const gfx_layout layout_sprites_msb = +{ + 16,1, + RGN_FRAC(1,1), + 4, + {STEP4(0,1)}, + {STEP16(0,4)}, + {0}, + 16*4 +}; + +// esprade, guwange uses 8bpp sprites instead 4bpp +static const gfx_layout layout_sprites_8bpp = +{ + 16,1, RGN_FRAC(1,1), 8, - {STEP8(0,1)}, - {STEP16(0,8)}, - {STEP16(0,16*8)}, - 16*16*8 + {STEP4(0,1), STEP4(4*4,1)}, + {STEP4(4*4*2*0+3*4,-4),STEP4(4*4*2*1+3*4,-4),STEP4(4*4*2*2+3*4,-4),STEP4(4*4*2*3+3*4,-4)}, + {0}, + 16*8 }; -#endif + +static GFXDECODE_START( gfx_common_spr ) + GFXDECODE_ENTRY( "sprites0", 0, layout_sprites, 0x0000, 0x40 ) +GFXDECODE_END /*************************************************************************** Dangun Feveron ***************************************************************************/ static GFXDECODE_START( gfx_dfeveron ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0400, 0x40 ) // [0] Layer 0 - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x4, 0x0400, 0x40 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0400, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_packed_msb, 0x0400, 0x40 ) // [1] Layer 1 GFXDECODE_END /*************************************************************************** Dodonpachi ***************************************************************************/ +// different gfx layout +static GFXDECODE_START( gfx_ddonpach_spr ) + GFXDECODE_ENTRY( "sprites0", 0, layout_sprites_msb, 0x0000, 0x40 ) +GFXDECODE_END + static GFXDECODE_START( gfx_ddonpach ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x4000, 0x40 ) // [0] Layer 0 - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x4, 0x4000, 0x40 ) // [1] Layer 1 - GFXDECODE_ENTRY( "layer2", 0, layout_8x8x8, 0x4000, 0x40 ) // [2] Layer 2 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x4000, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_packed_msb, 0x4000, 0x40 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer2", 0, layout_8x8x8, 0x4000, 0x40 ) // [2] Layer 2 GFXDECODE_END /*************************************************************************** @@ -1830,18 +1847,20 @@ GFXDECODE_END ***************************************************************************/ static GFXDECODE_START( gfx_donpachi ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0400, 0x40 ) // [0] Layer 0 - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x4, 0x0400, 0x40 ) // [1] Layer 1 - GFXDECODE_ENTRY( "layer2", 0, layout_8x8x4, 0x0400, 0x40 ) // [2] Layer 2 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0400, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_packed_msb, 0x0400, 0x40 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer2", 0, gfx_8x8x4_packed_msb, 0x0400, 0x40 ) // [2] Layer 2 GFXDECODE_END /*************************************************************************** Esprade ***************************************************************************/ +static GFXDECODE_START( gfx_esprade_spr ) + GFXDECODE_ENTRY( "sprites0", 0, layout_sprites_8bpp, 0x0000, 0x40 ) +GFXDECODE_END + static GFXDECODE_START( gfx_esprade ) -// "sprites" GFXDECODE_ENTRY( "layer0", 0, layout_8x8x8, 0x4000, 0x40 ) // [0] Layer 0 GFXDECODE_ENTRY( "layer1", 0, layout_8x8x8, 0x4000, 0x40 ) // [1] Layer 1 GFXDECODE_ENTRY( "layer2", 0, layout_8x8x8, 0x4000, 0x40 ) // [2] Layer 2 @@ -1852,19 +1871,22 @@ GFXDECODE_END ***************************************************************************/ static GFXDECODE_START( gfx_hotdogst ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0000, 0x40 ) // [0] Layer 0 - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x4, 0x0000, 0x40 ) // [1] Layer 1 - GFXDECODE_ENTRY( "layer2", 0, layout_8x8x4, 0x0000, 0x40 ) // [2] Layer 2 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0000, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_packed_msb, 0x0000, 0x40 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer2", 0, gfx_8x8x4_packed_msb, 0x0000, 0x40 ) // [2] Layer 2 GFXDECODE_END /*************************************************************************** Koro Koro Quest ***************************************************************************/ +// different sprite base palette +static GFXDECODE_START( gfx_korokoro_spr ) + GFXDECODE_ENTRY( "sprites0", 0, layout_sprites, 0x3c00, 0x40 ) +GFXDECODE_END + static GFXDECODE_START( gfx_korokoro ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0400, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0400, 0x40 ) // [0] Layer 0 GFXDECODE_END /*************************************************************************** @@ -1872,9 +1894,8 @@ GFXDECODE_END ***************************************************************************/ static GFXDECODE_START( gfx_mazinger ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0000, 0x40 ) // [0] Layer 0 - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x6, 0x0400, 0x10 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0000, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer1", 0, layout_8x8x6, 0x0400, 0x10 ) // [1] Layer 1 GFXDECODE_END /*************************************************************************** @@ -1882,27 +1903,39 @@ GFXDECODE_END ***************************************************************************/ static GFXDECODE_START( gfx_ppsatan_0 ) - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0000, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0000, 0x40 ) // [0] Layer 0 +GFXDECODE_END + +static GFXDECODE_START( gfx_ppsatan_spr_1 ) + GFXDECODE_ENTRY( "sprites1", 0, layout_sprites, 0x3c00, 0x40 ) GFXDECODE_END static GFXDECODE_START( gfx_ppsatan_1 ) - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x4, 0x0000, 0x40 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_packed_msb, 0x0000, 0x40 ) // [1] Layer 1 +GFXDECODE_END + +static GFXDECODE_START( gfx_ppsatan_spr_2 ) + GFXDECODE_ENTRY( "sprites2", 0, layout_sprites, 0x3c00, 0x40 ) GFXDECODE_END static GFXDECODE_START( gfx_ppsatan_2 ) - GFXDECODE_ENTRY( "layer2", 0, layout_8x8x4, 0x0000, 0x40 ) // [2] Layer 2 + GFXDECODE_ENTRY( "layer2", 0, gfx_8x8x4_packed_msb, 0x0000, 0x40 ) // [2] Layer 2 GFXDECODE_END /*************************************************************************** Power Instinct 2 ***************************************************************************/ +// expanded sprite color space +static GFXDECODE_START( gfx_pwrinst2_spr ) + GFXDECODE_ENTRY( "sprites0", 0, layout_sprites_msb, 0x0000, 0x80 ) +GFXDECODE_END + static GFXDECODE_START( gfx_pwrinst2 ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0800, 0x40 ) // [0] Layer 0 - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x4, 0x1000, 0x40 ) // [1] Layer 1 - GFXDECODE_ENTRY( "layer2", 0, layout_8x8x4, 0x1800, 0x40 ) // [2] Layer 2 - GFXDECODE_ENTRY( "layer3", 0, layout_8x8x4, 0x2000, 0x40 ) // [3] Layer 3 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0800, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_packed_msb, 0x1000, 0x40 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer2", 0, gfx_8x8x4_packed_msb, 0x1800, 0x40 ) // [2] Layer 2 + GFXDECODE_ENTRY( "layer3", 0, gfx_8x8x4_packed_msb, 0x2000, 0x40 ) // [3] Layer 3 GFXDECODE_END @@ -1911,10 +1944,9 @@ GFXDECODE_END ***************************************************************************/ static GFXDECODE_START( gfx_sailormn ) -// "sprites" - GFXDECODE_ENTRY( "layer0", 0, layout_8x8x4, 0x0400, 0x40 ) // [0] Layer 0 - GFXDECODE_ENTRY( "layer1", 0, layout_8x8x4, 0x0800, 0x40 ) // [1] Layer 1 - GFXDECODE_ENTRY( "layer2", 0, layout_8x8x6_2, 0x0c00, 0x10 ) // [2] Layer 2 + GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x0400, 0x40 ) // [0] Layer 0 + GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_packed_msb, 0x0800, 0x40 ) // [1] Layer 1 + GFXDECODE_ENTRY( "layer2", 0, layout_8x8x6_2, 0x0c00, 0x10 ) // [2] Layer 2 GFXDECODE_END @@ -1923,7 +1955,6 @@ GFXDECODE_END ***************************************************************************/ static GFXDECODE_START( gfx_uopoko ) -// "sprites" GFXDECODE_ENTRY( "layer0", 0, layout_8x8x8, 0x4000, 0x40 ) // [0] Layer 0 GFXDECODE_END @@ -1981,6 +2012,8 @@ void cave_state::add_base_config(machine_config &config, int layer) PALETTE(config, m_palette[0], palette_device::BLACK).set_format(palette_device::xGRB_555, 0x8000); + GFXDECODE(config, m_spr_gfxdecode[0], m_palette[0], gfx_common_spr); + for (int i = 0; i < layer; i++) { TMAP038(config, m_tilemap[i]); @@ -2037,6 +2070,7 @@ void cave_state::ddonpach(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); /* video hardware */ + m_spr_gfxdecode[0]->set_info(gfx_ddonpach_spr); GFXDECODE(config, m_gfxdecode[0], m_palette[0], gfx_ddonpach); MCFG_VIDEO_START_OVERRIDE(cave_state,spr_8bpp) @@ -2060,6 +2094,7 @@ void cave_state::donpachi(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); /* video hardware */ + m_spr_gfxdecode[0]->set_info(gfx_ddonpach_spr); GFXDECODE(config, m_gfxdecode[0], m_palette[0], gfx_donpachi); m_palette[0]->set_entries(0x1000/2); @@ -2095,6 +2130,7 @@ void cave_state::esprade(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); /* video hardware */ + m_spr_gfxdecode[0]->set_info(gfx_esprade_spr); GFXDECODE(config, m_gfxdecode[0], m_palette[0], gfx_esprade); MCFG_VIDEO_START_OVERRIDE(cave_state,spr_8bpp) @@ -2143,6 +2179,7 @@ void cave_state::guwange(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); /* video hardware */ + m_spr_gfxdecode[0]->set_info(gfx_esprade_spr); GFXDECODE(config, m_gfxdecode[0], m_palette[0], gfx_esprade); MCFG_VIDEO_START_OVERRIDE(cave_state,spr_8bpp) @@ -2213,10 +2250,11 @@ void cave_state::korokoro(machine_config &config) /* video hardware */ m_screen[0]->set_visarea(0, 320-1-2, 0, 240-1-1); + m_spr_gfxdecode[0]->set_info(gfx_korokoro_spr); GFXDECODE(config, m_gfxdecode[0], m_palette[0], gfx_korokoro); m_palette[0]->set_entries(0x8000/2); - MCFG_VIDEO_START_OVERRIDE(cave_state,korokoro) + MCFG_VIDEO_START_OVERRIDE(cave_state,spr_4bpp) /* sound hardware */ add_ymz(config); @@ -2412,6 +2450,9 @@ void cave_state::ppsatan(machine_config &config) m_screen[2]->set_screen_update(FUNC(cave_state::screen_update_ppsatan_right)); TIMER(config, "int_timer_right").configure_generic(FUNC(cave_state::vblank_start_right)); + m_spr_gfxdecode[0]->set_info(gfx_korokoro_spr); + GFXDECODE(config, m_spr_gfxdecode[1], m_palette[1], gfx_ppsatan_spr_1); + GFXDECODE(config, m_spr_gfxdecode[2], m_palette[2], gfx_ppsatan_spr_2); GFXDECODE(config, m_gfxdecode[0], m_palette[0], gfx_ppsatan_0); GFXDECODE(config, m_gfxdecode[1], m_palette[1], gfx_ppsatan_1); GFXDECODE(config, m_gfxdecode[2], m_palette[2], gfx_ppsatan_2); @@ -2467,6 +2508,7 @@ void cave_state::pwrinst2(machine_config &config) m_screen[0]->set_size(0x200, 240); m_screen[0]->set_visarea(0x70, 0x70 + 0x140-1, 0, 240-1); + m_spr_gfxdecode[0]->set_info(gfx_pwrinst2_spr); GFXDECODE(config, m_gfxdecode[0], m_palette[0], gfx_pwrinst2); m_palette[0]->set_entries(0x5000/2); @@ -2674,57 +2716,35 @@ void cave_state::uopoko(machine_config &config) ***************************************************************************/ -/* 4 bits -> 8 bits. Even and odd pixels are swapped */ void cave_state::unpack_sprites(int chip) { - const u32 len = m_spriteregion[chip]->bytes(); - u8 *rgn = m_spriteregion[chip]->base(); - u8 *src = rgn + len / 2 - 1; - u8 *dst = rgn + len - 1; - - while (dst > src) + gfx_element *gfx = m_spr_gfxdecode[chip]->gfx(0); + m_sprite_gfx_mask[chip] = 1; + const u32 needed = gfx->elements() * gfx->height() * gfx->width(); + while (m_sprite_gfx_mask[chip] < needed) { - const u8 data = *src--; - /* swap even and odd pixels */ - *dst-- = data >> 4; *dst-- = data & 0xF; + m_sprite_gfx_mask[chip] <<= 1; } -} - - -/* 4 bits -> 8 bits. Even and odd pixels are not swapped */ -void cave_state::ddp_unpack_sprites(int chip) -{ - const u32 len = m_spriteregion[chip]->bytes(); - u8 *rgn = m_spriteregion[chip]->base(); - u8 *src = rgn + len / 2 - 1; - u8 *dst = rgn + len - 1; + m_sprite_gfx[chip] = make_unique_clear(m_sprite_gfx_mask[chip]); - while (dst > src) + u8 *dst = m_sprite_gfx[chip].get(); + for (int e = 0; e < gfx->elements(); e++) { - const u8 data = *src--; - *dst-- = data & 0xf; *dst-- = data >> 4; + const u8 *data = gfx->get_data(e); + for (int y = 0; y < gfx->height(); y++) + { + const u8 *datatmp = data; + for (int x = 0; x < gfx->width(); x++) + { + *dst++ = *datatmp++; + } + data += gfx->rowbytes(); + } } + m_sprite_gfx_mask[chip]--; } -/* 2 pages of 4 bits -> 8 bits */ -void cave_state::esprade_unpack_sprites(int chip) -{ - u8 *src = m_spriteregion[chip]->base(); - u8 *dst = src + m_spriteregion[chip]->bytes(); - - while (src < dst) - { - const u8 data1 = src[0]; - const u8 data2 = src[1]; - - src[0] = ((data1 & 0x0f) << 4) + (data2 & 0x0f); - src[1] = (data1 & 0xf0) + ((data2 & 0xf0) >> 4); - - src += 2; - } -} - /*************************************************************************** Air Gallet @@ -2771,7 +2791,7 @@ BP962A.U77 23C16000 GFX ROM_REGION( 0x80000, "audiocpu", 0 ) \ ROM_LOAD( "bp962a.u9", 0x00000, 0x80000, CRC(06caddbe) SHA1(6a3cc50558ba19a31b21b7f3ec6c6e2846244ff1) ) \ \ - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) \ + ROM_REGION( 0x400000, "sprites0", 0 ) \ ROM_LOAD( "bp962a.u76", 0x000000, 0x200000, CRC(858da439) SHA1(33a3d2a3ec3fa3364b00e1e43b405e5030a5b2a3) ) \ ROM_LOAD( "bp962a.u77", 0x200000, 0x200000, CRC(ea2ba35e) SHA1(72487f21d44fe7be9a98068ce7f57a43c132945f) ) \ \ @@ -2908,7 +2928,7 @@ ROM_START( dfeveron ) ROM_LOAD16_BYTE( "cv01-u34.bin", 0x000000, 0x080000, CRC(be87f19d) SHA1(595239245df3835cdf5a99a6c62480465558d8d3) ) ROM_LOAD16_BYTE( "cv01-u33.bin", 0x000001, 0x080000, CRC(e53a7db3) SHA1(ddced29f78dc3cc89038757b6577ba2ba0d8b041) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "cv01-u25.bin", 0x000000, 0x400000, CRC(a6f6a95d) SHA1(e1eb45cb5d0e6163edfd9d830633b913fb53c6ca) ) ROM_LOAD( "cv01-u26.bin", 0x400000, 0x400000, CRC(32edb62a) SHA1(3def74e1316b80cc25a8c3ac162cd7bcb8cc807c) ) @@ -3014,7 +3034,7 @@ ROM_START( feversos ) ROM_LOAD16_BYTE( "cv01-u34.sos", 0x000000, 0x080000, CRC(24ef3ce6) SHA1(42799eebbb2686a837b8972aec684143deadca59) ) ROM_LOAD16_BYTE( "cv01-u33.sos", 0x000001, 0x080000, CRC(64ff73fd) SHA1(7fc3a8469cec2361d373a4dac4a547c13ca5f709) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "cv01-u25.bin", 0x000000, 0x400000, CRC(a6f6a95d) SHA1(e1eb45cb5d0e6163edfd9d830633b913fb53c6ca) ) ROM_LOAD( "cv01-u26.bin", 0x400000, 0x400000, CRC(32edb62a) SHA1(3def74e1316b80cc25a8c3ac162cd7bcb8cc807c) ) @@ -3049,7 +3069,7 @@ ROM_START( ddonpach ) ROM_LOAD16_BYTE( "b1.u27", 0x000000, 0x080000, CRC(b5cdc8d3) SHA1(58757b50e21a27e500a82c03f62cf02a85389926) ) ROM_LOAD16_BYTE( "b2.u26", 0x000001, 0x080000, CRC(6bbb063a) SHA1(e5de64b9c3efc0a38a2e0e16b78ee393bff63558) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "u50.bin", 0x000000, 0x200000, CRC(14b260ec) SHA1(33bda210302428d5500115d0c7a839cdfcb67d17) ) ROM_LOAD16_WORD_SWAP( "u51.bin", 0x200000, 0x200000, CRC(e7ba8cce) SHA1(ad74a6b7d53760b19587c4a6dbea937daa7e87ce) ) ROM_LOAD16_WORD_SWAP( "u52.bin", 0x400000, 0x200000, CRC(02492ee0) SHA1(64d9cc64a4ad189a8b03cf6a749ddb732b4a0014) ) @@ -3078,7 +3098,7 @@ ROM_START( ddonpachj ) ROM_LOAD16_BYTE( "u27.bin", 0x000000, 0x080000, CRC(2432ff9b) SHA1(fbc826c30553f6553ead40b312b73c049e8f4bf6) ) ROM_LOAD16_BYTE( "u26.bin", 0x000001, 0x080000, CRC(4f3a914a) SHA1(ae98eba049f1462aa1145f6959b9f9a32c97278f) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "u50.bin", 0x000000, 0x200000, CRC(14b260ec) SHA1(33bda210302428d5500115d0c7a839cdfcb67d17) ) ROM_LOAD16_WORD_SWAP( "u51.bin", 0x200000, 0x200000, CRC(e7ba8cce) SHA1(ad74a6b7d53760b19587c4a6dbea937daa7e87ce) ) ROM_LOAD16_WORD_SWAP( "u52.bin", 0x400000, 0x200000, CRC(02492ee0) SHA1(64d9cc64a4ad189a8b03cf6a749ddb732b4a0014) ) @@ -3107,7 +3127,7 @@ ROM_START( ddonpacha ) ROM_LOAD16_BYTE( "arrange_u27.bin", 0x000000, 0x080000, CRC(44b899ae) SHA1(798ec437d861b94fcd90c99a7015dd420887c788) ) ROM_LOAD16_BYTE( "arrange_u26.bin", 0x000001, 0x080000, CRC(727a09a8) SHA1(91876386855f19e8a3d8d1df71dfe9b3d98e9ea9) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "u50.bin", 0x000000, 0x200000, CRC(14b260ec) SHA1(33bda210302428d5500115d0c7a839cdfcb67d17) ) ROM_LOAD16_WORD_SWAP( "arrange_u51.bin", 0x200000, 0x200000, CRC(0f3e5148) SHA1(3016f4d075940feae691389606cd2aa7ac53849e) ) ROM_LOAD16_WORD_SWAP( "u52.bin", 0x400000, 0x200000, CRC(02492ee0) SHA1(64d9cc64a4ad189a8b03cf6a749ddb732b4a0014) ) @@ -3173,7 +3193,7 @@ ROM_START( donpachi ) ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "prgu.u29", 0x00000, 0x80000, CRC(89c36802) SHA1(7857c726cecca5a4fce282e0d2b873774d2c1b1d) ) - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "atdp.u44", 0x000000, 0x200000, CRC(7189e953) SHA1(53adbe6ea5e01ecb48575e9db82cc3d0dc8a3726) ) ROM_LOAD16_WORD_SWAP( "atdp.u45", 0x200000, 0x200000, CRC(6984173f) SHA1(625dd6674adeb206815855b8b6a1fba79ed5c4cd) ) @@ -3206,7 +3226,7 @@ ROM_START( donpachij ) ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "prg.u29", 0x00000, 0x80000, CRC(6be14af6) SHA1(5b1158071f160efeded816ae4c4edca1d00d6e05) ) - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "atdp.u44", 0x000000, 0x200000, CRC(7189e953) SHA1(53adbe6ea5e01ecb48575e9db82cc3d0dc8a3726) ) ROM_LOAD16_WORD_SWAP( "atdp.u45", 0x200000, 0x200000, CRC(6984173f) SHA1(625dd6674adeb206815855b8b6a1fba79ed5c4cd) ) @@ -3239,7 +3259,7 @@ ROM_START( donpachikr ) ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "prgk.u26", 0x00000, 0x80000, CRC(bbaf4c8b) SHA1(0f9d42c8c4c5b69e3d39bf768bc4b663f66b4f36) ) - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "atdp.u44", 0x000000, 0x200000, CRC(7189e953) SHA1(53adbe6ea5e01ecb48575e9db82cc3d0dc8a3726) ) ROM_LOAD16_WORD_SWAP( "atdp.u45", 0x200000, 0x200000, CRC(6984173f) SHA1(625dd6674adeb206815855b8b6a1fba79ed5c4cd) ) @@ -3272,7 +3292,7 @@ ROM_START( donpachihk ) ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "37.u29", 0x00000, 0x80000, CRC(71f39f30) SHA1(08a028208f21c073d450a29061604f27775786a8) ) - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "atdp.u44", 0x000000, 0x200000, CRC(7189e953) SHA1(53adbe6ea5e01ecb48575e9db82cc3d0dc8a3726) ) ROM_LOAD16_WORD_SWAP( "atdp.u45", 0x200000, 0x200000, CRC(6984173f) SHA1(625dd6674adeb206815855b8b6a1fba79ed5c4cd) ) @@ -3313,7 +3333,7 @@ ROM_START( donpachijs ) ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "prg.u29", 0x00000, 0x80000, CRC(810dbd42) SHA1(703a5aec90b595a1c5a679ab165643119ba6b2f3) ) - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_WORD_SWAP( "atdp.u44", 0x000000, 0x200000, CRC(7189e953) SHA1(53adbe6ea5e01ecb48575e9db82cc3d0dc8a3726) ) ROM_LOAD16_WORD_SWAP( "atdp.u45", 0x200000, 0x200000, CRC(6984173f) SHA1(625dd6674adeb206815855b8b6a1fba79ed5c4cd) ) @@ -3357,10 +3377,10 @@ ROM_START( esprade ) ROM_LOAD16_BYTE( "u41.int", 0x000001, 0x080000, CRC(97c1b649) SHA1(37a56b7b9662219a356aee3f4b5cbb774ac4950e) ) ROM_REGION( 0x1000000, "sprites0", 0 ) /* Sprites */ - ROM_LOAD16_BYTE( "esp_u63.u63", 0x000000, 0x400000, CRC(2f2fe92c) SHA1(9519e365248bcec8419786eabb16fe4aae299af5) ) - ROM_LOAD16_BYTE( "esp_u64.u64", 0x000001, 0x400000, CRC(491a3da4) SHA1(53549a2bd3edc7b5e73fb46e1421b156bb0c190f) ) - ROM_LOAD16_BYTE( "esp_u65.u65", 0x800000, 0x400000, CRC(06563efe) SHA1(94e72da1f542b4e0525b4b43994242816b43dbdc) ) - ROM_LOAD16_BYTE( "esp_u66.u66", 0x800001, 0x400000, CRC(7bbe4cfc) SHA1(e77d0ed7a11b5abca1df8a0eb20ac9360cf79e76) ) + ROM_LOAD32_WORD_SWAP( "esp_u63.u63", 0x000000, 0x400000, CRC(2f2fe92c) SHA1(9519e365248bcec8419786eabb16fe4aae299af5) ) + ROM_LOAD32_WORD_SWAP( "esp_u64.u64", 0x000002, 0x400000, CRC(491a3da4) SHA1(53549a2bd3edc7b5e73fb46e1421b156bb0c190f) ) + ROM_LOAD32_WORD_SWAP( "esp_u65.u65", 0x800000, 0x400000, CRC(06563efe) SHA1(94e72da1f542b4e0525b4b43994242816b43dbdc) ) + ROM_LOAD32_WORD_SWAP( "esp_u66.u66", 0x800002, 0x400000, CRC(7bbe4cfc) SHA1(e77d0ed7a11b5abca1df8a0eb20ac9360cf79e76) ) ROM_REGION( 0x800000, "layer0", 0 ) /* Layer 0 */ ROM_LOAD( "esp_u54.u54", 0x000000, 0x400000, CRC(e7ca6936) SHA1(b7f5ab67071a1d9dd3d2c1cd2304d9cdad68850c) ) @@ -3386,10 +3406,10 @@ ROM_START( espradej ) ROM_LOAD16_BYTE( "u41_ver.2", 0x000001, 0x080000, CRC(734b3ef0) SHA1(f584227b85c347d62d5f179445011ce0f607bcfd) ) ROM_REGION( 0x1000000, "sprites0", 0 ) /* Sprites */ - ROM_LOAD16_BYTE( "esp_u63.u63", 0x000000, 0x400000, CRC(2f2fe92c) SHA1(9519e365248bcec8419786eabb16fe4aae299af5) ) - ROM_LOAD16_BYTE( "esp_u64.u64", 0x000001, 0x400000, CRC(491a3da4) SHA1(53549a2bd3edc7b5e73fb46e1421b156bb0c190f) ) - ROM_LOAD16_BYTE( "esp_u65.u65", 0x800000, 0x400000, CRC(06563efe) SHA1(94e72da1f542b4e0525b4b43994242816b43dbdc) ) - ROM_LOAD16_BYTE( "esp_u66.u66", 0x800001, 0x400000, CRC(7bbe4cfc) SHA1(e77d0ed7a11b5abca1df8a0eb20ac9360cf79e76) ) + ROM_LOAD32_WORD_SWAP( "esp_u63.u63", 0x000000, 0x400000, CRC(2f2fe92c) SHA1(9519e365248bcec8419786eabb16fe4aae299af5) ) + ROM_LOAD32_WORD_SWAP( "esp_u64.u64", 0x000002, 0x400000, CRC(491a3da4) SHA1(53549a2bd3edc7b5e73fb46e1421b156bb0c190f) ) + ROM_LOAD32_WORD_SWAP( "esp_u65.u65", 0x800000, 0x400000, CRC(06563efe) SHA1(94e72da1f542b4e0525b4b43994242816b43dbdc) ) + ROM_LOAD32_WORD_SWAP( "esp_u66.u66", 0x800002, 0x400000, CRC(7bbe4cfc) SHA1(e77d0ed7a11b5abca1df8a0eb20ac9360cf79e76) ) ROM_REGION( 0x800000, "layer0", 0 ) /* Layer 0 */ ROM_LOAD( "esp_u54.u54", 0x000000, 0x400000, CRC(e7ca6936) SHA1(b7f5ab67071a1d9dd3d2c1cd2304d9cdad68850c) ) @@ -3415,10 +3435,10 @@ ROM_START( espradejo ) ROM_LOAD16_BYTE( "u41.bin", 0x000001, 0x080000, CRC(def30539) SHA1(957ad0b06f06689ae71393572592f6b8f818603a) ) ROM_REGION( 0x1000000, "sprites0", 0 ) /* Sprites */ - ROM_LOAD16_BYTE( "esp_u63.u63", 0x000000, 0x400000, CRC(2f2fe92c) SHA1(9519e365248bcec8419786eabb16fe4aae299af5) ) - ROM_LOAD16_BYTE( "esp_u64.u64", 0x000001, 0x400000, CRC(491a3da4) SHA1(53549a2bd3edc7b5e73fb46e1421b156bb0c190f) ) - ROM_LOAD16_BYTE( "esp_u65.u65", 0x800000, 0x400000, CRC(06563efe) SHA1(94e72da1f542b4e0525b4b43994242816b43dbdc) ) - ROM_LOAD16_BYTE( "esp_u66.u66", 0x800001, 0x400000, CRC(7bbe4cfc) SHA1(e77d0ed7a11b5abca1df8a0eb20ac9360cf79e76) ) + ROM_LOAD32_WORD_SWAP( "esp_u63.u63", 0x000000, 0x400000, CRC(2f2fe92c) SHA1(9519e365248bcec8419786eabb16fe4aae299af5) ) + ROM_LOAD32_WORD_SWAP( "esp_u64.u64", 0x000002, 0x400000, CRC(491a3da4) SHA1(53549a2bd3edc7b5e73fb46e1421b156bb0c190f) ) + ROM_LOAD32_WORD_SWAP( "esp_u65.u65", 0x800000, 0x400000, CRC(06563efe) SHA1(94e72da1f542b4e0525b4b43994242816b43dbdc) ) + ROM_LOAD32_WORD_SWAP( "esp_u66.u66", 0x800002, 0x400000, CRC(7bbe4cfc) SHA1(e77d0ed7a11b5abca1df8a0eb20ac9360cf79e76) ) ROM_REGION( 0x800000, "layer0", 0 ) /* Layer 0 */ ROM_LOAD( "esp_u54.u54", 0x000000, 0x400000, CRC(e7ca6936) SHA1(b7f5ab67071a1d9dd3d2c1cd2304d9cdad68850c) ) @@ -3484,7 +3504,7 @@ ROM_START( gaia ) ROM_LOAD16_BYTE( "prg1.127", 0x000000, 0x080000, CRC(47b904b2) SHA1(58b9b55f59cf00f70b690a0371096e86f4d723c2) ) ROM_LOAD16_BYTE( "prg2.128", 0x000001, 0x080000, CRC(469b7794) SHA1(502f855c51005a866900b19c3a0a170d9ea02392) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites */ ROM_LOAD( "obj1.736", 0x000000, 0x400000, CRC(f4f84e5d) SHA1(8f445dd7a5c8a996939c211e5aec5742121a6e7e) ) ROM_LOAD( "obj2.738", 0x400000, 0x400000, CRC(15c2a9ce) SHA1(631eb2968395be86ef2403733e7d4ec769a013b9) ) @@ -3546,7 +3566,7 @@ ROM_START( theroes ) ROM_LOAD16_BYTE( "t-hero-epm1.u0127", 0x000000, 0x080000, CRC(09db7195) SHA1(6aa5aa80e3b74e405ed8f1b9b801ce4367756986) ) ROM_LOAD16_BYTE( "t-hero-epm0.u0129", 0x000001, 0x080000, CRC(2d4e3310) SHA1(7c3284a2adc7943db50933a209d037422f87f80b) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites */ ROM_LOAD( "t-hero-obj1.u0736", 0x000000, 0x400000, CRC(35090f7c) SHA1(035e6c12a87d9c7241eea34fc7e2170bec842acc) ) ROM_LOAD( "t-hero-obj2.u0738", 0x400000, 0x400000, CRC(71605108) SHA1(6070c26d8f22fafc81d97cacfef96ae652e355d0) ) @@ -3585,12 +3605,12 @@ ROM_START( guwange ) ROM_LOAD16_BYTE( "gu-u0129.bin", 0x000001, 0x080000, CRC(6c0e3b93) SHA1(aaad6569b9a7b6f9a315062f9fedfc95851c1bc6) ) ROM_REGION( 0x2000000, "sprites0", 0 ) /* Sprites */ - ROM_LOAD16_BYTE( "u083.bin", 0x0000000, 0x800000, CRC(adc4b9c4) SHA1(3f9fb004e19187bbfa87ddfe8cfc69740656a1bd) ) - ROM_LOAD16_BYTE( "u082.bin", 0x0000001, 0x800000, CRC(3d75876c) SHA1(705b8c2dbdc31e9516f429969f87988beec796d7) ) - ROM_LOAD16_BYTE( "u086.bin", 0x1000000, 0x400000, CRC(188e4f81) SHA1(626074d81782a6de0b52406331b4b8561d3e36f5) ) - ROM_RELOAD( 0x1800000, 0x400000 ) - ROM_LOAD16_BYTE( "u085.bin", 0x1000001, 0x400000, CRC(a7d5659e) SHA1(10abac022ebe106a3ca7186ff18ca2757f903033) ) - ROM_RELOAD( 0x1800001, 0x400000 ) + ROM_LOAD32_WORD_SWAP( "u083.bin", 0x0000000, 0x800000, CRC(adc4b9c4) SHA1(3f9fb004e19187bbfa87ddfe8cfc69740656a1bd) ) + ROM_LOAD32_WORD_SWAP( "u082.bin", 0x0000002, 0x800000, CRC(3d75876c) SHA1(705b8c2dbdc31e9516f429969f87988beec796d7) ) + ROM_LOAD32_WORD_SWAP( "u086.bin", 0x1000000, 0x400000, CRC(188e4f81) SHA1(626074d81782a6de0b52406331b4b8561d3e36f5) ) + ROM_RELOAD( 0x1800000, 0x400000 ) + ROM_LOAD32_WORD_SWAP( "u085.bin", 0x1000002, 0x400000, CRC(a7d5659e) SHA1(10abac022ebe106a3ca7186ff18ca2757f903033) ) + ROM_RELOAD( 0x1800002, 0x400000 ) // sprite bug fix? // ROM_FILL( 0x1800000, 0x800000, 0xff ) @@ -3622,12 +3642,12 @@ ROM_START( guwanges ) ROM_LOAD16_BYTE( "gu-u0129b.bin", 0x000001, 0x080000, CRC(a99c6b6c) SHA1(614a3cd1de9b325f73e461eaf250ff9cf773f4a5) ) ROM_REGION( 0x2000000, "sprites0", 0 ) /* Sprites */ - ROM_LOAD16_BYTE( "u083.bin", 0x0000000, 0x800000, CRC(adc4b9c4) SHA1(3f9fb004e19187bbfa87ddfe8cfc69740656a1bd) ) - ROM_LOAD16_BYTE( "u082.bin", 0x0000001, 0x800000, CRC(3d75876c) SHA1(705b8c2dbdc31e9516f429969f87988beec796d7) ) - ROM_LOAD16_BYTE( "u086.bin", 0x1000000, 0x400000, CRC(188e4f81) SHA1(626074d81782a6de0b52406331b4b8561d3e36f5) ) - ROM_RELOAD( 0x1800000, 0x400000 ) - ROM_LOAD16_BYTE( "u085.bin", 0x1000001, 0x400000, CRC(a7d5659e) SHA1(10abac022ebe106a3ca7186ff18ca2757f903033) ) - ROM_RELOAD( 0x1800001, 0x400000 ) + ROM_LOAD32_WORD_SWAP( "u083.bin", 0x0000000, 0x800000, CRC(adc4b9c4) SHA1(3f9fb004e19187bbfa87ddfe8cfc69740656a1bd) ) + ROM_LOAD32_WORD_SWAP( "u082.bin", 0x0000002, 0x800000, CRC(3d75876c) SHA1(705b8c2dbdc31e9516f429969f87988beec796d7) ) + ROM_LOAD32_WORD_SWAP( "u086.bin", 0x1000000, 0x400000, CRC(188e4f81) SHA1(626074d81782a6de0b52406331b4b8561d3e36f5) ) + ROM_RELOAD( 0x1800000, 0x400000 ) + ROM_LOAD32_WORD_SWAP( "u085.bin", 0x1000002, 0x400000, CRC(a7d5659e) SHA1(10abac022ebe106a3ca7186ff18ca2757f903033) ) + ROM_RELOAD( 0x1800002, 0x400000 ) // sprite bug fix? // ROM_FILL( 0x1800000, 0x800000, 0xff ) @@ -3710,7 +3730,7 @@ ROM_START( hotdogst ) ROM_REGION( 0x40000, "audiocpu", 0 ) /* Z80 code */ ROM_LOAD( "mp2.u19", 0x00000, 0x40000, CRC(ff979ebe) SHA1(4cb80086cfdc69a321c7f75455cef89e20488b76) ) // FIRST AND SECOND HALF IDENTICAL - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "mp9.u55", 0x000000, 0x200000, CRC(258d49ec) SHA1(f39e30c82d8f680f248e1eb59d7c5acb479fa277) ) ROM_LOAD( "mp8.u54", 0x200000, 0x200000, CRC(bdb4d7b8) SHA1(0dd490988aa84b0e9a21ade5fd606b03eca13f6c) ) @@ -3781,7 +3801,7 @@ ROM_START( korokoro ) ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 Code */ ROM_LOAD16_WORD_SWAP( "mp-001_ver07.u0130", 0x000000, 0x080000, CRC(86c7241f) SHA1(c9f0ab63c4fe36df1300445e9bb0d5c6a1bb733f) ) // 1xxxxxxxxxxxxxxxxxx = 0xFF - ROM_REGION( 0x180000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x180000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "mp-001_ver01.u1066", 0x000000, 0x100000, CRC(c5c6af7e) SHA1(13ac26fd703672a01d629be4e5efe9fb8720a4fb) ) ROM_LOAD( "mp-001_ver01.u1051", 0x100000, 0x080000, CRC(fe5e28e8) SHA1(44da1a7d813b149f9bae351bbcbd0bc2d4c70e10) ) // 1xxxxxxxxxxxxxxxxxx = 0xFF @@ -3796,7 +3816,7 @@ ROM_START( crusherm ) ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 Code */ ROM_LOAD16_WORD_SWAP( "mp-003ver01.u0130", 0x000000, 0x080000, CRC(a4f56e6b) SHA1(1d3af7602c48a6b6c76c376dbc8ad3823b56868a) ) - ROM_REGION( 0x200000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x200000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "mp-003ver01.u1067", 0x000000, 0x100000, CRC(268a4921) SHA1(8bb818466616051af01680b381af53b8b6a18428) ) ROM_LOAD( "mp-003ver01.u1066", 0x100000, 0x100000, CRC(79e77a6e) SHA1(9d03dd083769851d628ba6b3d77cfde9603e74f4) ) @@ -3843,7 +3863,7 @@ U55 ROM_REGION( 0x20000, "audiocpu", 0 ) \ ROM_LOAD( "mzs.u21", 0x00000, 0x20000, CRC(c5b4f7ed) SHA1(01f3cd1dd4045029260544e0e1c15dd08817012e) ) \ \ - ROM_REGION( 0x400000 * 2, "sprites0", ROMREGION_ERASEFF ) \ + ROM_REGION( 0x400000, "sprites0", ROMREGION_ERASEFF ) \ ROM_LOAD( "bp943a-2.u56", 0x000000, 0x200000, CRC(97e13959) SHA1(c30b1093aacebafefcae701af767dd36fc55fac7) ) \ ROM_LOAD( "bp943a-3.u55", 0x200000, 0x080000, CRC(9c4957dd) SHA1(e775605a01b6cadc318855ac046dad03c4fc5bb4) ) \ \ @@ -3926,7 +3946,7 @@ ROM_START( metmqstr ) ROM_REGION( 0x40000, "audiocpu", 0 ) /* Z80 code */ ROM_LOAD( "bp947a.u20", 0x00000, 0x40000, CRC(a4a36170) SHA1(ae55094518bd968ea0d04613a133c1421e412012) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "bp947a.u49", 0x000000, 0x200000, CRC(09749531) SHA1(6deeed2712241611ec3202c49a66beed28698af8) ) ROM_LOAD( "bp947a.u50", 0x200000, 0x200000, CRC(19cea8b2) SHA1(87fb29458074f0e4852237e0184b8b3b44b0eb29) ) ROM_LOAD( "bp947a.u51", 0x400000, 0x200000, CRC(c19bed67) SHA1(ac664a15512c0e8c8b701833aede95f53cd46a45) ) @@ -3962,7 +3982,7 @@ ROM_START( nmaster ) ROM_REGION( 0x40000, "audiocpu", 0 ) /* Z80 code */ ROM_LOAD( "bp947a.u20", 0x00000, 0x40000, CRC(a4a36170) SHA1(ae55094518bd968ea0d04613a133c1421e412012) ) - ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x800000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "bp947a.u49", 0x000000, 0x200000, CRC(09749531) SHA1(6deeed2712241611ec3202c49a66beed28698af8) ) ROM_LOAD( "bp947a.u50", 0x200000, 0x200000, CRC(19cea8b2) SHA1(87fb29458074f0e4852237e0184b8b3b44b0eb29) ) ROM_LOAD( "bp947a.u51", 0x400000, 0x200000, CRC(c19bed67) SHA1(ac664a15512c0e8c8b701833aede95f53cd46a45) ) @@ -4013,7 +4033,7 @@ ROM_START( pacslot ) ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "pa1-mprob.u41", 0x00000, 0x80000, CRC(56281370) SHA1(b75a7c5997adac14486cef7be4e41d113c86021f) ) - ROM_REGION( 0x100000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x100000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "pa1-obj0.u52", 0x00000, 0x80000, CRC(bf9232ce) SHA1(9a887a964e9a75e16c59dcf217c664404e74cc2a) ) ROM_LOAD16_BYTE( "pa1-obj1.u53", 0x00001, 0x80000, CRC(6eb76a04) SHA1(66c8e36bee4439c203a02b30898e4f741205d681) ) @@ -4057,7 +4077,7 @@ ROM_START( paceight ) ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "pae1-mpro.u41", 0x00000, 0x80000, CRC(bb026f97) SHA1(70d48f05275c64b25f37f03206219ef3ee9c0ee2) ) // 27c240 - ROM_REGION( 0x100000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x100000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "pae1-obj0.u52", 0x00000, 0x80000, CRC(2cd99155) SHA1(146ed2b3f2763232a60e6b238a16067d3ccfa959) ) // 27c040 ROM_LOAD16_BYTE( "pae1-obj1.u53", 0x00001, 0x80000, CRC(9ae2685b) SHA1(5eed5f00d28d803358c8ffaf42c4979af23a0a8c) ) // "" @@ -4104,15 +4124,15 @@ ROM_START( ppsatan ) ROM_LOAD16_BYTE( "66a5.u79", 0x00000, 0x20000, CRC(60efeed3) SHA1(72095cef77065a8f1089273050f60a2e99582cf1) ) // checksum = 60D5 (OK?). 1xxxxxxxxxxxxxxxx = 0xFF ROM_LOAD16_BYTE( "43b1.u61", 0x00001, 0x20000, CRC(f14e6287) SHA1(75c0465780a10ec8f533349b008f0d489bf362a5) ) // checksum = 43B1 (OK). 1xxxxxxxxxxxxxxxx = 0xFF - ROM_REGION( 0x200000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x200000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "ver1.0.u27", 0x00000, 0x80000, CRC(d1b02639) SHA1(19bbcf951a6ace91da72af9232f3d808afa8416c) ) ROM_LOAD16_BYTE( "ver1.0.u17", 0x00001, 0x80000, CRC(c66730ca) SHA1(75c18c80c1d2ced69edd4f013685c4eaf015049c) ) - ROM_REGION( 0x200000 * 2, "sprites1", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x200000, "sprites1", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "ver1.0.u13", 0x00000, 0x80000, CRC(24c31e01) SHA1(c2c96bdd0a2a764ac0e1c8d64334d0ab76c46aa5) ) ROM_LOAD16_BYTE( "ver1.0.u19", 0x00001, 0x80000, CRC(ffbc6284) SHA1(05a735f3193218d32ad253c5abe21e1d00d1a5ca) ) - ROM_REGION( 0x200000 * 2, "sprites2", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x200000, "sprites2", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "ver1.0.u15", 0x00000, 0x80000, CRC(24c31e01) SHA1(c2c96bdd0a2a764ac0e1c8d64334d0ab76c46aa5) ) ROM_LOAD16_BYTE( "ver1.0.u23", 0x00001, 0x80000, CRC(ffbc6284) SHA1(05a735f3193218d32ad253c5abe21e1d00d1a5ca) ) @@ -4165,7 +4185,7 @@ ROM_START( pwrinst2 ) ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code */ ROM_LOAD( "g02.u3a", 0x00000, 0x20000, CRC(ebea5e1e) SHA1(4d3af9e5f29d0c1b26563f51250039c9e8bd3735) ) - ROM_REGION( 0xe00000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0xe00000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "g02.u61", 0x000000, 0x200000, CRC(91e30398) SHA1(2b59a5e40bed2a988382054fe30d92808dad3348) ) ROM_LOAD( "g02.u62", 0x200000, 0x200000, CRC(d9455dd7) SHA1(afa69fe9a540cd78b8cfecf09cffa1401c01141a) ) ROM_LOAD( "g02.u63", 0x400000, 0x200000, CRC(4d20560b) SHA1(ceaee8cf0b69cc366b95ddcb689a5594d79e5114) ) @@ -4210,7 +4230,7 @@ ROM_START( pwrinst2j ) ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code */ ROM_LOAD( "g02j.u3a", 0x00000, 0x20000, CRC(eead01f1) SHA1(0ced6755e471e0303fe397b3d54a5c799762ebd8) ) - ROM_REGION( 0xe00000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0xe00000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "g02.u61", 0x000000, 0x200000, CRC(91e30398) SHA1(2b59a5e40bed2a988382054fe30d92808dad3348) ) ROM_LOAD( "g02.u62", 0x200000, 0x200000, CRC(d9455dd7) SHA1(afa69fe9a540cd78b8cfecf09cffa1401c01141a) ) ROM_LOAD( "g02.u63", 0x400000, 0x200000, CRC(4d20560b) SHA1(ceaee8cf0b69cc366b95ddcb689a5594d79e5114) ) @@ -4309,7 +4329,7 @@ ROM_START( plegends ) ROM_REGION( 0x40000, "audiocpu", 0 ) /* Z80 code */ ROM_LOAD( "d19.u3", 0x00000, 0x40000, CRC(47598459) SHA1(4e9dcfebfbd160230768965e8c6e5ed446c1aa7b) ) /* Same as sound.u3 below, but twice the size? */ - ROM_REGION( 0x1000000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x1000000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "g02.u61", 0x000000, 0x200000, CRC(91e30398) SHA1(2b59a5e40bed2a988382054fe30d92808dad3348) ) ROM_LOAD( "g02.u62", 0x200000, 0x200000, CRC(d9455dd7) SHA1(afa69fe9a540cd78b8cfecf09cffa1401c01141a) ) ROM_LOAD( "g02.u63", 0x400000, 0x200000, CRC(4d20560b) SHA1(ceaee8cf0b69cc366b95ddcb689a5594d79e5114) ) @@ -4356,7 +4376,7 @@ ROM_START( plegendsj ) ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code */ ROM_LOAD( "sound.u3", 0x00000, 0x20000, CRC(36f71520) SHA1(11d0a059ddba3e1aa4c54ccdde7b3f5c7bde482f) ) - ROM_REGION( 0x1000000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x1000000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "g02.u61", 0x000000, 0x200000, CRC(91e30398) SHA1(2b59a5e40bed2a988382054fe30d92808dad3348) ) ROM_LOAD( "g02.u62", 0x200000, 0x200000, CRC(d9455dd7) SHA1(afa69fe9a540cd78b8cfecf09cffa1401c01141a) ) ROM_LOAD( "g02.u63", 0x400000, 0x200000, CRC(4d20560b) SHA1(ceaee8cf0b69cc366b95ddcb689a5594d79e5114) ) @@ -4447,7 +4467,7 @@ BPSM.U77 23C16000 GFX ROM_REGION( 0x80000, "audiocpu", 0 ) \ ROM_LOAD( "bpsm945a.u9", 0x00000, 0x80000, CRC(438de548) SHA1(81a0ca1cd662e2017aa980da162d39cfd0a19f14) ) \ \ - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) \ + ROM_REGION( 0x400000, "sprites0", 0 ) \ ROM_LOAD( "bpsm.u76", 0x000000, 0x200000, CRC(a243a5ba) SHA1(3a32d685e53e0b75977f7acb187cf414a50c7f8b) ) \ ROM_LOAD( "bpsm.u77", 0x200000, 0x200000, CRC(5179a4ac) SHA1(ceb8d3d889aae885debb2c9cf2263f60be3f1212) ) \ \ @@ -4530,7 +4550,7 @@ ROM_END ROM_REGION( 0x80000, "audiocpu", 0 ) \ ROM_LOAD( "bpsm945a.u9", 0x00000, 0x80000, CRC(438de548) SHA1(81a0ca1cd662e2017aa980da162d39cfd0a19f14) ) \ \ - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) \ + ROM_REGION( 0x400000, "sprites0", 0 ) \ ROM_LOAD( "bpsm.u76", 0x000000, 0x200000, CRC(a243a5ba) SHA1(3a32d685e53e0b75977f7acb187cf414a50c7f8b) ) \ ROM_LOAD( "bpsm.u77", 0x200000, 0x200000, CRC(5179a4ac) SHA1(ceb8d3d889aae885debb2c9cf2263f60be3f1212) ) \ \ @@ -4613,7 +4633,7 @@ ROM_END ROM_REGION( 0x80000, "audiocpu", 0 ) \ ROM_LOAD( "bpsm945a.u9", 0x00000, 0x80000, CRC(438de548) SHA1(81a0ca1cd662e2017aa980da162d39cfd0a19f14) ) \ \ - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) \ + ROM_REGION( 0x400000, "sprites0", 0 ) \ ROM_LOAD( "bpsm.u76", 0x000000, 0x200000, CRC(a243a5ba) SHA1(3a32d685e53e0b75977f7acb187cf414a50c7f8b) ) \ ROM_LOAD( "bpsm.u77", 0x200000, 0x200000, CRC(5179a4ac) SHA1(ceb8d3d889aae885debb2c9cf2263f60be3f1212) ) \ \ @@ -4711,7 +4731,7 @@ ROM_START( tekkencw ) ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "mpr0.u41", 0x00000, 0x80000, CRC(5b8919f3) SHA1(580298b6dc36527ab69889c848acab97726a6cc6) ) // 27c240 - ROM_REGION( 0x100000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x100000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "obj0.u52", 0x00000, 0x80000, CRC(6d3c0c76) SHA1(92f9c9beae222a2c2a3242f812030e08036c9963) ) // 27c040 ROM_LOAD16_BYTE( "obj1.u53", 0x00001, 0x80000, CRC(8069b731) SHA1(9f0409c28466503092b74f635602962d9f127de8) ) // "" @@ -4751,7 +4771,7 @@ ROM_START( tekkenbs ) ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "tbs1_mpr-0a.u41", 0x00000, 0x80000, CRC(625487d3) SHA1(6bdc0f0f9877eeb1041f8f5b0d44e41b83ddcc76) ) // 27c4002 - ROM_REGION( 0x100000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x100000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "tbs1_obj-0a.u52", 0x00000, 0x80000, CRC(a870481b) SHA1(644370e10b197832ee828b22e43f114d40740432) ) // 27c4001 ROM_LOAD16_BYTE( "tbs1_obj-1a.u53", 0x00001, 0x80000, CRC(73d8f520) SHA1(70ab5abeeaf0b3f5a263a7ece21d000a27148994) ) // "" @@ -4791,7 +4811,7 @@ ROM_START( tjumpman ) ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "tj1_mpr-0c.u41", 0x00000, 0x80000, CRC(de3030b8) SHA1(5f2165ea039c34cab605ebddc0b61eadc47b1532) ) - ROM_REGION( 0x100000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x100000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD16_BYTE( "tj1_obj-0a.u52", 0x00000, 0x80000, CRC(b42cf8e8) SHA1(9ed7fb3574ed163a81f34a0d8cfa7a4661439932) ) ROM_LOAD16_BYTE( "tj1_obj-1a.u53", 0x00001, 0x80000, CRC(5f0124d7) SHA1(4d9cfa464159998c176a178c668273d128dedff8) ) @@ -4831,7 +4851,7 @@ ROM_START( uopoko ) ROM_LOAD16_BYTE( "u26.int", 0x000000, 0x080000, CRC(b445c9ac) SHA1(4dda1c6e19de629ea4d9061560c32a9f0deabd53) ) ROM_LOAD16_BYTE( "u25.int", 0x000001, 0x080000, CRC(a1258482) SHA1(7f4adc4a6d069032aaf3d93eb60fde16b59483f8) ) - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "cave_cv-02_u33.u33", 0x000000, 0x400000, CRC(5d142ad2) SHA1(f26abcf7a625a322b83df44fbd6e852bfb03663c) ) /* mask ROM */ ROM_REGION( 0x400000, "layer0", 0 ) /* Layer 0 */ @@ -4849,7 +4869,7 @@ ROM_START( uopokoj ) ROM_LOAD16_BYTE( "u26.bin", 0x000000, 0x080000, CRC(e7eec050) SHA1(cf3a77741029f96dbbec5ca7217a1723e4233cff) ) ROM_LOAD16_BYTE( "u25.bin", 0x000001, 0x080000, CRC(68cb6211) SHA1(a6db0bc2e3e54b6992a44b7d52395917e66db49b) ) - ROM_REGION( 0x400000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_REGION( 0x400000, "sprites0", 0 ) /* Sprites: * 2 */ ROM_LOAD( "cave_cv-02_u33.u33", 0x000000, 0x400000, CRC(5d142ad2) SHA1(f26abcf7a625a322b83df44fbd6e852bfb03663c) ) /* mask ROM */ ROM_REGION( 0x400000, "layer0", 0 ) /* Layer 0 */ @@ -4949,7 +4969,7 @@ void cave_state::init_ddonpach() { init_cave(); - ddp_unpack_sprites(0); + unpack_sprites(0); m_spritetype[0] = TYPE_NOZOOM; // "different" sprites (no zooming?) m_time_vblank_irq = 90; @@ -4962,7 +4982,7 @@ void cave_state::init_donpachi() { init_cave(); - ddp_unpack_sprites(0); + unpack_sprites(0); m_spritetype[0] = TYPE_NOZOOM; // "different" sprites (no zooming?) m_time_vblank_irq = 90; } @@ -4971,7 +4991,7 @@ void cave_state::init_esprade() { init_cave(); - esprade_unpack_sprites(0); + unpack_sprites(0); m_time_vblank_irq = 2000; /**/ #if 0 //ROM PATCH @@ -4996,7 +5016,7 @@ void cave_state::init_guwange() { init_cave(); - esprade_unpack_sprites(0); + unpack_sprites(0); m_time_vblank_irq = 2000; /**/ } @@ -5013,8 +5033,8 @@ void cave_state::init_hotdogst() void cave_state::init_mazinger() { - u8 *src = memregion("sprites0")->base(); - int len = memregion("sprites0")->bytes(); + u8 *src = m_spriteregion[0]->base(); + const u32 len = m_spriteregion[0]->bytes(); init_cave(); @@ -5025,7 +5045,7 @@ void cave_state::init_mazinger() std::vector buffer(len); { for (int i = 0; i < len; i++) - buffer[i ^ 0xdf88] = src[bitswap<24>(i,23,22,21,20,19,9,7,3,15,4,17,14,18,2,16,5,11,8,6,13,1,10,12,0)]; + buffer[i ^ 0xdf88] = src[(i & ~0xffffff) | bitswap<24>(i,23,22,21,20,19,9,7,3,15,4,17,14,18,2,16,5,11,8,6,13,1,10,12,0)]; std::copy(buffer.begin(), buffer.end(), &src[0]); } @@ -5063,8 +5083,8 @@ void cave_state::init_ppsatan() void cave_state::init_pwrinst2j() { - u8 *src = memregion("sprites0")->base(); - int len = memregion("sprites0")->bytes(); + u8 *src = m_spriteregion[0]->base(); + const u32 len = m_spriteregion[0]->bytes(); init_cave(); @@ -5072,12 +5092,12 @@ void cave_state::init_pwrinst2j() std::vector buffer(len); { - for(int i = 0; i < len/2; i++) + for (u32 i = 0; i < len; i++) { - int j = bitswap<24>(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7, 2,4,6,1,5,3, 0); + u32 j = (i & ~0xffffff) | bitswap<24>(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7, 2,4,6,1,5,3, 0); if(((j & 6) == 0) || ((j & 6) == 6)) j ^= 6; - buffer[j ^ 7] = (src[i] >> 4) | (src[i] << 4); + buffer[j ^ 7] = src[i]; } std::copy(buffer.begin(), buffer.end(), &src[0]); @@ -5106,8 +5126,8 @@ void cave_state::init_pwrinst2() void cave_state::init_sailormn() { - u8 *src = memregion("sprites0")->base(); - int len = memregion("sprites0")->bytes(); + u8 *src = m_spriteregion[0]->base(); + const u32 len = m_spriteregion[0]->bytes(); init_cave(); @@ -5119,7 +5139,7 @@ void cave_state::init_sailormn() std::vector buffer(len); { for (int i = 0; i < len; i++) - buffer[i ^ 0x950c4] = src[bitswap<24>(i,23,22,21,20,15,10,12,6,11,1,13,3,16,17,2,5,14,7,18,8,4,19,9,0)]; + buffer[i ^ 0x950c4] = src[(i & ~0xffffff) | bitswap<24>(i,23,22,21,20,15,10,12,6,11,1,13,3,16,17,2,5,14,7,18,8,4,19,9,0)]; std::copy(buffer.begin(), buffer.end(), &src[0]); } diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index 1591809daf7..e74310a53a4 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -45,6 +45,7 @@ public: , m_int_timer_right(*this, "int_timer_right") , m_eeprom(*this, "eeprom") , m_gfxdecode(*this, "gfxdecode.%u", 0U) + , m_spr_gfxdecode(*this, "spr_gfxdecode.%u", 0U) , m_screen(*this, "screen.%u", 0U) , m_palette(*this, "palette.%u", 0U) , m_tilemap(*this, "tilemap.%u", 0U) @@ -149,7 +150,6 @@ private: DECLARE_MACHINE_RESET(sailormn); DECLARE_VIDEO_START(spr_4bpp); DECLARE_VIDEO_START(spr_8bpp); - DECLARE_VIDEO_START(korokoro); DECLARE_VIDEO_START(ppsatan); void cave_palette(palette_device &palette); void dfeveron_palette(palette_device &palette); @@ -176,8 +176,6 @@ private: DECLARE_WRITE_LINE_MEMBER(sound_irq_gen); void update_irq_state(); void unpack_sprites(int chip); - void ddp_unpack_sprites(int chip); - void esprade_unpack_sprites(int chip); void sailormn_unpack_tiles(int chip); virtual void machine_start() override; @@ -238,6 +236,9 @@ private: bitmap_ind16 m_sprite_zbuf[4]; u16 m_sprite_zbuf_baseval; + std::unique_ptr m_sprite_gfx[4]; + offs_t m_sprite_gfx_mask[4]; + int m_num_sprites[4]; int m_spriteram_bank[4]; @@ -253,7 +254,6 @@ private: int m_kludge; emu_timer *m_vblank_end_timer; - u16 m_sprite_base_pal; u16 m_sprite_granularity; u32 m_max_sprite_clk[4]; // max usable clock for sprites @@ -290,6 +290,7 @@ private: optional_device m_int_timer_right; optional_device m_eeprom; optional_device_array m_gfxdecode; + optional_device_array m_spr_gfxdecode; optional_device_array m_screen; optional_device_array m_palette; optional_device_array m_tilemap; @@ -302,7 +303,7 @@ private: inline void tilemap_draw(int chip, screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, u32 flags, u32 priority, u32 priority2, int GFX); void set_pens(int chip); - void vh_start(u16 sprcol_base, u16 sprcol_granularity); + void vh_start(u16 sprcol_granularity); void get_sprite_info_cave(int chip); void get_sprite_info_donpachi(int chip); void sprite_init(); diff --git a/src/mame/video/cave.cpp b/src/mame/video/cave.cpp index 0587a3963e4..e77bd0d7b5c 100644 --- a/src/mame/video/cave.cpp +++ b/src/mame/video/cave.cpp @@ -89,9 +89,8 @@ void cave_state::sailormn_get_banked_code(bool tiledim, u32 &color, u32 &pri, u3 ***************************************************************************/ -void cave_state::vh_start(u16 sprcol_base, u16 sprcol_granularity) +void cave_state::vh_start(u16 sprcol_granularity) { - m_sprite_base_pal = sprcol_base; m_sprite_granularity = sprcol_granularity; sprite_init(); @@ -125,25 +124,19 @@ void cave_state::vh_start(u16 sprcol_base, u16 sprcol_granularity) // 4 bit sprite granularity VIDEO_START_MEMBER(cave_state,spr_4bpp) { - vh_start(0, 16); + vh_start(16); } // 8 bit sprite granularity VIDEO_START_MEMBER(cave_state,spr_8bpp) { - vh_start(0, 256); -} - -// korokoro (different sprite base palette) -VIDEO_START_MEMBER(cave_state,korokoro) -{ - vh_start(0x3c00, 16); + vh_start(256); } // ppsatan (3 screen) VIDEO_START_MEMBER(cave_state,ppsatan) { - vh_start(0x3c00, 16); + vh_start(16); for (int chip = 1; chip < 3; chip++) { m_background_pen[chip] = m_gfxdecode[chip]->gfx(0)->colorbase() + @@ -231,12 +224,11 @@ VIDEO_START_MEMBER(cave_state,ppsatan) void cave_state::get_sprite_info_cave(int chip) { chip %= 4; - const u8 *base_gfx = m_spriteregion[chip]->base(); - const int code_max = m_spriteregion[chip]->bytes() / (16*16); if (m_sprite[chip] == nullptr) return; + gfx_element *gfx = m_spr_gfxdecode[chip]->gfx(0); sprite_cave *sprite = m_sprite[chip].get(); const int glob_flipx = m_videoregs[chip][0] & 0x8000; @@ -285,8 +277,7 @@ void cave_state::get_sprite_info_cave(int chip) break; /* Bound checking */ - code %= code_max; - sprite->pen_data = base_gfx + (16 * 16) * code; + sprite->pen_data = &m_sprite_gfx[chip][(code << 8) & m_sprite_gfx_mask[chip]]; int flipx = attr & 0x0008; int flipy = attr & 0x0004; @@ -344,7 +335,7 @@ void cave_state::get_sprite_info_cave(int chip) sprite->priority = (attr & 0x0030) >> 4; sprite->flags = SPRITE_VISIBLE_CAVE; sprite->line_offset = sprite->tile_width; - sprite->base_pen = m_sprite_base_pal + (((attr & 0x3f00) >> 8) * m_sprite_granularity); // first 0x4000 colors + sprite->base_pen = gfx->colorbase() + (((attr & 0x3f00) >> 8) * gfx->granularity()); // first 0x4000 colors if (glob_flipx) { x = max_x - x - sprite->total_width; flipx = !flipx; } if (glob_flipy) { y = max_y - y - sprite->total_height; flipy = !flipy; } @@ -363,12 +354,11 @@ void cave_state::get_sprite_info_cave(int chip) void cave_state::get_sprite_info_donpachi(int chip) { chip %= 4; - const u8 *base_gfx = m_spriteregion[chip]->base(); - const int code_max = m_spriteregion[chip]->bytes() / (16*16); if (m_sprite[chip] == nullptr) return; + gfx_element *gfx = m_spr_gfxdecode[chip]->gfx(0); sprite_cave *sprite = m_sprite[chip].get(); const int glob_flipx = m_videoregs[chip][0] & 0x8000; @@ -404,8 +394,7 @@ void cave_state::get_sprite_info_donpachi(int chip) sprite->tile_height = sprite->total_height = ((size >> 0) & 0x1f) * 16; /* Bound checking */ - code %= code_max; - sprite->pen_data = base_gfx + (16*16) * code; + sprite->pen_data = &m_sprite_gfx[chip][(code << 8) & m_sprite_gfx_mask[chip]]; if (x > 0x1ff) x -= 0x400; if (y > 0x1ff) y -= 0x400; @@ -424,12 +413,12 @@ void cave_state::get_sprite_info_donpachi(int chip) if (m_spritetype[0] & TYPE_ISPWRINST2) /* pwrinst2 */ { sprite->priority = ((attr & 0x0010) >> 4) + 2; - sprite->base_pen = m_sprite_base_pal + ((((attr & 0x3f00) >> 8) + ((attr & 0x0020) << 1)) * m_sprite_granularity); + sprite->base_pen = gfx->colorbase() + ((((attr & 0x3f00) >> 8) + ((attr & 0x0020) << 1)) * gfx->granularity()); } else { sprite->priority = (attr & 0x0030) >> 4; - sprite->base_pen = m_sprite_base_pal + (((attr & 0x3f00) >> 8) * m_sprite_granularity); // first 0x4000 colors + sprite->base_pen = gfx->colorbase() + (((attr & 0x3f00) >> 8) * gfx->granularity()); // first 0x4000 colors } sprite->flags = SPRITE_VISIBLE_CAVE; @@ -477,7 +466,7 @@ void cave_state::sprite_init() for (int chip = 0; chip < 4; chip++) { m_max_sprite_clk[chip] = 0; - if (m_videoregs[chip]) + if (m_videoregs[chip] && m_spr_gfxdecode[chip]) { for (int screen = 0; screen < 4; screen++) { @@ -492,6 +481,7 @@ void cave_state::sprite_init() } m_num_sprites[chip] = m_spriteram[chip].bytes() / 0x10 / 2; m_sprite[chip] = std::make_unique(m_num_sprites[chip]); + m_spr_gfxdecode[chip]->gfx(0)->set_granularity(m_sprite_granularity); } else { -- cgit v1.2.3 From b091167af83a50795bb4bf185b987752abd878ac Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Tue, 7 Jul 2020 14:22:17 +0200 Subject: tourvis.cpp: Add BIOS V4-54 [Juan Romero, ClawGrip] (#6919) --- src/mame/drivers/tourvis.cpp | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp index a66c6e14d1b..ffe172f6dcc 100644 --- a/src/mame/drivers/tourvis.cpp +++ b/src/mame/drivers/tourvis.cpp @@ -445,27 +445,29 @@ void tourvision_state::tourvision(machine_config &config) ROMX_LOAD( "v4-60.ic29", 0x0000, 0x8000, CRC(1fd27e22) SHA1(b103d365eac3fa447c2e9addddf6974b4403ed41), ROM_BIOS(0) ) \ ROM_SYSTEM_BIOS( 1, "55", "V4-55" ) \ ROMX_LOAD( "v4-55.ic29", 0x0000, 0x8000, CRC(87cf66c1) SHA1(d6b42137be7a07a0e299c2d922328a6a9a2b7b8f), ROM_BIOS(1) ) \ - ROM_SYSTEM_BIOS( 2, "53", "V4-53" ) \ - ROMX_LOAD( "v4-53.ic29", 0x0000, 0x8000, CRC(bccb53c9) SHA1(a27113d70cf348c7eafa39fc7a76f55f63723ad7), ROM_BIOS(2) ) \ - ROM_SYSTEM_BIOS( 3, "52", "V4-52" ) \ - ROMX_LOAD( "v4-52.ic29", 0x0000, 0x8000, CRC(ffd7b0fe) SHA1(d1804865c91e925a01b05cf441e8458a3db23f50), ROM_BIOS(3) ) \ - ROM_SYSTEM_BIOS( 4, "51", "V4-51" ) \ - ROMX_LOAD( "v4-51.ic29", 0x0000, 0x8000, CRC(2de0b946) SHA1(c13051453aff3a2329f18ebade75c69aa3b1c28d), ROM_BIOS(4) ) \ - ROM_SYSTEM_BIOS( 5, "43", "V4-43" ) \ - ROMX_LOAD( "v4-43.ic29", 0x0000, 0x8000, CRC(88da23f3) SHA1(9d24faa116129783e55c7f79a4a08902a236d5a6), ROM_BIOS(5) ) \ - ROM_SYSTEM_BIOS( 6, "42", "V4-42" ) \ - ROMX_LOAD( "v4-42.ic29", 0x0000, 0x8000, CRC(0372606d) SHA1(8c6a63865b0b4951ea032725cf022d353115b93b), ROM_BIOS(6) ) \ - ROM_SYSTEM_BIOS( 7, "40", "V4-40" ) \ - ROMX_LOAD( "v4-40.ic29", 0x0000, 0x8000, CRC(ba6290cc) SHA1(92b0e9f55791e892ec209de4fadd80faef370622), ROM_BIOS(7) ) \ - ROM_SYSTEM_BIOS( 8, "20", "VT-20" ) \ - ROMX_LOAD( "vt_2.0.bin", 0x0000, 0x8000, CRC(36012f88) SHA1(5bd42fb51aa48ff65e704ea06a9181bb87ed2137), ROM_BIOS(8) ) \ - ROM_SYSTEM_BIOS( 9, "11", "VT-11" ) \ - ROMX_LOAD( "vt_1.1.bin", 0x0000, 0x8000, CRC(27abbc36) SHA1(881ea7802b9e241473bc8ced0472e0f1851c9886), ROM_BIOS(9) ) + ROM_SYSTEM_BIOS( 2, "54", "V4-54" ) \ + ROMX_LOAD( "v4-54.ic29", 0x0000, 0x8000, CRC(125e7a6e) SHA1(6f03c49acaad4feb9c2187f84fc1cb5451d0eb2b), ROM_BIOS(2) ) \ + ROM_SYSTEM_BIOS( 3, "53", "V4-53" ) \ + ROMX_LOAD( "v4-53.ic29", 0x0000, 0x8000, CRC(bccb53c9) SHA1(a27113d70cf348c7eafa39fc7a76f55f63723ad7), ROM_BIOS(3) ) \ + ROM_SYSTEM_BIOS( 4, "52", "V4-52" ) \ + ROMX_LOAD( "v4-52.ic29", 0x0000, 0x8000, CRC(ffd7b0fe) SHA1(d1804865c91e925a01b05cf441e8458a3db23f50), ROM_BIOS(4) ) \ + ROM_SYSTEM_BIOS( 5, "51", "V4-51" ) \ + ROMX_LOAD( "v4-51.ic29", 0x0000, 0x8000, CRC(2de0b946) SHA1(c13051453aff3a2329f18ebade75c69aa3b1c28d), ROM_BIOS(5) ) \ + ROM_SYSTEM_BIOS( 6, "43", "V4-43" ) \ + ROMX_LOAD( "v4-43.ic29", 0x0000, 0x8000, CRC(88da23f3) SHA1(9d24faa116129783e55c7f79a4a08902a236d5a6), ROM_BIOS(6) ) \ + ROM_SYSTEM_BIOS( 7, "42", "V4-42" ) \ + ROMX_LOAD( "v4-42.ic29", 0x0000, 0x8000, CRC(0372606d) SHA1(8c6a63865b0b4951ea032725cf022d353115b93b), ROM_BIOS(7) ) \ + ROM_SYSTEM_BIOS( 8, "40", "V4-40" ) \ + ROMX_LOAD( "v4-40.ic29", 0x0000, 0x8000, CRC(ba6290cc) SHA1(92b0e9f55791e892ec209de4fadd80faef370622), ROM_BIOS(8) ) \ + ROM_SYSTEM_BIOS( 9, "20", "VT-20" ) \ + ROMX_LOAD( "vt_2.0.bin", 0x0000, 0x8000, CRC(36012f88) SHA1(5bd42fb51aa48ff65e704ea06a9181bb87ed2137), ROM_BIOS(9) ) \ + ROM_SYSTEM_BIOS(10, "11", "VT-11" ) \ + ROMX_LOAD( "vt_1.1.bin", 0x0000, 0x8000, CRC(27abbc36) SHA1(881ea7802b9e241473bc8ced0472e0f1851c9886), ROM_BIOS(10) ) ROM_START(tourvis) ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASE00 ) - TOURVISION_BIOS /* BIOS rom type is 27C256 */ + TOURVISION_BIOS // BIOS rom type is 27C256 ROM_END GAME( 19??, tourvis, 0, tourvision, tourvision, tourvision_state, init_pce_common, ROT0, "bootleg (Tourvision)", "Tourvision PCE bootleg", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING ) -- cgit v1.2.3 From 7830c5bee7ba14538c6bf4072e53b1d6d1aef308 Mon Sep 17 00:00:00 2001 From: shattered Date: Tue, 7 Jul 2020 12:22:57 +0000 Subject: pdp11: replace GPL code (nw) (#6923) --- src/devices/bus/qbus/pc11.h | 2 +- src/devices/machine/pdp11.h | 34 ++++++++++++++++++++++++++++++++++ src/mame/includes/pdp11.h | 41 ----------------------------------------- 3 files changed, 35 insertions(+), 42 deletions(-) create mode 100644 src/devices/machine/pdp11.h delete mode 100644 src/mame/includes/pdp11.h diff --git a/src/devices/bus/qbus/pc11.h b/src/devices/bus/qbus/pc11.h index 0de064029ae..163e661c9c9 100644 --- a/src/devices/bus/qbus/pc11.h +++ b/src/devices/bus/qbus/pc11.h @@ -13,7 +13,7 @@ #include "qbus.h" -#include "includes/pdp11.h" +#include "machine/pdp11.h" #include "softlist_dev.h" diff --git a/src/devices/machine/pdp11.h b/src/devices/machine/pdp11.h new file mode 100644 index 00000000000..7438184b39d --- /dev/null +++ b/src/devices/machine/pdp11.h @@ -0,0 +1,34 @@ +// license:BSD-3-Clause +// copyright-holders:Sergey Svishchev +/***************************************************************************** + * + * includes/pdp11.h + * + ****************************************************************************/ + +#ifndef PDP11_H_ +#define PDP11_H_ + +// bit definitions for generic device CSR + +enum { + CSR_GO = 0000001, + CSR_IE = 0000100, // interrupt enable + CSR_DONE = 0000200, + CSR_BUSY = 0004000, + CSR_ERR = 0100000 +}; + + +#define clear_virq(_callback, _csr, _ie, _intrq) \ + if ((_csr) & (_ie)) { (_intrq) = CLEAR_LINE; } + +#define raise_virq(_callback, _csr, _ie, _intrq) \ + if ((_csr) & (_ie)) { (_intrq) = ASSERT_LINE; _callback (ASSERT_LINE); } + + +#define UPDATE_16BIT(_storage, _data, _mask) \ + do { *_storage = ((*_storage & ~_mask) | (_data & _mask)); } while (0) + + +#endif /* PDP11_H_ */ diff --git a/src/mame/includes/pdp11.h b/src/mame/includes/pdp11.h deleted file mode 100644 index 9c2c15e7e94..00000000000 --- a/src/mame/includes/pdp11.h +++ /dev/null @@ -1,41 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:SIMH project -/***************************************************************************** - * - * includes/pdp11.h - * - ****************************************************************************/ - -#ifndef PDP11_H_ -#define PDP11_H_ - -/* - * taken from PDP11/pdp11_defs.h in SIMH - */ - -/* Device CSRs */ - -#define CSR_V_GO 0 /* go */ -#define CSR_V_IE 6 /* interrupt enable */ -#define CSR_V_DONE 7 /* done */ -#define CSR_V_BUSY 11 /* busy */ -#define CSR_V_ERR 15 /* error */ -#define CSR_GO (1u << CSR_V_GO) -#define CSR_IE (1u << CSR_V_IE) -#define CSR_DONE (1u << CSR_V_DONE) -#define CSR_BUSY (1u << CSR_V_BUSY) -#define CSR_ERR (1u << CSR_V_ERR) - - -#define clear_virq(_callback, _csr, _ie, _intrq) \ - if ((_csr) & (_ie)) { (_intrq) = CLEAR_LINE; } - -#define raise_virq(_callback, _csr, _ie, _intrq) \ - if ((_csr) & (_ie)) { (_intrq) = ASSERT_LINE; _callback (ASSERT_LINE); } - - -#define UPDATE_16BIT(_storage, _data, _mask) \ - do { *_storage = ((*_storage & ~_mask) | (_data & _mask)); } while (0) - - -#endif /* PDP11_H_ */ -- cgit v1.2.3 From 8cbcffd9b4f60cac4770a04afaf0c1cd34893faa Mon Sep 17 00:00:00 2001 From: Robbbert Date: Wed, 8 Jul 2020 02:57:32 +1000 Subject: gba.xml: line 41662: fixed validation error --- hash/gba.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/gba.xml b/hash/gba.xml index dcf26139ef7..b03cffb908a 100644 --- a/hash/gba.xml +++ b/hash/gba.xml @@ -41659,7 +41659,7 @@ license:CC0 Sintax - + -- cgit v1.2.3 From 2a71385020eec30616195fecdeb8468add429e6b Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 7 Jul 2020 19:35:51 +0200 Subject: pdp11.h: make the enum uint16_t --- src/devices/machine/pdp11.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/devices/machine/pdp11.h b/src/devices/machine/pdp11.h index 7438184b39d..98b7553a17c 100644 --- a/src/devices/machine/pdp11.h +++ b/src/devices/machine/pdp11.h @@ -2,16 +2,17 @@ // copyright-holders:Sergey Svishchev /***************************************************************************** * - * includes/pdp11.h + * machine/pdp11.h * ****************************************************************************/ -#ifndef PDP11_H_ -#define PDP11_H_ +#ifndef MAME_MACHINE_PDP11_H_ +#define MAME_MACHINE_PDP11_H_ // bit definitions for generic device CSR -enum { +enum : uint16_t +{ CSR_GO = 0000001, CSR_IE = 0000100, // interrupt enable CSR_DONE = 0000200, @@ -31,4 +32,4 @@ enum { do { *_storage = ((*_storage & ~_mask) | (_data & _mask)); } while (0) -#endif /* PDP11_H_ */ +#endif /* MAME_MACHINE_PDP11_H_ */ -- cgit v1.2.3 From cbbde1da7410a1cbd3e8dfeec6b697b4389d0280 Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Tue, 7 Jul 2020 19:48:57 +0200 Subject: -cmi01a: Checkpoint so Phil can have a look, nw --- src/mame/audio/cmi01a.cpp | 422 +++++++++++++++++++++++++++++++++++++--------- src/mame/audio/cmi01a.h | 73 ++++++-- src/mame/drivers/cmi.cpp | 16 +- 3 files changed, 402 insertions(+), 109 deletions(-) diff --git a/src/mame/audio/cmi01a.cpp b/src/mame/audio/cmi01a.cpp index 3fc6196addf..5b2be6f191c 100644 --- a/src/mame/audio/cmi01a.cpp +++ b/src/mame/audio/cmi01a.cpp @@ -14,9 +14,77 @@ #define MASTER_OSCILLATOR XTAL(34'291'712) - DEFINE_DEVICE_TYPE(CMI01A_CHANNEL_CARD, cmi01a_device, "cmi_01a", "Fairlight CMI-01A Channel Card") + +const uint8_t cmi01a_device::s_7497_rate_table[64][64] = +{ + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1}, + {1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1}, + {1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1}, + {1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1}, + {1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1}, + {1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1}, + {1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1}, + {1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1}, + {1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1}, + {1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1}, + {1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1}, + {1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1}, + {1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1}, + {1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1}, + {1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1}, + {1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1}, + {1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1}, + {1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1}, + {1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1}, + {1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1}, + {1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1}, + {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1}, + {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1}, + {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1}, + {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1}, + {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1}, + {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1}, + {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1}, + {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1}, + {0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1}, + {0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1}, + {0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1}, + {0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1}, + {0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1}, + {0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1}, + {0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1}, + {0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1}, + {0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1}, + {0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1}, + {0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1}, + {0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1}, + {0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1}, + {0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1} +}; + cmi01a_device::cmi01a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, CMI01A_CHANNEL_CARD, tag, owner, clock) , device_sound_interface(mconfig, *this) @@ -33,20 +101,26 @@ void cmi01a_device::device_add_mconfig(machine_config &config) { PIA6821(config, m_pia[0], 0); // pia_cmi01a_1_config m_pia[0]->readcb1_handler().set(FUNC(cmi01a_device::tri_r)); + m_pia[0]->readpa_handler().set(FUNC(cmi01a_device::ws_dir_r)); m_pia[0]->writepa_handler().set(FUNC(cmi01a_device::ws_dir_w)); m_pia[0]->writepb_handler().set(FUNC(cmi01a_device::rp_w)); - m_pia[0]->ca2_handler().set(FUNC(cmi01a_device::pia_0_ca2_w)); + m_pia[0]->ca2_handler().set(FUNC(cmi01a_device::load_w)); m_pia[0]->cb2_handler().set(FUNC(cmi01a_device::pia_0_cb2_w)); m_pia[0]->irqa_handler().set(m_irq_merger, FUNC(input_merger_device::in_w<0>)); m_pia[0]->irqb_handler().set(m_irq_merger, FUNC(input_merger_device::in_w<1>)); + //if (m_channel == 5) m_pia[0]->enable_logging(); PIA6821(config, m_pia[1], 0); // pia_cmi01a_2_config m_pia[1]->readca1_handler().set(FUNC(cmi01a_device::zx_r)); - m_pia[1]->readca2_handler().set(FUNC(cmi01a_device::eosi_r)); + m_pia[1]->readcb1_handler().set(FUNC(cmi01a_device::eosi_r)); + m_pia[1]->readpa_handler().set(FUNC(cmi01a_device::pia_1_a_r)); m_pia[1]->writepa_handler().set(FUNC(cmi01a_device::pia_1_a_w)); m_pia[1]->writepb_handler().set(FUNC(cmi01a_device::pia_1_b_w)); + m_pia[1]->ca2_handler().set(FUNC(cmi01a_device::eload_w)); + m_pia[1]->cb2_handler().set(FUNC(cmi01a_device::wpe_w)); m_pia[1]->irqa_handler().set(m_irq_merger, FUNC(input_merger_device::in_w<2>)); m_pia[1]->irqb_handler().set(m_irq_merger, FUNC(input_merger_device::in_w<3>)); + //if (m_channel == 5) m_pia[1]->enable_logging(); PTM6840(config, m_ptm, DERIVED_CLOCK(1, 1)); // ptm_cmi01a_config m_ptm->o1_callback().set(FUNC(cmi01a_device::ptm_o1)); @@ -60,25 +134,28 @@ void cmi01a_device::device_add_mconfig(machine_config &config) void cmi01a_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { - if ((m_status & CHANNEL_STATUS_RUN) && m_vol_latch) + if (m_run) { - int length = samples; - int mask = (m_status & CHANNEL_STATUS_LOAD) ? 0x7fff : 0x7f; + int mask = m_load ? 0x7fff : 0x7f; int addr = m_segment_cnt; uint8_t *wave_ptr = &m_wave_ram[m_segment_cnt & 0x3fff]; stream_sample_t *buf = outputs[0]; - while (length--) + while (samples--) { - *buf++ = wave_ptr[addr++ & 0x3fff] << 6; + const uint8_t sample8 = wave_ptr[addr++ & 0x3fff]; + int32_t sample = (int32_t)(int8_t)(sample8 ^ 0x80) * m_env * m_vol_latch; + if (m_channel == 5) printf("%08x:%02x:%02x:%02x", (uint32_t)sample, sample8, m_env, m_vol_latch); + *buf++ = (int16_t)(sample >> 8); } + if (m_channel == 5) printf("\n"); m_segment_cnt = (m_segment_cnt & ~mask) | addr; } else { - memset(outputs[0], 0, samples); + memset(outputs[0], 0, samples * sizeof(stream_sample_t)); } } @@ -93,6 +170,7 @@ void cmi01a_device::device_start() m_zx_timer = timer_alloc(TIMER_ZX); m_eosi_timer = timer_alloc(TIMER_EOSI); + m_bcas_timer = timer_alloc(TIMER_BCAS); m_zx_timer->adjust(attotime::never); m_eosi_timer->adjust(attotime::never); @@ -100,6 +178,8 @@ void cmi01a_device::device_start() m_stream = stream_alloc(0, 1, 44100); m_ptm->set_external_clocks(clock() / 8, clock() / 4, clock() / 4); + + } void cmi01a_device::device_reset() @@ -110,66 +190,151 @@ void cmi01a_device::device_reset() m_segment_cnt = 0; m_new_addr = 0; - m_env_dir_ctrl = 0; m_vol_latch = 0; m_flt_latch = 0; m_rp = 0; m_ws = 0; m_dir = 0; + m_env = 0; m_pia0_cb2_state = 1; + m_bcas_q1_ticks = 2; + m_bcas_q1 = 0; + m_bcas_q2_ticks = 4; + m_bcas_q2 = 0; m_zx_flag = 0; m_freq = 0.0; - m_status = 0; m_ptm_o1 = 0; m_ptm_o2 = 0; m_ptm_o3 = 0; + + m_load = true; + m_run = false; + m_gzx = true; + m_nwpe = true; + m_tri = true; + m_pia1_ca2 = false; + m_eclk = false; + m_env_clk = false; + m_ediv_out = true; + m_ediv_rate = 3; + m_ediv_count = 0; + + m_pitch = 0; + m_octave = 0; m_zx_timer->adjust(attotime::never); m_eosi_timer->adjust(attotime::never); + //m_bcas_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock())); + m_bcas_timer->adjust(attotime::never); } -WRITE_LINE_MEMBER( cmi01a_device::pia_0_ca2_w ) +void cmi01a_device::pulse_zcint() { - m_status &= ~CHANNEL_STATUS_LOAD; + m_pia[0]->ca1_w(0); + m_pia[0]->ca1_w(1); + + pulse_gzx(); +} - if (!state) +void cmi01a_device::pulse_gzx() +{ + if (!m_pia1_ca2) { - m_status |= CHANNEL_STATUS_LOAD; + return; + } - m_segment_cnt = 0x4000 | ((m_pia[0]->a_output() & 0x7f) << 7); - m_new_addr = 1; - m_pia[1]->cb1_w(1); + reset_waveform_segment(); + m_env = m_rp; + m_env_dir = m_dir; +} + +void cmi01a_device::reset_waveform_segment() +{ + m_segment_cnt &= 0x007f; + m_segment_cnt = 0x4000 | (m_ws << 7); +} + +void cmi01a_device::load_w(int state) +{ + const bool old_load = m_load; + m_load = state ? false : true; + + if (old_load != m_load) + { + check_segment_load(); } } +void cmi01a_device::check_segment_load() +{ + bool run_strobe = false; + if (m_load != m_run) + { + run_strobe = true; + m_segment_cnt &= ~0x7f; + } + + if (!run_strobe) + { + return; + } + + if (!m_nwpe) + { + reset_waveform_segment(); + } + + if (m_channel == 5) LOG("CH%d beginning load with m_segment_cnt %04x\n", m_channel, m_segment_cnt); + m_pia[1]->cb1_w(1); +} + void cmi01a_device::pia_1_a_w(uint8_t data) { -// top two + m_pitch &= 0x0ff; + m_pitch |= (data & 3) << 8; + m_octave = (data >> 2) & 0x0f; +} + +uint8_t cmi01a_device::pia_1_a_r() +{ + return ((m_pitch >> 8) & 3) | (m_octave << 2); } void cmi01a_device::pia_1_b_w(uint8_t data) { + m_pitch &= 0xf00; + m_pitch |= data; } void cmi01a_device::rp_w(uint8_t data) { m_rp = data; + m_ediv_rate = ((m_rp >> 2) & 0x3c) | 0x03; + if (m_channel == 5) LOG("CH%d: Initial ramp value: %02x, EDIV divider: %02x\n", m_channel, data, m_ediv_rate); } void cmi01a_device::ws_dir_w(uint8_t data) { + if (m_channel == 5) LOG("CH%d: WS/DIR write: %02x\n", m_channel, data); m_ws = data & 0x7f; m_dir = (data >> 7) & 1; } +uint8_t cmi01a_device::ws_dir_r() +{ + return m_ws | (m_dir << 7); +} + READ_LINE_MEMBER( cmi01a_device::tri_r ) { - bool top_terminal_count = (m_dir == ENV_DIR_UP && m_rp == 0); - bool bottom_terminal_count = (m_dir == ENV_DIR_DOWN && m_rp == 0xff); - return (top_terminal_count || bottom_terminal_count) ? 0 : 1; + const bool top_terminal_count = (m_env_dir == ENV_DIR_UP && m_env == 0xff); + const bool bottom_terminal_count = (m_env_dir == ENV_DIR_DOWN && m_env == 0x00); + const int state = (top_terminal_count || bottom_terminal_count) ? 1 : 0; + if (m_channel == 5) LOG("CH%d: PIA0 CB1 Read (/TRI): %d\n", m_channel, state); + return state; } WRITE_LINE_MEMBER( cmi01a_device::cmi01a_irq ) @@ -187,14 +352,36 @@ void cmi01a_device::device_timer(emu_timer &timer, device_timer_id id, int param case TIMER_EOSI: eosi_timer_cb(); break; + case TIMER_BCAS: + bcas_tick(); } } +void cmi01a_device::reset_bcas_counter() +{ + m_bcas_q1_ticks = 2; + m_bcas_q1 = 0; + m_bcas_q2_ticks = 4; + m_bcas_q2 = 0; + + m_ptm->set_clock(0, 0); + m_ptm->set_clock(1, 0); + m_ptm->set_clock(2, 0); +} + +void cmi01a_device::bcas_tick() +{ + if (m_ptm_o1 != m_zx_ff) + return; +} + void cmi01a_device::eosi_timer_cb() { + m_stream->update(); m_segment_cnt &= ~0x4000; + m_pia[1]->cb1_w(0); -// printf("End of sound\n"); + if (m_channel == 5) LOG("CH%d: End of sound\n", m_channel); } void cmi01a_device::zx_timer_cb() @@ -210,19 +397,71 @@ void cmi01a_device::zx_timer_cb() { // Pulse /ZCINT if the O1 output of the PTM has changed if (m_ptm_o1 != m_zx_ff) - m_pia[0]->ca1_w(0); + { + reset_bcas_counter(); + pulse_zcint(); + } m_zx_ff = m_ptm_o1; - m_pia[0]->ca1_w(1); + } + + update_eclk(); +} + +void cmi01a_device::update_eclk() +{ + bool eclk = (m_ptm_o2 && m_zx_ff) || (m_ptm_o3 && !m_zx_ff); + if (m_channel == 5) logerror("CH%d: eclk = (%d && %d) || (%d && %d) = %d\n", m_channel, m_ptm_o2, m_zx_ff, m_ptm_o3, m_zx_ff ? 0 : 1, eclk ? 1 : 0); + m_stream->update(); + set_eclk(eclk); +} - // Update ECLK - bool eclk = (m_ptm_o2 && m_zx_ff) || (m_ptm_o3 && !m_zx_ff); - set_eclk(eclk); +void cmi01a_device::wpe_w(int state) +{ + m_nwpe = state ? false : true; +} + +void cmi01a_device::eload_w(int state) +{ + if (m_channel == 5) LOG("CH%d PIA1 CA2: %d\n", m_channel, state); + m_pia1_ca2 = state; +} + +void cmi01a_device::clock_envelope() +{ + m_stream->update(); + const bool old_tri = m_tri; + if (m_env_dir == ENV_DIR_DOWN) + { + if (m_env > 0) + { + m_env--; + m_ediv_rate = ((m_env >> 2) & 0x3c) | 0x03; + if (m_channel == 5) LOG("CH%d, Clocking envelope down, new rp: %02x\n", m_channel, m_env); + } + m_tri = m_env == 0x00; + } + else + { + if (m_env < 0xff) + { + m_env++; + m_ediv_rate = ((~m_env >> 2) & 0x3c) | 0x03; + if (m_channel == 5) LOG("CH%d, Clocking envelope up, new rp: %02x\n", m_channel, m_env); + } + m_tri = m_env == 0xff; + } + if (old_tri != m_tri) + { + m_pia[0]->cb1_w(m_tri ? 0 : 1); } } void cmi01a_device::tick_ediv() { + if (m_channel == 5) logerror("CH%d ticking ediv, rate: %02x\n", m_channel, m_ediv_rate); + m_ediv_out = s_7497_rate_table[m_ediv_rate][m_ediv_count]; + m_ediv_count = (m_ediv_count + 1) & 0x3f; } void cmi01a_device::set_eclk(bool eclk) @@ -233,7 +472,10 @@ void cmi01a_device::set_eclk(bool eclk) if (old_eclk == m_eclk) return; - tick_ediv(); + if (!old_eclk && m_eclk) + { + tick_ediv(); + } // A B !(A && B) !A || !B // 0 0 1 1 @@ -241,48 +483,49 @@ void cmi01a_device::set_eclk(bool eclk) // 1 0 1 1 // 1 1 0 0 - //const bool load = (m_status & CHANNEL_STATUS_LOAD); - //const bool a = !load || !eclk; - //const bool b = load || m_ediv_out; + const bool a = !m_load || !eclk; + const bool b = m_load || !m_ediv_out; - //const bool div_clk = !a || !b; + const bool old_env_clk = m_env_clk; + m_env_clk = !a || !b; + LOG("CH%d checking envelope: A: !!load(%d) || !eclk(%d) = %d\n", m_channel, m_load ? 0 : 1, eclk ? 0 : 1, a); + LOG("CH%d checking envelope: B: !load(%d) || !eout(%d) = %d\n", m_channel, m_load ? 1 : 0, m_ediv_out ? 0 : 1, b); + LOG("CH%d checking envelope: C: !%d || !%d = %d\n", m_channel, a ? 1 : 0, b ? 1 : 0, m_env_clk ? 1 : 0); + if (!old_env_clk && m_env_clk) + { + clock_envelope(); + } } void cmi01a_device::run_voice() { - int val_a = m_pia[1]->a_output(); - int pitch = ((val_a & 3) << 8) - | m_pia[1]->b_output(); - int o_val = (val_a >> 2) & 0xf; - - LOG("CH%d running voice: PIA1 A output = %02x\n", m_channel, (uint8_t)val_a); - LOG("CH%d running voice: Pitch = %04x\n", m_channel, (uint16_t)pitch); - LOG("CH%d running voice: o_val = %x\n", m_channel, o_val); + if (m_channel == 5) LOG("CH%d running voice: Pitch = %04x\n", m_channel, (uint16_t)m_pitch); + if (m_channel == 5) LOG("CH%d running voice: o_val = %x\n", m_channel, m_octave); int m_tune = m_cmi02_pia[0]->b_output(); - LOG("CH%d running voice: Tuning = %02x\n", m_channel, (uint8_t)m_tune); + if (m_channel == 5) LOG("CH%d running voice: Tuning = %02x\n", m_channel, (uint8_t)m_tune); double mfreq = (double)(0xf00 | m_tune) * ((MASTER_OSCILLATOR.dvalue() / 2.0) / 4096.0); - LOG("CH%d running voice: mfreq = %f (%03x * %f)\n", m_channel, mfreq, 0xf00 | m_tune, (MASTER_OSCILLATOR.dvalue() / 2.0) / 4096.0); + if (m_channel == 5) LOG("CH%d running voice: mfreq = %f (%03x * %f)\n", m_channel, mfreq, 0xf00 | m_tune, (MASTER_OSCILLATOR.dvalue() / 2.0) / 4096.0); - double cfreq = ((double)(0x800 | (pitch << 1)) * mfreq) / 4096.0; - LOG("CH%d running voice: cfreq = %f (%04x * %f) / 4096.0\n", m_channel, cfreq, 0x800 | (pitch << 1), mfreq, cfreq); + double cfreq = ((double)(0x800 | (m_pitch << 1)) * mfreq) / 4096.0; + if (m_channel == 5) LOG("CH%d running voice: cfreq = %f (%04x * %f) / 4096.0\n", m_channel, cfreq, 0x800 | (m_pitch << 1), mfreq, cfreq); if (cfreq > MASTER_OSCILLATOR.dvalue()) { - LOG("CH%d Ignoring voice run due to excessive frequency\n"); + if (m_channel == 5) LOG("CH%d Ignoring voice run due to excessive frequency\n"); return; } - LOG("CH%d Running voice\n", m_channel); + if (m_channel == 5) LOG("CH%d Running voice\n", m_channel); /* Octave register enabled? */ - if (!BIT(o_val, 3)) - cfreq /= (double)(2 << ((7 ^ o_val) & 7)); + if (!BIT(m_octave, 3)) + cfreq /= (double)(2 << ((7 ^ m_octave) & 7)); cfreq /= 16.0; m_freq = cfreq; - LOG("CH%d running voice: Final freq: %f\n", m_channel, m_freq); + if (m_channel == 5) LOG("CH%d running voice: Final freq: %f\n", m_channel, m_freq); m_stream->set_sample_rate(cfreq); @@ -291,10 +534,10 @@ void cmi01a_device::run_voice() attotime zx_period = attotime::from_ticks(64, cfreq); m_zx_timer->adjust(zx_period, 0, zx_period); - if (m_status & CHANNEL_STATUS_LOAD) + if (m_load) { int samples = 0x4000 - (m_segment_cnt & 0x3fff); - LOG("CH%d voice is %04x samples long\n", m_channel, samples); + if (m_channel == 5) LOG("CH%d voice is %04x samples long\n", m_channel, samples); m_eosi_timer->adjust(attotime::from_ticks(samples, cfreq)); } } @@ -303,19 +546,22 @@ WRITE_LINE_MEMBER( cmi01a_device::pia_0_cb2_w ) { int old_state = m_pia0_cb2_state; m_pia0_cb2_state = state; - LOG("CH%d PIA0 CB2: %d\n", m_channel, state); + if (m_channel == 5) LOG("CH%d PIA0 CB2: %d\n", m_channel, state); - //streams_update(); + m_stream->update(); /* RUN */ if (!old_state && m_pia0_cb2_state) { - m_status |= CHANNEL_STATUS_RUN; + m_run = true; + + /* Clear /EOSI */ + m_pia[1]->cb1_w(1); - /* Only reset address counter if /LOAD not asserted */ - if ((m_status & CHANNEL_STATUS_LOAD) == 0) + /* Only reset address counter if LOAD not asserted */ + if (!m_load) { - m_segment_cnt = 0x4000 | ((m_pia[0]->a_output() & 0x7f) << 7); + m_segment_cnt = 0x4000 | (m_ws << 7); m_new_addr = 1; } @@ -334,10 +580,10 @@ WRITE_LINE_MEMBER( cmi01a_device::pia_0_cb2_w ) if (old_state && !m_pia0_cb2_state) { - m_status &= ~CHANNEL_STATUS_RUN; + m_run = false; - /* Clear /EOSI */ - m_pia[1]->cb1_w(1); + /* Set /EOSI */ + m_pia[1]->cb1_w(0); m_ptm->set_g1(1); m_ptm->set_g2(1); @@ -358,16 +604,16 @@ void cmi01a_device::update_wave_addr(int inc) ++m_segment_cnt; /* Update end of sound interrupt flag */ - //m_pia[1]->cb1_w((m_segment_cnt & 0x4000) >> 14); + m_pia[1]->cb1_w((m_segment_cnt & 0x4000) >> 14); /* TODO Update zero crossing flag */ - //m_pia[1]->ca1_w((m_segment_cnt & 0x40) >> 6); + m_pia[1]->ca1_w((m_segment_cnt & 0x40) >> 6); /* Clock a latch on a transition */ if ((old_cnt & 0x40) && !(m_segment_cnt & 0x40)) { - //m_pia[1]->ca2_w(1); - //m_pia[1]->ca2_w(0); + m_pia[1]->ca2_w(1); + m_pia[1]->ca2_w(0); } /* Zero crossing interrupt is a pulse */ @@ -381,23 +627,26 @@ WRITE_LINE_MEMBER( cmi01a_device::ptm_irq ) WRITE_LINE_MEMBER( cmi01a_device::ptm_o1 ) { m_ptm_o1 = state; - // TODO: Update ECLK + if (m_ptm_o1 != m_zx_ff) + reset_bcas_counter(); + update_eclk(); } WRITE_LINE_MEMBER( cmi01a_device::ptm_o2 ) { m_ptm_o2 = state; - // TODO: Update ECLK + update_eclk(); } WRITE_LINE_MEMBER( cmi01a_device::ptm_o3 ) { m_ptm_o3 = state; - // TODO: Update ECLK + update_eclk(); } READ_LINE_MEMBER( cmi01a_device::eosi_r ) { + if (m_channel == 5) LOG("CH%d PIA1 CB1 Read: %d\n", m_channel, BIT(m_segment_cnt, 14)); return BIT(m_segment_cnt, 14); } @@ -408,11 +657,10 @@ READ_LINE_MEMBER( cmi01a_device::zx_r ) void cmi01a_device::write(offs_t offset, uint8_t data) { - LOG("%s: channel card %d write: %02x = %02x\n", machine().describe_context(), m_channel, offset, data); - switch (offset) { case 0x0: + if (m_channel == 5) LOG("%s: CH%d Porthole Write to %04x: %02x\n", machine().describe_context(), m_channel, m_segment_cnt & 0x3fff, data); if (m_new_addr) m_new_addr = 0; @@ -421,28 +669,32 @@ void cmi01a_device::write(offs_t offset, uint8_t data) break; case 0x3: - m_env_dir_ctrl = ENV_DIR_DOWN; + if (m_channel == 5) LOG("%s: CH%d set Envelope Dir Down (%02x)\n", machine().describe_context(), m_channel, data); + m_env_dir = ENV_DIR_DOWN; break; case 0x4: - m_env_dir_ctrl = ENV_DIR_UP; + if (m_channel == 5) LOG("%s: CH%d set Envelope Dir Up (%02x)\n", machine().describe_context(), m_channel, data); + m_env_dir = ENV_DIR_UP; break; case 0x5: + if (m_channel == 5) LOG("%s: CH%d set Volume Latch: %02x\n", machine().describe_context(), m_channel, data); m_vol_latch = data; break; case 0x6: + if (m_channel == 5) LOG("%s: CH%d set Filter Latch: %02x\n", machine().describe_context(), m_channel, data); m_flt_latch = data; break; case 0x8: case 0x9: case 0xa: case 0xb: - LOG("CH%d PIA0 Write: %d = %02x\n", m_channel, offset & 3, data); + if (m_channel == 5) LOG("CH%d PIA0 Write: %d = %02x\n", m_channel, offset & 3, data); m_pia[0]->write(offset & 3, data); break; case 0xc: case 0xd: case 0xe: case 0xf: - LOG("CH%d PIA1 Write: %d = %02x\n", m_channel, (BIT(offset, 0) << 1) | BIT(offset, 1), data); + if (m_channel == 5) LOG("CH%d PIA1 Write: %d = %02x\n", m_channel, (BIT(offset, 0) << 1) | BIT(offset, 1), data); m_pia[1]->write((BIT(offset, 0) << 1) | BIT(offset, 1), data); break; @@ -456,13 +708,13 @@ void cmi01a_device::write(offs_t offset, uint8_t data) if ((offset == 5 || offset == 7) && (data < 0x30)) data = 0xff; - LOG("CH%d PTM Write: %d = %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data); + if (m_channel == 5) LOG("CH%d PTM Write: %d = %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data); m_ptm->write((a2 << 2) | (a1 << 1) | a0, data); break; } default: - LOG("%s: Unknown channel card write to E0%02X = %02X\n", machine().describe_context(), offset, data); + if (m_channel == 5) LOG("%s: Unknown channel card write to E0%02X = %02X\n", machine().describe_context(), offset, data); break; } } @@ -483,29 +735,33 @@ uint8_t cmi01a_device::read(offs_t offset) break; } data = m_wave_ram[m_segment_cnt & 0x3fff]; + if (m_channel == 5) LOG("%s: CH%d Porthole Read: %02x\n", machine().describe_context(), m_channel, data); update_wave_addr(1); break; case 0x3: - m_env_dir_ctrl = ENV_DIR_DOWN; + if (m_channel == 5) LOG("%s: CH%d set Envelope Dir Down (R)\n", machine().describe_context(), m_channel); + m_env_dir = ENV_DIR_DOWN; break; case 0x4: - m_env_dir_ctrl = ENV_DIR_UP; + if (m_channel == 5) LOG("%s: CH%d set Envelope Dir Up (R)\n", machine().describe_context(), m_channel); + m_env_dir = ENV_DIR_UP; break; case 0x5: + if (m_channel == 5) LOG("%s: CH%d read Volume Latch (ff)\n", machine().describe_context(), m_channel); data = 0xff; break; case 0x8: case 0x9: case 0xa: case 0xb: data = m_pia[0]->read(offset & 3); - LOG("CH%d PIA0 Read: %d = %02x\n", m_channel, offset & 3, data); + if (m_channel == 5) LOG("CH%d PIA0 Read: %d = %02x\n", m_channel, offset & 3, data); break; case 0xc: case 0xd: case 0xe: case 0xf: data = m_pia[1]->read((BIT(offset, 0) << 1) | BIT(offset, 1)); - LOG("CH%d PIA1 Read: %d = %02x\n", m_channel, (BIT(offset, 0) << 1) | BIT(offset, 1), data); + if (m_channel == 5) LOG("CH%d PIA1 Read: %d = %02x\n", m_channel, (BIT(offset, 0) << 1) | BIT(offset, 1), data); break; case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: @@ -516,16 +772,16 @@ uint8_t cmi01a_device::read(offs_t offset) data = m_ptm->read((a2 << 2) | (a1 << 1) | a0); - LOG("CH%d PTM Read: %d = %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data); + if (m_channel == 5) LOG("CH%d PTM Read: %d = %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data); break; } default: - LOG("%s: Unknown channel card %d read from E0%02X\n", machine().describe_context(), m_channel, offset); + if (m_channel == 5) LOG("%s: Unknown channel card %d read from E0%02X\n", machine().describe_context(), m_channel, offset); break; } - LOG("%s: channel card %d read: %02x = %02x\n", machine().describe_context(), m_channel, offset, data); + if (m_channel == 5) LOG("%s: channel card %d read: %02x = %02x\n", machine().describe_context(), m_channel, offset, data); return data; } diff --git a/src/mame/audio/cmi01a.h b/src/mame/audio/cmi01a.h index 60503cc90ff..52626887ce9 100644 --- a/src/mame/audio/cmi01a.h +++ b/src/mame/audio/cmi01a.h @@ -13,8 +13,8 @@ #include "machine/6840ptm.h" #include "machine/input_merger.h" -#define ENV_DIR_DOWN 0 -#define ENV_DIR_UP 1 +#define ENV_DIR_UP 0 +#define ENV_DIR_DOWN 1 #define CHANNEL_STATUS_LOAD 1 #define CHANNEL_STATUS_RUN 2 @@ -45,6 +45,7 @@ protected: static const device_timer_id TIMER_ZX = 0; static const device_timer_id TIMER_EOSI = 1; + static const device_timer_id TIMER_BCAS = 2; required_device m_irq_merger; required_device_array m_pia; @@ -57,8 +58,20 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(cmi01a_irq); + void bcas_tick(); + void reset_bcas_counter(); + + void clock_envelope(); void tick_ediv(); void set_eclk(bool eclk); + void update_eclk(); + + void pulse_zcint(); + void pulse_gzx(); + void reset_waveform_segment(); + void check_segment_load(); + void wpe_w(int state); + void load_w(int state); void zx_timer_cb(); void eosi_timer_cb(); @@ -72,37 +85,59 @@ private: emu_timer * m_eosi_timer; + emu_timer * m_bcas_timer; + std::unique_ptr m_wave_ram; uint16_t m_segment_cnt; uint8_t m_new_addr; // Flag - uint8_t m_env_dir_ctrl; uint8_t m_vol_latch; uint8_t m_flt_latch; - uint8_t m_rp; - uint8_t m_ws; - int m_dir; - int m_pia0_cb2_state; - - double m_freq; - uint8_t m_status; - - int m_ptm_o1; - int m_ptm_o2; - int m_ptm_o3; - - bool m_eclk; - bool m_ediv_out; + uint8_t m_rp; + uint8_t m_ws; + int m_dir; + int m_env_dir; + uint8_t m_env; + int m_pia0_cb2_state; + + uint8_t m_bcas_q1_ticks; + uint8_t m_bcas_q1; + uint8_t m_bcas_q2_ticks; + uint8_t m_bcas_q2; + + double m_freq; + + int m_ptm_o1; + int m_ptm_o2; + int m_ptm_o3; + + bool m_load; + bool m_run; + bool m_gzx; + bool m_nwpe; + bool m_tri; + bool m_pia1_ca2; + + bool m_eclk; + bool m_env_clk; + bool m_ediv_out; + uint8_t m_ediv_rate; + uint8_t m_ediv_count; + + uint16_t m_pitch; + uint8_t m_octave; devcb_write_line m_irq_cb; void rp_w(uint8_t data); void ws_dir_w(uint8_t data); + uint8_t ws_dir_r(); DECLARE_READ_LINE_MEMBER( tri_r ); - DECLARE_WRITE_LINE_MEMBER( pia_0_ca2_w ); DECLARE_WRITE_LINE_MEMBER( pia_0_cb2_w ); + DECLARE_WRITE_LINE_MEMBER( eload_w ); DECLARE_READ_LINE_MEMBER( eosi_r ); DECLARE_READ_LINE_MEMBER( zx_r ); + uint8_t pia_1_a_r(); void pia_1_a_w(uint8_t data); void pia_1_b_w(uint8_t data); @@ -110,6 +145,8 @@ private: DECLARE_WRITE_LINE_MEMBER( ptm_o2 ); DECLARE_WRITE_LINE_MEMBER( ptm_o3 ); DECLARE_WRITE_LINE_MEMBER( ptm_irq ); + + static const uint8_t s_7497_rate_table[64][64]; }; // device type definition diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp index 76f5435da7c..3a6b3d0dcfb 100644 --- a/src/mame/drivers/cmi.cpp +++ b/src/mame/drivers/cmi.cpp @@ -2281,28 +2281,28 @@ void cmi_state::cmi2x(machine_config &config) // Channel cards cmi01a_device &cmi01a_0(CMI01A_CHANNEL_CARD(config, "cmi01a_0", SYSTEM_CAS_CLOCK, 0)); - cmi01a_0.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_0.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_0.irq_callback().set(FUNC(cmi_state::channel_irq<0>)); cmi01a_device &cmi01a_1(CMI01A_CHANNEL_CARD(config, "cmi01a_1", SYSTEM_CAS_CLOCK, 1)); - cmi01a_1.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_1.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_1.irq_callback().set(FUNC(cmi_state::channel_irq<1>)); cmi01a_device &cmi01a_2(CMI01A_CHANNEL_CARD(config, "cmi01a_2", SYSTEM_CAS_CLOCK, 2)); - cmi01a_2.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_2.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_2.irq_callback().set(FUNC(cmi_state::channel_irq<2>)); cmi01a_device &cmi01a_3(CMI01A_CHANNEL_CARD(config, "cmi01a_3", SYSTEM_CAS_CLOCK, 3)); - cmi01a_3.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_3.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_3.irq_callback().set(FUNC(cmi_state::channel_irq<3>)); cmi01a_device &cmi01a_4(CMI01A_CHANNEL_CARD(config, "cmi01a_4", SYSTEM_CAS_CLOCK, 4)); - cmi01a_4.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_4.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_4.irq_callback().set(FUNC(cmi_state::channel_irq<4>)); cmi01a_device &cmi01a_5(CMI01A_CHANNEL_CARD(config, "cmi01a_5", SYSTEM_CAS_CLOCK, 5)); - cmi01a_5.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_5.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_5.irq_callback().set(FUNC(cmi_state::channel_irq<5>)); cmi01a_device &cmi01a_6(CMI01A_CHANNEL_CARD(config, "cmi01a_6", SYSTEM_CAS_CLOCK, 6)); - cmi01a_6.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_6.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_6.irq_callback().set(FUNC(cmi_state::channel_irq<6>)); cmi01a_device &cmi01a_7(CMI01A_CHANNEL_CARD(config, "cmi01a_7", SYSTEM_CAS_CLOCK, 7)); - cmi01a_7.add_route(ALL_OUTPUTS, "mono", 0.25); + cmi01a_7.add_route(ALL_OUTPUTS, "mono", 0.12); cmi01a_7.irq_callback().set(FUNC(cmi_state::channel_irq<7>)); } -- cgit v1.2.3 From 83fea6598b9b03042a9cbb87d9d90aa1e6d6fd97 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 7 Jul 2020 20:48:19 +0200 Subject: epos: added IGMO's color prom, palette is now correct [Andrew Welburn, Craig Anstett] --- src/mame/drivers/epos.cpp | 62 +++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/src/mame/drivers/epos.cpp b/src/mame/drivers/epos.cpp index 077668be60f..783c06b6e31 100644 --- a/src/mame/drivers/epos.cpp +++ b/src/mame/drivers/epos.cpp @@ -56,7 +56,7 @@ void epos_state::dealer_decrypt_rom(offs_t offset, uint8_t data) else m_counter = (m_counter - 1) & 0x03; -// logerror("PC %08x: ctr=%04x\n",m_maincpu->pc(), m_counter); + //logerror("PC %08x: ctr=%04x\n",m_maincpu->pc(), m_counter); membank("bank1")->set_entry(m_counter); @@ -85,6 +85,7 @@ void epos_state::dealer_map(address_map &map) map(0x8000, 0xffff).ram().share("videoram"); } + /************************************* * * Main CPU port handlers @@ -149,6 +150,7 @@ void epos_state::flip_screen_w(uint8_t data) m_ay_porta_multiplex = BIT(data, 6); } + /************************************* * * Port definitions @@ -160,11 +162,9 @@ void epos_state::flip_screen_w(uint8_t data) the processor if an unexpected value is read. */ static INPUT_PORTS_START( megadon ) + // There are odd port mappings (old=new) + // 02=10, 04=40, 08=02, 10=20, 20=04, 40=08 PORT_START("DSW") - -// There are odd port mappings (old=new) -// 02=10, 04=40, 08=02, 10=20, 20=04, 40=08 - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) @@ -212,11 +212,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( suprglob ) + // There are odd port mappings (old=new) + // 02=10, 04=40, 08=20, 10=02, 20=04, 40=08 PORT_START("DSW") - -// There are odd port mappings (old=new) -// 02=10, 04=40, 08=20, 10=02, 20=04, 40=08 - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) @@ -267,11 +265,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( igmo ) + // There are odd port mappings (old=new) + // 02=10, 04=40, 08=20, 10=02, 20=04, 40=08 PORT_START("DSW") - -// There are odd port mappings (old=new) -// 02=10, 04=40, 08=20, 10=02, 20=04, 40=08 - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) @@ -320,12 +316,11 @@ INPUT_PORTS_END static INPUT_PORTS_START( catapult ) - PORT_INCLUDE(igmo) - PORT_MODIFY("DSW") - -// There are odd port mappings (old=new) -// 02=08, 04=20, 08=40, 10=02, 20=10, 40=04 + PORT_INCLUDE( igmo ) + // There are odd port mappings (old=new) + // 02=08, 04=20, 08=40, 10=02, 20=10, 40=04 + PORT_MODIFY("DSW") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) @@ -351,11 +346,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( eeekk ) + // There are odd port mappings (old=new) + // 02=10, 04=40, 08=02, 10=20, 20=04, 40=08 PORT_START("DSW") - -// There are odd port mappings (old=new) -// 02=10, 04=40, 08=02, 10=20, 20=04, 40=08 - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) @@ -456,7 +449,7 @@ static INPUT_PORTS_START( dealer ) INPUT_PORTS_END static INPUT_PORTS_START( beastf ) - PORT_INCLUDE(dealer) + PORT_INCLUDE( dealer ) PORT_MODIFY("INPUTS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY @@ -477,6 +470,7 @@ static INPUT_PORTS_START( beastf ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) INPUT_PORTS_END + /************************************* * * Machine drivers @@ -682,17 +676,17 @@ ROM_END ROM_START( igmo ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "igmo-u10.732", 0x0000, 0x1000, CRC(a9f691a4) SHA1(e3f2dc41bd8760fc52e99b7e9faa12c7cf51ffe0) ) - ROM_LOAD( "igmo-u9.732", 0x1000, 0x1000, CRC(3c133c97) SHA1(002b5aff6b947b6a9cbabeed5be798c1ddf2bda1) ) - ROM_LOAD( "igmo-u8.732", 0x2000, 0x1000, CRC(5692f8d8) SHA1(6ab50775dff49330a85fbfb2d4d4c3a2e54df3d1) ) - ROM_LOAD( "igmo-u7.732", 0x3000, 0x1000, CRC(630ae2ed) SHA1(0c293b6192e703b16ed20c277c706ae90773f477) ) - ROM_LOAD( "igmo-u6.732", 0x4000, 0x1000, CRC(d3f20e1d) SHA1(c0e0b542ac020adc085ec90c2462c6544098447e) ) - ROM_LOAD( "igmo-u5.732", 0x5000, 0x1000, CRC(e26bb391) SHA1(ba0e44c02fbb36e18e0d779d46bb992e6aba6cf1) ) - ROM_LOAD( "igmo-u4.732", 0x6000, 0x1000, CRC(762a4417) SHA1(7fed5221950e3e1ce41c0b4ded44597a242a0177) ) - ROM_LOAD( "igmo-u11.716", 0x7000, 0x0800, CRC(8c675837) SHA1(2725729693960b53ea01ebffa0a81df2cd425890) ) + ROM_LOAD( "u10_igmo_i05134.u10", 0x0000, 0x1000, CRC(a9f691a4) SHA1(e3f2dc41bd8760fc52e99b7e9faa12c7cf51ffe0) ) + ROM_LOAD( "u9_igmo_i05134.u9", 0x1000, 0x1000, CRC(3c133c97) SHA1(002b5aff6b947b6a9cbabeed5be798c1ddf2bda1) ) + ROM_LOAD( "u8_igmo_i05134.u8", 0x2000, 0x1000, CRC(5692f8d8) SHA1(6ab50775dff49330a85fbfb2d4d4c3a2e54df3d1) ) + ROM_LOAD( "u7_igmo_i05134.u7", 0x3000, 0x1000, CRC(630ae2ed) SHA1(0c293b6192e703b16ed20c277c706ae90773f477) ) + ROM_LOAD( "u6_igmo_i05134.u6", 0x4000, 0x1000, CRC(d3f20e1d) SHA1(c0e0b542ac020adc085ec90c2462c6544098447e) ) + ROM_LOAD( "u5_igmo_i05134.u5", 0x5000, 0x1000, CRC(e26bb391) SHA1(ba0e44c02fbb36e18e0d779d46bb992e6aba6cf1) ) + ROM_LOAD( "u4_igmo_i05134.u4", 0x6000, 0x1000, CRC(762a4417) SHA1(7fed5221950e3e1ce41c0b4ded44597a242a0177) ) + ROM_LOAD( "u11_igmo_i05134.u11", 0x7000, 0x0800, CRC(8c675837) SHA1(2725729693960b53ea01ebffa0a81df2cd425890) ) ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "82s123.u66", 0x0000, 0x0020, NO_DUMP ) /* missing */ + ROM_LOAD( "82s123.u66", 0x0000, 0x0020, CRC(1ba03ffe) SHA1(f5692c06ae6d20c010430c8d08f5c60e78d36dc9) ) ROM_END @@ -708,7 +702,7 @@ ROM_START( eeekk ) ROM_LOAD( "u11_e12063.u11", 0x7000, 0x0800, CRC(417faff0) SHA1(7965155ee32694ea9a10245db73d8beef229408c) ) ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "74s288.u66", 0x0000, 0x0020, CRC(f2078c38) SHA1(7bfd49932a6fd8840514b7af93a64cedb248122d) ) + ROM_LOAD( "74s288.u66", 0x0000, 0x0020, CRC(f2078c38) SHA1(7bfd49932a6fd8840514b7af93a64cedb248122d) ) ROM_END @@ -858,7 +852,7 @@ GAME( 1983, suprglob, 0, epos, suprglob, epos_state, empty_init, ROT270 GAME( 1983, theglob, suprglob, epos, suprglob, epos_state, empty_init, ROT270, "Epos Corporation", "The Glob", MACHINE_SUPPORTS_SAVE ) GAME( 1983, theglob2, suprglob, epos, suprglob, epos_state, empty_init, ROT270, "Epos Corporation", "The Glob (earlier)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, theglob3, suprglob, epos, suprglob, epos_state, empty_init, ROT270, "Epos Corporation", "The Glob (set 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, igmo, 0, epos, igmo, epos_state, empty_init, ROT270, "Epos Corporation", "IGMO", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, igmo, 0, epos, igmo, epos_state, empty_init, ROT270, "Epos Corporation", "IGMO", MACHINE_SUPPORTS_SAVE ) GAME( 1983, eeekk, 0, epos, eeekk, epos_state, empty_init, ROT270, "Epos Corporation", "Eeekk!", MACHINE_SUPPORTS_SAVE ) /* EPOS TRISTAR 9000 PCB based */ -- cgit v1.2.3 From 4999038a1c96da6c6ca5db7bd65484fee0ecf190 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Tue, 7 Jul 2020 14:57:55 -0400 Subject: tvgogo.xml: XML format fixes (nw) --- hash/tvgogo.xml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/hash/tvgogo.xml b/hash/tvgogo.xml index db1b18e9143..7dd99c33cd1 100644 --- a/hash/tvgogo.xml +++ b/hash/tvgogo.xml @@ -105,26 +105,26 @@ _(EU)__|__(US)__|____________|_____________________________________ - - Basketball (EU) - 2005 - Toyquest - - - - - - + + Basketball (EU) + 2005 + Toyquest + + + + + + - - Basketball (US) - 2005 - Toyquest - - - - - - + + Basketball (US) + 2005 + Toyquest + + + + + + -- cgit v1.2.3 From 6a33707cc66f7f1caa2ecbbfbcc80843d9e872d9 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Tue, 7 Jul 2020 13:20:40 -0700 Subject: sgi_mips_hdd: new software list additions (#6915) --- hash/sgi_mips_hdd.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hash/sgi_mips_hdd.xml b/hash/sgi_mips_hdd.xml index f16a286c6bd..e80eab2c153 100644 --- a/hash/sgi_mips_hdd.xml +++ b/hash/sgi_mips_hdd.xml @@ -11,7 +11,7 @@ license:CC0 missing, run setenv -f eaddr 08:00:69:12:34:56 to set the Ethernet interface address, and - setenv -f monitor h + setenv monitor h to enable high resolution mode (1280x1024), then power cycle. Unless otherwise specified, all images are based on default installs of the @@ -62,4 +62,15 @@ license:CC0 + + IRIX 6.5.22 + 2003 + SGI + + + + + + + -- cgit v1.2.3 From be2949066d163f7039898fbe35b41819d04d8659 Mon Sep 17 00:00:00 2001 From: ArcadeShadow Date: Wed, 8 Jul 2020 00:53:11 +0100 Subject: Update ibm5150.xml (#6912) Dragon's Lair (5.25"), Leisure Suit Larry Goes Looking for Love (in Several Wrong Places) (5.25"), Leisure Suit Larry Goes Looking for Love (in Several Wrong Places) (3.5") --- hash/ibm5150.xml | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 117 insertions(+), 7 deletions(-) diff --git a/hash/ibm5150.xml b/hash/ibm5150.xml index b2a1b1ca73f..a8a1c4f7f69 100644 --- a/hash/ibm5150.xml +++ b/hash/ibm5150.xml @@ -688,7 +688,78 @@ Known PC Booter Games Not Dumped, Or Dumped and Lost when Demonlord's Site went - Dragon's Lair + Dragon's Lair (5.25") + 1989 + Merit Software + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dragon's Lair (3.5") 1989 Merit Software @@ -9759,22 +9830,61 @@ has been replaced with an all-zero block. --> - Leisure Suit Larry Goes Looking for Love (In Several Wrong Places) - 1988 - Sierra + Leisure Suit Larry Goes Looking for Love (in Several Wrong Places) (5.25") + 1989 + Sierra On-Line + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Leisure Suit Larry Goes Looking for Love (in Several Wrong Places) (3.5") + 1989 + Sierra On-Line + + - + - + - + -- cgit v1.2.3 From 9775330daef9fc7364229d99793e185382699c56 Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Wed, 8 Jul 2020 05:08:47 +0200 Subject: goldnpkr.cpp: Clean-ups, fixes, updated links, and a new addition. [Roberto Fresca] New working clones ------------------ Jack Potten's Poker (set 13, ICP-1 PCB) [Roberto Fresca, Matt B] --- src/mame/drivers/goldnpkr.cpp | 5660 +++++++++++++++++++++-------------------- src/mame/mame.lst | 1 + 2 files changed, 2841 insertions(+), 2820 deletions(-) diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp index e7d710780dd..6d8f62b2700 100644 --- a/src/mame/drivers/goldnpkr.cpp +++ b/src/mame/drivers/goldnpkr.cpp @@ -28,6 +28,7 @@ * Jack Potten's Poker (set 10, ICP-1 PCB), 198?, Bootleg. * Jack Potten's Poker (set 11, German, W.W.), 198?, Bootleg. * Jack Potten's Poker (set 12, no Double-Up), 198?, Bootleg. + * Jack Potten's Poker (set 13, ICP-1 PCB), 198?, Bootleg. * Jack Potten's Poker (NGold, set 1), 198?, Unknown. * Jack Potten's Poker (NGold, set 2), 198?, Unknown. * Jack Potten's Poker (NGold, set 3), 198?, Unknown. @@ -70,8 +71,10 @@ * Witch Card (Falcon, enhanced sound), 199?, Falcon. * Witch Card (German, WC3050, set 2 ), 1994, Proma. * Witch Card (German, WC3050, 27-4-94), 1994, Proma. + * Witch Card (ICP-1, encrypted), 199?, Unknown. * Witch Game (Video Klein, set 1), 1991, Video Klein. * Witch Game (Video Klein, set 2), 1991, Video Klein. + * Joker Card (witch game), 199?, Unknown. * Jolli Witch (Export, 6T/12T ver 1.57D), 1994, Video Klein?. * Wild Witch (Export, 6T/12T ver 1.57-SP), 1992-2001, Video Klein. * Wild Witch (Export, 6T/12T ver 1.57-TE), 1992-2001, Video Klein. @@ -132,7 +135,8 @@ * Genie (ICP-1, set 1), 198?, Video Fun Games Ltd. * Genie (ICP-1, set 2), 198?, Unknown. * Silver Game, 1983, Unknown. - * Super Double (French), 198?, Karateco. + * Silver Game, 1983, Unknown. + * Bonus Poker, 1984, Galanthis Inc. * "Unknown French poker game", 198?, Unknown. * "Unknown encrypted poker game", 198?, Unknown. * "Unknown Sisteme France Poker", 198?, Sisteme France. @@ -149,11 +153,11 @@ I think "Diamond Poker Double Up" from Bonanza Enterprises should run on this hardware too. - http://www.arcadeflyers.com/?page=thumbs&id=4539 + https://flyers.arcade-museum.com/?page=thumbs&db=videodb&id=4539 Big-Boy and Mini-Boy are different sized cabinets for Bonanza Enterprises games. - http://www.arcadeflyers.com/?page=thumbs&id=4616 - http://www.arcadeflyers.com/?page=thumbs&id=4274 + https://flyers.arcade-museum.com/?page=thumbs&db=videodb&id=4616 + https://flyers.arcade-museum.com/?page=thumbs&db=videodb&id=4274 Preliminary Notes (pmpoker): @@ -1492,8 +1496,8 @@ TILE_GET_INFO_MEMBER(goldnpkr_state::get_bg_tile_info) int attr = m_colorram[tile_index]; int code = ((attr & 1) << 8) | m_videoram[tile_index]; - int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */ - int color = (attr & 0x3c) >> 2; /* bits 2-3-4-5 for color */ + int bank = (attr & 0x02) >> 1; // bit 1 switch the gfx banks + int color = (attr & 0x3c) >> 2; // bits 2-3-4-5 for color tileinfo.set(bank, code, color, 0); } @@ -1510,8 +1514,8 @@ TILE_GET_INFO_MEMBER(goldnpkr_state::wcrdxtnd_get_bg_tile_info) int attr = m_colorram[tile_index]; int code = ((attr & 1) << 8) | m_videoram[tile_index]; - int bank = (attr & 0x03) + ((attr & 0xc0) >> 4); /* bits 0, 1, 6 & 7 switch the gfx banks */ - int color = (attr & 0x3c) >> 2; /* bits 2-3-4-5 for color */ + int bank = (attr & 0x03) + ((attr & 0xc0) >> 4); // bits 0, 1, 6 & 7 switch the gfx banks + int color = (attr & 0x3c) >> 2; // bits 2-3-4-5 for color tileinfo.set(bank, code, color, 0); } @@ -1742,16 +1746,16 @@ void goldnpkr_state::super21p_palette(palette_device &palette) const */ uint8_t goldnpkr_state::goldnpkr_mux_port_r() { - switch( m_mux_data & 0xf0 ) /* bits 4-7 */ + switch( m_mux_data & 0xf0 ) // bits 4-7 { - /* normal selector writes 7F-BF-DF-EF */ + // normal selector writes 7F-BF-DF-EF case 0x10: return ioport("IN0-0")->read(); case 0x20: return ioport("IN0-1")->read(); case 0x40: return ioport("IN0-2")->read(); case 0x80: return ioport("IN0-3")->read(); - /* royale selector writes 3F-2F-1F-0F. - worth to split a whole machine driver just for this? */ + // royale selector writes 3F-2F-1F-0F. + // worth to split a whole machine driver just for this? case 0xc0: return ioport("IN0-3")->read(); case 0xd0: return ioport("IN0-2")->read(); case 0xe0: return ioport("IN0-1")->read(); @@ -1762,9 +1766,9 @@ uint8_t goldnpkr_state::goldnpkr_mux_port_r() uint8_t goldnpkr_state::pottnpkr_mux_port_r() { - uint8_t pa_0_4 = 0xff, pa_7; /* Temporary place holder for bits 0 to 4 & 7 */ + uint8_t pa_0_4 = 0xff, pa_7; // temporary placeholder for bits 0 to 4 & 7 - switch( m_mux_data & 0xf0 ) /* bits 4-7 */ + switch( m_mux_data & 0xf0 ) // bits 4-7 { case 0x10: return ioport("IN0-0")->read(); case 0x20: return ioport("IN0-1")->read(); @@ -1772,7 +1776,7 @@ uint8_t goldnpkr_state::pottnpkr_mux_port_r() case 0x80: return ioport("IN0-3")->read(); } - pa_7 = (m_pia0_PA_data >> 7) & 1; /* To do: bit PA5 to pin CB1 */ + pa_7 = (m_pia0_PA_data >> 7) & 1; // to do: bit PA5 to pin CB1 return ( (pa_0_4 & 0x3f) | (pa_7 << 6) | (pa_7 << 7) ) ; } @@ -1780,7 +1784,7 @@ uint8_t goldnpkr_state::pottnpkr_mux_port_r() void goldnpkr_state::mux_w(uint8_t data) { //logerror("mux_w: %2x\n",data); - m_mux_data = data ^ 0xff; /* inverted */ + m_mux_data = data ^ 0xff; // inverted } void goldnpkr_state::mux_port_w(uint8_t data) @@ -1789,7 +1793,7 @@ void goldnpkr_state::mux_port_w(uint8_t data) } -/* Demuxing ay8910 data/address from Falcon board, PIA portA out */ +// demuxing ay8910 data/address from Falcon board, PIA portA out uint8_t goldnpkr_state::ay8910_data_r() { @@ -1876,23 +1880,23 @@ void goldnpkr_state::lamps_a_w(uint8_t data) */ data = data ^ 0xff; - m_lamps[0] = BIT(data, 0); /* Lamp 0 */ - m_lamps[1] = BIT(data, 1); /* Lamp 1 */ - m_lamps[2] = BIT(data, 2); /* Lamp 2 */ - m_lamps[3] = BIT(data, 3); /* Lamp 3 */ - m_lamps[4] = BIT(data, 4); /* Lamp 4 */ + m_lamps[0] = BIT(data, 0); // lamp 0 + m_lamps[1] = BIT(data, 1); // lamp 1 + m_lamps[2] = BIT(data, 2); // lamp 2 + m_lamps[3] = BIT(data, 3); // lamp 3 + m_lamps[4] = BIT(data, 4); // lamp 4 - machine().bookkeeping().coin_counter_w(0, data & 0x40); /* counter1 */ - machine().bookkeeping().coin_counter_w(1, data & 0x80); /* counter2 */ - machine().bookkeeping().coin_counter_w(2, data & 0x20); /* counter3 */ + machine().bookkeeping().coin_counter_w(0, data & 0x40); // counter 1 + machine().bookkeeping().coin_counter_w(1, data & 0x80); // counter 2 + machine().bookkeeping().coin_counter_w(2, data & 0x20); // counter 3 } void goldnpkr_state::sound_w(uint8_t data) { - /* 555 voltage controlled */ + // 555 voltage controlled logerror("Sound Data: %2x\n",data & 0x0f); - /* discrete sound is connected to PIA1, portA: bits 0-3 */ + // discrete sound is connected to PIA1, portA: bits 0-3 m_discrete->write(NODE_01, data >> 3 & 0x01); m_discrete->write(NODE_10, data & 0x07); } @@ -1946,14 +1950,14 @@ uint8_t goldnpkr_state::pia1_b_r() void goldnpkr_state::goldnpkr_map(address_map &map) { map.global_mask(0x7fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram"); map(0x1800, 0x1bff).ram().w(FUNC(goldnpkr_state::goldnpkr_colorram_w)).share("colorram"); - map(0x2000, 0x7fff).rom(); /* superdbl uses 0x2000..0x3fff address space */ + map(0x2000, 0x7fff).rom(); // superdbl uses 0x2000..0x3fff address space } void goldnpkr_state::witchcdj_map(address_map &map) @@ -1966,7 +1970,7 @@ void goldnpkr_state::witchcdj_map(address_map &map) void goldnpkr_state::pottnpkr_map(address_map &map) { map.global_mask(0x3fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -1979,7 +1983,7 @@ void goldnpkr_state::pottnpkr_map(address_map &map) void goldnpkr_state::witchcrd_map(address_map &map) { map.global_mask(0x7fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -1987,7 +1991,7 @@ void goldnpkr_state::witchcrd_map(address_map &map) map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram"); map(0x1800, 0x1bff).ram().w(FUNC(goldnpkr_state::goldnpkr_colorram_w)).share("colorram"); map(0x2000, 0x2000).portr("SW2"); -// map(0x2108, 0x210b).noprw(); /* unknown 40-pin device */ +// map(0x2108, 0x210b).noprw(); // unknown 40-pin device map(0x2800, 0x2fff).ram(); map(0x4000, 0x7fff).rom(); } @@ -2007,7 +2011,7 @@ void goldnpkr_state::witchcrd_map(address_map &map) void goldnpkr_state::witchcrd_falcon_map(address_map &map) { map.global_mask(0x7fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram"); @@ -2020,7 +2024,7 @@ void goldnpkr_state::witchcrd_falcon_map(address_map &map) void goldnpkr_state::wildcard_map(address_map &map) { - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -2028,21 +2032,18 @@ void goldnpkr_state::wildcard_map(address_map &map) map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram"); map(0x1800, 0x1bff).ram().w(FUNC(goldnpkr_state::goldnpkr_colorram_w)).share("colorram"); map(0x2000, 0x2000).portr("SW2"); - map(0x2200, 0x27ff).rom(); /* for VK set */ - map(0x2800, 0x2fff).ram(); /* for VK set */ - map(0x3000, 0xffff).rom(); /* for VK set. bootleg starts from 4000 */ + map(0x2200, 0x27ff).rom(); // for VK set + map(0x2800, 0x2fff).ram(); // for VK set + map(0x3000, 0xffff).rom(); // for VK set. bootleg starts from 4000 } /* Video Klein extended hardware - Extended graphics plus DS1210 + RAM - */ - void goldnpkr_state::wcrdxtnd_map(address_map &map) { - map(0x0000, 0x07ff).ram(); //.share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram(); //.share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -2050,9 +2051,9 @@ void goldnpkr_state::wcrdxtnd_map(address_map &map) map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram"); map(0x1800, 0x1bff).ram().w(FUNC(goldnpkr_state::goldnpkr_colorram_w)).share("colorram"); map(0x2000, 0x2000).portr("SW2"); - map(0x2200, 0x27ff).rom(); /* for VK hardware */ - map(0x2800, 0x2fff).ram().share("nvram"); /* Dallas ds1210 + battery backed RAM */ - map(0x3000, 0xffff).rom(); /* for VK hardware. bootleg starts from 4000 */ + map(0x2200, 0x27ff).rom(); // for VK hardware + map(0x2800, 0x2fff).ram().share("nvram"); // Dallas ds1210 + battery backed RAM + map(0x3000, 0xffff).rom(); // for VK hardware. bootleg starts from 4000 } /* @@ -2064,7 +2065,7 @@ void goldnpkr_state::wcrdxtnd_map(address_map &map) void goldnpkr_state::wildcrdb_map(address_map &map) { map.global_mask(0x7fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram"); @@ -2100,7 +2101,7 @@ void goldnpkr_state::wildcrdb_mcu_io_map(address_map &map) void goldnpkr_state::genie_map(address_map &map) { map.global_mask(0x3fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -2114,7 +2115,7 @@ void goldnpkr_state::genie_map(address_map &map) void goldnpkr_state::mondial_map(address_map &map) { map.global_mask(0x7fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -2127,7 +2128,7 @@ void goldnpkr_state::mondial_map(address_map &map) void goldnpkr_state::bchancep_map(address_map &map) { map.global_mask(0x7fff); - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -2139,7 +2140,7 @@ void goldnpkr_state::bchancep_map(address_map &map) void goldnpkr_state::super21p_map(address_map &map) { - map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0804, 0x0807).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -2157,7 +2158,7 @@ void goldnpkr_state::super21p_map(address_map &map) *********************************************/ static INPUT_PORTS_START( goldnpkr ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -2190,7 +2191,7 @@ static INPUT_PORTS_START( goldnpkr ) PORT_START("IN0-3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn Mode") PORT_CODE(KEYCODE_F2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) /* O.A.R? (D-31 in schematics) */ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) // O.A.R? (D-31 in schematics) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) PORT_NAME("Coupon (Note In)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Weight (Coupon In)") @@ -2199,7 +2200,7 @@ static INPUT_PORTS_START( goldnpkr ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2210,16 +2211,16 @@ static INPUT_PORTS_START( goldnpkr ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") /* listed in the manual as "Play Mode" */ - PORT_DIPSETTING( 0x40, "Manual" ) /* listed in the manual as "Out Play" */ - PORT_DIPSETTING( 0x00, "Auto" ) /* listed in the manual as "Credit Play" */ + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") // listed in the manual as "Play Mode" + PORT_DIPSETTING( 0x40, "Manual" ) // listed in the manual as "Out Play" + PORT_DIPSETTING( 0x00, "Auto" ) // listed in the manual as "Credit Play" PORT_DIPNAME( 0x80, 0x00, "Royal Flush" ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) INPUT_PORTS_END static INPUT_PORTS_START( pmpoker ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -2288,7 +2289,7 @@ static INPUT_PORTS_START( pmpoker ) INPUT_PORTS_END static INPUT_PORTS_START( pottnpkr ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -2330,7 +2331,7 @@ static INPUT_PORTS_START( pottnpkr ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2349,17 +2350,17 @@ static INPUT_PORTS_START( pottnpkr ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - /* listed in the manual as "Play Mode" */ + // listed in the manual as "Play Mode" PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) /* listed in the manual as "Out Play" */ - PORT_DIPSETTING( 0x00, "Auto" ) /* listed in the manual as "Credit Play" */ + PORT_DIPSETTING( 0x40, "Manual" ) // listed in the manual as "Out Play" + PORT_DIPSETTING( 0x00, "Auto" ) // listed in the manual as "Credit Play" PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( potnpkra ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin 1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -2428,7 +2429,7 @@ static INPUT_PORTS_START( potnpkra ) INPUT_PORTS_END static INPUT_PORTS_START( potnpkrc ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( potnpkra ) PORT_MODIFY("SW1") @@ -2441,7 +2442,7 @@ static INPUT_PORTS_START( potnpkrc ) INPUT_PORTS_END static INPUT_PORTS_START( ngold) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -2483,7 +2484,7 @@ static INPUT_PORTS_START( ngold) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2496,23 +2497,23 @@ static INPUT_PORTS_START( ngold) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, "Minimal Hand" ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x10, 0x00, "Minimal Hand" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Pair of Aces" ) PORT_DIPSETTING( 0x10, "Double Pair" ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - /* listed in the manual as "Play Mode" */ + // listed in the manual as "Play Mode" PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) /* listed in the manual as "Out Play" */ - PORT_DIPSETTING( 0x00, "Auto" ) /* listed in the manual as "Credit Play" */ + PORT_DIPSETTING( 0x40, "Manual" ) // listed in the manual as "Out Play" + PORT_DIPSETTING( 0x00, "Auto" ) // listed in the manual as "Credit Play" PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( ngoldb) // only coinage changes against ngold... - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -2554,7 +2555,7 @@ static INPUT_PORTS_START( ngoldb) // only coinage changes against ngold... PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2567,23 +2568,23 @@ static INPUT_PORTS_START( ngoldb) // only coinage changes against ngold... PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, "Minimal Hand" ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x10, 0x00, "Minimal Hand" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Pair of Aces" ) PORT_DIPSETTING( 0x10, "Double Pair" ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - /* listed in the manual as "Play Mode" */ + // listed in the manual as "Play Mode" PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) /* listed in the manual as "Out Play" */ - PORT_DIPSETTING( 0x00, "Auto" ) /* listed in the manual as "Credit Play" */ + PORT_DIPSETTING( 0x40, "Manual" ) // listed in the manual as "Out Play" + PORT_DIPSETTING( 0x00, "Auto" ) // listed in the manual as "Credit Play" PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( goodluck ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( goldnpkr ) PORT_MODIFY("IN0-1") @@ -2601,7 +2602,7 @@ static INPUT_PORTS_START( goodluck ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) @@ -2634,7 +2635,7 @@ static INPUT_PORTS_START( goodluck ) INPUT_PORTS_END static INPUT_PORTS_START( witchcrd ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( goldnpkr ) PORT_MODIFY("IN0-1") @@ -2661,10 +2662,10 @@ SW4 OFF ON OFF ON switches 1+2+5+6 = OFF switches 7+8 = ON */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") /* OFF by default */ + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") // OFF by default PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") /* OFF by default */ + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // OFF by default PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x0c, 0x04, "Percentage" ) PORT_DIPLOCATION("SW1:3,4") @@ -2672,29 +2673,29 @@ SW4 OFF ON OFF ON PORT_DIPSETTING( 0x04, "50%" ) PORT_DIPSETTING( 0x08, "60%" ) PORT_DIPSETTING( 0x00, "70%" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") /* OFF by default */ + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") // OFF by default PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") /* OFF by default */ + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") // OFF by default PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") /* ON by default */ + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") // ON by default PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") /* ON by default */ + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") // ON by default PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("SW2") PORT_DIPNAME( 0x03, 0x01, "Max Bet" ) PORT_DIPLOCATION("SW2:1,2") - PORT_DIPSETTING( 0x03, "10" ) /* OFF-OFF */ - PORT_DIPSETTING( 0x02, "20" ) /* ON-OFF */ - PORT_DIPSETTING( 0x01, "50" ) /* OFF-ON */ - PORT_DIPSETTING( 0x00, "100" ) /* ON-ON */ - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") /* no connected (OFF) */ + PORT_DIPSETTING( 0x03, "10" ) // OFF-OFF + PORT_DIPSETTING( 0x02, "20" ) // ON-OFF + PORT_DIPSETTING( 0x01, "50" ) // OFF-ON + PORT_DIPSETTING( 0x00, "100" ) // ON-ON + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") // no connected (OFF) PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") /* no connected (OFF) */ + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") // no connected (OFF) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x10, 0x00, "Minimal Hand" ) PORT_DIPLOCATION("SW2:5") @@ -2712,7 +2713,7 @@ SW4 OFF ON OFF ON INPUT_PORTS_END static INPUT_PORTS_START( witchcda ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Apuesta (Bet)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Contabilidad (Bookkeeping)") @@ -2754,7 +2755,7 @@ static INPUT_PORTS_START( witchcda ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2769,7 +2770,7 @@ static INPUT_PORTS_START( witchcda ) PORT_DIPSETTING( 0x40, "Manual" ) PORT_DIPSETTING( 0x00, "Auto" ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4") - /* Note In is always 1 Note - 10 Credits */ + // Note In is always: 1 Note - 10 Credits PORT_DIPSETTING( 0x00, "1 Coin - 1 Credit / 1 Note - 10 Credits" ) PORT_DIPSETTING( 0x80, "1 Coin - 5 Credits / 1 Note - 10 Credits" ) @@ -2801,11 +2802,11 @@ static INPUT_PORTS_START( witchcda ) INPUT_PORTS_END static INPUT_PORTS_START( witchcdc ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( witchcrd ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2820,7 +2821,7 @@ static INPUT_PORTS_START( witchcdc ) PORT_DIPSETTING( 0x40, "Manual" ) PORT_DIPSETTING( 0x00, "Auto" ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4") - /* Note In is always 1 Note - 10 Credits */ + // Note In is always: 1 Note - 10 Credits PORT_DIPSETTING( 0x00, "1 Coin - 1 Credit / 1 Note - 10 Credits" ) PORT_DIPSETTING( 0x80, "1 Coin - 5 Credits / 1 Note - 10 Credits" ) @@ -2852,7 +2853,7 @@ static INPUT_PORTS_START( witchcdc ) INPUT_PORTS_END static INPUT_PORTS_START( witchcdd ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( witchcrd ) PORT_MODIFY("IN0-1") @@ -2878,13 +2879,13 @@ static INPUT_PORTS_START( witchcdd ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("IN0-3-8") //IPT_UNKNOWN ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - /* even when the following one is forced to OFF, - turned ON behaves like "Jacks and Better" */ + // even when the following one is forced to OFF, + // turned ON behaves like "Jacks and Better" PORT_DIPNAME( 0x10, 0x10, "SW 1 (always to OFF)") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2926,7 +2927,7 @@ static INPUT_PORTS_START( witchcdd ) INPUT_PORTS_END static INPUT_PORTS_START( witchjol ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( witchcrd ) PORT_MODIFY("IN0-1") @@ -2952,7 +2953,7 @@ static INPUT_PORTS_START( witchjol ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("IN0-3-8") //IPT_UNKNOWN ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2997,10 +2998,10 @@ static INPUT_PORTS_START( witchjol ) */ PORT_MODIFY("SW2") PORT_DIPNAME( 0x03, 0x00, "Max Bet" ) PORT_DIPLOCATION("SW2:1,2") - PORT_DIPSETTING( 0x03, "10" ) /* OFF-OFF */ - PORT_DIPSETTING( 0x02, "20" ) /* ON-OFF */ - PORT_DIPSETTING( 0x01, "50" ) /* OFF-ON */ - PORT_DIPSETTING( 0x00, "100" ) /* ON-ON */ + PORT_DIPSETTING( 0x03, "10" ) // OFF-OFF + PORT_DIPSETTING( 0x02, "20" ) // ON-OFF + PORT_DIPSETTING( 0x01, "50" ) // OFF-ON + PORT_DIPSETTING( 0x00, "100" ) // ON-ON PORT_DIPNAME( 0x04, 0x04, "Game Type" ) PORT_DIPLOCATION("SW2:3") PORT_DIPSETTING( 0x04, "Jolli Witch" ) PORT_DIPSETTING( 0x00, "Witch Card" ) @@ -3019,7 +3020,7 @@ static INPUT_PORTS_START( witchjol ) INPUT_PORTS_END static INPUT_PORTS_START( witchcdf ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( witchcrd ) PORT_MODIFY("IN0-1") @@ -3045,7 +3046,7 @@ static INPUT_PORTS_START( witchcdf ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("IN0-3-8") //IPT_UNKNOWN ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -3091,7 +3092,7 @@ static INPUT_PORTS_START( witchcdf ) INPUT_PORTS_END static INPUT_PORTS_START( wldwitch ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet (Setzen)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping / Test") @@ -3151,10 +3152,10 @@ static INPUT_PORTS_START( wldwitch ) _______________________________ */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") /* OFF by default */ + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") // OFF by default PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") /* OFF by default */ + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // OFF by default PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x0c, 0x04, "Percentage" ) PORT_DIPLOCATION("SW1:3,4") @@ -3162,16 +3163,16 @@ static INPUT_PORTS_START( wldwitch ) PORT_DIPSETTING( 0x04, "50%" ) PORT_DIPSETTING( 0x08, "60%" ) PORT_DIPSETTING( 0x00, "70%" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") /* OFF by default */ + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") // OFF by default PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") /* OFF by default */ + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") // OFF by default PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") /* OFF by default */ + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") // OFF by default PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") /* OFF by default */ + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") // OFF by default PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -3205,10 +3206,10 @@ static INPUT_PORTS_START( wldwitch ) -------------------------------------------- */ PORT_DIPNAME( 0x03, 0x01, "Max Bet" ) PORT_DIPLOCATION("SW2:1,2") - PORT_DIPSETTING( 0x03, "10" ) /* OFF-OFF */ - PORT_DIPSETTING( 0x02, "20" ) /* ON-OFF */ - PORT_DIPSETTING( 0x01, "50" ) /* OFF-ON */ - PORT_DIPSETTING( 0x00, "100" ) /* ON-ON */ + PORT_DIPSETTING( 0x03, "10" ) // OFF-OFF + PORT_DIPSETTING( 0x02, "20" ) // ON-OFF + PORT_DIPSETTING( 0x01, "50" ) // OFF-ON + PORT_DIPSETTING( 0x00, "100" ) // ON-ON PORT_DIPNAME( 0x04, 0x04, "Game Type" ) PORT_DIPLOCATION("SW2:3") PORT_DIPSETTING( 0x04, "Wild Witch" ) PORT_DIPSETTING( 0x00, "Witch Game" ) @@ -3230,7 +3231,7 @@ static INPUT_PORTS_START( wldwitch ) INPUT_PORTS_END static INPUT_PORTS_START( wupndown ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet (Setzen)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping / Test") @@ -3325,7 +3326,7 @@ static INPUT_PORTS_START( wupndown ) INPUT_PORTS_END static INPUT_PORTS_START( wstrike ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet (Setzen)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping / Test") @@ -3422,7 +3423,7 @@ static INPUT_PORTS_START( wstrike ) INPUT_PORTS_END static INPUT_PORTS_START( wtchjack ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet (Setzen)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping / Test") @@ -3517,7 +3518,7 @@ static INPUT_PORTS_START( wtchjack ) INPUT_PORTS_END static INPUT_PORTS_START( sloco93 ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( witchcda ) PORT_MODIFY("IN0-1") @@ -3525,7 +3526,7 @@ static INPUT_PORTS_START( sloco93 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Rojo (Red)") PORT_CODE(KEYCODE_S) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -3545,7 +3546,7 @@ static INPUT_PORTS_START( sloco93 ) INPUT_PORTS_END static INPUT_PORTS_START( bsuerte ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Apostar (Bet)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Contabilidad (Meters)") @@ -3587,7 +3588,7 @@ static INPUT_PORTS_START( bsuerte ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -3598,7 +3599,7 @@ static INPUT_PORTS_START( bsuerte ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - PORT_DIPNAME( 0x40, 0x00, "Modo de Pago" ) PORT_DIPLOCATION("SW1:3") /* left as 'auto' */ + PORT_DIPNAME( 0x40, 0x00, "Modo de Pago" ) PORT_DIPLOCATION("SW1:3") // left as 'auto' PORT_DIPSETTING( 0x40, "Manual" ) PORT_DIPSETTING( 0x00, "Auto" ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") @@ -3633,18 +3634,18 @@ static INPUT_PORTS_START( bsuerte ) INPUT_PORTS_END static INPUT_PORTS_START( bsuertew ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( bsuerte ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_DIPNAME( 0x20, 0x00, "Creditos Ganados" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "Show" ) PORT_DIPSETTING( 0x00, "Hide" ) INPUT_PORTS_END static INPUT_PORTS_START( poker91 ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( bsuerte ) PORT_MODIFY("IN0-1") @@ -3659,14 +3660,14 @@ static INPUT_PORTS_START( poker91 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Switch Card 5") PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_DIPNAME( 0x20, 0x20, "Contador de Acumulados" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "Muestra" ) PORT_DIPSETTING( 0x00, "Oculta" ) INPUT_PORTS_END static INPUT_PORTS_START( wildcard ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters/Settings") @@ -3708,7 +3709,7 @@ static INPUT_PORTS_START( wildcard ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -3754,7 +3755,7 @@ static INPUT_PORTS_START( wildcard ) INPUT_PORTS_END static INPUT_PORTS_START( genie ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CODE(KEYCODE_1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping") @@ -3796,7 +3797,7 @@ static INPUT_PORTS_START( genie ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -3824,7 +3825,7 @@ static INPUT_PORTS_START( genie ) INPUT_PORTS_END static INPUT_PORTS_START( caspoker ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping") @@ -3893,7 +3894,7 @@ static INPUT_PORTS_START( caspoker ) INPUT_PORTS_END static INPUT_PORTS_START( mondial ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) @@ -3935,7 +3936,7 @@ static INPUT_PORTS_START( mondial ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -3963,7 +3964,7 @@ static INPUT_PORTS_START( mondial ) INPUT_PORTS_END static INPUT_PORTS_START( videtron ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) @@ -4006,7 +4007,7 @@ static INPUT_PORTS_START( videtron ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -4026,7 +4027,7 @@ static INPUT_PORTS_START( videtron ) INPUT_PORTS_END static INPUT_PORTS_START( super98 ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( bsuerte ) PORT_MODIFY("IN0-0") @@ -4070,7 +4071,7 @@ static INPUT_PORTS_START( super98 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -4091,7 +4092,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( geniea ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( bsuerte ) PORT_MODIFY("IN0-0") @@ -4135,7 +4136,7 @@ static INPUT_PORTS_START( geniea ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -4156,7 +4157,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( bsuertev ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_INCLUDE( bsuerte ) PORT_MODIFY("IN0-0") @@ -4200,7 +4201,7 @@ static INPUT_PORTS_START( bsuertev ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_MODIFY("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -4221,7 +4222,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( bonuspkr ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -4263,7 +4264,7 @@ static INPUT_PORTS_START( bonuspkr ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -4284,7 +4285,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( super21p ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") @@ -4481,21 +4482,17 @@ static const discrete_555_desc goldnpkr_555_vco_desc = static const discrete_dac_r1_ladder dac_goldnpkr_ladder = { - 3, /* size of ladder */ - {RES_K(30), RES_K(15), RES_K(7.5)}, /* elements */ + 3, // size of ladder + {RES_K(30), RES_K(15), RES_K(7.5)}, // elements /* external vBias doesn't seems to be accurate. using the 555 internal values sound better. */ - 5, /* voltage Bias resistor is tied to */ - RES_K(5), /* additional resistor tied to vBias */ - RES_K(10), /* resistor tied to ground */ - - CAP_U(4.7) /* filtering cap tied to ground */ + 5, // voltage Bias resistor is tied to + RES_K(5), // additional resistor tied to vBias + RES_K(10), // resistor tied to ground -// 12, /* voltage Bias resistor is tied to */ -// RES_K(330), /* additional resistor tied to vBias */ -// 0, /* resistor tied to ground */ + CAP_U(4.7) // filtering cap tied to ground }; static DISCRETE_SOUND_START( goldnpkr_discrete ) @@ -4507,8 +4504,8 @@ static DISCRETE_SOUND_START( goldnpkr_discrete ) ....x... --> enable/disable. */ - DISCRETE_INPUT_NOT (NODE_01) /* bit 3 - enable/disable */ - DISCRETE_INPUT_DATA (NODE_10) /* bits 0-2 - sound data */ + DISCRETE_INPUT_NOT (NODE_01) // bit 3: enable/disable + DISCRETE_INPUT_DATA (NODE_10) // bits 0-2: sound data DISCRETE_DAC_R1(NODE_20, NODE_10, 5, &dac_goldnpkr_ladder) @@ -4548,17 +4545,17 @@ DISCRETE_SOUND_END static const discrete_dac_r1_ladder dac_pottnpkr_ladder = { - 3, /* size of ladder */ - {RES_K(33), RES_K(18), RES_K(10)}, /* elements */ + 3, // size of ladder + {RES_K(33), RES_K(18), RES_K(10)}, // elements /* external vBias doesn't seems to be accurate. using the 555 internal values sound better. */ - 5, /* voltage Bias resistor is tied to */ - RES_K(5), /* additional resistor tied to vBias */ - RES_K(10), /* resistor tied to ground */ + 5, // voltage Bias resistor is tied to + RES_K(5), // additional resistor tied to vBias + RES_K(10), // resistor tied to ground - 0 /* no filtering cap tied to ground */ + 0 // no filtering cap tied to ground }; static DISCRETE_SOUND_START( pottnpkr_discrete ) @@ -4570,8 +4567,8 @@ static DISCRETE_SOUND_START( pottnpkr_discrete ) ....x... --> enable/disable. */ - DISCRETE_INPUT_NOT (NODE_01) /* bit 3 - enable/disable */ - DISCRETE_INPUT_DATA (NODE_10) /* bits 0-2 - sound data */ + DISCRETE_INPUT_NOT (NODE_01) // bit 3: enable/disable + DISCRETE_INPUT_DATA (NODE_10) // bits 0-2: sound data DISCRETE_DAC_R1(NODE_20, NODE_10, 5, &dac_pottnpkr_ladder) @@ -4607,7 +4604,7 @@ MACHINE_RESET_MEMBER(goldnpkr_state, mondial) void goldnpkr_state::goldnpkr_base(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware M6502(config, m_maincpu, CPU_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::goldnpkr_map); @@ -4622,15 +4619,15 @@ void goldnpkr_state::goldnpkr_base(machine_config &config) m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::sound_w)); m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::mux_w)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); - screen.set_size((39+1)*8, (31+1)*8); /* From MC6845 init, registers 00 & 04 (programmed with value-1). */ - screen.set_visarea(0*8, 32*8-1, 0*8, 29*8-1); /* From MC6845 init, registers 01 & 06. */ + screen.set_size((39+1)*8, (31+1)*8); // From MC6845 init, registers 00 & 04 (programmed with value-1). + screen.set_visarea(0*8, 32*8-1, 0*8, 29*8-1); // From MC6845 init, registers 01 & 06. screen.set_screen_update(FUNC(goldnpkr_state::screen_update_goldnpkr)); - mc6845_device &crtc(MC6845(config, "crtc", CPU_CLOCK)); /* 68B45 or 6845s @ CPU clock */ + mc6845_device &crtc(MC6845(config, "crtc", CPU_CLOCK)); // 68B45 or 6845s @ CPU clock crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); @@ -4644,7 +4641,7 @@ void goldnpkr_state::goldnpkr(machine_config &config) { goldnpkr_base(config); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4653,13 +4650,13 @@ void goldnpkr_state::pottnpkr(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::pottnpkr_map); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, pottnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4668,16 +4665,16 @@ void goldnpkr_state::witchcrd(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::witchcrd_map); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); - /* video hardware */ + // video hardware m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette)); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, "discrete", goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4693,7 +4690,7 @@ void goldnpkr_state::wcfalcon(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::witchcrd_falcon_map); m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); @@ -4701,19 +4698,19 @@ void goldnpkr_state::wcfalcon(machine_config &config) m_pia[1]->readpa_handler().set(FUNC(goldnpkr_state::ay8910_data_r)); m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::ay8910_data_w)); - /* video hardware */ + // video hardware m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette)); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); /* guess, seems ok */ + AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); // guess, seems ok } void goldnpkr_state::super21p(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::super21p_map); m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); @@ -4721,13 +4718,13 @@ void goldnpkr_state::super21p(machine_config &config) m_pia[1]->readpa_handler().set(FUNC(goldnpkr_state::ay8910_data_r)); m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::ay8910_data_w)); - /* video hardware */ + // video hardware MCFG_VIDEO_START_OVERRIDE(goldnpkr_state, super21p) m_gfxdecode->set_info(gfx_super21p); PALETTE(config.replace(), m_palette, FUNC(goldnpkr_state::super21p_palette), 1024); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); // guess, seems ok m_ay8910->port_a_read_callback().set_ioport("SW1"); @@ -4738,18 +4735,18 @@ void goldnpkr_state::wildcard(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::wildcard_map); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); - /* video hardware */ + // video hardware // m_gfxdecode->set_info(gfx_wildcard); m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette)); // MCFG_VIDEO_START_OVERRIDE(goldnpkr_state,wildcard) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4758,18 +4755,18 @@ void goldnpkr_state::wcrdxtnd(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::wcrdxtnd_map); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); - /* video hardware */ + // video hardware m_gfxdecode->set_info(gfx_wcrdxtnd); m_palette->set_init(FUNC(goldnpkr_state::wcrdxtnd_palette)); MCFG_VIDEO_START_OVERRIDE(goldnpkr_state, wcrdxtnd) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4778,10 +4775,10 @@ void goldnpkr_state::wildcrdb(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::wildcrdb_map); - z80_device &mcu(Z80(config, "mcu", MASTER_CLOCK/4)); /* guess */ + z80_device &mcu(Z80(config, "mcu", MASTER_CLOCK/4)); // guess mcu.set_addrmap(AS_PROGRAM, &goldnpkr_state::wildcrdb_mcu_map); mcu.set_addrmap(AS_IO, &goldnpkr_state::wildcrdb_mcu_io_map); @@ -4790,30 +4787,30 @@ void goldnpkr_state::wildcrdb(machine_config &config) m_pia[1]->readpa_handler().set(FUNC(goldnpkr_state::ay8910_data_r)); m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::ay8910_data_w)); - /* video hardware */ + // video hardware // m_gfxdecode->set_info(gfx_wildcard); m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette)); // MCFG_VIDEO_START_OVERRIDE(goldnpkr_state,wildcard) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); /* guess, seems ok */ + AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); // guess, seems ok } void goldnpkr_state::genie(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::genie_map); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); - /* video hardware */ + // video hardware m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette)); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4822,16 +4819,16 @@ void goldnpkr_state::geniea(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::goldnpkr_map); // m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); // m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); - /* video hardware */ + // video hardware m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette)); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4840,13 +4837,13 @@ void goldnpkr_state::mondial(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::mondial_map); MCFG_MACHINE_START_OVERRIDE(goldnpkr_state, mondial) MCFG_MACHINE_RESET_OVERRIDE(goldnpkr_state, mondial) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4855,7 +4852,7 @@ void goldnpkr_state::bchancep(machine_config &config) { goldnpkr_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::bchancep_map); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pia0_a_r)); @@ -4868,7 +4865,7 @@ void goldnpkr_state::bchancep(machine_config &config) m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::pia1_a_w)); m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::pia1_b_w)); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, pottnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4883,7 +4880,7 @@ void goldnpkr_state::caspoker(machine_config &config) m_gfxdecode->set_info(gfx_caspoker); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4930,7 +4927,7 @@ void blitz_state::mcu_portc_w(uint8_t data) void blitz_state::megadpkr_map(address_map &map) { - map(0x0000, 0x07ff).ram(); //.share("nvram"); /* battery backed RAM */ + map(0x0000, 0x07ff).ram(); //.share("nvram"); // battery backed RAM map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -4958,7 +4955,7 @@ void blitz_state::megadpkr_banked_map(address_map &map) static INPUT_PORTS_START( megadpkr ) - /* Multiplexed - 4x5bits */ + // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) @@ -4992,7 +4989,7 @@ static INPUT_PORTS_START( megadpkr ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SW1") - /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -5014,13 +5011,13 @@ INPUT_PORTS_END void blitz_state::megadpkr(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware M6502(config, m_maincpu, CPU_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &blitz_state::megadpkr_map); ADDRESS_MAP_BANK(config, "bankdev").set_map(&blitz_state::megadpkr_banked_map).set_data_width(8).set_addr_width(16).set_stride(0x4000); - M68705P5(config, m_mcu, CPU_CLOCK); /* unknown */ + M68705P5(config, m_mcu, CPU_CLOCK); // unknown m_mcu->portb_w().set(FUNC(blitz_state::mcu_portb_w)); m_mcu->portc_w().set(FUNC(blitz_state::mcu_portc_w)); @@ -5035,7 +5032,7 @@ void blitz_state::megadpkr(machine_config &config) m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::sound_w)); m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::mux_w)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -5052,7 +5049,7 @@ void blitz_state::megadpkr(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_goldnpkr); PALETTE(config, m_palette, FUNC(blitz_state::witchcrd_palette), 256); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -5079,13 +5076,13 @@ ROM_START( goldnpkr ) ROM_LOAD( "ups39_12a.bin", 0x0000, 0x8000, CRC(216b45fb) SHA1(fbfcd98cc39b2e791cceb845b166ff697f584add) ) ROM_REGION( 0x6000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x4000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38_5a.bin", 0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) ) /* text layer */ + ROM_FILL( 0x0000, 0x4000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38_5a.bin", 0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) ) // char ROM ROM_REGION( 0x6000, "gfx2", 0 ) - ROM_LOAD( "u43_2a.bin", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "u40_4a.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + ROM_LOAD( "u43_2a.bin", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "u40_4a.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the char rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -5101,13 +5098,13 @@ ROM_START( goldnpkb ) ROM_LOAD( "ups31h.12a", 0x0000, 0x8000, CRC(bee5b07a) SHA1(5da60292ecbbedd963c273eac2a1fb88ad66ada8) ) ROM_REGION( 0x6000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x4000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38_5a.bin", 0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) ) /* text layer */ + ROM_FILL( 0x0000, 0x4000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38_5a.bin", 0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) ) // char ROM ROM_REGION( 0x6000, "gfx2", 0 ) - ROM_LOAD( "u43_2a.bin", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "u40_4a.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + ROM_LOAD( "u43_2a.bin", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "u40_4a.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the char rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -5150,32 +5147,32 @@ ROM_START( videtron ) ROM_LOAD( "5.bin", 0x6000, 0x2000, CRC(395fbc5c) SHA1(f742d7a9312828997a4323ac2b957048687fbed2) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "0.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "1.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "0.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) // cards deck gfx, bitplane1 + ROM_LOAD( "1.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "82s129.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END ROM_START( videtron2 ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* different from videtron */ + ROM_REGION( 0x10000, "maincpu", 0 ) // different from videtron ROM_LOAD( "4.bin", 0x5000, 0x1000, CRC(4a7dab42) SHA1(7fcdab985b783d90879a99b2a53a6814ca4278eb) ) // sldh ROM_LOAD( "5.bin", 0x6000, 0x1000, CRC(c70e8127) SHA1(7db2d4a29cba7c336f254393955fad71f30a539a) ) // sldh ROM_LOAD( "6.bin", 0x7000, 0x1000, CRC(490c7304) SHA1(1a6c6112571fd0e35b640ed58f66582a2d99c58b) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "0.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "1.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "0.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) // cards deck gfx, bitplane1 + ROM_LOAD( "1.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "82s129.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -5190,16 +5187,16 @@ ROM_START( videtrna ) ROM_LOAD( "poker_videotron.prg", 0x4000, 0x2000, CRC(38494ffb) SHA1(defa03546fd21d854c2d2413e6e2bf575d0518d7) ) ROM_LOAD( "videotron_poker.prg", 0x6000, 0x2000, CRC(960dcb61) SHA1(a7da40383b0149d21156b461c144d345603d747a) ) - ROM_REGION( 0x3000, "gfx1", 0 ) /* taken from videtron */ - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "3.bin", 0x2000, 0x0800, BAD_DUMP CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */ + ROM_REGION( 0x3000, "gfx1", 0 ) // taken from videtron + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "3.bin", 0x2000, 0x0800, BAD_DUMP CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) // char ROM - ROM_REGION( 0x1800, "gfx2", 0 ) /* taken from videtron */ - ROM_LOAD( "0.bin", 0x0000, 0x0800, BAD_DUMP CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "1.bin", 0x0800, 0x0800, BAD_DUMP CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "2.bin", 0x1000, 0x0800, BAD_DUMP CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_REGION( 0x1800, "gfx2", 0 ) // taken from videtron + ROM_LOAD( "0.bin", 0x0000, 0x0800, BAD_DUMP CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) // cards deck gfx, bitplane1 + ROM_LOAD( "1.bin", 0x0800, 0x0800, BAD_DUMP CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "2.bin", 0x1000, 0x0800, BAD_DUMP CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 - ROM_REGION( 0x0100, "proms", 0 ) /* taken from videtron */ + ROM_REGION( 0x0100, "proms", 0 ) // taken from videtron ROM_LOAD( "82s129.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END @@ -5213,37 +5210,37 @@ ROM_END RB confirmed the dump. There are other games with double sized roms and identical halves. */ -ROM_START( pottnpkr ) /* Golden Poker style game. Code is intended to start at $6000 */ +ROM_START( pottnpkr ) // golden poker style game. code is intended to start at $6000. is potten's poker the real name? ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ic13_3.bin", 0x2000, 0x1000, CRC(23c975cd) SHA1(1d32a9ba3aa996287a823558b9d610ab879a29e8) ) ROM_LOAD( "ic14_4.bin", 0x3000, 0x1000, CRC(86a03aab) SHA1(0c4e8699b9fc9943de1fa0a364e043b3878636dc) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "ic7_0.bin", 0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "ic7_0.bin", 0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "ic2_7.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "ic3_8.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "ic5_9.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "ic2_7.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) // cards deck gfx, bitplane1 + ROM_LOAD( "ic3_8.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) // cards deck gfx, bitplane2 + ROM_LOAD( "ic5_9.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END -ROM_START( potnpkra ) /* a Coinmaster game?... seems to be a hack */ +ROM_START( potnpkra ) // a coinmaster game?... seems to be a hack ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "vp-5.bin", 0x2000, 0x1000, CRC(1443d0ff) SHA1(36625d24d9a871cc8c03bdeda983982ba301b385) ) ROM_LOAD( "vp-6.bin", 0x3000, 0x1000, CRC(94f82fc1) SHA1(ce95fc429f5389eea45fec877bac992fa7ba2b3c) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "vp-4.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* text layer */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "vp-4.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "vp-1.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "vp-2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "vp-3.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "vp-1.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "vp-2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "vp-3.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -5266,13 +5263,13 @@ ROM_START( potnpkrb ) ROM_LOAD( "517.17a", 0x3000, 0x1000, CRC(75a72877) SHA1(9df8fd2c98526d20aa0fa056a7b71b5c5fb5206b) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "517.8a", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* text layer */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "517.8a", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "517.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "517.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "517.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "517.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "517.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "517.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "517_mb7052.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -5296,13 +5293,13 @@ ROM_START( potnpkrc ) ROM_LOAD( "pottpok6.bin", 0x3000, 0x1000, CRC(53237873) SHA1(b640cb3db2513784c8d2d8983a17352276c11e07) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "pottpok1.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* text layer */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "pottpok1.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "pottpok4.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "pottpok3.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "pottpok2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "pottpok4.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "pottpok3.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "pottpok2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -5314,13 +5311,13 @@ ROM_START( potnpkrd ) ROM_LOAD( "pot6.bin", 0x3000, 0x1000, CRC(53237873) SHA1(b640cb3db2513784c8d2d8983a17352276c11e07) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "pot34.bin", 0x2000, 0x1000, CRC(52fd35d2) SHA1(ad8bf8c222ceb2e9b3b6d9033866867f1977c65f) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "pot34.bin", 0x2000, 0x1000, CRC(52fd35d2) SHA1(ad8bf8c222ceb2e9b3b6d9033866867f1977c65f) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "pot1.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "pot2.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + ROM_LOAD( "pot1.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) // cards deck gfx, bitplane1 + ROM_LOAD( "pot2.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the char rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -5332,16 +5329,16 @@ ROM_START( potnpkre ) ROM_LOAD( "g_luck_b.bin", 0x3000, 0x1000, CRC(7e848e5e) SHA1(45461cfcce06f6240562761d26ba7fdb7ef4986b) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "ic7_0.bin", 0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "ic7_0.bin", 0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "ic2_7.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "ic3_8.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "ic5_9.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "ic2_7.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) // cards deck gfx, bitplane1 + ROM_LOAD( "ic3_8.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) // cards deck gfx, bitplane2 + ROM_LOAD( "ic5_9.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* @@ -5361,16 +5358,16 @@ ROM_START( potnpkrf ) ROM_LOAD( "prg.bin", 0x4000, 0x4000, CRC(d7a932a2) SHA1(c940ea90378a631c217a09c4a9e73c382acaa48d) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "0.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "1.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "0.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) // cards deck gfx, bitplane1 + ROM_LOAD( "1.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* Unknown australian hard to dump set @@ -5382,16 +5379,16 @@ ROM_START( potnpkrg ) ROM_LOAD( "unknown.17a", 0x3000, 0x1000, CRC(1a9cfbf9) SHA1(47b3767dbcb016ae9ba4437d8f2790681553a5b0) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "unknown1.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "unknown1.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "unknown2.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "unknown3.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "unknown4.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3. need to be redumped */ + ROM_LOAD( "unknown2.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "unknown3.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "unknown4.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3. need to be redumped ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* Unknown australian set @@ -5402,24 +5399,24 @@ ROM_START( potnpkrh ) ROM_LOAD( "unk_2732.15a", 0x2000, 0x1000, CRC(441ad1b2) SHA1(248b8e03723989c7766b50858c9a5d0abbb5e055) ) ROM_LOAD( "unk_2732.17a", 0x3000, 0x1000, CRC(9d72e145) SHA1(526d88c70e03bcff18072436ca3d498a0bb39913) ) - /* Backcard logo is different, showing 'FR'. The rest matches the common char gfx */ + // Backcard logo is different, showing 'FR'. The rest matches the common char gfx ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "unk_2716.8a", 0x1000, 0x0800, CRC(a138afa6) SHA1(80c6d11086f78e36dfc01c15b23e70667fcf17fc) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "unk_2716.8a", 0x1000, 0x0800, CRC(a138afa6) SHA1(80c6d11086f78e36dfc01c15b23e70667fcf17fc) ) // char ROM - /* Backplane at 5a has two bits different against the common cards gfx - Offsets 0x380 and 0x400, bit0 is set to 0 */ + // Backplane at 5a has two bits different against the common cards gfx. + // Offsets 0x380 and 0x400, bit0 is set to 0 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "unk_2716.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "unk_2716.5a", 0x0800, 0x0800, CRC(daf38d03) SHA1(6b518494688756ad7b753fdec46b6392c4a9ebbe) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "unk_2716.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "unk_2716.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "unk_2716.5a", 0x0800, 0x0800, CRC(daf38d03) SHA1(6b518494688756ad7b753fdec46b6392c4a9ebbe) ) // cards deck gfx, bitplane2 + ROM_LOAD( "unk_2716.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* Potten's Poker bootleg set - PCB ICP-1 (no encrypted). + PCB ICP-1 (unencrypted). 1x R6502P 2x MC6821P @@ -5433,16 +5430,16 @@ ROM_START( potnpkri ) ROM_LOAD( "8.17a", 0x3000, 0x1000, CRC(3cb1031d) SHA1(bb814577f79f26789752ec29d7ae17ddae822222) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(17d0d174) SHA1(ecf507439b6df950052e65ec014830f0287b98b9) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(17d0d174) SHA1(ecf507439b6df950052e65ec014830f0287b98b9) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "prom.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump OK */ + ROM_LOAD( "prom.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump OK ROM_END /* @@ -5459,7 +5456,7 @@ ROM_START( potnpkrj ) ROM_LOAD( "pok7.a14", 0x7000, 0x1000, CRC(38d92f95) SHA1(9523ef5fae57ad7cdd3fe52667a9670fdca8aa75) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes ROM_LOAD( "pok4_ww.a7", 0x1000, 0x0800, CRC(5cafb3a9) SHA1(efec24d4dd1f83f40a1b7ec66bc6bf36c4b1e541) ) // text chars ROM_REGION( 0x1800, "gfx2", 0 ) @@ -5503,22 +5500,43 @@ ROM_START( potnpkrk ) ROM_LOAD( "n82s129n.d7", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // color PROM ROM_END +/* Potten's Poker bootleg set + PCB ICP-1 (unencrypted). +*/ +ROM_START( potnpkrl ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "unknown.16a", 0x2000, 0x1000, CRC(2ed4f11f) SHA1(5900ace86929584d49efd055c748d5dd110cf9c0) ) + ROM_LOAD( "unknown.17a", 0x3000, 0x1000, CRC(f0992aa3) SHA1(90377024b19b7ca60baa99a6c8ea96cf625d21b4) ) + + ROM_REGION( 0x1800, "gfx1", 0 ) + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "unknown.9a", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) // char ROM + + ROM_REGION( 0x1800, "gfx2", 0 ) + ROM_LOAD( "unknown.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "unknown.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "unknown.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed +ROM_END + ROM_START( goodluck ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "goodluck_glh6b.bin", 0x0000, 0x8000, CRC(2cfa4a2c) SHA1(720e2900f3a0ef2632aa201a63b5eba0570e6aa3) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4.bin", 0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4.bin", 0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END @@ -5540,16 +5558,16 @@ ROM_START( ngold ) ROM_LOAD( "ngold_2a.17a", 0x3000, 0x1000, CRC(9d07f0fc) SHA1(493b2e778342e1d6b7753902b714c5478bd22bd5) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "2.5a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "2.5a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "n82s129n.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "n82s129n.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( ngolda ) @@ -5558,16 +5576,16 @@ ROM_START( ngolda ) ROM_LOAD( "2a.bin", 0x3000, 0x1000, CRC(9d07f0fc) SHA1(493b2e778342e1d6b7753902b714c5478bd22bd5) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "2.5a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "2.5a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "n82s129n.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "n82s129n.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( ngoldb ) @@ -5576,16 +5594,16 @@ ROM_START( ngoldb ) ROM_LOAD( "pkr_2.bin", 0x3000, 0x1000, CRC(de03a57d) SHA1(db696a892497ead7aa4ed2c600ba819c3b41a082) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "0.bin", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "0.bin", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "8.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "9.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "8.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "9.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "n82s129n.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "n82s129n.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END @@ -5598,20 +5616,20 @@ ROM_END balanced at $7ff8. */ ROM_START( bsuerte ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_chica.256: good BS set... (checksum) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_chica.256: good BS set... (checksum) ROM_LOAD( "bs_chica.256", 0x0000, 0x8000, CRC(2e92b72b) SHA1(6c90fb265f2cb7ec40ddb0553b5b7fedfa89339c) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertea ) @@ -5619,33 +5637,33 @@ ROM_START( bsuertea ) ROM_LOAD( "ups39_12a.bin", 0x0000, 0x8000, CRC(e6b661b7) SHA1(b265f6814a168034d24bc1c25f67ece131281bc2) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuerteb ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bsrapida.128: Buena Suerte! red title, from Cordoba" */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bsrapida.128: Buena Suerte! red title, from Cordoba" ROM_LOAD( "bsrapida.128", 0x4000, 0x4000, CRC(a2c633fa) SHA1(7cda3f56e6bd8e6bfc36a68c16d2e63d76d4dac3) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertec ) @@ -5653,186 +5671,186 @@ ROM_START( bsuertec ) ROM_LOAD( "x10d4esp.16c", 0x0000, 0x8000, CRC(0606bab4) SHA1(624b0cef1a23a4e7ba2d2d256f30f73b1e455fa7) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuerted ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* set seen nowadays, based on bsuertec */ + ROM_REGION( 0x10000, "maincpu", 0 ) // set seen nowadays, based on bsuertec ROM_LOAD( "x10d4fix.bin", 0x0000, 0x8000, CRC(c5ecc419) SHA1(5538a1336b877d1780d9a0c5595b02e9b22ee17d) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertee ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* source program for other mods */ + ROM_REGION( 0x10000, "maincpu", 0 ) // source program for other mods ROM_LOAD( "x10bb26.bin", 0x0000, 0x8000, CRC(57011385) SHA1(3cbfdb8dd261aa8ce27441326f0916640b13b67a) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertef ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* add its own logo ($0000-$4000) in the cards-back */ + ROM_REGION( 0x10000, "maincpu", 0 ) // add its own logo ($0000-$4000) in the cards-back ROM_LOAD( "bscat.256", 0x0000, 0x8000, CRC(944accd3) SHA1(f1ed149b9dafe9cdf3745b9344f2ce1814027005) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuerteg ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* based on witchcrd (winning counter, no lamps, only 9 settings parameters) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // based on witchcrd (winning counter, no lamps, only 9 settings parameters) ROM_LOAD( "bsjc.256", 0x0000, 0x8000, CRC(3a824d96) SHA1(1eb2b4630be10131416ff84213aa858a072896ac) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuerteh ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* based on witchcrd (winning counter, no lamps, only 9 settings parameters) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // based on witchcrd (winning counter, no lamps, only 9 settings parameters) ROM_LOAD( "jc603d.256", 0x0000, 0x8000, CRC(25df69e5) SHA1(54d2798437b61bd0e1919fb62daf24ed9df42678) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertei ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* mcs: Buena Suerte! (ind arg, Cordoba) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // mcs: Buena Suerte! (ind arg, Cordoba) ROM_LOAD( "mcs.256", 0x0000, 0x8000, CRC(5c944e9d) SHA1(e394f8a32f4ebe622c0d0c30db5cb9d6d70b2126) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertej ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bsgemini: BS hack by SUSILU, bad texts, and need proper chars */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bsgemini: BS hack by SUSILU, bad texts, and need proper chars ROM_LOAD( "bsgemini.256", 0x0000, 0x8000, CRC(883f94d0) SHA1(30ff337ed2f454f74dfa354c14a8ab422284d279) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertek ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bsindarg: Buena Suerte! (ind arg, Cordoba, set 2)*/ + ROM_REGION( 0x10000, "maincpu", 0 ) // bsindarg: Buena Suerte! (ind arg, Cordoba, set 2) ROM_LOAD( "bsindarg.128", 0x4000, 0x4000, CRC(a9aaff1a) SHA1(13c9fbd0e9a04f42ded4dda0bb8a850de65cc671) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertel ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bslacer128: Buena Suerte! (portugues), English settings */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bslacer128: Buena Suerte! (portugues), English settings ROM_LOAD( "bslacer.128", 0x4000, 0x4000, CRC(edc254f4) SHA1(20e5543e59bfd67a0afec7cbeeb7000f6bba6c69) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertem ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bslacer128: Buena Suerte! (portugues), English settings, set 2*/ + ROM_REGION( 0x10000, "maincpu", 0 ) // bslacer128: Buena Suerte! (portugues), English settings, set 2 ROM_LOAD( "bslacer.256", 0x0000, 0x8000, CRC(9f8a899a) SHA1(a1f3d0635b309d4734289b7ff48eceda69dfd3d0) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* @@ -5950,122 +5968,122 @@ ROM_END ROM_START( bsuerteo ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_x10.256: BS normal, fast, set 2*/ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_x10.256: BS normal, fast, set 2 ROM_LOAD( "bs_x10.256", 0x0000, 0x8000, CRC(ad3427a6) SHA1(d0a954c86c0a4354b5cea4140b8da7a10f66337a) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertep ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_p.128: another common BS set */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_p.128: another common BS set ROM_LOAD( "bs_p.128", 0x4000, 0x4000, CRC(9503cfef) SHA1(f3246621bb9dff3d357d4c99f7075509899ed05f) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuerteq ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_r4.128: BS portunhol, white title */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_r4.128: BS portunhol, white title ROM_LOAD( "bs_r4.128", 0x4000, 0x4000, CRC(22841e2f) SHA1(d547aa6ddb82aff0d87eeb9bae67281d22dc50d5) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuerter ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_100.128: BS with 1-100 bet (only allow 50) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_100.128: BS with 1-100 bet (only allow 50) ROM_LOAD( "bs_100.128", 0x4000, 0x4000, CRC(1d3104e5) SHA1(9c0f00725270aa4d28b5a539431311bdca2f864a) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertes ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_50.128: BS, normal set */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_50.128: BS, normal set ROM_LOAD( "bs_50.128", 0x4000, 0x4000, CRC(8c2e43ca) SHA1(3e3f0848964f4ee6f47ddcf2220ebd06d771eebf) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuertet ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_c.128: BS portunhol, with typos (Halta) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_c.128: BS portunhol, with typos (Halta) ROM_LOAD( "bs_c.128", 0x4000, 0x4000, CRC(8b605bdf) SHA1(a933149999937f44cb62a3b34ab55ac4b5a50f72) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( bsuerteu ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_origi.bin: BS portunhol, with typos (Halta & Fixa) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_origi.bin: BS portunhol, with typos (Halta & Fixa) ROM_LOAD( "bs_origi.bin", 0x0000, 0x8000, CRC(63a1ba65) SHA1(2354461ec7ad75f7ff2699e89d40517463157aaa) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* @@ -6124,21 +6142,21 @@ ROM_END */ ROM_START( witchcrd ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "epoxy_27128.bin", 0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) ) /* epoxy block program ROM */ + ROM_LOAD( "epoxy_27128.bin", 0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) ) // epoxy block program ROM ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "wc4.7a", 0x2000, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) ) /* text layer */ - ROM_LOAD( "wc4.7a", 0x2800, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "wc4.7a", 0x2000, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) ) // char ROM + ROM_LOAD( "wc4.7a", 0x2800, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) // cards deck gfx, bitplane1 + ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) // cards deck gfx, bitplane2 + ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "82s129.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */ - ROM_LOAD( "epoxy_82s129.bin", 0x0100, 0x0100, CRC(f0c012b1) SHA1(5502977404172e8c5b9fbf305581a406668ad1d9) ) /* original epoxy block PROM */ + ROM_LOAD( "82s129.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // original PCB PROM + ROM_LOAD( "epoxy_82s129.bin", 0x0100, 0x0100, CRC(f0c012b1) SHA1(5502977404172e8c5b9fbf305581a406668ad1d9) ) // original epoxy block PROM ROM_END /* Witch Card (Spanish, set 1) @@ -6149,16 +6167,16 @@ ROM_START( witchcda ) ROM_LOAD( "w_card.256", 0x0000, 0x8000, CRC(63a471f8) SHA1(96a2140e2da0050e7865a6662f707cf024130832) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* Witch Card (Spanish, set 2) @@ -6169,16 +6187,16 @@ ROM_START( witchcdb ) ROM_LOAD( "w_card.128", 0x4000, 0x4000, CRC(11ecac96) SHA1(717709b31f3dfa09be321c14fbf0e95d492ad2f2) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* Witch Card (English, no witch game) @@ -6189,16 +6207,16 @@ ROM_START( witchcdc ) ROM_LOAD( "wc_sbruj.256", 0x0000, 0x8000, CRC(5689ae41) SHA1(c7a624ec881204137489b147ce66cc9a9900650a) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "bs_4_wc.032", 0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "bs_4_wc.032", 0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /*************************************** @@ -6215,13 +6233,13 @@ ROM_START( witchcdd ) ROM_LOAD( "12a.bin", 0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) ) ROM_REGION( 0x6000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x4000, 0x00000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "ce-3-tvg.bin", 0x4000, 0x2000, CRC(54b51497) SHA1(8c3a74377fde8c7c5a6b277a9c1e717e6bdd98f8) ) /* text layer */ + ROM_FILL( 0x0000, 0x4000, 0x00000 ) // filling the R-G bitplanes + ROM_LOAD( "ce-3-tvg.bin", 0x4000, 0x2000, CRC(54b51497) SHA1(8c3a74377fde8c7c5a6b277a9c1e717e6bdd98f8) ) // char ROM ROM_REGION( 0x6000, "gfx2", 0 ) - ROM_LOAD( "ce-1-tvg.bin", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "ce-2-tvg.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + ROM_LOAD( "ce-1-tvg.bin", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "ce-2-tvg.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the char rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -6233,7 +6251,7 @@ ROM_END */ ROM_START( witchcde ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "27128_epoxy.bin", 0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) ) /* epoxy block program ROM */ + ROM_LOAD( "27128_epoxy.bin", 0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) ) // epoxy block program ROM ROM_REGION( 0x4000, "temp", 0 ) ROM_LOAD( "wc1.a2", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) @@ -6242,17 +6260,17 @@ ROM_END ROM_LOAD( "wc4.a7", 0x3000, 0x1000, CRC(d3694522) SHA1(0f66ff2dd5c7ac9bf91fa9f48eb9f356572e814c) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x00000 ) /* filling the R-G bitplanes */ - ROM_COPY( "temp", 0x3800, 0x1000, 0x0800 ) /* 0800-0fff of wc4.a7 - charset */ + ROM_FILL( 0x0000, 0x1000, 0x00000 ) // filling the R-G bitplanes + ROM_COPY( "temp", 0x3800, 0x1000, 0x0800 ) // 0800-0fff of wc4.a7 - charset - ROM_REGION( 0x1800, "gfx2", 0 ) /* 2nd half of each ROM */ - ROM_COPY( "temp", 0x0800, 0x0000, 0x0800 ) /* 0800-0fff of wc1.a2 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x1800, 0x0800, 0x0800 ) /* 0800-0fff of wc2.a4 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x2800, 0x1000, 0x0800 ) /* 0800-0fff of wc3.a5 - regular cards gfx, bitplane 3 */ + ROM_REGION( 0x1800, "gfx2", 0 ) // 2nd half of each ROM + ROM_COPY( "temp", 0x0800, 0x0000, 0x0800 ) // 0800-0fff of wc1.a2 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x1800, 0x0800, 0x0800 ) // 0800-0fff of wc2.a4 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x2800, 0x1000, 0x0800 ) // 0800-0fff of wc3.a5 - regular cards gfx, bitplane 3 ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "24s10.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */ - ROM_LOAD( "24s10_epoxy.bin", 0x0100, 0x0100, CRC(ddfd7034) SHA1(78dee69ab4ba759485ee7f00446c2d86f08cc50f) ) /* original epoxy block PROM */ + ROM_LOAD( "24s10.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // original PCB PROM + ROM_LOAD( "24s10_epoxy.bin", 0x0100, 0x0100, CRC(ddfd7034) SHA1(78dee69ab4ba759485ee7f00446c2d86f08cc50f) ) // original epoxy block PROM ROM_END /* Witch Card (English, witch game, lights) @@ -6268,13 +6286,13 @@ ROM_START( witchcdf ) ROM_LOAD( "@27.bin", 0x7000, 0x1000, CRC(e6f9c973) SHA1(f209d13d1565160bc2c05c6c4fce73d14a9a56ab) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "@14.bin", 0x2000, 0x1000, CRC(19b68bec) SHA1(b8ef17ba5545e2f104cd2783e5f1c97c400fcbbc) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "@14.bin", 0x2000, 0x1000, CRC(19b68bec) SHA1(b8ef17ba5545e2f104cd2783e5f1c97c400fcbbc) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "11.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "12.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "13.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "11.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) ) // cards deck gfx, bitplane1 + ROM_LOAD( "12.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) // cards deck gfx, bitplane2 + ROM_LOAD( "13.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wc_bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -6299,18 +6317,18 @@ ROM_START( witchcdg ) ROM_LOAD( "8.b13", 0x7000, 0x1000, CRC(6bb0059e) SHA1(c5f515b692c3353323aff77f087bf0a92a8d99cf) ) ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "3.b5", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_FILL( 0x0800, 0x0800, 0x00000 ) /* filling the bitplane */ - ROM_LOAD( "2.b3", 0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_FILL( 0x1800, 0x0800, 0x00000 ) /* filling the bitplane */ - ROM_LOAD( "1.b1", 0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "3.b5", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_FILL( 0x0800, 0x0800, 0x00000 ) // filling the bitplane + ROM_LOAD( "2.b3", 0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_FILL( 0x1800, 0x0800, 0x00000 ) // filling the bitplane + ROM_LOAD( "1.b1", 0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) ) // cards deck gfx, bitplane3 ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x00000 ) /* filling the R-G bitplanes */ - ROM_COPY( "gfx2", 0x2800, 0x2000, 0x0800 ) /* srctag, srcoffs, offset, length */ + ROM_FILL( 0x0000, 0x2000, 0x00000 ) // filling the R-G bitplanes + ROM_COPY( "gfx2", 0x2800, 0x2000, 0x0800 ) // srctag, srcoffs, offset, length ROM_REGION( 0x0100, "proms", 0 ) -// ROM_LOAD( "82s129.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */ +// ROM_LOAD( "82s129.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // original PCB PROM ROM_LOAD( "tbp24s10n.d2", 0x0000, 0x0100, BAD_DUMP CRC(3db3b9e0) SHA1(c956493d5d754665d214b416e6a473d73c22716c) ) ROM_END @@ -6328,13 +6346,13 @@ ROM_START( witchcdh ) ROM_LOAD( "prog3000.a12", 0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) ) ROM_REGION( 0x6000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x4000, 0x00000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "wc3050.a5", 0x4000, 0x2000, CRC(6f35b9c4) SHA1(df86687164f18f2bfe71e73cccd28fe4117e748c) ) /* text layer, alt gfx */ + ROM_FILL( 0x0000, 0x4000, 0x00000 ) // filling the R-G bitplanes + ROM_LOAD( "wc3050.a5", 0x4000, 0x2000, CRC(6f35b9c4) SHA1(df86687164f18f2bfe71e73cccd28fe4117e748c) ) // char ROM, alt gfx ROM_REGION( 0x6000, "gfx2", 0 ) - ROM_LOAD( "wc1.a2", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) /* cards deck gfx, bitplane1 */ // sldh - ROM_LOAD( "wc1.a4", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) /* cards deck gfx, bitplane2 */ // sldh - ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + ROM_LOAD( "wc1.a2", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) // cards deck gfx, bitplane1 // sldh + ROM_LOAD( "wc1.a4", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) // cards deck gfx, bitplane2 // sldh + ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the char rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -6377,13 +6395,13 @@ ROM_START( witchcdi ) ROM_LOAD( "04.a12", 0x0000, 0x8000, CRC(0f662e02) SHA1(71d7344f63c11082beb4fb4eeb20b04780a9b14c) ) ROM_REGION( 0x6000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x4000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "03.a5", 0x4000, 0x2000, CRC(f181e5aa) SHA1(44a7696bd223effbc7542142a0c3c623c628071d) ) /* text layer */ + ROM_FILL( 0x0000, 0x4000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "03.a5", 0x4000, 0x2000, CRC(f181e5aa) SHA1(44a7696bd223effbc7542142a0c3c623c628071d) ) // char ROM ROM_REGION( 0x6000, "gfx2", 0 ) - ROM_LOAD( "01.a2", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "02.a4", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + ROM_LOAD( "01.a2", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "02.a4", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x4800, 0x4000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the char rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "27s21.d7", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -6398,19 +6416,19 @@ ROM_END ******************************************/ ROM_START( witchgme ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Video Klein */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Video Klein ROM_LOAD( "hn58c256p.box12t1", 0x0000, 0x8000, CRC(26c334cb) SHA1(d8368835c88668f09560f6096148a6e528806f65) ) ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "1.2a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_FILL( 0x0800, 0x0800, 0x0000 ) /* filling the bitplane */ - ROM_LOAD( "2.4a", 0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_FILL( 0x1800, 0x0800, 0x0000 ) /* filling the bitplane */ - ROM_LOAD( "3.5a", 0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) ) /* text layer */ + ROM_LOAD( "1.2a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_FILL( 0x0800, 0x0800, 0x0000 ) // filling the bitplane + ROM_LOAD( "2.4a", 0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_FILL( 0x1800, 0x0800, 0x0000 ) // filling the bitplane + ROM_LOAD( "3.5a", 0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) ) // char ROM ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_COPY( "gfx2", 0x2800, 0x2000, 0x0800 ) /* srctag, srcoffs, offset, length */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_COPY( "gfx2", 0x2800, 0x2000, 0x0800 ) // srctag, srcoffs, offset, length ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "n82s137f.box", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -6425,21 +6443,21 @@ ROM_END */ ROM_START( witchcdk ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "wc_epoxy.bin", 0x0000, 0x8000, CRC(33f1acd9) SHA1(2facb3d807b5b2a2978e567d0c1106c0a027621a) ) /* epoxy block program ROM */ + ROM_LOAD( "wc_epoxy.bin", 0x0000, 0x8000, CRC(33f1acd9) SHA1(2facb3d807b5b2a2978e567d0c1106c0a027621a) ) // epoxy block program ROM ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "wc4.7a", 0x2000, 0x1000, BAD_DUMP CRC(3bf07c44) SHA1(f6e859b142b7d4585b89ca609d8bc85c84fe2b09) ) /* text chars, corrupt */ // sldh - ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) /* srctag, srcoffs, offset, length */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "wc4.7a", 0x2000, 0x1000, BAD_DUMP CRC(3bf07c44) SHA1(f6e859b142b7d4585b89ca609d8bc85c84fe2b09) ) // chars ROM, corrupt // sldh + ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) // srctag, srcoffs, offset, length ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(f59c6fd2) SHA1(bea4b6043728311ca9fff36e2d7e24254af5b97a) ) /* cards deck gfx, bitplane1 */ // sldh - ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(f59c6fd2) SHA1(bea4b6043728311ca9fff36e2d7e24254af5b97a) ) // cards deck gfx, bitplane1 // sldh + ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) // cards deck gfx, bitplane2 + ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0600, "proms", 0 ) - ROM_LOAD( "24s10.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */ - ROM_LOAD( "82s137_epoxy.bin", 0x0100, 0x0400, CRC(4ae3ecf5) SHA1(e1e540ae13e7ce5ac6391f325160ec997ea6cc2f) ) /* original epoxy block PROM */ + ROM_LOAD( "24s10.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // original PCB PROM + ROM_LOAD( "82s137_epoxy.bin", 0x0100, 0x0400, CRC(4ae3ecf5) SHA1(e1e540ae13e7ce5ac6391f325160ec997ea6cc2f) ) // original epoxy block PROM ROM_END @@ -6494,7 +6512,7 @@ ROM_END ************************************/ ROM_START( witchjol ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* inside epoxy block with the CPU */ + ROM_REGION( 0x10000, "maincpu", 0 ) // inside epoxy block with the CPU ROM_LOAD( "27c256.bin", 0x8000, 0x8000, CRC(14f05e3b) SHA1(83578f6a82b0974dd0325903926b2fd0d8e5c236) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -6503,83 +6521,83 @@ ROM_START( witchjol ) ROM_LOAD( "i.2a", 0x08000, 0x2000, CRC(d467f6e2) SHA1(6aaf4cdfb76f5efeeee45635fea120711483648e) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of iii.5a - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of iii.5a - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of i.2a - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of ii.4a - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of iii.5a - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of i.2a - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of ii.4a - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of iii.5a - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of i.2a - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of ii.4a - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of iii.5a - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of i.2a - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of ii.4a - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of iii.5a - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of i.2a - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of ii.4a - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of iii.5a - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of i.2a - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of ii.4a - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of iii.5a - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "witchjol_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -6599,7 +6617,7 @@ ROM_END ****************************************************/ ROM_START( wldwitch ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 184A, 2001-09-12 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 184A, 2001-09-12 ROM_LOAD( "ww184a.bin", 0x8000, 0x8000, CRC(f45edc9b) SHA1(9a7400a84b685b84081d424d6da096632b845de8) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -6608,83 +6626,83 @@ ROM_START( wldwitch ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -6695,7 +6713,7 @@ ROM_END ROM_START( wldwitcha ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 157-SP, 1992-12-25 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 157-SP, 1992-12-25 ROM_LOAD( "ww157-sp.bin", 0x8000, 0x8000, CRC(34396a51) SHA1(823e817a01fab49deacf8af474e31732b96a15d1) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -6704,83 +6722,83 @@ ROM_START( wldwitcha ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -6791,7 +6809,7 @@ ROM_END ROM_START( wldwitchb ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 157-TE, 1992-12-25 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 157-TE, 1992-12-25 ROM_LOAD( "ww157-te.bin", 0x8000, 0x8000, CRC(9bf25a7c) SHA1(a78f946403254a30d9afa3c43ca42dfc02edd8fb) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -6800,83 +6818,83 @@ ROM_START( wldwitchb ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -6887,7 +6905,7 @@ ROM_END ROM_START( wldwitchc ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 162A, 1994-04-26 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 162A, 1994-04-26 ROM_LOAD( "ww162a.bin", 0x8000, 0x8000, CRC(59765e59) SHA1(474119fe179e0950b082fff8b014ceae8c82b44b) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -6896,83 +6914,83 @@ ROM_START( wldwitchc ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -6983,7 +7001,7 @@ ROM_END ROM_START( wldwitchd ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 162B, 1994-04-26 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 162B, 1994-04-26 ROM_LOAD( "ww162b.bin", 0x8000, 0x8000, CRC(a60e0f28) SHA1(88e41b9cfe76e2c70d0ebfb73801478412cd4ba4) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -6992,83 +7010,83 @@ ROM_START( wldwitchd ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7079,7 +7097,7 @@ ROM_END ROM_START( wldwitche ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 162A-F, 1994-04-26 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 162A-F, 1994-04-26 ROM_LOAD( "ww162a-f.bin", 0x8000, 0x8000, CRC(1aba84c1) SHA1(a825bd6312385c5a1768e8156fd7dad770926564) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7088,83 +7106,83 @@ ROM_START( wldwitche ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7175,7 +7193,7 @@ ROM_END ROM_START( wldwitchf ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 162A alt, 1994-11-03 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 162A alt, 1994-11-03 ROM_LOAD( "ww162a-alt.bin", 0x8000, 0x8000, CRC(0a8175b9) SHA1(23b300397491140a03de43140d0a05f154e90eab) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7184,83 +7202,83 @@ ROM_START( wldwitchf ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7271,7 +7289,7 @@ ROM_END ROM_START( wldwitchg ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 162B alt, 1994-11-03 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 162B alt, 1994-11-03 ROM_LOAD( "ww162b-alt.bin", 0x8000, 0x8000, CRC(f5f924c8) SHA1(a49ae2c8c3f3ec9fd1727564220aa1e8da633774) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7280,83 +7298,83 @@ ROM_START( wldwitchg ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7367,7 +7385,7 @@ ROM_END ROM_START( wldwitchh ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 165A, 1995-11-16 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 165A, 1995-11-16 ROM_LOAD( "ww165a.bin", 0x8000, 0x8000, CRC(9119add6) SHA1(fcf13831d968498d09daec993924a08ffefb80c8) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7376,83 +7394,83 @@ ROM_START( wldwitchh ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7463,7 +7481,7 @@ ROM_END ROM_START( wldwitchi ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 165A-S, 1996-03-26 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 165A-S, 1996-03-26 ROM_LOAD( "ww165a-s.bin", 0x8000, 0x8000, CRC(c5827a07) SHA1(474d6a715c230d3a1e19f9d4850eb52443cd975f) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7472,83 +7490,83 @@ ROM_START( wldwitchi ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7559,7 +7577,7 @@ ROM_END ROM_START( wldwitchj ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 165A-S alt, 1996-05-26 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 165A-S alt, 1996-05-26 ROM_LOAD( "wn165a-s-alt.bin", 0x8000, 0x8000, CRC(8b01bb4b) SHA1(bd42ce4ce46561ce2e094130710a55a122c5cc3e) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7568,83 +7586,83 @@ ROM_START( wldwitchj ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7655,7 +7673,7 @@ ROM_END ROM_START( wldwitchk ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 165A-N, 1996-05-29 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 165A-N, 1996-05-29 ROM_LOAD( "wn165a-n.bin", 0x8000, 0x8000, CRC(df9a6c9a) SHA1(07a09ad77b1e5b88b065e4c1ddaa201e7f904888) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7664,83 +7682,83 @@ ROM_START( wldwitchk ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7751,7 +7769,7 @@ ROM_END ROM_START( wldwitchl ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 170A-beta, 1996-06-25 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 170A-beta, 1996-06-25 ROM_LOAD( "ww170a-beta.bin", 0x8000, 0x8000, CRC(32dbaa23) SHA1(5f5b0b7ad56abe20a2b9b3670b98a4741ea8aaab) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7760,83 +7778,83 @@ ROM_START( wldwitchl ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7847,7 +7865,7 @@ ROM_END ROM_START( wldwitchm ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 170A, 1996-09-30 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 170A, 1996-09-30 ROM_LOAD( "ww170a.bin", 0x8000, 0x8000, CRC(1d976e56) SHA1(c03014f3b0e682cd0f025363108b5aa410c2b54b) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7856,83 +7874,83 @@ ROM_START( wldwitchm ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -7943,7 +7961,7 @@ ROM_END ROM_START( wldwitchn ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 170A alt, 1997-06-11 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 170A alt, 1997-06-11 ROM_LOAD( "ww170a-alt.bin", 0x8000, 0x8000, CRC(4266b71c) SHA1(c0fd545ae629f3456c447b3b695caeec42521a71) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -7952,83 +7970,83 @@ ROM_START( wldwitchn ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8039,7 +8057,7 @@ ROM_END ROM_START( wldwitcho ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 174A-SP-BELG, 1998-05-11 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 174A-SP-BELG, 1998-05-11 ROM_LOAD( "ww174a-sp-belg.bin", 0x8000, 0x8000, CRC(d490c676) SHA1(9403bcc003c9b48b25857bd142a73c8d23c5f5b5) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8048,83 +8066,83 @@ ROM_START( wldwitcho ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8135,7 +8153,7 @@ ROM_END ROM_START( wldwitchp ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 174A, 1998-09-20 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 174A, 1998-09-20 ROM_LOAD( "ww174a.bin", 0x8000, 0x8000, CRC(d4129f5a) SHA1(139c4b6f5972b5d7c549b27b114a81fd2de178c3) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8144,83 +8162,83 @@ ROM_START( wldwitchp ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8231,7 +8249,7 @@ ROM_END ROM_START( wldwitchq ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 174A alt, box, 1998-09-25 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 174A alt, box, 1998-09-25 ROM_LOAD( "wn174a_hn58c256p_box.bin", 0x8000, 0x8000, CRC(1de736a7) SHA1(e714a97999555fe0107390c8c9c2c3c1e822809a) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8240,83 +8258,83 @@ ROM_START( wldwitchq ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8327,7 +8345,7 @@ ROM_END ROM_START( wldwitchr ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 175A-E, 1999-01-11 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 175A-E, 1999-01-11 ROM_LOAD( "ww175a-e.bin", 0x8000, 0x8000, CRC(6fcb5732) SHA1(a5a62f35b775230c62ca55ed4497e8cb9e17c17d) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8336,83 +8354,83 @@ ROM_START( wldwitchr ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8423,7 +8441,7 @@ ROM_END ROM_START( wldwitchs ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 176A, 1999-??-?? */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 176A, 1999-??-?? ROM_LOAD( "ww176a.bin", 0x8000, 0x8000, CRC(509d0355) SHA1(62922423f868563acaa3eb637f8edb2755a5fcf6) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8432,83 +8450,83 @@ ROM_START( wldwitchs ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8519,7 +8537,7 @@ ROM_END ROM_START( wldwitcht ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 177A, 1999-??-?? */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 177A, 1999-??-?? ROM_LOAD( "ww177a.bin", 0x8000, 0x8000, CRC(c6761e20) SHA1(2bda4218c46c9fbc5719f7d3ade225faeec43d33) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8528,83 +8546,83 @@ ROM_START( wldwitcht ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8615,7 +8633,7 @@ ROM_END ROM_START( wldwitchu ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 179A, 2000-05-10 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 179A, 2000-05-10 ROM_LOAD( "ww179a.bin", 0x8000, 0x8000, CRC(ffcb48c0) SHA1(829c81b8c057a2fa95b8656d77c93899bae5c892) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8624,83 +8642,83 @@ ROM_START( wldwitchu ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8711,7 +8729,7 @@ ROM_END ROM_START( wldwitchv ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Ver 183A, 2001-06-13 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Ver 183A, 2001-06-13 ROM_LOAD( "ww183a.bin", 0x8000, 0x8000, CRC(2929b9b2) SHA1(3afe58b5619e818911ee142edce6a5a1468a1f97) ) ROM_REGION( 0x18000, "temp", 0 ) @@ -8720,83 +8738,83 @@ ROM_START( wldwitchv ) ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of 03.a3 - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of 01.a1 - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of 02.a2 - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of 03.a3 - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of 01.a1 - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of 02.a2 - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of 03.a3 - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of 01.a1 - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of 02.a2 - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of 03.a3 - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of 01.a1 - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of 02.a2 - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of 03.a3 - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wldwitch_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -8816,7 +8834,7 @@ ROM_END ************************************************/ -ROM_START( wupndown ) /* Witch Up & Down (Export, 6T/12T ver 1.02) */ +ROM_START( wupndown ) // Witch Up & Down (Export, 6T/12T ver 1.02) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "updown_19981024.bin", 0x8000, 0x8000, CRC(cea0dcbd) SHA1(732ec0c60529f4a4a6c3d7a9bfcab741f3cb4787) ) @@ -8826,90 +8844,90 @@ ROM_START( wupndown ) /* Witch Up & Down (Export, 6T/12T ver 1.02) */ ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of updown1.bin - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "updown_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wupndowna ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 1) */ +ROM_START( wupndowna ) // Witch Up & Down (Export, 6T/12T ver 0.99, set 1) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "updown_19980409.bin", 0x8000, 0x8000, CRC(f0f0da16) SHA1(06d89881347d9bf2a09734ec4d405ff1c9fea0a8) ) @@ -8919,90 +8937,90 @@ ROM_START( wupndowna ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 1) */ ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of updown1.bin - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "updown_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wupndownb ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 2) */ +ROM_START( wupndownb ) // Witch Up & Down (Export, 6T/12T ver 0.99, set 2) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5099.bin", 0x8000, 0x8000, CRC(b0e9ac64) SHA1(31496ddea75cf9512661f049ddab50ebdb518a44) ) @@ -9012,90 +9030,90 @@ ROM_START( wupndownb ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 2) */ ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of updown1.bin - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "updown_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wupndownc ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 3) */ +ROM_START( wupndownc ) // Witch Up & Down (Export, 6T/12T ver 0.99, set 3) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5099alt.bin", 0x8000, 0x8000, CRC(2355afbd) SHA1(f511375ca12dc71497601ca5b0a74deb0977d85e) ) @@ -9105,90 +9123,90 @@ ROM_START( wupndownc ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 3) */ ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of updown1.bin - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "updown_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wupndownd ) /* Witch Up & Down (Export, 6T/12T ver 0.99T) */ +ROM_START( wupndownd ) // Witch Up & Down (Export, 6T/12T ver 0.99T) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5099t.bin", 0x8000, 0x8000, CRC(a722c659) SHA1(41f43133992b012754577d788745ff8223d88077) ) @@ -9198,83 +9216,83 @@ ROM_START( wupndownd ) /* Witch Up & Down (Export, 6T/12T ver 0.99T) */ ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of updown1.bin - char rom, bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of updown2.bin - regular cards gfx, bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of updown3.bin - regular cards gfx, bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of updown1.bin - regular cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of updown2.bin - upper-left box tiles, bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of updown3.bin - upper-left box tiles, bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of updown1.bin - upper-left box tiles, bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of updown2.bin - giant 'Video Klein' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of updown3.bin - giant 'Video Klein' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of updown1.bin - giant 'Video Klein' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of updown2.bin - extended cards gfx, bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of updown3.bin - extended cards gfx, bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of updown1.bin - extended cards gfx, bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of updown2.bin - 'Up & Down' logo tiles, bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of updown3.bin - 'Up & Down' logo tiles, bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of updown1.bin - 'Up & Down' logo tiles, bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of updown2.bin - D-UP ladder tiles, bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of updown3.bin - D-UP ladder tiles, bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of updown1.bin - D-UP ladder tiles, bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of updown2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of updown3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of updown1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of updown2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of updown3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of updown1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "updown_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -9290,7 +9308,7 @@ ROM_END *********************************************/ -ROM_START( wstrike ) /* Witch Strike (Export, 6T/12T ver 1.01A) */ +ROM_START( wstrike ) // Witch Strike (Export, 6T/12T ver 1.01A) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wstrike_101a.bin", 0x8000, 0x8000, CRC(1e5a1c5c) SHA1(f6dcfae0f860196983378327864a9271e7d0b21f) ) @@ -9300,90 +9318,90 @@ ROM_START( wstrike ) /* Witch Strike (Export, 6T/12T ver 1.01A) */ ROM_LOAD( "wsrom3.bin", 0x10000, 0x8000, CRC(62692e92) SHA1(534a64abba4dabefa2fa1d2dfed0dc8a00d95156) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of wsrom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of wsrom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of wsrom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of wsrom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of wsrom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of wsrom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of wsrom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of wsrom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of wsrom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of wsrom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of wsrom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of wsrom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of wsrom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of wsrom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of wsrom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of wsrom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of wsrom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of wsrom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of wsrom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of wsrom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of wsrom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of wsrom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of wsrom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of wsrom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of wsrom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of wsrom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of wsrom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of wsrom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of wsrom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of wsrom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of wsrom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of wsrom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of wsrom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of wsrom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of wsrom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of wsrom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wstrike_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wstrikea ) /* Witch Strike (Export, 6T/12T ver 1.01B) */ +ROM_START( wstrikea ) // Witch Strike (Export, 6T/12T ver 1.01B) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wstrike_101b.bin", 0x8000, 0x8000, CRC(52be1662) SHA1(42c9377b3af54d5e9373b17884ae8f841edc34de) ) @@ -9393,83 +9411,83 @@ ROM_START( wstrikea ) /* Witch Strike (Export, 6T/12T ver 1.01B) */ ROM_LOAD( "wsrom3.bin", 0x10000, 0x8000, CRC(62692e92) SHA1(534a64abba4dabefa2fa1d2dfed0dc8a00d95156) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of wsrom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of wsrom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of wsrom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of wsrom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of wsrom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of wsrom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of wsrom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of wsrom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of wsrom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of wsrom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of wsrom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of wsrom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of wsrom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of wsrom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of wsrom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of wsrom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of wsrom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of wsrom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of wsrom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of wsrom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of wsrom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of wsrom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of wsrom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of wsrom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of wsrom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of wsrom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of wsrom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of wsrom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of wsrom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of wsrom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of wsrom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of wsrom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of wsrom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of wsrom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of wsrom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of wsrom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of wsrom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of wsrom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of wsrom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of wsrom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of wsrom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of wsrom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wstrike_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -9483,7 +9501,7 @@ ROM_END *********************************************/ -ROM_START( wtchjack ) /* Witch Jack 0.87-89 / 1996-10-08, GFX OK */ +ROM_START( wtchjack ) // Witch Jack 0.87-89 / 1996-10-08, GFX OK ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5089.bin", 0x8000, 0x8000, CRC(91e37ca4) SHA1(abce8447550165547cd3c89dffb41c5394a2c901) ) @@ -9493,90 +9511,90 @@ ROM_START( wtchjack ) /* Witch Jack 0.87-89 / 1996-10-08, GFX OK */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjacka ) /* Witch Jack 0.87-88 / 1996-10-02, GFX OK */ +ROM_START( wtchjacka ) // Witch Jack 0.87-88 / 1996-10-02, GFX OK ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5088.bin", 0x8000, 0x8000, CRC(08143537) SHA1(ef16531bcf955daded1be406dd3f61f37070298c) ) @@ -9586,90 +9604,90 @@ ROM_START( wtchjacka ) /* Witch Jack 0.87-88 / 1996-10-02, GFX OK */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjackb ) /* Witch Jack 0.87 / 1996-07-16, GFX OK */ +ROM_START( wtchjackb ) // Witch Jack 0.87 / 1996-07-16, GFX OK ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5087.bin", 0x8000, 0x8000, CRC(b027d8a5) SHA1(f06b92cc7aacadca1b8c98bda19efa670596891c) ) @@ -9679,90 +9697,90 @@ ROM_START( wtchjackb ) /* Witch Jack 0.87 / 1996-07-16, GFX OK */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjackc ) /* Witch Jack 0.70S / 1996-03-26 */ +ROM_START( wtchjackc ) // Witch Jack 0.70S / 1996-03-26 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x570s.bin", 0x8000, 0x8000, CRC(294e3ac6) SHA1(e58c38ae341dcb48572f8852ec858ef8433c6f95) ) @@ -9772,90 +9790,90 @@ ROM_START( wtchjackc ) /* Witch Jack 0.70S / 1996-03-26 */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjackd ) /* Witch Jack 0.70P / 1996-03-26 */ +ROM_START( wtchjackd ) // Witch Jack 0.70P / 1996-03-26 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x570p.bin", 0x8000, 0x8000, CRC(d77d8119) SHA1(c8999e3c55257750f27f1683f5b416e8e4e4297d) ) @@ -9865,90 +9883,90 @@ ROM_START( wtchjackd ) /* Witch Jack 0.70P / 1996-03-26 */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjacke ) /* Witch Jack 0.65 / 1995-10-19 */ +ROM_START( wtchjacke ) // Witch Jack 0.65 / 1995-10-19 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x565p.bin", 0x8000, 0x8000, CRC(20c23876) SHA1(ca2309766a68ba280d71b3b62e00d38d70b8536a) ) @@ -9958,90 +9976,90 @@ ROM_START( wtchjacke ) /* Witch Jack 0.65 / 1995-10-19 */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjackf ) /* Witch Jack 0.64 / 1995-09-13 */ +ROM_START( wtchjackf ) // Witch Jack 0.64 / 1995-09-13 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x564p.bin", 0x8000, 0x8000, CRC(7ee61b69) SHA1(313b750a7949f4d08cdf79c068d01ed91fc66dce) ) @@ -10051,90 +10069,90 @@ ROM_START( wtchjackf ) /* Witch Jack 0.64 / 1995-09-13 */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjackg ) /* Witch Jack 0.62 / 1995-08-02 */ +ROM_START( wtchjackg ) // Witch Jack 0.62 / 1995-08-02 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x563.bin", 0x8000, 0x8000, CRC(55e74382) SHA1(af0a890c55db36e8a2f847ea103858cc7b7115be) ) // @@ -10144,90 +10162,90 @@ ROM_START( wtchjackg ) /* Witch Jack 0.62 / 1995-08-02 */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjackh ) /* Witch Jack 0.40T / 1995-02-27, Not Working */ +ROM_START( wtchjackh ) // Witch Jack 0.40T / 1995-02-27, Not Working ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5t40.bin", 0x8000, 0x8000, CRC(a3a4f1d3) SHA1(16dcaf880134f10152703cb3ca81dfcbe48bff8b) ) @@ -10237,90 +10255,90 @@ ROM_START( wtchjackh ) /* Witch Jack 0.40T / 1995-02-27, Not Working */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjacki ) /* Witch Jack 0.40 / 1995-02-27 */ +ROM_START( wtchjacki ) // Witch Jack 0.40 / 1995-02-27 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5040.bin", 0x8000, 0x8000, CRC(2f0f1d7a) SHA1(048d0641a4e03a77f4964898ad2c224cb487aa36) ) @@ -10330,90 +10348,90 @@ ROM_START( wtchjacki ) /* Witch Jack 0.40 / 1995-02-27 */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) ROM_END -ROM_START( wtchjackj ) /* Witch Jackpot 0.25 / 1994-11-24 */ +ROM_START( wtchjackj ) // Witch Jackpot 0.25 / 1994-11-24 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wj5x5015.bin", 0x8000, 0x8000, CRC(bc0e6b78) SHA1(29482035f6122385447009abd695ed52fc669158) ) @@ -10423,83 +10441,83 @@ ROM_START( wtchjackj ) /* Witch Jackpot 0.25 / 1994-11-24 */ ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) ) ROM_REGION( 0x1800, "gfx0", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) /* 0800-0fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) /* 1000-17ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) // 0800-0fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x10800, 0x0800, 0x0800 ) // 0800-0fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x01000, 0x1000, 0x0800 ) // 1000-17ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) /* 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) /* 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) /* 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x08000, 0x0000, 0x0800 ) // 0000-07ff of rom2.bin - regular pin gfx (placed ok), bitplane 1 + ROM_COPY( "temp", 0x10000, 0x0800, 0x0800 ) // 0000-07ff of rom3.bin - regular pin gfx (placed ok), bitplane 2 + ROM_COPY( "temp", 0x00800, 0x1000, 0x0800 ) // 0800-0fff of rom1.bin - regular pin gfx (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx3", 0 ) - ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) /* 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) /* 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) /* 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0c000, 0x0000, 0x0800 ) // 4000-47ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x14000, 0x0800, 0x0800 ) // 4000-47ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x04800, 0x1000, 0x0800 ) // 4800-4fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx4", 0 ) - ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) /* 1800-1fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) /* 1800-1fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x09800, 0x0000, 0x0800 ) // 1800-1fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x11800, 0x0800, 0x0800 ) // 1800-1fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x02000, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx5", 0 ) - ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) /* 2800-2fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) /* 2800-2fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) /* 3000-37ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0a800, 0x0000, 0x0800 ) // 2800-2fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x12800, 0x0800, 0x0800 ) // 2800-2fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x03000, 0x1000, 0x0800 ) // 3000-37ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx6", 0 ) - ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) /* 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) /* 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) /* 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0a000, 0x0000, 0x0800 ) // 2000-27ff of rom2.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x12000, 0x0800, 0x0800 ) // 2000-27ff of rom3.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x02800, 0x1000, 0x0800 ) // 2800-2fff of rom1.bin - 'Video Klein' logo lower tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx7", 0 ) - ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) /* 6800-6fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) /* 6800-6fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) /* 7000-77ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e800, 0x0000, 0x0800 ) // 6800-6fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16800, 0x0800, 0x0800 ) // 6800-6fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07000, 0x1000, 0x0800 ) // 7000-77ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx8", 0 ) - ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) /* 3800-3fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) /* 3800-3fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0b800, 0x0000, 0x0800 ) // 3800-3fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x13800, 0x0800, 0x0800 ) // 3800-3fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x04000, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx9", 0 ) - ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) /* 4800-4fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) /* 4800-4fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) /* 4000-47ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0c800, 0x0000, 0x0800 ) // 4800-4fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x14800, 0x0800, 0x0800 ) // 4800-4fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x05000, 0x1000, 0x0800 ) // 4000-47ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx10", 0 ) - ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) /* 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) /* 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) /* 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x09000, 0x0000, 0x0800 ) // 1000-17ff of rom2.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 1 + ROM_COPY( "temp", 0x11000, 0x0800, 0x0800 ) // 1000-17ff of rom3.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 2 + ROM_COPY( "temp", 0x01800, 0x1000, 0x0800 ) // 1800-1fff of rom1.bin - extended pin gfx and logo upper tiles (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx11", 0 ) - ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) /* 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) /* 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) /* 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0d000, 0x0000, 0x0800 ) // 5000-57ff of rom2.bin - empty (placed ok), bitplane 1 + ROM_COPY( "temp", 0x15000, 0x0800, 0x0800 ) // 5000-57ff of rom3.bin - empty (placed ok), bitplane 2 + ROM_COPY( "temp", 0x05800, 0x1000, 0x0800 ) // 5800-5fff of rom1.bin - empty (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx12", 0 ) - ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) /* 5800-5fff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) /* 5800-5fff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) /* 6000-67ff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0d800, 0x0000, 0x0800 ) // 5800-5fff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x15800, 0x0800, 0x0800 ) // 5800-5fff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06000, 0x1000, 0x0800 ) // 6000-67ff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx13", 0 ) - ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) /* 6000-67ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) /* 6000-67ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) /* 6800-6fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0e000, 0x0000, 0x0800 ) // 6000-67ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x16000, 0x0800, 0x0800 ) // 6000-67ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x06800, 0x1000, 0x0800 ) // 6800-6fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x1800, "gfx14", 0 ) - ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) /* 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 */ - ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) /* 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 */ - ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) /* 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 */ + ROM_COPY( "temp", 0x0b000, 0x0000, 0x0800 ) // 3000-37ff of rom2.bin - garbage (placed ok), bitplane 1 + ROM_COPY( "temp", 0x13000, 0x0800, 0x0800 ) // 3000-37ff of rom3.bin - garbage (placed ok), bitplane 2 + ROM_COPY( "temp", 0x03800, 0x1000, 0x0800 ) // 3800-3fff of rom1.bin - garbage (placed ok), bitplane 3 ROM_REGION( 0x1800, "gfx15", 0 ) - ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) /* 7000-77ff of rom2.bin - empty, bitplane 1 */ - ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) /* 7000-77ff of rom3.bin - empty, bitplane 2 */ - ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) /* 7800-7fff of rom1.bin - empty, bitplane 3 */ + ROM_COPY( "temp", 0x0f000, 0x0000, 0x0800 ) // 7000-77ff of rom2.bin - empty, bitplane 1 + ROM_COPY( "temp", 0x17000, 0x0800, 0x0800 ) // 7000-77ff of rom3.bin - empty, bitplane 2 + ROM_COPY( "temp", 0x07800, 0x1000, 0x0800 ) // 7800-7fff of rom1.bin - empty, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "wjack_tbp.bin", 0x0000, 0x0100, BAD_DUMP CRC(ed15125b) SHA1(56fc00f2ce4ebe9cee73a45b142c33c00432b66b) ) @@ -10525,22 +10543,22 @@ ROM_END **********************************************/ ROM_START( falcnwld ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Falcons Wild ROM_LOAD( "nosticker.12a", 0x0000, 0x10000, CRC(54ae4a8a) SHA1(0507098b53d807059b78ec098203d095d19028f8) ) ROM_REGION( 0x6000, "temp", 0 ) - ROM_LOAD( "fw1.2a", 0x0000, 0x2000, CRC(d5a58098) SHA1(9c8860949b0adcd20222e9b3e3e8e7e864e8f39f) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "fw2.4a", 0x2000, 0x2000, CRC(b28b7759) SHA1(513229cee451f59f824b7a64932679f91fbb324d) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "fw3.5a", 0x4000, 0x2000, BAD_DUMP CRC(98edfc82) SHA1(e3dd597245b55c3bc6ea86acf80ee024ca28f564) ) /* text layer + cards deck gfx, bitplane3 */ + ROM_LOAD( "fw1.2a", 0x0000, 0x2000, CRC(d5a58098) SHA1(9c8860949b0adcd20222e9b3e3e8e7e864e8f39f) ) // cards deck gfx, bitplane1 + ROM_LOAD( "fw2.4a", 0x2000, 0x2000, CRC(b28b7759) SHA1(513229cee451f59f824b7a64932679f91fbb324d) ) // cards deck gfx, bitplane2 + ROM_LOAD( "fw3.5a", 0x4000, 0x2000, BAD_DUMP CRC(98edfc82) SHA1(e3dd597245b55c3bc6ea86acf80ee024ca28f564) ) // chars + cards deck gfx, bitplane3 ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x4000, 0x1000, 0x0800 ) /* first quarter of fw3.5a */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x4000, 0x1000, 0x0800 ) // first quarter of fw3.5a ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x0000, 0x0000, 0x0800 ) /* first quarter of fw1.2a */ - ROM_COPY( "temp", 0x2000, 0x0800, 0x0800 ) /* first quarter of fw2.4a */ - ROM_COPY( "temp", 0x4800, 0x1000, 0x0800 ) /* second quarter of fw3.5a */ + ROM_COPY( "temp", 0x0000, 0x0000, 0x0800 ) // first quarter of fw1.2a + ROM_COPY( "temp", 0x2000, 0x0800, 0x0800 ) // first quarter of fw2.4a + ROM_COPY( "temp", 0x4800, 0x1000, 0x0800 ) // second quarter of fw3.5a ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "dm74s287n.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -10555,38 +10573,38 @@ ROM_END ************************************/ ROM_START( falcnwlda ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild, Video Klein */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Falcons Wild, Video Klein ROM_LOAD( "nmc27c256.box", 0x0000, 0x8000, CRC(a0072c55) SHA1(27b84a896ff06a423450d8f0851f42f3e8ec5466) ) ROM_RELOAD( 0x8000, 0x8000 ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) ) /* chars gfx */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) ) // chars gfx ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) ) /* cards deck gfx, bitplane1 */ // sldh + ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) ) // cards deck gfx, bitplane1 // sldh ROM_IGNORE( 0x0800) - ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) ) /* cards deck gfx, bitplane2 */ // sldh - ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) ) /* cards deck gfx, bitplane3 */ // sldh + ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) ) // cards deck gfx, bitplane2 // sldh + ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) ) // cards deck gfx, bitplane3 // sldh ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "n82s137f.box", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END ROM_START( falcnwldb ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* World Wide Poker / 1992-11-04 */ + ROM_REGION( 0x10000, "maincpu", 0 ) // World Wide Poker / 1992-11-04 ROM_LOAD( "fw12t1_19921104.bin", 0x0000, 0x8000, CRC(8b4f8cac) SHA1(e3bcbadaa157db48a41369a3fcdba536f8ca679e) ) ROM_RELOAD( 0x8000, 0x8000 ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) ) /* chars gfx */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) ) // chars gfx ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) ) /* cards deck gfx, bitplane1 */ // sldh + ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) ) // cards deck gfx, bitplane1 // sldh ROM_IGNORE( 0x0800) - ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) ) /* cards deck gfx, bitplane2 */ // sldh - ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) ) /* cards deck gfx, bitplane3 */ // sldh + ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) ) // cards deck gfx, bitplane2 // sldh + ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) ) // cards deck gfx, bitplane3 // sldh ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "n82s137f.box", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -10608,7 +10626,7 @@ ROM_END ***********************************************/ ROM_START( falcnwldc ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild, Falcon original */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Falcons Wild, Falcon original // ROM_LOAD( "nosticker.12a", 0x0000, 0x10000, CRC(54ae4a8a) SHA1(0507098b53d807059b78ec098203d095d19028f8) ) ROM_LOAD( "4.b6", 0x3000, 0x1000, CRC(88684a8f) SHA1(5ffa0808b502e93ddcb8f13929008aec2836a773) ) ROM_LOAD( "5.b8", 0x4000, 0x1000, CRC(aa5de05c) SHA1(98559b35c7c31a41b1818a6e60ec82f43a5d1b4a) ) @@ -10625,13 +10643,13 @@ ROM_START( falcnwldc ) ROM_LOAD( "3.b4", 0x1800, 0x0800, CRC(d9246780) SHA1(4ceb24131ec6208b742ba80373201aa53c50732d) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling bitplanes */ - ROM_COPY( "temp", 0x0800, 0x1000, 0x0800 ) /* second half of 1.b1 */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling bitplanes + ROM_COPY( "temp", 0x0800, 0x1000, 0x0800 ) // second half of 1.b1 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "temp", 0x1800, 0x0000, 0x0800 ) /* first half of 3.b4 */ - ROM_COPY( "temp", 0x1000, 0x0800, 0x0800 ) /* whole 2.b3 */ - ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* first half of 1.b1 */ + ROM_COPY( "temp", 0x1800, 0x0000, 0x0800 ) // first half of 3.b4 + ROM_COPY( "temp", 0x1000, 0x0800, 0x0800 ) // whole 2.b3 + ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) // first half of 1.b1 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "falcon_1.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -10648,16 +10666,16 @@ ROM_START( pmpoker ) ROM_LOAD( "2-7.bin", 0x7000, 0x1000, CRC(a9ab972e) SHA1(477441b7ff3acae3a5d5a3e4c2a428e0b3121534) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "1-4.bin", 0x1000, 0x0800, CRC(62b9f90d) SHA1(39c61a01225027572fdb75543bb6a78ed74bb2fb) ) /* text layer */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "1-4.bin", 0x1000, 0x0800, CRC(62b9f90d) SHA1(39c61a01225027572fdb75543bb6a78ed74bb2fb) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1-1.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "1-2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "1-3.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "1-1.bin", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "1-2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "1-3.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "tbp24sa10.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump confirmed OK */ + ROM_LOAD( "tbp24sa10.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump confirmed OK ROM_END /*************************************************************** @@ -10744,7 +10762,7 @@ ROM_START( caspokera ) ROM_REGION( 0x1800, "gfx1", 0 ) ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes... - ROM_LOAD( "054.bin", 0x1000, 0x0800, CRC(7b401a09) SHA1(affb90a52761c36be7c67f7606f3f982f6dc724e) ) // text chars + ROM_LOAD( "054.bin", 0x1000, 0x0800, CRC(7b401a09) SHA1(affb90a52761c36be7c67f7606f3f982f6dc724e) ) // chars ROM ROM_IGNORE( 0x0800) // identical halves, discarding the 2nd half ROM_REGION( 0x1800, "gfx2", 0 ) @@ -10780,7 +10798,7 @@ ROM_START( caspokerb ) ROM_REGION( 0x1800, "gfx1", 0 ) // borrowed from parent set. ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes - ROM_LOAD( "054.bin", 0x1000, 0x0800, BAD_DUMP CRC(7b401a09) SHA1(affb90a52761c36be7c67f7606f3f982f6dc724e) ) // text chars + ROM_LOAD( "054.bin", 0x1000, 0x0800, BAD_DUMP CRC(7b401a09) SHA1(affb90a52761c36be7c67f7606f3f982f6dc724e) ) // chars ROM ROM_IGNORE( 0x0800) // identical halves, discarding the 2nd half ROM_REGION( 0x1800, "gfx2", 0 ) @@ -10816,7 +10834,7 @@ ROM_START( bonuspkr ) ROM_REGION( 0x1800, "gfx1", 0 ) ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes - ROM_LOAD( "poke_5.4_x.bin", 0x1000, 0x0800, CRC(ca9182b1) SHA1(4c440eb53a46c4f751cf8807cbe3187ad9dbc214) ) // text chars + ROM_LOAD( "poke_5.4_x.bin", 0x1000, 0x0800, CRC(ca9182b1) SHA1(4c440eb53a46c4f751cf8807cbe3187ad9dbc214) ) // chars ROM ROM_REGION( 0x1800, "gfx2", 0 ) ROM_LOAD( "bp_c1.bin", 0x0000, 0x0800, CRC(89a8c5f9) SHA1(e3aab20b2a962778a221ab96c691c37fad5b6877) ) // cards deck gfx, bitplane 1 @@ -10836,16 +10854,16 @@ ROM_START( royale ) ROM_LOAD( "royalex.bin", 0x4000, 0x4000, CRC(ef370617) SHA1(0fc5679e9787aeea3bc592b36efcaa20e859f912) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) ) // chars ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "royale3.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "royale2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "royale1.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "royale3.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) // cards deck gfx, bitplane1 + ROM_LOAD( "royale2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "royale1.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( royalea ) @@ -10853,16 +10871,16 @@ ROM_START( royalea ) ROM_LOAD( "royal.256", 0x0000, 0x8000, CRC(9d7fdb79) SHA1(05cae00bca0f6ae696c69f531cb0fa2104ff696a) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) ) // chars ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "royale3.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "royale2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "royale1.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "royale3.bin", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) // cards deck gfx, bitplane1 + ROM_LOAD( "royale2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "royale1.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END @@ -10871,16 +10889,16 @@ ROM_START( sloco93 ) ROM_LOAD( "locoloco.128", 0x4000, 0x4000, CRC(f626a770) SHA1(afbd33b3f65b8a781c716a3d6e5447aa817d856c) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "confloco.032", 0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "confloco.032", 0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( sloco93a ) @@ -10888,16 +10906,16 @@ ROM_START( sloco93a ) ROM_LOAD( "locoloco.256", 0x0000, 0x8000, CRC(ab037b0b) SHA1(16f811daaed5bf7b72549db85755c5274dfee310) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "confloco.032", 0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "confloco.032", 0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /* @@ -10907,20 +10925,20 @@ ROM_END balanced at $7ff8. */ ROM_START( maverik ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* maverik: Maverik (ind arg, fixed, changed logo) */ + ROM_REGION( 0x10000, "maincpu", 0 ) // maverik: Maverik (ind arg, fixed, changed logo) ROM_LOAD( "maverik.bin", 0x0000, 0x8000, CRC(65a986e9) SHA1(2e825d3fb2346036357af0e12d3a75b5ef6cfd0d) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /***************************** @@ -10929,105 +10947,105 @@ ROM_END ****************************/ ROM_START( brasil86 ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil86.128: Brasil 86, BS clone. */ + ROM_REGION( 0x10000, "maincpu", 0 ) // brasil86.128: Brasil 86, BS clone. ROM_LOAD( "brasil86.128", 0x4000, 0x4000, CRC(0e88b434) SHA1(80f921c277f4253c29ee80e9cfb046ade1f66300) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( brasil87 ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil87.128: Brasil 87, BS clone. */ + ROM_REGION( 0x10000, "maincpu", 0 ) // brasil87.128: Brasil 87, BS clone. ROM_LOAD( "brasil87.128", 0x4000, 0x4000, CRC(6cfdaea9) SHA1(0704e61c1c573e99e130c22787b529ac5544c631) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( brasil89 ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil89.128: Brasil 89, BS clone. */ + ROM_REGION( 0x10000, "maincpu", 0 ) // brasil89.128: Brasil 89, BS clone. ROM_LOAD( "brasil89.128", 0x4000, 0x4000, CRC(9030e0db) SHA1(d073ed0ddd3e5df6a3387e10e05ca34bc491eb35) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( brasil89a ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil89a.128: Brasil 89a, BS clone. */ + ROM_REGION( 0x10000, "maincpu", 0 ) // brasil89a.128: Brasil 89a, BS clone. ROM_LOAD( "brasil89a.128", 0x4000, 0x4000, CRC(41a93a99) SHA1(70eeaddbdd9d3a587d1330b81d21d881ab0a8c91) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( brasil93 ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil93.128: Brasil 93, BS clone. No lights */ + ROM_REGION( 0x10000, "maincpu", 0 ) // brasil93.128: Brasil 93, BS clone. No lights ROM_LOAD( "brasil93.128", 0x4000, 0x4000, CRC(cc25909f) SHA1(635184022bcb8936c396cb9fcfa6367fcae906fb) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( poker91 ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_pok91.bin: Poker 91. Based on witchcrd */ + ROM_REGION( 0x10000, "maincpu", 0 ) // bs_pok91.bin: Poker 91. Based on witchcrd ROM_LOAD( "bs_pok91.bin", 0x0000, 0x8000, CRC(90c88b45) SHA1(9b5842075ece5f96a6869d7a8c874dee2b2abde2) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) // chars ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "7.bin", 0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) ) // cards deck gfx, bitplane1 + ROM_LOAD( "6.bin", 0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) ) // cards deck gfx, bitplane2 + ROM_LOAD( "5.bin", 0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END @@ -11064,18 +11082,18 @@ ROM_START( genie ) ROM_LOAD( "3m.17a", 0x3000, 0x1000, CRC(9d67f5c9) SHA1(d3bc13ce07a7b1713544756d7723dd0bcd59cd1a) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(1cdd1db9) SHA1(1940c6654b4a892abc3e4557666d341f407ac54f) ) /* chars gfx */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(1cdd1db9) SHA1(1940c6654b4a892abc3e4557666d341f407ac54f) ) // chars gfx ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) ) /* tiles, bitplane1 */ - ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) ) /* tiles, bitplane2 */ - ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(151e4af7) SHA1(a44feaa69a00a6db31c018267b8b67a248e7c66e) ) /* tiles, bitplane3 */ + ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) ) // tiles, bitplane1 + ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) ) // tiles, bitplane2 + ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(151e4af7) SHA1(a44feaa69a00a6db31c018267b8b67a248e7c66e) ) // tiles, bitplane3 - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM, otherwise the game isn't stable */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM, otherwise the game isn't stable ROM_LOAD( "genie_nvram.bin", 0x0000, 0x0800, CRC(1b062ae7) SHA1(9d01635f3968d4b91b4a5d9fadfaf6edd0dea7ba) ) - ROM_REGION( 0x0100, "proms", 0 ) /* using original golden poker color prom */ + ROM_REGION( 0x0100, "proms", 0 ) // using original golden poker color prom ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END @@ -11088,15 +11106,15 @@ ROM_START( geniea ) ROM_LOAD( "2732.15a", 0x7000, 0x1000, CRC(7137aa06) SHA1(1a2af7dfe41e54fc9c3b4e641319d1a504e84a18) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "2732.9a", 0x2000, 0x1000, BAD_DUMP CRC(ffb7bca3) SHA1(b58175c0342f963cb42a04195e296db952e071b6) ) /* chars + bitplane3 */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "2732.9a", 0x2000, 0x1000, BAD_DUMP CRC(ffb7bca3) SHA1(b58175c0342f963cb42a04195e296db952e071b6) ) // chars + bitplane3 ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) ) /* tiles, bitplane1 */ - ROM_LOAD( "2716.6a", 0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) ) /* tiles, bitplane2 */ - ROM_COPY( "gfx1", 0x2800, 0x1000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) ) // tiles, bitplane1 + ROM_LOAD( "2716.6a", 0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) ) // tiles, bitplane2 + ROM_COPY( "gfx1", 0x2800, 0x1000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the chars rom - ROM_REGION( 0x0100, "proms", 0 ) /* using original golden poker color prom */ + ROM_REGION( 0x0100, "proms", 0 ) // using original golden poker color prom ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END @@ -11126,13 +11144,13 @@ ROM_START( silverga ) ROM_LOAD( "55", 0x6000, 0x2000, CRC(aad57b3c) SHA1(9508026c1a7b227a70d89ad2f7245e75a615b932) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "13", 0x2000, 0x1000, CRC(98b8cb4f) SHA1(420ea544a41e24478a8eb1c7076f4569607d0379) ) /* text layer */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "13", 0x2000, 0x1000, CRC(98b8cb4f) SHA1(420ea544a41e24478a8eb1c7076f4569607d0379) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "11", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "12", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x2800, 0x1000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd half of the char rom */ + ROM_LOAD( "11", 0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) ) // cards deck gfx, bitplane1 + ROM_LOAD( "12", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x2800, 0x1000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd half of the char rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "s287", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -11157,16 +11175,16 @@ ROM_START( superdbl ) ROM_LOAD( "8", 0x3000, 0x1000, CRC(157332c2) SHA1(3c66200c49641b9d876c5fa134dd2f0e80136beb) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4", 0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) ) /* text layer */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4", 0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "2", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "3", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "1", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "2", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "3", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "tbp24sa10n.7d", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "tbp24sa10n.7d", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /**************************************************** @@ -11187,13 +11205,13 @@ ROM_START( pokerdub ) ROM_LOAD( "unknown.17a", 0x3000, 0x1000, NO_DUMP ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) ) /* char ROM (cracked title) */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) ) // char ROM (cracked title) ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "s287.8c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -11218,14 +11236,14 @@ ROM_START( witchcdj ) ROM_LOAD( "b", 0x7000, 0x1000, CRC(8627fba5) SHA1(b94665f0bf425ff71f78c1258f910323c2a948f0) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "a.8a", 0x1000, 0x0800, CRC(c70a3e49) SHA1(eb2f15b344f4dec5f05701415848c854bb27aaa3) ) /* char ROM (cracked title) */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "a.8a", 0x1000, 0x0800, CRC(c70a3e49) SHA1(eb2f15b344f4dec5f05701415848c854bb27aaa3) ) // chars ROM (cracked title) ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) /* cards deck gfx, bitplane3 */ - ROM_IGNORE( 0x0800) /* identical halves */ + ROM_LOAD( "1.4a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane1 + ROM_LOAD( "2.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "3.7a", 0x1000, 0x0800, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) // cards deck gfx, bitplane3 + ROM_IGNORE( 0x0800) // identical halves ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM, otherwise the game is not working ROM_LOAD( "witchcdj_nvram.bin", 0x0000, 0x0800, CRC(39766c6a) SHA1(9de4c5886d1ee12898f7d3b0224ab99d49e5e43d) ) @@ -11249,11 +11267,11 @@ ROM_END 5f63 */ -ROM_START( bchancep ) /* Bonne Chance! with PIAs 6821 */ +ROM_START( bchancep ) // Bonne Chance! with PIAs 6821 ROM_REGION( 0x3000, "gfx", 0 ) - ROM_LOAD( "84.bin", 0x0000, 0x1000, CRC(31f8104e) SHA1(b99f79019517ca90c48e9f303f41256d68faea91) ) /* cards deck gfx bitplane 3, identical halves */ - ROM_LOAD( "85.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx bitplane 2, identical halves */ - ROM_LOAD( "87.bin", 0x2000, 0x1000, CRC(79c3578a) SHA1(9f25749f59385e6b80684ba9d4b218eb2a546e8c) ) /* 1st half text layer, 2nd half cards deck gfx bitplane 1 */ + ROM_LOAD( "84.bin", 0x0000, 0x1000, CRC(31f8104e) SHA1(b99f79019517ca90c48e9f303f41256d68faea91) ) // cards deck gfx bitplane 3, identical halves + ROM_LOAD( "85.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) // cards deck gfx bitplane 2, identical halves + ROM_LOAD( "87.bin", 0x2000, 0x1000, CRC(79c3578a) SHA1(9f25749f59385e6b80684ba9d4b218eb2a546e8c) ) // 1st half text layer, 2nd half cards deck gfx bitplane 1 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "88.bin", 0x5000, 0x1000, CRC(c617b037) SHA1(55b58496d12dc8bcaa252e8ee847dbcb7d2c417d) ) @@ -11262,13 +11280,13 @@ ROM_START( bchancep ) /* Bonne Chance! with PIAs 6821 */ // ROM_LOAD( "ups39_12a.bin", 0x0000, 0x8000, CRC(216b45fb) SHA1(fbfcd98cc39b2e791cceb845b166ff697f584add) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_COPY( "gfx", 0x2000, 0x1000, 0x0800 ) /* text layer and cards logo */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_COPY( "gfx", 0x2000, 0x1000, 0x0800 ) // chars and cards logo ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "gfx", 0x0000, 0x0000, 0x0800 ) /* cards deck gfx, bitplane 1 */ - ROM_COPY( "gfx", 0x1000, 0x0800, 0x0800 ) /* cards deck gfx, bitplane 2 */ - ROM_COPY( "gfx", 0x2800, 0x1000, 0x0800 ) /* cards deck gfx, bitplane 3 */ + ROM_COPY( "gfx", 0x0000, 0x0000, 0x0800 ) // cards deck gfx, bitplane 1 + ROM_COPY( "gfx", 0x1000, 0x0800, 0x0800 ) // cards deck gfx, bitplane 2 + ROM_COPY( "gfx", 0x2800, 0x1000, 0x0800 ) // cards deck gfx, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "bchancep_bp.bin", 0x0000, 0x0100, CRC(70fe1582) SHA1(118c743d445a37ad760e4163b61c3c562d7adda6) ) @@ -11279,13 +11297,13 @@ ROM_START( bchanceq ) ROM_LOAD( "pok4-5.014", 0x4000, 0x4000, CRC(92f1f515) SHA1(f79ab453458f71d7e62e895d04a2d6161dbf2aad) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "pok3.014", 0x1000, 0x0800, CRC(fb00e263) SHA1(879660bc3a3eb3d41f80741b157cdefaa7bd9a18) ) /* char ROM, different cardback logo */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "pok3.014", 0x1000, 0x0800, CRC(fb00e263) SHA1(879660bc3a3eb3d41f80741b157cdefaa7bd9a18) ) // chars ROM, different cardback logo ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "pok0.014", 0x0000, 0x0800, CRC(124f131f) SHA1(35b18d1d6b0146ecc5b52f3222a270c6b868742a) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "pok1.014", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "pok2.014", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "pok0.014", 0x0000, 0x0800, CRC(124f131f) SHA1(35b18d1d6b0146ecc5b52f3222a270c6b868742a) ) // cards deck gfx, bitplane1 + ROM_LOAD( "pok1.014", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane2 + ROM_LOAD( "pok2.014", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "82s129.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -11323,7 +11341,7 @@ ROM_END */ ROM_START( pokermon ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* 2 programs, selectable via DIP switch */ + ROM_REGION( 0x10000, "maincpu", 0 ) // 2 programs, selectable via DIP switch ROM_LOAD( "mbv_bi.bin", 0x0000, 0x8000, CRC(da00e08a) SHA1(98e52915178e29ab3ae674e6b895da14626d3dd8) ) ROM_REGION( 0x18000, "gfx", 0 ) @@ -11332,20 +11350,20 @@ ROM_START( pokermon ) ROM_LOAD( "3m.bin", 0x10000, 0x8000, CRC(b2237068) SHA1(ece4f089776bbd5224c63c6a41a2e86a5e89d0c5) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_COPY( "gfx", 0x14800, 0x1000, 0x0800 ) /* text, numbers and soccer ball tiles */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_COPY( "gfx", 0x14800, 0x1000, 0x0800 ) // chars, numbers and soccer ball tiles ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "gfx", 0x0000, 0x0000, 0x0800 ) /* soccer player gfx, bitplane 1 */ - ROM_COPY( "gfx", 0x08000, 0x0800, 0x0800 ) /* soccer player gfx, bitplane 2 */ - ROM_COPY( "gfx", 0x12000, 0x1000, 0x0800 ) /* soccer player gfx, bitplane 3 */ + ROM_COPY( "gfx", 0x0000, 0x0000, 0x0800 ) // soccer player gfx, bitplane 1 + ROM_COPY( "gfx", 0x08000, 0x0800, 0x0800 ) // soccer player gfx, bitplane 2 + ROM_COPY( "gfx", 0x12000, 0x1000, 0x0800 ) // soccer player gfx, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "mb.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END ROM_START( pokersis ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* seems to contains 4 selectable programs, but vectors lack of sense */ + ROM_REGION( 0x10000, "maincpu", 0 ) // seems to contains 4 selectable programs, but vectors lack of sense ROM_LOAD( "gsub1.bin", 0x0000, 0x10000, CRC(d585dd64) SHA1(acc371aa8c6c9d1ae784e62eae9c90fd05fad0fc) ) ROM_REGION( 0x18000, "gfx", 0 ) @@ -11354,13 +11372,13 @@ ROM_START( pokersis ) ROM_LOAD( "gs3.bin", 0x10000, 0x8000, CRC(12c37991) SHA1(e63a0504e697daddcdfcf90b2a136c4180a431a7) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_COPY( "gfx", 0x14800, 0x1000, 0x0800 ) /* text and suppossed 1bpp gfx */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_COPY( "gfx", 0x14800, 0x1000, 0x0800 ) // text and suppossed 1bpp gfx ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_COPY( "gfx", 0x04000, 0x0000, 0x0800 ) /* cards gfx, bitplane 1 */ - ROM_COPY( "gfx", 0x0c000, 0x0800, 0x0800 ) /* cards gfx, bitplane 2 */ - ROM_COPY( "gfx", 0x14000, 0x1000, 0x0800 ) /* cards gfx, bitplane 3 */ + ROM_COPY( "gfx", 0x04000, 0x0000, 0x0800 ) // cards gfx, bitplane 1 + ROM_COPY( "gfx", 0x0c000, 0x0800, 0x0800 ) // cards gfx, bitplane 2 + ROM_COPY( "gfx", 0x14000, 0x1000, 0x0800 ) // cards gfx, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "n82s129n.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -11378,16 +11396,16 @@ ROM_START( super98 ) ROM_LOAD( "27c256.17a", 0x0000, 0x8000, CRC(dfa319c5) SHA1(e1b2ef40350ee1f40272604cbe33b245210de003) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "2732.9a", 0x2000, 0x1000, CRC(9a478c39) SHA1(614171fa3184f6ceb663d5650d05fac4d4025c9f) ) /* char ROM */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "2732.9a", 0x2000, 0x1000, CRC(9a478c39) SHA1(614171fa3184f6ceb663d5650d05fac4d4025c9f) ) // char ROM ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "2732.4a", 0x0000, 0x1000, CRC(733b72f0) SHA1(b9255b9de24d9bd7277b18d8d1e12c7cdd3813fb) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "2732.6a", 0x1000, 0x1000, CRC(02595bcf) SHA1(5d01baed66152cca4b7a14fdfee83f31304e3be3) ) /* cards deck gfx, bitplane2 */ - ROM_LOAD( "2732.7a", 0x2000, 0x1000, CRC(42072981) SHA1(1cfbbfe33afc6f147ce5828d96455f5aeb090cd3) ) /* cards deck gfx, bitplane3 */ + ROM_LOAD( "2732.4a", 0x0000, 0x1000, CRC(733b72f0) SHA1(b9255b9de24d9bd7277b18d8d1e12c7cdd3813fb) ) // cards deck gfx, bitplane1 + ROM_LOAD( "2732.6a", 0x1000, 0x1000, CRC(02595bcf) SHA1(5d01baed66152cca4b7a14fdfee83f31304e3be3) ) // cards deck gfx, bitplane2 + ROM_LOAD( "2732.7a", 0x2000, 0x1000, CRC(42072981) SHA1(1cfbbfe33afc6f147ce5828d96455f5aeb090cd3) ) // cards deck gfx, bitplane3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "bipolar_prom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "bipolar_prom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END /*------------------------------------------------------------------------- @@ -11444,16 +11462,16 @@ ROM_START( animpkr ) ROM_LOAD( "2732_bottom.17a", 0x3000, 0x1000, CRC(92c19e72) SHA1(034d077ede5608160ba882227e981751a5dde26d) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "2716.8a", 0x1000, 0x0800, CRC(21c9c7f1) SHA1(daa0eddd4f4a9eec0cff3aebe884792adf830238) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "2716.8a", 0x1000, 0x0800, CRC(21c9c7f1) SHA1(daa0eddd4f4a9eec0cff3aebe884792adf830238) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(0b7f11a2) SHA1(c5e347a377e307d12b2b2d2edf7c48be21ef5cdb) ) /* characters gfx, bitplane1 */ - ROM_LOAD( "2716.5a", 0x0800, 0x0800, CRC(0b2c3c25) SHA1(c69b15c1cea9abc437b12211bc4087d4d5baf084) ) /* characters gfx, bitplane2 */ - ROM_LOAD( "2716.7a", 0x1000, 0x0800, CRC(c48d17b0) SHA1(7c446339ab3aaa49004780fa90a3624b5a382cb1) ) /* characters gfx, bitplane3 */ + ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(0b7f11a2) SHA1(c5e347a377e307d12b2b2d2edf7c48be21ef5cdb) ) // characters gfx, bitplane 1 + ROM_LOAD( "2716.5a", 0x0800, 0x0800, CRC(0b2c3c25) SHA1(c69b15c1cea9abc437b12211bc4087d4d5baf084) ) // characters gfx, bitplane 2 + ROM_LOAD( "2716.7a", 0x1000, 0x0800, CRC(c48d17b0) SHA1(7c446339ab3aaa49004780fa90a3624b5a382cb1) ) // characters gfx, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END ROM_START( animpkra ) @@ -11462,16 +11480,16 @@ ROM_START( animpkra ) ROM_LOAD( "2732_top.17a", 0x3000, 0x1000, CRC(13fae924) SHA1(c1c92fdb6e7036e6d9349c9b017e9daf3577345b) ) ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "2716.8a", 0x1000, 0x0800, CRC(21c9c7f1) SHA1(daa0eddd4f4a9eec0cff3aebe884792adf830238) ) /* char ROM */ + ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "2716.8a", 0x1000, 0x0800, CRC(21c9c7f1) SHA1(daa0eddd4f4a9eec0cff3aebe884792adf830238) ) // char ROM ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(0b7f11a2) SHA1(c5e347a377e307d12b2b2d2edf7c48be21ef5cdb) ) /* characters gfx, bitplane1 */ - ROM_LOAD( "2716.5a", 0x0800, 0x0800, CRC(0b2c3c25) SHA1(c69b15c1cea9abc437b12211bc4087d4d5baf084) ) /* characters gfx, bitplane2 */ - ROM_LOAD( "2716.7a", 0x1000, 0x0800, CRC(c48d17b0) SHA1(7c446339ab3aaa49004780fa90a3624b5a382cb1) ) /* characters gfx, bitplane3 */ + ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(0b7f11a2) SHA1(c5e347a377e307d12b2b2d2edf7c48be21ef5cdb) ) // characters gfx, bitplane 1 + ROM_LOAD( "2716.5a", 0x0800, 0x0800, CRC(0b2c3c25) SHA1(c69b15c1cea9abc437b12211bc4087d4d5baf084) ) // characters gfx, bitplane 2 + ROM_LOAD( "2716.7a", 0x1000, 0x0800, CRC(c48d17b0) SHA1(7c446339ab3aaa49004780fa90a3624b5a382cb1) ) // characters gfx, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ + ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END @@ -11485,23 +11503,23 @@ ROM_END ******************************************/ ROM_START( megadpkr ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* program ROM */ + ROM_REGION( 0x10000, "maincpu", 0 ) // program ROM ROM_LOAD( "mega-2.u2", 0x8000, 0x8000, CRC(2b133b92) SHA1(97bc21c42897cfd13c0247e239aebb18f73cde91) ) - ROM_REGION( 0x8000, "cpubank", 0 ) /* banked through MCU */ + ROM_REGION( 0x8000, "cpubank", 0 ) // banked through MCU ROM_LOAD( "mega-3.u3", 0x0000, 0x8000, CRC(ff0a46c6) SHA1(df053c323c0e2dd0e41e22286d38e889bfda3aa5) ) - ROM_REGION( 0x0800, "mcu", 0 ) /* 68705P5 microcontroller */ + ROM_REGION( 0x0800, "mcu", 0 ) // 68705P5 microcontroller ROM_LOAD( "mega-1.u11", 0x0000, 0x0800, CRC(621a7971) SHA1(49121f7b0d428a825ccd219622dcc4abe3572968) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x000000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "car1.5a", 0x2000, 0x1000, CRC(29e244d2) SHA1(c309a5ee6922bf2752d218c134edb3ef5f808afa) ) /* text chars / cards deck gfx, bitplane3 */ + ROM_FILL( 0x0000, 0x2000, 0x000000 ) // filling the R-G bitplanes + ROM_LOAD( "car1.5a", 0x2000, 0x1000, CRC(29e244d2) SHA1(c309a5ee6922bf2752d218c134edb3ef5f808afa) ) // chars / cards deck gfx, bitplane 3 ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "car3.2a", 0x0000, 0x1000, CRC(819c06c4) SHA1(45b874554fb487173acf12daa4ff99e49e335362) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "car2.4a", 0x1000, 0x1000, CRC(41eec680) SHA1(3723f66e1def3908f2e6ba2989def229d9846b02) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the chars rom */ + ROM_LOAD( "car3.2a", 0x0000, 0x1000, CRC(819c06c4) SHA1(45b874554fb487173acf12daa4ff99e49e335362) ) // cards deck gfx, bitplane1 + ROM_LOAD( "car2.4a", 0x1000, 0x1000, CRC(41eec680) SHA1(3723f66e1def3908f2e6ba2989def229d9846b02) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) // cards deck gfx, bitplane3. found in the 2nd quarter of the chars rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "m3-7611-5.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -11533,23 +11551,23 @@ ROM_END */ ROM_START( megadpkrb ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* program ROM */ + ROM_REGION( 0x10000, "maincpu", 0 ) // program ROM ROM_LOAD( "u2.bin", 0x8000, 0x8000, CRC(0efdf472) SHA1(4b1ae10427c2ae8d7cbbe525a6b30973372d4420) ) - ROM_REGION( 0x8000, "cpubank", 0 ) /* banked through MCU */ + ROM_REGION( 0x8000, "cpubank", 0 ) // banked through MCU ROM_LOAD( "u3.bin", 0x0000, 0x8000, CRC(c973e345) SHA1(aae9da8cbaf0cf07086e5acacf9052e49fbdd896) ) - ROM_REGION( 0x0800, "mcu", 0 ) /* 68705P5 microcontroller - might not be for this set */ + ROM_REGION( 0x0800, "mcu", 0 ) // 68705P5 microcontroller - might not be for this set ROM_LOAD( "mega-1.u11", 0x0000, 0x0800, CRC(621a7971) SHA1(49121f7b0d428a825ccd219622dcc4abe3572968) ) ROM_REGION( 0x3000, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x2000, 0x0000 ) /* filling the R-G bitplanes */ - ROM_LOAD( "car1_5a.bin", 0x2000, 0x1000, CRC(29e244d2) SHA1(c309a5ee6922bf2752d218c134edb3ef5f808afa) ) /* text chars / cards deck gfx, bitplane3 */ + ROM_FILL( 0x0000, 0x2000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "car1_5a.bin", 0x2000, 0x1000, CRC(29e244d2) SHA1(c309a5ee6922bf2752d218c134edb3ef5f808afa) ) // chars / cards deck gfx, bitplane 3 ROM_REGION( 0x3000, "gfx2", 0 ) - ROM_LOAD( "car3_2a.bin", 0x0000, 0x1000, CRC(819c06c4) SHA1(45b874554fb487173acf12daa4ff99e49e335362) ) /* cards deck gfx, bitplane1 */ - ROM_LOAD( "car2_4a.bin", 0x1000, 0x1000, CRC(41eec680) SHA1(3723f66e1def3908f2e6ba2989def229d9846b02) ) /* cards deck gfx, bitplane2 */ - ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the chars rom */ + ROM_LOAD( "car3_2a.bin", 0x0000, 0x1000, CRC(819c06c4) SHA1(45b874554fb487173acf12daa4ff99e49e335362) ) // cards deck gfx, bitplane1 + ROM_LOAD( "car2_4a.bin", 0x1000, 0x1000, CRC(41eec680) SHA1(3723f66e1def3908f2e6ba2989def229d9846b02) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) // cards deck gfx, bitplane 3. found in the 2nd quarter of the chars rom ROM_REGION( 0x0100, "proms", 0 ) ROM_LOAD( "m3-7611-5.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) @@ -11682,7 +11700,7 @@ ROM_END void goldnpkr_state::init_flcnw() { - /* Attempt to decrypt the MCU program (we're sooo close!) */ + // Attempt to decrypt the MCU program (we're sooo close!) uint8_t *ROM = memregion("mcu")->base(); int size = memregion("mcu")->bytes(); @@ -11990,7 +12008,7 @@ void goldnpkr_state::init_wstrike() void goldnpkr_state::init_bchancep() { - /* Attempt to invert the color data from the bipolar PROM */ + // Attempt to invert the color data from the bipolar PROM uint8_t *ROM = memregion("proms")->base(); int size = memregion("proms")->bytes(); @@ -12000,6 +12018,7 @@ void goldnpkr_state::init_bchancep() { ROM[i] = ROM[i] ^ 0x0f; } + m_palette->update(); } @@ -12045,7 +12064,7 @@ void goldnpkr_state::init_bonuspkr() * Game Drivers * *********************************************/ -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT GAMEL( 1981, goldnpkr, 0, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "Bonanza Enterprises, Ltd", "Golden Poker Double Up (Big Boy)", 0, layout_goldnpkr ) GAMEL( 1981, goldnpkb, goldnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "Bonanza Enterprises, Ltd", "Golden Poker Double Up (Mini Boy)", 0, layout_goldnpkr ) GAMEL( 198?, goldnpkc, goldnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Golden Poker Double Up (bootleg)", 0, layout_goldnpkr ) @@ -12066,6 +12085,7 @@ GAMEL( 198?, potnpkrh, pottnpkr, pottnpkr, goldnpkr, goldnpkr_state, empty_init GAMEL( 198?, potnpkri, pottnpkr, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 10, ICP-1 PCB)", 0, layout_goldnpkr ) // unencrypted IPC-1 PCB. GAMEL( 198?, potnpkrj, pottnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 11, German, W.W.)", 0, layout_goldnpkr ) GAMEL( 198?, potnpkrk, pottnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 12, no Double-Up)", 0, layout_goldnpkr ) +GAMEL( 198?, potnpkrl, pottnpkr, pottnpkr, potnpkra, goldnpkr_state, empty_init, ROT0, "", "Jack Potten's Poker (set 13, ICP-1 PCB)", 0, layout_goldnpkr ) // unencrypted IPC-1 PCB. GAMEL( 198?, ngold, pottnpkr, pottnpkr, ngold, goldnpkr_state, empty_init, ROT0, "", "Jack Potten's Poker (NGold, set 1)", 0, layout_goldnpkr ) GAMEL( 198?, ngolda, pottnpkr, pottnpkr, ngold, goldnpkr_state, empty_init, ROT0, "", "Jack Potten's Poker (NGold, set 2)", 0, layout_goldnpkr ) GAMEL( 198?, ngoldb, pottnpkr, pottnpkr, ngoldb, goldnpkr_state, empty_init, ROT0, "", "Jack Potten's Poker (NGold, set 3)", 0, layout_goldnpkr ) @@ -12121,50 +12141,50 @@ GAME( 199?, jokercar, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init GAMEL( 1994, witchjol, 0, wcrdxtnd, witchjol, goldnpkr_state, init_vkdlsa, ROT0, "Video Klein", "Jolli Witch (Export, 6T/12T ver 1.57D)", 0, layout_goldnpkr ) -GAMEL( 2001, wldwitch, 0, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlsww, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.84A)", 0, layout_goldnpkr ) /* Ver 184A, 2001-09-12 */ -GAMEL( 1992, wldwitcha, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwa, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.57-SP)", 0, layout_goldnpkr ) /* Ver 157-SP, 1992-12-25 */ -GAMEL( 1992, wldwitchb, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, empty_init, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.57-TE)", MACHINE_NOT_WORKING, layout_goldnpkr ) /* Ver 157-TE, 1992-12-25 */ -GAMEL( 1994, wldwitchc, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwc, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62A)", 0, layout_goldnpkr ) /* Ver 162A, 1994-04-26 */ -GAMEL( 1994, wldwitchd, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwd, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62B)", 0, layout_goldnpkr ) /* Ver 162B, 1994-04-26 */ -GAMEL( 1994, wldwitche, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, empty_init, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62A-F)", MACHINE_NOT_WORKING, layout_goldnpkr ) /* Ver 162A-F, 1994-04-26 */ -GAMEL( 1994, wldwitchf, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwc, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62A alt)", 0, layout_goldnpkr ) /* Ver 162A alt, 1994-11-03 */ -GAMEL( 1994, wldwitchg, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwd, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62B alt)", 0, layout_goldnpkr ) /* Ver 162B alt, 1994-11-03 */ -GAMEL( 1995, wldwitchh, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A)", 0, layout_goldnpkr ) /* Ver 165A, 1995-11-16 */ -GAMEL( 1996, wldwitchi, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A-S)", 0, layout_goldnpkr ) /* Ver 165A-S (Fast Deal), 1996-03-26 */ -GAMEL( 1996, wldwitchj, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A-S alt)", 0, layout_goldnpkr ) /* Ver 165A-S alt (Fast Deal), 1996-05-26 */ -GAMEL( 1996, wldwitchk, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A-N)", 0, layout_goldnpkr ) /* Ver 165A-N, 1996-05-29 */ -GAMEL( 1996, wldwitchl, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwl, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.70A beta)", 0, layout_goldnpkr ) /* Ver 170A-beta, 1996-06-25 */ -GAMEL( 1996, wldwitchm, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwl, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.70A)", 0, layout_goldnpkr ) /* Ver 170A, 1996-09-30 */ -GAMEL( 1997, wldwitchn, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwl, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.70A alt)", 0, layout_goldnpkr ) /* Ver 170A alt, 1997-06-11 */ -GAMEL( 1998, wldwitcho, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwo, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.74A-SP-BELG)", 0, layout_goldnpkr ) /* Ver 174A-SP-BELG (no D-UP, no payout), 1998-05-11 */ -GAMEL( 1998, wldwitchp, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwp, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.74A)", 0, layout_goldnpkr ) /* Ver 174A (no D-UP, no payout), 1998-09-20 */ -GAMEL( 1998, wldwitchq, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlsb, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.74A alt)", 0, layout_goldnpkr ) /* Ver 174A alt, box, 1998-09-25 */ -GAMEL( 1999, wldwitchr, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwr, ROT0, "Video Klein", "Wild Witch (Export, 6B/12B ver 1.75A-E English)", 0, layout_goldnpkr ) /* Ver 175A-E (English), 1999-01-11 */ -GAMEL( 1999, wldwitchs, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswws, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.76A)", 0, layout_goldnpkr ) /* Ver 176A, 1999-??-?? */ -GAMEL( 1999, wldwitcht, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwt, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.77A)", 0, layout_goldnpkr ) /* Ver 177A, 1999-??-?? */ -GAMEL( 2000, wldwitchu, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwu, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.79A)", 0, layout_goldnpkr ) /* Ver 179A, 2000-05-10 */ -GAMEL( 2001, wldwitchv, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwv, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.83A)", 0, layout_goldnpkr ) /* Ver 183A, 2001-06-13 */ - -GAMEL( 1998, wupndown, 0, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 1.02)", 0, layout_upndown ) /* Ver 1.02, 1998-10-26 */ -GAMEL( 1998, wupndowna, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99, set 1)", 0, layout_upndown ) /* Ver 0.99, 1998-04-09 */ -GAMEL( 1998, wupndownb, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99, set 2)", 0, layout_upndown ) /* Ver 0.99, 1998-03-23 */ -GAMEL( 1998, wupndownc, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99, set 3)", 0, layout_upndown ) /* Ver 0.99 alt, 1998-05-11 */ -GAMEL( 1998, wupndownd, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99T)", 0, layout_upndown ) /* Ver 0.99T, 1998-03-23 */ +GAMEL( 2001, wldwitch, 0, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlsww, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.84A)", 0, layout_goldnpkr ) // Ver 184A, 2001-09-12 +GAMEL( 1992, wldwitcha, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwa, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.57-SP)", 0, layout_goldnpkr ) // Ver 157-SP, 1992-12-25 +GAMEL( 1992, wldwitchb, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, empty_init, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.57-TE)", MACHINE_NOT_WORKING, layout_goldnpkr ) // Ver 157-TE, 1992-12-25 +GAMEL( 1994, wldwitchc, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwc, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62A)", 0, layout_goldnpkr ) // Ver 162A, 1994-04-26 +GAMEL( 1994, wldwitchd, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwd, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62B)", 0, layout_goldnpkr ) // Ver 162B, 1994-04-26 +GAMEL( 1994, wldwitche, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, empty_init, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62A-F)", MACHINE_NOT_WORKING, layout_goldnpkr ) // Ver 162A-F, 1994-04-26 +GAMEL( 1994, wldwitchf, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwc, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62A alt)", 0, layout_goldnpkr ) // Ver 162A alt, 1994-11-03 +GAMEL( 1994, wldwitchg, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwd, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.62B alt)", 0, layout_goldnpkr ) // Ver 162B alt, 1994-11-03 +GAMEL( 1995, wldwitchh, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A)", 0, layout_goldnpkr ) // Ver 165A, 1995-11-16 +GAMEL( 1996, wldwitchi, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A-S)", 0, layout_goldnpkr ) // Ver 165A-S (Fast Deal), 1996-03-26 +GAMEL( 1996, wldwitchj, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A-S alt)", 0, layout_goldnpkr ) // Ver 165A-S alt (Fast Deal), 1996-05-26 +GAMEL( 1996, wldwitchk, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwh, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.65A-N)", 0, layout_goldnpkr ) // Ver 165A-N, 1996-05-29 +GAMEL( 1996, wldwitchl, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwl, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.70A beta)", 0, layout_goldnpkr ) // Ver 170A-beta, 1996-06-25 +GAMEL( 1996, wldwitchm, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwl, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.70A)", 0, layout_goldnpkr ) // Ver 170A, 1996-09-30 +GAMEL( 1997, wldwitchn, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwl, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.70A alt)", 0, layout_goldnpkr ) // Ver 170A alt, 1997-06-11 +GAMEL( 1998, wldwitcho, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwo, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.74A-SP-BELG)", 0, layout_goldnpkr ) // Ver 174A-SP-BELG (no D-UP, no payout), 1998-05-11 +GAMEL( 1998, wldwitchp, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwp, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.74A)", 0, layout_goldnpkr ) // Ver 174A (no D-UP, no payout), 1998-09-20 +GAMEL( 1998, wldwitchq, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlsb, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.74A alt)", 0, layout_goldnpkr ) // Ver 174A alt, box, 1998-09-25 +GAMEL( 1999, wldwitchr, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwr, ROT0, "Video Klein", "Wild Witch (Export, 6B/12B ver 1.75A-E English)", 0, layout_goldnpkr ) // Ver 175A-E (English), 1999-01-11 +GAMEL( 1999, wldwitchs, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswws, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.76A)", 0, layout_goldnpkr ) // Ver 176A, 1999-??-?? +GAMEL( 1999, wldwitcht, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwt, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.77A)", 0, layout_goldnpkr ) // Ver 177A, 1999-??-?? +GAMEL( 2000, wldwitchu, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwu, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.79A)", 0, layout_goldnpkr ) // Ver 179A, 2000-05-10 +GAMEL( 2001, wldwitchv, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, init_vkdlswwv, ROT0, "Video Klein", "Wild Witch (Export, 6T/12T ver 1.83A)", 0, layout_goldnpkr ) // Ver 183A, 2001-06-13 + +GAMEL( 1998, wupndown, 0, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 1.02)", 0, layout_upndown ) // Ver 1.02, 1998-10-26 +GAMEL( 1998, wupndowna, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99, set 1)", 0, layout_upndown ) // Ver 0.99, 1998-04-09 +GAMEL( 1998, wupndownb, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99, set 2)", 0, layout_upndown ) // Ver 0.99, 1998-03-23 +GAMEL( 1998, wupndownc, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99, set 3)", 0, layout_upndown ) // Ver 0.99 alt, 1998-05-11 +GAMEL( 1998, wupndownd, wupndown, wcrdxtnd, wupndown, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Up & Down (Export, 6T/12T ver 0.99T)", 0, layout_upndown ) // Ver 0.99T, 1998-03-23 GAMEL( 1992, wstrike, 0, wcrdxtnd, wstrike, goldnpkr_state, init_wstrike, ROT0, "Video Klein", "Witch Strike (Export, 6T/12T ver 1.01A)", 0, layout_goldnpkr ) GAMEL( 1992, wstrikea, wstrike, wcrdxtnd, wstrike, goldnpkr_state, init_wstrike, ROT0, "Video Klein", "Witch Strike (Export, 6T/12T ver 1.01B)", 0, layout_goldnpkr ) -GAMEL( 1996, wtchjack, 0, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.87-89)", 0, layout_goldnpkr ) /* Ver 0.87-89 / 1996-10-08 GFX OK */ -GAMEL( 1996, wtchjacka, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.87-88)", 0, layout_goldnpkr ) /* Ver 0.87-88 / 1996-10-02, GFX OK */ -GAMEL( 1996, wtchjackb, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.87)", 0, layout_goldnpkr ) /* Ver 0.87 / 1996-07-16, GFX OK */ -GAMEL( 1996, wtchjackc, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.70S)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) /* Ver 0.70S / 1996-03-26 */ -GAMEL( 1996, wtchjackd, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.70P)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) /* Ver 0.70P / 1996-03-26 */ -GAMEL( 1995, wtchjacke, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.65)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) /* Ver 0.65 / 1995-10-19 */ -GAMEL( 1995, wtchjackf, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.64)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) /* Ver 0.64 / 1995-09-13 */ -GAMEL( 1995, wtchjackg, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.62)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) /* Ver 0.62 / 1995-08-02 */ -GAMEL( 1995, wtchjackh, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.40T)", MACHINE_NOT_WORKING, layout_goldnpkr ) /* Ver 0.40T / 1995-02-27 */ -GAMEL( 1995, wtchjacki, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.40)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) /* Ver 0.40 / 1995-02-27 */ -GAMEL( 1994, wtchjackj, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jackpot (Export, 6T/12T ver 0.25)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) /* Ver 0.25 / 1994-11-24 */ +GAMEL( 1996, wtchjack, 0, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.87-89)", 0, layout_goldnpkr ) // Ver 0.87-89 / 1996-10-08 GFX OK +GAMEL( 1996, wtchjacka, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.87-88)", 0, layout_goldnpkr ) // Ver 0.87-88 / 1996-10-02, GFX OK +GAMEL( 1996, wtchjackb, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.87)", 0, layout_goldnpkr ) // Ver 0.87 / 1996-07-16, GFX OK +GAMEL( 1996, wtchjackc, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.70S)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) // Ver 0.70S / 1996-03-26 +GAMEL( 1996, wtchjackd, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.70P)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) // Ver 0.70P / 1996-03-26 +GAMEL( 1995, wtchjacke, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.65)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) // Ver 0.65 / 1995-10-19 +GAMEL( 1995, wtchjackf, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.64)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) // Ver 0.64 / 1995-09-13 +GAMEL( 1995, wtchjackg, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.62)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) // Ver 0.62 / 1995-08-02 +GAMEL( 1995, wtchjackh, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.40T)", MACHINE_NOT_WORKING, layout_goldnpkr ) // Ver 0.40T / 1995-02-27 +GAMEL( 1995, wtchjacki, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jack (Export, 6T/12T ver 0.40)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) // Ver 0.40 / 1995-02-27 +GAMEL( 1994, wtchjackj, wtchjack, wcrdxtnd, wtchjack, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Jackpot (Export, 6T/12T ver 0.25)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr ) // Ver 0.25 / 1994-11-24 /*************************************** OTHER SETS ***************************************/ diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 1625fa968bc..459e1e32f97 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15040,6 +15040,7 @@ potnpkrh // Bootleg potnpkri // Bootleg potnpkrj // Bootleg potnpkrk // Bootleg +potnpkrl // Bootleg pottnpkr // Bootleg royale // Unknown royalea // Unknown -- cgit v1.2.3 From 6cd7c583902ab450dd6e5d70ccd7e514fd640e04 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 7 Jul 2020 23:35:19 -0400 Subject: Fix clang error: private field 'm_ram_indices' is not used [-Werror,-Wunused-private-field] --- src/mame/drivers/cmi.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp index 3a6b3d0dcfb..c00db2db85e 100644 --- a/src/mame/drivers/cmi.cpp +++ b/src/mame/drivers/cmi.cpp @@ -439,7 +439,6 @@ private: uint8_t m_map_sel[16]; std::unique_ptr m_map_ram[2]; std::unique_ptr m_q256_ram[2]; - uint8_t m_ram_indices[2][PAGE_COUNT]; uint8_t m_map_ram_latch; int m_cpu_active_space[2]; int m_cpu_map_switch[2]; -- cgit v1.2.3 From 3622f5477be67cad268fa5f3d35cf482bc9ebe84 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 8 Jul 2020 05:54:38 +0200 Subject: bishi.cpp, konmedal68k.cpp: moved dobouchn from the former driver to the latter, GFX are mostly corrected --- src/mame/drivers/bishi.cpp | 103 +-------------------------------------- src/mame/drivers/konmedal68k.cpp | 29 ++++++++--- src/mame/mame.lst | 6 +-- 3 files changed, 27 insertions(+), 111 deletions(-) diff --git a/src/mame/drivers/bishi.cpp b/src/mame/drivers/bishi.cpp index 570d7d89314..94fde314b9c 100644 --- a/src/mame/drivers/bishi.cpp +++ b/src/mame/drivers/bishi.cpp @@ -50,7 +50,7 @@ GS562 PWB(A)400625A \/ Notes: 68000 - clock 12.000MHz (24/2) YMZ280 - clock 16.9344MHz - CN3/4 - connector for ROM daugterboard + CN3/4 - connector for ROM daughterboard CN1 - large flat cable connector for power/controls 675KAA01 to 04 - 27C040 EPROMs 675KAA07 to 10 - 27C240 EPROMs @@ -362,77 +362,6 @@ static INPUT_PORTS_START( bishi2p ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) // 'p2' START INPUT_PORTS_END -static INPUT_PORTS_START( dobouchn ) - PORT_INCLUDE( bishi ) - - PORT_MODIFY("IN0") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_MODIFY("INPUTS") - PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Shoot") - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_MODIFY("SYSTEM") - PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("M. Ack") // ??? - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin 2 (Medal)") - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_MODIFY("DSW") - PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") - PORT_DIPSETTING( 0x00, "5 Coins / 2 Credits" ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 5C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) - PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW1:4" ) - PORT_DIPNAME( 0x70, 0x70, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7") - PORT_DIPSETTING( 0x00, "15 Medals" ) - PORT_DIPSETTING( 0x10, "13 Medals" ) - PORT_DIPSETTING( 0x20, "11 Medals" ) - PORT_DIPSETTING( 0x30, "9 Medals" ) - PORT_DIPSETTING( 0x40, "7 Medals" ) - PORT_DIPSETTING( 0x50, "5 Medals" ) - PORT_DIPSETTING( 0x60, "3 Medals" ) - PORT_DIPSETTING( 0x70, "2 Medals" ) - PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:8" ) - - PORT_DIPNAME( 0x0f00, 0x0f00, "Payout" ) PORT_DIPLOCATION("SW2:1,2,3,4") - PORT_DIPSETTING( 0x000, "90%" ) - PORT_DIPSETTING( 0x100, "85%" ) - PORT_DIPSETTING( 0x200, "80%" ) - PORT_DIPSETTING( 0x300, "75%" ) - PORT_DIPSETTING( 0x400, "70%" ) - PORT_DIPSETTING( 0x500, "65%" ) - PORT_DIPSETTING( 0x600, "60%" ) - PORT_DIPSETTING( 0x700, "55%" ) - PORT_DIPSETTING( 0x800, "50%" ) - PORT_DIPSETTING( 0x900, "45%" ) - PORT_DIPSETTING( 0xa00, "40%" ) - PORT_DIPSETTING( 0xb00, "35%" ) - PORT_DIPSETTING( 0xc00, "30%" ) - PORT_DIPSETTING( 0xd00, "25%" ) - PORT_DIPSETTING( 0xe00, "20%" ) - PORT_DIPSETTING( 0xf00, "15%" ) - PORT_DIPNAME( 0x3000, 0x3000, "Play Timer" ) PORT_DIPLOCATION("SW2:5,6") - PORT_DIPSETTING( 0x0000, "30 seconds" ) - PORT_DIPSETTING( 0x1000, "24 seconds" ) - PORT_DIPSETTING( 0x2000, "18 seconds" ) - PORT_DIPSETTING( 0x3000, "12 seconds" ) - // TODO: needs NVRAM hookup and default hookup - PORT_DIPNAME( 0x4000, 0x0000, "Backup RAM clear" ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING( 0x4000, DEF_STR( No ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) -INPUT_PORTS_END - void bishi_state::machine_start() { save_item(NAME(m_cur_control)); @@ -485,14 +414,6 @@ void bishi_state::bishi(machine_config &config) ymz.add_route(1, "rspeaker", 1.0); } -void bishi_state::dobouchn(machine_config &config) -{ - bishi(config); -// TODO: change accordingly (ASCII charset definitely not 8bpp, 5bpp perhaps?) -// m_k056832->set_tile_callback(FUNC(bishi_state::dobouchn_tile_callback)); - m_k056832->set_config(K056832_BPP_8, 1, 0); -} - // ROM definitions @@ -581,29 +502,7 @@ ROM_START( sbishika ) ROM_LOAD( "675kaa04.8f", 0x180000, 0x080000, CRC(ebcbd813) SHA1(d67540d0ea303f09866f4a766e2d5162f05cd4ac) ) ROM_END -ROM_START( dobouchn ) - ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_WORD_SWAP( "640-a05-2n.bin", 0x000000, 0x080000, CRC(7643dbc6) SHA1(3b55a782f04a741088b93954279b35c1c90af622) ) - - ROM_REGION( 0x200000, "k056832", 0 ) - // makes GFX ROM test to pass - // must return 0xf0c3 and 0xee9e, check snippets at 0x2e1c and 0x2e42 - // TODO: might require a different K056832_rom_r callback instead - ROM_LOAD16_BYTE( "640-a06-14n.bin", 0x000000, 0x080000, CRC(c6c5016c) SHA1(ad0b5258e2c1d0ba95dfc0d8fc6332b524f2c1e2) ) - ROM_RELOAD( 0x100001, 0x080000 ) - ROM_LOAD16_BYTE( "640-a07-17n.bin", 0x000001, 0x080000, CRC(614fee32) SHA1(080fea72c0417752eb0a0b109b524d87379b2921) ) - ROM_RELOAD( 0x100000, 0x080000 ) - - // dummy region (game has no sprites, but we want to use the GX mixer) - ROM_REGION( 0x80000, "gfx2", ROMREGION_ERASE00 ) - - ROM_REGION( 0x200000, "ymz", 0 ) - ROM_LOAD( "640-a01-2f.bin", 0x000000, 0x080000, CRC(326e2844) SHA1(62ce14ffe5d0a35c37c9a5a98c9c3a5df63d4512) ) - ROM_LOAD( "640-a02-4f.bin", 0x080000, 0x080000, CRC(ab6593f5) SHA1(95907ee4a2cdf3bf27b7c0c1283b2bc36b868d9d) ) -ROM_END - GAME( 1996, bishi, 0, bishi, bishi, bishi_state, empty_init, ROT0, "Konami", "Bishi Bashi Championship Mini Game Senshuken (ver JAA, 3 Players)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1998, sbishi, 0, bishi, bishi2p, bishi_state, empty_init, ROT0, "Konami", "Super Bishi Bashi Championship (ver JAA, 2 Players)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1998, sbishik, sbishi, bishi, bishi, bishi_state, empty_init, ROT0, "Konami", "Super Bishi Bashi Championship (ver KAB, 3 Players)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1998, sbishika, sbishi, bishi, bishi, bishi_state, empty_init, ROT0, "Konami", "Super Bishi Bashi Championship (ver KAA, 3 Players)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, dobouchn, 0, dobouchn, dobouchn, bishi_state, empty_init, ROT0, "Konami", "Dobou-Chan (ver JAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/konmedal68k.cpp b/src/mame/drivers/konmedal68k.cpp index dc5de34da78..b32b631b737 100644 --- a/src/mame/drivers/konmedal68k.cpp +++ b/src/mame/drivers/konmedal68k.cpp @@ -50,6 +50,11 @@ public: void kzaurus(machine_config &config); void koropens(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: uint32_t screen_update_konmedal68k(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void fill_backcolor(bitmap_ind16 &bitmap, const rectangle &cliprect, int pen_idx, int mode); @@ -96,10 +101,6 @@ private: void kzaurus_main(address_map &map); void koropens_main(address_map &map); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; - static constexpr int NUM_LAYERS = 4; required_device m_maincpu; @@ -325,6 +326,8 @@ INPUT_PORTS_END void konmedal68k_state::machine_start() { + save_item(NAME(m_control)); + save_item(NAME(m_control2)); } void konmedal68k_state::machine_reset() @@ -442,8 +445,22 @@ ROM_START( kattobas ) ROM_LOAD( "841-a02-4f.bin", 0x080000, 0x080000, CRC(685c1c10) SHA1(9884940df8c079e8129fc8d870f90e5b7987e6f4) ) ROM_END -GAME( 1995, kzaurus, 0, kzaurus, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Pittanko Zaurus", MACHINE_IMPERFECT_GRAPHICS ) +ROM_START( dobouchn ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "640-a05-2n.bin", 0x000000, 0x080000, CRC(7643dbc6) SHA1(3b55a782f04a741088b93954279b35c1c90af622) ) + + ROM_REGION( 0x100000, "k056832", 0 ) + ROM_LOAD( "640-a06-14n.bin", 0x000000, 0x080000, CRC(c6c5016c) SHA1(ad0b5258e2c1d0ba95dfc0d8fc6332b524f2c1e2) ) + ROM_LOAD( "640-a07-17n.bin", 0x080000, 0x080000, CRC(614fee32) SHA1(080fea72c0417752eb0a0b109b524d87379b2921) ) + + ROM_REGION( 0x200000, "ymz", 0 ) + ROM_LOAD( "640-a01-2f.bin", 0x000000, 0x080000, CRC(326e2844) SHA1(62ce14ffe5d0a35c37c9a5a98c9c3a5df63d4512) ) + ROM_LOAD( "640-a02-4f.bin", 0x080000, 0x080000, CRC(ab6593f5) SHA1(95907ee4a2cdf3bf27b7c0c1283b2bc36b868d9d) ) +ROM_END + +GAME( 1995, kzaurus, 0, kzaurus, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Pittanko Zaurus", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, dobouchn, 0, kzaurus, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Dobou-Chan (ver JAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, koropens, 0, koropens, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Korokoro Pensuke", MACHINE_IMPERFECT_GRAPHICS ) GAME( 1998, kattobas, 0, koropens, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Kattobase Power Pro Kun", MACHINE_IMPERFECT_GRAPHICS ) GAME( 1999, pwrchanc, 0, koropens, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Powerful Chance", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1999, ymcapsul, 0, kzaurus, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Yu-Gi-Oh Monster Capsule", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1999, ymcapsul, 0, kzaurus, kzaurus, konmedal68k_state, empty_init, ROT0, "Konami", "Yu-Gi-Oh Monster Capsule", MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 459e1e32f97..d5a9e822cfc 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -9250,7 +9250,6 @@ bishi // GX575 (c) 1996 (Japan) sbishi // GX675 (c) 1998 (Japan) sbishik // GX675 (c) 1998 (Korea) sbishika // GX675 (c) 1998 (Korea) -dobouchn // @source:bitel.cpp feap90 // @@ -18904,11 +18903,12 @@ tsukande mariorou @source:konmedal68k.cpp -kzaurus +dobouchn +kattobas koropens +kzaurus pwrchanc ymcapsul -kattobas @source:quickpick5.cpp quickp5 -- cgit v1.2.3 From 4f76f7fbc688d8d3894746a78b88d96a79e163b1 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 8 Jul 2020 06:05:05 +0200 Subject: galaxian.cpp: marked one of sirio2's program ROMs as bad bishi.h: removed donouchn machine config I had forgotten in the last commit pcat_dyn.cpp: apply same ROM patch to toursol1 that is already used to bypass protection in toursol --- src/mame/drivers/galaxian.cpp | 4 ++-- src/mame/drivers/pcat_dyn.cpp | 20 ++++++++++++++++++-- src/mame/includes/bishi.h | 6 ------ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 9952573e9fa..67b5641673f 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -10275,7 +10275,7 @@ ROM_START( sirio2 ) ROM_LOAD( "sirio2_1.bin", 0x0000, 0x0800, CRC(1e6a4b49) SHA1(6f71f10e73b7a385cd455e74129544cd58932781) ) ROM_LOAD( "sirio2_2.bin", 0x0800, 0x0800, CRC(0b316f33) SHA1(687cbc9b1a7b9ead836a074f8418b1fe96b9e1bf) ) ROM_LOAD( "sirio2_3.bin", 0x1000, 0x0800, CRC(716eaa10) SHA1(780fc785e6651f19dc1a0ccf48cf9485d6562a71) ) // = 929 smooncrs Super Moon Cresta - ROM_LOAD( "sirio2_4.bin", 0x1800, 0x0800, CRC(092ab94b) SHA1(5a71aeead0968b660e6fb42e57564bd267cc8ba6) ) + ROM_LOAD( "sirio2_4.bin", 0x1800, 0x0800, BAD_DUMP CRC(092ab94b) SHA1(5a71aeead0968b660e6fb42e57564bd267cc8ba6) ) ROM_LOAD( "sirio2_5.bin", 0x2000, 0x0800, CRC(413a836a) SHA1(64c95b8ad78e19b718a68fdbd03c72ee0603396d) ) ROM_LOAD( "sirio2_6.bin", 0x2800, 0x0800, CRC(2a9c3f13) SHA1(a3b1c9e11a18fdf94517457f80b3a87a6c2c96e6) ) ROM_LOAD( "sirio2_7.bin", 0x3000, 0x0800, CRC(eafd4d02) SHA1(b75ed5358646d8a377ccd1f282136e638aaa9d0c) ) @@ -13252,7 +13252,7 @@ GAME( 1981?,spctbird, mooncrst, mooncrst, eagle2, galaxian_state, init_ GAME( 1980?,smooncrs, mooncrst, mooncrst, smooncrs, galaxian_state, init_mooncrsu, ROT90, "bootleg (Gremlin)", "Super Moon Cresta (Gremlin, bootleg)", MACHINE_SUPPORTS_SAVE ) // Probably a bootleg, still has the 'POR' text in the bottom right corner that the Sonic version has?! GAME( 1980, mooncrstso, mooncrst, mooncrst, mooncptc, galaxian_state, init_mooncrsu, ROT90, "bootleg (Sonic)", "Moon Cresta (SegaSA / Sonic)", MACHINE_SUPPORTS_SAVE ) GAME( 1980?,mooncptc, mooncrst, mooncrst, mooncptc, galaxian_state, init_mooncrsu, ROT90, "bootleg (Petaco S.A.)", "Moon Cresta (Petaco S.A. Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980?,sirio2, mooncrst, mooncrst, mooncptc, galaxian_state, init_mooncrsu, ROT90, "bootleg (Calfesa S.L.)", "Sirio II (Calfesa S.L. Spanish Moon Cresta bootleg, set 1)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE) // Ship explodes when starting a game, the game resets on each demo loop, behaviour on the demo seems wrong, as the ships explodes after a good assemble +GAME( 1980?,sirio2, mooncrst, mooncrst, mooncptc, galaxian_state, init_mooncrsu, ROT90, "bootleg (Calfesa S.L.)", "Sirio II (Calfesa S.L. Spanish Moon Cresta bootleg, set 1)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE) // Bad dump - ship explodes when starting a game, the game resets on each demo loop, behaviour on the demo seems wrong, as the ships explodes after a good assemble GAME( 1980?,sirio2a, mooncrst, mooncrst, mooncptc, galaxian_state, init_mooncrsu, ROT90, "bootleg (Calfesa S.L.)", "Sirio II (Calfesa S.L. Spanish Moon Cresta bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1980?,ataqandr, mooncrst, mooncrst, mooncptc, galaxian_state, init_mooncrsu, ROT90, "bootleg (FAR S.A.)", "Ataque Androide - Moon Cresta (FAR S.A. Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) // There may be an alternate version called "Star Crest" according to flyers; is it the same? diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index 98e9ed1f517..19a324a5e47 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -51,6 +51,21 @@ public: void pcat_dyn(machine_config &config); + void init_x() + { + uint8_t *ROM = memregion("game_prg")->base(); + { + char filename[256]; + sprintf(filename,"decrypted_%s", machine().system().name); + FILE *fp = fopen(filename, "w+b"); + if (fp) + { + fwrite(ROM, 0x80000, 1, fp); + fclose(fp); + } + } + } + private: required_device m_isabus; required_memory_bank m_prgbank; @@ -266,6 +281,7 @@ ROM_START(toursol1) ROM_LOAD("prom.1", 0x40000, 0x40000, CRC(8f96e2a8) SHA1(bc3ce8b99e6ff40e355df2c3f797f1fe88b3b219)) ROM_LOAD("prom.2", 0x80000, 0x40000, CRC(8b0ac5cf) SHA1(1c2b6a53c9ff4d18a5227d899facbbc719f40205)) ROM_LOAD("prom.3", 0xc0000, 0x40000, CRC(9352e965) SHA1(2bfb647ec27c60a8c821fdf7483199e1a444cea8)) + ROM_FILL(0x334f6, 1, 0xeb) // skip prot(?) check ROM_REGION(0x2000, "nvram", 0) ROM_LOAD("prom.7", 0, 0x2000, CRC(154c8092) SHA1(4439ee82f36d5d5c334494ba7bb4848e839213a7)) @@ -275,5 +291,5 @@ ROM_START(toursol1) ROM_END -GAME( 1995, toursol, 0, pcat_dyn, pcat_dyn, pcat_dyn_state, empty_init, ROT0, "Dynamo", "Tournament Solitaire (V1.06, 08/03/95)", MACHINE_UNEMULATED_PROTECTION ) -GAME( 1995, toursol1, toursol, pcat_dyn, pcat_dyn, pcat_dyn_state, empty_init, ROT0, "Dynamo", "Tournament Solitaire (V1.04, 06/22/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) +GAME( 1995, toursol, 0, pcat_dyn, pcat_dyn, pcat_dyn_state, init_x, ROT0, "Dynamo", "Tournament Solitaire (V1.06, 08/03/95)", MACHINE_UNEMULATED_PROTECTION ) +GAME( 1995, toursol1, toursol, pcat_dyn, pcat_dyn, pcat_dyn_state, init_x, ROT0, "Dynamo", "Tournament Solitaire (V1.04, 06/22/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) diff --git a/src/mame/includes/bishi.h b/src/mame/includes/bishi.h index b58de249bfa..bd317073b7b 100644 --- a/src/mame/includes/bishi.h +++ b/src/mame/includes/bishi.h @@ -27,7 +27,6 @@ public: bishi_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), m_k056832(*this, "k056832"), m_k054338(*this, "k054338"), m_k055555(*this, "k055555"), @@ -45,16 +44,12 @@ public: K056832_CB_MEMBER(tile_callback); void bishi(machine_config &config); - void dobouchn(machine_config &config); void main_map(address_map &map); protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; private: - /* memory pointers */ - uint8_t * m_ram; - /* misc */ uint16_t m_cur_control; uint16_t m_cur_control2; @@ -64,7 +59,6 @@ private: /* devices */ required_device m_maincpu; - optional_device m_audiocpu; required_device m_k056832; required_device m_k054338; required_device m_k055555; -- cgit v1.2.3 From 994076d0826b626030e6300aef91cefae74a58d5 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 8 Jul 2020 06:05:52 +0200 Subject: looping.cpp: enabled save state support --- src/mame/drivers/looping.cpp | 212 +++++++++++++++++++++---------------------- 1 file changed, 102 insertions(+), 110 deletions(-) diff --git a/src/mame/drivers/looping.cpp b/src/mame/drivers/looping.cpp index e5e3c035bde..b46c1bed6d2 100644 --- a/src/mame/drivers/looping.cpp +++ b/src/mame/drivers/looping.cpp @@ -80,12 +80,12 @@ L056-6 9A " " VLI-8-4 7A " #define MAIN_CPU_CLOCK (12000000) #define SOUND_CLOCK (8000000) -#define COP_CLOCK (SOUND_CLOCK/2) /* unknown guess */ +#define COP_CLOCK (SOUND_CLOCK/2) // unknown guess #define TMS_CLOCK (640000) -/* the schematics are very blurry here and don't actually specify the clock */ -/* values; however, everything else about the sync chain implies the standard */ -/* 18.432MHz master clock, like is used in similar hardware of the time */ +/* the schematics are very blurry here and don't actually specify the clock + values; however, everything else about the sync chain implies the standard + 18.432MHz master clock, like is used in similar hardware of the time */ #define MASTER_CLOCK (18432000) #define PIXEL_CLOCK (MASTER_CLOCK/3) @@ -120,7 +120,6 @@ public: m_dac(*this, "dac"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch"), m_watchdog(*this, "watchdog") { } @@ -136,13 +135,12 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w); DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w); - void looping_videoram_w(offs_t offset, uint8_t data); - void looping_colorram_w(offs_t offset, uint8_t data); + void videoram_w(offs_t offset, uint8_t data); + void colorram_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(level2_irq_set); DECLARE_WRITE_LINE_MEMBER(main_irq_ack_w); DECLARE_WRITE_LINE_MEMBER(watchdog_w); - DECLARE_WRITE_LINE_MEMBER(looping_souint_clr); - void looping_soundlatch_w(uint8_t data); + DECLARE_WRITE_LINE_MEMBER(souint_clr); DECLARE_WRITE_LINE_MEMBER(ballon_enable_w); void out_0_w(uint8_t data); void out_2_w(uint8_t data); @@ -153,28 +151,28 @@ private: DECLARE_READ_LINE_MEMBER(cop_serial_r); void cop_l_w(uint8_t data); uint8_t protection_r(); - DECLARE_WRITE_LINE_MEMBER(looping_spcint); - void looping_sound_sw(uint8_t data); + DECLARE_WRITE_LINE_MEMBER(spcint); + void sound_sw(uint8_t data); DECLARE_WRITE_LINE_MEMBER(ay_enable_w); DECLARE_WRITE_LINE_MEMBER(speech_enable_w); TILE_GET_INFO_MEMBER(get_tile_info); - void looping_palette(palette_device &palette) const; - uint32_t screen_update_looping(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(looping_interrupt); + void palette(palette_device &palette) const; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(interrupt); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void looping_io_map(address_map &map); - void looping_map(address_map &map); - void looping_sound_io_map(address_map &map); - void looping_sound_map(address_map &map); + void io_map(address_map &map); + void map(address_map &map); + void sound_io_map(address_map &map); + void sound_map(address_map &map); - /* memory pointers */ + // memory pointers required_shared_ptr m_videoram; required_shared_ptr m_colorram; required_shared_ptr m_spriteram; uint8_t m_cop_port_l; - /* tilemaps */ + // tilemaps tilemap_t * m_bg_tilemap; required_device m_maincpu; @@ -184,7 +182,6 @@ private: required_device m_dac; required_device m_gfxdecode; required_device m_palette; - required_device m_soundlatch; required_device m_watchdog; }; @@ -196,7 +193,7 @@ private: * *************************************/ -void looping_state::looping_palette(palette_device &palette) const +void looping_state::palette(palette_device &palette) const { uint8_t const *const color_prom = memregion("proms")->base(); static constexpr int resistances[3] = { 1000, 470, 220 }; @@ -279,27 +276,27 @@ WRITE_LINE_MEMBER(looping_state::flip_screen_y_w) } -void looping_state::looping_videoram_w(offs_t offset, uint8_t data) +void looping_state::videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -void looping_state::looping_colorram_w(offs_t offset, uint8_t data) +void looping_state::colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; - /* odd bytes are column color attribute */ + // odd bytes are column color attribute if (offset & 1) { - /* mark the whole column dirty */ + // mark the whole column dirty offs_t offs = (offset/2); for (int i = 0; i < 0x20; i++) m_bg_tilemap->mark_tile_dirty(i * 0x20 + offs); } - /* even bytes are column scroll */ + // even bytes are column scroll else m_bg_tilemap->set_scrolly(offset/2, data); } @@ -342,7 +339,7 @@ void looping_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect } -uint32_t looping_state::screen_update_looping(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t looping_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); @@ -354,12 +351,13 @@ uint32_t looping_state::screen_update_looping(screen_device &screen, bitmap_ind1 /************************************* * - * Machine init/reset + * Machine start/reset * *************************************/ void looping_state::machine_start() { + save_item(NAME(m_cop_port_l)); } void looping_state::machine_reset() @@ -367,6 +365,8 @@ void looping_state::machine_reset() // Disable auto wait state generation by raising the READY line on reset m_maincpu->ready_line(ASSERT_LINE); m_maincpu->reset_line(ASSERT_LINE); + + m_cop_port_l = 0; } /************************************* @@ -375,7 +375,7 @@ void looping_state::machine_reset() * *************************************/ -INTERRUPT_GEN_MEMBER(looping_state::looping_interrupt) +INTERRUPT_GEN_MEMBER(looping_state::interrupt) { m_maincpu->set_input_line(INT_9995_INT1, ASSERT_LINE); } @@ -401,7 +401,7 @@ WRITE_LINE_MEMBER(looping_state::watchdog_w) } -WRITE_LINE_MEMBER(looping_state::looping_souint_clr) +WRITE_LINE_MEMBER(looping_state::souint_clr) { logerror("Soundint clr = %d\n", state); if (state == 0) @@ -409,26 +409,20 @@ WRITE_LINE_MEMBER(looping_state::looping_souint_clr) } -WRITE_LINE_MEMBER(looping_state::looping_spcint) +WRITE_LINE_MEMBER(looping_state::spcint) { logerror("Speech /int = %d\n", state==ASSERT_LINE? 1:0); m_audiocpu->set_input_line(INT_9980A_LEVEL4, state==ASSERT_LINE? CLEAR_LINE : ASSERT_LINE); } -void looping_state::looping_soundlatch_w(uint8_t data) -{ - m_soundlatch->write(data); - m_audiocpu->set_input_line(INT_9980A_LEVEL2, ASSERT_LINE); -} - /************************************* * * Custom DAC handling * *************************************/ -void looping_state::looping_sound_sw(uint8_t data) +void looping_state::sound_sw(uint8_t data) { /* this can be improved by adding the missing signals for decay etc. (see schematics) @@ -486,8 +480,8 @@ void looping_state::adc_w(uint8_t data) { osd_printf_debug("%04X:ADC write = %02 WRITE_LINE_MEMBER(looping_state::plr2_w) { - /* set to 1 after IDLE, cleared to 0 during processing */ - /* is this an LED on the PCB? */ + /* set to 1 after IDLE, cleared to 0 during processing + is this an LED on the PCB? */ } @@ -545,46 +539,46 @@ uint8_t looping_state::protection_r() * *************************************/ -void looping_state::looping_map(address_map &map) +void looping_state::map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0x9000, 0x93ff).ram().w(FUNC(looping_state::looping_videoram_w)).share("videoram"); + map(0x9000, 0x93ff).ram().w(FUNC(looping_state::videoram_w)).share(m_videoram); - map(0x9800, 0x983f).mirror(0x0700).ram().w(FUNC(looping_state::looping_colorram_w)).share("colorram"); - map(0x9840, 0x987f).mirror(0x0700).ram().share("spriteram"); + map(0x9800, 0x983f).mirror(0x0700).ram().w(FUNC(looping_state::colorram_w)).share(m_colorram); + map(0x9840, 0x987f).mirror(0x0700).ram().share(m_spriteram); map(0x9880, 0x98ff).mirror(0x0700).ram(); map(0xb000, 0xb007).mirror(0x07f8).w("videolatch", FUNC(ls259_device::write_d0)); map(0xe000, 0xefff).ram(); - map(0xf800, 0xf800).mirror(0x03fc).portr("P1").w(FUNC(looping_state::out_0_w)); /* /OUT0 */ - map(0xf801, 0xf801).mirror(0x03fc).portr("P2").w(FUNC(looping_state::looping_soundlatch_w)); /* /OUT1 */ - map(0xf802, 0xf802).mirror(0x03fc).portr("DSW").w(FUNC(looping_state::out_2_w)); /* /OUT2 */ + map(0xf800, 0xf800).mirror(0x03fc).portr("P1").w(FUNC(looping_state::out_0_w)); // /OUT0 + map(0xf801, 0xf801).mirror(0x03fc).portr("P2").w("soundlatch", FUNC(generic_latch_8_device::write)); // /OUT1 + map(0xf802, 0xf802).mirror(0x03fc).portr("DSW").w(FUNC(looping_state::out_2_w)); // /OUT2 map(0xf803, 0xf803).mirror(0x03fc).rw(FUNC(looping_state::adc_r), FUNC(looping_state::adc_w)); } -void looping_state::looping_io_map(address_map &map) +void looping_state::io_map(address_map &map) { map(0x0800, 0x080f).w("mainlatch", FUNC(ls259_device::write_d0)); } -/* complete memory map derived from schematics */ -void looping_state::looping_sound_map(address_map &map) +// complete memory map derived from schematics +void looping_state::sound_map(address_map &map) { map.global_mask(0x3fff); map(0x0000, 0x37ff).rom(); map(0x3800, 0x3bff).ram(); - map(0x3c00, 0x3c00).mirror(0x00f4).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_w)); + map(0x3c00, 0x3c00).mirror(0x00f4).rw(m_aysnd, FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_w)); map(0x3c01, 0x3c01).mirror(0x00f6).noprw(); - map(0x3c02, 0x3c02).mirror(0x00f4).nopr().w("aysnd", FUNC(ay8910_device::data_w)); - map(0x3e00, 0x3e00).mirror(0x00f4).nopr().w("tms", FUNC(tms5220_device::data_w)); + map(0x3c02, 0x3c02).mirror(0x00f4).nopr().w(m_aysnd, FUNC(ay8910_device::data_w)); + map(0x3e00, 0x3e00).mirror(0x00f4).nopr().w(m_tms, FUNC(tms5220_device::data_w)); map(0x3e01, 0x3e01).mirror(0x00f6).noprw(); - map(0x3e02, 0x3e02).mirror(0x00f4).r("tms", FUNC(tms5220_device::status_r)).nopw(); + map(0x3e02, 0x3e02).mirror(0x00f4).r(m_tms, FUNC(tms5220_device::status_r)).nopw(); } -void looping_state::looping_sound_io_map(address_map &map) +void looping_state::sound_io_map(address_map &map) { map(0x0000, 0x000f).w("sen0", FUNC(ls259_device::write_d0)); map(0x0010, 0x001f).w("sen1", FUNC(ls259_device::write_d0)); @@ -625,14 +619,14 @@ void looping_state::looping(machine_config &config) { // CPU TMS9995, standard variant; no line connections TMS9995(config, m_maincpu, MAIN_CPU_CLOCK); - m_maincpu->set_addrmap(AS_PROGRAM, &looping_state::looping_map); - m_maincpu->set_addrmap(AS_IO, &looping_state::looping_io_map); - m_maincpu->set_vblank_int("screen", FUNC(looping_state::looping_interrupt)); + m_maincpu->set_addrmap(AS_PROGRAM, &looping_state::map); + m_maincpu->set_addrmap(AS_IO, &looping_state::io_map); + m_maincpu->set_vblank_int("screen", FUNC(looping_state::interrupt)); // CPU TMS9980A for audio subsystem; no line connections TMS9980A(config, m_audiocpu, SOUND_CLOCK); - m_audiocpu->set_addrmap(AS_PROGRAM, &looping_state::looping_sound_map); - m_audiocpu->set_addrmap(AS_IO, &looping_state::looping_sound_io_map); + m_audiocpu->set_addrmap(AS_PROGRAM, &looping_state::sound_map); + m_audiocpu->set_addrmap(AS_IO, &looping_state::sound_io_map); cop420_cpu_device &cop(COP420(config, "mcu", COP_CLOCK)); cop.set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); @@ -654,41 +648,41 @@ void looping_state::looping(machine_config &config) WATCHDOG_TIMER(config, m_watchdog); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); - screen.set_screen_update(FUNC(looping_state::screen_update_looping)); + screen.set_screen_update(FUNC(looping_state::screen_update)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_looping); - PALETTE(config, m_palette, FUNC(looping_state::looping_palette), 32); + PALETTE(config, m_palette, FUNC(looping_state::palette), 32); ls259_device &videolatch(LS259(config, "videolatch")); // E2 on video board videolatch.q_out_cb<1>().set(FUNC(looping_state::level2_irq_set)); videolatch.q_out_cb<6>().set(FUNC(looping_state::flip_screen_x_w)); videolatch.q_out_cb<7>().set(FUNC(looping_state::flip_screen_y_w)); - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); - GENERIC_LATCH_8(config, m_soundlatch); + GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, INT_9980A_LEVEL2); AY8910(config, m_aysnd, SOUND_CLOCK/4); - m_aysnd->port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); + m_aysnd->port_a_read_callback().set("soundlatch", FUNC(generic_latch_8_device::read)); m_aysnd->add_route(ALL_OUTPUTS, "speaker", 0.2); TMS5220(config, m_tms, TMS_CLOCK); - m_tms->irq_cb().set(FUNC(looping_state::looping_spcint)); + m_tms->irq_cb().set(FUNC(looping_state::spcint)); m_tms->add_route(ALL_OUTPUTS, "speaker", 0.5); DAC_2BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // unknown DAC voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0)); - vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); - vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); + vref.add_route(0, m_dac, 1.0, DAC_VREF_POS_INPUT); + vref.add_route(0, m_dac, -1.0, DAC_VREF_NEG_INPUT); ls259_device &sen0(LS259(config, "sen0")); // B3 on sound board - sen0.q_out_cb<0>().set(FUNC(looping_state::looping_souint_clr)); - sen0.parallel_out_cb().set(FUNC(looping_state::looping_sound_sw)); + sen0.q_out_cb<0>().set(FUNC(looping_state::souint_clr)); + sen0.parallel_out_cb().set(FUNC(looping_state::sound_sw)); ls259_device &sen1(LS259(config, "sen1")); // A1 on sound board with outputs connected to 4016 at B1 sen1.q_out_cb<0>().set(FUNC(looping_state::ay_enable_w)); @@ -715,7 +709,7 @@ static INPUT_PORTS_START( looping ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_START("P2") /* cocktail? */ + PORT_START("P2") // cocktail? PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL @@ -748,7 +742,7 @@ static INPUT_PORTS_START( looping ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) INPUT_PORTS_END -/* Same as 'looping' but additional "Infinite Lives" Dip Switch */ +// Same as 'looping' but additional "Infinite Lives" Dip Switch static INPUT_PORTS_START( skybump ) PORT_INCLUDE(looping) @@ -769,25 +763,25 @@ INPUT_PORTS_END *************************************/ ROM_START( loopingv ) - ROM_REGION( 0x8000, "maincpu", 0 ) /* TMS9995 code */ + ROM_REGION( 0x8000, "maincpu", 0 ) // TMS9995 code ROM_LOAD( "vli3.5a", 0x0000, 0x2000, CRC(1ac3ccdf) SHA1(9d1cde8bd4d0f12eaf06225b3ecc4a5c3e4f0c11) ) ROM_LOAD( "vli1.2a", 0x2000, 0x2000, CRC(97755fd4) SHA1(4a6ef02b0128cd516ff95083a7caaad8f3756f09) ) ROM_LOAD( "l056-6.9a", 0x4000, 0x2000, CRC(548afa52) SHA1(0b88ac7394feede023519c585a4084591eb9661a) ) ROM_LOAD( "vli9-5.8a", 0x6000, 0x2000, CRC(5d122f86) SHA1(d1c66b890142bb4d4648f3edec6567f58107dbf0) ) - ROM_REGION( 0x3800, "audiocpu", 0 ) /* TMS9980 code */ + ROM_REGION( 0x3800, "audiocpu", 0 ) // TMS9980 code ROM_LOAD( "i-o.13c", 0x0000, 0x0800, CRC(21e9350c) SHA1(f30a180309e373a17569351944f5e7982c3b3f9d) ) ROM_LOAD( "i-o.13a", 0x0800, 0x1000, CRC(1de29f25) SHA1(535acb132266d6137b0610ee9a9b946459ae44af) ) - ROM_LOAD( "i-o.11a", 0x2800, 0x1000, CRC(61c74c79) SHA1(9f34d18a919446dd76857b851cea23fc1526f3c2) ) /* speech */ + ROM_LOAD( "i-o.11a", 0x2800, 0x1000, CRC(61c74c79) SHA1(9f34d18a919446dd76857b851cea23fc1526f3c2) ) // speech - ROM_REGION( 0x1000, "mcu", 0 ) /* COP420 microcontroller code */ + ROM_REGION( 0x1000, "mcu", 0 ) // COP420 microcontroller code /* - ROM_LOAD( "cop.bin", 0x0000, 0x0400, BAD_DUMP CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times, and starting PC is not 0 + ROM_LOAD( "cop.bin", 0x0000, 0x0400, BAD_DUMP CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times, and starting PC is not 0 ROM_CONTINUE( 0x0000, 0x0400) ROM_CONTINUE( 0x0000, 0x0400) ROM_CONTINUE( 0x0000, 0x0400) */ - ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted + ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted ROM_CONTINUE( 0x0000, 0x00c2) ROM_CONTINUE( 0x00c2, 0x033e) ROM_CONTINUE( 0x0000, 0x00c2) @@ -800,31 +794,31 @@ ROM_START( loopingv ) ROM_LOAD( "log2.8a", 0x0000, 0x800, CRC(ef3284ac) SHA1(8719c9df8c972a56c306b3c707aaa53092ffa2d6) ) ROM_LOAD( "log1-9-3.6a", 0x0800, 0x800, CRC(c434c14c) SHA1(3669aaf7adc6b250378bcf62eb8e7058f55476ef) ) - ROM_REGION( 0x0020, "proms", 0 ) /* color prom */ + ROM_REGION( 0x0020, "proms", 0 ) // color prom ROM_LOAD( "18s030.11b", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) ROM_END ROM_START( loopingva ) - ROM_REGION( 0x8000, "maincpu", 0 ) /* TMS9995 code */ + ROM_REGION( 0x8000, "maincpu", 0 ) // TMS9995 code ROM_LOAD( "vli3.5a", 0x0000, 0x2000, CRC(1ac3ccdf) SHA1(9d1cde8bd4d0f12eaf06225b3ecc4a5c3e4f0c11) ) ROM_LOAD( "vli-4-3", 0x2000, 0x1000, CRC(f32cae2b) SHA1(2c6ef82af438e588b56fd58b95cf969c97bb9a66) ) ROM_LOAD( "vli-8-4", 0x3000, 0x1000, CRC(611e1dbf) SHA1(0ab6669f1dec30c3f7bca49e158e4790a78fa308) ) ROM_LOAD( "l056-6.9a", 0x4000, 0x2000, CRC(548afa52) SHA1(0b88ac7394feede023519c585a4084591eb9661a) ) ROM_LOAD( "vli9-5.8a", 0x6000, 0x2000, CRC(5d122f86) SHA1(d1c66b890142bb4d4648f3edec6567f58107dbf0) ) - ROM_REGION( 0x3800, "audiocpu", 0 ) /* TMS9980 code */ + ROM_REGION( 0x3800, "audiocpu", 0 ) // TMS9980 code ROM_LOAD( "i-o-v2.13c", 0x0000, 0x0800, CRC(09765ebe) SHA1(93b035c3a94f2f6d5e463256e26b600a4dd5d3ea) ) - ROM_LOAD( "i-o.13a", 0x0800, 0x1000, CRC(1de29f25) SHA1(535acb132266d6137b0610ee9a9b946459ae44af) ) /* speech */ + ROM_LOAD( "i-o.13a", 0x0800, 0x1000, CRC(1de29f25) SHA1(535acb132266d6137b0610ee9a9b946459ae44af) ) // speech ROM_LOAD( "i-o.11a", 0x2800, 0x1000, CRC(61c74c79) SHA1(9f34d18a919446dd76857b851cea23fc1526f3c2) ) - ROM_REGION( 0x1000, "mcu", 0 ) /* COP420 microcontroller code */ + ROM_REGION( 0x1000, "mcu", 0 ) // COP420 microcontroller code /* - ROM_LOAD( "cop.bin", 0x0000, 0x0400, BAD_DUMP CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times, and starting PC is not 0 + ROM_LOAD( "cop.bin", 0x0000, 0x0400, BAD_DUMP CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times, and starting PC is not 0 ROM_CONTINUE( 0x0000, 0x0400) ROM_CONTINUE( 0x0000, 0x0400) ROM_CONTINUE( 0x0000, 0x0400) */ - ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted + ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted ROM_CONTINUE( 0x0000, 0x00c2) ROM_CONTINUE( 0x00c2, 0x033e) ROM_CONTINUE( 0x0000, 0x00c2) @@ -837,12 +831,12 @@ ROM_START( loopingva ) ROM_LOAD( "log2.8a", 0x0000, 0x800, CRC(ef3284ac) SHA1(8719c9df8c972a56c306b3c707aaa53092ffa2d6) ) ROM_LOAD( "log1-9-3.6a", 0x0800, 0x800, CRC(c434c14c) SHA1(3669aaf7adc6b250378bcf62eb8e7058f55476ef) ) - ROM_REGION( 0x0020, "proms", 0 ) /* color prom */ + ROM_REGION( 0x0020, "proms", 0 ) // color prom ROM_LOAD( "18s030.11b", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) ROM_END ROM_START( looping ) - ROM_REGION( 0x8000, "maincpu", 0 ) /* TMS9995 code */ + ROM_REGION( 0x8000, "maincpu", 0 ) // TMS9995 code ROM_LOAD( "loop551.bin", 0x0000, 0x1000, CRC(d6bb6db6) SHA1(074eb3bc101096bfe67c3107f306df829ae38548) ) ROM_LOAD( "loop552.bin", 0x1000, 0x1000, CRC(bc32956d) SHA1(6ef8d76df1d5b1ed52a4057eae2bf4eb394e4c54) ) ROM_LOAD( "loop553.bin", 0x2000, 0x1000, CRC(5f8b9aed) SHA1(32be61788e3d54b23d1663025365b1ab6b96dc91) ) @@ -851,14 +845,14 @@ ROM_START( looping ) ROM_LOAD( "loop556.bin", 0x5000, 0x1000, CRC(3419a5d5) SHA1(2b0249c54985ab5e12de17c0e3d62caa0c7575e3) ) ROM_LOAD( "loop557.bin", 0x6000, 0x1000, CRC(d430e287) SHA1(b0edd25ef4d2468cc1f8c10ac49c545a89d398d7) ) - ROM_REGION( 0x3800, "audiocpu", 0 ) /* TMS9980 code */ + ROM_REGION( 0x3800, "audiocpu", 0 ) // TMS9980 code ROM_LOAD( "loopc13.bin", 0x0000, 0x1000, CRC(ff9ac4ec) SHA1(9f8df94cd79d86fe4c384df1d5d729b58a7ca7a8) ) ROM_LOAD( "loopa13.bin", 0x0800, 0x1000, CRC(1de29f25) SHA1(535acb132266d6137b0610ee9a9b946459ae44af) ) - ROM_LOAD( "loopa11.bin", 0x2800, 0x1000, CRC(61c74c79) SHA1(9f34d18a919446dd76857b851cea23fc1526f3c2) ) /* speech */ + ROM_LOAD( "loopa11.bin", 0x2800, 0x1000, CRC(61c74c79) SHA1(9f34d18a919446dd76857b851cea23fc1526f3c2) ) // speech - ROM_REGION( 0x1000, "mcu", 0 ) /* COP420 microcontroller code */ - /* taken from the other sets */ - ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted + ROM_REGION( 0x1000, "mcu", 0 ) // COP420 microcontroller code + // taken from the other sets + ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted ROM_CONTINUE( 0x0000, 0x00c2) ROM_CONTINUE( 0x00c2, 0x033e) ROM_CONTINUE( 0x0000, 0x00c2) @@ -868,33 +862,33 @@ ROM_START( looping ) ROM_CONTINUE( 0x0000, 0x00c2) ROM_REGION( 0x1000, "gfx1", 0 ) - ROM_LOAD( "loopaa8.bin", 0x0000, 0x800, CRC(ef3284ac) SHA1(8719c9df8c972a56c306b3c707aaa53092ffa2d6) ) + ROM_LOAD( "loopaa8.bin", 0x0000, 0x800, CRC(ef3284ac) SHA1(8719c9df8c972a56c306b3c707aaa53092ffa2d6) ) ROM_LOAD( "loopaa6.bin", 0x0800, 0x800, CRC(c434c14c) SHA1(3669aaf7adc6b250378bcf62eb8e7058f55476ef) ) - ROM_REGION( 0x0020, "proms", 0 ) /* color prom */ + ROM_REGION( 0x0020, "proms", 0 ) // color prom ROM_LOAD( "loopvp1.bin", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) ROM_END ROM_START( skybump ) - ROM_REGION( 0x8000, "maincpu", 0 ) /* TMS9995 code */ + ROM_REGION( 0x8000, "maincpu", 0 ) // TMS9995 code ROM_LOAD( "cpu.5a", 0x0000, 0x2000, CRC(dca38df0) SHA1(86abe04cbabf81399f842f53668fe7a3f7ed3757) ) ROM_LOAD( "cpu.2a", 0x2000, 0x2000, CRC(6bcc211a) SHA1(245ebae3934df9c3920743a941546d96bb2e7c03) ) ROM_LOAD( "cpu.9a", 0x4000, 0x2000, CRC(c7a50797) SHA1(60aa0a28ba970f12d0a0e538ae1c6807d105855c) ) ROM_LOAD( "cpu.8a", 0x6000, 0x2000, CRC(a718c6f2) SHA1(19afa8c353829232cb96c27b87f13b43166ab6fc) ) - ROM_REGION( 0x3800, "audiocpu", 0 ) /* TMS9980 code */ + ROM_REGION( 0x3800, "audiocpu", 0 ) // TMS9980 code ROM_LOAD( "snd.13c", 0x0000, 0x0800, CRC(21e9350c) SHA1(f30a180309e373a17569351944f5e7982c3b3f9d) ) ROM_LOAD( "snd.13a", 0x0800, 0x1000, CRC(1de29f25) SHA1(535acb132266d6137b0610ee9a9b946459ae44af) ) ROM_LOAD( "snd.11a", 0x2800, 0x1000, CRC(61c74c79) SHA1(9f34d18a919446dd76857b851cea23fc1526f3c2) ) - ROM_REGION( 0x1000, "mcu", 0 ) /* COP420 microcontroller code */ + ROM_REGION( 0x1000, "mcu", 0 ) // COP420 microcontroller code /* - ROM_LOAD( "cop.bin", 0x0000, 0x0400, BAD_DUMP CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times, and starting PC is not 0 + ROM_LOAD( "cop.bin", 0x0000, 0x0400, BAD_DUMP CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times, and starting PC is not 0 ROM_CONTINUE( 0x0000, 0x0400) ROM_CONTINUE( 0x0000, 0x0400) ROM_CONTINUE( 0x0000, 0x0400) */ - ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted + ROM_LOAD( "cop.bin", 0x00c2, 0x033e, CRC(bbfd26d5) SHA1(5f78b32b6e7c003841ef5b635084db2cdfebf0e1) ) // overdumped 4 times and shifted ROM_CONTINUE( 0x0000, 0x00c2) ROM_CONTINUE( 0x00c2, 0x033e) ROM_CONTINUE( 0x0000, 0x00c2) @@ -907,7 +901,7 @@ ROM_START( skybump ) ROM_LOAD( "vid.8a", 0x0000, 0x800, CRC(459ccc55) SHA1(747f6789605b48be9e22f779f9e3f6c98ad4e594) ) ROM_LOAD( "vid.6a", 0x0800, 0x800, CRC(12ebbe74) SHA1(0f87c81a45d1bf3b8c6a70ee5e1a014069f67755) ) - ROM_REGION( 0x0020, "proms", 0 ) /* color prom */ + ROM_REGION( 0x0020, "proms", 0 ) // color prom ROM_LOAD( "vid.clr", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) ROM_END @@ -924,13 +918,11 @@ void looping_state::init_looping() int length = memregion("maincpu")->bytes(); uint8_t *rom = memregion("maincpu")->base(); - m_cop_port_l = 0; - - /* bitswap the TMS9995 ROMs */ + // bitswap the TMS9995 ROMs for (int i = 0; i < length; i++) rom[i] = bitswap<8>(rom[i], 0,1,2,3,4,5,6,7); - /* install protection handlers */ + // install protection handlers m_maincpu->space(AS_PROGRAM).install_read_handler(0x7000, 0x7007, read8smo_delegate(*this, FUNC(looping_state::protection_r))); } @@ -942,7 +934,7 @@ void looping_state::init_looping() * *************************************/ -GAME( 1982, looping, 0, looping, looping, looping_state, init_looping, ROT90, "Video Games GmbH", "Looping", MACHINE_IMPERFECT_SOUND /*| MACHINE_SUPPORTS_SAVE */) -GAME( 1982, loopingv, looping, looping, looping, looping_state, init_looping, ROT90, "Video Games GmbH (Venture Line license)", "Looping (Venture Line license, set 1)", MACHINE_IMPERFECT_SOUND /* | MACHINE_SUPPORTS_SAVE */) -GAME( 1982, loopingva, looping, looping, looping, looping_state, init_looping, ROT90, "Video Games GmbH (Venture Line license)", "Looping (Venture Line license, set 2)", MACHINE_IMPERFECT_SOUND /* | MACHINE_SUPPORTS_SAVE */ ) -GAME( 1982, skybump, 0, looping, skybump, looping_state, init_looping, ROT90, "Venture Line", "Sky Bumper", MACHINE_IMPERFECT_SOUND /* | MACHINE_SUPPORTS_SAVE */) +GAME( 1982, looping, 0, looping, looping, looping_state, init_looping, ROT90, "Video Games GmbH", "Looping", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, loopingv, looping, looping, looping, looping_state, init_looping, ROT90, "Video Games GmbH (Venture Line license)", "Looping (Venture Line license, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, loopingva, looping, looping, looping, looping_state, init_looping, ROT90, "Video Games GmbH (Venture Line license)", "Looping (Venture Line license, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, skybump, 0, looping, skybump, looping_state, init_looping, ROT90, "Venture Line", "Sky Bumper", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3 From 6a4c446ede437ae72062380c09e9df51907280e5 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 8 Jul 2020 06:16:37 +0200 Subject: pcat_dyn.cpp: removed helpers I had accidentally left in --- src/mame/drivers/pcat_dyn.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index 19a324a5e47..222f9a77e71 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -51,21 +51,6 @@ public: void pcat_dyn(machine_config &config); - void init_x() - { - uint8_t *ROM = memregion("game_prg")->base(); - { - char filename[256]; - sprintf(filename,"decrypted_%s", machine().system().name); - FILE *fp = fopen(filename, "w+b"); - if (fp) - { - fwrite(ROM, 0x80000, 1, fp); - fclose(fp); - } - } - } - private: required_device m_isabus; required_memory_bank m_prgbank; @@ -291,5 +276,5 @@ ROM_START(toursol1) ROM_END -GAME( 1995, toursol, 0, pcat_dyn, pcat_dyn, pcat_dyn_state, init_x, ROT0, "Dynamo", "Tournament Solitaire (V1.06, 08/03/95)", MACHINE_UNEMULATED_PROTECTION ) -GAME( 1995, toursol1, toursol, pcat_dyn, pcat_dyn, pcat_dyn_state, init_x, ROT0, "Dynamo", "Tournament Solitaire (V1.04, 06/22/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) +GAME( 1995, toursol, 0, pcat_dyn, pcat_dyn, pcat_dyn_state, empty_init, ROT0, "Dynamo", "Tournament Solitaire (V1.06, 08/03/95)", MACHINE_UNEMULATED_PROTECTION ) +GAME( 1995, toursol1, toursol, pcat_dyn, pcat_dyn, pcat_dyn_state, empty_init, ROT0, "Dynamo", "Tournament Solitaire (V1.04, 06/22/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) -- cgit v1.2.3 From f5b2e808172f391e4b2a8e3f73e2036b7ba842e2 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 8 Jul 2020 09:39:55 +0200 Subject: New working clones ------------------ Ms. Pac-Man (Novatronic bootleg) [Juan Romero, ClawGrip] --- src/mame/drivers/pacman.cpp | 51 +++++++++++++++++++++++++++++++++++++++++---- src/mame/mame.lst | 3 ++- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp index 392fe08c228..53f5a5083b5 100644 --- a/src/mame/drivers/pacman.cpp +++ b/src/mame/drivers/pacman.cpp @@ -5523,7 +5523,7 @@ ROM_START( pacgal2 ) ROM_LOAD( "u7a.bin", 0xb000, 0x1000, CRC(5fafec7c) SHA1(1c6a85e5c348a69b8d51bcea4f8bdebb24825770) ) ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "pmg9.bin", 0x0000, 0x0800, CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) ) + ROM_LOAD( "pmg9.bin", 0x0000, 0x0800, CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) ) ROM_LOAD( "pmg11.bin", 0x0800, 0x0800, CRC(7409fbec) SHA1(f440f08ba026ae6172666e1bdc0894ce33bba420) ) ROM_LOAD( "pmg10.bin", 0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) ) ROM_LOAD( "pmg12.bin", 0x1800, 0x0800, CRC(50c7477d) SHA1(c04ec282a8cb528df5e38ad750d12ee71612695d) ) @@ -5537,6 +5537,48 @@ ROM_START( pacgal2 ) ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) /* timing - not used */ ROM_END +ROM_START( mspacmbn ) // Main PCB H-P1, sub PCB with main CPU ROMs marked Novatronic and 1982 + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "1_sub.bin", 0x2000, 0x0200, CRC(0839a86e) SHA1(b9f3e477bd2e7ffd98156d5fa14f5ea12468811f) ) + ROM_CONTINUE( 0x0200, 0x0200 ) + ROM_CONTINUE( 0x2400, 0x0200 ) + ROM_CONTINUE( 0x0600, 0x0a00 ) + ROM_LOAD( "2_sub.bin", 0x3000, 0x0200, CRC(f40b1ce9) SHA1(0a00ef0873b60cbc8dcf5aac88fee4023f6f4087) ) + ROM_CONTINUE( 0x1200, 0x0200 ) + ROM_CONTINUE( 0x3400, 0x0200 ) + ROM_CONTINUE( 0x1600, 0x0a00 ) + ROM_LOAD( "3_sub.bin", 0x0000, 0x0200, CRC(40257a62) SHA1(89da3a47345902d58695fabd456099c1b1661dc4) ) + ROM_CONTINUE( 0x2200, 0x0200 ) + ROM_CONTINUE( 0x0400, 0x0200 ) + ROM_CONTINUE( 0x2600, 0x0a00 ) + ROM_LOAD( "4_sub.bin", 0x1000, 0x0200, CRC(269e0bdb) SHA1(51882b6bedc6488e4634f58bcaca4bb434e85d04) ) + ROM_CONTINUE( 0x3200, 0x0200 ) + ROM_CONTINUE( 0x1400, 0x0200 ) + ROM_CONTINUE( 0x3600, 0x0a00 ) + ROM_LOAD( "5_sub.bin", 0x9000, 0x0200, CRC(370b55a4) SHA1(10daebf5c858bec44d50d22348be3ffaa209e829) ) + ROM_CONTINUE( 0x8200, 0x0200 ) + ROM_CONTINUE( 0x9400, 0x0200 ) + ROM_CONTINUE( 0x8600, 0x0a00 ) + ROM_LOAD( "6_sub.bin", 0x8000, 0x0200, CRC(d0c0f66b) SHA1(b91859c363178dc21326305131f045c3f0e0a8d7) ) + ROM_CONTINUE( 0x9200, 0x0200 ) + ROM_CONTINUE( 0x8400, 0x0200 ) + ROM_CONTINUE( 0x9600, 0x0a00 ) + ROM_COPY( "maincpu", 0x2000, 0xa000, 0x2000 ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "7.bin", 0x0000, 0x0800, CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) ) + ROM_LOAD( "8.bin", 0x0800, 0x0800, CRC(7409fbec) SHA1(f440f08ba026ae6172666e1bdc0894ce33bba420) ) + ROM_LOAD( "9.bin", 0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) ) + ROM_LOAD( "10.bin", 0x1800, 0x0800, CRC(50c7477d) SHA1(c04ec282a8cb528df5e38ad750d12ee71612695d) ) + + ROM_REGION( 0x0120, "proms", 0 ) // not dumped for this set, taken from the very similar pacgal2 + ROM_LOAD( "82s123.7f", 0x0000, 0x0020, BAD_DUMP CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) + ROM_LOAD( "82s126.4a", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) + + ROM_REGION( 0x0200, "namco", 0 ) // sound PROMs,not dumped for this set, taken from the very similar pacgal2 + ROM_LOAD( "82s126.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) +ROM_END ROM_START( mschamp ) /* "Original" Zola-Puc board. FORCE ELECTRONICS KM-001 PCB copyright by RAYGLO MFG CO 1992/1993 */ ROM_REGION( 0x20000, "maincpu", 0 ) @@ -7568,11 +7610,11 @@ void pacman_state::init_cannonbp() void pacman_state::init_pengomc1() { uint8_t *romdata = memregion("maincpu")->base(); - uint8_t buf[0x8000]; - memcpy(buf, romdata, 0x8000); + uint8_t buf[0xc000]; + memcpy(buf, romdata, 0xc000); // some sort of weak protection? - for (int i = 0; i < 0x8000; i++) + for (int i = 0; i < 0xc000; i++) romdata[i] = buf[i^0xff]; } @@ -7637,6 +7679,7 @@ GAME( 1981, mspacmab, mspacman, woodpek, mspacman, pacman_state, empty_init, GAME( 1981, mspacmab2,mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "bootleg", "Ms. Pac-Man (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, mspacmbe, mspacman, woodpek, mspacman, pacman_state, init_mspacmbe, ROT90, "bootleg", "Ms. Pac-Man (bootleg, encrypted)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, mspacmbmc,mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "bootleg (Marti Colls)", "Ms. Pac-Man (Marti Colls bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, mspacmbn, mspacman, woodpek, mspacman, pacman_state, init_pengomc1, ROT90, "bootleg (Novatronic)", "Ms. Pac-Man (Novatronic bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, mspacii, mspacman, woodpek, mspacman, pacman_state, init_mspacii, ROT90, "bootleg (Orca)", "Ms. Pac-Man II (Orca bootleg set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, mspacii2, mspacman, woodpek, mspacman, pacman_state, init_mspacii, ROT90, "bootleg (Orca)", "Ms. Pac-Man II (Orca bootleg set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, pacgal, mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "hack", "Pac-Gal (set 1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index d5a9e822cfc..049513531dd 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -32356,7 +32356,6 @@ mrtnt // (c) 1983 Telko mschamp // hack by RAYGLO MFG "Zola-Puc" (c) 1992/1993 mschamps // hack (hack of the Rayglo hack?) msheartb // hack -mspacmbmc // bootleg (Marti Colls / Falgas) mspacii // bootleg mspacii2 // bootleg mspacmab // bootleg @@ -32373,6 +32372,8 @@ mspacmanbi // bootleg mspacmancr // bootleg on Crush Roller board mspacmat // hack mspacmbe // bootleg +mspacmbmc // bootleg (Marti Colls / Falgas) +mspacmbn // bootleg mspacmnf // hack mspacpls // hack newpuc2 // hack -- cgit v1.2.3 From f8b2695397c47ed27541c5099960ce4e2573754e Mon Sep 17 00:00:00 2001 From: Ted Green Date: Wed, 8 Jul 2020 07:47:16 -0600 Subject: polylgcy.cpp: Fix outdated missing MAX macros used for statistics --- src/devices/video/polylgcy.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/devices/video/polylgcy.cpp b/src/devices/video/polylgcy.cpp index a4baa6e5c70..bad622a92c1 100644 --- a/src/devices/video/polylgcy.cpp +++ b/src/devices/video/polylgcy.cpp @@ -300,7 +300,7 @@ static inline polygon_info *allocate_polygon(legacy_poly_manager *poly, int miny #endif } #if KEEP_STATISTICS - poly->polygon_max = MAX(poly->polygon_max, poly->polygon_next + 1); + poly->polygon_max = std::max(poly->polygon_max, poly->polygon_next + 1); #endif return poly->polygon[poly->polygon_next++]; } @@ -373,9 +373,9 @@ void poly_free(legacy_poly_manager *poly) else printf("Total pixels = %d\n", (uint32_t)poly->pixels); printf("Conflicts: %d resolved, %d total\n", resolved, conflicts); - printf("Units: %5d used, %5d allocated, %5d waits, %4d bytes each, %7d total\n", poly->unit_max, poly->unit_count, poly->unit_waits, poly->unit_size, poly->unit_count * poly->unit_size); - printf("Polygons: %5d used, %5d allocated, %5d waits, %4d bytes each, %7d total\n", poly->polygon_max, poly->polygon_count, poly->polygon_waits, poly->polygon_size, poly->polygon_count * poly->polygon_size); - printf("Extra data: %5d used, %5d allocated, %5d waits, %4d bytes each, %7d total\n", poly->extra_max, poly->extra_count, poly->extra_waits, poly->extra_size, poly->extra_count * poly->extra_size); + printf("Units: %5d used, %5d allocated, %5d waits, %4d bytes each, %7d total\n", poly->unit_max, poly->unit_count, poly->unit_waits, (u32) poly->unit_size, poly->unit_count * (u32) poly->unit_size); + printf("Polygons: %5d used, %5d allocated, %5d waits, %4d bytes each, %7d total\n", poly->polygon_max, poly->polygon_count, poly->polygon_waits, (u32) poly->polygon_size, poly->polygon_count * (u32) poly->polygon_size); + printf("Extra data: %5d used, %5d allocated, %5d waits, %4d bytes each, %7d total\n", poly->extra_max, poly->extra_count, poly->extra_waits, (u32) poly->extra_size, poly->extra_count * (u32) poly->extra_size); } #endif @@ -452,7 +452,7 @@ void *poly_get_extra_data(legacy_poly_manager *poly) /* return a pointer to the extra data for the next item */ #if KEEP_STATISTICS - poly->extra_max = MAX(poly->extra_max, poly->extra_next + 1); + poly->extra_max = std::max(poly->extra_max, poly->extra_next + 1); #endif return poly->extra[poly->extra_next++]; } @@ -596,7 +596,7 @@ uint32_t poly_render_triangle(legacy_poly_manager *poly, void *dest, const recta } } #if KEEP_STATISTICS - poly->unit_max = MAX(poly->unit_max, poly->unit_next); + poly->unit_max = std::max(poly->unit_max, poly->unit_next); #endif /* compute parameter starting points and deltas */ @@ -740,7 +740,7 @@ uint32_t poly_render_triangle_custom(legacy_poly_manager *poly, void *dest, cons } } #if KEEP_STATISTICS - poly->unit_max = MAX(poly->unit_max, poly->unit_next); + poly->unit_max = std::max(poly->unit_max, poly->unit_next); #endif /* enqueue the work items */ @@ -965,7 +965,7 @@ uint32_t poly_render_quad(legacy_poly_manager *poly, void *dest, const rectangle } } #if KEEP_STATISTICS - poly->unit_max = MAX(poly->unit_max, poly->unit_next); + poly->unit_max = std::max(poly->unit_max, poly->unit_next); #endif /* enqueue the work items */ @@ -1197,7 +1197,7 @@ uint32_t poly_render_polygon(legacy_poly_manager *poly, void *dest, const rectan } } #if KEEP_STATISTICS - poly->unit_max = MAX(poly->unit_max, poly->unit_next); + poly->unit_max = std::max(poly->unit_max, poly->unit_next); #endif /* enqueue the work items */ -- cgit v1.2.3 From 30d56887568c2dc7c252a6ff8044af6ab05f9bc9 Mon Sep 17 00:00:00 2001 From: Ted Green Date: Wed, 8 Jul 2020 07:55:34 -0600 Subject: validity.cpp: Added checks for bilinear filter vector routines --- src/emu/validity.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index 093ee5f4ebf..dd836cdccac 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -560,8 +560,6 @@ void validity_checker::validate_rgb() scale2_add_and_clamp(const rgbaint_t&, const rgbaint_t&, const rgbaint_t&) scale_add_and_clamp(const rgbaint_t&, const rgbaint_t&); scale_imm_add_and_clamp(const s32, const rgbaint_t&); - static bilinear_filter(u32, u32, u32, u32, u8, u8) - bilinear_filter_rgbaint(u32, u32, u32, u32, u8, u8) */ auto random_i32_nolimit = [this] @@ -1392,6 +1390,62 @@ void validity_checker::validate_rgb() rgb.set(actual_a, actual_r, actual_g, actual_b); rgb.cmplt_imm_rgba(actual_a + 1, std::numeric_limits::min(), std::numeric_limits::max(), actual_b); check_expected("rgbaint_t::cmplt_imm_rgba"); + + // test bilinear_filter and bilinear_filter_rgbaint + // SSE implementation carries more internal precision between the bilinear stages +#if (!defined(MAME_DEBUG) || defined(__OPTIMIZE__)) && (defined(__SSE2__) || defined(_MSC_VER)) && defined(PTR64) + const int first_shift = 1; +#else + const int first_shift = 8; +#endif + for (int index = 0; index < 1000; index++) + { + u8 u, v; + rgbaint_t rgb_point[4]; + u32 top_row, bottom_row; + + for (int i = 0; i < 4; i++) + { + rgb_point[i].set(random_u32()); + } + + switch (index) + { + case 0: u = 0; v = 0; break; + case 1: u = 255; v = 255; break; + case 2: u = 0; v = 255; break; + case 3: u = 255; v = 0; break; + case 4: u = 128; v = 128; break; + case 5: u = 63; v = 32; break; + default: + u = random_u32() & 0xff; + v = random_u32() & 0xff; + break; + } + + top_row = (rgb_point[0].get_a() * (256 - u) + rgb_point[1].get_a() * u) >> first_shift; + bottom_row = (rgb_point[2].get_a() * (256 - u) + rgb_point[3].get_a() * u) >> first_shift; + expected_a = (top_row * (256 - v) + bottom_row * v) >> (16 - first_shift); + + top_row = (rgb_point[0].get_r() * (256 - u) + rgb_point[1].get_r() * u) >> first_shift; + bottom_row = (rgb_point[2].get_r() * (256 - u) + rgb_point[3].get_r() * u) >> first_shift; + expected_r = (top_row * (256 - v) + bottom_row * v) >> (16 - first_shift); + + top_row = (rgb_point[0].get_g() * (256 - u) + rgb_point[1].get_g() * u) >> first_shift; + bottom_row = (rgb_point[2].get_g() * (256 - u) + rgb_point[3].get_g() * u) >> first_shift; + expected_g = (top_row * (256 - v) + bottom_row * v) >> (16 - first_shift); + + top_row = (rgb_point[0].get_b() * (256 - u) + rgb_point[1].get_b() * u) >> first_shift; + bottom_row = (rgb_point[2].get_b() * (256 - u) + rgb_point[3].get_b() * u) >> first_shift; + expected_b = (top_row * (256 - v) + bottom_row * v) >> (16 - first_shift); + + imm = rgbaint_t::bilinear_filter(rgb_point[0].to_rgba(), rgb_point[1].to_rgba(), rgb_point[2].to_rgba(), rgb_point[3].to_rgba(), u, v); + rgb.set(imm); + check_expected("rgbaint_t::bilinear_filter"); + + rgb.bilinear_filter_rgbaint(rgb_point[0].to_rgba(), rgb_point[1].to_rgba(), rgb_point[2].to_rgba(), rgb_point[3].to_rgba(), u, v); + check_expected("rgbaint_t::bilinear_filter_rgbaint"); + } } -- cgit v1.2.3 From db0ac057181541798dbe61b01c736c1d7f327c70 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 9 Jul 2020 00:05:46 +1000 Subject: orion, partner, radio86, mikrosha, apogee: small cleanup ondra: fixed bug, updated xml. --- hash/ondra.xml | 36 +++--- src/mame/drivers/apogee.cpp | 126 ++++++++++++--------- src/mame/drivers/mikrosha.cpp | 119 ++++++++++---------- src/mame/drivers/ondra.cpp | 10 +- src/mame/drivers/orion.cpp | 163 ++++++++++++++------------- src/mame/drivers/partner.cpp | 88 ++++++++------- src/mame/drivers/radio86.cpp | 255 +++++++++++++++++++++--------------------- src/mame/includes/orion.h | 28 ++--- src/mame/includes/partner.h | 36 +++--- src/mame/includes/radio86.h | 121 ++++++++++---------- src/mame/machine/ondra.cpp | 1 + src/mame/machine/orion.cpp | 94 +++++++--------- src/mame/machine/partner.cpp | 198 +++++++++++++++++--------------- src/mame/machine/radio86.cpp | 137 +++++++++++------------ 14 files changed, 735 insertions(+), 677 deletions(-) diff --git a/hash/ondra.xml b/hash/ondra.xml index a2ea581af8e..cce6d5f31fb 100644 --- a/hash/ondra.xml +++ b/hash/ondra.xml @@ -2,14 +2,18 @@ - COPYFILE + Copyfile Utility 19?? <unknown> - + @@ -18,10 +22,10 @@ license:CC0 - EDITASM + Microsoft Editor/Assembler 10.0 19?? <unknown> - + @@ -33,7 +37,7 @@ license:CC0 GALAXIANS 19?? <unknown> - + @@ -42,10 +46,10 @@ license:CC0 - JETPAC + Jetpac 19?? <unknown> - + @@ -54,10 +58,10 @@ license:CC0 - JETSETWILLY + Jet Set Willy 19?? <unknown> - + @@ -69,7 +73,7 @@ license:CC0 KAREL 19?? <unknown> - + @@ -78,10 +82,10 @@ license:CC0 - MIKOS + MIKOS v0.5 19?? <unknown> - + @@ -90,10 +94,10 @@ license:CC0 - PASCAL + Hisoft Pascal System 19?? <unknown> - + @@ -105,7 +109,7 @@ license:CC0 PLANETOIDS 19?? <unknown> - + @@ -117,7 +121,7 @@ license:CC0 PSSST 19?? <unknown> - + diff --git a/src/mame/drivers/apogee.cpp b/src/mame/drivers/apogee.cpp index d07816386a9..e89e0ba03b0 100644 --- a/src/mame/drivers/apogee.cpp +++ b/src/mame/drivers/apogee.cpp @@ -13,13 +13,10 @@ #include "includes/radio86.h" #include "cpu/i8085/i8085.h" -#include "imagedev/cassette.h" -#include "machine/i8255.h" #include "machine/pit8253.h" #include "sound/spkrdev.h" #include "screen.h" -#include "softlist.h" #include "speaker.h" #include "formats/rk_cas.h" @@ -45,21 +42,22 @@ private: I8275_DRAW_CHARACTER_MEMBER(display_pixels); required_device m_speaker; - void apogee_mem(address_map &map); + void mem_map(address_map &map); + void machine_reset() override; + void machine_start() override; }; /* Address maps */ -void apogee_state::apogee_mem(address_map &map) +void apogee_state::mem_map(address_map &map) { - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0xebff).ram(); // RAM - map(0xec00, 0xec03).rw("pit8253", FUNC(pit8253_device::read), FUNC(pit8253_device::write)).mirror(0x00fc); - map(0xed00, 0xed03).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); - //map(0xee00, 0xee03).rw("ppi8255_2", FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); - map(0xef00, 0xef01).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x00fe); // video - map(0xf000, 0xf0ff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf000, 0xffff).rom(); // System ROM + map(0x0000, 0xebff).ram().share("mainram"); + map(0xec00, 0xec03).rw("pit", FUNC(pit8253_device::read), FUNC(pit8253_device::write)).mirror(0x00fc); + map(0xed00, 0xed03).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); + //map(0xee00, 0xee03).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); + map(0xef00, 0xef01).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x00fe); // video + map(0xf000, 0xf0ff).w(m_dma, FUNC(i8257_device::write)); // DMA + map(0xf000, 0xffff).rom().region("maincpu",0); // System ROM } /* Input ports */ @@ -175,23 +173,50 @@ WRITE_LINE_MEMBER(apogee_state::pit8253_out2_changed) m_speaker->level_w(m_out0+m_out1+m_out2); } +void apogee_state::machine_reset() +{ + address_space &program = m_maincpu->space(AS_PROGRAM); + program.install_rom(0x0000, 0x0fff, m_rom+0x0800); // do it here for F3 + m_rom_shadow_tap = program.install_read_tap(0xf000, 0xffff, "rom_shadow_r",[this](offs_t offset, u8 &data, u8 mem_mask) + { + if (!machine().side_effects_disabled()) + { + // delete this tap + m_rom_shadow_tap->remove(); + + // reinstall ram over the rom shadow + m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x0fff, m_ram); + } + + // return the original data + return data; + }); +} + +void apogee_state::machine_start() +{ + save_item(NAME(m_tape_value)); + save_item(NAME(m_out0)); + save_item(NAME(m_out1)); + save_item(NAME(m_out2)); +} + I8275_DRAW_CHARACTER_MEMBER(apogee_state::display_pixels) { rgb_t const *const palette = m_palette->palette()->entry_list_raw(); - uint8_t const *const charmap = &m_charmap[(gpa & 1) * 0x400]; + uint8_t const *const charmap = &m_chargen[(gpa & 1) * 0x400]; uint8_t pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; - if (vsp) { + if (vsp) pixels = 0; - } - if (lten) { + + if (lten) pixels = 0xff; - } - if (rvv) { + + if (rvv) pixels ^= 0xff; - } - for(int i=0;i<6;i++) { + + for(int i=0;i<6;i++) bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0]; - } } /* F4 Character Displayer */ @@ -209,7 +234,7 @@ static const gfx_layout apogee_charlayout = }; static GFXDECODE_START( gfx_apogee ) - GFXDECODE_ENTRY( "gfx1", 0x0000, apogee_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "chargen", 0x0000, apogee_charlayout, 0, 1 ) GFXDECODE_END @@ -218,32 +243,32 @@ void apogee_state::apogee(machine_config &config) { /* basic machine hardware */ I8080(config, m_maincpu, XTAL(16'000'000) / 9); - m_maincpu->set_addrmap(AS_PROGRAM, &apogee_state::apogee_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &apogee_state::mem_map); - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); - pit8253.set_clk<0>(XTAL(16'000'000)/9); - pit8253.out_handler<0>().set(FUNC(apogee_state::pit8253_out0_changed)); - pit8253.set_clk<1>(XTAL(16'000'000)/9); - pit8253.out_handler<1>().set(FUNC(apogee_state::pit8253_out1_changed)); - pit8253.set_clk<2>(XTAL(16'000'000)/9); - pit8253.out_handler<2>().set(FUNC(apogee_state::pit8253_out2_changed)); + pit8253_device &pit(PIT8253(config, "pit", 0)); + pit.set_clk<0>(XTAL(16'000'000)/9); + pit.out_handler<0>().set(FUNC(apogee_state::pit8253_out0_changed)); + pit.set_clk<1>(XTAL(16'000'000)/9); + pit.out_handler<1>().set(FUNC(apogee_state::pit8253_out1_changed)); + pit.set_clk<2>(XTAL(16'000'000)/9); + pit.out_handler<2>().set(FUNC(apogee_state::pit8253_out2_changed)); - I8255(config, m_ppi8255_1); - m_ppi8255_1->out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - m_ppi8255_1->in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - m_ppi8255_1->in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - m_ppi8255_1->out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255(config, m_ppi1); + m_ppi1->out_pa_callback().set(FUNC(apogee_state::radio86_8255_porta_w2)); + m_ppi1->in_pb_callback().set(FUNC(apogee_state::radio86_8255_portb_r2)); + m_ppi1->in_pc_callback().set(FUNC(apogee_state::radio86_8255_portc_r2)); + m_ppi1->out_pc_callback().set(FUNC(apogee_state::radio86_8255_portc_w2)); - //I8255(config, "ppi8255_2"); + //I8255(config, m_ppi2); - i8275_device &i8275(I8275(config, "i8275", XTAL(16'000'000) / 12)); + i8275_device &i8275(I8275(config, "crtc", XTAL(16'000'000) / 12)); i8275.set_character_width(6); i8275.set_display_callback(FUNC(apogee_state::display_pixels)); - i8275.drq_wr_callback().set(m_dma8257, FUNC(i8257_device::dreq2_w)); + i8275.drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_screen_update("i8275", FUNC(i8275_device::screen_update)); + screen.set_screen_update("crtc", FUNC(i8275_device::screen_update)); screen.set_refresh_hz(50); screen.set_size(78*6, 30*10); screen.set_visarea(0, 78*6-1, 0, 30*10-1); @@ -256,12 +281,12 @@ void apogee_state::apogee(machine_config &config) m_speaker->set_levels(4, speaker_levels); m_speaker->add_route(ALL_OUTPUTS, "mono", 0.75); - I8257(config, m_dma8257, XTAL(16'000'000) / 9); - m_dma8257->out_hrq_cb().set(FUNC(radio86_state::hrq_w)); - m_dma8257->in_memr_cb().set(FUNC(radio86_state::memory_read_byte)); - m_dma8257->out_memw_cb().set(FUNC(radio86_state::memory_write_byte)); - m_dma8257->out_iow_cb<2>().set("i8275", FUNC(i8275_device::dack_w)); - m_dma8257->set_reverse_rw_mode(1); + I8257(config, m_dma, XTAL(16'000'000) / 9); + m_dma->out_hrq_cb().set(FUNC(apogee_state::hrq_w)); + m_dma->in_memr_cb().set(FUNC(apogee_state::memory_read_byte)); + m_dma->out_memw_cb().set(FUNC(apogee_state::memory_write_byte)); + m_dma->out_iow_cb<2>().set("crtc", FUNC(i8275_device::dack_w)); + m_dma->set_reverse_rw_mode(1); CASSETTE(config, m_cassette); m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); @@ -274,13 +299,14 @@ void apogee_state::apogee(machine_config &config) /* ROM definition */ ROM_START( apogee ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "apogee.rom", 0xf000, 0x1000, CRC(a47383a7) SHA1(6a868371c7980f92c2fc9ced921517209f197375)) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "apogee.rom", 0x0000, 0x1000, CRC(a47383a7) SHA1(6a868371c7980f92c2fc9ced921517209f197375)) + + ROM_REGION(0x0800, "chargen",0) ROM_LOAD ("apogee.fnt", 0x0000, 0x0800, CRC(fe5867f0) SHA1(82c5aca63ada5e4533eb0516384aaa7b77a1f8e2)) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1989, apogee, radio86, 0, apogee, apogee, apogee_state, init_radio86, "Zavod BRA", "Apogee BK-01", 0 ) +COMP( 1989, apogee, radio86, 0, apogee, apogee, apogee_state, init_radio86, "Zavod BRA", "Apogee BK-01", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/mikrosha.cpp b/src/mame/drivers/mikrosha.cpp index 4c2c9d9a396..6660e81c278 100644 --- a/src/mame/drivers/mikrosha.cpp +++ b/src/mame/drivers/mikrosha.cpp @@ -12,12 +12,9 @@ #include "includes/radio86.h" #include "cpu/i8085/i8085.h" -#include "imagedev/cassette.h" -#include "machine/i8255.h" #include "machine/pit8253.h" #include "screen.h" -#include "softlist.h" #include "speaker.h" #include "formats/rk_cas.h" @@ -36,10 +33,11 @@ private: void mikrosha_8255_font_page_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(mikrosha_pit_out2); I8275_DRAW_CHARACTER_MEMBER(display_pixels); - virtual void machine_reset() override; + void machine_reset() override; + void machine_start() override; - void mikrosha_io(address_map &map); - void mikrosha_mem(address_map &map); + void io_map(address_map &map); + void mem_map(address_map &map); uint8_t m_mikrosha_font_page; }; @@ -52,20 +50,18 @@ void mikrosha_state::machine_reset() } /* Address maps */ -void mikrosha_state::mikrosha_mem(address_map &map) +void mikrosha_state::mem_map(address_map &map) { - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0x7fff).ram(); // RAM - map(0xc000, 0xc003).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x07fc); - map(0xc800, 0xc803).rw(m_ppi8255_2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x07fc); - map(0xd000, 0xd001).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x07fe); // video - map(0xd800, 0xd803).rw("pit8253", FUNC(pit8253_device::read), FUNC(pit8253_device::write)).mirror(0x07fc); // Timer + map(0x0000, 0x7fff).ram().share("mainram"); // RAM + map(0xc000, 0xc003).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x07fc); + map(0xc800, 0xc803).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x07fc); + map(0xd000, 0xd001).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x07fe); // video + map(0xd800, 0xd803).rw("pit", FUNC(pit8253_device::read), FUNC(pit8253_device::write)).mirror(0x07fc); // Timer map(0xe000, 0xf7ff).r(FUNC(mikrosha_state::radio_cpu_state_r)); // Not connected - map(0xf800, 0xffff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf800, 0xffff).rom(); // System ROM + map(0xf800, 0xffff).rom().region("maincpu",0).w(m_dma, FUNC(i8257_device::write)); // DMA } -void mikrosha_state::mikrosha_io(address_map &map) +void mikrosha_state::io_map(address_map &map) { map.unmap_value_high(); map(0x00, 0xff).rw(FUNC(mikrosha_state::radio_io_r), FUNC(mikrosha_state::radio_io_w)); @@ -173,23 +169,28 @@ WRITE_LINE_MEMBER(mikrosha_state::mikrosha_pit_out2) { } +void mikrosha_state::machine_start() +{ + save_item(NAME(m_tape_value)); + save_item(NAME(m_mikrosha_font_page)); +} + I8275_DRAW_CHARACTER_MEMBER(mikrosha_state::display_pixels) { rgb_t const *const palette = m_palette->palette()->entry_list_raw(); - uint8_t const *const charmap = &m_charmap[(m_mikrosha_font_page & 1) * 0x400]; + uint8_t const *const charmap = &m_chargen[(m_mikrosha_font_page & 1) * 0x400]; uint8_t pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; - if (vsp) { + if (vsp) pixels = 0; - } - if (lten) { + + if (lten) pixels = 0xff; - } - if (rvv) { + + if (rvv) pixels ^= 0xff; - } - for(int i=0;i<6;i++) { + + for(int i=0;i<6;i++) bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0]; - } } /* F4 Character Displayer */ @@ -207,40 +208,40 @@ static const gfx_layout mikrosha_charlayout = }; static GFXDECODE_START( gfx_mikrosha ) - GFXDECODE_ENTRY( "gfx1", 0x0000, mikrosha_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "chargen", 0x0000, mikrosha_charlayout, 0, 1 ) GFXDECODE_END void mikrosha_state::mikrosha(machine_config &config) { /* basic machine hardware */ I8080(config, m_maincpu, XTAL(16'000'000) / 9); - m_maincpu->set_addrmap(AS_PROGRAM, &mikrosha_state::mikrosha_mem); - m_maincpu->set_addrmap(AS_IO, &mikrosha_state::mikrosha_io); + m_maincpu->set_addrmap(AS_PROGRAM, &mikrosha_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &mikrosha_state::io_map); - I8255(config, m_ppi8255_1); - m_ppi8255_1->in_pa_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - m_ppi8255_1->out_pb_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - m_ppi8255_1->in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - m_ppi8255_1->out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255(config, m_ppi1); + m_ppi1->in_pa_callback().set(FUNC(mikrosha_state::radio86_8255_portb_r2)); + m_ppi1->out_pb_callback().set(FUNC(mikrosha_state::radio86_8255_porta_w2)); + m_ppi1->in_pc_callback().set(FUNC(mikrosha_state::radio86_8255_portc_r2)); + m_ppi1->out_pc_callback().set(FUNC(mikrosha_state::radio86_8255_portc_w2)); - I8255(config, m_ppi8255_2); - m_ppi8255_2->out_pb_callback().set(FUNC(mikrosha_state::mikrosha_8255_font_page_w)); - m_ppi8255_2->tri_pb_callback().set_constant(0); + I8255(config, m_ppi2); + m_ppi2->out_pb_callback().set(FUNC(mikrosha_state::mikrosha_8255_font_page_w)); + m_ppi2->tri_pb_callback().set_constant(0); - i8275_device &i8275(I8275(config, "i8275", XTAL(16'000'000) / 12)); + i8275_device &i8275(I8275(config, "crtc", XTAL(16'000'000) / 12)); i8275.set_character_width(6); i8275.set_display_callback(FUNC(mikrosha_state::display_pixels)); - i8275.drq_wr_callback().set(m_dma8257, FUNC(i8257_device::dreq2_w)); + i8275.drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w)); - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); - pit8253.set_clk<0>(0); - pit8253.set_clk<1>(0); - pit8253.set_clk<2>(2000000); - pit8253.out_handler<2>().set(FUNC(mikrosha_state::mikrosha_pit_out2)); + pit8253_device &pit(PIT8253(config, "pit", 0)); + pit.set_clk<0>(0); + pit.set_clk<1>(0); + pit.set_clk<2>(2000000); + pit.out_handler<2>().set(FUNC(mikrosha_state::mikrosha_pit_out2)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_screen_update("i8275", FUNC(i8275_device::screen_update)); + screen.set_screen_update("crtc", FUNC(i8275_device::screen_update)); screen.set_refresh_hz(50); screen.set_size(78*6, 30*10); screen.set_visarea(0, 78*6-1, 0, 30*10-1); @@ -250,12 +251,12 @@ void mikrosha_state::mikrosha(machine_config &config) SPEAKER(config, "mono").front_center(); - I8257(config, m_dma8257, XTAL(16'000'000) / 9); - m_dma8257->out_hrq_cb().set(FUNC(radio86_state::hrq_w)); - m_dma8257->in_memr_cb().set(FUNC(radio86_state::memory_read_byte)); - m_dma8257->out_memw_cb().set(FUNC(radio86_state::memory_write_byte)); - m_dma8257->out_iow_cb<2>().set("i8275", FUNC(i8275_device::dack_w)); - m_dma8257->set_reverse_rw_mode(1); + I8257(config, m_dma, XTAL(16'000'000) / 9); + m_dma->out_hrq_cb().set(FUNC(mikrosha_state::hrq_w)); + m_dma->in_memr_cb().set(FUNC(mikrosha_state::memory_read_byte)); + m_dma->out_memw_cb().set(FUNC(mikrosha_state::memory_write_byte)); + m_dma->out_iow_cb<2>().set("crtc", FUNC(i8275_device::dack_w)); + m_dma->set_reverse_rw_mode(1); CASSETTE(config, m_cassette); m_cassette->set_formats(rkm_cassette_formats); @@ -272,21 +273,23 @@ void mikrosha_state::mikrosha(machine_config &config) /* ROM definition */ ROM_START( mikrosha ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "mikrosha.rom", 0xf800, 0x0800, CRC(86a83556) SHA1(94b1baad0a419145939a891ff51f4324e8e4ddd2)) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x0800, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD( "mikrosha.rom", 0x0000, 0x0800, CRC(86a83556) SHA1(94b1baad0a419145939a891ff51f4324e8e4ddd2)) + + ROM_REGION(0x0800, "chargen",0) ROM_LOAD ("mikrosha.fnt", 0x0000, 0x0800, CRC(b315da1c) SHA1(b5bf9abc0fff75b1aba709a7f08b23d4a89bb04b)) ROM_END ROM_START( m86rk ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "m86rk.bin", 0xf800, 0x0800, CRC(a898d77a) SHA1(c2497bf8434b5028fe0a9fc09be311465d5553a5)) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x0800, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD( "m86rk.bin", 0x0000, 0x0800, CRC(a898d77a) SHA1(c2497bf8434b5028fe0a9fc09be311465d5553a5)) + + ROM_REGION(0x0800, "chargen",0) /* here should probably be different rom */ ROM_LOAD ("mikrosha.fnt", 0x0000, 0x0800, CRC(b315da1c) SHA1(b5bf9abc0fff75b1aba709a7f08b23d4a89bb04b)) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1987, mikrosha, radio86, 0, mikrosha, mikrosha, mikrosha_state, init_radio86, "Lianozovo Electromechanical Factory", "Mikrosha", 0) -COMP( 1987, m86rk, radio86, 0, mikrosha, mikrosha, mikrosha_state, init_radio86, "", "Mikrosha-86RK", 0) +COMP( 1987, mikrosha, radio86, 0, mikrosha, mikrosha, mikrosha_state, init_radio86, "Lianozovo Electromechanical Factory", "Mikrosha", MACHINE_SUPPORTS_SAVE ) +COMP( 1987, m86rk, radio86, 0, mikrosha, mikrosha, mikrosha_state, init_radio86, "", "Mikrosha-86RK", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ondra.cpp b/src/mame/drivers/ondra.cpp index 947043689ec..aed29ede721 100644 --- a/src/mame/drivers/ondra.cpp +++ b/src/mame/drivers/ondra.cpp @@ -16,9 +16,11 @@ ToDo: - Sound is a speaker connected to a multivibrator circuit. There are 3 diodes from this circuit to allow a choice of 7 frequencies. We have used a buzzer with selected arbitrary frequencies, not having any idea what they should be. -- Ondrav doesn't seem to accept any commands, only producing KOD 1 followed - by halt. You have to press Esc before trying again. -- Cassette not working. Doesn't load from softlist, and don't know how to save. +- Ondrav: can load from softlist. Load the tape then press Enter. +- Ondrav: doesn't seem to accept any other commands, need instructions. + You have to press Esc before trying again. +- Ondrat: Doesn't load from softlist +- Cassette: don't know how to save. ******************************************************************************/ @@ -35,7 +37,7 @@ ToDo: void ondra_state::mem_map(address_map &map) { map(0x0000, 0x3fff).bankrw("bank1"); - map(0x4000, 0xdfff).ram(); + map(0x4000, 0xdfff).bankrw("bank2"); map(0xe000, 0xffff).bankrw("bank3"); } diff --git a/src/mame/drivers/orion.cpp b/src/mame/drivers/orion.cpp index 94cdec70b03..97cbd7eac7d 100644 --- a/src/mame/drivers/orion.cpp +++ b/src/mame/drivers/orion.cpp @@ -2,10 +2,19 @@ // copyright-holders:Miodrag Milanovic /*************************************************************************** - Orion driver by Miodrag Milanovic +Orion driver by Miodrag Milanovic - 22/04/2008 Orion Pro added - 02/04/2008 Preliminary driver. +2008-04-02 Preliminary driver. +2008-04-22 Orion Pro added + +Orionide and orionidm produce ERROR at start, not sure why. The others +appear to function well, as long as you use the romdisk software item. +You can load tapes with the CH4 program which is found on the romdisk. + +Orionpro has its own menu. If you choose Orion Pro, you need to have the +cpm370 disk in the drive. If you choose Orion 128, you need the romdisk. + +It's unknown how to create a tape. ****************************************************************************/ @@ -13,9 +22,7 @@ #include "emu.h" #include "includes/orion.h" -#include "imagedev/cassette.h" #include "screen.h" -#include "softlist.h" #include "speaker.h" #include "formats/smx_dsk.h" @@ -25,7 +32,7 @@ /* Address maps */ /* Orion 128 */ -void orion_state::orion128_mem(address_map &map) +void orion_state::mem_map(address_map &map) { map(0x0000, 0xefff).bankrw("bank1"); map(0xf000, 0xf3ff).bankrw("bank2"); @@ -39,7 +46,7 @@ void orion_state::orion128_mem(address_map &map) } /* Orion Z80 Card II */ -void orion_state::orion128_io(address_map &map) +void orion_state::io_map(address_map &map) { map.global_mask(0xff); map.unmap_value_high(); @@ -48,7 +55,7 @@ void orion_state::orion128_io(address_map &map) map(0xfa, 0xfa).w(FUNC(orion_state::orion128_video_page_w)); } -void orion_state::orionz80_mem(address_map &map) +void orion_z80_state::mem_map(address_map &map) { map.unmap_value_high(); map(0x0000, 0x3fff).bankrw("bank1"); @@ -59,12 +66,12 @@ void orion_state::orionz80_mem(address_map &map) } /* Orion Pro */ -void orion_state::orionz80_io(address_map &map) +void orion_z80_state::io_map(address_map &map) { - map(0x0000, 0xffff).rw(FUNC(orion_state::orionz80_io_r), FUNC(orion_state::orionz80_io_w)); + map(0x0000, 0xffff).rw(FUNC(orion_z80_state::orionz80_io_r), FUNC(orion_z80_state::orionz80_io_w)); } -void orion_state::orionpro_mem(address_map &map) +void orion_pro_state::mem_map(address_map &map) { map.unmap_value_high(); map(0x0000, 0x1fff).bankrw("bank1"); @@ -77,9 +84,9 @@ void orion_state::orionpro_mem(address_map &map) map(0xf800, 0xffff).bankrw("bank8"); } -void orion_state::orionpro_io(address_map &map) +void orion_pro_state::io_map(address_map &map) { - map(0x0000, 0xffff).rw(FUNC(orion_state::orionpro_io_r), FUNC(orion_state::orionpro_io_w)); + map(0x0000, 0xffff).rw(FUNC(orion_pro_state::orionpro_io_r), FUNC(orion_pro_state::orionpro_io_w)); } FLOPPY_FORMATS_MEMBER( orion_state::orion_floppy_formats ) @@ -90,19 +97,19 @@ FLOPPY_FORMATS_END void orion_state::orion128(machine_config &config) { I8080(config, m_maincpu, 2000000); - m_maincpu->set_addrmap(AS_PROGRAM, &orion_state::orion128_mem); - m_maincpu->set_addrmap(AS_IO, &orion_state::orion128_io); + m_maincpu->set_addrmap(AS_PROGRAM, &orion_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &orion_state::io_map); - auto &ppi1(I8255A(config, "ppi8255_1")); - ppi1.in_pa_callback().set(FUNC(orion_state::orion_romdisk_porta_r)); - ppi1.out_pb_callback().set(FUNC(orion_state::orion_romdisk_portb_w)); - ppi1.out_pc_callback().set(FUNC(orion_state::orion_romdisk_portc_w)); + I8255A(config, m_ppi1); + m_ppi1->in_pa_callback().set(FUNC(orion_state::orion_romdisk_porta_r)); + m_ppi1->out_pb_callback().set(FUNC(orion_state::orion_romdisk_portb_w)); + m_ppi1->out_pc_callback().set(FUNC(orion_state::orion_romdisk_portc_w)); - auto &ppi2(I8255A(config, "ppi8255_2")); - ppi2.out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - ppi2.in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - ppi2.in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - ppi2.out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255A(config, m_ppi2); + m_ppi2->out_pa_callback().set(FUNC(orion_state::radio86_8255_porta_w2)); + m_ppi2->in_pb_callback().set(FUNC(orion_state::radio86_8255_portb_r2)); + m_ppi2->in_pc_callback().set(FUNC(orion_state::radio86_8255_portc_r2)); + m_ppi2->out_pc_callback().set(FUNC(orion_state::radio86_8255_portc_w2)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -117,11 +124,11 @@ void orion_state::orion128(machine_config &config) SPEAKER(config, "mono").front_center(); - auto &cassette(CASSETTE(config, "cassette")); - cassette.set_formats(rko_cassette_formats); - cassette.set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); - cassette.add_route(ALL_OUTPUTS, "mono", 0.05); - cassette.set_interface("orion_cass"); + CASSETTE(config, m_cassette); + m_cassette->set_formats(rko_cassette_formats); + m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); + m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cassette->set_interface("orion_cass"); SOFTWARE_LIST(config, "cass_list").set_original("orion_cass"); @@ -148,31 +155,31 @@ void orion_state::orion128(machine_config &config) void orion_state::orion128ms(machine_config &config) { orion128(config); - auto &ppi2(I8255A(config.replace(), "ppi8255_2")); - ppi2.out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - ppi2.in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - ppi2.in_pc_callback().set(FUNC(radio86_state::rk7007_8255_portc_r)); - ppi2.out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255A(config.replace(), m_ppi2); + m_ppi2->out_pa_callback().set(FUNC(orion_state::radio86_8255_porta_w2)); + m_ppi2->in_pb_callback().set(FUNC(orion_state::radio86_8255_portb_r2)); + m_ppi2->in_pc_callback().set(FUNC(orion_state::rk7007_8255_portc_r)); + m_ppi2->out_pc_callback().set(FUNC(orion_state::radio86_8255_portc_w2)); } void orion_z80_state::orionz80(machine_config &config) { Z80(config, m_maincpu, 2500000); - m_maincpu->set_addrmap(AS_PROGRAM, &orion_z80_state::orionz80_mem); - m_maincpu->set_addrmap(AS_IO, &orion_z80_state::orionz80_io); + m_maincpu->set_addrmap(AS_PROGRAM, &orion_z80_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &orion_z80_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(orion_z80_state::orionz80_interrupt)); - auto &ppi1(I8255A(config, "ppi8255_1")); - ppi1.in_pa_callback().set(FUNC(orion_z80_state::orion_romdisk_porta_r)); - ppi1.out_pb_callback().set(FUNC(orion_z80_state::orion_romdisk_portb_w)); - ppi1.out_pc_callback().set(FUNC(orion_z80_state::orion_romdisk_portc_w)); + I8255A(config, m_ppi1); + m_ppi1->in_pa_callback().set(FUNC(orion_z80_state::orion_romdisk_porta_r)); + m_ppi1->out_pb_callback().set(FUNC(orion_z80_state::orion_romdisk_portb_w)); + m_ppi1->out_pc_callback().set(FUNC(orion_z80_state::orion_romdisk_portc_w)); - auto &ppi2(I8255A(config, "ppi8255_2")); - ppi2.out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - ppi2.in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - ppi2.in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - ppi2.out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255A(config, m_ppi2); + m_ppi2->out_pa_callback().set(FUNC(orion_z80_state::radio86_8255_porta_w2)); + m_ppi2->in_pb_callback().set(FUNC(orion_z80_state::radio86_8255_portb_r2)); + m_ppi2->in_pc_callback().set(FUNC(orion_z80_state::radio86_8255_portc_r2)); + m_ppi2->out_pc_callback().set(FUNC(orion_z80_state::radio86_8255_portc_w2)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -193,11 +200,11 @@ void orion_z80_state::orionz80(machine_config &config) auto &ay8912(AY8912(config, "ay8912", 1773400)); ay8912.add_route(ALL_OUTPUTS, "mono", 1.00); - auto &cassette(CASSETTE(config, "cassette")); - cassette.set_formats(rko_cassette_formats); - cassette.set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); - cassette.add_route(ALL_OUTPUTS, "mono", 0.05); - cassette.set_interface("orion_cass"); + CASSETTE(config, m_cassette); + m_cassette->set_formats(rko_cassette_formats); + m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); + m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cassette->set_interface("orion_cass"); SOFTWARE_LIST(config, "cass_list").set_original("orion_cass"); @@ -225,29 +232,29 @@ void orion_z80_state::orionz80ms(machine_config &config) { orionz80(config); - auto &ppi2(I8255A(config.replace(), "ppi8255_2")); - ppi2.out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - ppi2.in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - ppi2.in_pc_callback().set(FUNC(radio86_state::rk7007_8255_portc_r)); - ppi2.out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255A(config.replace(), m_ppi2); + m_ppi2->out_pa_callback().set(FUNC(orion_z80_state::radio86_8255_porta_w2)); + m_ppi2->in_pb_callback().set(FUNC(orion_z80_state::radio86_8255_portb_r2)); + m_ppi2->in_pc_callback().set(FUNC(orion_z80_state::rk7007_8255_portc_r)); + m_ppi2->out_pc_callback().set(FUNC(orion_z80_state::radio86_8255_portc_w2)); } void orion_pro_state::orionpro(machine_config &config) { Z80(config, m_maincpu, 5000000); - m_maincpu->set_addrmap(AS_PROGRAM, &orion_pro_state::orionpro_mem); - m_maincpu->set_addrmap(AS_IO, &orion_pro_state::orionpro_io); + m_maincpu->set_addrmap(AS_PROGRAM, &orion_pro_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &orion_pro_state::io_map); - auto &ppi1(I8255A(config, "ppi8255_1")); - ppi1.in_pa_callback().set(FUNC(orion_pro_state::orion_romdisk_porta_r)); - ppi1.out_pb_callback().set(FUNC(orion_pro_state::orion_romdisk_portb_w)); - ppi1.out_pc_callback().set(FUNC(orion_pro_state::orion_romdisk_portc_w)); + I8255A(config, m_ppi1); + m_ppi1->in_pa_callback().set(FUNC(orion_pro_state::orion_romdisk_porta_r)); + m_ppi1->out_pb_callback().set(FUNC(orion_pro_state::orion_romdisk_portb_w)); + m_ppi1->out_pc_callback().set(FUNC(orion_pro_state::orion_romdisk_portc_w)); - auto &ppi2(I8255A(config, "ppi8255_2")); - ppi2.out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - ppi2.in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - ppi2.in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - ppi2.out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255A(config, m_ppi2); + m_ppi2->out_pa_callback().set(FUNC(orion_pro_state::radio86_8255_porta_w2)); + m_ppi2->in_pb_callback().set(FUNC(orion_pro_state::radio86_8255_portb_r2)); + m_ppi2->in_pc_callback().set(FUNC(orion_pro_state::radio86_8255_portc_r2)); + m_ppi2->out_pc_callback().set(FUNC(orion_pro_state::radio86_8255_portc_w2)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -265,11 +272,11 @@ void orion_pro_state::orionpro(machine_config &config) auto &ay8912(AY8912(config, "ay8912", 1773400)); ay8912.add_route(ALL_OUTPUTS, "mono", 1.00); - auto &cassette(CASSETTE(config, "cassette")); - cassette.set_formats(rko_cassette_formats); - cassette.set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); - cassette.add_route(ALL_OUTPUTS, "mono", 0.05); - cassette.set_interface("orion_cass"); + CASSETTE(config, m_cassette); + m_cassette->set_formats(rko_cassette_formats); + m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); + m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cassette->set_interface("orion_cass"); SOFTWARE_LIST(config, "cass_list").set_original("orion_cass"); @@ -361,10 +368,10 @@ ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1990, orion128, 0, 0, orion128, radio86, orion_state, empty_init, "", "Orion 128", 0 ) -COMP( 1990, orionms, orion128, 0, orion128ms, ms7007, orion_state, empty_init, "", "Orion 128 (MS7007)", 0 ) -COMP( 1990, orionz80, orion128, 0, orionz80, radio86, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II", 0 ) -COMP( 1990, orionide, orion128, 0, orionz80, radio86, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II + IDE", 0 ) -COMP( 1990, orionzms, orion128, 0, orionz80ms, ms7007, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II (MS7007)", 0 ) -COMP( 1990, orionidm, orion128, 0, orionz80ms, ms7007, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II + IDE (MS7007)", 0 ) -COMP( 1994, orionpro, orion128, 0, orionpro, radio86, orion_pro_state, empty_init, "", "Orion Pro", 0 ) +COMP( 1990, orion128, 0, 0, orion128, radio86, orion_state, empty_init, "", "Orion 128", MACHINE_SUPPORTS_SAVE ) +COMP( 1990, orionms, orion128, 0, orion128ms, ms7007, orion_state, empty_init, "", "Orion 128 (MS7007)", MACHINE_SUPPORTS_SAVE ) +COMP( 1990, orionz80, orion128, 0, orionz80, radio86, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II", MACHINE_SUPPORTS_SAVE ) +COMP( 1990, orionide, orion128, 0, orionz80, radio86, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II + IDE", MACHINE_SUPPORTS_SAVE ) +COMP( 1990, orionzms, orion128, 0, orionz80ms, ms7007, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II (MS7007)", MACHINE_SUPPORTS_SAVE ) +COMP( 1990, orionidm, orion128, 0, orionz80ms, ms7007, orion_z80_state, empty_init, "", "Orion 128 + Z80 Card II + IDE (MS7007)", MACHINE_SUPPORTS_SAVE ) +COMP( 1994, orionpro, orion128, 0, orionpro, radio86, orion_pro_state, empty_init, "", "Orion Pro", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/partner.cpp b/src/mame/drivers/partner.cpp index 2d361699bb0..442e019c79f 100644 --- a/src/mame/drivers/partner.cpp +++ b/src/mame/drivers/partner.cpp @@ -2,9 +2,15 @@ // copyright-holders:Miodrag Milanovic /*************************************************************************** - Partner driver by Miodrag Milanovic +Partner driver by Miodrag Milanovic - 09/06/2008 Preliminary driver. +2008-06-09 Preliminary driver. + +Works well with cassette. Need to find out how to access the built-in +rom programs. Also need to find out how to access floppy disks, including +those in the softlist. + +Cursor is one position too far to the right. ****************************************************************************/ @@ -13,10 +19,7 @@ #include "includes/partner.h" #include "cpu/i8085/i8085.h" -#include "imagedev/cassette.h" - #include "screen.h" -#include "softlist.h" #include "speaker.h" #include "formats/rk_cas.h" @@ -24,7 +27,7 @@ /* Address maps */ -void partner_state::partner_mem(address_map &map) +void partner_state::mem_map(address_map &map) { map(0x0000, 0x07ff).bankrw("bank1"); map(0x0800, 0x3fff).bankrw("bank2"); @@ -36,12 +39,12 @@ void partner_state::partner_mem(address_map &map) map(0xc000, 0xc7ff).bankrw("bank8"); map(0xc800, 0xcfff).bankrw("bank9"); map(0xd000, 0xd7ff).bankrw("bank10"); - map(0xd800, 0xd8ff).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)); // video - map(0xd900, 0xd9ff).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0xda00, 0xdaff).w(FUNC(partner_state::partner_mem_page_w)); - map(0xdb00, 0xdbff).w(m_dma8257, FUNC(i8257_device::write)); // DMA + map(0xd800, 0xd8ff).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)); + map(0xd900, 0xd9ff).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0xda00, 0xdaff).w(FUNC(partner_state::mem_page_w)); + map(0xdb00, 0xdbff).w(m_dma, FUNC(i8257_device::write)); map(0xdc00, 0xddff).bankrw("bank11"); - map(0xde00, 0xdeff).w(FUNC(partner_state::partner_win_memory_page_w)); + map(0xde00, 0xdeff).w(FUNC(partner_state::win_memory_page_w)); map(0xe000, 0xe7ff).bankrw("bank12"); map(0xe800, 0xffff).bankrw("bank13"); } @@ -145,7 +148,7 @@ FLOPPY_FORMATS_MEMBER( partner_state::floppy_formats ) FLOPPY_FORMATS_END /* F4 Character Displayer */ -static const gfx_layout partner_charlayout = +static const gfx_layout charlayout = { 8, 8, /* 8 x 8 characters */ 512, /* 512 characters */ @@ -159,7 +162,7 @@ static const gfx_layout partner_charlayout = }; static GFXDECODE_START( gfx_partner ) - GFXDECODE_ENTRY( "gfx1", 0x0000, partner_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 ) GFXDECODE_END @@ -167,22 +170,22 @@ void partner_state::partner(machine_config &config) { /* basic machine hardware */ I8080(config, m_maincpu, 16_MHz_XTAL / 9); - m_maincpu->set_addrmap(AS_PROGRAM, &partner_state::partner_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &partner_state::mem_map); - auto &ppi1(I8255(config, "ppi8255_1")); - ppi1.out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - ppi1.in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - ppi1.in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - ppi1.out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255(config, m_ppi1); + m_ppi1->out_pa_callback().set(FUNC(partner_state::radio86_8255_porta_w2)); + m_ppi1->in_pb_callback().set(FUNC(partner_state::radio86_8255_portb_r2)); + m_ppi1->in_pc_callback().set(FUNC(partner_state::radio86_8255_portc_r2)); + m_ppi1->out_pc_callback().set(FUNC(partner_state::radio86_8255_portc_w2)); - auto &i8275(I8275(config, "i8275", 16_MHz_XTAL / 12)); + auto &i8275(I8275(config, "crtc", 16_MHz_XTAL / 12)); i8275.set_character_width(6); i8275.set_display_callback(FUNC(partner_state::display_pixels)); - i8275.drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w)); + i8275.drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w)); /* video hardware */ auto &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_screen_update("i8275", FUNC(i8275_device::screen_update)); + screen.set_screen_update("crtc", FUNC(i8275_device::screen_update)); screen.set_refresh_hz(50); screen.set_size(78*6, 30*10); screen.set_visarea(0, 78*6-1, 0, 30*10-1); @@ -192,14 +195,14 @@ void partner_state::partner(machine_config &config) SPEAKER(config, "mono").front_center(); - auto &dma8257(I8257(config, "dma8257", 16_MHz_XTAL / 9)); - dma8257.out_hrq_cb().set(FUNC(partner_state::hrq_w)); - dma8257.in_memr_cb().set(FUNC(partner_state::memory_read_byte)); - dma8257.out_memw_cb().set(FUNC(partner_state::memory_write_byte)); - dma8257.in_ior_cb<0>().set("wd1793", FUNC(fd1793_device::data_r)); - dma8257.out_iow_cb<0>().set("wd1793", FUNC(fd1793_device::data_w)); - dma8257.out_iow_cb<2>().set("i8275", FUNC(i8275_device::dack_w)); - dma8257.set_reverse_rw_mode(true); + I8257(config, m_dma, 16_MHz_XTAL / 9); + m_dma->out_hrq_cb().set(FUNC(partner_state::hrq_w)); + m_dma->in_memr_cb().set(FUNC(partner_state::memory_read_byte)); + m_dma->out_memw_cb().set(FUNC(partner_state::memory_write_byte)); + m_dma->in_ior_cb<0>().set("fdc", FUNC(fd1793_device::data_r)); + m_dma->out_iow_cb<0>().set("fdc", FUNC(fd1793_device::data_w)); + m_dma->out_iow_cb<2>().set("crtc", FUNC(i8275_device::dack_w)); + m_dma->set_reverse_rw_mode(true); auto &cassette(CASSETTE(config, "cassette")); cassette.set_formats(rkp_cassette_formats); @@ -209,10 +212,10 @@ void partner_state::partner(machine_config &config) SOFTWARE_LIST(config, "cass_list").set_original("partner_cass"); - FD1793(config, "wd1793", 16_MHz_XTAL / 16); + FD1793(config, "fdc", 16_MHz_XTAL / 16); - FLOPPY_CONNECTOR(config, "fd0", "525qd", FLOPPY_525_QD, true, floppy_formats); - FLOPPY_CONNECTOR(config, "fd1", "525qd", FLOPPY_525_QD, true, floppy_formats); + FLOPPY_CONNECTOR(config, "fd0", "525qd", FLOPPY_525_QD, true, floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fd1", "525qd", FLOPPY_525_QD, true, floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("partner_flop"); @@ -224,16 +227,17 @@ void partner_state::partner(machine_config &config) /* ROM definition */ ROM_START( partner ) - ROM_REGION( 0x1A000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "partner.rom", 0x10000, 0x2000, CRC(be1eaa10) SHA1(f9658d8055bf434240ec020d7892ea98cb5cbb76)) - ROM_LOAD( "basic.rom", 0x12000, 0x2000, CRC(1e9be0ec) SHA1(2c431f487cffddaac8413efddfc0527ad595f03b)) - ROM_LOAD( "mcpg.rom", 0x14000, 0x0800, CRC(3401225c) SHA1(6c252393ee73ed1a53d3e583547d86ab6718a533)) - ROM_LOAD( "fdd.rom", 0x16000, 0x0800, CRC(8ca350b5) SHA1(76fc92298726fb2840f4c19d7edc860d1ed86356)) - ROM_LOAD( "font.rom", 0x18000, 0x2000, CRC(dc4f1723) SHA1(6b8d5efb403cf0aeb3fd3197a0529d23c8e2f93c)) - ROM_REGION(0x2000, "gfx1",0) - ROM_LOAD ("partner.fnt", 0x0000, 0x2000, CRC(2705f726) SHA1(3d7b33901ef098a405d7ddad924ba9677f6a9b15)) + ROM_REGION( 0xA000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD( "partner.rom", 0x0000, 0x2000, CRC(be1eaa10) SHA1(f9658d8055bf434240ec020d7892ea98cb5cbb76)) + ROM_LOAD( "basic.rom", 0x2000, 0x2000, CRC(1e9be0ec) SHA1(2c431f487cffddaac8413efddfc0527ad595f03b)) + ROM_LOAD( "mcpg.rom", 0x4000, 0x0800, CRC(3401225c) SHA1(6c252393ee73ed1a53d3e583547d86ab6718a533)) + ROM_LOAD( "fdd.rom", 0x6000, 0x0800, CRC(8ca350b5) SHA1(76fc92298726fb2840f4c19d7edc860d1ed86356)) + ROM_LOAD( "font.rom", 0x8000, 0x2000, CRC(dc4f1723) SHA1(6b8d5efb403cf0aeb3fd3197a0529d23c8e2f93c)) + + ROM_REGION(0x2000, "chargen",0) + ROM_LOAD ("partner.d25", 0x0000, 0x2000, CRC(2705f726) SHA1(3d7b33901ef098a405d7ddad924ba9677f6a9b15)) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1987, partner, radio86, 0, partner, partner, partner_state, init_partner, "SAM SKB VM", "Partner-01.01", MACHINE_NOT_WORKING ) +COMP( 1987, partner, radio86, 0, partner, partner, partner_state, init_partner, "SAM SKB VM", "Partner-01.01", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/radio86.cpp b/src/mame/drivers/radio86.cpp index 6203769d5ab..81588e076c0 100644 --- a/src/mame/drivers/radio86.cpp +++ b/src/mame/drivers/radio86.cpp @@ -11,13 +11,8 @@ #include "emu.h" #include "includes/radio86.h" - #include "cpu/i8085/i8085.h" -#include "imagedev/cassette.h" -#include "machine/i8255.h" - #include "screen.h" -#include "softlist.h" #include "speaker.h" #include "formats/rk_cas.h" @@ -26,13 +21,12 @@ /* Address maps */ void radio86_state::radio86_mem(address_map &map) { - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0x7fff).ram(); // RAM - map(0x8000, 0x8003).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); - //map(0xa000, 0xa003).rw(m_ppi8255_2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); - map(0xc000, 0xc001).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video - map(0xe000, 0xffff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf000, 0xffff).rom(); // System ROM + map(0x0000, 0x7fff).ram().share("mainram"); + map(0x8000, 0x8003).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); + //map(0xa000, 0xa003).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); + map(0xc000, 0xc001).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video + map(0xe000, 0xffff).w(m_dma, FUNC(i8257_device::write)); // DMA + map(0xf000, 0xffff).rom().region("maincpu",0); // System ROM } void radio86_state::radio86_io(address_map &map) @@ -49,63 +43,58 @@ void radio86_state::rk7007_io(address_map &map) void radio86_state::radio86rom_mem(address_map &map) { - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0x7fff).ram(); // RAM - map(0x8000, 0x8003).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); - map(0xa000, 0xa003).rw(m_ppi8255_2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); - map(0xc000, 0xc001).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video - map(0xe000, 0xffff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf000, 0xffff).rom(); // System ROM + map(0x0000, 0x7fff).ram().share("mainram"); + map(0x8000, 0x8003).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); + map(0xa000, 0xa003).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); + map(0xc000, 0xc001).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video + map(0xe000, 0xffff).w(m_dma, FUNC(i8257_device::write)); // DMA + map(0xf000, 0xffff).rom().region("maincpu",0); // System ROM } void radio86_state::radio86ram_mem(address_map &map) { - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0xdfff).ram(); // RAM + map(0x0000, 0xdfff).ram().share("mainram"); map(0xe000, 0xe7ff).rom(); // System ROM page 2 map(0xe800, 0xf5ff).ram(); // RAM - map(0xf700, 0xf703).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0xf780, 0xf7bf).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)); // video - map(0xf684, 0xf687).rw(m_ppi8255_2, FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0xf700, 0xf703).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0xf780, 0xf7bf).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)); // video + map(0xf684, 0xf687).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0xf688, 0xf688).w(FUNC(radio86_state::radio86_pagesel)); - map(0xf800, 0xffff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf800, 0xffff).rom(); // System ROM page 1 + map(0xf800, 0xffff).w(m_dma, FUNC(i8257_device::write)); // DMA + map(0xf800, 0xffff).rom().region("maincpu",0); // System ROM page 1 } void radio86_state::radio86_16_mem(address_map &map) { map.unmap_value_high(); - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0x3fff).ram(); // RAM + map(0x0000, 0x3fff).ram().share("mainram"); map(0x4000, 0x7fff).r(FUNC(radio86_state::radio_cpu_state_r)); - map(0x8000, 0x8003).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); - //map(0xa000, 0xa003).rw(m_ppi8255_2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); - map(0xc000, 0xc001).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video - map(0xe000, 0xffff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf000, 0xffff).rom(); // System ROM + map(0x8000, 0x8003).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); + //map(0xa000, 0xa003).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); + map(0xc000, 0xc001).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video + map(0xe000, 0xffff).w(m_dma, FUNC(i8257_device::write)); // DMA + map(0xf000, 0xffff).rom().region("maincpu",0); // System ROM } void radio86_state::mikron2_mem(address_map &map) { - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0x7fff).ram(); // RAM - map(0xc000, 0xc003).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); - //map(0xc100, 0xc103).rw(m_ppi8255_2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); - map(0xc200, 0xc201).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x00fe); // video - map(0xc300, 0xc3ff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf000, 0xffff).rom(); // System ROM + map(0x0000, 0x7fff).ram().share("mainram"); + map(0xc000, 0xc003).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); + //map(0xc100, 0xc103).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x00fc); + map(0xc200, 0xc201).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x00fe); // video + map(0xc300, 0xc3ff).w(m_dma, FUNC(i8257_device::write)); // DMA + map(0xf000, 0xffff).rom().region("maincpu",0); // System ROM } void radio86_state::impuls03_mem(address_map &map) { - map(0x0000, 0x0fff).bankrw("bank1"); // First bank - map(0x1000, 0x7fff).ram(); // RAM - map(0x8000, 0x8003).rw(m_ppi8255_1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); - map(0xa000, 0xbfff).rom(); // Basic ROM - map(0xc000, 0xc001).rw("i8275", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video - map(0xe000, 0xffff).w(m_dma8257, FUNC(i8257_device::write)); // DMA - map(0xf000, 0xffff).rom(); // System ROM + map(0x0000, 0x7fff).ram().share("mainram"); + map(0x8000, 0x8003).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)).mirror(0x1ffc); + map(0xa000, 0xbfff).rom().region("maincpu",0x1000); // Basic ROM + map(0xc000, 0xc001).rw("crtc", FUNC(i8275_device::read), FUNC(i8275_device::write)).mirror(0x1ffe); // video + map(0xe000, 0xffff).w(m_dma, FUNC(i8257_device::write)); // DMA + map(0xf000, 0xffff).rom().region("maincpu",0); // System ROM } /* Input ports */ @@ -456,7 +445,7 @@ static const gfx_layout radio86_charlayout = }; static GFXDECODE_START( gfx_radio86 ) - GFXDECODE_ENTRY( "gfx1", 0x0000, radio86_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "chargen", 0x0000, radio86_charlayout, 0, 1 ) GFXDECODE_END @@ -468,32 +457,32 @@ void radio86_state::radio86(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &radio86_state::radio86_mem); m_maincpu->set_addrmap(AS_IO, &radio86_state::radio86_io); - I8255(config, m_ppi8255_1); - m_ppi8255_1->out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - m_ppi8255_1->in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); - m_ppi8255_1->in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - m_ppi8255_1->out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + I8255(config, m_ppi1); + m_ppi1->out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); + m_ppi1->in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2)); + m_ppi1->in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); + m_ppi1->out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); - i8275_device &crtc(I8275(config, "i8275", XTAL(16'000'000) / 12)); + i8275_device &crtc(I8275(config, "crtc", XTAL(16'000'000) / 12)); crtc.set_character_width(6); crtc.set_display_callback(FUNC(radio86_state::display_pixels)); - crtc.drq_wr_callback().set(m_dma8257, FUNC(i8257_device::dreq2_w)); + crtc.drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_screen_update("i8275", FUNC(i8275_device::screen_update)); + screen.set_screen_update("crtc", FUNC(i8275_device::screen_update)); screen.set_raw(XTAL(16'000'000) / 2, 516, 0, 78*6, 310, 0, 30*10); GFXDECODE(config, "gfxdecode", m_palette, gfx_radio86); PALETTE(config, m_palette, FUNC(radio86_state::radio86_palette), 3); SPEAKER(config, "mono").front_center(); - I8257(config, m_dma8257, XTAL(16'000'000) / 9); - m_dma8257->out_hrq_cb().set(FUNC(radio86_state::hrq_w)); - m_dma8257->in_memr_cb().set(FUNC(radio86_state::memory_read_byte)); - m_dma8257->out_memw_cb().set(FUNC(radio86_state::memory_write_byte)); - m_dma8257->out_iow_cb<2>().set("i8275", FUNC(i8275_device::dack_w)); - m_dma8257->set_reverse_rw_mode(1); + I8257(config, m_dma, XTAL(16'000'000) / 9); + m_dma->out_hrq_cb().set(FUNC(radio86_state::hrq_w)); + m_dma->in_memr_cb().set(FUNC(radio86_state::memory_read_byte)); + m_dma->out_memw_cb().set(FUNC(radio86_state::memory_write_byte)); + m_dma->out_iow_cb<2>().set("crtc", FUNC(i8275_device::dack_w)); + m_dma->set_reverse_rw_mode(1); CASSETTE(config, m_cassette); m_cassette->set_formats(rkr_cassette_formats); @@ -510,10 +499,10 @@ void radio86_state::kr03(machine_config &config) radio86(config); /* basic machine hardware */ - m_ppi8255_1->out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); - m_ppi8255_1->in_pb_callback().set(FUNC(radio86_state::kr03_8255_portb_r2)); - m_ppi8255_1->in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); - m_ppi8255_1->out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); + m_ppi1->out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2)); + m_ppi1->in_pb_callback().set(FUNC(radio86_state::kr03_8255_portb_r2)); + m_ppi1->in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); + m_ppi1->out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); } void radio86_state::radio16(machine_config &config) @@ -529,10 +518,10 @@ void radio86_state::radiorom(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &radio86_state::radio86rom_mem); - I8255(config, m_ppi8255_2); - m_ppi8255_2->in_pa_callback().set(FUNC(radio86_state::radio86rom_romdisk_porta_r)); - m_ppi8255_2->out_pb_callback().set(FUNC(radio86_state::radio86_romdisk_portb_w)); - m_ppi8255_2->out_pc_callback().set(FUNC(radio86_state::radio86_romdisk_portc_w)); + I8255(config, m_ppi2); + m_ppi2->in_pa_callback().set(FUNC(radio86_state::radio86rom_romdisk_porta_r)); + m_ppi2->out_pb_callback().set(FUNC(radio86_state::radio86_romdisk_portb_w)); + m_ppi2->out_pc_callback().set(FUNC(radio86_state::radio86_romdisk_portc_w)); GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "radio86_cart", "bin,rom"); @@ -545,10 +534,10 @@ void radio86_state::radioram(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &radio86_state::radio86ram_mem); - I8255(config, m_ppi8255_2); - m_ppi8255_2->in_pa_callback().set(FUNC(radio86_state::radio86ram_romdisk_porta_r)); - m_ppi8255_2->out_pb_callback().set(FUNC(radio86_state::radio86_romdisk_portb_w)); - m_ppi8255_2->out_pc_callback().set(FUNC(radio86_state::radio86_romdisk_portc_w)); + I8255(config, m_ppi2); + m_ppi2->in_pa_callback().set(FUNC(radio86_state::radio86ram_romdisk_porta_r)); + m_ppi2->out_pb_callback().set(FUNC(radio86_state::radio86_romdisk_portb_w)); + m_ppi2->out_pc_callback().set(FUNC(radio86_state::radio86_romdisk_portc_w)); } void radio86_state::rk7007(machine_config &config) @@ -593,107 +582,119 @@ void radio86_state::impuls03(machine_config &config) /* ROM definition */ ROM_START( radio86 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "bios.rom", 0xf800, 0x0800, CRC(bf1ceea5) SHA1(8f3d472203e550e9854dd79e1f44628635581ed0)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "bios.rom", 0x0800, 0x0800, CRC(bf1ceea5) SHA1(8f3d472203e550e9854dd79e1f44628635581ed0)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( radio4k ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "bios4k.rom", 0xf000, 0x1000, CRC(2ac9d864) SHA1(296716c6cddc9dd31d500ba421aa807c45757cfd)) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "bios4k.rom", 0x0000, 0x1000, CRC(2ac9d864) SHA1(296716c6cddc9dd31d500ba421aa807c45757cfd)) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( spektr01 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "spektr001.rom", 0xf800, 0x0800, CRC(5a38e6d5) SHA1(799c3bbe2a9f08f3aba55379cc093329048350ff)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "spektr001.rom", 0x0800, 0x0800, CRC(5a38e6d5) SHA1(799c3bbe2a9f08f3aba55379cc093329048350ff)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION(0x0800, "chargen",0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( radio16 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "rk86.16k", 0xf800, 0x0800, CRC(fd8a4caf) SHA1(90d6af571049a7c8748eac03541e921eac3f70c5)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "rk86.16k", 0x0800, 0x0800, CRC(fd8a4caf) SHA1(90d6af571049a7c8748eac03541e921eac3f70c5)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( radiorom ) ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF ) ROM_SYSTEM_BIOS(0, "32k", "32 KB rom disk") - ROMX_LOAD( "radiorom.rom", 0xf800, 0x0800, CRC(b5cdeab7) SHA1(1c80d72082f2fb2190b575726cb82d86ae0ee7d8), ROM_BIOS(0)) + ROMX_LOAD( "radiorom.rom", 0x0800, 0x0800, CRC(b5cdeab7) SHA1(1c80d72082f2fb2190b575726cb82d86ae0ee7d8), ROM_BIOS(0)) ROM_SYSTEM_BIOS(1, "64k", "64 KB rom disk") - ROMX_LOAD( "radiorom.64", 0xf800, 0x0800, CRC(5250b927) SHA1(e885e0f5b2325190b38a4c92b20a8b4fa78fbd8f), ROM_BIOS(1)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROMX_LOAD( "radiorom.64", 0x0800, 0x0800, CRC(5250b927) SHA1(e885e0f5b2325190b38a4c92b20a8b4fa78fbd8f), ROM_BIOS(1)) + ROM_COPY( "maincpu", 0x0800, 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( radioram ) ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "r86-1.bin", 0xf800, 0x0800, CRC(7e7ab7cb) SHA1(fedb00b6b8fbe1167faba3e4611b483f800e6934)) + ROM_LOAD( "r86-1.bin", 0x0800, 0x0800, CRC(7e7ab7cb) SHA1(fedb00b6b8fbe1167faba3e4611b483f800e6934)) + ROM_RELOAD( 0x0000, 0x0800 ) ROM_LOAD( "r86-2.bin", 0xe000, 0x0800, CRC(955f0616) SHA1(d2b9f960558bdcb60074091fc79d1ad56c313586)) ROM_LOAD( "romdisk.bin", 0x10000, 0x10000, CRC(43c0279b) SHA1(bc1dfd9bdbce39460616e2158f5d96279d0af3cf)) - ROM_REGION(0x0800, "gfx1",0) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( rk7007 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "ms7007.rom", 0xf800, 0x0800, CRC(002811dc) SHA1(4529eb72198c49af77fbcd7833bcd06a1cf9b1ac)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "ms7007.rom", 0x0800, 0x0800, CRC(002811dc) SHA1(4529eb72198c49af77fbcd7833bcd06a1cf9b1ac)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( rk700716 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "ms7007.16k", 0xf800, 0x0800, CRC(5268d7b6) SHA1(efd69d8456b8cf8b37f33237153c659725608528)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "ms7007.16k", 0x0800, 0x0800, CRC(5268d7b6) SHA1(efd69d8456b8cf8b37f33237153c659725608528)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( mikron2 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "mikron2.bin", 0xf800, 0x0800, CRC(2cd79bb4) SHA1(501df47e65aaa8f4ce27751bc2a7e7089e2e888c)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "mikron2.bin", 0x0800, 0x0800, CRC(2cd79bb4) SHA1(501df47e65aaa8f4ce27751bc2a7e7089e2e888c)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END ROM_START( kr03 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "kr03-dd17.rf2", 0xf800, 0x0800, CRC(ac2e24d5) SHA1(a1317a261bfd55b3b37109b14d1391308dee04de)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "kr03-dd17.rf2", 0x0800, 0x0800, CRC(ac2e24d5) SHA1(a1317a261bfd55b3b37109b14d1391308dee04de)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("kr03-dd12.rf2", 0x0000, 0x0800, CRC(085f4259) SHA1(11c5829b072a00961ad936c26559fb63bf2dc896)) ROM_END ROM_START( impuls03 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "imp03bas.rom", 0xa000, 0x2000, CRC(b13b2de4) SHA1(9af8c49d72ca257bc34cad3c62e530730929702e)) - ROM_LOAD( "imp03mon.rom", 0xf800, 0x0800, CRC(8c591ce4) SHA1(8e8e9cba6b3123d74218b92f4b4210606ba53376)) - ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 ) - ROM_REGION(0x0800, "gfx1",0) + ROM_REGION( 0x3000, "maincpu", 0 ) + ROM_LOAD( "imp03bas.rom", 0x1000, 0x2000, CRC(b13b2de4) SHA1(9af8c49d72ca257bc34cad3c62e530730929702e)) + ROM_LOAD( "imp03mon.rom", 0x0800, 0x0800, CRC(8c591ce4) SHA1(8e8e9cba6b3123d74218b92f4b4210606ba53376)) + ROM_RELOAD( 0x0000, 0x0800 ) + + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1986, radio86, 0, 0, radio86, radio86, radio86_state, init_radio86, "", "Radio-86RK", 0 ) -COMP( 1986, radio16, radio86, 0, radio16, radio86, radio86_state, init_radio86, "", "Radio-86RK (16K RAM)", 0 ) -COMP( 1986, kr03, radio86, 0, kr03, kr03, radio86_state, init_radio86, "Elektronika", "KR-03", 0 ) -COMP( 1986, radio4k, radio86, 0, radio86, radio86, radio86_state, init_radio86, "", "Radio-86RK (4K ROM)", 0 ) -COMP( 1986, radiorom, radio86, 0, radiorom, radio86, radio86_state, init_radio86, "", "Radio-86RK (ROM-Disk)", 0 ) -COMP( 1986, radioram, radio86, 0, radioram, radio86, radio86_state, init_radioram, "", "Radio-86RK (ROM/RAM Disk)", 0 ) -COMP( 1986, spektr01, radio86, 0, radio86, radio86, radio86_state, init_radio86, "", "Spektr-001", 0 ) -COMP( 1986, rk7007, radio86, 0, rk7007, ms7007, radio86_state, init_radio86, "", "Radio-86RK (MS7007)", 0 ) -COMP( 1986, rk700716, radio86, 0, rk700716, ms7007, radio86_state, init_radio86, "", "Radio-86RK (MS7007 16K RAM)", 0 ) -COMP( 1986, mikron2, radio86, 0, mikron2, radio86, radio86_state, init_radio86, "", "Mikron-2", 0 ) -COMP( 1986, impuls03, radio86, 0, impuls03, radio86, radio86_state, init_radio86, "", "Impuls-03", 0 ) +COMP( 1986, radio86, 0, 0, radio86, radio86, radio86_state, init_radio86, "", "Radio-86RK", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, radio16, radio86, 0, radio16, radio86, radio86_state, init_radio86, "", "Radio-86RK (16K RAM)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, kr03, radio86, 0, kr03, kr03, radio86_state, init_radio86, "Elektronika", "KR-03", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, radio4k, radio86, 0, radio86, radio86, radio86_state, init_radio86, "", "Radio-86RK (4K ROM)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, radiorom, radio86, 0, radiorom, radio86, radio86_state, init_radio86, "", "Radio-86RK (ROM-Disk)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, radioram, radio86, 0, radioram, radio86, radio86_state, init_radioram, "", "Radio-86RK (ROM/RAM Disk)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, spektr01, radio86, 0, radio86, radio86, radio86_state, init_radio86, "", "Spektr-001", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, rk7007, radio86, 0, rk7007, ms7007, radio86_state, init_radio86, "", "Radio-86RK (MS7007)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, rk700716, radio86, 0, rk700716, ms7007, radio86_state, init_radio86, "", "Radio-86RK (MS7007 16K RAM)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, mikron2, radio86, 0, mikron2, radio86, radio86_state, init_radio86, "", "Mikron-2", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, impuls03, radio86, 0, impuls03, radio86, radio86_state, init_radio86, "", "Impuls-03", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/orion.h b/src/mame/includes/orion.h index c179261033a..95921bd82e7 100644 --- a/src/mame/includes/orion.h +++ b/src/mame/includes/orion.h @@ -86,13 +86,7 @@ protected: void orion_romdisk_portb_w(uint8_t data); void orion_romdisk_portc_w(uint8_t data); DECLARE_FLOPPY_FORMATS( orion_floppy_formats ); - - void orion128_io(address_map &map); - void orion128_mem(address_map &map); - void orionpro_io(address_map &map); - void orionpro_mem(address_map &map); - void orionz80_io(address_map &map); - void orionz80_mem(address_map &map); + void machine_start() override; uint8_t m_orion128_video_mode; uint8_t m_orion128_video_page; @@ -135,8 +129,11 @@ protected: void orionz80_switch_bank(); void orion_set_video_mode(int width); void orionpro_bank_switch(); - virtual void machine_start() override; - virtual void machine_reset() override; + +private: + void machine_reset() override; + void io_map(address_map &map); + void mem_map(address_map &map); }; class orion_z80_state : public orion_state @@ -149,9 +146,10 @@ public: void orionz80(machine_config &config); void orionz80ms(machine_config &config); -protected: - virtual void machine_start() override; - virtual void machine_reset() override; +private: + void machine_reset() override; + void io_map(address_map &map); + void mem_map(address_map &map); }; class orion_pro_state : public orion_state @@ -163,8 +161,10 @@ public: void orionpro(machine_config &config); -protected: - virtual void machine_reset() override; +private: + void machine_reset() override; + void io_map(address_map &map); + void mem_map(address_map &map); }; #endif // MAME_INCLUDES_ORION_H diff --git a/src/mame/includes/partner.h b/src/mame/includes/partner.h index ee315670c22..d64851b99b3 100644 --- a/src/mame/includes/partner.h +++ b/src/mame/includes/partner.h @@ -24,37 +24,39 @@ public: partner_state(const machine_config &mconfig, device_type type, const char *tag) : radio86_state(mconfig, type, tag) , m_ram(*this, RAM_TAG) - , m_fdc(*this, "wd1793") + , m_fdc(*this, "fdc") , m_bank(*this, "bank%u", 1U) - { - } + { } - uint8_t partner_floppy_r(offs_t offset); - void partner_floppy_w(offs_t offset, uint8_t data); - void partner_win_memory_page_w(uint8_t data); - void partner_mem_page_w(uint8_t data); void init_partner(); + void partner(machine_config &config); + +private: + u8 floppy_r(offs_t offset); + void floppy_w(offs_t offset, u8 data); + void win_memory_page_w(u8 data); + void mem_page_w(u8 data); I8275_DRAW_CHARACTER_MEMBER(display_pixels); DECLARE_FLOPPY_FORMATS( floppy_formats ); - void partner(machine_config &config); - void partner_mem(address_map &map); -protected: - void partner_window_1(uint8_t bank_num, uint16_t offset,uint8_t *rom); - void partner_window_2(uint8_t bank_num, uint16_t offset,uint8_t *rom); - void partner_iomap_bank(uint8_t *rom); - void partner_bank_switch(); + void mem_map(address_map &map); + + void window_1(uint8_t bank_num, uint16_t offset,uint8_t *rom); + void window_2(uint8_t bank_num, uint16_t offset,uint8_t *rom); + void iomap_bank(uint8_t *rom); + void bank_switch(); - uint8_t m_mem_page; - uint8_t m_win_mem_page; + u8 m_mem_page; + u8 m_win_mem_page; required_device m_ram; required_device m_fdc; required_memory_bank_array<13> m_bank; - virtual void machine_reset() override; + void machine_reset() override; + void machine_start() override; }; diff --git a/src/mame/includes/radio86.h b/src/mame/includes/radio86.h index 3d323527a6a..958fe495ac4 100644 --- a/src/mame/includes/radio86.h +++ b/src/mame/includes/radio86.h @@ -22,56 +22,23 @@ class radio86_state : public driver_device { public: - enum - { - TIMER_RESET - }; - - radio86_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_dma8257(*this, "dma8257"), - m_ppi8255_1(*this, "ppi8255_1"), - m_ppi8255_2(*this, "ppi8255_2"), - m_region_maincpu(*this, "maincpu"), - m_bank1(*this, "bank1"), - m_io_line(*this, "LINE%u", 0), - m_io_cline(*this, "CLINE%u", 0), - m_palette(*this, "palette"), - m_charmap(*this, "gfx1") + radio86_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_cassette(*this, "cassette") + , m_cart(*this, "cartslot") + , m_dma(*this, "dma") + , m_ppi1(*this, "ppi1") + , m_ppi2(*this, "ppi2") + , m_rom(*this, "maincpu") + , m_ram(*this, "mainram") + , m_bank1(*this, "bank1") + , m_io_line(*this, "LINE%u", 0U) + , m_io_cline(*this, "CLINE%u", 0U) + , m_palette(*this, "palette") + , m_chargen(*this, "chargen") { } - uint8_t m_tape_value; - int m_keyboard_mask; - std::unique_ptr m_radio_ram_disk; - uint8_t m_romdisk_lsb; - uint8_t m_romdisk_msb; - uint8_t m_disk_sel; - uint8_t radio_cpu_state_r(); - uint8_t radio_io_r(offs_t offset); - void radio_io_w(offs_t offset, uint8_t data); - void radio86_pagesel(uint8_t data); - void init_radioram(); - void init_radio86(); - void radio86_palette(palette_device &palette) const; - uint8_t radio86_8255_portb_r2(); - uint8_t radio86_8255_portc_r2(); - void radio86_8255_porta_w2(uint8_t data); - void radio86_8255_portc_w2(uint8_t data); - uint8_t rk7007_8255_portc_r(); - uint8_t kr03_8255_portb_r2(); - void hrq_w(int state); - uint8_t radio86rom_romdisk_porta_r(); - uint8_t radio86ram_romdisk_porta_r(); - void radio86_romdisk_portb_w(uint8_t data); - void radio86_romdisk_portc_w(uint8_t data); - uint8_t memory_read_byte(offs_t offset); - void memory_write_byte(offs_t offset, uint8_t data); - I8275_DRAW_CHARACTER_MEMBER(display_pixels); - required_device m_maincpu; - void impuls03(machine_config &config); void mikron2(machine_config &config); void rk7007(machine_config &config); @@ -81,20 +48,14 @@ public: void radio16(machine_config &config); void radioram(machine_config &config); void kr03(machine_config &config); + void init_radioram(); + void init_radio86(); protected: - required_device m_cassette; - optional_device m_cart; // for ROMDisk - only Radio86K & Orion? - optional_device m_dma8257; - required_device m_ppi8255_1; - optional_device m_ppi8255_2; - required_memory_region m_region_maincpu; - required_memory_bank m_bank1; - required_ioport_array<9> m_io_line; - optional_ioport_array<8> m_io_cline; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual void machine_reset() override; + + void machine_reset() override; + void machine_start() override; void radio86_init_keyboard(); @@ -107,8 +68,48 @@ protected: void radio86rom_mem(address_map &map); void rk7007_io(address_map &map); + uint8_t m_tape_value; + uint8_t radio_cpu_state_r(); + uint8_t radio_io_r(offs_t offset); + void radio_io_w(offs_t offset, uint8_t data); + uint8_t radio86_8255_portb_r2(); + uint8_t radio86_8255_portc_r2(); + uint8_t rk7007_8255_portc_r(); + void radio86_8255_porta_w2(uint8_t data); + void radio86_8255_portc_w2(uint8_t data); + void radio86_palette(palette_device &palette) const; + void hrq_w(int state); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); + + memory_passthrough_handler *m_rom_shadow_tap; + required_device m_maincpu; + required_device m_cassette; + optional_device m_cart; // for ROMDisk - only Radio86K & Orion? + optional_device m_dma; + required_device m_ppi1; + optional_device m_ppi2; + required_region_ptr m_rom; + optional_shared_ptr m_ram; + optional_memory_bank m_bank1; + required_ioport_array<9> m_io_line; + optional_ioport_array<8> m_io_cline; required_device m_palette; - optional_region_ptr m_charmap; + optional_region_ptr m_chargen; + +private: + int m_keyboard_mask; + std::unique_ptr m_radio_ram_disk; + uint8_t m_romdisk_lsb; + uint8_t m_romdisk_msb; + uint8_t m_disk_sel; + void radio86_pagesel(uint8_t data); + uint8_t kr03_8255_portb_r2(); + uint8_t radio86rom_romdisk_porta_r(); + uint8_t radio86ram_romdisk_porta_r(); + void radio86_romdisk_portb_w(uint8_t data); + void radio86_romdisk_portc_w(uint8_t data); + I8275_DRAW_CHARACTER_MEMBER(display_pixels); }; diff --git a/src/mame/machine/ondra.cpp b/src/mame/machine/ondra.cpp index a525537b609..86af7833ba2 100644 --- a/src/mame/machine/ondra.cpp +++ b/src/mame/machine/ondra.cpp @@ -125,4 +125,5 @@ void ondra_state::machine_start() save_item(NAME(m_video_enable)); save_item(NAME(m_bank_status)); save_item(NAME(m_bank_old)); + membank("bank2")->set_base(m_ram->pointer() + 0x4000); } diff --git a/src/mame/machine/orion.cpp b/src/mame/machine/orion.cpp index 2f2f77109aa..d00112f6677 100644 --- a/src/mame/machine/orion.cpp +++ b/src/mame/machine/orion.cpp @@ -13,7 +13,6 @@ #include "emu.h" #include "includes/orion.h" -#include "imagedev/cassette.h" #include "screen.h" @@ -42,29 +41,24 @@ void orion_state::orion_romdisk_portc_w(uint8_t data) m_romdisk_msb = data; } -void orion_state::machine_start() -{ - m_video_mode_mask = 7; -} - uint8_t orion_state::orion128_system_r(offs_t offset) { - return m_ppi8255_2->read(offset & 3); + return m_ppi2->read(offset & 3); } void orion_state::orion128_system_w(offs_t offset, uint8_t data) { - m_ppi8255_2->write(offset & 3, data); + m_ppi2->write(offset & 3, data); } uint8_t orion_state::orion128_romdisk_r(offs_t offset) { - return m_ppi8255_1->read(offset & 3); + return m_ppi1->read(offset & 3); } void orion_state::orion128_romdisk_w(offs_t offset, uint8_t data) { - m_ppi8255_1->write(offset & 3, data); + m_ppi1->write(offset & 3, data); } void orion_state::orion_set_video_mode(int width) @@ -75,9 +69,9 @@ void orion_state::orion_set_video_mode(int width) void orion_state::orion128_video_mode_w(uint8_t data) { - if ((data & 0x80)!=(m_orion128_video_mode & 0x80)) + if (BIT(data, 7)!=BIT(m_orion128_video_mode, 7)) { - if ((data & 0x80)==0x80) + if (BIT(data, 7)) { if (m_video_mode_mask == 31) { @@ -104,9 +98,9 @@ void orion_state::orion128_video_page_w(uint8_t data) { if (m_orion128_video_page != data) { - if ((data & 0x80)!=(m_orion128_video_page & 0x80)) + if (BIT(data, 7)!=BIT(m_orion128_video_page, 7)) { - if ((data & 0x80)==0x80) + if (BIT(data, 7)) { if (m_video_mode_mask == 31) { @@ -141,16 +135,40 @@ void orion_state::orion128_memory_page_w(uint8_t data) void orion_state::machine_reset() { + m_video_mode_mask = 7; m_orion128_video_page = 0; m_orion128_video_mode = 0; m_orion128_memory_page = -1; - m_bank1->set_base(m_region_maincpu->base() + 0xf800); + m_bank1->set_base(m_rom + 0xf800); m_bank2->set_base(m_ram->pointer() + 0xf000); m_orion128_video_width = SCREEN_WIDTH_384; orion_set_video_mode(384); radio86_init_keyboard(); } +void orion_state::machine_start() +{ + save_item(NAME(m_tape_value)); + save_item(NAME(m_orion128_video_mode)); + save_item(NAME(m_orion128_video_page)); + save_item(NAME(m_orion128_video_width)); + save_item(NAME(m_video_mode_mask)); + save_item(NAME(m_orionpro_pseudo_color)); + save_item(NAME(m_romdisk_lsb)); + save_item(NAME(m_romdisk_msb)); + save_item(NAME(m_orion128_memory_page)); + save_item(NAME(m_orionz80_memory_page)); + save_item(NAME(m_orionz80_dispatcher)); + save_item(NAME(m_speaker_data)); + save_item(NAME(m_orionpro_ram0_segment)); + save_item(NAME(m_orionpro_ram1_segment)); + save_item(NAME(m_orionpro_ram2_segment)); + save_item(NAME(m_orionpro_page)); + save_item(NAME(m_orionpro_128_page)); + save_item(NAME(m_orionpro_rom2_segment)); + save_item(NAME(m_orionpro_dispatcher)); +} + void orion_state::orion_disk_control_w(uint8_t data) { floppy_connector *names[] = { m_fd0, m_fd1, m_fd2, m_fd3}; @@ -197,43 +215,26 @@ void orion_state::orion128_floppy_w(offs_t offset, uint8_t data) uint8_t orion_state::orionz80_floppy_rtc_r(offs_t offset) { if ((offset >= 0x60) && (offset <= 0x6f)) - { return m_rtc->read(offset-0x60); - } else - { return orion128_floppy_r(offset); - } } void orion_state::orionz80_floppy_rtc_w(offs_t offset, uint8_t data) { if ((offset >= 0x60) && (offset <= 0x6f)) - { m_rtc->write(offset-0x60,data); - } else - { orion128_floppy_w(offset,data); - } -} - - -void orion_z80_state::machine_start() -{ - m_video_mode_mask = 7; } void orion_state::orionz80_sound_w(uint8_t data) { if (m_speaker_data == 0) - { m_speaker_data = data; - } else - { m_speaker_data = 0; - } + m_speaker->level_w(m_speaker_data); } @@ -243,7 +244,6 @@ void orion_state::orionz80_sound_fe_w(uint8_t data) m_speaker->level_w(BIT(data, 4)); } - void orion_state::orionz80_switch_bank() { uint8_t bank_select; @@ -282,7 +282,7 @@ void orion_state::orionz80_switch_bank() space.install_write_handler(0xff00, 0xffff, write8smo_delegate(*this, FUNC(orion_state::orionz80_sound_w))); m_bank3->set_base(m_ram->pointer() + 0xf000); - m_bank5->set_base(m_region_maincpu->base() + 0xf800); + m_bank5->set_base(m_rom + 0xf800); } else @@ -329,12 +329,12 @@ void orion_z80_state::machine_reset() space.install_write_handler(0xff00, 0xffff, write8smo_delegate(*this, FUNC(orion_z80_state::orionz80_sound_w))); - m_bank1->set_base(m_region_maincpu->base() + 0xf800); + m_bank1->set_base(m_rom + 0xf800); m_bank2->set_base(m_ram->pointer() + 0x4000); m_bank3->set_base(m_ram->pointer() + 0xf000); - m_bank5->set_base(m_region_maincpu->base() + 0xf800); - + m_bank5->set_base(m_rom + 0xf800); + m_video_mode_mask = 7; m_orion128_video_page = 0; m_orion128_video_mode = 0; m_orionz80_memory_page = 0; @@ -348,17 +348,14 @@ void orion_z80_state::machine_reset() INTERRUPT_GEN_MEMBER(orion_state::orionz80_interrupt) { if ((m_orionz80_dispatcher & 0x40)==0x40) - { device.execute().set_input_line(0, HOLD_LINE); - } } uint8_t orion_state::orionz80_io_r(offs_t offset) { if (offset == 0xFFFD) - { return m_ay8912->data_r(); - } + return 0xff; } @@ -383,12 +380,6 @@ void orion_state::orionz80_io_w(offs_t offset, uint8_t data) } } - - - - - - void orion_state::orionpro_bank_switch() { address_space &space = m_maincpu->space(AS_PROGRAM); @@ -397,9 +388,8 @@ void orion_state::orionpro_bank_switch() uint8_t *ram = m_ram->pointer(); if (is128==1) - { page = m_orionpro_128_page & 7; - } + space.install_write_bank(0x0000, 0x1fff, "bank1"); space.install_write_bank(0x2000, 0x3fff, "bank2"); space.install_write_bank(0x4000, 0x7fff, "bank3"); @@ -423,12 +413,12 @@ void orion_state::orionpro_bank_switch() if ((m_orionpro_dispatcher & 0x10)==0x10) { // ROM1 enabled space.unmap_write(0x0000, 0x1fff); - m_bank1->set_base(m_region_maincpu->base() + 0x20000); + m_bank1->set_base(m_rom + 0x20000); } if ((m_orionpro_dispatcher & 0x08)==0x08) { // ROM2 enabled space.unmap_write(0x2000, 0x3fff); - m_bank2->set_base(m_region_maincpu->base() + 0x22000 + (m_orionpro_rom2_segment & 7) * 0x2000); + m_bank2->set_base(m_rom + 0x22000 + (m_orionpro_rom2_segment & 7) * 0x2000); } if ((m_orionpro_dispatcher & 0x02)==0x00) diff --git a/src/mame/machine/partner.cpp b/src/mame/machine/partner.cpp index a00be2dd7be..69f9c201922 100644 --- a/src/mame/machine/partner.cpp +++ b/src/mame/machine/partner.cpp @@ -11,7 +11,6 @@ #include "emu.h" #include "cpu/i8085/i8085.h" -#include "imagedev/cassette.h" #include "includes/radio86.h" #include "includes/partner.h" @@ -21,97 +20,104 @@ void partner_state::init_partner() m_tape_value = 0x80; } -void partner_state::partner_window_1(uint8_t bank_num, uint16_t offset,uint8_t *rom) +void partner_state::window_1(u8 bank_num, u16 offset, u8 *rom) { - switch(m_win_mem_page) { + switch(m_win_mem_page) + { case 2 : // FDD BIOS - m_bank[bank_num]->set_base(rom + 0x16000 + offset); + m_bank[bank_num]->set_base(rom + 0x6000 + offset); break; case 4 : // MCPG BIOS - m_bank[bank_num]->set_base(rom + 0x14000 + offset); + m_bank[bank_num]->set_base(rom + 0x4000 + offset); break; default : // BIOS - m_bank[bank_num]->set_base(rom + 0x10000 + offset); + m_bank[bank_num]->set_base(rom + offset); break; } } -void partner_state::partner_window_2(uint8_t bank_num, uint16_t offset,uint8_t *rom) +void partner_state::window_2(u8 bank_num, u16 offset, u8 *rom) { - switch(m_win_mem_page) { + switch(m_win_mem_page) + { case 4 : // MCPG FONT - m_bank[bank_num]->set_base(rom + 0x18000 + offset); + m_bank[bank_num]->set_base(rom + 0x8000 + offset); break; default : // BIOS - m_bank[bank_num]->set_base(rom + 0x10000 + offset); + m_bank[bank_num]->set_base(rom + offset); break; } } -uint8_t partner_state::partner_floppy_r(offs_t offset) +u8 partner_state::floppy_r(offs_t offset) { - if (offset<0x100) { - switch(offset & 3) { + if (offset<0x100) + switch(offset & 3) + { case 0x00 : return m_fdc->status_r(); case 0x01 : return m_fdc->track_r(); case 0x02 : return m_fdc->sector_r(); default : return m_fdc->data_r(); } - } else { + else return 0; - } } -void partner_state::partner_floppy_w(offs_t offset, uint8_t data) +void partner_state::floppy_w(offs_t offset, u8 data) { - if (offset<0x100) { - switch(offset & 3) { + if (offset<0x100) + switch(offset & 3) + { case 0x00 : m_fdc->cmd_w(data); break; case 0x01 : m_fdc->track_w(data);break; case 0x02 : m_fdc->sector_w(data);break; default : m_fdc->data_w(data);break; } - } else { + else + { floppy_image_device *floppy0 = m_fdc->subdevice("0")->get_device(); floppy_image_device *floppy1 = m_fdc->subdevice("1")->get_device(); - if (((data >> 6) & 1)==1) { + if (BIT(data, 6)) + { m_fdc->set_floppy(floppy0); floppy0->mon_w(0); - floppy0->ss_w(data >> 7); + floppy0->ss_w(BIT(data, 7)); } else floppy0->mon_w(1); - if (((data >> 3) & 1)==1) { + if (BIT(data, 3)) + { m_fdc->set_floppy(floppy1); floppy1->mon_w(0); - floppy1->ss_w(data >> 7); + floppy1->ss_w(BIT(data, 7)); } else floppy1->mon_w(1); } } -void partner_state::partner_iomap_bank(uint8_t *rom) +void partner_state::iomap_bank(u8 *rom) { address_space &space = m_maincpu->space(AS_PROGRAM); - switch(m_win_mem_page) { + switch(m_win_mem_page) + { case 2 : // FDD - space.install_write_handler(0xdc00, 0xddff, write8sm_delegate(*this, FUNC(partner_state::partner_floppy_w))); - space.install_read_handler (0xdc00, 0xddff, read8sm_delegate(*this, FUNC(partner_state::partner_floppy_r))); + space.install_write_handler(0xdc00, 0xddff, write8sm_delegate(*this, FUNC(partner_state::floppy_w))); + space.install_read_handler (0xdc00, 0xddff, read8sm_delegate(*this, FUNC(partner_state::floppy_r))); break; case 4 : // Timer break; default : // BIOS - m_bank[10]->set_base(rom + 0x10000); + m_bank[10]->set_base(rom); break; } } -void partner_state::partner_bank_switch() +void partner_state::bank_switch() { address_space &space = m_maincpu->space(AS_PROGRAM); uint8_t *rom = memregion("maincpu")->base(); @@ -133,60 +139,63 @@ void partner_state::partner_bank_switch() space.unmap_write(0xe800, 0xffff); // BANK 1 (0x0000 - 0x07ff) - if (m_mem_page==0) { + if (m_mem_page==0) + { space.unmap_write(0x0000, 0x07ff); - m_bank[0]->set_base(rom + 0x10000); - } else { - if (m_mem_page==7) { + m_bank[0]->set_base(rom); + } + else + { + if (m_mem_page==7) m_bank[0]->set_base(ram + 0x8000); - } else { - m_bank[0]->set_base(ram + 0x0000); - } + else + m_bank[0]->set_base(ram); } // BANK 2 (0x0800 - 0x3fff) - if (m_mem_page==7) { + if (m_mem_page==7) m_bank[1]->set_base(ram + 0x8800); - } else { + else m_bank[1]->set_base(ram + 0x0800); - } // BANK 3 (0x4000 - 0x5fff) - if (m_mem_page==7) { + if (m_mem_page==7) m_bank[2]->set_base(ram + 0xC000); - } else { - if (m_mem_page==10) { + else + { + if (m_mem_page==10) + { //window 1 space.unmap_write(0x4000, 0x5fff); - partner_window_1(2, 0, rom); - } else { - m_bank[2]->set_base(ram + 0x4000); + window_1(2, 0, rom); } + else + m_bank[2]->set_base(ram + 0x4000); } // BANK 4 (0x6000 - 0x7fff) - if (m_mem_page==7) { + if (m_mem_page==7) m_bank[3]->set_base(ram + 0xe000); - } else { + else m_bank[3]->set_base(ram + 0x6000); - } // BANK 5 (0x8000 - 0x9fff) - switch (m_mem_page) { + switch (m_mem_page) + { case 5: case 10: //window 2 space.unmap_write(0x8000, 0x9fff); - partner_window_2(4, 0, rom); + window_2(4, 0, rom); break; case 8: case 9: //window 1 space.unmap_write(0x8000, 0x9fff); - partner_window_1(4, 0, rom); + window_1(4, 0, rom); break; case 7: - m_bank[4]->set_base(ram + 0x0000); + m_bank[4]->set_base(ram); break; default: m_bank[4]->set_base(ram + 0x8000); @@ -194,18 +203,19 @@ void partner_state::partner_bank_switch() } // BANK 6 (0xa000 - 0xb7ff) - switch (m_mem_page) { + switch (m_mem_page) + { case 5: case 10: //window 2 space.unmap_write(0xa000, 0xb7ff); - partner_window_2(5, 0, rom); + window_2(5, 0, rom); break; case 6: case 8: //BASIC space.unmap_write(0xa000, 0xb7ff); - m_bank[5]->set_base(rom + 0x12000); // BASIC + m_bank[5]->set_base(rom + 0x2000); // BASIC break; case 7: m_bank[5]->set_base(ram + 0x2000); @@ -216,19 +226,20 @@ void partner_state::partner_bank_switch() } // BANK 7 (0xb800 - 0xbfff) - switch (m_mem_page) { + switch (m_mem_page) + { case 4: case 5: case 10: //window 2 space.unmap_write(0xb800, 0xbfff); - partner_window_2(6, 0x1800, rom); + window_2(6, 0x1800, rom); break; case 6: case 8: //BASIC space.unmap_write(0xb800, 0xbfff); - m_bank[6]->set_base(rom + 0x13800); // BASIC + m_bank[6]->set_base(rom + 0x3800); // BASIC break; case 7: m_bank[6]->set_base(ram + 0x3800); @@ -239,14 +250,15 @@ void partner_state::partner_bank_switch() } // BANK 8 (0xc000 - 0xc7ff) - switch (m_mem_page) { + switch (m_mem_page) + { case 7: m_bank[7]->set_base(ram + 0x4000); break; case 8: case 10: space.unmap_write(0xc000, 0xc7ff); - m_bank[7]->set_base(rom + 0x10000); + m_bank[7]->set_base(rom); break; default: m_bank[7]->set_base(ram + 0xc000); @@ -254,7 +266,8 @@ void partner_state::partner_bank_switch() } // BANK 9 (0xc800 - 0xcfff) - switch (m_mem_page) { + switch (m_mem_page) + { case 7: m_bank[8]->set_base(ram + 0x4800); break; @@ -262,11 +275,11 @@ void partner_state::partner_bank_switch() case 9: // window 2 space.unmap_write(0xc800, 0xcfff); - partner_window_2(8, 0, rom); + window_2(8, 0, rom); break; case 10: space.unmap_write(0xc800, 0xcfff); - m_bank[8]->set_base(rom + 0x10800); + m_bank[8]->set_base(rom + 0x0800); break; default: m_bank[8]->set_base(ram + 0xc800); @@ -274,7 +287,8 @@ void partner_state::partner_bank_switch() } // BANK 10 (0xd000 - 0xd7ff) - switch (m_mem_page) { + switch (m_mem_page) + { case 7: m_bank[9]->set_base(ram + 0x5000); break; @@ -282,7 +296,7 @@ void partner_state::partner_bank_switch() case 9: // window 2 space.unmap_write(0xd000, 0xd7ff); - partner_window_2(9, 0x0800, rom); + window_2(9, 0x0800, rom); break; default: m_bank[9]->set_base(ram + 0xd000); @@ -290,66 +304,72 @@ void partner_state::partner_bank_switch() } // BANK 11 (0xdc00 - 0xddff) - partner_iomap_bank(rom); + iomap_bank(rom); // BANK 12 (0xe000 - 0xe7ff) - if (m_mem_page==1) { - m_bank[11]->set_base(rom + 0x10000); - } else { + if (m_mem_page==1) + m_bank[11]->set_base(rom); + else //window 1 - partner_window_1(12, 0, rom); - } + window_1(12, 0, rom); // BANK 13 (0xe800 - 0xffff) - switch (m_mem_page) { + switch (m_mem_page) + { case 3: case 4: case 5: // window 1 - partner_window_1(12, 0x800, rom); + window_1(12, 0x800, rom); break; default: // BIOS - m_bank[12]->set_base(rom + 0x10800); + m_bank[12]->set_base(rom + 0x0800); break; } } -void partner_state::partner_win_memory_page_w(uint8_t data) +void partner_state::win_memory_page_w(u8 data) { m_win_mem_page = ~data; - partner_bank_switch(); + bank_switch(); } -void partner_state::partner_mem_page_w(uint8_t data) +void partner_state::mem_page_w(u8 data) { m_mem_page = (data >> 4) & 0x0f; - partner_bank_switch(); + bank_switch(); } I8275_DRAW_CHARACTER_MEMBER(partner_state::display_pixels) { int i; const rgb_t *palette = m_palette->palette()->entry_list_raw(); - const uint8_t *charmap = m_charmap + 0x400 * (gpa * 2 + hlgt); - uint8_t pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; - if (vsp) { + const u8 *charmap = m_chargen + 0x400 * (gpa * 2 + hlgt); + u8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; + if (vsp) pixels = 0; - } - if (lten) { + + if (lten) pixels = 0xff; - } - if (rvv) { + + if (rvv) pixels ^= 0xff; - } - for(i=0;i<6;i++) { + + for(i=0;i<6;i++) bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1]; - } } void partner_state::machine_reset() { m_mem_page = 0; m_win_mem_page = 0; - partner_bank_switch(); + bank_switch(); +} + +void partner_state::machine_start() +{ + save_item(NAME(m_tape_value)); + save_item(NAME(m_mem_page)); + save_item(NAME(m_win_mem_page)); } diff --git a/src/mame/machine/radio86.cpp b/src/mame/machine/radio86.cpp index 8bac08a48f2..14517a58409 100644 --- a/src/mame/machine/radio86.cpp +++ b/src/mame/machine/radio86.cpp @@ -11,7 +11,6 @@ #include "emu.h" #include "cpu/i8085/i8085.h" -#include "machine/i8255.h" #include "includes/radio86.h" @@ -25,30 +24,23 @@ void radio86_state::radio86_init_keyboard() /* Driver initialization */ void radio86_state::init_radio86() { - /* set initialy ROM to be visible on first bank */ - uint8_t *RAM = m_region_maincpu->base(); - memset(RAM,0x0000,0x1000); // make frist page empty by default - m_bank1->configure_entries(1, 2, RAM, 0x0000); - m_bank1->configure_entries(0, 2, RAM, 0xf800); radio86_init_keyboard(); } void radio86_state::init_radioram() { init_radio86(); - m_radio_ram_disk = std::make_unique(0x20000); - memset(m_radio_ram_disk.get(),0,0x20000); + m_radio_ram_disk = make_unique_clear(0x20000); + save_pointer(NAME(m_radio_ram_disk), 0x20000); } -uint8_t radio86_state::radio86_8255_portb_r2() +u8 radio86_state::radio86_8255_portb_r2() { - uint8_t key = 0xff; - for (int i = 0; i < 8; i++) - { - if (BIT(m_keyboard_mask, i)) { + u8 key = 0xff; + for (u8 i = 0; i < 8; i++) + if (BIT(m_keyboard_mask, i)) key &= m_io_line[i]->read(); - } - } + return key; } @@ -70,41 +62,39 @@ uint8_t radio86_state::kr03_8255_portb_r2() return key; } -uint8_t radio86_state::radio86_8255_portc_r2() +u8 radio86_state::radio86_8255_portc_r2() { double level = m_cassette->input(); - uint8_t dat = m_io_line[8]->read(); - if (level < 0) { + u8 dat = m_io_line[8]->read(); + if (level < 0) dat ^= m_tape_value; - } + return dat; } -void radio86_state::radio86_8255_porta_w2(uint8_t data) +void radio86_state::radio86_8255_porta_w2(u8 data) { m_keyboard_mask = data ^ 0xff; } -void radio86_state::radio86_8255_portc_w2(uint8_t data) +void radio86_state::radio86_8255_portc_w2(u8 data) { m_cassette->output(data & 0x01 ? 1 : -1); } -uint8_t radio86_state::rk7007_8255_portc_r() +u8 radio86_state::rk7007_8255_portc_r() { double level = m_cassette->input(); - uint8_t key = 0xff; - for (int i = 0; i < 8; i++) - { - if ((m_keyboard_mask & (1 << i))!=0) { + u8 key = 0xff; + for (u8 i = 0; i < 8; i++) + if ((m_keyboard_mask & (1 << i))!=0) key &= m_io_cline[i]->read(); - } - } + key &= 0xe0; - if (level < 0) { + if (level < 0) key ^= m_tape_value; - } + return key; } @@ -114,94 +104,101 @@ void radio86_state::hrq_w(int state) m_maincpu->set_input_line(INPUT_LINE_HALT, state); /* HACK - this should be connected to the BUSACK line of Z80 */ - m_dma8257->hlda_w(state); + m_dma->hlda_w(state); } -uint8_t radio86_state::memory_read_byte(offs_t offset) +u8 radio86_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset); } -void radio86_state::memory_write_byte(offs_t offset, uint8_t data) +void radio86_state::memory_write_byte(offs_t offset, u8 data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.write_byte(offset, data); } -void radio86_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) -{ - switch (id) - { - case TIMER_RESET: - m_bank1->set_entry(0); - break; - default: - throw emu_fatalerror("Unknown id in radio86_state::device_timer"); - } -} - - -uint8_t radio86_state::radio_cpu_state_r() +u8 radio86_state::radio_cpu_state_r() { - // FIXME: the driver should handler the status callback rather than accessing this through the state interface + // FIXME: the driver should handle the status callback rather than accessing this through the state interface return m_maincpu->state_int(i8080_cpu_device::I8085_STATUS); } -uint8_t radio86_state::radio_io_r(offs_t offset) +u8 radio86_state::radio_io_r(offs_t offset) { return m_maincpu->space(AS_PROGRAM).read_byte((offset << 8) + offset); } -void radio86_state::radio_io_w(offs_t offset, uint8_t data) +void radio86_state::radio_io_w(offs_t offset, u8 data) { m_maincpu->space(AS_PROGRAM).write_byte((offset << 8) + offset,data); } void radio86_state::machine_reset() { - timer_set(attotime::from_usec(10), TIMER_RESET); - m_bank1->set_entry(1); - m_keyboard_mask = 0; m_disk_sel = 0; + + address_space &program = m_maincpu->space(AS_PROGRAM); + program.install_rom(0x0000, 0x0fff, m_rom); // do it here for F3 + m_rom_shadow_tap = program.install_read_tap(0xf000, 0xffff, "rom_shadow_r",[this](offs_t offset, u8 &data, u8 mem_mask) + { + if (!machine().side_effects_disabled()) + { + // delete this tap + m_rom_shadow_tap->remove(); + + // reinstall ram over the rom shadow + m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x0fff, m_ram); + } + + // return the original data + return data; + }); } +void radio86_state::machine_start() +{ + save_item(NAME(m_tape_value)); + save_item(NAME(m_keyboard_mask)); + save_item(NAME(m_romdisk_lsb)); + save_item(NAME(m_romdisk_msb)); + save_item(NAME(m_disk_sel)); +} -void radio86_state::radio86_pagesel(uint8_t data) +void radio86_state::radio86_pagesel(u8 data) { m_disk_sel = data; } -uint8_t radio86_state::radio86rom_romdisk_porta_r() +u8 radio86_state::radio86rom_romdisk_porta_r() { - uint16_t addr = (m_romdisk_msb << 8) | m_romdisk_lsb; + u16 addr = (m_romdisk_msb << 8) | m_romdisk_lsb; if (m_cart->exists() && addr < m_cart->get_rom_size()) return m_cart->read_rom(addr); else return 0xff; } -uint8_t radio86_state::radio86ram_romdisk_porta_r() +u8 radio86_state::radio86ram_romdisk_porta_r() { - uint8_t *romdisk = m_region_maincpu->base() + 0x10000; - if ((m_disk_sel & 0x0f) ==0) { + u8 *romdisk = m_rom + 0x10000; + if ((m_disk_sel & 0x0f) ==0) return romdisk[m_romdisk_msb*256+m_romdisk_lsb]; - } else { - if (m_disk_sel==0xdf) { - return m_radio_ram_disk[m_romdisk_msb*256+m_romdisk_lsb + 0x10000]; - } else { - return m_radio_ram_disk[m_romdisk_msb*256+m_romdisk_lsb]; - } - } + else + if (m_disk_sel==0xdf) + return m_radio_ram_disk[m_romdisk_msb*256+m_romdisk_lsb + 0x10000]; + else + return m_radio_ram_disk[m_romdisk_msb*256+m_romdisk_lsb]; } -void radio86_state::radio86_romdisk_portb_w(uint8_t data) +void radio86_state::radio86_romdisk_portb_w(u8 data) { m_romdisk_lsb = data; } -void radio86_state::radio86_romdisk_portc_w(uint8_t data) +void radio86_state::radio86_romdisk_portc_w(u8 data) { m_romdisk_msb = data; } @@ -209,7 +206,7 @@ void radio86_state::radio86_romdisk_portc_w(uint8_t data) I8275_DRAW_CHARACTER_MEMBER(radio86_state::display_pixels) { rgb_t const *const palette = m_palette->palette()->entry_list_raw(); - uint8_t pixels = m_charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; + u8 pixels = m_chargen[(linecount & 7) + (charcode << 3)] ^ 0xff; if (vsp) pixels = 0; @@ -219,7 +216,7 @@ I8275_DRAW_CHARACTER_MEMBER(radio86_state::display_pixels) if (rvv) pixels ^= 0xff; - for (int i = 0; i < 6; i++) + for (u8 i = 0; i < 6; i++) bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0]; } -- cgit v1.2.3 From 50381b111bbce0f8c45d374d1f272a69ab5b71b5 Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Wed, 8 Jul 2020 17:07:50 +0200 Subject: goldnpkr.cpp: Merged animpkr and animpkra. They are just one set with banked programs. Added technical notes. --- src/mame/drivers/goldnpkr.cpp | 55 ++++++++++++++++++------------------------- src/mame/mame.lst | 1 - 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp index 6d8f62b2700..e02c8405463 100644 --- a/src/mame/drivers/goldnpkr.cpp +++ b/src/mame/drivers/goldnpkr.cpp @@ -144,8 +144,7 @@ * Bonne Chance! (Golden Poker prequel HW, set 2), 198?, Unknown. * Mundial/Mondial (Italian/French), 1987, Unknown. * Super 98 (3-hands, ICP-1), 199?, Unknown. - * unknown animal-themed game (bottom), 199?, Unknown. - * unknown animal-themed game (top), 199?, Unknown. + * unknown rocket/animal-themed poker, 199?, Unknown. * Mega Double Poker (conversion kit, set 1), 1990, Blitz System Inc. * Mega Double Poker (conversion kit, set 2), 1990, Blitz System Inc. @@ -11410,19 +11409,26 @@ ROM_END /*------------------------------------------------------------------------- - Unknown animals themed banked game. + Unknown rocket/animals themed banked game. - It has 4 character's tiles: - A pig, a duck, a donkey, and a mouse. - Duck and mouse are very close to Disney's characters - Donald Duck and Mickey Mouse. + The game looks like a poker game using rockets instead of cards. - The PCB has a lot of wire-hacks doing a weird banking, - and other unknown things (maybe addressing scramble). - These hacks need to be documented. + But the game also has graphics tiles for 4 characters: + + - pig + - duck + - donkey + - mouse + + Duck and mouse are very close to Disney's characters Donald Duck + and Mickey Mouse. - Bottom and Top programs ROMs are soldered one over the other, and a wire - hack enable/disable each set through the CE pin. + The PCB has a lot of wire-hacks doing a weird banking, + and other unknown things (maybe addressing scramble). + These hacks need to be documented. + + Bottom and Top programs ROMs are soldered one over the other, and a wire + hack enable/disable each set through the CE pin. --------------------------------------------------------------------------- @@ -11458,6 +11464,10 @@ ROM_END -------------------------------------------------------------------------*/ ROM_START( animpkr ) ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "2732_top.15a", 0x2000, 0x1000, CRC(ef6b36ff) SHA1(2ca520502ce32c4327f9bcc85d5c7b6e2f22eeb5) ) + ROM_LOAD( "2732_top.17a", 0x3000, 0x1000, CRC(13fae924) SHA1(c1c92fdb6e7036e6d9349c9b017e9daf3577345b) ) + + ROM_REGION( 0x10000, "banked", 0 ) ROM_LOAD( "2732_bottom.15a", 0x2000, 0x1000, CRC(036f7639) SHA1(7d548dd71692fcde41c260a4a59ccdfa2aa5b07e) ) ROM_LOAD( "2732_bottom.17a", 0x3000, 0x1000, CRC(92c19e72) SHA1(034d077ede5608160ba882227e981751a5dde26d) ) @@ -11474,24 +11484,6 @@ ROM_START( animpkr ) ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed ROM_END -ROM_START( animpkra ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "2732_top.15a", 0x2000, 0x1000, CRC(ef6b36ff) SHA1(2ca520502ce32c4327f9bcc85d5c7b6e2f22eeb5) ) - ROM_LOAD( "2732_top.17a", 0x3000, 0x1000, CRC(13fae924) SHA1(c1c92fdb6e7036e6d9349c9b017e9daf3577345b) ) - - ROM_REGION( 0x1800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes - ROM_LOAD( "2716.8a", 0x1000, 0x0800, CRC(21c9c7f1) SHA1(daa0eddd4f4a9eec0cff3aebe884792adf830238) ) // char ROM - - ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(0b7f11a2) SHA1(c5e347a377e307d12b2b2d2edf7c48be21ef5cdb) ) // characters gfx, bitplane 1 - ROM_LOAD( "2716.5a", 0x0800, 0x0800, CRC(0b2c3c25) SHA1(c69b15c1cea9abc437b12211bc4087d4d5baf084) ) // characters gfx, bitplane 2 - ROM_LOAD( "2716.7a", 0x1000, 0x0800, CRC(c48d17b0) SHA1(7c446339ab3aaa49004780fa90a3624b5a382cb1) ) // characters gfx, bitplane 3 - - ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed -ROM_END - /****************************************** @@ -12219,8 +12211,7 @@ GAMEL( 198?, bchanceq, 0, goldnpkr, goldnpkr, goldnpkr_state, empty_init GAME( 1987, pokermon, 0, mondial, mondial, goldnpkr_state, empty_init, ROT0, "", "Mundial/Mondial (Italian/French)", 0 ) // banked selectable program GAME( 1998, super98, bsuerte, witchcrd, super98, goldnpkr_state, empty_init, ROT0, "", "Super 98 (3-hands, ICP-1)", MACHINE_NOT_WORKING ) // program checks zeropage registers for changes... -GAME( 198?, animpkr, 0, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "", "unknown animal-themed game (bottom)", MACHINE_NOT_WORKING ) // banked selectable program (bottom). -GAME( 198?, animpkra, animpkr, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "", "unknown animal-themed game (top)", MACHINE_NOT_WORKING ) // banked selectable program (top). +GAME( 198?, animpkr, 0, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "", "unknown rocket/animal-themed poker", MACHINE_NOT_WORKING ) // banked program. GAME( 1990, megadpkr, 0, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.3 MD)", 0 ) GAME( 1990, megadpkrb, megadpkr, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.1 MD)", 0 ) // may need an extra reset to work the first time diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 049513531dd..00cf6a96c03 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14971,7 +14971,6 @@ swisspkr // (c) 1990 Golden Games @source:goldnpkr.cpp animpkr // 198?, Unknown -animpkra // 198?, Unknown bchancep // 198?, Unknown bchanceq // 198?, Unknown bonuspkr // 1984, Galanthis Inc. -- cgit v1.2.3 From b683b1421b296b20162beb771137c8c112a742bd Mon Sep 17 00:00:00 2001 From: David Haywood <28625134+DavidHaywood@users.noreply.github.com> Date: Thu, 9 Jul 2020 03:09:24 +0100 Subject: mpu4vid: allow v4strike and v4barqst to decode questions and fix some clone relationships (#6930) --- src/mame/drivers/mpu4plasma.cpp | 4 +- src/mame/drivers/mpu4vid.cpp | 391 +++++++++++++++++++++++++++++++--------- src/mame/mame.lst | 4 +- 3 files changed, 306 insertions(+), 93 deletions(-) diff --git a/src/mame/drivers/mpu4plasma.cpp b/src/mame/drivers/mpu4plasma.cpp index 34605de0e2a..d392a1232f0 100644 --- a/src/mame/drivers/mpu4plasma.cpp +++ b/src/mame/drivers/mpu4plasma.cpp @@ -173,8 +173,8 @@ ROM_END #define M4APACH_PLASMA \ ROM_REGION( 0x40000, "plasmacpu", 0 ) \ - ROM_LOAD16_BYTE( "plasma.p0", 0x00000, 0x010000, NO_DUMP ) \ - ROM_LOAD16_BYTE( "plasma.p1", 0x00001, 0x010000, NO_DUMP ) + ROM_LOAD16_BYTE( "a6ppl.p0", 0x00000, 0x020000, CRC(350da2df) SHA1(a390e0c7e1e624c17f0e254e0b99ef9dbf56269d) ) \ + ROM_LOAD16_BYTE( "a6ppl.p1", 0x00001, 0x020000, CRC(63038aba) SHA1(8ec4e02109e872460a9598e469b59919cc5450dd) ) \ ROM_START( m4apach ) ROM_REGION( 0x10000, "maincpu", 0 ) diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp index 2931a1fc23a..5493435b61b 100644 --- a/src/mame/drivers/mpu4vid.cpp +++ b/src/mame/drivers/mpu4vid.cpp @@ -225,11 +225,15 @@ public: m_ptm(*this, "6840ptm_68k"), m_trackx_port(*this, "TRACKX"), m_tracky_port(*this, "TRACKY"), - m_gfxdecode(*this, "gfxdecode") + m_gfxdecode(*this, "gfxdecode"), + m_4krow(0), + m_4ktable(nullptr) { } void mpu4_vid(machine_config &config); + void mpu4_vid_strike(machine_config &config); + void bwbvid(machine_config &config); void crmaze(machine_config &config); void bwbvid5(machine_config &config); @@ -251,7 +255,7 @@ public: void init_strikeit(); void init_v4wize(); void init_turnover(); - void init_adders(); + //void init_adders(); void init_mating(); void init_crmaze3a(); void init_skiltrek(); @@ -305,9 +309,17 @@ private: void bwbvid5_68k_map(address_map &map); void bwbvid_68k_map(address_map &map); + void mpu4_68k_map_base(address_map &map); void mpu4_68k_map(address_map &map); + void mpu4_68k_map_strike(address_map &map); void mpu4_vram(address_map &map); void mpu4oki_68k_map(address_map &map); + + void vidcharacteriser_4k_lookup_w(offs_t offset, uint8_t data); + uint8_t vidcharacteriser_4k_lookup_r(offs_t offset); + uint8_t m_4krow; + uint8_t *m_4ktable; + }; /************************************* @@ -1179,7 +1191,7 @@ void mpu4vid_state::machine_reset() m_chr_value = 0; } -void mpu4vid_state::mpu4_68k_map(address_map &map) +void mpu4vid_state::mpu4_68k_map_base(address_map &map) { map(0x000000, 0x7fffff).rom(); map(0x800000, 0x80ffff).ram().share("vid_mainram"); @@ -1192,9 +1204,21 @@ void mpu4vid_state::mpu4_68k_map(address_map &map) map(0xc00000, 0xc1ffff).rw(FUNC(mpu4vid_state::mpu4_vid_vidram_r), FUNC(mpu4vid_state::mpu4_vid_vidram_w)).share("vid_vidram"); map(0xff8000, 0xff8003).rw(m_acia_1, FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0x00ff); map(0xff9000, 0xff900f).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)).umask16(0x00ff); +} + +void mpu4vid_state::mpu4_68k_map(address_map& map) +{ + mpu4_68k_map_base(map); map(0xffd000, 0xffd00f).rw(FUNC(mpu4vid_state::vidcharacteriser_r), FUNC(mpu4vid_state::vidcharacteriser_w)).umask16(0x00ff); } +void mpu4vid_state::mpu4_68k_map_strike(address_map& map) +{ + mpu4_68k_map_base(map); + map(0xffd000, 0xffd00f).rw(FUNC(mpu4vid_state::vidcharacteriser_4k_lookup_r), FUNC(mpu4vid_state::vidcharacteriser_4k_lookup_w)).umask16(0x00ff); +} + + void mpu4vid_state::mpu4oki_68k_map(address_map &map) { map(0x000000, 0x5fffff).rom(); //.nopw(); @@ -1382,6 +1406,12 @@ void mpu4vid_state::mpu4_vid(machine_config &config) m_acia_1->irq_handler().set(FUNC(mpu4vid_state::m68k_acia_irq)); } +void mpu4vid_state::mpu4_vid_strike(machine_config& config) +{ + mpu4_vid(config); + m_videocpu->set_addrmap(AS_PROGRAM, &mpu4vid_state::mpu4_68k_map_strike); +} + void mpu4vid_state::crmaze(machine_config &config) { mpu4_vid(config); @@ -1509,7 +1539,44 @@ uint8_t mpu4vid_state::vidcharacteriser_r(offs_t offset) } +void mpu4vid_state::vidcharacteriser_4k_lookup_w(offs_t offset, uint8_t data) +{ + logerror("%04x write to characterizer %02x - %02x\n", m_videocpu->pcbase(), offset, data); + + if (data == 0x00) // reset? + { + m_4krow = 0; + m_prot_col = 0; + } + else + { + m_prot_col = data & 0x3f; // 6-bit writes (upper 2 bits unused) + } +} + +uint8_t mpu4vid_state::vidcharacteriser_4k_lookup_r(offs_t offset) +{ + uint8_t ret = m_4ktable[m_4krow * 64 + m_prot_col]; + m_4krow = ret; + + // hack for v4strike, otherwise it reports questions as invalid, even if they decode properly + // is this a secondary security check, or are they mismatched for the version? + // it writes '03' to the characterizer, (the question revision or coincidence?) + // but expects 00 back for that check + if (m_videocpu->pcbase() == 0x32c4) + { + if (m_videocpu->state_int(M68K_A4) == 0xaab54) + ret = 0x00; + } + + logerror("%04x read from characterizer %02x - %02x\n", m_videocpu->pcbase(), offset, ret); + + return ret << 2; // 6-bit reads (lower 2 bits unused) +} + + +/* static mpu4_chr_table adders_data[64] = { {0x00, 0x00}, {0x1A, 0x8C}, {0x04, 0x64}, {0x10, 0x84}, {0x18, 0x84}, {0x0F, 0xC4}, {0x13, 0x84}, {0x1B, 0x84}, {0x03, 0x9C}, {0x07, 0xF4}, {0x17, 0x04}, {0x1D, 0xCC}, {0x36, 0x24}, {0x35, 0x84}, {0x2B, 0xC4}, {0x28, 0x94}, @@ -1520,6 +1587,7 @@ static mpu4_chr_table adders_data[64] = { {0x03, 0x9C}, {0x17, 0xF4}, {0x10, 0x04}, {0x1D, 0xCC}, {0x0E, 0x24}, {0x07, 0x9C}, {0x12, 0xF4}, {0x09, 0x04}, {0x0D, 0x94}, {0x1F, 0x14}, {0x16, 0x44}, {0x05, 0x8C}, {0x13, 0x34}, {0x1C, 0x04}, {0x02, 0x9C}, {0x00, 0x00} }; +*/ static mpu4_chr_table crmaze_data[64] = { {0x00, 0x00}, {0x1A, 0x34}, {0x04, 0x14}, {0x10, 0x0C}, {0x18, 0x54}, {0x0F, 0x04}, {0x13, 0x24}, {0x1B, 0x34}, @@ -1609,6 +1677,7 @@ static mpu4_chr_table timemchn_data[64] = { {0x0D, 0xC4}, {0x1F, 0x0C}, {0x16, 0xC4}, {0x05, 0x2C}, {0x13, 0xC4}, {0x1C, 0x0C}, {0x02, 0xD4}, {0x00, 0x00} }; +/* static mpu4_chr_table strikeit_data[64] = { {0x00, 0x00}, {0x1A, 0xC4}, {0x04, 0xC4}, {0x10, 0x44}, {0x18, 0xC4}, {0x0F, 0x44}, {0x13, 0x44}, {0x1B, 0xC4}, {0x03, 0xCC}, {0x07, 0x3C}, {0x17, 0x5C}, {0x1D, 0x7C}, {0x36, 0x54}, {0x35, 0x24}, {0x2B, 0xC4}, {0x28, 0x4C}, @@ -1619,6 +1688,7 @@ static mpu4_chr_table strikeit_data[64] = { {0x03, 0xCC}, {0x17, 0x1C}, {0x10, 0x7C}, {0x1D, 0x7C}, {0x0E, 0xD4}, {0x07, 0x8C}, {0x12, 0x1C}, {0x09, 0x5C}, {0x0D, 0x5C}, {0x1F, 0x5C}, {0x16, 0x7C}, {0x05, 0x74}, {0x13, 0x04}, {0x1C, 0xC4}, {0x02, 0xCC}, {0x00, 0x00} }; +*/ static mpu4_chr_table turnover_data[64] = { {0x00, 0x00}, {0x1A, 0x1C}, {0x04, 0x6C}, {0x10, 0xA4}, {0x18, 0x0C}, {0x0F, 0x24}, {0x13, 0x0C}, {0x1B, 0x34}, @@ -1679,11 +1749,13 @@ static mpu4_chr_table prizeinv_data[8] = { {0x06, 0x20},{0xC6, 0x0f},{0xF8, 0x24},{0x8E, 0x3c}, }; +/* void mpu4vid_state::init_adders() { m_reels = 0;//currently no hybrid games m_current_chr_table = adders_data; } +*/ void mpu4vid_state::init_crmaze() { @@ -1744,7 +1816,9 @@ void mpu4vid_state::init_timemchn() void mpu4vid_state::init_strikeit() { m_reels = 0;//currently no hybrid games - m_current_chr_table = strikeit_data; + m_current_chr_table = nullptr; + m_4ktable = memregion( "video_prot" )->base(); + m_4krow = 0; } void mpu4vid_state::init_turnover() @@ -1772,7 +1846,7 @@ void mpu4vid_state::init_prizeinv() } static const bwb_chr_table cybcas_data1[5] = { -//Magic number 724A +//Magic num4ber 724A // PAL Codes // 0 1 2 3 4 5 6 7 8 @@ -2382,14 +2456,14 @@ ROM_START( v4turnov ) ROM_LOAD16_BYTE( "to.p6", 0x040001, 0x010000, CRC(54c6afb7) SHA1(b724b87b6f4e47d220310b38c97be2fa73dcd617) ) ROM_LOAD16_BYTE( "to.p7", 0x060000, 0x010000, CRC(acf19542) SHA1(ad46ffb3c2c078a8e3712eff27aa61f0d1a7c059) ) ROM_LOAD16_BYTE( "to.p8", 0x060001, 0x010000, CRC(a5ca385d) SHA1(8df26a33ea7f5b577761c6f9d2fa4eaed74661f8) ) - ROM_LOAD16_BYTE( "to.p9", 0x080000, 0x010000, CRC(6e85fde3) SHA1(14868d58829e13987e66f52e1899c4385987a87b) ) - ROM_LOAD16_BYTE( "to.p10", 0x080001, 0x010000, CRC(fadd11a2) SHA1(2b2fbb0769ef6035688d495464f3ea3bc8c7c660) ) - ROM_LOAD16_BYTE( "to.p11", 0x0a0000, 0x010000, CRC(2d72a61a) SHA1(ce455ab6fea452f96a3ad365178e0e5a0b437867) ) - ROM_LOAD16_BYTE( "to.p12", 0x0a0001, 0x010000, CRC(a14eedb6) SHA1(219b887a334ff28a88ed2e50f0caff4b510cd549) ) - ROM_LOAD16_BYTE( "to.p13", 0x0c0000, 0x010000, CRC(3f66ef6b) SHA1(60be6d3f8da1f3084db15ac1bb2470e55c0271de) ) - ROM_LOAD16_BYTE( "to.p14", 0x0c0001, 0x010000, CRC(127ba65d) SHA1(e34dcd19efd31dc712daac940277bb17694ea61a) ) - ROM_LOAD16_BYTE( "to.p15", 0x0e0000, 0x010000, CRC(ad787e31) SHA1(314ba312adfc71e4b3b2d52355ec692c192b74eb) ) - ROM_LOAD16_BYTE( "to.p16", 0x0e0001, 0x010000, CRC(e635c942) SHA1(08f8b5fdb738647bc0b49938da05533be42a2d60) ) + ROM_LOAD16_BYTE( "to.p9", 0x080000, 0x010000, CRC(6e85fde3) SHA1(14868d58829e13987e66f52e1899c4385987a87b) ) // ISSUE1 Q1 + ROM_LOAD16_BYTE( "to.p10", 0x080001, 0x010000, CRC(fadd11a2) SHA1(2b2fbb0769ef6035688d495464f3ea3bc8c7c660) ) // ISSUE1 Q2 + ROM_LOAD16_BYTE( "to.p11", 0x0a0000, 0x010000, CRC(2d72a61a) SHA1(ce455ab6fea452f96a3ad365178e0e5a0b437867) ) // ISSUE1 Q3 + ROM_LOAD16_BYTE( "to.p12", 0x0a0001, 0x010000, CRC(a14eedb6) SHA1(219b887a334ff28a88ed2e50f0caff4b510cd549) ) // ISSUE1 Q4 + ROM_LOAD16_BYTE( "to.p13", 0x0c0000, 0x010000, CRC(3f66ef6b) SHA1(60be6d3f8da1f3084db15ac1bb2470e55c0271de) ) // ISSUE1 Q5 + ROM_LOAD16_BYTE( "to.p14", 0x0c0001, 0x010000, CRC(127ba65d) SHA1(e34dcd19efd31dc712daac940277bb17694ea61a) ) // ISSUE1 Q6 + ROM_LOAD16_BYTE( "to.p15", 0x0e0000, 0x010000, CRC(ad787e31) SHA1(314ba312adfc71e4b3b2d52355ec692c192b74eb) ) // ISSUE1 Q7 + ROM_LOAD16_BYTE( "to.p16", 0x0e0001, 0x010000, CRC(e635c942) SHA1(08f8b5fdb738647bc0b49938da05533be42a2d60) ) // ISSUE1 Q8 ROM_REGION( 0x800000, "altvideo", 0 ) // seems to be an unmatched 2.2 revision rom @@ -2412,16 +2486,16 @@ ROM_START( v4skltrk ) ROM_LOAD16_BYTE( "st.p2", 0x000001, 0x010000, CRC(b62575c2) SHA1(06d75e8a364750663d329650720021279e195236) ) ROM_LOAD16_BYTE( "st.p3", 0x020000, 0x010000, CRC(9506da76) SHA1(6ef28ab8ec1af455be8ecfab20243f0823dca7c1) ) ROM_LOAD16_BYTE( "st.p4", 0x020001, 0x010000, CRC(6ab447bc) SHA1(d01c209dbf4d19a6a7f878fa54ff1cb51e7dcba5) ) - ROM_LOAD16_BYTE( "st.q1", 0x040000, 0x010000, CRC(4faca475) SHA1(69b498c543600b8e37ab0ed1863ba57845648f3c) ) - ROM_LOAD16_BYTE( "st.q2", 0x040001, 0x010000, CRC(9f2c5938) SHA1(85527c4c0b7a1e66576d56607d89750fab082580) ) - ROM_LOAD16_BYTE( "st.q3", 0x060000, 0x010000, CRC(6b6cb194) SHA1(aeac5dcc0827c17e758e3e821ae8a78a3a16ddce) ) - ROM_LOAD16_BYTE( "st.q4", 0x060001, 0x010000, CRC(ec57bc17) SHA1(d9f522739dbb190fb941ca654299bbedbb8fb703) ) - ROM_LOAD16_BYTE( "st.q5", 0x080000, 0x010000, CRC(7740a88b) SHA1(d9a683d3e0d6c1b4b59520f90f825124b7a61168) ) - ROM_LOAD16_BYTE( "st.q6", 0x080001, 0x010000, CRC(95e97796) SHA1(f1a8de0ad02aca31f79a4fe8ba5044546163e3c4) ) - ROM_LOAD16_BYTE( "st.q7", 0x0a0000, 0x010000, CRC(f3b8fe7f) SHA1(52d5be3f8cab419103f4727d0fb9d30f34c8f651) ) - ROM_LOAD16_BYTE( "st.q8", 0x0a0001, 0x010000, CRC(b85e75a2) SHA1(b7b03b090c0ec6d92e9a25abb7fec0507356bdfc) ) - ROM_LOAD16_BYTE( "st.q9", 0x0c0000, 0x010000, CRC(835f6001) SHA1(2cd9084c102d74bcb578c8ea22bbc9ea58f0ceab) ) - ROM_LOAD16_BYTE( "st.qa", 0x0c0001, 0x010000, CRC(3fc62a0e) SHA1(0628de4b962d3fcca3757cd4e89b3005c9bfd218) ) + ROM_LOAD16_BYTE( "st.q1", 0x040000, 0x010000, CRC(4faca475) SHA1(69b498c543600b8e37ab0ed1863ba57845648f3c) ) // ISSUE1 Q1 + ROM_LOAD16_BYTE( "st.q2", 0x040001, 0x010000, CRC(9f2c5938) SHA1(85527c4c0b7a1e66576d56607d89750fab082580) ) // ISSUE1 Q2 + ROM_LOAD16_BYTE( "st.q3", 0x060000, 0x010000, CRC(6b6cb194) SHA1(aeac5dcc0827c17e758e3e821ae8a78a3a16ddce) ) // ISSUE1 Q3 + ROM_LOAD16_BYTE( "st.q4", 0x060001, 0x010000, CRC(ec57bc17) SHA1(d9f522739dbb190fb941ca654299bbedbb8fb703) ) // ISSUE1 Q4 + ROM_LOAD16_BYTE( "st.q5", 0x080000, 0x010000, CRC(7740a88b) SHA1(d9a683d3e0d6c1b4b59520f90f825124b7a61168) ) // ISSUE1 Q5 + ROM_LOAD16_BYTE( "st.q6", 0x080001, 0x010000, CRC(95e97796) SHA1(f1a8de0ad02aca31f79a4fe8ba5044546163e3c4) ) // ISSUE1 Q6 + ROM_LOAD16_BYTE( "st.q7", 0x0a0000, 0x010000, CRC(f3b8fe7f) SHA1(52d5be3f8cab419103f4727d0fb9d30f34c8f651) ) // ISSUE1 Q7 + ROM_LOAD16_BYTE( "st.q8", 0x0a0001, 0x010000, CRC(b85e75a2) SHA1(b7b03b090c0ec6d92e9a25abb7fec0507356bdfc) ) // ISSUE1 Q8 + ROM_LOAD16_BYTE( "st.q9", 0x0c0000, 0x010000, CRC(835f6001) SHA1(2cd9084c102d74bcb578c8ea22bbc9ea58f0ceab) ) // ISSUE1 Q9 + ROM_LOAD16_BYTE( "st.qa", 0x0c0001, 0x010000, CRC(3fc62a0e) SHA1(0628de4b962d3fcca3757cd4e89b3005c9bfd218) ) // ISSUE1 Q10 ROM_END ROM_START( v4skltrka ) @@ -2471,31 +2545,31 @@ ROM_START( v4time ) ROM_LOAD16_BYTE( "tm20.p2", 0x000001, 0x010000, CRC(d13b56e4) SHA1(623e73995da93c07b51ce0a5843dba1f853529dd) ) ROM_LOAD16_BYTE( "tm20.p3", 0x020000, 0x010000, CRC(efd3ae64) SHA1(9d2a3b65048e04842205751c6921d2550f38bd52) ) ROM_LOAD16_BYTE( "tm20.p4", 0x020001, 0x010000, CRC(602ba3fb) SHA1(7243f58df9a26adfd1a149a1e60630b187787dd0) ) - ROM_LOAD16_BYTE( "q12.p5" , 0x040000, 0x010000, CRC(adddd8a7) SHA1(73a8dd191eda2f4b41b79d4b55723731953b8970) ) - ROM_LOAD16_BYTE( "q11.p6" , 0x040001, 0x010000, CRC(e8ed736f) SHA1(e7068c550aa39a6e8f1692a16794147e996d36b4) ) - ROM_LOAD16_BYTE( "q14.p7" , 0x060000, 0x010000, CRC(02abb026) SHA1(42224678e5913090c91c21672661beb8e27127a8) ) - ROM_LOAD16_BYTE( "q13.p8" , 0x060001, 0x010000, CRC(3de147dd) SHA1(d2111d54d1604fe2da0133102bbfee706f8f542e) ) - ROM_LOAD16_BYTE( "q16.p9" , 0x080000, 0x010000, CRC(ce2bf15e) SHA1(29c7f2e718bce415b0b8dc6d902bf74dad6b1ef4) ) - ROM_LOAD16_BYTE( "q15.p10", 0x080001, 0x010000, CRC(7894ac8b) SHA1(dc46bd108ac4f67a9062bb7ace91aa51f069cbc8) ) - ROM_LOAD16_BYTE( "q18.p11", 0x0a0000, 0x010000, CRC(27de90b3) SHA1(625c98e555f7b627ea96653926b8917996a2fdb7) ) - ROM_LOAD16_BYTE( "q17.p12", 0x0a0001, 0x010000, CRC(5cab773e) SHA1(59a235c51a975b341bdbb88e909729507408f75b) ) - ROM_LOAD16_BYTE( "q20.p13", 0x0c0000, 0x010000, CRC(083f6c65) SHA1(291ad39ee5f8eba9da293d9206b1f6a6d852f9bd) ) - ROM_LOAD16_BYTE( "q19.p14", 0x0c0001, 0x010000, CRC(73747644) SHA1(ae252fc95c069a3c82e155220fbfcb74dd43bf89) ) + ROM_LOAD16_BYTE( "q12.p5" , 0x040000, 0x010000, CRC(adddd8a7) SHA1(73a8dd191eda2f4b41b79d4b55723731953b8970) ) // ISSUE2 Q12 + ROM_LOAD16_BYTE( "q11.p6" , 0x040001, 0x010000, CRC(e8ed736f) SHA1(e7068c550aa39a6e8f1692a16794147e996d36b4) ) // ISSUE2 Q11 + ROM_LOAD16_BYTE( "q14.p7" , 0x060000, 0x010000, CRC(02abb026) SHA1(42224678e5913090c91c21672661beb8e27127a8) ) // ISSUE2 Q14 + ROM_LOAD16_BYTE( "q13.p8" , 0x060001, 0x010000, CRC(3de147dd) SHA1(d2111d54d1604fe2da0133102bbfee706f8f542e) ) // ISSUE2 Q13 + ROM_LOAD16_BYTE( "q16.p9" , 0x080000, 0x010000, CRC(ce2bf15e) SHA1(29c7f2e718bce415b0b8dc6d902bf74dad6b1ef4) ) // ISSUE3 Q16 + ROM_LOAD16_BYTE( "q15.p10", 0x080001, 0x010000, CRC(7894ac8b) SHA1(dc46bd108ac4f67a9062bb7ace91aa51f069cbc8) ) // ISSUE2 Q15 + ROM_LOAD16_BYTE( "q18.p11", 0x0a0000, 0x010000, CRC(27de90b3) SHA1(625c98e555f7b627ea96653926b8917996a2fdb7) ) // ISSUE3 Q18 + ROM_LOAD16_BYTE( "q17.p12", 0x0a0001, 0x010000, CRC(5cab773e) SHA1(59a235c51a975b341bdbb88e909729507408f75b) ) // ISSUE3 Q17 + ROM_LOAD16_BYTE( "q20.p13", 0x0c0000, 0x010000, CRC(083f6c65) SHA1(291ad39ee5f8eba9da293d9206b1f6a6d852f9bd) ) // ISSUE3 Q19 + ROM_LOAD16_BYTE( "q19.p14", 0x0c0001, 0x010000, CRC(73747644) SHA1(ae252fc95c069a3c82e155220fbfcb74dd43bf89) ) // ISSUE3 Q20 ROM_REGION( 0x800000, "altvideo", 0 ) ROM_LOAD( "tmd.p1", 0x0000, 0x010000, CRC(e21045e0) SHA1(c4d0e80970ec8558db777a882edc5a0c80767375) ) ROM_REGION( 0x800000, "altquestion", 0 ) - ROM_LOAD( "tm.q1", 0x0000, 0x010000, CRC(6af4d58b) SHA1(ee547dad30cd9940f0b017caac97aeb046604f22) ) - ROM_LOAD( "tm.q2", 0x0000, 0x010000, CRC(b01b7687) SHA1(99db448d7e40c2ec16afef3c10abc8a9493f2ab4) ) - ROM_LOAD( "tm.q3", 0x0000, 0x010000, CRC(e97f14eb) SHA1(9163d11e1bc5a13d5002a13bc18b65a91e1738c7) ) - ROM_LOAD( "tm.q4", 0x0000, 0x010000, CRC(6134d918) SHA1(e4b4d6b08d94729d4dcca474d4c7bdcb267530a8) ) - ROM_LOAD( "tm.q5", 0x0000, 0x010000, CRC(6c07814b) SHA1(a97feada5cfa1bb059837b292637fbad9c7137ac) ) - ROM_LOAD( "tm.q6", 0x0000, 0x010000, CRC(5f16a536) SHA1(3435282bfb940604fb44e06dc4748e668768f286) ) - ROM_LOAD( "tm.q7", 0x0000, 0x010000, CRC(9afdce0b) SHA1(a969038d9ce2a2cff1e1a75959c05a3f03f08235) ) - ROM_LOAD( "tm.q8", 0x0000, 0x010000, CRC(f1878251) SHA1(b6a8527112bcdf21b9a0acab4d8fa507a96aaba7) ) - ROM_LOAD( "tm.q9", 0x0000, 0x010000, CRC(ace01faa) SHA1(79d6247a74e1bce0d76ea3788d0022d9e50173c4) ) - ROM_LOAD( "tm.qa", 0x0000, 0x010000, CRC(021f4523) SHA1(10884665f5700c147c7035d0c98f3889917ff015) ) + ROM_LOAD( "tm.q1", 0x0000, 0x010000, CRC(6af4d58b) SHA1(ee547dad30cd9940f0b017caac97aeb046604f22) ) // ISSUE1 Q1 + ROM_LOAD( "tm.q2", 0x0000, 0x010000, CRC(b01b7687) SHA1(99db448d7e40c2ec16afef3c10abc8a9493f2ab4) ) // ISSUE1 Q2 + ROM_LOAD( "tm.q3", 0x0000, 0x010000, CRC(e97f14eb) SHA1(9163d11e1bc5a13d5002a13bc18b65a91e1738c7) ) // ISSUE1 Q3 + ROM_LOAD( "tm.q4", 0x0000, 0x010000, CRC(6134d918) SHA1(e4b4d6b08d94729d4dcca474d4c7bdcb267530a8) ) // ISSUE1 Q4 + ROM_LOAD( "tm.q5", 0x0000, 0x010000, CRC(6c07814b) SHA1(a97feada5cfa1bb059837b292637fbad9c7137ac) ) // ISSUE1 Q5 + ROM_LOAD( "tm.q6", 0x0000, 0x010000, CRC(5f16a536) SHA1(3435282bfb940604fb44e06dc4748e668768f286) ) // ISSUE1 Q6 + ROM_LOAD( "tm.q7", 0x0000, 0x010000, CRC(9afdce0b) SHA1(a969038d9ce2a2cff1e1a75959c05a3f03f08235) ) // ISSUE1 Q7 + ROM_LOAD( "tm.q8", 0x0000, 0x010000, CRC(f1878251) SHA1(b6a8527112bcdf21b9a0acab4d8fa507a96aaba7) ) // ISSUE1 Q8 + ROM_LOAD( "tm.q9", 0x0000, 0x010000, CRC(ace01faa) SHA1(79d6247a74e1bce0d76ea3788d0022d9e50173c4) ) // ISSUE1 Q9 + ROM_LOAD( "tm.qa", 0x0000, 0x010000, CRC(021f4523) SHA1(10884665f5700c147c7035d0c98f3889917ff015) ) // ISSUE1 Q10 ROM_END ROM_START( v4mate ) @@ -2566,12 +2640,36 @@ ROM_START( v4addlad ) ROM_LOAD16_BYTE( "al.q9", 0x0c0000, 0x10000, CRC(22274191) SHA1(9bee5709edcd853e96408f37447c0f5324610903) ) ROM_LOAD16_BYTE( "al.qa", 0x0c0001, 0x10000, CRC(1fe98b4d) SHA1(533afeaea42903905f6f1206bba1a023b141bdd9) ) - ROM_REGION( 0x800000, "altvideo", 0 ) + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "addersandladders_video_mpu4.chr", 0x0000, 0x1000, CRC(2e191981) SHA1(09d57291f73bea6d87007256137d039f5d279235) ) +ROM_END + +ROM_START( v4addladd ) + ROM_REGION( 0x10000, "maincpu", 0 ) + VID_BIOS + + ROM_REGION( 0x800000, "video", 0 ) ROM_LOAD16_BYTE( "ald_21.p1", 0x000000, 0x010000, CRC(ecc7c79c) SHA1(e03f470d0b83ed81af737a1d16a02528df733149) ) + ROM_LOAD16_BYTE( "al_21.p2", 0x000001, 0x010000, CRC(d5909619) SHA1(eb8d978ed28cd3afab6b3c1274d79bc6b188d240) ) + ROM_LOAD16_BYTE( "al_21.p3", 0x020000, 0x010000, CRC(5dc65d9f) SHA1(52dffb162a0e5649e056817e9db567cc7653538c) ) + ROM_LOAD16_BYTE( "al_21.p4", 0x020001, 0x010000, CRC(17c77264) SHA1(321372c1c0d25cfc5a1302ccfd5680d9bf62d31b) ) + ROM_LOAD16_BYTE( "al.q1", 0x040000, 0x10000, CRC(b9b50b70) SHA1(1887ab00ee004e3f27902d6880fa31277a981891) ) + ROM_LOAD16_BYTE( "al.q2", 0x040001, 0x10000, CRC(1bed86ac) SHA1(8e6563b5441ad9ddd468a3d9ae906733fed7912a) ) + ROM_LOAD16_BYTE( "al.q3", 0x060000, 0x10000, CRC(294d8f28) SHA1(9f9aca491ba6c4dc5cfb91da867990a9610c3a28) ) + ROM_LOAD16_BYTE( "al.q4", 0x060001, 0x10000, CRC(aa3e9fbd) SHA1(59d0868f4c8b3f56ca31a11d2e6af83b202bb735) ) + ROM_LOAD16_BYTE( "al.q5", 0x080000, 0x10000, CRC(503f4193) SHA1(86df379c736598ba59446961bf0666e155164e1d) ) + ROM_LOAD16_BYTE( "al.q6", 0x080001, 0x10000, CRC(9fd77e52) SHA1(d8fdebb0fd57ab9ea9797dd386168581a45ebc62) ) + ROM_LOAD16_BYTE( "al.q7", 0x0a0000, 0x10000, CRC(cf3fa7c7) SHA1(fa1edf09c6d3a8b5737474117b0306ef64f7741c) ) + ROM_LOAD16_BYTE( "al.q8", 0x0a0001, 0x10000, CRC(55058a63) SHA1(cf9edef5264f4301be4ee11f221ab67a5183a603) ) + ROM_LOAD16_BYTE( "al.q9", 0x0c0000, 0x10000, CRC(22274191) SHA1(9bee5709edcd853e96408f37447c0f5324610903) ) + ROM_LOAD16_BYTE( "al.qa", 0x0c0001, 0x10000, CRC(1fe98b4d) SHA1(533afeaea42903905f6f1206bba1a023b141bdd9) ) - ROM_REGION( 0x800000, "altvideo2", 0 ) // not sure what these are, they look like different hw?? - ROM_LOAD16_BYTE( "a6ppl.p0", 0x00000, 0x020000, CRC(350da2df) SHA1(a390e0c7e1e624c17f0e254e0b99ef9dbf56269d) ) - ROM_LOAD16_BYTE( "a6ppl.p1", 0x00001, 0x020000, CRC(63038aba) SHA1(8ec4e02109e872460a9598e469b59919cc5450dd) ) + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "addersandladders_video_mpu4.chr", 0x0000, 0x1000, CRC(2e191981) SHA1(09d57291f73bea6d87007256137d039f5d279235) ) ROM_END ROM_START( v4addlad20 ) @@ -2594,15 +2692,21 @@ ROM_START( v4addlad20 ) ROM_LOAD16_BYTE( "al.q9", 0x0c0000, 0x10000, CRC(22274191) SHA1(9bee5709edcd853e96408f37447c0f5324610903) ) ROM_LOAD16_BYTE( "al.qa", 0x0c0001, 0x10000, CRC(1fe98b4d) SHA1(533afeaea42903905f6f1206bba1a023b141bdd9) ) + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "addersandladders_video_mpu4.chr", 0x0000, 0x1000, CRC(2e191981) SHA1(09d57291f73bea6d87007256137d039f5d279235) ) ROM_END - +// for video CPU +// bp 32c4,a0 == ffd001 +// (a4 == aab54) when doing startup questions check ROM_START( v4strike ) ROM_REGION( 0x10000, "maincpu", 0 ) VID_BIOS - ROM_REGION( 0x800000, "video", 0 ) + ROM_REGION( 0x800000, "video", ROMREGION_ERASE00 ) ROM_LOAD16_BYTE( "sils.p1", 0x000000, 0x020000, CRC(66ed6696) SHA1(a6aa68eb212254213db5573dfb9da1e9e06a8e39) ) ROM_LOAD16_BYTE( "sil.p2", 0x000001, 0x020000, CRC(1afc07b7) SHA1(38777d56192b640b003d8dbf4b793cee0c81d9b2) ) ROM_LOAD16_BYTE( "sil.p3", 0x040000, 0x020000, CRC(40f5851c) SHA1(0e3dc0dd2a257a955a1f250556d047481ae87269) ) @@ -2610,7 +2714,18 @@ ROM_START( v4strike ) ROM_LOAD16_BYTE( "sil.p5", 0x080000, 0x020000, CRC(28bced09) SHA1(7ba5013f1e0f4e921581b23c4a1d4c005a043b66) ) ROM_LOAD16_BYTE( "sil.p6", 0x080001, 0x020000, CRC(6f5fc296) SHA1(bd32a937581df6b5a4f08e6ef40c37a2b4278936) ) - ROM_LOAD( "strikeitlucky_questions", 0x0c0000, 0x020000, NO_DUMP ) // no dumps of question ROMs for this game.. + ROM_LOAD16_BYTE( "silq-1.bin", 0x0c0000, 0x020000, CRC(03332145) SHA1(1700f76622a4b195e3ce03d89b886060d7f3ba71) ) // ISSUE3 Q1 v3.1 ('N' questions) (normal) + ROM_LOAD16_BYTE( "silq-2.bin", 0x0c0001, 0x020000, CRC(9659b0cb) SHA1(c573752ef40c8501907d0e41ed2d2566a2dddcb8) ) // ISSUE3 Q2 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-3.bin", 0x100000, 0x020000, CRC(443a6c2d) SHA1(1c111d801d76b07cdfef2b465f7ac759331f1843) ) // ISSUE3 Q3 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-4.bin", 0x100001, 0x020000, CRC(6e84bd19) SHA1(318649fdd3cfec6f7ab0fa6d183a3b94f25a58f5) ) // ISSUE3 Q4 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-5.bin", 0x140000, 0x020000, CRC(444c6d8e) SHA1(ae662747382b12bee77c30620fb0705312084e42) ) // ISSUE3 Q5 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-7.bin", 0x180000, 0x020000, CRC(122f2327) SHA1(5c83f473cbfb7624f6eedd6d6521020b2b838da4) ) // ISSUE3 Q1 v3.1 ('T' questions) (true) + ROM_LOAD16_BYTE( "silq-6.bin", 0x1c0000, 0x020000, CRC(0ea36fd5) SHA1(e0649c77007c092fef4cb11fdd71682c88ca82e6) ) // ISSUE3 Q1 v3.1 ('F' questions) (false) + + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "strikeitlucky_video_mpu4.chr", 0x0000, 0x1000, CRC(ec529c9f) SHA1(9eb2b08afb2955b0a8fe736500888b63f07ace63) ) ROM_END ROM_START( v4striked ) @@ -2625,7 +2740,18 @@ ROM_START( v4striked ) ROM_LOAD16_BYTE( "sil.p5", 0x080000, 0x020000, CRC(28bced09) SHA1(7ba5013f1e0f4e921581b23c4a1d4c005a043b66) ) ROM_LOAD16_BYTE( "sil.p6", 0x080001, 0x020000, CRC(6f5fc296) SHA1(bd32a937581df6b5a4f08e6ef40c37a2b4278936) ) - ROM_LOAD( "strikeitlucky_questions", 0x0c0000, 0x020000, NO_DUMP ) // no dumps of question ROMs for this game.. + ROM_LOAD16_BYTE( "silq-1.bin", 0x0c0000, 0x020000, CRC(03332145) SHA1(1700f76622a4b195e3ce03d89b886060d7f3ba71) ) // ISSUE3 Q1 v3.1 ('N' questions) (normal) + ROM_LOAD16_BYTE( "silq-2.bin", 0x0c0001, 0x020000, CRC(9659b0cb) SHA1(c573752ef40c8501907d0e41ed2d2566a2dddcb8) ) // ISSUE3 Q2 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-3.bin", 0x100000, 0x020000, CRC(443a6c2d) SHA1(1c111d801d76b07cdfef2b465f7ac759331f1843) ) // ISSUE3 Q3 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-4.bin", 0x100001, 0x020000, CRC(6e84bd19) SHA1(318649fdd3cfec6f7ab0fa6d183a3b94f25a58f5) ) // ISSUE3 Q4 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-5.bin", 0x140000, 0x020000, CRC(444c6d8e) SHA1(ae662747382b12bee77c30620fb0705312084e42) ) // ISSUE3 Q5 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-7.bin", 0x180000, 0x020000, CRC(122f2327) SHA1(5c83f473cbfb7624f6eedd6d6521020b2b838da4) ) // ISSUE3 Q1 v3.1 ('T' questions) (true) + ROM_LOAD16_BYTE( "silq-6.bin", 0x1c0000, 0x020000, CRC(0ea36fd5) SHA1(e0649c77007c092fef4cb11fdd71682c88ca82e6) ) // ISSUE3 Q1 v3.1 ('F' questions) (false) + + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "strikeitlucky_video_mpu4.chr", 0x0000, 0x1000, CRC(ec529c9f) SHA1(9eb2b08afb2955b0a8fe736500888b63f07ace63) ) ROM_END ROM_START( v4strike2 ) @@ -2640,7 +2766,18 @@ ROM_START( v4strike2 ) ROM_LOAD16_BYTE( "sil.p5", 0x080000, 0x020000, CRC(28bced09) SHA1(7ba5013f1e0f4e921581b23c4a1d4c005a043b66) ) ROM_LOAD16_BYTE( "sil.p6", 0x080001, 0x020000, CRC(6f5fc296) SHA1(bd32a937581df6b5a4f08e6ef40c37a2b4278936) ) - ROM_LOAD( "strikeitlucky_questions", 0x0c0000, 0x020000, NO_DUMP ) // no dumps of question ROMs for this game.. + ROM_LOAD16_BYTE( "silq-1.bin", 0x0c0000, 0x020000, CRC(03332145) SHA1(1700f76622a4b195e3ce03d89b886060d7f3ba71) ) // ISSUE3 Q1 v3.1 ('N' questions) (normal) + ROM_LOAD16_BYTE( "silq-2.bin", 0x0c0001, 0x020000, CRC(9659b0cb) SHA1(c573752ef40c8501907d0e41ed2d2566a2dddcb8) ) // ISSUE3 Q2 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-3.bin", 0x100000, 0x020000, CRC(443a6c2d) SHA1(1c111d801d76b07cdfef2b465f7ac759331f1843) ) // ISSUE3 Q3 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-4.bin", 0x100001, 0x020000, CRC(6e84bd19) SHA1(318649fdd3cfec6f7ab0fa6d183a3b94f25a58f5) ) // ISSUE3 Q4 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-5.bin", 0x140000, 0x020000, CRC(444c6d8e) SHA1(ae662747382b12bee77c30620fb0705312084e42) ) // ISSUE3 Q5 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-7.bin", 0x180000, 0x020000, CRC(122f2327) SHA1(5c83f473cbfb7624f6eedd6d6521020b2b838da4) ) // ISSUE3 Q1 v3.1 ('T' questions) (true) + ROM_LOAD16_BYTE( "silq-6.bin", 0x1c0000, 0x020000, CRC(0ea36fd5) SHA1(e0649c77007c092fef4cb11fdd71682c88ca82e6) ) // ISSUE3 Q1 v3.1 ('F' questions) (false) + + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "strikeitlucky_video_mpu4.chr", 0x0000, 0x1000, CRC(ec529c9f) SHA1(9eb2b08afb2955b0a8fe736500888b63f07ace63) ) ROM_END ROM_START( v4strike2d ) @@ -2655,7 +2792,18 @@ ROM_START( v4strike2d ) ROM_LOAD16_BYTE( "sil.p5", 0x080000, 0x020000, CRC(28bced09) SHA1(7ba5013f1e0f4e921581b23c4a1d4c005a043b66) ) ROM_LOAD16_BYTE( "sil.p6", 0x080001, 0x020000, CRC(6f5fc296) SHA1(bd32a937581df6b5a4f08e6ef40c37a2b4278936) ) - ROM_LOAD( "strikeitlucky_questions", 0x0c0000, 0x020000, NO_DUMP ) // no dumps of question ROMs for this game.. + ROM_LOAD16_BYTE( "silq-1.bin", 0x0c0000, 0x020000, CRC(03332145) SHA1(1700f76622a4b195e3ce03d89b886060d7f3ba71) ) // ISSUE3 Q1 v3.1 ('N' questions) (normal) + ROM_LOAD16_BYTE( "silq-2.bin", 0x0c0001, 0x020000, CRC(9659b0cb) SHA1(c573752ef40c8501907d0e41ed2d2566a2dddcb8) ) // ISSUE3 Q2 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-3.bin", 0x100000, 0x020000, CRC(443a6c2d) SHA1(1c111d801d76b07cdfef2b465f7ac759331f1843) ) // ISSUE3 Q3 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-4.bin", 0x100001, 0x020000, CRC(6e84bd19) SHA1(318649fdd3cfec6f7ab0fa6d183a3b94f25a58f5) ) // ISSUE3 Q4 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-5.bin", 0x140000, 0x020000, CRC(444c6d8e) SHA1(ae662747382b12bee77c30620fb0705312084e42) ) // ISSUE3 Q5 v3.1 ('N' questions) + ROM_LOAD16_BYTE( "silq-7.bin", 0x180000, 0x020000, CRC(122f2327) SHA1(5c83f473cbfb7624f6eedd6d6521020b2b838da4) ) // ISSUE3 Q1 v3.1 ('T' questions) (true) + ROM_LOAD16_BYTE( "silq-6.bin", 0x1c0000, 0x020000, CRC(0ea36fd5) SHA1(e0649c77007c092fef4cb11fdd71682c88ca82e6) ) // ISSUE3 Q1 v3.1 ('F' questions) (false) + + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "strikeitlucky_video_mpu4.chr", 0x0000, 0x1000, CRC(ec529c9f) SHA1(9eb2b08afb2955b0a8fe736500888b63f07ace63) ) ROM_END ROM_START( v4eyedwn ) @@ -2742,10 +2890,47 @@ ROM_START( v4barqst ) VID_BIOS ROM_REGION( 0x800000, "video", 0 ) - ROM_LOAD16_BYTE( "bqd.p1", 0x000000, 0x010000, CRC(b574ea46) SHA1(0eb446fbf4f7fcd1b30f35631b4b521730ce26b4) ) - ROM_LOAD16_BYTE( "bq.p2", 0x000001, 0x010000, CRC(b9ce9f2e) SHA1(9407a83d1713b641dc551dd73f357d99baebbba2) ) + ROM_LOAD16_BYTE( "bq-6.p1", 0x000000, 0x010000, CRC(f5f81993) SHA1(5975da2b944a8e9cb4bb285d87d64740d9ec045b) ) + ROM_LOAD16_BYTE( "bq-6.p2", 0x000001, 0x010000, CRC(b9ce9f2e) SHA1(9407a83d1713b641dc551dd73f357d99baebbba2) ) + ROM_LOAD16_BYTE( "bq-iss4.p1", 0x020000, 0x010000, CRC(f8c9e00b) SHA1(b0081756667068eaaf02f34a161b52024e163018) ) + ROM_LOAD16_BYTE( "bq-iss4.p2", 0x020001, 0x010000, CRC(211d7779) SHA1(c1d835dd4758f28b7bd4e81ea5d3316704fe8ff3) ) + ROM_LOAD16_BYTE( "bq-iss4.p3", 0x040000, 0x010000, CRC(b6066dec) SHA1(63f66f004f6c66dc1bd61385407e1adb4a678ccd) ) + ROM_LOAD16_BYTE( "bq-iss4.p4", 0x040001, 0x010000, CRC(71a2a3cf) SHA1(41d95d34b801f54bf4f1044d7bb88704c9a318a0) ) + ROM_LOAD16_BYTE( "bq-iss4.p5", 0x060000, 0x010000, CRC(13cfb410) SHA1(fca72e403a8c150aba73fd501a1a7cfd62bd28ac) ) + ROM_LOAD16_BYTE( "bq-iss4.p6", 0x060001, 0x010000, CRC(f8847e9d) SHA1(49213302f63efc6e2b6728fed98c0094d023c100) ) + ROM_LOAD16_BYTE( "bq-iss4.p7", 0x080000, 0x010000, CRC(1f3b3d33) SHA1(117f7121123336e3b33a3d1838ddca9161a7868b) ) + ROM_LOAD16_BYTE( "bq-iss4.p8", 0x080001, 0x010000, CRC(54007030) SHA1(65306938b2737f7423223eb0290ee69b2955176e) ) + ROM_LOAD16_BYTE( "bq-iss4.p9", 0x0a0000, 0x010000, CRC(2971f5ca) SHA1(0de9b1d743243d6e127f5417485f1a9fa76d5399) ) + ROM_LOAD16_BYTE( "bq-iss4.p10", 0x0a0001, 0x010000, CRC(d54f961f) SHA1(14273cf78371550dd525843b388915df567342ce) ) - ROM_LOAD( "barquest_questions", 0x040000, 0x020000, NO_DUMP ) // no dumps of question ROMs for this game.. + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "barquest.chr", 0x0000, 0x1000, CRC(bc9971fe) SHA1(902684318ad0755ee062a7f10e2c3171b5c4933f) ) +ROM_END + +ROM_START( v4barqstd ) + ROM_REGION( 0x10000, "maincpu", 0 ) + VID_BIOS + + ROM_REGION( 0x800000, "video", 0 ) + ROM_LOAD16_BYTE( "bqd.p1", 0x000000, 0x010000, CRC(b574ea46) SHA1(0eb446fbf4f7fcd1b30f35631b4b521730ce26b4) ) + ROM_LOAD16_BYTE( "bq.p2", 0x000001, 0x010000, CRC(b9ce9f2e) SHA1(9407a83d1713b641dc551dd73f357d99baebbba2) ) + ROM_LOAD16_BYTE( "bq-iss4.p1", 0x020000, 0x010000, CRC(f8c9e00b) SHA1(b0081756667068eaaf02f34a161b52024e163018) ) + ROM_LOAD16_BYTE( "bq-iss4.p2", 0x020001, 0x010000, CRC(211d7779) SHA1(c1d835dd4758f28b7bd4e81ea5d3316704fe8ff3) ) + ROM_LOAD16_BYTE( "bq-iss4.p3", 0x040000, 0x010000, CRC(b6066dec) SHA1(63f66f004f6c66dc1bd61385407e1adb4a678ccd) ) + ROM_LOAD16_BYTE( "bq-iss4.p4", 0x040001, 0x010000, CRC(71a2a3cf) SHA1(41d95d34b801f54bf4f1044d7bb88704c9a318a0) ) + ROM_LOAD16_BYTE( "bq-iss4.p5", 0x060000, 0x010000, CRC(13cfb410) SHA1(fca72e403a8c150aba73fd501a1a7cfd62bd28ac) ) + ROM_LOAD16_BYTE( "bq-iss4.p6", 0x060001, 0x010000, CRC(f8847e9d) SHA1(49213302f63efc6e2b6728fed98c0094d023c100) ) + ROM_LOAD16_BYTE( "bq-iss4.p7", 0x080000, 0x010000, CRC(1f3b3d33) SHA1(117f7121123336e3b33a3d1838ddca9161a7868b) ) + ROM_LOAD16_BYTE( "bq-iss4.p8", 0x080001, 0x010000, CRC(54007030) SHA1(65306938b2737f7423223eb0290ee69b2955176e) ) + ROM_LOAD16_BYTE( "bq-iss4.p9", 0x0a0000, 0x010000, CRC(2971f5ca) SHA1(0de9b1d743243d6e127f5417485f1a9fa76d5399) ) + ROM_LOAD16_BYTE( "bq-iss4.p10", 0x0a0001, 0x010000, CRC(d54f961f) SHA1(14273cf78371550dd525843b388915df567342ce) ) + + ROM_REGION( 0x1000, "video_prot", 0 ) + // this is a state result dump of the PAL, a 64x64 table of 6-bit values, where a write sets the column index + // and the result of the previous read sets the row index, and a write of 00 resets the state machine? + ROM_LOAD( "barquest.chr", 0x0000, 0x1000, CRC(bc9971fe) SHA1(902684318ad0755ee062a7f10e2c3171b5c4933f) ) ROM_END ROM_START( v4barqs2 ) @@ -3702,8 +3887,8 @@ GAMEL( 1993, v4cmazedat, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crm GAMEL( 1993, v4cmazeb, v4cmaze, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze (v1.2) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 GAMEL( 1993, v4cmazec, v4cmaze, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze (v1.3 alt) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 GAMEL( 1993, v4cmazed, v4cmaze, crmaze, crmaze, mpu4vid_state, init_v4cmazeb, ROT0, "Barcrest","The Crystal Maze (v1.1) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.6 -GAMEL( 1993, v4cmazea, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmazea, ROT0, "Barcrest","The Crystal Maze (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 (actually newer than the 1.1 set then??) +GAMEL( 1993, v4cmazea, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmazea, ROT0, "Barcrest","The Crystal Maze (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9 (actually newer than the 1.1 set then??) GAMEL( 1993, v4cmaze2, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze2, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.2) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0 GAMEL( 1993, v4cmaze2d, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze2, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.2, Datapak) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0D @@ -3719,27 +3904,36 @@ GAMEL( 1994, v4cmaze3c, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_v4c GAMEL( 1994, v4cmaze3a, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze3a, ROT0, "Barcrest","The Crystal Maze Team Challenge (v1.2, AMLD) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 0.7 +//Year is a guess, based on the use of the 'Coin Man' logo +GAME( 1996?,v4mate, v4bios, mating, mating, mpu4vid_state, init_mating, ROT0, "Barcrest","The Mating Game (v0.4) (MPU4 Video)",GAME_FLAGS )//SWP 0.2 /* Using crmaze controls for now, cabinet has trackball */ +GAME( 1996?,v4mated, v4mate, mating, mating, mpu4vid_state, init_mating, ROT0, "Barcrest","The Mating Game (v0.4, Datapak) (MPU4 Video)",GAME_FLAGS )//SWP 0.2D + +/* Quiz games - Questions decoded */ + +GAME( 1989, v4addlad, v4bios, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.1) (MPU4 Video)",GAME_FLAGS ) +GAME( 1989, v4addladd, v4addlad, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.1d) (MPU4 Video)",GAME_FLAGS ) +GAME( 1989, v4addlad20, v4addlad, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.0) (MPU4 Video)",GAME_FLAGS ) + +GAME( 199?, v4strike, v4bios, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.5) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4striked, v4strike, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.5, Datapak) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4strike2, v4strike, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.53) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4strike2d, v4strike, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.53, Datapak) (MPU4 Video)",GAME_FLAGS ) + +GAME( 199?, v4barqst, v4bios, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Barquest (v2.6) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4barqstd, v4barqst, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Barquest (v2.6d) (MPU4 Video)",GAME_FLAGS ) + +/* Quiz games - Questions not decoded properly on games below (no complete characteriser table) */ + GAME( 199?, v4turnov, v4bios, mpu4_vid, turnover, mpu4vid_state, init_turnover, ROT0, "Barcrest","Turnover (v2.3) (MPU4 Video)",GAME_FLAGS ) GAME( 1990, v4skltrk, v4bios, mpu4_vid, skiltrek, mpu4vid_state, init_skiltrek, ROT0, "Barcrest","Skill Trek (v1.1) (MPU4 Video, set 1)",GAME_FLAGS ) // 10 pound max GAME( 1990, v4skltrka, v4skltrk, mpu4_vid, skiltrek, mpu4vid_state, init_skiltrek, ROT0, "Barcrest","Skill Trek (v1.1) (MPU4 Video, set 2)",GAME_FLAGS ) // 12 pound max -GAME( 1990, v4sklcsh, v4bios, mpu4_vid, skiltrek, mpu4vid_state, init_v4barqst, ROT0, "Barcrest","Skill Cash (v1.1) (MPU4 Video)",GAME_FLAGS ) - -GAME( 1989, v4addlad, v4bios, mpu4_vid, adders, mpu4vid_state, init_adders, ROT0, "Barcrest","Adders and Ladders (v2.1) (MPU4 Video)",GAME_FLAGS ) -GAME( 1989, v4addlad20, v4addlad, mpu4_vid, adders, mpu4vid_state, init_adders, ROT0, "Barcrest","Adders and Ladders (v2.0) (MPU4 Video)",GAME_FLAGS ) GAME( 1989, v4time, v4bios, mpu4_vid, skiltrek, mpu4vid_state, init_timemchn, ROT0, "Barcrest","Time Machine (v2.0) (MPU4 Video)",GAME_FLAGS ) -//Year is a guess, based on the use of the 'Coin Man' logo -GAME( 1996?,v4mate, v4bios, mating, mating, mpu4vid_state, init_mating, ROT0, "Barcrest","The Mating Game (v0.4) (MPU4 Video)",GAME_FLAGS )//SWP 0.2 /* Using crmaze controls for now, cabinet has trackball */ -GAME( 1996?,v4mated, v4mate, mating, mating, mpu4vid_state, init_mating, ROT0, "Barcrest","The Mating Game (v0.4, Datapak) (MPU4 Video)",GAME_FLAGS )//SWP 0.2D - -/* Games below are missing question ROMs */ +/* Quiz games - Games below are missing question ROMs */ -GAME( 199?, v4strike, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.5) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4striked, v4strike, mpu4_vid, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.5, Datapak) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4strike2, v4strike, mpu4_vid, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.53) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4strike2d, v4strike, mpu4_vid, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.53, Datapak) (MPU4 Video)",GAME_FLAGS ) +GAME( 1990, v4sklcsh, v4bios, mpu4_vid, skiltrek, mpu4vid_state, init_v4barqst, ROT0, "Barcrest","Skill Cash (v1.1) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4eyedwn, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_eyesdown, ROT0, "Barcrest","Eyes Down (v1.3) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4eyedwnd, v4eyedwn, mpu4_vid, mpu4, mpu4vid_state, init_eyesdown, ROT0, "Barcrest","Eyes Down (v1.3, Datapak) (MPU4 Video)",GAME_FLAGS ) @@ -3749,8 +3943,7 @@ GAME( 199?, v4quidgrd, v4quidgr, mpu4_vid, mpu4, mpu4vid_state, init_qui GAME( 199?, v4quidgr2, v4quidgr, mpu4_vid, mpu4, mpu4vid_state, init_quidgrid, ROT0, "Barcrest","Ten Quid Grid (v2.4) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4quidgr2d, v4quidgr, mpu4_vid, mpu4, mpu4vid_state, init_quidgrid, ROT0, "Barcrest","Ten Quid Grid (v2.4, Datapak) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4barqst, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_v4barqst, ROT0, "Barcrest","Barquest (v2.6d) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4barqs2, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_v4barqst2, ROT0, "Barcrest","Barquest 2 (v0.3) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4barqs2, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_v4barqst2, ROT0, "Barcrest","Barquest 2 (v0.3) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4wize, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_v4wize, ROT0, "Barcrest","Wize Move (v1.3d) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4wizea, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_v4wize, ROT0, "Barcrest","Wize Move (v1.2) (MPU4 Video)",GAME_FLAGS ) @@ -3758,58 +3951,76 @@ GAME( 199?, v4wizea, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_v4w GAME( 1991, v4opt3, v4bios, mpu4_vid, mpu4, mpu4vid_state, init_v4opt3, ROT0, "Barcrest","Option 3 (v1.0) (MPU4 Video)",GAME_FLAGS ) GAME( 1991, v4opt3d, v4opt3, mpu4_vid, mpu4, mpu4vid_state, init_v4opt3, ROT0, "Barcrest","Option 3 (v1.0) (Datapak) (MPU4 Video)",GAME_FLAGS ) - - - /* Games below are newer BwB games and use their own BIOS ROMs and hardware setups*/ GAME( 199?, v4vgpok, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Vegas Poker (prototype, release 2) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4psi, 0, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.1) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4psia, 0, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.2) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4psib, 0, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.0?) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4psi14d, 0, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.4D?) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4psi20d, 0, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.0D?) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4psi214, 0, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.14?) (MPU4 Video)",GAME_FLAGS ) -// bad dump -GAME( 199?, v4blox, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Blox (v2.0) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4psia, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.2) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4psib, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.0?) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4psi14d, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.4D?) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4psi20d, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.0D?) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4psi214, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.14?) (MPU4 Video)",GAME_FLAGS ) + +GAME( 199?, v4blox, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Blox (v2.0) (MPU4 Video)",GAME_FLAGS ) // bad dump GAME( 199?, v4bloxd, v4blox, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Blox (v2.0, Datapak) (MPU4 Video)",GAME_FLAGS ) + +GAME( 199?, v4bulblx, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Bullion Blox (Bwb) (MPU4 Video)",GAME_FLAGS ) // is this the same game as v4blox? + GAME( 1996, v4reno, 0, bwbvid5, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Reno Reels (20p/10GBP Cash, release A) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4bigfrt, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Big Fruits (v2.0?) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4bubbnk, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Bubbly Bonk (v4.0?) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4mazbel, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Mazooma Belle (v2.5) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4mazbla, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Mazooma Belle (v1.5) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4mazbla, v4mazbel, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Mazooma Belle (v1.5) (MPU4 Video)",GAME_FLAGS ) + +GAME( 199?, v4rhmaz, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Red Hot Mazooma Belle (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4shpwnd, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Shop Window (v2.0) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4redhtp, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Red Hot Poker (20p/10GBP Cash, release 3) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4tetrs, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","BwB Tetris v 2.2 (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4tetrs1, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","BwB Tetris v 1.0? (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4tetrs1, v4tetrs, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","BwB Tetris v 1.0? (MPU4 Video)",GAME_FLAGS ) + +GAME( 199?, v4pztet, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Prize Tetris (Bwb) (MPU4 Video, set 1)",GAME_FLAGS ) // is this the same as v4tetrs? +GAME( 199?, v4pzteta, v4pztet, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Prize Tetris (Bwb) (MPU4 Video, set 2)",GAME_FLAGS ) GAME( 199?, v4big40, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Big 40 Poker (Bwb) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4bulblx, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Bullion Blox (Bwb) (MPU4 Video)",GAME_FLAGS ) // is this the same game as v4blox? + GAME( 199?, v4cshinf, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Cash Inferno (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4dbltak, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Double Take (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4gldrsh, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Gold Rush (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4mdice, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Miami Dice (Bwb) (MPU4 Video)",GAME_FLAGS ) // is this the same as the Nova game below? + GAME( 199?, v4monte, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Monte Carlo Or Bust (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4ovrmn3, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Over Moon Pt3 (Bwb) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4pztet, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Prize Tetris (Bwb) (MPU4 Video, set 1)",GAME_FLAGS ) // is this the same as v4tetrs? -GAME( 199?, v4pzteta, v4pztet, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Prize Tetris (Bwb) (MPU4 Video, set 2)",GAME_FLAGS ) -GAME( 199?, v4rhmaz, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Red Hot Mazooma Belle (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4sunbst, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Sunburst (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4timebn, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Time Bandit (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4sixx, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","6-X (Bwb) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4megbuk, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Megabucks Poker (Bwb) (MPU4 Video)",GAME_FLAGS ) // no video roms! -GAME( 199?, v4rencas, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Reno Casino (Bwb) (MPU4 Video)",GAME_FLAGS ) // no video roms! +GAME( 199?, v4rencas, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Reno Casino (Bwb) (MPU4 Video)",GAME_FLAGS ) // no video roms! /* Uncertain BIOS */ GAME( 199?, v4frfact, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Bwb","Fruit Factory (Bwb) (MPU4 Video)", GAME_FLAGS ) - /* Nova - is this the same video board? One of the games displays 'Resetting' but the others do nothing interesting and access strange addresses */ /* All contain BwB video in the BIOS rom tho */ GAME( 199?, v4cybcas, 0, bwbvid5, mpu4, mpu4vid_state, init_cybcas, ROT0, "Nova","Cyber Casino (Nova) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4miami, 0, bwbvid5, mpu4, mpu4vid_state, empty_init, ROT0, "Nova","Miami Dice (Nova) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4missis, 0, bwbvid5, mpu4, mpu4vid_state, empty_init, ROT0, "Nova","Mississippi Lady (Nova) (MPU4 Video)",GAME_FLAGS ) + GAME( 199?, v4picdil, 0, bwbvid5, mpu4, mpu4vid_state, empty_init, ROT0, "Nova","Piccadilly Nights (Nova) (MPU4 Video)",GAME_FLAGS ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 00cf6a96c03..c80f60f59de 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -28913,9 +28913,11 @@ m4elite // Elite (Barcrest) @source:mpu4vid.cpp v4addlad // Adders and Ladders +v4addladd // v4addlad20 // v4barqs2 // Barquest 2 (v0.3) -v4barqst // Barquest (v2.6d) +v4barqst // Barquest (v2.6) +v4barqstd // v4big40 // Big 40 v4bigfrt // Big Fruits v4bios // MPU4 Video Firmware -- cgit v1.2.3 From 4e177c8b5d442ddea1f627b23c63216effc8f487 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 9 Jul 2020 16:53:07 +0200 Subject: New working clones ------------------ Ms. Pac-Man (bootleg, set 3) [Andrew Welburn] --- src/mame/drivers/pacman.cpp | 33 ++++++++++++++++++++++++++++++++- src/mame/mame.lst | 1 + 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp index 53f5a5083b5..56870f93846 100644 --- a/src/mame/drivers/pacman.cpp +++ b/src/mame/drivers/pacman.cpp @@ -3610,6 +3610,7 @@ void pacman_state::piranha(machine_config &config) pacman(config); /* basic machine hardware */ + m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::woodpek_map); m_maincpu->set_addrmap(AS_IO, &pacman_state::piranha_portmap); } @@ -5152,6 +5153,35 @@ ROM_START( abscam ) ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) /* timing - not used */ ROM_END +ROM_START( mspacmab3 ) // main PCB with GDP-02 auxiliary card + ROM_REGION( 0x10000, "maincpu",0 ) + ROM_LOAD( "p1.6ef", 0x0000, 0x1000, CRC(50b38941) SHA1(c798fe6efe7ec6d15add74986d72d9ea8676d14a) ) // could also be d instead of p + ROM_LOAD( "p2.7ef", 0x1000, 0x1000, CRC(195883b8) SHA1(3395fd2f9963b1809fc55a4f1c998673de75793b) ) // could also be d instead of p + ROM_LOAD( "p3.bin", 0x2000, 0x1000, CRC(124a4507) SHA1(a7c82970ac53129c7a642322214adee4206298ff) ) // could also be d instead of p + ROM_LOAD( "p4.bin", 0x3000, 0x1000, CRC(08ac65da) SHA1(745d9d054c33df96a7f27a1f4575f8770d92ac10) ) // could also be d instead of p + ROM_LOAD( "d5.6fh", 0x8000, 0x1000, CRC(50b29f09) SHA1(27ca2cdf57b96d628b1811210d254b107e2f324e) ) + ROM_LOAD( "d6.6j", 0x9000, 0x0800, CRC(33b09ed9) SHA1(a2a3e069cce442c3b179315e90476cd431c604c2) ) + + ROM_REGION( 0x2000, "gfx1" , 0 ) + ROM_LOAD( "d7.5de", 0x0000, 0x0800, CRC(b5d8c872) SHA1(d137b0cff8635a6a02f9334b7fa72dc1a623fe9b) ) + ROM_LOAD( "d9.5fh", 0x0800, 0x0800, CRC(9b2b936c) SHA1(d6f57d0ce6fba37d4838cdcace7e2e02c94b1ba1) ) + ROM_LOAD( "d8.5ef", 0x1000, 0x0800, CRC(a70a6ac4) SHA1(81b0c56697bb671cc43928133446da74e74b4982) ) + ROM_LOAD( "d10.5j", 0x1800, 0x0800, CRC(53368498) SHA1(0409288fe59c2bbf2730c31e4c7817392a544165) ) + + ROM_REGION( 0x0120, "proms", 0 ) + ROM_LOAD( "6331.8h", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) + ROM_LOAD( "6301.4a", 0x0020, 0x0100, CRC(720528b4) SHA1(1f8fee1b8dec02cb19e706ca807438cec512479c) ) // 11xxxxxxx = 0x00 + ROM_IGNORE( 0x0100 ) + + ROM_REGION( 0x0200, "namco", 0 ) // sound PROMs + ROM_LOAD( "63s141.1k", 0x0000, 0x0100, CRC(459d2618) SHA1(14ba61caada575909b4dbd57e7342dc84722325d) ) + ROM_IGNORE( 0x0100 ) // 1xxxxxxxx = 0x00 + ROM_LOAD( "63s141.3k", 0x0100, 0x0100, CRC(fcc24d5d) SHA1(7ae2523f92cccdbd8db8bda80c613a2f90220807) ) // timing - not used + ROM_IGNORE( 0x0100 ) // 11xxxxxxx = 0x00 + + ROM_REGION( 0x0200, "gdp02_prom", 0 ) // currently not used by the emulation + ROM_LOAD( "82s141.i14", 0x0000, 0x0200, CRC(8d43d0a6) SHA1(be4e0d86ce4c6f1833cc0efc18277b4e04dc458f) ) // 1ST AND 2ND HALF IDENTICAL +ROM_END ROM_START( ctrpllrp ) ROM_REGION( 0x10000, "maincpu",0 ) @@ -7311,7 +7341,7 @@ void pacman_state::init_eyes() /* Data lines D3 and D5 swapped */ uint8_t *RAM = memregion("maincpu")->base(); - for (int i = 0; i < 0x4000; i++) + for (int i = 0; i < 0xc000; i++) { RAM[i] = bitswap<8>(RAM[i],7,6,3,4,5,2,1,0); } @@ -7661,6 +7691,7 @@ GAME( 1982, joyman, puckman, pacman, pacman, pacman_state, empty_init, GAME( 1982, ctrpllrp, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "hack", "Caterpillar Pacman Hack", MACHINE_SUPPORTS_SAVE ) GAME( 1981, piranha, puckman, piranha, mspacman, pacman_state, init_eyes, ROT90, "GL (US Billiards license)", "Piranha", MACHINE_SUPPORTS_SAVE ) GAME( 1981, piranhao, puckman, piranha, mspacman, pacman_state, init_eyes, ROT90, "GL (US Billiards license)", "Piranha (older)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, mspacmab3,puckman, piranha, mspacman, pacman_state, init_eyes, ROT90, "bootleg", "Ms. Pac-Man (bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, abscam, puckman, piranha, mspacman, pacman_state, init_eyes, ROT90, "GL (US Billiards license)", "Abscam", MACHINE_SUPPORTS_SAVE ) GAME( 1981, piranhah, puckman, pacman, mspacman, pacman_state, empty_init, ROT90, "hack", "Piranha (hack)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, titanpac, puckman, piranha, mspacman, pacman_state, init_eyes, ROT90, "hack", "Titan (Pac-Man hack)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index c80f60f59de..a4cceb229f1 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -32361,6 +32361,7 @@ mspacii // bootleg mspacii2 // bootleg mspacmab // bootleg mspacmab2 // bootleg +mspacmab3 // bootleg mspacman // (c) 1981 Midway // made by General Computer mspacmanbcc // bootleg mspacmanbco // bootleg -- cgit v1.2.3 From be6924832da5675e8aa4f7cb3f901e4d9e2d4300 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 9 Jul 2020 17:03:13 +0200 Subject: progolf.cpp: documented differing opcode in progolfa which causes the wrong ball positioning (nw) --- src/mame/drivers/progolf.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mame/drivers/progolf.cpp b/src/mame/drivers/progolf.cpp index f7b81e56e03..17a11adf8c3 100644 --- a/src/mame/drivers/progolf.cpp +++ b/src/mame/drivers/progolf.cpp @@ -488,6 +488,8 @@ ROM_START( progolf ) ROM_LOAD( "gam.k11", 0x0040, 0x0020, CRC(b9665de3) SHA1(4c5aba5f6589f4bce4692c0d5bb2811ab8e14aed) ) ROM_END +// top board: GGM-Ø2 DE-0087C-0 +// bottom board: GGM-Ø1 DE-0086B-0 ROM_START( progolfa ) ROM_REGION( 0x10000, "maincpu", 0 ) // custom DECO CPU-6 module ROM_LOAD( "g4-m.a3", 0xb000, 0x1000, CRC(015a08d9) SHA1(671d5cd708e098dbda3e495a8b4ce3393c6971da) ) @@ -495,6 +497,8 @@ ROM_START( progolfa ) ROM_LOAD( "g2-m.a6", 0xd000, 0x1000, CRC(fafec36e) SHA1(70880d6f9b11505d466f36c12a43361ee2639fed) ) ROM_LOAD( "g1-m.a8", 0xe000, 0x1000, CRC(749032eb) SHA1(daa356b2c70bcd8cdd0c4df4268b6158bc8aae8e) ) ROM_LOAD( "g0-m.a9", 0xf000, 0x1000, CRC(a03c533f) SHA1(2e0006be40e32b64b1490bd339d9fc9302eee7c4) ) + // the following single byte patch gets the ball position to be correct like in the parent. TODO: verify g3-m.a4 dump + // ROM_FILL( 0xc14b, 0x01, 0xf0) // from: EB 07 sbc #$07 to: F0 07 beq $c154 ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "g5-m.b1", 0xf000, 0x1000, CRC(0c6fadf5) SHA1(9af2c2152b339cadab7aff0b0164d4431d2558bd) ) -- cgit v1.2.3 From 700d95e88f665f7ba0029ccb31684206432d92ee Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 10 Jul 2020 02:41:24 +1000 Subject: llc2: cleanup, added cassette --- src/mame/drivers/llc2.cpp | 189 +++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 96 deletions(-) diff --git a/src/mame/drivers/llc2.cpp b/src/mame/drivers/llc2.cpp index bd0b6d896c0..b22de1b0774 100644 --- a/src/mame/drivers/llc2.cpp +++ b/src/mame/drivers/llc2.cpp @@ -2,24 +2,21 @@ // copyright-holders:Miodrag Milanovic, Robbbert /****************************************************************************** - LLC driver by Miodrag Milanovic +LLC2 driver by Miodrag Milanovic - 17/04/2009 Preliminary driver. +2009-04-17 Preliminary driver. - July 2012, updates by Robbbert +2012-07-?? Updates by Robbbert - Very little info available on these computers. +The BEL character plays a short tune. +In the monitor, it is case sensitive, most commands are uppercase, + but some are lowercase. +To start Basic, the command is b. To quit basic, use BYE. +Inside Basic, it is not case-sensitive. - LLC2: - The BEL character plays a short tune. - In the monitor, it is case sensitive, most commands are uppercase, - but some are lowercase. - To start Basic, the command is b. To quit basic, use BYE. - Inside Basic, it is not case-sensitive. - - ToDo: - - LLC2: Keyboard is incomplete - - Lots of other things +ToDo: +- Unofficial expansions +- Need software *******************************************************************************/ @@ -31,6 +28,7 @@ #include "machine/ram.h" #include "machine/z80ctc.h" #include "machine/z80pio.h" +#include "imagedev/cassette.h" #include "sound/spkrdev.h" #include "emupal.h" #include "screen.h" @@ -47,6 +45,10 @@ public: , m_maincpu(*this, "maincpu") , m_ram(*this, RAM_TAG) , m_p_chargen(*this, "chargen") + , m_cass(*this, "cassette") + , m_ctc(*this, "ctc") + , m_bankr(*this, "bankr%u", 0U) + , m_bankw(*this, "bankw%u", 0U) { } void llc2(machine_config &config); @@ -56,42 +58,46 @@ public: private: void machine_start() override; void machine_reset() override; - void llc2_rom_disable_w(u8 data); - void llc2_basic_enable_w(u8 data); - u8 llc2_port1_b_r(); - u8 llc2_port2_a_r(); - void llc2_port1_b_w(u8 data); - u32 screen_update_llc2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void rom_disable_w(u8 data); + void basic_enable_w(u8 data); + u8 port1b_r(); + u8 port2a_r(); + void port1b_w(u8 data); + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void io_map(address_map &map); void mem_map(address_map &map); bool m_rv; required_device m_speaker; - optional_shared_ptr m_vram; + required_shared_ptr m_vram; required_device m_maincpu; required_device m_ram; required_region_ptr m_p_chargen; + required_device m_cass; + required_device m_ctc; + required_memory_bank_array<2> m_bankr; + required_memory_bank_array<2> m_bankw; }; /* Address maps */ void llc2_state::mem_map(address_map &map) { - map(0x0000, 0x3fff).bankrw("bank1"); - map(0x4000, 0x5fff).bankrw("bank2"); - map(0x6000, 0xbfff).bankrw("bank3"); - map(0xc000, 0xffff).bankrw("bank4"); + map(0x0000, 0x3fff).bankr("bankr0").bankw("bankw0"); + map(0x4000, 0x5fff).bankr("bankr1").bankw("bankw1"); + map(0x6000, 0xbfff).ram(); + map(0xc000, 0xffff).ram().share("videoram"); } void llc2_state::io_map(address_map &map) { map.global_mask(0xff); map.unmap_value_high(); - map(0xE0, 0xE3).w(FUNC(llc2_state::llc2_rom_disable_w)); - map(0xE4, 0xE7).rw("z80pio2", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); - map(0xE8, 0xEB).rw("z80pio1", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); - map(0xEC, 0xEC).w(FUNC(llc2_state::llc2_basic_enable_w)); - map(0xF8, 0xFB).rw("z80ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); + map(0xE0, 0xE3).w(FUNC(llc2_state::rom_disable_w)); + map(0xE4, 0xE7).rw("pio2", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); + map(0xE8, 0xEB).rw("pio1", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); + map(0xEC, 0xEC).w(FUNC(llc2_state::basic_enable_w)); + map(0xF8, 0xFB).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); } /* Input ports */ @@ -102,74 +108,53 @@ INPUT_PORTS_END /* Driver initialization */ void llc2_state::init_llc2() { - m_vram.set_target( m_ram->pointer() + 0xc000,m_vram.bytes()); + u8 *r = m_ram->pointer(); + u8 *m = memregion("maincpu")->base(); + + m_bankr[0]->configure_entry(0, r); + m_bankr[0]->configure_entry(1, m); + m_bankw[0]->configure_entry(0, r); + m_bankr[1]->configure_entry(0, r+0x4000); + m_bankr[1]->configure_entry(1, m+0x4000); + m_bankw[1]->configure_entry(0, r+0x4000); } void llc2_state::machine_reset() { - address_space &space = m_maincpu->space(AS_PROGRAM); - u8 *ram = m_ram->pointer(); - - space.unmap_write(0x0000, 0x3fff); - membank("bank1")->set_base(memregion("maincpu")->base()); - - space.unmap_write(0x4000, 0x5fff); - membank("bank2")->set_base(ram + 0x4000); - - space.unmap_write(0x6000, 0xbfff); - membank("bank3")->set_base(ram + 0x6000); - - space.install_write_bank(0xc000, 0xffff, "bank4"); - membank("bank4")->set_base(ram + 0xc000); + m_bankr[0]->set_entry(1); + m_bankw[0]->set_entry(0); + m_bankr[1]->set_entry(0); + m_bankw[1]->set_entry(0); } -void llc2_state::llc2_rom_disable_w(u8 data) +void llc2_state::rom_disable_w(u8 data) { - address_space &mem_space = m_maincpu->space(AS_PROGRAM); - u8 *ram = m_ram->pointer(); - - mem_space.install_write_bank(0x0000, 0xbfff, "bank1"); - membank("bank1")->set_base(ram); - - mem_space.install_write_bank(0x4000, 0x5fff, "bank2"); - membank("bank2")->set_base(ram + 0x4000); - - mem_space.install_write_bank(0x6000, 0xbfff, "bank3"); - membank("bank3")->set_base(ram + 0x6000); - - mem_space.install_write_bank(0xc000, 0xffff, "bank4"); - membank("bank4")->set_base(ram + 0xc000); - + m_bankr[0]->set_entry(0); } -void llc2_state::llc2_basic_enable_w(u8 data) +void llc2_state::basic_enable_w(u8 data) { - address_space &mem_space = m_maincpu->space(AS_PROGRAM); - if (BIT(data, 1)) - { - mem_space.unmap_write(0x4000, 0x5fff); - membank("bank2")->set_base(memregion("maincpu")->base() + 0x4000); - } - else - { - mem_space.install_write_bank(0x4000, 0x5fff, "bank2"); - membank("bank2")->set_base(m_ram->pointer() + 0x4000); - } - + m_bankr[1]->set_entry(BIT(data, 1)); } -u8 llc2_state::llc2_port1_b_r() +u8 llc2_state::port1b_r() { - return 0; + u8 data = 0xfd; + + if (m_cass->input() > 0.03) + data |= 0x02; + + return data; } -void llc2_state::llc2_port1_b_w(u8 data) +void llc2_state::port1b_w(u8 data) { + m_cass->output(BIT(data, 0) ? -1.0 : +1.0); m_speaker->level_w(BIT(data, 6)); m_rv = BIT(data, 5); } -u8 llc2_state::llc2_port2_a_r() +u8 llc2_state::port2a_r() { return 0; // bit 2 low or hangs on ^Z^X^C sequence } @@ -179,7 +164,7 @@ void llc2_state::machine_start() save_item(NAME(m_rv)); } -u32 llc2_state::screen_update_llc2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 llc2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { u8 y,ra,chr,gfx,inv, inv1=m_rv ? 0xff : 0; u16 sy=0,ma=0,x; @@ -222,15 +207,16 @@ u32 llc2_state::screen_update_llc2(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -static const z80_daisy_config llc2_daisy_chain[] = +static const z80_daisy_config daisy_chain[] = { - { "z80pio1" }, - { "z80ctc" }, + { "ctc" }, + { "pio1" }, + { "pio2" }, { nullptr } }; /* F4 Character Displayer */ -static const gfx_layout llc2_charlayout = +static const gfx_layout charlayout = { 8, 8, /* 8 x 8 characters */ 256, /* 256 characters */ @@ -244,15 +230,15 @@ static const gfx_layout llc2_charlayout = }; static GFXDECODE_START( gfx_llc2 ) - GFXDECODE_ENTRY( "chargen", 0x0000, llc2_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 ) GFXDECODE_END /* Machine driver */ void llc2_state::llc2(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, XTAL(3'000'000)); - m_maincpu->set_daisy_config(llc2_daisy_chain); + Z80(config, m_maincpu, 12_MHz_XTAL / 4); + m_maincpu->set_daisy_config(daisy_chain); m_maincpu->set_addrmap(AS_PROGRAM, &llc2_state::mem_map); m_maincpu->set_addrmap(AS_IO, &llc2_state::io_map); @@ -262,7 +248,7 @@ void llc2_state::llc2(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ screen.set_size(64*8, 32*8); screen.set_visarea(0, 64*8-1, 0, 32*8-1); - screen.set_screen_update(FUNC(llc2_state::screen_update_llc2)); + screen.set_screen_update(FUNC(llc2_state::screen_update)); screen.set_palette("palette"); GFXDECODE(config, "gfxdecode", "palette", gfx_llc2); @@ -270,17 +256,28 @@ void llc2_state::llc2(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.15); + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - z80pio_device& pio1(Z80PIO(config, "z80pio1", XTAL(3'000'000))); + z80pio_device& pio1(Z80PIO(config, "pio1", 12_MHz_XTAL / 4)); + pio1.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); pio1.in_pa_callback().set(K7659_KEYBOARD_TAG, FUNC(k7659_keyboard_device::read)); - pio1.in_pb_callback().set(FUNC(llc2_state::llc2_port1_b_r)); - pio1.out_pb_callback().set(FUNC(llc2_state::llc2_port1_b_w)); + pio1.in_pb_callback().set(FUNC(llc2_state::port1b_r)); + pio1.out_pb_callback().set(FUNC(llc2_state::port1b_w)); + + z80pio_device& pio2(Z80PIO(config, "pio2", 12_MHz_XTAL / 4)); + pio2.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + pio2.in_pa_callback().set(FUNC(llc2_state::port2a_r)); - z80pio_device& pio2(Z80PIO(config, "z80pio2", XTAL(3'000'000))); - pio2.in_pa_callback().set(FUNC(llc2_state::llc2_port2_a_r)); + Z80CTC(config, m_ctc, 12_MHz_XTAL / 4); + m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + m_ctc->set_clk<0>(12_MHz_XTAL / 8); + m_ctc->set_clk<1>(12_MHz_XTAL / 8); + m_ctc->set_clk<2>(50); // comes from deep in the video section, assumed to be 50Hz + m_ctc->zc_callback<2>().set(m_ctc, FUNC(z80ctc_device::trg3)); - Z80CTC(config, "z80ctc", XTAL(3'000'000)); + CASSETTE(config, m_cass); + m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); + m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); K7659_KEYBOARD(config, K7659_KEYBOARD_TAG, 0); @@ -291,11 +288,11 @@ void llc2_state::llc2(machine_config &config) /* ROM definition */ ROM_START( llc2 ) ROM_REGION( 0x6000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "scchmon_91.bin", 0x0000, 0x1000, CRC(218d8236) SHA1(b8297272cc79751afc2eb8688d99b40691346dcb) ) + ROM_LOAD( "scchmon_91.d35", 0x0000, 0x1000, CRC(218d8236) SHA1(b8297272cc79751afc2eb8688d99b40691346dcb) ) ROM_LOAD( "gsbasic.bin", 0x4000, 0x2000, CRC(78a5f388) SHA1(e7b475b98dce36b24540ad11eb89046ddb4f02af) ) ROM_REGION( 0x0800, "chargen", 0 ) - ROM_LOAD ("llc2font.bin", 0x0000, 0x0800, CRC(ce53e55d) SHA1(da23d93f14a8a1f8d82bb72470a96b0bfd81ed1b) ) + ROM_LOAD ("llc2font.d17", 0x0000, 0x0800, CRC(ce53e55d) SHA1(da23d93f14a8a1f8d82bb72470a96b0bfd81ed1b) ) ROM_END -- cgit v1.2.3 From 08c3310b4e6231186a5936396265c81753a11cd5 Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Thu, 9 Jul 2020 18:59:13 +0200 Subject: Truco-Tron: Cleaned up the driver and improved the documentation. --- src/mame/drivers/truco.cpp | 238 ++++++++++++++++++++------------------------- src/mame/includes/truco.h | 1 + src/mame/video/truco.cpp | 4 +- 3 files changed, 109 insertions(+), 134 deletions(-) diff --git a/src/mame/drivers/truco.cpp b/src/mame/drivers/truco.cpp index 3fd05e658a5..c0fbc04db37 100644 --- a/src/mame/drivers/truco.cpp +++ b/src/mame/drivers/truco.cpp @@ -12,9 +12,7 @@ - The board uses a battery backed ram for protection, mapped at $7c00-$7fff. - If the battery backup data is corrupt, it comes up with some sort of code entry screen. - As far as I can tell, you can't do anything with it. - - Replacing the battery backed ram with an eeprom is not really an option since the game stores the - current credits count in the battery backed ram. + - The game stores the current credits count in the battery backed ram. - System clock is 12 Mhz. The CPU clock is unknown. - The Alternate GFX mode is funky. Not only it has different bitmaps, but also the strings with the game options are truncated. Title is also truncated. @@ -71,27 +69,27 @@ - U1 : 40-pin IC YES CPU MOTOROLA M6809EP 8-bit microprocessor. - U2 : 28-pin IC YES ROM M27128A (or M27512FI) NMOS 128K 16K x 8 UV EPROM (or 64K x 8). - U3 : 28-pin IC YES ROM M27128A (or M27512FI) NMOS 128K 16K x 8 UV EPROM (or 64K x 8). - - U4 : 40-pin IC YES I/O ST EF6821P PIA: Peripheral Interface Adapter. - - U5 : 16-pin IC YES TTL ST M74HC157B1 Quad 2 Channel Multiplexer. - - U6 : 16-pin IC YES TTL ST M74HC157B1 Quad 2 Channel Multiplexer. - - U7 : 16-pin IC YES TTL ST M74HC157B1 Quad 2 Channel Multiplexer. - - U8 : 16-pin IC YES TTL ST M74HC157B1 Quad 2 Channel Multiplexer. - - U9 : 40-pin IC YES CRTC HD6845 / UM6845 / GS GM68A45S CRT Controller. - - U10: 28-pin IC YES RAM KM62256BLP-10 32K x 8 Low Power CMOS Static RAM. - - U11: 14-pin IC YES TTL SN74LS95BN 4-bit Parallel-Access Shift Registers. - - U12: 14-pin IC YES TTL SN74LS95BN 4-bit Parallel-Access Shift Registers. - - U13: 20-pin IC YES TTL SN74LS244N Octal Buffers and Line Drivers with 3-State output. - - U14: 20-pin IC YES TTL HD74LS374 Octal D-type Flip-Flops with noninverted 3-state output. + - U4 : 40-pin IC YES I/O EF6821P PIA: Peripheral Interface Adapter. + - U5 : 16-pin IC YES TTL 74HC157 Quad 2 Channel Multiplexer. + - U6 : 16-pin IC YES TTL 74HC157 Quad 2 Channel Multiplexer. + - U7 : 16-pin IC YES TTL 74HC157 Quad 2 Channel Multiplexer. + - U8 : 16-pin IC YES TTL 74HC157 Quad 2 Channel Multiplexer. + - U9 : 40-pin IC YES CRTC HD6845 / UM6845 / GM68A45S CRT Controller. + - U10: 28-pin IC YES RAM 62256-10 32K x 8 Low Power CMOS Static RAM. + - U11: 14-pin IC YES TTL 74LS95 4-bit Parallel-Access Shift Registers. + - U12: 14-pin IC YES TTL 74LS95 4-bit Parallel-Access Shift Registers. + - U13: 20-pin IC YES TTL 74LS244 Octal Buffers and Line Drivers with 3-State output. + - U14: 20-pin IC YES TTL 74LS374 Octal D-type Flip-Flops with noninverted 3-state output. - U15: 20-pin IC YES PLD PALCE16V8H-25 EE CMOS Zero-Power 20-Pin Universal Programmable Array Logic. - U16: 20-pin IC YES PLD PALCE16V8H-25 EE CMOS Zero-Power 20-Pin Universal Programmable Array Logic. - - U17: 14-pin IC YES TTL HD74LS00P Quadruple 2-Input NAND Gates. - - U18: 14-pin IC YES TTL KS74HCTLS86N Quad 2???Input Exclusive OR Gate. + - U17: 14-pin IC YES TTL 74LS00 Quad 2-Input NAND Gates. + - U18: 14-pin IC YES TTL 74HCTLS86 Quad 2-Input XOR Gates. - U19: 16-pin IC YES WATCHDOG MAXIM MAX691 Microprocessor Supervisory Circuits. - U20: 16-pin IC YES DARLINGTON ULN2003 7 NPN Darlington transistor pairs with high voltage and current capability. M6809 - +---\/---+ + .---\/---. GND 1| |40 !HALT <-- --> !NMI 2| |39 ETAL <-- PIA /IRQA & B --> !IRQ 3| |38 EXTAL <-- @@ -112,10 +110,10 @@ <-- A10 18| |23 A15 --> <-- A11 19| |22 A14 --> <-- A12 20| |21 A13 --> - +--------+ + '--------' PIA 6821 - +----\/----+ + .----\/----. VSS |01 40| CA1 --- PIA CB1 (*) JAMMA S17 (2P_ST) - PA0 |02 39| CA2 --- U19(11). Watchdog/RESET JAMMA S14 (SRVSW) - PA1 |03 38| /IRQA - CPU M6809 !IRQ (03) @@ -136,7 +134,7 @@ PIA CA1 (*) - CB1 |18 23| /CS2 U20(06) - CB2 |19 22| CS0 VCC |20 21| R/W - +----------+ + '----------' (*) Lines CA1 and CB1 are tied together, being both IN. They are connected to JAMMA C16 (COIN1). @@ -144,42 +142,35 @@ U19: *** MAX691 *** Maxim MAX691 Microprocessor Supervisory Circuit. (for battery backup power switching and watchdog). - leg 01 [VBATT] ----> - leg 02 [VOUT] -----> - leg 03 [VCC] ------> VCC - leg 04 [GND] ------> GND - leg 05 [BATT ON] --> - leg 06 [/LOWLINE] -> - leg 07 [OSC IN] ---> N/C \ Set 1.6 seconds as WD timeout. - leg 08 [OSC SEL] --> N/C / - leg 09 [PFI] ------> - leg 10 [/PFO] -----> - leg 11 [WDI] ------> PIA CA2 - leg 12 [/CE OUT] --> - leg 13 [/CE IN] ---> GND - leg 14 [/WDO] -----> - leg 15 [/RESET] ---> CPU /RES (37) - leg 16 [RESET] ----> - - - U20: *** ULN2003 *** - - leg 01 --> N/C - leg 02 --> N/C - leg 03 --> N/C - leg 04 --> PIA PB2 (12) - leg 05 --> PIA PB3 (13) - leg 06 --> PIA CB2 (19) - leg 07 --> PIA PB7 (17) - leg 08 --> GND - leg 09 --> VCC - leg 10 --> CAP --> JAMMA(S10) +Speaker - leg 11 --> JAMMA(S26) - leg 12 --> JAMMA(C08) Coin Counter 1 - leg 13 --> JAMMA(S08) Coin Counter 2 - leg 14 --> N/C - leg 15 --> N/C - leg 16 --> N/C + + MAX691 + .---\/---. + <----- [VBATT]--|01 16|--[PFI] ------> + <------ [VOUT]--|02 15|--[/PFO] -----> + VCC <------- [VCC]--|03 14|--[WDI] ------> PIA CA2 + GND <------- [GND]--|04 13|--[/CE OUT] --> + <--- [BATT ON]--|05 12|--[/CE IN] ---> GND + <-- [/LOWLINE]--|06 11|--[/WDO] -----> + * N/C <---- [OSC IN]--|07 10|--[/RESET] ---> CPU /RES (37) + * N/C <--- [OSC SEL]--|08 09|--[RESET] ----> + '--------' + + * Set 1.6 seconds as WD timeout. + + + U20: *** ULN2003 *** High-voltage, high-current Darlington transistor array. + + ULN2003 + .---\/---. + N/C <--|01 16|--> N/C + N/C <--|02 15|--> N/C + N/C <--|03 14|--> N/C + PIA PB2 (12) <--|04 13|--> JAMMA(S08) Coin Counter 2 + PIA PB3 (13) <--|05 12|--> JAMMA(C08) Coin Counter 1 + PIA CB2 (19) <--|06 11|--> JAMMA(S26) + PIA PB7 (17) <--|07 10|--> CAP --> JAMMA(S10) +Speaker + GND <--|08 09|--> VCC + '--------' JP1: @@ -201,6 +192,7 @@ *******************************************************************************************************/ + #include "emu.h" #include "includes/truco.h" @@ -212,9 +204,10 @@ #include "speaker.h" -#define MASTER_CLOCK XTAL(12'000'000) /* confirmed */ -#define CPU_CLOCK (MASTER_CLOCK/16) /* guess */ -#define CRTC_CLOCK (MASTER_CLOCK/8) /* guess */ +#define MASTER_CLOCK XTAL(12'000'000) // confirmed +#define CPU_CLOCK (MASTER_CLOCK/16) // guess +#define CRTC_CLOCK (MASTER_CLOCK/8) // guess + /******************************************* * Read/Write Handlers * @@ -240,7 +233,7 @@ WRITE_LINE_MEMBER(truco_state::pia_ca2_w) void truco_state::portb_w(uint8_t data) { - m_dac->write(BIT(data, 7)); /* Isolated the bit for Delta-Sigma DAC */ + m_dac->write(BIT(data, 7)); // Isolated the bit for Delta-Sigma DAC if (data & 0x7f) logerror("Port B writes: %2x\n", data); @@ -263,64 +256,49 @@ WRITE_LINE_MEMBER(truco_state::pia_irqb_w) void truco_state::main_map(address_map &map) { - map(0x0000, 0x17ff).ram(); /* General purpose RAM */ - map(0x1800, 0x7bff).ram().share("videoram"); /* Video RAM */ - map(0x7c00, 0x7fff).ram().share("battery_ram"); /* Battery backed RAM */ + map(0x0000, 0x17ff).ram(); // General purpose RAM + map(0x1800, 0x7bff).ram().share("videoram"); // Video RAM + map(0x7c00, 0x7fff).ram().share("battery_ram"); // Battery backed RAM map(0x8000, 0x8003).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x8004, 0x8004).w("crtc", FUNC(mc6845_device::address_w)); map(0x8005, 0x8005).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0x8008, 0xffff).rom(); } /* -CRTC: - -00: 5f -01: 40 -02: 4d -03: 06 -04: 0f -05: 04 -06: 0c -07: 0e -08: 00 -09: 0f -0a: 00 -0b: 00 -0c: 00 -0d: c0 + CRTC MC6845 initialization routine at $a506 only set the first 14 registers (data at $a4e2) + + Register: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 + Value: 0x5f 0x40 0x4d 0x06 0x0f 0x04 0x0c 0x0e 0x00 0x0f 0x00 0x00 0x00 0xc0 + */ + /******************************************* * Input Ports Definition * *******************************************/ static INPUT_PORTS_START( truco ) - PORT_START("P1") /* IN0 */ - PORT_DIPNAME( 0x01, 0x01, "IN0-1 (P2 START)" ) - PORT_DIPSETTING ( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "IN0-2 (SERVICE SW)" ) - PORT_DIPSETTING ( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, "IN0-3 (P2 SELECT)" ) - PORT_DIPSETTING ( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "IN0-4 (COIN2)" ) - PORT_DIPSETTING ( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "IN0-5 (TILT SW)" ) - PORT_DIPSETTING ( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( On ) ) -// PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Connected to JAMMA S17 (P2 START) */ -// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Connected to JAMMA S14 (SERVICE SW) */ -// PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Connected to JAMMA C26 (P2 SELECT) */ -// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Connected to JAMMA S16 (COIN2) */ -// PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Connected to JAMMA S15 (TILT SW) */ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Connected to JAMMA C22 (P1 BUTTON1) */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) /* Connected to JAMMA C18/21 (JOY UP & JOY RIGHT) */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) /* Connected to JAMMA C19/20 (JOY DOWN & JOY LEFT) */ - - PORT_START("JMPRS") /* JP1-2 */ + PORT_START("P1") // IN0 + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Connected to JAMMA S17 (P2 START) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Connected to JAMMA S14 (SERVICE SW) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Connected to JAMMA C26 (P2 SELECT) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Connected to JAMMA S16 (COIN2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Connected to JAMMA S15 (TILT SW) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // Connected to JAMMA C22 (P1 BUTTON1) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) // Connected to JAMMA C18/21 (JOY UP & JOY RIGHT) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) // Connected to JAMMA C19/20 (JOY DOWN & JOY LEFT) + + PORT_START("COIN") // IN1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("JMPRS") // JP1-2 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING ( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING ( 0x00, DEF_STR( On ) ) @@ -345,49 +323,39 @@ static INPUT_PORTS_START( truco ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPSETTING ( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING ( 0x00, DEF_STR( On ) ) - - PORT_START("COIN") /* IN1 - FAKE - Used for coinup */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END +/******************************************* +* Machine Start & Reset * +*******************************************/ + void truco_state::machine_start() { save_item(NAME(m_trigger)); } -/******************************************* -* Machine Reset & Interrupts * -*******************************************/ - void truco_state::machine_reset() { int a; - /* Setup the data on the battery backed RAM */ + // Setup the data on the battery backed RAM - /* IRQ check */ + // IRQ check m_battery_ram[0x002] = 0x51; m_battery_ram[0x024] = 0x49; m_battery_ram[0x089] = 0x04; m_battery_ram[0x170] = 0x12; m_battery_ram[0x1a8] = 0xd5; - /* Mainloop check */ + // mainloop check m_battery_ram[0x005] = 0x04; m_battery_ram[0x22B] = 0x46; m_battery_ram[0x236] = 0xfb; m_battery_ram[0x2fe] = 0x1D; m_battery_ram[0x359] = 0x5A; - /* Boot check */ + // boot check a = ( m_battery_ram[0x000] << 8 ) | m_battery_ram[0x001]; a += 0x4d2; @@ -397,9 +365,14 @@ void truco_state::machine_reset() m_battery_ram[0x020] = m_battery_ram[0x011]; } + +/******************************************* +* Interrupts Handling * +*******************************************/ + INTERRUPT_GEN_MEMBER(truco_state::interrupt) { - /* coinup */ + // coinup if ( ioport("COIN")->read() & 1 ) { @@ -414,17 +387,17 @@ INTERRUPT_GEN_MEMBER(truco_state::interrupt) /******************************************* -* Machine Driver * +* Machine Config * *******************************************/ void truco_state::truco(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware M6809(config, m_maincpu, CPU_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &truco_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(truco_state::interrupt)); - WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(1600)); /* 1.6 seconds */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(1600)); // 1.6 seconds pia6821_device &pia(PIA6821(config, "pia0", 0)); pia.readpa_handler().set_ioport("P1"); @@ -435,22 +408,22 @@ void truco_state::truco(machine_config &config) pia.irqa_handler().set(FUNC(truco_state::pia_irqa_w)); pia.irqb_handler().set(FUNC(truco_state::pia_irqb_w)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(256, 192); screen.set_visarea(0, 256-1, 0, 192-1); screen.set_screen_update(FUNC(truco_state::screen_update)); PALETTE(config, "palette", FUNC(truco_state::truco_palette), 16); - mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK)); /* Identified as UM6845 */ + mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK)); // identified as UM6845 crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(4); - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.4); voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0)); @@ -470,5 +443,6 @@ ROM_START( truco ) ROM_LOAD( "truco.u2", 0x0c000, 0x4000, CRC(ff355750) SHA1(1538f20b1919928ffca439e4046a104ddfbc756c) ) ROM_END -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS + +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS GAME( 198?, truco, 0, truco, truco, truco_state, empty_init, ROT0, "Playtronic SRL", "Truco-Tron", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/truco.h b/src/mame/includes/truco.h index 059f274717c..d9e16027694 100644 --- a/src/mame/includes/truco.h +++ b/src/mame/includes/truco.h @@ -1,5 +1,6 @@ // license:BSD-3-Clause // copyright-holders:Ernesto Corvi, Roberto Fresca + #ifndef MAME_INCLUDES_TRUCO_H #define MAME_INCLUDES_TRUCO_H diff --git a/src/mame/video/truco.cpp b/src/mame/video/truco.cpp index 0e647b6d070..ba885d7c4d6 100644 --- a/src/mame/video/truco.cpp +++ b/src/mame/video/truco.cpp @@ -2,7 +2,7 @@ // copyright-holders:Ernesto Corvi, Roberto Fresca /*************************************************************************** - video.c + Truco-Tron Functions to emulate the video hardware of the machine. @@ -28,7 +28,7 @@ void truco_state::truco_palette(palette_device &palette) const b >>= 1; } - palette.set_pen_color(i,rgb_t(r,g,b)); + palette.set_pen_color(i, rgb_t(r, g, b)); } } -- cgit v1.2.3 From 0ebb7244711aef3d835c2dc0cc1df665365e46c3 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 9 Jul 2020 22:26:27 +0200 Subject: simpsons: correct refresh rate --- src/mame/drivers/simpsons.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp index c95545fb141..8897f6624cf 100644 --- a/src/mame/drivers/simpsons.cpp +++ b/src/mame/drivers/simpsons.cpp @@ -341,12 +341,11 @@ void simpsons_state::simpsons(machine_config &config) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - // Screen timings generated by the 051962, probably not programmable (except maybe between 6 amd 8MHz) + // Screen timings generated by the 051962, probably not programmable (except maybe between 6 and 8MHz) // 6MHz dot clock // horizontal: 16 cycles front porch, 32 cycles sync, 16 cycles back porch // vertical: 16 lines front porch, 8 lines sync, 16 lines back porch - - screen.set_raw(XTAL(24'000'000)/4, 384, 0, 320, 256, 0, 224); + screen.set_raw(XTAL(24'000'000)/4, 384, 0, 320, 264, 0, 224); screen.set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); screen.set_screen_update(FUNC(simpsons_state::screen_update_simpsons)); screen.set_palette("palette"); -- cgit v1.2.3 From a47ed1a958182e7eff3dfb260193976dcaf6d840 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 9 Jul 2020 22:29:32 +0200 Subject: simpsons: get rid of black borders/improve screen aspect ratio --- src/mame/drivers/simpsons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp index 8897f6624cf..86fb6c95c78 100644 --- a/src/mame/drivers/simpsons.cpp +++ b/src/mame/drivers/simpsons.cpp @@ -345,7 +345,7 @@ void simpsons_state::simpsons(machine_config &config) // 6MHz dot clock // horizontal: 16 cycles front porch, 32 cycles sync, 16 cycles back porch // vertical: 16 lines front porch, 8 lines sync, 16 lines back porch - screen.set_raw(XTAL(24'000'000)/4, 384, 0, 320, 264, 0, 224); + screen.set_raw(XTAL(24'000'000)/4, 384, 0+16, 320-16, 264, 0, 224); screen.set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); screen.set_screen_update(FUNC(simpsons_state::screen_update_simpsons)); screen.set_palette("palette"); -- cgit v1.2.3 From 1245022cfcc10cca18fb82cab1c3625af3492bde Mon Sep 17 00:00:00 2001 From: algestam Date: Thu, 9 Jul 2020 22:42:15 +0200 Subject: New working machine added (#6935) ---------- Micro Vs. System: Donkey Kong Hockey [algestam, Ryan Holtz] --- src/mame/drivers/hh_sm510.cpp | 101 ++++++++++++++++++++++++++++++++++++++++-- src/mame/mame.lst | 1 + 2 files changed, 98 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 14fb751f7d5..7a91f0efbfd 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -30,9 +30,9 @@ TODO: electronically. For the ones that weren't decapped, they were read by playing back all melody data and reconstructing it to ROM. Visual(decap) verification is wanted for: gnw_bfightn, gnw_bjack, gnw_bsweep, gnw_climbern, - gnw_dkcirc, gnw_dkjrp, gnw_dkong3, gnw_gcliff, gnw_mariocmt, gnw_mariotj, - gnw_mbaway, gnw_mmousep, gnw_pinball, gnw_popeyep, gnw_sbuster, gnw_snoopyp, - gnw_zelda + gnw_dkcirc, gnw_dkhockey, gnw_dkjrp, gnw_dkong3, gnw_gcliff, gnw_mariocmt, + gnw_mariotj, gnw_mbaway, gnw_mmousep, gnw_pinball, gnw_popeyep, gnw_sbuster, + gnw_snoopyp, gnw_zelda **************************************************************************** @@ -105,7 +105,7 @@ BU-201 sc SM510 Spitball Sparky UD-202 sc SM510 Crab Grab BX-301 mvs SM511 Boxing (aka Punch Out) AK-302 mvs SM511 Donkey Kong 3 -HK-303* mvs SM511? Donkey Kong Hockey +HK-303 mvs SM511 Donkey Kong Hockey YM-801 cs SM511 Super Mario Bros. (assume same ROM as nws version) DR-802 cs SM511 Climber " BF-803 cs SM511 Balloon Fight " @@ -4272,6 +4272,98 @@ ROM_END +/*************************************************************************** + + Nintendo Micro Vs. System: Donkey Kong Hockey (model HK-303) + * PCB label HK-303M + * Sharp SM511 label HK-303 57XD (no decap) + * wide lcd screen with custom segments, 1-bit sound + +***************************************************************************/ + +class gnw_dkhockey_state : public hh_sm510_state +{ +public: + gnw_dkhockey_state(const machine_config &mconfig, device_type type, const char *tag) : + hh_sm510_state(mconfig, type, tag) + { } + + void gnw_dkhockey(machine_config &config); +}; + +// config + +static INPUT_PORTS_START( gnw_dkhockey ) + PORT_START("IN.0") // S1 + PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) // Hit + + PORT_START("IN.1") // S2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_CB(input_changed) // Hit + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.2") // S3 + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) + + PORT_START("IN.3") // S4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_CB(input_changed) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.4") // S5 + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) + + PORT_START("IN.5") // S6 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_CB(input_changed) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.6") // S7 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_CB(input_changed) PORT_NAME("Time") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game B") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game A") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Alarm") + + PORT_START("ACL") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_CB(acl_button) PORT_NAME("ACL") + + PORT_START("BA") + PORT_CONFNAME( 0x01, 0x01, "Any Goal Scores 10 Points (Cheat)") // factory test, unpopulated on PCB + PORT_CONFSETTING( 0x01, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("B") + PORT_CONFNAME( 0x01, 0x01, "P2 Goals Scores No Points (Cheat)") // " + PORT_CONFSETTING( 0x01, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END + +void gnw_dkhockey_state::gnw_dkhockey(machine_config &config) +{ + sm511_common(config, 1920, 579); +} + +// roms + +ROM_START( gnw_dkhockey ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "hk-303.program", 0x0000, 0x1000, CRC(dc73eec7) SHA1(daaca286de326321335fd26d9b435b444787f609) ) + + ROM_REGION( 0x100, "maincpu:melody", 0 ) + ROM_LOAD( "hk-303.melody", 0x000, 0x100, BAD_DUMP CRC(3f61032c) SHA1(b0fd9077fb5e59ca2787c828c78c35116c48c245) ) // decap needed for verification + + ROM_REGION( 263239, "screen", 0) + ROM_LOAD( "gnw_dkhockey.svg", 0, 263239, CRC(3a576c12) SHA1(9a7ca67c35fcfb5858227f3ef2a6027c877c64d3) ) +ROM_END + + + + + /*************************************************************************** Konami Double Dribble @@ -9305,6 +9397,7 @@ CONS( 1984, gnw_cgrab, 0, 0, gnw_cgrab, gnw_cgrab, gnw_cgrab_stat // Nintendo G&W: Micro Vs. System (actually, no official Game & Watch logo anywhere) CONS( 1984, gnw_boxing, 0, 0, gnw_boxing, gnw_boxing, gnw_boxing_state, empty_init, "Nintendo", "Micro Vs. System: Boxing", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) CONS( 1984, gnw_dkong3, 0, 0, gnw_dkong3, gnw_dkong3, gnw_dkong3_state, empty_init, "Nintendo", "Micro Vs. System: Donkey Kong 3", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_dkhockey,0, 0, gnw_dkhockey,gnw_dkhockey,gnw_dkhockey_state,empty_init, "Nintendo", "Micro Vs. System: Donkey Kong Hockey", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Konami CONS( 1989, kdribble, 0, 0, kdribble, kdribble, kdribble_state, empty_init, "Konami", "Double Dribble (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index a4cceb229f1..dab3ad31d8b 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15911,6 +15911,7 @@ gnw_chef // Nintendo gnw_climber // Nintendo gnw_climbern // Nintendo gnw_dkcirc // Nintendo +gnw_dkhockey // Nintendo gnw_dkjr // Nintendo gnw_dkjrp // Nintendo gnw_dkong // Nintendo -- cgit v1.2.3 From 890104f33d9685964174b343744a9c8b29b5bc51 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 9 Jul 2020 22:56:31 +0200 Subject: hh_sm510: share common input ports for Micro Vs System --- src/mame/drivers/hh_sm510.cpp | 330 +++++++++++++++++------------------------- 1 file changed, 132 insertions(+), 198 deletions(-) diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 7a91f0efbfd..2f943a48c51 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -4115,7 +4115,7 @@ public: // config -static INPUT_PORTS_START( gnw_boxing ) +static INPUT_PORTS_START( microvs_shared ) PORT_START("IN.0") // S1 PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) @@ -4152,6 +4152,10 @@ static INPUT_PORTS_START( gnw_boxing ) PORT_START("ACL") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_CB(acl_button) PORT_NAME("ACL") +INPUT_PORTS_END + +static INPUT_PORTS_START( gnw_boxing ) + PORT_INCLUDE( microvs_shared ) PORT_START("BA") PORT_CONFNAME( 0x01, 0x01, "P2 Decrease Health (Cheat)") // factory test, unpopulated on PCB @@ -4207,42 +4211,7 @@ public: // config static INPUT_PORTS_START( gnw_dkong3 ) - PORT_START("IN.0") // S1 - PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) // Spray - - PORT_START("IN.1") // S2 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_CB(input_changed) // Spray - PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("IN.2") // S3 - PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - - PORT_START("IN.3") // S4 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("IN.4") // S5 - PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - - PORT_START("IN.5") // S6 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("IN.6") // S7 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_CB(input_changed) PORT_NAME("Time") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game B") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game A") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Alarm") - - PORT_START("ACL") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_CB(acl_button) PORT_NAME("ACL") + PORT_INCLUDE( microvs_shared ) PORT_START("B") PORT_CONFNAME( 0x01, 0x01, "P1 Infinite Lives (Cheat)") // factory test, unpopulated on PCB @@ -4294,42 +4263,7 @@ public: // config static INPUT_PORTS_START( gnw_dkhockey ) - PORT_START("IN.0") // S1 - PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) // Hit - - PORT_START("IN.1") // S2 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_CB(input_changed) // Hit - PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("IN.2") // S3 - PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - - PORT_START("IN.3") // S4 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("IN.4") // S5 - PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) PORT_PLAYER(2) - - PORT_START("IN.5") // S6 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("IN.6") // S7 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_CB(input_changed) PORT_NAME("Time") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game B") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game A") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Alarm") - - PORT_START("ACL") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_CB(acl_button) PORT_NAME("ACL") + PORT_INCLUDE( microvs_shared ) PORT_START("BA") PORT_CONFNAME( 0x01, 0x01, "Any Goal Scores 10 Points (Cheat)") // factory test, unpopulated on PCB @@ -9326,150 +9260,150 @@ ROM_END // YEAR NAME PARENT COMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS // Nintendo G&W: Silver/Gold (initial series is uncategorized, "Silver" was made up later) -CONS( 1980, gnw_ball, 0, 0, gnw_ball, gnw_ball, gnw_ball_state, empty_init, "Nintendo", "Game & Watch: Ball", MACHINE_SUPPORTS_SAVE ) -CONS( 1980, gnw_flagman, 0, 0, gnw_flagman, gnw_flagman, gnw_flagman_state, empty_init, "Nintendo", "Game & Watch: Flagman", MACHINE_SUPPORTS_SAVE ) -CONS( 1980, gnw_vermin, 0, 0, gnw_vermin, gnw_vermin, gnw_vermin_state, empty_init, "Nintendo", "Game & Watch: Vermin", MACHINE_SUPPORTS_SAVE ) -CONS( 1980, gnw_fires, 0, 0, gnw_fires, gnw_fires, gnw_fires_state, empty_init, "Nintendo", "Game & Watch: Fire (Silver)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1980, gnw_judge, 0, 0, gnw_judge, gnw_judge, gnw_judge_state, empty_init, "Nintendo", "Game & Watch: Judge (green version)", MACHINE_SUPPORTS_SAVE ) -CONS( 1981, gnw_manholeg,0, 0, gnw_manholeg,gnw_manholeg,gnw_manholeg_state,empty_init, "Nintendo", "Game & Watch: Manhole (Gold)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_helmet, 0, 0, gnw_helmet, gnw_helmet, gnw_helmet_state, empty_init, "Nintendo", "Game & Watch: Helmet (CN-17 version)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_lion, 0, 0, gnw_lion, gnw_lion, gnw_lion_state, empty_init, "Nintendo", "Game & Watch: Lion", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1980, gnw_ball, 0, 0, gnw_ball, gnw_ball, gnw_ball_state, empty_init, "Nintendo", "Game & Watch: Ball", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, gnw_flagman, 0, 0, gnw_flagman, gnw_flagman, gnw_flagman_state, empty_init, "Nintendo", "Game & Watch: Flagman", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, gnw_vermin, 0, 0, gnw_vermin, gnw_vermin, gnw_vermin_state, empty_init, "Nintendo", "Game & Watch: Vermin", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, gnw_fires, 0, 0, gnw_fires, gnw_fires, gnw_fires_state, empty_init, "Nintendo", "Game & Watch: Fire (Silver)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1980, gnw_judge, 0, 0, gnw_judge, gnw_judge, gnw_judge_state, empty_init, "Nintendo", "Game & Watch: Judge (green version)", MACHINE_SUPPORTS_SAVE ) +CONS( 1981, gnw_manholeg, 0, 0, gnw_manholeg, gnw_manholeg, gnw_manholeg_state, empty_init, "Nintendo", "Game & Watch: Manhole (Gold)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_helmet, 0, 0, gnw_helmet, gnw_helmet, gnw_helmet_state, empty_init, "Nintendo", "Game & Watch: Helmet (CN-17 version)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_lion, 0, 0, gnw_lion, gnw_lion, gnw_lion_state, empty_init, "Nintendo", "Game & Watch: Lion", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Nintendo G&W: Wide Screen -CONS( 1981, gnw_pchute, 0, 0, gnw_pchute, gnw_pchute, gnw_pchute_state, empty_init, "Nintendo", "Game & Watch: Parachute", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_octopus, 0, 0, gnw_octopus, gnw_octopus, gnw_octopus_state, empty_init, "Nintendo", "Game & Watch: Octopus", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_popeye, 0, 0, gnw_popeye, gnw_popeye, gnw_popeye_state, empty_init, "Nintendo", "Game & Watch: Popeye (Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_chef, 0, 0, gnw_chef, gnw_chef, gnw_chef_state, empty_init, "Nintendo", "Game & Watch: Chef", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, merrycook, gnw_chef, 0, merrycook, gnw_chef, gnw_chef_state, empty_init, "Elektronika", "Merry Cook", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_mmouse, 0, 0, gnw_mmouse, gnw_mmouse, gnw_mmouse_state, empty_init, "Nintendo", "Game & Watch: Mickey Mouse (Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_egg, gnw_mmouse, 0, gnw_egg, gnw_mmouse, gnw_mmouse_state, empty_init, "Nintendo", "Game & Watch: Egg", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1984, nupogodi, gnw_mmouse, 0, nupogodi, gnw_mmouse, gnw_mmouse_state, empty_init, "Elektronika", "Nu, pogodi!", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, exospace, gnw_mmouse, 0, exospace, exospace, gnw_mmouse_state, empty_init, "Elektronika", "Explorers of Space", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1981, gnw_fire, 0, 0, gnw_fire, gnw_fire, gnw_fire_state, empty_init, "Nintendo", "Game & Watch: Fire (Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, spacebridge, gnw_fire, 0, spacebridge, gnw_fire, gnw_fire_state, empty_init, "Elektronika", "Space Bridge", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1982, gnw_tbridge, 0, 0, gnw_tbridge, gnw_tbridge, gnw_tbridge_state, empty_init, "Nintendo", "Game & Watch: Turtle Bridge", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1982, gnw_fireatk, 0, 0, gnw_fireatk, gnw_fireatk, gnw_fireatk_state, empty_init, "Nintendo", "Game & Watch: Fire Attack", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1982, gnw_stennis, 0, 0, gnw_stennis, gnw_stennis, gnw_stennis_state, empty_init, "Nintendo", "Game & Watch: Snoopy Tennis", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_pchute, 0, 0, gnw_pchute, gnw_pchute, gnw_pchute_state, empty_init, "Nintendo", "Game & Watch: Parachute", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_octopus, 0, 0, gnw_octopus, gnw_octopus, gnw_octopus_state, empty_init, "Nintendo", "Game & Watch: Octopus", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_popeye, 0, 0, gnw_popeye, gnw_popeye, gnw_popeye_state, empty_init, "Nintendo", "Game & Watch: Popeye (Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_chef, 0, 0, gnw_chef, gnw_chef, gnw_chef_state, empty_init, "Nintendo", "Game & Watch: Chef", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, merrycook, gnw_chef, 0, merrycook, gnw_chef, gnw_chef_state, empty_init, "Elektronika", "Merry Cook", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_mmouse, 0, 0, gnw_mmouse, gnw_mmouse, gnw_mmouse_state, empty_init, "Nintendo", "Game & Watch: Mickey Mouse (Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_egg, gnw_mmouse, 0, gnw_egg, gnw_mmouse, gnw_mmouse_state, empty_init, "Nintendo", "Game & Watch: Egg", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, nupogodi, gnw_mmouse, 0, nupogodi, gnw_mmouse, gnw_mmouse_state, empty_init, "Elektronika", "Nu, pogodi!", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, exospace, gnw_mmouse, 0, exospace, exospace, gnw_mmouse_state, empty_init, "Elektronika", "Explorers of Space", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1981, gnw_fire, 0, 0, gnw_fire, gnw_fire, gnw_fire_state, empty_init, "Nintendo", "Game & Watch: Fire (Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, spacebridge, gnw_fire, 0, spacebridge, gnw_fire, gnw_fire_state, empty_init, "Elektronika", "Space Bridge", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_tbridge, 0, 0, gnw_tbridge, gnw_tbridge, gnw_tbridge_state, empty_init, "Nintendo", "Game & Watch: Turtle Bridge", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_fireatk, 0, 0, gnw_fireatk, gnw_fireatk, gnw_fireatk_state, empty_init, "Nintendo", "Game & Watch: Fire Attack", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_stennis, 0, 0, gnw_stennis, gnw_stennis, gnw_stennis_state, empty_init, "Nintendo", "Game & Watch: Snoopy Tennis", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Nintendo G&W: Multi Screen -CONS( 1982, gnw_opanic, 0, 0, gnw_opanic, gnw_opanic, gnw_opanic_state, empty_init, "Nintendo", "Game & Watch: Oil Panic", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1982, gnw_dkong, 0, 0, gnw_dkong, gnw_dkong, gnw_dkong_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1982, gnw_mickdon, 0, 0, gnw_mickdon, gnw_mickdon, gnw_mickdon_state, empty_init, "Nintendo", "Game & Watch: Mickey & Donald", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1982, gnw_ghouse, 0, 0, gnw_ghouse, gnw_ghouse, gnw_ghouse_state, empty_init, "Nintendo", "Game & Watch: Green House", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_dkong2, 0, 0, gnw_dkong2, gnw_dkong2, gnw_dkong2_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong II", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_mario, 0, 0, gnw_mario, gnw_mario, gnw_mario_state, empty_init, "Nintendo", "Game & Watch: Mario Bros.", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_rshower, 0, 0, gnw_rshower, gnw_rshower, gnw_rshower_state, empty_init, "Nintendo", "Game & Watch: Rain Shower", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_lboat, 0, 0, gnw_lboat, gnw_lboat, gnw_lboat_state, empty_init, "Nintendo", "Game & Watch: Life Boat", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_pinball, 0, 0, gnw_pinball, gnw_pinball, gnw_pinball_state, empty_init, "Nintendo", "Game & Watch: Pinball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1985, gnw_bjack, 0, 0, gnw_bjack, gnw_bjack, gnw_bjack_state, empty_init, "Nintendo", "Game & Watch: Black Jack", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1986, gnw_squish, 0, 0, gnw_squish, gnw_squish, gnw_squish_state, empty_init, "Nintendo", "Game & Watch: Squish", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1987, gnw_bsweep, 0, 0, gnw_bsweep, gnw_bsweep, gnw_bsweep_state, empty_init, "Nintendo", "Game & Watch: Bomb Sweeper", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1988, gnw_sbuster, 0, 0, gnw_sbuster, gnw_sbuster, gnw_sbuster_state, empty_init, "Nintendo", "Game & Watch: Safe Buster", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1988, gnw_gcliff, 0, 0, gnw_gcliff, gnw_gcliff, gnw_gcliff_state, empty_init, "Nintendo", "Game & Watch: Gold Cliff", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, gnw_zelda, 0, 0, gnw_zelda, gnw_zelda, gnw_zelda_state, empty_init, "Nintendo", "Game & Watch: Zelda", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_opanic, 0, 0, gnw_opanic, gnw_opanic, gnw_opanic_state, empty_init, "Nintendo", "Game & Watch: Oil Panic", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_dkong, 0, 0, gnw_dkong, gnw_dkong, gnw_dkong_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_mickdon, 0, 0, gnw_mickdon, gnw_mickdon, gnw_mickdon_state, empty_init, "Nintendo", "Game & Watch: Mickey & Donald", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_ghouse, 0, 0, gnw_ghouse, gnw_ghouse, gnw_ghouse_state, empty_init, "Nintendo", "Game & Watch: Green House", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_dkong2, 0, 0, gnw_dkong2, gnw_dkong2, gnw_dkong2_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong II", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_mario, 0, 0, gnw_mario, gnw_mario, gnw_mario_state, empty_init, "Nintendo", "Game & Watch: Mario Bros.", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_rshower, 0, 0, gnw_rshower, gnw_rshower, gnw_rshower_state, empty_init, "Nintendo", "Game & Watch: Rain Shower", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_lboat, 0, 0, gnw_lboat, gnw_lboat, gnw_lboat_state, empty_init, "Nintendo", "Game & Watch: Life Boat", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_pinball, 0, 0, gnw_pinball, gnw_pinball, gnw_pinball_state, empty_init, "Nintendo", "Game & Watch: Pinball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1985, gnw_bjack, 0, 0, gnw_bjack, gnw_bjack, gnw_bjack_state, empty_init, "Nintendo", "Game & Watch: Black Jack", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1986, gnw_squish, 0, 0, gnw_squish, gnw_squish, gnw_squish_state, empty_init, "Nintendo", "Game & Watch: Squish", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1987, gnw_bsweep, 0, 0, gnw_bsweep, gnw_bsweep, gnw_bsweep_state, empty_init, "Nintendo", "Game & Watch: Bomb Sweeper", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1988, gnw_sbuster, 0, 0, gnw_sbuster, gnw_sbuster, gnw_sbuster_state, empty_init, "Nintendo", "Game & Watch: Safe Buster", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1988, gnw_gcliff, 0, 0, gnw_gcliff, gnw_gcliff, gnw_gcliff_state, empty_init, "Nintendo", "Game & Watch: Gold Cliff", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, gnw_zelda, 0, 0, gnw_zelda, gnw_zelda, gnw_zelda_state, empty_init, "Nintendo", "Game & Watch: Zelda", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Nintendo G&W: New Wide Screen / Crystal Screen -CONS( 1982, gnw_dkjr, 0, 0, gnw_dkjr, gnw_dkjr, gnw_dkjr_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong Jr. (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_mariocm, 0, 0, gnw_mariocm, gnw_mariocm, gnw_mariocm_state, empty_init, "Nintendo", "Game & Watch: Mario's Cement Factory (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_manhole, 0, 0, gnw_manhole, gnw_manhole, gnw_manhole_state, empty_init, "Nintendo", "Game & Watch: Manhole (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1985, gnw_tfish, 0, 0, gnw_tfish, gnw_tfish, gnw_tfish_state, empty_init, "Nintendo", "Game & Watch: Tropical Fish", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1986, gnw_smb, 0, 0, gnw_smb, gnw_smb, gnw_smb_state, empty_init, "Nintendo", "Game & Watch: Super Mario Bros. (Crystal Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1988, gnw_smbn, gnw_smb, 0, gnw_smbn, gnw_smb, gnw_smb_state, empty_init, "Nintendo", "Game & Watch: Super Mario Bros. (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1986, gnw_climber, 0, 0, gnw_climber, gnw_climber, gnw_climber_state, empty_init, "Nintendo", "Game & Watch: Climber (Crystal Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1988, gnw_climbern,gnw_climber,0, gnw_climbern,gnw_climber, gnw_climber_state, empty_init, "Nintendo", "Game & Watch: Climber (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1986, gnw_bfight, 0, 0, gnw_bfight, gnw_bfight, gnw_bfight_state, empty_init, "Nintendo", "Game & Watch: Balloon Fight (Crystal Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1988, gnw_bfightn, gnw_bfight, 0, gnw_bfightn, gnw_bfight, gnw_bfight_state, empty_init, "Nintendo", "Game & Watch: Balloon Fight (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, gnw_mariotj, 0, 0, gnw_mariotj, gnw_mariotj, gnw_mariotj_state, empty_init, "Nintendo", "Game & Watch: Mario The Juggler", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, gnw_dkjr, 0, 0, gnw_dkjr, gnw_dkjr, gnw_dkjr_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong Jr. (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_mariocm, 0, 0, gnw_mariocm, gnw_mariocm, gnw_mariocm_state, empty_init, "Nintendo", "Game & Watch: Mario's Cement Factory (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_manhole, 0, 0, gnw_manhole, gnw_manhole, gnw_manhole_state, empty_init, "Nintendo", "Game & Watch: Manhole (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1985, gnw_tfish, 0, 0, gnw_tfish, gnw_tfish, gnw_tfish_state, empty_init, "Nintendo", "Game & Watch: Tropical Fish", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1986, gnw_smb, 0, 0, gnw_smb, gnw_smb, gnw_smb_state, empty_init, "Nintendo", "Game & Watch: Super Mario Bros. (Crystal Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1988, gnw_smbn, gnw_smb, 0, gnw_smbn, gnw_smb, gnw_smb_state, empty_init, "Nintendo", "Game & Watch: Super Mario Bros. (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1986, gnw_climber, 0, 0, gnw_climber, gnw_climber, gnw_climber_state, empty_init, "Nintendo", "Game & Watch: Climber (Crystal Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1988, gnw_climbern, gnw_climber, 0, gnw_climbern, gnw_climber, gnw_climber_state, empty_init, "Nintendo", "Game & Watch: Climber (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1986, gnw_bfight, 0, 0, gnw_bfight, gnw_bfight, gnw_bfight_state, empty_init, "Nintendo", "Game & Watch: Balloon Fight (Crystal Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1988, gnw_bfightn, gnw_bfight, 0, gnw_bfightn, gnw_bfight, gnw_bfight_state, empty_init, "Nintendo", "Game & Watch: Balloon Fight (New Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, gnw_mariotj, 0, 0, gnw_mariotj, gnw_mariotj, gnw_mariotj_state, empty_init, "Nintendo", "Game & Watch: Mario The Juggler", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Nintendo G&W: Table Top / Panorama Screen (the first Table Top releases in Japan were called "Color Screen") -CONS( 1983, gnw_mariocmt,0, 0, gnw_mariocmt,gnw_mariocmt,gnw_mariocmt_state,empty_init, "Nintendo", "Game & Watch: Mario's Cement Factory (Table Top)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_snoopyp, 0, 0, gnw_snoopyp, gnw_snoopyp, gnw_snoopyp_state, empty_init, "Nintendo", "Game & Watch: Snoopy (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_popeyep, 0, 0, gnw_popeyep, gnw_popeyep, gnw_popeyep_state, empty_init, "Nintendo", "Game & Watch: Popeye (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_dkjrp, 0, 0, gnw_dkjrp, gnw_dkjrp, gnw_dkjrp_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong Jr. (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, gnw_mbaway, 0, 0, gnw_mbaway, gnw_mbaway, gnw_mbaway_state, empty_init, "Nintendo", "Game & Watch: Mario's Bombs Away", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1984, gnw_mmousep, 0, 0, gnw_mmousep, gnw_mmousep, gnw_mmousep_state, empty_init, "Nintendo", "Game & Watch: Mickey Mouse (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1984, gnw_dkcirc, gnw_mmousep,0, gnw_dkcirc, gnw_mmousep, gnw_mmousep_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong Circus", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_mariocmt, 0, 0, gnw_mariocmt, gnw_mariocmt, gnw_mariocmt_state, empty_init, "Nintendo", "Game & Watch: Mario's Cement Factory (Table Top)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_snoopyp, 0, 0, gnw_snoopyp, gnw_snoopyp, gnw_snoopyp_state, empty_init, "Nintendo", "Game & Watch: Snoopy (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_popeyep, 0, 0, gnw_popeyep, gnw_popeyep, gnw_popeyep_state, empty_init, "Nintendo", "Game & Watch: Popeye (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_dkjrp, 0, 0, gnw_dkjrp, gnw_dkjrp, gnw_dkjrp_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong Jr. (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, gnw_mbaway, 0, 0, gnw_mbaway, gnw_mbaway, gnw_mbaway_state, empty_init, "Nintendo", "Game & Watch: Mario's Bombs Away", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_mmousep, 0, 0, gnw_mmousep, gnw_mmousep, gnw_mmousep_state, empty_init, "Nintendo", "Game & Watch: Mickey Mouse (Panorama Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_dkcirc, gnw_mmousep, 0, gnw_dkcirc, gnw_mmousep, gnw_mmousep_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong Circus", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Nintendo G&W: Super Color -CONS( 1984, gnw_ssparky, 0, 0, gnw_ssparky, gnw_ssparky, gnw_ssparky_state, empty_init, "Nintendo", "Game & Watch: Spitball Sparky", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1984, gnw_cgrab, 0, 0, gnw_cgrab, gnw_cgrab, gnw_cgrab_state, empty_init, "Nintendo", "Game & Watch: Crab Grab", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_ssparky, 0, 0, gnw_ssparky, gnw_ssparky, gnw_ssparky_state, empty_init, "Nintendo", "Game & Watch: Spitball Sparky", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_cgrab, 0, 0, gnw_cgrab, gnw_cgrab, gnw_cgrab_state, empty_init, "Nintendo", "Game & Watch: Crab Grab", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Nintendo G&W: Micro Vs. System (actually, no official Game & Watch logo anywhere) -CONS( 1984, gnw_boxing, 0, 0, gnw_boxing, gnw_boxing, gnw_boxing_state, empty_init, "Nintendo", "Micro Vs. System: Boxing", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1984, gnw_dkong3, 0, 0, gnw_dkong3, gnw_dkong3, gnw_dkong3_state, empty_init, "Nintendo", "Micro Vs. System: Donkey Kong 3", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1984, gnw_dkhockey,0, 0, gnw_dkhockey,gnw_dkhockey,gnw_dkhockey_state,empty_init, "Nintendo", "Micro Vs. System: Donkey Kong Hockey", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_boxing, 0, 0, gnw_boxing, gnw_boxing, gnw_boxing_state, empty_init, "Nintendo", "Micro Vs. System: Boxing", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_dkong3, 0, 0, gnw_dkong3, gnw_dkong3, gnw_dkong3_state, empty_init, "Nintendo", "Micro Vs. System: Donkey Kong 3", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1984, gnw_dkhockey, 0, 0, gnw_dkhockey, gnw_dkhockey, gnw_dkhockey_state, empty_init, "Nintendo", "Micro Vs. System: Donkey Kong Hockey", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Konami -CONS( 1989, kdribble, 0, 0, kdribble, kdribble, kdribble_state, empty_init, "Konami", "Double Dribble (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, ktopgun, 0, 0, ktopgun, ktopgun, ktopgun_state, empty_init, "Konami", "Top Gun (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, kcontra, 0, 0, kcontra, kcontra, kcontra_state, empty_init, "Konami", "Contra (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, ktmnt, 0, 0, ktmnt, ktmnt, ktmnt_state, empty_init, "Konami", "Teenage Mutant Ninja Turtles (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, kgradius, 0, 0, kgradius, kgradius, kgradius_state, empty_init, "Konami", "Gradius (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, kloneran, 0, 0, kloneran, kloneran, kloneran_state, empty_init, "Konami", "Lone Ranger (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, kblades, 0, 0, kblades, kblades, kblades_state, empty_init, "Konami", "Blades of Steel (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, knfl, 0, 0, knfl, knfl, knfl_state, empty_init, "Konami", "NFL Football (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, kbilly, 0, 0, kbilly, kbilly, kbilly_state, empty_init, "Konami", "The Adventures of Bayou Billy (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, kbucky, 0, 0, kbucky, kbucky, kbucky_state, empty_init, "Konami", "Bucky O'Hare (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, kgarfld, 0, 0, kgarfld, kgarfld, kgarfld_state, empty_init, "Konami", "Garfield (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, kdribble, 0, 0, kdribble, kdribble, kdribble_state, empty_init, "Konami", "Double Dribble (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, ktopgun, 0, 0, ktopgun, ktopgun, ktopgun_state, empty_init, "Konami", "Top Gun (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, kcontra, 0, 0, kcontra, kcontra, kcontra_state, empty_init, "Konami", "Contra (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, ktmnt, 0, 0, ktmnt, ktmnt, ktmnt_state, empty_init, "Konami", "Teenage Mutant Ninja Turtles (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, kgradius, 0, 0, kgradius, kgradius, kgradius_state, empty_init, "Konami", "Gradius (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, kloneran, 0, 0, kloneran, kloneran, kloneran_state, empty_init, "Konami", "Lone Ranger (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, kblades, 0, 0, kblades, kblades, kblades_state, empty_init, "Konami", "Blades of Steel (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, knfl, 0, 0, knfl, knfl, knfl_state, empty_init, "Konami", "NFL Football (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, kbilly, 0, 0, kbilly, kbilly, kbilly_state, empty_init, "Konami", "The Adventures of Bayou Billy (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, kbucky, 0, 0, kbucky, kbucky, kbucky_state, empty_init, "Konami", "Bucky O'Hare (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, kgarfld, 0, 0, kgarfld, kgarfld, kgarfld_state, empty_init, "Konami", "Garfield (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Tiger 7-xxx/78-xxx models -CONS( 1989, tgaunt, 0, 0, tgaunt, tgaunt, tgaunt_state, empty_init, "Tiger Electronics (licensed from Tengen)", "Gauntlet (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, trobhood, tgaunt, 0, trobhood, trobhood, tgaunt_state, empty_init, "Tiger Electronics", "Robin Hood (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, tddragon, 0, 0, tddragon, tddragon, tddragon_state, empty_init, "Tiger Electronics (licensed from Technos/Tradewest)", "Double Dragon (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, tkarnov, 0, 0, tkarnov, tkarnov, tkarnov_state, empty_init, "Tiger Electronics (licensed from Data East)", "Karnov (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, tvindictr, 0, 0, tvindictr, tvindictr, tvindictr_state, empty_init, "Tiger Electronics (licensed from Tengen)", "Vindicators (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, tgaiden, 0, 0, tgaiden, tgaiden, tgaiden_state, empty_init, "Tiger Electronics (licensed from Tecmo)", "Ninja Gaiden (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1989, tbatman, 0, 0, tbatman, tbatman, tbatman_state, empty_init, "Tiger Electronics", "Batman (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1990, tsharr2, 0, 0, tsharr2, tsharr2, tsharr2_state, empty_init, "Tiger Electronics (licensed from Sega)", "Space Harrier II (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1990, tstrider, 0, 0, tstrider, tstrider, tstrider_state, empty_init, "Tiger Electronics (licensed from Capcom)", "Strider (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1990, tgoldnaxe, 0, 0, tgoldnaxe, tgoldnaxe, tgoldnaxe_state, empty_init, "Tiger Electronics (licensed from Sega)", "Golden Axe (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1990, trobocop2, 0, 0, trobocop2, trobocop2, trobocop2_state, empty_init, "Tiger Electronics", "Robocop 2 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, trockteer, trobocop2, 0, trockteer, trockteer, trobocop2_state, empty_init, "Tiger Electronics", "The Rocketeer (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1990, taltbeast, 0, 0, taltbeast, taltbeast, taltbeast_state, empty_init, "Tiger Electronics (licensed from Sega)", "Altered Beast (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1990, tsf2010, 0, 0, tsf2010, tsf2010, tsf2010_state, empty_init, "Tiger Electronics (licensed from Capcom)", "Street Fighter 2010 - The Final Fight (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, tswampt, 0, 0, tswampt, tswampt, tswampt_state, empty_init, "Tiger Electronics", "Swamp Thing (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, tspidman, 0, 0, tspidman, tspidman, tspidman_state, empty_init, "Tiger Electronics", "Spider-Man (handheld, Tiger 1991 version)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, txmen, 0, 0, txmen, txmen, txmen_state, empty_init, "Tiger Electronics", "X-Men (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, tddragon3, 0, 0, tddragon3, tddragon3, tddragon3_state, empty_init, "Tiger Electronics (licensed from Technos)", "Double Dragon 3 - The Rosetta Stone (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, tflash, 0, 0, tflash, tflash, tflash_state, empty_init, "Tiger Electronics", "The Flash (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, tmchammer, 0, 0, tmchammer, tmchammer, tmchammer_state, empty_init, "Tiger Electronics", "MC Hammer: U Can't Touch This (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, tbtoads, 0, 0, tbtoads, tbtoads, tbtoads_state, empty_init, "Tiger Electronics (licensed from Rare/Tradewest)", "Battletoads (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1991, thook, 0, 0, thook, thook, thook_state, empty_init, "Tiger Electronics", "Hook (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1992, tbttf, 0, 0, tbttf, tbttf, tbttf_state, empty_init, "Tiger Electronics", "Back to the Future (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1992, taddams, 0, 0, taddams, taddams, taddams_state, empty_init, "Tiger Electronics", "The Addams Family (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1992, thalone, 0, 0, thalone, thalone, thalone_state, empty_init, "Tiger Electronics", "Home Alone (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, txmenpx, 0, 0, txmenpx, txmenpx, txmenpx_state, empty_init, "Tiger Electronics", "X-Men - Project X (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1992, thalone2, 0, 0, thalone2, thalone2, thalone2_state, empty_init, "Tiger Electronics", "Home Alone 2 - Lost in New York (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1992, tsonic, 0, 0, tsonic, tsonic, tsonic_state, empty_init, "Tiger Electronics (licensed from Sega)", "Sonic The Hedgehog (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1992, trobocop3, 0, 0, trobocop3, trobocop3, trobocop3_state, empty_init, "Tiger Electronics", "Robocop 3 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tdummies, 0, 0, tdummies, tdummies, tdummies_state, empty_init, "Tiger Electronics", "The Incredible Crash Dummies (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tsfight2, 0, 0, tsfight2, tsfight2, tsfight2_state, empty_init, "Tiger Electronics (licensed from Capcom)", "Street Fighter II (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1992, twworld, 0, 0, twworld, twworld, twworld_state, empty_init, "Tiger Electronics", "Wayne's World (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tjpark, 0, 0, tjpark, tjpark, tjpark_state, empty_init, "Tiger Electronics", "Jurassic Park (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tsonic2, 0, 0, tsonic2, tsonic2, tsonic2_state, empty_init, "Tiger Electronics (licensed from Sega)", "Sonic The Hedgehog 2 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tsddragon, 0, 0, tsddragon, tsddragon, tsddragon_state, empty_init, "Tiger Electronics (licensed from Technos)", "Super Double Dragon (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tdennis, 0, 0, tdennis, tdennis, tdennis_state, empty_init, "Tiger Electronics", "Dennis the Menace (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tnmarebc, 0, 0, tnmarebc, tnmarebc, tnmarebc_state, empty_init, "Tiger Electronics", "Nightmare Before Christmas (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // note: title has no "The" -CONS( 1993, ttransf2, 0, 0, ttransf2, ttransf2, ttransf2_state, empty_init, "Tiger Electronics", "Transformers - Generation 2 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1994, topaliens, 0, 0, topaliens, topaliens, topaliens_state, empty_init, "Tiger Electronics", "Operation: Aliens (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1993, tmkombat, 0, 0, tmkombat, tmkombat, tmkombat_state, empty_init, "Tiger Electronics (licensed from Midway)", "Mortal Kombat (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1994, tshadow, 0, 0, tshadow, tshadow, tshadow_state, empty_init, "Tiger Electronics", "The Shadow (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1994, tskelwarr, 0, 0, tskelwarr, tskelwarr, tskelwarr_state, empty_init, "Tiger Electronics", "Skeleton Warriors - The Dark Crusade (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1995, tbatfor, 0, 0, tbatfor, tbatfor, tbatfor_state, empty_init, "Tiger Electronics", "Batman Forever - Double Dose of Doom (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1995, tjdredd, 0, 0, tjdredd, tjdredd, tjdredd_state, empty_init, "Tiger Electronics", "Judge Dredd (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1995, tapollo13, 0, 0, tapollo13, tapollo13, tapollo13_state, empty_init, "Tiger Electronics", "Apollo 13 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1995, tgoldeye, 0, 0, tgoldeye, tgoldeye, tgoldeye_state, empty_init, "Tiger Electronics", "007: GoldenEye (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1996, tkazaam, 0, 0, tkazaam, tkazaam, tkazaam_state, empty_init, "Tiger Electronics", "Kazaam (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1996, tsjam, 0, 0, tsjam, tsjam, tsjam_state, empty_init, "Tiger Electronics", "Space Jam (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1996, tinday, 0, 0, tinday, tinday, tinday_state, empty_init, "Tiger Electronics", "Independence Day (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, tgaunt, 0, 0, tgaunt, tgaunt, tgaunt_state, empty_init, "Tiger Electronics (licensed from Tengen)", "Gauntlet (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, trobhood, tgaunt, 0, trobhood, trobhood, tgaunt_state, empty_init, "Tiger Electronics", "Robin Hood (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, tddragon, 0, 0, tddragon, tddragon, tddragon_state, empty_init, "Tiger Electronics (licensed from Technos/Tradewest)", "Double Dragon (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, tkarnov, 0, 0, tkarnov, tkarnov, tkarnov_state, empty_init, "Tiger Electronics (licensed from Data East)", "Karnov (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, tvindictr, 0, 0, tvindictr, tvindictr, tvindictr_state, empty_init, "Tiger Electronics (licensed from Tengen)", "Vindicators (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, tgaiden, 0, 0, tgaiden, tgaiden, tgaiden_state, empty_init, "Tiger Electronics (licensed from Tecmo)", "Ninja Gaiden (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1989, tbatman, 0, 0, tbatman, tbatman, tbatman_state, empty_init, "Tiger Electronics", "Batman (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1990, tsharr2, 0, 0, tsharr2, tsharr2, tsharr2_state, empty_init, "Tiger Electronics (licensed from Sega)", "Space Harrier II (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1990, tstrider, 0, 0, tstrider, tstrider, tstrider_state, empty_init, "Tiger Electronics (licensed from Capcom)", "Strider (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1990, tgoldnaxe, 0, 0, tgoldnaxe, tgoldnaxe, tgoldnaxe_state, empty_init, "Tiger Electronics (licensed from Sega)", "Golden Axe (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1990, trobocop2, 0, 0, trobocop2, trobocop2, trobocop2_state, empty_init, "Tiger Electronics", "Robocop 2 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, trockteer, trobocop2, 0, trockteer, trockteer, trobocop2_state, empty_init, "Tiger Electronics", "The Rocketeer (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1990, taltbeast, 0, 0, taltbeast, taltbeast, taltbeast_state, empty_init, "Tiger Electronics (licensed from Sega)", "Altered Beast (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1990, tsf2010, 0, 0, tsf2010, tsf2010, tsf2010_state, empty_init, "Tiger Electronics (licensed from Capcom)", "Street Fighter 2010 - The Final Fight (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, tswampt, 0, 0, tswampt, tswampt, tswampt_state, empty_init, "Tiger Electronics", "Swamp Thing (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, tspidman, 0, 0, tspidman, tspidman, tspidman_state, empty_init, "Tiger Electronics", "Spider-Man (handheld, Tiger 1991 version)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, txmen, 0, 0, txmen, txmen, txmen_state, empty_init, "Tiger Electronics", "X-Men (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, tddragon3, 0, 0, tddragon3, tddragon3, tddragon3_state, empty_init, "Tiger Electronics (licensed from Technos)", "Double Dragon 3 - The Rosetta Stone (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, tflash, 0, 0, tflash, tflash, tflash_state, empty_init, "Tiger Electronics", "The Flash (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, tmchammer, 0, 0, tmchammer, tmchammer, tmchammer_state, empty_init, "Tiger Electronics", "MC Hammer: U Can't Touch This (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, tbtoads, 0, 0, tbtoads, tbtoads, tbtoads_state, empty_init, "Tiger Electronics (licensed from Rare/Tradewest)", "Battletoads (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1991, thook, 0, 0, thook, thook, thook_state, empty_init, "Tiger Electronics", "Hook (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, tbttf, 0, 0, tbttf, tbttf, tbttf_state, empty_init, "Tiger Electronics", "Back to the Future (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, taddams, 0, 0, taddams, taddams, taddams_state, empty_init, "Tiger Electronics", "The Addams Family (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, thalone, 0, 0, thalone, thalone, thalone_state, empty_init, "Tiger Electronics", "Home Alone (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, txmenpx, 0, 0, txmenpx, txmenpx, txmenpx_state, empty_init, "Tiger Electronics", "X-Men - Project X (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, thalone2, 0, 0, thalone2, thalone2, thalone2_state, empty_init, "Tiger Electronics", "Home Alone 2 - Lost in New York (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, tsonic, 0, 0, tsonic, tsonic, tsonic_state, empty_init, "Tiger Electronics (licensed from Sega)", "Sonic The Hedgehog (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, trobocop3, 0, 0, trobocop3, trobocop3, trobocop3_state, empty_init, "Tiger Electronics", "Robocop 3 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tdummies, 0, 0, tdummies, tdummies, tdummies_state, empty_init, "Tiger Electronics", "The Incredible Crash Dummies (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tsfight2, 0, 0, tsfight2, tsfight2, tsfight2_state, empty_init, "Tiger Electronics (licensed from Capcom)", "Street Fighter II (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, twworld, 0, 0, twworld, twworld, twworld_state, empty_init, "Tiger Electronics", "Wayne's World (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tjpark, 0, 0, tjpark, tjpark, tjpark_state, empty_init, "Tiger Electronics", "Jurassic Park (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tsonic2, 0, 0, tsonic2, tsonic2, tsonic2_state, empty_init, "Tiger Electronics (licensed from Sega)", "Sonic The Hedgehog 2 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tsddragon, 0, 0, tsddragon, tsddragon, tsddragon_state, empty_init, "Tiger Electronics (licensed from Technos)", "Super Double Dragon (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tdennis, 0, 0, tdennis, tdennis, tdennis_state, empty_init, "Tiger Electronics", "Dennis the Menace (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tnmarebc, 0, 0, tnmarebc, tnmarebc, tnmarebc_state, empty_init, "Tiger Electronics", "Nightmare Before Christmas (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // note: title has no "The" +CONS( 1993, ttransf2, 0, 0, ttransf2, ttransf2, ttransf2_state, empty_init, "Tiger Electronics", "Transformers - Generation 2 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1994, topaliens, 0, 0, topaliens, topaliens, topaliens_state, empty_init, "Tiger Electronics", "Operation: Aliens (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1993, tmkombat, 0, 0, tmkombat, tmkombat, tmkombat_state, empty_init, "Tiger Electronics (licensed from Midway)", "Mortal Kombat (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1994, tshadow, 0, 0, tshadow, tshadow, tshadow_state, empty_init, "Tiger Electronics", "The Shadow (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1994, tskelwarr, 0, 0, tskelwarr, tskelwarr, tskelwarr_state, empty_init, "Tiger Electronics", "Skeleton Warriors - The Dark Crusade (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1995, tbatfor, 0, 0, tbatfor, tbatfor, tbatfor_state, empty_init, "Tiger Electronics", "Batman Forever - Double Dose of Doom (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1995, tjdredd, 0, 0, tjdredd, tjdredd, tjdredd_state, empty_init, "Tiger Electronics", "Judge Dredd (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1995, tapollo13, 0, 0, tapollo13, tapollo13, tapollo13_state, empty_init, "Tiger Electronics", "Apollo 13 (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1995, tgoldeye, 0, 0, tgoldeye, tgoldeye, tgoldeye_state, empty_init, "Tiger Electronics", "007: GoldenEye (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1996, tkazaam, 0, 0, tkazaam, tkazaam, tkazaam_state, empty_init, "Tiger Electronics", "Kazaam (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1996, tsjam, 0, 0, tsjam, tsjam, tsjam_state, empty_init, "Tiger Electronics", "Space Jam (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1996, tinday, 0, 0, tinday, tinday, tinday_state, empty_init, "Tiger Electronics", "Independence Day (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Tiger 72-xxx models -CONS( 1992, tbatmana, 0, 0, tbatmana, tbatmana, tbatmana_state, empty_init, "Tiger Electronics", "Batman: The Animated Series (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1992, tbatmana, 0, 0, tbatmana, tbatmana, tbatmana_state, empty_init, "Tiger Electronics", "Batman: The Animated Series (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // Tronica -CONS( 1983, trshutvoy, 0, 0, trshutvoy, trshutvoy, trshutvoy_state, empty_init, "Tronica", "Shuttle Voyage", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1983, tigarden, trshutvoy, 0, tigarden, trshutvoy, trshutvoy_state, empty_init, "Tronica", "Thief in Garden", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1982, trsrescue, 0, 0, trsrescue, trsrescue, trsrescue_state, empty_init, "Tronica", "Space Rescue", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, trshutvoy, 0, 0, trshutvoy, trshutvoy, trshutvoy_state, empty_init, "Tronica", "Shuttle Voyage", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, tigarden, trshutvoy, 0, tigarden, trshutvoy, trshutvoy_state, empty_init, "Tronica", "Thief in Garden", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1982, trsrescue, 0, 0, trsrescue, trsrescue, trsrescue_state, empty_init, "Tronica", "Space Rescue", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // misc -CONS( 1989, nummunch, 0, 0, nummunch, nummunch, nummunch_state, empty_init, "VTech", "Electronic Number Muncher", MACHINE_SUPPORTS_SAVE ) +CONS( 1989, nummunch, 0, 0, nummunch, nummunch, nummunch_state, empty_init, "VTech", "Electronic Number Muncher", MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3 From 4ee2f625bb1c3b52fce4be9a259200d4eb6a8d93 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 10 Jul 2020 00:22:58 +0200 Subject: ui: able to show emulation warnings from tab menu --- src/frontend/mame/ui/info.cpp | 39 +++++++++++++++++++++++++++++---------- src/frontend/mame/ui/info.h | 12 ++++++++++++ src/frontend/mame/ui/mainmenu.cpp | 7 +++++++ src/frontend/mame/ui/menu.h | 1 + src/frontend/mame/ui/ui.cpp | 11 +++++++---- src/frontend/mame/ui/ui.h | 4 +++- 6 files changed, 59 insertions(+), 15 deletions(-) diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index 4ed48005057..ec0c6e72700 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -293,10 +293,6 @@ std::string machine_info::warnings_string() const buf << '\n'; } - // add the 'press OK' string - if (!buf.str().empty()) - buf << _("\n\nPress any key to continue"); - return buf.str(); } @@ -451,9 +447,8 @@ std::string machine_info::get_screen_desc(screen_device &screen) const /*------------------------------------------------- - menu_game_info - handle the game information - menu - -------------------------------------------------*/ + menu_game_info - handle the game information menu +-------------------------------------------------*/ menu_game_info::menu_game_info(mame_ui_manager &mui, render_container &container) : menu(mui, container) { @@ -477,9 +472,33 @@ void menu_game_info::handle() /*------------------------------------------------- - menu_image_info - handle the image information - menu - -------------------------------------------------*/ + menu_warn_info - handle the emulation warnings menu +-------------------------------------------------*/ + +menu_warn_info::menu_warn_info(mame_ui_manager &mui, render_container &container) : menu(mui, container) +{ +} + +menu_warn_info::~menu_warn_info() +{ +} + +void menu_warn_info::populate(float &customtop, float &custombottom) +{ + std::string tempstring = ui().machine_info().warnings_string(); + item_append(std::move(tempstring), "", FLAG_MULTILINE, nullptr); +} + +void menu_warn_info::handle() +{ + // process the menu + process(0); +} + + +/*------------------------------------------------- + menu_image_info - handle the image information menu +-------------------------------------------------*/ menu_image_info::menu_image_info(mame_ui_manager &mui, render_container &container) : menu(mui, container) { diff --git a/src/frontend/mame/ui/info.h b/src/frontend/mame/ui/info.h index a3746ce6b03..0e6fd7815cd 100644 --- a/src/frontend/mame/ui/info.h +++ b/src/frontend/mame/ui/info.h @@ -96,6 +96,18 @@ private: }; +class menu_warn_info : public menu +{ +public: + menu_warn_info(mame_ui_manager &mui, render_container &container); + virtual ~menu_warn_info() override; + +private: + virtual void populate(float &customtop, float &custombottom) override; + virtual void handle() override; +}; + + class menu_image_info : public menu { public: diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp index 9ad99639879..beca0b10a6e 100644 --- a/src/frontend/mame/ui/mainmenu.cpp +++ b/src/frontend/mame/ui/mainmenu.cpp @@ -75,6 +75,9 @@ void menu_main::populate(float &customtop, float &custombottom) item_append(_("Machine Information"), "", 0, (void *)GAME_INFO); + if (ui().found_machine_warnings()) + item_append(_("Warning Information"), "", 0, (void *)WARN_INFO); + for (device_image_interface &image : image_interface_iterator(machine().root_device())) { if (image.user_loadable()) @@ -184,6 +187,10 @@ void menu_main::handle() menu::stack_push(ui(), container()); break; + case WARN_INFO: + menu::stack_push(ui(), container()); + break; + case IMAGE_MENU_IMAGE_INFO: menu::stack_push(ui(), container()); break; diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h index e6861e03ee0..800b0b6ca7b 100644 --- a/src/frontend/mame/ui/menu.h +++ b/src/frontend/mame/ui/menu.h @@ -57,6 +57,7 @@ public: ANALOG, BOOKKEEPING, GAME_INFO, + WARN_INFO, IMAGE_MENU_IMAGE_INFO, IMAGE_MENU_FILE_MANAGER, TAPE_CONTROL, diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 225c908f066..e1b0990193b 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -166,7 +166,9 @@ mame_ui_manager::mame_ui_manager(running_machine &machine) , m_mouse_bitmap(32, 32) , m_mouse_arrow_texture(nullptr) , m_mouse_show(false) - , m_target_font_height(0) {} + , m_target_font_height(0) + , m_has_warnings(false) +{ } mame_ui_manager::~mame_ui_manager() { @@ -329,10 +331,11 @@ void mame_ui_manager::display_startup_screens(bool first_time) switch (state) { case 0: - if (show_warnings) - messagebox_text = machine_info().warnings_string(); - if (!messagebox_text.empty()) + messagebox_text = machine_info().warnings_string(); + m_has_warnings = !messagebox_text.empty(); + if (m_has_warnings && show_warnings) { + messagebox_text.append("\n\nPress any key to continue"); set_handler(ui_callback_type::MODAL, std::bind(&mame_ui_manager::handler_messagebox_anykey, this, _1)); messagebox_backcolor = machine_info().warnings_color(); } diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h index 71f6a5ab8b8..9f32bd470a2 100644 --- a/src/frontend/mame/ui/ui.h +++ b/src/frontend/mame/ui/ui.h @@ -223,6 +223,7 @@ public: void show_mouse(bool status); virtual bool is_menu_active() override; bool can_paste(); + bool found_machine_warnings() const { return m_has_warnings; } void image_handler_ingame(); void increase_frameskip(); void decrease_frameskip(); @@ -261,7 +262,7 @@ private: render_font * m_font; std::function m_handler_callback; ui_callback_type m_handler_callback_type; - uint32_t m_handler_param; + uint32_t m_handler_param; bool m_single_step; bool m_showfps; osd_ticks_t m_showfps_end; @@ -274,6 +275,7 @@ private: ui_options m_ui_options; ui_colors m_ui_colors; float m_target_font_height; + bool m_has_warnings; std::unique_ptr m_machine_info; -- cgit v1.2.3 From 74f456df945cd1720dc4d6bc105f64c13e62ced8 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 10 Jul 2020 00:43:33 +0200 Subject: ui: allow to skip warning popup at start --- src/emu/emuopts.cpp | 1 + src/emu/emuopts.h | 2 + src/frontend/mame/ui/submenu.cpp | 133 ++++++++++++++++++++------------------- src/frontend/mame/ui/ui.cpp | 3 +- 4 files changed, 72 insertions(+), 67 deletions(-) diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 440121e5136..cfb34277ed5 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -195,6 +195,7 @@ const options_entry emu_options::s_option_entries[] = { OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" }, { OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" }, { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the system information screen at startup" }, + { OPTION_SKIP_WARNINGS, "0", OPTION_BOOLEAN, "skip displaying emulation warnings screen at startup" }, { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" }, { OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" }, diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 5a4bc3f118b..b5d236d496f 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -164,6 +164,7 @@ #define OPTION_BIOS "bios" #define OPTION_CHEAT "cheat" #define OPTION_SKIP_GAMEINFO "skip_gameinfo" +#define OPTION_SKIP_WARNINGS "skip_warnings" #define OPTION_UI_FONT "uifont" #define OPTION_UI "ui" #define OPTION_RAMSIZE "ramsize" @@ -441,6 +442,7 @@ public: const char *bios() const { return value(OPTION_BIOS); } bool cheat() const { return bool_value(OPTION_CHEAT); } bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); } + bool skip_warnings() const { return bool_value(OPTION_SKIP_WARNINGS); } const char *ui_font() const { return value(OPTION_UI_FONT); } ui_option ui() const { return m_ui; } const char *ram_size() const { return value(OPTION_RAMSIZE); } diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp index 207ac56d057..c638f613fc6 100644 --- a/src/frontend/mame/ui/submenu.cpp +++ b/src/frontend/mame/ui/submenu.cpp @@ -20,95 +20,96 @@ namespace ui { std::vector const submenu::misc_options = { { submenu::option_type::HEAD, __("Miscellaneous Options") }, - { submenu::option_type::UI, __("Re-select last machine played"), OPTION_REMEMBER_LAST }, - { submenu::option_type::UI, __("Enlarge images in the right panel"), OPTION_ENLARGE_SNAPS }, - { submenu::option_type::EMU, __("Cheats"), OPTION_CHEAT }, - { submenu::option_type::EMU, __("Show mouse pointer"), OPTION_UI_MOUSE }, - { submenu::option_type::EMU, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT }, - { submenu::option_type::EMU, __("Skip information screen at startup"), OPTION_SKIP_GAMEINFO }, - { submenu::option_type::UI, __("Force 4:3 aspect for snapshot display"), OPTION_FORCED4X3 }, - { submenu::option_type::UI, __("Use image as background"), OPTION_USE_BACKGROUND }, - { submenu::option_type::UI, __("Skip BIOS selection menu"), OPTION_SKIP_BIOS_MENU }, - { submenu::option_type::UI, __("Skip software parts selection menu"), OPTION_SKIP_PARTS_MENU }, - { submenu::option_type::UI, __("Info auto audit"), OPTION_INFO_AUTO_AUDIT }, - { submenu::option_type::UI, __("Hide romless machine from available list"),OPTION_HIDE_ROMLESS }, + { submenu::option_type::UI, __("Re-select last machine played"), OPTION_REMEMBER_LAST }, + { submenu::option_type::UI, __("Enlarge images in the right panel"), OPTION_ENLARGE_SNAPS }, + { submenu::option_type::EMU, __("Cheats"), OPTION_CHEAT }, + { submenu::option_type::EMU, __("Show mouse pointer"), OPTION_UI_MOUSE }, + { submenu::option_type::EMU, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT }, + { submenu::option_type::EMU, __("Skip information screen at startup"), OPTION_SKIP_GAMEINFO }, + { submenu::option_type::EMU, __("Skip emulation warnings screen at startup"), OPTION_SKIP_WARNINGS }, + { submenu::option_type::UI, __("Force 4:3 aspect for snapshot display"), OPTION_FORCED4X3 }, + { submenu::option_type::UI, __("Use image as background"), OPTION_USE_BACKGROUND }, + { submenu::option_type::UI, __("Skip BIOS selection menu"), OPTION_SKIP_BIOS_MENU }, + { submenu::option_type::UI, __("Skip software parts selection menu"), OPTION_SKIP_PARTS_MENU }, + { submenu::option_type::UI, __("Info auto audit"), OPTION_INFO_AUTO_AUDIT }, + { submenu::option_type::UI, __("Hide romless machine from available list"), OPTION_HIDE_ROMLESS }, }; std::vector const submenu::advanced_options = { { submenu::option_type::HEAD, __("Advanced Options") }, { submenu::option_type::HEAD, __("Performance Options") }, - { submenu::option_type::EMU, __("Auto frame skip"), OPTION_AUTOFRAMESKIP }, - { submenu::option_type::EMU, __("Frame skip"), OPTION_FRAMESKIP }, - { submenu::option_type::EMU, __("Throttle"), OPTION_THROTTLE }, - { submenu::option_type::EMU, __("Sleep"), OPTION_SLEEP }, - { submenu::option_type::EMU, __("Speed"), OPTION_SPEED }, - { submenu::option_type::EMU, __("Refresh speed"), OPTION_REFRESHSPEED }, - { submenu::option_type::EMU, __("Low latency"), OPTION_LOWLATENCY }, + { submenu::option_type::EMU, __("Auto frame skip"), OPTION_AUTOFRAMESKIP }, + { submenu::option_type::EMU, __("Frame skip"), OPTION_FRAMESKIP }, + { submenu::option_type::EMU, __("Throttle"), OPTION_THROTTLE }, + { submenu::option_type::EMU, __("Sleep"), OPTION_SLEEP }, + { submenu::option_type::EMU, __("Speed"), OPTION_SPEED }, + { submenu::option_type::EMU, __("Refresh speed"), OPTION_REFRESHSPEED }, + { submenu::option_type::EMU, __("Low latency"), OPTION_LOWLATENCY }, { submenu::option_type::HEAD, __("Rotation Options") }, - { submenu::option_type::EMU, __("Rotate"), OPTION_ROTATE }, - { submenu::option_type::EMU, __("Rotate right"), OPTION_ROR }, - { submenu::option_type::EMU, __("Rotate left"), OPTION_ROL }, - { submenu::option_type::EMU, __("Auto rotate right"), OPTION_AUTOROR }, - { submenu::option_type::EMU, __("Auto rotate left"), OPTION_AUTOROL }, - { submenu::option_type::EMU, __("Flip X"), OPTION_FLIPX }, - { submenu::option_type::EMU, __("Flip Y"), OPTION_FLIPY }, + { submenu::option_type::EMU, __("Rotate"), OPTION_ROTATE }, + { submenu::option_type::EMU, __("Rotate right"), OPTION_ROR }, + { submenu::option_type::EMU, __("Rotate left"), OPTION_ROL }, + { submenu::option_type::EMU, __("Auto rotate right"), OPTION_AUTOROR }, + { submenu::option_type::EMU, __("Auto rotate left"), OPTION_AUTOROL }, + { submenu::option_type::EMU, __("Flip X"), OPTION_FLIPX }, + { submenu::option_type::EMU, __("Flip Y"), OPTION_FLIPY }, { submenu::option_type::HEAD, __("Artwork Options") }, - { submenu::option_type::EMU, __("Artwork Crop"), OPTION_ARTWORK_CROP }, + { submenu::option_type::EMU, __("Artwork Crop"), OPTION_ARTWORK_CROP }, { submenu::option_type::HEAD, __("State/Playback Options") }, - { submenu::option_type::EMU, __("Automatic save/restore"), OPTION_AUTOSAVE }, - { submenu::option_type::EMU, __("Rewind"), OPTION_REWIND }, - { submenu::option_type::EMU, __("Rewind capacity"), OPTION_REWIND_CAPACITY }, - { submenu::option_type::EMU, __("Bilinear snapshot"), OPTION_SNAPBILINEAR }, - { submenu::option_type::EMU, __("Burn-in"), OPTION_BURNIN }, + { submenu::option_type::EMU, __("Automatic save/restore"), OPTION_AUTOSAVE }, + { submenu::option_type::EMU, __("Rewind"), OPTION_REWIND }, + { submenu::option_type::EMU, __("Rewind capacity"), OPTION_REWIND_CAPACITY }, + { submenu::option_type::EMU, __("Bilinear snapshot"), OPTION_SNAPBILINEAR }, + { submenu::option_type::EMU, __("Burn-in"), OPTION_BURNIN }, { submenu::option_type::HEAD, __("Input Options") }, - { submenu::option_type::EMU, __("Coin lockout"), OPTION_COIN_LOCKOUT }, - { submenu::option_type::EMU, __("Mouse"), OPTION_MOUSE }, - { submenu::option_type::EMU, __("Joystick"), OPTION_JOYSTICK }, - { submenu::option_type::EMU, __("Lightgun"), OPTION_LIGHTGUN }, - { submenu::option_type::EMU, __("Multi-keyboard"), OPTION_MULTIKEYBOARD }, - { submenu::option_type::EMU, __("Multi-mouse"), OPTION_MULTIMOUSE }, - { submenu::option_type::EMU, __("Steadykey"), OPTION_STEADYKEY }, - { submenu::option_type::EMU, __("UI active"), OPTION_UI_ACTIVE }, - { submenu::option_type::EMU, __("Offscreen reload"), OPTION_OFFSCREEN_RELOAD }, - { submenu::option_type::EMU, __("Joystick deadzone"), OPTION_JOYSTICK_DEADZONE }, - { submenu::option_type::EMU, __("Joystick saturation"), OPTION_JOYSTICK_SATURATION }, - { submenu::option_type::EMU, __("Natural keyboard"), OPTION_NATURAL_KEYBOARD }, - { submenu::option_type::EMU, __("Simultaneous contradictory"), OPTION_JOYSTICK_CONTRADICTORY }, - { submenu::option_type::EMU, __("Coin impulse"), OPTION_COIN_IMPULSE }, + { submenu::option_type::EMU, __("Coin lockout"), OPTION_COIN_LOCKOUT }, + { submenu::option_type::EMU, __("Mouse"), OPTION_MOUSE }, + { submenu::option_type::EMU, __("Joystick"), OPTION_JOYSTICK }, + { submenu::option_type::EMU, __("Lightgun"), OPTION_LIGHTGUN }, + { submenu::option_type::EMU, __("Multi-keyboard"), OPTION_MULTIKEYBOARD }, + { submenu::option_type::EMU, __("Multi-mouse"), OPTION_MULTIMOUSE }, + { submenu::option_type::EMU, __("Steadykey"), OPTION_STEADYKEY }, + { submenu::option_type::EMU, __("UI active"), OPTION_UI_ACTIVE }, + { submenu::option_type::EMU, __("Offscreen reload"), OPTION_OFFSCREEN_RELOAD }, + { submenu::option_type::EMU, __("Joystick deadzone"), OPTION_JOYSTICK_DEADZONE }, + { submenu::option_type::EMU, __("Joystick saturation"), OPTION_JOYSTICK_SATURATION }, + { submenu::option_type::EMU, __("Natural keyboard"), OPTION_NATURAL_KEYBOARD }, + { submenu::option_type::EMU, __("Simultaneous contradictory"), OPTION_JOYSTICK_CONTRADICTORY }, + { submenu::option_type::EMU, __("Coin impulse"), OPTION_COIN_IMPULSE }, }; std::vector const submenu::control_options = { { submenu::option_type::HEAD, __("Device Mapping") }, - { submenu::option_type::EMU, __("Lightgun Device Assignment"), OPTION_LIGHTGUN_DEVICE }, - { submenu::option_type::EMU, __("Trackball Device Assignment"), OPTION_TRACKBALL_DEVICE }, - { submenu::option_type::EMU, __("Pedal Device Assignment"), OPTION_PEDAL_DEVICE }, - { submenu::option_type::EMU, __("Adstick Device Assignment"), OPTION_ADSTICK_DEVICE }, - { submenu::option_type::EMU, __("Paddle Device Assignment"), OPTION_PADDLE_DEVICE }, - { submenu::option_type::EMU, __("Dial Device Assignment"), OPTION_DIAL_DEVICE }, - { submenu::option_type::EMU, __("Positional Device Assignment"), OPTION_POSITIONAL_DEVICE }, - { submenu::option_type::EMU, __("Mouse Device Assignment"), OPTION_MOUSE_DEVICE } + { submenu::option_type::EMU, __("Lightgun Device Assignment"), OPTION_LIGHTGUN_DEVICE }, + { submenu::option_type::EMU, __("Trackball Device Assignment"), OPTION_TRACKBALL_DEVICE }, + { submenu::option_type::EMU, __("Pedal Device Assignment"), OPTION_PEDAL_DEVICE }, + { submenu::option_type::EMU, __("Adstick Device Assignment"), OPTION_ADSTICK_DEVICE }, + { submenu::option_type::EMU, __("Paddle Device Assignment"), OPTION_PADDLE_DEVICE }, + { submenu::option_type::EMU, __("Dial Device Assignment"), OPTION_DIAL_DEVICE }, + { submenu::option_type::EMU, __("Positional Device Assignment"), OPTION_POSITIONAL_DEVICE }, + { submenu::option_type::EMU, __("Mouse Device Assignment"), OPTION_MOUSE_DEVICE } }; std::vector const submenu::video_options = { { submenu::option_type::HEAD, __("Video Options") }, - { submenu::option_type::OSD, __("Video Mode"), OSDOPTION_VIDEO }, - { submenu::option_type::OSD, __("Number Of Screens"), OSDOPTION_NUMSCREENS }, + { submenu::option_type::OSD, __("Video Mode"), OSDOPTION_VIDEO }, + { submenu::option_type::OSD, __("Number Of Screens"), OSDOPTION_NUMSCREENS }, #if defined(UI_WINDOWS) && !defined(UI_SDL) - { submenu::option_type::OSD, __("Triple Buffering"), WINOPTION_TRIPLEBUFFER }, - { submenu::option_type::OSD, __("HLSL"), WINOPTION_HLSL_ENABLE }, + { submenu::option_type::OSD, __("Triple Buffering"), WINOPTION_TRIPLEBUFFER }, + { submenu::option_type::OSD, __("HLSL"), WINOPTION_HLSL_ENABLE }, #endif - { submenu::option_type::OSD, __("GLSL"), OSDOPTION_GL_GLSL }, - { submenu::option_type::OSD, __("Bilinear Filtering"), OSDOPTION_FILTER }, - { submenu::option_type::OSD, __("Bitmap Prescaling"), OSDOPTION_PRESCALE }, - { submenu::option_type::OSD, __("Window Mode"), OSDOPTION_WINDOW }, - { submenu::option_type::EMU, __("Enforce Aspect Ratio"), OPTION_KEEPASPECT }, - { submenu::option_type::OSD, __("Start Out Maximized"), OSDOPTION_MAXIMIZE }, - { submenu::option_type::OSD, __("Synchronized Refresh"), OSDOPTION_SYNCREFRESH }, - { submenu::option_type::OSD, __("Wait Vertical Sync"), OSDOPTION_WAITVSYNC } + { submenu::option_type::OSD, __("GLSL"), OSDOPTION_GL_GLSL }, + { submenu::option_type::OSD, __("Bilinear Filtering"), OSDOPTION_FILTER }, + { submenu::option_type::OSD, __("Bitmap Prescaling"), OSDOPTION_PRESCALE }, + { submenu::option_type::OSD, __("Window Mode"), OSDOPTION_WINDOW }, + { submenu::option_type::EMU, __("Enforce Aspect Ratio"), OPTION_KEEPASPECT }, + { submenu::option_type::OSD, __("Start Out Maximized"), OSDOPTION_MAXIMIZE }, + { submenu::option_type::OSD, __("Synchronized Refresh"), OSDOPTION_SYNCREFRESH }, + { submenu::option_type::OSD, __("Wait Vertical Sync"), OSDOPTION_WAITVSYNC } }; //std::vector const submenu::export_options = { diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index e1b0990193b..9ea166a5c90 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -305,7 +305,8 @@ void mame_ui_manager::display_startup_screens(bool first_time) const int maxstate = 3; int str = machine().options().seconds_to_run(); bool show_gameinfo = !machine().options().skip_gameinfo(); - bool show_warnings = true, show_mandatory_fileman = true; + bool show_warnings = !machine().options().skip_warnings(); + bool show_mandatory_fileman = true; bool video_none = strcmp(downcast(machine().options()).video(), OSDOPTVAL_NONE) == 0; // disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver, -- cgit v1.2.3 From 0b026c7623780af9f3f2b20278458197f0b5e4be Mon Sep 17 00:00:00 2001 From: algestam Date: Fri, 10 Jul 2020 00:58:55 +0200 Subject: gnw_dkong3: Add pcb label (#6936) --- src/mame/drivers/hh_sm510.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 2f943a48c51..47642ac7c6d 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -4193,6 +4193,7 @@ ROM_END /*************************************************************************** Nintendo Micro Vs. System: Donkey Kong 3 (model AK-302) + * PCB label AK-302M * Sharp SM511 label AK-302 299D (no decap) * wide lcd screen with custom segments, 1-bit sound -- cgit v1.2.3 From 028b43b74446cae777967321587a83b0fffbb09a Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Thu, 9 Jul 2020 20:15:24 -0400 Subject: Begin pruning of redundant #includes (nw) --- src/mame/drivers/cv1k.cpp | 1 - src/mame/drivers/iris3130.cpp | 2 -- src/mame/drivers/starrider.cpp | 1 - src/mame/drivers/tutankhm.cpp | 1 - src/mame/drivers/vgmplay.cpp | 3 --- 5 files changed, 8 deletions(-) diff --git a/src/mame/drivers/cv1k.cpp b/src/mame/drivers/cv1k.cpp index 343005dda61..921f63c390c 100644 --- a/src/mame/drivers/cv1k.cpp +++ b/src/mame/drivers/cv1k.cpp @@ -180,7 +180,6 @@ Common game codes: #include "video/epic12.h" #include "emupal.h" -#include "profiler.h" #include "screen.h" #include "speaker.h" diff --git a/src/mame/drivers/iris3130.cpp b/src/mame/drivers/iris3130.cpp index fdd4ce77e6e..0133e97db99 100644 --- a/src/mame/drivers/iris3130.cpp +++ b/src/mame/drivers/iris3130.cpp @@ -43,8 +43,6 @@ #include "machine/mc146818.h" #include "machine/mc68681.h" -#include - #define LOG_RTC (1 << 0) #define LOG_INVALID_SEGMENT (1 << 1) #define LOG_OTHER (1 << 2) diff --git a/src/mame/drivers/starrider.cpp b/src/mame/drivers/starrider.cpp index 5b37d33585e..35082a77d77 100644 --- a/src/mame/drivers/starrider.cpp +++ b/src/mame/drivers/starrider.cpp @@ -263,7 +263,6 @@ #include "emupal.h" #include -#include namespace { diff --git a/src/mame/drivers/tutankhm.cpp b/src/mame/drivers/tutankhm.cpp index 5485d85a965..102af3cc4ae 100644 --- a/src/mame/drivers/tutankhm.cpp +++ b/src/mame/drivers/tutankhm.cpp @@ -92,7 +92,6 @@ #include "machine/watchdog.h" #include "screen.h" #include "speaker.h" -#include "schedule.h" /************************************* diff --git a/src/mame/drivers/vgmplay.cpp b/src/mame/drivers/vgmplay.cpp index 42439e94f22..cbba0c5aec4 100644 --- a/src/mame/drivers/vgmplay.cpp +++ b/src/mame/drivers/vgmplay.cpp @@ -61,10 +61,7 @@ #include -#include -#include #include -#include #include #define AS_IO16 1 -- cgit v1.2.3 From b8e6f6332f9cfc6808dbef796256f4b4b0971ac6 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 10 Jul 2020 11:39:29 +1000 Subject: Revert "ui: allow to skip warning popup at start" This reverts commit 74f456df945cd1720dc4d6bc105f64c13e62ced8. I will allow the feature with the following conditions: * No skipping red warnings. * A key-value map of device shortnames and yellow warnings must be stored in the .cfg file, along with a timestamp of the last time the system was run and the last time a warning was shown. * On starting a system, the map of device shortnames and yellow warnings must be built and compared to the one loaded from the .cfg file. If it doesn't match, if the system hasn't been started in seven days, or a yellow warning hasn't been shown in 14 days, the warning is not to be skipped. --- src/emu/emuopts.cpp | 1 - src/emu/emuopts.h | 2 - src/frontend/mame/ui/submenu.cpp | 133 +++++++++++++++++++-------------------- src/frontend/mame/ui/ui.cpp | 3 +- 4 files changed, 67 insertions(+), 72 deletions(-) diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index cfb34277ed5..440121e5136 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -195,7 +195,6 @@ const options_entry emu_options::s_option_entries[] = { OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" }, { OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" }, { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the system information screen at startup" }, - { OPTION_SKIP_WARNINGS, "0", OPTION_BOOLEAN, "skip displaying emulation warnings screen at startup" }, { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" }, { OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" }, diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index b5d236d496f..5a4bc3f118b 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -164,7 +164,6 @@ #define OPTION_BIOS "bios" #define OPTION_CHEAT "cheat" #define OPTION_SKIP_GAMEINFO "skip_gameinfo" -#define OPTION_SKIP_WARNINGS "skip_warnings" #define OPTION_UI_FONT "uifont" #define OPTION_UI "ui" #define OPTION_RAMSIZE "ramsize" @@ -442,7 +441,6 @@ public: const char *bios() const { return value(OPTION_BIOS); } bool cheat() const { return bool_value(OPTION_CHEAT); } bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); } - bool skip_warnings() const { return bool_value(OPTION_SKIP_WARNINGS); } const char *ui_font() const { return value(OPTION_UI_FONT); } ui_option ui() const { return m_ui; } const char *ram_size() const { return value(OPTION_RAMSIZE); } diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp index c638f613fc6..207ac56d057 100644 --- a/src/frontend/mame/ui/submenu.cpp +++ b/src/frontend/mame/ui/submenu.cpp @@ -20,96 +20,95 @@ namespace ui { std::vector const submenu::misc_options = { { submenu::option_type::HEAD, __("Miscellaneous Options") }, - { submenu::option_type::UI, __("Re-select last machine played"), OPTION_REMEMBER_LAST }, - { submenu::option_type::UI, __("Enlarge images in the right panel"), OPTION_ENLARGE_SNAPS }, - { submenu::option_type::EMU, __("Cheats"), OPTION_CHEAT }, - { submenu::option_type::EMU, __("Show mouse pointer"), OPTION_UI_MOUSE }, - { submenu::option_type::EMU, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT }, - { submenu::option_type::EMU, __("Skip information screen at startup"), OPTION_SKIP_GAMEINFO }, - { submenu::option_type::EMU, __("Skip emulation warnings screen at startup"), OPTION_SKIP_WARNINGS }, - { submenu::option_type::UI, __("Force 4:3 aspect for snapshot display"), OPTION_FORCED4X3 }, - { submenu::option_type::UI, __("Use image as background"), OPTION_USE_BACKGROUND }, - { submenu::option_type::UI, __("Skip BIOS selection menu"), OPTION_SKIP_BIOS_MENU }, - { submenu::option_type::UI, __("Skip software parts selection menu"), OPTION_SKIP_PARTS_MENU }, - { submenu::option_type::UI, __("Info auto audit"), OPTION_INFO_AUTO_AUDIT }, - { submenu::option_type::UI, __("Hide romless machine from available list"), OPTION_HIDE_ROMLESS }, + { submenu::option_type::UI, __("Re-select last machine played"), OPTION_REMEMBER_LAST }, + { submenu::option_type::UI, __("Enlarge images in the right panel"), OPTION_ENLARGE_SNAPS }, + { submenu::option_type::EMU, __("Cheats"), OPTION_CHEAT }, + { submenu::option_type::EMU, __("Show mouse pointer"), OPTION_UI_MOUSE }, + { submenu::option_type::EMU, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT }, + { submenu::option_type::EMU, __("Skip information screen at startup"), OPTION_SKIP_GAMEINFO }, + { submenu::option_type::UI, __("Force 4:3 aspect for snapshot display"), OPTION_FORCED4X3 }, + { submenu::option_type::UI, __("Use image as background"), OPTION_USE_BACKGROUND }, + { submenu::option_type::UI, __("Skip BIOS selection menu"), OPTION_SKIP_BIOS_MENU }, + { submenu::option_type::UI, __("Skip software parts selection menu"), OPTION_SKIP_PARTS_MENU }, + { submenu::option_type::UI, __("Info auto audit"), OPTION_INFO_AUTO_AUDIT }, + { submenu::option_type::UI, __("Hide romless machine from available list"),OPTION_HIDE_ROMLESS }, }; std::vector const submenu::advanced_options = { { submenu::option_type::HEAD, __("Advanced Options") }, { submenu::option_type::HEAD, __("Performance Options") }, - { submenu::option_type::EMU, __("Auto frame skip"), OPTION_AUTOFRAMESKIP }, - { submenu::option_type::EMU, __("Frame skip"), OPTION_FRAMESKIP }, - { submenu::option_type::EMU, __("Throttle"), OPTION_THROTTLE }, - { submenu::option_type::EMU, __("Sleep"), OPTION_SLEEP }, - { submenu::option_type::EMU, __("Speed"), OPTION_SPEED }, - { submenu::option_type::EMU, __("Refresh speed"), OPTION_REFRESHSPEED }, - { submenu::option_type::EMU, __("Low latency"), OPTION_LOWLATENCY }, + { submenu::option_type::EMU, __("Auto frame skip"), OPTION_AUTOFRAMESKIP }, + { submenu::option_type::EMU, __("Frame skip"), OPTION_FRAMESKIP }, + { submenu::option_type::EMU, __("Throttle"), OPTION_THROTTLE }, + { submenu::option_type::EMU, __("Sleep"), OPTION_SLEEP }, + { submenu::option_type::EMU, __("Speed"), OPTION_SPEED }, + { submenu::option_type::EMU, __("Refresh speed"), OPTION_REFRESHSPEED }, + { submenu::option_type::EMU, __("Low latency"), OPTION_LOWLATENCY }, { submenu::option_type::HEAD, __("Rotation Options") }, - { submenu::option_type::EMU, __("Rotate"), OPTION_ROTATE }, - { submenu::option_type::EMU, __("Rotate right"), OPTION_ROR }, - { submenu::option_type::EMU, __("Rotate left"), OPTION_ROL }, - { submenu::option_type::EMU, __("Auto rotate right"), OPTION_AUTOROR }, - { submenu::option_type::EMU, __("Auto rotate left"), OPTION_AUTOROL }, - { submenu::option_type::EMU, __("Flip X"), OPTION_FLIPX }, - { submenu::option_type::EMU, __("Flip Y"), OPTION_FLIPY }, + { submenu::option_type::EMU, __("Rotate"), OPTION_ROTATE }, + { submenu::option_type::EMU, __("Rotate right"), OPTION_ROR }, + { submenu::option_type::EMU, __("Rotate left"), OPTION_ROL }, + { submenu::option_type::EMU, __("Auto rotate right"), OPTION_AUTOROR }, + { submenu::option_type::EMU, __("Auto rotate left"), OPTION_AUTOROL }, + { submenu::option_type::EMU, __("Flip X"), OPTION_FLIPX }, + { submenu::option_type::EMU, __("Flip Y"), OPTION_FLIPY }, { submenu::option_type::HEAD, __("Artwork Options") }, - { submenu::option_type::EMU, __("Artwork Crop"), OPTION_ARTWORK_CROP }, + { submenu::option_type::EMU, __("Artwork Crop"), OPTION_ARTWORK_CROP }, { submenu::option_type::HEAD, __("State/Playback Options") }, - { submenu::option_type::EMU, __("Automatic save/restore"), OPTION_AUTOSAVE }, - { submenu::option_type::EMU, __("Rewind"), OPTION_REWIND }, - { submenu::option_type::EMU, __("Rewind capacity"), OPTION_REWIND_CAPACITY }, - { submenu::option_type::EMU, __("Bilinear snapshot"), OPTION_SNAPBILINEAR }, - { submenu::option_type::EMU, __("Burn-in"), OPTION_BURNIN }, + { submenu::option_type::EMU, __("Automatic save/restore"), OPTION_AUTOSAVE }, + { submenu::option_type::EMU, __("Rewind"), OPTION_REWIND }, + { submenu::option_type::EMU, __("Rewind capacity"), OPTION_REWIND_CAPACITY }, + { submenu::option_type::EMU, __("Bilinear snapshot"), OPTION_SNAPBILINEAR }, + { submenu::option_type::EMU, __("Burn-in"), OPTION_BURNIN }, { submenu::option_type::HEAD, __("Input Options") }, - { submenu::option_type::EMU, __("Coin lockout"), OPTION_COIN_LOCKOUT }, - { submenu::option_type::EMU, __("Mouse"), OPTION_MOUSE }, - { submenu::option_type::EMU, __("Joystick"), OPTION_JOYSTICK }, - { submenu::option_type::EMU, __("Lightgun"), OPTION_LIGHTGUN }, - { submenu::option_type::EMU, __("Multi-keyboard"), OPTION_MULTIKEYBOARD }, - { submenu::option_type::EMU, __("Multi-mouse"), OPTION_MULTIMOUSE }, - { submenu::option_type::EMU, __("Steadykey"), OPTION_STEADYKEY }, - { submenu::option_type::EMU, __("UI active"), OPTION_UI_ACTIVE }, - { submenu::option_type::EMU, __("Offscreen reload"), OPTION_OFFSCREEN_RELOAD }, - { submenu::option_type::EMU, __("Joystick deadzone"), OPTION_JOYSTICK_DEADZONE }, - { submenu::option_type::EMU, __("Joystick saturation"), OPTION_JOYSTICK_SATURATION }, - { submenu::option_type::EMU, __("Natural keyboard"), OPTION_NATURAL_KEYBOARD }, - { submenu::option_type::EMU, __("Simultaneous contradictory"), OPTION_JOYSTICK_CONTRADICTORY }, - { submenu::option_type::EMU, __("Coin impulse"), OPTION_COIN_IMPULSE }, + { submenu::option_type::EMU, __("Coin lockout"), OPTION_COIN_LOCKOUT }, + { submenu::option_type::EMU, __("Mouse"), OPTION_MOUSE }, + { submenu::option_type::EMU, __("Joystick"), OPTION_JOYSTICK }, + { submenu::option_type::EMU, __("Lightgun"), OPTION_LIGHTGUN }, + { submenu::option_type::EMU, __("Multi-keyboard"), OPTION_MULTIKEYBOARD }, + { submenu::option_type::EMU, __("Multi-mouse"), OPTION_MULTIMOUSE }, + { submenu::option_type::EMU, __("Steadykey"), OPTION_STEADYKEY }, + { submenu::option_type::EMU, __("UI active"), OPTION_UI_ACTIVE }, + { submenu::option_type::EMU, __("Offscreen reload"), OPTION_OFFSCREEN_RELOAD }, + { submenu::option_type::EMU, __("Joystick deadzone"), OPTION_JOYSTICK_DEADZONE }, + { submenu::option_type::EMU, __("Joystick saturation"), OPTION_JOYSTICK_SATURATION }, + { submenu::option_type::EMU, __("Natural keyboard"), OPTION_NATURAL_KEYBOARD }, + { submenu::option_type::EMU, __("Simultaneous contradictory"), OPTION_JOYSTICK_CONTRADICTORY }, + { submenu::option_type::EMU, __("Coin impulse"), OPTION_COIN_IMPULSE }, }; std::vector const submenu::control_options = { { submenu::option_type::HEAD, __("Device Mapping") }, - { submenu::option_type::EMU, __("Lightgun Device Assignment"), OPTION_LIGHTGUN_DEVICE }, - { submenu::option_type::EMU, __("Trackball Device Assignment"), OPTION_TRACKBALL_DEVICE }, - { submenu::option_type::EMU, __("Pedal Device Assignment"), OPTION_PEDAL_DEVICE }, - { submenu::option_type::EMU, __("Adstick Device Assignment"), OPTION_ADSTICK_DEVICE }, - { submenu::option_type::EMU, __("Paddle Device Assignment"), OPTION_PADDLE_DEVICE }, - { submenu::option_type::EMU, __("Dial Device Assignment"), OPTION_DIAL_DEVICE }, - { submenu::option_type::EMU, __("Positional Device Assignment"), OPTION_POSITIONAL_DEVICE }, - { submenu::option_type::EMU, __("Mouse Device Assignment"), OPTION_MOUSE_DEVICE } + { submenu::option_type::EMU, __("Lightgun Device Assignment"), OPTION_LIGHTGUN_DEVICE }, + { submenu::option_type::EMU, __("Trackball Device Assignment"), OPTION_TRACKBALL_DEVICE }, + { submenu::option_type::EMU, __("Pedal Device Assignment"), OPTION_PEDAL_DEVICE }, + { submenu::option_type::EMU, __("Adstick Device Assignment"), OPTION_ADSTICK_DEVICE }, + { submenu::option_type::EMU, __("Paddle Device Assignment"), OPTION_PADDLE_DEVICE }, + { submenu::option_type::EMU, __("Dial Device Assignment"), OPTION_DIAL_DEVICE }, + { submenu::option_type::EMU, __("Positional Device Assignment"), OPTION_POSITIONAL_DEVICE }, + { submenu::option_type::EMU, __("Mouse Device Assignment"), OPTION_MOUSE_DEVICE } }; std::vector const submenu::video_options = { { submenu::option_type::HEAD, __("Video Options") }, - { submenu::option_type::OSD, __("Video Mode"), OSDOPTION_VIDEO }, - { submenu::option_type::OSD, __("Number Of Screens"), OSDOPTION_NUMSCREENS }, + { submenu::option_type::OSD, __("Video Mode"), OSDOPTION_VIDEO }, + { submenu::option_type::OSD, __("Number Of Screens"), OSDOPTION_NUMSCREENS }, #if defined(UI_WINDOWS) && !defined(UI_SDL) - { submenu::option_type::OSD, __("Triple Buffering"), WINOPTION_TRIPLEBUFFER }, - { submenu::option_type::OSD, __("HLSL"), WINOPTION_HLSL_ENABLE }, + { submenu::option_type::OSD, __("Triple Buffering"), WINOPTION_TRIPLEBUFFER }, + { submenu::option_type::OSD, __("HLSL"), WINOPTION_HLSL_ENABLE }, #endif - { submenu::option_type::OSD, __("GLSL"), OSDOPTION_GL_GLSL }, - { submenu::option_type::OSD, __("Bilinear Filtering"), OSDOPTION_FILTER }, - { submenu::option_type::OSD, __("Bitmap Prescaling"), OSDOPTION_PRESCALE }, - { submenu::option_type::OSD, __("Window Mode"), OSDOPTION_WINDOW }, - { submenu::option_type::EMU, __("Enforce Aspect Ratio"), OPTION_KEEPASPECT }, - { submenu::option_type::OSD, __("Start Out Maximized"), OSDOPTION_MAXIMIZE }, - { submenu::option_type::OSD, __("Synchronized Refresh"), OSDOPTION_SYNCREFRESH }, - { submenu::option_type::OSD, __("Wait Vertical Sync"), OSDOPTION_WAITVSYNC } + { submenu::option_type::OSD, __("GLSL"), OSDOPTION_GL_GLSL }, + { submenu::option_type::OSD, __("Bilinear Filtering"), OSDOPTION_FILTER }, + { submenu::option_type::OSD, __("Bitmap Prescaling"), OSDOPTION_PRESCALE }, + { submenu::option_type::OSD, __("Window Mode"), OSDOPTION_WINDOW }, + { submenu::option_type::EMU, __("Enforce Aspect Ratio"), OPTION_KEEPASPECT }, + { submenu::option_type::OSD, __("Start Out Maximized"), OSDOPTION_MAXIMIZE }, + { submenu::option_type::OSD, __("Synchronized Refresh"), OSDOPTION_SYNCREFRESH }, + { submenu::option_type::OSD, __("Wait Vertical Sync"), OSDOPTION_WAITVSYNC } }; //std::vector const submenu::export_options = { diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 9ea166a5c90..e1b0990193b 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -305,8 +305,7 @@ void mame_ui_manager::display_startup_screens(bool first_time) const int maxstate = 3; int str = machine().options().seconds_to_run(); bool show_gameinfo = !machine().options().skip_gameinfo(); - bool show_warnings = !machine().options().skip_warnings(); - bool show_mandatory_fileman = true; + bool show_warnings = true, show_mandatory_fileman = true; bool video_none = strcmp(downcast(machine().options()).video(), OSDOPTVAL_NONE) == 0; // disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver, -- cgit v1.2.3 From e8831b72a925fe5a65155384517d4cda28da2cf3 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 9 Jul 2020 23:08:14 -0400 Subject: New machines marked as NOT_WORKING ---------------------------------- Proteus/1 16-Bit Multi-Timbral Digital Sound Module [DBWBP] Proteus/1 XR 16-Bit Multi-Timbral Digital Sound Module [DBWBP] Pro/Cussion Maximum Percussion Module [DBWBP] Vintage Keys Classic Analog Keyboards [DBWBP] Orbit 9090 - The Dance Planet [DBWBP] Planet Phatt [DBWBP] Carnaval - Jugando con Fuego [DBWBP] --- scripts/target/mame/mess.lua | 1 + src/mame/drivers/emu68k.cpp | 243 +++++++++++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 9 ++ src/mame/mess.flt | 1 + 4 files changed, 254 insertions(+) create mode 100644 src/mame/drivers/emu68k.cpp diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 641676290a8..5bb226d03c0 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -2247,6 +2247,7 @@ createMESSProjects(_target, _subtarget, "emusys") files { MAME_DIR .. "src/mame/drivers/emu2.cpp", MAME_DIR .. "src/mame/drivers/emu3.cpp", + MAME_DIR .. "src/mame/drivers/emu68k.cpp", } createMESSProjects(_target, _subtarget, "ensoniq") diff --git a/src/mame/drivers/emu68k.cpp b/src/mame/drivers/emu68k.cpp new file mode 100644 index 00000000000..2d1d92559d6 --- /dev/null +++ b/src/mame/drivers/emu68k.cpp @@ -0,0 +1,243 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*********************************************************************************************************************************** + + Skeleton driver for E-mu Proteus and other MC68000-based synthesizer modules. + +***********************************************************************************************************************************/ + +#include "emu.h" +#include "cpu/m68000/m68000.h" +#include "machine/mc68901.h" +#include "video/hd44780.h" +#include "emupal.h" +#include "screen.h" + +class emu68k_state : public driver_device +{ +public: + emu68k_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_mfp(*this, "mfp") + { + } + + void proteus1(machine_config &config); + void vintkeys(machine_config &config); + void phatt(machine_config &config); + void proteusxr(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + void add_lcd(machine_config &config); + + HD44780_PIXEL_UPDATE(lcd_pixel_update); + void palette_init(palette_device &palette); + + void proteus1_map(address_map &map); + void proteusxr_map(address_map &map); + void vintkeys_map(address_map &map); + void phatt_map(address_map &map); + void fc7_map(address_map &map); + + required_device m_maincpu; + required_device m_mfp; +}; + +void emu68k_state::machine_start() +{ +} + +HD44780_PIXEL_UPDATE(emu68k_state::lcd_pixel_update) +{ + if (x < 5 && y < 8 && line < 2 && pos < 16) + bitmap.pix16(line * 8 + y, pos * 6 + x) = state; +} + + +void emu68k_state::proteus1_map(address_map &map) +{ + map(0x000000, 0x01ffff).rom().region("program", 0); + map(0x600080, 0x680083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); + map(0x600100, 0x60012f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff); + map(0x800000, 0x8003ff).writeonly(); // ??? + map(0xffc000, 0xffffff).ram(); +} + +void emu68k_state::proteusxr_map(address_map &map) +{ + map(0x000000, 0x01ffff).rom().region("program", 0); + map(0x400000, 0x400001).nopw(); // ??? + map(0x700000, 0x700003).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); + map(0x800000, 0x8003ff).writeonly(); // ??? + map(0x900000, 0x90002f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff); + map(0xa00000, 0xa00001).nopr(); // watchdog? + map(0xb00000, 0xb00001).nopw(); // ??? + map(0xffc000, 0xffffff).ram(); +} + +void emu68k_state::vintkeys_map(address_map &map) +{ + map(0x000000, 0x03ffff).rom().region("program", 0); + map(0x600080, 0x680083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); + map(0x600100, 0x60012f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff); + map(0x800000, 0x8003ff).writeonly(); // ??? + map(0xffc000, 0xffffff).ram(); +} + +void emu68k_state::phatt_map(address_map &map) +{ + map(0x000000, 0x07ffff).rom().region("program", 0); + map(0x600080, 0x680083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); + map(0x600100, 0x60012f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff); + map(0x800000, 0x8003ff).writeonly(); // ??? + map(0xffc000, 0xffffff).ram(); +} + +void emu68k_state::fc7_map(address_map &map) +{ + map(0xfffff3, 0xfffff3).r(m_mfp, FUNC(mc68901_device::get_vector)); +} + + +static INPUT_PORTS_START(proteus1) +INPUT_PORTS_END + +static INPUT_PORTS_START(procuss) +INPUT_PORTS_END + +static INPUT_PORTS_START(vintkeys) +INPUT_PORTS_END + +static INPUT_PORTS_START(orbit9090) +INPUT_PORTS_END + +static INPUT_PORTS_START(phatt) +INPUT_PORTS_END + +static INPUT_PORTS_START(carnaval) +INPUT_PORTS_END + +void emu68k_state::palette_init(palette_device &palette) +{ + palette.set_pen_color(0, rgb_t(131, 136, 139)); + palette.set_pen_color(1, rgb_t( 92, 83, 88)); +} + +void emu68k_state::add_lcd(machine_config &config) +{ + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update)); + screen.set_size(6*16, 8*2); + screen.set_visarea_full(); + screen.set_palette("palette"); + + PALETTE(config, "palette", FUNC(emu68k_state::palette_init), 2); + + hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + lcdc.set_lcd_size(2, 16); + lcdc.set_pixel_update_cb(FUNC(emu68k_state::lcd_pixel_update)); +} + +void emu68k_state::proteus1(machine_config &config) +{ + M68000(config, m_maincpu, 10'000'000); + m_maincpu->set_addrmap(AS_PROGRAM, &emu68k_state::proteus1_map); + m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &emu68k_state::fc7_map); + + MC68901(config, m_mfp, 10'000'000); + m_mfp->set_timer_clock(2'500'000); + m_mfp->out_irq_cb().set_inputline(m_maincpu, M68K_IRQ_1); // TODO: verify level + + add_lcd(config); +} + +void emu68k_state::vintkeys(machine_config &config) +{ + proteus1(config); + m_maincpu->set_addrmap(AS_PROGRAM, &emu68k_state::vintkeys_map); +} + +void emu68k_state::phatt(machine_config &config) +{ + proteus1(config); + m_maincpu->set_addrmap(AS_PROGRAM, &emu68k_state::phatt_map); +} + +void emu68k_state::proteusxr(machine_config &config) +{ + M68000(config, m_maincpu, 40_MHz_XTAL / 4); // MC68000P10 + m_maincpu->set_addrmap(AS_PROGRAM, &emu68k_state::proteusxr_map); + m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &emu68k_state::fc7_map); + + // TODO: NVRAM = 2x CXK5864BP-12L + DS1210 + battery? + + MC68901(config, m_mfp, 40_MHz_XTAL / 4); + m_mfp->set_timer_clock(40_MHz_XTAL / 16); // TODO: determine divider + m_mfp->out_irq_cb().set_inputline(m_maincpu, M68K_IRQ_1); // TODO: verify level + + add_lcd(config); +} + +// TODO: all of these have sample ROMs as well (none currently dumped) + +ROM_START(proteus1) + ROM_REGION16_BE(0x20000, "program", 0) + ROM_LOAD16_BYTE("e-mu proteus 1 msb 2.05.bin", 0x00000, 0x10000, CRC(6a84ac60) SHA1(0b0b3689678522c26087919a2387ed184391d3f4)) // 27C512 + ROM_LOAD16_BYTE("e-mu proteus 1 lsb 2.05.bin", 0x00001, 0x10000, CRC(3ae786b4) SHA1(b9ad95a5cab86f2d316af34e6cb1b2873c58a9b5)) // 27C512 +ROM_END + +ROM_START(proteusxr) + ROM_REGION16_BE(0x20000, "program", 0) + ROM_LOAD16_BYTE("ip441c_emu__5089.ic38", 0x00000, 0x10000, CRC(01f11633) SHA1(a0612007b22c8e06c803ee5a5bad98e3f2bc4421)) // NMC27C512AN + ROM_LOAD16_BYTE("ip442c_emu__5089.ic37", 0x00001, 0x10000, CRC(e8154a65) SHA1(1ec834712dc9ea4f4f01090b2fd5e558c1f08208)) // NMC27C512AN +ROM_END + +ROM_START(procuss) + ROM_REGION16_BE(0x20000, "program", 0) // v1.01 + ROM_LOAD16_BYTE("ip516aemu9115.bin", 0x00000, 0x10000, CRC(8c0be608) SHA1(54d5629e4adebd72d5d5924941be3e6319d20427)) + ROM_LOAD16_BYTE("ip517aemu9115.bin", 0x00001, 0x10000, CRC(cb2e454b) SHA1(b142285b998829ec8b3c6ce98eb94d9d4964aff6)) +ROM_END + +ROM_START(vintkeys) + ROM_REGION16_BE(0x40000, "program", 0) // v1.03 + ROM_LOAD16_BYTE("vintage_keys_msb.bin", 0x00000, 0x20000, CRC(8ac3123f) SHA1(29180ea26c3de326af0f789a2d7a85face528d1a)) + ROM_LOAD16_BYTE("vintage_keys_lsb.bin", 0x00001, 0x20000, CRC(032e4064) SHA1(f59841eda06e2f348f50887d5bf10aef3a027346)) +ROM_END + +ROM_START(orbit9090) + // These may or may not need to be split into separate sets + ROM_REGION16_BE(0x80000, "program", 0) + ROM_SYSTEM_BIOS(0, "v2", "v2.00") // Original chips are STMicro M27C2001-12F1 + ROMX_LOAD("orbit-2.00-msb.bin", 0x00000, 0x40000, CRC(6bda893e) SHA1(0ff01a46ba49fd49b8d85edcc9ac141009f73ebe), ROM_BIOS(0) | ROM_SKIP(1)) + ROMX_LOAD("orbit-2.00-lsb.bin", 0x00001, 0x40000, CRC(95ef87f6) SHA1(c0dde419e9b93aa9f4d5b48c9b9bd039a33d2413), ROM_BIOS(0) | ROM_SKIP(1)) + ROM_SYSTEM_BIOS(1, "v1", "v1.00") // Original chips are TMS27C010A-15; "©EMU'96" + ROMX_LOAD("mip840a__1496.bin", 0x00000, 0x20000, CRC(f60cde2a) SHA1(6762c1e0aa5044e504799041f960d037a600cb62), ROM_BIOS(1) | ROM_SKIP(1)) + ROMX_LOAD("lip839a__1496.bin", 0x00001, 0x20000, CRC(5f16e6db) SHA1(e820bf6ce61256f191c063d4193ed4602c500065), ROM_BIOS(1) | ROM_SKIP(1)) +ROM_END + +ROM_START(phatt) + ROM_REGION16_BE(0x80000, "program", 0) + ROM_LOAD16_BYTE("e-mu planet phatt msb 1.01.bin", 0x00000, 0x40000, CRC(4db960c2) SHA1(1af53bd85ca7fb06709981ce3915cb46e8785cc2)) // 27C2001 + ROM_LOAD16_BYTE("e-mu planet phatt lsb 1.01.bin", 0x00001, 0x40000, CRC(0b2deb2b) SHA1(7715ac34f5eb9d27337eb77e62b66da8c3e80950)) // 27C2001 +ROM_END + +ROM_START(carnaval) + ROM_REGION16_BE(0x80000, "program", 0) + // Original chips are STMicro M27C2001-12F1 + ROM_LOAD16_BYTE("carnaval-1.00-msb.bin", 0x00000, 0x40000, CRC(962b3d2b) SHA1(e4668306e21fef8b0b696f08bed7c6e66941c8b2)) + ROM_LOAD16_BYTE("carnaval-1.00-lsb.bin", 0x00001, 0x40000, CRC(95506a6f) SHA1(1f6f2cce4fac36f4daa22bded1013f3dd0ca72db)) +ROM_END + +SYST(1989, proteus1, 0, 0, proteus1, proteus1, emu68k_state, empty_init, "E-mu Systems", "Proteus/1 16-Bit Multi-Timbral Digital Sound Module", MACHINE_IS_SKELETON) +SYST(1989, proteusxr, 0, 0, proteusxr, proteus1, emu68k_state, empty_init, "E-mu Systems", "Proteus/1 XR 16-Bit Multi-Timbral Digital Sound Module", MACHINE_IS_SKELETON) +SYST(1991, procuss, 0, 0, proteusxr, procuss, emu68k_state, empty_init, "E-mu Systems", "Pro/Cussion Maximum Percussion Module", MACHINE_IS_SKELETON) +SYST(1993, vintkeys, 0, 0, vintkeys, vintkeys, emu68k_state, empty_init, "E-mu Systems", "Vintage Keys Classic Analog Keyboards", MACHINE_IS_SKELETON) +SYST(1996, orbit9090, 0, 0, phatt, orbit9090, emu68k_state, empty_init, "E-mu Systems", "Orbit 9090 - The Dance Planet", MACHINE_IS_SKELETON) +SYST(1997, phatt, 0, 0, phatt, phatt, emu68k_state, empty_init, "E-mu Systems", "Planet Phatt", MACHINE_IS_SKELETON) +SYST(1997, carnaval, 0, 0, phatt, carnaval, emu68k_state, empty_init, "E-mu Systems", "Carnaval - Jugando con Fuego", MACHINE_IS_SKELETON) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index dab3ad31d8b..abae54e7b40 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -13042,6 +13042,15 @@ emu2 // emax2 // emu3 // +@source:emu68k.cpp +carnaval // +orbit9090 // +phatt // +procuss // +proteus1 // +proteusxr // +vintkeys // + @source:enigma2.cpp enigma2 // (c) 1981 Game Plan (Zilec Electronics license) enigma2a // (c) 1984 Zilec Electronics (bootleg?) diff --git a/src/mame/mess.flt b/src/mame/mess.flt index da396e31736..821682f4701 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -257,6 +257,7 @@ emate.cpp emma2.cpp emu2.cpp emu3.cpp +emu68k.cpp enmirage.cpp ep64.cpp epic14e.cpp -- cgit v1.2.3 From 6b14322fc12b2bb770817133a666035a21c04b48 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Fri, 10 Jul 2020 12:26:12 +0700 Subject: drcbe: fixed logging problem --- src/devices/cpu/drcbex64.cpp | 16 ++++++++++++---- src/devices/cpu/drcbex64.h | 9 --------- src/devices/cpu/drcbex86.cpp | 8 ++++---- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp index 846850e4043..2a53220a1cf 100644 --- a/src/devices/cpu/drcbex64.cpp +++ b/src/devices/cpu/drcbex64.cpp @@ -398,6 +398,14 @@ const drcbe_x64::opcode_table_entry drcbe_x64::s_opcode_table_source[] = { uml::OP_ICOPYF, &drcbe_x64::op_icopyf } // ICOPYF dst,src }; +class ThrowableErrorHandler : public ErrorHandler +{ +public: + void handleError(Error err, const char *message, BaseEmitter *origin) override + { + throw emu_fatalerror("asmjit error %d: %s", err, message); + } +}; //************************************************************************** @@ -854,7 +862,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, uint3 a.addValidationOptions(BaseEmitter::kValidationOptionIntermediate); // generate code - const char *blockname = nullptr; + std::string blockname; for (int inum = 0; inum < numinst; inum++) { const instruction &inst = instlist[inum]; @@ -873,12 +881,12 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, uint3 } // extract a blockname - if (blockname == nullptr) + if (blockname.empty()) { if (inst.opcode() == OP_HANDLE) blockname = inst.param(0).handle().string(); else if (inst.opcode() == OP_HASH) - blockname = string_format("Code: mode=%d PC=%08X", (uint32_t)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); + blockname = string_format("Code: mode=%d PC=%08X", (uint32_t)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()); } // generate code @@ -892,7 +900,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, uint3 // log it if (m_log != nullptr) - x86log_disasm_code_range(m_log, (blockname == nullptr) ? "Unknown block" : blockname, dst, dst + bytes); + x86log_disasm_code_range(m_log, (blockname.empty()) ? "Unknown block" : blockname.c_str(), dst, dst + bytes); // tell all of our utility objects that the block is finished m_hash.block_end(block); diff --git a/src/devices/cpu/drcbex64.h b/src/devices/cpu/drcbex64.h index 224fd12e879..7fa9900063b 100644 --- a/src/devices/cpu/drcbex64.h +++ b/src/devices/cpu/drcbex64.h @@ -277,13 +277,4 @@ private: using drc::drcbe_x64; -class ThrowableErrorHandler : public ErrorHandler -{ -public: - void handleError(Error err, const char *message, BaseEmitter *origin) override - { - throw emu_fatalerror("asmjit error %d: %s", err, message); - } -}; - #endif /* MAME_DEVICES_CPU_DRCBEX64_H */ diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp index 8a43a1863c5..794d1007418 100644 --- a/src/devices/cpu/drcbex86.cpp +++ b/src/devices/cpu/drcbex86.cpp @@ -784,7 +784,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, uint3 x86code *dst = base; // generate code - const char *blockname = nullptr; + std::string blockname; for (int inum = 0; inum < numinst; inum++) { const instruction &inst = instlist[inum]; @@ -798,12 +798,12 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, uint3 } // extract a blockname - if (blockname == nullptr) + if (blockname.empty()) { if (inst.opcode() == OP_HANDLE) blockname = inst.param(0).handle().string(); else if (inst.opcode() == OP_HASH) - blockname = string_format("Code: mode=%d PC=%08X", (uint32_t)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); + blockname = string_format("Code: mode=%d PC=%08X", (uint32_t)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()); } // generate code @@ -816,7 +816,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, uint3 // log it if (m_log != nullptr) - x86log_disasm_code_range(m_log, (blockname == nullptr) ? "Unknown block" : blockname, base, m_cache.top()); + x86log_disasm_code_range(m_log, (blockname.empty()) ? "Unknown block" : blockname.c_str(), base, m_cache.top()); // tell all of our utility objects that the block is finished m_hash.block_end(block); -- cgit v1.2.3 From 3db9e11031c1eed826eacd12f6827d80f06413b8 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 10 Jul 2020 10:50:16 +0200 Subject: ui: fix initial message popups not showing on d3d/bgfx --- src/frontend/mame/mame.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/mame/mame.cpp b/src/frontend/mame/mame.cpp index 88ccc4e1b80..73edfe4744c 100644 --- a/src/frontend/mame/mame.cpp +++ b/src/frontend/mame/mame.cpp @@ -311,6 +311,7 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine) machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&mame_machine_manager::reset, this)); m_ui->set_startup_text("Initializing...", true); + machine.video().frame_update(); // force another video update, some video backends need it return m_ui.get(); } -- cgit v1.2.3 From 96020b3f89b56e0187adc115f0b71d014c67b100 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 10 Jul 2020 11:03:52 +0200 Subject: ui: swap order of popup screens (gameinfo first, warnings second), add "press any key" to gameinfo --- src/frontend/mame/ui/ui.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index e1b0990193b..f1744ff76e9 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -331,21 +331,24 @@ void mame_ui_manager::display_startup_screens(bool first_time) switch (state) { case 0: - messagebox_text = machine_info().warnings_string(); - m_has_warnings = !messagebox_text.empty(); - if (m_has_warnings && show_warnings) + if (show_gameinfo) + messagebox_text = machine_info().game_info_string(); + if (!messagebox_text.empty()) { messagebox_text.append("\n\nPress any key to continue"); set_handler(ui_callback_type::MODAL, std::bind(&mame_ui_manager::handler_messagebox_anykey, this, _1)); - messagebox_backcolor = machine_info().warnings_color(); } break; case 1: - if (show_gameinfo) - messagebox_text = machine_info().game_info_string(); - if (!messagebox_text.empty()) + messagebox_text = machine_info().warnings_string(); + m_has_warnings = !messagebox_text.empty(); + if (m_has_warnings && show_warnings) + { + messagebox_text.append("\n\nPress any key to continue"); set_handler(ui_callback_type::MODAL, std::bind(&mame_ui_manager::handler_messagebox_anykey, this, _1)); + messagebox_backcolor = machine_info().warnings_color(); + } break; case 2: -- cgit v1.2.3 From 8720978920f5b6bff9325df4608fa8bb8e8399b9 Mon Sep 17 00:00:00 2001 From: r09 Date: Fri, 10 Jul 2020 11:33:10 +0200 Subject: ibm5150.xml: fix dataarea sizes (nw) --- hash/ibm5150.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hash/ibm5150.xml b/hash/ibm5150.xml index a8a1c4f7f69..d8eee0ddef6 100644 --- a/hash/ibm5150.xml +++ b/hash/ibm5150.xml @@ -443,7 +443,7 @@ Known PC Booter Games Not Dumped, Or Dumped and Lost when Demonlord's Site went Atarisoft - + @@ -1715,7 +1715,7 @@ Known PC Booter Games Not Dumped, Or Dumped and Lost when Demonlord's Site went Atarisoft - + -- cgit v1.2.3 From cdf43e750661e9813d3aaf6959f8d373044e214a Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 10 Jul 2020 07:33:34 -0400 Subject: emu68k.cpp: Minor update --- src/mame/drivers/emu68k.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mame/drivers/emu68k.cpp b/src/mame/drivers/emu68k.cpp index 2d1d92559d6..93faefdc2cd 100644 --- a/src/mame/drivers/emu68k.cpp +++ b/src/mame/drivers/emu68k.cpp @@ -61,7 +61,7 @@ HD44780_PIXEL_UPDATE(emu68k_state::lcd_pixel_update) void emu68k_state::proteus1_map(address_map &map) { map(0x000000, 0x01ffff).rom().region("program", 0); - map(0x600080, 0x680083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); + map(0x600080, 0x600083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); map(0x600100, 0x60012f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff); map(0x800000, 0x8003ff).writeonly(); // ??? map(0xffc000, 0xffffff).ram(); @@ -82,7 +82,7 @@ void emu68k_state::proteusxr_map(address_map &map) void emu68k_state::vintkeys_map(address_map &map) { map(0x000000, 0x03ffff).rom().region("program", 0); - map(0x600080, 0x680083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); + map(0x600080, 0x600083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); map(0x600100, 0x60012f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff); map(0x800000, 0x8003ff).writeonly(); // ??? map(0xffc000, 0xffffff).ram(); @@ -91,7 +91,7 @@ void emu68k_state::vintkeys_map(address_map &map) void emu68k_state::phatt_map(address_map &map) { map(0x000000, 0x07ffff).rom().region("program", 0); - map(0x600080, 0x680083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); + map(0x600080, 0x600083).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write)).umask16(0x00ff); map(0x600100, 0x60012f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff); map(0x800000, 0x8003ff).writeonly(); // ??? map(0xffc000, 0xffffff).ram(); @@ -150,7 +150,7 @@ void emu68k_state::proteus1(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &emu68k_state::proteus1_map); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &emu68k_state::fc7_map); - MC68901(config, m_mfp, 10'000'000); + MC68901(config, m_mfp, 10'000'000); // FIXME: not the right type at all m_mfp->set_timer_clock(2'500'000); m_mfp->out_irq_cb().set_inputline(m_maincpu, M68K_IRQ_1); // TODO: verify level @@ -177,7 +177,7 @@ void emu68k_state::proteusxr(machine_config &config) // TODO: NVRAM = 2x CXK5864BP-12L + DS1210 + battery? - MC68901(config, m_mfp, 40_MHz_XTAL / 4); + MC68901(config, m_mfp, 40_MHz_XTAL / 4); // MC68901P m_mfp->set_timer_clock(40_MHz_XTAL / 16); // TODO: determine divider m_mfp->out_irq_cb().set_inputline(m_maincpu, M68K_IRQ_1); // TODO: verify level -- cgit v1.2.3 From e60954a61a828de2b5593d549b0caf6138c02756 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Fri, 10 Jul 2020 18:57:22 +0700 Subject: drcbex86: implemented asmjit emitter --- src/devices/cpu/drcbex86.cpp | 4693 ++++++++++++++++++------------------------ src/devices/cpu/drcbex86.h | 340 ++- 2 files changed, 2201 insertions(+), 2832 deletions(-) diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp index 794d1007418..647d3c4c351 100644 --- a/src/devices/cpu/drcbex86.cpp +++ b/src/devices/cpu/drcbex86.cpp @@ -92,16 +92,6 @@ // This is a trick to make it build on Android where the x86 SDK declares ::REG_Exx namespace drc { using namespace uml; -using namespace x86emit; - -using x86emit::REG_EAX; -using x86emit::REG_ECX; -using x86emit::REG_EDX; -using x86emit::REG_EBX; -using x86emit::REG_ESP; -using x86emit::REG_EBP; -using x86emit::REG_ESI; -using x86emit::REG_EDI; //************************************************************************** // DEBUGGING @@ -151,9 +141,9 @@ drcbe_x86::opcode_generate_func drcbe_x86::s_opcode_table[OP_MAX]; //static const uint64_t size_to_mask[] = { 0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0, 0xffffffffffffffffU }; // register mapping tables -static const uint8_t int_register_map[REG_I_COUNT] = +static const Gp::Id int_register_map[REG_I_COUNT] = { - REG_EBX, REG_ESI, REG_EDI, REG_EBP + Gp::kIdBx, Gp::kIdSi, Gp::kIdDi, Gp::kIdBp }; // flags mapping tables @@ -161,24 +151,24 @@ static uint8_t flags_map[0x1000]; static uint32_t flags_unmap[0x20]; // condition mapping table -static const uint8_t condition_map[uml::COND_MAX - uml::COND_Z] = -{ - x86emit::COND_Z, // COND_Z = 0x80, requires Z - x86emit::COND_NZ, // COND_NZ, requires Z - x86emit::COND_S, // COND_S, requires S - x86emit::COND_NS, // COND_NS, requires S - x86emit::COND_C, // COND_C, requires C - x86emit::COND_NC, // COND_NC, requires C - x86emit::COND_O, // COND_V, requires V - x86emit::COND_NO, // COND_NV, requires V - x86emit::COND_P, // COND_U, requires U - x86emit::COND_NP, // COND_NU, requires U - x86emit::COND_A, // COND_A, requires CZ - x86emit::COND_BE, // COND_BE, requires CZ - x86emit::COND_G, // COND_G, requires SVZ - x86emit::COND_LE, // COND_LE, requires SVZ - x86emit::COND_L, // COND_L, requires SV - x86emit::COND_GE, // COND_GE, requires SV +static const Condition::Code condition_map[uml::COND_MAX - uml::COND_Z] = +{ + Condition::Code::kZ, // COND_Z = 0x80, requires Z + Condition::Code::kNZ, // COND_NZ, requires Z + Condition::Code::kS, // COND_S, requires S + Condition::Code::kNS, // COND_NS, requires S + Condition::Code::kC, // COND_C, requires C + Condition::Code::kNC, // COND_NC, requires C + Condition::Code::kO, // COND_V, requires V + Condition::Code::kNO, // COND_NV, requires V + Condition::Code::kP, // COND_U, requires U + Condition::Code::kNP, // COND_NU, requires U + Condition::Code::kA, // COND_A, requires CZ + Condition::Code::kBE, // COND_BE, requires CZ + Condition::Code::kG, // COND_G, requires SVZ + Condition::Code::kLE, // COND_LE, requires SVZ + Condition::Code::kL, // COND_L, requires SV + Condition::Code::kGE, // COND_GE, requires SV }; // FPU control register mapping @@ -287,6 +277,14 @@ const drcbe_x86::opcode_table_entry drcbe_x86::s_opcode_table_source[] = { uml::OP_ICOPYF, &drcbe_x86::op_icopyf }, // ICOPYF dst,src }; +class ThrowableErrorHandler : public ErrorHandler +{ +public: + void handleError(Error err, const char *message, BaseEmitter *origin) override + { + throw emu_fatalerror("asmjit error %d: %s", err, message); + } +}; //************************************************************************** @@ -298,7 +296,7 @@ const drcbe_x86::opcode_table_entry drcbe_x86::s_opcode_table_source[] = // into a reduced set //------------------------------------------------- -drcbe_x86::be_parameter::be_parameter(drcbe_x86 &drcbe, const parameter ¶m, uint32_t allowed) +drcbe_x86::be_parameter::be_parameter(drcbe_x86 &drcbe, parameter const ¶m, uint32_t allowed) { int regnum; @@ -347,21 +345,28 @@ drcbe_x86::be_parameter::be_parameter(drcbe_x86 &drcbe, const parameter ¶m, // checkparam //------------------------------------------------- -inline int drcbe_x86::be_parameter::select_register(int defreg) const +inline Gp drcbe_x86::be_parameter::select_register(Gp const &defreg) const +{ + if (m_type == PTYPE_INT_REGISTER) + return Gpd(m_value); + return defreg; +} + +inline Xmm drcbe_x86::be_parameter::select_register(Xmm defreg) const { - if (m_type == PTYPE_INT_REGISTER || m_type == PTYPE_FLOAT_REGISTER || m_type == PTYPE_VECTOR_REGISTER) - return m_value; + if (m_type == PTYPE_FLOAT_REGISTER) + return Xmm(m_value); return defreg; } -inline int drcbe_x86::be_parameter::select_register(int defreg, const be_parameter &checkparam) const +template T drcbe_x86::be_parameter::select_register(T defreg, be_parameter const &checkparam) const { if (*this == checkparam) return defreg; return select_register(defreg); } -inline int drcbe_x86::be_parameter::select_register(int defreg, const be_parameter &checkparam, const be_parameter &checkparam2) const +template T drcbe_x86::be_parameter::select_register(T defreg, be_parameter const &checkparam, be_parameter const &checkparam2) const { if (*this == checkparam || *this == checkparam2) return defreg; @@ -400,16 +405,16 @@ inline void drcbe_x86::normalize_commutative(be_parameter &inner, be_parameter & // two 32-bit operations //------------------------------------------------- -inline void drcbe_x86::emit_combine_z_flags(x86code *&dst) +inline void drcbe_x86::emit_combine_z_flags(Assembler &a) { // this assumes that the flags from the low 32-bit op are on the stack // and the flags from the high 32-bit op are live - emit_pushf(dst); // pushf - emit_mov_r32_m32(dst, REG_ECX, MBD(REG_ESP, 4)); // mov ecx,[esp+4] - emit_or_r32_imm(dst, REG_ECX, ~0x40); // or ecx,~0x40 - emit_and_m32_r32(dst, MBD(REG_ESP, 0), REG_ECX); // and [esp],ecx - emit_popf(dst); // popf - emit_lea_r32_m32(dst, REG_ESP, MBD(REG_ESP, 4)); // lea esp,[esp+4] + a.pushfd(); // pushf + a.mov(ecx, ptr(esp, 4)); // mov ecx,[esp+4] + a.or_(ecx, ~0x40); // or ecx,~0x40 + a.and_(ptr(esp, 0), ecx); // and [esp],ecx + a.popfd(); // popf + a.lea(esp, ptr(esp, 4)); // lea esp,[esp+4] } @@ -418,15 +423,15 @@ inline void drcbe_x86::emit_combine_z_flags(x86code *&dst) // flags from two 32-bit shift left operations //------------------------------------------------- -inline void drcbe_x86::emit_combine_z_shl_flags(x86code *&dst) +inline void drcbe_x86::emit_combine_z_shl_flags(Assembler &a) { // this assumes that the flags from the high 32-bit op are on the stack // and the flags from the low 32-bit op are live - emit_pushf(dst); // pushf - emit_pop_r32(dst, REG_ECX); // pop ecx - emit_or_r32_imm(dst, REG_ECX, ~0x40); // or ecx,~0x40 - emit_and_m32_r32(dst, MBD(REG_ESP, 0), REG_ECX); // and [esp],ecx - emit_popf(dst); // popf + a.pushfd(); // pushf + a.pop(ecx); // pop ecx + a.or_(ecx, ~0x40); // or ecx,~0x40 + a.and_(ptr(esp, 0), ecx); // and [esp],ecx + a.popfd(); // popf } @@ -437,8 +442,8 @@ inline void drcbe_x86::emit_combine_z_shl_flags(x86code *&dst) inline void drcbe_x86::reset_last_upper_lower_reg() { - m_last_lower_reg = REG_NONE; - m_last_upper_reg = REG_NONE; + m_last_lower_reg = Gp(); + m_last_upper_reg = Gp(); } @@ -447,13 +452,13 @@ inline void drcbe_x86::reset_last_upper_lower_reg() // loaded a lower register //------------------------------------------------- -inline void drcbe_x86::set_last_lower_reg(x86code *&dst, const be_parameter ¶m, uint8_t reglo) +inline void drcbe_x86::set_last_lower_reg(Assembler &a, be_parameter const ¶m, Gp const ®lo) { if (param.is_memory()) { m_last_lower_reg = reglo; m_last_lower_addr = (uint32_t *)((uintptr_t)param.memory()); - m_last_lower_pc = dst; + m_last_lower_pc = (x86code *)(a.code()->baseAddress() + a.offset()); } } @@ -463,11 +468,11 @@ inline void drcbe_x86::set_last_lower_reg(x86code *&dst, const be_parameter &par // loaded an upper register //------------------------------------------------- -inline void drcbe_x86::set_last_upper_reg(x86code *&dst, const be_parameter ¶m, uint8_t reghi) +inline void drcbe_x86::set_last_upper_reg(Assembler &a, be_parameter const ¶m, Gp const ®hi) { m_last_upper_reg = reghi; m_last_upper_addr = (param.is_int_register()) ? m_reghi[param.ireg()] : (uint32_t *)((uintptr_t)param.memory(4)); - m_last_upper_pc = dst; + m_last_upper_pc = (x86code *)(a.code()->baseAddress() + a.offset()); } @@ -476,9 +481,9 @@ inline void drcbe_x86::set_last_upper_reg(x86code *&dst, const be_parameter &par // skip re-loading a lower half of a register //------------------------------------------------- -inline bool drcbe_x86::can_skip_lower_load(x86code *&dst, uint32_t *memref, uint8_t reglo) +inline bool drcbe_x86::can_skip_lower_load(Assembler &a, uint32_t *memref, Gp const ®lo) { - return (dst == m_last_lower_pc && memref == m_last_lower_addr && reglo == m_last_lower_reg); + return ((x86code *)(a.code()->baseAddress() + a.offset()) == m_last_lower_pc && memref == m_last_lower_addr && reglo == m_last_lower_reg); } @@ -487,30 +492,11 @@ inline bool drcbe_x86::can_skip_lower_load(x86code *&dst, uint32_t *memref, uint // skip re-loading an upper half of a register //------------------------------------------------- -inline bool drcbe_x86::can_skip_upper_load(x86code *&dst, uint32_t *memref, uint8_t reghi) -{ - return (dst == m_last_upper_pc && memref == m_last_upper_addr && reghi == m_last_upper_reg); -} - - -//------------------------------------------------- -// track_resolve_link - wrapper for resolve_link -// that resets all register tracking info -//------------------------------------------------- - -inline void drcbe_x86::track_resolve_link(x86code *&destptr, const emit_link &linkinfo) +inline bool drcbe_x86::can_skip_upper_load(Assembler &a, uint32_t *memref, Gp const ®hi) { - reset_last_upper_lower_reg(); - resolve_link(destptr, linkinfo); + return ((x86code *)(a.code()->baseAddress() + a.offset()) == m_last_upper_pc && memref == m_last_upper_addr && reghi == m_last_upper_reg); } -#define resolve_link INVALID - - - -//************************************************************************** -// BACKEND CALLBACKS -//************************************************************************** //------------------------------------------------- // drcbe_x86 - constructor @@ -520,19 +506,19 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, u : drcbe_interface(drcuml, cache, device), m_hash(cache, modes, addrbits, ignorebits), m_map(cache, 0), - m_labels(cache), m_log(nullptr), + m_log_asmjit(nullptr), m_logged_common(false), - m_sse3(false), + m_sse3(CpuInfo::host().features().as().hasSSE3()), m_entry(nullptr), m_exit(nullptr), m_nocode(nullptr), m_save(nullptr), m_restore(nullptr), - m_last_lower_reg(REG_NONE), + m_last_lower_reg(Gp()), m_last_lower_pc(nullptr), m_last_lower_addr(nullptr), - m_last_upper_reg(REG_NONE), + m_last_upper_reg(Gp()), m_last_upper_pc(nullptr), m_last_upper_addr(nullptr), m_fptemp(0), @@ -541,9 +527,7 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, u m_stacksave(nullptr), m_hashstacksave(nullptr), m_reslo(0), - m_reshi(0), - m_fixup_label(&drcbe_x86::fixup_label, this), - m_fixup_exception(&drcbe_x86::fixup_exception, this) + m_reshi(0) { // compute hi pointers for each register for (int regnum = 0; regnum < ARRAY_LENGTH(int_register_map); regnum++) @@ -584,6 +568,7 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, u { std::string filename = std::string("drcbex86_").append(device.shortname()).append(".asm"); m_log = x86log_create_context(filename.c_str()); + m_log_asmjit = fopen(std::string("drcbex86_asmjit_").append(device.shortname()).append(".asm").c_str(), "w"); } } @@ -597,8 +582,50 @@ drcbe_x86::~drcbe_x86() // free the log context if (m_log != nullptr) x86log_free_context(m_log); + + if (m_log_asmjit) + fclose(m_log_asmjit); } +size_t drcbe_x86::emit(CodeHolder &ch) +{ + Error err; + + // the following three calls aren't currently required, but may be if + // other asmjist features are used in future + if (false) + { + err = ch.flatten(); + if (err) + throw emu_fatalerror("asmjit::CodeHolder::flatten() error %d", err); + + err = ch.resolveUnresolvedLinks(); + if (err) + throw emu_fatalerror("asmjit::CodeHolder::resolveUnresolvedLinks() error %d", err); + + err = ch.relocateToBase(ch.baseAddress()); + if (err) + throw emu_fatalerror("asmjit::CodeHolder::relocateToBase() error %d", err); + } + + size_t const alignment = ch.baseAddress() - uint64_t(m_cache.top()); + size_t const code_size = ch.codeSize(); + + // test if enough room remains in drc cache + drccodeptr *cachetop = m_cache.begin_codegen(alignment + code_size); + if (cachetop == nullptr) + return 0; + + err = ch.copyFlattenedData(drccodeptr(ch.baseAddress()), code_size, CodeHolder::kCopyWithPadding); + if (err) + throw emu_fatalerror("asmjit::CodeHolder::copyFlattenedData() error %d", err); + + // update the drc cache and end codegen + *cachetop += alignment + code_size; + m_cache.end_codegen(); + + return code_size; +} //------------------------------------------------- // reset - reset back-end specific state @@ -611,139 +638,148 @@ void drcbe_x86::reset() x86log_printf(m_log, "%s", "\n\n===========\nCACHE RESET\n===========\n\n"); // generate a little bit of glue code to set up the environment - drccodeptr *cachetop = m_cache.begin_codegen(500); - if (cachetop == nullptr) - fatalerror("Out of cache space after a reset!\n"); + x86code *dst = (x86code *)m_cache.top(); - x86code *dst = (x86code *)*cachetop; + CodeHolder ch; + ch.init(hostEnvironment(), uint64_t(dst)); - // generate a simple CPUID stub - uint32_t (*cpuid_ecx_stub)(void) = (uint32_t (*)(void))dst; - emit_push_r32(dst, REG_EBX); // push ebx - emit_mov_r32_imm(dst, REG_EAX, 1); // mov eax,1 - emit_cpuid(dst); // cpuid - emit_mov_r32_r32(dst, REG_EAX, REG_ECX); // mov eax,ecx - emit_pop_r32(dst, REG_EBX); // pop ebx - emit_ret(dst); // ret + FileLogger logger(m_log_asmjit); + if (logger.file()) + { + logger.setFlags(FormatOptions::Flags::kFlagHexOffsets | FormatOptions::Flags::kFlagHexImms | FormatOptions::Flags::kFlagMachineCode); + logger.setIndentation(FormatOptions::IndentationType::kIndentationCode, 4); + ch.setLogger(&logger); + } - // call it to determine if we have SSE3 support - m_sse3 = (((*cpuid_ecx_stub)() & 1) != 0); + Assembler a(&ch); + if (logger.file()) + a.addValidationOptions(BaseEmitter::kValidationOptionIntermediate); // generate an entry point m_entry = (x86_entry_point_func)dst; - emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ESP, 4)); // mov eax,[esp+4] - emit_push_r32(dst, REG_EBX); // push ebx - emit_push_r32(dst, REG_ESI); // push esi - emit_push_r32(dst, REG_EDI); // push edi - emit_push_r32(dst, REG_EBP); // push ebp - emit_sub_r32_imm(dst, REG_ESP, 24); // sub esp,24 - emit_mov_m32_r32(dst, MABS(&m_hashstacksave), REG_ESP); // mov [hashstacksave],esp - emit_sub_r32_imm(dst, REG_ESP, 4); // sub esp,4 - emit_mov_m32_r32(dst, MABS(&m_stacksave), REG_ESP); // mov [stacksave],esp - emit_fstcw_m16(dst, MABS(&m_fpumode)); // fstcw [fpumode] - emit_jmp_r32(dst, REG_EAX); // jmp eax - if (m_log != nullptr && !m_logged_common) - x86log_disasm_code_range(m_log, "entry_point", (x86code *)m_entry, dst); + a.bind(a.newNamedLabel("entry_point")); + + FuncDetail entry_point; + entry_point.init(FuncSignatureT(CallConv::kIdHost), hostEnvironment()); + + FuncFrame frame; + frame.init(entry_point); + frame.addDirtyRegs(ebx, esi, edi, ebp); + FuncArgsAssignment args(&entry_point); + args.assignAll(eax); + args.updateFuncFrame(frame); + frame.finalize(); + + a.emitProlog(frame); + a.emitArgsAssignment(frame, args); + a.sub(esp, 24); // sub esp,24 + a.mov(MABS(&m_hashstacksave), esp); // mov [hashstacksave],esp + a.sub(esp, 4); // sub esp,4 + a.mov(MABS(&m_stacksave), esp); // mov [stacksave],esp + a.fnstcw(MABS(&m_fpumode)); // fstcw [fpumode] + a.jmp(eax); // jmp eax // generate an exit point - m_exit = dst; - emit_fldcw_m16(dst, MABS(&m_fpumode)); // fldcw [fpumode] - emit_mov_r32_m32(dst, REG_ESP, MABS(&m_hashstacksave)); // mov esp,[hashstacksave] - emit_add_r32_imm(dst, REG_ESP, 24); // add esp,24 - emit_pop_r32(dst, REG_EBP); // pop ebp - emit_pop_r32(dst, REG_EDI); // pop edi - emit_pop_r32(dst, REG_ESI); // pop esi - emit_pop_r32(dst, REG_EBX); // pop ebx - emit_ret(dst); // ret - if (m_log != nullptr && !m_logged_common) - x86log_disasm_code_range(m_log, "exit_point", m_exit, dst); + m_exit = dst + a.offset(); + a.bind(a.newNamedLabel("exit_point")); + a.fldcw(MABS(&m_fpumode)); // fldcw [fpumode] + a.mov(esp, MABS(&m_hashstacksave)); // mov esp,[hashstacksave] + a.add(esp, 24); // add esp,24 + a.emitEpilog(frame); // generate a no code point - m_nocode = dst; - emit_ret(dst); // ret - if (m_log != nullptr && !m_logged_common) - x86log_disasm_code_range(m_log, "nocode", m_nocode, dst); + m_nocode = dst + a.offset(); + a.bind(a.newNamedLabel("nocode_point")); + a.ret(); // ret // generate a save subroutine - m_save = dst; - emit_pushf(dst); // pushf - emit_pop_r32(dst, REG_EAX); // pop eax - emit_and_r32_imm(dst, REG_EAX, 0x8c5); // and eax,0x8c5 - emit_mov_r8_m8(dst, REG_AL, MABSI(flags_map, REG_EAX)); // mov al,[flags_map] - emit_mov_m8_r8(dst, MBD(REG_ECX, offsetof(drcuml_machine_state, flags)), REG_AL); // mov state->flags,al - emit_mov_r8_m8(dst, REG_AL, MABS(&m_state.fmod)); // mov al,[fmod] - emit_mov_m8_r8(dst, MBD(REG_ECX, offsetof(drcuml_machine_state, fmod)), REG_AL); // mov state->fmod,al - emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.exp)); // mov eax,[exp] - emit_mov_m32_r32(dst, MBD(REG_ECX, offsetof(drcuml_machine_state, exp)), REG_EAX); // mov state->exp,eax + m_save = dst + a.offset(); + a.bind(a.newNamedLabel("save")); + a.pushfd(); // pushf + a.pop(eax); // pop eax + a.and_(eax, 0x8c5); // and eax,0x8c5 + a.mov(al, ptr(u64(flags_map), eax)); // mov al,[flags_map] + a.mov(ptr(ecx, offsetof(drcuml_machine_state, flags)), al); // mov state->flags,al + a.mov(al, MABS(&m_state.fmod)); // mov al,[fmod] + a.mov(ptr(ecx, offsetof(drcuml_machine_state, fmod)), al); // mov state->fmod,al + a.mov(eax, MABS(&m_state.exp)); // mov eax,[exp] + a.mov(ptr(ecx, offsetof(drcuml_machine_state, exp)), eax); // mov state->exp,eax for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.r); regnum++) { uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.l; uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.h; if (int_register_map[regnum] != 0) - emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsl), int_register_map[regnum]); + a.mov(ptr(ecx, regoffsl), Gpd(int_register_map[regnum])); else { - emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.r[regnum].w.l)); - emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsl), REG_EAX); + a.mov(eax, MABS(&m_state.r[regnum].w.l)); + a.mov(ptr(ecx, regoffsl), eax); } - emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.r[regnum].w.h)); - emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsh), REG_EAX); + a.mov(eax, MABS(&m_state.r[regnum].w.h)); + a.mov(ptr(ecx, regoffsh), eax); } for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.f); regnum++) { uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.l; uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.h; - emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.f[regnum].s.l)); - emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsl), REG_EAX); - emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.f[regnum].s.h)); - emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsh), REG_EAX); + a.mov(eax, MABS(&m_state.f[regnum].s.l)); + a.mov(ptr(ecx, regoffsl), eax); + a.mov(eax, MABS(&m_state.f[regnum].s.h)); + a.mov(ptr(ecx, regoffsh), eax); } - emit_ret(dst); // ret - if (m_log != nullptr && !m_logged_common) - x86log_disasm_code_range(m_log, "save", m_save, dst); + a.ret(); // ret // generate a restore subroutine - m_restore = dst; + m_restore = dst + a.offset(); + a.bind(a.newNamedLabel("restore")); for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.r); regnum++) { uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.l; uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.h; if (int_register_map[regnum] != 0) - emit_mov_r32_m32(dst, int_register_map[regnum], MBD(REG_ECX, regoffsl)); + a.mov(Gpd(int_register_map[regnum]), ptr(ecx, regoffsl)); else { - emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsl)); - emit_mov_m32_r32(dst, MABS(&m_state.r[regnum].w.l), REG_EAX); + a.mov(eax, ptr(ecx, regoffsl)); + a.mov(MABS(&m_state.r[regnum].w.l), eax); } - emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsh)); - emit_mov_m32_r32(dst, MABS(&m_state.r[regnum].w.h), REG_EAX); + a.mov(eax, ptr(ecx, regoffsh)); + a.mov(MABS(&m_state.r[regnum].w.h), eax); } for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.f); regnum++) { uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.l; uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.h; - emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsl)); - emit_mov_m32_r32(dst, MABS(&m_state.f[regnum].s.l), REG_EAX); - emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsh)); - emit_mov_m32_r32(dst, MABS(&m_state.f[regnum].s.h), REG_EAX); - } - emit_movzx_r32_m8(dst, REG_EAX, MBD(REG_ECX, offsetof(drcuml_machine_state, fmod)));// movzx eax,state->fmod - emit_and_r32_imm(dst, REG_EAX, 3); // and eax,3 - emit_mov_m8_r8(dst, MABS(&m_state.fmod), REG_AL); // mov [fmod],al - emit_fldcw_m16(dst, MABSI(&fp_control[0], REG_EAX, 2)); // fldcw fp_control[eax] - emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, offsetof(drcuml_machine_state, exp))); // mov eax,state->exp - emit_mov_m32_r32(dst, MABS(&m_state.exp), REG_EAX); // mov [exp],eax - emit_movzx_r32_m8(dst, REG_EAX, MBD(REG_ECX, offsetof(drcuml_machine_state, flags)));// movzx eax,state->flags - emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4] - emit_popf(dst); // popf - emit_ret(dst); // ret + a.mov(eax, ptr(ecx, regoffsl)); + a.mov(MABS(&m_state.f[regnum].s.l), eax); + a.mov(eax, ptr(ecx, regoffsh)); + a.mov(MABS(&m_state.f[regnum].s.h), eax); + } + a.movzx(eax, byte_ptr(ecx, offsetof(drcuml_machine_state, fmod))); // movzx eax,state->fmod + a.and_(eax, 3); // and eax,3 + a.mov(MABS(&m_state.fmod), al); // mov [fmod],al + a.fldcw(word_ptr(u64(&fp_control[0]), eax, 1)); // fldcw fp_control[eax*2] + a.mov(eax, ptr(ecx, offsetof(drcuml_machine_state, exp))); // mov eax,state->exp + a.mov(MABS(&m_state.exp), eax); // mov [exp],eax + a.movzx(eax, byte_ptr(ecx, offsetof(drcuml_machine_state, flags))); // movzx eax,state->flags + a.push(dword_ptr(u64(flags_unmap), eax, 2)); // push flags_unmap[eax*4] + a.popfd(); // popf + a.ret(); // ret + + + // emit the generated code + size_t bytes = emit(ch); + if (m_log != nullptr && !m_logged_common) - x86log_disasm_code_range(m_log, "restore", m_restore, dst); + { + x86log_disasm_code_range(m_log, "entry_point", dst, m_exit); + x86log_disasm_code_range(m_log, "exit_point", m_exit, m_nocode); + x86log_disasm_code_range(m_log, "nocode_point", m_nocode, m_save); + x86log_disasm_code_range(m_log, "save", m_save, m_restore); + x86log_disasm_code_range(m_log, "restore", m_restore, dst + bytes); - // finish up codegen - *cachetop = dst; - m_cache.end_codegen(); - m_logged_common = true; + m_logged_common = true; + } // reset our hash tables m_hash.reset(); @@ -771,17 +807,27 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, uint3 { // tell all of our utility objects that a block is beginning m_hash.block_begin(block, instlist, numinst); - m_labels.block_begin(block); m_map.block_begin(block); - // begin codegen; fail if we can't - drccodeptr *cachetop = m_cache.begin_codegen(numinst * 8 * 4); - if (cachetop == nullptr) - block.abort(); - // compute the base by aligning the cache top to a cache line (assumed to be 64 bytes) - x86code *base = (x86code *)(((uintptr_t)*cachetop + 63) & ~63); - x86code *dst = base; + x86code *dst = (x86code *)(uint64_t(m_cache.top() + 63) & ~63); + + CodeHolder ch; + ch.init(hostEnvironment(), uint64_t(dst)); + ThrowableErrorHandler e; + ch.setErrorHandler(&e); + + FileLogger logger(m_log_asmjit); + if (logger.file()) + { + logger.setFlags(FormatOptions::Flags::kFlagHexOffsets | FormatOptions::Flags::kFlagHexImms | FormatOptions::Flags::kFlagMachineCode); + logger.setIndentation(FormatOptions::IndentationType::kIndentationCode, 4); + ch.setLogger(&logger); + } + + Assembler a(&ch); + if (logger.file()) + a.addValidationOptions(BaseEmitter::kValidationOptionIntermediate); // generate code std::string blockname; @@ -790,11 +836,15 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, uint3 const instruction &inst = instlist[inum]; assert(inst.opcode() < ARRAY_LENGTH(s_opcode_table)); + // must remain in scope until output + std::string dasm; + // add a comment if (m_log != nullptr) { - std::string dasm = inst.disasm(&m_drcuml); - x86log_add_comment(m_log, dst, "%s", dasm.c_str()); + dasm = inst.disasm(&m_drcuml); + x86log_add_comment(m_log, dst + a.offset(), "%s", dasm.c_str()); + a.setInlineComment(dasm.c_str()); } // extract a blockname @@ -807,20 +857,20 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, uint3 } // generate code - (this->*s_opcode_table[inst.opcode()])(dst, inst); + (this->*s_opcode_table[inst.opcode()])(a, inst); } - // complete codegen - *cachetop = (drccodeptr)dst; - m_cache.end_codegen(); + // emit the generated code + size_t const bytes = emit(ch); + if (!bytes) + block.abort(); // log it if (m_log != nullptr) - x86log_disasm_code_range(m_log, (blockname.empty()) ? "Unknown block" : blockname.c_str(), base, m_cache.top()); + x86log_disasm_code_range(m_log, (blockname.empty()) ? "Unknown block" : blockname.c_str(), dst, dst + bytes); // tell all of our utility objects that the block is finished m_hash.block_end(block); - m_labels.block_end(block); m_map.block_end(block); } @@ -860,21 +910,21 @@ void drcbe_x86::get_info(drcbe_info &info) // into a register //------------------------------------------------- -void drcbe_x86::emit_mov_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m) +void drcbe_x86::emit_mov_r32_p32(Assembler &a, Gp const ®, be_parameter const ¶m) { if (param.is_immediate()) { if (param.immediate() == 0) - emit_xor_r32_r32(dst, reg, reg); // xor reg,reg + a.xor_(reg, reg); // xor reg,reg else - emit_mov_r32_imm(dst, reg, param.immediate()); // mov reg,param + a.mov(reg, param.immediate()); // mov reg,param } else if (param.is_memory()) - emit_mov_r32_m32(dst, reg, MABS(param.memory())); // mov reg,[param] + a.mov(reg, MABS(param.memory())); // mov reg,[param] else if (param.is_int_register()) { - if (reg != param.ireg()) - emit_mov_r32_r32(dst, reg, param.ireg()); // mov reg,param + if (reg.id() != param.ireg()) + a.mov(reg, Gpd(param.ireg())); // mov reg,param } } @@ -885,19 +935,19 @@ void drcbe_x86::emit_mov_r32_p32(x86code *&dst, uint8_t reg, const be_parameter // any flags //------------------------------------------------- -void drcbe_x86::emit_mov_r32_p32_keepflags(x86code *&dst, uint8_t reg, const be_parameter ¶m) +void drcbe_x86::emit_mov_r32_p32_keepflags(Assembler &a, Gp const ®, be_parameter const ¶m) { if (param.is_immediate()) - emit_mov_r32_imm(dst, reg, param.immediate()); // mov reg,param + a.mov(reg, param.immediate()); // mov reg,param else if (param.is_memory()) { - if (!can_skip_lower_load(dst, (uint32_t *)((uintptr_t)param.memory()), reg)) - emit_mov_r32_m32(dst, reg, MABS(param.memory())); // mov reg,[param] + if (!can_skip_lower_load(a, (uint32_t *)((uintptr_t)param.memory()), reg)) + a.mov(reg, MABS(param.memory())); // mov reg,[param] } else if (param.is_int_register()) { - if (reg != param.ireg()) - emit_mov_r32_r32(dst, reg, param.ireg()); // mov reg,param + if (reg.id() != param.ireg()) + a.mov(reg, Gpd(param.ireg())); // mov reg,param } } @@ -907,18 +957,18 @@ void drcbe_x86::emit_mov_r32_p32_keepflags(x86code *&dst, uint8_t reg, const be_ // into a memory location //------------------------------------------------- -void drcbe_x86::emit_mov_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m) +void drcbe_x86::emit_mov_m32_p32(Assembler &a, Mem memref, be_parameter const ¶m) { if (param.is_immediate()) - emit_mov_m32_imm(dst, memref, param.immediate()); // mov [mem],param + a.mov(memref, param.immediate()); // mov [mem],param else if (param.is_memory()) { - if (!can_skip_lower_load(dst, (uint32_t *)((uintptr_t)param.memory()), REG_EAX)) - emit_mov_r32_m32(dst, REG_EAX, MABS(param.memory())); // mov eax,[param] - emit_mov_m32_r32(dst, memref, REG_EAX); // mov [mem],eax + if (!can_skip_lower_load(a, (uint32_t *)((uintptr_t)param.memory()), eax)) + a.mov(eax, MABS(param.memory())); // mov eax,[param] + a.mov(memref, eax); // mov [mem],eax } else if (param.is_int_register()) - emit_mov_m32_r32(dst, memref, param.ireg()); // mov [mem],param + a.mov(memref, Gpd(param.ireg())); // mov [mem],param } @@ -927,1089 +977,204 @@ void drcbe_x86::emit_mov_m32_p32(x86code *&dst, x86_memref memref, const be_para // 32-bit parameter //------------------------------------------------- -void drcbe_x86::emit_mov_p32_r32(x86code *&dst, const be_parameter ¶m, uint8_t reg) +void drcbe_x86::emit_mov_p32_r32(Assembler &a, be_parameter const ¶m, Gp const ®) { assert(!param.is_immediate()); if (param.is_memory()) { - emit_mov_m32_r32(dst, MABS(param.memory()), reg); // mov [param],reg - set_last_lower_reg(dst, param, reg); - } - else if (param.is_int_register()) - { - if (reg != param.ireg()) - emit_mov_r32_r32(dst, param.ireg(), reg); // mov param,reg - } -} - - -//------------------------------------------------- -// emit_add_r32_p32 - add operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_add_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() != 0 || param.immediate() != 0) - emit_add_r32_imm(dst, reg, param.immediate()); // add reg,param - } - else if (param.is_memory()) - emit_add_r32_m32(dst, reg, MABS(param.memory())); // add reg,[param] - else if (param.is_int_register()) - emit_add_r32_r32(dst, reg, param.ireg()); // add reg,param -} - - -//------------------------------------------------- -// emit_add_m32_p32 - add operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_add_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() != 0 || param.immediate() != 0) - emit_add_m32_imm(dst, memref, param.immediate()); // add [dest],param - } - else - { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32(dst, reg, param); // mov reg,param - emit_add_m32_r32(dst, memref, reg); // add [dest],reg - } -} - - -//------------------------------------------------- -// emit_adc_r32_p32 - adc operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_adc_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - emit_adc_r32_imm(dst, reg, param.immediate()); // adc reg,param - else if (param.is_memory()) - emit_adc_r32_m32(dst, reg, MABS(param.memory())); // adc reg,[param] - else if (param.is_int_register()) - emit_adc_r32_r32(dst, reg, param.ireg()); // adc reg,param -} - - -//------------------------------------------------- -// emit_adc_m32_p32 - adc operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_adc_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - emit_adc_m32_imm(dst, memref, param.immediate()); // adc [dest],param - else - { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32_keepflags(dst, reg, param); // mov reg,param - emit_adc_m32_r32(dst, memref, reg); // adc [dest],reg - } -} - - -//------------------------------------------------- -// emit_sub_r32_p32 - sub operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sub_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() != 0 || param.immediate() != 0) - emit_sub_r32_imm(dst, reg, param.immediate()); // sub reg,param + a.mov(MABS(param.memory()), reg); // mov [param],reg + set_last_lower_reg(a, param, reg); } - else if (param.is_memory()) - emit_sub_r32_m32(dst, reg, MABS(param.memory())); // sub reg,[param] else if (param.is_int_register()) - emit_sub_r32_r32(dst, reg, param.ireg()); // sub reg,param -} - - -//------------------------------------------------- -// emit_sub_m32_p32 - sub operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sub_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) { - if (inst.flags() != 0 || param.immediate() != 0) - emit_sub_m32_imm(dst, memref, param.immediate()); // sub [dest],param + if (reg.id() != param.ireg()) + a.mov(Gpd(param.ireg()), reg); // mov param,reg } - else - { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32(dst, reg, param); // mov reg,param - emit_sub_m32_r32(dst, memref, reg); // sub [dest],reg - } -} - - -//------------------------------------------------- -// emit_sbb_r32_p32 - sbb operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sbb_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - emit_sbb_r32_imm(dst, reg, param.immediate()); // sbb reg,param - else if (param.is_memory()) - emit_sbb_r32_m32(dst, reg, MABS(param.memory())); // sbb reg,[param] - else if (param.is_int_register()) - emit_sbb_r32_r32(dst, reg, param.ireg()); // sbb reg,param } -//------------------------------------------------- -// emit_sbb_m32_p32 - sbb operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sbb_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::alu_op_param(Assembler &a, Inst::Id const opcode, Operand const &dst, be_parameter const ¶m, std::function optimize) { if (param.is_immediate()) - emit_sbb_m32_imm(dst, memref, param.immediate()); // sbb [dest],param - else { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32_keepflags(dst, reg, param); // mov reg,param - emit_sbb_m32_r32(dst, memref, reg); // sbb [dest],reg + if (!optimize(a, dst, param)) + a.emit(opcode, dst, param.immediate()); // op dst,param } -} - - -//------------------------------------------------- -// emit_cmp_r32_p32 - cmp operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_cmp_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - emit_cmp_r32_imm(dst, reg, param.immediate()); // cmp reg,param else if (param.is_memory()) - emit_cmp_r32_m32(dst, reg, MABS(param.memory())); // cmp reg,[param] - else if (param.is_int_register()) - emit_cmp_r32_r32(dst, reg, param.ireg()); // cmp reg,param -} - - -//------------------------------------------------- -// emit_cmp_m32_p32 - cmp operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_cmp_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - emit_cmp_m32_imm(dst, memref, param.immediate()); // cmp [dest],param - else - { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32(dst, reg, param); // mov reg,param - emit_cmp_m32_r32(dst, memref, reg); // cmp [dest],reg - } -} - - -//------------------------------------------------- -// emit_and_r32_p32 - and operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_and_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - emit_xor_r32_r32(dst, reg, reg); // xor reg,reg - else - emit_and_r32_imm(dst, reg, param.immediate()); // and reg,param - } - else if (param.is_memory()) - emit_and_r32_m32(dst, reg, MABS(param.memory())); // and reg,[param] - else if (param.is_int_register()) - emit_and_r32_r32(dst, reg, param.ireg()); // and reg,param -} - - -//------------------------------------------------- -// emit_and_m32_p32 - and operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- + if (dst.isMem()) + { + // use temporary register for memory,memory + Gp const reg = param.select_register(eax); -void drcbe_x86::emit_and_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - emit_mov_m32_imm(dst, memref, 0); // mov [dest],0 + a.mov(reg, MABS(param.memory())); // mov reg,param + a.emit(opcode, dst, reg); // op [dst],reg + } + else if (opcode != Inst::kIdTest) + // most instructions are register,memory + a.emit(opcode, dst, MABS(param.memory())); // op dst,[param] else - emit_and_m32_imm(dst, memref, param.immediate()); // and [dest],param - } - else - { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32(dst, reg, param); // mov reg,param - emit_and_m32_r32(dst, memref, reg); // and [dest],reg - } -} - - -//------------------------------------------------- -// emit_test_r32_p32 - test operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_test_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - emit_test_r32_imm(dst, reg, param.immediate()); // test reg,param - else if (param.is_memory()) - emit_test_m32_r32(dst, MABS(param.memory()), reg); // test [param],reg - else if (param.is_int_register()) - emit_test_r32_r32(dst, reg, param.ireg()); // test reg,param -} - - -//------------------------------------------------- -// emit_test_m32_p32 - test operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_test_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - emit_test_m32_imm(dst, memref, param.immediate()); // test [dest],param - else if (param.is_memory()) - { - emit_mov_r32_p32(dst, REG_EAX, param); // mov reg,param - emit_test_m32_r32(dst, memref, REG_EAX); // test [dest],reg + // test instruction requires memory,register + a.emit(opcode, MABS(param.memory()), dst); // op [param],dst } else if (param.is_int_register()) - emit_test_m32_r32(dst, memref, param.ireg()); // test [dest],param + a.emit(opcode, dst, Gpd(param.ireg())); // op dst,param } -//------------------------------------------------- -// emit_or_r32_p32 - or operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_or_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::shift_op_param(Assembler &a, Inst::Id const opcode, Operand const &dst, be_parameter const ¶m, std::function optimize) { + Operand shift = cl; if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_mov_r32_imm(dst, reg, ~0); // mov reg,-1 - else - emit_or_r32_imm(dst, reg, param.immediate()); // or reg,param - } - else if (param.is_memory()) - emit_or_r32_m32(dst, reg, MABS(param.memory())); // or reg,[param] - else if (param.is_int_register()) - emit_or_r32_r32(dst, reg, param.ireg()); // or reg,param -} - - -//------------------------------------------------- -// emit_or_m32_p32 - or operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- + if (optimize(a, dst, param)) + return; -void drcbe_x86::emit_or_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_mov_m32_imm(dst, memref, ~0); // mov [dest],-1 - else - emit_or_m32_imm(dst, memref, param.immediate()); // or [dest],param + shift = imm(param.immediate()); } else - { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32(dst, reg, param); // mov reg,param - emit_or_m32_r32(dst, memref, reg); // or [dest],reg - } -} + emit_mov_r32_p32(a, ecx, param); + a.emit(opcode, dst, shift); +} -//------------------------------------------------- -// emit_xor_r32_p32 - xor operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- -void drcbe_x86::emit_xor_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_not_r32(dst, reg); // not reg - else - emit_xor_r32_imm(dst, reg, param.immediate()); // xor reg,param - } - else if (param.is_memory()) - emit_xor_r32_m32(dst, reg, MABS(param.memory())); // xor reg,[param] - else if (param.is_int_register()) - emit_xor_r32_r32(dst, reg, param.ireg()); // xor reg,param -} - -//------------------------------------------------- -// emit_xor_m32_p32 - xor operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_xor_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_not_m32(dst, memref); // not [dest] - else - emit_xor_m32_imm(dst, memref, param.immediate()); // xor [dest],param - } - else - { - int reg = param.select_register(REG_EAX); - emit_mov_r32_p32(dst, reg, param); // mov reg,param - emit_xor_m32_r32(dst, memref, reg); // xor [dest],reg - } -} - - -//------------------------------------------------- -// emit_shl_r32_p32 - shl operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_shl_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_shl_r32_imm(dst, reg, param.immediate()); // shl reg,param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_shl_r32_cl(dst, reg); // shl reg,cl - } -} - - -//------------------------------------------------- -// emit_shl_m32_p32 - shl operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_shl_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_shl_m32_imm(dst, memref, param.immediate()); // shl [dest],param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_shl_m32_cl(dst, memref); // shl [dest],cl - } -} - - -//------------------------------------------------- -// emit_shr_r32_p32 - shr operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_shr_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_shr_r32_imm(dst, reg, param.immediate()); // shr reg,param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_shr_r32_cl(dst, reg); // shr reg,cl - } -} - - -//------------------------------------------------- -// emit_shr_m32_p32 - shr operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_shr_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_shr_m32_imm(dst, memref, param.immediate()); // shr [dest],param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_shr_m32_cl(dst, memref); // shr [dest],cl - } -} - - -//------------------------------------------------- -// emit_sar_r32_p32 - sar operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sar_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_sar_r32_imm(dst, reg, param.immediate()); // sar reg,param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_sar_r32_cl(dst, reg); // sar reg,cl - } -} - - -//------------------------------------------------- -// emit_sar_m32_p32 - sar operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sar_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_sar_m32_imm(dst, memref, param.immediate()); // sar [dest],param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_sar_m32_cl(dst, memref); // sar [dest],cl - } -} - - -//------------------------------------------------- -// emit_rol_r32_p32 - rol operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_rol_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_rol_r32_imm(dst, reg, param.immediate()); // rol reg,param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_rol_r32_cl(dst, reg); // rol reg,cl - } -} - - -//------------------------------------------------- -// emit_rol_m32_p32 - rol operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_rol_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_rol_m32_imm(dst, memref, param.immediate()); // rol [dest],param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_rol_m32_cl(dst, memref); // rol [dest],cl - } -} - - -//------------------------------------------------- -// emit_ror_r32_p32 - ror operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_ror_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_ror_r32_imm(dst, reg, param.immediate()); // ror reg,param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_ror_r32_cl(dst, reg); // ror reg,cl - } -} - - -//------------------------------------------------- -// emit_ror_m32_p32 - ror operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_ror_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_ror_m32_imm(dst, memref, param.immediate()); // ror [dest],param - } - else - { - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_ror_m32_cl(dst, memref); // ror [dest],cl - } -} - - -//------------------------------------------------- -// emit_rcl_r32_p32 - rcl operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_rcl_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_rcl_r32_imm(dst, reg, param.immediate()); // rcl reg,param - } - else - { - emit_mov_r32_p32_keepflags(dst, REG_ECX, param); // mov ecx,param - emit_rcl_r32_cl(dst, reg); // rcl reg,cl - } -} - - -//------------------------------------------------- -// emit_rcl_m32_p32 - rcl operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_rcl_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_rcl_m32_imm(dst, memref, param.immediate()); // rcl [dest],param - } - else - { - emit_mov_r32_p32_keepflags(dst, REG_ECX, param); // mov ecx,param - emit_rcl_m32_cl(dst, memref); // rcl [dest],cl - } -} - - -//------------------------------------------------- -// emit_rcr_r32_p32 - rcr operation to a 32-bit -// register from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_rcr_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_rcr_r32_imm(dst, reg, param.immediate()); // rcr reg,param - } - else - { - emit_mov_r32_p32_keepflags(dst, REG_ECX, param); // mov ecx,param - emit_rcr_r32_cl(dst, reg); // rcr reg,cl - } -} - - -//------------------------------------------------- -// emit_rcr_m32_p32 - rcr operation to a 32-bit -// memory location from a 32-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_rcr_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - if (param.is_immediate()) - { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - ;// skip - else - emit_rcr_m32_imm(dst, memref, param.immediate()); // rcr [dest],param - } - else - { - emit_mov_r32_p32_keepflags(dst, REG_ECX, param); // mov ecx,param - emit_rcr_m32_cl(dst, memref); // rcr [dest],cl - } -} - - - -//************************************************************************** -// EMITTERS FOR 64-BIT OPERATIONS WITH PARAMETERS -//************************************************************************** +//************************************************************************** +// EMITTERS FOR 64-BIT OPERATIONS WITH PARAMETERS +//************************************************************************** //------------------------------------------------- // emit_mov_r64_p64 - move a 64-bit parameter // into a pair of registers //------------------------------------------------- -void drcbe_x86::emit_mov_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m) -{ - if (param.is_immediate()) - { - if (reglo == REG_NONE) - ; - else if ((uint32_t)param.immediate() == 0) - emit_xor_r32_r32(dst, reglo, reglo); // xor reglo,reglo - else - emit_mov_r32_imm(dst, reglo, param.immediate()); // mov reglo,param - if (reghi == REG_NONE) - ; - else if ((uint32_t)(param.immediate() >> 32) == 0) - emit_xor_r32_r32(dst, reghi, reghi); // xor reghi,reghi - else - emit_mov_r32_imm(dst, reghi, param.immediate() >> 32); // mov reghi,param >> 32 - } - else if (param.is_memory()) - { - int skip_lower = can_skip_lower_load(dst, (uint32_t *)((uintptr_t)param.memory()), reglo); - int skip_upper = can_skip_upper_load(dst, (uint32_t *)((uintptr_t)param.memory(4)), reghi); - if (reglo != REG_NONE && !skip_lower) - emit_mov_r32_m32(dst, reglo, MABS(param.memory())); // mov reglo,[param] - if (reghi != REG_NONE && !skip_upper) - emit_mov_r32_m32(dst, reghi, MABS(param.memory(4))); // mov reghi,[param+4] - } - else if (param.is_int_register()) - { - int skip_upper = can_skip_upper_load(dst, m_reghi[param.ireg()], reghi); - if (reglo != REG_NONE && reglo != param.ireg()) - emit_mov_r32_r32(dst, reglo, param.ireg()); // mov reglo,param - if (reghi != REG_NONE && !skip_upper) - emit_mov_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // mov reghi,reghi[param] - } -} - - -//------------------------------------------------- -// emit_mov_r64_p64_keepflags - move a 64-bit -// parameter into a pair of registers without -// affecting any flags -//------------------------------------------------- - -void drcbe_x86::emit_mov_r64_p64_keepflags(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m) -{ - if (param.is_immediate()) - { - if (reglo != REG_NONE) - emit_mov_r32_imm(dst, reglo, param.immediate()); // mov reglo,param - if (reghi != REG_NONE) - emit_mov_r32_imm(dst, reghi, param.immediate() >> 32); // mov reghi,param >> 32 - } - else if (param.is_memory()) - { - int skip_lower = can_skip_lower_load(dst, (uint32_t *)((uintptr_t)param.memory()), reglo); - int skip_upper = can_skip_upper_load(dst, (uint32_t *)((uintptr_t)param.memory(4)), reghi); - if (reglo != REG_NONE && !skip_lower) - emit_mov_r32_m32(dst, reglo, MABS(param.memory())); // mov reglo,[param] - if (reghi != REG_NONE && !skip_upper) - emit_mov_r32_m32(dst, reghi, MABS(param.memory(4))); // mov reghi,[param+4] - } - else if (param.is_int_register()) - { - int skip_upper = can_skip_upper_load(dst, m_reghi[param.ireg()], reghi); - if (reglo != REG_NONE && reglo != param.ireg()) - emit_mov_r32_r32(dst, reglo, param.ireg()); // mov reglo,param - if (reghi != REG_NONE && !skip_upper) - emit_mov_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // mov reghi,reghi[param] - } -} - - -//------------------------------------------------- -// emit_mov_m64_p64 - move a 64-bit parameter -// into a memory location -//------------------------------------------------- - -void drcbe_x86::emit_mov_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m) -{ - if (param.is_immediate()) - { - emit_mov_m32_imm(dst, memref + 0, param.immediate()); // mov [mem],param - emit_mov_m32_imm(dst, memref + 4, param.immediate() >> 32); // mov [mem],param >> 32 - } - else if (param.is_memory()) - { - int skip_lower = can_skip_lower_load(dst, (uint32_t *)((uintptr_t)param.memory()), REG_EAX); - if (!skip_lower) - emit_mov_r32_m32(dst, REG_EAX, MABS(param.memory())); // mov eax,[param] - emit_mov_m32_r32(dst, memref + 0, REG_EAX); // mov [mem],eax - emit_mov_r32_m32(dst, REG_EAX, MABS(param.memory(4))); // mov eax,[param+4] - emit_mov_m32_r32(dst, memref + 4, REG_EAX); // mov [mem+4],eax - } - else if (param.is_int_register()) - { - emit_mov_m32_r32(dst, memref + 0, param.ireg()); // mov [mem],param - emit_mov_r32_m32(dst, REG_EAX, MABS(m_reghi[param.ireg()])); // mov eax,[param.hi] - emit_mov_m32_r32(dst, memref + 4, REG_EAX); // mov [mem+4],eax - } -} - - -//------------------------------------------------- -// emit_mov_p64_r64 - move a pair of registers -// into a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_mov_p64_r64(x86code *&dst, const be_parameter ¶m, uint8_t reglo, uint8_t reghi) -{ - assert(!param.is_immediate()); - if (param.is_memory()) - { - emit_mov_m32_r32(dst, MABS(param.memory()), reglo); // mov [param],reglo - emit_mov_m32_r32(dst, MABS(param.memory(4)), reghi); // mov [param+4],reghi - } - else if (param.is_int_register()) - { - if (reglo != param.ireg()) - emit_mov_r32_r32(dst, param.ireg(), reglo); // mov param,reglo - emit_mov_m32_r32(dst, MABS(m_reghi[param.ireg()]), reghi); // mov reghi[param],reghi - } - set_last_lower_reg(dst, param, reglo); - set_last_upper_reg(dst, param, reghi); -} - - -//------------------------------------------------- -// emit_add_r64_p64 - add operation to a 64-bit -// pair of registers from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_add_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) -{ - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_memory()) - { - emit_add_r32_m32(dst, reglo, MABS(param.memory())); // add reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_adc_r32_m32(dst, reghi, MABS(param.memory(4))); // adc reghi,[param] - } - else if (param.is_immediate()) - { - emit_add_r32_imm(dst, reglo, param.immediate()); // add reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_adc_r32_imm(dst, reghi, param.immediate() >> 32); // adc reghi,param >> 32 - } - else if (param.is_int_register()) - { - emit_add_r32_r32(dst, reglo, param.ireg()); // add reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_adc_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // adc reghi,reghi[param] - } - if (saveflags) - emit_combine_z_flags(dst); -} - - -//------------------------------------------------- -// emit_add_m64_p64 - add operation to a 64-bit -// memory location from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_add_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_immediate()) - { - emit_add_m32_imm(dst, memref, param.immediate()); // add [dest],param - if (saveflags) emit_pushf(dst); // pushf - emit_adc_m32_imm(dst, memref + 4, param.immediate() >> 32); // adc [dest+4],param >> 32 - } - else - { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_add_m32_r32(dst, memref, reglo); // add [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_adc_m32_r32(dst, memref + 4, REG_EDX); // adc [dest+4],edx - } - if (saveflags) - emit_combine_z_flags(dst); -} - - -//------------------------------------------------- -// emit_adc_r64_p64 - adc operation to a 64-bit -// pair of registers from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_adc_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) -{ - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_memory()) - { - emit_adc_r32_m32(dst, reglo, MABS(param.memory())); // adc reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_adc_r32_m32(dst, reghi, MABS(param.memory(4))); // adc reghi,[param] - } - else if (param.is_immediate()) - { - emit_adc_r32_imm(dst, reglo, param.immediate()); // adc reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_adc_r32_imm(dst, reghi, param.immediate() >> 32); // adc reghi,param >> 32 - } - else if (param.is_int_register()) - { - emit_adc_r32_r32(dst, reglo, param.ireg()); // adc reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_adc_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // adc reghi,reghi[param] - } - if (saveflags) - emit_combine_z_flags(dst); -} - - -//------------------------------------------------- -// emit_adc_m64_p64 - adc operation to a 64-bit -// memory location from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_adc_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_immediate()) - { - emit_adc_m32_imm(dst, memref, param.immediate()); // adc [dest],param - if (saveflags) emit_pushf(dst); // pushf - emit_adc_m32_imm(dst, memref + 4, param.immediate() >> 32); // adc [dest+4],param >> 32 - } - else - { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64_keepflags(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_adc_m32_r32(dst, memref, reglo); // adc [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_adc_m32_r32(dst, memref + 4, REG_EDX); // adc [dest+4],edx - } - if (saveflags) - emit_combine_z_flags(dst); -} - - -//------------------------------------------------- -// emit_sub_r64_p64 - sub operation to a 64-bit -// pair of registers from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sub_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) -{ - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_memory()) - { - emit_sub_r32_m32(dst, reglo, MABS(param.memory())); // sub reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_m32(dst, reghi, MABS(param.memory(4))); // sbb reghi,[param] - } - else if (param.is_immediate()) - { - emit_sub_r32_imm(dst, reglo, param.immediate()); // sub reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_imm(dst, reghi, param.immediate() >> 32); // sbb reghi,param >> 32 - } - else if (param.is_int_register()) - { - emit_sub_r32_r32(dst, reglo, param.ireg()); // sub reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // sbb reghi,reghi[param] - } - if (saveflags) - emit_combine_z_flags(dst); -} - - -//------------------------------------------------- -// emit_sub_m64_p64 - sub operation to a 64-bit -// memory location from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_sub_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_mov_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m) { - int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { - emit_sub_m32_imm(dst, memref, param.immediate()); // sub [dest],param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_m32_imm(dst, memref + 4, param.immediate() >> 32); // sbb [dest+4],param >> 32 + if (!reglo.isValid()) + ; + else if (u32(param.immediate()) == 0) + a.xor_(reglo, reglo); // xor reglo,reglo + else + a.mov(reglo, param.immediate()); // mov reglo,param + if (!reghi.isValid()) + ; + else if (u32(param.immediate() >> 32) == 0) + a.xor_(reghi, reghi); // xor reghi,reghi + else + a.mov(reghi, param.immediate() >> 32); // mov reghi,param >> 32 } - else + else if (param.is_memory()) { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_sub_m32_r32(dst, memref, reglo); // sub [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_m32_r32(dst, memref + 4, REG_EDX); // sbb [dest+4],edx + int skip_lower = can_skip_lower_load(a, (uint32_t *)((uintptr_t)param.memory(0)), reglo); + int skip_upper = can_skip_upper_load(a, (uint32_t *)((uintptr_t)param.memory(4)), reghi); + if (reglo.isValid() && !skip_lower) + a.mov(reglo, MABS(param.memory(0))); // mov reglo,[param] + if (reghi.isValid() && !skip_upper) + a.mov(reghi, MABS(param.memory(4))); // mov reghi,[param+4] + } + else if (param.is_int_register()) + { + int skip_upper = can_skip_upper_load(a, m_reghi[param.ireg()], reghi); + if (reglo.isValid() && reglo.id() != param.ireg()) + a.mov(reglo, Gpd(param.ireg())); // mov reglo,param + if (reghi.isValid() && !skip_upper) + a.mov(reghi, MABS(m_reghi[param.ireg()])); // mov reghi,reghi[param] } - if (saveflags) - emit_combine_z_flags(dst); } //------------------------------------------------- -// emit_sbb_r64_p64 - sbb operation to a 64-bit -// pair of registers from a 64-bit parameter +// emit_mov_r64_p64_keepflags - move a 64-bit +// parameter into a pair of registers without +// affecting any flags //------------------------------------------------- -void drcbe_x86::emit_sbb_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_mov_r64_p64_keepflags(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m) { - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_memory()) + if (param.is_immediate()) { - emit_sbb_r32_m32(dst, reglo, MABS(param.memory())); // sbb reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_m32(dst, reghi, MABS(param.memory(4))); // sbb reghi,[param] + if (reglo.isValid()) + a.mov(reglo, param.immediate()); // mov reglo,param + if (reghi.isValid()) + a.mov(reghi, param.immediate() >> 32); // mov reghi,param >> 32 } - else if (param.is_immediate()) + else if (param.is_memory()) { - emit_sbb_r32_imm(dst, reglo, param.immediate()); // sbb reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_imm(dst, reghi, param.immediate() >> 32); // sbb reghi,param >> 32 + int skip_lower = can_skip_lower_load(a, (uint32_t *)((uintptr_t)param.memory(0)), reglo); + int skip_upper = can_skip_upper_load(a, (uint32_t *)((uintptr_t)param.memory(4)), reghi); + if (reglo.isValid() && !skip_lower) + a.mov(reglo, MABS(param.memory(0))); // mov reglo,[param] + if (reghi.isValid() && !skip_upper) + a.mov(reghi, MABS(param.memory(4))); // mov reghi,[param+4] } else if (param.is_int_register()) { - emit_sbb_r32_r32(dst, reglo, param.ireg()); // sbb reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // sbb reghi,reghi[param] + int skip_upper = can_skip_upper_load(a, m_reghi[param.ireg()], reghi); + if (reglo.isValid() && reglo.id() != param.ireg()) + a.mov(reglo, Gpd(param.ireg())); // mov reglo,param + if (reghi.isValid() && !skip_upper) + a.mov(reghi, MABS(m_reghi[param.ireg()])); // mov reghi,reghi[param] } - if (saveflags) - emit_combine_z_flags(dst); } //------------------------------------------------- -// emit_sbb_m64_p64 - sbb operation to a 64-bit -// memory location from a 64-bit parameter +// emit_mov_m64_p64 - move a 64-bit parameter +// into a memory location //------------------------------------------------- -void drcbe_x86::emit_sbb_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_mov_m64_p64(Assembler &a, Mem const &memref, be_parameter const ¶m) { - int saveflags = ((inst.flags() & FLAG_Z) != 0); + Mem memref_lo = memref.cloneAdjusted(0); memref_lo.setSize(4); + Mem memref_hi = memref.cloneAdjusted(4); memref_hi.setSize(4); + if (param.is_immediate()) { - emit_sbb_m32_imm(dst, memref, param.immediate()); // sbb [dest],param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_m32_imm(dst, memref + 4, param.immediate() >> 32); // sbb [dest+4],param >> 32 + a.mov(memref_lo, param.immediate()); // mov [mem],param + a.mov(memref_hi, param.immediate() >> 32); // mov [mem],param >> 32 } - else + else if (param.is_memory()) { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64_keepflags(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_sbb_m32_r32(dst, memref, reglo); // sbb [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_m32_r32(dst, memref + 4, REG_EDX); // sbb [dest+4],edx + int skip_lower = can_skip_lower_load(a, (uint32_t *)((uintptr_t)param.memory()), eax); + if (!skip_lower) + a.mov(eax, MABS(param.memory(0))); // mov eax,[param] + a.mov(memref_lo, eax); // mov [mem],eax + a.mov(eax, MABS(param.memory(4))); // mov eax,[param+4] + a.mov(memref_hi, eax); // mov [mem+4],eax + } + else if (param.is_int_register()) + { + a.mov(memref_lo, Gpd(param.ireg())); // mov [mem],param + a.mov(eax, MABS(m_reghi[param.ireg()])); // mov eax,[param.hi] + a.mov(memref_hi, eax); // mov [mem+4],eax } - if (saveflags) - emit_combine_z_flags(dst); } //------------------------------------------------- -// emit_cmp_r64_p64 - sub operation to a 64-bit -// pair of registers from a 64-bit parameter +// emit_mov_p64_r64 - move a pair of registers +// into a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_cmp_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_mov_p64_r64(Assembler &a, be_parameter const ¶m, Gp const ®lo, Gp const ®hi) { - int saveflags = (inst.flags() != FLAG_Z && (inst.flags() & FLAG_Z) != 0); + assert(!param.is_immediate()); if (param.is_memory()) { - emit_sub_r32_m32(dst, reglo, MABS(param.memory())); // sub reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_m32(dst, reghi, MABS(param.memory(4))); // sbb reghi,[param] - } - else if (param.is_immediate()) - { - emit_sub_r32_imm(dst, reglo, param.immediate()); // sub reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_imm(dst, reghi, param.immediate() >> 32); // sbb reghi,param >> 32 + a.mov(MABS(param.memory(0)), reglo); // mov [param],reglo + a.mov(MABS(param.memory(4)), reghi); // mov [param+4],reghi } else if (param.is_int_register()) { - emit_sub_r32_r32(dst, reglo, param.ireg()); // sub reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_sbb_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // sbb reghi,reghi[param] + if (reglo.id() != param.ireg()) + a.mov(Gpd(param.ireg()), reglo); // mov param,reglo + a.mov(MABS(m_reghi[param.ireg()]), reghi); // mov reghi[param],reghi } - if (inst.flags() == FLAG_Z) - emit_or_r32_r32(dst, reghi, reglo); // or reghi,reglo - else if (saveflags) - emit_combine_z_flags(dst); + set_last_lower_reg(a, param, reglo); + set_last_upper_reg(a, param, reghi); } @@ -2018,39 +1183,39 @@ void drcbe_x86::emit_cmp_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_and_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_and_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_memory()) { - emit_and_r32_m32(dst, reglo, MABS(param.memory())); // and reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_and_r32_m32(dst, reghi, MABS(param.memory(4))); // and reghi,[param] + a.and_(reglo, MABS(param.memory(0))); // and reglo,[param] + if (saveflags) a.pushfd(); // pushf + a.and_(reghi, MABS(param.memory(4))); // and reghi,[param] } else if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) + if (!inst.flags() && u32(param.immediate()) == 0xffffffffU) ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - emit_xor_r32_r32(dst, reglo, reglo); // xor reglo,reglo + else if (!inst.flags() && u32(param.immediate()) == 0) + a.xor_(reglo, reglo); // xor reglo,reglo else - emit_and_r32_imm(dst, reglo, param.immediate()); // and reglo,param - if (saveflags) emit_pushf(dst); // pushf - if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0xffffffff) + a.and_(reglo, param.immediate()); // and reglo,param + if (saveflags) a.pushfd(); // pushf + if (!inst.flags() && u32(param.immediate() >> 32) == 0xffffffffU) ;// skip - else if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0) - emit_xor_r32_r32(dst, reghi, reghi); // xor reghi,reghi + else if (!inst.flags() && u32(param.immediate() >> 32) == 0) + a.xor_(reghi, reghi); // xor reghi,reghi else - emit_and_r32_imm(dst, reghi, param.immediate() >> 32); // and reghi,param >> 32 + a.and_(reghi, param.immediate() >> 32); // and reghi,param >> 32 } else if (param.is_int_register()) { - emit_and_r32_r32(dst, reglo, param.ireg()); // and reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_and_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // and reghi,reghi[param] + a.and_(reglo, Gpd(param.ireg())); // and reglo,param + if (saveflags) a.pushfd(); // pushf + a.and_(reghi, MABS(m_reghi[param.ireg()])); // and reghi,reghi[param] } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2059,93 +1224,35 @@ void drcbe_x86::emit_and_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // memory location from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_and_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_and_m64_p64(Assembler &a, Mem const &memref_lo, Mem const &memref_hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) + if (!inst.flags() && u32(param.immediate()) == 0xffffffffU) ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) - emit_mov_m32_imm(dst, memref, 0); // mov [dest],0 + else if (!inst.flags() && u32(param.immediate()) == 0) + a.mov(memref_lo, 0); // mov [dest],0 else - emit_and_m32_imm(dst, memref, param.immediate()); // and [dest],param - if (saveflags) emit_pushf(dst); // pushf - if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0xffffffff) + a.and_(memref_lo, param.immediate()); // and [dest],param + if (saveflags) a.pushfd(); // pushf + if (!inst.flags() && u32(param.immediate() >> 32) == 0xffffffffU) ;// skip - else if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0) - emit_mov_m32_imm(dst, memref + 4, 0); // mov [dest+4],0 + else if (!inst.flags() && u32(param.immediate() >> 32) == 0) + a.mov(memref_hi, 0); // mov [dest+4],0 else - emit_and_m32_imm(dst, memref + 4, param.immediate() >> 32); // and [dest+4],param >> 32 - } - else - { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_and_m32_r32(dst, memref, reglo); // and [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_and_m32_r32(dst, memref + 4, REG_EDX); // and [dest+4],edx - } - if (saveflags) - emit_combine_z_flags(dst); -} - - -//------------------------------------------------- -// emit_test_r64_p64 - test operation to a 64-bit -// pair of registers from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_test_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) -{ - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_memory()) - { - emit_test_m32_r32(dst, MABS(param.memory()), reglo); // test [param],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_test_m32_r32(dst, MABS(param.memory(4)), reghi); // test [param],reghi - } - else if (param.is_immediate()) - { - emit_test_r32_imm(dst, reglo, param.immediate()); // test reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_test_r32_imm(dst, reghi, param.immediate() >> 32); // test reghi,param >> 32 - } - else if (param.is_int_register()) - { - emit_test_r32_r32(dst, reglo, param.ireg()); // test reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_test_m32_r32(dst, MABS(m_reghi[param.ireg()]), reghi); // test reghi[param],reghi - } - if (saveflags) - emit_combine_z_flags(dst); -} - - -//------------------------------------------------- -// emit_test_m64_p64 - test operation to a 64-bit -// memory location from a 64-bit parameter -//------------------------------------------------- - -void drcbe_x86::emit_test_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) -{ - int saveflags = ((inst.flags() & FLAG_Z) != 0); - if (param.is_immediate()) - { - emit_test_m32_imm(dst, memref, param.immediate()); // test [dest],param - if (saveflags) emit_pushf(dst); // pushf - emit_test_m32_imm(dst, memref + 4, param.immediate() >> 32); // test [dest+4],param >> 32 + a.and_(memref_hi, param.immediate() >> 32); // and [dest+4],param >> 32 } else { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_test_m32_r32(dst, memref, reglo); // test [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_test_m32_r32(dst, memref + 4, REG_EDX); // test [dest+4],edx + Gp const reglo = (param.is_int_register()) ? Gpd(param.ireg()) : eax; + emit_mov_r64_p64(a, reglo, edx, param); // mov edx:reglo,param + a.and_(memref_lo, reglo); // and [dest],reglo + if (saveflags) a.pushfd(); // pushf + a.and_(memref_hi, edx); // and [dest+4],edx } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2154,39 +1261,39 @@ void drcbe_x86::emit_test_m64_p64(x86code *&dst, x86_memref memref, const be_par // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_or_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_or_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_memory()) { - emit_or_r32_m32(dst, reglo, MABS(param.memory())); // or reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_or_r32_m32(dst, reghi, MABS(param.memory(4))); // or reghi,[param] + a.or_(reglo, MABS(param.memory(0))); // or reglo,[param] + if (saveflags) a.pushfd(); // pushf + a.or_(reghi, MABS(param.memory(4))); // or reghi,[param] } else if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) + if (!inst.flags() && u32(param.immediate()) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_mov_r32_imm(dst, reglo, ~0); // mov reglo,-1 + else if (!inst.flags() && u32(param.immediate()) == 0xffffffffU) + a.mov(reglo, ~0); // mov reglo,-1 else - emit_or_r32_imm(dst, reglo, param.immediate()); // or reglo,param - if (saveflags) emit_pushf(dst); // pushf - if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0) + a.or_(reglo, param.immediate()); // or reglo,param + if (saveflags) a.pushfd(); // pushf + if (!inst.flags() && u32(param.immediate() >> 32) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0xffffffff) - emit_mov_r32_imm(dst, reghi, ~0); // mov reghi,-1 + else if (!inst.flags() && u32(param.immediate() >> 32) == 0xffffffffU) + a.mov(reghi, ~0); // mov reghi,-1 else - emit_or_r32_imm(dst, reghi, param.immediate() >> 32); // or reghi,param >> 32 + a.or_(reghi, param.immediate() >> 32); // or reghi,param >> 32 } else if (param.is_int_register()) { - emit_or_r32_r32(dst, reglo, param.ireg()); // or reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_or_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // or reghi,reghi[param] + a.or_(reglo, Gpd(param.ireg())); // or reglo,param + if (saveflags) a.pushfd(); // pushf + a.or_(reghi, MABS(m_reghi[param.ireg()])); // or reghi,reghi[param] } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2195,35 +1302,35 @@ void drcbe_x86::emit_or_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, con // memory location from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_or_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_or_m64_p64(Assembler &a, Mem const &memref_lo, Mem const &memref_hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) + if (!inst.flags() && u32(param.immediate()) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_mov_m32_imm(dst, memref, ~0); // mov [dest],-1 + else if (!inst.flags() && u32(param.immediate()) == 0xffffffffU) + a.mov(memref_lo, ~0); // mov [dest],-1 else - emit_or_m32_imm(dst, memref, param.immediate()); // or [dest],param - if (saveflags) emit_pushf(dst); // pushf - if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0) + a.or_(memref_lo, param.immediate()); // or [dest],param + if (saveflags) a.pushfd(); // pushf + if (!inst.flags() && u32(param.immediate() >> 32) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0xffffffff) - emit_mov_m32_imm(dst, memref + 4, ~0); // mov [dest+4],-1 + else if (!inst.flags() && u32(param.immediate() >> 32) == 0xffffffffU) + a.mov(memref_hi, ~0); // mov [dest+4],-1 else - emit_or_m32_imm(dst, memref + 4, param.immediate() >> 32); // or [dest+4],param >> 32 + a.or_(memref_hi, param.immediate() >> 32); // or [dest+4],param >> 32 } else { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_or_m32_r32(dst, memref, reglo); // or [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_or_m32_r32(dst, memref + 4, REG_EDX); // or [dest+4],edx + Gp const reglo = (param.is_int_register()) ? Gpd(param.ireg()) : eax; + emit_mov_r64_p64(a, reglo, edx, param); // mov edx:reglo,param + a.or_(memref_lo, reglo); // or [dest],reglo + if (saveflags) a.pushfd(); // pushf + a.or_(memref_hi, edx); // or [dest+4],edx } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2232,39 +1339,39 @@ void drcbe_x86::emit_or_m64_p64(x86code *&dst, x86_memref memref, const be_param // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_xor_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_xor_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_memory()) { - emit_xor_r32_m32(dst, reglo, MABS(param.memory())); // xor reglo,[param] - if (saveflags) emit_pushf(dst); // pushf - emit_xor_r32_m32(dst, reghi, MABS(param.memory(4))); // xor reghi,[param] + a.xor_(reglo, MABS(param.memory(0))); // xor reglo,[param] + if (saveflags) a.pushfd(); // pushf + a.xor_(reghi, MABS(param.memory(4))); // xor reghi,[param] } else if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) + if (!inst.flags() && u32(param.immediate()) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_not_r32(dst, reglo); // not reglo + else if (!inst.flags() && u32(param.immediate()) == 0xffffffffU) + a.not_(reglo); // not reglo else - emit_xor_r32_imm(dst, reglo, param.immediate()); // xor reglo,param - if (saveflags) emit_pushf(dst); // pushf - if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0) + a.xor_(reglo, param.immediate()); // xor reglo,param + if (saveflags) a.pushfd(); // pushf + if (!inst.flags() && u32(param.immediate() >> 32) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0xffffffff) - emit_not_r32(dst, reghi); // not reghi + else if (!inst.flags() && u32(param.immediate() >> 32) == 0xffffffffU) + a.not_(reghi); // not reghi else - emit_xor_r32_imm(dst, reghi, param.immediate() >> 32); // xor reghi,param >> 32 + a.xor_(reghi, param.immediate() >> 32); // xor reghi,param >> 32 } else if (param.is_int_register()) { - emit_xor_r32_r32(dst, reglo, param.ireg()); // xor reglo,param - if (saveflags) emit_pushf(dst); // pushf - emit_xor_r32_m32(dst, reghi, MABS(m_reghi[param.ireg()])); // xor reghi,reghi[param] + a.xor_(reglo, Gpd(param.ireg())); // xor reglo,param + if (saveflags) a.pushfd(); // pushf + a.xor_(reghi, MABS(m_reghi[param.ireg()])); // xor reghi,reghi[param] } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2273,35 +1380,35 @@ void drcbe_x86::emit_xor_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // memory location from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_xor_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_xor_m64_p64(Assembler &a, Mem const &memref_lo, Mem const &memref_hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { - if (inst.flags() == 0 && (uint32_t)param.immediate() == 0) + if (!inst.flags() && u32(param.immediate()) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)param.immediate() == 0xffffffff) - emit_not_m32(dst, memref); // not [dest] + else if (!inst.flags() && u32(param.immediate()) == 0xffffffffU) + a.not_(memref_lo); // not [dest] else - emit_xor_m32_imm(dst, memref, param.immediate()); // xor [dest],param - if (saveflags) emit_pushf(dst); // pushf - if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0) + a.xor_(memref_lo, param.immediate()); // xor [dest],param + if (saveflags) a.pushfd(); // pushf + if (!inst.flags() && u32(param.immediate() >> 32) == 0) ;// skip - else if (inst.flags() == 0 && (uint32_t)(param.immediate() >> 32) == 0xffffffff) - emit_not_m32(dst, memref + 4); // not [dest+4] + else if (!inst.flags() && u32(param.immediate() >> 32) == 0xffffffffU) + a.not_(memref_hi); // not [dest+4] else - emit_xor_m32_imm(dst, memref + 4, param.immediate() >> 32); // xor [dest+4],param >> 32 + a.xor_(memref_hi, param.immediate() >> 32); // xor [dest+4],param >> 32 } else { - int reglo = (param.is_int_register()) ? param.ireg() : REG_EAX; - emit_mov_r64_p64(dst, reglo, REG_EDX, param); // mov edx:reglo,param - emit_xor_m32_r32(dst, memref, reglo); // xor [dest],reglo - if (saveflags) emit_pushf(dst); // pushf - emit_xor_m32_r32(dst, memref + 4, REG_EDX); // xor [dest+4],edx + Gp const reglo = (param.is_int_register()) ? Gpd(param.ireg()) : eax; + emit_mov_r64_p64(a, reglo, edx, param); // mov edx:reglo,param + a.xor_(memref_lo, reglo); // xor [dest],reglo + if (saveflags) a.pushfd(); // pushf + a.xor_(memref_hi, edx); // xor [dest+4],edx } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2310,13 +1417,13 @@ void drcbe_x86::emit_xor_m64_p64(x86code *&dst, x86_memref memref, const be_para // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_shl_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_shl_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = (inst.flags() != 0); if (param.is_immediate()) { int count = param.immediate() & 63; - if (inst.flags() == 0 && count == 0) + if (!inst.flags() && count == 0) ;// skip else { @@ -2324,55 +1431,58 @@ void drcbe_x86::emit_shl_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co { if (inst.flags() != 0) { - emit_shld_r32_r32_imm(dst, reghi, reglo, 31); // shld reghi,reglo,31 - emit_shl_r32_imm(dst, reglo, 31); // shl reglo,31 + a.shld(reghi, reglo, 31); // shld reghi,reglo,31 + a.shl(reglo, 31); // shl reglo,31 count -= 31; } else { - emit_mov_r32_r32(dst, reghi, reglo); // mov reghi,reglo - emit_xor_r32_r32(dst, reglo, reglo); // xor reglo,reglo + a.mov(reghi, reglo); // mov reghi,reglo + a.xor_(reglo, reglo); // xor reglo,reglo count -= 32; } } if (inst.flags() != 0 || count > 0) { - emit_shld_r32_r32_imm(dst, reghi, reglo, count); // shld reghi,reglo,count - if (saveflags) emit_pushf(dst); // pushf - emit_shl_r32_imm(dst, reglo, count); // shl reglo,count + a.shld(reghi, reglo, count); // shld reghi,reglo,count + if (saveflags) a.pushfd(); // pushf + a.shl(reglo, count); // shl reglo,count } } } else { - emit_link skip1, skip2; - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip1); // jz skip1 + Label skip1 = a.newLabel(); + Label skip2 = a.newLabel(); + emit_mov_r32_p32(a, ecx, param); // mov ecx,param + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip1); // jz skip1 if (inst.flags() != 0) { - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_shld_r32_r32_imm(dst, reghi, reglo, 31); // shld reghi,reglo,31 - emit_shl_r32_imm(dst, reglo, 31); // shl reglo,31 - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip2); // jz skip2 - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_shld_r32_r32_imm(dst, reghi, reglo, 31); // shld reghi,reglo,31 - emit_shl_r32_imm(dst, reglo, 31); // shl reglo,31 - track_resolve_link(dst, skip2); // skip2: + a.sub(ecx, 31); // sub ecx,31 + a.shld(reghi, reglo, 31); // shld reghi,reglo,31 + a.shl(reglo, 31); // shl reglo,31 + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip2); // jz skip2 + a.sub(ecx, 31); // sub ecx,31 + a.shld(reghi, reglo, 31); // shld reghi,reglo,31 + a.shl(reglo, 31); // shl reglo,31 + a.bind(skip2); // skip2: + reset_last_upper_lower_reg(); } else { - emit_mov_r32_r32(dst, reghi, reglo); // mov reghi,reglo - emit_xor_r32_r32(dst, reglo, reglo); // xor reglo,reglo + a.mov(reghi, reglo); // mov reghi,reglo + a.xor_(reglo, reglo); // xor reglo,reglo } - track_resolve_link(dst, skip1); // skip1: - emit_shld_r32_r32_cl(dst, reghi, reglo); // shld reghi,reglo,cl - if (saveflags) emit_pushf(dst); // pushf - emit_shl_r32_cl(dst, reglo); // shl reglo,cl + a.bind(skip1); // skip1: + reset_last_upper_lower_reg(); + a.shld(reghi, reglo, cl); // shld reghi,reglo,cl + if (saveflags) a.pushfd(); // pushf + a.shl(reglo, cl); // shl reglo,cl } if (saveflags) - emit_combine_z_shl_flags(dst); + emit_combine_z_shl_flags(a); } @@ -2381,13 +1491,13 @@ void drcbe_x86::emit_shl_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_shr_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_shr_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { int count = param.immediate() & 63; - if (inst.flags() == 0 && count == 0) + if (!inst.flags() && count == 0) ;// skip else { @@ -2395,55 +1505,58 @@ void drcbe_x86::emit_shr_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co { if (inst.flags() != 0) { - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_shr_r32_imm(dst, reghi, 31); // shr reghi,31 + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.shr(reghi, 31); // shr reghi,31 count -= 31; } else { - emit_mov_r32_r32(dst, reglo, reghi); // mov reglo,reghi - emit_xor_r32_r32(dst, reghi, reghi); // xor reghi,reghi + a.mov(reglo, reghi); // mov reglo,reghi + a.xor_(reghi, reghi); // xor reghi,reghi count -= 32; } } if (inst.flags() != 0 || count > 0) { - emit_shrd_r32_r32_imm(dst, reglo, reghi, count); // shrd reglo,reghi,count - if (saveflags) emit_pushf(dst); // pushf - emit_shr_r32_imm(dst, reghi, count); // shr reghi,count + a.shrd(reglo, reghi, count); // shrd reglo,reghi,count + if (saveflags) a.pushfd(); // pushf + a.shr(reghi, count); // shr reghi,count } } } else { - emit_link skip1, skip2; - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip1); // jz skip1 + Label skip1 = a.newLabel(); + Label skip2 = a.newLabel(); + emit_mov_r32_p32(a, ecx, param); // mov ecx,param + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip1); // jz skip1 if (inst.flags() != 0) { - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_shr_r32_imm(dst, reghi, 31); // shr reghi,31 - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip2); // jz skip2 - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_shr_r32_imm(dst, reghi, 31); // shr reghi,31 - track_resolve_link(dst, skip2); // skip2: + a.sub(ecx, 31); // sub ecx,31 + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.shr(reghi, 31); // shr reghi,31 + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip2); // jz skip2 + a.sub(ecx, 31); // sub ecx,31 + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.shr(reghi, 31); // shr reghi,31 + a.bind(skip2); // skip2: + reset_last_upper_lower_reg(); } else { - emit_mov_r32_r32(dst, reglo, reghi); // mov reglo,reghi - emit_xor_r32_r32(dst, reghi, reghi); // xor reghi,reghi + a.mov(reglo, reghi); // mov reglo,reghi + a.xor_(reghi, reghi); // xor reghi,reghi } - track_resolve_link(dst, skip1); // skip1: - emit_shrd_r32_r32_cl(dst, reglo, reghi); // shrd reglo,reghi,cl - if (saveflags) emit_pushf(dst); // pushf - emit_shr_r32_cl(dst, reghi); // shr reghi,cl + a.bind(skip1); // skip1: + reset_last_upper_lower_reg(); + a.shrd(reglo, reghi, cl); // shrd reglo,reghi,cl + if (saveflags) a.pushfd(); // pushf + a.shr(reghi, cl); // shr reghi,cl } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2452,13 +1565,13 @@ void drcbe_x86::emit_shr_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_sar_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_sar_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { int count = param.immediate() & 63; - if (inst.flags() == 0 && count == 0) + if (!inst.flags() && count == 0) ;// skip else { @@ -2466,55 +1579,58 @@ void drcbe_x86::emit_sar_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co { if (inst.flags() != 0) { - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_sar_r32_imm(dst, reghi, 31); // sar reghi,31 + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.sar(reghi, 31); // sar reghi,31 count -= 31; } else { - emit_mov_r32_r32(dst, reglo, reghi); // mov reglo,reghi - emit_sar_r32_imm(dst, reghi, 31); // sar reghi,31 + a.mov(reglo, reghi); // mov reglo,reghi + a.sar(reghi, 31); // sar reghi,31 count -= 32; } } if (inst.flags() != 0 || count > 0) { - emit_shrd_r32_r32_imm(dst, reglo, reghi, count); // shrd reglo,reghi,count - if (saveflags) emit_pushf(dst); // pushf - emit_sar_r32_imm(dst, reghi, count); // sar reghi,count + a.shrd(reglo, reghi, count); // shrd reglo,reghi,count + if (saveflags) a.pushfd(); // pushf + a.sar(reghi, count); // sar reghi,count } } } else { - emit_link skip1, skip2; - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip1); // jz skip1 + Label skip1 = a.newLabel(); + Label skip2 = a.newLabel(); + emit_mov_r32_p32(a, ecx, param); // mov ecx,param + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip1); // jz skip1 if (inst.flags() != 0) { - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_sar_r32_imm(dst, reghi, 31); // sar reghi,31 - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip2); // jz skip - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_sar_r32_imm(dst, reghi, 31); // sar reghi,31 - track_resolve_link(dst, skip2); // skip2: + a.sub(ecx, 31); // sub ecx,31 + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.sar(reghi, 31); // sar reghi,31 + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip2); // jz skip + a.sub(ecx, 31); // sub ecx,31 + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.sar(reghi, 31); // sar reghi,31 + a.bind(skip2); // skip2: + reset_last_upper_lower_reg(); } else { - emit_mov_r32_r32(dst, reglo, reghi); // mov reglo,reghi - emit_sar_r32_imm(dst, reghi, 31); // sar reghi,31 + a.mov(reglo, reghi); // mov reglo,reghi + a.sar(reghi, 31); // sar reghi,31 } - track_resolve_link(dst, skip1); // skip1: - emit_shrd_r32_r32_cl(dst, reglo, reghi); // shrd reglo,reghi,cl - if (saveflags) emit_pushf(dst); // pushf - emit_sar_r32_cl(dst, reghi); // sar reghi,cl + a.bind(skip1); // skip1: + reset_last_upper_lower_reg(); + a.shrd(reglo, reghi, cl); // shrd reglo,reghi,cl + if (saveflags) a.pushfd(); // pushf + a.sar(reghi, cl); // sar reghi,cl } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2523,13 +1639,13 @@ void drcbe_x86::emit_sar_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_rol_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_rol_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { int count = param.immediate() & 63; - if (inst.flags() == 0 && count == 0) + if (!inst.flags() && count == 0) ;// skip else { @@ -2537,59 +1653,61 @@ void drcbe_x86::emit_rol_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co { if (inst.flags() != 0) { - emit_mov_r32_r32(dst, REG_ECX, reglo); // mov ecx,reglo - emit_shld_r32_r32_imm(dst, reglo, reghi, 31); // shld reglo,reghi,31 - emit_shld_r32_r32_imm(dst, reghi, REG_ECX, 31); // shld reghi,ecx,31 + a.mov(ecx, reglo); // mov ecx,reglo + a.shld(reglo, reghi, 31); // shld reglo,reghi,31 + a.shld(reghi, ecx, 31); // shld reghi,ecx,31 count -= 31; } else { - emit_xchg_r32_r32(dst, reghi, reglo); // xchg reghi,reglo + a.xchg(reghi, reglo); // xchg reghi,reglo count -= 32; } } if (inst.flags() != 0 || count > 0) { - emit_mov_r32_r32(dst, REG_ECX, reglo); // mov ecx,reglo - emit_shld_r32_r32_imm(dst, reglo, reghi, count); // shld reglo,reghi,count - if (saveflags) emit_pushf(dst); // pushf - emit_shld_r32_r32_imm(dst, reghi, REG_ECX, count); // shld reghi,ecx,count + a.mov(ecx, reglo); // mov ecx,reglo + a.shld(reglo, reghi, count); // shld reglo,reghi,count + if (saveflags) a.pushfd(); // pushf + a.shld(reghi, ecx, count); // shld reghi,ecx,count } } } else { - emit_link skip1, skip2; - int tempreg = REG_EBX; - emit_mov_m32_r32(dst, MBD(REG_ESP, -8), tempreg); // mov [esp-8],ebx - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip1); // jz skip1 + Label skip1 = a.newLabel(); + Label skip2 = a.newLabel(); + a.mov(ptr(esp, -8), ebx); // mov [esp-8],ebx + emit_mov_r32_p32(a, ecx, param); // mov ecx,param + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip1); // jz skip1 if (inst.flags() != 0) { - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_mov_r32_r32(dst, tempreg, reglo); // mov ebx,reglo - emit_shld_r32_r32_imm(dst, reglo, reghi, 31); // shld reglo,reghi,31 - emit_shld_r32_r32_imm(dst, reghi, tempreg, 31); // shld reghi,ebx,31 - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip2); // jz skip2 - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_mov_r32_r32(dst, tempreg, reglo); // mov ebx,reglo - emit_shld_r32_r32_imm(dst, reglo, reghi, 31); // shld reglo,reghi,31 - emit_shld_r32_r32_imm(dst, reghi, tempreg, 31); // shld reghi,ebx,31 - track_resolve_link(dst, skip2); // skip2: + a.sub(ecx, 31); // sub ecx,31 + a.mov(ebx, reglo); // mov ebx,reglo + a.shld(reglo, reghi, 31); // shld reglo,reghi,31 + a.shld(reghi, ebx, 31); // shld reghi,ebx,31 + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip2); // jz skip2 + a.sub(ecx, 31); // sub ecx,31 + a.mov(ebx, reglo); // mov ebx,reglo + a.shld(reglo, reghi, 31); // shld reglo,reghi,31 + a.shld(reghi, ebx, 31); // shld reghi,ebx,31 + a.bind(skip2); // skip2: + reset_last_upper_lower_reg(); } else - emit_xchg_r32_r32(dst, reghi, reglo); // xchg reghi,reglo - track_resolve_link(dst, skip1); // skip1: - emit_mov_r32_r32(dst, tempreg, reglo); // mov ebx,reglo - emit_shld_r32_r32_cl(dst, reglo, reghi); // shld reglo,reghi,cl - if (saveflags) emit_pushf(dst); // pushf - emit_shld_r32_r32_cl(dst, reghi, tempreg); // shld reghi,ebx,cl - emit_mov_r32_m32(dst, tempreg, MBD(REG_ESP, saveflags ? -4 : -8)); // mov ebx,[esp-8] + a.xchg(reghi, reglo); // xchg reghi,reglo + a.bind(skip1); // skip1: + reset_last_upper_lower_reg(); + a.mov(ebx, reglo); // mov ebx,reglo + a.shld(reglo, reghi, cl); // shld reglo,reghi,cl + if (saveflags) a.pushfd(); // pushf + a.shld(reghi, ebx, cl); // shld reghi,ebx,cl + a.mov(ebx, ptr(esp, saveflags ? -4 : -8)); // mov ebx,[esp-8] } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2598,13 +1716,13 @@ void drcbe_x86::emit_rol_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_ror_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_ror_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); if (param.is_immediate()) { int count = param.immediate() & 63; - if (inst.flags() == 0 && count == 0) + if (!inst.flags() && count == 0) ;// skip else { @@ -2612,59 +1730,61 @@ void drcbe_x86::emit_ror_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co { if (inst.flags() != 0) { - emit_mov_r32_r32(dst, REG_ECX, reglo); // mov ecx,reglo - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_shrd_r32_r32_imm(dst, reghi, REG_ECX, 31); // shrd reghi,ecx,31 + a.mov(ecx, reglo); // mov ecx,reglo + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.shrd(reghi, ecx, 31); // shrd reghi,ecx,31 count -= 31; } else { - emit_xchg_r32_r32(dst, reghi, reglo); // xchg reghi,reglo + a.xchg(reghi, reglo); // xchg reghi,reglo count -= 32; } } if (inst.flags() != 0 || count > 0) { - emit_mov_r32_r32(dst, REG_ECX, reglo); // mov ecx,reglo - emit_shrd_r32_r32_imm(dst, reglo, reghi, count); // shrd reglo,reghi,count - if (saveflags) emit_pushf(dst); // pushf - emit_shrd_r32_r32_imm(dst, reghi, REG_ECX, count); // shrd reghi,ecx,count + a.mov(ecx, reglo); // mov ecx,reglo + a.shrd(reglo, reghi, count); // shrd reglo,reghi,count + if (saveflags) a.pushfd(); // pushf + a.shrd(reghi, ecx, count); // shrd reghi,ecx,count } } } else { - emit_link skip1, skip2; - int tempreg = REG_EBX; - emit_mov_m32_r32(dst, MBD(REG_ESP, -8), tempreg); // mov [esp-8],ebx - emit_mov_r32_p32(dst, REG_ECX, param); // mov ecx,param - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip1); // jz skip1 + Label skip1 = a.newLabel(); + Label skip2 = a.newLabel(); + a.mov(ptr(esp, -8), ebx); // mov [esp-8],ebx + emit_mov_r32_p32(a, ecx, param); // mov ecx,param + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip1); // jz skip1 if (inst.flags() != 0) { - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_mov_r32_r32(dst, tempreg, reglo); // mov ebx,reglo - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_shrd_r32_r32_imm(dst, reghi, tempreg, 31); // shrd reghi,ebx,31 - emit_test_r32_imm(dst, REG_ECX, 0x20); // test ecx,0x20 - emit_jcc_short_link(dst, x86emit::COND_Z, skip2); // jz skip2 - emit_sub_r32_imm(dst, REG_ECX, 31); // sub ecx,31 - emit_mov_r32_r32(dst, tempreg, reglo); // mov ebx,reglo - emit_shrd_r32_r32_imm(dst, reglo, reghi, 31); // shrd reglo,reghi,31 - emit_shrd_r32_r32_imm(dst, reghi, tempreg, 31); // shrd reghi,ebx,31 - track_resolve_link(dst, skip2); // skip2: + a.sub(ecx, 31); // sub ecx,31 + a.mov(ebx, reglo); // mov ebx,reglo + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.shrd(reghi, ebx, 31); // shrd reghi,ebx,31 + a.test(ecx, 0x20); // test ecx,0x20 + a.short_().jz(skip2); // jz skip2 + a.sub(ecx, 31); // sub ecx,31 + a.mov(ebx, reglo); // mov ebx,reglo + a.shrd(reglo, reghi, 31); // shrd reglo,reghi,31 + a.shrd(reghi, ebx, 31); // shrd reghi,ebx,31 + a.bind(skip2); // skip2: + reset_last_upper_lower_reg(); } else - emit_xchg_r32_r32(dst, reghi, reglo); // xchg reghi,reglo - track_resolve_link(dst, skip1); // skip1: - emit_mov_r32_r32(dst, tempreg, reglo); // mov ebx,reglo - emit_shrd_r32_r32_cl(dst, reglo, reghi); // shrd reglo,reghi,cl - if (saveflags) emit_pushf(dst); // pushf - emit_shrd_r32_r32_cl(dst, reghi, tempreg); // shrd reghi,ebx,cl - emit_mov_r32_m32(dst, tempreg, MBD(REG_ESP, saveflags ? -4 : -8)); // mov ebx,[esp-8] + a.xchg(reghi, reglo); // xchg reghi,reglo + a.bind(skip1); // skip1: + reset_last_upper_lower_reg(); + a.mov(ebx, reglo); // mov ebx,reglo + a.shrd(reglo, reghi, cl); // shrd reglo,reghi,cl + if (saveflags) a.pushfd(); // pushf + a.shrd(reghi, ebx, cl); // shrd reghi,ebx,cl + a.mov(ebx, ptr(esp, saveflags ? -4 : -8)); // mov ebx,[esp-8] } if (saveflags) - emit_combine_z_flags(dst); + emit_combine_z_flags(a); } @@ -2673,39 +1793,43 @@ void drcbe_x86::emit_ror_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_rcl_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_rcl_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = ((inst.flags() & FLAG_Z) != 0); - emit_link skipall, skiploop; - x86code *loop; + Label loop = a.newLabel(); + Label skipall = a.newLabel(); + Label skiploop = a.newLabel(); - emit_mov_r32_p32_keepflags(dst, REG_ECX, param); // mov ecx,param + emit_mov_r32_p32_keepflags(a, ecx, param); // mov ecx,param if (!saveflags) { - loop = dst; // loop: - emit_jecxz_link(dst, skipall); // jecxz skipall - emit_lea_r32_m32(dst, REG_ECX, MBD(REG_ECX, -1)); // lea ecx,[ecx-1] - emit_rcl_r32_imm(dst, reglo, 1); // rcl reglo,1 - emit_rcl_r32_imm(dst, reghi, 1); // rcl reghi,1 - emit_jmp(dst, loop); // jmp loop - track_resolve_link(dst, skipall); // skipall: + a.bind(loop); // loop: + a.jecxz(skipall); // jecxz skipall + a.lea(ecx, ptr(ecx, -1)); // lea ecx,[ecx-1] + a.rcl(reglo, 1); // rcl reglo,1 + a.rcl(reghi, 1); // rcl reghi,1 + a.jmp(loop); // jmp loop + a.bind(skipall); // skipall: + reset_last_upper_lower_reg(); } else { - emit_jecxz_link(dst, skipall); // jecxz skipall - emit_lea_r32_m32(dst, REG_ECX, MBD(REG_ECX, -1)); // lea ecx,[ecx-1] - loop = dst; // loop: - emit_jecxz_link(dst, skiploop); // jecxz skiploop - emit_lea_r32_m32(dst, REG_ECX, MBD(REG_ECX, -1)); // lea ecx,[ecx-1] - emit_rcl_r32_imm(dst, reglo, 1); // rcl reglo,1 - emit_rcl_r32_imm(dst, reghi, 1); // rcl reghi,1 - emit_jmp(dst, loop); // jmp loop - track_resolve_link(dst, skiploop); // skiploop: - emit_rcl_r32_imm(dst, reglo, 1); // rcl reglo,1 - emit_pushf(dst); // pushf - emit_rcl_r32_imm(dst, reghi, 1); // rcl reghi,1 - track_resolve_link(dst, skipall); // skipall: - emit_combine_z_flags(dst); + a.jecxz(skipall); // jecxz skipall + a.lea(ecx, ptr(ecx, -1)); // lea ecx,[ecx-1] + a.bind(loop); // loop: + a.jecxz(skiploop); // jecxz skiploop + a.lea(ecx, ptr(ecx, -1)); // lea ecx,[ecx-1] + a.rcl(reglo, 1); // rcl reglo,1 + a.rcl(reghi, 1); // rcl reghi,1 + a.jmp(loop); // jmp loop + a.bind(skiploop); // skiploop: + reset_last_upper_lower_reg(); + a.rcl(reglo, 1); // rcl reglo,1 + a.pushfd(); // pushf + a.rcl(reghi, 1); // rcl reghi,1 + a.bind(skipall); // skipall: + reset_last_upper_lower_reg(); + emit_combine_z_flags(a); } } @@ -2715,43 +1839,95 @@ void drcbe_x86::emit_rcl_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // pair of registers from a 64-bit parameter //------------------------------------------------- -void drcbe_x86::emit_rcr_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const instruction &inst) +void drcbe_x86::emit_rcr_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const instruction &inst) { int saveflags = (inst.flags() != 0); - emit_link skipall, skiploop; - x86code *loop; + Label loop = a.newLabel(); + Label skipall = a.newLabel(); + Label skiploop = a.newLabel(); - emit_mov_r32_p32_keepflags(dst, REG_ECX, param); // mov ecx,param + emit_mov_r32_p32_keepflags(a, ecx, param); // mov ecx,param if (!saveflags) { - loop = dst; // loop: - emit_jecxz_link(dst, skipall); // jecxz skipall - emit_lea_r32_m32(dst, REG_ECX, MBD(REG_ECX, -1)); // lea ecx,[ecx-1] - emit_rcr_r32_imm(dst, reghi, 1); // rcr reghi,1 - emit_rcr_r32_imm(dst, reglo, 1); // rcr reglo,1 - emit_jmp(dst, loop); // jmp loop - track_resolve_link(dst, skipall); // skipall: + a.bind(loop); // loop: + a.jecxz(skipall); // jecxz skipall + a.lea(ecx, ptr(ecx, -1)); // lea ecx,[ecx-1] + a.rcr(reghi, 1); // rcr reghi,1 + a.rcr(reglo, 1); // rcr reglo,1 + a.jmp(loop); // jmp loop + a.bind(skipall); // skipall: + reset_last_upper_lower_reg(); } else { - emit_jecxz_link(dst, skipall); // jecxz skipall - emit_lea_r32_m32(dst, REG_ECX, MBD(REG_ECX, -1)); // lea ecx,[ecx-1] - loop = dst; // loop: - emit_jecxz_link(dst, skiploop); // jecxz skiploop - emit_lea_r32_m32(dst, REG_ECX, MBD(REG_ECX, -1)); // lea ecx,[ecx-1] - emit_rcr_r32_imm(dst, reghi, 1); // rcr reghi,1 - emit_rcr_r32_imm(dst, reglo, 1); // rcr reglo,1 - emit_jmp(dst, loop); // jmp loop - track_resolve_link(dst, skiploop); // skiploop: - emit_rcr_r32_imm(dst, reghi, 1); // rcr reghi,1 - emit_pushf(dst); // pushf - emit_rcr_r32_imm(dst, reglo, 1); // rcr reglo,1 - track_resolve_link(dst, skipall); // skipall: - emit_combine_z_shl_flags(dst); + a.jecxz(skipall); // jecxz skipall + a.lea(ecx, ptr(ecx, -1)); // lea ecx,[ecx-1] + a.bind(loop); // loop: + a.jecxz(skiploop); // jecxz skiploop + a.lea(ecx, ptr(ecx, -1)); // lea ecx,[ecx-1] + a.rcr(reghi, 1); // rcr reghi,1 + a.rcr(reglo, 1); // rcr reglo,1 + a.jmp(loop); // jmp loop + a.bind(skiploop); // skiploop: + reset_last_upper_lower_reg(); + a.rcr(reghi, 1); // rcr reghi,1 + a.pushfd(); // pushf + a.rcr(reglo, 1); // rcr reglo,1 + a.bind(skipall); // skipall: + reset_last_upper_lower_reg(); + emit_combine_z_shl_flags(a); + } +} + + +void drcbe_x86::alu_op_param(Assembler &a, Inst::Id const opcode_lo, Inst::Id const opcode_hi, Gp const &lo, Gp const &hi, be_parameter const ¶m, bool saveflags) +{ + if (param.is_memory()) + { + a.emit(opcode_lo, lo, MABS(param.memory(0))); // opl reglo,[param] + if (saveflags) a.pushfd(); // pushf + a.emit(opcode_hi, hi, MABS(param.memory(4))); // oph reghi,[param] + } + else if (param.is_immediate()) + { + a.emit(opcode_lo, lo, param.immediate()); // opl reglo,param + if (saveflags) a.pushfd(); // pushf + a.emit(opcode_hi, hi, param.immediate() >> 32); // oph reghi,param >> 32 + } + else if (param.is_int_register()) + { + a.emit(opcode_lo, lo, Gpd(param.ireg())); // opl reglo,param + if (saveflags) a.pushfd(); // pushf + a.emit(opcode_hi, hi, MABS(m_reghi[param.ireg()])); // oph reghi,reghi[param] } + + if (saveflags) + emit_combine_z_flags(a); } +void drcbe_x86::alu_op_param(Assembler &a, Inst::Id const opcode_lo, Inst::Id const opcode_hi, Mem const &lo, Mem const &hi, be_parameter const ¶m, bool saveflags) +{ + if (param.is_immediate()) + { + a.emit(opcode_lo, lo, param.immediate()); // opl [dest],param + if (saveflags) a.pushfd(); // pushf + a.emit(opcode_hi, hi, param.immediate() >> 32); // oph [dest+4],param >> 32 + } + else + { + Gp const reg = (param.is_int_register()) ? Gpd(param.ireg()) : eax; + + emit_mov_r64_p64(a, reg, edx, param); // mov edx:reglo,param + a.emit(opcode_lo, lo, reg); // opl [dest],reglo + if (saveflags) a.pushfd(); // pushf + a.emit(opcode_hi, hi, edx); // oph [dest+4],edx + } + + if (saveflags) + emit_combine_z_flags(a); +} + //************************************************************************** // EMITTERS FOR FLOATING POINT @@ -2762,14 +1938,11 @@ void drcbe_x86::emit_rcr_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, co // onto the stack //------------------------------------------------- -void drcbe_x86::emit_fld_p(x86code *&dst, int size, const be_parameter ¶m) +void drcbe_x86::emit_fld_p(Assembler &a, int size, be_parameter const ¶m) { assert(param.is_memory()); assert(size == 4 || size == 8); - if (size == 4) - emit_fld_m32(dst, MABS(param.memory())); - else if (size == 8) - emit_fld_m64(dst, MABS(param.memory())); + a.fld(ptr(u64(param.memory()), size)); } @@ -2778,85 +1951,12 @@ void drcbe_x86::emit_fld_p(x86code *&dst, int size, const be_parameter ¶m) // from the stack and pop it //------------------------------------------------- -void drcbe_x86::emit_fstp_p(x86code *&dst, int size, const be_parameter ¶m) +void drcbe_x86::emit_fstp_p(Assembler &a, int size, be_parameter const ¶m) { assert(param.is_memory()); assert(size == 4 || size == 8); - if (size == 4) - emit_fstp_m32(dst, MABS(param.memory())); - else if (size == 8) - emit_fstp_m64(dst, MABS(param.memory())); -} - - - -//************************************************************************** -// OUT-OF-BAND CODE FIXUP CALLBACKS -//************************************************************************** - -//------------------------------------------------- -// fixup_label - callback to fixup forward- -// referenced labels -//------------------------------------------------- - -void drcbe_x86::fixup_label(void *parameter, drccodeptr labelcodeptr) -{ - drccodeptr src = (drccodeptr)parameter; - - // find the end of the instruction - if (src[0] == 0xe3) - { - src += 1 + 1; - src[-1] = labelcodeptr - src; - } - else if (src[0] == 0xe9) - { - src += 1 + 4; - ((uint32_t *)src)[-1] = labelcodeptr - src; - } - else if (src[0] == 0x0f && (src[1] & 0xf0) == 0x80) - { - src += 2 + 4; - ((uint32_t *)src)[-1] = labelcodeptr - src; - } - else - fatalerror("fixup_label called with invalid jmp source!\n"); -} - - -//------------------------------------------------- -// fixup_exception - callback to perform cleanup -// and jump to an exception handler -//------------------------------------------------- - -void drcbe_x86::fixup_exception(drccodeptr *codeptr, void *param1, void *param2) -{ - drccodeptr src = (drccodeptr)param1; - const instruction &inst = *(const instruction *)param2; - // normalize parameters - const parameter &handp = inst.param(0); - assert(handp.is_code_handle()); - be_parameter exp(*this, inst.param(1), PTYPE_MRI); - - // look up the handle target - drccodeptr *targetptr = handp.handle().codeptr_addr(); - - // first fixup the jump to get us here - drccodeptr dst = *codeptr; - ((uint32_t *)src)[-1] = dst - src; - - // then store the exception parameter - emit_mov_m32_p32(dst, MABS(&m_state.exp), exp); // mov [exp],exp - - // push the original return address on the stack - emit_push_imm(dst, (uintptr_t)src); // push - if (*targetptr != nullptr) - emit_jmp(dst, *targetptr); // jmp *targetptr - else - emit_jmp_m32(dst, MABS(targetptr)); // jmp [targetptr] - - *codeptr = dst; + a.fstp(ptr(u64(param.memory()), size)); } @@ -2885,7 +1985,7 @@ void drcbe_x86::debug_log_hashjmp(int mode, offs_t pc) // op_handle - process a HANDLE opcode //------------------------------------------------- -void drcbe_x86::op_handle(x86code *&dst, const instruction &inst) +void drcbe_x86::op_handle(Assembler &a, const instruction &inst) { assert_no_condition(inst); assert_no_flags(inst); @@ -2894,16 +1994,21 @@ void drcbe_x86::op_handle(x86code *&dst, const instruction &inst) reset_last_upper_lower_reg(); + // make a label for documentation + Label handle = a.newNamedLabel(inst.param(0).handle().string()); + a.bind(handle); + // emit a jump around the stack adjust in case code falls through here - emit_link skip; - emit_jmp_short_link(dst, skip); // jmp skip + Label skip = a.newLabel(); + a.short_().jmp(skip); // jmp skip // register the current pointer for the handle - inst.param(0).handle().set_codeptr(dst); + inst.param(0).handle().set_codeptr(drccodeptr(a.code()->baseAddress() + a.offset())); // by default, the handle points to prolog code that moves the stack pointer - emit_lea_r32_m32(dst, REG_ESP, MBD(REG_ESP, -28)); // lea rsp,[rsp-28] - track_resolve_link(dst, skip); // skip: + a.lea(esp, ptr(esp, -28)); // lea rsp,[rsp-28] + a.bind(skip); // skip: + reset_last_upper_lower_reg(); } @@ -2911,7 +2016,7 @@ void drcbe_x86::op_handle(x86code *&dst, const instruction &inst) // op_hash - process a HASH opcode //------------------------------------------------- -void drcbe_x86::op_hash(x86code *&dst, const instruction &inst) +void drcbe_x86::op_hash(Assembler &a, const instruction &inst) { assert_no_condition(inst); assert_no_flags(inst); @@ -2920,7 +2025,7 @@ void drcbe_x86::op_hash(x86code *&dst, const instruction &inst) assert(inst.param(1).is_immediate()); // register the current pointer for the mode/PC - m_hash.set_codeptr(inst.param(0).immediate(), inst.param(1).immediate(), dst); + m_hash.set_codeptr(inst.param(0).immediate(), inst.param(1).immediate(), drccodeptr(a.code()->baseAddress() + a.offset())); reset_last_upper_lower_reg(); } @@ -2929,15 +2034,21 @@ void drcbe_x86::op_hash(x86code *&dst, const instruction &inst) // op_label - process a LABEL opcode //------------------------------------------------- -void drcbe_x86::op_label(x86code *&dst, const instruction &inst) +void drcbe_x86::op_label(Assembler &a, const instruction &inst) { assert_no_condition(inst); assert_no_flags(inst); assert(inst.numparams() == 1); assert(inst.param(0).is_code_label()); + std::string labelName = util::string_format("PC$%x", inst.param(0).label()); + Label label = a.labelByName(labelName.c_str()); + if (!label.isValid()) + label = a.newNamedLabel(labelName.c_str()); + // register the current pointer for the label - m_labels.set_codeptr(inst.param(0).label(), dst); + a.bind(label); + reset_last_upper_lower_reg(); } @@ -2946,7 +2057,7 @@ void drcbe_x86::op_label(x86code *&dst, const instruction &inst) // op_comment - process a COMMENT opcode //------------------------------------------------- -void drcbe_x86::op_comment(x86code *&dst, const instruction &inst) +void drcbe_x86::op_comment(Assembler &a, const instruction &inst) { assert_no_condition(inst); assert_no_flags(inst); @@ -2961,7 +2072,7 @@ void drcbe_x86::op_comment(x86code *&dst, const instruction &inst) // op_mapvar - process a MAPVAR opcode //------------------------------------------------- -void drcbe_x86::op_mapvar(x86code *&dst, const instruction &inst) +void drcbe_x86::op_mapvar(Assembler &a, const instruction &inst) { assert_no_condition(inst); assert_no_flags(inst); @@ -2970,7 +2081,7 @@ void drcbe_x86::op_mapvar(x86code *&dst, const instruction &inst) assert(inst.param(1).is_immediate()); // set the value of the specified mapvar - m_map.set_value(dst, inst.param(0).mapvar(), inst.param(1).immediate()); + m_map.set_value(drccodeptr(a.code()->baseAddress() + a.offset()), inst.param(0).mapvar(), inst.param(1).immediate()); } @@ -2983,7 +2094,7 @@ void drcbe_x86::op_mapvar(x86code *&dst, const instruction &inst) // op_nop - process a NOP opcode //------------------------------------------------- -void drcbe_x86::op_nop(x86code *&dst, const instruction &inst) +void drcbe_x86::op_nop(Assembler &a, const instruction &inst) { // nothing } @@ -2993,7 +2104,7 @@ void drcbe_x86::op_nop(x86code *&dst, const instruction &inst) // op_debug - process a DEBUG opcode //------------------------------------------------- -void drcbe_x86::op_debug(x86code *&dst, const instruction &inst) +void drcbe_x86::op_debug(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3006,19 +2117,20 @@ void drcbe_x86::op_debug(x86code *&dst, const instruction &inst) if ((m_device.machine().debug_flags & DEBUG_FLAG_ENABLED) != 0) { // normalize parameters - be_parameter pcp(*this, inst.param(0), PTYPE_MRI); + be_parameter const pcp(*this, inst.param(0), PTYPE_MRI); // test and branch - emit_test_m32_imm(dst, MABS(&m_device.machine().debug_flags), DEBUG_FLAG_CALL_HOOK); // test [debug_flags],DEBUG_FLAG_CALL_HOOK - emit_link skip = { nullptr }; - emit_jcc_short_link(dst, x86emit::COND_Z, skip); // jz skip + a.test(MABS(&m_device.machine().debug_flags, 4), DEBUG_FLAG_CALL_HOOK); // test [debug_flags],DEBUG_FLAG_CALL_HOOK + Label skip = a.newLabel(); + a.short_().jz(skip); // jz skip // push the parameter - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), pcp); // mov [esp+4],pcp - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_device.debug()); // mov [esp],device.debug - emit_call(dst, (x86code *)debugger_inst_hook); // call debugger_inst_hook + emit_mov_m32_p32(a, dword_ptr(esp, 4), pcp); // mov [esp+4],pcp + a.mov(dword_ptr(esp, 0), imm(m_device.debug())); // mov [esp],device.debug + a.call(imm(debugger_inst_hook)); // call debugger_inst_hook - track_resolve_link(dst, skip); // skip: + a.bind(skip); // skip: + reset_last_upper_lower_reg(); } } @@ -3027,7 +2139,7 @@ void drcbe_x86::op_debug(x86code *&dst, const instruction &inst) // op_exit - process an EXIT opcode //------------------------------------------------- -void drcbe_x86::op_exit(x86code *&dst, const instruction &inst) +void drcbe_x86::op_exit(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3038,11 +2150,11 @@ void drcbe_x86::op_exit(x86code *&dst, const instruction &inst) be_parameter retp(*this, inst.param(0), PTYPE_MRI); // load the parameter into EAX - emit_mov_r32_p32(dst, REG_EAX, retp); // mov eax,retp + emit_mov_r32_p32(a, eax, retp); // mov eax,retp if (inst.condition() == uml::COND_ALWAYS) - emit_jmp(dst, m_exit); // jmp exit + a.jmp(imm(m_exit)); // jmp exit else - emit_jcc(dst, X86_CONDITION(inst.condition()), m_exit); // jcc exit + a.j(X86_CONDITION(inst.condition()), imm(m_exit)); // jcc exit } @@ -3050,7 +2162,7 @@ void drcbe_x86::op_exit(x86code *&dst, const instruction &inst) // op_hashjmp - process a HASHJMP opcode //------------------------------------------------- -void drcbe_x86::op_hashjmp(x86code *&dst, const instruction &inst) +void drcbe_x86::op_hashjmp(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3060,18 +2172,18 @@ void drcbe_x86::op_hashjmp(x86code *&dst, const instruction &inst) // normalize parameters be_parameter modep(*this, inst.param(0), PTYPE_MRI); be_parameter pcp(*this, inst.param(1), PTYPE_MRI); - const parameter &exp = inst.param(2); + parameter const &exp = inst.param(2); assert(exp.is_code_handle()); if (LOG_HASHJMPS) { - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), pcp); - emit_mov_m32_p32(dst, MBD(REG_ESP, 0), modep); - emit_call(dst, (x86code *)debug_log_hashjmp); + emit_mov_m32_p32(a, dword_ptr(esp, 4), pcp); + emit_mov_m32_p32(a, dword_ptr(esp, 0), modep); + a.call(imm(debug_log_hashjmp)); } // load the stack base one word early so we end up at the right spot after our call below - emit_mov_r32_m32(dst, REG_ESP, MABS(&m_hashstacksave)); // mov esp,[hashstacksave] + a.mov(esp, MABS(&m_hashstacksave)); // mov esp,[hashstacksave] // fixed mode cases if (modep.is_immediate() && m_hash.is_mode_populated(modep.immediate())) @@ -3081,53 +2193,53 @@ void drcbe_x86::op_hashjmp(x86code *&dst, const instruction &inst) { uint32_t l1val = (pcp.immediate() >> m_hash.l1shift()) & m_hash.l1mask(); uint32_t l2val = (pcp.immediate() >> m_hash.l2shift()) & m_hash.l2mask(); - emit_call_m32(dst, MABS(&m_hash.base()[modep.immediate()][l1val][l2val])); // call hash[modep][l1val][l2val] + a.call(MABS(&m_hash.base()[modep.immediate()][l1val][l2val])); // call hash[modep][l1val][l2val] } // a fixed mode but variable PC else { - emit_mov_r32_p32(dst, REG_EAX, pcp); // mov eax,pcp - emit_mov_r32_r32(dst, REG_EDX, REG_EAX); // mov edx,eax - emit_shr_r32_imm(dst, REG_EDX, m_hash.l1shift()); // shr edx,l1shift - emit_and_r32_imm(dst, REG_EAX, m_hash.l2mask() << m_hash.l2shift());// and eax,l2mask << l2shift - emit_mov_r32_m32(dst, REG_EDX, MABSI(&m_hash.base()[modep.immediate()][0], REG_EDX, 4)); + emit_mov_r32_p32(a, eax, pcp); // mov eax,pcp + a.mov(edx, eax); // mov edx,eax + a.shr(edx, m_hash.l1shift()); // shr edx,l1shift + a.and_(eax, m_hash.l2mask() << m_hash.l2shift()); // and eax,l2mask << l2shift + a.mov(edx, ptr(u64(&m_hash.base()[modep.immediate()][0]), edx, 2)); // mov edx,hash[modep+edx*4] - emit_call_m32(dst, MBISD(REG_EDX, REG_EAX, 4 >> m_hash.l2shift(), 0));// call [edx+eax*shift] + a.call(ptr(edx, eax, 2 - m_hash.l2shift())); // call [edx+eax*shift] } } else { // variable mode - int modereg = modep.select_register(REG_ECX); - emit_mov_r32_p32(dst, modereg, modep); // mov modereg,modep - emit_mov_r32_m32(dst, REG_ECX, MABSI(m_hash.base(), modereg, 4)); // mov ecx,hash[modereg*4] + Gp const modereg = modep.select_register(ecx); + emit_mov_r32_p32(a, modereg, modep); // mov modereg,modep + a.mov(ecx, ptr(u64(m_hash.base()), modereg, 2)); // mov ecx,hash[modereg*4] // fixed PC if (pcp.is_immediate()) { uint32_t l1val = (pcp.immediate() >> m_hash.l1shift()) & m_hash.l1mask(); uint32_t l2val = (pcp.immediate() >> m_hash.l2shift()) & m_hash.l2mask(); - emit_mov_r32_m32(dst, REG_EDX, MBD(REG_ECX, l1val*4)); // mov edx,[ecx+l1val*4] - emit_call_m32(dst, MBD(REG_EDX, l2val*4)); // call [l2val*4] + a.mov(edx, ptr(ecx, l1val*4)); // mov edx,[ecx+l1val*4] + a.call(ptr(edx, l2val*4)); // call [l2val*4] } // variable PC else { - emit_mov_r32_p32(dst, REG_EAX, pcp); // mov eax,pcp - emit_mov_r32_r32(dst, REG_EDX, REG_EAX); // mov edx,eax - emit_shr_r32_imm(dst, REG_EDX, m_hash.l1shift()); // shr edx,l1shift - emit_mov_r32_m32(dst, REG_EDX, MBISD(REG_ECX, REG_EDX, 4, 0)); // mov edx,[ecx+edx*4] - emit_and_r32_imm(dst, REG_EAX, m_hash.l2mask() << m_hash.l2shift());// and eax,l2mask << l2shift - emit_call_m32(dst, MBISD(REG_EDX, REG_EAX, 4 >> m_hash.l2shift(), 0));// call [edx+eax*shift] + emit_mov_r32_p32(a, eax, pcp); // mov eax,pcp + a.mov(edx, eax); // mov edx,eax + a.shr(edx, m_hash.l1shift()); // shr edx,l1shift + a.mov(edx, ptr(ecx, edx, 2)); // mov edx,[ecx+edx*4] + a.and_(eax, m_hash.l2mask() << m_hash.l2shift()); // and eax,l2mask << l2shift + a.call(ptr(edx, eax, 2 - m_hash.l2shift())); // call [edx+eax*shift] } } // in all cases, if there is no code, we return here to generate the exception - emit_mov_m32_p32(dst, MABS(&m_state.exp), pcp); // mov [exp],param - emit_sub_r32_imm(dst, REG_ESP, 4); // sub esp,4 - emit_call_m32(dst, MABS(exp.handle().codeptr_addr())); // call [exp] + emit_mov_m32_p32(a, MABS(&m_state.exp, 4), pcp); // mov [exp],param + a.sub(esp, 4); // sub esp,4 + a.call(MABS(exp.handle().codeptr_addr())); // call [exp] } @@ -3135,7 +2247,7 @@ void drcbe_x86::op_hashjmp(x86code *&dst, const instruction &inst) // op_jmp - process a JMP opcode //------------------------------------------------- -void drcbe_x86::op_jmp(x86code *&dst, const instruction &inst) +void drcbe_x86::op_jmp(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3143,15 +2255,18 @@ void drcbe_x86::op_jmp(x86code *&dst, const instruction &inst) assert_no_flags(inst); // normalize parameters - const parameter &labelp = inst.param(0); + parameter const &labelp = inst.param(0); assert(labelp.is_code_label()); - // look up the jump target and jump there - x86code *jmptarget = (x86code *)m_labels.get_codeptr(labelp.label(), m_fixup_label, dst); + std::string labelName = util::string_format("PC$%x", labelp.label()); + Label jmptarget = a.labelByName(labelName.c_str()); + if (!jmptarget.isValid()) + jmptarget = a.newNamedLabel(labelName.c_str()); + if (inst.condition() == uml::COND_ALWAYS) - emit_jmp(dst, jmptarget); // jmp target + a.jmp(jmptarget); // jmp target else - emit_jcc(dst, X86_CONDITION(inst.condition()), jmptarget); // jcc target + a.j(X86_CONDITION(inst.condition()), jmptarget); // jcc target } @@ -3159,7 +2274,7 @@ void drcbe_x86::op_jmp(x86code *&dst, const instruction &inst) // op_exh - process an EXH opcode //------------------------------------------------- -void drcbe_x86::op_exh(x86code *&dst, const instruction &inst) +void drcbe_x86::op_exh(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3167,29 +2282,24 @@ void drcbe_x86::op_exh(x86code *&dst, const instruction &inst) assert_no_flags(inst); // normalize parameters - const parameter &handp = inst.param(0); + parameter const &handp = inst.param(0); assert(handp.is_code_handle()); be_parameter exp(*this, inst.param(1), PTYPE_MRI); // look up the handle target drccodeptr *targetptr = handp.handle().codeptr_addr(); - // perform the exception processing inline if unconditional - if (inst.condition() == uml::COND_ALWAYS) - { - emit_mov_m32_p32(dst, MABS(&m_state.exp), exp); // mov [exp],exp - if (*targetptr != nullptr) - emit_call(dst, *targetptr); // call *targetptr - else - emit_call_m32(dst, MABS(targetptr)); // call [targetptr] - } - - // otherwise, jump to an out-of-band handler + // perform the exception processing + Label no_exception = a.newLabel(); + if (inst.condition() != uml::COND_ALWAYS) + a.short_().j(X86_NOT_CONDITION(inst.condition()), no_exception); // jcc no_exception + emit_mov_m32_p32(a, MABS(&m_state.exp, 4), exp); // mov [exp],exp + if (*targetptr != nullptr) + a.call(imm(*targetptr)); // call *targetptr else - { - emit_jcc(dst, X86_CONDITION(inst.condition()), nullptr); // jcc exception - m_cache.request_oob_codegen(m_fixup_exception, dst, &const_cast(inst)); - } + a.call(MABS(targetptr)); // call [targetptr] + if (inst.condition() != uml::COND_ALWAYS) + a.bind(no_exception); } @@ -3197,7 +2307,7 @@ void drcbe_x86::op_exh(x86code *&dst, const instruction &inst) // op_callh - process a CALLH opcode //------------------------------------------------- -void drcbe_x86::op_callh(x86code *&dst, const instruction &inst) +void drcbe_x86::op_callh(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3205,26 +2315,29 @@ void drcbe_x86::op_callh(x86code *&dst, const instruction &inst) assert_no_flags(inst); // normalize parameters - const parameter &handp = inst.param(0); + parameter const &handp = inst.param(0); assert(handp.is_code_handle()); // look up the handle target drccodeptr *targetptr = handp.handle().codeptr_addr(); // skip if conditional - emit_link skip = { nullptr }; + Label skip = a.newLabel(); if (inst.condition() != uml::COND_ALWAYS) - emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip + a.short_().j(X86_NOT_CONDITION(inst.condition()), skip); // jcc skip // jump through the handle; directly if a normal jump if (*targetptr != nullptr) - emit_call(dst, *targetptr); // call *targetptr + a.call(imm(*targetptr)); // call *targetptr else - emit_call_m32(dst, MABS(targetptr)); // call [targetptr] + a.call(MABS(targetptr)); // call [targetptr] // resolve the conditional link if (inst.condition() != uml::COND_ALWAYS) - track_resolve_link(dst, skip); // skip: + { + a.bind(skip); // skip: + reset_last_upper_lower_reg(); + } } @@ -3232,7 +2345,7 @@ void drcbe_x86::op_callh(x86code *&dst, const instruction &inst) // op_ret - process a RET opcode //------------------------------------------------- -void drcbe_x86::op_ret(x86code *&dst, const instruction &inst) +void drcbe_x86::op_ret(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3241,17 +2354,20 @@ void drcbe_x86::op_ret(x86code *&dst, const instruction &inst) assert(inst.numparams() == 0); // skip if conditional - emit_link skip = { nullptr }; + Label skip = a.newLabel(); if (inst.condition() != uml::COND_ALWAYS) - emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip + a.j(X86_NOT_CONDITION(inst.condition()), skip); // jcc skip // return - emit_lea_r32_m32(dst, REG_ESP, MBD(REG_ESP, 28)); // lea rsp,[rsp+28] - emit_ret(dst); // ret + a.lea(esp, ptr(esp, 28)); // lea rsp,[rsp+28] + a.ret(); // ret // resolve the conditional link if (inst.condition() != uml::COND_ALWAYS) - track_resolve_link(dst, skip); // skip: + { + a.bind(skip); // skip: + reset_last_upper_lower_reg(); + } } @@ -3259,7 +2375,7 @@ void drcbe_x86::op_ret(x86code *&dst, const instruction &inst) // op_callc - process a CALLC opcode //------------------------------------------------- -void drcbe_x86::op_callc(x86code *&dst, const instruction &inst) +void drcbe_x86::op_callc(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3267,22 +2383,25 @@ void drcbe_x86::op_callc(x86code *&dst, const instruction &inst) assert_no_flags(inst); // normalize parameters - const parameter &funcp = inst.param(0); + parameter const &funcp = inst.param(0); assert(funcp.is_c_function()); be_parameter paramp(*this, inst.param(1), PTYPE_M); // skip if conditional - emit_link skip = { nullptr }; + Label skip = a.newLabel(); if (inst.condition() != uml::COND_ALWAYS) - emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip + a.j(X86_NOT_CONDITION(inst.condition()), skip); // jcc skip // perform the call - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)paramp.memory()); // mov [esp],paramp - emit_call(dst, (x86code *)(uintptr_t)funcp.cfunc()); // call funcp + a.mov(dword_ptr(esp, 0), imm(paramp.memory())); // mov [esp],paramp + a.call(imm(funcp.cfunc())); // call funcp // resolve the conditional link if (inst.condition() != uml::COND_ALWAYS) - track_resolve_link(dst, skip); // skip: + { + a.bind(skip); // skip: + reset_last_upper_lower_reg(); + } } @@ -3290,7 +2409,7 @@ void drcbe_x86::op_callc(x86code *&dst, const instruction &inst) // op_recover - process a RECOVER opcode //------------------------------------------------- -void drcbe_x86::op_recover(x86code *&dst, const instruction &inst) +void drcbe_x86::op_recover(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3301,14 +2420,14 @@ void drcbe_x86::op_recover(x86code *&dst, const instruction &inst) be_parameter dstp(*this, inst.param(0), PTYPE_MR); // call the recovery code - emit_mov_r32_m32(dst, REG_EAX, MABS(&m_stacksave)); // mov eax,stacksave - emit_mov_r32_m32(dst, REG_EAX, MBD(REG_EAX, -4)); // mov eax,[eax-4] - emit_sub_r32_imm(dst, REG_EAX, 1); // sub eax,1 - emit_mov_m32_imm(dst, MBD(REG_ESP, 8), inst.param(1).mapvar()); // mov [esp+8],param1 - emit_mov_m32_r32(dst, MBD(REG_ESP, 4), REG_EAX); // mov [esp+4],eax - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_map); // mov [esp],m_map - emit_call(dst, (x86code *)&drc_map_variables::static_get_value); // call drcmap_get_value - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax + a.mov(eax, MABS(&m_stacksave)); // mov eax,stacksave + a.mov(eax, ptr(eax, -4)); // mov eax,[eax-4] + a.sub(eax, 1); // sub eax,1 + a.mov(dword_ptr(esp, 8), inst.param(1).mapvar()); // mov [esp+8],param1 + a.mov(ptr(esp, 4), eax); // mov [esp+4],eax + a.mov(dword_ptr(esp, 0), imm(&m_map)); // mov [esp],m_map + a.call(imm(&drc_map_variables::static_get_value)); // call drcmap_get_value + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax } @@ -3321,7 +2440,7 @@ void drcbe_x86::op_recover(x86code *&dst, const instruction &inst) // op_setfmod - process a SETFMOD opcode //------------------------------------------------- -void drcbe_x86::op_setfmod(x86code *&dst, const instruction &inst) +void drcbe_x86::op_setfmod(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3335,17 +2454,17 @@ void drcbe_x86::op_setfmod(x86code *&dst, const instruction &inst) if (srcp.is_immediate()) { int value = srcp.immediate() & 3; - emit_mov_m8_imm(dst, MABS(&m_state.fmod), value); // mov [fmod],srcp - emit_fldcw_m16(dst, MABS(&fp_control[value])); // fldcw fp_control[srcp] + a.mov(MABS(&m_state.fmod, 1), value); // mov [fmod],srcp + a.fldcw(MABS(&fp_control[value], 2)); // fldcw fp_control[srcp] } // register/memory case else { - emit_mov_r32_p32(dst, REG_EAX, srcp); // mov eax,srcp - emit_and_r32_imm(dst, REG_EAX, 3); // and eax,3 - emit_mov_m8_r8(dst, MABS(&m_state.fmod), REG_AL); // mov [fmod],al - emit_fldcw_m16(dst, MABSI(&fp_control[0], REG_EAX, 2)); // fldcw fp_control[eax] + emit_mov_r32_p32(a, eax, srcp); // mov eax,srcp + a.and_(eax, 3); // and eax,3 + a.mov(MABS(&m_state.fmod), al); // mov [fmod],al + a.fldcw(ptr(u64(&fp_control[0]), eax, 1, 2)); // fldcw fp_control[eax] } } @@ -3354,7 +2473,7 @@ void drcbe_x86::op_setfmod(x86code *&dst, const instruction &inst) // op_getfmod - process a GETFMOD opcode //------------------------------------------------- -void drcbe_x86::op_getfmod(x86code *&dst, const instruction &inst) +void drcbe_x86::op_getfmod(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3366,11 +2485,11 @@ void drcbe_x86::op_getfmod(x86code *&dst, const instruction &inst) // fetch the current mode and store to the destination if (dstp.is_int_register()) - emit_movzx_r32_m8(dst, dstp.ireg(), MABS(&m_state.fmod)); // movzx reg,[fmod] + a.movzx(Gpd(dstp.ireg()), MABS(&m_state.fmod, 1)); // movzx reg,[fmod] else { - emit_movzx_r32_m8(dst, REG_EAX, MABS(&m_state.fmod)); // movzx eax,[fmod] - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax + a.movzx(eax, MABS(&m_state.fmod, 1)); // movzx eax,[fmod] + a.mov(MABS(dstp.memory()), eax); // mov [dstp],eax } } @@ -3379,7 +2498,7 @@ void drcbe_x86::op_getfmod(x86code *&dst, const instruction &inst) // op_getexp - process a GETEXP opcode //------------------------------------------------- -void drcbe_x86::op_getexp(x86code *&dst, const instruction &inst) +void drcbe_x86::op_getexp(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3391,11 +2510,11 @@ void drcbe_x86::op_getexp(x86code *&dst, const instruction &inst) // fetch the exception parameter and store to the destination if (dstp.is_int_register()) - emit_mov_r32_m32(dst, dstp.ireg(), MABS(&m_state.exp)); // mov reg,[exp] + a.mov(Gpd(dstp.ireg()), MABS(&m_state.exp)); // mov reg,[exp] else { - emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.exp)); // mov eax,[exp] - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax + a.mov(eax, MABS(&m_state.exp)); // mov eax,[exp] + a.mov(MABS(dstp.memory()), eax); // mov [dstp],eax } } @@ -3404,7 +2523,7 @@ void drcbe_x86::op_getexp(x86code *&dst, const instruction &inst) // op_getflgs - process a GETFLGS opcode //------------------------------------------------- -void drcbe_x86::op_getflgs(x86code *&dst, const instruction &inst) +void drcbe_x86::op_getflgs(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3416,7 +2535,7 @@ void drcbe_x86::op_getflgs(x86code *&dst, const instruction &inst) be_parameter maskp(*this, inst.param(1), PTYPE_I); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // compute mask for flags uint32_t flagmask = 0; @@ -3430,108 +2549,108 @@ void drcbe_x86::op_getflgs(x86code *&dst, const instruction &inst) { // single flags only case FLAG_C: - emit_setcc_r8(dst, x86emit::COND_C, REG_AL); // setc al - emit_movzx_r32_r8(dst, dstreg, REG_AL); // movzx dstreg,al + a.setc(al); // setc al + a.movzx(dstreg, al); // movzx dstreg,al break; case FLAG_V: - emit_setcc_r8(dst, x86emit::COND_O, REG_AL); // seto al - emit_movzx_r32_r8(dst, dstreg, REG_AL); // movzx dstreg,al - emit_shl_r32_imm(dst, dstreg, 1); // shl dstreg,1 + a.seto(al); // seto al + a.movzx(dstreg, al); // movzx dstreg,al + a.shl(dstreg, 1); // shl dstreg,1 break; case FLAG_Z: - emit_setcc_r8(dst, x86emit::COND_Z, REG_AL); // setz al - emit_movzx_r32_r8(dst, dstreg, REG_AL); // movzx dstreg,al - emit_shl_r32_imm(dst, dstreg, 2); // shl dstreg,2 + a.setz(al); // setz al + a.movzx(dstreg, al); // movzx dstreg,al + a.shl(dstreg, 2); // shl dstreg,2 break; case FLAG_S: - emit_setcc_r8(dst, x86emit::COND_S, REG_AL); // sets al - emit_movzx_r32_r8(dst, dstreg, REG_AL); // movzx dstreg,al - emit_shl_r32_imm(dst, dstreg, 3); // shl dstreg,3 + a.sets(al); // sets al + a.movzx(dstreg, al); // movzx dstreg,al + a.shl(dstreg, 3); // shl dstreg,3 break; case FLAG_U: - emit_setcc_r8(dst, x86emit::COND_P, REG_AL); // setp al - emit_movzx_r32_r8(dst, dstreg, REG_AL); // movzx dstreg,al - emit_shl_r32_imm(dst, dstreg, 4); // shl dstreg,4 + a.setp(al); // setp al + a.movzx(dstreg, al); // movzx dstreg,al + a.shl(dstreg, 4); // shl dstreg,4 break; // carry plus another flag case FLAG_C | FLAG_V: - emit_setcc_r8(dst, x86emit::COND_C, REG_AL); // setc al - emit_setcc_r8(dst, x86emit::COND_O, REG_CL); // seto cl - emit_movzx_r32_r8(dst, REG_EAX, REG_AL); // movzx eax,al - emit_movzx_r32_r8(dst, REG_ECX, REG_CL); // movzx ecx,al - emit_lea_r32_m32(dst, dstreg, MBISD(REG_EAX, REG_ECX, 2, 0)); // lea dstreg,[eax+ecx*2] + a.setc(al); // setc al + a.seto(cl); // seto cl + a.movzx(eax, al); // movzx eax,al + a.movzx(ecx, cl); // movzx ecx,al + a.lea(dstreg, ptr(eax, ecx, 1)); // lea dstreg,[eax+ecx*2] break; case FLAG_C | FLAG_Z: - emit_setcc_r8(dst, x86emit::COND_C, REG_AL); // setc al - emit_setcc_r8(dst, x86emit::COND_Z, REG_CL); // setz cl - emit_movzx_r32_r8(dst, REG_EAX, REG_AL); // movzx eax,al - emit_movzx_r32_r8(dst, REG_ECX, REG_CL); // movzx ecx,al - emit_lea_r32_m32(dst, dstreg, MBISD(REG_EAX, REG_ECX, 4, 0)); // lea dstreg,[eax+ecx*4] + a.setc(al); // setc al + a.setz(cl); // setz cl + a.movzx(eax, al); // movzx eax,al + a.movzx(ecx, cl); // movzx ecx,al + a.lea(dstreg, ptr(eax, ecx, 2)); // lea dstreg,[eax+ecx*4] break; case FLAG_C | FLAG_S: - emit_setcc_r8(dst, x86emit::COND_C, REG_AL); // setc al - emit_setcc_r8(dst, x86emit::COND_S, REG_CL); // sets cl - emit_movzx_r32_r8(dst, REG_EAX, REG_AL); // movzx eax,al - emit_movzx_r32_r8(dst, REG_ECX, REG_CL); // movzx ecx,al - emit_lea_r32_m32(dst, dstreg, MBISD(REG_EAX, REG_ECX, 8, 0)); // lea dstreg,[eax+ecx*8] + a.setc(al); // setc al + a.sets(cl); // sets cl + a.movzx(eax, al); // movzx eax,al + a.movzx(ecx, cl); // movzx ecx,al + a.lea(dstreg, ptr(eax, ecx, 3)); // lea dstreg,[eax+ecx*8] break; // overflow plus another flag case FLAG_V | FLAG_Z: - emit_setcc_r8(dst, x86emit::COND_O, REG_AL); // seto al - emit_setcc_r8(dst, x86emit::COND_Z, REG_CL); // setz cl - emit_movzx_r32_r8(dst, REG_EAX, REG_AL); // movzx eax,al - emit_movzx_r32_r8(dst, REG_ECX, REG_CL); // movzx ecx,al - emit_lea_r32_m32(dst, dstreg, MBISD(REG_EAX, REG_ECX, 2, 0)); // lea dstreg,[eax+ecx*2] - emit_shl_r32_imm(dst, dstreg, 1); // shl dstreg,1 + a.seto(al); // seto al + a.setz(cl); // setz cl + a.movzx(eax, al); // movzx eax,al + a.movzx(ecx, cl); // movzx ecx,al + a.lea(dstreg, ptr(eax, ecx, 1)); // lea dstreg,[eax+ecx*2] + a.shl(dstreg, 1); // shl dstreg,1 break; case FLAG_V | FLAG_S: - emit_setcc_r8(dst, x86emit::COND_O, REG_AL); // seto al - emit_setcc_r8(dst, x86emit::COND_S, REG_CL); // sets cl - emit_movzx_r32_r8(dst, REG_EAX, REG_AL); // movzx eax,al - emit_movzx_r32_r8(dst, REG_ECX, REG_CL); // movzx ecx,al - emit_lea_r32_m32(dst, dstreg, MBISD(REG_EAX, REG_ECX, 4, 0)); // lea dstreg,[eax+ecx*4] - emit_shl_r32_imm(dst, dstreg, 1); // shl dstreg,1 + a.seto(al); // seto al + a.sets(cl); // sets cl + a.movzx(eax, al); // movzx eax,al + a.movzx(ecx, cl); // movzx ecx,al + a.lea(dstreg, ptr(eax, ecx, 2)); // lea dstreg,[eax+ecx*4] + a.shl(dstreg, 1); // shl dstreg,1 break; // zero plus another flag case FLAG_Z | FLAG_S: - emit_setcc_r8(dst, x86emit::COND_Z, REG_AL); // setz al - emit_setcc_r8(dst, x86emit::COND_S, REG_CL); // sets cl - emit_movzx_r32_r8(dst, REG_EAX, REG_AL); // movzx eax,al - emit_movzx_r32_r8(dst, REG_ECX, REG_CL); // movzx ecx,al - emit_lea_r32_m32(dst, dstreg, MBISD(REG_EAX, REG_ECX, 2, 0)); // lea dstreg,[eax+ecx*2] - emit_shl_r32_imm(dst, dstreg, 2); // shl dstreg,2 + a.setz(al); // setz al + a.sets(cl); // sets cl + a.movzx(eax, al); // movzx eax,al + a.movzx(ecx, cl); // movzx ecx,al + a.lea(dstreg, ptr(eax, ecx, 1)); // lea dstreg,[eax+ecx*2] + a.shl(dstreg, 2); // shl dstreg,2 break; // default cases default: - emit_pushf(dst); // pushf - emit_pop_r32(dst, REG_EAX); // pop eax - emit_and_r32_imm(dst, REG_EAX, flagmask); // and eax,flagmask - emit_movzx_r32_m8(dst, dstreg, MABSI(flags_map, REG_EAX)); // movzx dstreg,[flags_map] + a.pushfd(); // pushf + a.pop(eax); // pop eax + a.and_(eax, flagmask); // and eax,flagmask + a.movzx(dstreg, byte_ptr(u64(flags_map), eax)); // movzx dstreg,[flags_map] break; } // store low 32 bits - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg // 64-bit form stores upper 32 bits if (inst.size() == 8) { // general case if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov [dstp+4],0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov [dstp+4],0 else if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov [reghi],0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov [reghi],0 } } @@ -3540,7 +2659,7 @@ void drcbe_x86::op_getflgs(x86code *&dst, const instruction &inst) // op_save - process a SAVE opcode //------------------------------------------------- -void drcbe_x86::op_save(x86code *&dst, const instruction &inst) +void drcbe_x86::op_save(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3551,8 +2670,8 @@ void drcbe_x86::op_save(x86code *&dst, const instruction &inst) be_parameter dstp(*this, inst.param(0), PTYPE_M); // copy live state to the destination - emit_mov_r32_imm(dst, REG_ECX, (uintptr_t)dstp.memory()); // mov ecx,dstp - emit_call(dst, m_save); // call save + a.mov(ecx, imm(dstp.memory())); // mov ecx,dstp + a.call(imm(m_save)); // call save } @@ -3560,7 +2679,7 @@ void drcbe_x86::op_save(x86code *&dst, const instruction &inst) // op_restore - process a RESTORE opcode //------------------------------------------------- -void drcbe_x86::op_restore(x86code *&dst, const instruction &inst) +void drcbe_x86::op_restore(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4); @@ -3570,8 +2689,8 @@ void drcbe_x86::op_restore(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(0), PTYPE_M); // copy live state from the destination - emit_mov_r32_imm(dst, REG_ECX, (uintptr_t)srcp.memory()); // mov ecx,dstp - emit_call(dst, m_restore); // call restore + a.mov(ecx, imm(srcp.memory())); // mov ecx,dstp + a.call(imm(m_restore)); // call restore } @@ -3584,7 +2703,7 @@ void drcbe_x86::op_restore(x86code *&dst, const instruction &inst) // op_load - process a LOAD opcode //------------------------------------------------- -void drcbe_x86::op_load(x86code *&dst, const instruction &inst) +void drcbe_x86::op_load(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -3595,50 +2714,51 @@ void drcbe_x86::op_load(x86code *&dst, const instruction &inst) be_parameter dstp(*this, inst.param(0), PTYPE_MR); be_parameter basep(*this, inst.param(1), PTYPE_M); be_parameter indp(*this, inst.param(2), PTYPE_MRI); - const parameter &scalesizep = inst.param(3); + parameter const &scalesizep = inst.param(3); assert(scalesizep.is_size_scale()); - int scale = 1 << scalesizep.scale(); - int size = scalesizep.size(); + int const size = scalesizep.size(); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // immediate index if (indp.is_immediate()) { + int const scale = 1 << scalesizep.scale(); + if (size == SIZE_BYTE) - emit_movzx_r32_m8(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // movzx dstreg,[basep + scale*indp] + a.movzx(dstreg, MABS(basep.memory(scale*indp.immediate()), 1)); // movzx dstreg,[basep + scale*indp] else if (size == SIZE_WORD) - emit_movzx_r32_m16(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // movzx dstreg,[basep + scale*indp] + a.movzx(dstreg, MABS(basep.memory(scale*indp.immediate()), 2)); // movzx dstreg,[basep + scale*indp] else if (size == SIZE_DWORD) - emit_mov_r32_m32(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] + a.mov(dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] else if (size == SIZE_QWORD) { - emit_mov_r32_m32(dst, REG_EDX, MABS(basep.memory(scale*indp.immediate() + 4))); // mov edx,[basep + scale*indp + 4] - emit_mov_r32_m32(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] + a.mov(edx, MABS(basep.memory(scale*indp.immediate() + 4))); // mov edx,[basep + scale*indp + 4] + a.mov(dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] } } // other index else { - int indreg = indp.select_register(REG_ECX); - emit_mov_r32_p32(dst, indreg, indp); + Gp const indreg = indp.select_register(ecx); + emit_mov_r32_p32(a, indreg, indp); if (size == SIZE_BYTE) - emit_movzx_r32_m8(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // movzx dstreg,[basep + scale*indp] + a.movzx(dstreg, ptr(u64(basep.memory()), indreg, scalesizep.scale(), 1)); // movzx dstreg,[basep + scale*indp] else if (size == SIZE_WORD) - emit_movzx_r32_m16(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // movzx dstreg,[basep + scale*indp] + a.movzx(dstreg, ptr(u64(basep.memory()), indreg, scalesizep.scale(), 2)); // movzx dstreg,[basep + scale*indp] else if (size == SIZE_DWORD) - emit_mov_r32_m32(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // mov dstreg,[basep + scale*indp] + a.mov(dstreg, ptr(u64(basep.memory()), indreg, scalesizep.scale())); // mov dstreg,[basep + scale*indp] else if (size == SIZE_QWORD) { - emit_mov_r32_m32(dst, REG_EDX, MABSI(basep.memory(4), indreg, scale)); // mov edx,[basep + scale*indp + 4] - emit_mov_r32_m32(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // mov dstreg,[basep + scale*indp] + a.mov(edx, ptr(u64(basep.memory(4)), indreg, scalesizep.scale())); // mov edx,[basep + scale*indp + 4] + a.mov(dstreg, ptr(u64(basep.memory(0)), indreg, scalesizep.scale())); // mov dstreg,[basep + scale*indp] } } // store low 32 bits - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg // 64-bit form stores upper 32 bits if (inst.size() == 8) @@ -3647,22 +2767,22 @@ void drcbe_x86::op_load(x86code *&dst, const instruction &inst) if (size != SIZE_QWORD) { if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov [dstp+4],0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov [dstp+4],0 else if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov [reghi],0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov [reghi],0 } // 8-byte case else { if (dstp.is_memory()) - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp+4],edx else if (dstp.is_int_register()) - emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi],edx - set_last_upper_reg(dst, dstp, REG_EDX); + a.mov(MABS(m_reghi[dstp.ireg()]), edx); // mov [reghi],edx + set_last_upper_reg(a, dstp, edx); } } - set_last_lower_reg(dst, dstp, dstreg); + set_last_lower_reg(a, dstp, dstreg); } @@ -3670,7 +2790,7 @@ void drcbe_x86::op_load(x86code *&dst, const instruction &inst) // op_loads - process a LOADS opcode //------------------------------------------------- -void drcbe_x86::op_loads(x86code *&dst, const instruction &inst) +void drcbe_x86::op_loads(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -3681,62 +2801,63 @@ void drcbe_x86::op_loads(x86code *&dst, const instruction &inst) be_parameter dstp(*this, inst.param(0), PTYPE_MR); be_parameter basep(*this, inst.param(1), PTYPE_M); be_parameter indp(*this, inst.param(2), PTYPE_MRI); - const parameter &scalesizep = inst.param(3); + parameter const &scalesizep = inst.param(3); assert(scalesizep.is_size_scale()); - int scale = 1 << scalesizep.scale(); - int size = scalesizep.size(); + int const size = scalesizep.size(); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // immediate index if (indp.is_immediate()) { + int const scale = 1 << scalesizep.scale(); + if (size == SIZE_BYTE) - emit_movsx_r32_m8(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // movsx dstreg,[basep + scale*indp] + a.movsx(dstreg, MABS(basep.memory(scale*indp.immediate()), 1)); // movsx dstreg,[basep + scale*indp] else if (size == SIZE_WORD) - emit_movsx_r32_m16(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // movsx dstreg,[basep + scale*indp] + a.movsx(dstreg, MABS(basep.memory(scale*indp.immediate()), 2)); // movsx dstreg,[basep + scale*indp] else if (size == SIZE_DWORD) - emit_mov_r32_m32(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] + a.mov(dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] else if (size == SIZE_QWORD) { - emit_mov_r32_m32(dst, REG_EDX, MABS(basep.memory(scale*indp.immediate() + 4))); // mov edx,[basep + scale*indp + 4] - emit_mov_r32_m32(dst, dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] + a.mov(edx, MABS(basep.memory(scale*indp.immediate() + 4))); // mov edx,[basep + scale*indp + 4] + a.mov(dstreg, MABS(basep.memory(scale*indp.immediate()))); // mov dstreg,[basep + scale*indp] } } // other index else { - int indreg = indp.select_register(REG_ECX); - emit_mov_r32_p32(dst, indreg, indp); + Gp const indreg = indp.select_register(ecx); + emit_mov_r32_p32(a, indreg, indp); if (size == SIZE_BYTE) - emit_movsx_r32_m8(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // movsx dstreg,[basep + scale*indp] + a.movsx(dstreg, ptr(u64(basep.memory()), indreg, scalesizep.scale(), 1)); // movsx dstreg,[basep + scale*indp] else if (size == SIZE_WORD) - emit_movsx_r32_m16(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // movsx dstreg,[basep + scale*indp] + a.movsx(dstreg, ptr(u64(basep.memory()), indreg, scalesizep.scale(), 2)); // movsx dstreg,[basep + scale*indp] else if (size == SIZE_DWORD) - emit_mov_r32_m32(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // mov dstreg,[basep + scale*indp] + a.mov(dstreg, ptr(u64(basep.memory()), indreg, scalesizep.scale())); // mov dstreg,[basep + scale*indp] else if (size == SIZE_QWORD) { - emit_mov_r32_m32(dst, REG_EDX, MABSI(basep.memory(4), indreg, scale)); // mov edx,[basep + scale*indp + 4] - emit_mov_r32_m32(dst, dstreg, MABSI(basep.memory(), indreg, scale)); // mov dstreg,[basep + scale*indp] + a.mov(edx, ptr(u64(basep.memory(4)), indreg, scalesizep.scale())); // mov edx,[basep + scale*indp + 4] + a.mov(dstreg, ptr(u64(basep.memory(0)), indreg, scalesizep.scale())); // mov dstreg,[basep + scale*indp] } } // store low 32 bits - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg // 64-bit form stores upper 32 bits if (inst.size() == 8) { - emit_cdq(dst); // cdq + a.cdq(); // cdq if (dstp.is_memory()) - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp+4],edx else if (dstp.is_int_register()) - emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi],edx - set_last_upper_reg(dst, dstp, REG_EDX); + a.mov(MABS(m_reghi[dstp.ireg()]), edx); // mov [reghi],edx + set_last_upper_reg(a, dstp, edx); } - set_last_lower_reg(dst, dstp, dstreg); + set_last_lower_reg(a, dstp, dstreg); } @@ -3744,7 +2865,7 @@ void drcbe_x86::op_loads(x86code *&dst, const instruction &inst) // op_store - process a STORE opcode //------------------------------------------------- -void drcbe_x86::op_store(x86code *&dst, const instruction &inst) +void drcbe_x86::op_store(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -3755,31 +2876,32 @@ void drcbe_x86::op_store(x86code *&dst, const instruction &inst) be_parameter basep(*this, inst.param(0), PTYPE_M); be_parameter indp(*this, inst.param(1), PTYPE_MRI); be_parameter srcp(*this, inst.param(2), PTYPE_MRI); - const parameter &scalesizep = inst.param(3); - int scale = 1 << (scalesizep.scale()); - int size = scalesizep.size(); + parameter const &scalesizep = inst.param(3); + int const size = scalesizep.size(); // pick a source register for the general case - int srcreg = srcp.select_register(REG_EAX); - if (size == SIZE_BYTE && (srcreg & 4)) - srcreg = REG_EAX; + Gp srcreg = srcp.select_register(eax); + if (size == SIZE_BYTE && (srcreg.id() & 4)) // FIXME: &4? + srcreg = eax; // degenerate case: constant index if (indp.is_immediate()) { + int const scale = 1 << (scalesizep.scale()); + // immediate source if (srcp.is_immediate()) { if (size == SIZE_BYTE) - emit_mov_m8_imm(dst, MABS(basep.memory(scale*indp.immediate())), srcp.immediate()); // mov [basep + scale*indp],srcp + a.mov(MABS(basep.memory(scale*indp.immediate()), 1), srcp.immediate()); // mov [basep + scale*indp],srcp else if (size == SIZE_WORD) - emit_mov_m16_imm(dst, MABS(basep.memory(scale*indp.immediate())), srcp.immediate()); // mov [basep + scale*indp],srcp + a.mov(MABS(basep.memory(scale*indp.immediate()), 2), srcp.immediate()); // mov [basep + scale*indp],srcp else if (size == SIZE_DWORD) - emit_mov_m32_imm(dst, MABS(basep.memory(scale*indp.immediate())), srcp.immediate()); // mov [basep + scale*indp],srcp + a.mov(MABS(basep.memory(scale*indp.immediate()), 4), srcp.immediate()); // mov [basep + scale*indp],srcp else if (size == SIZE_QWORD) { - emit_mov_m32_imm(dst, MABS(basep.memory(scale*indp.immediate())), srcp.immediate()); // mov [basep + scale*indp],srcp - emit_mov_m32_imm(dst, MABS(basep.memory(scale*indp.immediate() + 4)), srcp.immediate() >> 32); + a.mov(MABS(basep.memory(scale*indp.immediate()), 4), srcp.immediate()); // mov [basep + scale*indp],srcp + a.mov(MABS(basep.memory(scale*indp.immediate() + 4), 4), srcp.immediate() >> 32); // mov [basep + scale*indp + 4],srcp >> 32 } } @@ -3788,19 +2910,19 @@ void drcbe_x86::op_store(x86code *&dst, const instruction &inst) else { if (size != SIZE_QWORD) - emit_mov_r32_p32(dst, srcreg, srcp); // mov srcreg,srcp + emit_mov_r32_p32(a, srcreg, srcp); // mov srcreg,srcp else - emit_mov_r64_p64(dst, srcreg, REG_EDX, srcp); // mov edx:srcreg,srcp + emit_mov_r64_p64(a, srcreg, edx, srcp); // mov edx:srcreg,srcp if (size == SIZE_BYTE) - emit_mov_m8_r8(dst, MABS(basep.memory(scale*indp.immediate())), srcreg); // mov [basep + scale*indp],srcreg + a.mov(MABS(basep.memory(scale*indp.immediate())), srcreg.r8()); // mov [basep + scale*indp],srcreg else if (size == SIZE_WORD) - emit_mov_m16_r16(dst, MABS(basep.memory(scale*indp.immediate())), srcreg); // mov [basep + scale*indp],srcreg + a.mov(MABS(basep.memory(scale*indp.immediate())), srcreg.r16()); // mov [basep + scale*indp],srcreg else if (size == SIZE_DWORD) - emit_mov_m32_r32(dst, MABS(basep.memory(scale*indp.immediate())), srcreg); // mov [basep + scale*indp],srcreg + a.mov(MABS(basep.memory(scale*indp.immediate())), srcreg); // mov [basep + scale*indp],srcreg else if (size == SIZE_QWORD) { - emit_mov_m32_r32(dst, MABS(basep.memory(scale*indp.immediate())), srcreg); // mov [basep + scale*indp],srcreg - emit_mov_m32_r32(dst, MABS(basep.memory(scale*indp.immediate() + 4)), REG_EDX); // mov [basep + scale*indp + 4],edx + a.mov(MABS(basep.memory(scale*indp.immediate())), srcreg); // mov [basep + scale*indp],srcreg + a.mov(MABS(basep.memory(scale*indp.immediate() + 4)), edx); // mov [basep + scale*indp + 4],edx } } } @@ -3808,22 +2930,22 @@ void drcbe_x86::op_store(x86code *&dst, const instruction &inst) // normal case: variable index else { - int indreg = indp.select_register(REG_ECX); - emit_mov_r32_p32(dst, indreg, indp); // mov indreg,indp + Gp const indreg = indp.select_register(ecx); + emit_mov_r32_p32(a, indreg, indp); // mov indreg,indp // immediate source if (srcp.is_immediate()) { if (size == SIZE_BYTE) - emit_mov_m8_imm(dst, MABSI(basep.memory(), indreg, scale), srcp.immediate()); // mov [basep + 1*ecx],srcp + a.mov(ptr(u64(basep.memory()), indreg, scalesizep.scale(), 1), srcp.immediate()); // mov [basep + 1*ecx],srcp else if (size == SIZE_WORD) - emit_mov_m16_imm(dst, MABSI(basep.memory(), indreg, scale), srcp.immediate()); // mov [basep + 2*ecx],srcp + a.mov(ptr(u64(basep.memory()), indreg, scalesizep.scale(), 2), srcp.immediate()); // mov [basep + 2*ecx],srcp else if (size == SIZE_DWORD) - emit_mov_m32_imm(dst, MABSI(basep.memory(), indreg, scale), srcp.immediate()); // mov [basep + 4*ecx],srcp + a.mov(ptr(u64(basep.memory()), indreg, scalesizep.scale(), 4), srcp.immediate()); // mov [basep + 4*ecx],srcp else if (size == SIZE_QWORD) { - emit_mov_m32_imm(dst, MABSI(basep.memory(), indreg, scale), srcp.immediate()); // mov [basep + 8*ecx],srcp - emit_mov_m32_imm(dst, MABSI(basep.memory(4), indreg, scale), srcp.immediate() >> 32); + a.mov(ptr(u64(basep.memory(0)), indreg, scalesizep.scale(), 4), srcp.immediate()); // mov [basep + 8*ecx],srcp + a.mov(ptr(u64(basep.memory(4)), indreg, scalesizep.scale(), 4), srcp.immediate() >> 32); // mov [basep + 8*ecx + 4],srcp >> 32 } } @@ -3832,19 +2954,19 @@ void drcbe_x86::op_store(x86code *&dst, const instruction &inst) else { if (size != SIZE_QWORD) - emit_mov_r32_p32(dst, srcreg, srcp); // mov srcreg,srcp + emit_mov_r32_p32(a, srcreg, srcp); // mov srcreg,srcp else - emit_mov_r64_p64(dst, srcreg, REG_EDX, srcp); // mov edx:srcreg,srcp + emit_mov_r64_p64(a, srcreg, edx, srcp); // mov edx:srcreg,srcp if (size == SIZE_BYTE) - emit_mov_m8_r8(dst, MABSI(basep.memory(), indreg, scale), srcreg); // mov [basep + 1*ecx],srcreg + a.mov(ptr(u64(basep.memory()), indreg, scalesizep.scale()), srcreg.r8()); // mov [basep + 1*ecx],srcreg else if (size == SIZE_WORD) - emit_mov_m16_r16(dst, MABSI(basep.memory(), indreg, scale), srcreg); // mov [basep + 2*ecx],srcreg + a.mov(ptr(u64(basep.memory()), indreg, scalesizep.scale()), srcreg.r16()); // mov [basep + 2*ecx],srcreg else if (size == SIZE_DWORD) - emit_mov_m32_r32(dst, MABSI(basep.memory(), indreg, scale), srcreg); // mov [basep + 4*ecx],srcreg + a.mov(ptr(u64(basep.memory()), indreg, scalesizep.scale()), srcreg); // mov [basep + 4*ecx],srcreg else if (size == SIZE_QWORD) { - emit_mov_m32_r32(dst, MABSI(basep.memory(), indreg, scale), srcreg); // mov [basep + 8*ecx],srcreg - emit_mov_m32_r32(dst, MABSI(basep.memory(4), indreg, scale), REG_EDX); // mov [basep + 8*ecx],edx + a.mov(ptr(u64(basep.memory(0)), indreg, scalesizep.scale()), srcreg); // mov [basep + 8*ecx],srcreg + a.mov(ptr(u64(basep.memory(4)), indreg, scalesizep.scale()), edx); // mov [basep + 8*ecx],edx } } } @@ -3855,7 +2977,7 @@ void drcbe_x86::op_store(x86code *&dst, const instruction &inst) // op_read - process a READ opcode //------------------------------------------------- -void drcbe_x86::op_read(x86code *&dst, const instruction &inst) +void drcbe_x86::op_read(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -3865,42 +2987,38 @@ void drcbe_x86::op_read(x86code *&dst, const instruction &inst) // normalize parameters be_parameter dstp(*this, inst.param(0), PTYPE_MR); be_parameter addrp(*this, inst.param(1), PTYPE_MRI); - const parameter &spacesizep = inst.param(2); + parameter const &spacesizep = inst.param(2); assert(spacesizep.is_size_space()); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // set up a call to the read byte handler - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space + emit_mov_m32_p32(a, dword_ptr(esp, 4), addrp); // mov [esp+4],addrp + a.mov(dword_ptr(esp, 0), imm(m_space[spacesizep.space()])); // mov [esp],space if (spacesizep.size() == SIZE_BYTE) { - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_byte); - // call read_byte - emit_movzx_r32_r8(dst, dstreg, REG_AL); // movzx dstreg,al + a.call(imm(m_accessors[spacesizep.space()].read_byte)); // call read_byte + a.movzx(dstreg, al); // movzx dstreg,al } else if (spacesizep.size() == SIZE_WORD) { - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_word); - // call read_word - emit_movzx_r32_r16(dst, dstreg, REG_AX); // movzx dstreg,ax + a.call(imm(m_accessors[spacesizep.space()].read_word)); // call read_word + a.movzx(dstreg, ax); // movzx dstreg,ax } else if (spacesizep.size() == SIZE_DWORD) { - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_dword); - // call read_dword - emit_mov_r32_r32(dst, dstreg, REG_EAX); // mov dstreg,eax + a.call(imm(m_accessors[spacesizep.space()].read_dword)); // call read_dword + a.mov(dstreg, eax); // mov dstreg,eax } else if (spacesizep.size() == SIZE_QWORD) { - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_qword); - // call read_qword - emit_mov_r32_r32(dst, dstreg, REG_EAX); // mov dstreg,eax + a.call(imm(m_accessors[spacesizep.space()].read_qword)); // call read_qword + a.mov(dstreg, eax); // mov dstreg,eax } // store low 32 bits - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg // 64-bit form stores upper 32 bits if (inst.size() == 8) @@ -3909,18 +3027,18 @@ void drcbe_x86::op_read(x86code *&dst, const instruction &inst) if (spacesizep.size() != SIZE_QWORD) { if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov [dstp+4],0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov [dstp+4],0 else if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov [reghi],0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov [reghi],0 } // 8-byte case else { if (dstp.is_memory()) - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp+4],edx else if (dstp.is_int_register()) - emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi],edx + a.mov(MABS(m_reghi[dstp.ireg()]), edx); // mov [reghi],edx } } } @@ -3930,7 +3048,7 @@ void drcbe_x86::op_read(x86code *&dst, const instruction &inst) // op_readm - process a READM opcode //------------------------------------------------- -void drcbe_x86::op_readm(x86code *&dst, const instruction &inst) +void drcbe_x86::op_readm(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -3941,40 +3059,37 @@ void drcbe_x86::op_readm(x86code *&dst, const instruction &inst) be_parameter dstp(*this, inst.param(0), PTYPE_MR); be_parameter addrp(*this, inst.param(1), PTYPE_MRI); be_parameter maskp(*this, inst.param(2), PTYPE_MRI); - const parameter &spacesizep = inst.param(3); + parameter const &spacesizep = inst.param(3); assert(spacesizep.is_size_space()); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // set up a call to the read byte handler if (spacesizep.size() != SIZE_QWORD) - emit_mov_m32_p32(dst, MBD(REG_ESP, 8), maskp); // mov [esp+8],maskp + emit_mov_m32_p32(a, dword_ptr(esp, 8), maskp); // mov [esp+8],maskp else - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), maskp); // mov [esp+8],maskp - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space + emit_mov_m64_p64(a, qword_ptr(esp, 8), maskp); // mov [esp+8],maskp + emit_mov_m32_p32(a, dword_ptr(esp, 4), addrp); // mov [esp+4],addrp + a.mov(dword_ptr(esp, 0), imm(m_space[spacesizep.space()])); // mov [esp],space if (spacesizep.size() == SIZE_WORD) { - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_word_masked); - // call read_word_masked - emit_movzx_r32_r16(dst, dstreg, REG_AX); // movzx dstreg,ax + a.call(imm(m_accessors[spacesizep.space()].read_word_masked)); // call read_word_masked + a.movzx(dstreg, ax); // movzx dstreg,ax } else if (spacesizep.size() == SIZE_DWORD) { - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_dword_masked); - // call read_dword_masked - emit_mov_r32_r32(dst, dstreg, REG_EAX); // mov dstreg,eax + a.call(imm(m_accessors[spacesizep.space()].read_dword_masked)); // call read_dword_masked + a.mov(dstreg, eax); // mov dstreg,eax } else if (spacesizep.size() == SIZE_QWORD) { - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_qword_masked); - // call read_qword_masked - emit_mov_r32_r32(dst, dstreg, REG_EAX); // mov dstreg,eax + a.call(imm(m_accessors[spacesizep.space()].read_qword_masked)); // call read_qword_masked + a.mov(dstreg, eax); // mov dstreg,eax } // store low 32 bits - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg // 64-bit form stores upper 32 bits if (inst.size() == 8) @@ -3983,18 +3098,18 @@ void drcbe_x86::op_readm(x86code *&dst, const instruction &inst) if (spacesizep.size() != SIZE_QWORD) { if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov [dstp+4],0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov [dstp+4],0 else if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov [reghi],0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov [reghi],0 } // 8-byte case else { if (dstp.is_memory()) - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp+4],edx else if (dstp.is_int_register()) - emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi],edx + a.mov(MABS(m_reghi[dstp.ireg()]), edx); // mov [reghi],edx } } } @@ -4004,7 +3119,7 @@ void drcbe_x86::op_readm(x86code *&dst, const instruction &inst) // op_write - process a WRITE opcode //------------------------------------------------- -void drcbe_x86::op_write(x86code *&dst, const instruction &inst) +void drcbe_x86::op_write(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4014,28 +3129,24 @@ void drcbe_x86::op_write(x86code *&dst, const instruction &inst) // normalize parameters be_parameter addrp(*this, inst.param(0), PTYPE_MRI); be_parameter srcp(*this, inst.param(1), PTYPE_MRI); - const parameter &spacesizep = inst.param(2); + parameter const &spacesizep = inst.param(2); assert(spacesizep.is_size_space()); // set up a call to the write byte handler if (spacesizep.size() != SIZE_QWORD) - emit_mov_m32_p32(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp + emit_mov_m32_p32(a, dword_ptr(esp, 8), srcp); // mov [esp+8],srcp else - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space + emit_mov_m64_p64(a, qword_ptr(esp, 8), srcp); // mov [esp+8],srcp + emit_mov_m32_p32(a, dword_ptr(esp, 4), addrp); // mov [esp+4],addrp + a.mov(dword_ptr(esp, 0), imm(m_space[spacesizep.space()])); // mov [esp],space if (spacesizep.size() == SIZE_BYTE) - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_byte); - // call write_byte + a.call(imm(m_accessors[spacesizep.space()].write_byte)); // call write_byte else if (spacesizep.size() == SIZE_WORD) - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_word); - // call write_word + a.call(imm(m_accessors[spacesizep.space()].write_word)); // call write_word else if (spacesizep.size() == SIZE_DWORD) - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_dword); - // call write_dword + a.call(imm(m_accessors[spacesizep.space()].write_dword)); // call write_dword else if (spacesizep.size() == SIZE_QWORD) - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_qword); - // call write_qword + a.call(imm(m_accessors[spacesizep.space()].write_qword)); // call write_qword } @@ -4043,7 +3154,7 @@ void drcbe_x86::op_write(x86code *&dst, const instruction &inst) // op_writem - process a WRITEM opcode //------------------------------------------------- -void drcbe_x86::op_writem(x86code *&dst, const instruction &inst) +void drcbe_x86::op_writem(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4054,31 +3165,28 @@ void drcbe_x86::op_writem(x86code *&dst, const instruction &inst) be_parameter addrp(*this, inst.param(0), PTYPE_MRI); be_parameter srcp(*this, inst.param(1), PTYPE_MRI); be_parameter maskp(*this, inst.param(2), PTYPE_MRI); - const parameter &spacesizep = inst.param(3); + parameter const &spacesizep = inst.param(3); assert(spacesizep.is_size_space()); // set up a call to the write byte handler if (spacesizep.size() != SIZE_QWORD) { - emit_mov_m32_p32(dst, MBD(REG_ESP, 12), maskp); // mov [esp+12],maskp - emit_mov_m32_p32(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp + emit_mov_m32_p32(a, dword_ptr(esp, 12), maskp); // mov [esp+12],maskp + emit_mov_m32_p32(a, dword_ptr(esp, 8), srcp); // mov [esp+8],srcp } else { - emit_mov_m64_p64(dst, MBD(REG_ESP, 16), maskp); // mov [esp+16],maskp - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp + emit_mov_m64_p64(a, qword_ptr(esp, 16), maskp); // mov [esp+16],maskp + emit_mov_m64_p64(a, qword_ptr(esp, 8), srcp); // mov [esp+8],srcp } - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space + emit_mov_m32_p32(a, dword_ptr(esp, 4), addrp); // mov [esp+4],addrp + a.mov(dword_ptr(esp, 0), imm(m_space[spacesizep.space()])); // mov [esp],space if (spacesizep.size() == SIZE_WORD) - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_word_masked); - // call write_word_masked + a.call(imm(m_accessors[spacesizep.space()].write_word_masked)); // call write_word_masked else if (spacesizep.size() == SIZE_DWORD) - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_dword_masked); - // call write_dword_masked + a.call(imm(m_accessors[spacesizep.space()].write_dword_masked)); // call write_dword_masked else if (spacesizep.size() == SIZE_QWORD) - emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_qword_masked); - // call write_qword_masked + a.call(imm(m_accessors[spacesizep.space()].write_qword_masked)); // call write_qword_masked } @@ -4086,7 +3194,7 @@ void drcbe_x86::op_writem(x86code *&dst, const instruction &inst) // op_carry - process a CARRY opcode //------------------------------------------------- -void drcbe_x86::op_carry(x86code *&dst, const instruction &inst) +void drcbe_x86::op_carry(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4101,16 +3209,16 @@ void drcbe_x86::op_carry(x86code *&dst, const instruction &inst) if (srcp.is_immediate() && bitp.is_immediate()) { if (srcp.immediate() & ((uint64_t)1 << bitp.immediate())) - emit_stc(dst); + a.stc(); else - emit_clc(dst); + a.clc(); } // load non-immediate bit numbers into a register if (!bitp.is_immediate()) { - emit_mov_r32_p32(dst, REG_ECX, bitp); - emit_and_r32_imm(dst, REG_ECX, inst.size() * 8 - 1); + emit_mov_r32_p32(a, ecx, bitp); + a.and_(ecx, inst.size() * 8 - 1); } // 32-bit form @@ -4119,16 +3227,16 @@ void drcbe_x86::op_carry(x86code *&dst, const instruction &inst) if (bitp.is_immediate()) { if (srcp.is_memory()) - emit_bt_m32_imm(dst, MABS(srcp.memory()), bitp.immediate()); // bt [srcp],bitp + a.bt(MABS(srcp.memory(), 4), bitp.immediate()); // bt [srcp],bitp else if (srcp.is_int_register()) - emit_bt_r32_imm(dst, srcp.ireg(), bitp.immediate()); // bt srcp,bitp + a.bt(Gpd(srcp.ireg()), bitp.immediate()); // bt srcp,bitp } else { if (srcp.is_memory()) - emit_bt_m32_r32(dst, MABS(srcp.memory()), REG_ECX); // bt [srcp],ecx + a.bt(MABS(srcp.memory()), ecx); // bt [srcp],ecx else if (srcp.is_int_register()) - emit_bt_r32_r32(dst, srcp.ireg(), REG_ECX); // bt [srcp],ecx + a.bt(Gpd(srcp.ireg()), ecx); // bt [srcp],ecx } } @@ -4138,20 +3246,20 @@ void drcbe_x86::op_carry(x86code *&dst, const instruction &inst) if (bitp.is_immediate()) { if (srcp.is_memory()) - emit_bt_m32_imm(dst, MABS(srcp.memory()), bitp.immediate()); // bt [srcp],bitp + a.bt(MABS(srcp.memory(), 4), bitp.immediate()); // bt [srcp],bitp else if (srcp.is_int_register() && bitp.immediate() < 32) - emit_bt_r32_imm(dst, srcp.ireg(), bitp.immediate()); // bt srcp,bitp + a.bt(Gpd(srcp.ireg()), bitp.immediate()); // bt srcp,bitp else if (srcp.is_int_register() && bitp.immediate() >= 32) - emit_bt_m32_imm(dst, MABS(m_reghi[srcp.ireg()]), bitp.immediate() - 32); // bt [srcp.hi],bitp + a.bt(MABS(m_reghi[srcp.ireg()], 4), bitp.immediate() - 32); // bt [srcp.hi],bitp } else { if (srcp.is_memory()) - emit_bt_m32_r32(dst, MABS(srcp.memory()), REG_ECX); // bt [srcp],ecx + a.bt(MABS(srcp.memory()), ecx); // bt [srcp],ecx else if (srcp.is_int_register()) { - emit_mov_m32_r32(dst, MABS(m_reglo[srcp.ireg()]), srcp.ireg()); // mov [srcp.lo],srcp - emit_bt_m32_r32(dst, MABS(m_reglo[srcp.ireg()]), REG_ECX); // bt [srcp],ecx + a.mov(MABS(m_reglo[srcp.ireg()]), Gpd(srcp.ireg())); // mov [srcp.lo],srcp + a.bt(MABS(m_reglo[srcp.ireg()]), ecx); // bt [srcp],ecx } } } @@ -4162,7 +3270,7 @@ void drcbe_x86::op_carry(x86code *&dst, const instruction &inst) // op_set - process a SET opcode //------------------------------------------------- -void drcbe_x86::op_set(x86code *&dst, const instruction &inst) +void drcbe_x86::op_set(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4173,23 +3281,23 @@ void drcbe_x86::op_set(x86code *&dst, const instruction &inst) be_parameter dstp(*this, inst.param(0), PTYPE_MR); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // set to AL - emit_setcc_r8(dst, X86_CONDITION(inst.condition()), REG_AL); // setcc al - emit_movzx_r32_r8(dst, dstreg, REG_AL); // movzx dstreg,al + a.set(X86_CONDITION(inst.condition()), al); // setcc al + a.movzx(dstreg, al); // movzx dstreg,al // store low 32 bits - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg // 64-bit form stores upper 32 bits if (inst.size() == 8) { // general case if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov [dstp+4],0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov [dstp+4],0 else if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov [reghi],0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov [reghi],0 } } @@ -4198,10 +3306,8 @@ void drcbe_x86::op_set(x86code *&dst, const instruction &inst) // op_mov - process a MOV opcode //------------------------------------------------- -void drcbe_x86::op_mov(x86code *&dst, const instruction &inst) +void drcbe_x86::op_mov(Assembler &a, const instruction &inst) { - x86code *savedst = dst; - // validate instruction assert(inst.size() == 4 || inst.size() == 8); assert_any_condition(inst); @@ -4212,47 +3318,39 @@ void drcbe_x86::op_mov(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); - // always start with a jmp - emit_link skip = { nullptr }; - if (inst.condition() != uml::COND_ALWAYS) - emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip + // add a conditional branch unless a conditional move is possible + Label skip = a.newLabel(); + if (inst.condition() != uml::COND_ALWAYS && ((inst.size() == 8) || !(dstp.is_int_register() && !srcp.is_immediate()))) + a.short_().j(X86_NOT_CONDITION(inst.condition()), skip); // jcc skip // 32-bit form if (inst.size() == 4) { // register to memory if (dstp.is_memory() && srcp.is_int_register()) - emit_mov_m32_r32(dst, MABS(dstp.memory()), srcp.ireg()); // mov [dstp],srcp + a.mov(MABS(dstp.memory()), Gpd(srcp.ireg())); // mov [dstp],srcp // immediate to memory else if (dstp.is_memory() && srcp.is_immediate()) - emit_mov_m32_imm(dst, MABS(dstp.memory()), srcp.immediate()); // mov [dstp],srcp + a.mov(MABS(dstp.memory(), 4), srcp.immediate()); // mov [dstp],srcp // conditional memory to register else if (inst.condition() != uml::COND_ALWAYS && dstp.is_int_register() && srcp.is_memory()) - { - dst = savedst; - skip.target = nullptr; - emit_cmovcc_r32_m32(dst, X86_CONDITION(inst.condition()), dstp.ireg(), MABS(srcp.memory())); + a.cmov(X86_CONDITION(inst.condition()), Gpd(dstp.ireg()), MABS(srcp.memory())); // cmovcc dstp,[srcp] - } // conditional register to register else if (inst.condition() != uml::COND_ALWAYS && dstp.is_int_register() && srcp.is_int_register()) - { - dst = savedst; - skip.target = nullptr; - emit_cmovcc_r32_r32(dst, X86_CONDITION(inst.condition()), dstp.ireg(), srcp.ireg()); + a.cmov(X86_CONDITION(inst.condition()), Gpd(dstp.ireg()), Gpd(srcp.ireg())); // cmovcc dstp,srcp - } // general case else { - emit_mov_r32_p32_keepflags(dst, dstreg, srcp); // mov dstreg,srcp - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32_keepflags(a, dstreg, srcp); // mov dstreg,srcp + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -4262,29 +3360,32 @@ void drcbe_x86::op_mov(x86code *&dst, const instruction &inst) // register to memory if (dstp.is_memory() && srcp.is_int_register()) { - emit_mov_r32_m32(dst, REG_EAX, MABS(m_reghi[srcp.ireg()])); // mov eax,reghi[srcp] - emit_mov_m32_r32(dst, MABS(dstp.memory()), srcp.ireg()); // mov [dstp],srcp - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EAX); // mov [dstp+4],eax + a.mov(eax, MABS(m_reghi[srcp.ireg()])); // mov eax,reghi[srcp] + a.mov(MABS(dstp.memory(0)), Gpd(srcp.ireg())); // mov [dstp],srcp + a.mov(MABS(dstp.memory(4)), eax); // mov [dstp+4],eax } // immediate to memory else if (dstp.is_memory() && srcp.is_immediate()) { - emit_mov_m32_imm(dst, MABS(dstp.memory()), srcp.immediate()); // mov [dstp],srcp - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), srcp.immediate() >> 32); // mov [dstp+4],srcp >> 32 + a.mov(MABS(dstp.memory(0), 4), srcp.immediate()); // mov [dstp],srcp + a.mov(MABS(dstp.memory(4), 4), srcp.immediate() >> 32); // mov [dstp+4],srcp >> 32 } // general case else { - emit_mov_r64_p64(dst, dstreg, REG_EDX, srcp); // mov edx:dstreg,srcp - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,edx:dstreg + emit_mov_r64_p64(a, dstreg, edx, srcp); // mov edx:dstreg,srcp + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } - // resolve the jump - if (skip.target != nullptr) - track_resolve_link(dst, skip); + // bind the label + if (inst.condition() != uml::COND_ALWAYS && ((inst.size() == 8) || !(dstp.is_int_register() && !srcp.is_immediate()))) + { + a.bind(skip); + reset_last_upper_lower_reg(); + } } @@ -4292,7 +3393,7 @@ void drcbe_x86::op_mov(x86code *&dst, const instruction &inst) // op_sext - process a SEXT opcode //------------------------------------------------- -void drcbe_x86::op_sext(x86code *&dst, const instruction &inst) +void drcbe_x86::op_sext(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4302,50 +3403,50 @@ void drcbe_x86::op_sext(x86code *&dst, const instruction &inst) // normalize parameters be_parameter dstp(*this, inst.param(0), PTYPE_MR); be_parameter srcp(*this, inst.param(1), PTYPE_MRI); - const parameter &sizep = inst.param(2); + parameter const &sizep = inst.param(2); assert(sizep.is_size()); // pick a target register for the general case - int dstreg = (inst.size() == 8) ? REG_EAX : dstp.select_register(REG_EAX); + Gp const dstreg = (inst.size() == 8) ? eax : dstp.select_register(eax); // convert 8-bit source registers to EAX if (sizep.size() == SIZE_BYTE && srcp.is_int_register() && (srcp.ireg() & 4)) { - emit_mov_r32_r32(dst, REG_EAX, srcp.ireg()); // mov eax,srcp - srcp = be_parameter::make_ireg(REG_EAX); + a.mov(eax, Gpd(srcp.ireg())); // mov eax,srcp + srcp = be_parameter::make_ireg(eax.id()); } // general case if (srcp.is_memory()) { if (sizep.size() == SIZE_BYTE) - emit_movsx_r32_m8(dst, dstreg, MABS(srcp.memory())); // movsx dstreg,[srcp] + a.movsx(dstreg, MABS(srcp.memory(), 1)); // movsx dstreg,[srcp] else if (sizep.size() == SIZE_WORD) - emit_movsx_r32_m16(dst, dstreg, MABS(srcp.memory())); // movsx dstreg,[srcp] + a.movsx(dstreg, MABS(srcp.memory(), 2)); // movsx dstreg,[srcp] else if (sizep.size() == SIZE_DWORD) - emit_mov_r32_m32(dst, dstreg, MABS(srcp.memory())); // mov dstreg,[srcp] + a.mov(dstreg, MABS(srcp.memory())); // mov dstreg,[srcp] } else if (srcp.is_int_register()) { if (sizep.size() == SIZE_BYTE) - emit_movsx_r32_r8(dst, dstreg, srcp.ireg()); // movsx dstreg,srcp + a.movsx(dstreg, GpbLo(srcp.ireg())); // movsx dstreg,srcp else if (sizep.size() == SIZE_WORD) - emit_movsx_r32_r16(dst, dstreg, srcp.ireg()); // movsx dstreg,srcp - else if (sizep.size() == SIZE_DWORD && dstreg != srcp.ireg()) - emit_mov_r32_r32(dst, dstreg, srcp.ireg()); // mov dstreg,srcp + a.movsx(dstreg, Gpw(srcp.ireg())); // movsx dstreg,srcp + else if (sizep.size() == SIZE_DWORD && dstreg.id() != srcp.ireg()) + a.mov(dstreg, Gpd(srcp.ireg())); // mov dstreg,srcp } if (inst.flags() != 0) - emit_test_r32_r32(dst, dstreg, dstreg); // test dstreg,dstreg + a.test(dstreg, dstreg); // test dstreg,dstreg // 32-bit form: store the low 32 bits if (inst.size() == 4) - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg // 64-bit form: sign extend to 64 bits and store edx:eax else if (inst.size() == 8) { - emit_cdq(dst); // cdq - emit_mov_p64_r64(dst, dstp, REG_EAX, REG_EDX); // mov dstp,edx:eax + a.cdq(); // cdq + emit_mov_p64_r64(a, dstp, eax, edx); // mov dstp,edx:eax } } @@ -4354,7 +3455,7 @@ void drcbe_x86::op_sext(x86code *&dst, const instruction &inst) // op_roland - process an ROLAND opcode //------------------------------------------------- -void drcbe_x86::op_roland(x86code *&dst, const instruction &inst) +void drcbe_x86::op_roland(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4368,24 +3469,42 @@ void drcbe_x86::op_roland(x86code *&dst, const instruction &inst) be_parameter maskp(*this, inst.param(3), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, shiftp, maskp); + Gp const dstreg = dstp.select_register(eax, shiftp, maskp); // 32-bit form if (inst.size() == 4) { - emit_mov_r32_p32(dst, dstreg, srcp); // mov dstreg,srcp - emit_rol_r32_p32(dst, dstreg, shiftp, inst); // rol dstreg,shiftp - emit_and_r32_p32(dst, dstreg, maskp, inst); // and dstreg,maskp - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, srcp); // mov dstreg,srcp + shift_op_param(a, Inst::kIdRol, dstreg, shiftp, // rol dstreg,shiftp + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + alu_op_param(a, Inst::kIdAnd, dstreg, maskp, // and dstreg,maskp + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && !src.immediate()) + { + a.xor_(dst.as(), dst.as()); + return true; + } + else if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + return true; + + return false; + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } // 64-bit form else if (inst.size() == 8) { - emit_mov_r64_p64(dst, dstreg, REG_EDX, srcp); // mov edx:dstreg,srcp - emit_rol_r64_p64(dst, dstreg, REG_EDX, shiftp, inst); // rol edx:dstreg,shiftp - emit_and_r64_p64(dst, dstreg, REG_EDX, maskp, inst); // and edx:dstreg,maskp - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,edx:dstreg + emit_mov_r64_p64(a, dstreg, edx, srcp); // mov edx:dstreg,srcp + emit_rol_r64_p64(a, dstreg, edx, shiftp, inst); // rol edx:dstreg,shiftp + emit_and_r64_p64(a, dstreg, edx, maskp, inst); // and edx:dstreg,maskp + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -4394,7 +3513,7 @@ void drcbe_x86::op_roland(x86code *&dst, const instruction &inst) // op_rolins - process an ROLINS opcode //------------------------------------------------- -void drcbe_x86::op_rolins(x86code *&dst, const instruction &inst) +void drcbe_x86::op_rolins(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4408,89 +3527,93 @@ void drcbe_x86::op_rolins(x86code *&dst, const instruction &inst) be_parameter maskp(*this, inst.param(3), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_ECX, shiftp, maskp); + Gp const dstreg = dstp.select_register(ecx, shiftp, maskp); // 32-bit form if (inst.size() == 4) { - emit_mov_r32_p32(dst, REG_EAX, srcp); // mov eax,srcp - emit_rol_r32_p32(dst, REG_EAX, shiftp, inst); // rol eax,shiftp - emit_mov_r32_p32(dst, dstreg, dstp); // mov dstreg,dstp + emit_mov_r32_p32(a, eax, srcp); // mov eax,srcp + shift_op_param(a, Inst::kIdRol, eax, shiftp, // rol eax,shiftp + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_r32_p32(a, dstreg, dstp); // mov dstreg,dstp if (maskp.is_immediate()) { - emit_and_r32_imm(dst, REG_EAX, maskp.immediate()); // and eax,maskp - emit_and_r32_imm(dst, dstreg, ~maskp.immediate()); // and dstreg,~maskp + a.and_(eax, maskp.immediate()); // and eax,maskp + a.and_(dstreg, ~maskp.immediate()); // and dstreg,~maskp } else { - emit_mov_r32_p32(dst, REG_EDX, maskp); // mov edx,maskp - emit_and_r32_r32(dst, REG_EAX, REG_EDX); // and eax,edx - emit_not_r32(dst, REG_EDX); // not edx - emit_and_r32_r32(dst, dstreg, REG_EDX); // and dstreg,edx + emit_mov_r32_p32(a, edx, maskp); // mov edx,maskp + a.and_(eax, edx); // and eax,edx + a.not_(edx); // not edx + a.and_(dstreg, edx); // and dstreg,edx } - emit_or_r32_r32(dst, dstreg, REG_EAX); // or dstreg,eax - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + a.or_(dstreg, eax); // or dstreg,eax + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } // 64-bit form else if (inst.size() == 8) { - emit_mov_r64_p64(dst, REG_EAX, REG_EDX, srcp); // mov edx:eax,srcp - emit_rol_r64_p64(dst, REG_EAX, REG_EDX, shiftp, inst); // rol edx:eax,shiftp + emit_mov_r64_p64(a, eax, edx, srcp); // mov edx:eax,srcp + emit_rol_r64_p64(a, eax, edx, shiftp, inst); // rol edx:eax,shiftp if (maskp.is_immediate()) { - emit_and_r32_imm(dst, REG_EAX, maskp.immediate()); // and eax,maskp - emit_and_r32_imm(dst, REG_EDX, maskp.immediate() >> 32); // and edx,maskp >> 32 + a.and_(eax, maskp.immediate()); // and eax,maskp + a.and_(edx, maskp.immediate() >> 32); // and edx,maskp >> 32 if (dstp.is_int_register()) { - emit_and_r32_imm(dst, dstp.ireg(), ~maskp.immediate()); // and dstp.lo,~maskp - emit_and_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), ~maskp.immediate() >> 32);// and dstp.hi,~maskp >> 32 - emit_or_r32_r32(dst, dstp.ireg(), REG_EAX); // or dstp.lo,eax - emit_or_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // or dstp.hi,edx + a.and_(Gpd(dstp.ireg()), ~maskp.immediate()); // and dstp.lo,~maskp + a.and_(MABS(m_reghi[dstp.ireg()], 4), ~maskp.immediate() >> 32); // and dstp.hi,~maskp >> 32 + a.or_(Gpd(dstp.ireg()), eax); // or dstp.lo,eax + a.or_(MABS(m_reghi[dstp.ireg()]), edx); // or dstp.hi,edx } else { - emit_and_m32_imm(dst, MABS(dstp.memory()), ~maskp.immediate()); // and dstp.lo,~maskp - emit_and_m32_imm(dst, MABS(dstp.memory(4)), ~maskp.immediate() >> 32); // and dstp.hi,~maskp >> 32 - emit_or_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // or dstp.lo,eax - emit_or_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // or dstp.hi,edx + a.and_(MABS(dstp.memory(0), 4), ~maskp.immediate()); // and dstp.lo,~maskp + a.and_(MABS(dstp.memory(4), 4), ~maskp.immediate() >> 32); // and dstp.hi,~maskp >> 32 + a.or_(MABS(dstp.memory(0)), eax); // or dstp.lo,eax + a.or_(MABS(dstp.memory(4)), edx); // or dstp.hi,edx } } else { - int tempreg = REG_EBX; - emit_mov_m32_r32(dst, MBD(REG_ESP, -8), tempreg); // mov [esp-8],ebx - emit_mov_r64_p64(dst, tempreg, REG_ECX, maskp); // mov ecx:ebx,maskp - emit_and_r32_r32(dst, REG_EAX, tempreg); // and eax,ebx - emit_and_r32_r32(dst, REG_EDX, REG_ECX); // and edx,ecx - emit_not_r32(dst, tempreg); // not ebx - emit_not_r32(dst, REG_ECX); // not ecx + a.mov(ptr(esp, -8), ebx); // mov [esp-8],ebx + emit_mov_r64_p64(a, ebx, ecx, maskp); // mov ecx:ebx,maskp + a.and_(eax, ebx); // and eax,ebx + a.and_(edx, ecx); // and edx,ecx + a.not_(ebx); // not ebx + a.not_(ecx); // not ecx if (dstp.is_int_register()) { - emit_and_r32_r32(dst, dstp.ireg(), tempreg); // and dstp.lo,ebx - emit_and_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_ECX); // and dstp.hi,ecx - emit_or_r32_r32(dst, dstp.ireg(), REG_EAX); // or dstp.lo,eax - emit_or_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // or dstp.hi,edx + a.and_(Gpd(dstp.ireg()), ebx); // and dstp.lo,ebx + a.and_(MABS(m_reghi[dstp.ireg()]), ecx); // and dstp.hi,ecx + a.or_(Gpd(dstp.ireg()), eax); // or dstp.lo,eax + a.or_(MABS(m_reghi[dstp.ireg()]), edx); // or dstp.hi,edx } else { - emit_and_m32_r32(dst, MABS(dstp.memory()), tempreg); // and dstp.lo,ebx - emit_and_m32_r32(dst, MABS(dstp.memory(4)), REG_ECX); // and dstp.hi,ecx - emit_or_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // or dstp.lo,eax - emit_or_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // or dstp.hi,edx + a.and_(MABS(dstp.memory(0)), ebx); // and dstp.lo,ebx + a.and_(MABS(dstp.memory(4)), ecx); // and dstp.hi,ecx + a.or_(MABS(dstp.memory(0)), eax); // or dstp.lo,eax + a.or_(MABS(dstp.memory(4)), edx); // or dstp.hi,edx } - emit_mov_r32_m32(dst, tempreg, MBD(REG_ESP, -8)); // mov ebx,[esp-8] + a.mov(ebx, ptr(esp, -8)); // mov ebx,[esp-8] } if (inst.flags() == FLAG_Z) - emit_or_r32_r32(dst, REG_EAX, REG_EDX); // or eax,edx + a.or_(eax, edx); // or eax,edx else if (inst.flags() == FLAG_S) ;// do nothing -- final OR will have the right result else if (inst.flags() == (FLAG_Z | FLAG_S)) { - emit_movzx_r32_r16(dst, REG_ECX, REG_AX); // movzx ecx,ax - emit_shr_r32_imm(dst, REG_EAX, 16); // shr eax,16 - emit_or_r32_r32(dst, REG_EDX, REG_ECX); // or edx,ecx - emit_or_r32_r32(dst, REG_EDX, REG_EAX); // or edx,eax + a.movzx(ecx, ax); // movzx ecx,ax + a.shr(eax, 16); // shr eax,16 + a.or_(edx, ecx); // or edx,ecx + a.or_(edx, eax); // or edx,eax } } } @@ -4500,7 +3623,7 @@ void drcbe_x86::op_rolins(x86code *&dst, const instruction &inst) // op_add - process a ADD opcode //------------------------------------------------- -void drcbe_x86::op_add(x86code *&dst, const instruction &inst) +void drcbe_x86::op_add(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4514,29 +3637,39 @@ void drcbe_x86::op_add(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_add_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // add [dstp],src2p + alu_op_param(a, Inst::kIdAdd, MABS(dstp.memory(), 4), src2p, // add [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // reg = reg + imm - else if (dstp.is_int_register() && src1p.is_int_register() && src2p.is_immediate() && inst.flags() == 0) - emit_lea_r32_m32(dst, dstp.ireg(), MBD(src1p.ireg(), src2p.immediate())); // lea dstp,[src1p+src2p] + else if (dstp.is_int_register() && src1p.is_int_register() && src2p.is_immediate() && !inst.flags()) + a.lea(Gpd(dstp.ireg()), ptr(Gpd(src1p.ireg()), src2p.immediate())); // lea dstp,[src1p+src2p] // reg = reg + reg - else if (dstp.is_int_register() && src1p.is_int_register() && src2p.is_int_register() && inst.flags() == 0) - emit_lea_r32_m32(dst, dstp.ireg(), MBISD(src1p.ireg(), src2p.ireg(), 1, 0)); // lea dstp,[src1p+src2p] + else if (dstp.is_int_register() && src1p.is_int_register() && src2p.is_int_register() && !inst.flags()) + a.lea(Gpd(dstp.ireg()), ptr(Gpd(src1p.ireg()), Gpd(src2p.ireg()))); // lea dstp,[src1p+src2p] // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_add_r32_p32(dst, dstreg, src2p, inst); // add dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdAdd, dstreg, src2p, // add dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -4545,14 +3678,16 @@ void drcbe_x86::op_add(x86code *&dst, const instruction &inst) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_add_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // add [dstp],src2p + alu_op_param(a, Inst::kIdAdd, Inst::kIdAdc, // add [dstp],src2p + MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), src2p, inst.flags() & FLAG_Z); // general case else { - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_add_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // add dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + alu_op_param(a, Inst::kIdAdd, Inst::kIdAdc, // add edx:dstreg,src2p + dstreg, edx, src2p, inst.flags() & FLAG_Z); + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } } @@ -4562,7 +3697,7 @@ void drcbe_x86::op_add(x86code *&dst, const instruction &inst) // op_addc - process a ADDC opcode //------------------------------------------------- -void drcbe_x86::op_addc(x86code *&dst, const instruction &inst) +void drcbe_x86::op_addc(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4576,21 +3711,21 @@ void drcbe_x86::op_addc(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_adc_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // adc [dstp],src2p + alu_op_param(a, Inst::kIdAdc, MABS(dstp.memory(), 4), src2p); // adc [dstp],src2p // general case else { - emit_mov_r32_p32_keepflags(dst, dstreg, src1p); // mov dstreg,src1p - emit_adc_r32_p32(dst, dstreg, src2p, inst); // adc dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32_keepflags(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdAdc, dstreg, src2p); // adc dstreg,src2p + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -4599,14 +3734,16 @@ void drcbe_x86::op_addc(x86code *&dst, const instruction &inst) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_adc_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // adc [dstp],src2p + alu_op_param(a, Inst::kIdAdc, Inst::kIdAdc, // adc [dstp],src2p + MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), src2p, inst.flags() & FLAG_Z); // general case else { - emit_mov_r64_p64_keepflags(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_adc_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // adc dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64_keepflags(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + alu_op_param(a, Inst::kIdAdc, Inst::kIdAdc, // adc edx:dstreg,src2p + dstreg, edx, src2p, inst.flags() & FLAG_Z); + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } } @@ -4616,7 +3753,7 @@ void drcbe_x86::op_addc(x86code *&dst, const instruction &inst) // op_sub - process a SUB opcode //------------------------------------------------- -void drcbe_x86::op_sub(x86code *&dst, const instruction &inst) +void drcbe_x86::op_sub(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4629,25 +3766,35 @@ void drcbe_x86::op_sub(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_sub_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // sub [dstp],src2p + alu_op_param(a, Inst::kIdSub, MABS(dstp.memory(), 4), src2p, // sub [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // reg = reg - imm - else if (dstp.is_int_register() && src1p.is_int_register() && src2p.is_immediate() && inst.flags() == 0) - emit_lea_r32_m32(dst, dstp.ireg(), MBD(src1p.ireg(), -src2p.immediate())); // lea dstp,[src1p-src2p] + else if (dstp.is_int_register() && src1p.is_int_register() && src2p.is_immediate() && !inst.flags()) + a.lea(Gpd(dstp.ireg()), ptr(Gpd(src1p.ireg()), -src2p.immediate())); // lea dstp,[src1p-src2p] // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_sub_r32_p32(dst, dstreg, src2p, inst); // sub dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdSub, dstreg, src2p, // sub dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -4656,14 +3803,16 @@ void drcbe_x86::op_sub(x86code *&dst, const instruction &inst) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_sub_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // sub [dstp],src2p + alu_op_param(a, Inst::kIdSub, Inst::kIdSbb, // sub [dstp],src2p + MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), src2p, inst.flags() & FLAG_Z); // general case else { - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_sub_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // sub dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + alu_op_param(a, Inst::kIdSub, Inst::kIdSbb, // sub edx:dstreg,src2p + dstreg, edx, src2p, inst.flags() & FLAG_Z); + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } } @@ -4673,7 +3822,7 @@ void drcbe_x86::op_sub(x86code *&dst, const instruction &inst) // op_subc - process a SUBC opcode //------------------------------------------------- -void drcbe_x86::op_subc(x86code *&dst, const instruction &inst) +void drcbe_x86::op_subc(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4686,21 +3835,21 @@ void drcbe_x86::op_subc(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_sbb_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // sbb [dstp],src2p + alu_op_param(a, Inst::kIdSbb, MABS(dstp.memory(), 4), src2p); // sbb [dstp],src2p // general case else { - emit_mov_r32_p32_keepflags(dst, dstreg, src1p); // mov dstreg,src1p - emit_sbb_r32_p32(dst, dstreg, src2p, inst); // sbb dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32_keepflags(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdSbb, dstreg, src2p); // sbb dstreg,src2p + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -4709,14 +3858,16 @@ void drcbe_x86::op_subc(x86code *&dst, const instruction &inst) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_sbb_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // sbb [dstp],src2p + alu_op_param(a, Inst::kIdSbb, Inst::kIdSbb, // sbb [dstp],src2p + MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), src2p, inst.flags() & FLAG_Z); // general case else { - emit_mov_r64_p64_keepflags(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_sbb_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // sbb dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64_keepflags(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + alu_op_param(a, Inst::kIdSbb, Inst::kIdSbb, // sbb edx:dstreg,src2p + dstreg, edx, src2p, inst.flags() & FLAG_Z); + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } } @@ -4726,7 +3877,7 @@ void drcbe_x86::op_subc(x86code *&dst, const instruction &inst) // op_cmp - process a CMP opcode //------------------------------------------------- -void drcbe_x86::op_cmp(x86code *&dst, const instruction &inst) +void drcbe_x86::op_cmp(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -4738,21 +3889,21 @@ void drcbe_x86::op_cmp(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(1), PTYPE_MRI); // pick a target register for the general case - int src1reg = src1p.select_register(REG_EAX); + Gp const src1reg = src1p.select_register(eax); // 32-bit form if (inst.size() == 4) { // memory versus anything if (src1p.is_memory()) - emit_cmp_m32_p32(dst, MABS(src1p.memory()), src2p, inst); // cmp [dstp],src2p + alu_op_param(a, Inst::kIdCmp, MABS(src1p.memory(), 4), src2p); // cmp [src1p],src2p // general case else { if (src1p.is_immediate()) - emit_mov_r32_imm(dst, src1reg, src1p.immediate()); // mov src1reg,imm - emit_cmp_r32_p32(dst, src1reg, src2p, inst); // cmp src1reg,src2p + a.mov(src1reg, src1p.immediate()); // mov src1reg,imm + alu_op_param(a, Inst::kIdCmp, src1reg, src2p); // cmp src1reg,src2p } } @@ -4760,8 +3911,11 @@ void drcbe_x86::op_cmp(x86code *&dst, const instruction &inst) else { // general case - emit_mov_r64_p64(dst, REG_EAX, REG_EDX, src1p); // mov eax:dstp,[src1p] - emit_cmp_r64_p64(dst, REG_EAX, REG_EDX, src2p, inst); // cmp eax:dstp,src2p + emit_mov_r64_p64(a, eax, edx, src1p); // mov edx:eax,[src1p] + alu_op_param(a, Inst::kIdSub, Inst::kIdSbb, // cmp edx:eax,src2p + eax, edx, src2p, (inst.flags() & FLAG_Z) && (inst.flags() != FLAG_Z)); + if (inst.flags() == FLAG_Z) + a.or_(edx, eax); } } @@ -4770,7 +3924,7 @@ void drcbe_x86::op_cmp(x86code *&dst, const instruction &inst) // op_mulu - process a MULU opcode //------------------------------------------------- -void drcbe_x86::op_mulu(x86code *&dst, const instruction &inst) +void drcbe_x86::op_mulu(Assembler &a, const instruction &inst) { uint8_t zsflags = inst.flags() & (FLAG_Z | FLAG_S); uint8_t vflag = inst.flags() & FLAG_V; @@ -4792,19 +3946,19 @@ void drcbe_x86::op_mulu(x86code *&dst, const instruction &inst) if (inst.size() == 4) { // general case - emit_mov_r32_p32(dst, REG_EAX, src1p); // mov eax,src1p + emit_mov_r32_p32(a, eax, src1p); // mov eax,src1p if (src2p.is_memory()) - emit_mul_m32(dst, MABS(src2p.memory())); // mul [src2p] + a.mul(MABS(src2p.memory(), 4)); // mul [src2p] else if (src2p.is_int_register()) - emit_mul_r32(dst, src2p.ireg()); // mul src2p + a.mul(Gpd(src2p.ireg())); // mul src2p else if (src2p.is_immediate()) { - emit_mov_r32_imm(dst, REG_EDX, src2p.immediate()); // mov edx,src2p - emit_mul_r32(dst, REG_EDX); // mul edx + a.mov(edx, src2p.immediate()); // mov edx,src2p + a.mul(edx); // mul edx } - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax if (compute_hi) - emit_mov_p32_r32(dst, edstp, REG_EDX); // mov edstp,edx + emit_mov_p32_r32(a, edstp, edx); // mov edstp,edx // compute flags if (inst.flags() != 0) @@ -4812,32 +3966,32 @@ void drcbe_x86::op_mulu(x86code *&dst, const instruction &inst) if (zsflags != 0) { if (vflag) - emit_pushf(dst); // pushf + a.pushfd(); // pushf if (compute_hi) { if (zsflags == FLAG_Z) - emit_or_r32_r32(dst, REG_EDX, REG_EAX); // or edx,eax + a.or_(edx, eax); // or edx,eax else if (zsflags == FLAG_S) - emit_test_r32_r32(dst, REG_EDX, REG_EDX); // test edx,edx + a.test(edx, edx); // test edx,edx else { - emit_movzx_r32_r16(dst, REG_ECX, REG_AX); // movzx ecx,ax - emit_shr_r32_imm(dst, REG_EAX, 16); // shr eax,16 - emit_or_r32_r32(dst, REG_EDX, REG_ECX); // or edx,ecx - emit_or_r32_r32(dst, REG_EDX, REG_EAX); // or edx,eax + a.movzx(ecx, ax); // movzx ecx,ax + a.shr(eax, 16); // shr eax,16 + a.or_(edx, ecx); // or edx,ecx + a.or_(edx, eax); // or edx,eax } } else - emit_test_r32_r32(dst, REG_EAX, REG_EAX); // test eax,eax + a.test(eax, eax); // test eax,eax // we rely on the fact that OF is cleared by all logical operations above if (vflag) { - emit_pushf(dst); // pushf - emit_pop_r32(dst, REG_EAX); // pop eax - emit_and_m32_imm(dst, MBD(REG_ESP, 0), ~0x84); // and [esp],~0x84 - emit_or_m32_r32(dst, MBD(REG_ESP, 0), REG_EAX); // or [esp],eax - emit_popf(dst); // popf + a.pushfd(); // pushf + a.pop(eax); // pop eax + a.and_(dword_ptr(esp, 0), ~0x84); // and [esp],~0x84 + a.or_(ptr(esp, 0), eax); // or [esp],eax + a.popfd(); // popf } } } @@ -4847,28 +4001,28 @@ void drcbe_x86::op_mulu(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_m32_imm(dst, MBD(REG_ESP, 24), inst.flags()); // mov [esp+24],flags - emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p + a.mov(dword_ptr(esp, 24), inst.flags()); // mov [esp+24],flags + emit_mov_m64_p64(a, qword_ptr(esp, 16), src2p); // mov [esp+16],src2p + emit_mov_m64_p64(a, qword_ptr(esp, 8), src1p); // mov [esp+8],src1p if (!compute_hi) - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo + a.mov(dword_ptr(esp, 4), imm(&m_reslo)); // mov [esp+4],&reslo else - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // mov [esp+4],&reshi - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo - emit_call(dst, (x86code *)dmulu); // call dmulu + a.mov(dword_ptr(esp, 4), imm(&m_reshi)); // mov [esp+4],&reshi + a.mov(dword_ptr(esp, 0), imm(&m_reslo)); // mov [esp],&reslo + a.call(imm(dmulu)); // call dmulu if (inst.flags() != 0) - emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4] - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo - emit_mov_r32_m32(dst, REG_EDX, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi - emit_mov_p64_r64(dst, dstp, REG_EAX, REG_EDX); // mov dstp,edx:eax + a.push(ptr(u64(flags_unmap), eax, 2)); // push flags_unmap[eax*4] + a.mov(eax, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo + a.mov(edx, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi + emit_mov_p64_r64(a, dstp, eax, edx); // mov dstp,edx:eax if (compute_hi) { - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo - emit_mov_r32_m32(dst, REG_ECX, MABS((uint32_t *)&m_reshi + 1)); // mov ecx,reshi.hi - emit_mov_p64_r64(dst, edstp, REG_EAX, REG_ECX); // mov edstp,ecx:eax + a.mov(eax, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo + a.mov(ecx, MABS((uint32_t *)&m_reshi + 1)); // mov ecx,reshi.hi + emit_mov_p64_r64(a, edstp, eax, ecx); // mov edstp,ecx:eax } if (inst.flags() != 0) - emit_popf(dst); // popf + a.popfd(); // popf } } @@ -4877,7 +4031,7 @@ void drcbe_x86::op_mulu(x86code *&dst, const instruction &inst) // op_muls - process a MULS opcode //------------------------------------------------- -void drcbe_x86::op_muls(x86code *&dst, const instruction &inst) +void drcbe_x86::op_muls(Assembler &a, const instruction &inst) { uint8_t zsflags = inst.flags() & (FLAG_Z | FLAG_S); uint8_t vflag = inst.flags() & FLAG_V; @@ -4902,38 +4056,38 @@ void drcbe_x86::op_muls(x86code *&dst, const instruction &inst) if (!compute_hi && !src1p.is_immediate() && src2p.is_immediate()) { if (src1p.is_memory()) - emit_imul_r32_m32_imm(dst, REG_EAX, MABS(src1p.memory()), src2p.immediate()); // imul eax,[src1p],src2p + a.imul(eax, MABS(src1p.memory(), 4), src2p.immediate()); // imul eax,[src1p],src2p else if (src1p.is_int_register()) - emit_imul_r32_r32_imm(dst, REG_EAX, src1p.ireg(), src2p.immediate()); // imul eax,src1p,src2p - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax + a.imul(eax, Gpd(src1p.ireg()), src2p.immediate()); // imul eax,src1p,src2p + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax } // 32-bit destination, general case else if (!compute_hi) { - emit_mov_r32_p32(dst, REG_EAX, src1p); // mov eax,src1p + emit_mov_r32_p32(a, eax, src1p); // mov eax,src1p if (src2p.is_memory()) - emit_imul_r32_m32(dst, REG_EAX, MABS(src2p.memory())); // imul eax,[src2p] + a.imul(eax, MABS(src2p.memory(), 4)); // imul eax,[src2p] else if (src2p.is_int_register()) - emit_imul_r32_r32(dst, REG_EAX, src2p.ireg()); // imul eax,src2p - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax + a.imul(eax, Gpd(src2p.ireg())); // imul eax,src2p + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax } // 64-bit destination, general case else { - emit_mov_r32_p32(dst, REG_EAX, src1p); // mov eax,src1p + emit_mov_r32_p32(a, eax, src1p); // mov eax,src1p if (src2p.is_memory()) - emit_imul_m32(dst, MABS(src2p.memory())); // imul [src2p] + a.imul(MABS(src2p.memory(), 4)); // imul [src2p] else if (src2p.is_int_register()) - emit_imul_r32(dst, src2p.ireg()); // imul src2p + a.imul(Gpd(src2p.ireg())); // imul src2p else if (src2p.is_immediate()) { - emit_mov_r32_imm(dst, REG_EDX, src2p.immediate()); // mov edx,src2p - emit_imul_r32(dst, REG_EDX); // imul edx + a.mov(edx, src2p.immediate()); // mov edx,src2p + a.imul(edx); // imul edx } - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax - emit_mov_p32_r32(dst, edstp, REG_EDX); // mov edstp,edx + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax + emit_mov_p32_r32(a, edstp, edx); // mov edstp,edx } // compute flags @@ -4942,32 +4096,32 @@ void drcbe_x86::op_muls(x86code *&dst, const instruction &inst) if (zsflags != 0) { if (vflag) - emit_pushf(dst); // pushf + a.pushfd(); // pushf if (compute_hi) { if (inst.flags() == FLAG_Z) - emit_or_r32_r32(dst, REG_EDX, REG_EAX); // or edx,eax + a.or_(edx, eax); // or edx,eax else if (inst.flags() == FLAG_S) - emit_test_r32_r32(dst, REG_EDX, REG_EDX); // test edx,edx + a.test(edx, edx); // test edx,edx else { - emit_movzx_r32_r16(dst, REG_ECX, REG_AX); // movzx ecx,ax - emit_shr_r32_imm(dst, REG_EAX, 16); // shr eax,16 - emit_or_r32_r32(dst, REG_EDX, REG_ECX); // or edx,ecx - emit_or_r32_r32(dst, REG_EDX, REG_EAX); // or edx,eax + a.movzx(ecx, ax); // movzx ecx,ax + a.shr(eax, 16); // shr eax,16 + a.or_(edx, ecx); // or edx,ecx + a.or_(edx, eax); // or edx,eax } } else - emit_test_r32_r32(dst, REG_EAX, REG_EAX); // test eax,eax + a.test(eax, eax); // test eax,eax // we rely on the fact that OF is cleared by all logical operations above if (vflag) { - emit_pushf(dst); // pushf - emit_pop_r32(dst, REG_EAX); // pop eax - emit_and_m32_imm(dst, MBD(REG_ESP, 0), ~0x84); // and [esp],~0x84 - emit_or_m32_r32(dst, MBD(REG_ESP, 0), REG_EAX); // or [esp],eax - emit_popf(dst); // popf + a.pushfd(); // pushf + a.pop(eax); // pop eax + a.and_(dword_ptr(esp, 0), ~0x84); // and [esp],~0x84 + a.or_(ptr(esp, 0), eax); // or [esp],eax + a.popfd(); // popf } } } @@ -4977,28 +4131,28 @@ void drcbe_x86::op_muls(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_m32_imm(dst, MBD(REG_ESP, 24), inst.flags()); // mov [esp+24],flags - emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p + a.mov(dword_ptr(esp, 24), inst.flags()); // mov [esp+24],flags + emit_mov_m64_p64(a, qword_ptr(esp, 16), src2p); // mov [esp+16],src2p + emit_mov_m64_p64(a, qword_ptr(esp, 8), src1p); // mov [esp+8],src1p if (!compute_hi) - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo + a.mov(dword_ptr(esp, 4), imm(&m_reslo)); // mov [esp+4],&reslo else - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // push [esp+4],&reshi - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo - emit_call(dst, (x86code *)dmuls); // call dmuls + a.mov(dword_ptr(esp, 4), imm(&m_reshi)); // push [esp+4],&reshi + a.mov(dword_ptr(esp, 0), imm(&m_reslo)); // mov [esp],&reslo + a.call(imm(dmuls)); // call dmuls if (inst.flags() != 0) - emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4] - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo - emit_mov_r32_m32(dst, REG_EDX, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi - emit_mov_p64_r64(dst, dstp, REG_EAX, REG_EDX); // mov dstp,edx:eax + a.push(ptr(u64(flags_unmap), eax, 2)); // push flags_unmap[eax*4] + a.mov(eax, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo + a.mov(edx, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi + emit_mov_p64_r64(a, dstp, eax, edx); // mov dstp,edx:eax if (compute_hi) { - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo - emit_mov_r32_m32(dst, REG_EDX, MABS((uint32_t *)&m_reshi + 1)); // mov edx,reshi.hi - emit_mov_p64_r64(dst, edstp, REG_EAX, REG_EDX); // mov edstp,edx:eax + a.mov(eax, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo + a.mov(edx, MABS((uint32_t *)&m_reshi + 1)); // mov edx,reshi.hi + emit_mov_p64_r64(a, edstp, eax, edx); // mov edstp,edx:eax } if (inst.flags() != 0) - emit_popf(dst); // popf + a.popfd(); // popf } } @@ -5007,7 +4161,7 @@ void drcbe_x86::op_muls(x86code *&dst, const instruction &inst) // op_divu - process a DIVU opcode //------------------------------------------------- -void drcbe_x86::op_divu(x86code *&dst, const instruction &inst) +void drcbe_x86::op_divu(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5025,50 +4179,51 @@ void drcbe_x86::op_divu(x86code *&dst, const instruction &inst) if (inst.size() == 4) { // general case - emit_mov_r32_p32(dst, REG_ECX, src2p); // mov ecx,src2p + emit_mov_r32_p32(a, ecx, src2p); // mov ecx,src2p if (inst.flags() != 0) { - emit_mov_r32_imm(dst, REG_EAX, 0xa0000000); // mov eax,0xa0000000 - emit_add_r32_r32(dst, REG_EAX, REG_EAX); // add eax,eax + a.mov(eax, 0xa0000000); // mov eax,0xa0000000 + a.add(eax, eax); // add eax,eax } - emit_link skip; - emit_jecxz_link(dst, skip); // jecxz skip - emit_mov_r32_p32(dst, REG_EAX, src1p); // mov eax,src1p - emit_xor_r32_r32(dst, REG_EDX, REG_EDX); // xor edx,edx - emit_div_r32(dst, REG_ECX); // div ecx - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax + Label skip = a.newLabel(); + a.jecxz(skip); // jecxz skip + emit_mov_r32_p32(a, eax, src1p); // mov eax,src1p + a.xor_(edx, edx); // xor edx,edx + a.div(ecx); // div ecx + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax if (compute_rem) - emit_mov_p32_r32(dst, edstp, REG_EDX); // mov edstp,edx + emit_mov_p32_r32(a, edstp, edx); // mov edstp,edx if (inst.flags() != 0) - emit_test_r32_r32(dst, REG_EAX, REG_EAX); // test eax,eax - track_resolve_link(dst, skip); // skip: + a.test(eax, eax); // test eax,eax + a.bind(skip); // skip: + reset_last_upper_lower_reg(); } // 64-bit form else if (inst.size() == 8) { // general case - emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p + emit_mov_m64_p64(a, qword_ptr(esp, 16), src2p); // mov [esp+16],src2p + emit_mov_m64_p64(a, qword_ptr(esp, 8), src1p); // mov [esp+8],src1p if (!compute_rem) - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo + a.mov(dword_ptr(esp, 4), imm(&m_reslo)); // mov [esp+4],&reslo else - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // push [esp+4],&reshi - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo - emit_call(dst, (x86code *)ddivu); // call ddivu + a.mov(dword_ptr(esp, 4), imm(&m_reshi)); // push [esp+4],&reshi + a.mov(dword_ptr(esp, 0), imm(&m_reslo)); // mov [esp],&reslo + a.call(imm(ddivu)); // call ddivu if (inst.flags() != 0) - emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4] - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo - emit_mov_r32_m32(dst, REG_EDX, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi - emit_mov_p64_r64(dst, dstp, REG_EAX, REG_EDX); // mov dstp,edx:eax + a.push(ptr(u64(flags_unmap), eax, 2)); // push flags_unmap[eax*4] + a.mov(eax, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo + a.mov(edx, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi + emit_mov_p64_r64(a, dstp, eax, edx); // mov dstp,edx:eax if (compute_rem) { - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo - emit_mov_r32_m32(dst, REG_EDX, MABS((uint32_t *)&m_reshi + 1)); // mov edx,reshi.hi - emit_mov_p64_r64(dst, edstp, REG_EAX, REG_EDX); // mov edstp,edx:eax + a.mov(eax, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo + a.mov(edx, MABS((uint32_t *)&m_reshi + 1)); // mov edx,reshi.hi + emit_mov_p64_r64(a, edstp, eax, edx); // mov edstp,edx:eax } if (inst.flags() != 0) - emit_popf(dst); // popf + a.popfd(); // popf } } @@ -5077,7 +4232,7 @@ void drcbe_x86::op_divu(x86code *&dst, const instruction &inst) // op_divs - process a DIVS opcode //------------------------------------------------- -void drcbe_x86::op_divs(x86code *&dst, const instruction &inst) +void drcbe_x86::op_divs(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5095,50 +4250,51 @@ void drcbe_x86::op_divs(x86code *&dst, const instruction &inst) if (inst.size() == 4) { // general case - emit_mov_r32_p32(dst, REG_ECX, src2p); // mov ecx,src2p + emit_mov_r32_p32(a, ecx, src2p); // mov ecx,src2p if (inst.flags() != 0) { - emit_mov_r32_imm(dst, REG_EAX, 0xa0000000); // mov eax,0xa0000000 - emit_add_r32_r32(dst, REG_EAX, REG_EAX); // add eax,eax + a.mov(eax, 0xa0000000); // mov eax,0xa0000000 + a.add(eax, eax); // add eax,eax } - emit_link skip; - emit_jecxz_link(dst, skip); // jecxz skip - emit_mov_r32_p32(dst, REG_EAX, src1p); // mov eax,src1p - emit_cdq(dst); // cdq - emit_idiv_r32(dst, REG_ECX); // idiv ecx - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax + Label skip = a.newLabel(); + a.jecxz(skip); // jecxz skip + emit_mov_r32_p32(a, eax, src1p); // mov eax,src1p + a.cdq(); // cdq + a.idiv(ecx); // idiv ecx + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax if (compute_rem) - emit_mov_p32_r32(dst, edstp, REG_EDX); // mov edstp,edx + emit_mov_p32_r32(a, edstp, edx); // mov edstp,edx if (inst.flags() != 0) - emit_test_r32_r32(dst, REG_EAX, REG_EAX); // test eax,eax - track_resolve_link(dst, skip); // skip: + a.test(eax, eax); // test eax,eax + a.bind(skip); // skip: + reset_last_upper_lower_reg(); } // 64-bit form else if (inst.size() == 8) { // general case - emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p + emit_mov_m64_p64(a, qword_ptr(esp, 16), src2p); // mov [esp+16],src2p + emit_mov_m64_p64(a, qword_ptr(esp, 8), src1p); // mov [esp+8],src1p if (!compute_rem) - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo + a.mov(dword_ptr(esp, 4), imm(&m_reslo)); // mov [esp+4],&reslo else - emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // push [esp+4],&reshi - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo - emit_call(dst, (x86code *)ddivs); // call ddivs + a.mov(dword_ptr(esp, 4), imm(&m_reshi)); // push [esp+4],&reshi + a.mov(dword_ptr(esp, 0), imm(&m_reslo)); // mov [esp],&reslo + a.call(imm(ddivs)); // call ddivs if (inst.flags() != 0) - emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4] - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo - emit_mov_r32_m32(dst, REG_EDX, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi - emit_mov_p64_r64(dst, dstp, REG_EAX, REG_EDX); // mov dstp,edx:eax + a.push(ptr(u64(flags_unmap), eax, 2)); // push flags_unmap[eax*4] + a.mov(eax, MABS((uint32_t *)&m_reslo + 0)); // mov eax,reslo.lo + a.mov(edx, MABS((uint32_t *)&m_reslo + 1)); // mov edx,reslo.hi + emit_mov_p64_r64(a, dstp, eax, edx); // mov dstp,edx:eax if (compute_rem) { - emit_mov_r32_m32(dst, REG_EAX, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo - emit_mov_r32_m32(dst, REG_EDX, MABS((uint32_t *)&m_reshi + 1)); // mov edx,reshi.hi - emit_mov_p64_r64(dst, edstp, REG_EAX, REG_EDX); // mov edstp,edx:eax + a.mov(eax, MABS((uint32_t *)&m_reshi + 0)); // mov eax,reshi.lo + a.mov(edx, MABS((uint32_t *)&m_reshi + 1)); // mov edx,reshi.hi + emit_mov_p64_r64(a, edstp, eax, edx); // mov edstp,edx:eax } if (inst.flags() != 0) - emit_popf(dst); // popf + a.popfd(); // popf } } @@ -5147,7 +4303,7 @@ void drcbe_x86::op_divs(x86code *&dst, const instruction &inst) // op_and - process a AND opcode //------------------------------------------------- -void drcbe_x86::op_and(x86code *&dst, const instruction &inst) +void drcbe_x86::op_and(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5161,41 +4317,93 @@ void drcbe_x86::op_and(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_and_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // and [dstp],src2p + alu_op_param(a, Inst::kIdAnd, MABS(dstp.memory(), 4), src2p, // and [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && !src.immediate()) + { + a.mov(dst.as(), imm(0)); + return true; + } + else if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + return true; + + return false; + }); + + // dstp == src2p in memory + else if (dstp.is_memory() && dstp == src2p) + alu_op_param(a, Inst::kIdAnd, MABS(dstp.memory(), 4), src1p, // and [dstp],src1p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && !src.immediate()) + { + a.mov(dst.as(), imm(0)); + return true; + } + else if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + return true; + + return false; + }); // AND with immediate 0xff - else if (src2p.is_immediate_value(0xff) && inst.flags() == 0) + else if (src2p.is_immediate_value(0xff) && !inst.flags()) { if (src1p.is_int_register()) - emit_movzx_r32_r8(dst, dstreg, src1p.ireg()); // movzx dstreg,src1p + { + if (src1p.ireg() & 4) + { + if (dstreg.id() != src1p.ireg()) + a.mov(dstreg, Gpd(src1p.ireg())); // mov dstreg,src1p + a.and_(dstreg, 0xff); // and dstreg,0xff + } + else + a.movzx(dstreg, GpbLo(src1p.ireg())); // movzx dstreg,src1p + } else if (src1p.is_memory()) - emit_movzx_r32_m8(dst, dstreg, MABS(src1p.memory())); // movzx dstreg,[src1p] - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + a.movzx(dstreg, MABS(src1p.memory(), 1)); // movzx dstreg,[src1p] + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } // AND with immediate 0xffff - else if (src2p.is_immediate_value(0xffff) && inst.flags() == 0) + else if (src2p.is_immediate_value(0xffff) && !inst.flags()) { if (src1p.is_int_register()) - emit_movzx_r32_r16(dst, dstreg, src1p.ireg()); // movzx dstreg,src1p + a.movzx(dstreg, Gpw(src1p.ireg())); // movzx dstreg,src1p else if (src1p.is_memory()) - emit_movzx_r32_m16(dst, dstreg, MABS(src1p.memory())); // movzx dstreg,[src1p] - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + a.movzx(dstreg, MABS(src1p.memory(), 2)); // movzx dstreg,[src1p] + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_and_r32_p32(dst, dstreg, src2p, inst); // and dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdAnd, dstreg, src2p, // and dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && !src.immediate()) + { + a.xor_(dst.as(), dst.as()); + return true; + } + else if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + return true; + + return false; + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5204,79 +4412,107 @@ void drcbe_x86::op_and(x86code *&dst, const instruction &inst) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_and_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // and [dstp],src2p + emit_and_m64_p64(a, MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), // and [dstp],src2p + src2p, inst); + + // dstp == src2p in memory + else if (dstp.is_memory() && dstp == src2p) + emit_and_m64_p64(a, MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), // and [dstp],src1p + src1p, inst); // AND with immediate 0xff - else if (src2p.is_immediate_value(0xff) && inst.flags() == 0) + else if (src2p.is_immediate_value(0xff) && !inst.flags()) { if (src1p.is_int_register()) - emit_movzx_r32_r8(dst, dstreg, src1p.ireg()); // movzx dstreg,src1p + { + if (src1p.ireg() & 4) + { + if (dstreg.id() != src1p.ireg()) + a.mov(dstreg, Gpd(src1p.ireg())); // mov dstreg,src1p + a.and_(dstreg, 0xff); // and dstreg,0xff + } + else + a.movzx(dstreg, GpbLo(src1p.ireg())); // movzx dstreg,src1p + } else if (src1p.is_memory()) - emit_movzx_r32_m8(dst, dstreg, MABS(src1p.memory())); // movzx dstreg,[src1p] - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + a.movzx(dstreg, MABS(src1p.memory(), 1)); // movzx dstreg,[src1p] + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov dsthi,0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov dsthi,0 else if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov dsthi,0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov dsthi,0 } // AND with immediate 0xffff - else if (src2p.is_immediate_value(0xffff) && inst.flags() == 0) + else if (src2p.is_immediate_value(0xffff) && !inst.flags()) { if (src1p.is_int_register()) - emit_movzx_r32_r16(dst, dstreg, src1p.ireg()); // movzx dstreg,src1p + a.movzx(dstreg, Gpw(src1p.ireg())); // movzx dstreg,src1p else if (src1p.is_memory()) - emit_movzx_r32_m16(dst, dstreg, MABS(src1p.memory())); // movzx dstreg,[src1p] - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + a.movzx(dstreg, MABS(src1p.memory(), 2)); // movzx dstreg,[src1p] + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov dsthi,0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov dsthi,0 else if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov dsthi,0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov dsthi,0 } // AND with immediate 0xffffffff - else if (src2p.is_immediate_value(0xffffffff) && inst.flags() == 0) + else if (src2p.is_immediate_value(0xffffffffU) && !inst.flags()) { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov dsthi,0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov dsthi,0 else if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov dsthi,0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov dsthi,0 } // AND with immediate 0xffffffff00000000 - else if (src2p.is_immediate_value(0xffffffff00000000U) && inst.flags() == 0) + else if (src2p.is_immediate_value(0xffffffff00000000ULL) && !inst.flags()) { if (src1p != dstp) { - emit_mov_r64_p64(dst, REG_NONE, REG_EDX, src1p); // mov dstreg,src1p - emit_mov_p64_r64(dst, dstp, REG_NONE, REG_EDX); // mov dstp,dstreg + emit_mov_r64_p64(a, Gp(), edx, src1p); // mov dstreg,src1p + emit_mov_p64_r64(a, dstp, Gp(), edx); // mov dstp,dstreg } if (dstp.is_int_register()) - emit_xor_r32_r32(dst, dstp.ireg(), dstp.ireg()); // xor dstlo,dstlo + a.xor_(Gpd(dstp.ireg()), Gpd(dstp.ireg())); // xor dstlo,dstlo else if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory()), 0); // mov dstlo,0 + a.mov(MABS(dstp.memory(0), 4), 0); // mov dstlo,0 } // AND with immediate <= 0xffffffff - else if (src2p.is_immediate() && src2p.immediate() <= 0xffffffff && inst.flags() == 0) + else if (src2p.is_immediate() && src2p.immediate() <= 0xffffffffU && !inst.flags()) { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_and_r32_p32(dst, dstreg, src2p, inst); // and dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdAnd, dstreg, src2p, // and dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && !src.immediate()) + { + a.xor_(dst.as(), dst.as()); + return true; + } + else if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + return true; + + return false; + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg if (dstp.is_int_register()) - emit_mov_m32_imm(dst, MABS(m_reghi[dstp.ireg()]), 0); // mov dsthi,0 + a.mov(MABS(m_reghi[dstp.ireg()], 4), 0); // mov dsthi,0 else if (dstp.is_memory()) - emit_mov_m32_imm(dst, MABS(dstp.memory(4)), 0); // mov dsthi,0 + a.mov(MABS(dstp.memory(4), 4), 0); // mov dsthi,0 } // general case else { - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_and_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // and dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_and_r64_p64(a, dstreg, edx, src2p, inst); // and edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } } @@ -5286,7 +4522,7 @@ void drcbe_x86::op_and(x86code *&dst, const instruction &inst) // op_test - process a TEST opcode //------------------------------------------------- -void drcbe_x86::op_test(x86code *&dst, const instruction &inst) +void drcbe_x86::op_test(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5299,20 +4535,20 @@ void drcbe_x86::op_test(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // pick a target register for the general case - int src1reg = src1p.select_register(REG_EAX); + Gp const src1reg = src1p.select_register(eax); // 32-bit form if (inst.size() == 4) { // src1p in memory if (src1p.is_memory()) - emit_test_m32_p32(dst, MABS(src1p.memory()), src2p, inst); // test [src1p],src2p + alu_op_param(a, Inst::kIdTest, MABS(src1p.memory(), 4), src2p); // test [src1p],src2p // general case else { - emit_mov_r32_p32(dst, src1reg, src1p); // mov src1reg,src1p - emit_test_r32_p32(dst, src1reg, src2p, inst); // test src1reg,src2p + emit_mov_r32_p32(a, src1reg, src1p); // mov src1reg,src1p + alu_op_param(a, Inst::kIdTest, src1reg, src2p); // test src1reg,src2p } } @@ -5321,13 +4557,15 @@ void drcbe_x86::op_test(x86code *&dst, const instruction &inst) { // src1p in memory if (src1p.is_memory()) - emit_test_m64_p64(dst, MABS(src1p.memory()), src2p, inst); // test [dstp],src2p + alu_op_param(a, Inst::kIdTest, Inst::kIdTest, // test [dstp],src2p + MABS(src1p.memory(0), 4), MABS(src1p.memory(4), 4), src2p, inst.flags() & FLAG_Z); // general case else { - emit_mov_r64_p64(dst, src1reg, REG_EDX, src1p); // mov src1reg:dstp,[src1p] - emit_test_r64_p64(dst, src1reg, REG_EDX, src2p, inst); // test src1reg:dstp,src2p + emit_mov_r64_p64(a, src1reg, edx, src1p); // mov src1reg:dstp,[src1p] + alu_op_param(a, Inst::kIdTest, Inst::kIdTest, // test src1reg:dstp,src2p + src1reg, edx, src2p, inst.flags() & FLAG_Z); } } } @@ -5337,7 +4575,7 @@ void drcbe_x86::op_test(x86code *&dst, const instruction &inst) // op_or - process a OR opcode //------------------------------------------------- -void drcbe_x86::op_or(x86code *&dst, const instruction &inst) +void drcbe_x86::op_or(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5351,21 +4589,62 @@ void drcbe_x86::op_or(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_or_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // or [dstp],src2p + alu_op_param(a, Inst::kIdOr, MABS(dstp.memory(), 4), src2p, // or [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + { + a.mov(dst.as(), imm(-1)); + return true; + } + else if (!inst.flags() && !src.immediate()) + return true; + + return false; + }); + // dstp == src2p in memory + else if (dstp.is_memory() && dstp == src2p) + alu_op_param(a, Inst::kIdOr, MABS(dstp.memory(), 4), src1p, // or [dstp],src1p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + { + a.mov(dst.as(), imm(-1)); + return true; + } + else if (!inst.flags() && !src.immediate()) + return true; + return false; + }); // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_or_r32_p32(dst, dstreg, src2p, inst); // or dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdOr, dstreg, src2p, // or dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + { + a.mov(dst.as(), imm(-1)); + return true; + } + else if (!inst.flags() && !src.immediate()) + return true; + + return false; + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5374,14 +4653,20 @@ void drcbe_x86::op_or(x86code *&dst, const instruction &inst) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_or_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // or [dstp],src2p + emit_or_m64_p64(a, MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), // or [dstp],src2p + src2p, inst); + + // dstp == src2p in memory + else if (dstp.is_memory() && dstp == src2p) + emit_or_m64_p64(a, MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), // or [dstp],src1p + src1p, inst); // general case else { - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_or_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // or dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_or_r64_p64(a, dstreg, edx, src2p, inst); // or edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } } @@ -5391,7 +4676,7 @@ void drcbe_x86::op_or(x86code *&dst, const instruction &inst) // op_xor - process a XOR opcode //------------------------------------------------- -void drcbe_x86::op_xor(x86code *&dst, const instruction &inst) +void drcbe_x86::op_xor(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5405,21 +4690,64 @@ void drcbe_x86::op_xor(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_xor_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // xor [dstp],src2p + alu_op_param(a, Inst::kIdXor, MABS(dstp.memory(), 4), src2p, // xor [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + { + a.not_(dst.as()); + return true; + } + else if (!inst.flags() && !src.immediate()) + return true; + + return false; + }); + + // dstp == src2p in memory + else if (dstp.is_memory() && dstp == src2p) + alu_op_param(a, Inst::kIdXor, MABS(dstp.memory(), 4), src1p, // xor [dstp],src1p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + { + a.not_(dst.as()); + return true; + } + else if (!inst.flags() && !src.immediate()) + return true; + + return false; + }); // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_xor_r32_p32(dst, dstreg, src2p, inst); // xor dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + alu_op_param(a, Inst::kIdXor, dstreg, src2p, // xor dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize all-zero and all-one cases + if (!inst.flags() && u32(src.immediate()) == 0xffffffffU) + { + a.not_(dst.as()); + return true; + } + else if (!inst.flags() && !src.immediate()) + return true; + + return false; + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5428,14 +4756,20 @@ void drcbe_x86::op_xor(x86code *&dst, const instruction &inst) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_xor_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // xor [dstp],src2p + emit_xor_m64_p64(a, MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), // xor [dstp],src2p + src2p, inst); + + // dstp == src1p in memory + else if (dstp.is_memory() && dstp == src2p) + emit_xor_m64_p64(a, MABS(dstp.memory(0), 4), MABS(dstp.memory(4), 4), // xor [dstp],src1p + src1p, inst); // general case else { - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_xor_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // xor dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_xor_r64_p64(a, dstreg, edx, src2p, inst); // xor edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } } @@ -5445,7 +4779,7 @@ void drcbe_x86::op_xor(x86code *&dst, const instruction &inst) // op_lzcnt - process a LZCNT opcode //------------------------------------------------- -void drcbe_x86::op_lzcnt(x86code *&dst, const instruction &inst) +void drcbe_x86::op_lzcnt(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5457,34 +4791,35 @@ void drcbe_x86::op_lzcnt(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // 32-bit form if (inst.size() == 4) { - emit_mov_r32_p32(dst, dstreg, srcp); // mov dstreg,src1p - emit_mov_r32_imm(dst, REG_ECX, 32 ^ 31); // mov ecx,32 ^ 31 - emit_bsr_r32_r32(dst, dstreg, dstreg); // bsr dstreg,dstreg - emit_cmovcc_r32_r32(dst, x86emit::COND_Z, dstreg, REG_ECX); // cmovz dstreg,ecx - emit_xor_r32_imm(dst, dstreg, 31); // xor dstreg,31 - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, srcp); // mov dstreg,src1p + a.mov(ecx, 32 ^ 31); // mov ecx,32 ^ 31 + a.bsr(dstreg, dstreg); // bsr dstreg,dstreg + a.cmovz(dstreg, ecx); // cmovz dstreg,ecx + a.xor_(dstreg, 31); // xor dstreg,31 + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } // 64-bit form else if (inst.size() == 8) { - emit_mov_r64_p64(dst, REG_EDX, dstreg, srcp); // mov dstreg:edx,srcp - emit_bsr_r32_r32(dst, dstreg, dstreg); // bsr dstreg,dstreg - emit_link skip; - emit_jcc_short_link(dst, x86emit::COND_NZ, skip); // jnz skip - emit_mov_r32_imm(dst, REG_ECX, 32 ^ 31); // mov ecx,32 ^ 31 - emit_bsr_r32_r32(dst, dstreg, REG_EDX); // bsr dstreg,edx - emit_cmovcc_r32_r32(dst, x86emit::COND_Z, dstreg, REG_ECX); // cmovz dstreg,ecx - emit_add_r32_imm(dst, REG_ECX, 32); // add ecx,32 - track_resolve_link(dst, skip); // skip: - emit_xor_r32_r32(dst, REG_EDX, REG_EDX); // xor edx,edx - emit_xor_r32_imm(dst, dstreg, 31); // xor dstreg,31 - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,edx:dstreg + emit_mov_r64_p64(a, edx, dstreg, srcp); // mov dstreg:edx,srcp + a.bsr(dstreg, dstreg); // bsr dstreg,dstreg + Label skip = a.newLabel(); + a.jnz(skip); // jnz skip + a.mov(ecx, 32 ^ 31); // mov ecx,32 ^ 31 + a.bsr(dstreg, edx); // bsr dstreg,edx + a.cmovz(dstreg, ecx); // cmovz dstreg,ecx + a.add(ecx, 32); // add ecx,32 + a.bind(skip); // skip: + reset_last_upper_lower_reg(); + a.xor_(edx, edx); // xor edx,edx + a.xor_(dstreg, 31); // xor dstreg,31 + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5493,7 +4828,7 @@ void drcbe_x86::op_lzcnt(x86code *&dst, const instruction &inst) // op_tzcnt - process a TZCNT opcode //------------------------------------------------- -void drcbe_x86::op_tzcnt(x86code *&dst, const instruction &inst) +void drcbe_x86::op_tzcnt(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5504,32 +4839,33 @@ void drcbe_x86::op_tzcnt(x86code *&dst, const instruction &inst) be_parameter dstp(*this, inst.param(0), PTYPE_MR); be_parameter srcp(*this, inst.param(1), PTYPE_MRI); - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // 32-bit form if (inst.size() == 4) { - emit_mov_r32_p32(dst, dstreg, srcp); // mov dstreg,src1p - emit_mov_r32_imm(dst, REG_ECX, 32); // mov ecx,32 - emit_bsf_r32_r32(dst, dstreg, dstreg); // bsf dstreg,dstreg - emit_cmovcc_r32_r32(dst, x86emit::COND_Z, dstreg, REG_ECX); // cmovz dstreg,ecx - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, srcp); // mov dstreg,src1p + a.mov(ecx, 32); // mov ecx,32 + a.bsf(dstreg, dstreg); // bsf dstreg,dstreg + a.cmovz(dstreg, ecx); // cmovz dstreg,ecx + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } // 64-bit form else if (inst.size() == 8) { - emit_link skip; - emit_mov_r64_p64(dst, REG_EDX, dstreg, srcp); // mov dstreg:edx,srcp - emit_bsf_r32_r32(dst, dstreg, dstreg); // bsf dstreg,dstreg - emit_jcc_short_link(dst, x86emit::COND_NZ, skip); // jnz skip - emit_mov_r32_imm(dst, REG_ECX, 32); // mov ecx,32 - emit_bsf_r32_r32(dst, dstreg, REG_EDX); // bsf dstreg,edx - emit_cmovcc_r32_r32(dst, x86emit::COND_Z, dstreg, REG_ECX); // cmovz dstreg,ecx - emit_add_r32_imm(dst, dstreg, 32); // add dstreg,32 - track_resolve_link(dst, skip); // skip: - emit_xor_r32_r32(dst, REG_EDX, REG_EDX); // xor edx,edx - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,edx:dstreg + Label skip = a.newLabel(); + emit_mov_r64_p64(a, edx, dstreg, srcp); // mov dstreg:edx,srcp + a.bsf(dstreg, dstreg); // bsf dstreg,dstreg + a.jz(skip); // jnz skip + a.mov(ecx, 32); // mov ecx,32 + a.bsf(dstreg, edx); // bsf dstreg,edx + a.cmovz(dstreg, ecx); // cmovz dstreg,ecx + a.add(dstreg, 32); // add dstreg,32 + a.bind(skip); // skip: + reset_last_upper_lower_reg(); + a.xor_(edx, edx); // xor edx,edx + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5538,7 +4874,7 @@ void drcbe_x86::op_tzcnt(x86code *&dst, const instruction &inst) // op_bswap - process a BSWAP opcode //------------------------------------------------- -void drcbe_x86::op_bswap(x86code *&dst, const instruction &inst) +void drcbe_x86::op_bswap(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5550,36 +4886,36 @@ void drcbe_x86::op_bswap(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX); + Gp const dstreg = dstp.select_register(eax); // 32-bit form if (inst.size() == 4) { - emit_mov_r32_p32(dst, dstreg, srcp); // mov dstreg,src1p - emit_bswap_r32(dst, dstreg); // bswap dstreg + emit_mov_r32_p32(a, dstreg, srcp); // mov dstreg,src1p + a.bswap(dstreg); // bswap dstreg if (inst.flags() != 0) - emit_test_r32_r32(dst, dstreg, dstreg); // test dstreg,dstreg - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + a.test(dstreg, dstreg); // test dstreg,dstreg + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } // 64-bit form else if (inst.size() == 8) { - emit_mov_r64_p64(dst, REG_EDX, dstreg, srcp); // mov dstreg:edx,srcp - emit_bswap_r32(dst, dstreg); // bswap dstreg - emit_bswap_r32(dst, REG_EDX); // bswap edx - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,edx:dstreg + emit_mov_r64_p64(a, edx, dstreg, srcp); // mov dstreg:edx,srcp + a.bswap(dstreg); // bswap dstreg + a.bswap(edx); // bswap edx + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg if (inst.flags() == FLAG_Z) - emit_or_r32_r32(dst, REG_EDX, dstreg); // or edx,eax + a.or_(edx, dstreg); // or edx,eax else if (inst.flags() == FLAG_S) - emit_test_r32_r32(dst, REG_EDX, REG_EDX); // test edx,edx + a.test(edx, edx); // test edx,edx else { - emit_movzx_r32_r16(dst, REG_ECX, dstreg); // movzx ecx,dstreg - emit_or_r32_r32(dst, REG_EDX, REG_ECX); // or edx,ecx - emit_mov_r32_r32(dst, REG_ECX, dstreg); // mov ecx,dstreg - emit_shr_r32_imm(dst, REG_ECX, 16); // shr ecx,16 - emit_or_r32_r32(dst, REG_EDX, REG_ECX); // or edx,ecx + a.movzx(ecx, dstreg.r16()); // movzx ecx,dstreg + a.or_(edx, ecx); // or edx,ecx + a.mov(ecx, dstreg); // mov ecx,dstreg + a.shr(ecx, 16); // shr ecx,16 + a.or_(edx, ecx); // or edx,ecx } } } @@ -5589,7 +4925,7 @@ void drcbe_x86::op_bswap(x86code *&dst, const instruction &inst) // op_shl - process a SHL opcode //------------------------------------------------- -void drcbe_x86::op_shl(x86code *&dst, const instruction &inst) +void drcbe_x86::op_shl(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5602,21 +4938,31 @@ void drcbe_x86::op_shl(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_shl_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // shl [dstp],src2p + shift_op_param(a, Inst::kIdShl, MABS(dstp.memory(), 4), src2p, // shl [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_shl_r32_p32(dst, dstreg, src2p, inst); // shl dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + shift_op_param(a, Inst::kIdShl, dstreg, src2p, // shl dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5624,9 +4970,9 @@ void drcbe_x86::op_shl(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_shl_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // shl dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_shl_r64_p64(a, dstreg, edx, src2p, inst); // shl edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5635,7 +4981,7 @@ void drcbe_x86::op_shl(x86code *&dst, const instruction &inst) // op_shr - process a SHR opcode //------------------------------------------------- -void drcbe_x86::op_shr(x86code *&dst, const instruction &inst) +void drcbe_x86::op_shr(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5648,21 +4994,31 @@ void drcbe_x86::op_shr(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_shr_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // shr [dstp],src2p + shift_op_param(a, Inst::kIdShr, MABS(dstp.memory(), 4), src2p, // shr [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_shr_r32_p32(dst, dstreg, src2p, inst); // shr dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + shift_op_param(a, Inst::kIdShr, dstreg, src2p, // shr dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5670,9 +5026,9 @@ void drcbe_x86::op_shr(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_shr_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // shr dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_shr_r64_p64(a, dstreg, edx, src2p, inst); // shr edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5681,7 +5037,7 @@ void drcbe_x86::op_shr(x86code *&dst, const instruction &inst) // op_sar - process a SAR opcode //------------------------------------------------- -void drcbe_x86::op_sar(x86code *&dst, const instruction &inst) +void drcbe_x86::op_sar(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5694,21 +5050,31 @@ void drcbe_x86::op_sar(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_sar_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // sar [dstp],src2p + shift_op_param(a, Inst::kIdSar, MABS(dstp.memory(), 4), src2p, // sar [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_sar_r32_p32(dst, dstreg, src2p, inst); // sar dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + shift_op_param(a, Inst::kIdSar, dstreg, src2p, // sar dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5716,9 +5082,9 @@ void drcbe_x86::op_sar(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_sar_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // sar dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_sar_r64_p64(a, dstreg, edx, src2p, inst); // sar edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5727,7 +5093,7 @@ void drcbe_x86::op_sar(x86code *&dst, const instruction &inst) // op_rol - process a rol opcode //------------------------------------------------- -void drcbe_x86::op_rol(x86code *&dst, const instruction &inst) +void drcbe_x86::op_rol(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5740,21 +5106,31 @@ void drcbe_x86::op_rol(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_rol_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // rol [dstp],src2p + shift_op_param(a, Inst::kIdRol, MABS(dstp.memory(), 4), src2p, // rol [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_rol_r32_p32(dst, dstreg, src2p, inst); // rol dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + shift_op_param(a, Inst::kIdRol, dstreg, src2p, // rol dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5762,9 +5138,9 @@ void drcbe_x86::op_rol(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_rol_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // rol dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_rol_r64_p64(a, dstreg, edx, src2p, inst); // rol edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5773,7 +5149,7 @@ void drcbe_x86::op_rol(x86code *&dst, const instruction &inst) // op_ror - process a ROR opcode //------------------------------------------------- -void drcbe_x86::op_ror(x86code *&dst, const instruction &inst) +void drcbe_x86::op_ror(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5786,21 +5162,31 @@ void drcbe_x86::op_ror(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_ror_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // ror [dstp],src2p + shift_op_param(a, Inst::kIdRor, MABS(dstp.memory(), 4), src2p, // ror [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // general case else { - emit_mov_r32_p32(dst, dstreg, src1p); // mov dstreg,src1p - emit_ror_r32_p32(dst, dstreg, src2p, inst); // ror dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32(a, dstreg, src1p); // mov dstreg,src1p + shift_op_param(a, Inst::kIdRor, dstreg, src2p, // rol dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5808,9 +5194,9 @@ void drcbe_x86::op_ror(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_r64_p64(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_ror_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // ror dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_ror_r64_p64(a, dstreg, edx, src2p, inst); // ror edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5819,7 +5205,7 @@ void drcbe_x86::op_ror(x86code *&dst, const instruction &inst) // op_rolc - process a ROLC opcode //------------------------------------------------- -void drcbe_x86::op_rolc(x86code *&dst, const instruction &inst) +void drcbe_x86::op_rolc(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5832,21 +5218,31 @@ void drcbe_x86::op_rolc(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_rcl_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // rcl [dstp],src2p + shift_op_param(a, Inst::kIdRcl, MABS(dstp.memory(), 4), src2p, // rcl [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // general case else { - emit_mov_r32_p32_keepflags(dst, dstreg, src1p); // mov dstreg,src1p - emit_rcl_r32_p32(dst, dstreg, src2p, inst); // rcl dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32_keepflags(a, dstreg, src1p); // mov dstreg,src1p + shift_op_param(a, Inst::kIdRcl, dstreg, src2p, // rcl dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5854,9 +5250,9 @@ void drcbe_x86::op_rolc(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_r64_p64_keepflags(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_rcl_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // rcl dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64_keepflags(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_rcl_r64_p64(a, dstreg, edx, src2p, inst); // rcl edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5865,7 +5261,7 @@ void drcbe_x86::op_rolc(x86code *&dst, const instruction &inst) // op_rorc - process a RORC opcode //------------------------------------------------- -void drcbe_x86::op_rorc(x86code *&dst, const instruction &inst) +void drcbe_x86::op_rorc(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5878,21 +5274,31 @@ void drcbe_x86::op_rorc(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MRI); // pick a target register for the general case - int dstreg = dstp.select_register(REG_EAX, src2p); + Gp const dstreg = dstp.select_register(eax, src2p); // 32-bit form if (inst.size() == 4) { // dstp == src1p in memory if (dstp.is_memory() && dstp == src1p) - emit_rcr_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // rcr [dstp],src2p + shift_op_param(a, Inst::kIdRcr, MABS(dstp.memory(), 4), src2p, // rcr [dstp],src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); // general case else { - emit_mov_r32_p32_keepflags(dst, dstreg, src1p); // mov dstreg,src1p - emit_rcr_r32_p32(dst, dstreg, src2p, inst); // rcr dstreg,src2p - emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg + emit_mov_r32_p32_keepflags(a, dstreg, src1p); // mov dstreg,src1p + shift_op_param(a, Inst::kIdRcr, dstreg, src2p, // rcr dstreg,src2p + [inst](Assembler &a, Operand const &dst, be_parameter const &src) + { + // optimize zero case + return (!inst.flags() && !src.immediate()); + }); + emit_mov_p32_r32(a, dstp, dstreg); // mov dstp,dstreg } } @@ -5900,9 +5306,9 @@ void drcbe_x86::op_rorc(x86code *&dst, const instruction &inst) else if (inst.size() == 8) { // general case - emit_mov_r64_p64_keepflags(dst, dstreg, REG_EDX, src1p); // mov dstreg:dstp,[src1p] - emit_rcr_r64_p64(dst, dstreg, REG_EDX, src2p, inst); // rcr dstreg:dstp,src2p - emit_mov_p64_r64(dst, dstp, dstreg, REG_EDX); // mov dstp,dstreg:eax + emit_mov_r64_p64_keepflags(a, dstreg, edx, src1p); // mov edx:dstreg,[src1p] + emit_rcr_r64_p64(a, dstreg, edx, src2p, inst); // rcr edx:dstreg,src2p + emit_mov_p64_r64(a, dstp, dstreg, edx); // mov dstp,edx:dstreg } } @@ -5916,7 +5322,7 @@ void drcbe_x86::op_rorc(x86code *&dst, const instruction &inst) // op_fload - process a FLOAD opcode //------------------------------------------------- -void drcbe_x86::op_fload(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fload(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5931,25 +5337,25 @@ void drcbe_x86::op_fload(x86code *&dst, const instruction &inst) // immediate index if (indp.is_immediate()) { - emit_mov_r32_m32(dst, REG_EAX, MABS(basep.memory(4*indp.immediate()))); // mov eax,[basep + 4*indp] + a.mov(eax, MABS(basep.memory(4*indp.immediate()))); // mov eax,[basep + 4*indp] if (inst.size() == 8) - emit_mov_r32_m32(dst, REG_EDX, MABS(basep.memory(4 + 4*indp.immediate()))); // mov edx,[basep + 4*indp + 4] + a.mov(edx, MABS(basep.memory(4 + 4*indp.immediate()))); // mov edx,[basep + 4*indp + 4] } // other index else { - int indreg = indp.select_register(REG_ECX); - emit_mov_r32_p32(dst, indreg, indp); - emit_mov_r32_m32(dst, REG_EAX, MABSI(basep.memory(), indreg, 4)); // mov eax,[basep + 4*indp] + Gp const indreg = indp.select_register(ecx); + emit_mov_r32_p32(a, indreg, indp); + a.mov(eax, ptr(u64(basep.memory(0)), indreg, 2)); // mov eax,[basep + 4*indp] if (inst.size() == 8) - emit_mov_r32_m32(dst, REG_EDX, MABSI(basep.memory(4), indreg, 4)); // mov edx,[basep + 4*indp + 4] + a.mov(edx, ptr(u64(basep.memory(4)), indreg, 2)); // mov edx,[basep + 4*indp + 4] } // general case - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax + a.mov(MABS(dstp.memory(0)), eax); // mov [dstp],eax if (inst.size() == 8) - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp + 4],edx + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp + 4],edx } @@ -5957,7 +5363,7 @@ void drcbe_x86::op_fload(x86code *&dst, const instruction &inst) // op_fstore - process a FSTORE opcode //------------------------------------------------- -void drcbe_x86::op_fstore(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fstore(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -5970,26 +5376,26 @@ void drcbe_x86::op_fstore(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(2), PTYPE_MF); // general case - emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp] + a.mov(eax, MABS(srcp.memory(0))); // mov eax,[srcp] if (inst.size() == 8) - emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp + 4] + a.mov(edx, MABS(srcp.memory(4))); // mov edx,[srcp + 4] // immediate index if (indp.is_immediate()) { - emit_mov_m32_r32(dst, MABS(basep.memory(4*indp.immediate())), REG_EAX); // mov [basep + 4*indp],eax + a.mov(MABS(basep.memory(4*indp.immediate())), eax); // mov [basep + 4*indp],eax if (inst.size() == 8) - emit_mov_m32_r32(dst, MABS(basep.memory(4 + 4*indp.immediate())), REG_EDX); // mov [basep + 4*indp + 4],edx + a.mov(MABS(basep.memory(4 + 4*indp.immediate())), edx); // mov [basep + 4*indp + 4],edx } // other index else { - int indreg = indp.select_register(REG_ECX); - emit_mov_r32_p32(dst, indreg, indp); - emit_mov_m32_r32(dst, MABSI(basep.memory(), indreg, 4), REG_EAX); // mov [basep + 4*indp],eax + Gp const indreg = indp.select_register(ecx); + emit_mov_r32_p32(a, indreg, indp); + a.mov(ptr(u64(basep.memory(0)), indreg, 2), eax); // mov [basep + 4*indp],eax if (inst.size() == 8) - emit_mov_m32_r32(dst, MABSI(basep.memory(4), indreg, 4), REG_EDX); // mov [basep + 4*indp + 4],edx + a.mov(ptr(u64(basep.memory(4)), indreg, 2), edx); // mov [basep + 4*indp + 4],edx } } @@ -5998,7 +5404,7 @@ void drcbe_x86::op_fstore(x86code *&dst, const instruction &inst) // op_fread - process a FREAD opcode //------------------------------------------------- -void drcbe_x86::op_fread(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fread(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6008,23 +5414,23 @@ void drcbe_x86::op_fread(x86code *&dst, const instruction &inst) // normalize parameters be_parameter dstp(*this, inst.param(0), PTYPE_MF); be_parameter addrp(*this, inst.param(1), PTYPE_MRI); - const parameter &spacep = inst.param(2); + parameter const &spacep = inst.param(2); assert(spacep.is_size_space()); assert((1 << spacep.size()) == inst.size()); // set up a call to the read dword/qword handler - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacep.space()]); // mov [esp],space + emit_mov_m32_p32(a, dword_ptr(esp, 4), addrp); // mov [esp+4],addrp + a.mov(dword_ptr(esp, 0), imm(m_space[spacep.space()])); // mov [esp],space if (inst.size() == 4) - emit_call(dst, (x86code *)m_accessors[spacep.space()].read_dword); // call read_dword + a.call(imm(m_accessors[spacep.space()].read_dword)); // call read_dword else if (inst.size() == 8) - emit_call(dst, (x86code *)m_accessors[spacep.space()].read_qword); // call read_qword + a.call(imm(m_accessors[spacep.space()].read_qword)); // call read_qword // store result if (inst.size() == 4) - emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax + emit_mov_p32_r32(a, dstp, eax); // mov dstp,eax else if (inst.size() == 8) - emit_mov_p64_r64(dst, dstp, REG_EAX, REG_EDX); // mov dstp,edx:eax + emit_mov_p64_r64(a, dstp, eax, edx); // mov dstp,edx:eax } @@ -6032,7 +5438,7 @@ void drcbe_x86::op_fread(x86code *&dst, const instruction &inst) // op_fwrite - process a FWRITE opcode //------------------------------------------------- -void drcbe_x86::op_fwrite(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fwrite(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6042,21 +5448,21 @@ void drcbe_x86::op_fwrite(x86code *&dst, const instruction &inst) // normalize parameters be_parameter addrp(*this, inst.param(0), PTYPE_MRI); be_parameter srcp(*this, inst.param(1), PTYPE_MF); - const parameter &spacep = inst.param(2); + parameter const &spacep = inst.param(2); assert(spacep.is_size_space()); assert((1 << spacep.size()) == inst.size()); // set up a call to the write dword/qword handler if (inst.size() == 4) - emit_mov_m32_p32(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp + emit_mov_m32_p32(a, dword_ptr(esp, 8), srcp); // mov [esp+8],srcp else if (inst.size() == 8) - emit_mov_m64_p64(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp - emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp - emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacep.space()]); // mov [esp],space + emit_mov_m64_p64(a, qword_ptr(esp, 8), srcp); // mov [esp+8],srcp + emit_mov_m32_p32(a, dword_ptr(esp, 4), addrp); // mov [esp+4],addrp + a.mov(dword_ptr(esp, 0), imm(m_space[spacep.space()])); // mov [esp],space if (inst.size() == 4) - emit_call(dst, (x86code *)m_accessors[spacep.space()].write_dword); // call write_dword + a.call(imm(m_accessors[spacep.space()].write_dword)); // call write_dword else if (inst.size() == 8) - emit_call(dst, (x86code *)m_accessors[spacep.space()].write_qword); // call write_qword + a.call(imm(m_accessors[spacep.space()].write_qword)); // call write_qword } @@ -6064,7 +5470,7 @@ void drcbe_x86::op_fwrite(x86code *&dst, const instruction &inst) // op_fmov - process a FMOV opcode //------------------------------------------------- -void drcbe_x86::op_fmov(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fmov(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6076,21 +5482,24 @@ void drcbe_x86::op_fmov(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MF); // always start with a jmp - emit_link skip = { nullptr }; + Label skip = a.newLabel(); if (inst.condition() != uml::COND_ALWAYS) - emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip + a.j(X86_NOT_CONDITION(inst.condition()), skip); // jcc skip // general case - emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp] + a.mov(eax, MABS(srcp.memory(0))); // mov eax,[srcp] if (inst.size() == 8) - emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp + 4] - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax + a.mov(edx, MABS(srcp.memory(4))); // mov edx,[srcp + 4] + a.mov(MABS(dstp.memory(0)), eax); // mov [dstp],eax if (inst.size() == 8) - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp + 4],edx + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp + 4],edx // resolve the jump - if (skip.target != nullptr) - track_resolve_link(dst, skip); // skip: + if (inst.condition() != uml::COND_ALWAYS) + { + a.bind(skip); // skip: + reset_last_upper_lower_reg(); + } } @@ -6098,7 +5507,7 @@ void drcbe_x86::op_fmov(x86code *&dst, const instruction &inst) // op_ftoint - process a FTOINT opcode //------------------------------------------------- -void drcbe_x86::op_ftoint(x86code *&dst, const instruction &inst) +void drcbe_x86::op_ftoint(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6108,20 +5517,20 @@ void drcbe_x86::op_ftoint(x86code *&dst, const instruction &inst) // normalize parameters be_parameter dstp(*this, inst.param(0), PTYPE_MR); be_parameter srcp(*this, inst.param(1), PTYPE_MF); - const parameter &sizep = inst.param(2); + parameter const &sizep = inst.param(2); assert(sizep.is_size()); - const parameter &roundp = inst.param(3); + parameter const &roundp = inst.param(3); assert(roundp.is_rounding()); // set rounding mode if necessary if (roundp.rounding() != ROUND_DEFAULT && (!m_sse3 || roundp.rounding() != ROUND_TRUNC)) { - emit_fstcw_m16(dst, MABS(&m_fmodesave)); // fstcw [fmodesave] - emit_fldcw_m16(dst, MABS(&fp_control[roundp.rounding()])); // fldcw fpcontrol[roundp] + a.fstcw(MABS(&m_fmodesave)); // fstcw [fmodesave] + a.fldcw(MABS(&fp_control[roundp.rounding()])); // fldcw fpcontrol[roundp] } // general case - emit_fld_p(dst, inst.size(), srcp); // fld srcp + emit_fld_p(a, inst.size(), srcp); // fld srcp // 4-byte integer case if (sizep.size() == SIZE_DWORD) @@ -6129,17 +5538,17 @@ void drcbe_x86::op_ftoint(x86code *&dst, const instruction &inst) if (dstp.is_memory()) { if (!m_sse3 || roundp.rounding() != ROUND_TRUNC) - emit_fistp_m32(dst, MABS(dstp.memory())); // fistp [dstp] + a.fistp(MABS(dstp.memory(), 4)); // fistp [dstp] else - emit_fisttp_m32(dst, MABS(dstp.memory())); // fisttp [dstp] + a.fisttp(MABS(dstp.memory(), 4)); // fisttp [dstp] } else if (dstp.is_int_register()) { if (!m_sse3 || roundp.rounding() != ROUND_TRUNC) - emit_fistp_m32(dst, MABS(m_reglo[dstp.ireg()])); // fistp reglo[dstp] + a.fistp(MABS(m_reglo[dstp.ireg()], 4)); // fistp reglo[dstp] else - emit_fisttp_m32(dst, MABS(m_reglo[dstp.ireg()])); // fisttp reglo[dstp] - emit_mov_r32_m32(dst, dstp.ireg(), MABS(m_reglo[dstp.ireg()])); // mov dstp,reglo[dstp] + a.fisttp(MABS(m_reglo[dstp.ireg()], 4)); // fisttp reglo[dstp] + a.mov(Gpd(dstp.ireg()), MABS(m_reglo[dstp.ireg()])); // mov dstp,reglo[dstp] } } @@ -6149,23 +5558,23 @@ void drcbe_x86::op_ftoint(x86code *&dst, const instruction &inst) if (dstp.is_memory()) { if (!m_sse3 || roundp.rounding() != ROUND_TRUNC) - emit_fistp_m64(dst, MABS(dstp.memory())); // fistp [dstp] + a.fistp(MABS(dstp.memory(), 8)); // fistp [dstp] else - emit_fisttp_m64(dst, MABS(dstp.memory())); // fisttp [dstp] + a.fisttp(MABS(dstp.memory(), 8)); // fisttp [dstp] } else if (dstp.is_int_register()) { if (!m_sse3 || roundp.rounding() != ROUND_TRUNC) - emit_fistp_m64(dst, MABS(m_reglo[dstp.ireg()])); // fistp reglo[dstp] + a.fistp(MABS(m_reglo[dstp.ireg()], 8)); // fistp reglo[dstp] else - emit_fisttp_m64(dst, MABS(m_reglo[dstp.ireg()])); // fisttp reglo[dstp] - emit_mov_r32_m32(dst, dstp.ireg(), MABS(m_reglo[dstp.ireg()])); // mov dstp,reglo[dstp] + a.fisttp(MABS(m_reglo[dstp.ireg()], 8)); // fisttp reglo[dstp] + a.mov(Gpd(dstp.ireg()), MABS(m_reglo[dstp.ireg()])); // mov dstp,reglo[dstp] } } // restore control word and proceed if (roundp.rounding() != ROUND_DEFAULT && (!m_sse3 || roundp.rounding() != ROUND_TRUNC)) - emit_fldcw_m16(dst, MABS(&m_fmodesave)); // fldcw [fmodesave] + a.fldcw(MABS(&m_fmodesave)); // fldcw [fmodesave] } @@ -6173,7 +5582,7 @@ void drcbe_x86::op_ftoint(x86code *&dst, const instruction &inst) // op_ffrint - process a FFRINT opcode //------------------------------------------------- -void drcbe_x86::op_ffrint(x86code *&dst, const instruction &inst) +void drcbe_x86::op_ffrint(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6183,7 +5592,7 @@ void drcbe_x86::op_ffrint(x86code *&dst, const instruction &inst) // normalize parameters be_parameter dstp(*this, inst.param(0), PTYPE_MF); be_parameter srcp(*this, inst.param(1), PTYPE_MRI); - const parameter &sizep = inst.param(2); + parameter const &sizep = inst.param(2); assert(sizep.is_size()); // 4-byte integer case @@ -6191,15 +5600,15 @@ void drcbe_x86::op_ffrint(x86code *&dst, const instruction &inst) { if (srcp.is_immediate()) { - emit_mov_m32_imm(dst, MABS(&m_fptemp), srcp.immediate()); // mov [fptemp],srcp - emit_fild_m32(dst, MABS(&m_fptemp)); // fild [fptemp] + a.mov(MABS(&m_fptemp, 4), srcp.immediate()); // mov [fptemp],srcp + a.fild(MABS(&m_fptemp, 4)); // fild [fptemp] } else if (srcp.is_memory()) - emit_fild_m32(dst, MABS(srcp.memory())); // fild [srcp] + a.fild(MABS(srcp.memory(), 4)); // fild [srcp] else if (srcp.is_int_register()) { - emit_mov_m32_r32(dst, MABS(m_reglo[srcp.ireg()]), srcp.ireg()); // mov reglo[srcp],srcp - emit_fild_m32(dst, MABS(m_reglo[srcp.ireg()])); // fild reglo[srcp] + a.mov(MABS(m_reglo[srcp.ireg()]), Gpd(srcp.ireg())); // mov reglo[srcp],srcp + a.fild(MABS(m_reglo[srcp.ireg()], 4)); // fild reglo[srcp] } } @@ -6208,21 +5617,21 @@ void drcbe_x86::op_ffrint(x86code *&dst, const instruction &inst) { if (srcp.is_immediate()) { - emit_mov_m32_imm(dst, MABS(&m_fptemp), srcp.immediate()); // mov [fptemp],srcp - emit_mov_m32_imm(dst, MABS((uint8_t *)&m_fptemp + 4), srcp.immediate()); // mov [fptemp+4],srcp - emit_fild_m64(dst, MABS(&m_fptemp)); // fild [fptemp] + a.mov(MABS(&m_fptemp, 4), srcp.immediate()); // mov [fptemp],srcp + a.mov(MABS((uint8_t *)&m_fptemp + 4, 4), srcp.immediate()); // mov [fptemp+4],srcp + a.fild(MABS(&m_fptemp, 8)); // fild [fptemp] } else if (srcp.is_memory()) - emit_fild_m64(dst, MABS(srcp.memory())); // fild [srcp] + a.fild(MABS(srcp.memory(), 8)); // fild [srcp] else if (srcp.is_int_register()) { - emit_mov_m32_r32(dst, MABS(m_reglo[srcp.ireg()]), srcp.ireg()); // mov reglo[srcp],srcp - emit_fild_m64(dst, MABS(m_reglo[srcp.ireg()])); // fild reglo[srcp] + a.mov(MABS(m_reglo[srcp.ireg()]), Gpd(srcp.ireg())); // mov reglo[srcp],srcp + a.fild(MABS(m_reglo[srcp.ireg()], 8)); // fild reglo[srcp] } } // store the result and be done - emit_fstp_p(dst, inst.size(), dstp); // fstp [dstp] + emit_fstp_p(a, inst.size(), dstp); // fstp [dstp] } @@ -6230,7 +5639,7 @@ void drcbe_x86::op_ffrint(x86code *&dst, const instruction &inst) // op_ffrflt - process a FFRFLT opcode //------------------------------------------------- -void drcbe_x86::op_ffrflt(x86code *&dst, const instruction &inst) +void drcbe_x86::op_ffrflt(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6240,15 +5649,15 @@ void drcbe_x86::op_ffrflt(x86code *&dst, const instruction &inst) // normalize parameters be_parameter dstp(*this, inst.param(0), PTYPE_MF); be_parameter srcp(*this, inst.param(1), PTYPE_MF); - const parameter &sizep = inst.param(2); + parameter const &sizep = inst.param(2); assert(sizep.is_size()); // general case if (sizep.size() == SIZE_DWORD) - emit_fld_m32(dst, MABS(srcp.memory())); // fld [srcp] + a.fld(MABS(srcp.memory(), 4)); // fld [srcp] else if (sizep.size() == SIZE_QWORD) - emit_fld_m64(dst, MABS(srcp.memory())); // fld [srcp] - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + a.fld(MABS(srcp.memory(), 8)); // fld [srcp] + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6256,7 +5665,7 @@ void drcbe_x86::op_ffrflt(x86code *&dst, const instruction &inst) // op_frnds - process a FRNDS opcode //------------------------------------------------- -void drcbe_x86::op_frnds(x86code *&dst, const instruction &inst) +void drcbe_x86::op_frnds(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 8); @@ -6268,10 +5677,10 @@ void drcbe_x86::op_frnds(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MF); // general case - emit_fld_p(dst, inst.size(), srcp); // fld srcp - emit_fstp_m32(dst, MABS(&m_fptemp)); // fstp [fptemp] - emit_fld_m32(dst, MABS(&m_fptemp)); // fld [fptemp] - emit_fstp_p(dst, inst.size(), dstp); // fstp [dstp] + emit_fld_p(a, inst.size(), srcp); // fld srcp + a.fstp(MABS(&m_fptemp, 4)); // fstp [fptemp] + a.fld(MABS(&m_fptemp, 4)); // fld [fptemp] + emit_fstp_p(a, inst.size(), dstp); // fstp [dstp] } @@ -6279,7 +5688,7 @@ void drcbe_x86::op_frnds(x86code *&dst, const instruction &inst) // op_fadd - process a FADD opcode //------------------------------------------------- -void drcbe_x86::op_fadd(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fadd(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6293,10 +5702,10 @@ void drcbe_x86::op_fadd(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // general case - emit_fld_p(dst, inst.size(), src1p); // fld src1p - emit_fld_p(dst, inst.size(), src2p); // fld src2p - emit_faddp(dst); // faddp - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + emit_fld_p(a, inst.size(), src1p); // fld src1p + emit_fld_p(a, inst.size(), src2p); // fld src2p + a.faddp(); // faddp + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6304,7 +5713,7 @@ void drcbe_x86::op_fadd(x86code *&dst, const instruction &inst) // op_fsub - process a FSUB opcode //------------------------------------------------- -void drcbe_x86::op_fsub(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fsub(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6317,10 +5726,10 @@ void drcbe_x86::op_fsub(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MF); // general case - emit_fld_p(dst, inst.size(), src1p); // fld src1p - emit_fld_p(dst, inst.size(), src2p); // fld src2p - emit_fsubp(dst); // fsubp - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + emit_fld_p(a, inst.size(), src1p); // fld src1p + emit_fld_p(a, inst.size(), src2p); // fld src2p + a.fsubp(); // fsubp + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6328,7 +5737,7 @@ void drcbe_x86::op_fsub(x86code *&dst, const instruction &inst) // op_fcmp - process a FCMP opcode //------------------------------------------------- -void drcbe_x86::op_fcmp(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fcmp(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6340,11 +5749,11 @@ void drcbe_x86::op_fcmp(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(1), PTYPE_MF); // general case - emit_fld_p(dst, inst.size(), src2p); // fld src2p - emit_fld_p(dst, inst.size(), src1p); // fld src1p - emit_fcompp(dst); // fcompp - emit_fstsw_ax(dst); // fnstsw ax - emit_sahf(dst); // sahf + emit_fld_p(a, inst.size(), src2p); // fld src2p + emit_fld_p(a, inst.size(), src1p); // fld src1p + a.fcompp(); // fcompp + a.fnstsw(ax); // fnstsw ax + a.sahf(); // sahf } @@ -6352,7 +5761,7 @@ void drcbe_x86::op_fcmp(x86code *&dst, const instruction &inst) // op_fmul - process a FMUL opcode //------------------------------------------------- -void drcbe_x86::op_fmul(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fmul(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6366,10 +5775,10 @@ void drcbe_x86::op_fmul(x86code *&dst, const instruction &inst) normalize_commutative(src1p, src2p); // general case - emit_fld_p(dst, inst.size(), src1p); // fld src1p - emit_fld_p(dst, inst.size(), src2p); // fld src2p - emit_fmulp(dst); // fmulp - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + emit_fld_p(a, inst.size(), src1p); // fld src1p + emit_fld_p(a, inst.size(), src2p); // fld src2p + a.fmulp(); // fmulp + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6377,7 +5786,7 @@ void drcbe_x86::op_fmul(x86code *&dst, const instruction &inst) // op_fdiv - process a FDIV opcode //------------------------------------------------- -void drcbe_x86::op_fdiv(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fdiv(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6390,10 +5799,10 @@ void drcbe_x86::op_fdiv(x86code *&dst, const instruction &inst) be_parameter src2p(*this, inst.param(2), PTYPE_MF); // general case - emit_fld_p(dst, inst.size(), src1p); // fld src1p - emit_fld_p(dst, inst.size(), src2p); // fld src2p - emit_fdivp(dst); // fdivp - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + emit_fld_p(a, inst.size(), src1p); // fld src1p + emit_fld_p(a, inst.size(), src2p); // fld src2p + a.fdivp(); // fdivp + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6401,7 +5810,7 @@ void drcbe_x86::op_fdiv(x86code *&dst, const instruction &inst) // op_fneg - process a FNEG opcode //------------------------------------------------- -void drcbe_x86::op_fneg(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fneg(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6413,9 +5822,9 @@ void drcbe_x86::op_fneg(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MF); // general case - emit_fld_p(dst, inst.size(), srcp); // fld srcp - emit_fchs(dst); // fchs - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + emit_fld_p(a, inst.size(), srcp); // fld srcp + a.fchs(); // fchs + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6423,7 +5832,7 @@ void drcbe_x86::op_fneg(x86code *&dst, const instruction &inst) // op_fabs - process a FABS opcode //------------------------------------------------- -void drcbe_x86::op_fabs(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fabs(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6435,9 +5844,9 @@ void drcbe_x86::op_fabs(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MF); // general case - emit_fld_p(dst, inst.size(), srcp); // fld srcp - emit_fabs(dst); // fabs - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + emit_fld_p(a, inst.size(), srcp); // fld srcp + a.fabs(); // fabs + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6445,7 +5854,7 @@ void drcbe_x86::op_fabs(x86code *&dst, const instruction &inst) // op_fsqrt - process a FSQRT opcode //------------------------------------------------- -void drcbe_x86::op_fsqrt(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fsqrt(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6457,9 +5866,9 @@ void drcbe_x86::op_fsqrt(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MF); // general case - emit_fld_p(dst, inst.size(), srcp); // fld srcp - emit_fsqrt(dst); // fsqrt - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + emit_fld_p(a, inst.size(), srcp); // fld srcp + a.fsqrt(); // fsqrt + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6467,7 +5876,7 @@ void drcbe_x86::op_fsqrt(x86code *&dst, const instruction &inst) // op_frecip - process a FRECIP opcode //------------------------------------------------- -void drcbe_x86::op_frecip(x86code *&dst, const instruction &inst) +void drcbe_x86::op_frecip(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6479,10 +5888,10 @@ void drcbe_x86::op_frecip(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MF); // general case - emit_fld1(dst); // fld1 - emit_fld_p(dst, inst.size(), srcp); // fld srcp - emit_fdivp(dst); // fdivp - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + a.fld1(); // fld1 + emit_fld_p(a, inst.size(), srcp); // fld srcp + a.fdivp(); // fdivp + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6490,7 +5899,7 @@ void drcbe_x86::op_frecip(x86code *&dst, const instruction &inst) // op_frsqrt - process a FRSQRT opcode //------------------------------------------------- -void drcbe_x86::op_frsqrt(x86code *&dst, const instruction &inst) +void drcbe_x86::op_frsqrt(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6502,11 +5911,11 @@ void drcbe_x86::op_frsqrt(x86code *&dst, const instruction &inst) be_parameter srcp(*this, inst.param(1), PTYPE_MF); // general case - emit_fld1(dst); // fld1 - emit_fld_p(dst, inst.size(), srcp); // fld srcp - emit_fsqrt(dst); // fsqrt - emit_fdivp(dst); // fdivp - emit_fstp_p(dst, inst.size(), dstp); // fstp dstp + a.fld1(); // fld1 + emit_fld_p(a, inst.size(), srcp); // fld srcp + a.fsqrt(); // fsqrt + a.fdivp(); // fdivp + emit_fstp_p(a, inst.size(), dstp); // fstp dstp } @@ -6514,7 +5923,7 @@ void drcbe_x86::op_frsqrt(x86code *&dst, const instruction &inst) // op_fcopyi - process a FCOPYI opcode //------------------------------------------------- -void drcbe_x86::op_fcopyi(x86code *&dst, const instruction &inst) +void drcbe_x86::op_fcopyi(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6530,12 +5939,12 @@ void drcbe_x86::op_fcopyi(x86code *&dst, const instruction &inst) { if (srcp.is_memory()) { - emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp] - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax + a.mov(eax, MABS(srcp.memory())); // mov eax,[srcp] + a.mov(MABS(dstp.memory()), eax); // mov [dstp],eax } else if (srcp.is_int_register()) { - emit_mov_m32_r32(dst, MABS(dstp.memory()), srcp.ireg()); // mov [dstp],srcp + a.mov(MABS(dstp.memory()), Gpd(srcp.ireg())); // mov [dstp],srcp } } @@ -6544,17 +5953,17 @@ void drcbe_x86::op_fcopyi(x86code *&dst, const instruction &inst) { if (srcp.is_memory()) { - emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp] - emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4] + a.mov(eax, MABS(srcp.memory(0))); // mov eax,[srcp] + a.mov(edx, MABS(srcp.memory(4))); // mov edx,[srcp+4] } else if (srcp.is_int_register()) { - emit_mov_r32_m32(dst, REG_EDX, MABS(m_reghi[srcp.ireg()])); // mov edx,[reghi[srcp]] - emit_mov_r32_r32(dst, REG_EAX, srcp.ireg()); // mov eax,srcp + a.mov(edx, MABS(m_reghi[srcp.ireg()])); // mov edx,[reghi[srcp]] + a.mov(eax, Gpd(srcp.ireg())); // mov eax,srcp } - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx + a.mov(MABS(dstp.memory(0)), eax); // mov [dstp],eax + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp+4],edx } } @@ -6563,7 +5972,7 @@ void drcbe_x86::op_fcopyi(x86code *&dst, const instruction &inst) // op_icopyf - process a ICOPYF opcode //------------------------------------------------- -void drcbe_x86::op_icopyf(x86code *&dst, const instruction &inst) +void drcbe_x86::op_icopyf(Assembler &a, const instruction &inst) { // validate instruction assert(inst.size() == 4 || inst.size() == 8); @@ -6577,33 +5986,33 @@ void drcbe_x86::op_icopyf(x86code *&dst, const instruction &inst) // 32-bit case if (inst.size() == 4) { - emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp] + a.mov(eax, MABS(srcp.memory())); // mov eax,[srcp] if (dstp.is_memory()) { - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax + a.mov(MABS(dstp.memory()), eax); // mov [dstp],eax } else if (dstp.is_int_register()) { - emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax + a.mov(Gpd(dstp.ireg()), eax); // mov dstp,eax } } // 64-bit case else if (inst.size() == 8) { - emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp] - emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4] + a.mov(eax, MABS(srcp.memory(0))); // mov eax,[srcp] + a.mov(edx, MABS(srcp.memory(4))); // mov edx,[srcp+4] if (dstp.is_memory()) { - emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax - emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx + a.mov(MABS(dstp.memory(0)), eax); // mov [dstp],eax + a.mov(MABS(dstp.memory(4)), edx); // mov [dstp+4],edx } else { - emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi[dstp]],edx - emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax + a.mov(MABS(m_reghi[dstp.ireg()]), edx); // mov [reghi[dstp]],edx + a.mov(Gpd(dstp.ireg()), eax); // mov dstp,eax } } } diff --git a/src/devices/cpu/drcbex86.h b/src/devices/cpu/drcbex86.h index ef1bf57f010..c6c8e2734e7 100644 --- a/src/devices/cpu/drcbex86.h +++ b/src/devices/cpu/drcbex86.h @@ -17,10 +17,10 @@ #include "drcbeut.h" #include "x86log.h" -#define X86EMIT_SIZE 32 -#include "x86emit.h" - +#include "asmjit/src/asmjit/asmjit.h" +using namespace asmjit; +using namespace asmjit::x86; namespace drc { //************************************************************************** @@ -45,6 +45,9 @@ public: virtual bool logging() const override { return m_log != nullptr; } private: + // HACK: leftover from x86emit + static int const REG_MAX = 16; + // a be_parameter is similar to a uml::parameter but maps to native registers/memory class be_parameter { @@ -66,43 +69,41 @@ private: // construction be_parameter() : m_type(PTYPE_NONE), m_value(0) { } - be_parameter(const be_parameter ¶m) : m_type(param.m_type), m_value(param.m_value) { } + be_parameter(be_parameter const ¶m) : m_type(param.m_type), m_value(param.m_value) { } be_parameter(uint64_t val) : m_type(PTYPE_IMMEDIATE), m_value(val) { } be_parameter(drcbe_x86 &drcbe, const uml::parameter ¶m, uint32_t allowed); // creators for types that don't safely default - static inline be_parameter make_ireg(int regnum) { assert(regnum >= 0 && regnum < x86emit::REG_MAX); return be_parameter(PTYPE_INT_REGISTER, regnum); } - static inline be_parameter make_freg(int regnum) { assert(regnum >= 0 && regnum < x86emit::REG_MAX); return be_parameter(PTYPE_FLOAT_REGISTER, regnum); } - static inline be_parameter make_vreg(int regnum) { assert(regnum >= 0 && regnum < x86emit::REG_MAX); return be_parameter(PTYPE_VECTOR_REGISTER, regnum); } + static inline be_parameter make_ireg(int regnum) { assert(regnum >= 0 && regnum < REG_MAX); return be_parameter(PTYPE_INT_REGISTER, regnum); } + static inline be_parameter make_freg(int regnum) { assert(regnum >= 0 && regnum < REG_MAX); return be_parameter(PTYPE_FLOAT_REGISTER, regnum); } static inline be_parameter make_memory(void *base) { return be_parameter(PTYPE_MEMORY, reinterpret_cast(base)); } static inline be_parameter make_memory(const void *base) { return be_parameter(PTYPE_MEMORY, reinterpret_cast(const_cast(base))); } // operators - bool operator==(const be_parameter &rhs) const { return (m_type == rhs.m_type && m_value == rhs.m_value); } - bool operator!=(const be_parameter &rhs) const { return (m_type != rhs.m_type || m_value != rhs.m_value); } + bool operator==(be_parameter const &rhs) const { return (m_type == rhs.m_type && m_value == rhs.m_value); } + bool operator!=(be_parameter const &rhs) const { return (m_type != rhs.m_type || m_value != rhs.m_value); } // getters be_parameter_type type() const { return m_type; } uint64_t immediate() const { assert(m_type == PTYPE_IMMEDIATE); return m_value; } - int ireg() const { assert(m_type == PTYPE_INT_REGISTER); assert(m_value < x86emit::REG_MAX); return m_value; } - int freg() const { assert(m_type == PTYPE_FLOAT_REGISTER); assert(m_value < x86emit::REG_MAX); return m_value; } - int vreg() const { assert(m_type == PTYPE_VECTOR_REGISTER); assert(m_value < x86emit::REG_MAX); return m_value; } + uint32_t ireg() const { assert(m_type == PTYPE_INT_REGISTER); assert(m_value < REG_MAX); return m_value; } + uint32_t freg() const { assert(m_type == PTYPE_FLOAT_REGISTER); assert(m_value < REG_MAX); return m_value; } void *memory(uint32_t offset = 0) const { assert(m_type == PTYPE_MEMORY); return reinterpret_cast(m_value + offset); } // type queries bool is_immediate() const { return (m_type == PTYPE_IMMEDIATE); } bool is_int_register() const { return (m_type == PTYPE_INT_REGISTER); } bool is_float_register() const { return (m_type == PTYPE_FLOAT_REGISTER); } - bool is_vector_register() const { return (m_type == PTYPE_VECTOR_REGISTER); } bool is_memory() const { return (m_type == PTYPE_MEMORY); } // other queries bool is_immediate_value(uint64_t value) const { return (m_type == PTYPE_IMMEDIATE && m_value == value); } // helpers - int select_register(int defreg) const; - int select_register(int defreg, const be_parameter &checkparam) const; - int select_register(int defreg, const be_parameter &checkparam, const be_parameter &checkparam2) const; + Gp select_register(Gp const &defreg) const; + Xmm select_register(Xmm defreg) const; + template T select_register(T defreg, be_parameter const &checkparam) const; + template T select_register(T defreg, be_parameter const &checkparam, be_parameter const &checkparam2) const; private: // private constructor @@ -114,176 +115,136 @@ private: }; // helpers + Mem MABS(void const *base, u32 const size = 0) const { return Mem(u64(base), size); } void normalize_commutative(be_parameter &inner, be_parameter &outer); - void emit_combine_z_flags(x86code *&dst); - void emit_combine_z_shl_flags(x86code *&dst); + void emit_combine_z_flags(Assembler &a); + void emit_combine_z_shl_flags(Assembler &a); void reset_last_upper_lower_reg(); - void set_last_lower_reg(x86code *&dst, const be_parameter ¶m, uint8_t reglo); - void set_last_upper_reg(x86code *&dst, const be_parameter ¶m, uint8_t reghi); - bool can_skip_lower_load(x86code *&dst, uint32_t *memref, uint8_t reglo); - bool can_skip_upper_load(x86code *&dst, uint32_t *memref, uint8_t reghi); - void track_resolve_link(x86code *&destptr, const emit_link &linkinfo); - - void fixup_label(void *parameter, drccodeptr labelcodeptr); - void fixup_exception(drccodeptr *codeptr, void *param1, void *param2); + void set_last_lower_reg(Assembler &a, be_parameter const ¶m, Gp const ®lo); + void set_last_upper_reg(Assembler &a, be_parameter const ¶m, Gp const ®hi); + bool can_skip_lower_load(Assembler &a, uint32_t *memref, Gp const ®lo); + bool can_skip_upper_load(Assembler &a, uint32_t *memref, Gp const ®hi); static void debug_log_hashjmp(int mode, offs_t pc); // code generators - void op_handle(x86code *&dst, const uml::instruction &inst); - void op_hash(x86code *&dst, const uml::instruction &inst); - void op_label(x86code *&dst, const uml::instruction &inst); - void op_comment(x86code *&dst, const uml::instruction &inst); - void op_mapvar(x86code *&dst, const uml::instruction &inst); - - void op_nop(x86code *&dst, const uml::instruction &inst); - void op_debug(x86code *&dst, const uml::instruction &inst); - void op_exit(x86code *&dst, const uml::instruction &inst); - void op_hashjmp(x86code *&dst, const uml::instruction &inst); - void op_jmp(x86code *&dst, const uml::instruction &inst); - void op_exh(x86code *&dst, const uml::instruction &inst); - void op_callh(x86code *&dst, const uml::instruction &inst); - void op_ret(x86code *&dst, const uml::instruction &inst); - void op_callc(x86code *&dst, const uml::instruction &inst); - void op_recover(x86code *&dst, const uml::instruction &inst); - - void op_setfmod(x86code *&dst, const uml::instruction &inst); - void op_getfmod(x86code *&dst, const uml::instruction &inst); - void op_getexp(x86code *&dst, const uml::instruction &inst); - void op_getflgs(x86code *&dst, const uml::instruction &inst); - void op_save(x86code *&dst, const uml::instruction &inst); - void op_restore(x86code *&dst, const uml::instruction &inst); - - void op_load(x86code *&dst, const uml::instruction &inst); - void op_loads(x86code *&dst, const uml::instruction &inst); - void op_store(x86code *&dst, const uml::instruction &inst); - void op_read(x86code *&dst, const uml::instruction &inst); - void op_readm(x86code *&dst, const uml::instruction &inst); - void op_write(x86code *&dst, const uml::instruction &inst); - void op_writem(x86code *&dst, const uml::instruction &inst); - void op_carry(x86code *&dst, const uml::instruction &inst); - void op_set(x86code *&dst, const uml::instruction &inst); - void op_mov(x86code *&dst, const uml::instruction &inst); - void op_sext(x86code *&dst, const uml::instruction &inst); - void op_roland(x86code *&dst, const uml::instruction &inst); - void op_rolins(x86code *&dst, const uml::instruction &inst); - void op_add(x86code *&dst, const uml::instruction &inst); - void op_addc(x86code *&dst, const uml::instruction &inst); - void op_sub(x86code *&dst, const uml::instruction &inst); - void op_subc(x86code *&dst, const uml::instruction &inst); - void op_cmp(x86code *&dst, const uml::instruction &inst); - void op_mulu(x86code *&dst, const uml::instruction &inst); - void op_muls(x86code *&dst, const uml::instruction &inst); - void op_divu(x86code *&dst, const uml::instruction &inst); - void op_divs(x86code *&dst, const uml::instruction &inst); - void op_and(x86code *&dst, const uml::instruction &inst); - void op_test(x86code *&dst, const uml::instruction &inst); - void op_or(x86code *&dst, const uml::instruction &inst); - void op_xor(x86code *&dst, const uml::instruction &inst); - void op_lzcnt(x86code *&dst, const uml::instruction &inst); - void op_tzcnt(x86code *&dst, const uml::instruction &inst); - void op_bswap(x86code *&dst, const uml::instruction &inst); - void op_shl(x86code *&dst, const uml::instruction &inst); - void op_shr(x86code *&dst, const uml::instruction &inst); - void op_sar(x86code *&dst, const uml::instruction &inst); - void op_ror(x86code *&dst, const uml::instruction &inst); - void op_rol(x86code *&dst, const uml::instruction &inst); - void op_rorc(x86code *&dst, const uml::instruction &inst); - void op_rolc(x86code *&dst, const uml::instruction &inst); - - void op_fload(x86code *&dst, const uml::instruction &inst); - void op_fstore(x86code *&dst, const uml::instruction &inst); - void op_fread(x86code *&dst, const uml::instruction &inst); - void op_fwrite(x86code *&dst, const uml::instruction &inst); - void op_fmov(x86code *&dst, const uml::instruction &inst); - void op_ftoint(x86code *&dst, const uml::instruction &inst); - void op_ffrint(x86code *&dst, const uml::instruction &inst); - void op_ffrflt(x86code *&dst, const uml::instruction &inst); - void op_frnds(x86code *&dst, const uml::instruction &inst); - void op_fadd(x86code *&dst, const uml::instruction &inst); - void op_fsub(x86code *&dst, const uml::instruction &inst); - void op_fcmp(x86code *&dst, const uml::instruction &inst); - void op_fmul(x86code *&dst, const uml::instruction &inst); - void op_fdiv(x86code *&dst, const uml::instruction &inst); - void op_fneg(x86code *&dst, const uml::instruction &inst); - void op_fabs(x86code *&dst, const uml::instruction &inst); - void op_fsqrt(x86code *&dst, const uml::instruction &inst); - void op_frecip(x86code *&dst, const uml::instruction &inst); - void op_frsqrt(x86code *&dst, const uml::instruction &inst); - void op_fcopyi(x86code *&dst, const uml::instruction &inst); - void op_icopyf(x86code *&dst, const uml::instruction &inst); + void op_handle(Assembler &a, const uml::instruction &inst); + void op_hash(Assembler &a, const uml::instruction &inst); + void op_label(Assembler &a, const uml::instruction &inst); + void op_comment(Assembler &a, const uml::instruction &inst); + void op_mapvar(Assembler &a, const uml::instruction &inst); + + void op_nop(Assembler &a, const uml::instruction &inst); + void op_debug(Assembler &a, const uml::instruction &inst); + void op_exit(Assembler &a, const uml::instruction &inst); + void op_hashjmp(Assembler &a, const uml::instruction &inst); + void op_jmp(Assembler &a, const uml::instruction &inst); + void op_exh(Assembler &a, const uml::instruction &inst); + void op_callh(Assembler &a, const uml::instruction &inst); + void op_ret(Assembler &a, const uml::instruction &inst); + void op_callc(Assembler &a, const uml::instruction &inst); + void op_recover(Assembler &a, const uml::instruction &inst); + + void op_setfmod(Assembler &a, const uml::instruction &inst); + void op_getfmod(Assembler &a, const uml::instruction &inst); + void op_getexp(Assembler &a, const uml::instruction &inst); + void op_getflgs(Assembler &a, const uml::instruction &inst); + void op_save(Assembler &a, const uml::instruction &inst); + void op_restore(Assembler &a, const uml::instruction &inst); + + void op_load(Assembler &a, const uml::instruction &inst); + void op_loads(Assembler &a, const uml::instruction &inst); + void op_store(Assembler &a, const uml::instruction &inst); + void op_read(Assembler &a, const uml::instruction &inst); + void op_readm(Assembler &a, const uml::instruction &inst); + void op_write(Assembler &a, const uml::instruction &inst); + void op_writem(Assembler &a, const uml::instruction &inst); + void op_carry(Assembler &a, const uml::instruction &inst); + void op_set(Assembler &a, const uml::instruction &inst); + void op_mov(Assembler &a, const uml::instruction &inst); + void op_sext(Assembler &a, const uml::instruction &inst); + void op_roland(Assembler &a, const uml::instruction &inst); + void op_rolins(Assembler &a, const uml::instruction &inst); + void op_add(Assembler &a, const uml::instruction &inst); + void op_addc(Assembler &a, const uml::instruction &inst); + void op_sub(Assembler &a, const uml::instruction &inst); + void op_subc(Assembler &a, const uml::instruction &inst); + void op_cmp(Assembler &a, const uml::instruction &inst); + void op_mulu(Assembler &a, const uml::instruction &inst); + void op_muls(Assembler &a, const uml::instruction &inst); + void op_divu(Assembler &a, const uml::instruction &inst); + void op_divs(Assembler &a, const uml::instruction &inst); + void op_and(Assembler &a, const uml::instruction &inst); + void op_test(Assembler &a, const uml::instruction &inst); + void op_or(Assembler &a, const uml::instruction &inst); + void op_xor(Assembler &a, const uml::instruction &inst); + void op_lzcnt(Assembler &a, const uml::instruction &inst); + void op_tzcnt(Assembler &a, const uml::instruction &inst); + void op_bswap(Assembler &a, const uml::instruction &inst); + void op_shl(Assembler &a, const uml::instruction &inst); + void op_shr(Assembler &a, const uml::instruction &inst); + void op_sar(Assembler &a, const uml::instruction &inst); + void op_ror(Assembler &a, const uml::instruction &inst); + void op_rol(Assembler &a, const uml::instruction &inst); + void op_rorc(Assembler &a, const uml::instruction &inst); + void op_rolc(Assembler &a, const uml::instruction &inst); + + void op_fload(Assembler &a, const uml::instruction &inst); + void op_fstore(Assembler &a, const uml::instruction &inst); + void op_fread(Assembler &a, const uml::instruction &inst); + void op_fwrite(Assembler &a, const uml::instruction &inst); + void op_fmov(Assembler &a, const uml::instruction &inst); + void op_ftoint(Assembler &a, const uml::instruction &inst); + void op_ffrint(Assembler &a, const uml::instruction &inst); + void op_ffrflt(Assembler &a, const uml::instruction &inst); + void op_frnds(Assembler &a, const uml::instruction &inst); + void op_fadd(Assembler &a, const uml::instruction &inst); + void op_fsub(Assembler &a, const uml::instruction &inst); + void op_fcmp(Assembler &a, const uml::instruction &inst); + void op_fmul(Assembler &a, const uml::instruction &inst); + void op_fdiv(Assembler &a, const uml::instruction &inst); + void op_fneg(Assembler &a, const uml::instruction &inst); + void op_fabs(Assembler &a, const uml::instruction &inst); + void op_fsqrt(Assembler &a, const uml::instruction &inst); + void op_frecip(Assembler &a, const uml::instruction &inst); + void op_frsqrt(Assembler &a, const uml::instruction &inst); + void op_fcopyi(Assembler &a, const uml::instruction &inst); + void op_icopyf(Assembler &a, const uml::instruction &inst); // 32-bit code emission helpers - void emit_mov_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m); - void emit_mov_r32_p32_keepflags(x86code *&dst, uint8_t reg, const be_parameter ¶m); - void emit_mov_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m); - void emit_mov_p32_r32(x86code *&dst, const be_parameter ¶m, uint8_t reg); - void emit_add_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_add_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_adc_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_adc_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_sub_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_sub_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_sbb_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_sbb_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_cmp_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_cmp_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_and_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_and_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_test_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_test_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_or_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_or_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_xor_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_xor_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_shl_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_shl_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_shr_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_shr_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_sar_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_sar_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_rol_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_rol_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_ror_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_ror_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_rcl_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_rcl_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_rcr_r32_p32(x86code *&dst, uint8_t reg, const be_parameter ¶m, const uml::instruction &inst); - void emit_rcr_m32_p32(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); + void emit_mov_r32_p32(Assembler &a, Gp const ®, be_parameter const ¶m); + void emit_mov_r32_p32_keepflags(Assembler &a, Gp const ®, be_parameter const ¶m); + void emit_mov_m32_p32(Assembler &a, Mem memref, be_parameter const ¶m); + void emit_mov_p32_r32(Assembler &a, be_parameter const ¶m, Gp const ®); + + void alu_op_param(Assembler &a, Inst::Id const opcode, Operand const &dst, be_parameter const ¶m, std::function optimize = [](Assembler &a, Operand dst, be_parameter const &src) { return false; }); + void shift_op_param(Assembler &a, Inst::Id const opcode, Operand const &dst, be_parameter const ¶m, std::function optimize); // 64-bit code emission helpers - void emit_mov_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m); - void emit_mov_r64_p64_keepflags(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m); - void emit_mov_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m); - void emit_mov_p64_r64(x86code *&dst, const be_parameter ¶m, uint8_t reglo, uint8_t reghi); - void emit_add_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_add_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_adc_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_adc_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_sub_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_sub_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_sbb_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_sbb_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_cmp_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_and_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_and_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_test_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_test_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_or_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_or_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_xor_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_xor_m64_p64(x86code *&dst, x86_memref memref, const be_parameter ¶m, const uml::instruction &inst); - void emit_shl_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_shr_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_sar_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_rol_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_ror_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_rcl_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); - void emit_rcr_r64_p64(x86code *&dst, uint8_t reglo, uint8_t reghi, const be_parameter ¶m, const uml::instruction &inst); + void emit_mov_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m); + void emit_mov_r64_p64_keepflags(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m); + void emit_mov_m64_p64(Assembler &a, Mem const &memref, be_parameter const ¶m); + void emit_mov_p64_r64(Assembler &a, be_parameter const ¶m, Gp const ®lo, Gp const ®hi); + void emit_and_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_and_m64_p64(Assembler &a, Mem const &memref_lo, Mem const &memref_hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_or_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_or_m64_p64(Assembler &a, Mem const &memref_lo, Mem const &memref_hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_xor_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_xor_m64_p64(Assembler &a, Mem const &memref_lo, Mem const &memref_hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_shl_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_shr_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_sar_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_rol_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_ror_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_rcl_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + void emit_rcr_r64_p64(Assembler &a, Gp const ®lo, Gp const ®hi, be_parameter const ¶m, const uml::instruction &inst); + + void alu_op_param(Assembler &a, Inst::Id const opcode_lo, Inst::Id const opcode_hi, Gp const &lo, Gp const &hi, be_parameter const ¶m, bool const saveflags); + void alu_op_param(Assembler &a, Inst::Id const opcode_lo, Inst::Id const opcode_hi, Mem const &lo, Mem const &hi, be_parameter const ¶m, bool const saveflags); // floating-point code emission helpers - void emit_fld_p(x86code *&dst, int size, const be_parameter ¶m); - void emit_fstp_p(x86code *&dst, int size, const be_parameter ¶m); + void emit_fld_p(Assembler &a, int size, be_parameter const ¶m); + void emit_fstp_p(Assembler &a, int size, be_parameter const ¶m); // callback helpers static int dmulu(uint64_t &dstlo, uint64_t &dsthi, uint64_t src1, uint64_t src2, bool flags); @@ -291,13 +252,15 @@ private: static int ddivu(uint64_t &dstlo, uint64_t &dsthi, uint64_t src1, uint64_t src2); static int ddivs(uint64_t &dstlo, uint64_t &dsthi, int64_t src1, int64_t src2); + size_t emit(CodeHolder &ch); + // internal state drc_hash_table m_hash; // hash table state drc_map_variables m_map; // code map - drc_label_list m_labels; // label list x86log_context * m_log; // logging + FILE * m_log_asmjit; bool m_logged_common; // logged common code already? - bool m_sse3; // do we have SSE3 support? + bool const m_sse3; // do we have SSE3 support? x86_entry_point_func m_entry; // entry point x86code * m_exit; // exit point @@ -305,29 +268,26 @@ private: x86code * m_save; // save handler x86code * m_restore; // restore handler - uint32_t * m_reglo[x86emit::REG_MAX];// pointer to low part of data for each register - uint32_t * m_reghi[x86emit::REG_MAX];// pointer to high part of data for each register - uint8_t m_last_lower_reg; // last register we stored a lower from + uint32_t * m_reglo[REG_MAX]; // pointer to low part of data for each register + uint32_t * m_reghi[REG_MAX]; // pointer to high part of data for each register + Gp m_last_lower_reg; // last register we stored a lower from x86code * m_last_lower_pc; // PC after instruction where we last stored a lower register - uint32_t * m_last_lower_addr; // address where we last stored an lower register - uint8_t m_last_upper_reg; // last register we stored an upper from + uint32_t * m_last_lower_addr; // address where we last stored an lower register + Gp m_last_upper_reg; // last register we stored an upper from x86code * m_last_upper_pc; // PC after instruction where we last stored an upper register - uint32_t * m_last_upper_addr; // address where we last stored an upper register + uint32_t * m_last_upper_addr; // address where we last stored an upper register double m_fptemp; // temporary storage for floating point - uint16_t m_fpumode; // saved FPU mode - uint16_t m_fmodesave; // temporary location for saving + uint16_t m_fpumode; // saved FPU mode + uint16_t m_fmodesave; // temporary location for saving void * m_stacksave; // saved stack pointer void * m_hashstacksave; // saved stack pointer for hashjmp - uint64_t m_reslo; // extended low result - uint64_t m_reshi; // extended high result - - drc_label_fixup_delegate m_fixup_label; // precomputed delegate for fixups - drc_oob_delegate m_fixup_exception; // precomputed delegate for exception fixups + uint64_t m_reslo; // extended low result + uint64_t m_reshi; // extended high result // globals - typedef void (drcbe_x86::*opcode_generate_func)(x86code *&dst, const uml::instruction &inst); + typedef void (drcbe_x86::*opcode_generate_func)(Assembler &a, const uml::instruction &inst); struct opcode_table_entry { uml::opcode_t opcode; // opcode in question -- cgit v1.2.3 From cff37cc7ee48d18841481ac95c25e77f8004dc11 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 10 Jul 2020 09:21:14 -0400 Subject: Remove x86emit.h --- scripts/src/cpu.lua | 1 - src/devices/cpu/drcbex86.cpp | 1 - src/devices/cpu/x86emit.h | 3197 ------------------------------------------ src/devices/cpu/x86log.h | 5 +- 4 files changed, 4 insertions(+), 3200 deletions(-) delete mode 100644 src/devices/cpu/x86emit.h diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua index 54c0bc7576a..e8eabea847c 100644 --- a/scripts/src/cpu.lua +++ b/scripts/src/cpu.lua @@ -44,7 +44,6 @@ if (CPU_INCLUDE_DRC) then MAME_DIR .. "src/devices/cpu/drcbex64.cpp", MAME_DIR .. "src/devices/cpu/drcbex64.h", MAME_DIR .. "src/devices/cpu/drcumlsh.h", - MAME_DIR .. "src/devices/cpu/x86emit.h", } end diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp index 647d3c4c351..f005ce5cb6a 100644 --- a/src/devices/cpu/drcbex86.cpp +++ b/src/devices/cpu/drcbex86.cpp @@ -89,7 +89,6 @@ #include "drcuml.h" #include "drcbex86.h" -// This is a trick to make it build on Android where the x86 SDK declares ::REG_Exx namespace drc { using namespace uml; diff --git a/src/devices/cpu/x86emit.h b/src/devices/cpu/x86emit.h deleted file mode 100644 index 5494c0b5668..00000000000 --- a/src/devices/cpu/x86emit.h +++ /dev/null @@ -1,3197 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/*************************************************************************** - - x86emit.h - - Generic x86/x64 code emitters. - -**************************************************************************** - - Important note: - - It is assumed in 64-bit mode that all byte register accesses are - intended to be to the low 8 bits (SPL,BPL,SIL,DIL) and not to the - upper half (AH,CH,DH,BH). - -***************************************************************************/ - - -//************************************************************************** -// SHARED DEFINITIONS -//************************************************************************** - -#ifndef __X86EMIT_H__ -#define __X86EMIT_H__ - -// use x86code * to reference generated code -typedef uint8_t x86code; - -// this structure tracks information about a link -struct emit_link -{ - x86code * target; - uint8_t size; -}; - -// structure for describing memory references -class x86_memref -{ -public: - x86_memref(uint8_t basereg, uint8_t indreg, uint8_t scale, int32_t disp) - : m_base(basereg), - m_index(indreg), - m_scale(scale), - m_disp(disp) { } - - x86_memref operator+(int32_t offset) { return x86_memref(m_base, m_index, m_scale, m_disp + offset); } - - uint8_t m_base; - uint8_t m_index; - uint8_t m_scale; - int32_t m_disp; -}; - -#endif - - - -//************************************************************************** -// 32-BIT and 64-BIT SPECIFIC DEFINITIONS -//************************************************************************** - -#ifdef X86EMIT_SIZE - -#if (X86EMIT_SIZE != 32 && X86EMIT_SIZE != 64) -#error Must specify X86EMIT_SIZE as either 32 or 64! -#endif - -// put emitters into their own namespace so they don't clash -#if (X86EMIT_SIZE == 32) -namespace x86emit -#else -namespace x64emit -#endif -{ -//************************************************************************** -// CONSTANTS -//************************************************************************** - -// opcode size flag; low 4 bits must match REX low 4 bits, hence the odd numbers here -const uint8_t OP_16BIT = 0x10; -const uint8_t OP_32BIT = 0x00; -const uint8_t OP_64BIT = 0x08; - -// 16 registers on x64, only 8 on x86 -#if (X86EMIT_SIZE == 64) -const int REG_MAX = 16; -#else -const int REG_MAX = 8; -#endif - -// invalid register index for "none" -const uint8_t REG_NONE = REG_MAX; - -// 8-bit registers -- note that we assume a flat model for 64-bit -const uint8_t REG_AL = 0; -const uint8_t REG_CL = 1; -const uint8_t REG_DL = 2; -const uint8_t REG_BL = 3; -#if (X86EMIT_SIZE == 32) -const uint8_t REG_AH = 4; -const uint8_t REG_CH = 5; -const uint8_t REG_DH = 6; -const uint8_t REG_BH = 7; -#else -const uint8_t REG_SPL = 4; -const uint8_t REG_BPL = 5; -const uint8_t REG_SIL = 6; -const uint8_t REG_DIL = 7; -const uint8_t REG_R8L = 8; -const uint8_t REG_R9L = 9; -const uint8_t REG_R10L = 10; -const uint8_t REG_R11L = 11; -const uint8_t REG_R12L = 12; -const uint8_t REG_R13L = 13; -const uint8_t REG_R14L = 14; -const uint8_t REG_R15L = 15; -#endif - -// 16-bit registers -const uint8_t REG_AX = 0; -const uint8_t REG_CX = 1; -const uint8_t REG_DX = 2; -const uint8_t REG_BX = 3; -const uint8_t REG_SP = 4; -const uint8_t REG_BP = 5; -const uint8_t REG_SI = 6; -const uint8_t REG_DI = 7; -#if (X86EMIT_SIZE == 64) -const uint8_t REG_R8W = 8; -const uint8_t REG_R9W = 9; -const uint8_t REG_R10W = 10; -const uint8_t REG_R11W = 11; -const uint8_t REG_R12W = 12; -const uint8_t REG_R13W = 13; -const uint8_t REG_R14W = 14; -const uint8_t REG_R15W = 15; -#endif - -// 32-bit registers -const uint8_t REG_EAX = 0; -const uint8_t REG_ECX = 1; -const uint8_t REG_EDX = 2; -const uint8_t REG_EBX = 3; -const uint8_t REG_ESP = 4; -const uint8_t REG_EBP = 5; -const uint8_t REG_ESI = 6; -const uint8_t REG_EDI = 7; -#if (X86EMIT_SIZE == 64) -const uint8_t REG_R8D = 8; -const uint8_t REG_R9D = 9; -const uint8_t REG_R10D = 10; -const uint8_t REG_R11D = 11; -const uint8_t REG_R12D = 12; -const uint8_t REG_R13D = 13; -const uint8_t REG_R14D = 14; -const uint8_t REG_R15D = 15; -#endif - -// 64-bit registers -#if (X86EMIT_SIZE == 64) -const uint8_t REG_RAX = 0; -const uint8_t REG_RCX = 1; -const uint8_t REG_RDX = 2; -const uint8_t REG_RBX = 3; -const uint8_t REG_RSP = 4; -const uint8_t REG_RBP = 5; -const uint8_t REG_RSI = 6; -const uint8_t REG_RDI = 7; -const uint8_t REG_R8 = 8; -const uint8_t REG_R9 = 9; -const uint8_t REG_R10 = 10; -const uint8_t REG_R11 = 11; -const uint8_t REG_R12 = 12; -const uint8_t REG_R13 = 13; -const uint8_t REG_R14 = 14; -const uint8_t REG_R15 = 15; -#endif - -// 64-bit MMX registers -const uint8_t REG_MM0 = 0; -const uint8_t REG_MM1 = 1; -const uint8_t REG_MM2 = 2; -const uint8_t REG_MM3 = 3; -const uint8_t REG_MM4 = 4; -const uint8_t REG_MM5 = 5; -const uint8_t REG_MM6 = 6; -const uint8_t REG_MM7 = 7; -#if (X86EMIT_SIZE == 64) -const uint8_t REG_MM8 = 8; -const uint8_t REG_MM9 = 9; -const uint8_t REG_MM10 = 10; -const uint8_t REG_MM11 = 11; -const uint8_t REG_MM12 = 12; -const uint8_t REG_MM13 = 13; -const uint8_t REG_MM14 = 14; -const uint8_t REG_MM15 = 15; -#endif - -// 128-bit XMM registers -const uint8_t REG_XMM0 = 0; -const uint8_t REG_XMM1 = 1; -const uint8_t REG_XMM2 = 2; -const uint8_t REG_XMM3 = 3; -const uint8_t REG_XMM4 = 4; -const uint8_t REG_XMM5 = 5; -const uint8_t REG_XMM6 = 6; -const uint8_t REG_XMM7 = 7; -#if (X86EMIT_SIZE == 64) -const uint8_t REG_XMM8 = 8; -const uint8_t REG_XMM9 = 9; -const uint8_t REG_XMM10 = 10; -const uint8_t REG_XMM11 = 11; -const uint8_t REG_XMM12 = 12; -const uint8_t REG_XMM13 = 13; -const uint8_t REG_XMM14 = 14; -const uint8_t REG_XMM15 = 15; -#endif - -// conditions -const uint8_t COND_A = 7; -const uint8_t COND_AE = 3; -const uint8_t COND_B = 2; -const uint8_t COND_BE = 6; -const uint8_t COND_C = 2; -const uint8_t COND_E = 4; -const uint8_t COND_Z = 4; -const uint8_t COND_G = 15; -const uint8_t COND_GE = 13; -const uint8_t COND_L = 12; -const uint8_t COND_LE = 14; -const uint8_t COND_NA = 6; -const uint8_t COND_NAE = 2; -const uint8_t COND_NB = 3; -const uint8_t COND_NBE = 7; -const uint8_t COND_NC = 3; -const uint8_t COND_NE = 5; -const uint8_t COND_NG = 14; -const uint8_t COND_NGE = 12; -const uint8_t COND_NL = 13; -const uint8_t COND_NLE = 15; -const uint8_t COND_NO = 1; -const uint8_t COND_NP = 11; -const uint8_t COND_NS = 9; -const uint8_t COND_NZ = 5; -const uint8_t COND_O = 0; -const uint8_t COND_P = 10; -const uint8_t COND_PE = 10; -const uint8_t COND_PO = 11; -const uint8_t COND_S = 8; - -// floating point rounding modes -const uint8_t FPRND_NEAR = 0; -const uint8_t FPRND_DOWN = 1; -const uint8_t FPRND_UP = 2; -const uint8_t FPRND_CHOP = 3; - - - -//************************************************************************** -// OPCODE DEFINITIONS -//************************************************************************** - -// opcode flags (in upper 8 bits of opcode) -const uint32_t OPFLAG_8BITREG = (1 << 24); -const uint32_t OPFLAG_8BITRM = (1 << 25); - -// single byte opcodes -const uint32_t OP_ADD_Eb_Gb = (0x00 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_ADD_Ev_Gv = 0x01; -const uint32_t OP_ADD_Gb_Eb = (0x02 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_ADD_Gv_Ev = 0x03; -const uint32_t OP_ADD_AL_Ib = 0x04; -const uint32_t OP_ADD_rAX_Iz = 0x05; -const uint32_t OP_PUSH_ES = 0x06; -const uint32_t OP_POP_ES = 0x07; -const uint32_t OP_OR_Eb_Gb = (0x08 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_OR_Ev_Gv = 0x09; -const uint32_t OP_OR_Gb_Eb = (0x0a | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_OR_Gv_Ev = 0x0b; -const uint32_t OP_OR_AL_Ib = 0x0c; -const uint32_t OP_OR_eAX_Iv = 0x0d; -const uint32_t OP_PUSH_CS = 0x0e; -const uint32_t OP_EXTENDED = 0x0f; - -const uint32_t OP_ADC_Eb_Gb = (0x10 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_ADC_Ev_Gv = 0x11; -const uint32_t OP_ADC_Gb_Eb = (0x12 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_ADC_Gv_Ev = 0x13; -const uint32_t OP_ADC_AL_Ib = 0x14; -const uint32_t OP_ADC_rAX_Iz = 0x15; -const uint32_t OP_PUSH_SS = 0x16; -const uint32_t OP_POP_SS = 0x17; -const uint32_t OP_SBB_Eb_Gb = (0x18 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_SBB_Ev_Gv = 0x19; -const uint32_t OP_SBB_Gb_Eb = (0x1a | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_SBB_Gv_Ev = 0x1b; -const uint32_t OP_SBB_AL_Ib = 0x1c; -const uint32_t OP_SBB_eAX_Iv = 0x1d; -const uint32_t OP_PUSH_DS = 0x1e; -const uint32_t OP_POP_DS = 0x1f; - -const uint32_t OP_AND_Eb_Gb = (0x20 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_AND_Ev_Gv = 0x21; -const uint32_t OP_AND_Gb_Eb = (0x22 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_AND_Gv_Ev = 0x23; -const uint32_t OP_AND_AL_Ib = 0x24; -const uint32_t OP_AND_rAX_Iz = 0x25; -const uint32_t PREFIX_ES = 0x26; -const uint32_t OP_DAA = 0x27; -const uint32_t OP_SUB_Eb_Gb = (0x28 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_SUB_Ev_Gv = 0x29; -const uint32_t OP_SUB_Gb_Eb = (0x2a | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_SUB_Gv_Ev = 0x2b; -const uint32_t OP_SUB_AL_Ib = 0x2c; -const uint32_t OP_SUB_eAX_Iv = 0x2d; -const uint32_t PREFIX_CS = 0x2e; -const uint32_t OP_DAS = 0x2f; - -const uint32_t OP_XOR_Eb_Gb = (0x30 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_XOR_Ev_Gv = 0x31; -const uint32_t OP_XOR_Gb_Eb = (0x32 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_XOR_Gv_Ev = 0x33; -const uint32_t OP_XOR_AL_Ib = 0x34; -const uint32_t OP_XOR_rAX_Iz = 0x35; -const uint32_t PREFIX_SS = 0x36; -const uint32_t OP_AAA = 0x37; -const uint32_t OP_CMP_Eb_Gb = (0x38 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_CMP_Ev_Gv = 0x39; -const uint32_t OP_CMP_Gb_Eb = (0x3a | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_CMP_Gv_Ev = 0x3b; -const uint32_t OP_CMP_AL_Ib = 0x3c; -const uint32_t OP_CMP_eAX_Iv = 0x3d; -const uint32_t PREFIX_DS = 0x3e; -const uint32_t OP_AAS = 0x3f; - -const uint32_t OP_REX = 0x40; -const uint32_t OP_REX_B = 0x41; -const uint32_t OP_REX_X = 0x42; -const uint32_t OP_REX_XB = 0x43; -const uint32_t OP_REX_R = 0x44; -const uint32_t OP_REX_RB = 0x45; -const uint32_t OP_REX_RX = 0x46; -const uint32_t OP_REX_RXB = 0x47; -const uint32_t OP_REX_W = 0x48; -const uint32_t OP_REX_WB = 0x49; -const uint32_t OP_REX_WX = 0x4a; -const uint32_t OP_REX_WXB = 0x4b; -const uint32_t OP_REX_WR = 0x4c; -const uint32_t OP_REX_WRB = 0x4d; -const uint32_t OP_REX_WRX = 0x4e; -const uint32_t OP_REX_WRXB = 0x4f; - -const uint32_t OP_PUSH_rAX = 0x50; -const uint32_t OP_PUSH_rCX = 0x51; -const uint32_t OP_PUSH_rDX = 0x52; -const uint32_t OP_PUSH_rBX = 0x53; -const uint32_t OP_PUSH_rSP = 0x54; -const uint32_t OP_PUSH_rBP = 0x55; -const uint32_t OP_PUSH_rSI = 0x56; -const uint32_t OP_PUSH_rDI = 0x57; -const uint32_t OP_POP_rAX = 0x58; -const uint32_t OP_POP_rCX = 0x59; -const uint32_t OP_POP_rDX = 0x5a; -const uint32_t OP_POP_rBX = 0x5b; -const uint32_t OP_POP_rSP = 0x5c; -const uint32_t OP_POP_rBP = 0x5d; -const uint32_t OP_POP_rSI = 0x5e; -const uint32_t OP_POP_rDI = 0x5f; - -const uint32_t OP_PUSHA = 0x60; -const uint32_t OP_POPA = 0x61; -const uint32_t OP_BOUND_Gv_Ma = 0x62; -const uint32_t OP_ARPL_Ew_Gw = 0x63; -const uint32_t OP_MOVSXD_Gv_Ev = 0x63; -const uint32_t PREFIX_FS = 0x64; -const uint32_t PREFIX_GS = 0x65; -const uint32_t PREFIX_OPSIZE = 0x66; -const uint32_t PREFIX_ADSIZE = 0x67; -const uint32_t OP_PUSH_Iz = 0x68; -const uint32_t OP_IMUL_Gv_Ev_Iz = 0x69; -const uint32_t OP_PUSH_Ib = 0x6a; -const uint32_t OP_IMUL_Gv_Ev_Ib = 0x6b; -const uint32_t OP_INS_Yb_DX = 0x6c; -const uint32_t OP_INS_Yz_DX = 0x6d; -const uint32_t OP_OUTS_DX_Xb = 0x6e; -const uint32_t OP_OUTS_DX_Xz = 0x6f; - -const uint32_t OP_JCC_O_Jb = 0x70; -const uint32_t OP_JCC_NO_Jb = 0x71; -const uint32_t OP_JCC_B_Jb = 0x72; -const uint32_t OP_JCC_C_Jb = 0x72; -const uint32_t OP_JCC_NAE_Jb = 0x72; -const uint32_t OP_JCC_AE_Jb = 0x73; -const uint32_t OP_JCC_NB_Jb = 0x73; -const uint32_t OP_JCC_NC_Jb = 0x73; -const uint32_t OP_JCC_E_Jb = 0x74; -const uint32_t OP_JCC_Z_Jb = 0x74; -const uint32_t OP_JCC_NE_Jb = 0x75; -const uint32_t OP_JCC_NZ_Jb = 0x75; -const uint32_t OP_JCC_BE_Jb = 0x76; -const uint32_t OP_JCC_NA_Jb = 0x76; -const uint32_t OP_JCC_A_Jb = 0x77; -const uint32_t OP_JCC_NBE_Jb = 0x77; -const uint32_t OP_JCC_S_Jb = 0x78; -const uint32_t OP_JCC_NS_Jb = 0x79; -const uint32_t OP_JCC_P_Jb = 0x7a; -const uint32_t OP_JCC_PE_Jb = 0x7a; -const uint32_t OP_JCC_NP_Jb = 0x7b; -const uint32_t OP_JCC_PO_Jb = 0x7b; -const uint32_t OP_JCC_L_Jb = 0x7c; -const uint32_t OP_JCC_NGE_Jb = 0x7c; -const uint32_t OP_JCC_NL_Jb = 0x7d; -const uint32_t OP_JCC_GE_Jb = 0x7d; -const uint32_t OP_JCC_LE_Jb = 0x7e; -const uint32_t OP_JCC_NG_Jb = 0x7e; -const uint32_t OP_JCC_NLE_Jb = 0x7f; -const uint32_t OP_JCC_G_Jb = 0x7f; - -const uint32_t OP_G1_Eb_Ib = (0x80 | OPFLAG_8BITRM); -const uint32_t OP_G1_Ev_Iz = 0x81; -const uint32_t OP_G1_Eb_Ibx = (0x82 | OPFLAG_8BITRM); -const uint32_t OP_G1_Ev_Ib = 0x83; -const uint32_t OP_TEST_Eb_Gb = (0x84 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_TEST_Ev_Gv = 0x85; -const uint32_t OP_XCHG_Eb_Gb = (0x86 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_XCHG_Ev_Gv = 0x87; -const uint32_t OP_MOV_Eb_Gb = (0x88 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_MOV_Ev_Gv = 0x89; -const uint32_t OP_MOV_Gb_Eb = (0x8a | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_MOV_Gv_Ev = 0x8b; -const uint32_t OP_MOV_Ev_Sw = 0x8c; -const uint32_t OP_LEA_Gv_M = 0x8d; -const uint32_t OP_MOV_Sw_Ew = 0x8e; -const uint32_t OP_G1A_Ev = 0x8f; - -const uint32_t OP_NOP = 0x90; -const uint32_t OP_PAUSE = 0x90; -const uint32_t OP_XCHG_rCX = 0x91; -const uint32_t OP_XCHG_rDX = 0x92; -const uint32_t OP_XCHG_rBX = 0x93; -const uint32_t OP_XCHG_rSP = 0x94; -const uint32_t OP_XCHG_rBP = 0x95; -const uint32_t OP_XCHG_rSI = 0x96; -const uint32_t OP_XCHG_rDI = 0x97; -const uint32_t OP_CBW = 0x98; -const uint32_t OP_CWDE = 0x98; -const uint32_t OP_CDQE = 0x98; -const uint32_t OP_CWD = 0x99; -const uint32_t OP_CDQ = 0x99; -const uint32_t OP_CQO = 0x99; -const uint32_t OP_CALLF_Ap = 0x9a; -const uint32_t OP_FWAIT = 0x9b; -const uint32_t OP_PUSHF_Fv = 0x9c; -const uint32_t OP_POPF_Fv = 0x9d; -const uint32_t OP_SAHF = 0x9e; -const uint32_t OP_LAHF = 0x9f; - -const uint32_t OP_MOV_AL_Ob = 0xa0; -const uint32_t OP_MOV_rAX_Ov = 0xa1; -const uint32_t OP_MOV_Ob_AL = 0xa2; -const uint32_t OP_MOV_Ov_rAX = 0xa3; -const uint32_t OP_MOVS_Xb_Yb = 0xa4; -const uint32_t OP_MOVS_Xv_Yv = 0xa5; -const uint32_t OP_CMPS_Xb_Yb = 0xa6; -const uint32_t OP_CMPS_Xv_Yv = 0xa7; -const uint32_t OP_TEST_AL_Ib = 0xa8; -const uint32_t OP_TEST_rAX_Iz = 0xa9; -const uint32_t OP_STOS_Yb_AL = 0xaa; -const uint32_t OP_STOS_Yv_rAX = 0xab; -const uint32_t OP_LODS_AL_Xb = 0xac; -const uint32_t OP_LODS_rAX_Xv = 0xad; -const uint32_t OP_SCAS_AL_Yb = 0xae; -const uint32_t OP_SCAC_rAX_Yv = 0xaf; - -const uint32_t OP_MOV_AL_Ib = 0xb0; -const uint32_t OP_MOV_CL_Ib = 0xb1; -const uint32_t OP_MOV_DL_Ib = 0xb2; -const uint32_t OP_MOV_BL_Ib = 0xb3; -const uint32_t OP_MOV_AH_Ib = 0xb4; -const uint32_t OP_MOV_CH_Ib = 0xb5; -const uint32_t OP_MOV_DH_Ib = 0xb6; -const uint32_t OP_MOV_BH_Ib = 0xb7; -const uint32_t OP_MOV_rAX_Iv = 0xb8; -const uint32_t OP_MOV_rCX_Iv = 0xb9; -const uint32_t OP_MOV_rDX_Iv = 0xba; -const uint32_t OP_MOV_rBX_Iv = 0xbb; -const uint32_t OP_MOV_rSP_Iv = 0xbc; -const uint32_t OP_MOV_rBP_Iv = 0xbd; -const uint32_t OP_MOV_rSI_Iv = 0xbe; -const uint32_t OP_MOV_rDI_Iv = 0xbf; - -const uint32_t OP_G2_Eb_Ib = (0xc0 | OPFLAG_8BITRM); -const uint32_t OP_G2_Ev_Ib = 0xc1; -const uint32_t OP_RETN_Iw = 0xc2; -const uint32_t OP_RETN = 0xc3; -const uint32_t OP_LES_Gz_Mp = 0xc4; -const uint32_t OP_LDS_Gz_Mp = 0xc5; -const uint32_t OP_G11_Eb_Ib = (0xc6 | OPFLAG_8BITRM); -const uint32_t OP_G11_Ev_Iz = 0xc7; -const uint32_t OP_ENTER_Iw_Ib = 0xc8; -const uint32_t OP_LEAVE = 0xc9; -const uint32_t OP_RETF_Iw = 0xca; -const uint32_t OP_RETF = 0xcb; -const uint32_t OP_INT_3 = 0xcc; -const uint32_t OP_INT_Ib = 0xcd; -const uint32_t OP_INTO = 0xce; -const uint32_t OP_IRET = 0xcf; - -const uint32_t OP_G2_Eb_1 = (0xd0 | OPFLAG_8BITRM); -const uint32_t OP_G2_Ev_1 = 0xd1; -const uint32_t OP_G2_Eb_CL = (0xd2 | OPFLAG_8BITRM); -const uint32_t OP_G2_Ev_CL = 0xd3; -const uint32_t OP_AAM = 0xd4; -const uint32_t OP_AAD = 0xd5; -const uint32_t OP_XLAT = 0xd7; -const uint32_t OP_ESC_D8 = 0xd8; -const uint32_t OP_ESC_D9 = 0xd9; -const uint32_t OP_ESC_DA = 0xda; -const uint32_t OP_ESC_DB = 0xdb; -const uint32_t OP_ESC_DC = 0xdc; -const uint32_t OP_ESC_DD = 0xdd; -const uint32_t OP_ESC_DE = 0xde; -const uint32_t OP_ESC_DF = 0xdf; - -const uint32_t OP_LOOPNE_Jb = 0xe0; -const uint32_t OP_LOOPE_Jb = 0xe1; -const uint32_t OP_LOOP_Jb = 0xe2; -const uint32_t OP_JrCXZ_Jb = 0xe3; -const uint32_t OP_IN_AL_Ib = 0xe4; -const uint32_t OP_IN_eAX_Ib = 0xe5; -const uint32_t OP_OUT_Ib_AL = 0xe6; -const uint32_t OP_OUT_Ib_eAX = 0xe7; -const uint32_t OP_CALL_Jz = 0xe8; -const uint32_t OP_JMP_Jz = 0xe9; -const uint32_t OP_JMPF_AP = 0xea; -const uint32_t OP_JMP_Jb = 0xeb; -const uint32_t OP_IN_AL_DX = 0xec; -const uint32_t OP_IN_eAX_D = 0xed; -const uint32_t OP_OUT_DX_AL = 0xee; -const uint32_t OP_OUT_DX_eAX = 0xef; - -const uint32_t PREFIX_LOCK = 0xf0; -const uint32_t PREFIX_REPNE = 0xf2; -const uint32_t PREFIX_REPE = 0xf3; -const uint32_t OP_HLT = 0xf4; -const uint32_t OP_CMC = 0xf5; -const uint32_t OP_G3_Eb = (0xf6 | OPFLAG_8BITRM); -const uint32_t OP_G3_Ev = 0xf7; -const uint32_t OP_CLC = 0xf8; -const uint32_t OP_STC = 0xf9; -const uint32_t OP_CLI = 0xfa; -const uint32_t OP_STI = 0xfb; -const uint32_t OP_CLD = 0xfc; -const uint32_t OP_STD = 0xfd; -const uint32_t OP_G4 = 0xfe; -const uint32_t OP_G5 = 0xff; - - -// double byte opcodes -const uint32_t OP_G6 = 0x0f00; -const uint32_t OP_G7 = 0x0f01; -const uint32_t OP_LAR_Gv_Ew = 0x0f02; -const uint32_t OP_LSL_Gv_Ew = 0x0f03; -const uint32_t OP_SYSCALL = 0x0f05; -const uint32_t OP_CLTS = 0x0f06; -const uint32_t OP_SYSRET = 0x0f07; -const uint32_t OP_INVD = 0x0f08; -const uint32_t OP_WBINVD = 0x0f09; -const uint32_t OP_UD2 = 0x0f0b; -const uint32_t OP_NOP0d_Ev = 0x0f0d; - -const uint32_t OP_MOVUPS_Vps_Wps = 0x0f10; -const uint32_t OP_MOVSS_Vss_Wss = 0xf30f10; -const uint32_t OP_MOVUPD_Vpd_Wpd = 0x660f10; -const uint32_t OP_MOVSD_Vsd_Wsd = 0xf20f10; -const uint32_t OP_MOVUPS_Wps_Vps = 0x0f11; -const uint32_t OP_MOVSS_Wss_Vss = 0xf30f11; -const uint32_t OP_MOVUPD_Wpd_Vpd = 0x660f11; -const uint32_t OP_MOVSD_Wsd_Vsd = 0xf20f11; -const uint32_t OP_MOVLPS_Vq_Mq = 0x0f12; -const uint32_t OP_MOVLPD_Vq_Mq = 0x660f12; -const uint32_t OP_MOVHLPS_Vq_Uq = 0x0f12; -const uint32_t OP_MOVDDUP_Vq_Wq = 0xf20f12; -const uint32_t OP_MOVSLDUP_Vq_Wq = 0xf30f12; -const uint32_t OP_MOVLPS_Mq_Vq = 0x0f13; -const uint32_t OP_MOVLPD_Mq_Vq = 0x660f13; -const uint32_t OP_UNPCKLPS_Vps_Wq = 0x0f14; -const uint32_t OP_UNPCKLPD_Vpd_Wq = 0x660f14; -const uint32_t OP_UNPCKHPS_Vps_Wq = 0x0f15; -const uint32_t OP_UNPCKHPD_Vpd_Wq = 0x660f15; -const uint32_t OP_MOVHPS_Vq_Mq = 0x0f16; -const uint32_t OP_MOVHPD_Vq_Mq = 0x660f16; -const uint32_t OP_MOVLHPS_Vq_Uq = 0x0f16; -const uint32_t OP_MOVSHDUP_Vq_Wq = 0xf30f16; -const uint32_t OP_MOVHPS_Mq_Vq = 0x0f17; -const uint32_t OP_MOVHPD_Mq_Vq = 0x660f17; -const uint32_t OP_PREFETCH_G16 = 0x0f18; -const uint32_t OP_NOP1f_Ev = 0x0f1f; - -const uint32_t OP_MOV_Rd_Cd = 0x0f20; -const uint32_t OP_MOV_Rd_Dd = 0x0f21; -const uint32_t OP_MOV_Cd_Rd = 0x0f22; -const uint32_t OP_MOV_Dd_Rd = 0x0f23; -const uint32_t OP_MOVAPS_Vps_Wps = 0x0f28; -const uint32_t OP_MOVAPD_Vpd_Wpd = 0x660f28; -const uint32_t OP_MOVAPS_Wps_Vps = 0x0f29; -const uint32_t OP_MOVAPD_Wpd_Vpd = 0x660f29; -const uint32_t OP_CVTPI2PS_Vps_Qq = 0x0f2a; -const uint32_t OP_CVTSI2SS_Vss_Ed = 0xf30f2a; -const uint32_t OP_CVTPI2PD_Vpd_Qq = 0x660f2a; -const uint32_t OP_CVTSI2SD_Vsd_Ed = 0xf20f2a; -const uint32_t OP_MOVNTPS_Mps_Vps = 0x0f2b; -const uint32_t OP_MOVNTPD_Mpd_Vpd = 0x660f2b; -const uint32_t OP_CVTTPS2PI_Pq_Wq = 0x0f2c; -const uint32_t OP_CVTTSS2SI_Gd_Wss = 0xf30f2c; -const uint32_t OP_CVTTPD2PI_Pq_Wpd = 0x660f2c; -const uint32_t OP_CVTTSD2SI_Gd_Wsd = 0xf20f2c; -const uint32_t OP_CVTPS2PI_Pq_Wq = 0x0f2d; -const uint32_t OP_CVTSS2SI_Gd_Wss = 0xf30f2d; -const uint32_t OP_CVTPD2PI_Pq_Wpd = 0x660f2d; -const uint32_t OP_CVTSD2SI_Gd_Wsd = 0xf20f2d; -const uint32_t OP_UCOMISS_Vss_Wss = 0x0f2e; -const uint32_t OP_UCOMISD_Vsd_Wsd = 0x660f2e; -const uint32_t OP_COMISS_Vss_Wss = 0x0f2f; -const uint32_t OP_COMISD_Vsd_Wsd = 0x660f2f; - -const uint32_t OP_WRMSR = 0x0f30; -const uint32_t OP_RDTSC = 0x0f31; -const uint32_t OP_RDMSR = 0x0f32; -const uint32_t OP_RDPMC = 0x0f33; -const uint32_t OP_SYSENTER = 0x0f34; -const uint32_t OP_SYSEXIT = 0x0f35; -const uint32_t OP_GETSEC = 0x0f37; - -const uint32_t OP_CMOV_O_Gv_Ev = 0x0f40; -const uint32_t OP_CMOV_NO_Gv_Ev = 0x0f41; -const uint32_t OP_CMOV_B_Gv_Ev = 0x0f42; -const uint32_t OP_CMOV_C_Gv_Ev = 0x0f42; -const uint32_t OP_CMOV_AE_Gv_Ev = 0x0f43; -const uint32_t OP_CMOV_NC_Gv_Ev = 0x0f43; -const uint32_t OP_CMOV_E_Gv_Ev = 0x0f44; -const uint32_t OP_CMOV_Z_Gv_Ev = 0x0f44; -const uint32_t OP_CMOV_NE_Gv_Ev = 0x0f45; -const uint32_t OP_CMOV_NZ_Gv_Ev = 0x0f45; -const uint32_t OP_CMOV_BE_Gv_Ev = 0x0f46; -const uint32_t OP_CMOV_A_Gv_Ev = 0x0f47; -const uint32_t OP_CMOV_S_Gv_Ev = 0x0f48; -const uint32_t OP_CMOV_NS_Gv_Ev = 0x0f49; -const uint32_t OP_CMOV_P_Gv_Ev = 0x0f4a; -const uint32_t OP_CMOV_PE_Gv_Ev = 0x0f4a; -const uint32_t OP_CMOV_NP_Gv_Ev = 0x0f4b; -const uint32_t OP_CMOV_PO_Gv_Ev = 0x0f4b; -const uint32_t OP_CMOV_L_Gv_Ev = 0x0f4c; -const uint32_t OP_CMOV_NGE_Gv_Ev = 0x0f4c; -const uint32_t OP_CMOV_NL_Gv_Ev = 0x0f4d; -const uint32_t OP_CMOV_GE_Gv_Ev = 0x0f4d; -const uint32_t OP_CMOV_LE_Gv_Ev = 0x0f4e; -const uint32_t OP_CMOV_NG_Gv_Ev = 0x0f4e; -const uint32_t OP_CMOV_NLE_Gv_Ev = 0x0f4f; -const uint32_t OP_CMOV_G_Gv_Ev = 0x0f4f; - -const uint32_t OP_MOVMSKPS_Gd_Ups = 0x0f50; -const uint32_t OP_MOVMSKPD_Gd_Upd = 0x660f50; -const uint32_t OP_SQRTPS_Vps_Wps = 0x0f51; -const uint32_t OP_SQRTSS_Vss_Wss = 0xf30f51; -const uint32_t OP_SQRTPD_Vpd_Wpd = 0x660f51; -const uint32_t OP_SQRTSD_Vsd_Wsd = 0xf20f51; -const uint32_t OP_RSQRTPS_Vps_Wps = 0x0f52; -const uint32_t OP_RSQRTSS_Vss_Wss = 0xf30f52; -const uint32_t OP_RCPPS_Vps_Wps = 0x0f53; -const uint32_t OP_RCPSS_Vss_Wss = 0xf30f53; -const uint32_t OP_ANDPS_Vps_Wps = 0x0f54; -const uint32_t OP_ANDPD_Vpd_Wpd = 0x660f54; -const uint32_t OP_ANDNPS_Vps_Wps = 0x0f55; -const uint32_t OP_ANDNPD_Vpd_Wpd = 0x660f55; -const uint32_t OP_ORPS_Vps_Wps = 0x0f56; -const uint32_t OP_ORPD_Vpd_Wpd = 0x660f56; -const uint32_t OP_XORPS_Vps_Wps = 0x0f57; -const uint32_t OP_XORPD_Vpd_Wpd = 0x660f57; -const uint32_t OP_ADDPS_Vps_Wps = 0x0f58; -const uint32_t OP_ADDSS_Vss_Wss = 0xf30f58; -const uint32_t OP_ADDPD_Vpd_Wpd = 0x660f58; -const uint32_t OP_ADDSD_Vsd_Wsd = 0xf20f58; -const uint32_t OP_MULPS_Vps_Wps = 0x0f59; -const uint32_t OP_MULSS_Vss_Wss = 0xf30f59; -const uint32_t OP_MULPD_Vpd_Wpd = 0x660f59; -const uint32_t OP_MULSD_Vsd_Wsd = 0xf20f59; -const uint32_t OP_CVTPS2PD_Vpd_Wq = 0x0f5a; -const uint32_t OP_CVTSS2SD_Vsd_Wss = 0xf30f5a; -const uint32_t OP_CVTPD2PS_Vps_Wpd = 0x660f5a; -const uint32_t OP_CVTSD2SS_Vss_Wsd = 0xf20f5a; -const uint32_t OP_CVTDQ2PS_Vps_Wdq = 0x0f5b; -const uint32_t OP_CVTPS2DQ_Vdq_Wps = 0x660f5b; -const uint32_t OP_CVTTPS2DQ_Vdq_Wps = 0xf30f5b; -const uint32_t OP_SUBPS_Vps_Wps = 0x0f5c; -const uint32_t OP_SUBSS_Vss_Wss = 0xf30f5c; -const uint32_t OP_SUBPD_Vpd_Wpd = 0x660f5c; -const uint32_t OP_SUBSD_Vsd_Wsd = 0xf20f5c; -const uint32_t OP_MINPS_Vps_Wps = 0x0f5d; -const uint32_t OP_MINSS_Vss_Wss = 0xf30f5d; -const uint32_t OP_MINPD_Vpd_Wpd = 0x660f5d; -const uint32_t OP_MINSD_Vsd_Wsd = 0xf20f5d; -const uint32_t OP_DIVPS_Vps_Wps = 0x0f5e; -const uint32_t OP_DIVSS_Vss_Wss = 0xf30f5e; -const uint32_t OP_DIVPD_Vpd_Wpd = 0x660f5e; -const uint32_t OP_DIVSD_Vsd_Wsd = 0xf20f5e; -const uint32_t OP_MAXPS_Vps_Wps = 0x0f5f; -const uint32_t OP_MAXSS_Vss_Wss = 0xf30f5f; -const uint32_t OP_MAXPD_Vpd_Wpd = 0x660f5f; -const uint32_t OP_MAXSD_Vsd_Wsd = 0xf20f5f; - -const uint32_t OP_PUNPCKLBW_Pq_Qd = 0x0f60; -const uint32_t OP_PUNPCKLBW_Vdq_Wdq = 0x660f60; -const uint32_t OP_PUNPCKLWD_Pq_Qd = 0x0f61; -const uint32_t OP_PUNPCKLWD_Vdq_Wdq = 0x660f61; -const uint32_t OP_PUNPCKLDQ_Pq_Qd = 0x0f62; -const uint32_t OP_PUNPCKLDQ_Vdq_Wdq = 0x660f62; -const uint32_t OP_PACKSSWB_Pq_Qq = 0x0f63; -const uint32_t OP_PACKSSWB_Vdq_Wdq = 0x660f63; -const uint32_t OP_PCMPGTB_Pq_Qq = 0x0f64; -const uint32_t OP_PCMPGTB_Vdq_Wdq = 0x660f64; -const uint32_t OP_PCMPGTW_Pq_Qq = 0x0f65; -const uint32_t OP_PCMPGTW_Vdq_Wdq = 0x660f65; -const uint32_t OP_PCMPGTD_Pq_Qq = 0x0f66; -const uint32_t OP_PCMPGTD_Vdq_Wdq = 0x660f66; -const uint32_t OP_PACKUSWB_Pq_Qq = 0x0f67; -const uint32_t OP_PACKUSWB_Vdq_Wdq = 0x660f67; -const uint32_t OP_PUNPCKHBW_Pq_Qq = 0x0f68; -const uint32_t OP_PUNPCKHBW_Vdq_Qdq = 0x660f68; -const uint32_t OP_PUNPCKHWD_Pq_Qq = 0x0f69; -const uint32_t OP_PUNPCKHWD_Vdq_Qdq = 0x660f69; -const uint32_t OP_PUNPCKHDQ_Pq_Qq = 0x0f6a; -const uint32_t OP_PUNPCKHDQ_Vdq_Qdq = 0x660f6a; -const uint32_t OP_PACKSSDW_Pq_Qq = 0x0f6b; -const uint32_t OP_PACKSSDW_Vdq_Qdq = 0x660f6b; -const uint32_t OP_PUNPCKLQDQ_Vdq_Wdq = 0x660f6c; -const uint32_t OP_PUNPCKHQDQ_Vdq_Wdq = 0x660f6d; -const uint32_t OP_MOVD_Pd_Ed = 0x0f6e; -const uint32_t OP_MOVD_Vd_Ed = 0x660f6e; -const uint32_t OP_MOVQ_Pq_Qq = 0x0f6f; -const uint32_t OP_MOVDQA_Vdq_Wdq = 0x660f6f; -const uint32_t OP_MOVDQU_Vdq_Wdq = 0xf30f6f; - -const uint32_t OP_PSHUFW_Pq_Qq_Ib = 0x0f70; -const uint32_t OP_PSHUFD_Vdq_Wdq_Ib = 0x660f70; -const uint32_t OP_PSHUFHW_Vdq_Wdq_Ib = 0xf30f70; -const uint32_t OP_PSHUFLW_Vdq_Wdq_Ib = 0xf20f70; -const uint32_t OP_G12 = 0x0f71; -const uint32_t OP_G13 = 0x0f72; -const uint32_t OP_G14 = 0x0f73; -const uint32_t OP_PCMPEQB_Pq_Qq = 0x0f74; -const uint32_t OP_PCMPEQB_Vdq_Wdq = 0x660f74; -const uint32_t OP_PCMPEQW_Pq_Qq = 0x0f75; -const uint32_t OP_PCMPEQW_Vdq_Wdq = 0x660f75; -const uint32_t OP_PCMPEQD_Pq_Qq = 0x0f76; -const uint32_t OP_PCMPEQD_Vdq_Wdq = 0x660f76; -const uint32_t OP_EMMS = 0x0f77; -const uint32_t OP_VMREAD_Ed_Gd = 0x0f78; -const uint32_t OP_VMWRITE_Gd_Ed = 0x0f79; -const uint32_t OP_HADDPD_Vpd_Wpd = 0x660f7c; -const uint32_t OP_HADDPS_Vps_Wps = 0xf20f7c; -const uint32_t OP_HSUBPD_Vpd_Wpd = 0x660f7d; -const uint32_t OP_HSUBPS_Vps_Wps = 0xf20f7d; -const uint32_t OP_MOVD_Ed_Pd = 0x0f7e; -const uint32_t OP_MOVD_Ed_Vd = 0x660f7e; -const uint32_t OP_MOVQ_Vq_Wq = 0xf30f7e; -const uint32_t OP_MOVQ_Qq_Pq = 0x0f7f; -const uint32_t OP_MOVDQA_Wdq_Vdq = 0x660f7f; -const uint32_t OP_MOVDQU_Wdq_Vdq = 0xf30f7f; - -const uint32_t OP_JCC_O_Jv = 0x0f80; -const uint32_t OP_JCC_NO_Jv = 0x0f81; -const uint32_t OP_JCC_B_Jv = 0x0f82; -const uint32_t OP_JCC_C_Jv = 0x0f82; -const uint32_t OP_JCC_NAE_Jv = 0x0f82; -const uint32_t OP_JCC_AE_Jv = 0x0f83; -const uint32_t OP_JCC_NB_Jv = 0x0f83; -const uint32_t OP_JCC_NC_Jv = 0x0f83; -const uint32_t OP_JCC_E_Jv = 0x0f84; -const uint32_t OP_JCC_Z_Jv = 0x0f84; -const uint32_t OP_JCC_NE_Jv = 0x0f85; -const uint32_t OP_JCC_NZ_Jv = 0x0f85; -const uint32_t OP_JCC_BE_Jv = 0x0f86; -const uint32_t OP_JCC_NA_Jv = 0x0f86; -const uint32_t OP_JCC_A_Jv = 0x0f87; -const uint32_t OP_JCC_NBE_Jv = 0x0f87; -const uint32_t OP_JCC_S_Jv = 0x0f88; -const uint32_t OP_JCC_NS_Jv = 0x0f89; -const uint32_t OP_JCC_P_Jv = 0x0f8a; -const uint32_t OP_JCC_PE_Jv = 0x0f8a; -const uint32_t OP_JCC_NP_Jv = 0x0f8b; -const uint32_t OP_JCC_PO_Jv = 0x0f8b; -const uint32_t OP_JCC_L_Jv = 0x0f8c; -const uint32_t OP_JCC_NGE_Jv = 0x0f8c; -const uint32_t OP_JCC_NL_Jv = 0x0f8d; -const uint32_t OP_JCC_GE_Jv = 0x0f8d; -const uint32_t OP_JCC_LE_Jv = 0x0f8e; -const uint32_t OP_JCC_NG_Jv = 0x0f8e; -const uint32_t OP_JCC_NLE_Jv = 0x0f8f; -const uint32_t OP_JCC_G_Jv = 0x0f8f; - -const uint32_t OP_SETCC_O_Eb = (0x0f90 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NO_Eb = (0x0f91 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_B_Eb = (0x0f92 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_C_Eb = (0x0f92 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NAE_Eb = (0x0f92 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_AE_Eb = (0x0f93 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NB_Eb = (0x0f93 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NC_Eb = (0x0f93 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_E_Eb = (0x0f94 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_Z_Eb = (0x0f94 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NE_Eb = (0x0f95 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NZ_Eb = (0x0f95 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_BE_Eb = (0x0f96 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NA_Eb = (0x0f96 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_A_Eb = (0x0f97 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NBE_Eb = (0x0f97 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_S_Eb = (0x0f98 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NS_Eb = (0x0f99 | OPFLAG_8BITRM); -const uint32_t OP_SETCC_P_Eb = (0x0f9a | OPFLAG_8BITRM); -const uint32_t OP_SETCC_PE_Eb = (0x0f9a | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NP_Eb = (0x0f9b | OPFLAG_8BITRM); -const uint32_t OP_SETCC_PO_Eb = (0x0f9b | OPFLAG_8BITRM); -const uint32_t OP_SETCC_L_Eb = (0x0f9c | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NGE_Eb = (0x0f9c | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NL_Eb = (0x0f9d | OPFLAG_8BITRM); -const uint32_t OP_SETCC_GE_Eb = (0x0f9d | OPFLAG_8BITRM); -const uint32_t OP_SETCC_LE_Eb = (0x0f9e | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NG_Eb = (0x0f9e | OPFLAG_8BITRM); -const uint32_t OP_SETCC_NLE_Eb = (0x0f9f | OPFLAG_8BITRM); -const uint32_t OP_SETCC_G_Eb = (0x0f9f | OPFLAG_8BITRM); - -const uint32_t OP_PUSH_FS = 0x0fa0; -const uint32_t OP_POP_FS = 0x0fa1; -const uint32_t OP_CPUID = 0x0fa2; -const uint32_t OP_BT_Ev_Gv = 0x0fa3; -const uint32_t OP_SHLD_Ev_Gv_Ib = 0x0fa4; -const uint32_t OP_SHLD_Ev_Gv_CL = 0x0fa5; -const uint32_t OP_PUSH_GS = 0x0fa8; -const uint32_t OP_POP_GS = 0x0fa9; -const uint32_t OP_RSM = 0x0faa; -const uint32_t OP_BTS_Ev_Gv = 0x0fab; -const uint32_t OP_SHRD_Ev_Gv_Ib = 0x0fac; -const uint32_t OP_SHRD_Ev_Gv_CL = 0x0fad; -const uint32_t OP_G16 = 0x0fae; -const uint32_t OP_IMUL_Gv_Ev = 0x0faf; - -const uint32_t OP_CMPXCHG_Eb_Gb = (0x0fb0 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_CMPXCHG_Ev_Gv = 0x0fb1; -const uint32_t OP_LSS_Mp = 0x0fb2; -const uint32_t OP_BTR_Ev_Gv = 0x0fb3; -const uint32_t OP_LFS_Mp = 0x0fb4; -const uint32_t OP_LGS_Mp = 0x0fb5; -const uint32_t OP_MOVZX_Gv_Eb = (0x0fb6 | OPFLAG_8BITRM); -const uint32_t OP_MOVZX_Gv_Ew = 0x0fb7; -const uint32_t OP_JMPE = 0x0fb8; -const uint32_t OP_POPCNT_Gv_Ev = 0xf30fb8; -const uint32_t OP_G10_INVALID = 0x0fb9; -const uint32_t OP_G8_Ev_Ib = 0x0fba; -const uint32_t OP_BTC_Ev_Gv = 0x0fbb; -const uint32_t OP_BSF_Gv_Ev = 0x0fbc; -const uint32_t OP_BSR_Gv_Ev = 0x0fbd; -const uint32_t OP_MOVSX_Gv_Eb = (0x0fbe | OPFLAG_8BITRM); -const uint32_t OP_MOVSX_Gv_Ew = 0x0fbf; - -const uint32_t OP_XADD_Eb_Gb = (0x0fc0 | OPFLAG_8BITRM | OPFLAG_8BITREG); -const uint32_t OP_XADD_Ev_Gv = 0x0fc1; -const uint32_t OP_CMPPS_Vps_Wps_Ib = 0x0fc2; -const uint32_t OP_CMPSS_Vss_Wss_Ib = 0xf30fc2; -const uint32_t OP_CMPPD_Vpd_Wpd_Ib = 0x660fc2; -const uint32_t OP_CMPSD_Vsd_Wsd_Ib = 0xf20fc2; -const uint32_t OP_MOVNTI_Md_Gd = 0x0fc3; -const uint32_t OP_PINSRW_Pw_Ew_Ib = 0x0fc4; -const uint32_t OP_PINSRW_Vw_Ew_Ib = 0x660fc4; -const uint32_t OP_PEXTRW_Gw_Pw_Ib = 0x0fc5; -const uint32_t OP_PEXTRW_Gw_Vw_Ib = 0x660fc5; -const uint32_t OP_SHUFPS_Vps_Wps_Ib = 0x0fc6; -const uint32_t OP_SHUFPD_Vpd_Wpd_Ib = 0x660fc6; -const uint32_t OP_G9 = 0x0fc7; -const uint32_t OP_BSWAP_EAX = 0x0fc8; -const uint32_t OP_BSWAP_ECX = 0x0fc9; -const uint32_t OP_BSWAP_EDX = 0x0fca; -const uint32_t OP_BSWAP_EBX = 0x0fcb; -const uint32_t OP_BSWAP_ESP = 0x0fcc; -const uint32_t OP_BSWAP_EBP = 0x0fcd; -const uint32_t OP_BSWAP_ESI = 0x0fce; -const uint32_t OP_BSWAP_EDI = 0x0fcf; - -const uint32_t OP_ADDSUBPD_Vpd_Wpd = 0x0fd0; -const uint32_t OP_ADDSUBPS_Vps_Wps = 0xf20fd0; -const uint32_t OP_PSRLW_Pq_Qq = 0x0fd1; -const uint32_t OP_PSRLW_Vdq_Wdq = 0x660fd1; -const uint32_t OP_PSRLD_Pq_Qq = 0x0fd2; -const uint32_t OP_PSRLD_Vdq_Wdq = 0x660fd2; -const uint32_t OP_PSRLQ_Pq_Qq = 0x0fd3; -const uint32_t OP_PSRLQ_Vdq_Wdq = 0x660fd3; -const uint32_t OP_PADDQ_Pq_Qq = 0x0fd4; -const uint32_t OP_PADDQ_Vdq_Wdq = 0x660fd4; -const uint32_t OP_PMULLW_Pq_Qq = 0x0fd5; -const uint32_t OP_PMULLW_Vdq_Wdq = 0x660fd5; -const uint32_t OP_MOVQ_Wq_Vq = 0x0fd6; -const uint32_t OP_MOVQ2DQ_Vdq_Qq = 0xf30fd6; -const uint32_t OP_MOVDQ2Q_Pq_Vq = 0xf20fd6; -const uint32_t OP_PMOVMSKB_Gd_Pq = 0x0fd7; -const uint32_t OP_PMOVMSKB_Gd_Vdq = 0x660fd7; -const uint32_t OP_PSUBUSB_Pq_Qq = 0x0fd8; -const uint32_t OP_PSUBUSB_Vdq_Wdq = 0x660fd8; -const uint32_t OP_PSUBUSW_Pq_Qq = 0x0fd9; -const uint32_t OP_PSUBUSW_Vdq_Wdq = 0x660fd9; -const uint32_t OP_PMINUB_Pq_Qq = 0x0fda; -const uint32_t OP_PMINUB_Vdq_Wdq = 0x660fda; -const uint32_t OP_PAND_Pq_Qq = 0x0fdb; -const uint32_t OP_PAND_Vdq_Wdq = 0x660fdb; -const uint32_t OP_PADDUSB_Pq_Qq = 0x0fdc; -const uint32_t OP_PADDUSB_Vdq_Wdq = 0x660fdc; -const uint32_t OP_PADDUSW_Pq_Qq = 0x0fdd; -const uint32_t OP_PADDUSW_Vdq_Wdq = 0x660fdd; -const uint32_t OP_PMAXUB_Pq_Qq = 0x0fde; -const uint32_t OP_PMAXUB_Vdq_Wdq = 0x660fde; -const uint32_t OP_PANDN_Pq_Qq = 0x0fdf; -const uint32_t OP_PANDN_Vdq_Wdq = 0x660fdf; - -const uint32_t OP_PAVGB_Pq_Qq = 0x0fe0; -const uint32_t OP_PAVGB_Vdq_Wdq = 0x660fe0; -const uint32_t OP_PSRAW_Pq_Qq = 0x0fe1; -const uint32_t OP_PSRAW_Vdq_Wdq = 0x660fe1; -const uint32_t OP_PSRAD_Pq_Qq = 0x0fe2; -const uint32_t OP_PSRAD_Vdq_Wdq = 0x660fe2; -const uint32_t OP_PAVGW_Pq_Qq = 0x0fe3; -const uint32_t OP_PAVGW_Vdq_Wdq = 0x660fe3; -const uint32_t OP_PMULHUW_Pq_Qq = 0x0fe4; -const uint32_t OP_PMULHUW_Vdq_Wdq = 0x660fe4; -const uint32_t OP_PMULHW_Pq_Qq = 0x0fe5; -const uint32_t OP_PMULHW_Vdq_Wdq = 0x660fe5; -const uint32_t OP_CVTPD2DQ_Vdq_Wpd = 0xf20fe6; -const uint32_t OP_CVTTPD2DQ_Vdq_Wpd = 0x660fe6; -const uint32_t OP_CVTDQ2PD_Vpd_Wq = 0xf30fe6; -const uint32_t OP_MOVNTQ_Mq_Vq = 0x0fe7; -const uint32_t OP_MOVNTDQ_Mdq_Vdq = 0x660fe7; -const uint32_t OP_PSUBSB_Pq_Qq = 0x0fe8; -const uint32_t OP_PSUBSB_Vdq_Wdq = 0x660fe8; -const uint32_t OP_PSUBSW_Pq_Qq = 0x0fe9; -const uint32_t OP_PSUBSW_Vdq_Wdq = 0x660fe9; -const uint32_t OP_PMINSW_Pq_Qq = 0x0fea; -const uint32_t OP_PMINSW_Vdq_Wdq = 0x660fea; -const uint32_t OP_POR_Pq_Qq = 0x0feb; -const uint32_t OP_POR_Vdq_Wdq = 0x660feb; -const uint32_t OP_PADDSB_Pq_Qq = 0x0fec; -const uint32_t OP_PADDSB_Vdq_Wdq = 0x660fec; -const uint32_t OP_PADDSW_Pq_Qq = 0x0fed; -const uint32_t OP_PADDSW_Vdq_Wdq = 0x660fed; -const uint32_t OP_PMAXSW_Pq_Qq = 0x0fee; -const uint32_t OP_PMAXSW_Vdq_Wdq = 0x660fee; -const uint32_t OP_PXOR_Pq_Qq = 0x0fef; -const uint32_t OP_PXOR_Vdq_Wdq = 0x660fef; - -const uint32_t OP_LDDQU_Vdq_Mdq = 0xf20ff0; -const uint32_t OP_PSLLW_Pq_Qq = 0x0ff1; -const uint32_t OP_PSLLW_Vdq_Wdq = 0x660ff1; -const uint32_t OP_PSLLD_Pq_Qq = 0x0ff2; -const uint32_t OP_PSLLD_Vdq_Wdq = 0x660ff2; -const uint32_t OP_PSLLQ_Pq_Qq = 0x0ff3; -const uint32_t OP_PSLLQ_Vdq_Wdq = 0x660ff3; -const uint32_t OP_PMULUDQ_Pq_Qq = 0x0ff4; -const uint32_t OP_PMULUDQ_Vdq_Wdq = 0x660ff4; -const uint32_t OP_PMADDWD_Pq_Qq = 0x0ff5; -const uint32_t OP_PMADDWD_Vdq_Wdq = 0x660ff5; -const uint32_t OP_PSADBW_Pq_Qq = 0x0ff6; -const uint32_t OP_PSADBW_Vdq_Wdq = 0x660ff6; -const uint32_t OP_MASKMOVQ_Pq_Qq = 0x0ff7; -const uint32_t OP_MASKMOVDQU_Vdq_Wdq = 0x660ff7; -const uint32_t OP_PSUBB_Pq_Qq = 0x0ff8; -const uint32_t OP_PSUBB_Vdq_Wdq = 0x660ff8; -const uint32_t OP_PSUBW_Pq_Qq = 0x0ff9; -const uint32_t OP_PSUBW_Vdq_Wdq = 0x660ff9; -const uint32_t OP_PSUBD_Pq_Qq = 0x0ffa; -const uint32_t OP_PSUBD_Vdq_Wdq = 0x660ffa; -const uint32_t OP_PSUBQ_Pq_Qq = 0x0ffb; -const uint32_t OP_PSUBQ_Vdq_Wdq = 0x660ffb; -const uint32_t OP_PADDB_Pq_Qq = 0x0ffc; -const uint32_t OP_PADDB_Vdq_Wdq = 0x660ffc; -const uint32_t OP_PADDW_Pq_Qq = 0x0ffd; -const uint32_t OP_PADDW_Vdq_Wdq = 0x660ffd; -const uint32_t OP_PADDD_Pq_Qq = 0x0ffe; -const uint32_t OP_PADDD_Vdq_Wdq = 0x660ffe; - - -// triple byte opcodes (0f 38) -const uint32_t OP_PSHUFB_Pq_Qq = 0x0f3800; -const uint32_t OP_PSHUFB_Vdq_Wdq = 0x660f3800; -const uint32_t OP_PHADDW_Pq_Qq = 0x0f3801; -const uint32_t OP_PHADDW_Vdq_Wdq = 0x660f3801; -const uint32_t OP_PHADDD_Pq_Qq = 0x0f3802; -const uint32_t OP_PHADDD_Vdq_Wdq = 0x660f3802; -const uint32_t OP_PHADDSW_Pq_Qq = 0x0f3803; -const uint32_t OP_PHADDSW_Vdq_Wdq = 0x660f3803; -const uint32_t OP_PMADDUBSW_Pq_Qq = 0x0f3804; -const uint32_t OP_PMADDUBSW_Vdq_Wdq = 0x660f3804; -const uint32_t OP_PHSUBW_Pq_Qq = 0x0f3805; -const uint32_t OP_PHSUBW_Vdq_Wdq = 0x660f3805; -const uint32_t OP_PHSUBD_Pq_Qq = 0x0f3806; -const uint32_t OP_PHSUBD_Vdq_Wdq = 0x660f3806; -const uint32_t OP_PHSUBSW_Pq_Qq = 0x0f3807; -const uint32_t OP_PHSUBSW_Vdq_Wdq = 0x660f3807; -const uint32_t OP_PSIGNB_Pq_Qq = 0x0f3808; -const uint32_t OP_PSIGNB_Vdq_Wdq = 0x660f3808; -const uint32_t OP_PSIGNW_Pq_Qq = 0x0f3809; -const uint32_t OP_PSIGNW_Vdq_Wdq = 0x660f3809; -const uint32_t OP_PSIGND_Pq_Qq = 0x0f380a; -const uint32_t OP_PSIGND_Vdq_Wdq = 0x660f380a; -const uint32_t OP_PMULHRSW_Pq_Qq = 0x0f380b; -const uint32_t OP_PMULHRSW_Vdq_Wdq = 0x660f380b; - -const uint32_t OP_PBLENDVB_Vdq_Wdq = 0x660f3810; -const uint32_t OP_PBLENDVPS_Vdq_Wdq = 0x660f3814; -const uint32_t OP_PBLENDVPD_Vdq_Wdq = 0x660f3815; -const uint32_t OP_PTEST_Vdq_Wdq = 0x660f3817; -const uint32_t OP_PABSB_Pq_Qq = 0x0f381c; -const uint32_t OP_PABSB_Vdq_Wdq = 0x660f381c; -const uint32_t OP_PABSW_Pq_Qq = 0x0f381d; -const uint32_t OP_PABSW_Vdq_Wdq = 0x660f381d; -const uint32_t OP_PABSD_Pq_Qq = 0x0f381e; -const uint32_t OP_PABSD_Vdq_Wdq = 0x660f381e; - -const uint32_t OP_PMOVSXBW_Vdq_Udq = 0x660f3820; -const uint32_t OP_PMOVSXBD_Vdq_Udq = 0x660f3821; -const uint32_t OP_PMOVSXBQ_Vdq_Udq = 0x660f3822; -const uint32_t OP_PMOVSXWD_Vdq_Udq = 0x660f3823; -const uint32_t OP_PMOVSXWQ_Vdq_Udq = 0x660f3824; -const uint32_t OP_PMOVSXDQ_Vdq_Udq = 0x660f3825; -const uint32_t OP_PMULDQ_Vdq_Udq = 0x660f3828; -const uint32_t OP_PCMPEQQ_Vdq_Udq = 0x660f3829; -const uint32_t OP_MOVNTDQA_Vdq_Udq = 0x660f382a; -const uint32_t OP_PACKUSDW_Vdq_Udq = 0x660f382b; - -const uint32_t OP_PMOVZXBW_Vdq_Udq = 0x660f3830; -const uint32_t OP_PMOVZXBD_Vdq_Udq = 0x660f3831; -const uint32_t OP_PMOVZXBQ_Vdq_Udq = 0x660f3832; -const uint32_t OP_PMOVZXWD_Vdq_Udq = 0x660f3833; -const uint32_t OP_PMOVZXWQ_Vdq_Udq = 0x660f3834; -const uint32_t OP_PMOVZXDQ_Vdq_Udq = 0x660f3835; -const uint32_t OP_PMINSB_Vdq_Udq = 0x660f3838; -const uint32_t OP_PMINSD_Vdq_Udq = 0x660f3839; -const uint32_t OP_PMINUW_Vdq_Udq = 0x660f383a; -const uint32_t OP_PMINUD_Vdq_Udq = 0x660f383b; -const uint32_t OP_PMAXSB_Vdq_Udq = 0x660f383c; -const uint32_t OP_PMAXSD_Vdq_Udq = 0x660f383d; -const uint32_t OP_PMAXUW_Vdq_Udq = 0x660f383e; -const uint32_t OP_PMAXUD_Vdq_Udq = 0x660f383f; - -const uint32_t OP_MULLD_Vdq_Wdq = 0x660f3840; -const uint32_t OP_PHMINPOSUW_Vdq_Wdq = 0x660f3841; - -const uint32_t OP_NVEPT_Gd_Mdq = 0x660f3880; -const uint32_t OP_NVVPID_Gd_Mdq = 0x660f3881; - -const uint32_t OP_MOVBE_Gv_Mv = 0x0f38f0; -const uint32_t OP_CRC32_Gd_Eb = 0xf20f38f0; -const uint32_t OP_MOVBE_Mv_Gv = 0x0f38f1; -const uint32_t OP_CRC32_Gd_Ev = 0xf20f38f1; - - -// triple byte opcodes (0f 3a) -const uint32_t OP_ROUNDPS_Vdq_Wdq_Ib = 0x660f3a08; -const uint32_t OP_ROUNDPD_Vdq_Wdq_Ib = 0x660f3a09; -const uint32_t OP_ROUNDSS_Vss_Wss_Ib = 0x660f3a0a; -const uint32_t OP_ROUNDSD_Vsd_Wsd_Ib = 0x660f3a0b; -const uint32_t OP_BLENDPS_Vdq_Wdq_Ib = 0x660f3a0c; -const uint32_t OP_BLENDPD_Vdq_Wdq_Ib = 0x660f3a0d; -const uint32_t OP_PBLENDW_Vdq_Wdq_Ib = 0x660f3a0e; -const uint32_t OP_PALIGNR_Pq_Qq_Ib = 0x0f3a0f; -const uint32_t OP_PALIGNR_Vdq_Wdq_Ib = 0x660f3a0f; - -const uint32_t OP_EXTRB_Rd_Vdq_Ib = 0x660f3a14; -const uint32_t OP_EXTRW_Rd_Vdq_Ib = 0x660f3a15; -const uint32_t OP_EXTRD_Rd_Vdq_Ib = 0x660f3a16; -const uint32_t OP_EXTRACTPS_Ed_Vdq_Ib = 0x660f3a17; - -const uint32_t OP_PINSRB_Vdq_Rd_Ib = 0x660f3a20; -const uint32_t OP_INSERTPS_Vdq_Udq_Ib = 0x660f3a21; -const uint32_t OP_PINSRD_Vdq_Ed_Ib = 0x660f3a22; - -const uint32_t OP_DPPS_Vdq_Wdq_Ib = 0x660f3a40; -const uint32_t OP_DPPD_Vdq_Wdq_Ib = 0x660f3a41; -const uint32_t OP_MPSADBW_Vdq_Wdq_Ib = 0x660f3a42; - -const uint32_t OP_PCMPESTRM_Vdq_Wdq_Ib = 0x660f3a60; -const uint32_t OP_PCMPESTRI_Vdq_Wdq_Ib = 0x660f3a61; -const uint32_t OP_PCMPISTRM_Vdq_Wdq_Ib = 0x660f3a62; -const uint32_t OP_PCMPISTRI_Vdq_Wdq_Ib = 0x660f3a63; - - -// floating point opcodes -const uint32_t OP_FADD_ST0_STn = 0xd8c0; -const uint32_t OP_FMUL_ST0_STn = 0xd8c8; -const uint32_t OP_FCOM_ST0_STn = 0xd8d0; -const uint32_t OP_FCOMP_ST0_STn = 0xd8d8; -const uint32_t OP_FSUB_ST0_STn = 0xd8e0; -const uint32_t OP_FSUBR_ST0_STn = 0xd8e8; -const uint32_t OP_FDIV_ST0_STn = 0xd8f0; -const uint32_t OP_FDIVR_ST0_STn = 0xd8f8; -const uint32_t OP_FLD_ST0_STn = 0xd9c0; -const uint32_t OP_FXCH_ST0_STn = 0xd9c8; -const uint32_t OP_FNOP = 0xd9d0; -const uint32_t OP_FCHS = 0xd9e0; -const uint32_t OP_FABS = 0xd9e1; -const uint32_t OP_FTST = 0xd9e4; -const uint32_t OP_FXAM = 0xd9e5; -const uint32_t OP_FLD1 = 0xd9e8; -const uint32_t OP_FLDL2T = 0xd9e9; -const uint32_t OP_FLDL2E = 0xd9ea; -const uint32_t OP_FLDPI = 0xd9eb; -const uint32_t OP_FLDLG2 = 0xd9ec; -const uint32_t OP_FLDLN2 = 0xd9ed; -const uint32_t OP_FLDZ = 0xd9ee; -const uint32_t OP_F2XM1 = 0xd9f0; -const uint32_t OP_FYL2X = 0xd9f1; -const uint32_t OP_FPTAN = 0xd9f2; -const uint32_t OP_FPATAN = 0xd9f3; -const uint32_t OP_FXTRACT = 0xd9f4; -const uint32_t OP_FPREM1 = 0xd9f5; -const uint32_t OP_FDECSTP = 0xd9f6; -const uint32_t OP_FINCSTP = 0xd9f7; -const uint32_t OP_FPREM = 0xd9f8; -const uint32_t OP_FYL2XP1 = 0xd9f9; -const uint32_t OP_FSQRT = 0xd9fa; -const uint32_t OP_FSINCOS = 0xd9fb; -const uint32_t OP_FRNDINT = 0xd9fc; -const uint32_t OP_FSCALE = 0xd9fd; -const uint32_t OP_FSIN = 0xd9fe; -const uint32_t OP_FCOS = 0xd9ff; -const uint32_t OP_FCMOVB_ST0_STn = 0xdac0; -const uint32_t OP_FCMOVE_ST0_STn = 0xdac8; -const uint32_t OP_FCMOVBE_ST0_STn = 0xdad0; -const uint32_t OP_FCMOVU_ST0_STn = 0xdad8; -const uint32_t OP_FUCOMPP = 0xdae9; -const uint32_t OP_FCMOVNB_ST0_STn = 0xdbc0; -const uint32_t OP_FCMOVNE_ST0_STn = 0xdbc8; -const uint32_t OP_FCMOVNBE_ST0_STn = 0xdbd0; -const uint32_t OP_FCMOVNU_ST0_STn = 0xdbd8; -const uint32_t OP_FCLEX = 0xdbe2; -const uint32_t OP_FINIT = 0xdbe3; -const uint32_t OP_FUCOMI_ST0_STn = 0xdbe8; -const uint32_t OP_FCOMI_ST0_STn = 0xdbf0; -const uint32_t OP_FADD_STn_ST0 = 0xdcc0; -const uint32_t OP_FMUL_STn_ST0 = 0xdcc8; -const uint32_t OP_FSUBR_STn_ST0 = 0xdce0; -const uint32_t OP_FSUB_STn_ST0 = 0xdce8; -const uint32_t OP_FDIVR_STn_ST0 = 0xdcf0; -const uint32_t OP_FDIV_STn_ST0 = 0xdcf8; -const uint32_t OP_FFREE_STn = 0xddc0; -const uint32_t OP_FST_STn = 0xddd0; -const uint32_t OP_FSTP_STn = 0xddd8; -const uint32_t OP_FUCOM_STn_ST0 = 0xdde0; -const uint32_t OP_FUCOMP_STn = 0xdde8; -const uint32_t OP_FADDP_STn_ST0 = 0xdec0; -const uint32_t OP_FMULP_STn_ST0 = 0xdec8; -const uint32_t OP_FCOMPP = 0xded9; -const uint32_t OP_FSUBRP_STn_ST0 = 0xdee0; -const uint32_t OP_FSUBP_STn_ST0 = 0xdee8; -const uint32_t OP_FDIVRP_STn_ST0 = 0xdef0; -const uint32_t OP_FDIVP_STn_ST0 = 0xdef8; -const uint32_t OP_FSTSW_AX = 0xdfe0; -const uint32_t OP_FCOMIP_ST0_STn = 0xdff0; - - - -//************************************************************************** -// MEMORY REFERENCES -//************************************************************************** - -inline x86_memref MBD(uint8_t base, int32_t disp) { return x86_memref(base, REG_NONE, 1, disp); } -inline x86_memref MBISD(uint8_t base, uint8_t ind, uint8_t scale, int32_t disp) { return x86_memref(base, ind, scale, disp); } - -#if (X86EMIT_SIZE == 32) -inline x86_memref MABS(const void *mem) { return x86_memref(REG_NONE, REG_NONE, 1, reinterpret_cast(const_cast(mem))); } -inline x86_memref MABSI(const void *mem, uint8_t index) { return x86_memref(index, REG_NONE, 1, reinterpret_cast(const_cast(mem))); } -inline x86_memref MABSI(const void *mem, uint8_t index, uint8_t scale) { return x86_memref(REG_NONE, index, scale, reinterpret_cast(const_cast(mem))); } -#endif - - - -//************************************************************************** -// CORE FUNCTIONS -//************************************************************************** - -//------------------------------------------------- -// make_modrm - assemble a modrm byte from the -// three components -//------------------------------------------------- - -inline uint8_t make_modrm(uint8_t mode, uint8_t reg, uint8_t rm) -{ - assert(mode < 4); - assert(reg < REG_MAX); - assert(rm < REG_MAX); - return (mode << 6) | ((reg & 7) << 3) | (rm & 7); -} - - -//------------------------------------------------- -// make_sib - assemble an sib byte from the -// three components -//------------------------------------------------- - -inline uint8_t make_sib(uint8_t scale, uint8_t index, uint8_t base) -{ - static const uint8_t scale_lookup[9] = { 0<<6, 0<<6, 1<<6, 0<<6, 2<<6, 0<<6, 0<<6, 0<<6, 3<<6 }; - assert(scale == 1 || scale == 2 || scale == 4 || scale == 8); - assert(index < REG_MAX); - assert(base < REG_MAX); - return scale_lookup[scale] | ((index & 7) << 3) | (base & 7); -} - - -//------------------------------------------------- -// emit_byte - emit a byte -//------------------------------------------------- - -inline void emit_byte(x86code *&emitptr, uint8_t byte) -{ - *((uint8_t *)emitptr) = byte; - emitptr += 1; -} - - -//------------------------------------------------- -// emit_word - emit a word -//------------------------------------------------- - -inline void emit_word(x86code *&emitptr, uint16_t word) -{ - *((uint16_t *)emitptr) = word; - emitptr += 2; -} - - -//------------------------------------------------- -// emit_dword - emit a dword -//------------------------------------------------- - -inline void emit_dword(x86code *&emitptr, uint32_t dword) -{ - *((uint32_t *)emitptr) = dword; - emitptr += 4; -} - - -//------------------------------------------------- -// emit_qword - emit a dword -//------------------------------------------------- - -inline void emit_qword(x86code *&emitptr, uint64_t qword) -{ - *((uint64_t *)emitptr) = qword; - emitptr += 8; -} - - - -//************************************************************************** -// GENERIC OPCODE EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_op - emit a 1, 2, or 3-byte opcode, -// along with any necessary REX prefixes for x64 -//------------------------------------------------- - -inline void emit_op(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, uint8_t sib, uint8_t rm) -{ - if (opsize == OP_16BIT) - emit_byte(emitptr, PREFIX_OPSIZE); - - bool has_prefix = (op & 0xff0000) == 0x660000 || (op & 0xff0000) == 0xf20000 || (op & 0xff0000) == 0xf30000; - - if (has_prefix) - emit_byte(emitptr, op >> 16); - -#if (X86EMIT_SIZE == 64) -{ - uint8_t rex; - - assert(opsize == OP_16BIT || opsize == OP_32BIT || opsize == OP_64BIT); - - rex = (opsize & 8) | ((reg & 8) >> 1) | ((sib & 8) >> 2) | ((rm & 8) >> 3); - if (rex != 0 || ((op & OPFLAG_8BITREG) && reg >= 4) || ((op & OPFLAG_8BITRM) && rm >= 4)) - emit_byte(emitptr, OP_REX + rex); -} -#else - assert(opsize != OP_64BIT); -#endif - - if ((op & 0xff0000) != 0 && !has_prefix) - emit_byte(emitptr, op >> 16); - if ((op & 0xff00) != 0) - emit_byte(emitptr, op >> 8); - emit_byte(emitptr, op); -} - - -//------------------------------------------------- -// emit_op_simple - emit a simple opcode -//------------------------------------------------- - -inline void emit_op_simple(x86code *&emitptr, uint32_t op, uint8_t opsize) -{ - emit_op(emitptr, op, opsize, 0, 0, 0); -} - - -//------------------------------------------------- -// emit_op_reg - emit a simple opcode that has -// a register parameter -//------------------------------------------------- - -inline void emit_op_reg(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg) -{ - emit_op(emitptr, op, opsize, 0, 0, reg); -} - - -//------------------------------------------------- -// emit_op_modrm_reg - emit an opcode with a -// register modrm byte -//------------------------------------------------- - -inline void emit_op_modrm_reg(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, uint8_t rm) -{ - assert(reg < REG_MAX); - assert(rm < REG_MAX); - - emit_op(emitptr, op, opsize, reg, 0, rm); - emit_byte(emitptr, make_modrm(3, reg, rm)); -} - - -//------------------------------------------------- -// emit_op_modrm_mem - emit an opcode with a -// memory modrm byte -//------------------------------------------------- - -inline void emit_op_modrm_mem(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, x86_memref memref) -{ - assert(reg < REG_MAX); - assert(memref.m_base < REG_MAX || memref.m_base == REG_NONE); - assert(memref.m_index < REG_MAX || memref.m_index == REG_NONE); - - // turn off the OPFLAG_8BITRM flag since it only applies to register operands - op &= ~OPFLAG_8BITRM; - - // displacement only case - if (memref.m_base == REG_NONE && memref.m_index == REG_NONE) - { -#if (X86EMIT_SIZE == 32) - emit_op(emitptr, op, opsize, reg, 0, 5); - emit_byte(emitptr, make_modrm(0, reg, 5)); - emit_dword(emitptr, memref.m_disp); -#else - fatalerror("Invalid absolute mode in 64-bits!\n"); -#endif - } - - // base only case - else if (memref.m_index == REG_NONE && (memref.m_base & 7) != REG_ESP) - { - emit_op(emitptr, op, opsize, reg, 0, memref.m_base); - - // mode 0 for no offset - if (memref.m_disp == 0 && (memref.m_base & 7) != REG_EBP) - emit_byte(emitptr, make_modrm(0, reg, memref.m_base)); - - // mode 1 for 1-byte offset - else if ((int8_t)memref.m_disp == memref.m_disp) - { - emit_byte(emitptr, make_modrm(1, reg, memref.m_base)); - emit_byte(emitptr, (int8_t)memref.m_disp); - } - - // mode 2 for 4-byte offset - else - { - emit_byte(emitptr, make_modrm(2, reg, memref.m_base)); - emit_dword(emitptr, memref.m_disp); - } - } - - // full BISD case - else - { - assert(memref.m_index != REG_ESP); - emit_op(emitptr, op, opsize, reg, memref.m_index, memref.m_base); - - // a "none" index == REG_ESP - if (memref.m_index == REG_NONE) - memref.m_index = REG_ESP; - - // no base is a special case - if (memref.m_base == REG_NONE) - { - emit_byte(emitptr, make_modrm(0, reg, 4)); - emit_byte(emitptr, make_sib(memref.m_scale, memref.m_index, REG_EBP)); - emit_dword(emitptr, memref.m_disp); - } - - // mode 0 for no offset - else if (memref.m_disp == 0 && (memref.m_base & 7) != REG_EBP) - { - emit_byte(emitptr, make_modrm(0, reg, 4)); - emit_byte(emitptr, make_sib(memref.m_scale, memref.m_index, memref.m_base)); - } - - // mode 1 for 1-byte offset - else if ((int8_t)memref.m_disp == memref.m_disp) - { - emit_byte(emitptr, make_modrm(1, reg, 4)); - emit_byte(emitptr, make_sib(memref.m_scale, memref.m_index, memref.m_base)); - emit_byte(emitptr, (int8_t)memref.m_disp); - } - - // mode 2 for 4-byte offset - else - { - emit_byte(emitptr, make_modrm(2, reg, 4)); - emit_byte(emitptr, make_sib(memref.m_scale, memref.m_index, memref.m_base)); - emit_dword(emitptr, memref.m_disp); - } - } -} - - - -//************************************************************************** -// GENERIC OPCODE + IMMEDIATE EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_op_modrm_reg_imm8 - emit an opcode with a -// register modrm byte and an 8-bit immediate -//------------------------------------------------- - -inline void emit_op_modrm_reg_imm8(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, uint8_t rm, uint8_t imm) -{ - emit_op_modrm_reg(emitptr, op, opsize, reg, rm); - emit_byte(emitptr, imm); -} - - -//------------------------------------------------- -// emit_op_modrm_mem_imm8 - emit an opcode with a -// memory modrm byte and an 8-bit immediate -//------------------------------------------------- - -inline void emit_op_modrm_mem_imm8(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, x86_memref memref, uint8_t imm) -{ - emit_op_modrm_mem(emitptr, op, opsize, reg, memref); - emit_byte(emitptr, imm); -} - - -//------------------------------------------------- -// emit_op_modrm_reg_imm16 - emit an opcode with a -// register modrm byte and a 16-bit immediate -//------------------------------------------------- - -inline void emit_op_modrm_reg_imm16(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, uint8_t rm, uint16_t imm) -{ - emit_op_modrm_reg(emitptr, op, opsize, reg, rm); - emit_word(emitptr, imm); -} - - -//------------------------------------------------- -// emit_op_modrm_mem_imm16 - emit an opcode with a -// memory modrm byte and a 16-bit immediate -//------------------------------------------------- - -inline void emit_op_modrm_mem_imm16(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, x86_memref memref, uint16_t imm) -{ - emit_op_modrm_mem(emitptr, op, opsize, reg, memref); - emit_word(emitptr, imm); -} - - -//------------------------------------------------- -// emit_op_modrm_reg_imm816 - emit an opcode with -// a register modrm byte and an 8-bit or 16-bit -// immediate -//------------------------------------------------- - -inline void emit_op_modrm_reg_imm816(x86code *&emitptr, uint32_t op8, uint32_t op16, uint8_t opsize, uint8_t reg, uint8_t rm, uint16_t imm) -{ - if ((int8_t)imm == (int16_t)imm) - { - emit_op_modrm_reg(emitptr, op8, opsize, reg, rm); - emit_byte(emitptr, imm); - } - else - { - emit_op_modrm_reg(emitptr, op16, opsize, reg, rm); - emit_word(emitptr, imm); - } -} - - -//------------------------------------------------- -// emit_op_modrm_mem_imm816 - emit an opcode with -// a memory modrm byte and an 8-bit or 16-bit -// immediate -//------------------------------------------------- - -inline void emit_op_modrm_mem_imm816(x86code *&emitptr, uint32_t op8, uint32_t op16, uint8_t opsize, uint8_t reg, x86_memref memref, uint16_t imm) -{ - if ((int8_t)imm == (int16_t)imm) - { - emit_op_modrm_mem(emitptr, op8, opsize, reg, memref); - emit_byte(emitptr, imm); - } - else - { - emit_op_modrm_mem(emitptr, op16, opsize, reg, memref); - emit_word(emitptr, imm); - } -} - - -//------------------------------------------------- -// emit_op_modrm_reg_imm32 - emit an opcode with a -// register modrm byte and a 32-bit immediate -//------------------------------------------------- - -inline void emit_op_modrm_reg_imm32(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, uint8_t rm, uint32_t imm) -{ - emit_op_modrm_reg(emitptr, op, opsize, reg, rm); - emit_dword(emitptr, imm); -} - - -//------------------------------------------------- -// emit_op_modrm_mem_imm32 - emit an opcode with a -// memory modrm byte and a 32-bit immediate -//------------------------------------------------- - -inline void emit_op_modrm_mem_imm32(x86code *&emitptr, uint32_t op, uint8_t opsize, uint8_t reg, x86_memref memref, uint32_t imm) -{ - emit_op_modrm_mem(emitptr, op, opsize, reg, memref); - emit_dword(emitptr, imm); -} - - -//------------------------------------------------- -// emit_op_modrm_reg_imm832 - emit an opcode with -// a register modrm byte and an 8-bit or 32-bit -// immediate -//------------------------------------------------- - -inline void emit_op_modrm_reg_imm832(x86code *&emitptr, uint32_t op8, uint32_t op32, uint8_t opsize, uint8_t reg, uint8_t rm, uint32_t imm) -{ - if ((int8_t)imm == (int32_t)imm) - { - emit_op_modrm_reg(emitptr, op8, opsize, reg, rm); - emit_byte(emitptr, imm); - } - else - { - emit_op_modrm_reg(emitptr, op32, opsize, reg, rm); - emit_dword(emitptr, imm); - } -} - - -//------------------------------------------------- -// emit_op_modrm_mem_imm832 - emit an opcode with -// a memory modrm byte and an 8-bit or 32-bit -// immediate -//------------------------------------------------- - -inline void emit_op_modrm_mem_imm832(x86code *&emitptr, uint32_t op8, uint32_t op32, uint8_t opsize, uint8_t reg, x86_memref memref, uint32_t imm) -{ - if ((int8_t)imm == (int32_t)imm) - { - emit_op_modrm_mem(emitptr, op8, opsize, reg, memref); - emit_byte(emitptr, imm); - } - else - { - emit_op_modrm_mem(emitptr, op32, opsize, reg, memref); - emit_dword(emitptr, imm); - } -} - - - -//************************************************************************** -// SIMPLE OPCODE EMITTERS -//************************************************************************** - -inline void emit_nop(x86code *&emitptr) { emit_op_simple(emitptr, OP_NOP, OP_32BIT); } -inline void emit_int_3(x86code *&emitptr) { emit_op_simple(emitptr, OP_INT_3, OP_32BIT); } -inline void emit_ret(x86code *&emitptr) { emit_op_simple(emitptr, OP_RETN, OP_32BIT); } -inline void emit_cdq(x86code *&emitptr) { emit_op_simple(emitptr, OP_CDQ, OP_32BIT); } -inline void emit_clc(x86code *&emitptr) { emit_op_simple(emitptr, OP_CLC, OP_32BIT); } -inline void emit_stc(x86code *&emitptr) { emit_op_simple(emitptr, OP_STC, OP_32BIT); } -inline void emit_cmc(x86code *&emitptr) { emit_op_simple(emitptr, OP_CMC, OP_32BIT); } -inline void emit_pushf(x86code *&emitptr) { emit_op_simple(emitptr, OP_PUSHF_Fv, OP_32BIT); } -inline void emit_popf(x86code *&emitptr) { emit_op_simple(emitptr, OP_POPF_Fv, OP_32BIT); } -inline void emit_cpuid(x86code *&emitptr) { emit_op_simple(emitptr, OP_CPUID, OP_32BIT); } - -#if (X86EMIT_SIZE == 32) -inline void emit_pushad(x86code *&emitptr) { emit_op_simple(emitptr, OP_PUSHA, OP_32BIT); } -inline void emit_popad(x86code *&emitptr) { emit_op_simple(emitptr, OP_POPA, OP_32BIT); } -inline void emit_lahf(x86code *&emitptr) { emit_op_simple(emitptr, OP_LAHF, OP_32BIT); } -inline void emit_sahf(x86code *&emitptr) { emit_op_simple(emitptr, OP_SAHF, OP_32BIT); } -#endif - -#if (X86EMIT_SIZE == 64) -inline void emit_cqo(x86code *&emitptr) { emit_op_simple(emitptr, OP_CQO, OP_64BIT); } -#endif - - - -//************************************************************************** -// CALL/JUMP EMITTERS -//************************************************************************** - -//------------------------------------------------- -// resolve_link - resolve a link in a jump -// instruction -//------------------------------------------------- - -inline void resolve_link(x86code *&destptr, const emit_link &linkinfo) -{ - int64_t delta = destptr - linkinfo.target; - if (linkinfo.size == 1) - { - assert((int8_t)delta == delta); - ((int8_t *)linkinfo.target)[-1] = (int8_t)delta; - } - else if (linkinfo.size == 2) - { - assert((int16_t)delta == delta); - ((int16_t *)linkinfo.target)[-1] = (int16_t)delta; - } - else - { - assert((int32_t)delta == delta); - ((int32_t *)linkinfo.target)[-1] = (int32_t)delta; - } -} - - -//------------------------------------------------- -// emit_call_* -//------------------------------------------------- - -inline void emit_call_link(x86code *&emitptr, emit_link &linkinfo) -{ - emit_op_simple(emitptr, OP_CALL_Jz, OP_32BIT); - emit_dword(emitptr, 0); - linkinfo.target = emitptr; - linkinfo.size = 4; -} - -inline void emit_call(x86code *&emitptr, x86code *target) -{ - emit_link link; - emit_call_link(emitptr, link); - resolve_link(target, link); -} - - -//------------------------------------------------- -// emit_jmp_* -//------------------------------------------------- - -inline void emit_jmp_short_link(x86code *&emitptr, emit_link &linkinfo) -{ - emit_op_simple(emitptr, OP_JMP_Jb, OP_32BIT); - emit_byte(emitptr, 0); - linkinfo.target = emitptr; - linkinfo.size = 1; -} - -inline void emit_jmp_near_link(x86code *&emitptr, emit_link &linkinfo) -{ - emit_op_simple(emitptr, OP_JMP_Jz, OP_32BIT); - emit_dword(emitptr, 0); - linkinfo.target = emitptr; - linkinfo.size = 4; -} - -inline void emit_jmp(x86code *&emitptr, x86code *target) -{ - int32_t delta = target - (emitptr + 2); - emit_link link; - - if ((int8_t)delta == delta) - emit_jmp_short_link(emitptr, link); - else - emit_jmp_near_link(emitptr, link); - resolve_link(target, link); -} - - -//------------------------------------------------- -// emit_jcc_* -//------------------------------------------------- - -inline void emit_jcc_short_link(x86code *&emitptr, uint8_t cond, emit_link &linkinfo) -{ - emit_op_simple(emitptr, OP_JCC_O_Jb + cond, OP_32BIT); - emit_byte(emitptr, 0); - linkinfo.target = emitptr; - linkinfo.size = 1; -} - -inline void emit_jcc_near_link(x86code *&emitptr, uint8_t cond, emit_link &linkinfo) -{ - emit_op_simple(emitptr, OP_JCC_O_Jv + cond, OP_32BIT); - emit_dword(emitptr, 0); - linkinfo.target = emitptr; - linkinfo.size = 4; -} - -inline void emit_jcc(x86code *&emitptr, uint8_t cond, x86code *target) -{ - int32_t delta = emitptr + 2 - target; - emit_link link; - - if ((int8_t)delta == delta) - emit_jcc_short_link(emitptr, cond, link); - else - emit_jcc_near_link(emitptr, cond, link); - resolve_link(target, link); -} - - -//------------------------------------------------- -// emit_jecxz_* -//------------------------------------------------- - -inline void emit_jecxz_link(x86code *&emitptr, emit_link &linkinfo) -{ - emit_op_simple(emitptr, OP_JrCXZ_Jb, OP_32BIT); - emit_byte(emitptr, 0); - linkinfo.target = emitptr; - linkinfo.size = 1; -} - -inline void emit_jecxz(x86code *&emitptr, x86code *target) -{ - emit_link link; - emit_jecxz_link(emitptr, link); - resolve_link(target, link); -} - -#if (X86EMIT_SIZE == 64) - -inline void emit_jrcxz_link(x86code *&emitptr, emit_link &linkinfo) -{ - emit_op_simple(emitptr, OP_JrCXZ_Jb, OP_64BIT); - emit_byte(emitptr, 0); - linkinfo.target = emitptr; - linkinfo.size = 1; -} - -inline void emit_jrcxz(x86code *&emitptr, x86code *target) -{ - emit_link link; - emit_jrcxz_link(emitptr, link); - resolve_link(target, link); -} - -#endif - - -//------------------------------------------------- -// emit_call/jmp_* -//------------------------------------------------- - -#if (X86EMIT_SIZE == 32) -inline void emit_call_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G5, OP_32BIT, 2, dreg); } -inline void emit_call_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G5, OP_32BIT, 2, memref); } -inline void emit_jmp_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G5, OP_32BIT, 4, dreg); } -inline void emit_jmp_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G5, OP_32BIT, 4, memref); } -#else -inline void emit_call_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G5, OP_32BIT, 2, dreg); } -inline void emit_call_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G5, OP_32BIT, 2, memref); } -inline void emit_jmp_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G5, OP_32BIT, 4, dreg); } -inline void emit_jmp_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G5, OP_32BIT, 4, memref); } -#endif - - -//------------------------------------------------- -// emit_ret_* -//------------------------------------------------- - -inline void emit_ret_imm(x86code *&emitptr, uint16_t imm) -{ - emit_op_simple(emitptr, OP_RETN_Iw, OP_32BIT); - emit_word(emitptr, imm); -} - - - -//************************************************************************** -// PUSH/POP EMITTERS -//************************************************************************** - -inline void emit_push_imm(x86code *&emitptr, int32_t imm) -{ - if ((int8_t)imm == imm) - { - emit_op_simple(emitptr, OP_PUSH_Ib, OP_32BIT); - emit_byte(emitptr, (int8_t)imm); - } - else - { - emit_op_simple(emitptr, OP_PUSH_Iz, OP_32BIT); - emit_dword(emitptr, imm); - } -} - -#if (X86EMIT_SIZE == 32) - -inline void emit_push_r32(x86code *&emitptr, uint8_t reg) { emit_op_reg(emitptr, OP_PUSH_rAX + (reg & 7), OP_32BIT, reg); } -inline void emit_push_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G5, OP_32BIT, 6, memref); } -inline void emit_pop_r32(x86code *&emitptr, uint8_t reg) { emit_op_reg(emitptr, OP_POP_rAX + (reg & 7), OP_32BIT, reg); } -inline void emit_pop_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G1A_Ev, OP_32BIT, 0, memref); } - -#else - -inline void emit_push_r64(x86code *&emitptr, uint8_t reg) { emit_op_reg(emitptr, OP_PUSH_rAX + (reg & 7), OP_32BIT, reg); } -inline void emit_push_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G5, OP_32BIT, 6, memref); } -inline void emit_pop_r64(x86code *&emitptr, uint8_t reg) { emit_op_reg(emitptr, OP_POP_rAX + (reg & 7), OP_32BIT, reg); } -inline void emit_pop_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G1A_Ev, OP_32BIT, 0, memref); } - -#endif - - - -//************************************************************************** -// MOVE EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_mov_r8_* -//------------------------------------------------- - -inline void emit_mov_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) -{ - emit_op_reg(emitptr, OP_MOV_AL_Ib | (dreg & 7), OP_32BIT, dreg); - emit_byte(emitptr, imm); -} - -inline void emit_mov_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOV_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_mov_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOV_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_mov_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOV_Eb_Gb, OP_32BIT, sreg, memref); } -inline void emit_mov_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G11_Eb_Ib, OP_32BIT, 0, memref, imm); } - - -//------------------------------------------------- -// emit_xchg_r8_* -//------------------------------------------------- - -inline void emit_xchg_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) -{ - if (dreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (sreg & 7), OP_32BIT, sreg); - else if (sreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_32BIT, dreg); - else - emit_op_modrm_reg(emitptr, OP_XCHG_Eb_Gb, OP_32BIT, dreg, sreg); -} - - -//------------------------------------------------- -// emit_mov_r16_* -//------------------------------------------------- - -inline void emit_mov_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) -{ - emit_op_reg(emitptr, OP_MOV_rAX_Iv | (dreg & 7), OP_16BIT, dreg); - emit_word(emitptr, imm); -} - -inline void emit_mov_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOV_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_mov_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOV_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_mov_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm16(emitptr, OP_G11_Ev_Iz, OP_16BIT, 0, memref, imm); } -inline void emit_mov_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOV_Ev_Gv, OP_16BIT, sreg, memref); } -inline void emit_movsx_r16_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSX_Gv_Eb, OP_16BIT, dreg, sreg); } -inline void emit_movsx_r16_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSX_Gv_Eb, OP_16BIT, dreg, memref); } -inline void emit_movzx_r16_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVZX_Gv_Eb, OP_16BIT, dreg, sreg); } -inline void emit_movzx_r16_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVZX_Gv_Eb, OP_16BIT, dreg, memref); } -inline void emit_cmovcc_r16_r16(x86code *&emitptr, uint8_t cond, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CMOV_O_Gv_Ev + cond, OP_16BIT, dreg, sreg); } -inline void emit_cmovcc_r16_m16(x86code *&emitptr, uint8_t cond, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CMOV_O_Gv_Ev + cond, OP_16BIT, dreg, memref); } - - -//------------------------------------------------- -// emit_xchg_r16_* -//------------------------------------------------- - -inline void emit_xchg_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) -{ - if (dreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (sreg & 7), OP_16BIT, sreg); - else if (sreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_16BIT, dreg); - else - emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_16BIT, dreg, sreg); -} - - -//------------------------------------------------- -// emit_mov_r32_* -//------------------------------------------------- - -inline void emit_mov_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) -{ - emit_op_reg(emitptr, OP_MOV_rAX_Iv | (dreg & 7), OP_32BIT, dreg); - emit_dword(emitptr, imm); -} - -inline void emit_mov_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOV_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_mov_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOV_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_mov_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm32(emitptr, OP_G11_Ev_Iz, OP_32BIT, 0, memref, imm); } -inline void emit_mov_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOV_Ev_Gv, OP_32BIT, sreg, memref); } -inline void emit_movsx_r32_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSX_Gv_Eb, OP_32BIT, dreg, sreg); } -inline void emit_movsx_r32_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSX_Gv_Eb, OP_32BIT, dreg, memref); } -inline void emit_movsx_r32_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSX_Gv_Ew, OP_32BIT, dreg, sreg); } -inline void emit_movsx_r32_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSX_Gv_Ew, OP_32BIT, dreg, memref); } -inline void emit_movzx_r32_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) -{ -#if (X86EMIT_SIZE == 32) - if (sreg >= 4) - { - emit_op_modrm_reg(emitptr, OP_MOV_Gv_Ev, OP_32BIT, dreg, sreg); // mov dreg,sreg - emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 4, dreg, 0xff); // and dreg,0xff - } - else -#endif - emit_op_modrm_reg(emitptr, OP_MOVZX_Gv_Eb, OP_32BIT, dreg, sreg); -} -inline void emit_movzx_r32_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVZX_Gv_Eb, OP_32BIT, dreg, memref); } -inline void emit_movzx_r32_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVZX_Gv_Ew, OP_32BIT, dreg, sreg); } -inline void emit_movzx_r32_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVZX_Gv_Ew, OP_32BIT, dreg, memref); } -inline void emit_cmovcc_r32_r32(x86code *&emitptr, uint8_t cond, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CMOV_O_Gv_Ev + cond, OP_32BIT, dreg, sreg); } -inline void emit_cmovcc_r32_m32(x86code *&emitptr, uint8_t cond, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CMOV_O_Gv_Ev + cond, OP_32BIT, dreg, memref); } - - -//------------------------------------------------- -// emit_xchg_r32_* -//------------------------------------------------- - -inline void emit_xchg_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) -{ - if (dreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (sreg & 7), OP_32BIT, sreg); - else if (sreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_32BIT, dreg); - else - emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_32BIT, dreg, sreg); -} - - -//------------------------------------------------- -// emit_mov_r64_* -//------------------------------------------------- - -#if (X86EMIT_SIZE == 64) - -inline void emit_mov_r64_imm(x86code *&emitptr, uint8_t dreg, uint64_t imm) -{ - if ((uint32_t)imm == imm) - { - emit_op_reg(emitptr, OP_MOV_rAX_Iv | (dreg & 7), OP_32BIT, dreg); - emit_dword(emitptr, imm); - } - else if ((int32_t)imm == imm) - emit_op_modrm_reg_imm32(emitptr, OP_G11_Ev_Iz, OP_64BIT, 0, dreg, imm); - else - { - emit_op_reg(emitptr, OP_MOV_rAX_Iv | (dreg & 7), OP_64BIT, dreg); - emit_qword(emitptr, imm); - } -} - -inline void emit_mov_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOV_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_mov_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOV_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_mov_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm32(emitptr, OP_G11_Ev_Iz, OP_64BIT, 0, memref, imm); } -inline void emit_mov_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOV_Ev_Gv, OP_64BIT, sreg, memref); } -inline void emit_movsx_r64_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSX_Gv_Eb, OP_64BIT, dreg, sreg); } -inline void emit_movsx_r64_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSX_Gv_Eb, OP_64BIT, dreg, memref); } -inline void emit_movsx_r64_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSX_Gv_Ew, OP_64BIT, dreg, sreg); } -inline void emit_movsx_r64_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSX_Gv_Ew, OP_64BIT, dreg, memref); } -inline void emit_movsxd_r64_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSXD_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_movsxd_r64_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSXD_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_movzx_r64_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVZX_Gv_Eb, OP_64BIT, dreg, sreg); } -inline void emit_movzx_r64_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVZX_Gv_Eb, OP_64BIT, dreg, memref); } -inline void emit_movzx_r64_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVZX_Gv_Ew, OP_64BIT, dreg, sreg); } -inline void emit_movzx_r64_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVZX_Gv_Ew, OP_64BIT, dreg, memref); } -inline void emit_cmovcc_r64_r64(x86code *&emitptr, uint8_t cond, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CMOV_O_Gv_Ev + cond, OP_64BIT, dreg, sreg); } -inline void emit_cmovcc_r64_m64(x86code *&emitptr, uint8_t cond, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CMOV_O_Gv_Ev + cond, OP_64BIT, dreg, memref); } - - -//------------------------------------------------- -// emit_xchg_r64_* -//------------------------------------------------- - -inline void emit_xchg_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) -{ - if (dreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (sreg & 7), OP_64BIT, sreg); - else if (sreg == REG_EAX) - emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_64BIT, dreg); - else - emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_64BIT, dreg, sreg); -} - -#endif - - -//************************************************************************** -// ARITHMETIC EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_arith_r8_* -//------------------------------------------------- - -inline void emit_add_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 0, dreg, imm); } -inline void emit_add_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 0, memref, imm); } -inline void emit_add_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADD_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_add_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADD_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_add_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADD_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_or_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 1, dreg, imm); } -inline void emit_or_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 1, memref, imm); } -inline void emit_or_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_OR_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_or_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_OR_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_or_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_OR_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_adc_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 2, dreg, imm); } -inline void emit_adc_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 2, memref, imm); } -inline void emit_adc_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADC_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_adc_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADC_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_adc_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADC_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_sbb_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 3, dreg, imm); } -inline void emit_sbb_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 3, memref, imm); } -inline void emit_sbb_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SBB_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_sbb_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SBB_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_sbb_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SBB_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_and_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 4, dreg, imm); } -inline void emit_and_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 4, memref, imm); } -inline void emit_and_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_AND_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_and_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_AND_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_and_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_AND_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_sub_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 5, dreg, imm); } -inline void emit_sub_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 5, memref, imm); } -inline void emit_sub_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUB_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_sub_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUB_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_sub_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SUB_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_xor_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 6, dreg, imm); } -inline void emit_xor_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 6, memref, imm); } -inline void emit_xor_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_XOR_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_xor_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_XOR_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_xor_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_XOR_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_cmp_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 7, dreg, imm); } -inline void emit_cmp_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G1_Eb_Ib, OP_32BIT, 7, memref, imm); } -inline void emit_cmp_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CMP_Gb_Eb, OP_32BIT, dreg, sreg); } -inline void emit_cmp_r8_m8(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CMP_Gb_Eb, OP_32BIT, dreg, memref); } -inline void emit_cmp_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_CMP_Eb_Gb, OP_32BIT, sreg, memref); } - -inline void emit_test_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G3_Eb, OP_32BIT, 0, dreg, imm); } -inline void emit_test_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G3_Eb, OP_32BIT, 0, memref, imm); } -inline void emit_test_r8_r8(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_TEST_Eb_Gb, OP_32BIT, sreg, dreg); } -inline void emit_test_m8_r8(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_TEST_Eb_Gb, OP_32BIT, sreg, memref); } - - -//------------------------------------------------- -// emit_arith_r16_* -//------------------------------------------------- - -inline void emit_add_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 0, dreg, imm); } -inline void emit_add_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 0, memref, imm); } -inline void emit_add_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADD_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_add_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADD_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_add_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADD_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_or_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 1, dreg, imm); } -inline void emit_or_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 1, memref, imm); } -inline void emit_or_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_OR_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_or_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_OR_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_or_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_OR_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_adc_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 2, dreg, imm); } -inline void emit_adc_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 2, memref, imm); } -inline void emit_adc_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADC_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_adc_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADC_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_adc_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADC_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_sbb_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 3, dreg, imm); } -inline void emit_sbb_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 3, memref, imm); } -inline void emit_sbb_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SBB_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_sbb_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SBB_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_sbb_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SBB_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_and_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 4, dreg, imm); } -inline void emit_and_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 4, memref, imm); } -inline void emit_and_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_AND_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_and_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_AND_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_and_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_AND_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_sub_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 5, dreg, imm); } -inline void emit_sub_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 5, memref, imm); } -inline void emit_sub_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUB_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_sub_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUB_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_sub_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SUB_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_xor_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 6, dreg, imm); } -inline void emit_xor_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 6, memref, imm); } -inline void emit_xor_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_XOR_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_xor_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_XOR_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_xor_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_XOR_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_cmp_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 7, dreg, imm); } -inline void emit_cmp_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_16BIT, 7, memref, imm); } -inline void emit_cmp_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CMP_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_cmp_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CMP_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_cmp_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_CMP_Ev_Gv, OP_16BIT, sreg, memref); } - -inline void emit_test_r16_imm(x86code *&emitptr, uint8_t dreg, uint16_t imm) { emit_op_modrm_reg_imm16(emitptr, OP_G3_Ev, OP_16BIT, 0, dreg, imm); } -inline void emit_test_m16_imm(x86code *&emitptr, x86_memref memref, uint16_t imm) { emit_op_modrm_mem_imm16(emitptr, OP_G3_Ev, OP_16BIT, 0, memref, imm); } -inline void emit_test_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_TEST_Ev_Gv, OP_16BIT, sreg, dreg); } -inline void emit_test_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_TEST_Ev_Gv, OP_16BIT, sreg, memref); } - - -//------------------------------------------------- -// emit_arith_r32_* -//------------------------------------------------- - -inline void emit_add_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 0, dreg, imm); } -inline void emit_add_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 0, memref, imm); } -inline void emit_add_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADD_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_add_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADD_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_add_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADD_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_or_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 1, dreg, imm); } -inline void emit_or_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 1, memref, imm); } -inline void emit_or_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_OR_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_or_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_OR_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_or_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_OR_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_adc_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 2, dreg, imm); } -inline void emit_adc_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 2, memref, imm); } -inline void emit_adc_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADC_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_adc_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADC_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_adc_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADC_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_sbb_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 3, dreg, imm); } -inline void emit_sbb_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 3, memref, imm); } -inline void emit_sbb_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SBB_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_sbb_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SBB_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_sbb_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SBB_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_and_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 4, dreg, imm); } -inline void emit_and_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 4, memref, imm); } -inline void emit_and_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_AND_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_and_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_AND_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_and_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_AND_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_sub_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 5, dreg, imm); } -inline void emit_sub_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 5, memref, imm); } -inline void emit_sub_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUB_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_sub_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUB_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_sub_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SUB_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_xor_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 6, dreg, imm); } -inline void emit_xor_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 6, memref, imm); } -inline void emit_xor_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_XOR_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_xor_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_XOR_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_xor_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_XOR_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_cmp_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 7, dreg, imm); } -inline void emit_cmp_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_32BIT, 7, memref, imm); } -inline void emit_cmp_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CMP_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_cmp_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CMP_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_cmp_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_CMP_Ev_Gv, OP_32BIT, sreg, memref); } - -inline void emit_test_r32_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm32(emitptr, OP_G3_Ev, OP_32BIT, 0, dreg, imm); } -inline void emit_test_m32_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm32(emitptr, OP_G3_Ev, OP_32BIT, 0, memref, imm); } -inline void emit_test_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_TEST_Ev_Gv, OP_32BIT, sreg, dreg); } -inline void emit_test_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_TEST_Ev_Gv, OP_32BIT, sreg, memref); } - - -//------------------------------------------------- -// emit_arith_r64_* -//------------------------------------------------- - -#if (X86EMIT_SIZE == 64) - -inline void emit_add_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 0, dreg, imm); } -inline void emit_add_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 0, memref, imm); } -inline void emit_add_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADD_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_add_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADD_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_add_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADD_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_or_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 1, dreg, imm); } -inline void emit_or_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 1, memref, imm); } -inline void emit_or_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_OR_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_or_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_OR_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_or_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_OR_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_adc_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 2, dreg, imm); } -inline void emit_adc_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 2, memref, imm); } -inline void emit_adc_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADC_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_adc_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADC_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_adc_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_ADC_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_sbb_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 3, dreg, imm); } -inline void emit_sbb_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 3, memref, imm); } -inline void emit_sbb_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SBB_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_sbb_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SBB_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_sbb_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SBB_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_and_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 4, dreg, imm); } -inline void emit_and_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 4, memref, imm); } -inline void emit_and_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_AND_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_and_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_AND_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_and_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_AND_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_sub_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 5, dreg, imm); } -inline void emit_sub_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 5, memref, imm); } -inline void emit_sub_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUB_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_sub_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUB_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_sub_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SUB_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_xor_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 6, dreg, imm); } -inline void emit_xor_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 6, memref, imm); } -inline void emit_xor_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_XOR_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_xor_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_XOR_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_xor_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_XOR_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_cmp_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 7, dreg, imm); } -inline void emit_cmp_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_G1_Ev_Ib, OP_G1_Ev_Iz, OP_64BIT, 7, memref, imm); } -inline void emit_cmp_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CMP_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_cmp_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CMP_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_cmp_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_CMP_Ev_Gv, OP_64BIT, sreg, memref); } - -inline void emit_test_r64_imm(x86code *&emitptr, uint8_t dreg, uint32_t imm) { emit_op_modrm_reg_imm32(emitptr, OP_G3_Ev, OP_64BIT, 0, dreg, imm); } -inline void emit_test_m64_imm(x86code *&emitptr, x86_memref memref, uint32_t imm) { emit_op_modrm_mem_imm32(emitptr, OP_G3_Ev, OP_64BIT, 0, memref, imm); } -inline void emit_test_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_TEST_Ev_Gv, OP_64BIT, sreg, dreg); } -inline void emit_test_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_TEST_Ev_Gv, OP_64BIT, sreg, memref); } - -#endif - - - -//************************************************************************** -// SHIFT EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_shift_reg_imm -//------------------------------------------------- - -inline void emit_shift_reg_imm(x86code *&emitptr, uint32_t op1, uint32_t opn, uint8_t opsize, uint8_t opindex, uint8_t dreg, uint8_t imm) -{ - if (imm == 1) - emit_op_modrm_reg(emitptr, op1, opsize, opindex, dreg); - else - emit_op_modrm_reg_imm8(emitptr, opn, opsize, opindex, dreg, imm); -} - -inline void emit_shift_mem_imm(x86code *&emitptr, uint32_t op1, uint32_t opn, uint8_t opsize, uint8_t opindex, x86_memref memref, uint8_t imm) -{ - if (imm == 1) - emit_op_modrm_mem(emitptr, op1, opsize, opindex, memref); - else - emit_op_modrm_mem_imm8(emitptr, opn, opsize, opindex, memref, imm); -} - - -//------------------------------------------------- -// emit_shift_r8_* -//------------------------------------------------- - -inline void emit_rol_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 0, dreg, imm); } -inline void emit_rol_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 0, memref, imm); } -inline void emit_rol_r8_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Eb_CL, OP_32BIT, 0, dreg); } -inline void emit_rol_m8_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Eb_CL, OP_32BIT, 0, memref); } - -inline void emit_ror_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 1, dreg, imm); } -inline void emit_ror_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 1, memref, imm); } -inline void emit_ror_r8_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Eb_CL, OP_32BIT, 1, dreg); } -inline void emit_ror_m8_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Eb_CL, OP_32BIT, 1, memref); } - -inline void emit_rcl_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 2, dreg, imm); } -inline void emit_rcl_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 2, memref, imm); } -inline void emit_rcl_r8_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Eb_CL, OP_32BIT, 2, dreg); } -inline void emit_rcl_m8_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Eb_CL, OP_32BIT, 2, memref); } - -inline void emit_rcr_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 3, dreg, imm); } -inline void emit_rcr_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 3, memref, imm); } -inline void emit_rcr_r8_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Eb_CL, OP_32BIT, 3, dreg); } -inline void emit_rcr_m8_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Eb_CL, OP_32BIT, 3, memref); } - -inline void emit_shl_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 4, dreg, imm); } -inline void emit_shl_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 4, memref, imm); } -inline void emit_shl_r8_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Eb_CL, OP_32BIT, 4, dreg); } -inline void emit_shl_m8_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Eb_CL, OP_32BIT, 4, memref); } - -inline void emit_shr_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 5, dreg, imm); } -inline void emit_shr_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 5, memref, imm); } -inline void emit_shr_r8_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Eb_CL, OP_32BIT, 5, dreg); } -inline void emit_shr_m8_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Eb_CL, OP_32BIT, 5, memref); } - -inline void emit_sar_r8_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 7, dreg, imm); } -inline void emit_sar_m8_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Eb_1, OP_G2_Eb_Ib, OP_32BIT, 7, memref, imm); } -inline void emit_sar_r8_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Eb_CL, OP_32BIT, 7, dreg); } -inline void emit_sar_m8_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Eb_CL, OP_32BIT, 7, memref); } - - -//------------------------------------------------- -// emit_shift_r16_* -//------------------------------------------------- - -inline void emit_rol_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 0, dreg, imm); } -inline void emit_rol_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 0, memref, imm); } -inline void emit_rol_r16_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_16BIT, 0, dreg); } -inline void emit_rol_m16_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_16BIT, 0, memref); } - -inline void emit_ror_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 1, dreg, imm); } -inline void emit_ror_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 1, memref, imm); } -inline void emit_ror_r16_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_16BIT, 1, dreg); } -inline void emit_ror_m16_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_16BIT, 1, memref); } - -inline void emit_rcl_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 2, dreg, imm); } -inline void emit_rcl_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 2, memref, imm); } -inline void emit_rcl_r16_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_16BIT, 2, dreg); } -inline void emit_rcl_m16_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_16BIT, 2, memref); } - -inline void emit_rcr_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 3, dreg, imm); } -inline void emit_rcr_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 3, memref, imm); } -inline void emit_rcr_r16_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_16BIT, 3, dreg); } -inline void emit_rcr_m16_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_16BIT, 3, memref); } - -inline void emit_shl_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 4, dreg, imm); } -inline void emit_shl_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 4, memref, imm); } -inline void emit_shl_r16_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_16BIT, 4, dreg); } -inline void emit_shl_m16_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_16BIT, 4, memref); } - -inline void emit_shr_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 5, dreg, imm); } -inline void emit_shr_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 5, memref, imm); } -inline void emit_shr_r16_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_16BIT, 5, dreg); } -inline void emit_shr_m16_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_16BIT, 5, memref); } - -inline void emit_sar_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 7, dreg, imm); } -inline void emit_sar_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_16BIT, 7, memref, imm); } -inline void emit_sar_r16_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_16BIT, 7, dreg); } -inline void emit_sar_m16_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_16BIT, 7, memref); } - - -//------------------------------------------------- -// emit_shift_r32_* -//------------------------------------------------- - -inline void emit_rol_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 0, dreg, imm); } -inline void emit_rol_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 0, memref, imm); } -inline void emit_rol_r32_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_32BIT, 0, dreg); } -inline void emit_rol_m32_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_32BIT, 0, memref); } - -inline void emit_ror_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 1, dreg, imm); } -inline void emit_ror_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 1, memref, imm); } -inline void emit_ror_r32_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_32BIT, 1, dreg); } -inline void emit_ror_m32_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_32BIT, 1, memref); } - -inline void emit_rcl_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 2, dreg, imm); } -inline void emit_rcl_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 2, memref, imm); } -inline void emit_rcl_r32_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_32BIT, 2, dreg); } -inline void emit_rcl_m32_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_32BIT, 2, memref); } - -inline void emit_rcr_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 3, dreg, imm); } -inline void emit_rcr_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 3, memref, imm); } -inline void emit_rcr_r32_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_32BIT, 3, dreg); } -inline void emit_rcr_m32_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_32BIT, 3, memref); } - -inline void emit_shl_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 4, dreg, imm); } -inline void emit_shl_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 4, memref, imm); } -inline void emit_shl_r32_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_32BIT, 4, dreg); } -inline void emit_shl_m32_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_32BIT, 4, memref); } - -inline void emit_shr_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 5, dreg, imm); } -inline void emit_shr_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 5, memref, imm); } -inline void emit_shr_r32_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_32BIT, 5, dreg); } -inline void emit_shr_m32_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_32BIT, 5, memref); } - -inline void emit_sar_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 7, dreg, imm); } -inline void emit_sar_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_32BIT, 7, memref, imm); } -inline void emit_sar_r32_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_32BIT, 7, dreg); } -inline void emit_sar_m32_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_32BIT, 7, memref); } - -inline void emit_shld_r32_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_SHLD_Ev_Gv_Ib, OP_32BIT, sreg, dreg, imm); } -inline void emit_shld_m32_r32_imm(x86code *&emitptr, x86_memref memref, uint8_t sreg, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_SHLD_Ev_Gv_Ib, OP_32BIT, sreg, memref, imm); } -inline void emit_shld_r32_r32_cl(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SHLD_Ev_Gv_CL, OP_32BIT, sreg, dreg); } -inline void emit_shld_m32_r32_cl(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SHLD_Ev_Gv_CL, OP_32BIT, sreg, memref); } - -inline void emit_shrd_r32_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_SHRD_Ev_Gv_Ib, OP_32BIT, sreg, dreg, imm); } -inline void emit_shrd_m32_r32_imm(x86code *&emitptr, x86_memref memref, uint8_t sreg, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_SHRD_Ev_Gv_Ib, OP_32BIT, sreg, memref, imm); } -inline void emit_shrd_r32_r32_cl(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SHRD_Ev_Gv_CL, OP_32BIT, sreg, dreg); } -inline void emit_shrd_m32_r32_cl(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SHRD_Ev_Gv_CL, OP_32BIT, sreg, memref); } - - -//------------------------------------------------- -// emit_shift_r64_* -//------------------------------------------------- - -#if (X86EMIT_SIZE == 64) - -inline void emit_rol_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 0, dreg, imm); } -inline void emit_rol_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 0, memref, imm); } -inline void emit_rol_r64_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_64BIT, 0, dreg); } -inline void emit_rol_m64_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_64BIT, 0, memref); } - -inline void emit_ror_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 1, dreg, imm); } -inline void emit_ror_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 1, memref, imm); } -inline void emit_ror_r64_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_64BIT, 1, dreg); } -inline void emit_ror_m64_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_64BIT, 1, memref); } - -inline void emit_rcl_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 2, dreg, imm); } -inline void emit_rcl_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 2, memref, imm); } -inline void emit_rcl_r64_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_64BIT, 2, dreg); } -inline void emit_rcl_m64_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_64BIT, 2, memref); } - -inline void emit_rcr_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 3, dreg, imm); } -inline void emit_rcr_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 3, memref, imm); } -inline void emit_rcr_r64_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_64BIT, 3, dreg); } -inline void emit_rcr_m64_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_64BIT, 3, memref); } - -inline void emit_shl_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 4, dreg, imm); } -inline void emit_shl_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 4, memref, imm); } -inline void emit_shl_r64_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_64BIT, 4, dreg); } -inline void emit_shl_m64_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_64BIT, 4, memref); } - -inline void emit_shr_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 5, dreg, imm); } -inline void emit_shr_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 5, memref, imm); } -inline void emit_shr_r64_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_64BIT, 5, dreg); } -inline void emit_shr_m64_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_64BIT, 5, memref); } - -inline void emit_sar_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_shift_reg_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 7, dreg, imm); } -inline void emit_sar_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_shift_mem_imm(emitptr, OP_G2_Ev_1, OP_G2_Ev_Ib, OP_64BIT, 7, memref, imm); } -inline void emit_sar_r64_cl(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G2_Ev_CL, OP_64BIT, 7, dreg); } -inline void emit_sar_m64_cl(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G2_Ev_CL, OP_64BIT, 7, memref); } - -inline void emit_shld_r64_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_SHLD_Ev_Gv_Ib, OP_64BIT, sreg, dreg, imm); } -inline void emit_shld_m64_r64_imm(x86code *&emitptr, x86_memref memref, uint8_t sreg, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_SHLD_Ev_Gv_Ib, OP_64BIT, sreg, memref, imm); } -inline void emit_shld_r64_r64_cl(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SHLD_Ev_Gv_CL, OP_64BIT, sreg, dreg); } -inline void emit_shld_m64_r64_cl(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SHLD_Ev_Gv_CL, OP_64BIT, sreg, memref); } - -inline void emit_shrd_r64_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_SHRD_Ev_Gv_Ib, OP_64BIT, sreg, dreg, imm); } -inline void emit_shrd_m64_r64_imm(x86code *&emitptr, x86_memref memref, uint8_t sreg, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_SHRD_Ev_Gv_Ib, OP_64BIT, sreg, memref, imm); } -inline void emit_shrd_r64_r64_cl(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SHRD_Ev_Gv_CL, OP_64BIT, sreg, dreg); } -inline void emit_shrd_m64_r64_cl(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_SHRD_Ev_Gv_CL, OP_64BIT, sreg, memref); } - -#endif - - - -//************************************************************************** -// GROUP3 EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_group3_r8_* -//------------------------------------------------- - -inline void emit_not_r8(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 2, dreg); } -inline void emit_not_m8(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 2, memref); } - -inline void emit_neg_r8(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 3, dreg); } -inline void emit_neg_m8(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 3, memref); } - -inline void emit_mul_r8(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 4, dreg); } -inline void emit_mul_m8(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 4, memref); } - -inline void emit_imul_r8(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 5, dreg); } -inline void emit_imul_m8(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 5, memref); } - -inline void emit_div_r8(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 6, dreg); } -inline void emit_div_m8(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 6, memref); } - -inline void emit_idiv_r8(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 7, dreg); } -inline void emit_idiv_m8(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 7, memref); } - - -//------------------------------------------------- -// emit_group3_r16_* -//------------------------------------------------- - -inline void emit_not_r16(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_16BIT, 2, dreg); } -inline void emit_not_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_16BIT, 2, memref); } - -inline void emit_neg_r16(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_16BIT, 3, dreg); } -inline void emit_neg_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_16BIT, 3, memref); } - -inline void emit_mul_r16(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_16BIT, 4, dreg); } -inline void emit_mul_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_16BIT, 4, memref); } - -inline void emit_imul_r16(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_16BIT, 5, dreg); } -inline void emit_imul_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_16BIT, 5, memref); } - -inline void emit_div_r16(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_16BIT, 6, dreg); } -inline void emit_div_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_16BIT, 6, memref); } - -inline void emit_idiv_r16(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_16BIT, 7, dreg); } -inline void emit_idiv_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_16BIT, 7, memref); } - - -//------------------------------------------------- -// emit_group3_r32_* -//------------------------------------------------- - -inline void emit_not_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 2, dreg); } -inline void emit_not_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 2, memref); } - -inline void emit_neg_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 3, dreg); } -inline void emit_neg_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 3, memref); } - -inline void emit_mul_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 4, dreg); } -inline void emit_mul_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 4, memref); } - -inline void emit_imul_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 5, dreg); } -inline void emit_imul_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 5, memref); } - -inline void emit_div_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 6, dreg); } -inline void emit_div_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 6, memref); } - -inline void emit_idiv_r32(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_32BIT, 7, dreg); } -inline void emit_idiv_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_32BIT, 7, memref); } - - -//------------------------------------------------- -// emit_group3_r64_* -//------------------------------------------------- - -#if (X86EMIT_SIZE == 64) - -inline void emit_not_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_64BIT, 2, dreg); } -inline void emit_not_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_64BIT, 2, memref); } - -inline void emit_neg_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_64BIT, 3, dreg); } -inline void emit_neg_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_64BIT, 3, memref); } - -inline void emit_mul_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_64BIT, 4, dreg); } -inline void emit_mul_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_64BIT, 4, memref); } - -inline void emit_imul_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_64BIT, 5, dreg); } -inline void emit_imul_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_64BIT, 5, memref); } - -inline void emit_div_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_64BIT, 6, dreg); } -inline void emit_div_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_64BIT, 6, memref); } - -inline void emit_idiv_r64(x86code *&emitptr, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_G3_Ev, OP_64BIT, 7, dreg); } -inline void emit_idiv_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G3_Ev, OP_64BIT, 7, memref); } - -#endif - - - -//************************************************************************** -// IMUL EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_imul_r16_* -//------------------------------------------------- - -inline void emit_imul_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_IMUL_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_imul_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_IMUL_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_imul_r16_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, int16_t imm) { emit_op_modrm_reg_imm816(emitptr, OP_IMUL_Gv_Ev_Ib, OP_IMUL_Gv_Ev_Iz, OP_16BIT, dreg, sreg, imm); } -inline void emit_imul_r16_m16_imm(x86code *&emitptr, uint8_t dreg, x86_memref memref, int16_t imm) { emit_op_modrm_mem_imm816(emitptr, OP_IMUL_Gv_Ev_Ib, OP_IMUL_Gv_Ev_Iz, OP_16BIT, dreg, memref, imm); } - -inline void emit_imul_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_IMUL_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_imul_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_IMUL_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_imul_r32_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, int32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_IMUL_Gv_Ev_Ib, OP_IMUL_Gv_Ev_Iz, OP_32BIT, dreg, sreg, imm); } -inline void emit_imul_r32_m32_imm(x86code *&emitptr, uint8_t dreg, x86_memref memref, int32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_IMUL_Gv_Ev_Ib, OP_IMUL_Gv_Ev_Iz, OP_32BIT, dreg, memref, imm); } - -#if (X86EMIT_SIZE == 64) - -inline void emit_imul_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_IMUL_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_imul_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_IMUL_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_imul_r64_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, int32_t imm) { emit_op_modrm_reg_imm832(emitptr, OP_IMUL_Gv_Ev_Ib, OP_IMUL_Gv_Ev_Iz, OP_64BIT, dreg, sreg, imm); } -inline void emit_imul_r64_m64_imm(x86code *&emitptr, uint8_t dreg, x86_memref memref, int32_t imm) { emit_op_modrm_mem_imm832(emitptr, OP_IMUL_Gv_Ev_Ib, OP_IMUL_Gv_Ev_Iz, OP_64BIT, dreg, memref, imm); } - -#endif - - - -//************************************************************************** -// BIT OPERATION EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_bswap_* -//------------------------------------------------- - -inline void emit_bswap_r32(x86code *&emitptr, uint8_t dreg) { emit_op_reg(emitptr, OP_BSWAP_EAX + (dreg & 7), OP_32BIT, dreg); } -inline void emit_bswap_r64(x86code *&emitptr, uint8_t dreg) { emit_op_reg(emitptr, OP_BSWAP_EAX + (dreg & 7), OP_64BIT, dreg); } - - -//------------------------------------------------- -// emit_bsr/bsf_r16_* -//------------------------------------------------- - -inline void emit_bsf_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BSF_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_bsf_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_BSF_Gv_Ev, OP_16BIT, dreg, memref); } -inline void emit_bsr_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BSR_Gv_Ev, OP_16BIT, dreg, sreg); } -inline void emit_bsr_r16_m16(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_BSR_Gv_Ev, OP_16BIT, dreg, memref); } - -inline void emit_bsf_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BSF_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_bsf_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_BSF_Gv_Ev, OP_32BIT, dreg, memref); } -inline void emit_bsr_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BSR_Gv_Ev, OP_32BIT, dreg, sreg); } -inline void emit_bsr_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_BSR_Gv_Ev, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_bsf_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BSF_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_bsf_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_BSF_Gv_Ev, OP_64BIT, dreg, memref); } -inline void emit_bsr_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BSR_Gv_Ev, OP_64BIT, dreg, sreg); } -inline void emit_bsr_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_BSR_Gv_Ev, OP_64BIT, dreg, memref); } -#endif - - -//------------------------------------------------- -// emit_bit_r16_* -//------------------------------------------------- - -inline void emit_bt_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BT_Ev_Gv, OP_16BIT, sreg, dreg); } -inline void emit_bt_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BT_Ev_Gv, OP_16BIT, sreg, memref); } -inline void emit_bt_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 4, dreg, imm); } -inline void emit_bt_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 4, memref, imm); } - -inline void emit_bts_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTS_Ev_Gv, OP_16BIT, sreg, dreg); } -inline void emit_bts_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTS_Ev_Gv, OP_16BIT, sreg, memref); } -inline void emit_bts_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 5, dreg, imm); } -inline void emit_bts_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 5, memref, imm); } - -inline void emit_btr_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTR_Ev_Gv, OP_16BIT, sreg, dreg); } -inline void emit_btr_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTR_Ev_Gv, OP_16BIT, sreg, memref); } -inline void emit_btr_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 6, dreg, imm); } -inline void emit_btr_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 6, memref, imm); } - -inline void emit_btc_r16_r16(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTC_Ev_Gv, OP_16BIT, sreg, dreg); } -inline void emit_btc_m16_r16(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTC_Ev_Gv, OP_16BIT, sreg, memref); } -inline void emit_btc_r16_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 7, dreg, imm); } -inline void emit_btc_m16_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_16BIT, 7, memref, imm); } - - -//------------------------------------------------- -// emit_bit_r32_* -//------------------------------------------------- - -inline void emit_bt_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BT_Ev_Gv, OP_32BIT, sreg, dreg); } -inline void emit_bt_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BT_Ev_Gv, OP_32BIT, sreg, memref); } -inline void emit_bt_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 4, dreg, imm); } -inline void emit_bt_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 4, memref, imm); } - -inline void emit_bts_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTS_Ev_Gv, OP_32BIT, sreg, dreg); } -inline void emit_bts_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTS_Ev_Gv, OP_32BIT, sreg, memref); } -inline void emit_bts_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 5, dreg, imm); } -inline void emit_bts_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 5, memref, imm); } - -inline void emit_btr_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTR_Ev_Gv, OP_32BIT, sreg, dreg); } -inline void emit_btr_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTR_Ev_Gv, OP_32BIT, sreg, memref); } -inline void emit_btr_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 6, dreg, imm); } -inline void emit_btr_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 6, memref, imm); } - -inline void emit_btc_r32_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTC_Ev_Gv, OP_32BIT, sreg, dreg); } -inline void emit_btc_m32_r32(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTC_Ev_Gv, OP_32BIT, sreg, memref); } -inline void emit_btc_r32_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 7, dreg, imm); } -inline void emit_btc_m32_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_32BIT, 7, memref, imm); } - - -//------------------------------------------------- -// emit_bit_r64_* -//------------------------------------------------- - -#if (X86EMIT_SIZE == 64) - -inline void emit_bt_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BT_Ev_Gv, OP_64BIT, sreg, dreg); } -inline void emit_bt_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BT_Ev_Gv, OP_64BIT, sreg, memref); } -inline void emit_bt_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 4, dreg, imm); } -inline void emit_bt_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 4, memref, imm); } - -inline void emit_bts_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTS_Ev_Gv, OP_64BIT, sreg, dreg); } -inline void emit_bts_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTS_Ev_Gv, OP_64BIT, sreg, memref); } -inline void emit_bts_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 5, dreg, imm); } -inline void emit_bts_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 5, memref, imm); } - -inline void emit_btr_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTR_Ev_Gv, OP_64BIT, sreg, dreg); } -inline void emit_btr_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTR_Ev_Gv, OP_64BIT, sreg, memref); } -inline void emit_btr_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 6, dreg, imm); } -inline void emit_btr_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 6, memref, imm); } - -inline void emit_btc_r64_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_BTC_Ev_Gv, OP_64BIT, sreg, dreg); } -inline void emit_btc_m64_r64(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_BTC_Ev_Gv, OP_64BIT, sreg, memref); } -inline void emit_btc_r64_imm(x86code *&emitptr, uint8_t dreg, uint8_t imm) { emit_op_modrm_reg_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 7, dreg, imm); } -inline void emit_btc_m64_imm(x86code *&emitptr, x86_memref memref, uint8_t imm) { emit_op_modrm_mem_imm8(emitptr, OP_G8_Ev_Ib, OP_64BIT, 7, memref, imm); } - -#endif - - - -//************************************************************************** -// LEA EMITTERS -//************************************************************************** - -inline void emit_lea_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_LEA_Gv_M, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_lea_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_LEA_Gv_M, OP_64BIT, dreg, memref); } -#endif - - - -//************************************************************************** -// SET EMITTERS -//************************************************************************** - -//------------------------------------------------- -// emit_setcc_* -//------------------------------------------------- - -inline void emit_setcc_r8(x86code *&emitptr, uint8_t cond, uint8_t dreg) { emit_op_modrm_reg(emitptr, OP_SETCC_O_Eb + cond, OP_32BIT, 0, dreg); } -inline void emit_setcc_m8(x86code *&emitptr, uint8_t cond, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SETCC_O_Eb + cond, OP_32BIT, 0, memref); } - - - -//************************************************************************** -// SIMPLE FPU EMITTERS -//************************************************************************** - -#if (X86EMIT_SIZE == 32) - -inline void emit_fnop(x86code *&emitptr) { emit_op_simple(emitptr, OP_FNOP, OP_32BIT); } -inline void emit_fchs(x86code *&emitptr) { emit_op_simple(emitptr, OP_FCHS, OP_32BIT); } -inline void emit_fabs(x86code *&emitptr) { emit_op_simple(emitptr, OP_FABS, OP_32BIT); } -inline void emit_ftst(x86code *&emitptr) { emit_op_simple(emitptr, OP_FTST, OP_32BIT); } -inline void emit_fxam(x86code *&emitptr) { emit_op_simple(emitptr, OP_FXAM, OP_32BIT); } -inline void emit_fld1(x86code *&emitptr) { emit_op_simple(emitptr, OP_FLD1, OP_32BIT); } -inline void emit_fldl2t(x86code *&emitptr) { emit_op_simple(emitptr, OP_FLDL2T, OP_32BIT); } -inline void emit_fldl2e(x86code *&emitptr) { emit_op_simple(emitptr, OP_FLDL2E, OP_32BIT); } -inline void emit_fldpi(x86code *&emitptr) { emit_op_simple(emitptr, OP_FLDPI, OP_32BIT); } -inline void emit_fldlg2(x86code *&emitptr) { emit_op_simple(emitptr, OP_FLDLG2, OP_32BIT); } -inline void emit_fldln2(x86code *&emitptr) { emit_op_simple(emitptr, OP_FLDLN2, OP_32BIT); } -inline void emit_fldz(x86code *&emitptr) { emit_op_simple(emitptr, OP_FLDZ, OP_32BIT); } -inline void emit_f2xm1(x86code *&emitptr) { emit_op_simple(emitptr, OP_F2XM1, OP_32BIT); } -inline void emit_fyl2x(x86code *&emitptr) { emit_op_simple(emitptr, OP_FYL2X, OP_32BIT); } -inline void emit_fptan(x86code *&emitptr) { emit_op_simple(emitptr, OP_FPTAN, OP_32BIT); } -inline void emit_fpatan(x86code *&emitptr) { emit_op_simple(emitptr, OP_FPATAN, OP_32BIT); } -inline void emit_fxtract(x86code *&emitptr) { emit_op_simple(emitptr, OP_FXTRACT, OP_32BIT); } -inline void emit_fprem1(x86code *&emitptr) { emit_op_simple(emitptr, OP_FPREM1, OP_32BIT); } -inline void emit_fdecstp(x86code *&emitptr) { emit_op_simple(emitptr, OP_FDECSTP, OP_32BIT); } -inline void emit_fincstp(x86code *&emitptr) { emit_op_simple(emitptr, OP_FINCSTP, OP_32BIT); } -inline void emit_fprem(x86code *&emitptr) { emit_op_simple(emitptr, OP_FPREM, OP_32BIT); } -inline void emit_fyl2xp1(x86code *&emitptr) { emit_op_simple(emitptr, OP_FYL2XP1, OP_32BIT); } -inline void emit_fsqrt(x86code *&emitptr) { emit_op_simple(emitptr, OP_FSQRT, OP_32BIT); } -inline void emit_fsincos(x86code *&emitptr) { emit_op_simple(emitptr, OP_FSINCOS, OP_32BIT); } -inline void emit_frndint(x86code *&emitptr) { emit_op_simple(emitptr, OP_FRNDINT, OP_32BIT); } -inline void emit_fscale(x86code *&emitptr) { emit_op_simple(emitptr, OP_FSCALE, OP_32BIT); } -inline void emit_fsin(x86code *&emitptr) { emit_op_simple(emitptr, OP_FSIN, OP_32BIT); } -inline void emit_fcos(x86code *&emitptr) { emit_op_simple(emitptr, OP_FCOS, OP_32BIT); } -inline void emit_fucompp(x86code *&emitptr) { emit_op_simple(emitptr, OP_FUCOMPP, OP_32BIT); } -inline void emit_fclex(x86code *&emitptr) { emit_op_simple(emitptr, OP_FCLEX, OP_32BIT); } -inline void emit_finit(x86code *&emitptr) { emit_op_simple(emitptr, OP_FINIT, OP_32BIT); } -inline void emit_fcompp(x86code *&emitptr) { emit_op_simple(emitptr, OP_FCOMPP, OP_32BIT); } -inline void emit_fstsw_ax(x86code *&emitptr) { emit_op_simple(emitptr, OP_FSTSW_AX, OP_32BIT); } - -#endif - - - -//************************************************************************** -// REGISTER-BASED FPU EMITTERS -//************************************************************************** - -#if (X86EMIT_SIZE == 32) - -inline void emit_ffree_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FFREE_STn + reg, OP_32BIT); } -inline void emit_fst_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FST_STn + reg, OP_32BIT); } -inline void emit_fstp_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FSTP_STn + reg, OP_32BIT); } -inline void emit_fucomp_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FUCOMP_STn + reg, OP_32BIT); } - -inline void emit_fadd_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FADD_ST0_STn + reg, OP_32BIT); } -inline void emit_fmul_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FMUL_ST0_STn + reg, OP_32BIT); } -inline void emit_fcom_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCOM_ST0_STn + reg, OP_32BIT); } -inline void emit_fcomp_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCOMP_ST0_STn + reg, OP_32BIT); } -inline void emit_fsub_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FSUB_ST0_STn + reg, OP_32BIT); } -inline void emit_fsubr_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FSUBR_ST0_STn + reg, OP_32BIT); } -inline void emit_fdiv_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FDIV_ST0_STn + reg, OP_32BIT); } -inline void emit_fdivr_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FDIVR_ST0_STn + reg, OP_32BIT); } -inline void emit_fld_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FLD_ST0_STn + reg, OP_32BIT); } -inline void emit_fxch_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FXCH_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmovb_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVB_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmove_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVE_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmovbe_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVBE_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmovu_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVU_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmovnb_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVNB_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmovne_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVNE_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmovnbe_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVNBE_ST0_STn + reg, OP_32BIT); } -inline void emit_fcmovnu_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCMOVNU_ST0_STn + reg, OP_32BIT); } -inline void emit_fucomi_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FUCOMI_ST0_STn + reg, OP_32BIT); } -inline void emit_fcomi_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCOMI_ST0_STn + reg, OP_32BIT); } -inline void emit_fcomip_st0_stn(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FCOMIP_ST0_STn + reg, OP_32BIT); } - -inline void emit_fadd_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FADD_STn_ST0 + reg, OP_32BIT); } -inline void emit_fmul_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FMUL_STn_ST0 + reg, OP_32BIT); } -inline void emit_fsubr_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FSUBR_STn_ST0 + reg, OP_32BIT); } -inline void emit_fsub_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FSUB_STn_ST0 + reg, OP_32BIT); } -inline void emit_fdivr_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FDIVR_STn_ST0 + reg, OP_32BIT); } -inline void emit_fdiv_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FDIV_STn_ST0 + reg, OP_32BIT); } -inline void emit_fucom_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FUCOM_STn_ST0 + reg, OP_32BIT); } -inline void emit_faddp_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FADDP_STn_ST0 + reg, OP_32BIT); } -inline void emit_fmulp_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FMULP_STn_ST0 + reg, OP_32BIT); } -inline void emit_fsubrp_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FSUBRP_STn_ST0 + reg, OP_32BIT); } -inline void emit_fsubp_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FSUBP_STn_ST0 + reg, OP_32BIT); } -inline void emit_fdivrp_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FDIVRP_STn_ST0 + reg, OP_32BIT); } -inline void emit_fdivp_stn_st0(x86code *&emitptr, uint8_t reg) { emit_op_simple(emitptr, OP_FDIVP_STn_ST0 + reg, OP_32BIT); } - -inline void emit_faddp(x86code *&emitptr) { emit_faddp_stn_st0(emitptr, 1); } -inline void emit_fmulp(x86code *&emitptr) { emit_fmulp_stn_st0(emitptr, 1); } -inline void emit_fsubrp(x86code *&emitptr) { emit_fsubrp_stn_st0(emitptr, 1); } -inline void emit_fsubp(x86code *&emitptr) { emit_fsubp_stn_st0(emitptr, 1); } -inline void emit_fdivrp(x86code *&emitptr) { emit_fdivrp_stn_st0(emitptr, 1); } -inline void emit_fdivp(x86code *&emitptr) { emit_fdivp_stn_st0(emitptr, 1); } - -#endif - - - -//************************************************************************** -// MEMORY FPU EMITTERS -//************************************************************************** - -#if (X86EMIT_SIZE == 32) - -inline void emit_fadd_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 0, memref); } -inline void emit_fmul_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 1, memref); } -inline void emit_fcom_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 2, memref); } -inline void emit_fcomp_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 3, memref); } -inline void emit_fsub_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 4, memref); } -inline void emit_fsubr_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 5, memref); } -inline void emit_fdiv_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 6, memref); } -inline void emit_fdivr_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D8, OP_32BIT, 7, memref); } - -inline void emit_fld_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D9, OP_32BIT, 0, memref); } -inline void emit_fst_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D9, OP_32BIT, 2, memref); } -inline void emit_fstp_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D9, OP_32BIT, 3, memref); } -inline void emit_fldenv_m(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D9, OP_32BIT, 4, memref); } -inline void emit_fldcw_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D9, OP_32BIT, 5, memref); } -inline void emit_fstenv_m(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D9, OP_32BIT, 6, memref); } -inline void emit_fstcw_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_D9, OP_32BIT, 7, memref); } - -inline void emit_fiadd_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 0, memref); } -inline void emit_fimul_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 1, memref); } -inline void emit_ficom_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 2, memref); } -inline void emit_ficomp_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 3, memref); } -inline void emit_fisub_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 4, memref); } -inline void emit_fisubr_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 5, memref); } -inline void emit_fidiv_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 6, memref); } -inline void emit_fidivr_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DA, OP_32BIT, 7, memref); } - -inline void emit_fild_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DB, OP_32BIT, 0, memref); } -inline void emit_fisttp_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DB, OP_32BIT, 1, memref); } -inline void emit_fist_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DB, OP_32BIT, 2, memref); } -inline void emit_fistp_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DB, OP_32BIT, 3, memref); } -inline void emit_fld_m80(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DB, OP_32BIT, 5, memref); } -inline void emit_fstp_m80(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DB, OP_32BIT, 7, memref); } - -inline void emit_fadd_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 0, memref); } -inline void emit_fmul_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 1, memref); } -inline void emit_fcom_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 2, memref); } -inline void emit_fcomp_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 3, memref); } -inline void emit_fsub_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 4, memref); } -inline void emit_fsubr_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 5, memref); } -inline void emit_fdiv_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 6, memref); } -inline void emit_fdivr_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DC, OP_32BIT, 7, memref); } - -inline void emit_fld_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DD, OP_32BIT, 0, memref); } -inline void emit_fisttp_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DD, OP_32BIT, 1, memref); } -inline void emit_fst_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DD, OP_32BIT, 2, memref); } -inline void emit_fstp_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DD, OP_32BIT, 3, memref); } -inline void emit_frstor_m(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DD, OP_32BIT, 4, memref); } -inline void emit_fsave_m(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DD, OP_32BIT, 6, memref); } -inline void emit_fstsw_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DD, OP_32BIT, 7, memref); } - -inline void emit_fiadd_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 0, memref); } -inline void emit_fimul_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 1, memref); } -inline void emit_ficom_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 2, memref); } -inline void emit_ficomp_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 3, memref); } -inline void emit_fisub_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 4, memref); } -inline void emit_fisubr_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 5, memref); } -inline void emit_fidiv_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 6, memref); } -inline void emit_fidivr_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DE, OP_32BIT, 7, memref); } - -inline void emit_fild_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 0, memref); } -inline void emit_fisttp_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 1, memref); } -inline void emit_fist_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 2, memref); } -inline void emit_fistp_m16(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 3, memref); } -inline void emit_fbld_m80(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 4, memref); } -inline void emit_fild_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 5, memref); } -inline void emit_fbstp_m80(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 6, memref); } -inline void emit_fistp_m64(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ESC_DF, OP_32BIT, 7, memref); } - -#endif - - - -//************************************************************************** -// GROUP16 EMITTERS -//************************************************************************** - -inline void emit_ldmxcsr_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G16, OP_32BIT, 2, memref); } -inline void emit_stmxcsr_m32(x86code *&emitptr, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_G16, OP_32BIT, 3, memref); } - - - -//************************************************************************** -// MISC SSE EMITTERS -//************************************************************************** - -inline void emit_movd_r128_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVD_Vd_Ed, OP_32BIT, dreg, sreg); } -inline void emit_movd_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVD_Vd_Ed, OP_32BIT, dreg, memref); } -inline void emit_movd_r32_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVD_Ed_Vd, OP_32BIT, sreg, dreg); } -inline void emit_movd_m32_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVD_Ed_Vd, OP_32BIT, sreg, memref); } - -#if (X86EMIT_SIZE == 64) - -inline void emit_movq_r128_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVD_Vd_Ed, OP_64BIT, dreg, sreg); } -inline void emit_movq_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVD_Vd_Ed, OP_64BIT, dreg, memref); } -inline void emit_movq_r64_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVD_Ed_Vd, OP_64BIT, sreg, dreg); } -inline void emit_movq_m64_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVD_Ed_Vd, OP_64BIT, sreg, memref); } - -#endif - -inline void emit_movdqa_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVDQA_Vdq_Wdq, OP_32BIT, dreg, memref); } -inline void emit_movdqa_m128_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVDQA_Wdq_Vdq, OP_32BIT, sreg, memref); } -inline void emit_movdqu_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVDQU_Vdq_Wdq, OP_32BIT, dreg, memref); } -inline void emit_movdqu_m128_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVDQU_Wdq_Vdq, OP_32BIT, sreg, memref); } - - -//************************************************************************** -// SSE SCALAR SINGLE EMITTERS -//************************************************************************** - -inline void emit_movss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_movss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSS_Vss_Wss, OP_32BIT, dreg, memref); } -inline void emit_movss_m32_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVSS_Wss_Vss, OP_32BIT, sreg, memref); } - -inline void emit_addss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADDSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_addss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADDSS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_subss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUBSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_subss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUBSS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_mulss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MULSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_mulss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MULSS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_divss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_DIVSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_divss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_DIVSS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_rcpss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_RCPSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_rcpss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_RCPSS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_sqrtss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SQRTSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_sqrtss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SQRTSS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_rsqrtss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_RSQRTSS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_rsqrtss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_RSQRTSS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_comiss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_COMISS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_comiss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_COMISS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_ucomiss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_UCOMISS_Vss_Wss, OP_32BIT, dreg, sreg); } -inline void emit_ucomiss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_UCOMISS_Vss_Wss, OP_32BIT, dreg, memref); } - -inline void emit_cvtsi2ss_r128_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSI2SS_Vss_Ed, OP_32BIT, dreg, sreg); } -inline void emit_cvtsi2ss_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSI2SS_Vss_Ed, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_cvtsi2ss_r128_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSI2SS_Vss_Ed, OP_64BIT, dreg, sreg); } -inline void emit_cvtsi2ss_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSI2SS_Vss_Ed, OP_64BIT, dreg, memref); } -#endif - -inline void emit_cvtsd2ss_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSD2SS_Vss_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_cvtsd2ss_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSD2SS_Vss_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_cvtss2si_r32_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSS2SI_Gd_Wss, OP_32BIT, dreg, sreg); } -inline void emit_cvtss2si_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSS2SI_Gd_Wss, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_cvtss2si_r64_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSS2SI_Gd_Wss, OP_64BIT, dreg, sreg); } -inline void emit_cvtss2si_r64_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSS2SI_Gd_Wss, OP_64BIT, dreg, memref); } -#endif - -inline void emit_cvttss2si_r32_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTTSS2SI_Gd_Wss, OP_32BIT, dreg, sreg); } -inline void emit_cvttss2si_r32_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTTSS2SI_Gd_Wss, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_cvttss2si_r64_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTTSS2SI_Gd_Wss, OP_64BIT, dreg, sreg); } -inline void emit_cvttss2si_r64_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTTSS2SI_Gd_Wss, OP_64BIT, dreg, memref); } -#endif - -inline void emit_roundss_r128_r128_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg(emitptr, OP_ROUNDSS_Vss_Wss_Ib, OP_32BIT, dreg, sreg); emit_byte(emitptr, imm); } -inline void emit_roundss_r128_m32_imm(x86code *&emitptr, uint8_t dreg, x86_memref memref, uint8_t imm) { emit_op_modrm_mem(emitptr, OP_ROUNDSS_Vss_Wss_Ib, OP_32BIT, dreg, memref); emit_byte(emitptr, imm); } - - - -//************************************************************************** -// SSE PACKED SINGLE EMITTERS -//************************************************************************** - -inline void emit_movps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVAPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_movps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVAPS_Vps_Wps, OP_32BIT, dreg, memref); } -inline void emit_movps_m128_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVAPS_Wps_Vps, OP_32BIT, sreg, memref); } - -inline void emit_addps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADDPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_addps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADDPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_subps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUBPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_subps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUBPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_mulps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MULPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_mulps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MULPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_divps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_DIVPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_divps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_DIVPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_rcpps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_RCPPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_rcpps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_RCPPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_sqrtps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SQRTPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_sqrtps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SQRTPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_rsqrtps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_RSQRTPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_rsqrtps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_RSQRTPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_andps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ANDPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_andps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ANDPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_andnps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ANDNPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_andnps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ANDNPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_orps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ORPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_orps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ORPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_xorps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_XORPS_Vps_Wps, OP_32BIT, dreg, sreg); } -inline void emit_xorps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_XORPS_Vps_Wps, OP_32BIT, dreg, memref); } - -inline void emit_cvtdq2ps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTDQ2PS_Vps_Wdq, OP_32BIT, dreg, sreg); } -inline void emit_cvtdq2ps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTDQ2PS_Vps_Wdq, OP_32BIT, dreg, memref); } - -inline void emit_cvtpd2ps_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTPD2PS_Vps_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_cvtpd2ps_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTPD2PS_Vps_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_cvtps2dq_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTPS2DQ_Vdq_Wps, OP_32BIT, dreg, sreg); } -inline void emit_cvtps2dq_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTPS2DQ_Vdq_Wps, OP_32BIT, dreg, memref); } - -inline void emit_cvttps2dq_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTTPS2DQ_Vdq_Wps, OP_32BIT, dreg, sreg); } -inline void emit_cvttps2dq_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTTPS2DQ_Vdq_Wps, OP_32BIT, dreg, memref); } - -inline void emit_roundps_r128_r128_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg(emitptr, OP_ROUNDPS_Vdq_Wdq_Ib, OP_32BIT, dreg, sreg); emit_byte(emitptr, imm); } -inline void emit_roundps_r128_m128_imm(x86code *&emitptr, uint8_t dreg, x86_memref memref, uint8_t imm) { emit_op_modrm_mem(emitptr, OP_ROUNDPS_Vdq_Wdq_Ib, OP_32BIT, dreg, memref); emit_byte(emitptr, imm); } - - - -//************************************************************************** -// SSE SCALAR DOUBLE EMITTERS -//************************************************************************** - -inline void emit_movsd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVSD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_movsd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVSD_Vsd_Wsd, OP_32BIT, dreg, memref); } -inline void emit_movsd_m64_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVSD_Wsd_Vsd, OP_32BIT, sreg, memref); } - -inline void emit_addsd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADDSD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_addsd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADDSD_Vsd_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_subsd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUBSD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_subsd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUBSD_Vsd_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_mulsd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MULSD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_mulsd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MULSD_Vsd_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_divsd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_DIVSD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_divsd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_DIVSD_Vsd_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_sqrtsd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SQRTSD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_sqrtsd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SQRTSD_Vsd_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_comisd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_COMISD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_comisd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_COMISD_Vsd_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_ucomisd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_UCOMISD_Vsd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_ucomisd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_UCOMISD_Vsd_Wsd, OP_32BIT, dreg, memref); } - -inline void emit_cvtsi2sd_r128_r32(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSI2SD_Vsd_Ed, OP_32BIT, dreg, sreg); } -inline void emit_cvtsi2sd_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSI2SD_Vsd_Ed, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_cvtsi2sd_r128_r64(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSI2SD_Vsd_Ed, OP_64BIT, dreg, sreg); } -inline void emit_cvtsi2sd_r128_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSI2SD_Vsd_Ed, OP_64BIT, dreg, memref); } -#endif - -inline void emit_cvtss2sd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSS2SD_Vsd_Wss, OP_32BIT, dreg, sreg); } -inline void emit_cvtss2sd_r128_m32(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSS2SD_Vsd_Wss, OP_32BIT, dreg, memref); } - -inline void emit_cvtsd2si_r32_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSD2SI_Gd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_cvtsd2si_r32_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSD2SI_Gd_Wsd, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_cvtsd2si_r64_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTSD2SI_Gd_Wsd, OP_64BIT, dreg, sreg); } -inline void emit_cvtsd2si_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTSD2SI_Gd_Wsd, OP_64BIT, dreg, memref); } -#endif - -inline void emit_cvttsd2si_r32_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTTSD2SI_Gd_Wsd, OP_32BIT, dreg, sreg); } -inline void emit_cvttsd2si_r32_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTTSD2SI_Gd_Wsd, OP_32BIT, dreg, memref); } - -#if (X86EMIT_SIZE == 64) -inline void emit_cvttsd2si_r64_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTTSD2SI_Gd_Wsd, OP_64BIT, dreg, sreg); } -inline void emit_cvttsd2si_r64_m64(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTTSD2SI_Gd_Wsd, OP_64BIT, dreg, memref); } -#endif - -inline void emit_roundsd_r128_r128_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg(emitptr, OP_ROUNDSD_Vsd_Wsd_Ib, OP_32BIT, dreg, sreg); emit_byte(emitptr, imm); } -inline void emit_roundsd_r128_m64_imm(x86code *&emitptr, uint8_t dreg, x86_memref memref, uint8_t imm) { emit_op_modrm_mem(emitptr, OP_ROUNDSD_Vsd_Wsd_Ib, OP_32BIT, dreg, memref); emit_byte(emitptr, imm); } - - - -//************************************************************************** -// SSE PACKED DOUBLE EMITTERS -//************************************************************************** - -inline void emit_movpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MOVAPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_movpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MOVAPD_Vpd_Wpd, OP_32BIT, dreg, memref); } -inline void emit_movpd_m128_r128(x86code *&emitptr, x86_memref memref, uint8_t sreg) { emit_op_modrm_mem(emitptr, OP_MOVAPD_Wpd_Vpd, OP_32BIT, sreg, memref); } - -inline void emit_addpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ADDPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_addpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ADDPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_subpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SUBPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_subpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SUBPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_mulpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_MULPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_mulpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_MULPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_divpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_DIVPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_divpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_DIVPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_sqrtpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_SQRTPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_sqrtpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_SQRTPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_andpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ANDPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_andpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ANDPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_andnpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ANDNPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_andnpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ANDNPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_orpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_ORPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_orpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_ORPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_xorpd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_XORPD_Vpd_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_xorpd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_XORPD_Vpd_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_cvtdq2pd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTDQ2PD_Vpd_Wq, OP_32BIT, dreg, sreg); } -inline void emit_cvtdq2pd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTDQ2PD_Vpd_Wq, OP_32BIT, dreg, memref); } - -inline void emit_cvtps2pd_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTPS2PD_Vpd_Wq, OP_32BIT, dreg, sreg); } -inline void emit_cvtps2pd_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTPS2PD_Vpd_Wq, OP_32BIT, dreg, memref); } - -inline void emit_cvtpd2dq_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTPD2DQ_Vdq_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_cvtpd2dq_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTPD2DQ_Vdq_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_cvttpd2dq_r128_r128(x86code *&emitptr, uint8_t dreg, uint8_t sreg) { emit_op_modrm_reg(emitptr, OP_CVTTPD2DQ_Vdq_Wpd, OP_32BIT, dreg, sreg); } -inline void emit_cvttpd2dq_r128_m128(x86code *&emitptr, uint8_t dreg, x86_memref memref) { emit_op_modrm_mem(emitptr, OP_CVTTPD2DQ_Vdq_Wpd, OP_32BIT, dreg, memref); } - -inline void emit_roundpd_r128_r128_imm(x86code *&emitptr, uint8_t dreg, uint8_t sreg, uint8_t imm) { emit_op_modrm_reg(emitptr, OP_ROUNDPD_Vdq_Wdq_Ib, OP_32BIT, dreg, sreg); emit_byte(emitptr, imm); } -inline void emit_roundpd_r128_m128_imm(x86code *&emitptr, uint8_t dreg, x86_memref memref, uint8_t imm) { emit_op_modrm_mem(emitptr, OP_ROUNDPD_Vdq_Wdq_Ib, OP_32BIT, dreg, memref); emit_byte(emitptr, imm); } - -} - -#undef X86EMIT_SIZE - -#endif diff --git a/src/devices/cpu/x86log.h b/src/devices/cpu/x86log.h index ac7195c99bd..ba2a349a55f 100644 --- a/src/devices/cpu/x86log.h +++ b/src/devices/cpu/x86log.h @@ -15,7 +15,6 @@ #include #include -#include "x86emit.h" /*************************************************************************** @@ -32,6 +31,10 @@ constexpr int COMMENT_POOL_SIZE{MAX_COMMENTS * 40}; TYPE DEFINITIONS ***************************************************************************/ +// use x86code * to reference generated code +typedef uint8_t x86code; + + /* code logging info */ struct log_comment { -- cgit v1.2.3 From 39d1b41494a6fb86e4ac7082cc7d2f74f668e02c Mon Sep 17 00:00:00 2001 From: Michael D Date: Fri, 10 Jul 2020 17:25:28 +0200 Subject: sgi_mips.xml: New additions (#6899) * sgi_mips.xml: Add Hot Mix 5 and 7 CDs * sgi_mips.xml: Add missing CDs for SupportFolio 10/96 * sgi_mips.xml: Add SupportFolio 2/97 and 4/97 CDs * sgi_mips.xml: Add SupportAdvantage 10/94 and 6/95 CDs --- hash/sgi_mips.xml | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) diff --git a/hash/sgi_mips.xml b/hash/sgi_mips.xml index 4751fbf7896..50b3ce24917 100644 --- a/hash/sgi_mips.xml +++ b/hash/sgi_mips.xml @@ -1548,6 +1548,32 @@ license:CC0 + + Hot Mix 5 + 1993 + Silicon Graphics + + + + + + + + + + + Hot Mix 7 + 1994 + Silicon Graphics + + + + + + + + + Hot Mix Volume 8 1994 @@ -1746,13 +1772,114 @@ license:CC0 SupportFolio 10/96 1996 Silicon Graphics - + + + + + + + + + + + + + + + + + + + + + + + SupportFolio 2/97 + 1997 + Silicon Graphics + + + + + + + + + + + + + + + + + + + + + + SupportFolio 4/97 + 1997 + Silicon Graphics + + + + + + + + + + + + + + + + + + + + + Support Advantage 10/94 + 1994 + Silicon Graphics + + + + + + + + + + + + Support Advantage 6/95 + 1995 + Silicon Graphics + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 8ba47ddc113e7a15c550e8dad5edfd1c37ddf9c2 Mon Sep 17 00:00:00 2001 From: Michael D Date: Fri, 10 Jul 2020 17:26:02 +0200 Subject: sgi_mips.xml: fix bad dump (nw) (#6904) --- hash/sgi_mips.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/sgi_mips.xml b/hash/sgi_mips.xml index 50b3ce24917..4494f23a17e 100644 --- a/hash/sgi_mips.xml +++ b/hash/sgi_mips.xml @@ -1677,7 +1677,7 @@ license:CC0 - + -- cgit v1.2.3 From 44ecc6c92d8a54add74485befafc7202da080de8 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Fri, 10 Jul 2020 08:26:27 -0700 Subject: sgi_mips: new software list additions (#6905) --- hash/sgi_mips.xml | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/hash/sgi_mips.xml b/hash/sgi_mips.xml index 4494f23a17e..bf4195fe2c5 100644 --- a/hash/sgi_mips.xml +++ b/hash/sgi_mips.xml @@ -3817,4 +3817,166 @@ license:CC0 + + + + NetBSD 1.6.2 + 2004 + The NetBSD Project + + + + + + + + + + + + + + + + + + NetBSD 2.0 + 2004 + The NetBSD Project + + + + + + + + + + + + + + + + + + NetBSD 2.0.2 + 2005 + The NetBSD Project + + + + + + + + + + + + + + + + + + NetBSD 2.1 + 2005 + The NetBSD Project + + + + + + + + + + + + + + + + + + NetBSD 3.0 + 2005 + The NetBSD Project + + + + + + + + + + + + + + + + + + NetBSD 3.0.1 + 2006 + The NetBSD Project + + + + + + + + + + + + + + + + + + NetBSD 3.0.2 + 2006 + The NetBSD Project + + + + + + + + + + + + + + + + + + NetBSD 3.1 + 2006 + The NetBSD Project + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 11fcdbbafc6e1fa0248cb900bdc2a479a308a188 Mon Sep 17 00:00:00 2001 From: r09 Date: Fri, 10 Jul 2020 17:27:00 +0200 Subject: pc98_cd.xml: 15 new dumps, 11 replacements (#6934) - New dumps from redump.org (working): Chiemi & Naomi F15 Strike Eagle III if 2 - Invitations from Fantastic Stories Manami no Doko made Iku no? 2 - Return of the Kuro Pack Phobos Pro Student G (ALS-0010) YES! HG - Erotic Voice Version Yuurou - Transient Sands - New dumps from redump.org (not working): DOR Special Edition '93 DOR Special Edition '93 (alt) Kanji Land 3-nen Kyrandia II - The Hand of Fate Lemon Cocktail Collection Lip 3 - Lipstick Adventure 3 Mirage 2 - Torry, Neat & Roan Fairladies in MagicLand - Replaced entries with dumps from redump.org: Branmarker 2 Eimmy to Yobanaide Lesser Mern - Special Director's Edition Mahjong de Pon! Saint Diary - Kiyoka-chan no Nikki Takamizawa Kyousuke - Nekketsu!! Kyouiku Kenshuu The Legend of Kyrandia Tuned Heart Vastness - Kuukyo no Ikenie-tachi Youjuu Senki 2 - Reimei no Senshi-tachi Zenith - Full Animation Adventure Series #1 Most of these discs are hybrid (they work on both PC-98x1 and FM Towns), so their CHDs are exactly the same as in fmtowns_cd.xml. --- hash/pc98_cd.xml | 652 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 573 insertions(+), 79 deletions(-) diff --git a/hash/pc98_cd.xml b/hash/pc98_cd.xml index d4c047a2391..4013f1e42f8 100644 --- a/hash/pc98_cd.xml +++ b/hash/pc98_cd.xml @@ -873,20 +873,34 @@ license:CC0 + Branmarker 2 1995 ディー・オー (D.O.) - + + + + + + + + - + @@ -1025,6 +1039,55 @@ license:CC0 + + + + + Chiemi & Naomi + 1993 + フェアリーテール (Fairytale) + + + + + + + + + + + + + + + + + + + DOR Special Edition '93 + 1993 + ディー・オー (D.O.) + + + + + + + + + + + + DOR Special Edition '93 (alt) + 1993 + ディー・オー (D.O.) + + + + + + + + + Eimmy to Yobanaide 1995 シーズウェア (C's Ware) + + - + @@ -1851,6 +1960,24 @@ license:CC0 + + + F15 Strike Eagle III + 1995 + スペクトラムホロバイトジャパン (Spectrum HoloByte Japan) + + + + + + + + + + + + if 2 - Invitations from Fantastic Stories + 1993 + アクティブ (Active) + + + + + + + + + + + + + + Kanji Land 3-nen + 1995 + 富士通大分ソフトウェアラボラトリ (Fujitsu Ooita Software Laboratory) + + + + + + + + + + The Legend of Kyrandia - 1994 + 1993 スタークラフト (Starcraft) - - + + + @@ -2475,7 +2666,72 @@ license:CC0 - + + + + + + + + + Kyrandia II - The Hand of Fate + 1995 + スタークラフト (Starcraft) + + + + + + + + + + + + + + + + + + + + + Lemon Cocktail Collection + 1993 + カクテル・ソフト (Cocktail Soft) + + + + + + @@ -2486,12 +2742,10 @@ license:CC0 --> Lesser Mern - Special Director's Edition 1992 @@ -2511,7 +2765,7 @@ license:CC0 - + @@ -2552,6 +2806,37 @@ license:CC0 + + + + + Lip 3 - Lipstick Adventure 3 + 1993 + フェアリーテール (Fairytale) + + + + + + + + + + + + + Manami no Doko made Iku no? 2 - Return of the Kuro Pack + 1995 + ウエンディマガジン (Wendy Magazine) + + + + + + + + + - + + + + Mirage 2 - Torry, Neat & Roan Fairladies in MagicLand + 1994 + ディスカバリー (Discovery) + + + + + + + + + + + Mahjong de Pon! 1994 アクティブ (Active) + + - + @@ -3073,6 +3411,26 @@ license:CC0 + + + + Phobos + 1995 + 姫屋ソフト (Himeya Soft) + + + + + + + + + + + + + + Pro Student G (ALS-0010) + 1994 + アリスソフト (AliceSoft) + + + + + + + + + + Saint Diary - Kiyoka-chan no Nikki 1996 @@ -3733,7 +4130,7 @@ license:CC0 - + @@ -4135,19 +4532,34 @@ license:CC0 - Takamizawa Kyosuke - Nekketsu!! Kyouiku Kenshuu + Origin: redump.org + + + + + + + + + + + + + + + + + + --> + Takamizawa Kyousuke - Nekketsu!! Kyouiku Kenshuu 1995 ジックス (ZyX) + + - + @@ -4336,12 +4748,9 @@ license:CC0 Tuned Heart 1996 @@ -4351,7 +4760,7 @@ license:CC0 - + @@ -4378,19 +4787,23 @@ license:CC0 Vastness - Kuukyo no Ikenie-tachi - 1994 + 1995 CD Bros. - + + + - + @@ -4536,23 +4949,62 @@ license:CC0 + + + + YES! HG - Erotic Voice Version + 1995 + 姫屋ソフト (Himeya Soft) + + + + + + + + - Youjuu Senki 2 - Reimei no Senshi + Origin: redump.org + + + + + + + + + + + + + + + --> + Youjuu Senki 2 - Reimei no Senshi-tachi 1993 ディー・オー (D.O.) - + + - + @@ -4633,6 +5085,35 @@ license:CC0 + + + Yuurou - Transient Sands + 1996 + ハーベスト (Hervest) + + + + + + + + + + Origin: redump.org + + + + + + + + + + + + + + --> Zenith - Full Animation Adventure Series #1 - 1994 + 1995 姫屋ソフト (Himeya Soft) + - + -- cgit v1.2.3 From dc2a37a5fa0aad110a93a2af3a4c9be5d99d9379 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 11 Jul 2020 03:01:48 +1000 Subject: llc1: cleaned, added notes, marked as working --- src/mame/drivers/llc1.cpp | 230 +++++++++++++++++++++------------------------- 1 file changed, 105 insertions(+), 125 deletions(-) diff --git a/src/mame/drivers/llc1.cpp b/src/mame/drivers/llc1.cpp index 0f8326a0055..a0117d521d8 100644 --- a/src/mame/drivers/llc1.cpp +++ b/src/mame/drivers/llc1.cpp @@ -2,39 +2,34 @@ // copyright-holders:Miodrag Milanovic, Robbbert /****************************************************************************** - LLC1 driver by Miodrag Milanovic - - 17/04/2009 Preliminary driver. - - July 2012, updates by Robbbert - - Very little info available on these computers. - - LLC1: - Handy addresses (set the pc register in the debugger, because the - monitor's Go command has problems): - 0800 = BASIC cold start - 0803 = BASIC warm start - 13BE = display Monitor logo - This machine has an 8-digit LED display with hex keyboard, - and also a 64x16 monochrome screen with full keyboard. - The monitor uses the hex keyboard, while Basic uses the full keyboard. - Monitor output is on the digits, but the single-step command displays - a running register dump on the main screen. - There are no storage facilities, and no sound. - BASIC is integer only (-32768 to 32767), about 6k of space, and all - input is to be in uppercase. It does have minimal string capability, - but there is no $ sign, so how to create a string variable is unknown. - To exit back to the monitor, type BYE. - The user instructions of the monitor (in German) are here: - http://www.jens-mueller.org/jkcemu/llc1.html - - ToDo: - - LLC1: Get good dump of monitor rom, has a number of bad bytes - - LLC1: In Basic, pressing enter several times causes the start - of the line to be shifted 1 or 2 characters to the right. - - LLC1: Go command crashes - - Lots of other things +LLC1 driver by Miodrag Milanovic + +2009-04-17 Preliminary driver. + +2012-07-?? Updates by Robbbert + +Handy addresses: (Press X then the 4 digits then Enter) + 0800 = BASIC cold start + 0803 = BASIC warm start + 13BE = display Monitor logo +This machine has an 8-digit LED display with hex keyboard, +and also a 64x16 monochrome screen with full keyboard. +The monitor uses the hex keyboard, while Basic uses the full keyboard. +Monitor output is on the digits, but the single-step command displays +a running register dump on the main screen. +There are no storage facilities, and no sound. +BASIC is integer only (-32768 to 32767), about 6k of space, and all +input is to be in uppercase. It does have minimal string capability, +but there is no $ sign, so how to create a string variable is unknown. +To exit back to the monitor, type BYE. +The user instructions of the monitor (in German) are here: +http://www.jens-mueller.org/jkcemu/llc1.html + +ToDo: +- Get good dump of monitor rom, has one known bad byte, possibly more. +- In Basic, when it first scrolls, the start of the line shifts a character + to the right. Unknown if a bug or a bad byte. (patched) + *******************************************************************************/ @@ -57,32 +52,33 @@ public: llc1_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_ctc(*this, "ctc") , m_p_chargen(*this, "chargen") , m_vram(*this, "videoram") , m_digits(*this, "digit%u", 0U) { } void llc1(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(z3_button); private: void machine_start() override; void machine_reset() override; void kbd_put(u8 data); - u8 llc1_port1_a_r(); - u8 llc1_port2_a_r(); - u8 llc1_port2_b_r(); - void llc1_port1_a_w(u8 data); - void llc1_port1_b_w(u8 data); - u32 screen_update_llc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u8 port1a_r(); + u8 port2a_r(); + u8 port2b_r(); + void port1a_w(u8 data); + void port1b_w(u8 data); + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void io_map(address_map &map); void mem_map(address_map &map); - u8 m_term_status; - u8 m_llc1_key; u8 m_porta; u8 m_term_data; required_device m_maincpu; + required_device m_ctc; required_region_ptr m_p_chargen; required_shared_ptr m_vram; output_finder<8> m_digits; @@ -102,42 +98,47 @@ void llc1_state::io_map(address_map &map) { map.global_mask(0xff); map.unmap_value_high(); - map(0xEC, 0xEF).rw("z80pio2", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); - map(0xF4, 0xF7).rw("z80pio1", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); - map(0xF8, 0xFB).rw("z80ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); + map(0xEC, 0xEF).rw("pio2", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); + map(0xF4, 0xF7).rw("pio1", FUNC(z80pio_device::read), FUNC(z80pio_device::write)); + map(0xF8, 0xFB).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); } /* Input ports */ static INPUT_PORTS_START( llc1 ) PORT_START("X4") // out F4,BF - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) PORT_START("X5") // out F4,DF - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("REG") PORT_CODE(KEYCODE_R) PORT_CHAR('R') - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M (Mem)") PORT_CODE(KEYCODE_M) PORT_CHAR('M') - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ST (Start)") PORT_CODE(KEYCODE_ENTER) PORT_CHAR('^') - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) // resets + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("REG") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M (Mem)") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ST (Start)") PORT_CODE(KEYCODE_ENTER) PORT_CHAR('^') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DF (Reset)") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) PORT_START("X6") // out F4,EF - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ES (Step)") PORT_CODE(KEYCODE_S) PORT_CHAR('S') - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DL (Go)") PORT_CODE(KEYCODE_X) PORT_CHAR('X') - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("HP (BP)") PORT_CODE(KEYCODE_P) PORT_CHAR('P') + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ES (Step)") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DL (Go)") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("HP (BP)") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHANGED_MEMBER(DEVICE_SELF, llc1_state, z3_button, 0) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) // does nothing INPUT_PORTS_END +INPUT_CHANGED_MEMBER(llc1_state::z3_button) +{ + m_ctc->trg3(newval); +} + void llc1_state::kbd_put(u8 data) { static constexpr u8 s1[16]={0x40, 0x1e, 0x12, 0x1b, 0x19, 0x14, 0x15, 0x1d, 0x16, 0x17, 0x1c, 0x3c, 0x3f, 0x3d, 0x3e, 0x10}; // 0x20 to 0x2F @@ -156,32 +157,28 @@ void llc1_state::kbd_put(u8 data) m_term_data = 0; if (m_term_data) - m_term_status = 0xff; + m_term_data |= 0x80; } // LLC1 BASIC keyboard -u8 llc1_state::llc1_port2_b_r() +u8 llc1_state::port2b_r() { - u8 retVal = 0; - - if (m_term_status) + if (BIT(m_term_data, 7)) { - retVal = m_term_status; - m_term_status = 0; + m_term_data &= 0x7f; + return 0xff; } else - retVal = m_term_data; - - return retVal; + return m_term_data; } -u8 llc1_state::llc1_port2_a_r() +u8 llc1_state::port2a_r() { return 0; } // LLC1 Monitor keyboard -u8 llc1_state::llc1_port1_a_r() +u8 llc1_state::port1a_r() { u8 data = 0; if (!BIT(m_porta, 4)) @@ -193,29 +190,15 @@ u8 llc1_state::llc1_port1_a_r() if (data & 0xf0) data = (data >> 4) | 0x80; - data |= (m_porta & 0x70); - - // do not repeat key - if (data & 15) - { - if (data == m_llc1_key) - data &= 0x70; - else - m_llc1_key = data; - } - else - if ((data & 0x70) == (m_llc1_key & 0x70)) - m_llc1_key = 0; - return data; } -void llc1_state::llc1_port1_a_w(u8 data) +void llc1_state::port1a_w(u8 data) { m_porta = data; } -void llc1_state::llc1_port1_b_w(u8 data) +void llc1_state::port1b_w(u8 data) { static u8 count = 0, digit = 0; @@ -242,21 +225,17 @@ void llc1_state::llc1_port1_b_w(u8 data) void llc1_state::machine_reset() { - m_term_status = 0; - m_llc1_key = 0; + m_term_data = 0; } void llc1_state::machine_start() { m_digits.resolve(); - - save_item(NAME(m_term_status)); - save_item(NAME(m_llc1_key)); save_item(NAME(m_porta)); save_item(NAME(m_term_data)); } -u32 llc1_state::screen_update_llc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 llc1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { u8 y,ra,chr,gfx,inv; u16 sy=0,ma=0,x; @@ -291,14 +270,15 @@ u32 llc1_state::screen_update_llc1(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -static const z80_daisy_config llc1_daisy_chain[] = +static const z80_daisy_config daisy_chain[] = { - { "z80ctc" }, + { "pio2" }, + { "ctc" }, { nullptr } }; /* F4 Character Displayer */ -static const gfx_layout llc1_charlayout = +static const gfx_layout charlayout = { 8, 8, /* 8 x 8 characters */ 128, /* 128 characters */ @@ -312,15 +292,15 @@ static const gfx_layout llc1_charlayout = }; static GFXDECODE_START( gfx_llc1 ) - GFXDECODE_ENTRY( "chargen", 0x0000, llc1_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 ) GFXDECODE_END /* Machine driver */ void llc1_state::llc1(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, XTAL(3'000'000)); - m_maincpu->set_daisy_config(llc1_daisy_chain); + Z80(config, m_maincpu, XTAL(2'000'000)); + m_maincpu->set_daisy_config(daisy_chain); m_maincpu->set_addrmap(AS_PROGRAM, &llc1_state::mem_map); m_maincpu->set_addrmap(AS_IO, &llc1_state::io_map); @@ -330,29 +310,29 @@ void llc1_state::llc1(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ screen.set_size(64*8, 16*8); screen.set_visarea(0, 64*8-1, 0, 16*8-1); - screen.set_screen_update(FUNC(llc1_state::screen_update_llc1)); + screen.set_screen_update(FUNC(llc1_state::screen_update)); screen.set_palette("palette"); GFXDECODE(config, "gfxdecode", "palette", gfx_llc1); PALETTE(config, "palette", palette_device::MONOCHROME); config.set_default_layout(layout_llc1); - z80pio_device& pio1(Z80PIO(config, "z80pio1", XTAL(3'000'000))); - pio1.in_pa_callback().set(FUNC(llc1_state::llc1_port1_a_r)); - pio1.out_pa_callback().set(FUNC(llc1_state::llc1_port1_a_w)); - pio1.out_pb_callback().set(FUNC(llc1_state::llc1_port1_b_w)); + z80pio_device& pio1(Z80PIO(config, "pio1", XTAL(2'000'000))); + pio1.in_pa_callback().set(FUNC(llc1_state::port1a_r)); + pio1.out_pa_callback().set(FUNC(llc1_state::port1a_w)); + pio1.out_pb_callback().set(FUNC(llc1_state::port1b_w)); - z80pio_device& pio2(Z80PIO(config, "z80pio2", XTAL(3'000'000))); - pio2.in_pa_callback().set(FUNC(llc1_state::llc1_port2_a_r)); - pio2.in_pb_callback().set(FUNC(llc1_state::llc1_port2_b_r)); + z80pio_device& pio2(Z80PIO(config, "pio2", XTAL(2'000'000))); + pio2.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + pio2.in_pa_callback().set(FUNC(llc1_state::port2a_r)); + pio2.in_pb_callback().set(FUNC(llc1_state::port2b_r)); - z80ctc_device& ctc(Z80CTC(config, "z80ctc", XTAL(3'000'000))); - // timer 0 irq does digit display, and timer 3 irq does scan of the - // monitor keyboard. - // No idea how the CTC is connected, so guessed. - ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - ctc.zc_callback<0>().set("z80ctc", FUNC(z80ctc_device::trg1)); - ctc.zc_callback<1>().set("z80ctc", FUNC(z80ctc_device::trg3)); + Z80CTC(config, m_ctc, XTAL(2'000'000)); + // timer 0 irq does digit display + // timer 3 is kicked off by a key press, and scans the monitor keyboard. + m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + m_ctc->zc_callback<0>().set(m_ctc, FUNC(z80ctc_device::trg1)); + m_ctc->zc_callback<1>().set(m_ctc, FUNC(z80ctc_device::trg2)); generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); keyboard.set_keyboard_callback(FUNC(llc1_state::kbd_put)); @@ -367,8 +347,8 @@ ROM_START( llc1 ) ROM_LOAD( "llc1_tb1.bin", 0x0800, 0x0400, CRC(0d9d4039) SHA1(b515e385af57f4faf3a9f7b4a1edd59a1c1ea260) ) ROM_LOAD( "llc1_tb2.bin", 0x0c00, 0x0400, CRC(28bfea2a) SHA1(a68a8b87bfc931627ddd8d124b153e511477fbaf) ) ROM_LOAD( "llc1_tb3.bin", 0x1000, 0x0400, CRC(fe5e3132) SHA1(cc3b191e41f5772a4b86b8eb0ebe6fce67872df6) ) - ROM_FILL(0x23b, 1, 0x00) // don't reboot when typing into the monitor - ROM_FILL(0x2dc, 1, 0x0f) // fix display of AF in the reg command + ROM_FILL(0x02dc, 1, 0x0f) // fix display of AF in the reg command (confirmed from monitor listing) + ROM_FILL(0x1361, 1, 0x40) // fix scrolling in Basic ROM_REGION( 0x0400, "chargen", 0 ) ROM_LOAD ("llc1_zg.bin", 0x0000, 0x0400, CRC(fa2cd659) SHA1(1fa5f9992f35929f656c4ce55ed6980c5da1772b) ) @@ -378,4 +358,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP( 1984, llc1, 0, 0, llc1, llc1, llc1_state, empty_init, "SCCH", "LLC-1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) +COMP( 1984, llc1, 0, 0, llc1, llc1, llc1_state, empty_init, "SCCH", "LLC-1", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3 From 7efa311356b95ca1a98d5612a00dd968e7b366e1 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 10 Jul 2020 19:10:05 +0200 Subject: Revert "ui: fix initial message popups not showing on d3d/bgfx" This reverts commit 3db9e11031c1eed826eacd12f6827d80f06413b8. --- src/frontend/mame/mame.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/frontend/mame/mame.cpp b/src/frontend/mame/mame.cpp index 73edfe4744c..88ccc4e1b80 100644 --- a/src/frontend/mame/mame.cpp +++ b/src/frontend/mame/mame.cpp @@ -311,7 +311,6 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine) machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&mame_machine_manager::reset, this)); m_ui->set_startup_text("Initializing...", true); - machine.video().frame_update(); // force another video update, some video backends need it return m_ui.get(); } -- cgit v1.2.3 From 8d9fde525da9d3972b8728fadcec2b05287b4d36 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 10 Jul 2020 18:41:42 +0200 Subject: netlist: pfunction supports unary minus and removed duplicate code. --- src/lib/netlist/plib/pfunction.cpp | 152 ++++++++++++++++++------------------- src/lib/netlist/plib/pfunction.h | 66 +++++++++------- 2 files changed, 115 insertions(+), 103 deletions(-) diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp index 7113ab7bd4e..c8049315276 100644 --- a/src/lib/netlist/plib/pfunction.cpp +++ b/src/lib/netlist/plib/pfunction.cpp @@ -14,11 +14,50 @@ #include #include #include +#include namespace plib { static constexpr const std::size_t MAX_STACK = 32; + struct pcmd_t + { + rpn_cmd cmd; + int adj; + int prio; + }; + + static const std::map &pcmds() + { + static const std::map lpcmds = + { + { "^", { POW, 1, 30 } }, + { "neg", { NEG, 0, 25 } }, + { "+", { ADD, 1, 10 } }, + { "-", { SUB, 1, 10 } }, + { "*", { MULT, 1, 20 } }, + { "/", { DIV, 1, 20 } }, + { "<", { LT, 1, 9 } }, + { ">", { GT, 1, 9 } }, + { "<=", { LE, 1, 9 } }, + { ">=", { GE, 1, 9 } }, + { "==", { EQ, 1, 8 } }, + { "!=", { NE, 1, 8 } }, + { "if", { IF, 2, 0 } }, + { "pow", { POW, 1, 0 } }, + { "log", { LOG, 0, 0 } }, + { "sin", { SIN, 0, 0 } }, + { "cos", { COS, 0, 0 } }, + { "max", { MAX, 1, 0 } }, + { "min", { MIN, 1, 0 } }, + { "trunc", { TRUNC, 0, 0 } }, + { "rand", { RAND, -1, 0 } }, + + { "(", { LP, 0, 1 } }, + { ")", { RP, 0, 1 } }, + }; + return lpcmds; + } // FIXME: Exa parsing conflicts with e,E parsing template static const std::map &units_si() @@ -76,46 +115,12 @@ namespace plib { for (const pstring &cmd : cmds) { rpn_inst rc; - if (cmd == "+") - { rc.m_cmd = ADD; stk -= 1; } - else if (cmd == "-") - { rc.m_cmd = SUB; stk -= 1; } - else if (cmd == "*") - { rc.m_cmd = MULT; stk -= 1; } - else if (cmd == "/") - { rc.m_cmd = DIV; stk -= 1; } - else if (cmd == "==") - { rc.m_cmd = EQ; stk -= 1; } - else if (cmd == "!=") - { rc.m_cmd = NE; stk -= 1; } - else if (cmd == "<") - { rc.m_cmd = LT; stk -= 1; } - else if (cmd == ">") - { rc.m_cmd = GT; stk -= 1; } - else if (cmd == "<=") - { rc.m_cmd = LE; stk -= 1; } - else if (cmd == ">=") - { rc.m_cmd = GE; stk -= 1; } - else if (cmd == "if") - { rc.m_cmd = IF; stk -= 2; } - else if (cmd == "neg") - { rc.m_cmd = NEG; stk -= 0; } - else if (cmd == "pow" || cmd == "^") - { rc.m_cmd = POW; stk -= 1; } - else if (cmd == "log") - { rc.m_cmd = LOG; stk -= 0; } - else if (cmd == "sin") - { rc.m_cmd = SIN; stk -= 0; } - else if (cmd == "cos") - { rc.m_cmd = COS; stk -= 0; } - else if (cmd == "max") - { rc.m_cmd = MAX; stk -= 1; } - else if (cmd == "min") - { rc.m_cmd = MIN; stk -= 1; } - else if (cmd == "trunc") - { rc.m_cmd = TRUNC; stk -= 0; } - else if (cmd == "rand") - { rc.m_cmd = RAND; stk += 1; } + auto p = pcmds().find(cmd); + if (p != pcmds().end()) + { + rc.m_cmd = p->second.cmd; + stk -= p->second.adj; + } else { for (std::size_t i = 0; i < inputs.size(); i++) @@ -123,22 +128,22 @@ namespace plib { if (inputs[i] == cmd) { rc.m_cmd = PUSH_INPUT; - rc.m_param = narrow_cast(i); + rc.m_param.index = i; stk += 1; break; } } if (rc.m_cmd != PUSH_INPUT) { - using fl_t = decltype(rc.m_param); + using fl_t = decltype(rc.m_param.val); rc.m_cmd = PUSH_CONST; bool err(false); auto rs(plib::right(cmd,1)); auto r=units_si().find(rs); if (r == units_si().end()) - rc.m_param = plib::pstonum_ne(cmd, err); + rc.m_param.val = plib::pstonum_ne(cmd, err); else - rc.m_param = plib::pstonum_ne(plib::left(cmd, cmd.size()-1), err) * r->second; + rc.m_param.val = plib::pstonum_ne(plib::left(cmd, cmd.size()-1), err) * r->second; if (err) throw pexception(plib::pfmt("pfunction: unknown/misformatted token <{1}> in <{2}>")(cmd)(expr)); stk += 1; @@ -151,7 +156,7 @@ namespace plib { m_precompiled.push_back(rc); } if (stk != 1) - throw pexception(plib::pfmt("pfunction: stack count {1] different to one on <{2}>")(stk, expr)); + throw pexception(plib::pfmt("pfunction: stack count {1} different to one on <{2}>")(stk, expr)); } static bool is_number(const pstring &n) @@ -172,23 +177,11 @@ namespace plib { static int get_prio(const pstring &v) { - if (v == "neg") - return 25; + auto p = pcmds().find(v); + if (p != pcmds().end()) + return p->second.prio; if (plib::left(v, 1) >= "a" && plib::left(v, 1) <= "z") return 0; - if (v == "(" || v == ")") - return 1; - if (v == "==" || v == "!=") - return 8; - if (v == "<" || v == ">" || v == "<=" || v == ">=") - return 9; - if (v == "+" || v == "-") - return 10; - if (v == "*" || v == "/") - return 20; - if (v == "^") - return 30; - return -1; } @@ -252,7 +245,7 @@ namespace plib { { if (i==0 || !(is_number(sexpr1[i-1]) || sexpr1[i-1] == ")" || is_id(sexpr1[i-1]))) { - sexpr.push_back("neg"); + sexpr.emplace_back("neg"); sexpr.push_back(sexpr1[i+1]); i+=2; } @@ -290,19 +283,19 @@ namespace plib { opstk.push(x); } else { - int p = get_prio(s); - if (p>0) + int prio = get_prio(s); + if (prio>0) { if (opstk.empty()) opstk.push(s); else { - if (get_prio(opstk.top()) >= get_prio(s)) + if (get_prio(opstk.top()) >= prio) postfix.push_back(pop_check(opstk, expr)); opstk.push(s); } } - else if (p == 0) // Function or variable + else if (prio == 0) // Function or variable { if ((i+1(lfsr) / narrow_cast(0xffffU); // NOLINT } - +#if 0 + // Currently unused since no integral type pfunction defined template static inline std::enable_if_t::value, NT> lfsr_random(std::uint16_t &lfsr) noexcept @@ -344,7 +338,7 @@ namespace plib { lfsr ^= 0xB400U; // NOLINT: taps 15, 13, 12, 10 return narrow_cast(lfsr); } - +#endif #define ST0 stack[ptr+1] #define ST1 stack[ptr] #define ST2 stack[ptr-1] @@ -360,6 +354,8 @@ namespace plib { { std::array stack = { plib::constants::zero() }; unsigned ptr = 0; + constexpr auto zero = plib::constants::zero(); + constexpr auto one = plib::constants::one(); stack[0] = plib::constants::zero(); for (auto &rc : m_precompiled) { @@ -369,13 +365,13 @@ namespace plib { OP(MULT, 1, ST2 * ST1) OP(SUB, 1, ST2 - ST1) OP(DIV, 1, ST2 / ST1) - OP(EQ, 1, ST2 == ST1 ? 1.0 : 0.0) - OP(NE, 1, ST2 != ST1 ? 1.0 : 0.0) - OP(GT, 1, ST2 > ST1 ? 1.0 : 0.0) - OP(LT, 1, ST2 < ST1 ? 1.0 : 0.0) - OP(LE, 1, ST2 <= ST1 ? 1.0 : 0.0) - OP(GE, 1, ST2 >= ST1 ? 1.0 : 0.0) - OP(IF, 2, (ST2 != 0.0) ? ST1 : ST0) + OP(EQ, 1, ST2 == ST1 ? one : zero) + OP(NE, 1, ST2 != ST1 ? one : zero) + OP(GT, 1, ST2 > ST1 ? one : zero) + OP(LT, 1, ST2 < ST1 ? one : zero) + OP(LE, 1, ST2 <= ST1 ? one : zero) + OP(GE, 1, ST2 >= ST1 ? one : zero) + OP(IF, 2, (ST2 != zero) ? ST1 : ST0) OP(NEG, 0, -ST2) OP(POW, 1, plib::pow(ST2, ST1)) OP(LOG, 0, plib::log(ST2)) @@ -388,10 +384,14 @@ namespace plib { stack[ptr++] = lfsr_random(m_lfsr); break; case PUSH_INPUT: - stack[ptr++] = values[narrow_cast(rc.m_param)]; + stack[ptr++] = values[rc.m_param.index]; break; case PUSH_CONST: - stack[ptr++] = rc.m_param; + stack[ptr++] = rc.m_param.val; + break; + // please compiler + case LP: + case RP: break; } } diff --git a/src/lib/netlist/plib/pfunction.h b/src/lib/netlist/plib/pfunction.h index 7f754d3cfad..be6d6e64f9e 100644 --- a/src/lib/netlist/plib/pfunction.h +++ b/src/lib/netlist/plib/pfunction.h @@ -19,6 +19,36 @@ namespace plib { // function evaluation //============================================================ + enum rpn_cmd + { + ADD, + MULT, + SUB, + DIV, + EQ, + NE, + LT, + GT, + LE, + GE, + IF, + NEG, // unary minus + POW, + LOG, + SIN, + COS, + MIN, + MAX, + RAND, /// random number between 0 and 1 + TRUNC, + + PUSH_CONST, + PUSH_INPUT, + + LP, // Left parenthesis - for infix parsing + RP // right parenthesis - for infix parsing + }; + /// \brief Class providing support for evaluating expressions /// /// \tparam NT Number type, should be float or double @@ -26,36 +56,18 @@ namespace plib { template class pfunction { - enum rpn_cmd - { - ADD, - MULT, - SUB, - DIV, - EQ, - NE, - LT, - GT, - LE, - GE, - IF, - NEG, // unary minus - POW, - LOG, - SIN, - COS, - MIN, - MAX, - RAND, /// random number between 0 and 1 - TRUNC, - PUSH_CONST, - PUSH_INPUT - }; struct rpn_inst { - rpn_inst() : m_cmd(ADD), m_param(plib::constants::zero()) { } + rpn_inst() : m_cmd(ADD) + { + m_param.val = plib::constants::zero(); + } rpn_cmd m_cmd; - NT m_param; + union + { + NT val; + std::size_t index; + } m_param; }; public: -- cgit v1.2.3 From 03900b67dec22fc8fdced2a7598d5f345a23616c Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 10 Jul 2020 18:42:11 +0200 Subject: netlist: remove some warning suppression from makefile. --- src/lib/netlist/build/makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 3591c5317b2..803095f0b05 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -302,24 +302,24 @@ clang: -mllvm -inline-threshold=2000 \ -Wunknown-warning-option \ -Weverything -Wall -pedantic -Wpedantic -Wunused-private-field \ - -Werror -Wno-padded -Wno-weak-vtables -Wno-weak-template-vtables -Wno-unused-template \ + -Werror -Wno-padded -Wno-weak-vtables -Wno-weak-template-vtables -Wunused-template \ -Wmissing-variable-declarations -Wno-float-equal -Wconversion \ - -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-nonliteral \ + -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wformat-nonliteral \ -Wno-exit-time-destructors -Winconsistent-missing-destructor-override \ - -Wno-return-std-move-in-c++11 -Wno-unreachable-code" + -Wno-return-std-move-in-c++11 -Wunreachable-code" clang-libc: #clang-11 currently broken - #$(MAKE) CC=clang++-11 LD=clang++-11 OBJ=obj/clang CEXTRAFLAGS="-march=native -msse4.2 -Weverything -Wall -pedantic -Wpedantic -Wunused-private-field -Wno-padded -Wno-unused-template -Wno-missing-variable-declarations -Wno-float-equal -Wconversion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-nonliteral -Wno-exit-time-destructors" + #$(MAKE) CC=clang++-11 LD=clang++-11 OBJ=obj/clang CEXTRAFLAGS="-march=native $(MAKE) CC=clang++-10 LD=clang++-10 OBJ=obj/clang-libc CEXTRAFLAGS="-march=native \ -stdlib=libc++ -mllvm -inline-threshold=2000 \ -Wunknown-warning-option \ -Weverything -Wall -pedantic -Wpedantic -Wunused-private-field \ - -Werror -Wno-padded -Wno-weak-vtables -Wno-weak-template-vtables -Wno-unused-template \ + -Werror -Wno-padded -Wno-weak-vtables -Wno-weak-template-vtables -Wunused-template \ -Wmissing-variable-declarations -Wno-float-equal -Wconversion \ - -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-nonliteral \ + -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wformat-nonliteral \ -Wno-exit-time-destructors -Winconsistent-missing-destructor-override \ - -Wno-return-std-move-in-c++11 -Wno-unreachable-code" + -Wno-return-std-move-in-c++11 -Wunreachable-code" \ LDEXTRAFLAGS=-stdlib=libc++ clang-5: -- cgit v1.2.3 From 4a3bc13554799b4cb3bdb6b2b6e8e61266c28e14 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 10 Jul 2020 18:42:32 +0200 Subject: netlist: fix signedness warnings in ptime.h --- src/lib/netlist/plib/ptime.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/netlist/plib/ptime.h b/src/lib/netlist/plib/ptime.h index 9bbd1e35671..0f88449500b 100644 --- a/src/lib/netlist/plib/ptime.h +++ b/src/lib/netlist/plib/ptime.h @@ -207,10 +207,10 @@ namespace plib static constexpr ptime never() noexcept { return ptime(plib::numeric_limits::max(), RES); } static constexpr internal_type resolution() noexcept { return RES; } - constexpr internal_type in_nsec() const noexcept { return m_time / (RES / UINT64_C(1000000000)); } - constexpr internal_type in_usec() const noexcept { return m_time / (RES / UINT64_C( 1000000)); } - constexpr internal_type in_msec() const noexcept { return m_time / (RES / UINT64_C( 1000)); } - constexpr internal_type in_sec() const noexcept { return m_time / (RES / UINT64_C( 1)); } + constexpr internal_type in_nsec() const noexcept { return m_time / (RES / INT64_C(1000000000)); } + constexpr internal_type in_usec() const noexcept { return m_time / (RES / INT64_C( 1000000)); } + constexpr internal_type in_msec() const noexcept { return m_time / (RES / INT64_C( 1000)); } + constexpr internal_type in_sec() const noexcept { return m_time / (RES / INT64_C( 1)); } private: template -- cgit v1.2.3 From d3422e1c944e4f17ee19af61efc465933293cfab Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 10 Jul 2020 18:42:52 +0200 Subject: netlist: unit test macros now have a "P" prefix. * will allow to use both googletest and Catch frameworks. * on unexpected std::exception include what() in error message. --- src/lib/netlist/plib/ptests.h | 50 ++++++++++++++++++++++---------- src/lib/netlist/prg/nltool.cpp | 4 +-- src/lib/netlist/tests/test_pfunction.cpp | 25 ++++++++-------- 3 files changed, 50 insertions(+), 29 deletions(-) diff --git a/src/lib/netlist/plib/ptests.h b/src/lib/netlist/plib/ptests.h index 1f4bbd5e866..7369e74a20d 100644 --- a/src/lib/netlist/plib/ptests.h +++ b/src/lib/netlist/plib/ptests.h @@ -14,20 +14,27 @@ #include #include #include +#include -#define EXPECT_EQ(exp1, exp2) PINT_EXPECT(eq, exp1, exp2) -#define EXPECT_NE(exp1, exp2) PINT_EXPECT(ne, exp1, exp2) -#define EXPECT_GT(exp1, exp2) PINT_EXPECT(gt, exp1, exp2) -#define EXPECT_LT(exp1, exp2) PINT_EXPECT(lt, exp1, exp2) -#define EXPECT_GE(exp1, exp2) PINT_EXPECT(ge, exp1, exp2) -#define EXPECT_LE(exp1, exp2) PINT_EXPECT(le, exp1, exp2) +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wglobal-constructors" +#endif -#define EXPECT_TRUE(exp1) PINT_EXPECT(eq, exp1, true) -#define EXPECT_FALSE(exp1) PINT_EXPECT(eq, exp1, false) +#define PEXPECT_EQ(exp1, exp2) PINT_EXPECT(eq, exp1, exp2) +#define PEXPECT_NE(exp1, exp2) PINT_EXPECT(ne, exp1, exp2) +#define PEXPECT_GT(exp1, exp2) PINT_EXPECT(gt, exp1, exp2) +#define PEXPECT_LT(exp1, exp2) PINT_EXPECT(lt, exp1, exp2) +#define PEXPECT_GE(exp1, exp2) PINT_EXPECT(ge, exp1, exp2) +#define PEXPECT_LE(exp1, exp2) PINT_EXPECT(le, exp1, exp2) -#define TEST(name, desc) PINT_TEST(name, desc) -#define TEST_F(name, desc) PINT_TEST_F(name, desc, name) -#define RUN_ALL_TESTS() plib::testing::run_all_tests() +#define PEXPECT_TRUE(exp1) PINT_EXPECT(eq, exp1, true) +#define PEXPECT_FALSE(exp1) PINT_EXPECT(eq, exp1, false) + +#define PEXPECT_THROW(exp, excep) PINT_EXPECT_THROW(exp, excep) + +#define PTEST(name, desc) PINT_TEST(name, desc) +#define PTEST_F(name, desc) PINT_TEST_F(name, desc, name) +#define PRUN_ALL_TESTS() plib::testing::run_all_tests() #define PINT_TEST(name, desc) PINT_TEST_F(name, desc, plib::testing::Test) @@ -37,12 +44,22 @@ void desc (); \ void run() override { desc (); } \ }; \ - plib::testing::reg_entry name ## _ ## desc ## _reg(#name, #desc); \ + extern const plib::testing::reg_entry name ## _ ## desc ## _reg; \ + const plib::testing::reg_entry name ## _ ## desc ## _reg(#name, #desc); \ void name ## _ ## desc :: desc () #define PINT_EXPECT(comp, exp1, exp2) \ if (!plib::testing::internal_assert(plib::testing::comp_ ## comp (), # exp1, # exp2, exp1, exp2)) \ - std::cout << __FILE__ << ":" << __LINE__ << ":1: error: test failed\n"; + std::cout << __FILE__ << ":" << __LINE__ << ":1: error: test failed\n" + +#define PINT_EXPECT_THROW(exp, excep) \ + if (const char *ptest_f = __FILE__) \ + { \ + try { exp; std::cout << ptest_f << ":" << __LINE__ << ":1: error: no " #excep " exception thrown\n";} \ + catch (excep &) { std::cout << "\tOK: got " #excep " for " # exp "\n";} \ + catch (std::exception &ptest_e) { std::cout << ptest_f << ":" << __LINE__ << ":1: error: unexpected exception thrown: " << ptest_e.what() << "\n"; } \ + catch (...) { std::cout << ptest_f << ":" << __LINE__ << ":1: error: unexpected exception thrown\n"; } \ + } else do {} while (0) namespace plib { @@ -67,7 +84,7 @@ namespace testing registry().push_back(this); } virtual ~reg_entry_base() = default; - virtual Test *create() { return nullptr; } + virtual Test *create() const { return nullptr; } std::string name; std::string desc; @@ -84,7 +101,7 @@ namespace testing { using reg_entry_base::reg_entry_base; - virtual Test *create() override { return new T(); } + virtual Test *create() const override { return new T(); } }; template @@ -104,6 +121,9 @@ namespace testing static inline int run_all_tests() { + std::cout << "======================================\n"; + std::cout << "Running " << reg_entry_base::registry().size() << " tests\n"; + std::cout << "======================================\n"; for (auto &e : reg_entry_base::registry()) { std::cout << e->name << "::" << e->desc << ":\n"; diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index a4946c00d3e..7b18b00d77d 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -439,7 +439,7 @@ void tool_app_t::run_with_progress(netlist_tool_t &nt, netlist::netlist_time_ext else { nt.exec().process_queue(next_sec - now); - pout("progress {1:4}s : {2}\r", elapsed_sec, pstring(elapsed_sec, '*')); + pout("progress {1:4}s : {2}\r", elapsed_sec, pstring(gsl::narrow_cast(elapsed_sec), '*')); pout.flush(); } now = nt.exec().time(); @@ -1276,7 +1276,7 @@ int tool_app_t::execute() convert(); else if (cmd == "tests") { - return RUN_ALL_TESTS(); + return PRUN_ALL_TESTS(); } else { diff --git a/src/lib/netlist/tests/test_pfunction.cpp b/src/lib/netlist/tests/test_pfunction.cpp index c82617659ec..cb0cad8e188 100644 --- a/src/lib/netlist/tests/test_pfunction.cpp +++ b/src/lib/netlist/tests/test_pfunction.cpp @@ -10,11 +10,12 @@ #include "plib/ptests.h" #include "plib/pfunction.h" +#include "plib/pexception.h" #define PFUNCEXPECT(formula, val) \ - EXPECT_EQ(val, plib::pfunction(formula)()) + PEXPECT_EQ(val, plib::pfunction(formula)()) -TEST(pfunction, operators) +PTEST(pfunction, operators) { PFUNCEXPECT("1==1", 1.0); PFUNCEXPECT("1 *0 == 2-1-1", 1.0); @@ -25,30 +26,30 @@ TEST(pfunction, operators) PFUNCEXPECT("1>=0", 1.0); PFUNCEXPECT("1<=1", 1.0); PFUNCEXPECT("1>=1", 1.0); - EXPECT_EQ(1.0, plib::pfunction("0!=a", {"a"})({1.0})); + PEXPECT_EQ(1.0, plib::pfunction("0!=a", {"a"})({1.0})); } -TEST(pfunction, func_if) +PTEST(pfunction, func_if) { PFUNCEXPECT("if(1>0, 2, 0)", 2.0); PFUNCEXPECT("if(0>1, 2, 3)", 3.0); PFUNCEXPECT("if(sin(1)>0, 2, 3)", 3.0); // fail - EXPECT_EQ( 1.0, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,-1.0,3.0})); - EXPECT_EQ(-0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,1.0,1.0})); - EXPECT_EQ( 0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({3.0,1.0,1.0})); - //EXPECT(plib::pfunction("if(A2>2.5, A1, if(A0>2.5,1,(0-1)))", {"A0","A1","A2"})({1.0,1.0,1.0}), -1.0) - //PFUNCEXPECT("-1>-2", 1.0) - EXPECT_TRUE(1.0 == plib::pfunction("0!=a", {"a"})({1.0})); + PEXPECT_EQ( 1.0, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,-1.0,3.0})); + PEXPECT_EQ(-0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({1.0,1.0,1.0})); + PEXPECT_EQ( 0.065, plib::pfunction("if(A2>2.5, 0-A1, (0.07-(0.005*A1))*if(A0>2.5,1,0-1))", {"A0","A1","A2"})({3.0,1.0,1.0})); + PEXPECT_TRUE(1.0 == plib::pfunction("0!=a", {"a"})({1.0})); } -TEST(pfunction, unary_minus) +PTEST(pfunction, unary_minus) { PFUNCEXPECT("-1>-2", 1.0); PFUNCEXPECT("(-3)*(-4)", 12.0); PFUNCEXPECT("(-3)*-4", 12.0); PFUNCEXPECT("-3*-4", 12.0); - EXPECT_EQ( -3.0, plib::pfunction("-A0", {"A0"})({3.0})); + PEXPECT_EQ( -3.0, plib::pfunction("-A0", {"A0"})({3.0})); PFUNCEXPECT("3*-trunc(3.2)", -9.0); PFUNCEXPECT("3*-(3*2)", -18.0); PFUNCEXPECT("3*-(2*1)^2", -12.0); + PEXPECT_THROW(plib::pfunction("(3, 4)")(), plib::pexception); + PEXPECT_THROW(plib::pfunction("(3)")(), plib::pexception); // fail } -- cgit v1.2.3 From 5eef12fe18ec426ebdb7df1b4e4d3afe7634ca11 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 10 Jul 2020 18:43:12 +0200 Subject: netlist: add 74121 device and refactor 74123 code. * added 74121 device * migrate dip devices to netlist devices * refactor code to be based on device description structs --- src/lib/netlist/buildVS/nltool.vcxproj | 1 + src/lib/netlist/buildVS/nltool.vcxproj.filters | 3 + src/lib/netlist/devices/net_lib.cpp | 6 +- src/lib/netlist/devices/nld_74123.cpp | 262 +++++++++++-------------- src/lib/netlist/devices/nld_74123.h | 20 +- src/lib/netlist/macro/nlm_cd4xxx.cpp | 57 ++++++ src/lib/netlist/macro/nlm_cd4xxx.h | 3 + src/lib/netlist/macro/nlm_ttl74xx.cpp | 222 ++++++++++++++++++--- src/lib/netlist/macro/nlm_ttl74xx.h | 9 + src/lib/netlist/nl_base.h | 9 +- src/lib/netlist/prg/nltool.cpp | 2 +- 11 files changed, 394 insertions(+), 200 deletions(-) diff --git a/src/lib/netlist/buildVS/nltool.vcxproj b/src/lib/netlist/buildVS/nltool.vcxproj index 0cb27e86599..7c6982e680d 100755 --- a/src/lib/netlist/buildVS/nltool.vcxproj +++ b/src/lib/netlist/buildVS/nltool.vcxproj @@ -149,6 +149,7 @@ $(SolutionDir)..\;$(SolutionDir)..\..\;%(AdditionalIncludeDirectories) /bigobj + diff --git a/src/lib/netlist/buildVS/nltool.vcxproj.filters b/src/lib/netlist/buildVS/nltool.vcxproj.filters index 2a9c313c0d0..b7ef3607716 100755 --- a/src/lib/netlist/buildVS/nltool.vcxproj.filters +++ b/src/lib/netlist/buildVS/nltool.vcxproj.filters @@ -18,5 +18,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 5e9cd5607e2..02d888a1f3f 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -106,8 +106,8 @@ namespace devices LIB_ENTRY(74107_dip) #endif LIB_ENTRY(74107A) // FIXME: implement missing DIP + LIB_ENTRY(74121) LIB_ENTRY(74123) - LIB_ENTRY(74123_dip) LIB_ENTRY(74125) LIB_ENTRY(74126) LIB_ENTRY(74153) @@ -152,7 +152,7 @@ namespace devices LIB_ENTRY(CD4020) LIB_ENTRY(CD4066_GATE) LIB_ENTRY(CD4316_GATE) - LIB_ENTRY(4538_dip) + LIB_ENTRY(4538) LIB_ENTRY(schmitt_trigger) // entries with suffix WI are legacy only //ENTRY(4066, CD_4066, "+A,B") @@ -173,7 +173,7 @@ namespace devices LIB_ENTRY(74365_dip) LIB_ENTRY(82S16_dip) LIB_ENTRY(82S115_dip) - LIB_ENTRY(9602_dip) + LIB_ENTRY(9602) LIB_ENTRY(9310_dip) LIB_ENTRY(9314_dip) LIB_ENTRY(9316_dip) diff --git a/src/lib/netlist/devices/nld_74123.cpp b/src/lib/netlist/devices/nld_74123.cpp index e3b73c86d86..5ddd29a60db 100644 --- a/src/lib/netlist/devices/nld_74123.cpp +++ b/src/lib/netlist/devices/nld_74123.cpp @@ -12,27 +12,71 @@ namespace netlist { namespace devices { - template + + /// \brief Base monostable device + /// + /// The basic operation is the following: + /// + /// After a trigger signal has been detected, the output changes to high. + /// The capacitor is quickly discharged until it reaches Vlow. + /// The device toggles into charging mode until Vhigh is reached. At this + /// point, the output is set to low. Charging continues until VCC - or + /// more specific VRC is reached. + /// + /// Using + /// + /// - Vlow = alpha * VCC + /// - Vhigh = (1-alpha) * VCC + /// - Ignoring Rext during discharge + /// + /// we have calculate the following time constants: + /// + /// - tD = - X*C * ln(alpha) + /// - tC = - R*C * ln(alhpa) + /// - tL = - R*C * ln(1.0 - alpha) + /// + /// where tD denotes the time to discharge from VCC to Vlow, tC denotes + /// the time to charge from 0.0 to Vhigh and tL denotes the time to charge + /// from 0 to Vlow. X denotes the internal resistance used to discharge the + /// capacitor. The total impulse duration is thus + /// + /// tP = tD + tC - tL + /// + /// Using K = ln(1 - alpha) - ln (alpha) = ln(1/alpha - 1) + /// + /// we get + /// + /// tP = R*C*K * (1 + X/R * ln(alpha) / K) + /// + /// and alpha = 1 / (1 + exp(K)) + /// + /// Datasheets express the right term usually as + /// + /// (1 + f * 1000 / R) = (1 + X/R * ln(alpha) / K) + /// + /// and thus + /// + /// X = f * 1000 * K / ln(alpha) + /// + /// FIXME: Currently X is given directly (as RI). It would be better to use + /// f (usually 0.7) and K to calculate X. + /// + template NETLIB_OBJECT(74123_base) { - static_assert((DEVTYPE == 9602) || (DEVTYPE == 4538) || (DEVTYPE == 74123), "wrong device type"); - NETLIB_CONSTRUCTOR(74123_base) , m_RP(*this, "RP") , m_RN(*this, "RN") , m_RP_Q(*this, "_RP_Q") , m_RN_Q(*this, "_RN_Q") - , m_A(*this, "A") - , m_B(*this, "B") - , m_CLRQ(*this, "CLRQ") + , m_I(*this, D::names(), NETLIB_DELEGATE(ab_clear)) , m_Q(*this, "Q") , m_QQ(*this, "QQ") , m_CV(*this, "_CV") // internal , m_last_trig(*this, "m_last_trig", 0) , m_state(*this, "m_state", 0) - , m_KP(*this, "m_KP", 0) - , m_K(*this, "K", (DEVTYPE == 4538) ? nlconst::one() : nlconst::magic(0.4)) // CD4538 datasheet states PW=RC - , m_RI(*this, "RI", nlconst::magic(400.0)) // around 250 for HC series, 400 on LS/TTL, estimated from datasheets + , m_KP(plib::reciprocal(nlconst::one() + plib::exp(D::K()))) + //, m_power_pins(*this) { register_subalias("GND", m_RN.N()); @@ -46,60 +90,45 @@ namespace netlist connect(m_RN.P(), m_RP.N()); connect(m_CV, m_RN.P()); - m_RP.m_RON.set(m_RI()); - m_RN.m_RON.set(m_RI()); + m_RP.m_RON.set(D::RI()); + m_RN.m_RON.set(D::RI()); } - NETLIB_UPDATEI() + NETLIB_HANDLERI(ab_clear) { netlist_sig_t m_trig(0); - netlist_sig_t res = !m_CLRQ(); - netlist_time t_AB_to_Q = NLTIME_FROM_NS(10); - netlist_time t_C_to_Q = NLTIME_FROM_NS(10); - if (DEVTYPE == 74123) - { - m_trig = (m_A() ^ 1) & m_B() & m_CLRQ(); - } - else if (DEVTYPE == 9602) - { - m_trig = (m_A() ^ 1) | m_B(); - } - else // 4538 - { - m_trig = (m_B() ^ 1) | m_A(); - // The line below is from the datasheet truthtable ... doesn't make sense at all - //res = res | m_A) | (m_B) ^ 1); - t_AB_to_Q = NLTIME_FROM_NS(300); - t_C_to_Q = NLTIME_FROM_NS(250); - } + m_trig = D::trigfunc(m_I); - if (res) + if (!D::clear(m_I)) { - m_Q.push(0, t_C_to_Q); - m_QQ.push(1, t_C_to_Q); + m_Q.push(0, D::t_C_to_Q::value()); + m_QQ.push(1, D::t_C_to_Q::value()); /* quick charge until trigger */ /* FIXME: SGS datasheet shows quick charge to 5V, * though schematics indicate quick charge to Vhigh only. */ - m_RP_Q.push(1, t_C_to_Q); // R_ON - m_RN_Q.push(0, t_C_to_Q); // R_OFF + m_RP_Q.push(1, D::t_C_to_Q::value()); // R_ON + m_RN_Q.push(0, D::t_C_to_Q::value()); // R_OFF m_state = 2; //charging (quick) } else if (!m_last_trig && m_trig) { // FIXME: Timing! - m_Q.push(1, t_AB_to_Q); - m_QQ.push(0,t_AB_to_Q); + m_Q.push(1, D::t_AB_to_Q::value()); + m_QQ.push(0, D::t_AB_to_Q::value()); - m_RN_Q.push(1, t_AB_to_Q); // R_ON - m_RP_Q.push(0, t_AB_to_Q); // R_OFF + m_RN_Q.push(1, D::t_AB_to_Q::value()); // R_ON + m_RP_Q.push(0, D::t_AB_to_Q::value()); // R_OFF m_state = 1; // discharging } m_last_trig = m_trig; + } + NETLIB_UPDATEI() + { if (m_state == 1) { const nl_fptype vLow = m_KP * m_RP.P()(); @@ -111,7 +140,7 @@ namespace netlist } if (m_state == 2) { - const nl_fptype vHigh = m_RP.P()() * (nlconst::one() - m_KP); + const nl_fptype vHigh = (nlconst::one() - m_KP) * m_RP.P()(); if (m_CV() > vHigh) { m_RP_Q.push(0, NLTIME_FROM_NS(10)); // R_OFF @@ -125,8 +154,6 @@ namespace netlist NETLIB_RESETI() { - m_KP = plib::reciprocal(nlconst::one() + plib::exp(m_K())); - m_RP.reset(); m_RN.reset(); @@ -138,16 +165,13 @@ namespace netlist } private: - public: NETLIB_SUB(sys_dsw1) m_RP; NETLIB_SUB(sys_dsw1) m_RN; logic_output_t m_RP_Q; logic_output_t m_RN_Q; - logic_input_t m_A; - logic_input_t m_B; - logic_input_t m_CLRQ; + object_array_t m_I; logic_output_t m_Q; logic_output_t m_QQ; @@ -155,130 +179,70 @@ namespace netlist state_var m_last_trig; state_var m_state; - state_var m_KP; - - param_fp_t m_K; - param_fp_t m_RI; + nl_fptype m_KP; + //nld_power_pins m_power_pins; // not needed, device exposes VCC and GND }; - NETLIB_OBJECT(74123_dip) + struct desc_74123 : public desc_base { - NETLIB_CONSTRUCTOR(74123_dip) - , m_A(*this, "A") - , m_B(*this, "B") + using t_AB_to_Q = time_ns<10>; + using t_C_to_Q = time_ns<10>; + static constexpr nl_fptype K() { return nlconst::magic(0.4); } + static constexpr nl_fptype RI() { return nlconst::magic(400.0); } + + static constexpr std::array names() { return {"CLRQ", "A", "B"};} + template + static netlist_sig_t trigfunc(const T &in) { - register_subalias("1", m_A.m_A); - register_subalias("2", m_A.m_B); - register_subalias("3", m_A.m_CLRQ); - register_subalias("4", m_A.m_QQ); - register_subalias("5", m_B.m_Q); - register_subalias("6", m_B.m_RN.N()); - register_subalias("7", m_B.m_RN.P()); - register_subalias("8", m_A.m_RN.N()); - connect(m_A.m_RN.N(), m_B.m_RN.N()); - - register_subalias("9", m_B.m_A); - register_subalias("10", m_B.m_B); - register_subalias("11", m_B.m_CLRQ); - register_subalias("12", m_B.m_QQ); - register_subalias("13", m_A.m_Q); - register_subalias("14", m_A.m_RN.N()); - register_subalias("15", m_A.m_RN.P()); - register_subalias("16", m_A.m_RP.P()); - connect(m_A.m_RP.P(), m_B.m_RP.P()); + return ((in[1]() | (in[2]() ^ 1)) ^ 1) & in[0](); // ((m_A() | (m_B() ^ 1)) ^ 1) & m_CLRQ() } - NETLIB_RESETI() {} - NETLIB_UPDATEI() {} - private: - NETLIB_SUB(74123_base)<74123> m_A; - NETLIB_SUB(74123_base)<74123> m_B; + template static constexpr netlist_sig_t clear(const T &in) { return in[0]();} }; - NETLIB_OBJECT(9602_dip) + struct desc_74121 : public desc_74123 { - NETLIB_CONSTRUCTOR(9602_dip) - , m_A(*this, "A") - , m_B(*this, "B") + static constexpr nl_fptype K() { return nlconst::magic(0.7); } + + static constexpr std::array names() { return {"A1", "A2", "B"};} + template + static netlist_sig_t trigfunc(const T &in) { - register_subalias("1", m_A.m_RN.N()); // C1 - register_subalias("2", m_A.m_RN.P()); // RC1 - register_subalias("3", m_A.m_CLRQ); - register_subalias("4", m_A.m_B); - register_subalias("5", m_A.m_A); - register_subalias("6", m_A.m_Q); - register_subalias("7", m_A.m_QQ); - register_subalias("8", m_A.m_RN.N()); - connect(m_A.m_RN.N(), m_B.m_RN.N()); - - register_subalias("9", m_B.m_QQ); - register_subalias("10", m_B.m_Q); - register_subalias("11", m_B.m_A); - register_subalias("12", m_B.m_B); - register_subalias("13", m_B.m_CLRQ); - register_subalias("14", m_B.m_RN.P()); // RC2 - register_subalias("15", m_B.m_RN.N()); // C2 - register_subalias("16", m_A.m_RP.P()); - connect(m_A.m_RP.P(), m_B.m_RP.P()); + return ((in[0]() | in[1]()) ^ 1) & in[0](); // ((m_A() | (m_B() ^ 1)) ^ 1) & m_CLRQ() } - NETLIB_RESETI() { } - NETLIB_UPDATEI() { } - private: - NETLIB_SUB(74123_base)<9602> m_A; - NETLIB_SUB(74123_base)<9602> m_B; + template static constexpr netlist_sig_t clear(const T &in) { plib::unused_var(in); return 1;} }; - NETLIB_OBJECT(4538_dip) + struct desc_9602 : public desc_74123 { - NETLIB_CONSTRUCTOR_MODEL(4538_dip, "CD4XXX") - , m_A(*this, "A") - , m_B(*this, "B") + template + static netlist_sig_t trigfunc(const T &in) { - register_subalias("1", m_A.m_RN.N()); // C1 - register_subalias("2", m_A.m_RN.P()); // RC1 - register_subalias("3", m_A.m_CLRQ); - register_subalias("4", m_A.m_A); - register_subalias("5", m_A.m_B); - register_subalias("6", m_A.m_Q); - register_subalias("7", m_A.m_QQ); - register_subalias("8", m_A.m_RN.N()); - connect(m_A.m_RN.N(), m_B.m_RN.N()); - - register_subalias("9", m_B.m_QQ); - register_subalias("10", m_B.m_Q); - register_subalias("11", m_B.m_B); - register_subalias("12", m_B.m_A); - register_subalias("13", m_B.m_CLRQ); - register_subalias("14", m_B.m_RN.P()); // RC2 - register_subalias("15", m_B.m_RN.N()); // C2 - register_subalias("16", m_A.m_RP.P()); - connect(m_A.m_RP.P(), m_B.m_RP.P()); + return ((in[1]() ^ 1) | in[2]()); // (m_A() ^ 1) | m_B() } - NETLIB_RESETI(); - NETLIB_UPDATEI(); - private: - NETLIB_SUB(74123_base)<4538> m_A; - NETLIB_SUB(74123_base)<4538> m_B; }; - NETLIB_UPDATE(4538_dip) + struct desc_4538 : public desc_74123 { - /* only called during startup */ - //m_1.update_dev(); - //m_2.update_dev(); - } + using t_AB_to_Q = time_ns<300>; + using t_C_to_Q = time_ns<250>; + static constexpr nl_fptype K() { return nlconst::one(); } // CD4538 datasheet states PW=RC - NETLIB_RESET(4538_dip) - { - m_A.reset(); - m_B.reset(); - } + template + static netlist_sig_t trigfunc(const T &in) + { + return (in[1]() | (in[2]() ^ 1)); // m_A() | (m_B() ^ 1) + } + }; - using NETLIB_NAME(74123) = NETLIB_NAME(74123_base)<74123>; + using NETLIB_NAME(74123) = NETLIB_NAME(74123_base); + using NETLIB_NAME(74121) = NETLIB_NAME(74123_base); + using NETLIB_NAME(4538) = NETLIB_NAME(74123_base); + using NETLIB_NAME(9602) = NETLIB_NAME(74123_base); NETLIB_DEVICE_IMPL(74123, "TTL_74123", "") - NETLIB_DEVICE_IMPL(74123_dip, "TTL_74123_DIP", "") - NETLIB_DEVICE_IMPL(4538_dip, "CD4538_DIP", "") - NETLIB_DEVICE_IMPL(9602_dip, "TTL_9602_DIP", "") + NETLIB_DEVICE_IMPL(74121, "TTL_74121", "") + NETLIB_DEVICE_IMPL(4538, "CD4538", "") + NETLIB_DEVICE_IMPL(9602, "TTL_9602", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_74123.h b/src/lib/netlist/devices/nld_74123.h index 3eca141b613..98e508f258d 100644 --- a/src/lib/netlist/devices/nld_74123.h +++ b/src/lib/netlist/devices/nld_74123.h @@ -54,21 +54,13 @@ #define TTL_74123(name) \ NET_REGISTER_DEV(TTL_74123, name) -#define TTL_74123_DIP(name) \ - NET_REGISTER_DEV(TTL_74123_DIP, name) +#define TTL_74121(name) \ + NET_REGISTER_DEV(TTL_74121, name) -/* The 9602 is very similar to the 123. Input triggering is slightly different - * The 9602 uses an OR gate instead of an AND gate. - */ - -#define TTL_9602_DIP(name) \ - NET_REGISTER_DEV(TTL_9602_DIP, name) - -/* - * The CD4538 is pretty similar to the 9602 - */ +#define TTL_9602(name) \ + NET_REGISTER_DEV(TTL_9602, name) -#define CD4538_DIP(name) \ - NET_REGISTER_DEV(CD4538_DIP, name) +#define CD4538(name) \ + NET_REGISTER_DEV(TTL_4538, name) #endif /* NLD_74123_H_ */ diff --git a/src/lib/netlist/macro/nlm_cd4xxx.cpp b/src/lib/netlist/macro/nlm_cd4xxx.cpp index 55aefe6f272..c5dfe1e9ef5 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.cpp +++ b/src/lib/netlist/macro/nlm_cd4xxx.cpp @@ -252,6 +252,62 @@ static NETLIST_START(CD4316_DIP) NETLIST_END() +//- Identifier: CD4538_DIP +//- Title: CD4538BC Dual Precision Monostable +//- Description: The CD4538BC is a dual, precision monostable multivibrator with +//- independent trigger and reset controls. The device +//- is retriggerable and resettable, and the control inputs are +//- internally latched. Two trigger inputs are provided to allow +//- either rising or falling edge triggering. The reset inputs are +//- active LOW and prevent triggering while active. Precise +//- control of output pulse-width has been achieved using linear +//- CMOS techniques. The pulse duration and accuracy +//- are determined by external components RX and CX. The +//- device does not allow the timing capacitor to discharge +//- through the timing pin on power-down condition. For this +//- reason, no external protection resistor is required in series +//- with the timing pin. Input protection from static discharge is +//- provided on all pins. +//- +//- Pinalias: C1,RC1,CLRQ1,B1,A1,Q1,QQ1,GND,QQ2,Q2,A2,B2,CLRQ2,RC2,C2,VCC +//- Package: DIP +//- NamingConvention: Naming conventions follow Fairchild Semiconductor datasheet +//- Limitations: +//- Timing inaccuracies may occur for capacitances < 1nF. Please consult datasheet +//- +//- Example: 74123.cpp,74123_example +//- +//- FunctionTable: +//- https://pdf1.alldatasheet.com/datasheet-pdf/view/50871/FAIRCHILD/CD4538.html +//- +static NETLIST_START(CD4538_DIP) + + CD4538(A) + CD4538(B) + + ALIAS(1, A.C) // C1 + ALIAS(2, A.RC) // RC1 + ALIAS(3, A.CLRQ) + ALIAS(4, A.A) + ALIAS(5, A.B) + ALIAS(6, A.Q) + ALIAS(7, A.QQ) + ALIAS(8, A.C) + + ALIAS(9, B.QQ) + ALIAS(10, B.Q) + ALIAS(11, B.B) + ALIAS(12, B.A) + ALIAS(13, B.CLRQ) + ALIAS(14, B.RC) // RC2 + ALIAS(15, B.C) // C2 + ALIAS(16, A.RP.1) + + NET_C(A.VCC, B.VCC) + NET_C(A.GND, B.GND) +NETLIST_END() + + NETLIST_START(CD4XXX_lib) TRUTHTABLE_START(CD4001_GATE, 2, 1, "") @@ -287,5 +343,6 @@ NETLIST_START(CD4XXX_lib) LOCAL_LIB_ENTRY(CD4016_DIP) LOCAL_LIB_ENTRY(CD4066_DIP) LOCAL_LIB_ENTRY(CD4316_DIP) + LOCAL_LIB_ENTRY(CD4538_DIP) NETLIST_END() diff --git a/src/lib/netlist/macro/nlm_cd4xxx.h b/src/lib/netlist/macro/nlm_cd4xxx.h index 0de0c763718..ba90ad0fe64 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.h +++ b/src/lib/netlist/macro/nlm_cd4xxx.h @@ -61,6 +61,9 @@ #define CD4316_DIP(name) \ NET_REGISTER_DEV(CD4016_DIP, name) +#define CD4538_DIP(name) \ + NET_REGISTER_DEV(CD4538_DIP, name) + #endif /* ---------------------------------------------------------------------------- * External declarations diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index 334b9dc8f5c..0f65bc52233 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -702,35 +702,169 @@ static NETLIST_START(TTL_74107_DIP) NETLIST_END() #endif +//- Identifier: TTL_74121_DIP +//- Title: DM74121 One-Shot with Clear and Complementary Outputs +//- Description: The DM74121 is a monostable multivibrator featuring both +//- positive and negative edge triggering with complementary +//- outputs. An internal 2kΩ timing resistor is provided for +//- design convenience minimizing component count and layout problems. this device can be used with a single external capacitor. Inputs (A) are active-LOW trigger transition +//- inputs and input (B) is and active-HIGH transition Schmitttrigger input that allows jitter-free triggering from inputs with +//- transition rates as slow as 1 volt/second. A high immunity +//- to VCC noise of typically 1.5V is also provided by internal +//- circuitry at the input stage. +//- To obtain optimum and trouble free operation please read +//- operating rules and one-shot application notes carefully +//- and observe recommendations. +//- +//- Pinalias: QQ,NC,A1,A2,B,Q,GND,NC,RINT,C,RC,NC,NC,VCC +//- Package: DIP +//- NamingConvention: Naming conventions follow Fairchild Semiconductor datasheet +//- Limitations: +//- Timing inaccuracies may occur for capacitances < 1nF. Please consult datasheet +//- +//- Example: 74123.cpp,74123_example +//- +//- FunctionTable: +//- https://pdf1.alldatasheet.com/datasheet-pdf/view/50894/FAIRCHILD/74121.html +//- +static NETLIST_START(TTL_74121_DIP) + + TTL_74121(A) + RES(RINT, RES_K(2)) + RES(RD, RES_M(1000)) + + ALIAS(1, A.QQ) + //ALIAS(2", ); NC + ALIAS(3, A.A1) + ALIAS(4, A.A2) + ALIAS(5, A.B) + ALIAS(6, A.Q) + ALIAS(7, A.GND) + + //ALIAS(8", ); NC + ALIAS(9, RINT.1) // RINT + ALIAS(10, A.C) // CEXT + ALIAS(11, A.RC) // REXT + //ALIAS(12", ); NC + //ALIAS(13", ); NC + ALIAS(14, A.VCC) + + NET_C(RINT.2, A.RC) + + // Avoid error messages if RINT is not used. + NET_C(RINT.1, RD.2) + NET_C(RD.1, A.GND) -/* - * DM74155/DM74156: Dual 2-Line to 4-Line Decoders/Demultiplexers - * - * +-----+-------++-----------------+ - * | B A | G1 C1 || 1Y0 1Y1 1Y2 1Y3 | - * +=====+=======++=================+ - * | X X | 1 X || 1 1 1 1 | - * | 0 0 | 0 1 || 0 1 1 1 | - * | 0 1 | 0 1 || 1 0 1 1 | - * | 1 0 | 0 1 || 1 1 0 1 | - * | 1 1 | 0 1 || 1 1 1 0 | - * | X X | X 0 || 1 1 1 1 | - * +-----+-------++-----------------+ - * - * +-----+-------++-----------------+ - * | B A | G2 C2 || 2Y0 2Y1 2Y2 2Y3 | - * +=====+=======++=================+ - * | X X | 1 X || 1 1 1 1 | - * | 0 0 | 0 0 || 0 1 1 1 | - * | 0 1 | 0 0 || 1 0 1 1 | - * | 1 0 | 0 0 || 1 1 0 1 | - * | 1 1 | 0 0 || 1 1 1 0 | - * | X X | X 1 || 1 1 1 1 | - * +-----+-------++-----------------+ - * - * Naming conventions follow National Semiconductor datasheet - * - */ +NETLIST_END() + +//- Identifier: TTL_74123_DIP +//- Title: DM74123 Dual Retriggerable One-Shot with Clear and Complementary Outputs +//- Description: The DM74123 is a dual retriggerable monostable multivibrator +//- capable of generating output pulses from a few +//- nano-seconds to extremely long duration up to 100% duty +//- cycle. Each device has three inputs permitting the choice of +//- either leading-edge or trailing edge triggering. Pin (A) is an +//- active-LOW transition trigger input and pin (B) is an activeHIGH transition trigger input. A LOW at the clear (CLR) +//- input terminates the output pulse: which also inhibits triggering. An internal connection from CLR to the input gate +//- makes it possible to trigger the circuit by a positive-going +//- signal on CLR as shown in the Truth Table. +//- +//- To obtain the best and trouble free operation from this +//- device please read the Operating Rules as well as the +//- One–Shot Application Notes carefully and observe recommendations. +//- +//- Pinalias: A1,B1,CLRQ1,QQ1,Q2,C2,RC2,GND,A2,B2,CLRQ2,QQ2,Q1,C1,RC1,VCC +//- Package: DIP +//- NamingConvention: Naming conventions follow Fairchild Semiconductor datasheet +//- Limitations: +//- Timing inaccuracies may occur for capacitances < 1nF. Please consult datasheet +//- +//- Example: 74123.cpp,74123_example +//- +//- FunctionTable: +//- https://pdf1.alldatasheet.com/datasheet-pdf/view/50893/FAIRCHILD/DM74123.html +//- +static NETLIST_START(TTL_74123_DIP) + + TTL_74123(A) + TTL_74123(B) + + ALIAS(1, A.A) + ALIAS(2, A.B) + ALIAS(3, A.CLRQ) + ALIAS(4, A.QQ) + ALIAS(5, B.Q) + ALIAS(6, B.C) // CEXT + ALIAS(7, B.RC) // REXT + ALIAS(8, A.GND) + + ALIAS(9, B.A) + ALIAS(10, B.B) + ALIAS(11, B.CLRQ) + ALIAS(12, B.QQ) + ALIAS(13, A.Q) + ALIAS(14, A.C) // CEXT + ALIAS(15, A.RC) // REXT + ALIAS(16, A.VCC) + + NET_C(A.VCC, B.VCC) + NET_C(A.GND, B.GND) +NETLIST_END() + +//- Identifier: TTL_9602_DIP +//- Title: DM9602 Dual Retriggerable, Resettable One Shots +//- Description: These dual resettable, retriggerable one shots have two +//- inputs per function; one which is active HIGH, and one +//- which is active LOW. This allows the designer to employ +//- either leading-edge or trailing-edge triggering, which is +//- independent of input transition times. When input conditions for triggering are met, a new cycle starts and the +//- external capacitor is allowed to rapidly discharge and then +//- charge again. The retriggerable feature permits output +//- pulse widths to be extended. In fact a continuous true output can be maintained by having an input cycle time which +//- is shorter than the output cycle time. The output pulse may +//- then be terminated at any time by applying a LOW logic +//- level to the RESET pin. Retriggering may be inhibited by +//- either connecting the Q output to an active HIGH input, or +//- the Q output to an active LOW input. +//- The DM74123 is a dual retriggerable monostable multivibrator +//- +//- Pinalias: C1,RC1,CLRQ1,B1,A1,Q1,QQ1,GND,QQ2,Q2,A2,B2,CLRQ2,RC2,C2,VCC +//- Package: DIP +//- NamingConvention: Naming conventions follow Fairchild Semiconductor datasheet +//- Limitations: +//- Timing inaccuracies may occur for capacitances < 1nF. Please consult datasheet +//- +//- Example: 74123.cpp,74123_example +//- +//- FunctionTable: +//- https://pdf1.alldatasheet.com/datasheet-pdf/view/51137/FAIRCHILD/DM9602.html +//- +static NETLIST_START(TTL_9602_DIP) + + TTL_9602(A) + TTL_9602(B) + + ALIAS(1, A.C) // C1 + ALIAS(2, A.RC) // RC1 + ALIAS(3, A.CLRQ) + ALIAS(4, A.B) + ALIAS(5, A.A) + ALIAS(6, A.Q) + ALIAS(7, A.QQ) + ALIAS(8, A.GND) + + ALIAS(9, B.QQ) + ALIAS(10, B.Q) + ALIAS(11, B.A) + ALIAS(12, B.B) + ALIAS(13, B.CLRQ) + ALIAS(14, B.RC) // RC2 + ALIAS(15, B.C) // C2 + ALIAS(16, A.VCC) + + NET_C(A.VCC, B.VCC) + NET_C(A.GND, B.GND) +NETLIST_END() //- Identifier: TTL_74125_DIP //- Title: SN74125 QUADRUPLE BUS BUFFERS WITH 3-STATE OUTPUTS @@ -832,6 +966,35 @@ static NETLIST_START(TTL_74126_DIP) NET_C(A1.GND, A2.GND, A3.GND, A4.GND) NETLIST_END() +/* + * DM74155/DM74156: Dual 2-Line to 4-Line Decoders/Demultiplexers + * + * +-----+-------++-----------------+ + * | B A | G1 C1 || 1Y0 1Y1 1Y2 1Y3 | + * +=====+=======++=================+ + * | X X | 1 X || 1 1 1 1 | + * | 0 0 | 0 1 || 0 1 1 1 | + * | 0 1 | 0 1 || 1 0 1 1 | + * | 1 0 | 0 1 || 1 1 0 1 | + * | 1 1 | 0 1 || 1 1 1 0 | + * | X X | X 0 || 1 1 1 1 | + * +-----+-------++-----------------+ + * + * +-----+-------++-----------------+ + * | B A | G2 C2 || 2Y0 2Y1 2Y2 2Y3 | + * +=====+=======++=================+ + * | X X | 1 X || 1 1 1 1 | + * | 0 0 | 0 0 || 0 1 1 1 | + * | 0 1 | 0 0 || 1 0 1 1 | + * | 1 0 | 0 0 || 1 1 0 1 | + * | 1 1 | 0 0 || 1 1 1 0 | + * | X X | X 1 || 1 1 1 1 | + * +-----+-------++-----------------+ + * + * Naming conventions follow National Semiconductor datasheet + * + */ + static NETLIST_START(TTL_74155_DIP) NET_REGISTER_DEV(TTL_74155A_GATE, A) NET_REGISTER_DEV(TTL_74155B_GATE, B) @@ -1682,6 +1845,9 @@ NETLIST_START(TTL74XX_lib) LOCAL_LIB_ENTRY(TTL_7448_DIP) #endif LOCAL_LIB_ENTRY(TTL_7486_DIP) + LOCAL_LIB_ENTRY(TTL_74121_DIP) + LOCAL_LIB_ENTRY(TTL_74123_DIP) + LOCAL_LIB_ENTRY(TTL_9602_DIP) LOCAL_LIB_ENTRY(TTL_74125_DIP) LOCAL_LIB_ENTRY(TTL_74126_DIP) #if (NL_USE_TRUTHTABLE_74107) diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h index 63417177ccd..060ac8d54eb 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.h +++ b/src/lib/netlist/macro/nlm_ttl74xx.h @@ -284,6 +284,15 @@ #endif +#define TTL_74121_DIP(name) \ + NET_REGISTER_DEV(TTL_74121_DIP, name) + +#define TTL_74123_DIP(name) \ + NET_REGISTER_DEV(TTL_74123_DIP, name) + +#define TTL_9602_DIP(name) \ + NET_REGISTER_DEV(TTL_9602_DIP, name) + #define TTL_74125_DIP(name) \ NET_REGISTER_DEV(TTL_74125_DIP, name) diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 0891e81c6b4..2e6f0f68d46 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -1919,12 +1919,11 @@ namespace netlist { public: template - object_array_base_t(D &dev, const std::initializer_list &names, Args&&... args) + //object_array_base_t(D &dev, const std::initializer_list &names, Args&&... args) + object_array_base_t(D &dev, std::array &&names, Args&&... args) { - passert_always_msg(names.size() == N, "initializer_list size mismatch"); - std::size_t i = 0; - for (const auto &n : names) - this->emplace(i++, dev, pstring(n), std::forward(args)...); + for (std::size_t i = 0; iemplace(i, dev, pstring(names[i]), std::forward(args)...); } template diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index 7b18b00d77d..eeeabc772c2 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -1069,7 +1069,7 @@ void tool_app_t::create_docheader() poutprefix("///", ""); poutprefix("///", " @section {}_4 Function Table", d.id); poutprefix("///", ""); - if (!d.functiontable.empty()) + if (d.functiontable.empty()) poutprefix("///", " Please refer to the datasheet."); else poutprefix("///", " {}", d.functiontable); -- cgit v1.2.3 From a6239d582b25be01038722ee61b6cc6884c8ef09 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 10 Jul 2020 02:07:01 -0700 Subject: netlist: Add 74113 device. --- scripts/src/netlist.lua | 2 + src/lib/netlist/buildVS/netlistlib.vcxproj | 2 + src/lib/netlist/buildVS/netlistlib.vcxproj.filters | 6 + src/lib/netlist/devices/net_lib.cpp | 4 + src/lib/netlist/devices/net_lib.h | 1 + src/lib/netlist/devices/nld_74113.cpp | 165 +++++++++++++++++++++ src/lib/netlist/devices/nld_74113.h | 84 +++++++++++ src/lib/netlist/devices/nld_devinc.h | 21 +++ 8 files changed, 285 insertions(+) create mode 100644 src/lib/netlist/devices/nld_74113.cpp create mode 100644 src/lib/netlist/devices/nld_74113.h diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 4910d7484e1..0a949221079 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -165,6 +165,8 @@ project "netlist" MAME_DIR .. "src/lib/netlist/devices/nld_7497.h", MAME_DIR .. "src/lib/netlist/devices/nld_74107.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74107.h", + MAME_DIR .. "src/lib/netlist/devices/nld_74113.cpp", + MAME_DIR .. "src/lib/netlist/devices/nld_74113.h", MAME_DIR .. "src/lib/netlist/devices/nld_74123.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74123.h", MAME_DIR .. "src/lib/netlist/devices/nld_74125.cpp", diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj b/src/lib/netlist/buildVS/netlistlib.vcxproj index 5effaa1e649..1d4df8f0649 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj @@ -131,6 +131,7 @@ + @@ -217,6 +218,7 @@ + diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters index e8aeb09c28c..c41348819b8 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters @@ -174,6 +174,9 @@ Source Files + + Source Files + Source Files @@ -509,6 +512,9 @@ Header Files + + Header Files + Header Files diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 02d888a1f3f..da6babfc092 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -106,6 +106,10 @@ namespace devices LIB_ENTRY(74107_dip) #endif LIB_ENTRY(74107A) // FIXME: implement missing DIP + LIB_ENTRY(74113) + LIB_ENTRY(74113_dip) + LIB_ENTRY(74113A) + LIB_ENTRY(74113A_dip) LIB_ENTRY(74121) LIB_ENTRY(74123) LIB_ENTRY(74125) diff --git a/src/lib/netlist/devices/net_lib.h b/src/lib/netlist/devices/net_lib.h index ae788f06ba4..b4f65bf2322 100644 --- a/src/lib/netlist/devices/net_lib.h +++ b/src/lib/netlist/devices/net_lib.h @@ -53,6 +53,7 @@ #include "nld_4066.h" #include "nld_4316.h" #include "nld_74107.h" +#include "nld_74113.h" #include "nld_74123.h" #include "nld_74125.h" #include "nld_74153.h" diff --git a/src/lib/netlist/devices/nld_74113.cpp b/src/lib/netlist/devices/nld_74113.cpp new file mode 100644 index 00000000000..d98133fe473 --- /dev/null +++ b/src/lib/netlist/devices/nld_74113.cpp @@ -0,0 +1,165 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74113.c + * + */ + +#include "nld_74113.h" +#include "netlist/nl_base.h" + +// Note: this can probably be merged with nld_7473.cpp + +namespace netlist +{ + namespace devices + { + NETLIB_OBJECT(74113) + { + NETLIB_CONSTRUCTOR(74113) + , m_CLK(*this, "CLK") + , m_J(*this, "J") + , m_K(*this, "K") + , m_SETQ(*this, "SETQ") + , m_last_CLK(*this, "m_last_CLK", 0) + , m_q(*this, "m_q", 0) + , m_Q(*this, "Q") + , m_QQ(*this, "QQ") + , m_power_pins(*this) + { + } + + NETLIB_RESETI(); + NETLIB_UPDATEI(); + + public: + logic_input_t m_CLK; + logic_input_t m_J; + logic_input_t m_K; + logic_input_t m_SETQ; + + state_var m_last_CLK; + state_var m_q; + + logic_output_t m_Q; + logic_output_t m_QQ; + nld_power_pins m_power_pins; + }; + + NETLIB_OBJECT_DERIVED(74113A, 74113) + { + public: + NETLIB_CONSTRUCTOR(74113A) { } + + }; + + NETLIB_OBJECT(74113_dip) + { + NETLIB_CONSTRUCTOR(74113_dip) + , m_A(*this, "A") + , m_B(*this, "B") + { + register_subalias("1", m_A.m_CLK); + register_subalias("2", m_A.m_K); + register_subalias("3", m_A.m_J); + register_subalias("4", m_A.m_SETQ); + register_subalias("5", m_A.m_Q); + register_subalias("6", m_A.m_QQ); + register_subalias("7", "A.GND"); + + register_subalias("8", m_B.m_QQ); + register_subalias("9", m_B.m_Q); + register_subalias("10", m_B.m_SETQ); + register_subalias("11", m_B.m_J); + register_subalias("12", m_B.m_K); + register_subalias("13", m_B.m_CLK); + register_subalias("14", "A.VCC"); + + connect("A.GND", "B.GND"); + connect("A.VCC", "B.VCC"); + } + + private: + NETLIB_SUB(74113) m_A; + NETLIB_SUB(74113) m_B; + }; + + NETLIB_OBJECT(74113A_dip) + { + NETLIB_CONSTRUCTOR(74113A_dip) + , m_A(*this, "A") + , m_B(*this, "B") + { + register_subalias("1", m_A.m_CLK); + register_subalias("2", m_A.m_K); + register_subalias("3", m_A.m_J); + register_subalias("4", m_A.m_SETQ); + register_subalias("5", m_A.m_Q); + register_subalias("6", m_A.m_QQ); + register_subalias("7", "A.GND"); + + register_subalias("8", m_B.m_QQ); + register_subalias("9", m_B.m_Q); + register_subalias("10", m_B.m_SETQ); + register_subalias("11", m_B.m_J); + register_subalias("12", m_B.m_K); + register_subalias("13", m_B.m_CLK); + register_subalias("14", "A.VCC"); + + connect("A.GND", "B.GND"); + connect("A.VCC", "B.VCC"); + } + + private: + NETLIB_SUB(74113A) m_A; + NETLIB_SUB(74113A) m_B; + }; + + NETLIB_RESET(74113) + { + m_last_CLK = 0; + } + + NETLIB_UPDATE(74113) + { + const auto JK = (m_J() << 1) | m_K(); + + if (m_SETQ()) + { + if (!m_CLK() && m_last_CLK) + { + switch (JK) + { + case 1: // (!m_J) & m_K)) + m_q = 0; + break; + case 2: // (m_J) & !m_K)) + m_q = 1; + break; + case 3: // (m_J) & m_K)) + m_q ^= 1; + break; + default: + case 0: + break; + } + } + } + else + { + m_q = 1; + } + + m_last_CLK = m_CLK(); + + m_Q.push(m_q, NLTIME_FROM_NS(20)); // FIXME: timing + m_QQ.push(m_q ^ 1, NLTIME_FROM_NS(20)); // FIXME: timing + } + + NETLIB_DEVICE_IMPL(74113, "TTL_74113", "+CLK,+J,+K,+CLRQ,@VCC,@GND") + NETLIB_DEVICE_IMPL(74113A, "TTL_74113A", "+CLK,+J,+K,+CLRQ,@VCC,@GND") + NETLIB_DEVICE_IMPL(74113_dip, "TTL_74113_DIP", "") + NETLIB_DEVICE_IMPL(74113A_dip, "TTL_74113A_DIP", "") + + } //namespace devices +} // namespace netlist diff --git a/src/lib/netlist/devices/nld_74113.h b/src/lib/netlist/devices/nld_74113.h new file mode 100644 index 00000000000..02f38973594 --- /dev/null +++ b/src/lib/netlist/devices/nld_74113.h @@ -0,0 +1,84 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74113.h + * + * 74113: Dual Master-Slave J-K Flip-Flops with Set and Complementary Outputs + * 74113A: Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flops with Set and Complementary Outputs + * + * +----------+ + * 1CLK |1 ++ 14| VCC + * 1K |2 13| 2CLK + * 1J |3 12| 2K + * 1SETQ |4 74113 11| 2J + * 1Q |5 10| 2SETQ + * 1QQ |6 9| 2Q + * GND |7 8| 2QQ + * +----------+ + * + * + * Function table 113 + * + * +-----+-----+-----+---++---+-----+ + * | SETQ| CLK | J | K || Q | QQ | + * +=====+=====+=====+===++===+=====+ + * | 0 | X | X | X || 1 | 0 | + * | 1 | * | 0 | 0 || Q0| Q0Q | + * | 1 | * | 1 | 0 || 1 | 0 | + * | 1 | * | 0 | 1 || 0 | 1 | + * | 1 | * | 1 | 1 || TOGGLE | + * +-----+-----+-----+---++---+-----+ + * _ + * * = _| |_ + * + * This is positive triggered, J and K + * are latched during clock high and + * transferred when CLK falls. + * + * Function table 113A + * + * +-----+-----+-----+---++---+-----+ + * | CLRQ| CLK | J | K || Q | QQ | + * +=====+=====+=====+===++===+=====+ + * | 0 | X | X | X || 0 | 1 | + * | 1 | F | 0 | 0 || Q0| Q0Q | + * | 1 | F | 1 | 0 || 1 | 0 | + * | 1 | F | 0 | 1 || 0 | 1 | + * | 1 | F | 1 | 1 || TOGGLE | + * | 1 | 1 | X | X || Q0| Q0Q | + * +-----+-----+-----+---++---+-----+ + * + * THe 113A is negative triggered. + * + * Naming conventions follow Texas instruments datasheet + * + * FIXME: Currently, only the 113 is implemented. + * The 113A uses the same model. + * + */ + +#ifndef NLD_74113_H_ +#define NLD_74113_H_ + +#include "netlist/nl_setup.h" + +#define TTL_74113(name, cCLK, cJ, cK, cCLRQ) \ + NET_REGISTER_DEV(TTL_74113, name) \ + NET_CONNECT(name, GND, GND) \ + NET_CONNECT(name, VCC, VCC) \ + NET_CONNECT(name, CLK, cCLK) \ + NET_CONNECT(name, J, cJ) \ + NET_CONNECT(name, K, cK) \ + NET_CONNECT(name, CLRQ, cCLRQ) + +#define TTL_74113A(name, cCLK, cJ, cK, cCLRQ) \ + TTL_74113(name, cCLK, cJ, cK, cCLRQ) + +#define TTL_74113_DIP(name) \ + NET_REGISTER_DEV(TTL_74113_DIP, name) + + +#define TTL_74113A_DIP(name) \ + NET_REGISTER_DEV(TTL_74113A_DIP, name) + +#endif /* NLD_74113_H_ */ diff --git a/src/lib/netlist/devices/nld_devinc.h b/src/lib/netlist/devices/nld_devinc.h index 2b6cab33189..28f97f2bd98 100644 --- a/src/lib/netlist/devices/nld_devinc.h +++ b/src/lib/netlist/devices/nld_devinc.h @@ -417,6 +417,27 @@ #define TTL_74107A(...) \ NET_REGISTER_DEVEXT(TTL_74107A, __VA_ARGS__) +// --------------------------------------------------------------------- +// Source: src/lib/netlist/devices/nld_74113.cpp +// --------------------------------------------------------------------- +// usage : TTL_74113(name, pCLK, pJ, pK, pCLRQ) +// auto connect: VCC, GND +#define TTL_74113(...) \ + NET_REGISTER_DEVEXT(TTL_74113, __VA_ARGS__) + +// usage : TTL_74113_DIP(name) +#define TTL_74113_DIP(...) \ + NET_REGISTER_DEVEXT(TTL_74113_DIP, __VA_ARGS__) + +// usage : TTL_74113A(name, pCLK, pJ, pK, pCLRQ) +// auto connect: VCC, GND +#define TTL_74113A(...) \ + NET_REGISTER_DEVEXT(TTL_74113A, __VA_ARGS__) + +// usage : TTL_74113A_DIP(name) +#define TTL_74113A_DIP(...) \ + NET_REGISTER_DEVEXT(TTL_74113A_DIP, __VA_ARGS__) + // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_74123.cpp // --------------------------------------------------------------------- -- cgit v1.2.3 From 876eb91c8cce54336888e306824eaa00afeb8d08 Mon Sep 17 00:00:00 2001 From: braintro Date: Fri, 10 Jul 2020 13:50:40 -0500 Subject: dec8.cpp: Redumped and verified the i8751 MCU for Captain Silver (World) [Hammy & TeamEurope] --- src/mame/drivers/dec8.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp index 0b532a48ce7..0fdd7a79c5e 100644 --- a/src/mame/drivers/dec8.cpp +++ b/src/mame/drivers/dec8.cpp @@ -3217,8 +3217,7 @@ ROM_START( csilver ) ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */ // 017F: B4 4C 0D : cjne a,#$4C,$018F (ID code 0x4c = World version) - // 3 bytes (always bit 0x08 set incorrectly) had to be hand fixed, hence 'BAD_DUMP' - ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, BAD_DUMP CRC(c0266263) SHA1(27ac6fa4af7195f04249c04dec168ab82158704e) ) // dx-8.19a ? + ROM_LOAD( "dx-8.19a", 0x0000, 0x1000, CRC(c0266263) SHA1(27ac6fa4af7195f04249c04dec168ab82158704e) ) ROM_REGION( 0x08000, "gfx1", 0 ) /* characters */ ROM_LOAD( "dx00.3d", 0x00000, 0x08000, CRC(f01ef985) SHA1(d5b823bd7c0efcf3137f8643c5d99a260bed5675) ) -- cgit v1.2.3 From 7c28200793c33b214cff062ff2b275cb2406465a Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Fri, 10 Jul 2020 21:34:16 +0200 Subject: megaplay.cpp: Added two more motherboard PLDs [caius] (#6939) --- src/mame/drivers/megaplay.cpp | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/mame/drivers/megaplay.cpp b/src/mame/drivers/megaplay.cpp index 31d3e5778ce..6b2f775f50c 100644 --- a/src/mame/drivers/megaplay.cpp +++ b/src/mame/drivers/megaplay.cpp @@ -182,7 +182,7 @@ static INPUT_PORTS_START ( megaplay ) PORT_DIPSETTING( 0x10, "1 coin/1 credit - 2 coins/3 credits" ) PORT_DIPSETTING( 0x00, " 1 coin/1 credit" ) - PORT_START("DSW1") /* DSW C (per game settings) */ + PORT_START("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -200,7 +200,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_sonic ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, "Initial Players" ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x01, "3" ) @@ -221,7 +221,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_gaxe2 ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) @@ -245,7 +245,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_col3 ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( English ) ) PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) @@ -268,7 +268,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_twc ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x01, 0x01, "Time" ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x00, "Short" ) @@ -286,7 +286,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_sor2 ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x01, "3" ) @@ -302,7 +302,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_bio ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x00, "5" ) PORT_DIPSETTING( 0x01, "4" ) @@ -318,7 +318,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_gslam ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x07, 0x04, DEF_STR ( Game_Time ) ) PORT_DIPLOCATION("SW3:1,2,3") PORT_DIPSETTING( 0x00, "5:00" ) PORT_DIPSETTING( 0x01, "4:30" ) @@ -336,7 +336,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_mazin ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x02, "Initial Player" ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x01, "1" ) @@ -353,7 +353,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_soni2 ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, "Initial Players (Normal mode)" ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x01, "3" ) @@ -369,7 +369,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_shnb3 ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x01, "3" ) @@ -385,7 +385,7 @@ INPUT_PORTS_END static INPUT_PORTS_START ( mp_gunhe ) PORT_INCLUDE( megaplay ) - PORT_MODIFY("DSW1") /* DSW C (per game settings) */ + PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, "Initial Players" ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x01, "3" ) @@ -398,7 +398,7 @@ static INPUT_PORTS_START ( mp_gunhe ) PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) INPUT_PORTS_END -/*MEGAPLAY specific*/ +// MEGAPLAY specific READ_LINE_MEMBER(mplay_state::start1_r) { @@ -508,8 +508,8 @@ void mplay_state::bank_w(offs_t offset, uint8_t data) } -/* Megaplay BIOS handles regs[2] at start in a different way compared to megadrive */ -/* other io data/ctrl regs are dealt with exactly like in the console */ +/* Megaplay BIOS handles regs[2] at start in a different way compared to MegaDrive + other I/O data/ctrl regs are dealt with exactly like in the console */ uint8_t mplay_state::bios_6402_r() { @@ -668,12 +668,12 @@ MACHINE_RESET_MEMBER(mplay_state,megaplay) void mplay_state::megaplay(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware md_ntsc(config); - /* The Megaplay has an extra BIOS cpu which drives an SMS VDP + /* The Megaplay has an extra BIOS CPU which drives an SMS VDP which includes an SN76496 for sound */ - Z80(config, m_bioscpu, MASTER_CLOCK / 15); /* ?? */ + Z80(config, m_bioscpu, MASTER_CLOCK / 15); // ?? m_bioscpu->set_addrmap(AS_PROGRAM, &mplay_state::megaplay_bios_map); m_bioscpu->set_addrmap(AS_IO, &mplay_state::megaplay_bios_io_map); @@ -697,14 +697,14 @@ void mplay_state::megaplay(machine_config &config) m_vdp->set_lcm_scaling(true); - /* New update functions to handle the extra layer */ + // New update functions to handle the extra layer subdevice("megadriv")->set_raw((XTAL(10'738'635) * 5)/2, sega315_5124_device::WIDTH * 5, (sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH) * 5, (sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH + 256) * 5, sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224); subdevice("megadriv")->set_screen_update(FUNC(mplay_state::screen_update_megplay)); // Megaplay has an additional SMS VDP as an overlay - SEGA315_5246(config, m_vdp1, MASTER_CLOCK / 5); /* ?? */ + SEGA315_5246(config, m_vdp1, MASTER_CLOCK / 5); // ?? m_vdp1->set_screen("megadriv"); m_vdp1->set_hcounter_divide(5); m_vdp1->set_is_pal(false); @@ -721,9 +721,9 @@ void mplay_state::megaplay(machine_config &config) ROM_LOAD( "315-5661.ic7", 0x000, 0x117, BAD_DUMP CRC(d8289e31) SHA1(a0e9134d9e8043a3660a2ce122cfd5d7f76773b9) ) /* GAL16V8, bruteforced but verified */ \ ROM_LOAD( "315-5653.ic56", 0x117, 0x117, BAD_DUMP CRC(fd5c4fb3) SHA1(6b2ba657836f3031d77602526416200e31d41a6e) ) /* GAL16V8, bruteforced but verified */ \ ROM_LOAD( "315-5651.ic8", 0x22e, 0x117, BAD_DUMP CRC(55c6cddb) SHA1(e1a968305ca7ea17e9021b31506ca087b84a8ab1) ) /* GAL16V8, bruteforced but verified */ \ - ROM_LOAD( "315-5349a.ic54", 0x345, 0x104, NO_DUMP ) /* PAL16L8BCN */ \ + ROM_LOAD( "315-5349a.ic54", 0x345, 0x104, BAD_DUMP CRC(825ea316) SHA1(f49edb6a3f9349330f7ff525ef60517ed276a663) ) /* PAL16L8BCN, bruteforced but verified */ \ ROM_LOAD( "315-5654.ic33", 0x449, 0x104, NO_DUMP ) /* PAL16L8BCN */ \ - ROM_LOAD( "315-5655.ic34", 0x54d, 0x104, NO_DUMP ) /* PAL16L8BCN */ + ROM_LOAD( "315-5655.ic34", 0x54d, 0x104, BAD_DUMP CRC(4a2d27d1) SHA1(ba79183e4b522d1b57a46a56fc7d9b85de24df36) ) /* PAL16L8BCN, bruteforced but verified */ #define ROM_LOAD_BIOS(bios,name,offset,length,hash) \ ROMX_LOAD(name, offset, length, hash, ROM_BIOS(bios)) @@ -767,7 +767,7 @@ ROM_START( mp_sonic ) // Sonic MEGAPLAY_PLDS ROM_END -/* this cart looks to be a conversion from something else.. sega rom numbers were missing +/* this cart looks to be a conversion from something else... Sega rom numbers were missing but the code looks like it's probably real */ // PCB 171-5834 ROM_START( mp_col3 ) // Columns 3 -- cgit v1.2.3 From c6c5678815d5077bb1092a91949adcdf584e250c Mon Sep 17 00:00:00 2001 From: David Haywood <28625134+DavidHaywood@users.noreply.github.com> Date: Fri, 10 Jul 2020 20:38:32 +0100 Subject: mpu4vid temp protection workaround + lexibook Toy Story 3 (#6937) mpu4vid updates: * basic layout and input tweaks to v4addlad [James Wallace] * Protection workarounds to get more games showing video [David Haywood] new NOT WORKING machines ----- Toy Story 3 (Lexibook) [Sean Riddle, Kamaal Brown, David Haywood] --- src/mame/drivers/mpu4vid.cpp | 234 ++++++++++++------ src/mame/drivers/vt1682.cpp | 66 +++++- src/mame/layout/v4addlad.lay | 552 +++++++++++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 1 + 4 files changed, 775 insertions(+), 78 deletions(-) create mode 100644 src/mame/layout/v4addlad.lay diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp index 5493435b61b..d40581429b0 100644 --- a/src/mame/drivers/mpu4vid.cpp +++ b/src/mame/drivers/mpu4vid.cpp @@ -200,6 +200,7 @@ TODO: #include "crmaze2p.lh" #include "crmaze4p.lh" +#include "v4addlad.lh" class mpu4vid_state : public mpu4_state @@ -261,6 +262,7 @@ public: void init_skiltrek(); void init_crmaze3(); void init_cybcas(); + void init_bwbhack(); private: required_device m_videocpu; @@ -319,6 +321,7 @@ private: uint8_t vidcharacteriser_4k_lookup_r(offs_t offset); uint8_t m_4krow; uint8_t *m_4ktable; + void hack_bwb_startup_protection(); }; @@ -428,8 +431,31 @@ SCN2674_DRAW_CHARACTER_MEMBER(mpu4vid_state::display_pixels) uint16_t tile = m_vid_mainram[address & 0x7fff]; const uint8_t *line = m_gfxdecode->gfx(m_gfx_index+0)->get_data(tile & 0xfff); int offset = m_gfxdecode->gfx(m_gfx_index+0)->rowbytes() * linecount; - for(int i = 0; i < 8; i++) - bitmap.pix32(y, x + i) = (tile >> 12) ? m_palette->pen(line[offset + i]) : m_palette->black_pen(); + for (int i = 0; i < 8; i++) + { + uint8_t pen = line[offset + i]; + int extra = tile >> 12; + + // the test modes in many cases require the more complex logic here + // otherwise text is invisible, rgb patterns are not shown etc. + // this logic could still be incorrect + if (pen == 0) + { + bitmap.pix32(y, x + i) = m_palette->pen(pen); + } + else + { + int newpen = pen ^ (15 - extra); + if (newpen == 15) + { + bitmap.pix32(y, x + i) = m_palette->pen(extra); + } + else + { + bitmap.pix32(y, x + i) = m_palette->pen(newpen); + } + } + } } } @@ -586,6 +612,8 @@ uint8_t mpu4vid_state::pia_ic5_porta_track_r() * *************************************/ + + static INPUT_PORTS_START( crmaze ) PORT_START("ORANGE1") PORT_BIT(0xFF, IP_ACTIVE_HIGH, IPT_UNUSED) @@ -1041,6 +1069,7 @@ static INPUT_PORTS_START( turnover ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_COIN4) PORT_NAME("100p")//PORT_IMPULSE(5) INPUT_PORTS_END + static INPUT_PORTS_START( adders ) PORT_START("ORANGE1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED) @@ -1067,16 +1096,16 @@ static INPUT_PORTS_START( adders ) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("B") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("A") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Pass") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_NAME("Collect") PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Test Button") PORT_CODE(KEYCODE_W) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_INTERLOCK) PORT_NAME("Cashbox Door") PORT_CODE(KEYCODE_Q) PORT_TOGGLE PORT_START("BLACK2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_NAME("C") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_NAME("B") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("A") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_NAME("C") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("B") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON8) PORT_NAME("A") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON9) PORT_NAME("Continue") PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_START1) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) @@ -1155,6 +1184,7 @@ static INPUT_PORTS_START( adders ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_COIN4) PORT_NAME("100p")//PORT_IMPULSE(5) INPUT_PORTS_END + WRITE_LINE_MEMBER(mpu4vid_state::mpu_video_reset) { m_ptm->reset(); @@ -1196,8 +1226,9 @@ void mpu4vid_state::mpu4_68k_map_base(address_map &map) map(0x000000, 0x7fffff).rom(); map(0x800000, 0x80ffff).ram().share("vid_mainram"); // map(0x810000, 0x81ffff).ram(); /* ? */ - map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); + map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff).mirror(0x000004); map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); + map(0xa00002, 0xa00003).nopr(); // uses a clr instruction on address which generates a dummy read map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); // map(0xa00004, 0xa0000f).rw(FUNC(mpu4vid_state::mpu4_vid_unmap_r), FUNC(mpu4vid_state::mpu4_vid_unmap_w)); map(0xb00000, 0xb0000f).rw(m_scn2674, FUNC(scn2674_device::read), FUNC(scn2674_device::write)).umask16(0x00ff); @@ -1225,8 +1256,9 @@ void mpu4vid_state::mpu4oki_68k_map(address_map &map) map(0x600000, 0x63ffff).ram(); /* The Mating Game has an extra 256kB RAM on the program card */ // map(0x640000, 0x7fffff).noprw(); /* Possible bug, reads and writes here */ map(0x800000, 0x80ffff).ram().share("vid_mainram"); - map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); + map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff).mirror(0x000004); map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); + map(0xa00002, 0xa00003).nopr(); // uses a clr instruction on address which generates a dummy read map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); map(0xb00000, 0xb0000f).rw(m_scn2674, FUNC(scn2674_device::read), FUNC(scn2674_device::write)).umask16(0x00ff); map(0xc00000, 0xc1ffff).rw(FUNC(mpu4vid_state::mpu4_vid_vidram_r), FUNC(mpu4vid_state::mpu4_vid_vidram_w)).share("vid_vidram"); @@ -1244,8 +1276,9 @@ void mpu4vid_state::bwbvid_68k_map(address_map &map) map(0x000000, 0x7fffff).rom(); map(0x800000, 0x80ffff).ram().share("vid_mainram"); map(0x810000, 0x81ffff).ram(); /* ? */ - map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); + map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff).mirror(0x000004); map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); + map(0xa00002, 0xa00003).nopr(); // uses a clr instruction on address which generates a dummy read map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); // map(0xa00000, 0xa0000f).rw(FUNC(mpu4vid_state::bt471_r), FUNC(mpu4vid_state::bt471_w)); //Some games use this // map(0xa00004, 0xa0000f).rw(FUNC(mpu4vid_state::mpu4_vid_unmap_r), FUNC(mpu4vid_state::mpu4_vid_unmap_w)); @@ -1253,7 +1286,7 @@ void mpu4vid_state::bwbvid_68k_map(address_map &map) map(0xc00000, 0xc1ffff).rw(FUNC(mpu4vid_state::mpu4_vid_vidram_r), FUNC(mpu4vid_state::mpu4_vid_vidram_w)).share("vid_vidram"); map(0xe00000, 0xe00003).rw(m_acia_1, FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0x00ff); map(0xe01000, 0xe0100f).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)).umask16(0x00ff); - //map(0xa00004, 0xa0000f).rw(FUNC(mpu4vid_state::bwb_characteriser16_r), FUNC(mpu4vid_state::bwb_characteriser16_w)); //.rw(FUNC(mpu4vid_state::adpcm_r), FUNC(mpu4vid_state::adpcm_w)); CHR ? + //map(0xe05000, 0xe05001).rw(FUNC(mpu4vid_state::bwb_characteriser16_r), FUNC(mpu4vid_state::bwb_characteriser16_w)); // CHR } void mpu4vid_state::bwbvid5_68k_map(address_map &map) @@ -1261,8 +1294,9 @@ void mpu4vid_state::bwbvid5_68k_map(address_map &map) map(0x000000, 0x7fffff).rom(); map(0x800000, 0x80ffff).ram().share("vid_mainram"); map(0x810000, 0x81ffff).ram(); /* ? */ - map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff); + map(0x900000, 0x900003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff).mirror(0x000004); map(0xa00001, 0xa00001).rw("ef9369", FUNC(ef9369_device::data_r), FUNC(ef9369_device::data_w)).umask16(0x00ff); //BT RAMDAC? + map(0xa00002, 0xa00003).nopr(); // uses a clr instruction on address which generates a dummy read map(0xa00003, 0xa00003).w("ef9369", FUNC(ef9369_device::address_w)).umask16(0x00ff); // map(0xa00000, 0xa00003).rw(FUNC(mpu4vid_state::bt471_r), FUNC(mpu4vid_state::bt471_w)).umask16(0x00ff); Some games use this // map(0xa00004, 0xa0000f).rw(FUNC(mpu4vid_state::mpu4_vid_unmap_r), FUNC(mpu4vid_state::mpu4_vid_unmap_w)); @@ -1368,6 +1402,7 @@ void mpu4vid_state::mpu4_vid(machine_config &config) SCN2674(config, m_scn2674, VIDEO_MASTER_CLOCK / 8); m_scn2674->intr_callback().set_inputline("video", M68K_IRQ_3); + m_scn2674->set_character_width(8); m_scn2674->set_display_callback(FUNC(mpu4vid_state::display_pixels)); m_scn2674->set_addrmap(0, &mpu4vid_state::mpu4_vram); @@ -1839,10 +1874,50 @@ void mpu4vid_state::init_quidgrid() m_current_chr_table = quidgrid_data; } +void mpu4vid_state::hack_bwb_startup_protection() +{ + // there's no checksum that we need to fix after thi + // so we can't be sure there are no bad dumps? + + uint16_t *rom = (uint16_t*)memregion("video")->base(); + int len = memregion("video")->bytes()/2; + + uint16_t sequence[8] = { 0x3428, 0x0002, 0xb428, 0x0002, 0x671a, 0x2cbc, 0x0002, 0x4001 }; + + for (int i = 0; i < len - 8; i++) + { + + bool matched = true; + + for (int j = 0; j < 8; j++) + { + if (sequence[j] != rom[i + j]) + matched = false; + } + + if (matched) + { + //printf("boot protection match found at %08x\n", i * 2); + + rom[i + 5] = 0x6618; + rom[i + 6] = 0x4E71; + rom[i + 7] = 0x4E71; + } + } +} + + void mpu4vid_state::init_prizeinv() { m_reels = 0;//currently no hybrid games m_current_chr_table = prizeinv_data; + + hack_bwb_startup_protection(); +} + +void mpu4vid_state::init_bwbhack() +{ + hack_bwb_startup_protection(); } static const bwb_chr_table cybcas_data1[5] = { @@ -1865,6 +1940,8 @@ void mpu4vid_state::init_cybcas() //no idea what this should be, use blues boys table for now m_bwb_chr_table1 = cybcas_data1; m_current_chr_table = cybcas_data; + + hack_bwb_startup_protection(); } @@ -1990,7 +2067,7 @@ ROM_START( v4blox ) ROM_LOAD16_BYTE( "blxv___2.0_2", 0x000001, 0x10000, CRC(6b1f8588) SHA1(e8a443f062555f1ed228e1bfed2031927bcd7015) ) ROM_LOAD16_BYTE( "blxv___2.0_3", 0x020000, 0x10000, CRC(c62d704b) SHA1(bea0c9519063f1601f70372ccb49fb892fbd6e76) ) ROM_LOAD16_BYTE( "blxv___2.0_4", 0x020001, 0x10000, CRC(e431471a) SHA1(cf90dc48be3bc5e3c5a8efea5818dbc15fa442e9) ) - ROM_LOAD16_BYTE( "blxv___2.0_5", 0x040001, 0x10000, CRC(98ac6bc7) SHA1(9575014ba21fa4330138a34f53e13d30d312bc8b) ) + ROM_LOAD16_BYTE( "blxv___2.0_5", 0x040000, 0x10000, CRC(98ac6bc7) SHA1(9575014ba21fa4330138a34f53e13d30d312bc8b) ) ROM_LOAD16_BYTE( "blxv___2.0_6", 0x040001, 0x10000, CRC(a3d92b5b) SHA1(1e7042d5eae4a19a01a3ef7d806c434886dc9f4d) ) ROM_END @@ -2003,7 +2080,7 @@ ROM_START( v4bloxd ) ROM_LOAD16_BYTE( "blxv___2.0_2", 0x000001, 0x10000, CRC(6b1f8588) SHA1(e8a443f062555f1ed228e1bfed2031927bcd7015) ) ROM_LOAD16_BYTE( "blxv___2.0_3", 0x020000, 0x10000, CRC(c62d704b) SHA1(bea0c9519063f1601f70372ccb49fb892fbd6e76) ) ROM_LOAD16_BYTE( "blxv___2.0_4", 0x020001, 0x10000, CRC(e431471a) SHA1(cf90dc48be3bc5e3c5a8efea5818dbc15fa442e9) ) - ROM_LOAD16_BYTE( "blxv___2.0_5", 0x040001, 0x10000, CRC(98ac6bc7) SHA1(9575014ba21fa4330138a34f53e13d30d312bc8b) ) + ROM_LOAD16_BYTE( "blxv___2.0_5", 0x040000, 0x10000, CRC(98ac6bc7) SHA1(9575014ba21fa4330138a34f53e13d30d312bc8b) ) ROM_LOAD16_BYTE( "blxv___2.0_6", 0x040001, 0x10000, CRC(a3d92b5b) SHA1(1e7042d5eae4a19a01a3ef7d806c434886dc9f4d) ) ROM_END @@ -2016,20 +2093,20 @@ ROM_START( v4tetrs ) ROM_LOAD16_BYTE( "tetris22.p2", 0x000001, 0x10000, CRC(68aa4f15) SHA1(4e4511a64391fc64e5f5b7ccb46a78fd2e1d94d6) ) ROM_LOAD16_BYTE( "tetris22.p3", 0x020000, 0x10000, CRC(b38b4763) SHA1(d28e77fdd6869cb5b5ec40ed1f300a2a947e0482) ) ROM_LOAD16_BYTE( "tetris22.p4", 0x020001, 0x10000, CRC(1649f604) SHA1(ca4ac303391a0969d41c8f988b8e81cfcee1a21c) ) - ROM_LOAD16_BYTE( "tetris22.p5", 0x040001, 0x10000, CRC(02859676) SHA1(5293c767021a6b5253eecab0b0568aa082ea7084) ) + ROM_LOAD16_BYTE( "tetris22.p5", 0x040000, 0x10000, CRC(02859676) SHA1(5293c767021a6b5253eecab0b0568aa082ea7084) ) ROM_LOAD16_BYTE( "tetris22.p6", 0x040001, 0x10000, CRC(40d24c82) SHA1(7ac3cf148af84ad93eaf11ce3420abbe45d986e2) ) ROM_END ROM_START( v4tetrs1 ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "tetv1int", 0x0000, 0x004000, CRC(98de975d) SHA1(5b4fc06aa8008d3967c68f364c47f8377a1ba9df) ) + ROM_LOAD( "tetv1int", 0x0000, 0x004000, CRC(98de975d) SHA1(5b4fc06aa8008d3967c68f364c47f8377a1ba9df) ) // alt / earlier base ROM? ROM_REGION( 0x800000, "video", 0 ) ROM_LOAD16_BYTE( "tetris22.p1", 0x000000, 0x10000, CRC(e81dd182) SHA1(28b460224abf6fe24b637542ccd1c84040674555) ) ROM_LOAD16_BYTE( "tetris22.p2", 0x000001, 0x10000, CRC(68aa4f15) SHA1(4e4511a64391fc64e5f5b7ccb46a78fd2e1d94d6) ) ROM_LOAD16_BYTE( "tetris22.p3", 0x020000, 0x10000, CRC(b38b4763) SHA1(d28e77fdd6869cb5b5ec40ed1f300a2a947e0482) ) ROM_LOAD16_BYTE( "tetris22.p4", 0x020001, 0x10000, CRC(1649f604) SHA1(ca4ac303391a0969d41c8f988b8e81cfcee1a21c) ) - ROM_LOAD16_BYTE( "tetris22.p5", 0x040001, 0x10000, CRC(02859676) SHA1(5293c767021a6b5253eecab0b0568aa082ea7084) ) + ROM_LOAD16_BYTE( "tetris22.p5", 0x040000, 0x10000, CRC(02859676) SHA1(5293c767021a6b5253eecab0b0568aa082ea7084) ) ROM_LOAD16_BYTE( "tetris22.p6", 0x040001, 0x10000, CRC(40d24c82) SHA1(7ac3cf148af84ad93eaf11ce3420abbe45d986e2) ) ROM_END @@ -3065,7 +3142,7 @@ FF_493D.P2 DDE5 27C040 30p/?15 data ROM_START( v4frfact ) ROM_REGION( 0x10000, "maincpu", 0 ) - VID_BIOS // should use FFMPU416.P1 A209 27C512 .. find out which that is, if it's dumped + ROM_LOAD("ffmpu416_a209.p1", 0x00000, 0x10000, NO_DUMP ) // should use "FFMPU416.P1 A209 27C512" according to text file, but ROM was not in archive ROM_REGION( 0x800000, "video", 0 ) /* p1/p2 load the wrong way around? */ @@ -3113,8 +3190,8 @@ ROM_START( v4bigfrt ) ROM_LOAD16_BYTE("bi______.2_4", 0x020001, 0x010000, CRC(58f0dcb4) SHA1(79039d489f5ce3a1865fa92a2b6e8b002b63efcf)) ROM_LOAD16_BYTE("bi______.2_5", 0x040000, 0x010000, CRC(512c6d1a) SHA1(1c9d04e7e59a95f6975e6d2d5e5def4c1a7777e0)) ROM_LOAD16_BYTE("bi______.2_6", 0x040001, 0x010000, CRC(5df850ec) SHA1(5b455f4cfb19c551723f7fd5f4f95e5420f8682f)) - ROM_LOAD16_BYTE("bi______.2_7", 0x050000, 0x010000, CRC(9ea394a2) SHA1(3b9840627f7676aa7872d2bc022406a4ced7958f)) - ROM_LOAD16_BYTE("bi______.2_8", 0x050001, 0x010000, CRC(4aa1d37d) SHA1(3c1a3ccacdc33cd4a54b7bbf06ea4c33868705f4)) + ROM_LOAD16_BYTE("bi______.2_7", 0x060000, 0x010000, CRC(9ea394a2) SHA1(3b9840627f7676aa7872d2bc022406a4ced7958f)) + ROM_LOAD16_BYTE("bi______.2_8", 0x060001, 0x010000, CRC(4aa1d37d) SHA1(3c1a3ccacdc33cd4a54b7bbf06ea4c33868705f4)) ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision BIOS ROMs, to be sorted into clones (could probably do so already, but let's not complicate things)*/ // protocol/20p/Rank Bingo @@ -3481,17 +3558,17 @@ ROM_START( v4mdice ) ROM_LOAD( "mdi25a__.8_0", 0x0000, 0x010000, CRC(c3b469d0) SHA1(00cd85bd9acd477f2ab4baf83e7bb10d763b1e93) ) ROM_REGION( 0x800000, "video", 0 ) + ROM_LOAD16_BYTE( "md______.8_1", 0x000001, 0x080000, CRC(3f3fa0d2) SHA1(bb52111bcea5cd404d1e7adf0f3ebca596a251ac) ) + ROM_LOAD16_BYTE( "md______.8_2", 0x000000, 0x080000, CRC(14bb6b48) SHA1(97025f0899c325d28ac75c54e81fd425b5002064) ) + ROM_LOAD16_BYTE( "md______.8_3", 0x100001, 0x080000, CRC(cde34cd1) SHA1(7874fa070e52e6c34b770aee5bfec522eb3d72c9) ) + ROM_LOAD16_BYTE( "md______.8_4", 0x100000, 0x080000, CRC(39bc1267) SHA1(853e047406fed3c12f55a2e032e8c3d8188da182) ) + + ROM_REGION( 0x800000, "altvideo", 0 ) // this doesn't work with the above base roms? ROM_LOAD16_BYTE( "mdv58p1", 0x000001, 0x080000, CRC(3f3fa0d2) SHA1(bb52111bcea5cd404d1e7adf0f3ebca596a251ac) ) ROM_LOAD16_BYTE( "mdv58p2", 0x000000, 0x080000, CRC(14bb6b48) SHA1(97025f0899c325d28ac75c54e81fd425b5002064) ) ROM_LOAD16_BYTE( "mdv58p3", 0x100001, 0x080000, CRC(0d907e37) SHA1(b6ad78a4a7bc877d2152907df2317621f00bdc1c) ) ROM_LOAD16_BYTE( "mdv58p4", 0x100000, 0x080000, CRC(2e21c249) SHA1(d5192339313a8dd234cb164ca0094d9a7b64ccc2) ) - ROM_REGION( 0x800000, "altvideo", 0 ) - ROM_LOAD( "md______.8_1", 0x0000, 0x080000, CRC(3f3fa0d2) SHA1(bb52111bcea5cd404d1e7adf0f3ebca596a251ac) ) - ROM_LOAD( "md______.8_2", 0x0000, 0x080000, CRC(14bb6b48) SHA1(97025f0899c325d28ac75c54e81fd425b5002064) ) - ROM_LOAD( "md______.8_3", 0x0000, 0x080000, CRC(cde34cd1) SHA1(7874fa070e52e6c34b770aee5bfec522eb3d72c9) ) - ROM_LOAD( "md______.8_4", 0x0000, 0x080000, CRC(39bc1267) SHA1(853e047406fed3c12f55a2e032e8c3d8188da182) ) - ROM_REGION( 0x200000, "msm6376", ROMREGION_ERASE00 ) ROM_LOAD( "mdsnda", 0x000000, 0x080000, CRC(18651603) SHA1(c6f7557a82cb49f3f001b43250129d10f4f6ab5a) ) @@ -3499,7 +3576,6 @@ ROM_START( v4mdice ) ROM_END - ROM_START( v4monte ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "montecarloorbustmpu4cardrom.bin", 0x0000, 0x010000, CRC(44967b33) SHA1(92d35d1b0edcc2eef1062468722c80ef8208b437) ) // Monte Carlo Or Bust Release D (c)1996 @@ -3598,26 +3674,20 @@ ROM_START( v4monte ) ROM_LOAD( "mxi05___.2_1", 0x0000, 0x010000, CRC(de425b55) SHA1(2aa63bbd32c766e7e2d888345115c3185dc03bff) ) ROM_LOAD( "mxi10___.2_1", 0x0000, 0x010000, CRC(19077425) SHA1(e31da38a903345c65b083cac192555f1f4ba2e5a) ) - ROM_REGION( 0x800000, "video", 0 ) ROM_LOAD16_BYTE( "mcobo4p1", 0x000001, 0x080000, CRC(aaa594f0) SHA1(2bcb13d8b93911a69c181d6f0be43397baf8cbc8) ) ROM_LOAD16_BYTE( "mcobo4p2", 0x000000, 0x080000, CRC(ab94c22a) SHA1(a8a0ed992c0b95fb763aea37f78c8d7a53732509) ) - ROM_LOAD16_BYTE( "mcobo4p3", 0x100001, 0x080000, CRC(ebe851df) SHA1(61d37a7f91480592da6f5b6ee7ef4b6097ee5c65) ) - ROM_LOAD16_BYTE( "mcobo4p4", 0x100000, 0x080000, CRC(49b0cfd7) SHA1(51fe74371bdac3c507a04aa9faeb522640d1cdf7) ) - - + ROM_LOAD16_BYTE( "mcop3vd", 0x100001, 0x080000, CRC(721e9ad1) SHA1(fb926debd57301c9c0c3ecb9bb1ac36b0b60ee40) ) + ROM_LOAD16_BYTE( "mcop4vd", 0x100000, 0x080000, CRC(6eba1107) SHA1(c696b620781782c3b4045fe3550ab8e7e905661d) ) ROM_REGION( 0x800000, "altvideo", 0 ) - // these are bad dumps I think, they're 0x40000-0x60000 of the main roms? - ROM_LOAD( "montecarloorbustvideoboardp1.bin", 0x0000, 0x020000, CRC(5fd2c5ee) SHA1(60194df160070754e1cce6558dedc87b7fc05044) ) - ROM_LOAD( "montecarloorbustvideoboardp2.bin", 0x0000, 0x020000, CRC(7f6747cb) SHA1(0a85c0199583c5c48012f627ec3e4c3d12e39859) ) - ROM_LOAD( "montecarloorbustvideoboardp3.bin", 0x0000, 0x020000, CRC(f3d4a37d) SHA1(e81df776bb220832b45a5f6d12e8831f17dbd10b) ) - ROM_LOAD( "montecarloorbustvideoboardp4.bin", 0x0000, 0x020000, CRC(94be9981) SHA1(fe5803102e5e301ad6659ed83d319f55aa62c33e) ) + // these also pair with the same p1/p2 as above, but expect different MCU base ROM? + ROM_LOAD16_BYTE( "mcobo4p3", 0x100001, 0x080000, CRC(ebe851df) SHA1(61d37a7f91480592da6f5b6ee7ef4b6097ee5c65) ) + ROM_LOAD16_BYTE( "mcobo4p4", 0x100000, 0x080000, CRC(49b0cfd7) SHA1(51fe74371bdac3c507a04aa9faeb522640d1cdf7) ) - // this seems to be an alt (incomplete? set) + ROM_REGION( 0x800000, "altvideo2", 0 ) + // this seems to be a loose video ROM from an otherwise undumped set? investigate, might belong to something else entirely. ROM_LOAD( "mn______.f_1", 0x0000, 0x080000, CRC(1a81b3fb) SHA1(bbf0fe7e48404962a2f2120734efe71dc1eed64c) ) // unmatched rom? (significant changes) - ROM_LOAD( "mcop3vd", 0x0000, 0x080000, CRC(721e9ad1) SHA1(fb926debd57301c9c0c3ecb9bb1ac36b0b60ee40) ) // alt p3 (significant changes) - ROM_LOAD( "mcop4vd", 0x0000, 0x080000, CRC(6eba1107) SHA1(c696b620781782c3b4045fe3550ab8e7e905661d) ) // alt p4 (significant changes ROM_REGION( 0x10000, "unk", 0 ) // something else? ROM_LOAD( "montvnd", 0x0000, 0x010000, CRC(9858bb1d) SHA1(a2d3de2cec7420cc6f7da2239bdc79d7c4b7394e) ) // this looks like a different MPU4 game? - check @@ -3910,9 +3980,9 @@ GAME( 1996?,v4mated, v4mate, mating, mating, mpu4vid_state, init_mat /* Quiz games - Questions decoded */ -GAME( 1989, v4addlad, v4bios, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.1) (MPU4 Video)",GAME_FLAGS ) -GAME( 1989, v4addladd, v4addlad, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.1d) (MPU4 Video)",GAME_FLAGS ) -GAME( 1989, v4addlad20, v4addlad, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.0) (MPU4 Video)",GAME_FLAGS ) +GAMEL( 1989, v4addlad, v4bios, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.1) (MPU4 Video)",GAME_FLAGS,layout_v4addlad ) +GAMEL( 1989, v4addladd, v4addlad, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.1d) (MPU4 Video)",GAME_FLAGS,layout_v4addlad ) +GAMEL( 1989, v4addlad20, v4addlad, mpu4_vid_strike, adders, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Adders and Ladders (v2.0) (MPU4 Video)",GAME_FLAGS,layout_v4addlad ) GAME( 199?, v4strike, v4bios, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.5) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4striked, v4strike, mpu4_vid_strike, mpu4, mpu4vid_state, init_strikeit, ROT0, "Barcrest","Strike it Lucky (v0.5, Datapak) (MPU4 Video)",GAME_FLAGS ) @@ -3953,74 +4023,84 @@ GAME( 1991, v4opt3d, v4opt3, mpu4_vid, mpu4, mpu4vid_state, init_v4o /* Games below are newer BwB games and use their own BIOS ROMs and hardware setups*/ -GAME( 199?, v4vgpok, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Vegas Poker (prototype, release 2) (MPU4 Video)",GAME_FLAGS ) - GAME( 199?, v4psi, 0, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.1) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4psia, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.2) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4psib, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.0?) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4psib, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.0?) (MPU4 Video)",GAME_FLAGS ) // bad dump GAME( 199?, v4psi14d, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v1.4D?) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4psi20d, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.0D?) (MPU4 Video)",GAME_FLAGS ) GAME( 199?, v4psi214, v4psi, bwbvid, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Prize Space Invaders (v2.14?) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4blox, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Blox (v2.0) (MPU4 Video)",GAME_FLAGS ) // bad dump -GAME( 199?, v4bloxd, v4blox, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Blox (v2.0, Datapak) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4tetrs, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Tetris Payout (BwB TET1 Version 2.2) (MPU4 Video) (set 1)",GAME_FLAGS ) +GAME( 199?, v4tetrs1, v4tetrs, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Tetris Payout (BwB TET1 Version 2.2) (MPU4 Video) (set 2)",GAME_FLAGS ) -GAME( 199?, v4bulblx, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Bullion Blox (Bwb) (MPU4 Video)",GAME_FLAGS ) // is this the same game as v4blox? +GAME( 199?, v4pztet, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Prize Tetris (BwB) (MPU4 Video, set 1)",GAME_FLAGS ) +GAME( 199?, v4pzteta, v4pztet, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Prize Tetris (BwB) (MPU4 Video, set 2)",GAME_FLAGS ) // 'showcase' screen after title in attract -GAME( 1996, v4reno, 0, bwbvid5, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Reno Reels (20p/10GBP Cash, release A) (MPU4 Video)",GAME_FLAGS ) +// blox is an early version of Tetris? +GAME( 199?, v4blox, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Blox (v2.0) (MPU4 Video)",GAME_FLAGS ) // bad dump? +GAME( 199?, v4bloxd, v4blox, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Blox (v2.0, Datapak) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4bigfrt, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Big Fruits (v2.0?) (MPU4 Video)",GAME_FLAGS ) +// these will run in 'open door' mode otherwise they'll give payout shelf error -GAME( 199?, v4bubbnk, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Bubbly Bonk (v4.0?) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4vgpok, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Vegas Poker (prototype, release 2) (MPU4 Video)",GAME_FLAGS ) // doesn't have payout so no shelf error, runs with door closed -GAME( 199?, v4mazbel, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Mazooma Belle (v2.5) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4mazbla, v4mazbel, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Mazooma Belle (v1.5) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4redhtp, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Red Hot Poker (20p/10GBP Cash, release 3) (MPU4 Video)",GAME_FLAGS ) // runs if open door -GAME( 199?, v4rhmaz, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Red Hot Mazooma Belle (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4bubbnk, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Bubbly Bonk (v4.0?) (MPU4 Video)",GAME_FLAGS ) // runs if open door -GAME( 199?, v4shpwnd, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Shop Window (v2.0) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4ovrmn3, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Over Moon Pt3 (BwB) (MPU4 Video)",GAME_FLAGS ) // runs if open door -GAME( 199?, v4redhtp, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Red Hot Poker (20p/10GBP Cash, release 3) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4mazbel, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Mazooma Belle (v2.5) (MPU4 Video)",GAME_FLAGS ) // runs if open door +GAME( 199?, v4mazbla, v4mazbel, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Mazooma Belle (v1.5) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4tetrs, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","BwB Tetris v 2.2 (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4tetrs1, v4tetrs, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","BwB Tetris v 1.0? (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4rhmaz, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Red Hot Mazooma Belle (BwB) (MPU4 Video)",GAME_FLAGS ) // runs if open door + +GAME( 199?, v4shpwnd, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Shop Window (v2.0) (MPU4 Video)",GAME_FLAGS ) // runs if open door -GAME( 199?, v4pztet, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Prize Tetris (Bwb) (MPU4 Video, set 1)",GAME_FLAGS ) // is this the same as v4tetrs? -GAME( 199?, v4pzteta, v4pztet, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Prize Tetris (Bwb) (MPU4 Video, set 2)",GAME_FLAGS ) +GAME( 199?, v4sixx, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","6-X (BwB) (MPU4 Video)",GAME_FLAGS ) // runs if door open -GAME( 199?, v4big40, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Big 40 Poker (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4cshinf, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Cash Inferno (BwB) (MPU4 Video)",GAME_FLAGS ) // runs if door open -GAME( 199?, v4cshinf, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Cash Inferno (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4sunbst, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Sunburst (BwB) (MPU4 Video)",GAME_FLAGS ) // runs if open door -GAME( 199?, v4dbltak, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Double Take (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4bigfrt, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Big Fruits (v2.0?) (MPU4 Video)",GAME_FLAGS ) // runs if open door -GAME( 199?, v4gldrsh, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Gold Rush (Bwb) (MPU4 Video)",GAME_FLAGS ) +// these don't play in open door mode as they'll drop you to test mode, so need 'payout shelf' emulating. -GAME( 199?, v4mdice, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Miami Dice (Bwb) (MPU4 Video)",GAME_FLAGS ) // is this the same as the Nova game below? +GAME( 1996, v4reno, 0, bwbvid5, mpu4, mpu4vid_state, init_prizeinv, ROT0, "BwB","Reno Reels (20p/10GBP Cash, release A) (MPU4 Video)",GAME_FLAGS ) // runs if open door but then drops to test menu -GAME( 199?, v4monte, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Monte Carlo Or Bust (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4big40, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Big 40 Poker (BwB) (MPU4 Video)",GAME_FLAGS ) // drops to test mode with door open -GAME( 199?, v4ovrmn3, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Over Moon Pt3 (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4dbltak, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Double Take (BwB) (MPU4 Video)",GAME_FLAGS ) // drops to test mode with door open -GAME( 199?, v4sunbst, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Sunburst (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4gldrsh, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Gold Rush (BwB) (MPU4 Video)",GAME_FLAGS ) // drops to test mode with door open -GAME( 199?, v4timebn, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Time Bandit (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4timebn, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Time Bandit (BwB) (MPU4 Video)",GAME_FLAGS ) // drops to test mode with door open -GAME( 199?, v4sixx, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","6-X (Bwb) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4monte, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Monte Carlo Or Bust (BwB) (MPU4 Video)",GAME_FLAGS ) // drops to test mode with door open -GAME( 199?, v4megbuk, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Megabucks Poker (Bwb) (MPU4 Video)",GAME_FLAGS ) // no video roms! +GAME( 199?, v4mdice, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Miami Dice (BwB) (MPU4 Video)",GAME_FLAGS ) // is this the same as the Nova game below? drops to test mode with door open + +// other issues + +GAME( 199?, v4bulblx, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Bullion Blox (BwB) (MPU4 Video)",GAME_FLAGS ) // is this the same game as v4blox? (doesn't boot, hangs on comms?) + +GAME( 199?, v4megbuk, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Megabucks Poker (BwB) (MPU4 Video)",GAME_FLAGS ) // no video roms! + +GAME( 199?, v4rencas, 0, bwbvid, mpu4, mpu4vid_state, init_bwbhack, ROT0, "BwB","Reno Casino (BwB) (MPU4 Video)",GAME_FLAGS ) // no video roms! -GAME( 199?, v4rencas, 0, bwbvid, mpu4, mpu4vid_state, empty_init, ROT0, "BwB","Reno Casino (Bwb) (MPU4 Video)",GAME_FLAGS ) // no video roms! /* Uncertain BIOS */ -GAME( 199?, v4frfact, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Bwb","Fruit Factory (Bwb) (MPU4 Video)", GAME_FLAGS ) +GAME( 199?, v4frfact, v4bios, crmaze, crmaze, mpu4vid_state, init_bwbhack, ROT0, "BwB","Fruit Factory (BwB) (MPU4 Video)", GAME_FLAGS ) /* Nova - is this the same video board? One of the games displays 'Resetting' but the others do nothing interesting and access strange addresses */ /* All contain BwB video in the BIOS rom tho */ + +GAME( 199?, v4miami, 0, bwbvid5, mpu4, mpu4vid_state, init_bwbhack, ROT0, "Nova","Miami Dice (Nova) (MPU4 Video)",GAME_FLAGS ) // runs if door open + GAME( 199?, v4cybcas, 0, bwbvid5, mpu4, mpu4vid_state, init_cybcas, ROT0, "Nova","Cyber Casino (Nova) (MPU4 Video)",GAME_FLAGS ) -GAME( 199?, v4miami, 0, bwbvid5, mpu4, mpu4vid_state, empty_init, ROT0, "Nova","Miami Dice (Nova) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4missis, 0, bwbvid5, mpu4, mpu4vid_state, init_bwbhack, ROT0, "Nova","Mississippi Lady (Nova) (MPU4 Video)",GAME_FLAGS ) // wrong base rom? or some other issue? -GAME( 199?, v4missis, 0, bwbvid5, mpu4, mpu4vid_state, empty_init, ROT0, "Nova","Mississippi Lady (Nova) (MPU4 Video)",GAME_FLAGS ) +GAME( 199?, v4picdil, 0, bwbvid5, mpu4, mpu4vid_state, init_bwbhack, ROT0, "Nova","Piccadilly Nights (Nova) (MPU4 Video)",GAME_FLAGS ) // wrong base rom? or some other issue? -GAME( 199?, v4picdil, 0, bwbvid5, mpu4, mpu4vid_state, empty_init, ROT0, "Nova","Piccadilly Nights (Nova) (MPU4 Video)",GAME_FLAGS ) diff --git a/src/mame/drivers/vt1682.cpp b/src/mame/drivers/vt1682.cpp index 226b9114072..f3053985afc 100644 --- a/src/mame/drivers/vt1682.cpp +++ b/src/mame/drivers/vt1682.cpp @@ -676,6 +676,23 @@ private: required_ioport m_io_p1; }; +class vt1682_lxts3_state : public vt_vt1682_state +{ +public: + vt1682_lxts3_state(const machine_config& mconfig, device_type type, const char* tag) : + vt_vt1682_state(mconfig, type, tag), + m_io_p1(*this, "IN0") + { } + + void vt1682_lxts3(machine_config& config); + +protected: + uint8_t uio_porta_r(); + +private: + required_ioport m_io_p1; +}; + class vt1682_exsport_state : public vt_vt1682_state { public: @@ -5658,6 +5675,18 @@ static INPUT_PORTS_START( 110dance ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Pad Right") PORT_16WAY INPUT_PORTS_END +static INPUT_PORTS_START( lxts3 ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) +INPUT_PORTS_END + static INPUT_PORTS_START( exsprt48 ) PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) @@ -5833,7 +5862,12 @@ void intec_interact_state::intech_interact(machine_config& config) m_rightdac->add_route(0, "mono", 0.5); } - +uint8_t vt1682_lxts3_state::uio_porta_r() +{ + uint8_t ret = m_io_p1->read(); + logerror("%s: porta_r returning: %02x (INPUTS)\n", machine().describe_context(), ret); + return ret; +} uint8_t vt1682_dance_state::uio_porta_r() { @@ -5894,6 +5928,28 @@ void vt1682_dance_state::vt1682_dance(machine_config& config) m_uio->porta_out().set(FUNC(vt1682_dance_state::uio_porta_w)); } +void vt1682_lxts3_state::vt1682_lxts3(machine_config& config) +{ + vt_vt1682_ntscbase(config); + vt_vt1682_common(config); + + M6502(config.replace(), m_maincpu, MAIN_CPU_CLOCK_PAL); // no opcode bitswap + m_maincpu->set_addrmap(AS_PROGRAM, &vt1682_lxts3_state::vt_vt1682_map); + + m_leftdac->reset_routes(); + m_rightdac->reset_routes(); + + config.device_remove(":lspeaker"); + config.device_remove(":rspeaker"); + + SPEAKER(config, "mono").front_center(); + m_leftdac->add_route(0, "mono", 0.5); + m_rightdac->add_route(0, "mono", 0.5); + + m_uio->porta_in().set(FUNC(vt1682_lxts3_state::uio_porta_r)); +} + + void vt1682_wow_state::vt1682_wow(machine_config& config) { @@ -5987,12 +6043,18 @@ ROM_START( 110dance ) ROM_LOAD( "110songdancemat.bin", 0x00000, 0x2000000, CRC(cd668e41) SHA1(975bfe05f4cce047860b05766bc8539218f6014f) ) ROM_END +ROM_START( lxts3 ) + ROM_REGION( 0x800000, "mainrom", 0 ) + ROM_LOAD( "lexibooktoystory_mx29lv640mt_00c2227e.bin", 0x00000, 0x800000, CRC(91344ae7) SHA1(597fc4a27dd1fb6e6f5fda1c4ea237c07e9dba71)) +ROM_END + // TODO: this is a cartridge based system (actually, verify this, it seems some versions simply had built in games) move these to SL if verified as from cartridge config // actually it appears that for the cart based systems these are 'fake systems' anyway, where the base unit is just a Famiclone but as soon as you plug in a cart none of // the internal hardware gets used at all. CONS( 200?, ii8in1, 0, 0, intech_interact, intec, intec_interact_state, regular_init, "Intec", "InterAct 8-in-1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) + CONS( 200?, ii32in1, 0, 0, intech_interact, intec, intec_interact_state, regular_init, "Intec", "InterAct 32-in-1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // a 40-in-1 also exists which combines the above @@ -6049,3 +6111,5 @@ CONS( 200?, wowwg, 0, 0, vt1682_wow, exsprt48, vt1682_wow_state, regular_init CONS( 200?, 110dance, 0, 0, vt1682_dance, 110dance, vt1682_dance_state, regular_init, "", "Retro Dance Mat (110 song Super StepMania + 9-in-1 games) (PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) // NJ Pocket 60-in-1 (NJ-250) is meant to have similar games to the mini-games found in wowwg and 110dance, so almost certainly fits here + +CONS( 2010, lxts3, 0, 0, vt1682_lxts3, lxts3, vt1682_lxts3_state, regular_init, "Lexibook", "Toy Story 3 (Lexibook)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // random number generation issues on 2 games, linescroll on racing games diff --git a/src/mame/layout/v4addlad.lay b/src/mame/layout/v4addlad.lay new file mode 100644 index 00000000000..9bd175d578e --- /dev/null +++ b/src/mame/layout/v4addlad.lay @@ -0,0 +1,552 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index abae54e7b40..1e3b55ca0be 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -31788,6 +31788,7 @@ exsprt48 itvg48 wowwg 110dance +lxts3 @source:newbrain.cpp newbrain // -- cgit v1.2.3 From 47e32437cd308ece08629e1909cb6d6990ea0d85 Mon Sep 17 00:00:00 2001 From: 68bit <53298758+68bit@users.noreply.github.com> Date: Sat, 11 Jul 2020 05:40:01 +1000 Subject: mc6852 - implement more functionality, add byte interface. (#6931) --- src/devices/machine/mc6852.cpp | 212 +++++++++++++++++++++++++++++++++++++---- src/devices/machine/mc6852.h | 6 ++ 2 files changed, 201 insertions(+), 17 deletions(-) diff --git a/src/devices/machine/mc6852.cpp b/src/devices/machine/mc6852.cpp index 6d5a9876153..714e093aed3 100644 --- a/src/devices/machine/mc6852.cpp +++ b/src/devices/machine/mc6852.cpp @@ -10,7 +10,7 @@ TODO: - - FIFO + - FIFO flags - receive - transmit - parity @@ -56,7 +56,8 @@ mc6852_device::mc6852_device(const machine_config &mconfig, const char *tag, dev m_cts(1), m_dcd(1), m_sm_dtr(0), - m_tuf(0) + m_tuf(0), + m_in_sync(0) { } @@ -88,6 +89,7 @@ void mc6852_device::device_start() save_item(NAME(m_dcd)); save_item(NAME(m_sm_dtr)); save_item(NAME(m_tuf)); + save_item(NAME(m_in_sync)); } @@ -106,7 +108,7 @@ void mc6852_device::device_reset() /* reset and inhibit receiver/transmitter sections */ m_cr[0] |= (C1_TX_RS | C1_RX_RS); m_cr[1] &= ~(C2_EIE | C2_PC2 | C2_PC1); - m_status &= ~S_TDRA; + m_status |= S_TDRA; /* set receiver shift register to all 1's */ m_rsr = 0xff; @@ -132,6 +134,51 @@ void mc6852_device::tra_complete() // TODO } +//------------------------------------------------- +// receive_byte - +//------------------------------------------------- +void mc6852_device::receive_byte(uint8_t data) +{ + // Ignore if the receiver is in reset or sync is not enabled + if (m_cr[0] & (C1_RX_RS | C1_CLEAR_SYNC)) + return; + + // Handle sync detection + if (!m_in_sync) + { + // TODO also handle two sync codes. + if (data == m_scr) + { + m_in_sync = 1; + // TODO handle the various SM responses + } + return; + } + + if ((m_cr[0] & C1_STRIP_SYNC) && (data == m_scr)) + return; + + int size = m_rx_fifo.size(); + + if (size < 3) + { + m_rx_fifo.push(data); + size++; + } + else + { + // Overrun. + // TODO this should override the last data pushed + m_status |= S_RX_OVRN; + } + + int trigger = (m_cr[1] & C2_1_2_BYTE) ? 1 : 2; + + if (size >= trigger) + { + m_status |= S_RDA; + } +} //------------------------------------------------- // rcv_complete - @@ -142,32 +189,116 @@ void mc6852_device::rcv_complete() // TODO } - //------------------------------------------------- // read - //------------------------------------------------- +// TODO each RX fifo element needs an associated PE status flag, and reading +// the status register should return the PE for the last element of the fifo. + +// TODO RX overrun should be cleared by reading the status register followed +// by reading the RX fifo. + uint8_t mc6852_device::read(offs_t offset) { uint8_t data = 0; if (BIT(offset, 0)) { - if (m_rx_fifo.size() > 0) + int size = m_rx_fifo.size(); + if (size > 0) { data = m_rx_fifo.front(); if (!machine().side_effects_disabled()) + { m_rx_fifo.pop(); + int trigger = (m_cr[1] & C2_1_2_BYTE) ? 1 : 2; + if (size <= trigger) + { + m_status &= ~S_RDA; + } + } } } else { data = m_status; + + // TS reset inhibits the TDRA status bit (in the + // one-sync-character and two-sync-character modes) The + // m_status S_TDRA bit is allowed to reflect the actual fifo + // availability, masking it here on a read of the status, so + // that the TDRA status bit is simply unmasked here when the + // TX is taken out of reset. + if (m_cr[0] & C1_TX_RS) + { + data &= ~S_TDRA; + } + + if (!machine().side_effects_disabled()) + { + // TODO this might not be quite right, the datasheet + // states that the RX overrun flag is cleared by + // reading the status, and the RX data fifo? + m_status &= S_RX_OVRN; + } } return data; } +//------------------------------------------------- +// tx_start - +//------------------------------------------------- + +// The corresponds in time to just before the first bit of the next word is +// transmitted by this device. At this time the TX shift register is loaded +// the TUF line may be asserted if there is a TX FIFO underflow. +uint8_t mc6852_device::get_tx_byte(int *tuf) +{ + if (m_cr[0] & C1_TX_RS) + { + // FIFO is not popped when the TX is reset, but may be loaded + // so that it is pre-loaded when the reset is cleared. But + // will is send a sync code if that is enabled, of just ones? + *tuf = 0; + return 0xff; + } + + int size = m_tx_fifo.size(); + + if (size == 0) + { + // TX underflow + if (m_cr[1] & C2_TX_SYNC) + { + m_status |= S_TUF; + // TODO should the TUF callback be called, TUF is to + // be pulsed. + *tuf = 1; + return m_scr; + } + + *tuf = 0; + return 0xff; + } + + uint8_t data = m_tx_fifo.front(); + m_tx_fifo.pop(); + size--; + + int trigger = (m_cr[1] & C2_1_2_BYTE) ? 1 : 2; + int available = 3 - size; + + if (available >= trigger) + { + m_status |= S_TDRA; + } + + *tuf = 0; + return data; +} + //------------------------------------------------- // write - @@ -201,13 +332,40 @@ void mc6852_device::write(offs_t offset, uint8_t data) } set_data_frame(1, data_bit_count, parity, stop_bits); - } + + // The fifo trigger levels may have changed, so update + // the status bits. + + int trigger = (m_cr[1] & C2_1_2_BYTE) ? 1 : 2; + + if (m_rx_fifo.size() >= trigger) + m_status |= S_RDA; + else + m_status &= ~S_RDA; + + int tx_fifo_available = 3 - m_tx_fifo.size(); + if (tx_fifo_available >= trigger) + m_status |= S_TDRA; + else + m_status &= ~S_TDRA; + break; + } case C1_AC_C3: /* control 3 */ LOG("MC6852 Control 3 %02x\n", data); m_cr[2] = data; + if (m_cr[2] & C3_CTUF) + { + m_cr[2] &= ~C3_CTUF; + m_status &= ~S_TUF; + } + if (m_cr[2] & C3_CTS) + { + m_cr[2] &= ~C3_CTS; + m_status &= ~S_CTS; + } break; case C1_AC_SYNC: @@ -216,14 +374,26 @@ void mc6852_device::write(offs_t offset, uint8_t data) m_scr = data; break; - case C1_AC_TX_FIFO: + case C1_AC_TX_FIFO: { /* transmit data FIFO */ - if (m_tx_fifo.size() < 3) + int available = 3 - m_tx_fifo.size(); + if (available > 0) { LOG("MC6852 Transmit FIFO %02x\n", data); m_tx_fifo.push(data); + available--; + } + else + { + LOG("MC6852 Transmit FIFO OVERFLOW %02x\n", data); + } + int trigger = (m_cr[1] & C2_1_2_BYTE) ? 1 : 2; + if (available < trigger) + { + m_status &= ~S_TDRA; } break; + } } } else @@ -243,6 +413,7 @@ void mc6852_device::write(offs_t offset, uint8_t data) m_status &= ~(S_RX_OVRN | S_PE | S_DCD | S_RDA); m_rsr = 0xff; + m_rx_fifo = std::queue(); receive_register_reset(); } @@ -250,22 +421,29 @@ void mc6852_device::write(offs_t offset, uint8_t data) /* transmitter reset */ if (data & C1_TX_RS) { - /* When Tx Rs is set, it clears the transmitter - control section, Transmitter Shift Register, Tx Data FIFO - Control (the Tx Data FIFO can be reloaded after one E clock - pulse), the Transmitter Underflow status bit, and the CTS interrupt, - and inhibits the TDRA status bit (in the one-sync-character - and two-sync-character modes).*/ + // When Tx Rs is set, it clears the transmitter + // control section, Transmitter Shift Register, Tx + // Data FIFO Control (the Tx Data FIFO can be reloaded + // after one E clock pulse), the Transmitter Underflow + // status bit, and the CTS interrupt. LOG("MC6852 Transmitter Reset\n"); - m_status &= ~(S_TUF | S_CTS | S_TDRA); + m_status &= ~(S_TUF | S_CTS); + m_status |= S_TDRA; + m_tx_fifo = std::queue(); transmit_register_reset(); } - if (data & C1_STRIP_SYNC) LOG("MC6852 Strip Synchronization Characters\n"); - if (data & C1_CLEAR_SYNC) LOG("MC6852 Clear Synchronization\n"); + if (data & C1_STRIP_SYNC) + LOG("MC6852 Strip Synchronization Characters\n"); + + if (data & C1_CLEAR_SYNC) + { + LOG("MC6852 Clear Synchronization\n"); + m_in_sync = 0; + } m_cr[0] = data; } diff --git a/src/devices/machine/mc6852.h b/src/devices/machine/mc6852.h index 3f05182ed6f..27e7ec9f962 100644 --- a/src/devices/machine/mc6852.h +++ b/src/devices/machine/mc6852.h @@ -64,6 +64,11 @@ public: DECLARE_READ_LINE_MEMBER( sm_dtr_r ) { return m_sm_dtr; } DECLARE_READ_LINE_MEMBER( tuf_r ) { return m_tuf; } + // These are to allow integration of this driver with code + // controlling floppy disks. + void receive_byte(uint8_t data); + uint8_t get_tx_byte(int *tuf); + protected: // device-level overrides virtual void device_start() override; @@ -148,6 +153,7 @@ private: int m_dcd; // data carrier detect int m_sm_dtr; // sync match/data terminal ready int m_tuf; // transmitter underflow + int m_in_sync; }; -- cgit v1.2.3 From 5972474a21b12728fa9703c1fec8f94c0562f825 Mon Sep 17 00:00:00 2001 From: 68bit <53298758+68bit@users.noreply.github.com> Date: Sat, 11 Jul 2020 05:41:52 +1000 Subject: New machines added as WORKING New machines added as WORKING --- Motorola EXORterm 155 [68bit] --- scripts/src/bus.lua | 2 + scripts/src/machine.lua | 20 + scripts/target/mame/mess.lua | 7 + src/devices/bus/rs232/exorterm.cpp | 87 ++++ src/devices/bus/rs232/exorterm.h | 40 ++ src/devices/machine/exorterm.cpp | 906 +++++++++++++++++++++++++++++++++++++ src/devices/machine/exorterm.h | 154 +++++++ src/emu/layout/exorterm155.lay | 80 ++++ src/mame/drivers/exorterm.cpp | 58 +++ src/mame/mame.lst | 3 + src/mame/mess.flt | 1 + 11 files changed, 1358 insertions(+) create mode 100644 src/devices/bus/rs232/exorterm.cpp create mode 100644 src/devices/bus/rs232/exorterm.h create mode 100644 src/devices/machine/exorterm.cpp create mode 100644 src/devices/machine/exorterm.h create mode 100644 src/emu/layout/exorterm155.lay create mode 100644 src/mame/drivers/exorterm.cpp diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 35910c430c3..323dc624095 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -2528,6 +2528,8 @@ if (BUSES["RS232"]~=null) then MAME_DIR .. "src/devices/bus/rs232/ie15.h", MAME_DIR .. "src/devices/bus/rs232/swtpc8212.cpp", MAME_DIR .. "src/devices/bus/rs232/swtpc8212.h", + MAME_DIR .. "src/devices/bus/rs232/exorterm.cpp", + MAME_DIR .. "src/devices/bus/rs232/exorterm.h", } end diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index 686018bff27..ddacf5da639 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -1239,6 +1239,26 @@ if (MACHINES["ER2055"]~=null) then } end +--------------------------------------------------- +-- +--@src/devices/machine/exorterm.h,MACHINES["EXORTERM"] = true +--------------------------------------------------- + +if (MACHINES["EXORTERM"]~=null) then + files { + MAME_DIR .. "src/devices/machine/exorterm.cpp", + MAME_DIR .. "src/devices/machine/exorterm.h", + } + + dependency { + { MAME_DIR .. "src/devices/machine/exorterm.cpp", GEN_DIR .. "emu/layout/exorterm155.lh" }, + } + + custombuildtask { + layoutbuildtask("emu/layout", "exorterm155"), + } +end + --------------------------------------------------- -- --@src/devices/machine/f3853.h,MACHINES["F3853"] = true diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 5bb226d03c0..3e3cdee2606 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -497,6 +497,7 @@ MACHINES["E05A30"] = true MACHINES["EEPROMDEV"] = true MACHINES["ER1400"] = true MACHINES["ER2055"] = true +MACHINES["EXORTERM"] = true MACHINES["F3853"] = true MACHINES["HD63450"] = true MACHINES["HD64610"] = true @@ -1185,6 +1186,7 @@ function linkProjects_mame_mess(_target, _subtarget) "epson", "ericsson", "exidy", + "exorterm", "fairch", "fairlight", "fidelity", @@ -2319,6 +2321,11 @@ files { MAME_DIR .. "src/mame/machine/micropolis.h", } +createMESSProjects(_target, _subtarget, "exorterm") +files { + MAME_DIR .. "src/mame/drivers/exorterm.cpp", +} + createMESSProjects(_target, _subtarget, "fairch") files { MAME_DIR .. "src/mame/drivers/channelf.cpp", diff --git a/src/devices/bus/rs232/exorterm.cpp b/src/devices/bus/rs232/exorterm.cpp new file mode 100644 index 00000000000..d47c15b4d54 --- /dev/null +++ b/src/devices/bus/rs232/exorterm.cpp @@ -0,0 +1,87 @@ +// license:BSD-3-Clause +// copyright-holders:68bit + +#include "emu.h" +#include "exorterm.h" + +exorterm155_terminal_device::exorterm155_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, SERIAL_TERMINAL_EXORTERM155, tag, owner, clock) + , device_rs232_port_interface(mconfig, *this) + , m_exorterm155(*this, "exorterm155") + , m_flow_control(*this, "FLOW_CONTROL") +{ +} + +void exorterm155_terminal_device::device_add_mconfig(machine_config &config) +{ + EXORTERM155(config, m_exorterm155, 0); + m_exorterm155->rs232_conn_txd_handler().set(FUNC(exorterm155_terminal_device::output_rxd)); + m_exorterm155->rs232_conn_rts_handler().set(FUNC(exorterm155_terminal_device::route_term_rts)); + m_exorterm155->rs232_conn_dtr_handler().set(FUNC(exorterm155_terminal_device::route_term_dtr)); +} + +INPUT_PORTS_START(exorterm155_terminal) + + PORT_START("FLOW_CONTROL") + PORT_CONFNAME(0x1, 1, "Flow Control") PORT_CHANGED_MEMBER(DEVICE_SELF, exorterm155_terminal_device, flow_control, 0) + PORT_CONFSETTING(0x00, "None") + PORT_CONFSETTING(0x01, "Terminal DTR to remote CTS") + +INPUT_PORTS_END + +ioport_constructor exorterm155_terminal_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(exorterm155_terminal); +} + +WRITE_LINE_MEMBER(exorterm155_terminal_device::input_txd) +{ + m_exorterm155->rs232_conn_rxd_w(state); +} + +WRITE_LINE_MEMBER(exorterm155_terminal_device::route_term_rts) +{ + // Loop the terminal RTS output to the terminal CTS input. + m_exorterm155->rs232_conn_cts_w(state); +} + +// This terminal uses DTR for hardware flow control. +WRITE_LINE_MEMBER(exorterm155_terminal_device::route_term_dtr) +{ + if (m_flow_control->read()) + { + // Connect the terminal DTR output to CTS at the other end. + output_cts(state); + } + + // Cache the state, in case the ioport setting changes. + m_dtr = state; +} + +INPUT_CHANGED_MEMBER(exorterm155_terminal_device::flow_control) +{ + if (newval) + output_cts(m_dtr); + else + output_cts(0); +} + +void exorterm155_terminal_device::device_start() +{ + save_item(NAME(m_dtr)); +} + +void exorterm155_terminal_device::device_reset() +{ + // To the terminal + m_exorterm155->rs232_conn_cts_w(0); + + // To the computer + output_rxd(1); + output_dcd(0); + output_dsr(0); + if (!m_flow_control->read()) + output_cts(0); +} + +DEFINE_DEVICE_TYPE(SERIAL_TERMINAL_EXORTERM155, exorterm155_terminal_device, "exorterm155_terminal", "EXORterm 155 Terminal") diff --git a/src/devices/bus/rs232/exorterm.h b/src/devices/bus/rs232/exorterm.h new file mode 100644 index 00000000000..c8ae8298b13 --- /dev/null +++ b/src/devices/bus/rs232/exorterm.h @@ -0,0 +1,40 @@ +// license:BSD-3-Clause +// copyright-holders:68bit + +#ifndef MAME_BUS_RS232_EXORTERM_H +#define MAME_BUS_RS232_EXORTERM_H + +#pragma once + +#include "rs232.h" +#include "machine/exorterm.h" + + +class exorterm155_terminal_device : public device_t, public device_rs232_port_interface +{ +public: + exorterm155_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + virtual DECLARE_WRITE_LINE_MEMBER(input_txd) override; + + DECLARE_INPUT_CHANGED_MEMBER(flow_control); + +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + +private: + required_device m_exorterm155; + required_ioport m_flow_control; + + DECLARE_WRITE_LINE_MEMBER(route_term_rts); + DECLARE_WRITE_LINE_MEMBER(route_term_dtr); + + int m_dtr; +}; + +DECLARE_DEVICE_TYPE(SERIAL_TERMINAL_EXORTERM155, exorterm155_terminal_device) + +#endif // MAME_BUS_RS232_EXORTERM_H diff --git a/src/devices/machine/exorterm.cpp b/src/devices/machine/exorterm.cpp new file mode 100644 index 00000000000..923dc049ee7 --- /dev/null +++ b/src/devices/machine/exorterm.cpp @@ -0,0 +1,906 @@ +// license:BSD-3-Clause +// copyright-holders: 68bit +/**************************************************************************** + +Motorola EXORterm 155 (M68SDS) + +The terminfo database has an entry for this terminal named 'ex155'. + +TODO + - Keyboard layout. All the codes appear to have been implemented following + the manual but have not been checked with hardware. The key repetition + rate and delay need to be checked. + - Video character ROM needs dumping. An apparently close Motorola published + 7x9 character set has been substituted for now, but three of the codes + (0x1a, 0x1b, and 0x1c) do not match the characters listed in the manual. + +****************************************************************************/ + +#include "emu.h" +#include "machine/exorterm.h" +#include "speaker.h" + +#include "exorterm155.lh" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +exorterm155_device::exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , m_maincpu(*this, "maincpu") + , m_irqs(*this, "irqs") + , m_acia(*this, "acia") + , m_brg(*this, "brg") + , m_rs232_baud(*this, "RS232_BAUD") + , m_disable_fac(*this, "DISABLE_FAC") + , m_display_fac(*this, "DISPLAY_FAC") + , m_pia_kbd(*this, "pia_kbd") + , m_pia_cfg(*this, "pia_cfg") + , m_pia_disp(*this, "pia_disp") + , m_screen(*this, "screen") + , m_palette(*this, "palette") + , m_sys_timer_clock(*this, "sys_timer_clock") + , m_vram(*this, "videoram") + , m_chargen(*this, "chargen") + , m_beeper(*this, "beeper") + , m_online_led(*this, "online_led") + , m_auto_lf_led(*this, "auto_lf_led") + , m_page_mode_led(*this, "page_mode_led") + , m_insert_char_led(*this, "insert_char_led") + , m_rs232_conn_txd_handler(*this) + , m_rs232_conn_dtr_handler(*this) + , m_rs232_conn_rts_handler(*this) + // Keyboard + , m_kbd_scan_timer(nullptr) + , m_kbd_repeat_timer(nullptr) + , m_kbd_modifiers(*this, "KBD_MOD") + , m_kbd_rows(*this, "KBD_ROW%u", 0) + , m_kbd_next_row(0) + , m_kbd_processing(0) + , m_kbd_repeat_row(0) + , m_kbd_repeat_column(0) + , m_kbd_last_modifiers(0) +{ +} + +exorterm155_device::exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : exorterm155_device(mconfig, EXORTERM155, tag, owner, clock) +{ +} + +//************************************************************************** +// ADDRESS MAPS +//************************************************************************** + +void exorterm155_device::mem_map(address_map &map) +{ + // 2 x 1Kx4 static RAM. + map(0x0000, 0x03ff).ram(); // Scratch RAM + + map(0xa000, 0xa7ff).rom(); // U89 68K edit mode + //map(0xa800, 0xafff).rom(); // U70 (reserved) + //map(0xb000, 0xb7ff).rom(); // U59 (reserved) + map(0xc000, 0xc7ff).rom(); // U49 Extended display + map(0xc800, 0xcfff).rom(); // U104 Basic display #1 + map(0xd000, 0xd7ff).rom(); // U98 Basic display #2 + // Appears to mirror to ff00-ffff for the reset vectors. + map(0xd800, 0xdfff).rom().mirror(0x2000); // U78 Terminal control + + // 4 x 1Kx4 static RAM. + map(0xe000, 0xe7ff).ram().share(m_vram); + + map(0xef00, 0xef01).rw(m_acia, FUNC(acia6850_device::read), FUNC(acia6850_device::write)); + map(0xef04, 0xef07).rw(m_pia_kbd, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0xef08, 0xef0b).rw(m_pia_cfg, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0xef0c, 0xef0f).rw(m_pia_disp, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); +} + + +//************************************************************************** +// INPUT PORT DEFINITIONS +//************************************************************************** + +INPUT_PORTS_START( exorterm155 ) + + PORT_START("DISABLE_FAC") + PORT_DIPNAME(0x01, 0x01, "Disable FAC codes") PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING(0x00, "On") + PORT_DIPSETTING(0x01, "Off") + + PORT_START("DISPLAY_FAC") + PORT_DIPNAME(0x01, 0x01, "Display FAC codes") PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING(0x00, "On") + PORT_DIPSETTING(0x01, "Off") + + PORT_START("DIP_SWITCHES_A") + PORT_DIPNAME(0x01, 0x01, "Stop bits") PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING(0x00, "2") + PORT_DIPSETTING(0x01, "1") + PORT_DIPNAME(0x02, 0x02, "Duplex") PORT_DIPLOCATION("SW2:1") + PORT_DIPSETTING(0x00, "Half") + PORT_DIPSETTING(0x02, "Full") + PORT_DIPNAME(0x04, 0x04, "Parity") PORT_DIPLOCATION("SW2:2") + PORT_DIPSETTING(0x00, "Yes") + PORT_DIPSETTING(0x04, "No") + PORT_DIPNAME(0x08, 0x08, "Parity") PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING(0x00, "Odd") + PORT_DIPSETTING(0x08, "Even") + PORT_DIPNAME(0x10, 0x00, "Word size") PORT_DIPLOCATION("SW2:4") + PORT_DIPSETTING(0x00, "8-bit") + PORT_DIPSETTING(0x10, "7-bit") + PORT_DIPNAME(0x20, 0x00, "Connection") PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING(0x00, "Direct") + PORT_DIPSETTING(0x20, "Modem") + PORT_DIPNAME(0x40, 0x40, "Modem Type") PORT_DIPLOCATION("SW2:7") + PORT_DIPSETTING(0x00, "202") + PORT_DIPSETTING(0x40, "103") + PORT_DIPNAME(0x80, 0x80, "Turnaround") PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING(0x00, "Code") + PORT_DIPSETTING(0x80, "S-chan") + + PORT_START("DIP_SWITCHES_B") + PORT_DIPNAME(0x01, 0x01, "Code") PORT_DIPLOCATION("SW2:9") + PORT_DIPSETTING(0x00, "ETX") + PORT_DIPSETTING(0x01, "EOT") + PORT_DIPNAME(0x02, 0x02, "Spare 1") PORT_DIPLOCATION("SW1:5") + PORT_DIPSETTING(0x00, "On") + PORT_DIPSETTING(0x02, "Off") + PORT_DIPNAME(0x04, 0x04, "Spare 2") PORT_DIPLOCATION("SW1:6") + PORT_DIPSETTING(0x00, "On") + PORT_DIPSETTING(0x04, "Off") + PORT_DIPNAME(0x08, 0x08, "Spare 3") PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING(0x00, "On") + PORT_DIPSETTING(0x08, "Off") + PORT_DIPNAME(0x10, 0x10, "Display special characters") PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING(0x00, "On") + PORT_DIPSETTING(0x10, "Off") + PORT_DIPNAME(0x40, 0x40, "Transparent mode") PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING(0x00, "On") + PORT_DIPSETTING(0x40, "Off") + PORT_DIPNAME(0x80, 0x80, "Video invert") PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING(0x00, "Invert") + PORT_DIPSETTING(0x80, "Normal") + + PORT_START("RS232_BAUD") + PORT_DIPNAME(0x1ff, 0x01, "RS232 Baud Rate") + PORT_DIPSETTING(0x100, "110") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x080, "150") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x040, "300") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x020, "600") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x010, "1200") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x008, "1800") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x004, "2400") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x002, "4800") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + PORT_DIPSETTING(0x001, "9600") PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8,9") + + // Keyboard + + PORT_START("KBD_MOD") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("All Caps") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) + + PORT_START("KBD_ROW0") + PORT_BIT( 0x00001, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) + PORT_BIT( 0x00002, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) + PORT_BIT( 0x00004, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) + PORT_BIT( 0x00008, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) + PORT_BIT( 0x00010, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) + PORT_BIT( 0x00020, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) + PORT_BIT( 0x00040, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) + PORT_BIT( 0x00080, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) + PORT_BIT( 0x00100, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) + PORT_BIT( 0x00200, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) + PORT_BIT( 0x00400, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) + PORT_BIT( 0x00800, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) + PORT_BIT( 0x01000, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x02000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME("Auto LF") + PORT_BIT( 0x04000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Online") + PORT_BIT( 0x08000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("Page Mode") + PORT_BIT( 0x10000, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("KBD_ROW1") + PORT_BIT( 0x00001, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT( 0x00002, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + PORT_BIT( 0x00004, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT( 0x00008, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT( 0x00010, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT( 0x00020, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') + PORT_BIT( 0x00040, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + PORT_BIT( 0x00080, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') + PORT_BIT( 0x00100, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') + PORT_BIT( 0x00200, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT( 0x00400, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~') + PORT_BIT( 0x00800, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT( 0x01000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT( 0x02000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PAUSE) PORT_NAME("Break") PORT_CHAR(UCHAR_MAMEKEY(CANCEL)) + PORT_BIT( 0x04000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_NAME("Insert Character") PORT_CHAR(UCHAR_MAMEKEY(INSERT)) + PORT_BIT( 0x08000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Delete Character") PORT_CHAR(UCHAR_MAMEKEY(DEL)) + PORT_BIT( 0x10000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("Set Tabs") + + PORT_START("KBD_ROW2") + PORT_BIT( 0x00001, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_NAME("Escape") PORT_CHAR(UCHAR_MAMEKEY(ESC)) + PORT_BIT( 0x00002, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT( 0x00004, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT( 0x00008, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT( 0x00010, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT( 0x00020, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT( 0x00040, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT( 0x00080, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT( 0x00100, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT( 0x00200, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + PORT_BIT( 0x00400, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT( 0x00800, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') + PORT_BIT( 0x01000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("Linefeed") + PORT_BIT( 0x02000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Return") PORT_CHAR(0x0dU) + PORT_BIT( 0x04000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_NAME("Forward Tab") PORT_CHAR('\t') + PORT_BIT( 0x08000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Back Tab") + PORT_BIT( 0x10000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Line Delete") + + PORT_START("KBD_ROW3") + PORT_BIT( 0x00001, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT( 0x00002, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT( 0x00004, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT( 0x00008, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT( 0x00010, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT( 0x00020, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT( 0x00040, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT( 0x00080, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT( 0x00100, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT( 0x00200, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') + PORT_BIT( 0x00400, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') + PORT_BIT( 0x00800, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT( 0x01000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT( 0x02000, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_NAME("Cursor Up") PORT_CHAR(UCHAR_MAMEKEY(UP)) + PORT_BIT( 0x08000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Cursor Down") PORT_CHAR(UCHAR_MAMEKEY(DOWN)) + PORT_BIT( 0x10000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Line Insert") + + PORT_START("KBD_ROW4") + PORT_BIT( 0x00001, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("Home / Clear") + PORT_BIT( 0x00002, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT( 0x00004, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT( 0x00008, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT( 0x00010, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT( 0x00020, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT( 0x00040, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT( 0x00080, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT( 0x00100, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT( 0x00200, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT( 0x00400, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT( 0x00800, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Page Send / Line Send") + PORT_BIT( 0x01000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT( 0x02000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Backspace") PORT_CHAR(0x08U) + PORT_BIT( 0x04000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Cursor Left") PORT_CHAR(UCHAR_MAMEKEY(LEFT)) + PORT_BIT( 0x08000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Cursor Right") PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) + PORT_BIT( 0x10000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Page Erase / Line Erase") + +INPUT_PORTS_END + + +// PA0 to PA6 - Keyboard data. +u8 exorterm155_device::pia_kbd_pa_r() +{ + u8 ret = m_term_data; + m_term_data = 0; + return ret; +} + +u8 exorterm155_device::pia_kbd_pb_r() +{ + // PB7 is a 'keyboard attached' signal, low when a keyboard is attached. + return 0x00; +} + +void exorterm155_device::pia_kbd_pb_w(u8 data) +{ + m_online_led = BIT(data, 0) ? 0 : 1; + m_auto_lf_led = BIT(data, 1) ? 0 : 1; + m_page_mode_led = BIT(data, 2) ? 0 : 1; + m_insert_char_led = BIT(data, 5) ? 0 : 1; + // Bit 3 is AUX ON, and bit 4 is AUX EN, but it is not clear + // if the firmware uses these? +} + +WRITE_LINE_MEMBER(exorterm155_device::pia_cfg_cb2_w) +{ + m_beeper->set_state(!state); +} + +void exorterm155_device::pia_disp_pa_w(u8 data) +{ + m_cursor_addr = (m_cursor_addr & 0x700) | data; +} + +u8 exorterm155_device::pia_disp_pb_r() +{ + u8 ret = 0; + + if (m_dsr) + ret |= 0x20; + + return ret; +} + +void exorterm155_device::pia_disp_pb_w(u8 data) +{ + m_cursor_addr = (m_cursor_addr & 0x0ff) | ((data & 0x7) << 8); + + m_inv_video = BIT(data, 3); + m_special_char_disp = BIT(data, 4); + + m_rs232_conn_dtr_handler(BIT(data, 7)); +} + +READ_LINE_MEMBER(exorterm155_device::pia_disp_ca2_r) +{ + return m_ring; +} + +//************************************************************************** +// VIDEO EMULATION +//************************************************************************** + +u32 exorterm155_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + u16 sy = 0, ma = 0; + u8 disable_fac = m_disable_fac->read() == 0; + u8 display_fac = m_display_fac->read() == 0; + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + + m_framecnt++; + + for (u8 y = 0; y < 24; y++) + { + for (u8 ra = 0; ra < 12; ra++) + { + u32 *p = &bitmap.pix32(sy++); + // FAC codes are cleared on horizontal sync. + u8 underline1 = 0; + u8 underline2 = 0; + u8 non_display = 0; + u8 invert = 0; + u8 half_bright = 0; + u8 blink = 0; + + for (u16 x = ma; x < ma + 80; x++) + { + u8 code = m_vram[x + 0x80]; + u16 gfx = 0; + + if (BIT(code, 7) && !disable_fac) + { + underline1 = BIT(code, 4); + non_display = BIT(code, 3); + invert = BIT(code, 2); + half_bright = BIT(code, 1); + blink = BIT(code, 0); + } + + // Copying the circuit logic for loading from + // the character generator which occurs when: + // + // 1. Special character display is enabled or + // it is not a special character 0x00 to 0x1f. + // + // AND + // + // 2. Not 'non display' + // + // AND + // + // 3. Not 'blink' and blinked off. + // + // AND + // + // 4. Not FAC code or Display FAC enabled. + // + if ((m_special_char_disp || (code & 0xe0)) && + !non_display && + !(blink && (m_framecnt & 8)) && + (!BIT(code, 7) || display_fac)) + { + offs_t address = ((code & 0x7f) << 4) | (ra & 0x0f); + gfx = m_chargen[address]; + } + + if (underline1 && underline2 && ra == 10) + gfx |= 0x1ff; + + u8 cursor_display = x + 0x80 == m_cursor_addr; + cursor_display = cursor_display && (m_framecnt & 4); + + if (m_inv_video ^ invert ^ cursor_display) + gfx ^= 0x1ff; // invert + + u32 font_color = palette[2 - half_bright]; + + /* Display a scanline of a character */ + *p++ = (BIT(gfx, 7)) ? font_color : 0; + *p++ = (BIT(gfx, 6)) ? font_color : 0; + *p++ = (BIT(gfx, 5)) ? font_color : 0; + *p++ = (BIT(gfx, 4)) ? font_color : 0; + *p++ = (BIT(gfx, 3)) ? font_color : 0; + *p++ = (BIT(gfx, 2)) ? font_color : 0; + *p++ = (BIT(gfx, 1)) ? font_color : 0; + *p++ = (BIT(gfx, 0)) ? font_color : 0; + *p++ = (BIT(gfx, 8)) ? font_color : 0; + + // The circuit has logic to delay underlining + // but not for the other attributes. + underline2 = underline1; + } + } + ma += 80; + } + + return 0; +} + +static const gfx_layout char_layout = +{ + 8,12, + RGN_FRAC(1,1), + 1, + { 0 }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 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*16 +}; + +static GFXDECODE_START(chars) + GFXDECODE_ENTRY("chargen", 0, char_layout, 0, 1) +GFXDECODE_END + +//************************************************************************** +// MACHINE EMULATION +//************************************************************************** + +WRITE_LINE_MEMBER(exorterm155_device::sys_timer_w) +{ + // 3.4ms + m_pia_disp->cb1_w(state); + + // Divide by 16, giving 27.5ms. + if (state == 1) m_sys_timer_count++; + m_pia_disp->ca1_w((m_sys_timer_count & 8) != 0); + + // The terminal firmware does not initialize properly if a key + // interrupt is received too soon after reset, so a hold off period is + // implemented and measured in terms of these timer interrupts. + if (m_kbd_start_holdoff > 0) + { + if (m_kbd_start_holdoff == 1) + kbd_start_processing(); + m_kbd_start_holdoff--; + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f1_clock) +{ + if (BIT(m_rs232_baud->read(), 0)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f3_clock) +{ + if (BIT(m_rs232_baud->read(), 1)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f5_clock) +{ + if (BIT(m_rs232_baud->read(), 2)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f6_clock) +{ + if (BIT(m_rs232_baud->read(), 3)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f7_clock) +{ + if (BIT(m_rs232_baud->read(), 4)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f8_clock) +{ + if (BIT(m_rs232_baud->read(), 5)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f9_clock) +{ + if (BIT(m_rs232_baud->read(), 6)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f11_clock) +{ + if (BIT(m_rs232_baud->read(), 7)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::write_f13_clock) +{ + if (BIT(m_rs232_baud->read(), 8)) + { + m_acia->write_txc(state); + m_acia->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(exorterm155_device::acia_txd_w) +{ + m_rs232_conn_txd_handler(state); +} + +WRITE_LINE_MEMBER(exorterm155_device::acia_rts_w) +{ + m_rs232_conn_rts_handler(state); +} + +WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_dcd_w) +{ + m_acia->write_dcd(state); +} + +WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_dsr_w) +{ + // Input of Display PIA PB5, pulled high. + m_dsr = state; +} + +WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_ri_w) +{ + m_ring = state; +} + +WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_cts_w) +{ + m_acia->write_cts(state); +} + +WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_rxd_w) +{ + m_acia->write_rxd(state); +} + + +// Keyboard + +u8 const exorterm155_device::translation_table[][5][17] = { + { // Standard + { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xff, 0xf7, 0xf8, 0xc7, 0xff }, + { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '`', '-', '=', 0x8c, 0xd0, 0xd1, 0xdc }, + { 0x1b, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '\\', 0x0a, 0x0d, 0xda, 0xdb, 0xd7 }, + { 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '[', ']', 0xff, 0xc1, 0xc2, 0xd6 }, + { 0xc0, 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', 0xd9, ' ', 0x08, 0xc3, 0xc4, 0xd4 } + }, + { // Shift + { 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xff, 0xff, 0xff, 0xff, 0xff }, + { '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '~', '_', '+', 0xff, 0xd6, 0xd7, 0xff }, + { 0x1b , 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '|', 0x0a, 0x0d, 0xdb, 0xff, 0xff }, + { 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', '{', '}', 0xff, 0xff, 0xff, 0xff }, + { 0xd8, 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?', 0xdf, ' ', 0x08, 0xff, 0xff, 0xd5 } + }, + { // Ctrl + { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xff, 0xff, 0xff, 0xff, 0xff }, + { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 0x00, 0x1f, 0x1e, 0xff, 0xff, 0xff, 0xff }, + { 0x1b, 0x11, 0x17, 0x05, 0x12, 0x14, 0x19, 0x15, 0x09, 0x0f, 0x10, 0x1c, 0x0a, 0x0d, 0x09, 0xff, 0xff }, + { 0x01, 0x13, 0x04, 0x06, 0x07, 0x08, 0x0a, 0x0b, 0x0c, ';', '\'', 0x1b, 0x1d, 0xff, 0xff, 0xff, 0xff }, + { 0xff, 0x1a, 0x18, 0x03, 0x16, 0x02, 0x0e, 0x0d, ',', '.', 0x1f, 0xff, 0x00, 0x08, 0xff, 0xff, 0xff } + } +}; + +bool const exorterm155_device::caps_table[5][17] = { + { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }, + { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }, + { false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false }, + { true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false }, + { false, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false } +}; + +void exorterm155_device::kbd_start_processing() +{ + attotime period = attotime::from_hz(2'400); + m_kbd_processing = 1; + m_kbd_scan_timer->adjust(period, 0, period); +} + +void exorterm155_device::kbd_reset_state() +{ + std::fill(std::begin(m_kbd_states), std::end(m_kbd_states), ioport_value(0)); + m_kbd_next_row = 0; +} + +void exorterm155_device::kbd_repeat_start(uint8_t row, uint8_t column) +{ + attotime delay = attotime::from_msec(750); + attotime interval = attotime::from_msec(100); + + m_kbd_repeat_row = row; + m_kbd_repeat_column = column; + m_kbd_repeat_timer->adjust(delay, 0, interval); +} + +void exorterm155_device::kbd_repeat_restart() +{ + attotime delay = attotime::from_msec(750); + attotime interval = attotime::from_msec(100); + + if ((m_kbd_repeat_row != 0xff) || (m_kbd_repeat_column != 0xff)) + m_kbd_repeat_timer->adjust(delay, 0, interval); +} + +void exorterm155_device::kbd_repeat_stop() +{ + m_kbd_repeat_row = 0xff; + m_kbd_repeat_column = 0xff; + m_kbd_repeat_timer->reset(); +} + +void exorterm155_device::kbd_send_translated(u8 code) +{ + unsigned row = (code >> 5) & 0x07; + unsigned col = (code >> 0) & 0x1f; + + u16 modifiers = m_kbd_modifiers->read(); + bool shift = BIT(modifiers, 1) != ((modifiers & 4) && caps_table[row][col]); + bool ctrl = BIT(modifiers, 0); + + unsigned map = ctrl ? 2 : shift ? 1 : 0; + u8 result = translation_table[map][row][col]; + + if (result == 0xff) + return; + + m_term_data = result; + // Triggers on the falling edge. + m_pia_kbd->ca1_w(ASSERT_LINE); + m_pia_kbd->ca1_w(CLEAR_LINE); + m_pia_kbd->ca1_w(ASSERT_LINE); +} + +TIMER_CALLBACK_MEMBER(exorterm155_device::kbd_scan_row) +{ + u16 const modifiers(m_kbd_modifiers->read()); + if (modifiers != m_kbd_last_modifiers) + kbd_repeat_restart(); + + m_kbd_last_modifiers = modifiers; + + ioport_value &state(m_kbd_states[m_kbd_next_row]); + ioport_value const keys(m_kbd_rows[m_kbd_next_row]->read()); + ioport_value const change(state ^ keys); + + ioport_value mask(1U); + for (uint8_t column = 0U; m_kbd_processing && (state != keys); ++column, mask <<= 1) + { + if (change & mask) + { + state ^= mask; + if (keys & mask) + { + kbd_send_translated((m_kbd_next_row << 5) | column); + kbd_repeat_start(m_kbd_next_row, column); + } + else + { + if (m_kbd_repeat_row == m_kbd_next_row && m_kbd_repeat_column == column) + kbd_repeat_stop(); + } + } + } + + m_kbd_next_row = (m_kbd_next_row + 1) % 5; +} + +TIMER_CALLBACK_MEMBER(exorterm155_device::kbd_repeat) +{ + assert((m_kbd_repeat_row != 0xff) || (m_kbd_repeat_column != 0xff)); + kbd_send_translated((m_kbd_repeat_row << 5) | m_kbd_repeat_column); +} + + + + +void exorterm155_device::device_resolve_objects() +{ + m_rs232_conn_dtr_handler.resolve_safe(); + m_rs232_conn_rts_handler.resolve_safe(); + m_rs232_conn_txd_handler.resolve_safe(); +} + +void exorterm155_device::device_start() +{ + m_online_led.resolve(); + m_auto_lf_led.resolve(); + m_page_mode_led.resolve(); + m_insert_char_led.resolve(); + + // register for save states + save_item(NAME(m_term_data)); + save_item(NAME(m_framecnt)); + save_item(NAME(m_cursor_addr)); + save_item(NAME(m_inv_video)); + save_item(NAME(m_special_char_disp)); + + save_item(NAME(m_sys_timer_count)); + save_item(NAME(m_dsr)); + save_item(NAME(m_ring)); + save_item(NAME(m_kbd_start_holdoff)); + + // Keyboard + + if (!m_kbd_scan_timer) + m_kbd_scan_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exorterm155_device::kbd_scan_row), this)); + if (!m_kbd_repeat_timer) + m_kbd_repeat_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exorterm155_device::kbd_repeat), this)); + kbd_reset_state(); + kbd_repeat_stop(); + + save_item(NAME(m_kbd_states)); + save_item(NAME(m_kbd_next_row)); + save_item(NAME(m_kbd_processing)); + save_item(NAME(m_kbd_repeat_row)); + save_item(NAME(m_kbd_repeat_column)); + save_item(NAME(m_kbd_last_modifiers)); +} + +void exorterm155_device::device_reset() +{ + m_brg->rsa_w(CLEAR_LINE); + m_brg->rsb_w(ASSERT_LINE); + + m_online_led = 0; + m_auto_lf_led = 0; + m_page_mode_led = 0; + m_insert_char_led = 0; + + m_framecnt = 0; + m_cursor_addr = 0; + m_inv_video = 0; + m_special_char_disp = 0; + m_sys_timer_count = 0; + + m_dsr = 1; + m_ring = 0; + + m_beeper->set_state(0); + + // Keyboard + kbd_reset_state(); + kbd_repeat_stop(); + m_kbd_start_holdoff = 180; + m_kbd_last_modifiers = 0; +} + + +//************************************************************************** +// ROM DEFINITIONS +//************************************************************************** + +ROM_START( exorterm155 ) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD("51aw1018b25.bin", 0xa000, 0x0800, CRC(5f9352ba) SHA1(9fb52992bd3f3409fa8ec1002e2ebdf61318d260)) + ROM_LOAD("51aw1018b22.bin", 0xc000, 0x0800, CRC(b6bb9df0) SHA1(5c0bda69d94fd58c21f07c810525043cd22a9d7d)) + ROM_LOAD("51aw1018b27.bin", 0xc800, 0x0800, CRC(15f77b53) SHA1(1f73098ebf83d7255efcf2b509d12e559001ca5b)) + ROM_LOAD("51aw1018b26.bin", 0xd000, 0x0800, CRC(f5b204bc) SHA1(9815fd7d7ba617ebb3f55e595e4931d75942b6a9)) + ROM_LOAD("51aw1018b24.bin", 0xd800, 0x0800, CRC(18a0ed66) SHA1(5fa6e4b3c27969c1d7e27c79fc2993e4cc9262cf)) + + ROM_REGION(0x0800, "chargen", 0) + ROM_LOAD("chargen.rom", 0x0000, 0x0800, CRC(0087cbad) SHA1(a6d3dd0512db4c459944c60d728536755a570964)) + +ROM_END + +//************************************************************************** +// MACHINE DEFINTIONS +//************************************************************************** + +void exorterm155_device::device_add_mconfig(machine_config &config) +{ + M6800(config, m_maincpu, 16.6698_MHz_XTAL / 18); + m_maincpu->set_addrmap(AS_PROGRAM, &exorterm155_device::mem_map); + + INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set_inputline(m_maincpu, M6800_IRQ_LINE); + + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(50); + m_screen->set_size(80*9, 24*12); + m_screen->set_visarea(0, 80*9-1, 0, 24*12-1); + m_screen->set_screen_update(FUNC(exorterm155_device::screen_update)); + + PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT); + + GFXDECODE(config, "gfxdecode", m_palette, chars); + + config.set_default_layout(layout_exorterm155); + + ACIA6850(config, m_acia, 0); + m_acia->txd_handler().set(FUNC(exorterm155_device::acia_txd_w)); + m_acia->rts_handler().set(FUNC(exorterm155_device::acia_rts_w)); + m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); + + MC14411(config, m_brg, XTAL(1'843'200)); + m_brg->out_f<1>().set(FUNC(exorterm155_device::write_f1_clock)); + m_brg->out_f<3>().set(FUNC(exorterm155_device::write_f3_clock)); + m_brg->out_f<5>().set(FUNC(exorterm155_device::write_f5_clock)); + m_brg->out_f<6>().set(FUNC(exorterm155_device::write_f6_clock)); + m_brg->out_f<7>().set(FUNC(exorterm155_device::write_f7_clock)); + m_brg->out_f<8>().set(FUNC(exorterm155_device::write_f8_clock)); + m_brg->out_f<9>().set(FUNC(exorterm155_device::write_f9_clock)); + m_brg->out_f<11>().set(FUNC(exorterm155_device::write_f11_clock)); + m_brg->out_f<13>().set(FUNC(exorterm155_device::write_f13_clock)); + + PIA6821(config, m_pia_kbd); + m_pia_kbd->readpa_handler().set(FUNC(exorterm155_device::pia_kbd_pa_r)); + m_pia_kbd->readpb_handler().set(FUNC(exorterm155_device::pia_kbd_pb_r)); + m_pia_kbd->writepb_handler().set(FUNC(exorterm155_device::pia_kbd_pb_w)); + m_pia_kbd->irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); + m_pia_kbd->irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<2>)); + + PIA6821(config, m_pia_cfg); + m_pia_cfg->readpa_handler().set_ioport("DIP_SWITCHES_A"); + m_pia_cfg->readpb_handler().set_ioport("DIP_SWITCHES_B"); + m_pia_cfg->cb2_handler().set(FUNC(exorterm155_device::pia_cfg_cb2_w)); + m_pia_cfg->irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<3>)); + m_pia_cfg->irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<4>)); + + PIA6821(config, m_pia_disp); + m_pia_disp->writepa_handler().set(FUNC(exorterm155_device::pia_disp_pa_w)); + m_pia_disp->readpb_handler().set(FUNC(exorterm155_device::pia_disp_pb_r)); + m_pia_disp->writepb_handler().set(FUNC(exorterm155_device::pia_disp_pb_w)); + m_pia_disp->readca2_handler().set(FUNC(exorterm155_device::pia_disp_ca2_r)); + m_pia_disp->irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<5>)); + m_pia_disp->irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<6>)); + + // Derived from the horizontal blanking, 3.4ms. + CLOCK(config, m_sys_timer_clock, 4706 / 16); + m_sys_timer_clock->signal_handler().set(FUNC(exorterm155_device::sys_timer_w)); + + SPEAKER(config, "bell").front_center(); + BEEP(config, m_beeper, 2000); + m_beeper->add_route(ALL_OUTPUTS, "bell", 0.25); +} + +ioport_constructor exorterm155_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(exorterm155); +} + +const tiny_rom_entry *exorterm155_device::device_rom_region() const +{ + return ROM_NAME(exorterm155); +} + +DEFINE_DEVICE_TYPE(EXORTERM155, exorterm155_device, "exorterm155_device", "EXORTERM155") diff --git a/src/devices/machine/exorterm.h b/src/devices/machine/exorterm.h new file mode 100644 index 00000000000..ee41cab4422 --- /dev/null +++ b/src/devices/machine/exorterm.h @@ -0,0 +1,154 @@ +// license:BSD-3-Clause +// copyright-holders: 68bit +/**************************************************************************** + +Motorola EXORterm 155 (M68SDS) + +****************************************************************************/ + +#ifndef MAME_MACHINE_EXORTERM_H +#define MAME_MACHINE_EXORTERM_H + +#pragma once + +#include "cpu/m6800/m6800.h" +#include "machine/clock.h" +#include "machine/input_merger.h" +#include "machine/mc14411.h" +#include "machine/6850acia.h" +#include "machine/6821pia.h" +#include "sound/spkrdev.h" +#include "bus/rs232/rs232.h" +#include "emupal.h" +#include "screen.h" + +#include "machine/terminal.h" + + +INPUT_PORTS_EXTERN(exorterm155); + +class exorterm155_device : public device_t +{ +public: + exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // Interface to a RS232 connection. + auto rs232_conn_txd_handler() { return m_rs232_conn_txd_handler.bind(); } + auto rs232_conn_dtr_handler() { return m_rs232_conn_dtr_handler.bind(); } + auto rs232_conn_rts_handler() { return m_rs232_conn_rts_handler.bind(); } + DECLARE_WRITE_LINE_MEMBER(rs232_conn_dcd_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_dsr_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_ri_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_cts_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_rxd_w); + +protected: + exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + virtual void device_resolve_objects() override; + virtual void device_start() override; + virtual void device_reset() override; + + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + virtual const tiny_rom_entry *device_rom_region() const override; + +private: + required_device m_maincpu; + required_device m_irqs; + required_device m_acia; + required_device m_brg; + required_ioport m_rs232_baud; + required_ioport m_disable_fac; + required_ioport m_display_fac; + required_device m_pia_kbd; + required_device m_pia_cfg; + required_device m_pia_disp; + required_device m_screen; + required_device m_palette; + required_device m_sys_timer_clock; + required_shared_ptr m_vram; + required_region_ptr m_chargen; + required_device m_beeper; + output_finder<> m_online_led; + output_finder<> m_auto_lf_led; + output_finder<> m_page_mode_led; + output_finder<> m_insert_char_led; + + void mem_map(address_map &map); + + DECLARE_WRITE_LINE_MEMBER(acia_txd_w); + DECLARE_WRITE_LINE_MEMBER(acia_rts_w); + + // Clocks + DECLARE_WRITE_LINE_MEMBER(write_f1_clock); + DECLARE_WRITE_LINE_MEMBER(write_f3_clock); + DECLARE_WRITE_LINE_MEMBER(write_f5_clock); + DECLARE_WRITE_LINE_MEMBER(write_f6_clock); + DECLARE_WRITE_LINE_MEMBER(write_f7_clock); + DECLARE_WRITE_LINE_MEMBER(write_f8_clock); + DECLARE_WRITE_LINE_MEMBER(write_f9_clock); + DECLARE_WRITE_LINE_MEMBER(write_f11_clock); + DECLARE_WRITE_LINE_MEMBER(write_f13_clock); + + u8 m_dsr; + u8 m_ring; + + devcb_write_line m_rs232_conn_txd_handler; + devcb_write_line m_rs232_conn_dtr_handler; + devcb_write_line m_rs232_conn_rts_handler; + + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + u8 m_framecnt; + u16 m_cursor_addr; + u8 m_inv_video; + u8 m_special_char_disp; + + DECLARE_WRITE_LINE_MEMBER(sys_timer_w); + u8 m_sys_timer_count; + + DECLARE_WRITE_LINE_MEMBER(pia_cfg_cb2_w); + + u8 pia_kbd_pa_r(); + u8 pia_kbd_pb_r(); + void pia_kbd_pb_w(u8 data); + u8 m_term_data; + + u8 pia_disp_pb_r(); + void pia_disp_pa_w(u8 data); + void pia_disp_pb_w(u8 data); + DECLARE_READ_LINE_MEMBER(pia_disp_ca2_r); + + u8 m_kbd_start_holdoff; + + // Keyboard + + static u8 const translation_table[][5][17]; + static bool const caps_table[5][17]; + void kbd_start_processing(); + void kbd_reset_state(); + void kbd_repeat_start(u8 row, u8 column); + void kbd_repeat_restart(); + void kbd_repeat_stop(); + void kbd_repeat(); + void kbd_send_translated(u8 code); + + TIMER_CALLBACK_MEMBER(kbd_scan_row); + TIMER_CALLBACK_MEMBER(kbd_repeat); + + emu_timer *m_kbd_scan_timer; + emu_timer *m_kbd_repeat_timer; + required_ioport m_kbd_modifiers; + required_ioport_array<5> m_kbd_rows; + ioport_value m_kbd_states[5]; + u8 m_kbd_next_row; + u8 m_kbd_processing; + u8 m_kbd_repeat_row; + u8 m_kbd_repeat_column; + u16 m_kbd_last_modifiers; + +}; + +DECLARE_DEVICE_TYPE(EXORTERM155, exorterm155_device) + +#endif // MAME_MACHINE_EXORTERM_H diff --git a/src/emu/layout/exorterm155.lay b/src/emu/layout/exorterm155.lay new file mode 100644 index 00000000000..7168f6b4fb9 --- /dev/null +++ b/src/emu/layout/exorterm155.lay @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/drivers/exorterm.cpp b/src/mame/drivers/exorterm.cpp new file mode 100644 index 00000000000..6762bb90afe --- /dev/null +++ b/src/mame/drivers/exorterm.cpp @@ -0,0 +1,58 @@ +// license:BSD-3-Clause +// copyright-holders: 68bit +/**************************************************************************** + + Stand alone front end for the Motorola EXORterm 155 (M68SDS) + +****************************************************************************/ + +#include "emu.h" +#include "machine/exorterm.h" +#include "bus/rs232/rs232.h" + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class exorterm155_state : public driver_device +{ +public: + exorterm155_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_exorterm155(*this, "exorterm155") + , m_host(*this, "host") + { } + + void exorterm155(machine_config &config); + +private: + required_device m_exorterm155; + required_device m_host; +}; + +void exorterm155_state::exorterm155(machine_config &config) +{ + EXORTERM155(config, m_exorterm155, 0); + + RS232_PORT(config, m_host, default_rs232_devices, nullptr); + m_host->dcd_handler().set(m_exorterm155, FUNC(exorterm155_device::rs232_conn_dcd_w)); + m_host->dsr_handler().set(m_exorterm155, FUNC(exorterm155_device::rs232_conn_dsr_w)); + m_host->ri_handler().set(m_exorterm155, FUNC(exorterm155_device::rs232_conn_ri_w)); + m_host->cts_handler().set(m_exorterm155, FUNC(exorterm155_device::rs232_conn_cts_w)); + m_host->rxd_handler().set(m_exorterm155, FUNC(exorterm155_device::rs232_conn_rxd_w)); + + m_exorterm155->rs232_conn_txd_handler().set(m_host, FUNC(rs232_port_device::write_txd)); + m_exorterm155->rs232_conn_dtr_handler().set(m_host, FUNC(rs232_port_device::write_dtr)); + m_exorterm155->rs232_conn_rts_handler().set(m_host, FUNC(rs232_port_device::write_rts)); +} + + +ROM_START(exorterm155) +ROM_END + +//************************************************************************** +// SYSTEM DRIVERS +//************************************************************************** + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1979, exorterm155, 0, 0, exorterm155, 0, exorterm155_state, empty_init, "Motorola", "EXORterm 155", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 1e3b55ca0be..7c3a65cede5 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -13314,6 +13314,9 @@ deathrac // (c) 1976 Exidy destdrby // (c) 1976 Exidy rhunting // bootleg of deathrac +@source:exorterm.cpp +exorterm155 // (c) 1979 Motorola + @source:exp85.cpp exp85 // diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 821682f4701..9f0687632ee 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -277,6 +277,7 @@ eva.cpp evmbug.cpp excali64.cpp exelv.cpp +exorterm.cpp exp85.cpp facit4440.cpp falco5220.cpp -- cgit v1.2.3 From b10871db5dd7f57b0c2cae6866a8a86d89c5c038 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Fri, 10 Jul 2020 23:40:26 +0200 Subject: New machines marked as NOT_WORKING ---------------------------------- Sport Dart TV [Victor Fernandez (City Game), ClawGrip] --- src/mame/drivers/4enlinea.cpp | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/mame/drivers/4enlinea.cpp b/src/mame/drivers/4enlinea.cpp index 79d14fb252d..e7ea3f88c58 100644 --- a/src/mame/drivers/4enlinea.cpp +++ b/src/mame/drivers/4enlinea.cpp @@ -181,7 +181,7 @@ - [DUMPED] 4 en Línea (Compumatic) - [DUMPED] Olympic Darts (K7 Kursaal. At least three different hardware revisions) - - [MISSING] Sport Dart TV (Compumatic) + - [DUMPED] Sport Dart TV (Compumatic / Desarrollos y Recambios S.L.) - [MISSING] Dart Queen (Compumatic / Daryde) ************************************************************************** @@ -211,10 +211,10 @@ #define SEC_CLOCK XTAL(8'000'000) #define HCGA_CLOCK XTAL(14'318'181) -#define PRG_CPU_CLOCK MAIN_CLOCK /2 /* 8 MHz. (measured) */ -#define SND_CPU_CLOCK SEC_CLOCK /2 /* 4 MHz. (measured) */ -#define SND_AY_CLOCK SEC_CLOCK /4 /* 2 MHz. (measured) */ -#define CRTC_CLOCK SEC_CLOCK /2 /* 8 MHz. (measured) */ +#define PRG_CPU_CLOCK MAIN_CLOCK /2 // 8 MHz. (measured) +#define SND_CPU_CLOCK SEC_CLOCK /2 // 4 MHz. (measured) +#define SND_AY_CLOCK SEC_CLOCK /4 // 2 MHz. (measured) +#define CRTC_CLOCK SEC_CLOCK /2 // 8 MHz. (measured) class _4enlinea_state : public driver_device { @@ -335,7 +335,7 @@ void isa8_cga_4enlinea_device::device_start() m_isa->install_device(0x3d0, 0x3df, read8sm_delegate(*this, FUNC(isa8_cga_4enlinea_device::_4enlinea_io_read)), write8sm_delegate(*this, FUNC(isa8_cga_device::io_write))); m_isa->install_bank(0x8000, 0xbfff, "bank1", &m_vram[0]); - /* Initialise the cga palette */ + // Initialise the CGA palette int i; for (int i = 0; i < CGA_PALETTE_SETS * 16; i++ ) @@ -405,7 +405,7 @@ void _4enlinea_state::serial_status_w(uint8_t data) m_serial_flags = data; // probably just clears } -/* TODO: do this really routes to 0xe000-0xe001 of Main CPU? */ +// TODO: do this really routes to 0xe000-0xe001 of Main CPU? void _4enlinea_state::serial_w(offs_t offset, uint8_t data) { m_serial_data[offset] = data; @@ -584,7 +584,7 @@ void _4enlinea_isa8_cards(device_slot_interface &device) device.option_add_internal("4enlinea", ISA8_CGA_4ENLINEA); } -/* TODO: irq sources are unknown */ +// TODO: IRQ sources are unknown INTERRUPT_GEN_MEMBER(_4enlinea_state::_4enlinea_irq) { if(m_irq_count == 0) @@ -605,7 +605,7 @@ INTERRUPT_GEN_MEMBER(_4enlinea_state::_4enlinea_audio_irq) void _4enlinea_state::_4enlinea(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware Z80(config, m_maincpu, PRG_CPU_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &_4enlinea_state::main_map); m_maincpu->set_addrmap(AS_IO, &_4enlinea_state::main_portmap); @@ -635,7 +635,7 @@ void _4enlinea_state::_4enlinea(machine_config &config) CRTC_CLOCK / 5.0 = 53.569037 Hz. */ - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); AY8910(config, m_ay, SND_AY_CLOCK); m_ay->port_a_read_callback().set_ioport("IN-P2"); @@ -679,7 +679,7 @@ ROM_START( 4enlinea ) ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "cuatro_en_linea_27c256__cicplay-1.ic19", 0x0000, 0x8000, CRC(307a57a3) SHA1(241329d919ec43d0eeb1dad0a4db6cf6de06e7e1) ) - ROM_REGION( 0x0800, "eeprom", 0 ) /* default serial EEPROM */ + ROM_REGION( 0x0800, "eeprom", 0 ) // default serial EEPROM ROM_LOAD( "cuatro_en_linea_x24c16p__nosticker.ic17", 0x0000, 0x0800, CRC(21f81f5a) SHA1(00b10eee5af1ca79ced2878f4be4cac2bb8d26a0) ) ROM_REGION( 0x0200, "plds", 0 ) @@ -730,10 +730,24 @@ ROM_START( k7_olym ) ROM_END +ROM_START( sprtdart ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "sport_dart_27c512.ic19", 0x00000, 0x10000, CRC(6c9ae27f) SHA1(92fbdef7747a9096daf4714f45b119ad8f3a1436) ) + + ROM_REGION( 0x0800, "eeprom", 0 ) + ROM_LOAD( "24c16.ic17", 0x0000, 0x0800, NO_DUMP ) // Undumped + + ROM_REGION( 0x0300, "plds", 0 ) + ROM_LOAD( "gal16v8a.ic11", 0x0000, 0x0117, NO_DUMP ) // protected + ROM_LOAD( "gal16v8a.ic4", 0x0117, 0x0117, NO_DUMP ) // protected +ROM_END + + /*********************************** * Game Drivers * ***********************************/ -/* YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 1991, 4enlinea, 0, _4enlinea, 4enlinea, _4enlinea_state, empty_init, ROT0, "Compumatic", "Cuatro en Linea", MACHINE_NOT_WORKING ) -GAME( 1994, k7_olym, 0, k7_olym, k7_olym, _4enlinea_state, empty_init, ROT0, "K7 Kursaal", "Olympic Darts (K7)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL ) +// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS +GAME( 1991, 4enlinea, 0, _4enlinea, 4enlinea, _4enlinea_state, empty_init, ROT0, "Compumatic", "Cuatro en Linea", MACHINE_NOT_WORKING ) +GAME( 1994, k7_olym, 0, k7_olym, k7_olym, _4enlinea_state, empty_init, ROT0, "K7 Kursaal", "Olympic Darts (K7)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL ) +GAME( 1993, sprtdart, 0, k7_olym, k7_olym, _4enlinea_state, empty_init, ROT0, "Compumatic / Desarrollos y Recambios S.L.", "Sport Dart TV", MACHINE_NOT_WORKING | MACHINE_MECHANICAL ) -- cgit v1.2.3 From 98fc9e94c34c12dc6ccaa3bad2c1b11811b38e59 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Fri, 10 Jul 2020 23:45:03 +0200 Subject: Add 'sprtdart' (nw) --- src/mame/mame.lst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 7c3a65cede5..bab85787a31 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -102,7 +102,8 @@ undoukai // A17 (c) 1984 Taito @source:4enlinea.cpp 4enlinea // (c) 1991 System Compumatic -k7_olym // +k7_olym // (c) 1994 K7 Kursaal +sprtdart // (c) 1993 Compumatic / Desarrollos y Recambios S.L. @source:4enraya.cpp 4enraya // (c) 1990 IDSA -- cgit v1.2.3 From e26fb516d02462453310817aae0386185fd7615b Mon Sep 17 00:00:00 2001 From: braintro Date: Fri, 10 Jul 2020 19:06:53 -0500 Subject: m72.cpp: Dumped the Image Fight (World) i8751 MCU. [Hammy, TeamEurope, The Dumping Union] --- src/mame/drivers/m72.cpp | 53 +++++++++--------------------------------------- src/mame/includes/m72.h | 6 ++---- src/mame/video/m72.cpp | 10 ++++----- 3 files changed, 17 insertions(+), 52 deletions(-) diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp index 22a7e314872..41e344f84b7 100644 --- a/src/mame/drivers/m72.cpp +++ b/src/mame/drivers/m72.cpp @@ -454,20 +454,12 @@ void m72_state::nspirit_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask) if (ACCESSING_BITS_0_7 && (data & 0xff) < 9) m_audio->set_sample_start(a[data & 0xff]); } -void m72_state::imgfight_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask) -{ - static const int a[7] = { 0x0000, 0x0020, 0x44e0, 0x98a0, 0xc820, 0xf7a0, 0x108c0 }; - if (ACCESSING_BITS_0_7 && (data & 0xff) < 7) m_audio->set_sample_start(a[data & 0xff]); -} - void m72_state::loht_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask) { static const int a[7] = { 0x0000, 0x0020, 0, 0x2c40, 0x4320, 0x7120, 0xb200 }; if (ACCESSING_BITS_0_7 && (data & 0xff) < 7) m_audio->set_sample_start(a[data & 0xff]); } - - void m72_state::dbreedm72_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask) { static const int a[9] = { 0x00000, 0x00020, 0x02c40, 0x08160, 0x0c8c0, 0x0ffe0, 0x13000, 0x15820, 0x15f40 }; @@ -576,34 +568,15 @@ static const u8 nspirit_code[CODE_LEN] = }; static const u8 nspirit_crc[CRC_LEN] = { 0xfe,0x94,0x6e,0x4e, 0xc8,0x33,0xa7,0x2d, 0xf2,0xa3,0xf9,0xe1, 0xa9,0x6c,0x02,0x95, 0x00,0x00 }; -/* Image Fight */ -static const u8 imgfight_code[CODE_LEN] = -{ - 0x68,0x00,0xa0, // push 0a000h - 0x1f, // pop ds - 0xc6,0x06,0x38,0x38,0x50, // mov [3838h], byte 050h - 0xc6,0x06,0x3a,0x38,0x49, // mov [383ah], byte 049h - 0xc6,0x06,0x3c,0x38,0x43, // mov [383ch], byte 043h - 0xc6,0x06,0x3e,0x38,0x4b, // mov [383eh], byte 04bh - 0xc6,0x06,0x40,0x38,0x45, // mov [3840h], byte 045h - 0xc6,0x06,0x42,0x38,0x54, // mov [3842h], byte 054h - 0x68,0x00,0xb0, // push 0b000h - 0x1f, // pop ds - 0xc6,0x06,0x00,0x09,0x49^0xff, // mov [0900h], byte 049h - 0xc6,0x06,0x00,0x0a,0x49^0xff, // mov [0a00h], byte 049h - 0xc6,0x06,0x00,0x0b,0x49^0xff, // mov [0b00h], byte 049h - 0xc6,0x06,0x20,0x09,0x49^0xff, // mov [0920h], byte 049h - 0xc6,0x06,0x21,0x09,0x4d^0xff, // mov [0921h], byte 04dh - 0xc6,0x06,0x22,0x09,0x41^0xff, // mov [0922h], byte 041h - 0xc6,0x06,0x23,0x09,0x47^0xff, // mov [0923h], byte 047h - 0x68,0x00,0xd0, // push 0d000h - 0x1f, // pop ds - 0xea,0x00,0x00,0x40,0x00 // jmp 0040:$0000 -}; +/* +// these are for the world set where we have the mcu anyway... +static const u8 imgfight_crc[CRC_LEN] = { 0xf8,0x91,0xc0,0x58, 0x04,0x33,0xb6,0xc5, + 0xbf,0x37,0x92,0x94, 0x00,0x00 }; // these are for the japan set where we have the mcu anyway... static const u8 imgfightj_crc[CRC_LEN] = { 0x7e,0xcc,0xec,0x03, 0x04,0x33,0xb6,0xc5, 0xbf,0x37,0x92,0x94, 0x00,0x00 }; +*/ /* Dragon Breed */ static const u8 dbreedm72_code[CODE_LEN] = @@ -674,12 +647,6 @@ void m72_state::init_nspirit() m_maincpu->space(AS_IO).install_write_handler(0xc0, 0xc1, write16s_delegate(*this, FUNC(m72_state::nspirit_sample_trigger_w))); } -void m72_state::init_imgfight() -{ - install_protection_handler(imgfight_code,imgfightj_crc); - m_maincpu->space(AS_IO).install_write_handler(0xc0, 0xc1, write16s_delegate(*this, FUNC(m72_state::imgfight_sample_trigger_w))); -} - void m72_state::init_dbreedm72() { install_protection_handler(dbreedm72_code,dbreedm72_crc); @@ -2079,10 +2046,10 @@ void m72_state::kengo(machine_config &config) subdevice("maincpu")->set_decryption_table(gunforce_decryption_table); } -void m72_state::imgfightj(machine_config &config) +void m72_state::imgfight(machine_config &config) { m72_8751(config); - MCFG_VIDEO_START_OVERRIDE(m72_state,imgfightj) + MCFG_VIDEO_START_OVERRIDE(m72_state,imgfight) } void m72_state::nspiritj(machine_config &config) @@ -2712,7 +2679,7 @@ ROM_START( imgfight ) ROM_RELOAD( 0xc0000, 0x20000 ) ROM_REGION( 0x10000, "mcu", 0 ) /* i8751 microcontroller */ - ROM_LOAD( "if_c-pr-a.ic1", 0x00000, 0x01000, NO_DUMP ) + ROM_LOAD( "if_c-pr-a.ic1", 0x00000, 0x01000, CRC(55f10458) SHA1(d520ec2b075c94d76d97e0105644ff96384b378c) ) /* i8751 MCU labeled IF C-PR-A */ ROM_REGION( 0x080000, "sprites", 0 ) ROM_LOAD( "if-c-00.ic53", 0x00000, 0x20000, CRC(745e6638) SHA1(43fb1f9da4190fea67eee3aee8caf4219becc21b) ) /* sprites */ @@ -4325,8 +4292,8 @@ GAME( 1987, mrheli, bchopper, mrheli, bchopper, m72_state, init_m GAME( 1988, nspirit, 0, m72, nspirit, m72_state, init_nspirit, ROT0, "Irem", "Ninja Spirit (World)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // doesn't wait / check for japan warning string.. fails rom check if used with japanese mcu rom (World version?) GAME( 1988, nspiritj, nspirit, nspiritj, nspirit, m72_state, init_m72_8751, ROT0, "Irem", "Saigo no Nindou (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1988, imgfight, 0, m72, imgfight, m72_state, init_imgfight, ROT270, "Irem", "Image Fight (World)", MACHINE_SUPPORTS_SAVE ) // doesn't wait / check for japan warning string.. fails rom check if used with japanese mcu rom (World version?) -GAME( 1988, imgfightj, imgfight, imgfightj, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, imgfight, 0, imgfight, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (World)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, imgfightj, imgfight, imgfight, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (Japan)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, imgfightb, imgfight, imgfightb, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (Japan, bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // uses an 80c31 MCU, which isn't hooked up correctly yet. Gives 'RAM NG 7' error GAME( 1989, loht, 0, m72_8751, loht, m72_state, init_m72_8751, ROT0, "Irem", "Legend of Hero Tonma (World)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h index 550b72e2fc5..939b4cc407e 100644 --- a/src/mame/includes/m72.h +++ b/src/mame/includes/m72.h @@ -84,7 +84,7 @@ public: void rtype(machine_config &config); void imgfightb(machine_config &config); void lohtb(machine_config &config); - void imgfightj(machine_config &config); + void imgfight(machine_config &config); void mrheli(machine_config &config); void nspiritj(machine_config &config); @@ -94,7 +94,6 @@ public: void init_m72_8751(); void init_dbreedm72(); void init_nspirit(); - void init_imgfight(); private: required_device m_maincpu; @@ -172,7 +171,6 @@ private: // game specific void bchopper_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0); void nspirit_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void imgfight_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0); void loht_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0); void dbreedm72_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0); void dkgenm72_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0); @@ -192,7 +190,7 @@ private: void machine_start() override; void machine_reset() override; DECLARE_VIDEO_START(m72); - DECLARE_VIDEO_START(imgfightj); + DECLARE_VIDEO_START(imgfight); DECLARE_VIDEO_START(mrheli); DECLARE_VIDEO_START(nspiritj); DECLARE_VIDEO_START(xmultipl); diff --git a/src/mame/video/m72.cpp b/src/mame/video/m72.cpp index d231f61d1ec..de40a07ec9a 100644 --- a/src/mame/video/m72.cpp +++ b/src/mame/video/m72.cpp @@ -106,7 +106,7 @@ VIDEO_START_MEMBER(m72_state,m72) m_bg_tilemap->set_transmask(1,0x00ff,0xff00); //m_bg_tilemap->set_transmask(2,0x0001,0xfffe); - m_bg_tilemap->set_transmask(2,0x0007,0xfff8); // needed for lohtj japan warning to look correct + m_bg_tilemap->set_transmask(2,0x0007,0xfff8); // needed for lohtj Japan warning to look correct memset(m_spriteram->buffer(),0,m_spriteram->bytes()); @@ -149,22 +149,22 @@ VIDEO_START_MEMBER(m72_state,hharry) m_bg_tilemap->set_scrolldy(-128,16); } -VIDEO_START_MEMBER(m72_state,imgfightj) +VIDEO_START_MEMBER(m72_state,imgfight) { VIDEO_START_CALL_MEMBER(m72); - m_bg_tilemap->set_transmask(2,0xff00,0x00ff); // for japan message + m_bg_tilemap->set_transmask(2,0xff00,0x00ff); // for RAM/ROM & Japan message } VIDEO_START_MEMBER(m72_state,nspiritj) { VIDEO_START_CALL_MEMBER(m72); - m_bg_tilemap->set_transmask(2,0x001f,0xffe0); // for japan message + m_bg_tilemap->set_transmask(2,0x001f,0xffe0); // for Japan message } VIDEO_START_MEMBER(m72_state,mrheli) { VIDEO_START_CALL_MEMBER(m72); - m_bg_tilemap->set_transmask(2,0x00ff,0xff00); // for japan message + m_bg_tilemap->set_transmask(2,0x00ff,0xff00); // for Japan message } -- cgit v1.2.3 From 20868d0c2f17a36e3b70a849d4c5a1abd9e1d6cf Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Fri, 10 Jul 2020 20:11:08 -0400 Subject: Pruning of redundant #includes located in src/mame/* (nw) --- src/mame/includes/swtpc09.h | 1 - src/mame/includes/xbox_usb.h | 2 -- src/mame/machine/esqpanel.cpp | 1 - src/mame/machine/esqpanel.h | 2 -- src/mame/machine/esqvfd.h | 1 - src/mame/video/decbac06.h | 1 - src/mame/video/pin64.h | 2 -- src/mame/video/segas24.cpp | 4 +--- 8 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/mame/includes/swtpc09.h b/src/mame/includes/swtpc09.h index c7bda684966..b67abd033dd 100644 --- a/src/mame/includes/swtpc09.h +++ b/src/mame/includes/swtpc09.h @@ -12,7 +12,6 @@ #pragma once #include "cpu/m6809/m6809.h" -#include "video/generic.h" #include "machine/wd_fdc.h" #include "imagedev/floppy.h" #include "machine/6840ptm.h" diff --git a/src/mame/includes/xbox_usb.h b/src/mame/includes/xbox_usb.h index 641d7afb848..11149047394 100644 --- a/src/mame/includes/xbox_usb.h +++ b/src/mame/includes/xbox_usb.h @@ -5,8 +5,6 @@ #pragma once -#include - struct OHCIEndpointDescriptor { int mps; // MaximumPacketSize int f; // Format diff --git a/src/mame/machine/esqpanel.cpp b/src/mame/machine/esqpanel.cpp index f5df1b55e87..7516f78aa7c 100644 --- a/src/mame/machine/esqpanel.cpp +++ b/src/mame/machine/esqpanel.cpp @@ -17,7 +17,6 @@ #include #include #include -#include namespace esqpanel { diff --git a/src/mame/machine/esqpanel.h b/src/mame/machine/esqpanel.h index 77ffc6f9daf..0ab65d1ac35 100644 --- a/src/mame/machine/esqpanel.h +++ b/src/mame/machine/esqpanel.h @@ -10,8 +10,6 @@ #include "diserial.h" -#include - //************************************************************************** // TYPE DEFINITIONS diff --git a/src/mame/machine/esqvfd.h b/src/mame/machine/esqvfd.h index 3b0e008ed5e..38ae82ff03f 100644 --- a/src/mame/machine/esqvfd.h +++ b/src/mame/machine/esqvfd.h @@ -3,7 +3,6 @@ #ifndef MAME_MACHINE_ESQVFD_H #define MAME_MACHINE_ESQVFD_H -#include #include diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h index ebfcb96eeb4..a66b3fe9603 100644 --- a/src/mame/video/decbac06.h +++ b/src/mame/video/decbac06.h @@ -7,7 +7,6 @@ #include "screen.h" #include "tilemap.h" -#include typedef device_delegate decbac06_tile_cb_delegate; diff --git a/src/mame/video/pin64.h b/src/mame/video/pin64.h index daec1915299..5a0d73e6784 100644 --- a/src/mame/video/pin64.h +++ b/src/mame/video/pin64.h @@ -6,8 +6,6 @@ #define PIN64_H #include -#include -#include #define PIN64_ENABLE_CAPTURE (0) diff --git a/src/mame/video/segas24.cpp b/src/mame/video/segas24.cpp index 3234b1eb6cd..0f11cb78058 100644 --- a/src/mame/video/segas24.cpp +++ b/src/mame/video/segas24.cpp @@ -5,12 +5,10 @@ * */ -#include -#include - #include "emu.h" #include "video/segaic24.h" #include "includes/segas24.h" +#include namespace { -- cgit v1.2.3 From e8d0710b8cfd7b6cee59bd4e4235dc4e00dcd1cc Mon Sep 17 00:00:00 2001 From: braintro Date: Fri, 10 Jul 2020 19:18:35 -0500 Subject: New Working Clone - Witch Star [Brian Troha, The Dumping Union] --- src/mame/drivers/witch.cpp | 36 +++++++++++++++++++++++++++++------- src/mame/mame.lst | 3 ++- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/mame/drivers/witch.cpp b/src/mame/drivers/witch.cpp index 9e927d4c57c..2e8daafc252 100644 --- a/src/mame/drivers/witch.cpp +++ b/src/mame/drivers/witch.cpp @@ -1044,8 +1044,7 @@ ROM_START( witch ) ROM_END -/* Witch (With ranking) */ -ROM_START( witchb ) +ROM_START( witchb ) /* Witch (With ranking) */ ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "x.u5", 0x00000, 0x20000, CRC(d0818777) SHA1(a6232fef84bec3cfb4a6122a48e96e7b7950e013) ) @@ -1087,6 +1086,27 @@ ROM_START( witchs ) /* this set has (c)1992 Sega / Vic Tokai in the roms */ ROM_END +ROM_START( witchstar ) /* Licensed for Korea */ + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "7_excellent.u5", 0x00000, 0x20000, CRC(303c3a6d) SHA1(38983b0925d2a018b6718b3af5e95cf91b1850d6) ) + + ROM_REGION( 0x10000, "sub", 0 ) + ROM_LOAD( "8_excellent.s6", 0x00000, 0x08000, CRC(82460b82) SHA1(d85a9d77edaa67dfab8ff6ac4cb6273f0904b3c0) ) /* Same data as the Witch set */ + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "6_excellent.u3", 0x00000, 0x20000, CRC(7007ced4) SHA1(6a0aac3ff9a4d5360c8ba1142f010add1b430ada) ) /* Same data as the Witch set */ + + ROM_REGION( 0x40000, "gfx2", 0 ) + ROM_LOAD( "5_excellent.a1", 0x00000, 0x40000, CRC(257dc030) SHA1(ada08c3f8e93fd00d4ec7d152cdcf49c130be08e) ) + + ROM_REGION( 0x40000, "essnd", 0 ) + ROM_LOAD( "9_excellent.v10", 0x00000, 0x40000, CRC(62e42371) SHA1(5042abc2176d0c35fd6b698eca4145f93b0a3944) ) /* Same data as the Witch set */ + + ROM_REGION( 0x100, "prom", 0 ) + ROM_LOAD( "tbp24s10n.10k", 0x000, 0x100, CRC(ee7b9d8f) SHA1(3a7b75befab83bc37e4e403ad3632841c2d37707) ) /* Currently unused, unknown use */ +ROM_END + + ROM_START( pbchmp95 ) /* Licensed for Germany? */ ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "3.bin", 0x00000, 0x20000, CRC(e881aa05) SHA1(10d259396cac4b9a1b72c262c11ffa5efbdac433) ) @@ -1107,6 +1127,7 @@ ROM_START( pbchmp95 ) /* Licensed for Germany? */ ROM_LOAD( "tbp24s10n.10k", 0x000, 0x100, CRC(ee7b9d8f) SHA1(3a7b75befab83bc37e4e403ad3632841c2d37707) ) /* Currently unused, unknown use */ ROM_END + ROM_START( keirinou ) /* ES8611 PCB */ ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "y5-03.y5", 0x000000, 0x008000, CRC(df2acc37) SHA1(9ad953843ba7859a55888fb87591cc8d322136ad) ) @@ -1139,8 +1160,9 @@ void witch_state::init_witch() m_subcpu->space(AS_PROGRAM).install_read_handler(0x7000, 0x700f, read8sm_delegate(*this, FUNC(witch_state::prot_read_700x))); } -GAME( 1987, keirinou, 0, keirinou, keirinou, keirinou_state, empty_init, ROT0, "Excellent System", "Keirin Ou", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, witch, 0, witch, witch, witch_state, init_witch, ROT0, "Vic Tokai (Excellent System license)", "Witch", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, witchb, witch, witch, witch, witch_state, init_witch, ROT0, "Vic Tokai (Excellent System license)", "Witch (with ranking)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, witchs, witch, witch, witch, witch_state, init_witch, ROT0, "Vic Tokai (Sega license)", "Witch (Sega license)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, pbchmp95, witch, witch, witch, witch_state, init_witch, ROT0, "Veltmeijer Automaten", "Pinball Champ '95", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, keirinou, 0, keirinou, keirinou, keirinou_state, empty_init, ROT0, "Excellent System", "Keirin Ou", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, witch, 0, witch, witch, witch_state, init_witch, ROT0, "Vic Tokai (Excellent System license)", "Witch", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, witchb, witch, witch, witch, witch_state, init_witch, ROT0, "Vic Tokai (Excellent System license)", "Witch (with ranking)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, witchs, witch, witch, witch, witch_state, init_witch, ROT0, "Vic Tokai (Sega license)", "Witch (Sega license)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, witchstar, witch, witch, witch, witch_state, init_witch, ROT0, "Fovis Korea Co. Ltd.", "Witch Star", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, pbchmp95, witch, witch, witch, witch_state, init_witch, ROT0, "Veltmeijer Automaten", "Pinball Champ '95", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index bab85787a31..53a2ad26ed5 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -41399,11 +41399,12 @@ rugrats // (c) 1983 wiping // (c) 1982 @source:witch.cpp +keirinou // (c) 1987 Excellent System pbchmp95 // (c) 1995 Veltmeijer Automaten witch // (c) 1992 Excellent System witchb // (c) 1992 Excellent System witchs // (c) 1992 Sega / Vic Tokai license -keirinou +witchstar // (c) 1994 Fovis Korea Co. Ltd. @source:wiz.cpp kungfut // (c) 1984 Seibu Kaihatsu -- cgit v1.2.3 From cf6447cf4e413456c63c859a6e1990b44d9b28c1 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Fri, 10 Jul 2020 22:01:44 -0400 Subject: Pruning of redundant #includes located in src/devices/bus/* (nw) --- src/devices/bus/acorn/bus.h | 2 -- src/devices/bus/ieee488/grid2102.h | 1 - src/devices/bus/isa/isa.h | 2 -- src/devices/bus/lpci/pci.h | 1 - src/devices/bus/ti8x/graphlinkhle.h | 2 -- 5 files changed, 8 deletions(-) diff --git a/src/devices/bus/acorn/bus.h b/src/devices/bus/acorn/bus.h index bfd9a980304..b35b42f71d5 100644 --- a/src/devices/bus/acorn/bus.h +++ b/src/devices/bus/acorn/bus.h @@ -11,8 +11,6 @@ #pragma once -#include - //************************************************************************** // FORWARD DECLARATIONS diff --git a/src/devices/bus/ieee488/grid2102.h b/src/devices/bus/ieee488/grid2102.h index 1f461133bf6..f87225c0812 100644 --- a/src/devices/bus/ieee488/grid2102.h +++ b/src/devices/bus/ieee488/grid2102.h @@ -13,7 +13,6 @@ #include "ieee488.h" -#include #include //************************************************************************** diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h index ac84917dfed..a628ddc0b9b 100644 --- a/src/devices/bus/isa/isa.h +++ b/src/devices/bus/isa/isa.h @@ -67,8 +67,6 @@ #pragma once -#include - //************************************************************************** // TYPE DEFINITIONS diff --git a/src/devices/bus/lpci/pci.h b/src/devices/bus/lpci/pci.h index 81fe3b759e5..f962ddd6ff7 100644 --- a/src/devices/bus/lpci/pci.h +++ b/src/devices/bus/lpci/pci.h @@ -12,7 +12,6 @@ #define MAME_BUS_LPCI_PCI_H #pragma once -#include //************************************************************************** // TYPE DEFINITIONS diff --git a/src/devices/bus/ti8x/graphlinkhle.h b/src/devices/bus/ti8x/graphlinkhle.h index 310a4daf133..8a07e0ddea0 100644 --- a/src/devices/bus/ti8x/graphlinkhle.h +++ b/src/devices/bus/ti8x/graphlinkhle.h @@ -22,8 +22,6 @@ #include "diserial.h" -#include - namespace bus { namespace ti8x { -- cgit v1.2.3 From 1666fb3fd7bf8f676b3f2e1b73f33024df4aa2a6 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 10 Jul 2020 23:00:16 -0400 Subject: Remove more redundant #includes from src/mame --- src/mame/audio/harddriv.cpp | 1 - src/mame/machine/harddriv.cpp | 2 -- src/mame/video/blstroid.cpp | 4 +--- src/mame/video/cyberbal.cpp | 1 - src/mame/video/gauntlet.cpp | 2 -- src/mame/video/rampart.cpp | 2 -- src/mame/video/toobin.cpp | 1 - src/mame/video/xybots.cpp | 2 -- 8 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp index dc4e9baf083..45537c6c652 100644 --- a/src/mame/audio/harddriv.cpp +++ b/src/mame/audio/harddriv.cpp @@ -8,7 +8,6 @@ #include "emu.h" #include "includes/harddriv.h" -#include "machine/atarigen.h" #include "cpu/tms32010/tms32010.h" #include "sound/volt_reg.h" diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp index c324611bf53..7f5ecb15fa3 100644 --- a/src/mame/machine/harddriv.cpp +++ b/src/mame/machine/harddriv.cpp @@ -37,7 +37,6 @@ void harddriv_state::device_start() { m_lamps.resolve(); - //atarigen_state::machine_start(); /* predetermine memory regions */ m_adsp_pgm_memory_word = (uint16_t *)(reinterpret_cast(m_adsp_pgm_memory.target()) + 1); @@ -50,7 +49,6 @@ void harddriv_state::device_start() void harddriv_state::device_reset() { /* generic reset */ - //atarigen_state::machine_reset(); if (m_slapstic_device.found()) m_slapstic_device->slapstic_reset(); /* halt several of the DSPs to start */ diff --git a/src/mame/video/blstroid.cpp b/src/mame/video/blstroid.cpp index 116f3a101f1..e903a2be935 100644 --- a/src/mame/video/blstroid.cpp +++ b/src/mame/video/blstroid.cpp @@ -7,10 +7,8 @@ ****************************************************************************/ #include "emu.h" -#include "cpu/m68000/m68000.h" -#include "machine/atarigen.h" -#include "video/atarimo.h" #include "includes/blstroid.h" +#include "cpu/m68000/m68000.h" diff --git a/src/mame/video/cyberbal.cpp b/src/mame/video/cyberbal.cpp index d53bd7a3287..053cde7ae86 100644 --- a/src/mame/video/cyberbal.cpp +++ b/src/mame/video/cyberbal.cpp @@ -7,7 +7,6 @@ ****************************************************************************/ #include "emu.h" -#include "machine/atarigen.h" #include "includes/cyberbal.h" diff --git a/src/mame/video/gauntlet.cpp b/src/mame/video/gauntlet.cpp index 1bb426c24be..87120366b7a 100644 --- a/src/mame/video/gauntlet.cpp +++ b/src/mame/video/gauntlet.cpp @@ -7,8 +7,6 @@ ****************************************************************************/ #include "emu.h" -#include "machine/atarigen.h" -#include "video/atarimo.h" #include "includes/gauntlet.h" diff --git a/src/mame/video/rampart.cpp b/src/mame/video/rampart.cpp index 4798bb4d8c8..0d1175045da 100644 --- a/src/mame/video/rampart.cpp +++ b/src/mame/video/rampart.cpp @@ -7,8 +7,6 @@ ****************************************************************************/ #include "emu.h" -#include "machine/atarigen.h" -#include "video/atarimo.h" #include "includes/rampart.h" /************************************* diff --git a/src/mame/video/toobin.cpp b/src/mame/video/toobin.cpp index 707fde4245c..ea0a163b78c 100644 --- a/src/mame/video/toobin.cpp +++ b/src/mame/video/toobin.cpp @@ -7,7 +7,6 @@ ****************************************************************************/ #include "emu.h" -#include "machine/atarigen.h" #include "includes/toobin.h" diff --git a/src/mame/video/xybots.cpp b/src/mame/video/xybots.cpp index 7ce1bf168c4..a512800da3d 100644 --- a/src/mame/video/xybots.cpp +++ b/src/mame/video/xybots.cpp @@ -7,8 +7,6 @@ ****************************************************************************/ #include "emu.h" -#include "machine/atarigen.h" -#include "video/atarimo.h" #include "includes/xybots.h" -- cgit v1.2.3 From 631d4901a33f57da11900c927cdbe66d6969c1b2 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 10 Jul 2020 23:04:11 -0400 Subject: glcx.cpp: Fix typo in documentation --- src/mame/drivers/glcx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/glcx.cpp b/src/mame/drivers/glcx.cpp index c63259699ef..9f74baed4ab 100644 --- a/src/mame/drivers/glcx.cpp +++ b/src/mame/drivers/glcx.cpp @@ -39,7 +39,7 @@ Leader 8008 CX (German version) CPU = epoxy blob GM76U8128CLFW85 = LGS / Hynix 131,072 WORDS x 8 BIT CMOS SRAM -TMP47C241MG = TCLS-47 series 4-bit CPU with 2048x8 internal ROM +TMP47C241MG = TLCS-47 series 4-bit CPU with 2048x8 internal ROM */ -- cgit v1.2.3 From b25fb2d37bed9ae5be090b9231362d2ee9916266 Mon Sep 17 00:00:00 2001 From: Sterophonick <34801996+Sterophonick@users.noreply.github.com> Date: Fri, 10 Jul 2020 20:16:06 -0700 Subject: gigatron: some more work (#6940) * gigatron: some more work cleanup, more callbacks, start on video generation logic * gigatron: some more video work (nw) * gigatron: remove random (nw) --- src/devices/cpu/gigatron/gigatron.cpp | 46 +++++++++++++------- src/devices/cpu/gigatron/gigatron.h | 13 +++--- src/mame/drivers/gigatron.cpp | 80 ++++++++++++++++++++++++++++------- 3 files changed, 104 insertions(+), 35 deletions(-) diff --git a/src/devices/cpu/gigatron/gigatron.cpp b/src/devices/cpu/gigatron/gigatron.cpp index 78e3a19afb2..9226bdda40c 100644 --- a/src/devices/cpu/gigatron/gigatron.cpp +++ b/src/devices/cpu/gigatron/gigatron.cpp @@ -13,7 +13,7 @@ #include "gigatrondasm.h" -DEFINE_DEVICE_TYPE(GTRON, gigatron_cpu_device, "gigatron_cpu", "Gigatron") +DEFINE_DEVICE_TYPE(GTRON, gigatron_cpu_device, "gigatron_cpu", "Gigatron CPU") /* FLAGS */ @@ -89,19 +89,6 @@ void gigatron_cpu_device::device_start() m_program = &space(AS_PROGRAM); m_data = &space(AS_DATA); - init(); -} - -void gigatron_cpu_device::init() -{ - m_ac = 0; - m_x = 0; - m_y = 0; - m_pc = 0; - m_npc = (m_pc + 1) & m_romMask; - m_ppc = 0; - m_inReg = 0xFF; - state_add(GTRON_PC, "PC", m_pc); state_add(GTRON_NPC, "NPC", m_npc); state_add(STATE_GENPC, "GENPC", m_pc).noshow(); @@ -110,6 +97,8 @@ void gigatron_cpu_device::init() state_add(GTRON_X, "X", m_x); state_add(GTRON_Y, "Y", m_y); state_add(GTRON_IREG, "IREG", m_inReg); + state_add(GTRON_OUTX, "OUTX", m_outx); + state_add(GTRON_OUT, "OUT", m_out); set_icountptr(m_icount); @@ -120,9 +109,27 @@ void gigatron_cpu_device::init() save_item(NAME(m_ppc)); save_item(NAME(m_inReg)); save_item(NAME(m_pc)); + save_item(NAME(m_outx)); + save_item(NAME(m_out)); m_outx_cb.resolve_safe(); + m_out_cb.resolve_safe(); m_ir_cb.resolve_safe(0); + + reset_cpu(); +} + +void gigatron_cpu_device::reset_cpu() +{ + m_ac = 0; + m_x = 0; + m_y = 0; + m_pc = 0; + m_npc = (m_pc + 1) & m_romMask; + m_ppc = 0; + m_inReg = 0xFF; + m_outx = 0; + m_out = 0; } void gigatron_cpu_device::branchOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t d) @@ -220,6 +227,10 @@ void gigatron_cpu_device::aluOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t d case 6: case 7: uint16_t rising = ~(m_out & b); + m_out = b; + m_out_cb(0, m_out, 0xFF); + + // rising edge of out[6] registers outx from ac if (rising & 0x40) { m_outx = m_ac; @@ -276,6 +287,9 @@ void gigatron_cpu_device::storeOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t case 0: b = d; break; + case 1: + b = 0; + break; case 2: b = m_ac; break; @@ -292,7 +306,7 @@ void gigatron_cpu_device::storeOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t switch (mode) { - case 4: + case 4: // XXX not clear whether x++ mode takes priority m_x = b; break; case 5: @@ -303,6 +317,7 @@ void gigatron_cpu_device::storeOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t void gigatron_cpu_device::device_reset() { + reset_cpu(); } void gigatron_cpu_device::execute_set_input(int irqline, int state) @@ -323,6 +338,7 @@ gigatron_cpu_device::gigatron_cpu_device(const machine_config &mconfig, const ch , m_program_config("program", ENDIANNESS_BIG, 16, 14, -1) , m_data_config("data", ENDIANNESS_BIG, 8, 15, 0) , m_outx_cb(*this) + , m_out_cb(*this) , m_ir_cb(*this) { } diff --git a/src/devices/cpu/gigatron/gigatron.h b/src/devices/cpu/gigatron/gigatron.h index 50f359af21f..b0dfa150be4 100644 --- a/src/devices/cpu/gigatron/gigatron.h +++ b/src/devices/cpu/gigatron/gigatron.h @@ -16,7 +16,8 @@ enum { GTRON_PC, GTRON_NPC, - GTRON_AC, GTRON_X, GTRON_Y, GTRON_IREG + GTRON_AC, GTRON_X, GTRON_Y, GTRON_IREG, + GTRON_OUTX, GTRON_OUT }; @@ -26,6 +27,7 @@ public: // construction/destruction gigatron_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); auto outx_cb() { return m_outx_cb.bind(); } + auto out_cb() { return m_out_cb.bind(); } auto ir_cb() { return m_ir_cb.bind(); } protected: @@ -48,6 +50,8 @@ protected: // device_memory_interface overrides virtual space_config_vector memory_space_config() const override; + + void reset_cpu(); void branchOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t d); void aluOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t d); @@ -63,10 +67,8 @@ protected: uint8_t m_inReg; uint16_t m_ramMask; uint16_t m_romMask; - uint16_t m_out; - uint16_t m_outx; - - virtual void init(); + uint8_t m_out; + uint8_t m_outx; private: address_space_config m_program_config; @@ -81,6 +83,7 @@ private: void gigatron_illegal(); devcb_write8 m_outx_cb; + devcb_write8 m_out_cb; devcb_read8 m_ir_cb; }; diff --git a/src/mame/drivers/gigatron.cpp b/src/mame/drivers/gigatron.cpp index 30590ebc4a2..5ec4714dc1d 100644 --- a/src/mame/drivers/gigatron.cpp +++ b/src/mame/drivers/gigatron.cpp @@ -16,6 +16,8 @@ #include "speaker.h" #define MAIN_CLOCK 6250000 +#define VSYNC 0x80 +#define HSYNC 0x40 class gigatron_state : public driver_device { @@ -36,24 +38,70 @@ private: virtual void machine_start() override; virtual void machine_reset() override; + virtual void video_start() override; void prog_map(address_map &map); void data_map(address_map &map); uint16_t lights_changed; - - uint8_t gigatron_random() - { - return machine().rand() & 0xff; - } + + //Video Generation stuff + uint8_t machineOut; + uint8_t row; + uint8_t col; + uint8_t pixel; void blinkenlights(uint8_t data); + void video_draw(u8 data); uint8_t inputs(); + + std::unique_ptr m_bitmap_render; + std::unique_ptr m_bitmap_buffer; required_device m_maincpu; required_ioport m_io_inputs; }; +void gigatron_state::video_start() +{ + m_bitmap_render = std::make_unique(640, 480); + m_bitmap_buffer = std::make_unique(640, 480); +} + +void gigatron_state::video_draw(u8 data) +{ + uint8_t out = data; + uint8_t falling = machineOut & ~out; + + if (falling & VSYNC) + { + row = 0; + pixel = 0; + } + + if (falling & HSYNC) + { + col = 0; + row++; + } + + machineOut = out; + + if ((out & (VSYNC | HSYNC)) != (VSYNC | HSYNC)) + { + return; + } + + if((row >= 0 && row < 480) && (col >= 0 && col < 640)) + { + //uint16_t *dest; + //uint8_t tPixel = pixel; + //uint8_t r = (out << 6) & 0xC0; + //uint8_t g = (out << 4) & 0xC0; + //uint8_t b = (out << 2) & 0xC0; + } +} + uint32_t gigatron_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; @@ -106,6 +154,7 @@ void gigatron_state::gigatron(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &gigatron_state::prog_map); m_maincpu->set_addrmap(AS_DATA, &gigatron_state::data_map); m_maincpu->outx_cb().set(FUNC(gigatron_state::blinkenlights)); + m_maincpu->out_cb().set(FUNC(gigatron_state::video_draw)); m_maincpu->ir_cb().set(FUNC(gigatron_state::inputs)); /* video hardware */ @@ -120,15 +169,16 @@ void gigatron_state::gigatron(machine_config &config) } ROM_START( gigatron ) - ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_SYSTEM_BIOS(0, "v4", "Gigatron ROM V4") - ROMX_LOAD( "gigrom4.rom", 0x0000, 0x20000, CRC(78995109) SHA1(2395fc48e64099836111f5aeca39ddbf4650ea4e),ROM_BIOS(0)) - ROM_SYSTEM_BIOS(1, "v3", "Gigatron ROM V3") - ROMX_LOAD( "gigrom3.rom", 0x0000, 0x20000, CRC(1536efbe) SHA1(959268069e761a01d620396eedb9abc1ee63c421),ROM_BIOS(1)) - ROM_SYSTEM_BIOS(2, "v2", "Gigatron ROM V2") - ROMX_LOAD( "gigrom2.rom", 0x0000, 0x20000, CRC(b4a3d936) SHA1(c93f417d589144b912c79f85b9e942d66242c2c3),ROM_BIOS(2)) - ROM_SYSTEM_BIOS(3, "v1", "Gigatron ROM V1") - ROMX_LOAD( "gigrom1.rom", 0x0000, 0x20000, CRC(8ea5a2af) SHA1(e5758d5cc467c3476bd8f992fd45dfcdf06d0430),ROM_BIOS(3)) + ROM_SYSTEM_BIOS(0, "v5a", "Gigatron ROM V5a") + ROMX_LOAD( "gigrom5a.rom", 0x0000, 0x20000, CRC(DCC071A6) SHA1(F82059BA0227FF48E4C687B90C8445DA30213EE2),ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "v4", "Gigatron ROM V4") + ROMX_LOAD( "gigrom4.rom", 0x0000, 0x20000, CRC(78995109) SHA1(2395fc48e64099836111f5aeca39ddbf4650ea4e),ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "v3", "Gigatron ROM V3") + ROMX_LOAD( "gigrom3.rom", 0x0000, 0x20000, CRC(1536efbe) SHA1(959268069e761a01d620396eedb9abc1ee63c421),ROM_BIOS(2)) + ROM_SYSTEM_BIOS(3, "v2", "Gigatron ROM V2") + ROMX_LOAD( "gigrom2.rom", 0x0000, 0x20000, CRC(b4a3d936) SHA1(c93f417d589144b912c79f85b9e942d66242c2c3),ROM_BIOS(3)) + ROM_SYSTEM_BIOS(4, "v1", "Gigatron ROM V1") + ROMX_LOAD( "gigrom1.rom", 0x0000, 0x20000, CRC(8ea5a2af) SHA1(e5758d5cc467c3476bd8f992fd45dfcdf06d0430),ROM_BIOS(4)) ROM_END -COMP(2018, gigatron, 0, 0, gigatron, gigatron, gigatron_state, empty_init, "Marcel van Kervinck", "Gigatron TTL Microcomputer", MACHINE_IS_SKELETON) +COMP(2018, gigatron, 0, 0, gigatron, gigatron, gigatron_state, empty_init, "Marcel van Kervinck / Walter Belgers", "Gigatron TTL Microcomputer", MACHINE_IS_SKELETON) -- cgit v1.2.3 From 7ba52ffca405291f1b40e08a87e500a45a67a04c Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Sat, 11 Jul 2020 05:17:35 +0200 Subject: New working clones (#6924) * New working clones ------------------ Robotron: 2084 (Unidesa license) [Juan Romero, ClawGrip] * Add 'robotronun' (nw) * williams.cpp: Change "FAMARE S.A." -> "Famaresa" (nw) --- src/mame/drivers/williams.cpp | 268 +++++++++++++++++++++++------------------- src/mame/mame.lst | 1 + 2 files changed, 147 insertions(+), 122 deletions(-) diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp index 1a747643f48..cfcc015bddd 100644 --- a/src/mame/drivers/williams.cpp +++ b/src/mame/drivers/williams.cpp @@ -541,7 +541,7 @@ void defender_state::bankc000_map(address_map &map) void mayday_state::main_map(address_map &map) { defender_state::main_map(map); - /* install a handler to catch protection checks */ + // install a handler to catch protection checks map(0xa190, 0xa191).r(FUNC(mayday_state::protection_r)); } @@ -593,7 +593,7 @@ void sinistar_state::main_map(address_map &map) void bubbles_state::main_map(address_map &map) { base_map(map); - /* bubbles has a full 8-bit-wide CMOS */ + // bubbles has a full 8-bit-wide CMOS map(0xcc00, 0xcfff).w(FUNC(bubbles_state::cmos_w)).share("nvram"); } @@ -606,12 +606,12 @@ void bubbles_state::main_map(address_map &map) void spdball_state::main_map(address_map &map) { base_map(map); - /* install extra input handlers */ + // install extra input handlers map(0xc800, 0xc800).portr("AN0"); map(0xc801, 0xc801).portr("AN1"); map(0xc802, 0xc802).portr("AN2"); map(0xc803, 0xc803).portr("AN3"); - /* add a third PIA */ + // add a third PIA map(0xc808, 0xc80b).mirror(0x00f0).rw(m_pia[3], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); } @@ -682,7 +682,7 @@ void williams2_state::bank8000_map(address_map &map) } -/* mysticm and inferno: D000-DFFF is RAM */ +// mysticm and inferno: D000-DFFF is RAM void williams_d000_ram_state::d000_map(address_map &map) { common_map(map); @@ -691,7 +691,7 @@ void williams_d000_ram_state::d000_map(address_map &map) } -/* tshoot and joust2: D000-DFFF is ROM */ +// tshoot and joust2: D000-DFFF is ROM void williams_d000_rom_state::d000_map(address_map &map) { common_map(map); @@ -708,7 +708,7 @@ void williams_d000_rom_state::d000_map(address_map &map) void defender_state::sound_map(address_map &map) { - map(0x0000, 0x007f).ram(); /* internal RAM */ + map(0x0000, 0x007f).ram(); // internal RAM map(0x0400, 0x0403).mirror(0x8000).rw(m_pia[2], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0xb000, 0xffff).rom(); } @@ -716,8 +716,8 @@ void defender_state::sound_map(address_map &map) void williams_state::sound_map(address_map &map) { - map(0x0000, 0x007f).ram(); /* internal RAM */ - map(0x0080, 0x00ff).ram(); /* MC6810 RAM */ + map(0x0000, 0x007f).ram(); // internal RAM + map(0x0080, 0x00ff).ram(); // MC6810 RAM map(0x0400, 0x0403).mirror(0x8000).rw(m_pia[2], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0xb000, 0xffff).rom(); } @@ -725,8 +725,8 @@ void williams_state::sound_map(address_map &map) /* Same as above, but for second sound board */ void blaster_state::sound2_map(address_map &map) { - map(0x0000, 0x007f).ram(); /* internal RAM */ - map(0x0080, 0x00ff).ram(); /* MC6810 RAM */ + map(0x0000, 0x007f).ram(); // internal RAM + map(0x0080, 0x00ff).ram(); // MC6810 RAM map(0x0400, 0x0403).mirror(0x8000).rw(m_pia[3], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0xb000, 0xffff).rom(); } @@ -741,8 +741,8 @@ void blaster_state::sound2_map(address_map &map) void williams2_state::sound_map(address_map &map) { - map(0x0000, 0x007f).ram(); /* internal RAM */ - map(0x0080, 0x00ff).ram(); /* MC6810 RAM */ + map(0x0000, 0x007f).ram(); // internal RAM + map(0x0080, 0x00ff).ram(); // MC6810 RAM map(0x2000, 0x2003).mirror(0x1ffc).rw(m_pia[2], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0xe000, 0xffff).rom(); } @@ -828,8 +828,8 @@ static INPUT_PORTS_START( mayday ) PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Auto Up / Manual Down") PORT_TOGGLE /* Default to Auto Up */ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Advance") /* ? */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Auto Up / Manual Down") PORT_TOGGLE // Default to Auto Up + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Advance") // ? PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Test Credit") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -863,10 +863,10 @@ static INPUT_PORTS_START( colony7 ) PORT_DIPSETTING( 0x02, "30k/50k" ) PORT_CONDITION("IN2",0x01,NOTEQUALS,0x01) PORT_DIPSETTING( 0x00, "30k/50k" ) PORT_CONDITION("IN2",0x01,EQUALS,0x01) PORT_DIPSETTING( 0x02, "40k/70k" ) PORT_CONDITION("IN2",0x01,EQUALS,0x01) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown )) /* documented as unused */ + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown )) // documented as unused PORT_DIPSETTING( 0x04, DEF_STR( Off )) PORT_DIPSETTING( 0x00, DEF_STR( On )) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown )) /* documented as unused */ + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown )) // documented as unused PORT_DIPSETTING( 0x08, DEF_STR( Off )) PORT_DIPSETTING( 0x00, DEF_STR( On )) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -1106,7 +1106,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( sinistar ) PORT_START("IN0") - /* pseudo analog joystick, see below */ + // pseudo analog joystick, see below PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) @@ -1125,10 +1125,10 @@ static INPUT_PORTS_START( sinistar ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("49WAYX") /* converted by port_0_49way_r() */ + PORT_START("49WAYX") // converted by port_0_49way_r() PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) - PORT_START("49WAYY") /* converted by port_0_49way_r() */ + PORT_START("49WAYY") // converted by port_0_49way_r() PORT_BIT( 0xff, 0x38, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE INPUT_PORTS_END @@ -1187,17 +1187,17 @@ static INPUT_PORTS_START( blaster ) PORT_START("INP2") PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("49WAYX") /* converted by port_0_49way_r() */ + PORT_START("49WAYX") // converted by port_0_49way_r() PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) - PORT_START("49WAYY") /* converted by port_0_49way_r() */ + PORT_START("49WAYY") // converted by port_0_49way_r() PORT_BIT( 0xff, 0x38, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE INPUT_PORTS_END static INPUT_PORTS_START( blastkit ) PORT_START("IN0") - /* pseudo analog joystick, see below */ + // pseudo analog joystick, see below PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) @@ -1213,10 +1213,10 @@ static INPUT_PORTS_START( blastkit ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("49WAYX") /* converted by port_0_49way_r() */ + PORT_START("49WAYX") // converted by port_0_49way_r() PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) - PORT_START("49WAYY") /* converted by port_0_49way_r() */ + PORT_START("49WAYY") // converted by port_0_49way_r() PORT_BIT( 0xff, 0x38, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_START("IN3") @@ -1265,16 +1265,16 @@ static INPUT_PORTS_START( spdball ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_START("AN0") /* analog */ + PORT_START("AN0") // analog PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1) - PORT_START("AN1") /* analog */ + PORT_START("AN1") // analog PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1) - PORT_START("AN2") /* analog */ + PORT_START("AN2") // analog PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(2) - PORT_START("AN3") /* analog */ + PORT_START("AN3") // analog PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(2) INPUT_PORTS_END @@ -1355,7 +1355,7 @@ static INPUT_PORTS_START( mysticm ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Key */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) // Key PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_START("IN1") @@ -1386,7 +1386,7 @@ static INPUT_PORTS_START( tshoot ) PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Grenade") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gobble") - PORT_BIT( 0x3c, IP_ACTIVE_HIGH, IPT_UNUSED ) /* 0011-1100 output */ + PORT_BIT( 0x3c, IP_ACTIVE_HIGH, IPT_UNUSED ) // 0011-1100 output PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 ) @@ -1534,7 +1534,7 @@ GFXDECODE_END void williams_state::williams_base(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware MC6809E(config, m_maincpu, MASTER_CLOCK/3/4); m_maincpu->set_addrmap(AS_PROGRAM, &williams_state::base_map); @@ -1551,7 +1551,7 @@ void williams_state::williams_base(machine_config &config) WATCHDOG_TIMER(config, m_watchdog); - /* video hardware */ + // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_SCANLINE | VIDEO_ALWAYS_UPDATE); m_screen->set_raw(MASTER_CLOCK*2/3, 512, 6, 298, 260, 7, 247); @@ -1559,14 +1559,14 @@ void williams_state::williams_base(machine_config &config) PALETTE(config, m_palette, FUNC(williams_state::palette_init), 256); - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // mc1408.ic6 voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); - /* pia */ + // pia INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, "soundirq").output_handler().set_inputline(m_soundcpu, M6808_IRQ_LINE); @@ -1592,7 +1592,7 @@ void defender_state::defender(machine_config &config) { williams_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &defender_state::main_map); m_soundcpu->set_addrmap(AS_PROGRAM, &defender_state::sound_map); @@ -1606,7 +1606,7 @@ void defender_state::defender(machine_config &config) void defender_state::jin(machine_config &config) // needs a different screen size or the credit text is clipped { defender(config); - /* basic machine hardware */ + // basic machine hardware m_screen->set_visarea(0, 315, 7, 247-1); } @@ -1615,9 +1615,9 @@ void williams_muxed_state::williams_muxed(machine_config &config) { williams_base(config); - /* basic machine hardware */ + // basic machine hardware - /* pia */ + // pia m_pia[0]->readpa_handler().set_ioport("IN0").mask(0x30); m_pia[0]->readpa_handler().append("mux_0", FUNC(ls157_device::output_r)).mask(0x0f); m_pia[0]->readpa_handler().append("mux_1", FUNC(ls157_device::output_r)).lshift(6).mask(0xc0); @@ -1640,10 +1640,10 @@ void spdball_state::spdball(machine_config &config) { williams_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &spdball_state::main_map); - /* pia */ + // pia PIA6821(config, m_pia[3], 0); m_pia[3]->readpa_handler().set_ioport("IN3"); m_pia[3]->readpb_handler().set_ioport("IN4"); @@ -1654,9 +1654,9 @@ void williams_state::lottofun(machine_config &config) { williams_base(config); - /* basic machine hardware */ + // basic machine hardware - /* pia */ + // pia m_pia[0]->writepa_handler().set("ticket", FUNC(ticket_dispenser_device::motor_w)).bit(7); m_pia[0]->ca2_handler().set(FUNC(williams_state::lottofun_coin_lock_w)); @@ -1668,13 +1668,13 @@ void sinistar_state::sinistar(machine_config &config) { williams_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &sinistar_state::main_map); - /* sound hardware */ + // sound hardware HC55516(config, "cvsd", 0).add_route(ALL_OUTPUTS, "speaker", 0.8); - /* pia */ + // pia m_pia[0]->readpa_handler().set(FUNC(williams_state::port_0_49way_r)); m_pia[2]->ca2_handler().set("cvsd", FUNC(hc55516_device::digit_w)); @@ -1686,7 +1686,7 @@ void bubbles_state::bubbles(machine_config &config) // has a full 8-bit NVRAM e { williams_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &bubbles_state::main_map); } @@ -1695,15 +1695,15 @@ void playball_state::playball(machine_config &config) { williams_base(config); - /* basic machine hardware */ + // basic machine hardware - /* video hardware */ + // video hardware m_screen->set_visarea(6, 298-1, 8, 240-1); - /* sound hardware */ + // sound hardware HC55516(config, "cvsd", 0).add_route(ALL_OUTPUTS, "speaker", 0.8); - /* pia */ + // pia m_pia[1]->writepb_handler().set(FUNC(playball_state::snd_cmd_w)); m_pia[2]->ca2_handler().set("cvsd", FUNC(hc55516_device::digit_w)); @@ -1715,13 +1715,13 @@ void blaster_state::blastkit(machine_config &config) { williams_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &blaster_state::main_map); - /* video hardware */ + // video hardware m_screen->set_screen_update(FUNC(blaster_state::screen_update)); - /* pia */ + // pia m_pia[0]->readpa_handler().set("mux_a", FUNC(ls157_x2_device::output_r)); m_pia[0]->cb2_handler().set("mux_a", FUNC(ls157_x2_device::select_w)); @@ -1737,11 +1737,11 @@ void blaster_state::blaster(machine_config &config) { blastkit(config); - /* basic machine hardware */ + // basic machine hardware M6808(config, m_soundcpu_b, SOUND_CLOCK); // internal clock divider of 4, effective frequency is 894.886kHz m_soundcpu_b->set_addrmap(AS_PROGRAM, &blaster_state::sound2_map); - /* pia */ + // pia m_pia[0]->readpb_handler().set("mux_b", FUNC(ls157_device::output_r)).mask(0x0f); m_pia[0]->readpb_handler().append_ioport("IN1").mask(0xf0); m_pia[0]->cb2_handler().set("mux_a", FUNC(ls157_x2_device::select_w)); @@ -1766,7 +1766,7 @@ void blaster_state::blaster(machine_config &config) m_pia[3]->irqa_handler().set("soundirq_b", FUNC(input_merger_any_high_device::in_w<0>)); m_pia[3]->irqb_handler().set("soundirq_b", FUNC(input_merger_any_high_device::in_w<1>)); - /* sound hardware */ + // sound hardware config.device_remove("speaker"); config.device_remove("dac"); config.device_remove("vref"); @@ -1783,10 +1783,10 @@ void blaster_state::blaster(machine_config &config) void williams2_state::williams2_base(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware MC6809E(config, m_maincpu, MASTER_CLOCK/3/4); - M6808(config, m_soundcpu, MASTER_CLOCK/3); /* yes, this is different from the older games */ + M6808(config, m_soundcpu, MASTER_CLOCK/3); // yes, this is different from the older games m_soundcpu->set_addrmap(AS_PROGRAM, &williams2_state::sound_map); ADDRESS_MAP_BANK(config, "bank8000").set_map(&williams2_state::bank8000_map).set_options(ENDIANNESS_BIG, 8, 12, 0x800); @@ -1801,7 +1801,7 @@ void williams2_state::williams2_base(machine_config &config) WATCHDOG_TIMER(config, m_watchdog); - /* video hardware */ + // video hardware PALETTE(config, m_palette).set_entries(1024); GFXDECODE(config, m_gfxdecode, m_palette, gfx_williams2); @@ -1810,7 +1810,7 @@ void williams2_state::williams2_base(machine_config &config) m_screen->set_raw(MASTER_CLOCK*2/3, 512, 8, 284, 260, 8, 248); m_screen->set_screen_update(FUNC(williams2_state::screen_update)); - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); @@ -1820,7 +1820,7 @@ void williams2_state::williams2_base(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, "soundirq").output_handler().set_inputline(m_soundcpu, M6808_IRQ_LINE); - /* pia */ + // pia PIA6821(config, m_pia[0], 0); m_pia[0]->readpa_handler().set_ioport("IN0"); m_pia[0]->readpb_handler().set_ioport("IN1"); @@ -1846,7 +1846,7 @@ void inferno_state::inferno(machine_config &config) williams2_base(config); m_maincpu->set_addrmap(AS_PROGRAM, &inferno_state::d000_map); - /* pia */ + // pia m_pia[0]->readpa_handler().set("mux", FUNC(ls157_x2_device::output_r)); m_pia[0]->ca2_handler().set("mux", FUNC(ls157_x2_device::select_w)); @@ -1863,7 +1863,7 @@ void mysticm_state::mysticm(machine_config &config) m_screen->set_raw(MASTER_CLOCK*2/3, 512, 8, 284, 256, 8, 248); m_screen->set_screen_update(FUNC(mysticm_state::screen_update)); - /* pia */ + // pia m_pia[0]->irqa_handler().set_inputline("maincpu", M6809_FIRQ_LINE); m_pia[0]->irqb_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<0>)); @@ -1876,10 +1876,10 @@ void tshoot_state::tshoot(machine_config &config) { williams2_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &tshoot_state::d000_map); - /* pia */ + // pia m_pia[0]->readpa_handler().set("mux", FUNC(ls157_x2_device::output_r)); m_pia[0]->writepb_handler().set(FUNC(tshoot_state::lamp_w)); m_pia[0]->ca2_handler().set("mux", FUNC(ls157_x2_device::select_w)); @@ -1901,12 +1901,12 @@ void joust2_state::joust2(machine_config &config) { williams2_base(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &joust2_state::d000_map); WILLIAMS_CVSD_SOUND(config, m_cvsd_sound).add_route(ALL_OUTPUTS, "speaker", 1.0); - /* pia */ + // pia m_pia[0]->readpa_handler().set_ioport("IN0").mask(0xf0); m_pia[0]->readpa_handler().append("mux", FUNC(ls157_device::output_r)).mask(0x0f); m_pia[0]->ca2_handler().set("mux", FUNC(ls157_device::select_w)); @@ -1994,7 +1994,7 @@ ROM_START( defenderb ) ROM_LOAD( "decoder.1", 0x0000, 0x0200, CRC(8dd98da5) SHA1(da979604f7a2aa8b5a6d4a5debd2e80f77569e35) ) ROM_END -/* the white set seems to be the source of the defcmnd & startrkd bootlegs */ +// the white set seems to be the source of the defcmnd & startrkd bootlegs ROM_START( defenderw ) ROM_REGION( 0x19000, "maincpu", 0 ) ROM_LOAD( "rom1.bin", 0x0d000, 0x1000, CRC(5af871e3) SHA1(f9a42619b37db2eb07d0302ac9d0ff5c1923c21d) ) @@ -2061,7 +2061,7 @@ ROM_START( tornado1 ) ROM_CONTINUE ( 0x000, 0x800 ) // cut rom instead? ROM_END -/* I suspect this one is a bad dump */ +// I suspect this one is a bad dump ROM_START( tornado2 ) ROM_REGION( 0x19000, "maincpu", 0 ) ROM_LOAD( "tto15.bin", 0x0d000, 0x1000, BAD_DUMP CRC(910ac603) SHA1(33705b5ce4242a5865a8b4ecf27aa9e656067ea3) ) // 1ST AND 2ND HALF IDENTICAL @@ -2396,6 +2396,29 @@ ROM_START( robotronyo ) ROM_LOAD( "decoder.6", 0x0200, 0x0200, CRC(83faf25e) SHA1(30002643d08ed983a6701a7c4b5ee74a2f4a1adb) ) ROM_END +ROM_START( robotronun ) + ROM_REGION( 0x19000, "maincpu", 0 ) + ROM_LOAD( "roboun11.10b", 0x0d000, 0x1000, CRC(13797024) SHA1(d426a50e75dabe936de643c83a548da5e399331c) ) + ROM_LOAD( "roboun11.11b", 0x0e000, 0x1000, CRC(7e3c1b87) SHA1(f8c6cbe3688f256f41a121255fc08f575f6a4b4f) ) + ROM_LOAD( "roboun11.12b", 0x0f000, 0x1000, CRC(645d543e) SHA1(fad7cea868ebf17347c4bc5193d647bbd8f9517b) ) + ROM_LOAD( "roboun11.1b", 0x10000, 0x1000, CRC(66c7d3ef) SHA1(f6d60e26c209c1df2cc01ac07ad5559daa1b7118) ) + ROM_LOAD( "roboun11.2b", 0x11000, 0x1000, CRC(5bc6c614) SHA1(4d6e82bc29f49100f7751ccfc6a9ff35695b84b3) ) + ROM_LOAD( "roboun11.3b", 0x12000, 0x1000, CRC(e99a82be) SHA1(06a8c8dd0b4726eb7f0bb0e89c8533931d75fc1c) ) + ROM_LOAD( "roboun11.4b", 0x13000, 0x1000, CRC(afb1c561) SHA1(aaf89c19fd8f4e8750717169eb1af476aef38a5e) ) + ROM_LOAD( "roboun11.5b", 0x14000, 0x1000, CRC(62691e77) SHA1(79b4680ce19bd28882ae823f0e7b293af17cbb91) ) + ROM_LOAD( "roboun11.6b", 0x15000, 0x1000, CRC(bd2c853d) SHA1(f76ec5432a7939b33a27be1c6855e2dbe6d9fdc8) ) + ROM_LOAD( "roboun11.7b", 0x16000, 0x1000, CRC(8981a43b) SHA1(8ecab99093d42cb66e177dfa7cf7e352667930ca) ) + ROM_LOAD( "roboun11.8b", 0x17000, 0x1000, CRC(3a96e88c) SHA1(7ae38a609ed9a6f62ca003cab719740ed7651b7c) ) + ROM_LOAD( "roboun11.9b", 0x18000, 0x1000, CRC(b124367b) SHA1(fd9d75b866f0ebbb723f84889337e6814496a103) ) + + ROM_REGION( 0x10000, "soundcpu", 0 ) + ROM_LOAD( "roboun11.snd", 0xf000, 0x1000, CRC(c56c1d28) SHA1(15afefef11bfc3ab78f61ab046701db78d160ec3) ) + + ROM_REGION( 0x0400, "proms", 0 ) + ROM_LOAD( "decoder.4", 0x0000, 0x0200, CRC(e6631c23) SHA1(9988723269367fb44ef83f627186a1c88cf7877e) ) + ROM_LOAD( "decoder.6", 0x0200, 0x0200, CRC(83faf25e) SHA1(30002643d08ed983a6701a7c4b5ee74a2f4a1adb) ) +ROM_END + ROM_START( robotron87 ) ROM_REGION( 0x19000, "maincpu", 0 ) ROM_LOAD( "robotron.sba", 0x0d000, 0x1000, CRC(13797024) SHA1(d426a50e75dabe936de643c83a548da5e399331c) ) @@ -2764,7 +2787,7 @@ ROM_START( blaster ) ROM_REGION( 0x10000, "soundcpu_b", 0 ) ROM_LOAD( "18.sb10", 0xf000, 0x1000, CRC(c33a3145) SHA1(6ffe2da7b70c0b576fbc1790a33eecdbb9ee3d02) ) - ROM_REGION( 0x0c00, "proms", 0 ) /* color & video-decoder PROM data */ + ROM_REGION( 0x0c00, "proms", 0 ) // color & video-decoder PROM data ROM_LOAD( "4.u42", 0x0800, 0x0200, CRC(e6631c23) SHA1(9988723269367fb44ef83f627186a1c88cf7877e) ) ROM_LOAD( "6.u23", 0x0a00, 0x0200, CRC(83faf25e) SHA1(30002643d08ed983a6701a7c4b5ee74a2f4a1adb) ) ROM_LOAD( "blaster.col", 0x0000, 0x0800, CRC(bac50bc4) SHA1(80a48eb97c6f02703210d00498f9669c36e64326) ) @@ -2797,7 +2820,7 @@ ROM_START( blastero ) ROM_REGION( 0x10000, "soundcpu_b", 0 ) ROM_LOAD( "18.sb10", 0xf000, 0x1000, CRC(c33a3145) SHA1(6ffe2da7b70c0b576fbc1790a33eecdbb9ee3d02) ) - ROM_REGION( 0x0c00, "proms", 0 ) /* color & video-decoder PROM data */ + ROM_REGION( 0x0c00, "proms", 0 ) // color & video-decoder PROM data ROM_LOAD( "4.u42", 0x0800, 0x0200, CRC(e6631c23) SHA1(9988723269367fb44ef83f627186a1c88cf7877e) ) ROM_LOAD( "6.u23", 0x0a00, 0x0200, CRC(83faf25e) SHA1(30002643d08ed983a6701a7c4b5ee74a2f4a1adb) ) ROM_LOAD( "blaster.col", 0x0000, 0x0800, CRC(bac50bc4) SHA1(80a48eb97c6f02703210d00498f9669c36e64326) ) @@ -2828,7 +2851,7 @@ ROM_START( blasterkit ) ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "blastkit.18", 0xf000, 0x1000, CRC(c33a3145) SHA1(6ffe2da7b70c0b576fbc1790a33eecdbb9ee3d02) ) - ROM_REGION( 0x0c00, "proms", 0 ) /* color & video-decoder PROM data */ + ROM_REGION( 0x0c00, "proms", 0 ) // color & video-decoder PROM data ROM_LOAD( "4.u42", 0x0800, 0x0200, CRC(e6631c23) SHA1(9988723269367fb44ef83f627186a1c88cf7877e) ) ROM_LOAD( "6.u23", 0x0a00, 0x0200, CRC(83faf25e) SHA1(30002643d08ed983a6701a7c4b5ee74a2f4a1adb) ) ROM_LOAD( "blaster.col", 0x0000, 0x0800, CRC(bac50bc4) SHA1(80a48eb97c6f02703210d00498f9669c36e64326) ) @@ -2945,7 +2968,7 @@ ROM_START( mysticm ) ROM_LOAD( "mm13_1.a21", 0x44000, 0x2000, CRC(ef4b79db) SHA1(346057cb8c4593df44fb36771553e60610fe1a0c) ) /* IC21 */ ROM_LOAD( "mm12_1.a19", 0x46000, 0x2000, CRC(a1f04bf0) SHA1(389bdb7c9e395af9275abfb20c3ab51bc12dc4db) ) /* IC19 */ - /* sound CPU */ + // sound CPU ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "mm01_1.a08", 0x0e000, 0x2000, CRC(65339512) SHA1(144625d2905c953383bcc90cd2435d332394883f) ) /* IC8 */ @@ -2954,7 +2977,7 @@ ROM_START( mysticm ) ROM_LOAD( "mm21_1.b58", 0x02000, 0x2000, CRC(cb90b3c5) SHA1(f28cca2c3ff23d6c9e2952a1b08ab2875655ec70) ) /* IC58 */ ROM_LOAD( "mm19_1.b41", 0x04000, 0x2000, CRC(e274df86) SHA1(9876a487c5efa350ced31acbc39df22c8d414677) ) /* IC41 */ - ROM_REGION( 0x200, "proms", 0 ) /* not hooked up */ + ROM_REGION( 0x200, "proms", 0 ) // not hooked up ROM_LOAD( "ic14.bpr", 0x00000, 0x020, CRC(27a6d555) SHA1(988d55092d7d0243a867986873dfd12be67280c7) ) ROM_LOAD( "ic47.bpr", 0x00000, 0x100, CRC(efb03024) SHA1(4c3e3de374f7959a03dcfcb8a29a372685f3b273) ) ROM_LOAD( "ic60.bpr", 0x00000, 0x200, CRC(0ea3f7fb) SHA1(a8a2a7fbc1a3527a8e2cda71d737afaa717902f1) ) @@ -2984,7 +3007,7 @@ ROM_START( mysticmp ) ROM_LOAD( "cpu_2764_ic21_rom13_proto6.i9", 0x44000, 0x2000, CRC(e387a785) SHA1(de98d503f4d2c947c701ff96628114b34da45f93) ) /* ic21 */ // different ROM_LOAD( "cpu_2764_ic19_rom12_proto6.g9", 0x46000, 0x2000, CRC(a1f04bf0) SHA1(389bdb7c9e395af9275abfb20c3ab51bc12dc4db) ) /* ic19 */ - /* sound cpu */ + // sound CPU ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "cpu_2764_ic8_rom1_proto4.f0", 0x0e000, 0x2000, CRC(65339512) SHA1(144625d2905c953383bcc90cd2435d332394883f) ) /* ic8 */ @@ -3019,7 +3042,7 @@ ROM_START( tshoot ) ROM_LOAD( "rom13.ic21", 0x44000, 0x2000, CRC(ec016c9b) SHA1(f2e40abd14b8b4944b792dd453ebe92eb64355ae) ) /* IC21 */ ROM_LOAD( "rom12.ic19", 0x46000, 0x2000, CRC(98ae7afa) SHA1(6a904408419f576352bd2f895727fd17c0541ff8) ) /* IC19 */ - /* sound CPU */ + // sound CPU ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "rom1.ic8", 0xe000, 0x2000, CRC(011a94a7) SHA1(9f54a742a87ba56b9517e33e556f57dce6eb2eab) ) /* IC8 */ @@ -3055,7 +3078,7 @@ ROM_START( inferno ) ROM_LOAD( "ic21.inf", 0x44000, 0x2000, CRC(c405f853) SHA1(6bd74d065a6043849e083c2822925b82c6fedb00) ) /* IC21 */ ROM_LOAD( "ic19.inf", 0x46000, 0x2000, CRC(ade7645a) SHA1(bfaab1840e3171df895a2333a30b9dac214b3351) ) /* IC19 */ - /* sound CPU */ + // sound CPU ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "ic8.inf", 0x0e000, 0x2000, CRC(4e3123b8) SHA1(f453feed3ae3b6430db49eb4325f62eecfee9f5e) ) /* IC8 */ @@ -3096,11 +3119,11 @@ ROM_START( joust2 ) ROM_LOAD( "cpu_2732_ic21_rom14_rev1.9i", 0x44000, 0x2000, CRC(0bbd867c) SHA1(f2db9fc57b6afb762715617345e8c3dcb89b6cc2) ) ROM_LOAD( "cpu_2732_ic19_rom12_rev1.9g", 0x46000, 0x2000, CRC(b9221ed1) SHA1(428ea8f3e2fa58d875f581f5de6e0d05ed855a45) ) - /* sound CPU */ + // sound CPU ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "cpu_2764_ic8_rom1_rev1.0f", 0x0E000, 0x2000, CRC(84517c3c) SHA1(de0b6473953783c091ddcc7aaa89fc1ec3b9d378) ) - /* sound board */ + // sound board ROM_REGION( 0x90000, "cvsd:cpu", 0 ) ROM_LOAD( "snd_27256_rom23_rev1.u4", 0x10000, 0x8000, CRC(3af6b47d) SHA1(aff19d65a4d9c249dec6a9e04a4066fada0f8fa1) ) ROM_RELOAD( 0x18000, 0x8000 ) @@ -3120,7 +3143,7 @@ ROM_START( joust2 ) ROM_LOAD( "vid_27128_ic58_rom21_rev1.9f", 0x04000, 0x4000, CRC(aa94bf05) SHA1(3412dd181e2c12dc2dd1caabfe7e737005b0ccd7) ) ROM_LOAD( "vid_27128_ic41_rom22_rev1.9d", 0x08000, 0x4000, CRC(c41e3daa) SHA1(fafe76bebd6eaf2cd124c1030e3a58eb5a6cddc6) ) - ROM_REGION( 0x200, "proms", 0 ) /* not hooked up */ + ROM_REGION( 0x200, "proms", 0 ) // not hooked up ROM_LOAD( "vid_82s123_ic14_a-5282-10295.2b", 0x00000, 0x020, CRC(85057e40) SHA1(c34cdd24d77031450493da50d4ad02813f9b30a8) ) ROM_LOAD( "vid_82s129_ic47_a-5282-10294.15d", 0x00000, 0x100, CRC(efb03024) SHA1(4c3e3de374f7959a03dcfcb8a29a372685f3b273) ) ROM_LOAD( "vid_82s147a_ic60_a-5282-10292.12f", 0x00000, 0x200, CRC(0ea3f7fb) SHA1(a8a2a7fbc1a3527a8e2cda71d737afaa717902f1) ) @@ -3152,11 +3175,11 @@ ROM_START( joust2r1 ) ROM_LOAD( "cpu_2732_ic21_rom14_rev1.9i", 0x44000, 0x2000, CRC(0bbd867c) SHA1(f2db9fc57b6afb762715617345e8c3dcb89b6cc2) ) ROM_LOAD( "cpu_2732_ic19_rom12_rev1.9g", 0x46000, 0x2000, CRC(b9221ed1) SHA1(428ea8f3e2fa58d875f581f5de6e0d05ed855a45) ) - /* sound CPU */ + // sound CPU ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "cpu_2764_ic8_rom1_rev1.0f", 0x0E000, 0x2000, CRC(84517c3c) SHA1(de0b6473953783c091ddcc7aaa89fc1ec3b9d378) ) - /* sound board */ + // sound board ROM_REGION( 0x90000, "cvsd:cpu", 0 ) ROM_LOAD( "snd_27256_rom23_rev1.u4", 0x10000, 0x8000, CRC(3af6b47d) SHA1(aff19d65a4d9c249dec6a9e04a4066fada0f8fa1) ) ROM_RELOAD( 0x18000, 0x8000 ) @@ -3176,7 +3199,7 @@ ROM_START( joust2r1 ) ROM_LOAD( "vid_27128_ic58_rom21_rev1.9f", 0x04000, 0x4000, CRC(aa94bf05) SHA1(3412dd181e2c12dc2dd1caabfe7e737005b0ccd7) ) ROM_LOAD( "vid_27128_ic41_rom22_rev1.9d", 0x08000, 0x4000, CRC(c41e3daa) SHA1(fafe76bebd6eaf2cd124c1030e3a58eb5a6cddc6) ) - ROM_REGION( 0x200, "proms", 0 ) /* not hooked up */ + ROM_REGION( 0x200, "proms", 0 ) // not hooked up ROM_LOAD( "vid_82s123_ic14_a-5282-10295.2b", 0x00000, 0x020, CRC(85057e40) SHA1(c34cdd24d77031450493da50d4ad02813f9b30a8) ) ROM_LOAD( "vid_82s129_ic47_a-5282-10294.15d", 0x00000, 0x100, CRC(efb03024) SHA1(4c3e3de374f7959a03dcfcb8a29a372685f3b273) ) ROM_LOAD( "vid_82s147a_ic60_a-5282-10292.12f", 0x00000, 0x200, CRC(0ea3f7fb) SHA1(a8a2a7fbc1a3527a8e2cda71d737afaa717902f1) ) @@ -3203,7 +3226,7 @@ void defndjeu_state::driver_init() m_blitter_config = WILLIAMS_BLITTER_NONE; m_blitter_clip_address = 0x0000; - /* apply simple decryption by swapping bits 0 and 7 */ + // apply simple decryption by swapping bits 0 and 7 for (int i = 0xd000; i < 0x19000; i++) rom[i] = bitswap<8>(rom[i],0,6,5,4,3,2,1,7); } @@ -3352,27 +3375,27 @@ void joust2_state::driver_init() * *************************************/ -/* Defender hardware games */ -GAME( 1980, defender, 0, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (Red label)", MACHINE_SUPPORTS_SAVE ) // developers left Williams in 1981 and formed Vid Kidz -GAME( 1980, defenderg, defender, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (Green label)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, defenderb, defender, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (Blue label)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, defenderw, defender, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (White label)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, defenderj, defender, defender, defender, defender_state, empty_init, ROT0, "Williams (Taito Corporation license)", "T.T Defender", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, defndjeu, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Defender (bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, tornado1, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Tornado (set 1, Defender bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, tornado2, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Tornado (set 2, Defender bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // bad dump? -GAME( 1980, zero, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Zero (set 1, Defender bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, zero2, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Amtec)", "Zero (set 2, Defender bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, defcmnd, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg", "Defense Command (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, defence, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg (Outer Limits)", "Defence Command (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, startrkd, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg", "Star Trek (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, attackf, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg (FAMARE S.A.)", "Attack (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, galwars2, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg (Sonic)", "Galaxy Wars II (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) // Sega Sonic - Sega S.A., only displays Sonic on title screen - -GAME( 1980, mayday, 0, defender, mayday, mayday_state, empty_init, ROT0, "Hoei", "Mayday (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) // \ original by Hoei, which one of these 3 sets is bootleg/licensed/original is unknown -GAME( 1980, maydaya, mayday, defender, mayday, mayday_state, empty_init, ROT0, "Hoei", "Mayday (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) // > these games have an unemulated protection chip of some sort which is hacked around in /machine/williams.cpp "protection_r" function -GAME( 1980, maydayb, mayday, defender, mayday, mayday_state, empty_init, ROT0, "Hoei", "Mayday (set 3)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) // / -GAME( 1980, batlzone, mayday, defender, mayday, mayday_state, empty_init, ROT0, "bootleg (Video Game)", "Battle Zone (bootleg of Mayday)", MACHINE_SUPPORTS_SAVE )// the bootleg may or may not use the same protection chip, or some hack around it. +// Defender hardware games +GAME( 1980, defender, 0, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (Red label)", MACHINE_SUPPORTS_SAVE ) // developers left Williams in 1981 and formed Vid Kidz +GAME( 1980, defenderg, defender, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (Green label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, defenderb, defender, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (Blue label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, defenderw, defender, defender, defender, defender_state, empty_init, ROT0, "Williams", "Defender (White label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, defenderj, defender, defender, defender, defender_state, empty_init, ROT0, "Williams (Taito Corporation license)", "T.T Defender", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, defndjeu, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Defender (bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, tornado1, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Tornado (set 1, Defender bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, tornado2, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Tornado (set 2, Defender bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // bad dump? +GAME( 1980, zero, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Jeutel)", "Zero (set 1, Defender bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, zero2, defender, defender, defender, defndjeu_state, empty_init, ROT0, "bootleg (Amtec)", "Zero (set 2, Defender bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, defcmnd, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg", "Defense Command (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, defence, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg (Outer Limits)", "Defence Command (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, startrkd, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg", "Star Trek (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, attackf, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg (Famaresa)", "Attack (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, galwars2, defender, defender, defender, defender_state, empty_init, ROT0, "bootleg (Sonic)", "Galaxy Wars II (Defender bootleg)", MACHINE_SUPPORTS_SAVE ) // Sega Sonic - Sega S.A., only displays Sonic on title screen + +GAME( 1980, mayday, 0, defender, mayday, mayday_state, empty_init, ROT0, "Hoei", "Mayday (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) // \ original by Hoei, which one of these 3 sets is bootleg/licensed/original is unknown +GAME( 1980, maydaya, mayday, defender, mayday, mayday_state, empty_init, ROT0, "Hoei", "Mayday (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) // > these games have an unemulated protection chip of some sort which is hacked around in /machine/williams.cpp "protection_r" function +GAME( 1980, maydayb, mayday, defender, mayday, mayday_state, empty_init, ROT0, "Hoei", "Mayday (set 3)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) // / +GAME( 1980, batlzone, mayday, defender, mayday, mayday_state, empty_init, ROT0, "bootleg (Video Game)", "Battle Zone (bootleg of Mayday)", MACHINE_SUPPORTS_SAVE ) // the bootleg may or may not use the same protection chip, or some hack around it. GAME( 1981, colony7, 0, defender, colony7, defender_state, empty_init, ROT270, "Taito", "Colony 7 (set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, colony7a, colony7, defender, colony7, defender_state, empty_init, ROT270, "Taito", "Colony 7 (set 2)", MACHINE_SUPPORTS_SAVE ) @@ -3381,47 +3404,48 @@ GAME( 1982, jin, 0, jin, jin, defender_state, -/* Standard Williams hardware */ +// Standard Williams hardware GAME( 1981, stargate, 0, williams_base, stargate, williams_state, init_stargate, ROT0, "Williams / Vid Kidz", "Stargate", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, robotron, 0, williams_base, robotron, williams_state, init_robotron, ROT0, "Williams / Vid Kidz", "Robotron: 2084 (Solid Blue label)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, robotronyo, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "Williams / Vid Kidz", "Robotron: 2084 (Yellow/Orange label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, robotron, 0, williams_base, robotron, williams_state, init_robotron, ROT0, "Williams / Vid Kidz", "Robotron: 2084 (Solid Blue label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, robotronyo, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "Williams / Vid Kidz", "Robotron: 2084 (Yellow/Orange label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, robotronun, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "Williams / Vid Kidz (Unidesa license)", "Robotron: 2084 (Unidesa license)", MACHINE_SUPPORTS_SAVE ) + // the 3 below are all noteworthy hacks of the Solid BLue set GAME( 1987, robotron87, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "hack", "Robotron: 2084 (1987 'shot-in-the-corner' bugfix)", MACHINE_SUPPORTS_SAVE ) // fixes a reset bug. -GAME( 2012, robotron12, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "hack", "Robotron: 2084 (2012 'wave 201 start' hack)", MACHINE_SUPPORTS_SAVE ) // includes sitc bug fix, used for competitive play. -GAME( 2015, robotrontd, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "hack", "Robotron: 2084 (2015 'tie-die V2' hack)", MACHINE_SUPPORTS_SAVE ) // inc. sitc fix, mods by some of the original developers, see backstory here http://www.robotron2084guidebook.com/gameplay/raceto100million/robo2k14_tie-die-romset/ (I guess there's a tie-die V1 before it was released to the public?) +GAME( 2012, robotron12, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "hack", "Robotron: 2084 (2012 'wave 201 start' hack)", MACHINE_SUPPORTS_SAVE ) // includes sitc bug fix, used for competitive play. +GAME( 2015, robotrontd, robotron, williams_base, robotron, williams_state, init_robotron, ROT0, "hack", "Robotron: 2084 (2015 'tie-die V2' hack)", MACHINE_SUPPORTS_SAVE ) // inc. sitc fix, mods by some of the original developers, see backstory here http://www.robotron2084guidebook.com/gameplay/raceto100million/robo2k14_tie-die-romset/ (I guess there's a tie-die V1 before it was released to the public?) GAME( 1982, joust, 0, williams_muxed, joust, williams_muxed_state, init_joust, ROT0, "Williams", "Joust (White/Green label)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, joustr, joust, williams_muxed, joust, williams_muxed_state, init_joust, ROT0, "Williams", "Joust (Solid Red label)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, joustwr, joust, williams_muxed, joust, williams_muxed_state, init_joust, ROT0, "Williams", "Joust (White/Red label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, joustr, joust, williams_muxed, joust, williams_muxed_state, init_joust, ROT0, "Williams", "Joust (Solid Red label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, joustwr, joust, williams_muxed, joust, williams_muxed_state, init_joust, ROT0, "Williams", "Joust (White/Red label)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, bubbles, 0, bubbles, bubbles, bubbles_state, empty_init, ROT0, "Williams", "Bubbles", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, bubblesr, bubbles, bubbles, bubbles, bubbles_state, empty_init, ROT0, "Williams", "Bubbles (Solid Red label)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, bubblesr, bubbles, bubbles, bubbles, bubbles_state, empty_init, ROT0, "Williams", "Bubbles (Solid Red label)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, bubblesp, bubbles, bubbles, bubbles, bubbles_state, empty_init, ROT0, "Williams", "Bubbles (prototype version)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, splat, 0, williams_muxed, splat, williams_muxed_state, init_splat, ROT0, "Williams", "Splat!", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, sinistar, 0, sinistar, sinistar, sinistar_state, empty_init, ROT270, "Williams", "Sinistar (revision 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, sinistar, 0, sinistar, sinistar, sinistar_state, empty_init, ROT270, "Williams", "Sinistar (revision 3)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, sinistar1, sinistar, sinistar, sinistar, sinistar_state, empty_init, ROT270, "Williams", "Sinistar (prototype version)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, sinistar2, sinistar, sinistar, sinistar, sinistar_state, empty_init, ROT270, "Williams", "Sinistar (revision 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, sinistar2, sinistar, sinistar, sinistar, sinistar_state, empty_init, ROT270, "Williams", "Sinistar (revision 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, playball, 0, playball, playball, playball_state, empty_init, ROT270, "Williams", "PlayBall! (prototype)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, blaster, 0, blaster, blaster, blaster_state, empty_init, ROT0, "Williams / Vid Kidz", "Blaster", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, blastero, blaster, blaster, blaster, blaster_state, empty_init, ROT0, "Williams / Vid Kidz", "Blaster (location test)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, blaster, 0, blaster, blaster, blaster_state, empty_init, ROT0, "Williams / Vid Kidz", "Blaster", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, blastero, blaster, blaster, blaster, blaster_state, empty_init, ROT0, "Williams / Vid Kidz", "Blaster (location test)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, blasterkit, blaster, blastkit, blastkit, blaster_state, empty_init, ROT0, "Williams / Vid Kidz", "Blaster (conversion kit)", MACHINE_SUPPORTS_SAVE ) // mono sound GAME( 1985, spdball, 0, spdball, spdball, spdball_state, empty_init, ROT0, "Williams", "Speed Ball - Contest at Neonworld (prototype)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, alienar, 0, williams_muxed, alienar, williams_muxed_state, init_alienar, ROT0, "Duncan Brown", "Alien Arena", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, alienar, 0, williams_muxed, alienar, williams_muxed_state, init_alienar, ROT0, "Duncan Brown", "Alien Arena", MACHINE_SUPPORTS_SAVE ) GAME( 1985, alienaru, alienar, williams_muxed, alienar, williams_muxed_state, init_alienaru, ROT0, "Duncan Brown", "Alien Arena (Stargate upgrade)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, lottofun, 0, lottofun, lottofun, williams_state, init_lottofun, ROT0, "H.A.R. Management", "Lotto Fun", MACHINE_SUPPORTS_SAVE ) - -/* 2nd Generation Williams hardware with tilemaps */ -GAME( 1983, mysticm, 0, mysticm, mysticm, mysticm_state, empty_init, ROT0, "Williams", "Mystic Marathon", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE) +// 2nd Generation Williams hardware with tilemaps +GAME( 1983, mysticm, 0, mysticm, mysticm, mysticm_state, empty_init, ROT0, "Williams", "Mystic Marathon", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE) GAME( 1983, mysticmp, mysticm, mysticm, mysticm, mysticm_state, empty_init, ROT0, "Williams", "Mystic Marathon (prototype)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // newest roms are 'proto 6' ? GAME( 1984, tshoot, 0, tshoot, tshoot, tshoot_state, empty_init, ROT0, "Williams", "Turkey Shoot (prototype)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 53a2ad26ed5..c20d7a520df 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -41374,6 +41374,7 @@ mysticmp // (c) 1983 Prototype playball // (c) 1983 robotron // (c) 1982 robotronyo // (c) 1982 +robotronun // (c) 1982 robotron87 // robotron12 // robotrontd // -- cgit v1.2.3 From 69d236d3be905a80fdff6b92d22a33df5fadcda2 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Sat, 11 Jul 2020 05:18:01 +0200 Subject: New working clones (#6918) * New working clones ------------------ Galaxian (Cirsa Spanish bootleg) [Juan Romero, ClawGrip] * Add 'galaxcirsa' (nw) --- src/mame/drivers/galaxian.cpp | 21 +++++++++++++++++++-- src/mame/mame.lst | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 67b5641673f..e08f3047ad0 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -8351,7 +8351,7 @@ ROM_START( zerotimed ) ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) ROM_END -/* Marti Colls (Falgas) bootleg */ +// Marti Colls (Falgas) bootleg ROM_START( zerotimemc ) ROM_REGION( 0x4000, "maincpu", 0 ) ROM_LOAD( "4_7k.bin", 0x0000, 0x0800, CRC(ac64aabe) SHA1(1cd834bf8b387428639dffd5e4b0ee72fa8aafdf) ) @@ -8366,9 +8366,25 @@ ROM_START( zerotimemc ) /* Not dumped on the Marti Colls PCB, taken from the parent set */ ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) + ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) ROM_END +// Cirsa bootleg +ROM_START( galaxcirsa ) + ROM_REGION( 0x4000, "maincpu", 0 ) + ROM_LOAD( "cirsagal.1", 0x0000, 0x0800, CRC(ac64aabe) SHA1(1cd834bf8b387428639dffd5e4b0ee72fa8aafdf) ) + ROM_LOAD( "cirsagal.2", 0x0800, 0x0800, CRC(a433067e) SHA1(1aed1a2153c4a32a9996fc709e544f2063885599) ) + ROM_LOAD( "cirsagal.3", 0x1000, 0x0800, CRC(7c86fc8a) SHA1(ea7e16cfd765fb992bd476796e2e3a5f87e8360c) ) + ROM_LOAD( "cirsagal.4", 0x1800, 0x0800, CRC(786d690a) SHA1(50c5c07941006e3b71afbf057d27daa2f2274925) ) + ROM_LOAD( "cirsagal.5", 0x2000, 0x0800, CRC(863a688f) SHA1(fa1f92476e10af9a63290ed30359bc88e7721528) ) + + ROM_REGION( 0x1000, "gfx1", 0 ) + ROM_LOAD( "cirsagal.h", 0x0000, 0x0800, CRC(6babd14e) SHA1(c8601803bc74c1089f767c4672376d4788dc4f49) ) + ROM_LOAD( "cirsagal.i", 0x0800, 0x0800, CRC(0997e81b) SHA1(a5c6b2b59f7a807b44e5d49c54c42d1abf2fc71a) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "6113_1.bin", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) +ROM_END ROM_START( starfght ) ROM_REGION( 0x4000, "maincpu", 0 ) @@ -13116,6 +13132,7 @@ GAME( 1979, zerotime, galaxian, galaxian, zerotime, galaxian_state, init_ GAME( 1979, galaktron, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Petaco S.A.)", "Galaktron (Petaco S.A.)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, zerotimed, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Datamat)", "Zero Time (Datamat)", MACHINE_SUPPORTS_SAVE ) // a 1994 bootleg of the Petaco bootleg GAME( 1979, zerotimemc, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Marti Colls)", "Zero Time (Marti Colls)", MACHINE_SUPPORTS_SAVE ) +GAME( 1979, galaxcirsa, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Cirsa)", "Galaxian (Cirsa Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, starfght, galaxian, galaxian, swarm, galaxian_state, init_galaxian, ROT90, "bootleg (Jeutel)", "Star Fighter", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxbsf, galaxian, galaxian, galaxian, galaxian_state, init_galaxian, ROT90, "bootleg", "Galaxian (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxianbl, galaxian, galaxian, galaxianbl, galaxian_state, init_galaxian, ROT90, "bootleg", "Galaxian (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index c20d7a520df..319df95d1fd 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14284,6 +14284,7 @@ zerotime // hack (Petaco S.A.) galaktron // bootleg (Petaco S.A.) zerotimed // hack (Datamat) zerotimemc // hack (Marti Colls) +galaxcirsa // bootleg (Cirsa) zigzagb // (c) 1982 LAX (bootleg) zigzagb2 // (c) 1982 LAX (bootleg) -- cgit v1.2.3 From 9d752a98fbcd25db184cfb0064a2a45d61014f03 Mon Sep 17 00:00:00 2001 From: cam900 Date: Sat, 11 Jul 2020 12:18:32 +0900 Subject: ymz280b.cpp: Modernize save state, Fix frequency calculation (#6922) Allow side effects, Reduce unnecessary defines, Use shorter/correct type names, Fix spacings, Add notes --- src/devices/sound/ymz280b.cpp | 124 +++++++++++++++++++++--------------------- src/devices/sound/ymz280b.h | 96 ++++++++++++++++---------------- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp index 570b4e64990..b777f56b89d 100644 --- a/src/devices/sound/ymz280b.cpp +++ b/src/devices/sound/ymz280b.cpp @@ -25,7 +25,7 @@ hardware currently emulated that uses external handlers. It also happens to be the only one using 16-bit PCM. - Some other drivers (eg. bishi.c, bfm_sc4/5.c) also use ROM readback. + Some other drivers (eg. bishi.cpp, bfm_sc4/5.cpp) also use ROM readback. */ @@ -40,11 +40,11 @@ #define MAX_SAMPLE_CHUNK 10000 -#define FRAC_BITS 14 -#define FRAC_ONE (1 << FRAC_BITS) -#define FRAC_MASK (FRAC_ONE - 1) +static constexpr unsigned FRAC_BITS = 9; +static constexpr unsigned FRAC_ONE = (1 << FRAC_BITS); +static constexpr unsigned FRAC_MASK = (FRAC_ONE - 1); -#define INTERNAL_BUFFER_SIZE (1 << 15) +//#define INTERNAL_BUFFER_SIZE (1 << 15) #define INTERNAL_SAMPLE_RATE (m_master_clock * 2.0) @@ -84,14 +84,14 @@ void ymz280b_device::update_irq_state() void ymz280b_device::update_step(struct YMZ280BVoice *voice) { - double frequency; + int frequency; /* compute the frequency */ if (voice->mode == 1) - frequency = m_master_clock * (double)((voice->fnum & 0x0ff) + 1) * (1.0 / 256.0); + frequency = voice->fnum & 0x0ff; else - frequency = m_master_clock * (double)((voice->fnum & 0x1ff) + 1) * (1.0 / 256.0); - voice->output_step = (uint32_t)(frequency * (double)FRAC_ONE / INTERNAL_SAMPLE_RATE); + frequency = voice->fnum & 0x1ff; + voice->output_step = frequency + 1; // ((fnum + 1) * (input clock / 384)) / 256 } @@ -165,7 +165,7 @@ static void compute_tables() ***********************************************************************************************/ -int ymz280b_device::generate_adpcm(struct YMZ280BVoice *voice, int16_t *buffer, int samples) +int ymz280b_device::generate_adpcm(struct YMZ280BVoice *voice, s16 *buffer, int samples) { int position = voice->position; int signal = voice->signal; @@ -277,7 +277,7 @@ int ymz280b_device::generate_adpcm(struct YMZ280BVoice *voice, int16_t *buffer, ***********************************************************************************************/ -int ymz280b_device::generate_pcm8(struct YMZ280BVoice *voice, int16_t *buffer, int samples) +int ymz280b_device::generate_pcm8(struct YMZ280BVoice *voice, s16 *buffer, int samples) { int position = voice->position; int val; @@ -292,7 +292,7 @@ int ymz280b_device::generate_pcm8(struct YMZ280BVoice *voice, int16_t *buffer, i val = read_byte(position / 2); /* output to the buffer, scaling by the volume */ - *buffer++ = (int8_t)val * 256; + *buffer++ = (s8)val * 256; samples--; /* next! */ @@ -315,7 +315,7 @@ int ymz280b_device::generate_pcm8(struct YMZ280BVoice *voice, int16_t *buffer, i val = read_byte(position / 2); /* output to the buffer, scaling by the volume */ - *buffer++ = (int8_t)val * 256; + *buffer++ = (s8)val * 256; samples--; /* next! */ @@ -347,7 +347,7 @@ int ymz280b_device::generate_pcm8(struct YMZ280BVoice *voice, int16_t *buffer, i ***********************************************************************************************/ -int ymz280b_device::generate_pcm16(struct YMZ280BVoice *voice, int16_t *buffer, int samples) +int ymz280b_device::generate_pcm16(struct YMZ280BVoice *voice, s16 *buffer, int samples) { int position = voice->position; int val; @@ -359,7 +359,7 @@ int ymz280b_device::generate_pcm16(struct YMZ280BVoice *voice, int16_t *buffer, while (samples) { /* fetch the current value */ - val = (int16_t)((read_byte(position / 2 + 1) << 8) + read_byte(position / 2 + 0)); + val = (s16)((read_byte(position / 2 + 1) << 8) + read_byte(position / 2 + 0)); /* output to the buffer, scaling by the volume */ *buffer++ = val; @@ -382,7 +382,7 @@ int ymz280b_device::generate_pcm16(struct YMZ280BVoice *voice, int16_t *buffer, while (samples) { /* fetch the current value */ - val = (int16_t)((read_byte(position / 2 + 1) << 8) + read_byte(position / 2 + 0)); + val = (s16)((read_byte(position / 2 + 1) << 8) + read_byte(position / 2 + 0)); /* output to the buffer, scaling by the volume */ *buffer++ = val; @@ -430,13 +430,13 @@ void ymz280b_device::sound_stream_update(sound_stream &stream, stream_sample_t * for (v = 0; v < 8; v++) { struct YMZ280BVoice *voice = &m_voice[v]; - int16_t prev = voice->last_sample; - int16_t curr = voice->curr_sample; - int16_t *curr_data = m_scratch.get(); - int32_t *ldest = lacc; - int32_t *rdest = racc; - uint32_t new_samples, samples_left; - uint32_t final_pos; + s16 prev = voice->last_sample; + s16 curr = voice->curr_sample; + s16 *curr_data = m_scratch.get(); + s32 *ldest = lacc; + s32 *rdest = racc; + u32 new_samples, samples_left; + u32 final_pos; int remaining = samples; int lvol = voice->output_left; int rvol = voice->output_right; @@ -446,7 +446,6 @@ void ymz280b_device::sound_stream_update(sound_stream &stream, stream_sample_t * { /* make sure next sound plays immediately */ voice->output_pos = FRAC_ONE; - continue; } @@ -454,7 +453,7 @@ void ymz280b_device::sound_stream_update(sound_stream &stream, stream_sample_t * /* interpolate */ while (remaining > 0 && voice->output_pos < FRAC_ONE) { - int interp_sample = (((int32_t)prev * (FRAC_ONE - voice->output_pos)) + ((int32_t)curr * voice->output_pos)) >> FRAC_BITS; + int interp_sample = (((s32)prev * (FRAC_ONE - voice->output_pos)) + ((s32)curr * voice->output_pos)) >> FRAC_BITS; *ldest++ += interp_sample * lvol; *rdest++ += interp_sample * rvol; voice->output_pos += voice->output_step; @@ -518,7 +517,7 @@ void ymz280b_device::sound_stream_update(sound_stream &stream, stream_sample_t * /* interpolate */ while (remaining > 0 && voice->output_pos < FRAC_ONE) { - int interp_sample = (((int32_t)prev * (FRAC_ONE - voice->output_pos)) + ((int32_t)curr * voice->output_pos)) >> FRAC_BITS; + int interp_sample = (((s32)prev * (FRAC_ONE - voice->output_pos)) + ((s32)curr * voice->output_pos)) >> FRAC_BITS; *ldest++ += interp_sample * lvol; *rdest++ += interp_sample * rvol; voice->output_pos += voice->output_step; @@ -571,7 +570,7 @@ void ymz280b_device::device_start() /* allocate memory */ assert(MAX_SAMPLE_CHUNK < 0x10000); - m_scratch = std::make_unique(MAX_SAMPLE_CHUNK); + m_scratch = std::make_unique(MAX_SAMPLE_CHUNK); /* state save */ save_item(NAME(m_current_register)); @@ -585,33 +584,31 @@ void ymz280b_device::device_start() save_item(NAME(m_ext_readlatch)); save_item(NAME(m_ext_mem_address_hi)); save_item(NAME(m_ext_mem_address_mid)); - for (int j = 0; j < 8; j++) - { - save_item(NAME(m_voice[j].playing), j); - save_item(NAME(m_voice[j].ended), j); - save_item(NAME(m_voice[j].keyon), j); - save_item(NAME(m_voice[j].looping), j); - save_item(NAME(m_voice[j].mode), j); - save_item(NAME(m_voice[j].fnum), j); - save_item(NAME(m_voice[j].level), j); - save_item(NAME(m_voice[j].pan), j); - save_item(NAME(m_voice[j].start), j); - save_item(NAME(m_voice[j].stop), j); - save_item(NAME(m_voice[j].loop_start), j); - save_item(NAME(m_voice[j].loop_end), j); - save_item(NAME(m_voice[j].position), j); - save_item(NAME(m_voice[j].signal), j); - save_item(NAME(m_voice[j].step), j); - save_item(NAME(m_voice[j].loop_signal), j); - save_item(NAME(m_voice[j].loop_step), j); - save_item(NAME(m_voice[j].loop_count), j); - save_item(NAME(m_voice[j].output_left), j); - save_item(NAME(m_voice[j].output_right), j); - save_item(NAME(m_voice[j].output_pos), j); - save_item(NAME(m_voice[j].last_sample), j); - save_item(NAME(m_voice[j].curr_sample), j); - save_item(NAME(m_voice[j].irq_schedule), j); - } + + save_item(STRUCT_MEMBER(m_voice, playing)); + save_item(STRUCT_MEMBER(m_voice, ended)); + save_item(STRUCT_MEMBER(m_voice, keyon)); + save_item(STRUCT_MEMBER(m_voice, looping)); + save_item(STRUCT_MEMBER(m_voice, mode)); + save_item(STRUCT_MEMBER(m_voice, fnum)); + save_item(STRUCT_MEMBER(m_voice, level)); + save_item(STRUCT_MEMBER(m_voice, pan)); + save_item(STRUCT_MEMBER(m_voice, start)); + save_item(STRUCT_MEMBER(m_voice, stop)); + save_item(STRUCT_MEMBER(m_voice, loop_start)); + save_item(STRUCT_MEMBER(m_voice, loop_end)); + save_item(STRUCT_MEMBER(m_voice, position)); + save_item(STRUCT_MEMBER(m_voice, signal)); + save_item(STRUCT_MEMBER(m_voice, step)); + save_item(STRUCT_MEMBER(m_voice, loop_signal)); + save_item(STRUCT_MEMBER(m_voice, loop_step)); + save_item(STRUCT_MEMBER(m_voice, loop_count)); + save_item(STRUCT_MEMBER(m_voice, output_left)); + save_item(STRUCT_MEMBER(m_voice, output_right)); + save_item(STRUCT_MEMBER(m_voice, output_pos)); + save_item(STRUCT_MEMBER(m_voice, last_sample)); + save_item(STRUCT_MEMBER(m_voice, curr_sample)); + save_item(STRUCT_MEMBER(m_voice, irq_schedule)); #if YMZ280B_MAKE_WAVS m_wavresample = wav_open("resamp.wav", INTERNAL_SAMPLE_RATE, 2); @@ -868,17 +865,19 @@ void ymz280b_device::write_to_register(int data) int ymz280b_device::compute_status() { - uint8_t result; + u8 result; /* force an update */ m_stream->update(); result = m_status_register; - /* clear the IRQ state */ - m_status_register = 0; - update_irq_state(); - + if (!machine().side_effects_disabled()) + { + /* clear the IRQ state */ + m_status_register = 0; + update_irq_state(); + } return result; } @@ -898,9 +897,10 @@ u8 ymz280b_device::read(offs_t offset) return 0xff; /* read from external memory */ - uint8_t ret = m_ext_readlatch; + u8 ret = m_ext_readlatch; m_ext_readlatch = read_byte(m_ext_mem_address); - m_ext_mem_address = (m_ext_mem_address + 1) & 0xffffff; + if (!machine().side_effects_disabled()) + m_ext_mem_address = (m_ext_mem_address + 1) & 0xffffff; return ret; } else @@ -924,7 +924,7 @@ void ymz280b_device::write(offs_t offset, u8 data) DEFINE_DEVICE_TYPE(YMZ280B, ymz280b_device, "ymz280b", "Yamaha YMZ280B PCMD8") -ymz280b_device::ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ymz280b_device::ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, YMZ280B, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/ymz280b.h b/src/devices/sound/ymz280b.h index 898d952c0d2..a375f4a7ed0 100644 --- a/src/devices/sound/ymz280b.h +++ b/src/devices/sound/ymz280b.h @@ -19,7 +19,7 @@ class ymz280b_device : public device_t, public device_sound_interface, public device_rom_interface<24> { public: - ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } @@ -45,36 +45,36 @@ private: /* struct describing a single playing ADPCM voice */ struct YMZ280BVoice { - uint8_t playing; /* 1 if we are actively playing */ - bool ended; /* indicate voice has ended in case samples_left is 0 */ - - uint8_t keyon; /* 1 if the key is on */ - uint8_t looping; /* 1 if looping is enabled */ - uint8_t mode; /* current playback mode */ - uint16_t fnum; /* frequency */ - uint8_t level; /* output level */ - uint8_t pan; /* panning */ - - uint32_t start; /* start address, in nibbles */ - uint32_t stop; /* stop address, in nibbles */ - uint32_t loop_start; /* loop start address, in nibbles */ - uint32_t loop_end; /* loop end address, in nibbles */ - uint32_t position; /* current position, in nibbles */ - - int32_t signal; /* current ADPCM signal */ - int32_t step; /* current ADPCM step */ - - int32_t loop_signal; /* signal at loop start */ - int32_t loop_step; /* step at loop start */ - uint32_t loop_count; /* number of loops so far */ - - int32_t output_left; /* output volume (left) */ - int32_t output_right; /* output volume (right) */ - int32_t output_step; /* step value for frequency conversion */ - int32_t output_pos; /* current fractional position */ - int16_t last_sample; /* last sample output */ - int16_t curr_sample; /* current sample target */ - uint8_t irq_schedule; /* 1 if the IRQ state is updated by timer */ + u8 playing; /* 1 if we are actively playing */ + bool ended; /* indicate voice has ended in case samples_left is 0 */ + + u8 keyon; /* 1 if the key is on */ + u8 looping; /* 1 if looping is enabled */ + u8 mode; /* current playback mode */ + u16 fnum; /* frequency */ + u8 level; /* output level */ + u8 pan; /* panning */ + + u32 start; /* start address, in nibbles */ + u32 stop; /* stop address, in nibbles */ + u32 loop_start; /* loop start address, in nibbles */ + u32 loop_end; /* loop end address, in nibbles */ + u32 position; /* current position, in nibbles */ + + s32 signal; /* current ADPCM signal */ + s32 step; /* current ADPCM step */ + + s32 loop_signal; /* signal at loop start */ + s32 loop_step; /* step at loop start */ + u32 loop_count; /* number of loops so far */ + + s32 output_left; /* output volume (left) */ + s32 output_right; /* output volume (right) */ + s32 output_step; /* step value for frequency conversion */ + s32 output_pos; /* current fractional position */ + s16 last_sample; /* last sample output */ + s16 curr_sample; /* current sample target */ + u8 irq_schedule; /* 1 if the IRQ state is updated by timer */ emu_timer *timer; }; @@ -83,31 +83,31 @@ private: void update_step(struct YMZ280BVoice *voice); void update_volumes(struct YMZ280BVoice *voice); void update_irq_state_timer_common(int voicenum); - int generate_adpcm(struct YMZ280BVoice *voice, int16_t *buffer, int samples); - int generate_pcm8(struct YMZ280BVoice *voice, int16_t *buffer, int samples); - int generate_pcm16(struct YMZ280BVoice *voice, int16_t *buffer, int samples); + int generate_adpcm(struct YMZ280BVoice *voice, s16 *buffer, int samples); + int generate_pcm8(struct YMZ280BVoice *voice, s16 *buffer, int samples); + int generate_pcm16(struct YMZ280BVoice *voice, s16 *buffer, int samples); void write_to_register(int data); int compute_status(); // internal state struct YMZ280BVoice m_voice[8]; /* the 8 voices */ - uint8_t m_current_register; /* currently accessible register */ - uint8_t m_status_register; /* current status register */ - uint8_t m_irq_state; /* current IRQ state */ - uint8_t m_irq_mask; /* current IRQ mask */ - uint8_t m_irq_enable; /* current IRQ enable */ - uint8_t m_keyon_enable; /* key on enable */ - uint8_t m_ext_mem_enable; /* external memory enable */ - uint8_t m_ext_readlatch; /* external memory prefetched data */ - uint32_t m_ext_mem_address_hi; - uint32_t m_ext_mem_address_mid; - uint32_t m_ext_mem_address; /* where the CPU can read the ROM */ - - devcb_write_line m_irq_handler; /* IRQ callback */ + u8 m_current_register; /* currently accessible register */ + u8 m_status_register; /* current status register */ + u8 m_irq_state; /* current IRQ state */ + u8 m_irq_mask; /* current IRQ mask */ + u8 m_irq_enable; /* current IRQ enable */ + u8 m_keyon_enable; /* key on enable */ + u8 m_ext_mem_enable; /* external memory enable */ + u8 m_ext_readlatch; /* external memory prefetched data */ + u32 m_ext_mem_address_hi; + u32 m_ext_mem_address_mid; + u32 m_ext_mem_address; /* where the CPU can read the ROM */ + + devcb_write_line m_irq_handler; /* IRQ callback */ double m_master_clock; /* master clock frequency */ sound_stream *m_stream; /* which stream are we using */ - std::unique_ptr m_scratch; + std::unique_ptr m_scratch; #if YMZ280B_MAKE_WAVS void *m_wavresample; /* resampled waveform */ #endif -- cgit v1.2.3 From 26e1482262d19193d3ee9b8c730af941ae0a967b Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 10 Jul 2020 23:29:10 -0400 Subject: Fix clang error: unused variable 'FRAC_MASK' [-Werror,-Wunused-const-variable] --- src/devices/sound/ymz280b.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp index b777f56b89d..51851af98d2 100644 --- a/src/devices/sound/ymz280b.cpp +++ b/src/devices/sound/ymz280b.cpp @@ -42,7 +42,6 @@ static constexpr unsigned FRAC_BITS = 9; static constexpr unsigned FRAC_ONE = (1 << FRAC_BITS); -static constexpr unsigned FRAC_MASK = (FRAC_ONE - 1); //#define INTERNAL_BUFFER_SIZE (1 << 15) #define INTERNAL_SAMPLE_RATE (m_master_clock * 2.0) -- cgit v1.2.3 From e1543b2fc8823bdb5ef1a3da91687ad4fbaa369f Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Fri, 10 Jul 2020 22:13:43 -0700 Subject: ibm5150: add XENIX Development System --- hash/ibm5150.xml | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/hash/ibm5150.xml b/hash/ibm5150.xml index d8eee0ddef6..02c2ef8148a 100644 --- a/hash/ibm5150.xml +++ b/hash/ibm5150.xml @@ -6857,6 +6857,79 @@ has been replaced with an all-zero block. --> + + SCO XENIX System V Development System version 2.1.3 + 1986 + SCO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 647d4f431ff8fdfe672cadae462f0af105804e37 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 10 Jul 2020 12:22:30 -0700 Subject: netlist: Forgot this as part of the 74113 change. --- src/lib/netlist/build/makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 803095f0b05..aa67e465300 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -170,6 +170,7 @@ NLOBJS := \ $(NLOBJ)/devices/nld_7493.o \ $(NLOBJ)/devices/nld_7497.o \ $(NLOBJ)/devices/nld_74107.o \ + $(NLOBJ)/devices/nld_74113.o \ $(NLOBJ)/devices/nld_74123.o \ $(NLOBJ)/devices/nld_74125.o \ $(NLOBJ)/devices/nld_74153.o \ -- cgit v1.2.3 From 9eb6686a68ee64c2652a524c076ed956241f0bc7 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 11 Jul 2020 08:10:58 +0200 Subject: gigatron.cpp: fixed validation --- src/mame/drivers/gigatron.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/gigatron.cpp b/src/mame/drivers/gigatron.cpp index 5ec4714dc1d..fc338339f37 100644 --- a/src/mame/drivers/gigatron.cpp +++ b/src/mame/drivers/gigatron.cpp @@ -44,7 +44,7 @@ private: void data_map(address_map &map); uint16_t lights_changed; - + //Video Generation stuff uint8_t machineOut; uint8_t row; @@ -54,7 +54,7 @@ private: void blinkenlights(uint8_t data); void video_draw(u8 data); uint8_t inputs(); - + std::unique_ptr m_bitmap_render; std::unique_ptr m_bitmap_buffer; @@ -72,26 +72,26 @@ void gigatron_state::video_draw(u8 data) { uint8_t out = data; uint8_t falling = machineOut & ~out; - + if (falling & VSYNC) { row = 0; pixel = 0; } - + if (falling & HSYNC) { col = 0; row++; } - + machineOut = out; - + if ((out & (VSYNC | HSYNC)) != (VSYNC | HSYNC)) { return; } - + if((row >= 0 && row < 480) && (col >= 0 && col < 640)) { //uint16_t *dest; @@ -169,6 +169,7 @@ void gigatron_state::gigatron(machine_config &config) } ROM_START( gigatron ) + ROM_REGION( 0x20000, "maincpu", 0 ) ROM_SYSTEM_BIOS(0, "v5a", "Gigatron ROM V5a") ROMX_LOAD( "gigrom5a.rom", 0x0000, 0x20000, CRC(DCC071A6) SHA1(F82059BA0227FF48E4C687B90C8445DA30213EE2),ROM_BIOS(0)) ROM_SYSTEM_BIOS(1, "v4", "Gigatron ROM V4") -- cgit v1.2.3 From d065550da91ebb46765fc214a5af42f54a46e0ae Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Sat, 11 Jul 2020 10:13:02 -0400 Subject: Pruning of redundant #includes located in src/devices/machine/* and src/frontend/mame/* (nw) --- src/devices/machine/r10696.h | 2 -- src/devices/machine/r10788.h | 2 -- src/devices/machine/ra17xx.h | 1 - src/frontend/mame/audit.h | 2 -- src/frontend/mame/ui/text.h | 3 --- src/frontend/mame/ui/utils.h | 2 -- 6 files changed, 12 deletions(-) diff --git a/src/devices/machine/r10696.h b/src/devices/machine/r10696.h index 4b5b7c91d87..dc33c4519f3 100644 --- a/src/devices/machine/r10696.h +++ b/src/devices/machine/r10696.h @@ -18,8 +18,6 @@ #pragma once -#include "device.h" - class r10696_device : public device_t { diff --git a/src/devices/machine/r10788.h b/src/devices/machine/r10788.h index 6b1214328d2..6ef21ccc466 100644 --- a/src/devices/machine/r10788.h +++ b/src/devices/machine/r10788.h @@ -17,8 +17,6 @@ #pragma once -#include "device.h" - class r10788_device : public device_t { diff --git a/src/devices/machine/ra17xx.h b/src/devices/machine/ra17xx.h index 11020778f8e..54e4fc9028f 100644 --- a/src/devices/machine/ra17xx.h +++ b/src/devices/machine/ra17xx.h @@ -16,7 +16,6 @@ #pragma once -#include "device.h" #include "cpu/pps4/pps4.h" diff --git a/src/frontend/mame/audit.h b/src/frontend/mame/audit.h index 511b4c98845..d336f6e5ae4 100644 --- a/src/frontend/mame/audit.h +++ b/src/frontend/mame/audit.h @@ -12,8 +12,6 @@ #pragma once -#include "hash.h" - #include #include #include diff --git a/src/frontend/mame/ui/text.h b/src/frontend/mame/ui/text.h index 5852bbeb184..c5755c39813 100644 --- a/src/frontend/mame/ui/text.h +++ b/src/frontend/mame/ui/text.h @@ -13,9 +13,6 @@ #ifndef MAME_FRONTEND_UI_TEXT_H #define MAME_FRONTEND_UI_TEXT_H -#include "palette.h" -#include "unicode.h" - class render_font; class render_container; diff --git a/src/frontend/mame/ui/utils.h b/src/frontend/mame/ui/utils.h index e6f2acd6bc8..a4a7ec02920 100644 --- a/src/frontend/mame/ui/utils.h +++ b/src/frontend/mame/ui/utils.h @@ -12,8 +12,6 @@ #pragma once -#include "unicode.h" - #include #include #include -- cgit v1.2.3 From 029a12bea9b11b3e1d80e9473e4891953008491c Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Sat, 11 Jul 2020 16:18:52 +0200 Subject: New working clones (#6944) * New working clones ------------------ Zero Time (Spanish bootleg) [Juan Romero, ClawGrip] --- src/mame/drivers/galaxian.cpp | 18 ++++++++++++++++++ src/mame/mame.lst | 1 + 2 files changed, 19 insertions(+) diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index e08f3047ad0..7333067fa06 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -8369,6 +8369,23 @@ ROM_START( zerotimemc ) ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) ROM_END +// Unknown manufacturer / bootleger +ROM_START( zerotimeu ) + ROM_REGION( 0x4000, "maincpu", 0 ) + ROM_LOAD( "1.bin", 0x0000, 0x0800, CRC(ac64aabe) SHA1(1cd834bf8b387428639dffd5e4b0ee72fa8aafdf) ) + ROM_LOAD( "2.bin", 0x0800, 0x0800, CRC(a433067e) SHA1(1aed1a2153c4a32a9996fc709e544f2063885599) ) + ROM_LOAD( "3.bin", 0x1000, 0x0800, CRC(aaf038d4) SHA1(2d070fe7c4e9b26092f0f12a9db3392f7d8a65f1) ) + ROM_LOAD( "4.bin", 0x1800, 0x0800, CRC(786d690a) SHA1(50c5c07941006e3b71afbf057d27daa2f2274925) ) + ROM_LOAD( "5.bin", 0x2000, 0x0800, CRC(af9260d7) SHA1(955e466a8989993351dc69d73ca322c1c9af7b63) ) + + ROM_REGION( 0x1000, "gfx1", 0 ) + ROM_LOAD( "hj.bin", 0x0000, 0x0800, CRC(84decf98) SHA1(2e565cb6057b1816a6b4541e6dfadd3c3762fa36) ) + ROM_LOAD( "kl.bin", 0x0800, 0x0800, CRC(18df5c90) SHA1(6d6151c95c4f0da24e21934a360a40c5526f0be2) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "82s123.bin", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) +ROM_END + // Cirsa bootleg ROM_START( galaxcirsa ) ROM_REGION( 0x4000, "maincpu", 0 ) @@ -13132,6 +13149,7 @@ GAME( 1979, zerotime, galaxian, galaxian, zerotime, galaxian_state, init_ GAME( 1979, galaktron, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Petaco S.A.)", "Galaktron (Petaco S.A.)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, zerotimed, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Datamat)", "Zero Time (Datamat)", MACHINE_SUPPORTS_SAVE ) // a 1994 bootleg of the Petaco bootleg GAME( 1979, zerotimemc, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Marti Colls)", "Zero Time (Marti Colls)", MACHINE_SUPPORTS_SAVE ) +GAME( 1979, zerotimeu, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg", "Zero Time (Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxcirsa, galaxian, galaxian, zerotime, galaxian_state, init_galaxian, ROT90, "bootleg (Cirsa)", "Galaxian (Cirsa Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, starfght, galaxian, galaxian, swarm, galaxian_state, init_galaxian, ROT90, "bootleg (Jeutel)", "Star Fighter", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxbsf, galaxian, galaxian, galaxian, galaxian_state, init_galaxian, ROT90, "bootleg", "Galaxian (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 319df95d1fd..e3e4ede828c 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14284,6 +14284,7 @@ zerotime // hack (Petaco S.A.) galaktron // bootleg (Petaco S.A.) zerotimed // hack (Datamat) zerotimemc // hack (Marti Colls) +zerotimeu // hack galaxcirsa // bootleg (Cirsa) zigzagb // (c) 1982 LAX (bootleg) zigzagb2 // (c) 1982 LAX (bootleg) -- cgit v1.2.3 From fb7f6b784172d1411ea7014bb354a7ad700d738c Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Sat, 11 Jul 2020 17:31:59 +0300 Subject: spectrum: implemented Speccy-DOS and FloppyOne DOS interfaces, add "IC-DOS" Beta Plus clone --- scripts/src/bus.lua | 4 + scripts/src/formats.lua | 24 +++ scripts/target/mame/mess.lua | 2 + src/devices/bus/spectrum/beta.cpp | 7 +- src/devices/bus/spectrum/exp.cpp | 5 + src/devices/bus/spectrum/floppyone.cpp | 282 +++++++++++++++++++++++++++++++++ src/devices/bus/spectrum/floppyone.h | 67 ++++++++ src/devices/bus/spectrum/kempdisc.cpp | 2 + src/devices/bus/spectrum/speccydos.cpp | 244 ++++++++++++++++++++++++++++ src/devices/bus/spectrum/speccydos.h | 64 ++++++++ src/lib/formats/fl1_dsk.cpp | 59 +++++++ src/lib/formats/fl1_dsk.h | 32 ++++ src/lib/formats/sdd_dsk.cpp | 59 +++++++ src/lib/formats/sdd_dsk.h | 32 ++++ src/mame/drivers/spec128.cpp | 3 +- src/mame/drivers/spectrum.cpp | 3 +- 16 files changed, 883 insertions(+), 6 deletions(-) create mode 100644 src/devices/bus/spectrum/floppyone.cpp create mode 100644 src/devices/bus/spectrum/floppyone.h create mode 100644 src/devices/bus/spectrum/speccydos.cpp create mode 100644 src/devices/bus/spectrum/speccydos.h create mode 100644 src/lib/formats/fl1_dsk.cpp create mode 100644 src/lib/formats/fl1_dsk.h create mode 100644 src/lib/formats/sdd_dsk.cpp create mode 100644 src/lib/formats/sdd_dsk.h diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 323dc624095..f2f992feb3f 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -3762,6 +3762,8 @@ if (BUSES["SPECTRUM"]~=null) then MAME_DIR .. "src/devices/bus/spectrum/intf1.h", MAME_DIR .. "src/devices/bus/spectrum/intf2.cpp", MAME_DIR .. "src/devices/bus/spectrum/intf2.h", + MAME_DIR .. "src/devices/bus/spectrum/floppyone.cpp", + MAME_DIR .. "src/devices/bus/spectrum/floppyone.h", MAME_DIR .. "src/devices/bus/spectrum/fuller.cpp", MAME_DIR .. "src/devices/bus/spectrum/fuller.h", MAME_DIR .. "src/devices/bus/spectrum/kempjoy.cpp", @@ -3782,6 +3784,8 @@ if (BUSES["SPECTRUM"]~=null) then MAME_DIR .. "src/devices/bus/spectrum/plus2test.h", MAME_DIR .. "src/devices/bus/spectrum/protek.cpp", MAME_DIR .. "src/devices/bus/spectrum/protek.h", + MAME_DIR .. "src/devices/bus/spectrum/speccydos.cpp", + MAME_DIR .. "src/devices/bus/spectrum/speccydos.h", MAME_DIR .. "src/devices/bus/spectrum/specdrum.cpp", MAME_DIR .. "src/devices/bus/spectrum/specdrum.h", MAME_DIR .. "src/devices/bus/spectrum/uslot.cpp", diff --git a/scripts/src/formats.lua b/scripts/src/formats.lua index 3f55cdef4d4..307da2ec309 100644 --- a/scripts/src/formats.lua +++ b/scripts/src/formats.lua @@ -821,6 +821,18 @@ if (FORMATS["FDD_DSK"]~=null or _OPTIONS["with-tools"]) then } end +-------------------------------------------------- +-- +--@src/lib/formats/fl1_dsk.h,FORMATS["FL1_DSK"] = true +-------------------------------------------------- + +if (FORMATS["FL1_DSK"]~=null or _OPTIONS["with-tools"]) then + files { + MAME_DIR.. "src/lib/formats/fl1_dsk.cpp", + MAME_DIR.. "src/lib/formats/fl1_dsk.h", + } +end + -------------------------------------------------- -- --@src/lib/formats/flex_dsk.h,FORMATS["FLEX_DSK"] = true @@ -1589,6 +1601,18 @@ if (FORMATS["SC3000_BIT"]~=null or _OPTIONS["with-tools"]) then } end +-------------------------------------------------- +-- +--@src/lib/formats/sdd_dsk.h,FORMATS["SDD_DSK"] = true +-------------------------------------------------- + +if (FORMATS["SDD_DSK"]~=null or _OPTIONS["with-tools"]) then + files { + MAME_DIR.. "src/lib/formats/sdd_dsk.cpp", + MAME_DIR.. "src/lib/formats/sdd_dsk.h", + } +end + -------------------------------------------------- -- --@src/lib/formats/sf7000_dsk.h,FORMATS["SF7000_DSK"] = true diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 3e3cdee2606..b05984bb00e 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -1006,6 +1006,7 @@ FORMATS["ESQ8_DSK"] = true FORMATS["EXCALI64_DSK"] = true FORMATS["FC100_CAS"] = true FORMATS["FDD_DSK"] = true +FORMATS["FL1_DSK"] = true FORMATS["FLEX_DSK"] = true FORMATS["FM7_CAS"] = true FORMATS["FMSX_CAS"] = true @@ -1067,6 +1068,7 @@ FORMATS["QL_DSK"] = true FORMATS["RK_CAS"] = true FORMATS["RX50_DSK"] = true FORMATS["SC3000_BIT"] = true +FORMATS["SDD_DSK"] = true FORMATS["SF7000_DSK"] = true FORMATS["SMX_DSK"] = true FORMATS["SOL_CAS"] = true diff --git a/src/devices/bus/spectrum/beta.cpp b/src/devices/bus/spectrum/beta.cpp index d99f6e19e5c..42af3266936 100644 --- a/src/devices/bus/spectrum/beta.cpp +++ b/src/devices/bus/spectrum/beta.cpp @@ -46,7 +46,7 @@ - common Brazilian clones: usually use FD1797 instead of FD1793, no ROM bits D0/D7 swap, DOS ROM area 3CXX might be disabled, equiped with printer port. - CBI-95 - SYNCHRON IDS91 - - SYNCHRON IDS2001ne + - SYNCHRON IDS2001ne (added interface disable jumper) - ARCADE AR-20 - MIDAS Gammadisk - 3 versions known to exists: - straight clone @@ -85,7 +85,7 @@ V3-V4: D7 BDI ROM_latch (0=enable, 1=disble), D6 - FDC DDEN, D4 - SIDE, D3 - FDC HLT, D2 - FDC /MR (reset), D0-1 - floppy drive select (binary value). CBI clones: D5 - printer port /STROBE IO read port 0b1xxxx111 <- D7 - FDC INTRQ, D6 - FDC DRQ - CBI clones: D5 - printer port BUSY + CBI clones: D5 - printer port BUSY, D4 - printer standard select jumper (ABICOMP / MSX1.1) IO read/write ports 0b0YYxx111 - access FDC ports YY So mostly the same as beta128, except for new BDI ROM_latch bit @@ -202,6 +202,9 @@ ROM_START(betaplus) ROM_SYSTEM_BIOS(5, "cas87", "CAS DOS 1987") // 4.12 with texts translated ROMX_LOAD("cas1987.bin", 0x0000, 0x2000, CRC(a6a9450c) SHA1(b54b173a9f11ed730804d94584a1679193993e3c), ROM_BIOS(5)) ROM_RELOAD(0x2000,0x2000) + ROM_SYSTEM_BIOS(6, "icdos", "IC-DOS JUMBO v2.0") // v4.11 with name text changed + ROMX_LOAD("icdos.bin", 0x0000, 0x2000, CRC(1398d13a) SHA1(bf8cee39eb4b2a09a3f07db4cb8e7952bce4d3dd), ROM_BIOS(6)) + ROM_RELOAD(0x2000,0x2000) ROM_END ROM_START(betaclone) diff --git a/src/devices/bus/spectrum/exp.cpp b/src/devices/bus/spectrum/exp.cpp index fc53c13a3dd..9fc8e78a1a4 100644 --- a/src/devices/bus/spectrum/exp.cpp +++ b/src/devices/bus/spectrum/exp.cpp @@ -159,6 +159,7 @@ void spectrum_expansion_slot_device::mreq_w(offs_t offset, uint8_t data) #include "d40.h" #include "intf1.h" #include "intf2.h" +#include "floppyone.h" #include "fuller.h" #include "kempjoy.h" #include "kempdisc.h" @@ -170,6 +171,7 @@ void spectrum_expansion_slot_device::mreq_w(offs_t offset, uint8_t data) #include "plus2test.h" #include "protek.h" #include "specdrum.h" +#include "speccydos.h" #include "uslot.h" #include "usource.h" #include "uspeech.h" @@ -187,6 +189,7 @@ void spectrum_expansion_devices(device_slot_interface &device) device.option_add("disciple", SPECTRUM_DISCIPLE); device.option_add("intf1", SPECTRUM_INTF1); device.option_add("intf2", SPECTRUM_INTF2); + device.option_add("flpone", SPECTRUM_FLPONE); device.option_add("fuller", SPECTRUM_FULLER); device.option_add("kempjoy", SPECTRUM_KEMPJOY); device.option_add("kempdisc", SPECTRUM_KEMPDISC); @@ -201,6 +204,7 @@ void spectrum_expansion_devices(device_slot_interface &device) device.option_add("d80", SPECTRUM_D80); device.option_add("d80v2", SPECTRUM_D80V2); device.option_add("protek", SPECTRUM_PROTEK); + device.option_add("speccydos", SPECTRUM_SPECCYDOS); device.option_add("specdrum", SPECTRUM_SPECDRUM); device.option_add("uslot", SPECTRUM_USLOT); device.option_add("usource", SPECTRUM_USOURCE); @@ -222,6 +226,7 @@ void spec128_expansion_devices(device_slot_interface &device) device.option_add("plusd", SPECTRUM_PLUSD); device.option_add("plus2test", SPECTRUM_PLUS2TEST); device.option_add("protek", SPECTRUM_PROTEK); + device.option_add("speccydos", SPECTRUM_SPECCYDOS); device.option_add("specdrum", SPECTRUM_SPECDRUM); device.option_add("wafadrive", SPECTRUM_WAFA); } diff --git a/src/devices/bus/spectrum/floppyone.cpp b/src/devices/bus/spectrum/floppyone.cpp new file mode 100644 index 00000000000..2bf11a8c27e --- /dev/null +++ b/src/devices/bus/spectrum/floppyone.cpp @@ -0,0 +1,282 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + FloppyOne DOS Interface + (c) 1984/5 Rocky P. Gush + + FD1791-based floppy drive and printer interface with 4K RAM and 8K ROM + Was mainly designed as tape replacement, and sort of emulate how tapes works, + which allows to copy and use most of existing software and (not protected) games with no modification. + + Doube-side drives considered as 2 separate floppies (0 and 4, 1 and 5 etc) probably to mimic tape sides A/B, + disks is password protected. + + Main commands: + !D=n - change current drive, where 'n' 0-3 = FDD 0-3 side 0, 4-7 = FDD 0-3 side 1, 8 = enable LOAD from tape + CAT - list disk contents + LOAD "name" - load program, LOAD "" will load first program (unless was disabled by !d=8 command) + LOAD *"m";1;"name" - same as above + SAVE "name" - save program + !FORMAT "diskname";"password";tracks - format disk, if disk was already formatted you'll be prompted for password. + !6=n - set text mode, 0 - regular 32-column, 3 - 64-column + There is more of special "!x=n" commands, but theirs functions is not known, manual is missing. + Some information about this device https://worldofspectrum.org/forums/discussion/42944/rocky-gush-floppy-drive-interface/p1 + + Notes / TODOs: + - Interface1 compatibility mode is not well understood and not fully implemented + - Serial printer interface not implemented + +*********************************************************************/ + +#include "emu.h" +#include "floppyone.h" + + +/*************************************************************************** + DEVICE DEFINITIONS +***************************************************************************/ + +DEFINE_DEVICE_TYPE(SPECTRUM_FLPONE, spectrum_flpone_device, "spectrum_flpone", "FloppyOne DOS Interface") + + +//------------------------------------------------- +// INPUT_PORTS +//------------------------------------------------- + +INPUT_PORTS_START(flpone) + PORT_START("BUTTON") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Snapshot Button") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, spectrum_flpone_device, snapshot_button, 0) + + PORT_START("SW1") + PORT_CONFNAME(0x01, 0x01, "Disc Interface") + PORT_CONFSETTING(0x01, "Enabled") + PORT_CONFSETTING(0x00, "Disabled") + PORT_START("SW2") + PORT_CONFNAME(0x01, 0x00, "Interface 1") + PORT_CONFSETTING(0x01, "Enable") + PORT_CONFSETTING(0x00, "Disable") +INPUT_PORTS_END + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor spectrum_flpone_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(flpone); +} + +//------------------------------------------------- +// SLOT_INTERFACE( floppies ) +//------------------------------------------------- + +static void flpone_floppies(device_slot_interface &device) +{ + device.option_add("525ssdd", FLOPPY_525_SSDD); + device.option_add("525dd", FLOPPY_525_DD); + device.option_add("525ssqd", FLOPPY_525_SSQD); + device.option_add("525qd", FLOPPY_525_QD); + device.option_add("35ssdd", FLOPPY_35_SSDD); + device.option_add("35dd", FLOPPY_35_DD); +} + +//------------------------------------------------- +// floppy_format_type floppy_formats +//------------------------------------------------- + +FLOPPY_FORMATS_MEMBER(spectrum_flpone_device::floppy_formats) + FLOPPY_FL1_FORMAT +FLOPPY_FORMATS_END + +//------------------------------------------------- +// ROM( flpone ) +//------------------------------------------------- + +ROM_START(flpone) + ROM_REGION(0x2000, "rom", 0) + ROM_DEFAULT_BIOS("v4") + + ROM_SYSTEM_BIOS(0, "v4", "FloppyOne DOS V4") + ROMX_LOAD("fldos4.bin", 0x0000, 0x2000, CRC(a012f64f) SHA1(f54b47d83c1d45c0e1e10302e519693bc734ae5c), ROM_BIOS(0)) + + ROM_REGION(0x4000, "prom", 0) + ROM_LOAD("ula.bin", 0x0000, 0x2000, CRC(d67d85aa) SHA1(eb1d28bf8aa35bfab3a45a5827f252498ac2c651)) // 1st half is not used, A13 tied to Vcc + ROM_CONTINUE(0x0000, 0x2000) +ROM_END + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void spectrum_flpone_device::device_add_mconfig(machine_config &config) +{ + FD1791(config, m_fdc, 1_MHz_XTAL); + + FLOPPY_CONNECTOR(config, "fdc:0", flpone_floppies, "525qd", spectrum_flpone_device::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", flpone_floppies, "525qd", spectrum_flpone_device::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:2", flpone_floppies, nullptr, spectrum_flpone_device::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:3", flpone_floppies, nullptr, spectrum_flpone_device::floppy_formats).enable_sound(true); + + // passthru + SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, nullptr); + m_exp->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w)); + m_exp->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w)); +} + +const tiny_rom_entry *spectrum_flpone_device::device_rom_region() const +{ + return ROM_NAME(flpone); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// spectrum_flpone_device - constructor +//------------------------------------------------- + +spectrum_flpone_device::spectrum_flpone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, SPECTRUM_FLPONE, tag, owner, clock) + , device_spectrum_expansion_interface(mconfig, *this) + , m_rom(*this, "rom") + , m_prom(*this, "prom") + , m_fdc(*this, "fdc") + , m_floppy(*this, "fdc:%u", 0) + , m_exp(*this, "exp") + , m_sw1(*this, "SW1") + , m_sw2(*this, "SW2") +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void spectrum_flpone_device::device_start() +{ + memset(m_ram, 0, sizeof(m_ram)); + + save_item(NAME(m_romcs)); + save_item(NAME(m_ram)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void spectrum_flpone_device::device_reset() +{ + m_romcs = 0; + m_if1cs = 0; +} + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +READ_LINE_MEMBER(spectrum_flpone_device::romcs) +{ + return m_romcs | m_exp->romcs(); +} + +void spectrum_flpone_device::post_opcode_fetch(offs_t offset) +{ + m_exp->post_opcode_fetch(offset); + + if (!machine().side_effects_disabled() && m_sw1->read()) + { + if (offset < 0x2000) + { + u8 data = m_prom->base()[offset]; + m_romcs |= BIT(data, 4) ^ 1; + m_romcs &= BIT(data, 6); + if (m_sw2->read()) + { + m_if1cs |= BIT(data, 7) ^ 1; + m_if1cs &= BIT(data, 5); + m_romcs &= !m_if1cs; + } + } + } +} + +uint8_t spectrum_flpone_device::mreq_r(offs_t offset) +{ + u8 data = 0xff; + + if (m_romcs) + { + switch (offset & 0xf000) + { + case 0x0000: case 0x1000: + data = m_rom->base()[offset]; + break; + case 0x3000: + data = m_ram[offset & 0xfff]; + break; + case 0x2000: + switch (offset & 0xc) + { + case 0: case 8: + data = m_fdc->read(offset & 3); + break; + case 4: // D5 - printer BUSY / /BUSY + data = 0; + break; + case 0xc: // printer STROBE pulse + break; + } + break; + } + } + + if (m_exp->romcs()) + data &= m_exp->mreq_r(offset); + + return data; +} + +void spectrum_flpone_device::mreq_w(offs_t offset, uint8_t data) +{ + if (m_romcs) + { + switch (offset & 0xf000) + { + case 0x3000: + m_ram[offset & 0xfff] = data; + break; + case 0x2000: + switch (offset & 0xc) + { + case 0: case 8: + m_fdc->write(offset & 3, data); + break; + case 4: // D7 - printer serial data + break; + case 0xc: + { + floppy_image_device* floppy = nullptr; + for (int i = 3; i >= 0; i--) + { + floppy_image_device* fl = m_floppy[i]->get_device(); + if (fl) + { + fl->ss_w(BIT(data, 4)); + fl->mon_w((BIT(data, 5) && BIT(data, i)) ? CLEAR_LINE : ASSERT_LINE); + if (BIT(data, i)) + floppy = fl; + } + } + m_fdc->set_floppy(floppy); + } + break; + } + break; + } + } + + m_exp->mreq_w(offset, data); +} diff --git a/src/devices/bus/spectrum/floppyone.h b/src/devices/bus/spectrum/floppyone.h new file mode 100644 index 00000000000..e97fea269f2 --- /dev/null +++ b/src/devices/bus/spectrum/floppyone.h @@ -0,0 +1,67 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + FloppyOne DOS Interface + (c) 1984/5 R.P.Gush + +*********************************************************************/ +#ifndef MAME_BUS_SPECTRUM_FLPONE_H +#define MAME_BUS_SPECTRUM_FLPONE_H + +#include "exp.h" +#include "softlist.h" +#include "imagedev/floppy.h" +#include "machine/wd_fdc.h" +#include "formats/fl1_dsk.h" + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class spectrum_flpone_device : + public device_t, + public device_spectrum_expansion_interface + +{ +public: + // construction/destruction + spectrum_flpone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + DECLARE_FLOPPY_FORMATS(floppy_formats); + DECLARE_INPUT_CHANGED_MEMBER(snapshot_button) { m_slot->nmi_w(newval ? ASSERT_LINE : CLEAR_LINE); }; + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual ioport_constructor device_input_ports() const override; + + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + virtual void post_opcode_fetch(offs_t offset) override; + virtual uint8_t mreq_r(offs_t offset) override; + virtual void mreq_w(offs_t offset, uint8_t data) override; + virtual DECLARE_READ_LINE_MEMBER(romcs) override; + + required_memory_region m_rom; + required_memory_region m_prom; + required_device m_fdc; + required_device_array m_floppy; + required_device m_exp; + required_ioport m_sw1; + required_ioport m_sw2; + + int m_romcs, m_if1cs; + u8 m_ram[0x1000]; +}; + + +// device type definition +DECLARE_DEVICE_TYPE(SPECTRUM_FLPONE, spectrum_flpone_device) + + +#endif // MAME_BUS_SPECTRUM_FLPONE_H diff --git a/src/devices/bus/spectrum/kempdisc.cpp b/src/devices/bus/spectrum/kempdisc.cpp index 852b743db96..7faf0e39370 100644 --- a/src/devices/bus/spectrum/kempdisc.cpp +++ b/src/devices/bus/spectrum/kempdisc.cpp @@ -14,6 +14,8 @@ COPY - tape to disc transfer utility FORMAT "discname": PRINT drive#, tracks#, sides#, steprate - format disc + Manual https://archive.org/download/World_of_Spectrum_June_2017_Mirror/World%20of%20Spectrum%20June%202017%20Mirror.zip/World%20of%20Spectrum%20June%202017%20Mirror/sinclair/hardware-info/k/KempstonDiscInterface_Manual.pdf + Notes/TODO: - schematics is missing, actual I/O ports decode might be not right - find out port 0xDF 3 MSB bits wiring, probably FDC /DDEN, /MR diff --git a/src/devices/bus/spectrum/speccydos.cpp b/src/devices/bus/spectrum/speccydos.cpp new file mode 100644 index 00000000000..76fa5dc4956 --- /dev/null +++ b/src/devices/bus/spectrum/speccydos.cpp @@ -0,0 +1,244 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + Speccy-DOS Interface + (c) 1987? Philips(?) + + WD1770/2-based floppy drive interface with 1K RAM and 8K ROM, + presumable developed by Philips & MBLE Belgium, had some popularity in Hungary. + + Main commands: + LIST * - list disc contents + LOAD *"filename" - load and run program + SAVE *"filename" - save program + FORMAT *"diskname"dd80 - format double side double density 80 tracks disk + ASN *drive# - change drive + + Manual: https://sinclair.hu/speccyalista/konyvtar/kezikonyvek/SpeccyDOSv4_manual.pdf + + Partially compatible with Spectrum128, useable after "USR 0" from basic128 or switch to 48K mode. + + Notes / TODOs: + - address decoding performed by large DIP28 chip, probably PROM, not dumped, exact logic is not known. + - program ROMs have swapped data lines/bits 1 and 5. + - original software disc mentioned in manual is missing. + - Magic/NMI function require NMI routine preloaded in RAM by "MAGIC2.x" program (which is missing). + +*********************************************************************/ + +#include "emu.h" +#include "speccydos.h" + + +/*************************************************************************** + DEVICE DEFINITIONS +***************************************************************************/ + +DEFINE_DEVICE_TYPE(SPECTRUM_SPECCYDOS, spectrum_speccydos_device, "spectrum_speccydos", "Speccy-DOS Interface") + + +//------------------------------------------------- +// INPUT_PORTS +//------------------------------------------------- + +INPUT_PORTS_START(speccydos) + PORT_START("BUTTON") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Magic Button") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, spectrum_speccydos_device, magic_button, 0) +INPUT_PORTS_END + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor spectrum_speccydos_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(speccydos); +} + +//------------------------------------------------- +// SLOT_INTERFACE( floppies ) +//------------------------------------------------- + +static void speccydos_floppies(device_slot_interface &device) +{ + device.option_add("525sssd_35t", FLOPPY_525_SSSD_35T); + device.option_add("525ssdd", FLOPPY_525_SSDD); + device.option_add("525dsdd", FLOPPY_525_DD); + device.option_add("525ssqd", FLOPPY_525_SSQD); + device.option_add("525dsqd", FLOPPY_525_QD); + device.option_add("35ssdd", FLOPPY_35_SSDD); + device.option_add("35dsdd", FLOPPY_35_DD); +} + +//------------------------------------------------- +// floppy_format_type floppy_formats +//------------------------------------------------- + +FLOPPY_FORMATS_MEMBER(spectrum_speccydos_device::floppy_formats) + FLOPPY_SDD_FORMAT +FLOPPY_FORMATS_END + +//------------------------------------------------- +// ROM( speccydos ) +//------------------------------------------------- + +ROM_START(speccydos) + ROM_REGION(0x2000, "rom", 0) + ROM_DEFAULT_BIOS("sdos42") + + ROM_SYSTEM_BIOS(0, "sdos41", "Speccy DOS v4.1") + ROMX_LOAD("sdos41.bin", 0x0000, 0x2000, CRC(fcfa6dac) SHA1(bcae27b334bbbee257900682859132f476c3be99), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "sdos42", "Speccy DOS v4.2 (WD1770)") + ROMX_LOAD("sdos42.bin", 0x0000, 0x2000, CRC(208e7baa) SHA1(80e82c1dd77ff04b86989f7d2a25d93c5aa1dc42), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "sdos422", "Speccy DOS v4.2 (WD1772)") // only 4 byte different from above - step rates for 1772 + ROMX_LOAD("sdos422.bin", 0x0000, 0x2000, CRC(a7317e1d) SHA1(e72d2ea19cbe8f3459e4fc9d3c57975dc9917bd6), ROM_BIOS(2)) +ROM_END + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void spectrum_speccydos_device::device_add_mconfig(machine_config &config) +{ + WD1770(config, m_fdc, 8_MHz_XTAL); + + FLOPPY_CONNECTOR(config, "fdc:0", speccydos_floppies, "35dsdd", spectrum_speccydos_device::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", speccydos_floppies, "35dsdd", spectrum_speccydos_device::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:2", speccydos_floppies, nullptr, spectrum_speccydos_device::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:3", speccydos_floppies, nullptr, spectrum_speccydos_device::floppy_formats).enable_sound(true); + + // passthru + SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, nullptr); + m_exp->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w)); + m_exp->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w)); +} + +const tiny_rom_entry *spectrum_speccydos_device::device_rom_region() const +{ + return ROM_NAME(speccydos); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// spectrum_speccydos_device - constructor +//------------------------------------------------- + +spectrum_speccydos_device::spectrum_speccydos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, SPECTRUM_SPECCYDOS, tag, owner, clock) + , device_spectrum_expansion_interface(mconfig, *this) + , m_rom(*this, "rom") + , m_fdc(*this, "fdc") + , m_floppy(*this, "fdc:%u", 0) + , m_exp(*this, "exp") +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void spectrum_speccydos_device::device_start() +{ + memset(m_ram, 0, sizeof(m_ram)); + + save_item(NAME(m_romcs)); + save_item(NAME(m_control)); + save_item(NAME(m_ram)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void spectrum_speccydos_device::device_reset() +{ + m_romcs = 0; + m_control = 0; +} + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +READ_LINE_MEMBER(spectrum_speccydos_device::romcs) +{ + return m_romcs | m_exp->romcs(); +} + +void spectrum_speccydos_device::pre_opcode_fetch(offs_t offset) +{ + m_exp->pre_opcode_fetch(offset); + + if (!machine().side_effects_disabled()) + { + switch (offset) + { + case 0x1292: + case 0x1b41: + if (!BIT(m_control, 6)) + m_romcs = 1; + break; + } + } +} + +uint8_t spectrum_speccydos_device::mreq_r(offs_t offset) +{ + u8 data = 0xff; + + if (m_romcs) + { + if (offset < 0x2000) + { + data = m_rom->base()[offset]; + data = bitswap<8>(data, 7, 6, 1, 4, 3, 2, 5, 0); + } + else if (offset < 0x2400) + data = m_ram[offset & 0x3ff]; + else if (offset >= 0x3290 && offset < 0x3294) + data = m_fdc->read(offset & 3); + else + logerror("SpeccyDOS unhandled read %04X\n", offset); + } + + if (m_exp->romcs()) + data &= m_exp->mreq_r(offset); + + return data; +} + +void spectrum_speccydos_device::mreq_w(offs_t offset, uint8_t data) +{ + if (offset == 0x3b41) + { + m_control = data; + floppy_image_device* floppy = m_floppy[data & 3]->get_device(); + m_fdc->set_floppy(floppy); + + if (floppy) + floppy->ss_w(BIT(data, 2)); + m_fdc->dden_w(BIT(data, 7)); + + m_romcs = BIT(data, 6) ? 0 : BIT(data, 3); + } + else + if (m_romcs) + { + if (offset >= 0x2000 && offset < 0x2400) + m_ram[offset & 0x3ff] = data; + else if (offset >= 0x3290 && offset < 0x3294) + m_fdc->write(offset & 3, data); + else + { + logerror("SpeccyDOS unhandled write %04X %02X\n", offset, data); + //machine().debug_break(); + } + } + + m_exp->mreq_w(offset, data); +} diff --git a/src/devices/bus/spectrum/speccydos.h b/src/devices/bus/spectrum/speccydos.h new file mode 100644 index 00000000000..b26c1a6445c --- /dev/null +++ b/src/devices/bus/spectrum/speccydos.h @@ -0,0 +1,64 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + Speccy DOS Interface + +*********************************************************************/ +#ifndef MAME_BUS_SPECTRUM_SPECCYDOS_H +#define MAME_BUS_SPECTRUM_SPECCYDOS_H + +#include "exp.h" +#include "softlist.h" +#include "imagedev/floppy.h" +#include "machine/wd_fdc.h" +#include "formats/sdd_dsk.h" + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class spectrum_speccydos_device : + public device_t, + public device_spectrum_expansion_interface + +{ +public: + // construction/destruction + spectrum_speccydos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + DECLARE_FLOPPY_FORMATS(floppy_formats); + DECLARE_INPUT_CHANGED_MEMBER(magic_button) { m_slot->nmi_w(newval ? ASSERT_LINE : CLEAR_LINE); }; + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual ioport_constructor device_input_ports() const override; + + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + virtual void pre_opcode_fetch(offs_t offset) override; + virtual uint8_t mreq_r(offs_t offset) override; + virtual void mreq_w(offs_t offset, uint8_t data) override; + virtual DECLARE_READ_LINE_MEMBER(romcs) override; + + required_memory_region m_rom; + required_device m_fdc; + required_device_array m_floppy; + required_device m_exp; + + int m_romcs; + u8 m_control; + u8 m_ram[0x400]; +}; + + +// device type definition +DECLARE_DEVICE_TYPE(SPECTRUM_SPECCYDOS, spectrum_speccydos_device) + + +#endif // MAME_BUS_SPECTRUM_SPECCYDOS_H diff --git a/src/lib/formats/fl1_dsk.cpp b/src/lib/formats/fl1_dsk.cpp new file mode 100644 index 00000000000..89419233056 --- /dev/null +++ b/src/lib/formats/fl1_dsk.cpp @@ -0,0 +1,59 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + formats/fl1_dsk.c + + FloppyOne DOS disk images + +*********************************************************************/ + +#include + +#include "formats/fl1_dsk.h" + +fl1_format::fl1_format() : wd177x_format(formats) +{ +} + +const char *fl1_format::name() const +{ + return "fl1"; +} + +const char *fl1_format::description() const +{ + return "FloppyOne floppy disk image"; +} + +const char *fl1_format::extensions() const +{ + return "fl1"; +} + +int fl1_format::get_image_offset(const format &f, int head, int track) +{ + return (f.track_count * head + track) * compute_track_size(f); +} + +const fl1_format::format fl1_format::formats[] = { + { // 5"25 800K 80 track double sided double density + floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM, + 2000, 5, 80, 2, 1024, {}, 0, {}, 80, 22, 54 + }, + { // 5"25 400K 80 track single sided double density + floppy_image::FF_525, floppy_image::SSQD, floppy_image::MFM, + 2000, 5, 80, 1, 1024, {}, 0, {}, 80, 22, 54 + }, + { // 3'5 800K 80 track double sided double density + floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM, + 2000, 5, 80, 2, 1024, {}, 0, {}, 80, 22, 54 + }, + { // 3'5 400K 80 track single sided double density + floppy_image::FF_35, floppy_image::SSDD, floppy_image::MFM, + 2000, 5, 80, 1, 1024, {}, 0, {}, 80, 22, 54 + }, + {} +}; + +const floppy_format_type FLOPPY_FL1_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/fl1_dsk.h b/src/lib/formats/fl1_dsk.h new file mode 100644 index 00000000000..82ea70329af --- /dev/null +++ b/src/lib/formats/fl1_dsk.h @@ -0,0 +1,32 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + formats/fl1_dsk.h + + FloppyOne DOS disk images + +*********************************************************************/ +#ifndef MAME_FORMATS_FL1_DSK_H +#define MAME_FORMATS_FL1_DSK_H + +#pragma once + +#include "wd177x_dsk.h" + +class fl1_format : public wd177x_format { +public: + fl1_format(); + + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + +private: + static const format formats[]; + virtual int get_image_offset(const format &f, int head, int track) override; +}; + +extern const floppy_format_type FLOPPY_FL1_FORMAT; + +#endif // MAME_FORMATS_FL1_DSK_H diff --git a/src/lib/formats/sdd_dsk.cpp b/src/lib/formats/sdd_dsk.cpp new file mode 100644 index 00000000000..5159cd6e2bc --- /dev/null +++ b/src/lib/formats/sdd_dsk.cpp @@ -0,0 +1,59 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + formats/sdd_dsk.c + + Speccy-DOS SDD disk images + +*********************************************************************/ + +#include + +#include "formats/sdd_dsk.h" + +sdd_format::sdd_format() : wd177x_format(formats) +{ +} + +const char *sdd_format::name() const +{ + return "sdd"; +} + +const char *sdd_format::description() const +{ + return "SDD floppy disk image"; +} + +const char *sdd_format::extensions() const +{ + return "sdd"; +} + +int sdd_format::get_image_offset(const format &f, int head, int track) +{ + return (f.track_count * head + track) * compute_track_size(f); +} + +const sdd_format::format sdd_format::formats[] = { + { // 5"25 640K 80 track double sided double density + floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM, + 2000, 16, 80, 2, 256, {}, -1, {1,12,7,2,13,8,3,14,9,4,15,10,5,16,11,6}, 60, 22, 24 + }, + { // 5"25 400K 80 track double sided single density + floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, + 4000, 10, 80, 2, 256, {}, -1, {1,8,5,2,9,6,3,10,7,4}, 40, 11, 10 + }, + { // 3'5 640K 80 track double sided double density + floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM, + 2000, 16, 80, 2, 256, {}, -1, {1,12,7,2,13,8,3,14,9,4,15,10,5,16,11,6}, 60, 22, 24 + }, + { // 3'5 400K 80 track double sided single density + floppy_image::FF_35, floppy_image::DSDD, floppy_image::FM, + 4000, 10, 80, 2, 256, {}, -1, {1,8,5,2,9,6,3,10,7,4}, 40, 11, 10 + }, + {} +}; + +const floppy_format_type FLOPPY_SDD_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/sdd_dsk.h b/src/lib/formats/sdd_dsk.h new file mode 100644 index 00000000000..bcead8007d4 --- /dev/null +++ b/src/lib/formats/sdd_dsk.h @@ -0,0 +1,32 @@ +// license:BSD-3-Clause +// copyright-holders:MetalliC +/********************************************************************* + + formats/sdd_dsk.h + + Speccy-DOS SDD disk images + +*********************************************************************/ +#ifndef MAME_FORMATS_SDD_DSK_H +#define MAME_FORMATS_SDD_DSK_H + +#pragma once + +#include "wd177x_dsk.h" + +class sdd_format : public wd177x_format { +public: + sdd_format(); + + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + +private: + static const format formats[]; + virtual int get_image_offset(const format &f, int head, int track) override; +}; + +extern const floppy_format_type FLOPPY_SDD_FORMAT; + +#endif // MAME_FORMATS_SDD_DSK_H diff --git a/src/mame/drivers/spec128.cpp b/src/mame/drivers/spec128.cpp index 1247e487ae3..10bc5f94d68 100644 --- a/src/mame/drivers/spec128.cpp +++ b/src/mame/drivers/spec128.cpp @@ -179,8 +179,7 @@ uint8_t spectrum_state::spectrum_128_pre_opcode_fetch_r(offs_t offset) void spectrum_state::spectrum_128_bank1_w(offs_t offset, uint8_t data) { - if (m_exp->romcs()) - m_exp->mreq_w(offset, data); + m_exp->mreq_w(offset, data); } uint8_t spectrum_state::spectrum_128_bank1_r(offs_t offset) diff --git a/src/mame/drivers/spectrum.cpp b/src/mame/drivers/spectrum.cpp index b7166642fab..65dcbab6e65 100644 --- a/src/mame/drivers/spectrum.cpp +++ b/src/mame/drivers/spectrum.cpp @@ -318,8 +318,7 @@ void spectrum_state::spectrum_data_w(offs_t offset, uint8_t data) void spectrum_state::spectrum_rom_w(offs_t offset, uint8_t data) { - if (m_exp->romcs()) - m_exp->mreq_w(offset, data); + m_exp->mreq_w(offset, data); } uint8_t spectrum_state::spectrum_rom_r(offs_t offset) -- cgit v1.2.3 From ac8a7c2012526e197d5e1413ef2a0a72a2127ead Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Sat, 11 Jul 2020 16:41:44 +0200 Subject: New working clones ------------------ Astro Fighter (set 4) [Juan Romero, ArcadeHacker, Roberto Fresca, ClawGrip] --- src/mame/drivers/astrof.cpp | 21 +++++++++++++++++++++ src/mame/mame.lst | 1 + 2 files changed, 22 insertions(+) diff --git a/src/mame/drivers/astrof.cpp b/src/mame/drivers/astrof.cpp index 0418872e0de..f0012a22319 100644 --- a/src/mame/drivers/astrof.cpp +++ b/src/mame/drivers/astrof.cpp @@ -1049,6 +1049,26 @@ ROM_START( astrof3 ) ROM_END +ROM_START( astroff ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "b.4a", 0xd000, 0x0400, CRC(18bdc2d9) SHA1(1fc93de1212f04f04acc224d91c2308758f5d5ca) ) + ROM_LOAD( "a.4c", 0xd400, 0x0400, CRC(2344521c) SHA1(7f50890df10219b51bf4cf617e8ffb4336e19ae3) ) + ROM_LOAD( "9.5a", 0xd800, 0x0400, CRC(9bd0e10d) SHA1(0170f56ce0c7a3827548bdd954acb2c0e4a2cb24) ) + ROM_LOAD( "8.5c", 0xdc00, 0x0400, CRC(c00d8f28) SHA1(08abc667b2c079bee1242b30545002fa7fea8a72) ) + ROM_LOAD( "7.4d", 0xe000, 0x0400, CRC(6cd01b9e) SHA1(597db331008a4a561bc8d9bbd42ffde9bcd565dc) ) + ROM_LOAD( "6.4f", 0xe400, 0x0400, CRC(69cd2604) SHA1(09201ae691330e3bd788f9c714f6dcbb7e8335d0) ) + ROM_LOAD( "5.5d", 0xe800, 0x0400, CRC(14a4118f) SHA1(d99876f405dd646a7f0e85e584f2509d9cf17372) ) + ROM_LOAD( "4.5f", 0xec00, 0x0400, CRC(0513bc92) SHA1(dbf774e8353c966c303e02ce8196b888d235bdb2) ) + ROM_LOAD( "3.4h", 0xf000, 0x0400, CRC(e01713bd) SHA1(e0370a070c727f8f7ff767fdd84f7aeef31c8347) ) + ROM_LOAD( "2.4k", 0xf400, 0x0400, CRC(24ab94d5) SHA1(1e0a61d83fa67340d4b1477377ed9d65cf826f53) ) + ROM_LOAD( "1.5h", 0xf800, 0x0400, CRC(142bbc5d) SHA1(55017fd88a19d09943cde16d583db00cf4c3218b) ) + ROM_LOAD( "0.5k", 0xfc00, 0x0400, CRC(c63a9c80) SHA1(f51694912d823a5ae7883c603915b9c1aa0e0733) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "im5610-82s123.2f", 0x0000, 0x0020, CRC(61329fd1) SHA1(15782d8757d4dda5a8b97815e94c90218f0e08dd) ) +ROM_END + + ROM_START( abattle ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "10405-b.bin", 0xd000, 0x0400, CRC(9ba57987) SHA1(becf89b7d474f86839f13f9be5502c91491e8584) ) @@ -1386,6 +1406,7 @@ void astrof_state::init_acombat3() GAME( 1979, astrof, 0, astrof, astrof, astrof_state, empty_init, ROT90, "Data East", "Astro Fighter (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, astrof2, astrof, astrof, astrof, astrof_state, empty_init, ROT90, "Data East", "Astro Fighter (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, astrof3, astrof, astrof, astrof, astrof_state, empty_init, ROT90, "Data East", "Astro Fighter (set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1979, astroff, astrof, astrof, astrof, astrof_state, empty_init, ROT90, "bootleg? (Famaresa)", "Astro Fighter (set 4)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, abattle, astrof, abattle, abattle, astrof_state, init_abattle, ROT90, "bootleg? (Sidam)", "Astro Battle (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, abattle2, astrof, abattle, abattle, astrof_state, init_abattle, ROT90, "bootleg? (Sidam)", "Astro Battle (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, afire, astrof, abattle, abattle, astrof_state, init_afire, ROT90, "bootleg (Rene Pierre)", "Astro Fire", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index e3e4ede828c..d562f0d655c 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -2400,6 +2400,7 @@ afire // Rene Pierre astrof // (c) [1980?] astrof2 // (c) [1980?] astrof3 // (c) [1980?] +astroff // bootleg (Famaresa) spfghmk2 // (c) [1979] Data East Corporation spfghmk22 // (c) [1979] Data East Corporation sstarbtl // bootleg -- cgit v1.2.3 From 2ba2a0f3ab757e7bc25febb9b7a1ee602b752736 Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Sat, 11 Jul 2020 17:16:53 +0200 Subject: Machines promoted to working ---------------------------- unknown rocket/animal-themed poker [Roberto Fresca] --- src/mame/drivers/goldnpkr.cpp | 105 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 98 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp index e02c8405463..319fdd4bc2a 100644 --- a/src/mame/drivers/goldnpkr.cpp +++ b/src/mame/drivers/goldnpkr.cpp @@ -1333,6 +1333,7 @@ public: void wcrdxtnd(machine_config &config); void super21p(machine_config &config); void caspoker(machine_config &config); + void icp_ext(machine_config &config); void init_vkdlswwh(); void init_icp1db(); @@ -1421,6 +1422,7 @@ private: void witchcrd_falcon_map(address_map &map); void witchcrd_map(address_map &map); void super21p_map(address_map &map); + void icp_ext_map(address_map &map); required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -2151,6 +2153,20 @@ void goldnpkr_state::super21p_map(address_map &map) map(0x8000, 0xffff).rom(); } +void goldnpkr_state::icp_ext_map(address_map &map) +{ + map.global_mask(0x7fff); + map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM + map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); + map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); + map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram"); + map(0x1800, 0x1bff).ram().w(FUNC(goldnpkr_state::goldnpkr_colorram_w)).share("colorram"); + map(0x2000, 0x3fff).rom(); + map(0x6000, 0x7fff).rom(); +} + /********************************************* * Input Ports * @@ -2427,6 +2443,67 @@ static INPUT_PORTS_START( potnpkra ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( animpkr ) + // Multiplexed - 4x5bits + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin 1 + Start") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-0 80") PORT_CODE(KEYCODE_G) + + PORT_START("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_IMPULSE(3) PORT_NAME("Manual Collect") PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_W) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3 02") PORT_CODE(KEYCODE_D) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin 2") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3 10") PORT_CODE(KEYCODE_F) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("SW1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x10, 0x00, "High Pair (11-13)" ) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x20, "50hz" ) + PORT_DIPSETTING( 0x00, "60hz" ) + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x40, "Manual" ) + PORT_DIPSETTING( 0x00, "Auto" ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END + static INPUT_PORTS_START( potnpkrc ) // Multiplexed - 4x5bits PORT_INCLUDE( potnpkra ) @@ -4660,6 +4737,22 @@ void goldnpkr_state::pottnpkr(machine_config &config) DISCRETE(config, m_discrete, pottnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } +void goldnpkr_state::icp_ext(machine_config &config) +{ + goldnpkr_base(config); + R65C02(config.replace(), m_maincpu, CPU_CLOCK); + + // basic machine hardware + m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::icp_ext_map); + + m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); + m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); + + // sound hardware + SPEAKER(config, "mono").front_center(); + DISCRETE(config, m_discrete, pottnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); +} + void goldnpkr_state::witchcrd(machine_config &config) { goldnpkr_base(config); @@ -11464,12 +11557,10 @@ ROM_END -------------------------------------------------------------------------*/ ROM_START( animpkr ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "2732_top.15a", 0x2000, 0x1000, CRC(ef6b36ff) SHA1(2ca520502ce32c4327f9bcc85d5c7b6e2f22eeb5) ) - ROM_LOAD( "2732_top.17a", 0x3000, 0x1000, CRC(13fae924) SHA1(c1c92fdb6e7036e6d9349c9b017e9daf3577345b) ) - - ROM_REGION( 0x10000, "banked", 0 ) ROM_LOAD( "2732_bottom.15a", 0x2000, 0x1000, CRC(036f7639) SHA1(7d548dd71692fcde41c260a4a59ccdfa2aa5b07e) ) ROM_LOAD( "2732_bottom.17a", 0x3000, 0x1000, CRC(92c19e72) SHA1(034d077ede5608160ba882227e981751a5dde26d) ) + ROM_LOAD( "2732_top.15a", 0x6000, 0x1000, CRC(ef6b36ff) SHA1(2ca520502ce32c4327f9bcc85d5c7b6e2f22eeb5) ) + ROM_LOAD( "2732_top.17a", 0x7000, 0x1000, CRC(13fae924) SHA1(c1c92fdb6e7036e6d9349c9b017e9daf3577345b) ) ROM_REGION( 0x1800, "gfx1", 0 ) ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes @@ -11481,7 +11572,7 @@ ROM_START( animpkr ) ROM_LOAD( "2716.7a", 0x1000, 0x0800, CRC(c48d17b0) SHA1(7c446339ab3aaa49004780fa90a3624b5a382cb1) ) // characters gfx, bitplane 3 ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // PROM dump needed + ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(dc4c4728) SHA1(6c779cd32d5b8d659f971b30f63267d81ad57afb) ) // PROM dump needed ROM_END @@ -12208,10 +12299,10 @@ GAME( 198?, pokersis, 0, bchancep, goldnpkr, goldnpkr_state, empty_init GAMEL( 198?, bchancep, 0, bchancep, goldnpkr, goldnpkr_state, init_bchancep, ROT0, "", "Bonne Chance! (Golden Poker prequel HW, set 1)", MACHINE_NOT_WORKING, layout_goldnpkr ) GAMEL( 198?, bchanceq, 0, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "", "Bonne Chance! (Golden Poker prequel HW, set 2)", MACHINE_NOT_WORKING, layout_goldnpkr ) -GAME( 1987, pokermon, 0, mondial, mondial, goldnpkr_state, empty_init, ROT0, "", "Mundial/Mondial (Italian/French)", 0 ) // banked selectable program +GAME( 1987, pokermon, 0, mondial, mondial, goldnpkr_state, empty_init, ROT0, "", "Mundial/Mondial (Italian/French)", 0 ) // banked selectable program GAME( 1998, super98, bsuerte, witchcrd, super98, goldnpkr_state, empty_init, ROT0, "", "Super 98 (3-hands, ICP-1)", MACHINE_NOT_WORKING ) // program checks zeropage registers for changes... -GAME( 198?, animpkr, 0, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "", "unknown rocket/animal-themed poker", MACHINE_NOT_WORKING ) // banked program. +GAME( 198?, animpkr, 0, icp_ext, animpkr, goldnpkr_state, empty_init, ROT0, "", "unknown rocket/animal-themed poker", MACHINE_IMPERFECT_COLORS ) // banked program. how to switch gfx? GAME( 1990, megadpkr, 0, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.3 MD)", 0 ) GAME( 1990, megadpkrb, megadpkr, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.1 MD)", 0 ) // may need an extra reset to work the first time -- cgit v1.2.3 From 560b3510546d47d28274be23f7a9a4e9305362f3 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sun, 12 Jul 2020 01:47:28 +1000 Subject: tec1: updated notes --- src/mame/drivers/tec1.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/tec1.cpp b/src/mame/drivers/tec1.cpp index f27b8fc26e0..a85530ceef8 100644 --- a/src/mame/drivers/tec1.cpp +++ b/src/mame/drivers/tec1.cpp @@ -42,10 +42,12 @@ Each key causes a beep to be heard. You may need to press more than once to get it to register. Inbuilt games - press the following sequence of keys: -- Welcome: RESET D 1 + 0 2 AD 0 2 7 0 GO GO (Paste: D1^02 -0270XX) -- Nim: RESET AD 3 E 0 GO GO (Paste: -3E0XX) -- Invaders: RESET AD 3 2 0 GO GO (Paste: -320XX) -- Luna Lander: RESET AD 4 9 0 GO GO (Paste: -490XX) +- Invaders: RESET AD 0 0 0 8 GO GO (Paste: -0008XX) +- Nim: RESET AD 0 0 1 0 GO GO (Paste: -0010XX) +- Lunar Lander: RESET AD 0 0 1 8 GO GO (Paste: -0018XX) +Tunes: +- Bealach An Doirin: RESET AD 0 0 2 8 GO GO (Paste: -0028XX) +- Biking up the strand: RESET AD 0 0 3 0 GO GO (Paste: -0030XX) Thanks to Chris Schwartz who dumped his ROM for me way back in the old days. It's only taken 25 years to get around to emulating it... -- cgit v1.2.3 From 371321a61c8fec053225cc82af3b71e606b0b407 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Sat, 11 Jul 2020 09:06:50 -0700 Subject: goldnpkr: fix build issue (#6945) --- src/mame/drivers/goldnpkr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp index 319fdd4bc2a..46617ddef9a 100644 --- a/src/mame/drivers/goldnpkr.cpp +++ b/src/mame/drivers/goldnpkr.cpp @@ -2490,7 +2490,7 @@ static INPUT_PORTS_START( animpkr ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x10, 0x00, "High Pair (11-13)" ) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x10, 0x00, "High Pair (11-13)" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") -- cgit v1.2.3 From 31147825098e1f9face20cea05cc647e6d0236ed Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sun, 12 Jul 2020 02:35:22 +1000 Subject: ec65: cleanup, added notes --- src/mame/drivers/ec65.cpp | 189 +++++++++++++++++++++++++++++++--------------- 1 file changed, 128 insertions(+), 61 deletions(-) diff --git a/src/mame/drivers/ec65.cpp b/src/mame/drivers/ec65.cpp index ff3c2b41bf6..68882ce4b38 100644 --- a/src/mame/drivers/ec65.cpp +++ b/src/mame/drivers/ec65.cpp @@ -1,12 +1,26 @@ // license:BSD-3-Clause // copyright-holders:Miodrag Milanovic, Robbbert -/*************************************************************************** +/******************************************************************************** EC-65 (also known as Octopus) 2009-07-16 Initial driver. -****************************************************************************/ +No sound. Storage is floppy disk. No software has been found. +Modules are constructed on separate eurocards and plug into a common backplane. + +EC65 - Disk controller module uses 6821 and 6850. Needs to be emulated. + When done, .b to boot disk + +EC65K - To be developed from scratch. Similar design to EC65, but 6522 + replaced with 6821. Contains extra RTC. Particulars of video and + universal FDC not known. + - Extra 256KB card + - Extra Z80 card with ROM, 2x PIA, 64 or 256KB RAM, for CP/M use. + - Currently runs into the weeds soon after start, at F070 + + +********************************************************************************/ #include "emu.h" #include "cpu/m6502/m6502.h" @@ -17,68 +31,82 @@ EC-65 (also known as Octopus) #include "machine/mos6551.h" #include "machine/6850acia.h" #include "machine/keyboard.h" +#include "machine/mc146818.h" #include "emupal.h" #include "screen.h" -#define PIA6821_TAG "pia6821" -#define ACIA6850_TAG "acia6850" -#define ACIA6551_TAG "acia6551" -#define VIA6522_0_TAG "via6522_0" -#define VIA6522_1_TAG "via6522_1" -#define MC6845_TAG "mc6845" -#define KEYBOARD_TAG "keyboard" -class ec65_state : public driver_device +class ec65_common : public driver_device { public: - ec65_state(const machine_config &mconfig, device_type type, const char *tag) + ec65_common(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_via_0(*this, VIA6522_0_TAG) - , m_via_1(*this, VIA6522_1_TAG) - , m_p_videoram(*this, "videoram") + , m_vram(*this, "videoram") , m_p_chargen(*this, "chargen") , m_maincpu(*this, "maincpu") , m_palette(*this, "palette") - { - } + { } - void kbd_put(u8 data); MC6845_UPDATE_ROW(crtc_update_row); - void ec65(machine_config &config); -private: - virtual void machine_reset() override; - void ec65_mem(address_map &map); - required_device m_via_0; - required_device m_via_1; - required_shared_ptr m_p_videoram; +protected: + required_shared_ptr m_vram; required_region_ptr m_p_chargen; required_device m_maincpu; required_device m_palette; + +}; + +class ec65_state : public ec65_common +{ +public: + ec65_state(const machine_config &mconfig, device_type type, const char *tag) + : ec65_common(mconfig, type, tag) + , m_via0(*this, "via0") + , m_via1(*this, "via1") + { } + + void ec65(machine_config &config); + +private: + void machine_reset() override; + void ec65_mem(address_map &map); + void kbd_put(u8 data); + required_device m_via0; + required_device m_via1; }; -class ec65k_state : public driver_device +class ec65k_state : public ec65_common { public: ec65k_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - { - } + : ec65_common(mconfig, type, tag) + , m_rtc(*this, "rtc") + , m_pia0(*this, "pia0") + , m_pia1(*this, "pia1") + { } + void ec65k(machine_config &config); + +private: void ec65k_mem(address_map &map); + void kbd_put(u8 data); + required_device m_rtc; + required_device m_pia0; + required_device m_pia1; }; void ec65_state::ec65_mem(address_map &map) { map.unmap_value_high(); map(0x0000, 0xdfff).ram(); - map(0xe000, 0xe003).rw(PIA6821_TAG, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - map(0xe010, 0xe011).rw(ACIA6850_TAG, FUNC(acia6850_device::read), FUNC(acia6850_device::write)); - map(0xe100, 0xe10f).m(m_via_0, FUNC(via6522_device::map)); - map(0xe110, 0xe11f).m(m_via_1, FUNC(via6522_device::map)); - map(0xe130, 0xe133).rw(ACIA6551_TAG, FUNC(mos6551_device::read), FUNC(mos6551_device::write)); - map(0xe140, 0xe140).w(MC6845_TAG, FUNC(mc6845_device::address_w)); - map(0xe141, 0xe141).rw(MC6845_TAG, FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); + map(0xe000, 0xe003).rw("pia", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // FDC card + map(0xe010, 0xe011).rw("fdc", FUNC(acia6850_device::read), FUNC(acia6850_device::write)); // FDC card + map(0xe100, 0xe10f).m(m_via0, FUNC(via6522_device::map)); + map(0xe110, 0xe11f).m(m_via1, FUNC(via6522_device::map)); + map(0xe130, 0xe133).rw("uart", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0xe140, 0xe140).rw("crtc", FUNC(mc6845_device::status_r), FUNC(mc6845_device::address_w)); + map(0xe141, 0xe141).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); map(0xe400, 0xe7ff).ram(); // 1KB on-board RAM map(0xe800, 0xefff).ram().share("videoram"); map(0xf000, 0xffff).rom().region("maincpu",0); @@ -87,9 +115,22 @@ void ec65_state::ec65_mem(address_map &map) void ec65k_state::ec65k_mem(address_map &map) { map.unmap_value_high(); - map(0x0000, 0xe7ff).ram(); - map(0xe800, 0xefff).ram().share("videoram"); - map(0xf000, 0xffff).rom().region("maincpu",0); + map(0x000000, 0x00dfff).ram(); // D000-DFFF = System RAM + map(0x00e000, 0x00e003).rw("pia", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // old FDC card + map(0x00e010, 0x00e011).rw("fdc", FUNC(acia6850_device::read), FUNC(acia6850_device::write)); // old FDC card + //map(0x00e150, colorator CRTC (no info) + //map(0x00e280, basicode interface (no info) + //map(0x00e300, Z80 board + map(0x00e400, 0x00e403).rw(m_pia0, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // PIA0 porta=keyboard; portb=parallel port + map(0x00e410, 0x00e413).rw("uart", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); + map(0x00e420, 0x00e423).rw(m_pia1, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // PIA1 porta=centronics control; portb=centronics data + map(0x00e430, 0x00e430).lw8(NAME([this] (u8 data) { m_rtc->write(0, data); })); // RTC 146818 - has battery backup + map(0x00e431, 0x00e431).lr8(NAME([this] () { return m_rtc->read(1); })); + map(0x00e431, 0x00e431).lw8(NAME([this] (u8 data) { m_rtc->write(1, data); })); + //map(0x00e500, 0x00e5ff) universal disk controller (no info) + map(0x00e800, 0x00efff).ram().share("videoram"); + map(0x00f000, 0x00ffff).rom().region("maincpu",0); + map(0x010000, 0x0fffff).ram(); } /* Input ports */ @@ -100,29 +141,39 @@ void ec65_state::kbd_put(u8 data) { if (data) { - m_via_0->write_pa(data); - m_via_0->write_ca1(1); - m_via_0->write_ca1(0); + m_via0->write_pa(data); + m_via0->write_ca1(1); + m_via0->write_ca1(0); + } +} + +void ec65k_state::kbd_put(u8 data) +{ + if (data) + { + m_pia0->porta_w(data); + m_pia0->ca1_w(1); + m_pia0->ca1_w(0); } } void ec65_state::machine_reset() { - m_via_1->write_pb(0xff); + m_via1->write_pb(0xff); } -MC6845_UPDATE_ROW( ec65_state::crtc_update_row ) +MC6845_UPDATE_ROW( ec65_common::crtc_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); - uint8_t chr,gfx,inv; - uint16_t mem,x; - uint32_t *p = &bitmap.pix32(y); + u8 chr,gfx,inv; + u16 mem,x; + u32 *p = &bitmap.pix32(y); for (x = 0; x < x_count; x++) { inv = (x == cursor_x) ? 0xff : 0; mem = (ma + x) & 0x7ff; - chr = m_p_videoram[mem]; + chr = m_vram[mem]; /* get pattern of pixels for that character scanline */ gfx = m_p_chargen[(chr<<4) | (ra & 0x0f)] ^ inv; @@ -169,30 +220,29 @@ void ec65_state::ec65(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ screen.set_size(640, 200); screen.set_visarea_full(); - screen.set_screen_update(MC6845_TAG, FUNC(mc6845_device::screen_update)); + screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); GFXDECODE(config, "gfxdecode", m_palette, gfx_ec65); PALETTE(config, "palette", palette_device::MONOCHROME); - mc6845_device &crtc(MC6845(config, MC6845_TAG, XTAL(16'000'000) / 8)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL(16'000'000) / 8)); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); /*?*/ crtc.set_update_row_callback(FUNC(ec65_state::crtc_update_row)); /* devices */ - PIA6821(config, PIA6821_TAG, 0); + ACIA6850(config, "fdc", 0); // used as a FDC on separate card + PIA6821(config, "pia", 0); // assists 6850 - ACIA6850(config, ACIA6850_TAG, 0); + VIA6522(config, m_via0, XTAL(4'000'000) / 4); - VIA6522(config, m_via_0, XTAL(4'000'000) / 4); + VIA6522(config, m_via1, XTAL(4'000'000) / 4); - VIA6522(config, m_via_1, XTAL(4'000'000) / 4); + mos6551_device &uart(MOS6551(config, "uart", 0)); + uart.set_xtal(XTAL(1'843'200)); - mos6551_device &acia(MOS6551(config, ACIA6551_TAG, 0)); - acia.set_xtal(XTAL(1'843'200)); - - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); keyboard.set_keyboard_callback(FUNC(ec65_state::kbd_put)); } @@ -208,15 +258,32 @@ void ec65k_state::ec65k(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ screen.set_size(640, 200); screen.set_visarea_full(); - screen.set_screen_update(MC6845_TAG, FUNC(mc6845_device::screen_update)); + screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); GFXDECODE(config, "gfxdecode", "palette", gfx_ec65); PALETTE(config, "palette", palette_device::MONOCHROME); - mc6845_device &crtc(MC6845(config, MC6845_TAG, XTAL(16'000'000) / 8)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL(16'000'000) / 8)); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); /*?*/ + crtc.set_update_row_callback(FUNC(ec65k_state::crtc_update_row)); + + /* devices */ + ACIA6850(config, "fdc", 0); // used as a FDC on separate card + PIA6821(config, "pia", 0); // assists 6850 + + MC146818(config, m_rtc, 32.768_kHz_XTAL); + //m_rtc->irq().set(FUNC(micronic_state::mc146818_irq)); Connects to common irq line used by below PIAs and UART + + PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia1, 0); + + mos6551_device &uart(MOS6551(config, "uart", 0)); + uart.set_xtal(XTAL(1'843'200)); + + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + keyboard.set_keyboard_callback(FUNC(ec65k_state::kbd_put)); } /* ROM definition */ @@ -233,10 +300,10 @@ ROM_START( ec65k ) ROM_LOAD( "ec65k.ic19", 0x0000, 0x1000, CRC(5e5a890a) SHA1(daa006f2179fd156833e11c73b37881cafe5dede)) ROM_REGION( 0x1000, "chargen", 0 ) - ROM_LOAD( "chargen.ic19", 0x0000, 0x1000, CRC(9b56a28d) SHA1(41c04fd9fb542c50287bc0e366358a61fc4b0cd4)) // Located on VDU card, suspect bad dump + ROM_LOAD( "chargen.ic19", 0x0000, 0x1000, CRC(9b56a28d) SHA1(41c04fd9fb542c50287bc0e366358a61fc4b0cd4)) // Located on VDU card ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ COMP( 1985, ec65, 0, 0, ec65, ec65, ec65_state, empty_init, "Elektor Electronics", "EC-65", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) -COMP( 1985, ec65k, ec65, 0, ec65k, ec65, ec65k_state, empty_init, "Elektor Electronics", "EC-65K", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) +COMP( 1986, ec65k, ec65, 0, ec65k, ec65, ec65k_state, empty_init, "Elektor Electronics", "EC-65K", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3 From 902b0da8f5f02e148e6913e27bbd788d684fc355 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 11 Jul 2020 12:59:48 -0400 Subject: phatt: Use full system name --- src/mame/drivers/emu68k.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/emu68k.cpp b/src/mame/drivers/emu68k.cpp index 93faefdc2cd..2d2dba851cb 100644 --- a/src/mame/drivers/emu68k.cpp +++ b/src/mame/drivers/emu68k.cpp @@ -239,5 +239,5 @@ SYST(1989, proteusxr, 0, 0, proteusxr, proteus1, emu68k_state, empty_init, "E-m SYST(1991, procuss, 0, 0, proteusxr, procuss, emu68k_state, empty_init, "E-mu Systems", "Pro/Cussion Maximum Percussion Module", MACHINE_IS_SKELETON) SYST(1993, vintkeys, 0, 0, vintkeys, vintkeys, emu68k_state, empty_init, "E-mu Systems", "Vintage Keys Classic Analog Keyboards", MACHINE_IS_SKELETON) SYST(1996, orbit9090, 0, 0, phatt, orbit9090, emu68k_state, empty_init, "E-mu Systems", "Orbit 9090 - The Dance Planet", MACHINE_IS_SKELETON) -SYST(1997, phatt, 0, 0, phatt, phatt, emu68k_state, empty_init, "E-mu Systems", "Planet Phatt", MACHINE_IS_SKELETON) +SYST(1997, phatt, 0, 0, phatt, phatt, emu68k_state, empty_init, "E-mu Systems", "Planet Phatt - The Swing System", MACHINE_IS_SKELETON) SYST(1997, carnaval, 0, 0, phatt, carnaval, emu68k_state, empty_init, "E-mu Systems", "Carnaval - Jugando con Fuego", MACHINE_IS_SKELETON) -- cgit v1.2.3 From 68f6988509a6927b44f42fccfe82e76a49cfff3b Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Sat, 11 Jul 2020 21:20:46 +0200 Subject: -midzeus: Moved some Zeus2-specific members into the appropriate subclass, and added more state registration. [Ryan Holtz] -tsb12lv01a: Added a skeleton device for the TI TSB12LV01A IEEE 1394 link-layer controller. [Ryan Holtz] -ibm21s850: Added a skeleton device for the iBM 21S850 IEEE 1394 PHY controller. [Ryan Holtz] --- scripts/src/machine.lua | 24 ++++ scripts/target/mame/arcade.lua | 2 + scripts/target/mame/mess.lua | 2 + src/devices/machine/ibm21s850.cpp | 90 +++++++++++++ src/devices/machine/ibm21s850.h | 135 +++++++++++++++++++ src/devices/machine/tsb12lv01a.cpp | 259 ++++++++++++++++++++++++++++++++++++ src/devices/machine/tsb12lv01a.h | 193 +++++++++++++++++++++++++++ src/mame/drivers/midzeus.cpp | 266 +++++++++++++++++-------------------- src/mame/includes/midzeus.h | 73 +++++----- src/mame/video/midzeus.cpp | 18 +-- 10 files changed, 869 insertions(+), 193 deletions(-) create mode 100644 src/devices/machine/ibm21s850.cpp create mode 100644 src/devices/machine/ibm21s850.h create mode 100644 src/devices/machine/tsb12lv01a.cpp create mode 100644 src/devices/machine/tsb12lv01a.h diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index ddacf5da639..4aa576ad317 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -1536,6 +1536,18 @@ if (MACHINES["ICM7170"]~=null) then } end +--------------------------------------------------- +-- +--@src/devices/machine/ibm21s850.h,MACHINES["IBM21S850"] = true +--------------------------------------------------- + +if (MACHINES["IBM21S850"]~=null) then + files { + MAME_DIR .. "src/devices/machine/ibm21s850.cpp", + MAME_DIR .. "src/devices/machine/ibm21s850.h", + } +end + --------------------------------------------------- -- --@src/devices/machine/idectrl.h,MACHINES["IDECTRL"] = true @@ -3184,6 +3196,18 @@ if (MACHINES["TMS9914"]~=null) then } end +--------------------------------------------------- +-- +--@src/devices/machine/tsb12lv01a.h,MACHINES["TSB12LV01A"] = true +--------------------------------------------------- + +if (MACHINES["TSB12LV01A"]~=null) then + files { + MAME_DIR .. "src/devices/machine/tsb12lv01a.cpp", + MAME_DIR .. "src/devices/machine/tsb12lv01a.h", + } +end + --------------------------------------------------- -- --@src/devices/machine/tube.h,MACHINES["TUBE"] = true diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 1fed9499742..b50b00ef8f6 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -495,6 +495,7 @@ MACHINES["I8255"] = true --MACHINES["I8271"] = true MACHINES["I8279"] = true MACHINES["I8355"] = true +MACHINES["IBM21S850"] = true MACHINES["IDECTRL"] = true MACHINES["IE15"] = true MACHINES["IM6402"] = true @@ -638,6 +639,7 @@ MACHINES["TMS6100"] = true MACHINES["TMS9901"] = true MACHINES["TMS9902"] = true --MACHINES["TPI6525"] = true +MACHINES["TSB12LV01A"] = true --MACHINES["TTL74123"] = true --MACHINES["TTL74145"] = true --MACHINES["TTL74148"] = true diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index b05984bb00e..eda9a815572 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -523,6 +523,7 @@ MACHINES["I8271"] = true MACHINES["I8279"] = true MACHINES["I8291A"] = true MACHINES["I8355"] = true +--MACHINES["IBM21S850"] = true MACHINES["ICM7170"] = true MACHINES["IDECTRL"] = true MACHINES["IE15"] = true @@ -673,6 +674,7 @@ MACHINES["TMS9914"] = true MACHINES["TPI6525"] = true MACHINES["TTL7400"] = true MACHINES["TTL7404"] = true +--MACHINES["TSB12LV01A"] = true MACHINES["TTL74123"] = true MACHINES["TTL74145"] = true MACHINES["TTL74148"] = true diff --git a/src/devices/machine/ibm21s850.cpp b/src/devices/machine/ibm21s850.cpp new file mode 100644 index 00000000000..cac0a92ecc2 --- /dev/null +++ b/src/devices/machine/ibm21s850.cpp @@ -0,0 +1,90 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz +/************************************************************* + + IBM 21S850 IEEE 1394 400Mb/s Physical Layer + Transceiver (PHY) + + Skeleton device + +**************************************************************/ + +#include "emu.h" +#include "ibm21s850.h" + +#define LOG_READS (1 << 1) +#define LOG_WRITES (1 << 2) +#define LOG_UNKNOWNS (1 << 3) +#define LOG_ALL (LOG_READS | LOG_WRITES | LOG_UNKNOWNS) + +#define VERBOSE (0) +#include "logmacro.h" + +DEFINE_DEVICE_TYPE(IBM21S850, ibm21s850_device, "ibm21s850", "IBM 21S850 IEEE 1394 PHY") + +ibm21s850_device::ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, IBM21S850, tag, owner, clock) +{ +} + +void ibm21s850_device::device_start() +{ + save_item(NAME(m_regs)); +} + +void ibm21s850_device::device_reset() +{ +} + +uint8_t ibm21s850_device::read(offs_t offset) +{ + if (offset < 0x10) + { + LOGMASKED(LOG_READS, "%s: Register %02x read: %02x\n", machine().describe_context(), offset, m_regs[offset]); + return m_regs[offset]; + } + LOGMASKED(LOG_READS | LOG_UNKNOWNS, "%s: Unknown Register (%02x) read\n", machine().describe_context(), offset); + return 0; +} + +void ibm21s850_device::write(offs_t offset, uint8_t data) +{ + switch (offset) + { + default: + LOGMASKED(LOG_WRITES, "%s: Register %02x write (ignored): %02x\n", machine().describe_context(), offset, data); + break; + case 0x01: + LOGMASKED(LOG_WRITES, "%s: Register 01 write: %02x\n", machine().describe_context(), data); + LOGMASKED(LOG_WRITES, "%s: Root Hold-off: %d\n", machine().describe_context(), (data & ROOT_HOLD_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Initiate Bus Reset: %d\n", machine().describe_context(), (data & BUS_RESET_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Gap Offset: %02x\n", machine().describe_context(), data & GAP_COUNT_MASK); + m_regs[offset] = data; + break; + case 0x0d: + LOGMASKED(LOG_WRITES, "%s: Register 0d write: %02x\n", machine().describe_context(), data); + LOGMASKED(LOG_WRITES, "%s: Enable L-P Selftest: %d\n", machine().describe_context(), (data & LP_TEST_EN_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Enable Ack Accel Arbitration: %d\n", machine().describe_context(), (data & ACK_ACCEL_EN_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Enable Multi-Speed Concat: %d\n", machine().describe_context(), (data & MULTISP_CONCAT_EN_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Mask LPS Bit: %d\n", machine().describe_context(), (data & MASK_LPS_MASK) ? 1 : 0); + m_regs[offset] = data; + break; + case 0x0e: + LOGMASKED(LOG_WRITES, "%s: Register 0e write: %02x\n", machine().describe_context(), data); + LOGMASKED(LOG_WRITES, "%s: Enable Tx/Rx Timeout: %d\n", machine().describe_context(), (data & EN_TIMEOUT_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Ignore Unplug: %d\n", machine().describe_context(), (data & IGNORE_UNPLUG_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Override CMC: %d\n", machine().describe_context(), (data & OVERRIDE_CMC_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Software CMC: %d\n", machine().describe_context(), (data & SOFT_CMC_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Disable Port 1: %d\n", machine().describe_context(), (data & DISABLE_P1_MASK) ? 1 : 0); + m_regs[offset] = data; + break; + case 0x0f: + LOGMASKED(LOG_WRITES, "%s: Register 0f write: %02x\n", machine().describe_context(), data); + LOGMASKED(LOG_WRITES, "%s: Soft POR: %d\n", machine().describe_context(), (data & SOFT_POR_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Send PHY-Link Diag (SID) Packet: %d\n", machine().describe_context(), (data & SEND_PL_DIAG_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Degate Ack_Acc_Arb: %d\n", machine().describe_context(), (data & ACK_ACCEL_SYNC_MASK) ? 1 : 0); + LOGMASKED(LOG_WRITES, "%s: Initiate Short Bus Reset: %d\n", machine().describe_context(), (data & ISBR_MASK) ? 1 : 0); + m_regs[offset] = data; + break; + } +} \ No newline at end of file diff --git a/src/devices/machine/ibm21s850.h b/src/devices/machine/ibm21s850.h new file mode 100644 index 00000000000..99ab152f21a --- /dev/null +++ b/src/devices/machine/ibm21s850.h @@ -0,0 +1,135 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz +/************************************************************* + + IBM 21S850 IEEE 1394 400Mb/s Physical Layer + Transceiver (PHY) + + Skeleton device + +**************************************************************/ + +#ifndef MAME_MACHINE_IBM21S850_H +#define MAME_MACHINE_IBM21S850_H + +#pragma once + +class ibm21s850_device : public device_t +{ +public: + ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); + + static constexpr feature_type unemulated_features() { return feature::COMMS; } + +private: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + enum + { + PHYSICAL_ID_OFFS = 0, + PHYSICAL_ID_SHIFT = 2, + PHYSICAL_ID_MASK = 0xfc, + ROOT_OFFS = 0, + ROOT_MASK = 0x02, + CABLE_PWR_OFFS = 0, + CABLE_PWR_MASK = 0x01, + + ROOT_HOLD_OFFS = 1, + ROOT_HOLD_MASK = 0x80, + BUS_RESET_OFFS = 1, + BUS_RESET_MASK = 0x40, + GAP_COUNT_OFFS = 1, + GAP_COUNT_MASK = 0x3f, + + SPEED_OFFS = 2, + SPEED_SHIFT = 6, + SPEED_MASK = 0xc0, + ENHANCED_REGS_OFFS = 2, + ENHANCED_REGS_MASK = 0x20, + NUM_PORTS_OFFS = 2, + NUM_PORTS_MASK = 0x1f, + + ASTAT1_OFFS = 3, + ASTAT1_SHIFT = 6, + ASTAT1_MASK = 0xc0, + BSTAT1_OFFS = 3, + BSTAT1_SHIFT = 4, + BSTAT1_MASK = 0x30, + CHILD1_OFFS = 3, + CHILD1_MASK = 0x08, + CONNECTION1_OFFS = 3, + CONNECTION1_MASK = 0x04, + PEER_SPEED1_OFFS = 3, + PEER_SPEED1_MASK = 0x03, + + ENV_OFFS = 4, + ENV_SHIFT = 6, + ENV_MASK = 0xc0, + REG_COUNT_OFFS = 4, + REG_COUNT_MASK = 0x3f, + + LPS_OFFS = 11, + LPS_MASK = 0x80, + PHY_DELAY_OFFS = 11, + PHY_DELAY_SHIFT = 5, + PHY_DELAY_MASK = 0x60, + CONFIG_MGR_CAP_OFFS = 11, + CONFIG_MGR_CAP_MASK = 0x10, + POWER_CLASS_OFFS = 11, + POWER_CLASS_SHIFT = 1, + POWER_CLASS_MASK = 0x0e, + + CMC_PIN_OFFS = 12, + CMC_PIN_MASK = 0x80, + CPS_INT_OFFS = 12, + CPS_INT_MASK = 0x40, + LP_TEST_ERR_OFFS = 12, + LP_TEST_ERR_MASK = 0x20, + ARB_PHASE_OFFS = 12, + ARB_PHASE_SHIFT = 3, + ARB_PHASE_MASK = 0x18, + ARB_STATE_OFFS = 12, + ARB_STATE_MASK = 0x07, + + LP_TEST_EN_OFFS = 13, + LP_TEST_EN_MASK = 0x40, + ACK_ACCEL_EN_OFFS = 13, + ACK_ACCEL_EN_MASK = 0x08, + MULTISP_CONCAT_EN_OFFS = 13, + MULTISP_CONCAT_EN_MASK = 0x02, + MASK_LPS_OFFS = 13, + MASK_LPS_MASK = 0x01, + + EN_TIMEOUT_OFFS = 14, + EN_TIMEOUT_MASK = 0x80, + IGNORE_UNPLUG_OFFS = 14, + IGNORE_UNPLUG_MASK = 0x40, + OVERRIDE_CMC_OFFS = 14, + OVERRIDE_CMC_MASK = 0x20, + SOFT_CMC_OFFS = 14, + SOFT_CMC_MASK = 0x10, + DISABLE_P1_OFFS = 14, + DISABLE_P1_MASK = 0x04, + + SOFT_POR_OFFS = 15, + SOFT_POR_MASK = 0x80, + SEND_PL_DIAG_OFFS = 15, + SEND_PL_DIAG_MASK = 0x20, + ACK_ACCEL_SYNC_OFFS = 15, + ACK_ACCEL_SYNC_MASK = 0x10, + ISBR_OFFS = 15, + ISBR_MASK = 0x08 + }; + + uint8_t m_regs[16]; +}; + +//device type definition +DECLARE_DEVICE_TYPE(IBM21S850, ibm21s850_device) + +#endif // MAME_MACHINE_IBM21S850_H diff --git a/src/devices/machine/tsb12lv01a.cpp b/src/devices/machine/tsb12lv01a.cpp new file mode 100644 index 00000000000..7b6510fc54a --- /dev/null +++ b/src/devices/machine/tsb12lv01a.cpp @@ -0,0 +1,259 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz +/************************************************************* + + Texas Instruments TSB12LV01A/TSB12LV01AI IEEE 1394-1995 + High-Speed Serial-Bus Link-Layer Controller + + Skeleton device + +**************************************************************/ + +#include "emu.h" +#include "tsb12lv01a.h" + +#define LOG_READS (1 << 1) +#define LOG_WRITES (1 << 2) +#define LOG_UNKNOWNS (1 << 3) +#define LOG_ALL (LOG_READS | LOG_WRITES | LOG_UNKNOWNS) + +#define VERBOSE (0) +#include "logmacro.h" + +DEFINE_DEVICE_TYPE(TSB12LV01A, tsb12lv01a_device, "tsb12lv01a", "TSB12LV01A IEEE 1394 Link Controller") + +tsb12lv01a_device::tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, TSB12LV01A, tag, owner, clock) + , m_int_cb(*this) + , m_phy_read_cb(*this) + , m_phy_write_cb(*this) +{ +} + +void tsb12lv01a_device::device_start() +{ + save_item(NAME(m_version)); + save_item(NAME(m_node_address)); + save_item(NAME(m_ctrl)); + save_item(NAME(m_int_status)); + save_item(NAME(m_int_mask)); + save_item(NAME(m_cycle_timer)); + save_item(NAME(m_isoch_port_num)); + save_item(NAME(m_fifo_ctrl)); + save_item(NAME(m_diag_ctrl)); + save_item(NAME(m_phy_access)); + save_item(NAME(m_atf_status)); + save_item(NAME(m_itf_status)); + save_item(NAME(m_grf_status)); + + m_int_cb.resolve_safe(); + m_phy_read_cb.resolve_safe(0x00); + m_phy_write_cb.resolve_safe(); +} + +void tsb12lv01a_device::device_reset() +{ + m_version = 0x30313042; + m_node_address = 0xffff0000; + m_ctrl = 0x00000000; + m_int_status = 0x10000000; + m_int_mask = 0x00000000; + m_cycle_timer = 0x00000000; + m_isoch_port_num = 0x00000000; + m_fifo_ctrl = 0x00000000; + m_diag_ctrl = 0x00000000; + m_phy_access = 0x00000000; + m_atf_status = 0x00000000; + m_itf_status = 0x00000000; + m_grf_status = 0x00000000; +} + +void tsb12lv01a_device::set_interrupt(uint32_t bit) +{ + m_int_status |= bit; + check_interrupts(); +} + +void tsb12lv01a_device::check_interrupts() +{ + if (m_int_status & 0x7fffffff) + { + m_int_status |= INT_INT; + } + const uint32_t active_bits = m_int_status & m_int_mask; + m_int_cb((active_bits & INT_INT) ? 1 : 0); +} + +void tsb12lv01a_device::reset_tx() +{ + // TODO + set_interrupt(INT_TXRDY); +} + +void tsb12lv01a_device::reset_rx() +{ +} + +void tsb12lv01a_device::clear_atf() +{ + const uint32_t atf_size = (m_fifo_ctrl & FIFO_CTRL_ATF_SIZE_MASK) >> FIFO_CTRL_ATF_SIZE_SHIFT; + m_atf_status &= ~(ATF_STATUS_FULL | ATF_STATUS_CONERR | ATF_STATUS_ADRCOUNTER_MASK | ATF_STATUS_ATFSPACE_MASK); + m_atf_status |= ATF_STATUS_EMPTY; + m_atf_status |= (atf_size << ATF_STATUS_ATFSPACE_SHIFT); +} + +void tsb12lv01a_device::clear_itf() +{ + const uint32_t itf_size = (m_fifo_ctrl & FIFO_CTRL_ITF_SIZE_MASK) >> FIFO_CTRL_ITF_SIZE_SHIFT; + m_itf_status &= ~(ITF_STATUS_FULL | ITF_STATUS_ITFSPACE_MASK); + m_itf_status |= ITF_STATUS_EMPTY; + m_itf_status |= (itf_size << ITF_STATUS_ITFSPACE_SHIFT); +} + +void tsb12lv01a_device::clear_grf() +{ + const uint32_t atf_size = (m_fifo_ctrl & FIFO_CTRL_ATF_SIZE_MASK) >> FIFO_CTRL_ATF_SIZE_SHIFT; + const uint32_t itf_size = (m_fifo_ctrl & FIFO_CTRL_ITF_SIZE_MASK) >> FIFO_CTRL_ITF_SIZE_SHIFT; + const uint32_t grf_size = 0x200 - (atf_size + itf_size); + m_grf_status &= ~(GRF_STATUS_CD | GRF_STATUS_PACCOM | GRF_STATUS_GRFTOTAL_MASK | GRF_STATUS_WRITECOUNT_MASK); + m_grf_status |= GRF_STATUS_EMPTY; + m_grf_status |= grf_size << GRF_STATUS_GRFSIZE_SHIFT; +} + +uint32_t tsb12lv01a_device::read(offs_t offset) +{ + switch (offset) + { + case 0x00: + LOGMASKED(LOG_READS, "%s: TSB12 Version register read: %08x\n", machine().describe_context(), m_version); + return m_version; + case 0x04: + LOGMASKED(LOG_READS, "%s: TSB12 Node Address register read: %08x\n", machine().describe_context(), m_node_address); + return m_node_address; + case 0x08: + LOGMASKED(LOG_READS, "%s: TSB12 Control register read: %08x\n", machine().describe_context(), m_ctrl); + return m_ctrl; + case 0x0c: + LOGMASKED(LOG_READS, "%s: TSB12 Interrupt Status register read: %08x\n", machine().describe_context(), m_int_status); + return m_int_status; + case 0x10: + LOGMASKED(LOG_READS, "%s: TSB12 Interrupt Mask register read: %08x\n", machine().describe_context(), m_int_mask); + return m_int_mask; + case 0x14: + LOGMASKED(LOG_READS, "%s: TSB12 Cycle Timer register read: %08x\n", machine().describe_context(), m_cycle_timer); + return m_cycle_timer; + case 0x18: + LOGMASKED(LOG_READS, "%s: TSB12 Isochronous Receive-Port Number register read: %08x\n", machine().describe_context(), m_isoch_port_num); + return m_isoch_port_num; + case 0x1c: + LOGMASKED(LOG_READS, "%s: TSB12 FIFO Control register read: %08x\n", machine().describe_context(), m_fifo_ctrl); + return m_fifo_ctrl; + case 0x20: + LOGMASKED(LOG_READS, "%s: TSB12 Diagnostic Control register read: %08x\n", machine().describe_context(), m_diag_ctrl); + return m_diag_ctrl; + case 0x24: + LOGMASKED(LOG_READS, "%s: TSB12 Phy-Chip Access register read: %08x\n", machine().describe_context(), m_phy_access); + return m_phy_access; + case 0x30: + LOGMASKED(LOG_READS, "%s: TSB12 Asynchronous Transmit-FIFO (ATF) register read: %08x\n", machine().describe_context(), m_atf_status); + return m_atf_status; + case 0x34: + LOGMASKED(LOG_READS, "%s: TSB12 Isochronous Transmit-FIFO (ITF) register read: %08x\n", machine().describe_context(), m_itf_status); + return m_itf_status; + case 0x3c: + LOGMASKED(LOG_READS, "%s: TSB12 General Receive-FIFO (GRF) register read: %08x\n", machine().describe_context(), m_grf_status); + return m_grf_status; + default: + LOGMASKED(LOG_READS | LOG_UNKNOWNS, "%s: TSB12 Unknown read: %08x\n", machine().describe_context(), offset << 2); + return 0; + } +} + +void tsb12lv01a_device::write(offs_t offset, uint32_t data, uint32_t mem_mask) +{ + switch (offset) + { + case 0x00: + LOGMASKED(LOG_WRITES, "%s: TSB12 Version register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x04: + LOGMASKED(LOG_WRITES, "%s: TSB12 Node Address register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x08: + LOGMASKED(LOG_WRITES, "%s: TSB12 Control register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + if (data & CTRL_RSTTX) + { + data &= ~CTRL_RSTTX; + reset_tx(); + } + if (data & CTRL_RSTRX) + { + data &= ~CTRL_RSTRX; + reset_rx(); + } + COMBINE_DATA(&m_ctrl); + break; + case 0x0c: + LOGMASKED(LOG_WRITES, "%s: TSB12 Interrupt Status register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + m_int_status &= ~m_int_status; + check_interrupts(); + break; + case 0x10: + LOGMASKED(LOG_WRITES, "%s: TSB12 Interrupt Mask register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x14: + LOGMASKED(LOG_WRITES, "%s: TSB12 Cycle Timer register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x18: + LOGMASKED(LOG_WRITES, "%s: TSB12 Isochronous Receive-Port Number register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x1c: + LOGMASKED(LOG_WRITES, "%s: TSB12 FIFO Control register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + m_fifo_ctrl &= ~FIFO_CTRL_RW_BITS; + m_fifo_ctrl |= data & FIFO_CTRL_RW_BITS; + if (data & FIFO_CTRL_CLRATF) + clear_atf(); + if (data & FIFO_CTRL_CLRITF) + clear_itf(); + if (data & FIFO_CTRL_CLRGRF) + clear_grf(); + break; + case 0x20: + LOGMASKED(LOG_WRITES, "%s: TSB12 Diagnostic Control register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x24: + LOGMASKED(LOG_WRITES, "%s: TSB12 Phy-Chip Access register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + if (data & PHY_WRPHY) + { + const uint8_t phy_addr = (data & PHY_PHYRGAD_MASK) >> PHY_PHYRGAD_SHIFT; + const uint8_t phy_data = (data & PHY_PHYRGDATA_MASK) >> PHY_PHYRGDATA_SHIFT; + m_phy_write_cb(phy_addr, phy_data); + } + if (data & PHY_RDPHY) + { + const uint8_t phy_addr = (data & PHY_PHYRGAD_MASK) >> PHY_PHYRGAD_SHIFT; + m_phy_access &= ~PHY_PHYRXAD_MASK; + m_phy_access |= phy_addr << PHY_PHYRXAD_SHIFT; + m_phy_access &= ~PHY_PHYRXDATA_MASK; + m_phy_access |= m_phy_read_cb(phy_addr); + + m_int_status |= INT_PHYRRX; + check_interrupts(); + } + m_phy_access &= ~(PHY_PHYRXDATA_MASK | PHY_PHYRXAD_MASK); + m_phy_access |= data & (PHY_PHYRGAD_MASK | PHY_PHYRGDATA_MASK); + break; + case 0x30: + LOGMASKED(LOG_WRITES, "%s: TSB12 Asynchronous Transmit-FIFO (ATF) register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x34: + LOGMASKED(LOG_WRITES, "%s: TSB12 Isochronous Transmit-FIFO (ITF) register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + case 0x3c: + LOGMASKED(LOG_WRITES, "%s: TSB12 General Receive-FIFO (GRF) register write: %08x & %08x\n", machine().describe_context(), data, mem_mask); + break; + default: + LOGMASKED(LOG_WRITES | LOG_UNKNOWNS, "%s: TSB12 Unknown write: %08x = %08x & %08x\n", machine().describe_context(), offset << 2, data, mem_mask); + break; + } +} \ No newline at end of file diff --git a/src/devices/machine/tsb12lv01a.h b/src/devices/machine/tsb12lv01a.h new file mode 100644 index 00000000000..36529e94fa4 --- /dev/null +++ b/src/devices/machine/tsb12lv01a.h @@ -0,0 +1,193 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz +/************************************************************* + + Texas Instruments TSB12LV01A/TSB12LV01AI IEEE 1394-1995 + High-Speed Serial-Bus Link-Layer Controller + + Skeleton device + +**************************************************************/ + +#ifndef MAME_MACHINE_TSB12LV01A_H +#define MAME_MACHINE_TSB12LV01A_H + +#pragma once + +class tsb12lv01a_device : public device_t +{ +public: + tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + uint32_t read(offs_t offset); + void write(offs_t offset, uint32_t data, uint32_t mem_mask); + + auto int_cb() { return m_int_cb.bind(); } + auto phy_read() { return m_phy_read_cb.bind(); } + auto phy_write() { return m_phy_write_cb.bind(); } + +private: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + void set_interrupt(uint32_t bit); + void check_interrupts(); + + void reset_tx(); + void reset_rx(); + + void clear_atf(); + void clear_itf(); + void clear_grf(); + + enum + { + NODE_ADDR_BUSNUM_SHIFT = 22, + NODE_ADDR_BUSNUM_MASK = 0xffc00000, + NODE_ADDR_NODENUM_SHIFT = 16, + NODE_ADDR_NODENUM_MASK = 0x003f0000, + NODE_ADDR_ROOT = 0x8000, + NODE_ADDR_ATACK_SHIFT = 4, + NODE_ADDR_ATACK_MASK = 0x000001f0, + NODE_ADDR_ACKV = 0x00000001, + + CTRL_IDVAL = 0x80000000, + CTRL_RXSID = 0x40000000, + CTRL_BSYCTRL = 0x20000000, + CTRL_RAI = 0x10000000, + CTRL_RCVCYST = 0x08000000, + CTRL_TXAEN = 0x04000000, + CTRL_RXAEN = 0x02000000, + CTRL_TXIEN = 0x01000000, + CTRL_RXIEN = 0x00800000, + CTRL_ACKCEN = 0x00400000, + CTRL_RSTTX = 0x00200000, + CTRL_RSTRX = 0x00100000, + CTRL_CYMAS = 0x00000800, + CTRL_CYSRC = 0x00000400, + CTRL_CYTEN = 0x00000200, + CTRL_TRGEN = 0x00000100, + CTRL_IRP1EN = 0x00000080, + CTRL_IRP2EN = 0x00000040, + CTRL_FHBAD = 0x00000001, + CTRL_RW_BITS = CTRL_IDVAL | CTRL_RXSID | CTRL_BSYCTRL | CTRL_RAI | CTRL_RCVCYST | + CTRL_TXAEN | CTRL_RXAEN | CTRL_TXIEN | CTRL_RXIEN | CTRL_ACKCEN | + CTRL_CYMAS | CTRL_CYSRC | CTRL_CYTEN | CTRL_TRGEN | CTRL_IRP1EN | + CTRL_IRP2EN | CTRL_FHBAD, + + INT_INT = 0x80000000, + INT_PHINT = 0x40000000, + INT_PHYRRX = 0x20000000, + INT_PHRST = 0x10000000, + INT_SIDCOMP = 0x08000000, + INT_TXRDY = 0x04000000, + INT_RXDTA = 0x02000000, + INT_CMDRST = 0x01000000, + INT_ACKRCV = 0x00800000, + INT_ITBADF = 0x00100000, + INT_ATBADF = 0x00080000, + INT_SNTRJ = 0x00020000, + INT_HDRDR = 0x00010000, + INT_TCERR = 0x00008000, + INT_CYTMOUT = 0x00001000, + INT_CYSEC = 0x00000800, + INT_CYST = 0x00000400, + INT_CYDNE = 0x00000200, + INT_CYPND = 0x00000100, + INT_CYLST = 0x00000080, + INT_CARBFL = 0x00000040, + INT_ARBGP = 0x00000004, + INT_FRGP = 0x00000002, + INT_IARBFL = 0x00000001, + + CYTMR_SEC_COUNT_SHIFT = 25, + CYTMR_SEC_COUNT_MASK = 0xfe000000, + CYTMR_CYC_COUNT_SHIFT = 12, + CYTMR_CYC_COUNT_MASK = 0x01fff000, + CYTMR_CYC_OFFSET_SHIFT = 0, + CYTMR_CYC_OFFSET_MASK = 0x00000fff, + + ISOCH_PORT_TAG_SHIFT = 30, + ISOCH_PORT_TAG_MASK = 0xc0000000, + ISOCH_PORT_IRPORT1_SHIFT = 24, + ISOCH_PORT_IRPORT1_MASK = 0x3f000000, + ISOCH_PORT_TAG2_SHIFT = 22, + ISOCH_PORT_TAG2_MASK = 0x00c00000, + ISOCH_PORT_IRPORT2_SHIFT = 16, + ISOCH_PORT_IRPORT2_MASK = 0x003f0000, + ISOCH_PORT_MON_TAG = 0x00000001, + + FIFO_CTRL_CLRATF = 0x80000000, + FIFO_CTRL_CLRITF = 0x40000000, + FIFO_CTRL_CLRGRF = 0x20000000, + FIFO_CTRL_TRIG_SIZE_SHIFT = 18, + FIFO_CTRL_TRIG_SIZE_MASK = 0x07fc0000, + FIFO_CTRL_ATF_SIZE_SHIFT = 9, + FIFO_CTRL_ATF_SIZE_MASK = 0x0003fe00, + FIFO_CTRL_ITF_SIZE_SHIFT = 0, + FIFO_CTRL_ITF_SIZE_MASK = 0x000001ff, + FIFO_CTRL_RW_BITS = (FIFO_CTRL_TRIG_SIZE_MASK | FIFO_CTRL_ATF_SIZE_MASK | FIFO_CTRL_ITF_SIZE_MASK), + + PHY_RDPHY = 0x80000000, + PHY_WRPHY = 0x40000000, + PHY_PHYRGAD_SHIFT = 24, + PHY_PHYRGAD_MASK = 0x0f000000, + PHY_PHYRGDATA_SHIFT = 16, + PHY_PHYRGDATA_MASK = 0x00ff0000, + PHY_PHYRXAD_SHIFT = 8, + PHY_PHYRXAD_MASK = 0x00000f00, + PHY_PHYRXDATA_SHIFT = 0, + PHY_PHYRXDATA_MASK = 0x000000ff, + PHY_RW_BITS = 0x0fff0fff, + + ATF_STATUS_FULL = 0x80000000, + ATF_STATUS_EMPTY = 0x40000000, + ATF_STATUS_CONERR = 0x20000000, + ATF_STATUS_ADRCLR = 0x10000000, + ATF_STATUS_CONTROL = 0x08000000, + ATF_STATUS_RAMTEST = 0x04000000, + ATF_STATUS_ADRCOUNTER_SHIFT = 17, + ATF_STATUS_ADRCOUNTER_MASK = 0x03fe0000, + ATF_STATUS_ATFSPACE_SHIFT = 0, + ATF_STATUS_ATFSPACE_MASK = 0x000001ff, + + ITF_STATUS_FULL = 0x80000000, + ITF_STATUS_EMPTY = 0x40000000, + ITF_STATUS_ITFSPACE_SHIFT = 0, + ITF_STATUS_ITFSPACE_MASK = 0x000001ff, + + GRF_STATUS_EMPTY = 0x80000000, + GRF_STATUS_CD = 0x40000000, + GRF_STATUS_PACCOM = 0x20000000, + GRF_STATUS_GRFTOTAL_SHIFT = 19, + GRF_STATUS_GRFTOTAL_MASK = 0x1ff80000, + GRF_STATUS_GRFSIZE_SHIFT = 9, + GRF_STATUS_GRFSIZE_MASK = 0x0007fe00, + GRF_STATUS_WRITECOUNT_SHIFT = 0, + GRF_STATUS_WRITECOUNT_MASK = 0x000001ff + }; + + uint32_t m_version; + uint32_t m_node_address; + uint32_t m_ctrl; + uint32_t m_int_status; + uint32_t m_int_mask; + uint32_t m_cycle_timer; + uint32_t m_isoch_port_num; + uint32_t m_fifo_ctrl; + uint32_t m_diag_ctrl; + uint32_t m_phy_access; + uint32_t m_atf_status; + uint32_t m_itf_status; + uint32_t m_grf_status; + + devcb_write_line m_int_cb; + devcb_read8 m_phy_read_cb; + devcb_write8 m_phy_write_cb; +}; + +//device type definition +DECLARE_DEVICE_TYPE(TSB12LV01A, tsb12lv01a_device) + +#endif // MAME_MACHINE_TSB12LV01A_H diff --git a/src/mame/drivers/midzeus.cpp b/src/mame/drivers/midzeus.cpp index bf53f5cbd33..dca73ff92e4 100644 --- a/src/mame/drivers/midzeus.cpp +++ b/src/mame/drivers/midzeus.cpp @@ -27,17 +27,21 @@ The Grid v1.2 10/18/2000 **************************************************************************/ #include "emu.h" +#include "audio/dcs.h" + #include "cpu/tms32031/tms32031.h" #include "cpu/adsp2100/adsp2100.h" #include "cpu/pic16c5x/pic16c5x.h" + #include "includes/midzeus.h" -#include "audio/dcs.h" +#include "machine/ibm21s850.h" #include "machine/nvram.h" +#include "machine/tsb12lv01a.h" #include "crusnexo.lh" -#define LOG_FW (0) +#define LOG_FW (0) #define CPU_CLOCK XTAL(60'000'000) @@ -52,6 +56,8 @@ public: midzeus2_state(const machine_config &mconfig, device_type type, const char *tag) : midzeus_state(mconfig, type, tag) , m_zeus(*this, "zeus2") + , m_fw_link(*this, "fw_link") + , m_fw_phy(*this, "fw_phy") , m_leds(*this, "led%u", 0U) , m_lamps(*this, "lamp%u", 0U) { } @@ -64,21 +70,49 @@ public: void init_thegrid(); private: + virtual void machine_start() override + { + midzeus_state::machine_start(); + + m_leds.resolve(); + m_lamps.resolve(); + + save_item(NAME(m_disk_asic)); + save_item(NAME(m_fw_int_enable)); + save_item(NAME(m_fw_int)); + } + + virtual void machine_reset() override + { + midzeus_state::machine_reset(); + + memset(m_disk_asic, 0x0, 0x10 * 4); + m_fw_int_enable = 0; + m_fw_int = 0; + } + + virtual void video_start() override {} + + void zeus2_map(address_map &map); + + uint32_t disk_asic_r(offs_t offset); + void disk_asic_w(offs_t offset, uint32_t data); + + DECLARE_WRITE_LINE_MEMBER(firewire_irq); DECLARE_WRITE_LINE_MEMBER(zeus_irq); + uint32_t zeus2_timekeeper_r(offs_t offset); void zeus2_timekeeper_w(offs_t offset, uint32_t data); uint32_t crusnexo_leds_r(offs_t offset); void crusnexo_leds_w(offs_t offset, uint32_t data); - void zeus2_map(address_map &map); - virtual void machine_start() override - { - MACHINE_START_CALL_MEMBER(midzeus); - m_leds.resolve(); - m_lamps.resolve(); - } + uint32_t m_disk_asic[0x10]; + int m_fw_int_enable; + int m_fw_int; required_device m_zeus; + required_device m_fw_link; + required_device m_fw_phy; output_finder<32> m_leds; output_finder<8> m_lamps; }; @@ -91,37 +125,38 @@ private: * *************************************/ -MACHINE_START_MEMBER(midzeus_state,midzeus) +void midzeus_state::machine_start() { m_digits.resolve(); - timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate()); - timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate()); + m_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate()); + m_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate()); - gun_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(midzeus_state::invasn_gun_callback), this)); - gun_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(midzeus_state::invasn_gun_callback), this)); + m_gun_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(midzeus_state::invasn_gun_callback), this)); + m_gun_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(midzeus_state::invasn_gun_callback), this)); m_display_irq_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(midzeus_state::display_irq_off), this)); - save_item(NAME(gun_control)); - save_item(NAME(gun_irq_state)); - save_item(NAME(gun_x)); - save_item(NAME(gun_y)); - save_item(NAME(crusnexo_leds_select)); - save_item(NAME(keypad_select)); + save_item(NAME(m_crusnexo_leds_select)); + save_item(NAME(m_disk_asic_jr)); + save_item(NAME(m_cmos_protected)); + save_item(NAME(m_gun_control)); + save_item(NAME(m_gun_irq_state)); + save_item(NAME(m_gun_x)); + save_item(NAME(m_gun_y)); + save_item(NAME(m_keypad_select)); } -MACHINE_RESET_MEMBER(midzeus_state,midzeus) +void midzeus_state::machine_reset() { memcpy(m_ram_base, memregion("user1")->base(), 0x40000*4); *m_ram_base <<= 1; m_maincpu->reset(); - cmos_protected = true; - memset(disk_asic_jr, 0x0, 0x10 * 4); - disk_asic_jr[6] = 0xa0; // Rev3 Athens - memset(disk_asic, 0x0, 0x10 * 4); + m_cmos_protected = true; + memset(m_disk_asic_jr, 0x0, 0x10 * 4); + m_disk_asic_jr[6] = 0xa0; // Rev3 Athens } @@ -134,18 +169,18 @@ MACHINE_RESET_MEMBER(midzeus_state,midzeus) TIMER_CALLBACK_MEMBER(midzeus_state::display_irq_off) { - m_maincpu->set_input_line(0, CLEAR_LINE); + m_maincpu->set_input_line(TMS3203X_IRQ0, CLEAR_LINE); } INTERRUPT_GEN_MEMBER(midzeus_state::display_irq) { - device.execute().set_input_line(0, ASSERT_LINE); + m_maincpu->set_input_line(TMS3203X_IRQ0, ASSERT_LINE); m_display_irq_off_timer->adjust(attotime::from_hz(30000000)); } WRITE_LINE_MEMBER(midzeus2_state::zeus_irq) { - m_maincpu->set_input_line(2, ASSERT_LINE); + m_maincpu->set_input_line(TMS3203X_IRQ2, ASSERT_LINE); } @@ -157,11 +192,11 @@ WRITE_LINE_MEMBER(midzeus2_state::zeus_irq) void midzeus_state::cmos_w(offs_t offset, uint32_t data, uint32_t mem_mask) { - if (disk_asic_jr[2] && !cmos_protected) + if (m_disk_asic_jr[2] && !m_cmos_protected) COMBINE_DATA(&m_nvram[offset]); else - logerror("%06X:timekeeper_w with disk_asic_jr[2] = %d, cmos_protected = %d\n", m_maincpu->pc(), disk_asic_jr[2], cmos_protected); - cmos_protected = true; + logerror("%06X:timekeeper_w with disk_asic_jr[2] = %d, cmos_protected = %d\n", m_maincpu->pc(), m_disk_asic_jr[2], m_cmos_protected); + m_cmos_protected = true; } @@ -173,7 +208,7 @@ uint32_t midzeus_state::cmos_r(offs_t offset) void midzeus_state::cmos_protect_w(uint32_t data) { - cmos_protected = false; + m_cmos_protected = false; } @@ -192,11 +227,11 @@ uint32_t midzeus2_state::zeus2_timekeeper_r(offs_t offset) void midzeus2_state::zeus2_timekeeper_w(offs_t offset, uint32_t data) { - if (disk_asic_jr[2] && !cmos_protected) + if (m_disk_asic_jr[2] && !m_cmos_protected) m_m48t35->write(offset, data); else - logerror("%s:zeus2_timekeeper_w with disk_asic_jr[2] = %d, cmos_protected = %d\n", machine().describe_context(), disk_asic_jr[2], cmos_protected); - cmos_protected = true; + logerror("%s:zeus2_timekeeper_w with disk_asic_jr[2] = %d, cmos_protected = %d\n", machine().describe_context(), m_disk_asic_jr[2], m_cmos_protected); + m_cmos_protected = true; } @@ -208,10 +243,10 @@ uint32_t midzeus_state::zpram_r(offs_t offset) void midzeus_state::zpram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { - if (disk_asic_jr[2]) + if (m_disk_asic_jr[2]) COMBINE_DATA(&m_nvram[offset]); else - logerror("%06X:zpram_w with disk_asic_jr[2] = %d\n", m_maincpu->pc(), disk_asic_jr[2]); + logerror("%06X:zpram_w with disk_asic_jr[2] = %d\n", m_maincpu->pc(), m_disk_asic_jr[2]); } @@ -221,9 +256,10 @@ void midzeus_state::zpram_w(offs_t offset, uint32_t data, uint32_t mem_mask) * Disk ASIC registers * *************************************/ -uint32_t midzeus_state::disk_asic_r(offs_t offset) + +uint32_t midzeus2_state::disk_asic_r(offs_t offset) { - uint32_t retVal = disk_asic[offset]; + uint32_t retVal = m_disk_asic[offset]; switch (offset) { // Sys Control @@ -237,7 +273,7 @@ uint32_t midzeus_state::disk_asic_r(offs_t offset) // 0x004: IFIFO Interrupt // 0x200: Firewire case 1: - retVal = 0x0; + retVal = (m_fw_int << 9); break; // Test case 2: @@ -260,9 +296,9 @@ uint32_t midzeus_state::disk_asic_r(offs_t offset) } -void midzeus_state::disk_asic_w(offs_t offset, uint32_t data) +void midzeus2_state::disk_asic_w(offs_t offset, uint32_t data) { - disk_asic[offset] = data; + m_disk_asic[offset] = data; switch (offset) { @@ -275,6 +311,7 @@ void midzeus_state::disk_asic_w(offs_t offset, uint32_t data) // 0x004: IFIFO Interrupt // 0x200: Enable Firewire interrupt case 1: + m_fw_int_enable = BIT(data, 9); break; // Test case 2: @@ -302,7 +339,7 @@ void midzeus_state::disk_asic_w(offs_t offset, uint32_t data) *************************************/ uint32_t midzeus_state::disk_asic_jr_r(offs_t offset) { - uint32_t retVal = disk_asic_jr[offset]; + uint32_t retVal = m_disk_asic_jr[offset]; switch (offset) { // miscellaneous hw wait states @@ -311,16 +348,16 @@ uint32_t midzeus_state::disk_asic_jr_r(offs_t offset) /* CMOS/ZPRAM write enable; only low bit is used */ case 2: break; - // return disk_asic_jr[offset] | ~1; + // return m_disk_asic_jr[offset] | ~1; /* reset status; bit 0 is watchdog reset; mk4/invasn/thegrid read at startup; invasn freaks if it is 1 at startup */ case 3: break; - // return disk_asic_jr[offset] | ~1; + // return m_disk_asic_jr[offset] | ~1; /* ROM bank selection on Zeus 2; two bits are used */ case 5: - // return disk_asic_jr[offset] | ~3; + // return m_disk_asic_jr[offset] | ~3; /* disk asic jr id; crusnexo reads at startup: if (val & 0xf0) == 0xa0 it affects */ /* how the Zeus is used (reg 0x5d is set to 0x54580006) */ @@ -343,8 +380,8 @@ uint32_t midzeus_state::disk_asic_jr_r(offs_t offset) void midzeus_state::disk_asic_jr_w(offs_t offset, uint32_t data) { - //uint32_t oldval = disk_asic_jr[offset]; - disk_asic_jr[offset] = data; + //uint32_t oldval = m_disk_asic_jr[offset]; + m_disk_asic_jr[offset] = data; switch (offset) { @@ -376,7 +413,7 @@ void midzeus_state::disk_asic_jr_w(offs_t offset, uint32_t data) /* ROM bank selection on Zeus 2 */ case 5: - membank("bank1")->set_entry(disk_asic_jr[offset] & 3); + membank("bank1")->set_entry(m_disk_asic_jr[offset] & 3); break; /* zeus2 ws; 0=zeus access 1 wait state, 2=unlock ROMs; crusnexo/thegrid write 1 at startup */ @@ -436,18 +473,18 @@ void midzeus2_state::crusnexo_leds_w(offs_t offset, uint32_t data) /* selection bits 4-6 select the 3 7-segment LEDs */ for (bit = 4; bit < 7; bit++) - if ((crusnexo_leds_select & (1 << bit)) == 0) + if ((m_crusnexo_leds_select & (1 << bit)) == 0) m_digits[bit] = ~data & 0xff; /* selection bits 0-2 select the tachometer LEDs */ for (bit = 0; bit < 3; bit++) - if ((crusnexo_leds_select & (1 << bit)) == 0) + if ((m_crusnexo_leds_select & (1 << bit)) == 0) for (led = 0; led < 8; led++) m_leds[bit * 8 + led] = BIT(~data, led); break; case 3: /* selects which set of LEDs we are addressing */ - crusnexo_leds_select = data; + m_crusnexo_leds_select = data; break; } } @@ -462,76 +499,12 @@ void midzeus2_state::crusnexo_leds_w(offs_t offset, uint32_t data) * *************************************/ -uint32_t midzeus_state::firewire_r(offs_t offset) +WRITE_LINE_MEMBER(midzeus2_state::firewire_irq) { - uint32_t retVal = 0; - if (offset < 0x40) - retVal = m_firewire[offset / 4]; - - switch (offset) { - case 0: - // Version - retVal = 0x30313042; - break; - case 0x0c: - // Interrupt - retVal = 0xf4000000;// &m_firewire[0x10 / 4]; - break; - case 0x30: - // Asynchronous Transmit FIFO Status - // 8:0 space available - retVal = 0x1ff; - break; - case 0x3c: - // General Rx FIFO Status - // 0x80000000 = Empty - // 0x40000000 = Control Data - // 0x20000000 = Packet Complete - retVal = 0x80000000; - break; - case 0xc0: - // General Rx FIFO - retVal = 0x0; - break; - } - if LOG_FW logerror("%06X:firewire_r(%02X)=%08X\n", m_maincpu->pc(), offset, retVal); - return retVal; + m_fw_int = state; + m_maincpu->set_input_line(TMS3203X_IRQ1, (m_fw_int_enable && m_fw_int) ? ASSERT_LINE : CLEAR_LINE); } -void midzeus_state::firewire_w(offs_t offset, uint32_t data, uint32_t mem_mask) -{ - // 0x08 // Control - // Bit 0: Flush bad packets from Rx FIFO - // Bit 6: IRP2En - // Bit 7: IRP1En - // Bit 8: TrgEn - // Bit 20: Reset Rx - // Bit 21: Reset Tx - // Bit 22: Enable Acknowledge - // Bit 23: Iso Rx Enable - // Bit 24: Iso Rx Enable - // Bit 25: Async Rx Enable - // Bit 26: Async Tx Enable - // Bit 30: Rx Self ID packets - // Bit 31: Rx Packets addressed to phy - // 0x00200000 Reset Tx - // 0x00100000 Reset Rx - // 0x1c // FIFO Control - // Bit 0:8: ITF Size - // Bit 9:17: ATF Size - // Bit 18:26 Trigger Size - // Bit 29: Clear GRF - // Bit 32: Clear ATF - // 0x20 // Diagnostics - // Bit 31: Enable Snooping - - if (offset < 0x40) - COMBINE_DATA(&m_firewire[offset / 4]); - if LOG_FW logerror("%06X:firewire_w(%02X) = %08X\n", m_maincpu->pc(), offset, data); -} - - - /************************************* * * TMS32031 I/O accesses @@ -545,7 +518,7 @@ uint32_t midzeus_state::tms32031_control_r(offs_t offset) { /* timer is clocked at 100ns */ int which = (offset >> 4) & 1; - int32_t result = (timer[which]->elapsed() * 10000000).as_double(); + int32_t result = (m_timer[which]->elapsed() * 10000000).as_double(); return result; } @@ -570,7 +543,7 @@ void midzeus_state::tms32031_control_w(offs_t offset, uint32_t data, uint32_t me { int which = (offset >> 4) & 1; if (data & 0x40) - timer[which]->adjust(attotime::never); + m_timer[which]->adjust(attotime::never); } else logerror("%06X:tms32031_control_w(%02X) = %08X\n", m_maincpu->pc(), offset, data); @@ -594,14 +567,14 @@ CUSTOM_INPUT_MEMBER(midzeus_state::custom_49way_r) void midzeus_state::keypad_select_w(offs_t offset, uint32_t data) { if (offset == 1) - keypad_select = data; + m_keypad_select = data; } CUSTOM_INPUT_MEMBER(midzeus_state::keypad_r) { uint32_t bits = m_io_keypad->read(); - uint8_t select = keypad_select; + uint8_t select = m_keypad_select; while ((select & 1) != 0) { select >>= 1; @@ -656,10 +629,10 @@ void midzeus_state::analog_w(uint32_t data) void midzeus_state::update_gun_irq() { /* low 2 bits of gun_control seem to enable IRQs */ - if (gun_irq_state & gun_control & 0x03) - m_maincpu->set_input_line(3, ASSERT_LINE); + if (m_gun_irq_state & m_gun_control & 0x03) + m_maincpu->set_input_line(TMS3203X_IRQ3, ASSERT_LINE); else - m_maincpu->set_input_line(3, CLEAR_LINE); + m_maincpu->set_input_line(TMS3203X_IRQ3, CLEAR_LINE); } @@ -669,37 +642,37 @@ TIMER_CALLBACK_MEMBER(midzeus_state::invasn_gun_callback) int beamy = m_screen->vpos(); /* set the appropriate IRQ in the internal gun control and update */ - gun_irq_state |= 0x01 << player; + m_gun_irq_state |= 0x01 << player; update_gun_irq(); /* generate another interrupt on the next scanline while we are within the BEAM_DY */ beamy++; - if (beamy <= m_screen->visible_area().max_y && beamy <= gun_y[player] + BEAM_DY) - gun_timer[player]->adjust(m_screen->time_until_pos(beamy, std::max(0, gun_x[player] - BEAM_DX)), player); + if (beamy <= m_screen->visible_area().max_y && beamy <= m_gun_y[player] + BEAM_DY) + m_gun_timer[player]->adjust(m_screen->time_until_pos(beamy, std::max(0, m_gun_x[player] - BEAM_DX)), player); } void midzeus_state::invasn_gun_w(offs_t offset, uint32_t data, uint32_t mem_mask) { - uint32_t old_control = gun_control; + uint32_t old_control = m_gun_control; int player; - COMBINE_DATA(&gun_control); + COMBINE_DATA(&m_gun_control); /* bits 0-1 enable IRQs (?) */ /* bits 2-3 reset IRQ states */ - gun_irq_state &= ~((gun_control >> 2) & 3); + m_gun_irq_state &= ~((m_gun_control >> 2) & 3); update_gun_irq(); for (player = 0; player < 2; player++) { uint8_t pmask = 0x04 << player; - if (((old_control ^ gun_control) & pmask) != 0 && (gun_control & pmask) == 0) + if (((old_control ^ m_gun_control) & pmask) != 0 && (m_gun_control & pmask) == 0) { const rectangle &visarea = m_screen->visible_area(); - gun_x[player] = m_io_gun_x[player]->read() * visarea.width() / 255 + visarea.min_x + BEAM_XOFFS; - gun_y[player] = m_io_gun_y[player]->read() * visarea.height() / 255 + visarea.min_y; - gun_timer[player]->adjust(m_screen->time_until_pos(std::max(0, gun_y[player] - BEAM_DY), std::max(0, gun_x[player] - BEAM_DX)), player); + m_gun_x[player] = m_io_gun_x[player]->read() * visarea.width() / 255 + visarea.min_x + BEAM_XOFFS; + m_gun_y[player] = m_io_gun_y[player]->read() * visarea.height() / 255 + visarea.min_y; + m_gun_timer[player]->adjust(m_screen->time_until_pos(std::max(0, m_gun_y[player] - BEAM_DY), std::max(0, m_gun_x[player] - BEAM_DX)), player); } } } @@ -714,8 +687,8 @@ uint32_t midzeus_state::invasn_gun_r() for (player = 0; player < 2; player++) { - int diffx = beamx - gun_x[player]; - int diffy = beamy - gun_y[player]; + int diffx = beamx - m_gun_x[player]; + int diffy = beamy - m_gun_y[player]; if (diffx >= -BEAM_DX && diffx <= BEAM_DX && diffy >= -BEAM_DY && diffy <= BEAM_DY) result ^= 0x1000 << player; } @@ -753,7 +726,7 @@ void midzeus2_state::zeus2_map(address_map &map) map(0x400000, 0x43ffff).ram(); map(0x808000, 0x80807f).rw(FUNC(midzeus2_state::tms32031_control_r), FUNC(midzeus2_state::tms32031_control_w)).share("tms32031_ctl"); map(0x880000, 0x88007f).rw(m_zeus, FUNC(zeus2_device::zeus2_r), FUNC(zeus2_device::zeus2_w)); - map(0x8a0000, 0x8a00cf).rw(FUNC(midzeus2_state::firewire_r), FUNC(midzeus2_state::firewire_w)).share("firewire"); + map(0x8a0000, 0x8a00cf).rw(m_fw_link, FUNC(tsb12lv01a_device::read), FUNC(tsb12lv01a_device::write)); map(0x8d0000, 0x8d0009).rw(FUNC(midzeus2_state::disk_asic_jr_r), FUNC(midzeus2_state::disk_asic_jr_w)); map(0x900000, 0x91ffff).rw(FUNC(midzeus2_state::zpram_r), FUNC(midzeus2_state::zpram_w)).share("nvram").mirror(0x020000); map(0x990000, 0x99000f).rw("ioasic", FUNC(midway_ioasic_device::read), FUNC(midway_ioasic_device::write)); @@ -1266,8 +1239,6 @@ void midzeus_state::midzeus(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &midzeus_state::zeus_map); m_maincpu->set_vblank_int("screen", FUNC(midzeus_state::display_irq)); - MCFG_MACHINE_START_OVERRIDE(midzeus_state,midzeus) - MCFG_MACHINE_RESET_OVERRIDE(midzeus_state,midzeus) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); /* video hardware */ @@ -1275,11 +1246,9 @@ void midzeus_state::midzeus(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(MIDZEUS_VIDEO_CLOCK / 8, 529, 0, 400, 278, 0, 256); - m_screen->set_screen_update(FUNC(midzeus_state::screen_update_midzeus)); + m_screen->set_screen_update(FUNC(midzeus_state::screen_update)); m_screen->set_palette("palette"); - MCFG_VIDEO_START_OVERRIDE(midzeus_state,midzeus) - /* sound hardware */ DCS2_AUDIO_2104(config, "dcs", 0); @@ -1309,7 +1278,6 @@ void midzeus2_state::midzeus2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &midzeus2_state::zeus2_map); m_maincpu->set_vblank_int("screen", FUNC(midzeus2_state::display_irq)); - MCFG_MACHINE_RESET_OVERRIDE(midzeus2_state,midzeus) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); /* video hardware */ @@ -1325,10 +1293,18 @@ void midzeus2_state::midzeus2(machine_config &config) M48T35(config, m_m48t35, 0); + /* I/O hardware */ MIDWAY_IOASIC(config, m_ioasic, 0); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_yearoffs(99); m_ioasic->set_upper(474); + + IBM21S850(config, m_fw_phy, 0); + + TSB12LV01A(config, m_fw_link, 0); + m_fw_link->int_cb().set(FUNC(midzeus2_state::firewire_irq)); + m_fw_link->phy_read().set(m_fw_phy, FUNC(ibm21s850_device::read)); + m_fw_link->phy_write().set(m_fw_phy, FUNC(ibm21s850_device::write)); } void midzeus2_state::crusnexo(machine_config &config) diff --git a/src/mame/includes/midzeus.h b/src/mame/includes/midzeus.h index b275fbca7bf..23846f75bf9 100644 --- a/src/mame/includes/midzeus.h +++ b/src/mame/includes/midzeus.h @@ -69,7 +69,6 @@ public: : driver_device(mconfig, type, tag), m_nvram(*this, "nvram"), m_ram_base(*this, "ram_base"), - m_firewire(*this, "firewire"), m_tms32031_control(*this, "tms32031_ctl"), m_zeusbase(*this, "zeusbase"), m_m48t35(*this, "m48t35"), @@ -95,7 +94,6 @@ public: required_shared_ptr m_nvram; required_shared_ptr m_ram_base; - optional_shared_ptr m_firewire; required_shared_ptr m_tms32031_control; optional_shared_ptr m_zeusbase; @@ -104,12 +102,8 @@ public: void cmos_protect_w(uint32_t data); uint32_t zpram_r(offs_t offset); void zpram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - uint32_t disk_asic_r(offs_t offset); - void disk_asic_w(offs_t offset, uint32_t data); uint32_t disk_asic_jr_r(offs_t offset); void disk_asic_jr_w(offs_t offset, uint32_t data); - uint32_t firewire_r(offs_t offset); - void firewire_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t tms32031_control_r(offs_t offset); void tms32031_control_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void keypad_select_w(offs_t offset, uint32_t data); @@ -125,10 +119,8 @@ public: uint32_t trackball_r(offs_t offset); void init_invasn(); void init_mk4(); - DECLARE_MACHINE_START(midzeus); - DECLARE_MACHINE_RESET(midzeus); - DECLARE_VIDEO_START(midzeus); - uint32_t screen_update_midzeus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(display_irq); TIMER_CALLBACK_MEMBER(display_irq_off); TIMER_CALLBACK_MEMBER(invasn_gun_callback); @@ -136,7 +128,12 @@ public: void invasn(machine_config &config); void mk4(machine_config &config); void zeus_map(address_map &map); + protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + optional_device m_m48t35; required_device m_maincpu; required_device m_screen; @@ -151,20 +148,22 @@ protected: optional_ioport m_io_49way_y; optional_ioport m_io_keypad; output_finder<7> m_digits; - emu_timer *m_display_irq_off_timer; - uint8_t crusnexo_leds_select; - uint32_t disk_asic[0x10]; - uint32_t disk_asic_jr[0x10]; - uint8_t cmos_protected; + emu_timer * m_display_irq_off_timer; + uint8_t m_crusnexo_leds_select; + uint32_t m_disk_asic_jr[0x10]; + + uint8_t m_cmos_protected; + + emu_timer * m_timer[2]; - emu_timer *timer[2]; private: - uint32_t gun_control; - uint8_t gun_irq_state; - emu_timer * gun_timer[2]; - int32_t gun_x[2], gun_y[2]; - uint8_t keypad_select; + uint32_t m_gun_control; + uint8_t m_gun_irq_state; + emu_timer * m_gun_timer[2]; + int32_t m_gun_x[2], m_gun_y[2]; + uint8_t m_keypad_select; + void exit_handler(); void zeus_pointer_w(uint32_t which, uint32_t data, bool logit); void zeus_register16_w(offs_t offset, uint16_t data, bool logit); @@ -187,22 +186,22 @@ private: void waveram_plot_check_depth_nowrite(int y, int x, uint16_t color, uint16_t depth); std::unique_ptr m_poly; - uint8_t m_log_fifo; - - uint32_t m_zeus_fifo[20]; - uint8_t m_zeus_fifo_words; - int16_t m_zeus_matrix[3][3]; - int32_t m_zeus_point[3]; - int16_t m_zeus_light[3]; - void *m_zeus_renderbase; - uint32_t m_zeus_palbase; - uint32_t m_zeus_unkbase; - int m_zeus_enable_logging; - uint32_t m_zeus_objdata; - rectangle m_zeus_cliprect; + uint8_t m_log_fifo; + + uint32_t m_zeus_fifo[20]; + uint8_t m_zeus_fifo_words; + int16_t m_zeus_matrix[3][3]; + int32_t m_zeus_point[3]; + int16_t m_zeus_light[3]; + void * m_zeus_renderbase; + uint32_t m_zeus_palbase; + uint32_t m_zeus_unkbase; + int m_zeus_enable_logging; + uint32_t m_zeus_objdata; + rectangle m_zeus_cliprect; std::unique_ptr m_waveram[2]; - int m_yoffs; - int m_texel_width; - int m_is_mk4b; + int m_yoffs; + int m_texel_width; + int m_is_mk4b; }; diff --git a/src/mame/video/midzeus.cpp b/src/mame/video/midzeus.cpp index 093a3172fc8..a633b565e1e 100644 --- a/src/mame/video/midzeus.cpp +++ b/src/mame/video/midzeus.cpp @@ -204,16 +204,14 @@ midzeus_renderer::midzeus_renderer(midzeus_state &state) m_state(state) {} -VIDEO_START_MEMBER(midzeus_state,midzeus) +void midzeus_state::video_start() { - int i; - /* allocate memory for "wave" RAM */ m_waveram[0] = std::make_unique(WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8/4); m_waveram[1] = std::make_unique(WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 8/4); /* initialize a 5-5-5 palette */ - for (i = 0; i < 32768; i++) + for (int i = 0; i < 32768; i++) m_palette->set_pen_color(i, pal5bit(i >> 10), pal5bit(i >> 5), pal5bit(i >> 0)); /* initialize polygon engine */ @@ -272,10 +270,8 @@ void midzeus_state::exit_handler() * *************************************/ -uint32_t midzeus_state::screen_update_midzeus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t midzeus_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int x, y; - m_poly->wait("VIDEO_UPDATE"); /* normal update case */ @@ -283,10 +279,10 @@ uint32_t midzeus_state::screen_update_midzeus(screen_device &screen, bitmap_ind1 { const void *base = waveram1_ptr_from_expanded_addr(m_zeusbase[0xcc]); int xoffs = screen.visible_area().min_x; - for (y = cliprect.min_y; y <= cliprect.max_y; y++) + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { uint16_t *dest = &bitmap.pix16(y); - for (x = cliprect.min_x; x <= cliprect.max_x; x++) + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) dest[x] = WAVERAM_READPIX(base, y, x - xoffs) & 0x7fff; } } @@ -304,10 +300,10 @@ uint32_t midzeus_state::screen_update_midzeus(screen_device &screen, bitmap_ind1 if (m_yoffs < 0) m_yoffs = 0; base = waveram0_ptr_from_block_addr(m_yoffs << 12); - for (y = cliprect.min_y; y <= cliprect.max_y; y++) + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { uint16_t *dest = &bitmap.pix16(y); - for (x = cliprect.min_x; x <= cliprect.max_x; x++) + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) { uint8_t tex = get_texel_8bit(base, y, x, m_texel_width); dest[x] = (tex << 8) | tex; -- cgit v1.2.3 From b13aced50a40497cde61aef7d79090799592c9bf Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 11 Jul 2020 20:15:54 +0200 Subject: netlist: improve dealing with non-convergence situations. * No changes for well-behaved netlists. * Netlists reporting "newton loops exceeded" messages should now report a lot less of these messages. * In case newton-raphson does not converge, netlist will reset the state back to the beginning of the timestep. It will than use a number of very small timesteps to hopefully deal with the non-convergence due to a too big timesteps. Afterwards solving continues using dynamic timestepping until the time-slice is complete. * This is a lot better than the previous approach. * This is meant as a performance optimization helper. Ideally, your netlists never produce "newton loops exceeded" messages. * Any events for connected analog and digital inputs will happen after the timeslice is complete. Thus this approach - as the previous one - are not suited for high-frequency (such as video outputs) situations. In these case, only dynamic timestepping or reducing the fixed timestep are a suitable solution. --- src/lib/netlist/analog/nld_generic_models.h | 9 ++ src/lib/netlist/analog/nld_mosfet.cpp | 29 +++--- src/lib/netlist/analog/nlid_twoterm.cpp | 16 ++-- src/lib/netlist/analog/nlid_twoterm.h | 51 +++++++---- src/lib/netlist/nl_base.h | 14 ++- src/lib/netlist/solver/nld_matrix_solver.cpp | 117 ++++++++++++++++++------- src/lib/netlist/solver/nld_matrix_solver.h | 26 +++++- src/lib/netlist/solver/nld_matrix_solver_ext.h | 22 ++++- 8 files changed, 208 insertions(+), 76 deletions(-) diff --git a/src/lib/netlist/analog/nld_generic_models.h b/src/lib/netlist/analog/nld_generic_models.h index b6c06b9bffa..ad0e4dad4fd 100644 --- a/src/lib/netlist/analog/nld_generic_models.h +++ b/src/lib/netlist/analog/nld_generic_models.h @@ -84,6 +84,11 @@ namespace analog m_v = v; } + void restore_state() noexcept + { + // no state used + } + void setparams(nl_fptype gmin) noexcept { m_gmin = gmin; } private: @@ -146,6 +151,10 @@ namespace analog const nl_fptype G(cap * h + m_gmin); return { G, - G * v }; } + void restore_state() noexcept + { + // this one has no state + } void setparams(nl_fptype gmin) noexcept { m_gmin = gmin; } private: nl_fptype m_gmin; diff --git a/src/lib/netlist/analog/nld_mosfet.cpp b/src/lib/netlist/analog/nld_mosfet.cpp index 846ba8f3ba1..6ee3250dfa0 100644 --- a/src/lib/netlist/analog/nld_mosfet.cpp +++ b/src/lib/netlist/analog/nld_mosfet.cpp @@ -297,16 +297,25 @@ namespace analog { if (m_capmod != 0) { - //const nl_nl_fptype Ugd = -m_DG.deltaV() * m_polarity; // Gate - Drain - //const nl_nl_fptype Ugs = -m_SG.deltaV() * m_polarity; // Gate - Source - const nl_fptype Ugd = m_Vgd; // Gate - Drain - const nl_fptype Ugs = m_Vgs; // Gate - Source - const nl_fptype Ubs = nlconst::zero(); // Bulk - Source == 0 if connected - const nl_fptype Ugb = Ugs - Ubs; - - m_cap_gb.timestep(m_Cgb, Ugb, step); - m_cap_gs.timestep(m_Cgs, Ugs, step); - m_cap_gd.timestep(m_Cgd, Ugd, step); + if (ts_type == timestep_type::FORWARD) + { + //const nl_nl_fptype Ugd = -m_DG.deltaV() * m_polarity; // Gate - Drain + //const nl_nl_fptype Ugs = -m_SG.deltaV() * m_polarity; // Gate - Source + const nl_fptype Ugd = m_Vgd; // Gate - Drain + const nl_fptype Ugs = m_Vgs; // Gate - Source + const nl_fptype Ubs = nlconst::zero(); // Bulk - Source == 0 if connected + const nl_fptype Ugb = Ugs - Ubs; + + m_cap_gb.timestep(m_Cgb, Ugb, step); + m_cap_gs.timestep(m_Cgs, Ugs, step); + m_cap_gd.timestep(m_Cgd, Ugd, step); + } + else + { + m_cap_gb.restore_state(); + m_cap_gs.restore_state(); + m_cap_gd.restore_state(); + } } } diff --git a/src/lib/netlist/analog/nlid_twoterm.cpp b/src/lib/netlist/analog/nlid_twoterm.cpp index 29714e1ff7c..0fc84c06d43 100644 --- a/src/lib/netlist/analog/nlid_twoterm.cpp +++ b/src/lib/netlist/analog/nlid_twoterm.cpp @@ -132,11 +132,17 @@ namespace analog NETLIB_TIMESTEP(L) { - // Gpar should support convergence - m_I += m_G * deltaV(); - m_G = step / m_L() + m_gmin; - set_mat( m_G, -m_G, -m_I, - -m_G, m_G, m_I); + if (ts_type == timestep_type::FORWARD) + { + m_last_I = m_I; + // Gpar should support convergence + m_I += m_G * deltaV(); + m_G = step / m_L() + m_gmin; + set_mat( m_G, -m_G, -m_I, + -m_G, m_G, m_I); + } + else + m_I = m_last_I; } // ---------------------------------------------------------------------------------------- diff --git a/src/lib/netlist/analog/nlid_twoterm.h b/src/lib/netlist/analog/nlid_twoterm.h index 12a8ce3ffa1..8a970ac16ac 100644 --- a/src/lib/netlist/analog/nlid_twoterm.h +++ b/src/lib/netlist/analog/nlid_twoterm.h @@ -314,12 +314,17 @@ namespace analog NETLIB_IS_TIMESTEP(true) NETLIB_TIMESTEPI() { - // G, Ieq - const auto res(m_cap.timestep(m_C(), deltaV(), step)); - const nl_fptype G = res.first; - const nl_fptype I = res.second; - set_mat( G, -G, -I, - -G, G, I); + if (ts_type == timestep_type::FORWARD) + { + // G, Ieq + const auto res(m_cap.timestep(m_C(), deltaV(), step)); + const nl_fptype G = res.first; + const nl_fptype I = res.second; + set_mat( G, -G, -I, + -G, G, I); + } + else + m_cap.restore_state(); } NETLIB_RESETI() @@ -412,6 +417,7 @@ namespace analog , m_gmin(nlconst::zero()) , m_G(nlconst::zero()) , m_I(nlconst::zero()) + , m_last_I(nlconst::zero()) { //register_term("1", m_P); //register_term("2", m_N); @@ -431,6 +437,7 @@ namespace analog nl_fptype m_gmin; nl_fptype m_G; nl_fptype m_I; + nl_fptype m_last_I; }; /// \brief Class representing the diode model paramers. @@ -578,11 +585,16 @@ namespace analog NETLIB_TIMESTEPI() { - m_t += step; - m_funcparam[0] = m_t; - this->set_G_V_I(plib::reciprocal(m_R()), - m_compiled->evaluate(m_funcparam), - nlconst::zero()); + if (ts_type == timestep_type::FORWARD) + { + m_t += step; + m_funcparam[0] = m_t; + this->set_G_V_I(plib::reciprocal(m_R()), + m_compiled->evaluate(m_funcparam), + nlconst::zero()); + } + else + m_t -= step; // only need to restore state, will be called again } protected: @@ -625,12 +637,17 @@ namespace analog NETLIB_IS_TIMESTEP(!m_func().empty()) NETLIB_TIMESTEPI() { - m_t += step; - m_funcparam[0] = m_t; - const nl_fptype I = m_compiled->evaluate(m_funcparam); - const auto zero(nlconst::zero()); - set_mat(zero, zero, -I, - zero, zero, I); + if (ts_type == timestep_type::FORWARD) + { + m_t += step; + m_funcparam[0] = m_t; + const nl_fptype I = m_compiled->evaluate(m_funcparam); + const auto zero(nlconst::zero()); + set_mat(zero, zero, -I, + zero, zero, I); + } + else + m_t -= step; } protected: diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 2e6f0f68d46..96f461b8ae5 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -160,7 +160,7 @@ class NETLIB_NAME(name) : public delegator_t /// Please see \ref NETLIB_IS_TIMESTEP for an example. #define NETLIB_TIMESTEPI() \ - public: virtual void timestep(nl_fptype step) noexcept override + public: virtual void timestep(timestep_type ts_type, nl_fptype step) noexcept override /// \brief Used to implement the body of the time stepping code. /// @@ -171,7 +171,7 @@ class NETLIB_NAME(name) : public delegator_t /// \param cname Name of object as given to \ref NETLIB_OBJECT /// #define NETLIB_TIMESTEP(cname) \ - void NETLIB_NAME(cname) :: timestep(nl_fptype step) noexcept + void NETLIB_NAME(cname) :: timestep(timestep_type ts_type, nl_fptype step) noexcept #define NETLIB_DELEGATE(name) nldelegate(&this_type :: name, this) @@ -200,10 +200,16 @@ class NETLIB_NAME(name) : public delegator_t namespace netlist { + enum class timestep_type + { + FORWARD, ///< forward time + RESTORE ///< restore state before last forward + }; + /// \brief Delegate type for device notification. /// using nldelegate = plib::pmfp; - using nldelegate_ts = plib::pmfp; + using nldelegate_ts = plib::pmfp; using nldelegate_dyn = plib::pmfp; //============================================================ @@ -1399,7 +1405,7 @@ namespace netlist log_type & log(); public: - virtual void timestep(const nl_fptype st) noexcept { plib::unused_var(st); } + virtual void timestep(timestep_type ts_type, nl_fptype st) noexcept { plib::unused_var(ts_type, st); } virtual void update_terminals() noexcept { } virtual void update_param() noexcept {} diff --git a/src/lib/netlist/solver/nld_matrix_solver.cpp b/src/lib/netlist/solver/nld_matrix_solver.cpp index 10ce81754ec..89c4523c8b0 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.cpp +++ b/src/lib/netlist/solver/nld_matrix_solver.cpp @@ -431,66 +431,119 @@ namespace solver //m_last_step = netlist_time_ext::zero(); } - void matrix_solver_t::step(netlist_time delta) noexcept + void matrix_solver_t::step(timestep_type ts_type, netlist_time delta) noexcept { const auto dd(delta.as_fp()); for (auto &d : m_step_funcs) - d(dd); + d(ts_type, dd); + } + + bool matrix_solver_t::solve_nr_base() + { + bool this_resched(false); + std::size_t newton_loops = 0; + do + { + update_dynamic(); + // Gauss-Seidel will revert to Gaussian elemination if steps exceeded. + this->m_stat_calculations++; + this->vsolve_non_dynamic(); + this_resched = this->check_err(); + this->store(); + newton_loops++; + } while (this_resched && newton_loops < m_params.m_nr_loops); + + m_stat_newton_raphson += newton_loops; +#if 0 + if (this_resched) + m_stat_newton_raphson_fail++; +#endif + return this_resched; + } + + netlist_time matrix_solver_t::newton_loops_exceeded(netlist_time delta) + { + netlist_time next_time_step; + bool resched(false); + + restore(); + step(timestep_type::RESTORE, delta); + + for (std::size_t i=0; i< 10; i++) + { + backup(); + step(timestep_type::FORWARD, netlist_time::from_fp(m_params.m_min_ts_ts())); + resched = solve_nr_base(); + // update timestep calculation + next_time_step = compute_next_timestep(m_params.m_min_ts_ts(), m_params.m_min_ts_ts(), m_params.m_max_timestep); + delta -= netlist_time_ext::from_fp(m_params.m_min_ts_ts()); + } + // try remaining time using compute_next_timestep + while (delta > netlist_time::zero()) + { + if (next_time_step > delta) + next_time_step = delta; + backup(); + step(timestep_type::FORWARD, next_time_step); + delta -= next_time_step; + resched = solve_nr_base(); + next_time_step = compute_next_timestep(next_time_step.as_fp(), m_params.m_min_ts_ts(), m_params.m_max_timestep); + } + // reschedule .... + if (resched && !m_Q_sync.net().is_queued()) + { + log().warning(MW_NEWTON_LOOPS_EXCEEDED_ON_NET_1(this->name())); + // FIXME: test and enable - this is working better, though not optimal yet +#if 0 + // Don't store, the result can not be used + return netlist_time::from_fp(m_params.m_nr_recalc_delay()); +#else + //restore(); // restore old voltages + m_Q_sync.net().toggle_and_push_to_queue(netlist_time::from_fp(m_params.m_nr_recalc_delay())); +#endif + } + if (m_params.m_dynamic_ts) + return next_time_step; + + return netlist_time::from_fp(m_params.m_max_timestep); } netlist_time matrix_solver_t::solve(netlist_time_ext now) { - const netlist_time_ext delta = now - m_last_step(); + netlist_time_ext delta = now - m_last_step(); + PFDEBUG(printf("solve %.10f\n", delta.as_double());) // We are already up to date. Avoid oscillations. // FIXME: Make this a parameter! if (delta < netlist_time_ext::quantum()) + { + PFDEBUG(printf("solve return\n");) return netlist_time::zero(); + } + backup(); // save voltages for backup and timestep calculation // update all terminals for new time step m_last_step = now; - step(static_cast(delta)); ++m_stat_vsolver_calls; if (dynamic_device_count() != 0) { - bool this_resched(false); - std::size_t newton_loops = 0; - do - { - update_dynamic(); - // Gauss-Seidel will revert to Gaussian elemination if steps exceeded. - this->m_stat_calculations++; - this->vsolve_non_dynamic(); - this_resched = this->check_err(); - this->store(); - newton_loops++; - } while (this_resched && newton_loops < m_params.m_nr_loops); - - m_stat_newton_raphson += newton_loops; - // reschedule .... - if (this_resched && !m_Q_sync.net().is_queued()) - { - log().warning(MW_NEWTON_LOOPS_EXCEEDED_ON_NET_1(this->name())); - // FIXME: test and enable - this is working better, though not optimal yet -#if 0 - // Don't store, the result can not be used - return netlist_time::from_fp(m_params.m_nr_recalc_delay()); -#else - m_Q_sync.net().toggle_and_push_to_queue(netlist_time::from_fp(m_params.m_nr_recalc_delay())); -#endif - } + step(timestep_type::FORWARD, delta); + auto resched = solve_nr_base(); + + if (resched) + return newton_loops_exceeded(delta); } else { + step(timestep_type::FORWARD, delta); this->m_stat_calculations++; this->vsolve_non_dynamic(); this->store(); } - if (m_params.m_dynamic_ts) - return compute_next_timestep(delta.as_fp(), m_params.m_max_timestep); + return compute_next_timestep(delta.as_fp(), m_params.m_min_timestep, m_params.m_max_timestep); return netlist_time::from_fp(m_params.m_max_timestep); } diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h index 55af6a34161..cdd03743795 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.h +++ b/src/lib/netlist/solver/nld_matrix_solver.h @@ -20,6 +20,10 @@ #include +//FIXME: remove again + +#define PFDEBUG(x) + namespace netlist { namespace solver @@ -80,6 +84,7 @@ namespace solver netlist_time::quantum().as_fp()) ///< Delay to next solve attempt if nr loops exceeded , m_parallel(parent, "PARALLEL", 0) + , m_min_ts_ts(parent, "MIN_TS_TS", nlconst::magic(1e-9)) ///< The minimum times step for solvers with time stepping devices. // automatic time step , m_dynamic_ts(parent, "DYNAMIC_TS", false) ///< Use dynamic time stepping , m_dynamic_lte(parent, "DYNAMIC_LTE", nlconst::magic(1e-5)) ///< dynamic time stepping slope @@ -118,7 +123,8 @@ namespace solver param_logic_t m_pivot; param_fp_t m_nr_recalc_delay; param_int_t m_parallel; - param_logic_t m_dynamic_ts; + param_fp_t m_min_ts_ts; + param_logic_t m_dynamic_ts; param_fp_t m_dynamic_lte; param_fp_t m_dynamic_min_ts; param_enum_t m_sort_type; @@ -237,12 +243,19 @@ namespace solver update_inputs(); } f(); - m_Q_sync.net().toggle_and_push_to_queue(delay); + if ((delay == netlist_time::quantum()) && (timestep_device_count() > 0)) + { + PFDEBUG(printf("here2\n");) + m_Q_sync.net().toggle_and_push_to_queue(netlist_time::from_fp(m_params.m_min_ts_ts())); + } + else + m_Q_sync.net().toggle_and_push_to_queue(delay); } // netdevice functions NETLIB_UPDATEI() { + PFDEBUG(printf("update\n");) const netlist_time new_timestep = solve(exec().time()); update_inputs(); @@ -271,9 +284,11 @@ namespace solver const solver_parameters_t *params); virtual void vsolve_non_dynamic() = 0; - virtual netlist_time compute_next_timestep(fptype cur_ts, fptype max_ts) = 0; + virtual netlist_time compute_next_timestep(fptype cur_ts, fptype min_ts, fptype max_ts) = 0; virtual bool check_err() const = 0; virtual void store() = 0; + virtual void backup() = 0; + virtual void restore() = 0; plib::pmatrix2d_vrl m_gonn; plib::pmatrix2d_vrl m_gtn; @@ -292,10 +307,13 @@ namespace solver // base setup - called from constructor void setup_base(setup_t &setup, const net_list_t &nets) noexcept(false); + bool solve_nr_base(); + netlist_time newton_loops_exceeded(netlist_time delta); + void sort_terms(matrix_sort_type_e sort); void update_dynamic() noexcept; - void step(netlist_time delta) noexcept; + void step(timestep_type ts_type, netlist_time delta) noexcept; int get_net_idx(const analog_net_t *net) const noexcept; std::pair get_left_right_of_diag(std::size_t irow, std::size_t idiag); diff --git a/src/lib/netlist/solver/nld_matrix_solver_ext.h b/src/lib/netlist/solver/nld_matrix_solver_ext.h index 7541795c2a1..718eddb2868 100644 --- a/src/lib/netlist/solver/nld_matrix_solver_ext.h +++ b/src/lib/netlist/solver/nld_matrix_solver_ext.h @@ -164,7 +164,21 @@ namespace solver return false; } - netlist_time compute_next_timestep(fptype cur_ts, fptype max_ts) override + void backup() override + { + const std::size_t iN = size(); + for (std::size_t i = 0; i < iN; i++) + m_last_V[i] = static_cast(this->m_terms[i].getV()); + } + + void restore() override + { + const std::size_t iN = size(); + for (std::size_t i = 0; i < iN; i++) + this->m_terms[i].setV(static_cast(m_last_V[i])); + } + + netlist_time compute_next_timestep(fptype cur_ts, fptype min_ts, fptype max_ts) override { fptype new_solver_timestep(max_ts); @@ -176,7 +190,7 @@ namespace solver const fptype DD_n = std::max(-fp_constants::TIMESTEP_MAXDIFF(), std::min(+fp_constants::TIMESTEP_MAXDIFF(),(v - m_last_V[k]))); - m_last_V[k] = v; + //m_last_V[k] = v; const fptype hn = cur_ts; fptype DD2 = (DD_n / hn - m_DD_n_m_1[k] / m_h_n_m_1[k]) / (hn + m_h_n_m_1[k]); @@ -187,11 +201,11 @@ namespace solver if (plib::abs(DD2) > fp_constants::TIMESTEP_MINDIV()) // avoid div-by-zero new_net_timestep = plib::sqrt(m_params.m_dynamic_lte / plib::abs(nlconst::half()*DD2)); else - new_net_timestep = m_params.m_max_timestep; + new_net_timestep = max_ts; new_solver_timestep = std::min(new_net_timestep, new_solver_timestep); } - new_solver_timestep = std::max(new_solver_timestep, m_params.m_min_timestep); + new_solver_timestep = std::max(new_solver_timestep, min_ts); // FIXME: Factor 2 below is important. Without, we get timing issues. This must be a bug elsewhere. return std::max(netlist_time::from_fp(new_solver_timestep), netlist_time::quantum() * 2); -- cgit v1.2.3 From ad4a446d5f22dbc9ba55d25d9a113b542d83bc88 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 11 Jul 2020 22:54:13 +0200 Subject: netlist: use threads on netlist logs. * This significantly increases the performance of output/terminal logs. * Adds a psemaphore class to pmulti_threading.h. --- src/lib/netlist/devices/nld_log.cpp | 71 +++++++++++++++++++++++++++++++-- src/lib/netlist/plib/pmulti_threading.h | 44 ++++++++++++++++++++ src/lib/netlist/plib/ptimed_queue.h | 1 + 3 files changed, 113 insertions(+), 3 deletions(-) diff --git a/src/lib/netlist/devices/nld_log.cpp b/src/lib/netlist/devices/nld_log.cpp index f12229edaa3..bff10317434 100644 --- a/src/lib/netlist/devices/nld_log.cpp +++ b/src/lib/netlist/devices/nld_log.cpp @@ -9,8 +9,16 @@ #include "nld_log.h" #include "plib/pfmtlog.h" #include "plib/pstream.h" +#include "plib/pmulti_threading.h" //#include "sound/wavwrite.h" +#include +#include +#include +#include +#include +#include + namespace netlist { namespace devices @@ -22,31 +30,88 @@ namespace netlist , m_strm(plib::filesystem::u8path(plib::pfmt("{1}.log")(this->name()))) , m_writer(&m_strm) , m_reset(false) + , m_done(false) + , m_sem_w(0) + , m_sem_r(0) + , m_w(0) + , m_r(0) { if (m_strm.fail()) throw plib::file_open_e(plib::pfmt("{1}.log")(this->name())); m_strm.imbue(std::locale::classic()); + + //m_write_thread = std::thread(std::bind(&nld_log::thread_writer, this)); + m_write_thread = std::thread([this]{this->thread_writer(); }); + m_sem_r.acquire(); } NETLIB_DESTRUCTOR(log) { - if (m_reset) - m_writer.writeline(plib::pfmt("{1:.9} {2}").e(exec().time().as_fp()).e(static_cast(m_I()))); + m_sem_w.release(); + m_done = true; + m_write_thread.join(); } NETLIB_UPDATEI() { + if (m_buffers[m_w].size() == BUF_SIZE) + { + m_sem_w.release(); + m_sem_r.acquire(); + m_w++; + if (m_w >= BUFFERS) + m_w = 0; + } /* use pstring::sprintf, it is a LOT faster */ - m_writer.writeline(plib::pfmt("{1:.9} {2}").e(exec().time().as_fp()).e(static_cast(m_I()))); + m_buffers[m_w].push_back({exec().time(), static_cast(m_I())}); + //m_writer.writeline(plib::pfmt("{1:.9} {2}").e(exec().time().as_fp()).e(static_cast(m_I()))); } NETLIB_RESETI() { m_reset = true; } protected: + + void thread_writer() + { + m_sem_r.release(BUFFERS); + while (true) + { + if (!m_sem_w.try_acquire()) + { + if (m_done) + break; + m_sem_w.acquire(); + } + auto &b = m_buffers[m_r]; + + for (auto &e : b) + m_writer.writeline(plib::pfmt("{1:.9} {2}").e(e.t.as_fp()).e(e.v)); + b.clear(); + m_sem_r.release(); + m_r++; + if (m_r >= BUFFERS) + m_r = 0; + } + } + + struct entry + { + netlist_time_ext t; + nl_fptype v; + }; + static const std::size_t BUF_SIZE=16384; + static const std::size_t BUFFERS=4; analog_input_t m_I; plib::ofstream m_strm; plib::putf8_writer m_writer; bool m_reset; + std::array, BUFFERS> m_buffers; + std::atomic m_done; + plib::psemaphore m_sem_w; + plib::psemaphore m_sem_r; + std::size_t m_w; + std::size_t m_r; + std::thread m_write_thread; }; NETLIB_OBJECT_DERIVED(logD, log) diff --git a/src/lib/netlist/plib/pmulti_threading.h b/src/lib/netlist/plib/pmulti_threading.h index a7dbdd33f13..b359af084e6 100644 --- a/src/lib/netlist/plib/pmulti_threading.h +++ b/src/lib/netlist/plib/pmulti_threading.h @@ -15,6 +15,7 @@ #include #include #include +#include namespace plib { @@ -38,6 +39,49 @@ namespace plib { void unlock() const noexcept { } }; + class psemaphore + { + public: + + psemaphore(long count = 0) noexcept: m_count(count) { } + + psemaphore(const psemaphore& other) = delete; + psemaphore& operator=(const psemaphore& other) = delete; + psemaphore(psemaphore&& other) = delete; + psemaphore& operator=(psemaphore&& other) = delete; + ~psemaphore() = default; + + void release(long update = 1) + { + std::lock_guard lock(m_mutex); + m_count += update; + m_cv.notify_one(); + } + + void acquire() + { + std::unique_lock lock(m_mutex); + while (m_count == 0) + m_cv.wait(lock); + --m_count; + } + + bool try_acquire() + { + std::lock_guard lock(m_mutex); + if (m_count) + { + --m_count; + return true; + } + return false; + } + private: + std::mutex m_mutex; + std::condition_variable m_cv; + long m_count; + }; + } // namespace plib diff --git a/src/lib/netlist/plib/ptimed_queue.h b/src/lib/netlist/plib/ptimed_queue.h index 2de315aa9c6..5e62d5b82aa 100644 --- a/src/lib/netlist/plib/ptimed_queue.h +++ b/src/lib/netlist/plib/ptimed_queue.h @@ -11,6 +11,7 @@ #include "pchrono.h" #include "pmulti_threading.h" #include "ptypes.h" +#include "palloc.h" // FIXME: for aligned_vector #include #include -- cgit v1.2.3 From b4555c13a0c29be811036c75c1b8e89d724f761a Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 11 Jul 2020 02:13:24 -0700 Subject: netlist: fix 74121 clocking logic. --- src/lib/netlist/devices/nld_74123.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/netlist/devices/nld_74123.cpp b/src/lib/netlist/devices/nld_74123.cpp index 5ddd29a60db..52003bd25cf 100644 --- a/src/lib/netlist/devices/nld_74123.cpp +++ b/src/lib/netlist/devices/nld_74123.cpp @@ -207,7 +207,7 @@ namespace netlist template static netlist_sig_t trigfunc(const T &in) { - return ((in[0]() | in[1]()) ^ 1) & in[0](); // ((m_A() | (m_B() ^ 1)) ^ 1) & m_CLRQ() + return ((in[0]() ^ 1) | (in[1]() ^ 1)) & in[2](); // (~A1 | ~A2) & B } template static constexpr netlist_sig_t clear(const T &in) { plib::unused_var(in); return 1;} }; -- cgit v1.2.3 From 041382375a641eedd5bf31dcced697e3840299ea Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Sun, 12 Jul 2020 04:14:17 +0300 Subject: fix YMZ280 breakage. on the side note, it is pretty sad to see neither of persons who did PR and other who merged it didn't tested these changes. --- src/devices/sound/ymz280b.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp index 51851af98d2..c4e1d2d30b5 100644 --- a/src/devices/sound/ymz280b.cpp +++ b/src/devices/sound/ymz280b.cpp @@ -40,8 +40,8 @@ #define MAX_SAMPLE_CHUNK 10000 -static constexpr unsigned FRAC_BITS = 9; -static constexpr unsigned FRAC_ONE = (1 << FRAC_BITS); +#define FRAC_BITS 9 +#define FRAC_ONE (1 << FRAC_BITS) //#define INTERNAL_BUFFER_SIZE (1 << 15) #define INTERNAL_SAMPLE_RATE (m_master_clock * 2.0) -- cgit v1.2.3 From c296555db1b6b27b6e04c02cde7c1faaa536ad4a Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 11 Jul 2020 21:27:19 -0400 Subject: ymz280b.cpp: Better fix for signed arithmetic issue --- src/devices/sound/ymz280b.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp index c4e1d2d30b5..f5a69bc6d37 100644 --- a/src/devices/sound/ymz280b.cpp +++ b/src/devices/sound/ymz280b.cpp @@ -40,8 +40,8 @@ #define MAX_SAMPLE_CHUNK 10000 -#define FRAC_BITS 9 -#define FRAC_ONE (1 << FRAC_BITS) +static constexpr unsigned FRAC_BITS = 9; +static constexpr s32 FRAC_ONE = 1 << FRAC_BITS; //#define INTERNAL_BUFFER_SIZE (1 << 15) #define INTERNAL_SAMPLE_RATE (m_master_clock * 2.0) @@ -452,7 +452,7 @@ void ymz280b_device::sound_stream_update(sound_stream &stream, stream_sample_t * /* interpolate */ while (remaining > 0 && voice->output_pos < FRAC_ONE) { - int interp_sample = (((s32)prev * (FRAC_ONE - voice->output_pos)) + ((s32)curr * voice->output_pos)) >> FRAC_BITS; + int interp_sample = ((s32(prev) * (FRAC_ONE - voice->output_pos)) + (s32(curr) * voice->output_pos)) >> FRAC_BITS; *ldest++ += interp_sample * lvol; *rdest++ += interp_sample * rvol; voice->output_pos += voice->output_step; @@ -516,7 +516,7 @@ void ymz280b_device::sound_stream_update(sound_stream &stream, stream_sample_t * /* interpolate */ while (remaining > 0 && voice->output_pos < FRAC_ONE) { - int interp_sample = (((s32)prev * (FRAC_ONE - voice->output_pos)) + ((s32)curr * voice->output_pos)) >> FRAC_BITS; + int interp_sample = ((s32(prev) * (FRAC_ONE - voice->output_pos)) + (s32(curr) * voice->output_pos)) >> FRAC_BITS; *ldest++ += interp_sample * lvol; *rdest++ += interp_sample * rvol; voice->output_pos += voice->output_step; -- cgit v1.2.3 From 2b0a5627f7f3fa43bcbc875877c80dd43ee8f096 Mon Sep 17 00:00:00 2001 From: Firehawke Date: Sat, 11 Jul 2020 19:12:35 -0700 Subject: Update RTD docs theme to 0.5.0 to fix search box. --- docs/themes/sphinx_rtd_theme/__init__.py | 29 +- docs/themes/sphinx_rtd_theme/breadcrumbs.html | 80 +- docs/themes/sphinx_rtd_theme/footer.html | 42 +- docs/themes/sphinx_rtd_theme/layout.html | 248 +- docs/themes/sphinx_rtd_theme/layout_old.html | 205 -- .../locale/de/LC_MESSAGES/sphinx.po | 143 + .../locale/en/LC_MESSAGES/sphinx.po | 156 + .../locale/es/LC_MESSAGES/sphinx.po | 164 ++ .../locale/et/LC_MESSAGES/sphinx.po | 155 + .../locale/fr/LC_MESSAGES/sphinx.po | 154 + .../locale/nl/LC_MESSAGES/sphinx.po | 157 + .../locale/pt_BR/LC_MESSAGES/sphinx.po | 159 + .../locale/ru/LC_MESSAGES/sphinx.po | 158 + docs/themes/sphinx_rtd_theme/locale/sphinx.pot | 149 + .../locale/sv/LC_MESSAGES/sphinx.po | 158 + .../locale/tr/LC_MESSAGES/sphinx.po | 147 + .../locale/zh_CN/LC_MESSAGES/sphinx.po | 151 + docs/themes/sphinx_rtd_theme/search.html | 8 +- docs/themes/sphinx_rtd_theme/searchbox.html | 2 +- .../sphinx_rtd_theme/static/css/badge_only.css | 3 +- .../sphinx_rtd_theme/static/css/badge_only.css.map | 7 - .../static/css/fonts/Roboto-Slab-Bold.woff | Bin 0 -> 87624 bytes .../static/css/fonts/Roboto-Slab-Bold.woff2 | Bin 0 -> 67312 bytes .../static/css/fonts/Roboto-Slab-Regular.woff | Bin 0 -> 86288 bytes .../static/css/fonts/Roboto-Slab-Regular.woff2 | Bin 0 -> 66444 bytes .../static/css/fonts/fontawesome-webfont.eot | Bin 0 -> 165742 bytes .../static/css/fonts/fontawesome-webfont.svg | 2671 +++++++++++++++++ .../static/css/fonts/fontawesome-webfont.ttf | Bin 0 -> 165548 bytes .../static/css/fonts/fontawesome-webfont.woff | Bin 0 -> 98024 bytes .../static/css/fonts/fontawesome-webfont.woff2 | Bin 0 -> 77160 bytes .../static/css/fonts/lato-bold-italic.woff | Bin 0 -> 323344 bytes .../static/css/fonts/lato-bold-italic.woff2 | Bin 0 -> 193308 bytes .../static/css/fonts/lato-bold.woff | Bin 0 -> 309728 bytes .../static/css/fonts/lato-bold.woff2 | Bin 0 -> 184912 bytes .../static/css/fonts/lato-normal-italic.woff | Bin 0 -> 328412 bytes .../static/css/fonts/lato-normal-italic.woff2 | Bin 0 -> 195704 bytes .../static/css/fonts/lato-normal.woff | Bin 0 -> 309192 bytes .../static/css/fonts/lato-normal.woff2 | Bin 0 -> 182708 bytes docs/themes/sphinx_rtd_theme/static/css/theme.css | 7 +- .../sphinx_rtd_theme/static/css/theme.css.map | 7 - .../sphinx_rtd_theme/static/fonts/FontAwesome.otf | Bin 62856 -> 134808 bytes .../static/fonts/Inconsolata-Bold.ttf | Bin 47064 -> 0 bytes .../sphinx_rtd_theme/static/fonts/Inconsolata.ttf | Bin 63184 -> 0 bytes .../sphinx_rtd_theme/static/fonts/Lato-Bold.ttf | Bin 82368 -> 0 bytes .../sphinx_rtd_theme/static/fonts/Lato-Regular.ttf | Bin 81980 -> 0 bytes .../static/fonts/Lato/lato-bold.eot | Bin 0 -> 256056 bytes .../static/fonts/Lato/lato-bold.ttf | Bin 0 -> 600856 bytes .../static/fonts/Lato/lato-bold.woff | Bin 0 -> 309728 bytes .../static/fonts/Lato/lato-bold.woff2 | Bin 0 -> 184912 bytes .../static/fonts/Lato/lato-bolditalic.eot | Bin 0 -> 266158 bytes .../static/fonts/Lato/lato-bolditalic.ttf | Bin 0 -> 622572 bytes .../static/fonts/Lato/lato-bolditalic.woff | Bin 0 -> 323344 bytes .../static/fonts/Lato/lato-bolditalic.woff2 | Bin 0 -> 193308 bytes .../static/fonts/Lato/lato-italic.eot | Bin 0 -> 268604 bytes .../static/fonts/Lato/lato-italic.ttf | Bin 0 -> 639388 bytes .../static/fonts/Lato/lato-italic.woff | Bin 0 -> 328412 bytes .../static/fonts/Lato/lato-italic.woff2 | Bin 0 -> 195704 bytes .../static/fonts/Lato/lato-regular.eot | Bin 0 -> 253461 bytes .../static/fonts/Lato/lato-regular.ttf | Bin 0 -> 607720 bytes .../static/fonts/Lato/lato-regular.woff | Bin 0 -> 309192 bytes .../static/fonts/Lato/lato-regular.woff2 | Bin 0 -> 182708 bytes .../static/fonts/Roboto-Slab-Bold.woff | Bin 0 -> 87624 bytes .../static/fonts/Roboto-Slab-Bold.woff2 | Bin 0 -> 67312 bytes .../static/fonts/Roboto-Slab-Light.woff | Bin 0 -> 88600 bytes .../static/fonts/Roboto-Slab-Light.woff2 | Bin 0 -> 67884 bytes .../static/fonts/Roboto-Slab-Regular.woff | Bin 0 -> 86288 bytes .../static/fonts/Roboto-Slab-Regular.woff2 | Bin 0 -> 66444 bytes .../static/fonts/Roboto-Slab-Thin.woff | Bin 0 -> 87452 bytes .../static/fonts/Roboto-Slab-Thin.woff2 | Bin 0 -> 66328 bytes .../static/fonts/RobotoSlab-Bold.ttf | Bin 36596 -> 0 bytes .../static/fonts/RobotoSlab-Regular.ttf | Bin 36276 -> 0 bytes .../fonts/RobotoSlab/roboto-slab-v7-bold.eot | Bin 0 -> 79520 bytes .../fonts/RobotoSlab/roboto-slab-v7-bold.ttf | Bin 0 -> 170616 bytes .../fonts/RobotoSlab/roboto-slab-v7-bold.woff | Bin 0 -> 87624 bytes .../fonts/RobotoSlab/roboto-slab-v7-bold.woff2 | Bin 0 -> 67312 bytes .../fonts/RobotoSlab/roboto-slab-v7-regular.eot | Bin 0 -> 78331 bytes .../fonts/RobotoSlab/roboto-slab-v7-regular.ttf | Bin 0 -> 169064 bytes .../fonts/RobotoSlab/roboto-slab-v7-regular.woff | Bin 0 -> 86288 bytes .../fonts/RobotoSlab/roboto-slab-v7-regular.woff2 | Bin 0 -> 66444 bytes .../static/fonts/fontawesome-webfont.eot | Bin 38205 -> 165742 bytes .../static/fonts/fontawesome-webfont.svg | 3079 +++++++++++++++++--- .../static/fonts/fontawesome-webfont.ttf | Bin 80652 -> 165548 bytes .../static/fonts/fontawesome-webfont.woff | Bin 44432 -> 98024 bytes .../static/fonts/fontawesome-webfont.woff2 | Bin 0 -> 77160 bytes .../static/fonts/lato-bold-italic.woff | Bin 0 -> 323344 bytes .../static/fonts/lato-bold-italic.woff2 | Bin 0 -> 193308 bytes .../sphinx_rtd_theme/static/fonts/lato-bold.woff | Bin 0 -> 309728 bytes .../sphinx_rtd_theme/static/fonts/lato-bold.woff2 | Bin 0 -> 184912 bytes .../static/fonts/lato-normal-italic.woff | Bin 0 -> 328412 bytes .../static/fonts/lato-normal-italic.woff2 | Bin 0 -> 195704 bytes .../sphinx_rtd_theme/static/fonts/lato-normal.woff | Bin 0 -> 309192 bytes .../static/fonts/lato-normal.woff2 | Bin 0 -> 182708 bytes .../sphinx_rtd_theme/static/js/badge_only.js | 1 + .../static/js/html5shiv-printshiv.min.js | 4 + .../sphinx_rtd_theme/static/js/html5shiv.min.js | 4 + docs/themes/sphinx_rtd_theme/static/js/theme.js | 114 +- docs/themes/sphinx_rtd_theme/theme.conf | 15 +- docs/themes/sphinx_rtd_theme/versions.html | 15 +- 98 files changed, 7509 insertions(+), 883 deletions(-) delete mode 100644 docs/themes/sphinx_rtd_theme/layout_old.html create mode 100644 docs/themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/sphinx.pot create mode 100644 docs/themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po create mode 100644 docs/themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po delete mode 100644 docs/themes/sphinx_rtd_theme/static/css/badge_only.css.map create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.eot create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.svg create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-bold.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-bold.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-normal.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/css/fonts/lato-normal.woff2 delete mode 100644 docs/themes/sphinx_rtd_theme/static/css/theme.css.map delete mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf delete mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Inconsolata.ttf delete mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato-Bold.ttf delete mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato-Regular.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bold.eot create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bold.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bold.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bold.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bolditalic.eot create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bolditalic.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bolditalic.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-bolditalic.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-italic.eot create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-italic.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-italic.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-italic.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-regular.eot create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-regular.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-regular.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Lato/lato-regular.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Bold.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Bold.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Light.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Light.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Regular.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Regular.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Thin.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/Roboto-Slab-Thin.woff2 delete mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.ttf delete mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-bold.eot create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-bold.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-regular.eot create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-regular.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-bold-italic.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-bold-italic.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-bold.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-bold.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-normal-italic.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-normal-italic.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-normal.woff create mode 100644 docs/themes/sphinx_rtd_theme/static/fonts/lato-normal.woff2 create mode 100644 docs/themes/sphinx_rtd_theme/static/js/badge_only.js create mode 100644 docs/themes/sphinx_rtd_theme/static/js/html5shiv-printshiv.min.js create mode 100644 docs/themes/sphinx_rtd_theme/static/js/html5shiv.min.js diff --git a/docs/themes/sphinx_rtd_theme/__init__.py b/docs/themes/sphinx_rtd_theme/__init__.py index 95ddc52ae06..e48d9696d93 100644 --- a/docs/themes/sphinx_rtd_theme/__init__.py +++ b/docs/themes/sphinx_rtd_theme/__init__.py @@ -1,17 +1,34 @@ -"""Sphinx ReadTheDocs theme. +""" +Sphinx Read the Docs theme. From https://github.com/ryan-roemer/sphinx-bootstrap-theme. - """ -import os -VERSION = (0, 1, 8) +from os import path + +import sphinx + -__version__ = ".".join(str(v) for v in VERSION) +__version__ = '0.5.0' __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" - cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + cur_dir = path.abspath(path.dirname(path.dirname(__file__))) return cur_dir + + +# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package +def setup(app): + if sphinx.version_info >= (1, 6, 0): + # Register the theme that can be referenced without adding a theme path + app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__))) + + if sphinx.version_info >= (1, 8, 0): + # Add Sphinx message catalog for newer versions of Sphinx + # See http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog + rtd_locale_path = path.join(path.abspath(path.dirname(__file__)), 'locale') + app.add_message_catalog('sphinx', rtd_locale_path) + + return {'parallel_read_safe': True, 'parallel_write_safe': True} diff --git a/docs/themes/sphinx_rtd_theme/breadcrumbs.html b/docs/themes/sphinx_rtd_theme/breadcrumbs.html index dd518fb0ef3..90cb0ff863e 100644 --- a/docs/themes/sphinx_rtd_theme/breadcrumbs.html +++ b/docs/themes/sphinx_rtd_theme/breadcrumbs.html @@ -1,24 +1,82 @@ +{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} + +{% if page_source_suffix %} +{% set suffix = page_source_suffix %} +{% else %} +{% set suffix = source_suffix %} +{% endif %} + +{% if meta is defined and meta is not none %} +{% set check_meta = True %} +{% else %} +{% set check_meta = False %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} +{% set display_github = True %} +{% endif %} + +{% if check_meta and 'bitbucket_url' in meta %} +{% set display_bitbucket = True %} +{% endif %} + +{% if check_meta and 'gitlab_url' in meta %} +{% set display_gitlab = True %} +{% endif %} +
+ + + {% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} + + {% endif %}
diff --git a/docs/themes/sphinx_rtd_theme/footer.html b/docs/themes/sphinx_rtd_theme/footer.html index 6347a440d73..55d8d0e5583 100644 --- a/docs/themes/sphinx_rtd_theme/footer.html +++ b/docs/themes/sphinx_rtd_theme/footer.html @@ -1,11 +1,11 @@
- {% if next or prev %} + {% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %} {% endif %} @@ -16,21 +16,47 @@

{%- if show_copyright %} {%- if hasdoc('copyright') %} - {% trans path=pathto('copyright'), copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {% set path = pathto('copyright') %} + {% set copyright = copyright|e %} + © {% trans %}Copyright{% endtrans %} {{ copyright }} {%- else %} - {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {% set copyright = copyright|e %} + © {% trans %}Copyright{% endtrans %} {{ copyright }} {%- endif %} {%- endif %} - {%- if last_updated %} - {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} + {%- if build_id and build_url %} + + {# Translators: Build is a noun, not a verb #} + {% trans %}Build{% endtrans %} + {{ build_id }}. + + {%- elif commit %} + + {# Translators: the phrase "revision" comes from Git, referring to a commit #} + {% trans %}Revision{% endtrans %} {{ commit }}. + + {%- elif last_updated %} + + {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} + {%- endif %} +

{%- if show_sphinx %} - {% trans %}Built with Sphinx using a theme provided by Read the Docs{% endtrans %}. + {% set sphinx_web = 'Sphinx' %} + {% set readthedocs_web = 'Read the Docs' %} + {# Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #} + {% trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %} + {# Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #} + {% trans %}theme{% endtrans %} + {# Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #} + {% trans %}provided by {{ readthedocs_web }}{% endtrans %}. {%- endif %} + {%- block extrafooter %} {% endblock %} +
diff --git a/docs/themes/sphinx_rtd_theme/layout.html b/docs/themes/sphinx_rtd_theme/layout.html index 4eb797046c1..246d2112a33 100644 --- a/docs/themes/sphinx_rtd_theme/layout.html +++ b/docs/themes/sphinx_rtd_theme/layout.html @@ -6,10 +6,11 @@ {%- else %} {%- set titlesuffix = "" %} {%- endif %} +{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %} +{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' %} - - + {{ metatags }} @@ -18,125 +19,192 @@ {{ title|striptags|e }}{{ titlesuffix }} {% endblock %} - {# FAVICON #} - {% if favicon %} - - {% endif %} - {# CSS #} + + + {%- for css in css_files %} + {%- if css|attr("rel") %} + + {%- else %} + + {%- endif %} + {%- endfor %} - {# OPENSEARCH #} - {% if not embedded %} - {% if use_opensearch %} - - {% endif %} + {%- for cssfile in extra_css_files %} + + {%- endfor %} + {# FAVICON #} + {% if favicon %} + {% endif %} - - {# RTD hosts this file, so just load on non RTD builds #} - {% if not READTHEDOCS %} - + {# CANONICAL URL #} + {% if theme_canonical_url %} + {% endif %} - {% for cssfile in css_files %} - - {% endfor %} + {# JAVASCRIPTS #} + {%- block scripts %} + + {%- if not embedded %} + {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #} + {% if sphinx_version >= "1.8.0" %} + + {%- for scriptfile in script_files %} + {{ js_tag(scriptfile) }} + {%- endfor %} + {% else %} + + {%- for scriptfile in script_files %} + + {%- endfor %} + {% endif %} + - {% for cssfile in extra_css_files %} - - {% endfor %} + {# OPENSEARCH #} + {%- if use_opensearch %} + + {%- endif %} + {%- endif %} + {%- endblock %} {%- block linktags %} {%- if hasdoc('about') %} - + {%- endif %} {%- if hasdoc('genindex') %} - + {%- endif %} {%- if hasdoc('search') %} - + {%- endif %} {%- if hasdoc('copyright') %} - - {%- endif %} - - {%- if parents %} - + {%- endif %} {%- if next %} - + {%- endif %} {%- if prev %} - + {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} - - {# Keep modernizr in head - http://modernizr.com/docs/#installing #} - - - + + {% block extrabody %} {% endblock %}
- {# SIDE NAV, TOGGLES ON MOBILE #}
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} -
@@ -144,35 +212,27 @@
{% include "versions.html" %} - {% if not embedded %} - - - {%- for scriptfile in script_files %} - - {%- endfor %} - - {% endif %} - - {# RTD hosts this file, so just load on non RTD builds #} - {% if not READTHEDOCS %} - - {% endif %} - - {# STICKY NAVIGATION #} - {% if theme_sticky_navigation %} + + {# Do not conflict with RTD insertion of analytics script #} + {% if not READTHEDOCS %} + {% if theme_analytics_id %} + + + + {% endif %} {% endif %} {%- block footer %} {% endblock %} diff --git a/docs/themes/sphinx_rtd_theme/layout_old.html b/docs/themes/sphinx_rtd_theme/layout_old.html deleted file mode 100644 index deb8df2a1a7..00000000000 --- a/docs/themes/sphinx_rtd_theme/layout_old.html +++ /dev/null @@ -1,205 +0,0 @@ -{# - basic/layout.html - ~~~~~~~~~~~~~~~~~ - - Master layout template for Sphinx themes. - - :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} -{%- block doctype -%} - -{%- endblock %} -{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} -{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} -{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and - (sidebars != []) %} -{%- set url_root = pathto('', 1) %} -{# XXX necessary? #} -{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} -{%- if not embedded and docstitle %} - {%- set titlesuffix = " — "|safe + docstitle|e %} -{%- else %} - {%- set titlesuffix = "" %} -{%- endif %} - -{%- macro relbar() %} - -{%- endmacro %} - -{%- macro sidebar() %} - {%- if render_sidebar %} -
-
- {%- block sidebarlogo %} - {%- if logo %} - - {%- endif %} - {%- endblock %} - {%- if sidebars != None %} - {#- new style sidebar: explicitly include/exclude templates #} - {%- for sidebartemplate in sidebars %} - {%- include sidebartemplate %} - {%- endfor %} - {%- else %} - {#- old style sidebars: using blocks -- should be deprecated #} - {%- block sidebartoc %} - {%- include "localtoc.html" %} - {%- endblock %} - {%- block sidebarrel %} - {%- include "relations.html" %} - {%- endblock %} - {%- block sidebarsourcelink %} - {%- include "sourcelink.html" %} - {%- endblock %} - {%- if customsidebar %} - {%- include customsidebar %} - {%- endif %} - {%- block sidebarsearch %} - {%- include "searchbox.html" %} - {%- endblock %} - {%- endif %} -
-
- {%- endif %} -{%- endmacro %} - -{%- macro script() %} - - {%- for scriptfile in script_files %} - - {%- endfor %} -{%- endmacro %} - -{%- macro css() %} - - - {%- for cssfile in css_files %} - - {%- endfor %} -{%- endmacro %} - - - - - {{ metatags }} - {%- block htmltitle %} - {{ title|striptags|e }}{{ titlesuffix }} - {%- endblock %} - {{ css() }} - {%- if not embedded %} - {{ script() }} - {%- if use_opensearch %} - - {%- endif %} - {%- if favicon %} - - {%- endif %} - {%- endif %} -{%- block linktags %} - {%- if hasdoc('about') %} - - {%- endif %} - {%- if hasdoc('genindex') %} - - {%- endif %} - {%- if hasdoc('search') %} - - {%- endif %} - {%- if hasdoc('copyright') %} - - {%- endif %} - - {%- if parents %} - - {%- endif %} - {%- if next %} - - {%- endif %} - {%- if prev %} - - {%- endif %} -{%- endblock %} -{%- block extrahead %} {% endblock %} - - -{%- block header %}{% endblock %} - -{%- block relbar1 %}{{ relbar() }}{% endblock %} - -{%- block content %} - {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} - -
- {%- block document %} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {% block body %} {% endblock %} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {%- endblock %} - - {%- block sidebar2 %}{{ sidebar() }}{% endblock %} -
-
-{%- endblock %} - -{%- block relbar2 %}{{ relbar() }}{% endblock %} - -{%- block footer %} - -

asdf asdf asdf asdf 22

-{%- endblock %} - - - diff --git a/docs/themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..ae45f65ba19 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.po @@ -0,0 +1,143 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Tom Kunze , 2019 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Tom Kunze , 2019\n" +"Language-Team: German (https://www.transifex.com/readthedocs/teams/101354/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Auf GitHub bearbeiten" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Auf Bitbucket bearbeiten" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Auf GitLab bearbeiten" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Quelltext anzeigen" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Weiter" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Zurück" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Copyright" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Build" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Zuletzt aktualisiert am %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Erstellt mit %(sphinx_web)s mit einem" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "bereitgestellt von %(readthedocs_web)s" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "%(docstitle)s durchsuchen" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Über diese Dokumentation" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Index" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Suche" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Bitte aktiviere JavaScript, um die Suchfunktion zu nutzen." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Suchergebnisse" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"Es wurden keine mit deiner Suchanfrage übereinstimmenden Dokumente gefunden." +" Achte darauf, dass alle Wörter richtig geschrieben sind und dass genug " +"Kategorien ausgewählt sind." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Dokumentation durchsuchen" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versionen" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "Auf Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Projektübersicht" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Builds" + +#~ msgid "Docs" +#~ msgstr "Dokumentation" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Kostenloses Dokumentationen-Hosting zur Verfügung gestellt von" diff --git a/docs/themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..cbf7e9a7d7a --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po @@ -0,0 +1,156 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 15:43-0600\n" +"Last-Translator: FULL NAME \n" +"Language: en\n" +"Language-Team: en \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "" + +#. the variable "sphinx_web" is a link to the Sphinx project documentation with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "" + +#: sphinx_rtd_theme/layout.html:121 +msgid "Documentation Home" +msgstr "" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words " +"are spelled correctly and that you've selected enough categories." +msgstr "" + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "" + +#~ msgid "Docs" +#~ msgstr "" + +#~ msgid "Free document hosting provided by" +#~ msgstr "" + diff --git a/docs/themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..0b69d14192e --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po @@ -0,0 +1,164 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Anthony , 2019 +# Leonardo J. Caballero G. , 2020 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Leonardo J. Caballero G. , 2020\n" +"Language-Team: Spanish (https://www.transifex.com/readthedocs/teams/101354/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Editar en GitHub" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Editar en Bitbucket" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Editar en GitLab" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Ver código fuente de la página" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Siguiente" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Anterior" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Derechos de autor" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Construido" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Revisión" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Actualizado por última vez en %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Construido con %(sphinx_web)s usando un" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "tema" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "proporcionado por %(readthedocs_web)s" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Buscar en %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Sobre esta documentación" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Índice" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Búsqueda" + +#: sphinx_rtd_theme/layout.html:121 +msgid "Documentation Home" +msgstr "Inicio de Documentación" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logotipo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" +"Por favor, active JavaScript para habilitar la funcionalidad de búsqueda." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Resultados de la búsqueda" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"Su búsqueda no coincide con ningún documento. Por favor, asegúrese de que " +"todas las palabras estén correctamente escritas y que usted haya " +"seleccionado las suficientes categorías." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Buscar documentos" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versiones" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Descargas" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "En Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Página de Proyecto" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Construcciones" + +#~ msgid "Docs" +#~ msgstr "Documentos" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Alojamiento gratuito de documentos proporcionado por" diff --git a/docs/themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..e2217542ae1 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po @@ -0,0 +1,155 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Anthony , 2020 +# Ivar Smolin , 2020 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Ivar Smolin , 2020\n" +"Language-Team: Estonian (https://www.transifex.com/readthedocs/teams/101354/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Muuda GitHubis" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Muuda Bitbucketis" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Muuda GitLabis" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Vaata lehe lähtekoodi" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Järgmine" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Eelmine" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Autoriõigus" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Ehitus" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Redaktsioon" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Viimati uuendatud %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Ehitatud %(sphinx_web)s'iga," + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "kujundusteema" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Otsi dokumendist %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Nende dokumentide kirjeldused" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Indeks" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Otsing" + +#: sphinx_rtd_theme/layout.html:121 +msgid "Documentation Home" +msgstr "Dokumentatsiooni kodu" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Otsimisfunktsiooni lubamiseks aktiveeri palun JavaScript" + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Otsingu tulemused" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"Sinu otsingule ei vastanud ükski dokument. Palun veendu, et kõik sisestatud " +"sõnad on õigesti kirjutatud ja sa oled valikud piisaval hulgal kategooriaid." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Otsi dokumente" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versioonid" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Allalaadimised" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "Saidil Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Projekti kodu" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Ehitused" + +#~ msgid "Docs" +#~ msgstr "Dokumendid" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Dokumentatsiooni majutab tasuta" diff --git a/docs/themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..b8c69d92aa9 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.po @@ -0,0 +1,154 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Radina Matic , 2020 +# Anthony , 2020 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Anthony , 2020\n" +"Language-Team: French (https://www.transifex.com/readthedocs/teams/101354/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Éditer sur GitHub" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Éditer sur Bitbucket" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Éditer sur GitLab" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Afficher la source de la page" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Suivant" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Précédent" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Droits d'auteur" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Compilation" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Révision" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Dernière mise à jour le %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Compilé avec %(sphinx_web)s en utilisant un" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "thème" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "fourni par %(readthedocs_web)s" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Rechercher dans %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "À propos de cette documentation" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Index" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Rechercher" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Activez JavaScript pour accéder à la fonction de recherche." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Résultats de la recherche" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"Votre recherche ne correspond à aucun document. Assurez-vous que tous les " +"mots sont correctement orthographiés et que vous avez sélectionné " +"suffisamment de catégories." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Rechercher docs" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versions" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Téléchargements" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Accueil du projet" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Compilations" + +#~ msgid "Docs" +#~ msgstr "Docs" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Hébergement gratuit de documents fourni par" diff --git a/docs/themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..7963c0278a1 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po @@ -0,0 +1,157 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Jesse Tan, 2019 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Jesse Tan, 2019\n" +"Language-Team: Dutch (https://www.transifex.com/readthedocs/teams/101354/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Bewerk op GitHub" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Bewerk op BitBucket" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Bewerk op GitLab" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Bekijk paginabron" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Volgende" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Vorige" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Copyright" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Bouwresultaat" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Revisie" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Laatste update op %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Gebouwd met %(sphinx_web)s met een" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "thema" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "geleverd door %(readthedocs_web)s" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Zoek binnen %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Over deze documenten" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Index" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Zoek" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Zet JavaScript aan om de zoekfunctie mogelijk te maken." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Zoekresultaten" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"Zoekpoging vond geen documenten. Zorg ervoor dat alle woorden correct zijn " +"gespeld en dat voldoende categorieën zijn geselecteerd." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Zoek in documentatie" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versies" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Downloads" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "Op Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Project Home" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Bouwresultaten" + +#~ msgid "Docs" +#~ msgstr "Documentatie" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Gratis hosting voor documentatie verzorgd door" diff --git a/docs/themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..8b5e7607fee --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po @@ -0,0 +1,159 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Rafael Fontenelle , 2020 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Rafael Fontenelle , 2020\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/readthedocs/teams/101354/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Editar no GitHub" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Editar no Bitbucket" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Editar no GitLab" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Ver código-fonte da página" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Próximo" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Anterior" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Copyright" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Compilação" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Revisão" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Última atualização em %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Compilado com %(sphinx_web)s usando um" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "tema" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "fornecido por %(readthedocs_web)s" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Pesquisar em %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Sobre esses documentos" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Índice" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Pesquisar" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" +"Por favor, ative JavaScript para habilitar a funcionalidade de pesquisa." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Resultados da pesquisa" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"A sua pesquisa não encontrou nenhum documento correspondente. Verifique se " +"todas as palavras estão escritas corretamente e se você selecionou " +"categorias suficientes." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Pesquisar documentos" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versões" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Downloads" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "No Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Página inicial" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Compilações" + +#~ msgid "Docs" +#~ msgstr "Docs" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Hospedagem de documentos livres fornecida por" diff --git a/docs/themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..1648d8d1ae8 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po @@ -0,0 +1,158 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Dmitry Shachnev , 2019 +# lvv83 , 2019 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: lvv83 , 2019\n" +"Language-Team: Russian (https://www.transifex.com/readthedocs/teams/101354/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Редактировать на GitHub" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Редактировать на BitBucket" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Редактировать на GitLab" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Просмотреть исходный код страницы" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Следующая" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Предыдущая" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Авторские права" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Сборка" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Ревизия" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Последний раз обновлено %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Собрано при помощи %(sphinx_web)s с использованием" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "темы," + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "предоставленной %(readthedocs_web)s" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Поиск в %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Об этих документах" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Алфавитный указатель" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Поиск" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Логотип" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Активируйте JavaScript, чтобы использовать функционал поиска." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Результаты поиска" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"По Вашему запросу не найдено результатов. Пожалуйста, проверьте, что все " +"слова написаны правильно, и Вы выбрали нужные категории." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Поиск в документации" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Версии" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Загрузки" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "На Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Домашняя страница проекта" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Сборки" + +#~ msgid "Docs" +#~ msgstr "Документация" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Бесплатный хостинг документов, предоставленный" diff --git a/docs/themes/sphinx_rtd_theme/locale/sphinx.pot b/docs/themes/sphinx_rtd_theme/locale/sphinx.pot new file mode 100644 index 00000000000..ab183f810de --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/sphinx.pot @@ -0,0 +1,149 @@ +# Translations template for sphinx_rtd_theme. +# Copyright (C) 2020 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2020. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "" + +#. the variable "sphinx_web" is a link to the Sphinx project documentation with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "" + +#: sphinx_rtd_theme/layout.html:121 +msgid "Documentation Home" +msgstr "" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words " +"are spelled correctly and that you've selected enough categories." +msgstr "" + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "" + diff --git a/docs/themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..e9d80b05465 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po @@ -0,0 +1,158 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# Daniel Holmberg , 2020 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Daniel Holmberg , 2020\n" +"Language-Team: Swedish (https://www.transifex.com/readthedocs/teams/101354/sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Editera på GitHub" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Editera på Bitbucket" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Editera på GitLab" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Visa sidkälla" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Nästa" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Tillbaka" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Upphovsrätt" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Bygg" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Ändra" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Senast uppdaterad %(last_updated)s." + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Gjord med %(sphinx_web)s med hjälp av" + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "tema" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "erhållet av %(readthedocs_web)s" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Sök i %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Om dessa dokument" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Index" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Sök" + +#: sphinx_rtd_theme/layout.html:121 +msgid "Documentation Home" +msgstr "Dokumentation Hem" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" +"Var vänlig och aktivera JavaScript för att möjliggöra sökfunktionaliteten." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Sökresultat" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"Din sökning gav inga träffar. Var vänlig och se till att alla ord är rätt " +"stavade och att du har valt tillräckligt många kategorier." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Sök i dokumentationen" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versioner" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Nerladdningar" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "På Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Projekt Hem" + +#~ msgid "Docs" +#~ msgstr "Dokumentation" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Gratis dokumentations hysning erhållen av" diff --git a/docs/themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..4f75e068fe9 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po @@ -0,0 +1,147 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# BouRock, 2020 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: BouRock, 2020\n" +"Language-Team: Turkish (https://www.transifex.com/readthedocs/teams/101354/tr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: tr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "GitHub'da Düzenle" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Bitbucket'ta Düzenle" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "GitLab'ta Düzenle" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Sayfa kaynağını görüntüle" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Sonraki" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Önceki" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "Telif hakkı" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "Oluşturma" + +#. the phrase "revision" comes from Git, referring to a commit +#: sphinx_rtd_theme/footer.html:37 +msgid "Revision" +msgstr "Gözden geçirme" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Son olarak %(last_updated)s tarihinde güncellendi." + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "tema" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "kullanılarak %(readthedocs_web)s tarafından sağlanmasıyla oluşturuldu" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "%(docstitle)s içinde ara" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "Bu belgeler hakkında" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "Dizin" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Arama" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" +"Arama işlevselliğini etkinleştirmek için lütfen JavaScript'i etkinleştirin." + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "Arama Sonuçları" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "" +"Aramanız hiçbir belgeyle eşleşmedi. Lütfen tüm kelimelerin doğru " +"yazıldığından ve yeterli kategori seçtiğinizden emin olun." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Belgeleri arayın" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Sürümler" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "İndirmeler" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "Read the Docs Üzerinde" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "Proje Ana Sayfa" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "Oluşturmalar" + +#~ msgid "Free document hosting provided by" +#~ msgstr "Ücretsiz belge barındırmayı sağlayan" diff --git a/docs/themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po b/docs/themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000000..f30abb64ac3 --- /dev/null +++ b/docs/themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po @@ -0,0 +1,151 @@ +# English translations for sphinx_rtd_theme. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2019. +# +# Translators: +# 王赛 , 2019 +# Anthony , 2020 +# +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-06 13:38-0600\n" +"PO-Revision-Date: 2019-07-16 21:44+0000\n" +"Last-Translator: Anthony , 2020\n" +"Language-Team: Chinese (China) (https://www.transifex.com/readthedocs/teams/101354/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.8.0\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "在 GitHub 上修改" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "在 Bitbucket 上修改" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "在 GitLab 上修改" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "查看页面源码" + +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "下一页" + +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "上一页" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:96 +msgid "Copyright" +msgstr "版权所有" + +#. Build is a noun, not a verb +#: sphinx_rtd_theme/footer.html:31 +msgid "Build" +msgstr "构建" + +#: sphinx_rtd_theme/footer.html:41 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "最后更新时间 %(last_updated)s。" + +#. the variable "sphinx_web" is a link to the Sphinx project documentation +#. with +#. the text "Sphinx" +#: sphinx_rtd_theme/footer.html:52 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "利用 %(sphinx_web)s 构建,使用了 " + +#. "theme" refers to a theme for Sphinx, which alters the appearance of the +#. generated documenation +#: sphinx_rtd_theme/footer.html:54 +msgid "theme" +msgstr "主题" + +#. this is always used as "provided by Read the Docs", and should not imply +#. Read the Docs is an author of the generated documentation. +#: sphinx_rtd_theme/footer.html:56 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "由 %(readthedocs_web)s开发" + +#: sphinx_rtd_theme/layout.html:79 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "在 %(docstitle)s中搜索" + +#: sphinx_rtd_theme/layout.html:87 +msgid "About these documents" +msgstr "关于此文档" + +#: sphinx_rtd_theme/layout.html:90 +msgid "Index" +msgstr "索引" + +#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "搜索" + +#: sphinx_rtd_theme/layout.html:128 +msgid "Logo" +msgstr "Logo" + +#: sphinx_rtd_theme/search.html:29 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "请启用 JavaScript 以便使用搜索功能" + +#. Search is a noun, not a verb +#: sphinx_rtd_theme/search.html:37 +msgid "Search Results" +msgstr "搜索结果" + +#: sphinx_rtd_theme/search.html:39 +msgid "" +"Your search did not match any documents. Please make sure that all words are" +" spelled correctly and that you've selected enough categories." +msgstr "您的搜索没有匹配到任何文档。请确保所有单词拼写正确,并选择了足够多的类别。" + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "在文档中搜索" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "版本列表" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "下载链接" + +#. The phrase "Read the Docs" is not translated +#: sphinx_rtd_theme/versions.html:24 +msgid "On Read the Docs" +msgstr "托管于 Read the Docs" + +#: sphinx_rtd_theme/versions.html:26 +msgid "Project Home" +msgstr "项目首页" + +#: sphinx_rtd_theme/versions.html:29 +msgid "Builds" +msgstr "构建" + +#~ msgid "Docs" +#~ msgstr "文档" + +#~ msgid "Free document hosting provided by" +#~ msgstr "此文档免费托管于" diff --git a/docs/themes/sphinx_rtd_theme/search.html b/docs/themes/sphinx_rtd_theme/search.html index e3aa9b5c6e7..10ac568c41d 100644 --- a/docs/themes/sphinx_rtd_theme/search.html +++ b/docs/themes/sphinx_rtd_theme/search.html @@ -9,7 +9,10 @@ #} {%- extends "layout.html" %} {% set title = _('Search') %} -{% set script_files = script_files + ['_static/searchtools.js'] %} +{%- block scripts %} + {{ super() }} + +{%- endblock %} {% block footer %}