summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-09-02 21:52:13 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-09-02 21:53:37 -0400
commit9995269f06d5142062404408af6d250e4921fb4e (patch)
tree4ca088e5e2fbf760918584db436dae45571e3dd4
parent65290eb0f9e6f4f08102fddbf0152ae1dc5d5728 (diff)
galaxian.cpp: Video and timing updates from #3783 [kazblox]
* Correct sync in Take Off, Explorer, and set 2 of Amigo. Sidam bootlegs of Konami games have a 12MHz pixel clock with video being scaled by two pixels instead of 3. * Correct Jump Bug background hardware behavior, as per real hardware. Stars actually show up until the 232nd pixel. * Correct bullet behavior in Scramble. Shells are now two pixels long, and have been verified on real hardware. * Fix(?) clocks on jungsub. The Subelectro 113 board has no XTALs, and I am assuming the CLK lines come from the pixel clock on the Konami L-1200-2 board. * Given Take Off's hardware hierarchy, correct the year from 1980 to 1981 as a guess. * Correct machine setup for Take Off, Explorer, and set 2 of Amigo. All are now correctly set up as per the 12 MHz pixel clock. * Mark Explorer and set 2 of Amigo as MACHINE_IMPERFECT_SOUND. Explorer requires the same sound timer as Take Off, which I have no idea how it works. The latter probably has a similar case, although it might be different from Explorer. * Mark Take Off as MACHINE_WRONG_COLORS. See the reference video for more; some colors that are purple with the default palette_init are green on real hardware. * Correct background hardware on SF-X and Monster Zero to now show stars and RGB backgrounds. Colors may not be correct, and the current schematics scans are not easy to read. * Converted galaxian.cpp to use MCFG_SCREEN_VBLANK_CALLBACK. * turpins is likely more derived from Super Cobra hardware than Scramble hardware. Change the set description to match this statement.
-rw-r--r--src/mame/drivers/galaxian.cpp237
-rw-r--r--src/mame/includes/galaxian.h53
-rw-r--r--src/mame/video/galaxian.cpp72
3 files changed, 201 insertions, 161 deletions
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index 24347dc6d14..a06ed653f92 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -667,28 +667,23 @@ TODO:
#include "screen.h"
#include "speaker.h"
-
-#define KONAMI_SOUND_CLOCK XTAL(14'318'181)
-
-
-
/*************************************
*
* Interrupts
*
*************************************/
-INTERRUPT_GEN_MEMBER(galaxian_state::interrupt_gen)
+WRITE_LINE_MEMBER(galaxian_state::vblank_interrupt_w)
{
/* interrupt line is clocked at VBLANK */
/* a flip-flop at 6F is held in the preset state based on the NMI ON signal */
- if (m_irq_enabled)
- device.execute().set_input_line(m_irq_line, ASSERT_LINE);
+ if (state && m_irq_enabled)
+ m_maincpu->set_input_line(m_irq_line, ASSERT_LINE);
}
-INTERRUPT_GEN_MEMBER(galaxian_state::fakechange_interrupt_gen)
+WRITE_LINE_MEMBER(galaxian_state::tenspot_interrupt_w)
{
- interrupt_gen(device);
+ vblank_interrupt_w(state);
if (m_fake_select.read_safe(0x00))
{
@@ -827,20 +822,23 @@ READ8_MEMBER(galaxian_state::konami_sound_timer_r)
WRITE8_MEMBER(galaxian_state::konami_sound_filter_w)
{
- /* the offset is used as data, 6 channels * 2 bits each */
- /* AV0 .. AV5 ==> AY8910 #2 */
- /* AV6 .. AV11 ==> AY8910 #1 */
- for (int which = 0; which < 2; which++)
+ if (m_discrete != nullptr)
{
- if (m_ay8910[which] != nullptr)
+ /* the offset is used as data, 6 channels * 2 bits each */
+ /* AV0 .. AV5 ==> AY8910 #2 */
+ /* AV6 .. AV11 ==> AY8910 #1 */
+ for (int which = 0; which < 2; which++)
{
- for (int chan = 0; chan < 3; chan++)
+ if (m_ay8910[which] != nullptr)
{
- uint8_t bits = (offset >> (2 * chan + 6 * (1 - which))) & 3;
-
- /* low bit goes to 0.22uF capacitor = 220000pF */
- /* high bit goes to 0.047uF capacitor = 47000pF */
- m_discrete->write(space, NODE(3 * which + chan + 11), bits);
+ for (int chan = 0; chan < 3; chan++)
+ {
+ uint8_t bits = (offset >> (2 * chan + 6 * (1 - which))) & 3;
+
+ /* low bit goes to 0.22uF capacitor = 220000pF */
+ /* high bit goes to 0.047uF capacitor = 47000pF */
+ m_discrete->write(space, NODE(3 * which + chan + 11), bits);
+ }
}
}
}
@@ -1706,27 +1704,8 @@ void galaxian_state::fantastc_map(address_map &map)
map(0xb000, 0xb000).mirror(0x07f8).w(FUNC(galaxian_state::irq_enable_w));
map(0xb800, 0xb800).mirror(0x07ff).r("watchdog", FUNC(watchdog_timer_device::reset_r));
map(0xfffe, 0xfffe).noprw(); // ?
-}
-
-void galaxian_state::timefgtr_map(address_map &map)
-{
- map.unmap_value_high();
- map(0x0000, 0x7fff).rom();
- map(0x8000, 0x87ff).ram();
- map(0x8803, 0x8803).w("8910.0", FUNC(ay8910_device::address_w));
- map(0x880b, 0x880b).w("8910.0", FUNC(ay8910_device::data_w));
- map(0x880c, 0x880c).w("8910.1", FUNC(ay8910_device::address_w));
- map(0x880e, 0x880e).w("8910.1", FUNC(ay8910_device::data_w));
- map(0x9000, 0x93ff).mirror(0x0400).ram().w(FUNC(galaxian_state::galaxian_videoram_w)).share("videoram");
- map(0x9800, 0x9bff).mirror(0x0400).ram().w(FUNC(galaxian_state::galaxian_objram_w)).share("spriteram");
- map(0xa000, 0xa000).mirror(0x07ff).portr("IN0");
- map(0xa800, 0xa800).mirror(0x07ff).portr("IN1");
- map(0xb000, 0xb000).mirror(0x07ff).portr("IN2");
- map(0xb000, 0xb000).mirror(0x07f8).w(FUNC(galaxian_state::irq_enable_w));
- map(0xb004, 0xb004).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_stars_enable_w));
- map(0xb800, 0xb800).mirror(0x07ff).r("watchdog", FUNC(watchdog_timer_device::reset_r));
// AM_RANGE(0xb800, 0xb800) AM_WRITENOP // ?
-// AM_RANGE(0xfff8, 0xffff) AM_WRITENOP // sound related?
+// AM_RANGE(0xfff8, 0xffff) AM_WRITENOP // timefgtr, sound related?
}
void galaxian_state::zigzag_map(address_map &map)
@@ -1780,11 +1759,11 @@ void galaxian_state::explorer_map(address_map &map)
map(0x4000, 0x47ff).ram();
map(0x4800, 0x4bff).mirror(0x0400).ram().w(FUNC(galaxian_state::galaxian_videoram_w)).share("videoram");
map(0x5000, 0x50ff).mirror(0x0700).ram().w(FUNC(galaxian_state::galaxian_objram_w)).share("spriteram");
- map(0x6800, 0x6800).nopw(); // ????
+ map(0x6800, 0x6800).mirror(0x07f8).nopw(); // ????
map(0x6801, 0x6801).mirror(0x07f8).w(FUNC(galaxian_state::irq_enable_w));
map(0x6802, 0x6802).mirror(0x07f8).w(FUNC(galaxian_state::coin_count_0_w));
- map(0x6803, 0x6803).mirror(0x07f8).w(FUNC(galaxian_state::scramble_background_enable_w));
- map(0x6804, 0x6804).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_stars_enable_w));
+ map(0x6803, 0x6803).mirror(0x07f8).nopw();
+ map(0x6804, 0x6804).mirror(0x07f8).nopw();
map(0x6805, 0x6805).mirror(0x07f8); //POUT2
map(0x6806, 0x6806).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_flip_screen_x_w));
map(0x6807, 0x6807).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_flip_screen_y_w));
@@ -5851,6 +5830,11 @@ static GFXDECODE_START(gfx_galaxian)
GFXDECODE_SCALE("gfx1", 0x0000, galaxian_spritelayout, 0, 8, GALAXIAN_XSCALE,1)
GFXDECODE_END
+static GFXDECODE_START(gfx_sidam)
+ GFXDECODE_SCALE("gfx1", 0x0000, galaxian_charlayout, 0, 8, SIDAM_XSCALE,1)
+ GFXDECODE_SCALE("gfx1", 0x0000, galaxian_spritelayout, 0, 8, SIDAM_XSCALE,1)
+GFXDECODE_END
+
static GFXDECODE_START(gfx_gmgalax)
GFXDECODE_SCALE("gfx1", 0x0000, galaxian_charlayout, 0, 16, GALAXIAN_XSCALE,1)
GFXDECODE_SCALE("gfx1", 0x0000, galaxian_spritelayout, 0, 16, GALAXIAN_XSCALE,1)
@@ -5936,7 +5920,6 @@ MACHINE_CONFIG_START(galaxian_state::galaxian_base)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, GALAXIAN_PIXEL_CLOCK/3/2)
MCFG_DEVICE_PROGRAM_MAP(galaxian_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", galaxian_state, interrupt_gen)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_VBLANK_INIT("screen", 8)
@@ -5949,7 +5932,7 @@ MACHINE_CONFIG_START(galaxian_state::galaxian_base)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(GALAXIAN_PIXEL_CLOCK, GALAXIAN_HTOTAL, GALAXIAN_HBEND, GALAXIAN_HBSTART, GALAXIAN_VTOTAL, GALAXIAN_VBEND, GALAXIAN_VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(galaxian_state, screen_update_galaxian)
-
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, galaxian_state, vblank_interrupt_w))
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@@ -5957,6 +5940,21 @@ MACHINE_CONFIG_END
+MACHINE_CONFIG_START(galaxian_state::sidam_bootleg_base)
+ galaxian_base(config);
+
+ /* basic machine hardware */
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_CLOCK(12_MHz_XTAL / 2 / 2)
+
+ /* video hardware */
+ MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_sidam)
+
+ MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_RAW_PARAMS(12_MHz_XTAL, SIDAM_HTOTAL, SIDAM_HBEND, SIDAM_HBSTART, GALAXIAN_VTOTAL, GALAXIAN_VBEND, GALAXIAN_VBSTART)
+MACHINE_CONFIG_END
+
+
MACHINE_CONFIG_START(galaxian_state::konami_base)
galaxian_base(config);
@@ -6085,9 +6083,6 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(galaxian_state::tenspot)
galaxian(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", galaxian_state, fakechange_interrupt_gen)
-
/* basic machine hardware */
MCFG_DEVICE_ADD("selectcpu", Z80, GALAXIAN_PIXEL_CLOCK/3/2) // ?? mhz
MCFG_DEVICE_PROGRAM_MAP(tenspot_select_map)
@@ -6095,6 +6090,11 @@ MACHINE_CONFIG_START(galaxian_state::tenspot)
/* separate tile/sprite ROMs */
MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_tenspot)
+ // MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse)
+
+ /* video hardware */
+ MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, galaxian_state, tenspot_interrupt_w))
MACHINE_CONFIG_END
MACHINE_CONFIG_START(galaxian_state::zigzag)
@@ -6195,20 +6195,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::timefgtr_scanline)
}
MACHINE_CONFIG_START(galaxian_state::timefgtr)
- galaxian_base(config);
+ fantastc(config);
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galaxian_state, timefgtr_scanline, "screen", 0, 1)
-
- /* alternate memory map */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(timefgtr_map)
-
- /* sound hardware */
- MCFG_DEVICE_ADD("8910.0", AY8910, GALAXIAN_PIXEL_CLOCK/3/2) // 3.072MHz
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
-
- MCFG_DEVICE_ADD("8910.1", AY8910, GALAXIAN_PIXEL_CLOCK/3/2) // 3.072MHz
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -6349,29 +6338,6 @@ MACHINE_CONFIG_START(galaxian_state::turtles)
MCFG_DEVICE_PROGRAM_MAP(turtles_map)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(galaxian_state::amigo2) // bootleg has no i8255s
- galaxian_base(config);
-
- /* alternate memory map */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(amigo2_map)
-
- konami_sound_2x_ay8910(config);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(galaxian_state::turpins)
- turtles(config);
-
- // the ROMs came from a blister, so there aren't PCB infos available. Chip types and clocks are guessed.
-
- /* alternate memory map */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(turpins_map)
-
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(turpins_sound_map)
-MACHINE_CONFIG_END
-
MACHINE_CONFIG_START(galaxian_state::theend)
konami_base(config);
@@ -6405,7 +6371,7 @@ MACHINE_CONFIG_START(galaxian_state::jungsub)
MCFG_DEVICE_PROGRAM_MAP(jungsub_map)
MCFG_DEVICE_IO_MAP(jungsub_io_map)
- MCFG_DEVICE_ADD("audiocpu", Z80, KONAMI_SOUND_CLOCK/8) // clock not verified
+ MCFG_DEVICE_ADD("audiocpu", Z80, GALAXIAN_PIXEL_CLOCK / 3 / 2) // clock not verified
MCFG_DEVICE_PROGRAM_MAP(checkman_sound_map)
MCFG_DEVICE_IO_MAP(checkman_sound_portmap)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", galaxian_state, irq0_line_hold)
@@ -6414,43 +6380,39 @@ MACHINE_CONFIG_START(galaxian_state::jungsub)
MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("audiocpu", INPUT_LINE_NMI))
/* sound hardware */
- MCFG_DEVICE_ADD("8910.0", AY8910, KONAMI_SOUND_CLOCK/8) // clock not verified
+ MCFG_DEVICE_ADD("8910.0", AY8910, GALAXIAN_PIXEL_CLOCK / 3 / 2 / 2) // clock not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(galaxian_state::explorer)
- galaxian_base(config);
+MACHINE_CONFIG_START(galaxian_state::explorer) // Sidam 10800
+ sidam_bootleg_base(config);
/* alternate memory map */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(explorer_map)
/* 2nd CPU to drive sound */
- MCFG_DEVICE_ADD("audiocpu", Z80,KONAMI_SOUND_CLOCK/8)
+ MCFG_DEVICE_ADD("audiocpu", Z80, 12_MHz_XTAL / 2 / 2 / 2) /* clock not verified */
MCFG_DEVICE_PROGRAM_MAP(konami_sound_map)
MCFG_DEVICE_IO_MAP(konami_sound_portmap)
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
/* sound hardware is a pair of AY-3-8912 */
- MCFG_DEVICE_ADD("8910.0", AY8912, KONAMI_SOUND_CLOCK/8)
+ MCFG_DEVICE_ADD("8910.0", AY8912, 12_MHz_XTAL / 2 / 2 / 2) /* matches PCB, needs verification */
MCFG_AY8910_PORT_A_READ_CB(READ8(*this, galaxian_state, explorer_sound_latch_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DEVICE_ADD("8910.1", AY8912, KONAMI_SOUND_CLOCK/8)
+ MCFG_DEVICE_ADD("8910.1", AY8912, 12_MHz_XTAL / 2 / 2 / 2) /* matches PCB, needs verification */
MCFG_AY8910_PORT_A_READ_CB(READ8(*this, galaxian_state, konami_sound_timer_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(galaxian_state::takeoff) // takeoff shares the same main map as explorer, but uses only one AY8912 for sound.
+MACHINE_CONFIG_START(galaxian_state::takeoff) // Sidam 10900, with 1 x AY-3-8912
explorer(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(XTAL(12'000'000) / 8) // XTAL verified, divider not verified
-
/* 2nd CPU to drive sound */
MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_CLOCK(XTAL(12'000'000) / 8)
MCFG_DEVICE_PROGRAM_MAP(takeoff_sound_map)
MCFG_DEVICE_IO_MAP(takeoff_sound_portmap)
@@ -6463,6 +6425,28 @@ MACHINE_CONFIG_START(galaxian_state::takeoff) // takeoff shares the same main ma
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
+MACHINE_CONFIG_START(galaxian_state::amigo2) // marked "AMI", but similar to above
+ sidam_bootleg_base(config);
+
+ /* alternate memory map */
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(amigo2_map)
+
+ /* 2nd CPU to drive sound */
+ MCFG_DEVICE_ADD("audiocpu", Z80, 12_MHz_XTAL / 2 / 2 / 2) /* clock not verified */
+ MCFG_DEVICE_PROGRAM_MAP(konami_sound_map)
+ MCFG_DEVICE_IO_MAP(konami_sound_portmap)
+ MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+
+ /* sound hardware */
+ MCFG_DEVICE_ADD("8910.0", AY8910, 12_MHz_XTAL / 2 / 2 / 2) /* matches PCB, needs verification */
+ MCFG_AY8910_PORT_A_READ_CB(READ8("soundlatch", generic_latch_8_device, read))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(*this, galaxian_state, konami_sound_timer_r))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("8910.1", AY8910, 12_MHz_XTAL / 2 / 2 / 2) /* matches PCB, needs verification */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+MACHINE_CONFIG_END
+
MACHINE_CONFIG_START(galaxian_state::scorpion)
scramble_base(config);
/* alternate memory map */
@@ -6483,7 +6467,7 @@ MACHINE_CONFIG_START(galaxian_state::scorpion)
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(*this, galaxian_state, scorpion_digitalker_control_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DIGITALKER_ADD("digitalker", 4000000)
+ MCFG_DIGITALKER_ADD("digitalker", 4_MHz_XTAL)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
MACHINE_CONFIG_END
@@ -6611,11 +6595,7 @@ MACHINE_CONFIG_START(galaxian_state::quaak)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(galaxian_state::froggeram)
- konami_base(config);
- konami_sound_2x_ay8910(config);
-
- MCFG_DEVICE_MODIFY("8910.0")
- MCFG_AY8910_PORT_B_READ_CB(READ8(*this, galaxian_state, frogger_sound_timer_r))
+ quaak(config);
/* alternate memory map */
MCFG_DEVICE_MODIFY("maincpu")
@@ -6623,6 +6603,18 @@ MACHINE_CONFIG_START(galaxian_state::froggeram)
MACHINE_CONFIG_END
+MACHINE_CONFIG_START(galaxian_state::turpins) // the ROMs came from a blister, so there aren't PCB infos available. Chip types and clocks are guessed.
+ scobra(config);
+
+ /* alternate memory map */
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(turpins_map)
+
+ MCFG_DEVICE_MODIFY("audiocpu")
+ MCFG_DEVICE_PROGRAM_MAP(turpins_sound_map)
+MACHINE_CONFIG_END
+
+
MACHINE_CONFIG_START(galaxian_state::anteater)
scobra(config);
@@ -6899,6 +6891,8 @@ void galaxian_state::decode_victoryc()
void galaxian_state::common_init(galaxian_draw_bullet_func draw_bullet,galaxian_draw_background_func draw_background,
galaxian_extend_tile_info_func extend_tile_info,galaxian_extend_sprite_info_func extend_sprite_info)
{
+ m_x_scale = GALAXIAN_XSCALE;
+ m_h0_start = GALAXIAN_H0START;
m_irq_enabled = 0;
m_irq_line = INPUT_LINE_NMI;
m_numspritegens = 1;
@@ -7447,12 +7441,6 @@ void galaxian_state::init_scramble()
common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
}
-void galaxian_state::init_explorer()
-{
- // not sure how stars work here, but there is definitely no 555 timer
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
-}
-
void galaxian_state::init_mandinga()
{
init_scramble();
@@ -7467,7 +7455,7 @@ void galaxian_state::init_mandinga()
void galaxian_state::init_sfx()
{
/* basic configuration */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, &galaxian_state::upper_extend_tile_info, nullptr);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::sfx_draw_background, &galaxian_state::upper_extend_tile_info, nullptr);
m_sfx_tilemap = true;
/* sound board has space for extra ROM */
@@ -7490,7 +7478,26 @@ void galaxian_state::init_atlantis()
}
+void galaxian_state::init_sidam()
+{
+ /* adjust for 12 MHz pixel clock */
+ m_x_scale = SIDAM_XSCALE;
+ m_h0_start = SIDAM_H0START;
+}
+void galaxian_state::init_explorer()
+{
+ /* video extensions */
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::null_draw_background, nullptr, nullptr); // no 555 timer; there might be no stars at all
+ init_sidam();
+}
+
+void galaxian_state::init_amigo2()
+{
+ /* video extensions */
+ init_turtles();
+ init_sidam();
+}
void galaxian_state::init_scobra()
@@ -7552,7 +7559,7 @@ void galaxian_state::init_frogger()
void galaxian_state::init_quaak()
{
/* video extensions */
- common_init(nullptr, &galaxian_state::quaak_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
+ common_init(nullptr, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
}
@@ -10787,7 +10794,7 @@ ROM_START( turpins )
ROM_LOAD( "tur.4f", 0x0000, 0x0800, CRC(e5999d52) SHA1(bc3f52cf6c6e19dfd2dacd1e8c9128f437e995fc) )
ROM_LOAD( "tur.5f", 0x0800, 0x0800, CRC(c3ffd655) SHA1(dee51d77be262a2944488e381541c10a2b6e5d83) )
- ROM_REGION( 0x0020, "proms", 0 ) // missing, but the original hw is so close to scramble that the original prom works
+ ROM_REGION( 0x0020, "proms", 0 ) // missing, but the original hw is so close to scobra that the original prom works
ROM_LOAD( "turtles.clr", 0x0000, 0x0020, BAD_DUMP CRC(f3ef02dd) SHA1(09fd795170d7d30f101d579f57553da5ff3800ab) )
ROM_END
@@ -12510,7 +12517,7 @@ GAME( 1981, froggeram, frogger, froggeram, froggeram, galaxian_state, init_
GAME( 1981, turtles, 0, turtles, turtles, galaxian_state, init_turtles, ROT90, "Konami (Stern Electronics license)", "Turtles", MACHINE_SUPPORTS_SAVE )
GAME( 1981, turpin, turtles, turtles, turpin, galaxian_state, init_turtles, ROT90, "Konami (Sega license)", "Turpin", MACHINE_SUPPORTS_SAVE )
GAME( 1981, 600, turtles, turtles, turtles, galaxian_state, init_turtles, ROT90, "Konami", "600", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, turpins, turtles, turpins, turtles, galaxian_state, init_turtles, ROT90, "bootleg", "Turpin (bootleg on Scramble hardware)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // tempo is way too fast
+GAME( 1981, turpins, turtles, turpins, turtles, galaxian_state, init_turtles, ROT90, "bootleg", "Turpin (bootleg on Super Cobra hardware)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // needs different sound timer
GAME( 1982, amidar, 0, turtles, amidaru, galaxian_state, init_turtles, ROT90, "Konami", "Amidar", MACHINE_SUPPORTS_SAVE )
GAME( 1981, amidar1, amidar, turtles, amidar, galaxian_state, init_turtles, ROT90, "Konami", "Amidar (older)", MACHINE_SUPPORTS_SAVE )
@@ -12518,7 +12525,7 @@ GAME( 1982, amidaru, amidar, turtles, amidaru, galaxian_state, init_
GAME( 1982, amidaro, amidar, turtles, amidaro, galaxian_state, init_turtles, ROT90, "Konami (Olympia license)", "Amidar (Olympia)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, amidarb, amidar, turtles, amidaru, galaxian_state, init_turtles, ROT90, "bootleg", "Amidar (bootleg)", MACHINE_SUPPORTS_SAVE ) /* similar to Amigo bootleg */
GAME( 1982, amigo, amidar, turtles, amidaru, galaxian_state, init_turtles, ROT90, "bootleg", "Amigo (bootleg of Amidar, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, amigo2, amidar, amigo2, amidaru, galaxian_state, init_turtles, ROT90, "bootleg", "Amigo (bootleg of Amidar, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, amigo2, amidar, amigo2, amidaru, galaxian_state, init_amigo2, ROT90, "bootleg", "Amigo (bootleg of Amidar, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // sound timer might be different?
GAME( 1982, amidars, amidar, scramble, amidars, galaxian_state, init_scramble, ROT90, "Konami", "Amidar (Scramble hardware)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, mandinga, amidar, scramble, amidars, galaxian_state, init_mandinga, ROT90, "bootleg (Artemi)", "Mandinga (bootleg of Amidar)", MACHINE_NO_SOUND | MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // sound ROMs have identical halves, reference for color http://www.youtube.com/watch?v=6uGK4AZxV2U
GAME( 1982, mandingarf, amidar, mandingarf, mandingarf, galaxian_state, init_galaxian, ROT90, "bootleg (Recreativos Franco S.A.)", "Mandanga (bootleg of Mandinga on Galaxian hardware, set 1)", MACHINE_NO_COCKTAIL | MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // assume same issue as mandinga
@@ -12528,13 +12535,13 @@ GAME( 1982, mandingac, amidar, mandingarf, mandingarf, galaxian_state, init_
/* The End/Scramble based hardware */
GAME( 1980, theend, 0, theend, theend, galaxian_state, init_theend, ROT90, "Konami", "The End", MACHINE_SUPPORTS_SAVE )
GAME( 1980, theends, theend, theend, theend, galaxian_state, init_theend, ROT90, "Konami (Stern Electronics license)", "The End (Stern Electronics)", MACHINE_SUPPORTS_SAVE )
-GAME( 1980, takeoff, theend, takeoff, explorer, galaxian_state, init_explorer, ROT90, "bootleg (Sidam)", "Take Off (bootleg of The End)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // tempo is way too fast
+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_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
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index acee004bff7..5eafc092402 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -16,27 +16,41 @@
#include "emupal.h"
#include "screen.h"
-/* we scale horizontally by 3 to render stars correctly */
-#define GALAXIAN_XSCALE 3
+namespace {
/* master clocks */
-#define GALAXIAN_MASTER_CLOCK (XTAL(18'432'000))
-#define GALAXIAN_PIXEL_CLOCK (GALAXIAN_XSCALE*GALAXIAN_MASTER_CLOCK/3)
+static constexpr XTAL GALAXIAN_MASTER_CLOCK(18.432_MHz_XTAL);
+static constexpr XTAL KONAMI_SOUND_CLOCK(14.318181_MHz_XTAL);
+static constexpr XTAL SIDAM_MASTER_CLOCK(12_MHz_XTAL);
+
+/* we scale horizontally by 3 to render stars correctly */
+static constexpr int GALAXIAN_XSCALE = 3;
+/* the Sidam bootlegs have a 12 MHz XTAL instead */
+static constexpr int SIDAM_XSCALE = 2;
+
+static constexpr XTAL GALAXIAN_PIXEL_CLOCK(GALAXIAN_XSCALE*GALAXIAN_MASTER_CLOCK / 3);
+static constexpr XTAL SIDAM_PIXEL_CLOCK(SIDAM_XSCALE*SIDAM_MASTER_CLOCK / 2);
/* H counts from 128->511, HBLANK starts at 130 and ends at 250 */
/* we normalize this here so that we count 0->383 with HBLANK */
/* from 264-383 */
-#define GALAXIAN_HTOTAL (384*GALAXIAN_XSCALE)
-#define GALAXIAN_HBEND (0*GALAXIAN_XSCALE)
-//#define GALAXIAN_H0START (6*GALAXIAN_XSCALE)
-//#define GALAXIAN_HBSTART (264*GALAXIAN_XSCALE)
-#define GALAXIAN_H0START (0*GALAXIAN_XSCALE)
-#define GALAXIAN_HBSTART (256*GALAXIAN_XSCALE)
+static constexpr int GALAXIAN_HTOTAL = (384 * GALAXIAN_XSCALE);
+static constexpr int GALAXIAN_HBEND = (0 * GALAXIAN_XSCALE);
+//static constexpr int GALAXIAN_H0START = (6*GALAXIAN_XSCALE)
+//static constexpr int GALAXIAN_HBSTART = (264*GALAXIAN_XSCALE)
+static constexpr int GALAXIAN_H0START = (0 * GALAXIAN_XSCALE);
+static constexpr int GALAXIAN_HBSTART = (256 * GALAXIAN_XSCALE);
+
+static constexpr int GALAXIAN_VTOTAL = (264);
+static constexpr int GALAXIAN_VBEND = (16);
+static constexpr int GALAXIAN_VBSTART = (224 + 16);
-#define GALAXIAN_VTOTAL (264)
-#define GALAXIAN_VBEND (16)
-#define GALAXIAN_VBSTART (224+16)
+static constexpr int SIDAM_HTOTAL = (384 * SIDAM_XSCALE);
+static constexpr int SIDAM_HBEND = (0 * SIDAM_XSCALE);
+static constexpr int SIDAM_H0START = (0 * SIDAM_XSCALE);
+static constexpr int SIDAM_HBSTART = (256 * SIDAM_XSCALE);
+} // anonymous namespace
class galaxian_state : public driver_device
{
@@ -187,7 +201,9 @@ public:
void init_scorpnmc();
void init_theend();
void init_scramble();
+ void init_sidam();
void init_explorer();
+ void init_amigo2();
void init_mandinga();
void init_sfx();
void init_atlantis();
@@ -215,8 +231,8 @@ public:
DECLARE_PALETTE_INIT(moonwar);
void tenspot_set_game_bank(int bank, int from_game);
uint32_t screen_update_galaxian(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(interrupt_gen);
- INTERRUPT_GEN_MEMBER(fakechange_interrupt_gen);
+ DECLARE_WRITE_LINE_MEMBER(vblank_interrupt_w);
+ DECLARE_WRITE_LINE_MEMBER(tenspot_interrupt_w);
TIMER_DEVICE_CALLBACK_MEMBER(checkmaj_irq0_gen);
TIMER_DEVICE_CALLBACK_MEMBER(scramble_stars_blink_timer);
TIMER_DEVICE_CALLBACK_MEMBER(timefgtr_scanline);
@@ -226,6 +242,7 @@ public:
void stars_init();
void stars_update_origin();
void stars_draw_row(bitmap_rgb32 &bitmap, int maxx, int y, uint32_t star_offs, uint8_t starmask);
+ void null_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void galaxian_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void background_draw_colorsplit(bitmap_rgb32 &bitmap, const rectangle &cliprect, rgb_t color, int split, int split_flipped);
void scramble_draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect, int maxx);
@@ -233,8 +250,8 @@ public:
void anteater_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void jumpbug_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void turtles_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void sfx_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void frogger_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
- void quaak_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
inline void galaxian_draw_pixel(bitmap_rgb32 &bitmap, const rectangle &cliprect, int y, int x, rgb_t color);
void galaxian_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
void mshuttle_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
@@ -273,6 +290,7 @@ public:
void common_init(galaxian_draw_bullet_func draw_bullet,galaxian_draw_background_func draw_background,
galaxian_extend_tile_info_func extend_tile_info,galaxian_extend_sprite_info_func extend_sprite_info);
void galaxian_base(machine_config &config);
+ void sidam_bootleg_base(machine_config &config);
void konami_base(machine_config &config);
void konami_sound_1x_ay8910(machine_config &config);
void konami_sound_2x_ay8910(machine_config &config);
@@ -378,7 +396,6 @@ protected:
void tenspot_select_map(address_map &map);
void theend_map(address_map &map);
void thepitm_map(address_map &map);
- void timefgtr_map(address_map &map);
void turpins_map(address_map &map);
void turpins_sound_map(address_map &map);
void turtles_map(address_map &map);
@@ -429,6 +446,8 @@ protected:
int m_irq_line;
int m_tenspot_current_game;
uint8_t m_frogger_adjust;
+ uint8_t m_x_scale;
+ uint8_t m_h0_start;
uint8_t m_sfx_tilemap;
galaxian_extend_tile_info_func m_extend_tile_info_ptr;
diff --git a/src/mame/video/galaxian.cpp b/src/mame/video/galaxian.cpp
index aad8d84ea1e..14337af90e3 100644
--- a/src/mame/video/galaxian.cpp
+++ b/src/mame/video/galaxian.cpp
@@ -379,13 +379,13 @@ void galaxian_state::video_start()
if (!m_sfx_tilemap)
{
/* normal galaxian hardware is row-based and individually scrolling columns */
- m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(galaxian_state::bg_get_tile_info),this), TILEMAP_SCAN_ROWS, GALAXIAN_XSCALE*8,8, 32,32);
+ m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(galaxian_state::bg_get_tile_info),this), TILEMAP_SCAN_ROWS, m_x_scale*8,8, 32,32);
m_bg_tilemap->set_scroll_cols(32);
}
else
{
/* sfx hardware is column-based and individually scrolling rows */
- m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(galaxian_state::bg_get_tile_info),this), TILEMAP_SCAN_COLS, GALAXIAN_XSCALE*8,8, 32,32);
+ m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(galaxian_state::bg_get_tile_info),this), TILEMAP_SCAN_COLS, m_x_scale*8,8, 32,32);
m_bg_tilemap->set_scroll_rows(32);
}
m_bg_tilemap->set_transparent_pen(0);
@@ -510,7 +510,7 @@ WRITE8_MEMBER(galaxian_state::galaxian_objram_w)
if (!m_sfx_tilemap)
m_bg_tilemap->set_scrolly(offset >> 1, data);
else
- m_bg_tilemap->set_scrollx(offset >> 1, GALAXIAN_XSCALE*data);
+ m_bg_tilemap->set_scrollx(offset >> 1, m_x_scale*data);
}
/* odd entries control the color base for the row */
@@ -540,8 +540,8 @@ void galaxian_state::sprites_draw(bitmap_rgb32 &bitmap, const rectangle &cliprec
/* 16 of the 256 pixels of the sprites are hard-clipped at the line buffer */
/* according to the schematics, it should be the first 16 pixels */
- clip.min_x = std::max(clip.min_x, (!m_flipscreen_x) * (16 + hoffset) * GALAXIAN_XSCALE);
- clip.max_x = std::min(clip.max_x, (256 - m_flipscreen_x * (16 + hoffset)) * GALAXIAN_XSCALE - 1);
+ clip.min_x = std::max(clip.min_x, (!m_flipscreen_x) * (16 + hoffset) * m_x_scale);
+ clip.max_x = std::min(clip.max_x, (256 - m_flipscreen_x * (16 + hoffset)) * m_x_scale - 1);
/* The line buffer is only written if it contains a '0' currently; */
/* it is cleared during the visible area, and populated during HBLANK */
@@ -583,7 +583,7 @@ void galaxian_state::sprites_draw(bitmap_rgb32 &bitmap, const rectangle &cliprec
m_gfxdecode->gfx(1)->transpen(bitmap,clip,
code, color,
flipx, flipy,
- GALAXIAN_H0START + GALAXIAN_XSCALE * sx, sy, 0);
+ m_h0_start + m_x_scale * sx, sy, 0);
}
}
@@ -895,7 +895,7 @@ void galaxian_state::stars_draw_row(bitmap_rgb32 &bitmap, int maxx, int y, uint3
if (star_offs >= STAR_RNG_PERIOD)
star_offs = 0;
if (enable_star && (star & 0x80) != 0 && (star & starmask) != 0)
- bitmap.pix32(y, GALAXIAN_XSCALE*x + 0) = m_star_color[star & 0x3f];
+ bitmap.pix32(y, m_x_scale*x + 0) = m_star_color[star & 0x3f];
/* second RNG clock: two pixels */
star = m_stars[star_offs++];
@@ -903,8 +903,8 @@ void galaxian_state::stars_draw_row(bitmap_rgb32 &bitmap, int maxx, int y, uint3
star_offs = 0;
if (enable_star && (star & 0x80) != 0 && (star & starmask) != 0)
{
- bitmap.pix32(y, GALAXIAN_XSCALE*x + 1) = m_star_color[star & 0x3f];
- bitmap.pix32(y, GALAXIAN_XSCALE*x + 2) = m_star_color[star & 0x3f];
+ bitmap.pix32(y, m_x_scale*x + 1) = m_star_color[star & 0x3f];
+ bitmap.pix32(y, m_x_scale*x + 2) = m_star_color[star & 0x3f];
}
}
}
@@ -917,6 +917,14 @@ void galaxian_state::stars_draw_row(bitmap_rgb32 &bitmap, int maxx, int y, uint3
*
*************************************/
+void galaxian_state::null_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ /* erase the background to black */
+ bitmap.fill(rgb_t::black(), cliprect);
+}
+
+
+
void galaxian_state::galaxian_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
/* erase the background to black first */
@@ -946,24 +954,24 @@ void galaxian_state::background_draw_colorsplit(bitmap_rgb32 &bitmap, const rect
if (m_flipscreen_x)
{
rectangle draw = cliprect;
- draw.max_x = std::min(draw.max_x, split_flipped * GALAXIAN_XSCALE - 1);
+ draw.max_x = std::min(draw.max_x, split_flipped * m_x_scale - 1);
if (draw.min_x <= draw.max_x)
bitmap.fill(rgb_t::black(), draw);
draw = cliprect;
- draw.min_x = std::max(draw.min_x, split_flipped * GALAXIAN_XSCALE);
+ draw.min_x = std::max(draw.min_x, split_flipped * m_x_scale);
if (draw.min_x <= draw.max_x)
bitmap.fill(color, draw);
}
else
{
rectangle draw = cliprect;
- draw.max_x = std::min(draw.max_x, split * GALAXIAN_XSCALE - 1);
+ draw.max_x = std::min(draw.max_x, split * m_x_scale - 1);
if (draw.min_x <= draw.max_x)
bitmap.fill(color, draw);
draw = cliprect;
- draw.min_x = std::max(draw.min_x, split * GALAXIAN_XSCALE);
+ draw.min_x = std::max(draw.min_x, split * m_x_scale);
if (draw.min_x <= draw.max_x)
bitmap.fill(rgb_t::black(), draw);
}
@@ -1033,7 +1041,7 @@ void galaxian_state::jumpbug_draw_background(bitmap_rgb32 &bitmap, const rectang
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
uint32_t star_offs = m_star_rng_origin + y * 512;
- stars_draw_row(bitmap, 240, y, star_offs, 0xff);
+ stars_draw_row(bitmap, 232, y, star_offs, 0xff); // verified on a real PCB
}
}
}
@@ -1052,6 +1060,14 @@ void galaxian_state::turtles_draw_background(bitmap_rgb32 &bitmap, const rectang
}
+void galaxian_state::sfx_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ /* current schematics are unreadable, assuming like Turtles */
+ bitmap.fill(rgb_t(m_background_red * 0x55, m_background_green * 0x47, m_background_blue * 0x55), cliprect);
+ scramble_draw_stars(bitmap, cliprect, 256);
+}
+
+
void galaxian_state::frogger_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
/* according to schematics it is at 128+8; but it has been verified different on real machine.
@@ -1059,11 +1075,6 @@ void galaxian_state::frogger_draw_background(bitmap_rgb32 &bitmap, const rectang
background_draw_colorsplit(bitmap, cliprect, rgb_t(0,0,0x47), 128, 128);
}
-void galaxian_state::quaak_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
-{
- /* color split point verified on real machine */
- background_draw_colorsplit(bitmap, cliprect, rgb_t(0,0,0x47), 128, 128);
-}
#ifdef UNUSED_FUNCTION
int galaxian_state::flip_and_clip(rectangle &draw, int xstart, int xend, const rectangle &cliprect)
@@ -1071,13 +1082,13 @@ int galaxian_state::flip_and_clip(rectangle &draw, int xstart, int xend, const r
draw = cliprect;
if (!m_flipscreen_x)
{
- draw.min_x = xstart * GALAXIAN_XSCALE;
- draw.max_x = xend * GALAXIAN_XSCALE + (GALAXIAN_XSCALE - 1);
+ draw.min_x = xstart * m_x_scale;
+ draw.max_x = xend * m_x_scale + (m_x_scale - 1);
}
else
{
- draw.min_x = (xend ^ 255) * GALAXIAN_XSCALE;
- draw.max_x = (xstart ^ 255) * GALAXIAN_XSCALE + (GALAXIAN_XSCALE - 1);
+ draw.min_x = (xend ^ 255) * m_x_scale;
+ draw.max_x = (xstart ^ 255) * m_x_scale + (m_x_scale - 1);
}
draw &= cliprect;
return (draw.min_x <= draw.max_x);
@@ -1126,8 +1137,8 @@ inline void galaxian_state::galaxian_draw_pixel(bitmap_rgb32 &bitmap, const rect
{
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- x *= GALAXIAN_XSCALE;
- x += GALAXIAN_H0START;
+ x *= m_x_scale;
+ x += m_h0_start;
if (x >= cliprect.min_x && x <= cliprect.max_x)
bitmap.pix32(y, x) = color;
@@ -1191,11 +1202,14 @@ void galaxian_state::scramble_draw_bullet(bitmap_rgb32 &bitmap, const rectangle
{
/*
Scramble only has "shells", which begin displaying when the counter
- reaches $FA, and stop displaying one pixel clock layer. All shells are
- rendered as yellow.
+ reaches $FA, and stop displaying two pixel clock layers, as verified
+ on real hardware.
+
+ All shells are rendered as yellow.
*/
- x -= 6;
- galaxian_draw_pixel(bitmap, cliprect, y, x, rgb_t(0xff,0xff,0x00));
+ x -= 4;
+ galaxian_draw_pixel(bitmap, cliprect, y, --x, rgb_t(0xff, 0xff, 0x00));
+ galaxian_draw_pixel(bitmap, cliprect, y, --x, rgb_t(0xff, 0xff, 0x00));
}