summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/kangaroo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/kangaroo.cpp')
-rw-r--r--src/mame/drivers/kangaroo.cpp395
1 files changed, 318 insertions, 77 deletions
diff --git a/src/mame/drivers/kangaroo.cpp b/src/mame/drivers/kangaroo.cpp
index c4013c0175b..df09dfbbc55 100644
--- a/src/mame/drivers/kangaroo.cpp
+++ b/src/mame/drivers/kangaroo.cpp
@@ -156,19 +156,249 @@
***************************************************************************/
#include "emu.h"
-#include "includes/kangaroo.h"
#include "cpu/mb88xx/mb88xx.h"
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
#include "sound/ay8910.h"
+
+#include "emupal.h"
#include "screen.h"
#include "speaker.h"
-#define MASTER_CLOCK (10_MHz_XTAL)
+namespace {
+
+class kangaroo_state : public driver_device
+{
+public:
+ kangaroo_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_video_control(*this, "video_control"),
+ m_videoram(*this, "videoram", 256 * 64 * 4, ENDIANNESS_LITTLE), // video RAM is accessed 32 bits at a time (two planes, 4bpp each, 4 pixels)
+ m_blitbank(*this, "blitbank"),
+ m_blitrom(*this, "blitter"),
+ m_maincpu(*this, "maincpu"),
+ m_palette(*this, "palette") { }
+
+ void nomcu(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ void main_map(address_map &map);
+
+private:
+ // memory pointers
+ required_shared_ptr<uint8_t> m_video_control;
+ memory_share_creator<uint32_t> m_videoram;
+ required_memory_bank m_blitbank;
+ required_region_ptr<uint8_t> m_blitrom;
+
+ // devices
+ required_device<cpu_device> m_maincpu;
+ required_device<palette_device> m_palette;
+
+ // misc
+ void coin_counter_w(uint8_t data);
+ void videoram_w(offs_t offset, uint8_t data);
+ void video_control_w(offs_t offset, uint8_t data);
+ uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void videoram_write(uint16_t offset, uint8_t data, uint8_t mask);
+ void blitter_execute();
+
+ void sound_map(address_map &map);
+ void sound_portmap(address_map &map);
+};
+
+
+class kangaroo_mcu_state : public kangaroo_state
+{
+public:
+ kangaroo_mcu_state(const machine_config &mconfig, device_type type, const char *tag)
+ : kangaroo_state(mconfig, type, tag) { }
+
+ void mcu(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+private:
+ // MCU simulation (for now)
+ uint8_t m_mcu_clock = 0U;
+
+ uint8_t mcu_sim_r();
+ void mcu_sim_w(uint8_t data);
+
+ void main_map(address_map &map);
+};
+
+
+// video
+
+/*************************************
+ *
+ * Video RAM accesses
+ *
+ *************************************/
+
+void kangaroo_state::videoram_write(uint16_t offset, uint8_t data, uint8_t mask)
+{
+ // data contains 4 2-bit values packed as DCBADCBA; expand these into 4 8-bit values
+ uint32_t expdata = 0;
+ if (data & 0x01) expdata |= 0x00000055;
+ if (data & 0x10) expdata |= 0x000000aa;
+ if (data & 0x02) expdata |= 0x00005500;
+ if (data & 0x20) expdata |= 0x0000aa00;
+ if (data & 0x04) expdata |= 0x00550000;
+ if (data & 0x40) expdata |= 0x00aa0000;
+ if (data & 0x08) expdata |= 0x55000000;
+ if (data & 0x80) expdata |= 0xaa000000;
+
+ // determine which layers are enabled
+ uint32_t layermask = 0;
+ if (mask & 0x08) layermask |= 0x30303030;
+ if (mask & 0x04) layermask |= 0xc0c0c0c0;
+ if (mask & 0x02) layermask |= 0x03030303;
+ if (mask & 0x01) layermask |= 0x0c0c0c0c;
+
+ // update layers
+ m_videoram[offset] = (m_videoram[offset] & ~layermask) | (expdata & layermask);
+}
+
+
+void kangaroo_state::videoram_w(offs_t offset, uint8_t data)
+{
+ videoram_write(offset, data, m_video_control[8]);
+}
+
+
+
+/*************************************
+ *
+ * Video control writes
+ *
+ *************************************/
+
+void kangaroo_state::video_control_w(offs_t offset, uint8_t data)
+{
+ m_video_control[offset] = data;
+
+ switch (offset)
+ {
+ case 5: // blitter start
+ blitter_execute();
+ break;
+
+ case 8: // bank select
+ m_blitbank->set_entry((data & 0x05) ? 0 : 1);
+ break;
+ }
+}
+
+
+
+/*************************************
+ *
+ * DMA blitter
+ *
+ *************************************/
+
+void kangaroo_state::blitter_execute()
+{
+ uint32_t gfxhalfsize = m_blitrom.bytes() / 2;
+ uint16_t src = m_video_control[0] + 256 * m_video_control[1];
+ uint16_t dst = m_video_control[2] + 256 * m_video_control[3];
+ uint8_t height = m_video_control[5];
+ uint8_t width = m_video_control[4];
+ uint8_t mask = m_video_control[8];
+
+ // during DMA operations, the top 2 bits are ORed together, as well as the bottom 2 bits
+ // adjust the mask to account for this
+ if (mask & 0x0c) mask |= 0x0c;
+ if (mask & 0x03) mask |= 0x03;
+
+ // loop over height, then width
+ for (int y = 0; y <= height; y++, dst += 256)
+ for (int x = 0; x <= width; x++)
+ {
+ uint16_t effdst = (dst + x) & 0x3fff;
+ uint16_t effsrc = src++ & (gfxhalfsize - 1);
+ videoram_write(effdst, m_blitrom[0 * gfxhalfsize + effsrc], mask & 0x05);
+ videoram_write(effdst, m_blitrom[1 * gfxhalfsize + effsrc], mask & 0x0a);
+ }
+}
+
+
+/*************************************
+ *
+ * Video updater
+ *
+ *************************************/
+uint32_t kangaroo_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ uint8_t scrolly = m_video_control[6];
+ uint8_t scrollx = m_video_control[7];
+ uint8_t maska = (m_video_control[10] & 0x28) >> 3;
+ uint8_t maskb = (m_video_control[10] & 0x07) >> 0;
+ uint8_t xora = (m_video_control[9] & 0x20) ? 0xff : 0x00;
+ uint8_t xorb = (m_video_control[9] & 0x10) ? 0xff : 0x00;
+ uint8_t enaa = (m_video_control[9] & 0x08);
+ uint8_t enab = (m_video_control[9] & 0x04);
+ uint8_t pria = (~m_video_control[9] & 0x02);
+ uint8_t prib = (~m_video_control[9] & 0x01);
+
+ // iterate over pixels
+ for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
+ {
+ uint32_t *const dest = &bitmap.pix(y);
+
+ for (int x = cliprect.min_x; x <= cliprect.max_x; x += 2)
+ {
+ uint8_t effxa = scrollx + ((x / 2) ^ xora);
+ uint8_t effya = scrolly + (y ^ xora);
+ uint8_t effxb = (x / 2) ^ xorb;
+ uint8_t effyb = y ^ xorb;
+ uint8_t pixa = (m_videoram[effya + 256 * (effxa / 4)] >> (8 * (effxa % 4) + 0)) & 0x0f;
+ uint8_t pixb = (m_videoram[effyb + 256 * (effxb / 4)] >> (8 * (effxb % 4) + 4)) & 0x0f;
+
+ // for each layer, contribute bits if (a) enabled, and (b) either has priority or the opposite plane is 0
+ uint8_t finalpens = 0;
+ if (enaa && (pria || pixb == 0))
+ finalpens |= pixa;
+ if (enab && (prib || pixa == 0))
+ finalpens |= pixb;
+
+ // store the first of two pixels, which is always full brightness
+ dest[x + 0] = m_palette->pen_color(finalpens & 7);
+
+ // KOS1 alternates at 5MHz, offset from the pixel clock by 1/2 clock
+ // when 0, it enables the color mask for pixels with Z = 0
+ finalpens = 0;
+ if (enaa && (pria || pixb == 0))
+ {
+ if (!(pixa & 0x08)) pixa &= maska;
+ finalpens |= pixa;
+ }
+ if (enab && (prib || pixa == 0))
+ {
+ if (!(pixb & 0x08)) pixb &= maskb;
+ finalpens |= pixb;
+ }
+
+ // store the second of two pixels, which is affected by KOS1 and the A/B masks
+ dest[x + 1] = m_palette->pen_color(finalpens & 7);
+ }
+ }
+
+ return 0;
+}
+
+// machine
/*************************************
*
@@ -178,37 +408,40 @@
void kangaroo_state::machine_start()
{
- membank("bank1")->configure_entries(0, 2, memregion("gfx1")->base(), 0x2000);
+ m_blitbank->configure_entries(0, 2, memregion("blitter")->base(), 0x2000);
}
-MACHINE_START_MEMBER(kangaroo_state,kangaroo_mcu)
+void kangaroo_mcu_state::machine_start()
{
kangaroo_state::machine_start();
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xef00, 0xefff, read8smo_delegate(*this, FUNC(kangaroo_state::mcu_sim_r)), write8smo_delegate(*this, FUNC(kangaroo_state::mcu_sim_w)));
+
save_item(NAME(m_mcu_clock));
}
void kangaroo_state::machine_reset()
{
- /* I think there is a bug in the startup checks of the game. At the very */
- /* beginning, during the RAM check, it goes one byte too far, and ends up */
- /* trying to write, and re-read, location dfff. To the best of my knowledge, */
- /* that is a ROM address, so the test fails and the code keeps jumping back */
- /* at 0000. */
- /* However, a NMI causes a successful reset. Maybe the hardware generates a */
- /* NMI short after power on, therefore masking the bug? The NMI is generated */
- /* by the MB8841 custom microcontroller, so this could be a way to disguise */
- /* the copy protection. */
- /* Anyway, what I do here is just immediately generate the NMI, so the game */
- /* properly starts. */
+ /* I think there is a bug in the startup checks of the game. At the very
+ beginning, during the RAM check, it goes one byte too far, and ends up
+ trying to write, and re-read, location dfff. To the best of my knowledge,
+ that is a ROM address, so the test fails and the code keeps jumping back
+ at 0000.
+ However, a NMI causes a successful reset. Maybe the hardware generates a
+ NMI short after power on, therefore masking the bug? The NMI is generated
+ by the MB8841 custom microcontroller, so this could be a way to disguise
+ the copy protection.
+ Anyway, what I do here is just immediately generate the NMI, so the game
+ properly starts. */
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
-
- m_mcu_clock = 0;
}
+void kangaroo_mcu_state::machine_reset()
+{
+ kangaroo_state::machine_reset();
+ m_mcu_clock = 0;
+}
/*************************************
*
@@ -216,16 +449,14 @@ void kangaroo_state::machine_reset()
*
*************************************/
-/* The security chip is a MB8841 with 2K internal rom. Currently it's unknown what it really does,
- this just seems to do the trick -V-
-*/
+// The security chip is a MB8841 with 2K internal ROM. Currently it's unknown what it really does, this just seems to do the trick -V-
-uint8_t kangaroo_state::mcu_sim_r()
+uint8_t kangaroo_mcu_state::mcu_sim_r()
{
return ++m_mcu_clock & 0x0f;
}
-void kangaroo_state::mcu_sim_w(uint8_t data)
+void kangaroo_mcu_state::mcu_sim_w(uint8_t data)
{
}
@@ -237,7 +468,7 @@ void kangaroo_state::mcu_sim_w(uint8_t data)
*
*************************************/
-void kangaroo_state::kangaroo_coin_counter_w(uint8_t data)
+void kangaroo_state::coin_counter_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0, data & 1);
machine().bookkeeping().coin_counter_w(1, data & 2);
@@ -254,16 +485,22 @@ void kangaroo_state::kangaroo_coin_counter_w(uint8_t data)
void kangaroo_state::main_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
- map(0x8000, 0xbfff).w(FUNC(kangaroo_state::kangaroo_videoram_w));
- map(0xc000, 0xdfff).bankr("bank1");
+ map(0x8000, 0xbfff).w(FUNC(kangaroo_state::videoram_w));
+ map(0xc000, 0xdfff).bankr(m_blitbank);
map(0xe000, 0xe3ff).ram();
map(0xe400, 0xe400).mirror(0x03ff).portr("DSW0");
- map(0xe800, 0xe80a).mirror(0x03f0).w(FUNC(kangaroo_state::kangaroo_video_control_w)).share("video_control");
+ map(0xe800, 0xe80a).mirror(0x03f0).w(FUNC(kangaroo_state::video_control_w)).share(m_video_control);
map(0xec00, 0xec00).mirror(0x00ff).portr("IN0").w("soundlatch", FUNC(generic_latch_8_device::write));
- map(0xed00, 0xed00).mirror(0x00ff).portr("IN1").w(FUNC(kangaroo_state::kangaroo_coin_counter_w));
+ map(0xed00, 0xed00).mirror(0x00ff).portr("IN1").w(FUNC(kangaroo_state::coin_counter_w));
map(0xee00, 0xee00).mirror(0x00ff).portr("IN2");
}
+void kangaroo_mcu_state::main_map(address_map &map)
+{
+ kangaroo_state::main_map(map);
+
+ map(0xef00, 0xefff).rw(FUNC(kangaroo_mcu_state::mcu_sim_r), FUNC(kangaroo_mcu_state::mcu_sim_w));
+}
/*************************************
@@ -406,7 +643,7 @@ static INPUT_PORTS_START( kangaroo )
PORT_DIPSETTING( 0xb0, "A 1C/2C B 1C/10C" )
PORT_DIPSETTING( 0xc0, "A 1C/2C B 1C/11C" )
PORT_DIPSETTING( 0xd0, "A 1C/2C B 1C/12C" )
- /* 0xe0 gives A 1/2 B 1/6 */
+ // 0xe0 gives A 1/2 B 1/6
PORT_DIPSETTING( 0xf0, DEF_STR( Free_Play ) )
INPUT_PORTS_END
@@ -418,43 +655,45 @@ INPUT_PORTS_END
*
*************************************/
+static constexpr XTAL MASTER_CLOCK = 10_MHz_XTAL;
+
void kangaroo_state::nomcu(machine_config &config)
{
- /* basic machine hardware */
- Z80(config, m_maincpu, MASTER_CLOCK/4);
+ // basic machine hardware
+ Z80(config, m_maincpu, MASTER_CLOCK / 4);
m_maincpu->set_addrmap(AS_PROGRAM, &kangaroo_state::main_map);
m_maincpu->set_vblank_int("screen", FUNC(kangaroo_state::irq0_line_hold));
- z80_device &audiocpu(Z80(config, "audiocpu", MASTER_CLOCK/8));
+ z80_device &audiocpu(Z80(config, "audiocpu", MASTER_CLOCK / 8));
audiocpu.set_addrmap(AS_PROGRAM, &kangaroo_state::sound_map);
audiocpu.set_addrmap(AS_IO, &kangaroo_state::sound_map); // yes, this is identical
audiocpu.set_vblank_int("screen", FUNC(kangaroo_state::irq0_line_hold));
- /* video hardware */
+ // video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_video_attributes(VIDEO_UPDATE_SCANLINE);
screen.set_raw(MASTER_CLOCK, 320*2, 0*2, 256*2, 260, 8, 248);
- screen.set_screen_update(FUNC(kangaroo_state::screen_update_kangaroo));
+ screen.set_screen_update(FUNC(kangaroo_state::screen_update));
PALETTE(config, m_palette, palette_device::BGR_3BIT);
- /* sound hardware */
+ // sound hardware
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, "soundlatch");
- AY8910(config, "aysnd", MASTER_CLOCK/8).add_route(ALL_OUTPUTS, "mono", 0.50);
+ AY8910(config, "aysnd", MASTER_CLOCK / 8).add_route(ALL_OUTPUTS, "mono", 0.50);
}
-void kangaroo_state::mcu(machine_config &config)
+void kangaroo_mcu_state::mcu(machine_config &config)
{
nomcu(config);
- MCFG_MACHINE_START_OVERRIDE(kangaroo_state,kangaroo_mcu)
+ subdevice<cpu_device>("maincpu")->set_addrmap(AS_PROGRAM, &kangaroo_mcu_state::main_map);
- MB8841(config, "mcu", MASTER_CLOCK/4/2).set_disable();
+ MB8841(config, "mcu", MASTER_CLOCK / 4 / 2).set_disable(); // not dumped
}
@@ -466,17 +705,17 @@ void kangaroo_state::mcu(machine_config &config)
*************************************/
ROM_START( fnkyfish )
- ROM_REGION( 0x14000, "maincpu", 0 )
+ ROM_REGION( 0x6000, "maincpu", 0 )
ROM_LOAD( "tvg_64.0", 0x0000, 0x1000, CRC(af728803) SHA1(1cbbf863f0eb4c759d6037ef9d9d0f4586b7b570) )
ROM_LOAD( "tvg_65.1", 0x1000, 0x1000, CRC(71959e6b) SHA1(7336cbf3eefd081cd657a56fb6a8fbdac1b51c2c) )
ROM_LOAD( "tvg_66.2", 0x2000, 0x1000, CRC(5ccf68d4) SHA1(c885df8b2b1bcb578ceab6615caf633dac02a5b2) )
ROM_LOAD( "tvg_67.3", 0x3000, 0x1000, CRC(938ff36f) SHA1(bf660217ff82d5850ab97238ed2e32199d04f8c9) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_REGION( 0x1000, "audiocpu", 0 )
ROM_LOAD( "tvg_68.8", 0x0000, 0x1000, CRC(d36bb2be) SHA1(330160161857407fda62f16e7f43b8833744fd34) )
- ROM_REGION( 0x4000, "gfx1", 0 )
- ROM_LOAD( "tvg_69.v0", 0x0000, 0x1000, CRC(cd532d0b) SHA1(7a64f8bab1a0feafd53a4b81ac3b624a7c1bd26a) ) /* graphics ROMs */
+ ROM_REGION( 0x4000, "blitter", 0 )
+ ROM_LOAD( "tvg_69.v0", 0x0000, 0x1000, CRC(cd532d0b) SHA1(7a64f8bab1a0feafd53a4b81ac3b624a7c1bd26a) )
ROM_LOAD( "tvg_71.v2", 0x1000, 0x1000, CRC(a59c9713) SHA1(60dafa3d5a70b7e727b7c4688f8f3125735c31ec) )
ROM_LOAD( "tvg_70.v1", 0x2000, 0x1000, CRC(fd308ef1) SHA1(d07f964cab875b0e47f3469fa5211684a5725dfe) )
ROM_LOAD( "tvg_72.v3", 0x3000, 0x1000, CRC(6ae9b584) SHA1(408d26f4cdcd2abf0667fdc9c6eae58c9052981d) )
@@ -484,33 +723,33 @@ ROM_END
ROM_START( kangaroo )
- ROM_REGION( 0x14000, "maincpu", 0 ) /* On TVG-1-CPU-B board */
- ROM_LOAD( "tvg_75.0", 0x0000, 0x1000, CRC(0d18c581) SHA1(0e0f89d644b79e887c53e5294783843ca7e875ba) ) /* IC7 */
- ROM_LOAD( "tvg_76.1", 0x1000, 0x1000, CRC(5978d37a) SHA1(684c1092de4a0927a03752903c86c3bbe99e868a) ) /* IC8 */
- ROM_LOAD( "tvg_77.2", 0x2000, 0x1000, CRC(522d1097) SHA1(09fe627a46d32df2e098d9fad7757f9d61bef41f) ) /* IC9 */
- ROM_LOAD( "tvg_78.3", 0x3000, 0x1000, CRC(063da970) SHA1(582ff21dd46c651f07a4846e0f8a7544a5891988) ) /* IC10 */
- ROM_LOAD( "tvg_79.4", 0x4000, 0x1000, CRC(9e5cf8ca) SHA1(015387f038c5670f88c9b22453d074bd9b2a129d) ) /* IC16 */
- ROM_LOAD( "tvg_80.5", 0x5000, 0x1000, CRC(2fc18049) SHA1(31fcac8eb660739a1672346136a1581a5ef20325) ) /* IC17 */
-
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* On TVG-1-CPU-B board */
- ROM_LOAD( "tvg_81.8", 0x0000, 0x1000, CRC(fb449bfd) SHA1(f593a0339f47e121736a927587132aeb52704557) ) /* IC24 */
-
- ROM_REGION( 0x0800, "mcu", 0 ) /* internal ROM from the 8841 custom MCU */
+ ROM_REGION( 0x6000, "maincpu", 0 ) // On TVG-1-CPU-B board
+ ROM_LOAD( "tvg_75.0", 0x0000, 0x1000, CRC(0d18c581) SHA1(0e0f89d644b79e887c53e5294783843ca7e875ba) ) // IC7
+ ROM_LOAD( "tvg_76.1", 0x1000, 0x1000, CRC(5978d37a) SHA1(684c1092de4a0927a03752903c86c3bbe99e868a) ) // IC8
+ ROM_LOAD( "tvg_77.2", 0x2000, 0x1000, CRC(522d1097) SHA1(09fe627a46d32df2e098d9fad7757f9d61bef41f) ) // IC9
+ ROM_LOAD( "tvg_78.3", 0x3000, 0x1000, CRC(063da970) SHA1(582ff21dd46c651f07a4846e0f8a7544a5891988) ) // IC10
+ ROM_LOAD( "tvg_79.4", 0x4000, 0x1000, CRC(9e5cf8ca) SHA1(015387f038c5670f88c9b22453d074bd9b2a129d) ) // IC16
+ ROM_LOAD( "tvg_80.5", 0x5000, 0x1000, CRC(2fc18049) SHA1(31fcac8eb660739a1672346136a1581a5ef20325) ) // IC17
+
+ ROM_REGION( 0x1000, "audiocpu", 0 ) // On TVG-1-CPU-B board
+ ROM_LOAD( "tvg_81.8", 0x0000, 0x1000, CRC(fb449bfd) SHA1(f593a0339f47e121736a927587132aeb52704557) ) // IC24
+
+ ROM_REGION( 0x0800, "mcu", 0 ) // internal ROM from the 8841 custom MCU
ROM_LOAD( "mb8841.ic29", 0x0000, 0x0800, NO_DUMP )
- ROM_REGION( 0x0800, "user1", 0 ) /* data for the 8841 custom MCU */
- ROM_LOAD( "tvg_82.12", 0x0000, 0x0800, CRC(57766f69) SHA1(94a7a557d8325799523d5e1a88653a9a3fbe34f9) ) /* IC28 */
+ ROM_REGION( 0x0800, "user1", 0 ) // data for the 8841 custom MCU
+ ROM_LOAD( "tvg_82.12", 0x0000, 0x0800, CRC(57766f69) SHA1(94a7a557d8325799523d5e1a88653a9a3fbe34f9) ) // IC28
- ROM_REGION( 0x4000, "gfx1", 0 ) /* On TVG-1-VIDEO-B board */
- ROM_LOAD( "tvg_83.v0", 0x0000, 0x1000, CRC(c0446ca6) SHA1(fca6ba565051337c0198c93b7b8477632e0dd0b6) ) /* IC76 */
- ROM_LOAD( "tvg_85.v2", 0x1000, 0x1000, CRC(72c52695) SHA1(87f4715fbb7d509bd9cc4e71e2afb0d475bbac13) ) /* IC77 */
- ROM_LOAD( "tvg_84.v1", 0x2000, 0x1000, CRC(e4cb26c2) SHA1(5016db9d48fdcfb757618659d063b90862eb0e90) ) /* IC52 */
- ROM_LOAD( "tvg_86.v3", 0x3000, 0x1000, CRC(9e6a599f) SHA1(76b4eddb4efcd8189d8cc5962d8497e82885f212) ) /* IC53 */
+ ROM_REGION( 0x4000, "blitter", 0 ) // On TVG-1-VIDEO-B board
+ ROM_LOAD( "tvg_83.v0", 0x0000, 0x1000, CRC(c0446ca6) SHA1(fca6ba565051337c0198c93b7b8477632e0dd0b6) ) // IC76
+ ROM_LOAD( "tvg_85.v2", 0x1000, 0x1000, CRC(72c52695) SHA1(87f4715fbb7d509bd9cc4e71e2afb0d475bbac13) ) // IC77
+ ROM_LOAD( "tvg_84.v1", 0x2000, 0x1000, CRC(e4cb26c2) SHA1(5016db9d48fdcfb757618659d063b90862eb0e90) ) // IC52
+ ROM_LOAD( "tvg_86.v3", 0x3000, 0x1000, CRC(9e6a599f) SHA1(76b4eddb4efcd8189d8cc5962d8497e82885f212) ) // IC53
ROM_END
ROM_START( kangarooa )
- ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_REGION( 0x6000, "maincpu", 0 )
ROM_LOAD( "136008-101.ic7", 0x0000, 0x1000, CRC(0d18c581) SHA1(0e0f89d644b79e887c53e5294783843ca7e875ba) )
ROM_LOAD( "136008-102.ic8", 0x1000, 0x1000, CRC(5978d37a) SHA1(684c1092de4a0927a03752903c86c3bbe99e868a) )
ROM_LOAD( "136008-103.ic9", 0x2000, 0x1000, CRC(522d1097) SHA1(09fe627a46d32df2e098d9fad7757f9d61bef41f) )
@@ -518,16 +757,16 @@ ROM_START( kangarooa )
ROM_LOAD( "136008-105.ic16", 0x4000, 0x1000, CRC(82a26c7d) SHA1(09087552dbe4d27df79396072c0f9b916f78f89b) )
ROM_LOAD( "136008-106.ic17", 0x5000, 0x1000, CRC(3dead542) SHA1(0b5d329b1ebbacc650d06289b4e080304e728ea7) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_REGION( 0x1000, "audiocpu", 0 )
ROM_LOAD( "136008-107.ic24", 0x0000, 0x1000, CRC(fb449bfd) SHA1(f593a0339f47e121736a927587132aeb52704557) )
- ROM_REGION( 0x0800, "mcu", 0 ) /* internal ROM from the 8841 custom MCU */
+ ROM_REGION( 0x0800, "mcu", 0 ) // internal ROM from the 8841 custom MCU
ROM_LOAD( "mb8841.ic29", 0x0000, 0x0800, NO_DUMP )
- ROM_REGION( 0x0800, "user1", 0 ) /* data for the 8841 custom MCU */
+ ROM_REGION( 0x0800, "user1", 0 ) // data for the 8841 custom MCU
ROM_LOAD( "136008-112.ic28", 0x0000, 0x0800, CRC(57766f69) SHA1(94a7a557d8325799523d5e1a88653a9a3fbe34f9) )
- ROM_REGION( 0x4000, "gfx1", 0 )
+ ROM_REGION( 0x4000, "blitter", 0 )
ROM_LOAD( "136008-108.ic76", 0x0000, 0x1000, CRC(c0446ca6) SHA1(fca6ba565051337c0198c93b7b8477632e0dd0b6) )
ROM_LOAD( "136008-110.ic77", 0x1000, 0x1000, CRC(72c52695) SHA1(87f4715fbb7d509bd9cc4e71e2afb0d475bbac13) )
ROM_LOAD( "136008-109.ic52", 0x2000, 0x1000, CRC(e4cb26c2) SHA1(5016db9d48fdcfb757618659d063b90862eb0e90) )
@@ -536,7 +775,7 @@ ROM_END
ROM_START( kangaroob )
- ROM_REGION( 0x14000, "maincpu", 0 )
+ ROM_REGION( 0x6000, "maincpu", 0 )
ROM_LOAD( "k1.ic7", 0x0000, 0x1000, CRC(0d18c581) SHA1(0e0f89d644b79e887c53e5294783843ca7e875ba) )
ROM_LOAD( "k2.ic8", 0x1000, 0x1000, CRC(5978d37a) SHA1(684c1092de4a0927a03752903c86c3bbe99e868a) )
ROM_LOAD( "k3.ic9", 0x2000, 0x1000, CRC(522d1097) SHA1(09fe627a46d32df2e098d9fad7757f9d61bef41f) )
@@ -549,7 +788,7 @@ ROM_START( kangaroob )
// MB8841 at IC29 and 2716 at IC28 not populated
- ROM_REGION( 0x4000, "gfx1", 0 )
+ ROM_REGION( 0x4000, "blitter", 0 )
ROM_LOAD( "k10.ic76", 0x0000, 0x1000, CRC(c0446ca6) SHA1(fca6ba565051337c0198c93b7b8477632e0dd0b6) )
ROM_LOAD( "k11.ic77", 0x1000, 0x1000, CRC(72c52695) SHA1(87f4715fbb7d509bd9cc4e71e2afb0d475bbac13) )
ROM_LOAD( "k8.ic52", 0x2000, 0x1000, CRC(e4cb26c2) SHA1(5016db9d48fdcfb757618659d063b90862eb0e90) )
@@ -558,7 +797,7 @@ ROM_END
ROM_START( kangarool ) // runs on earlier revision TVG-1-CPU-A + TVG-1-VIDEO-A PCBs
- ROM_REGION( 0x14000, "maincpu", 0 ) // only ic17 differs from the parent
+ ROM_REGION( 0x6000, "maincpu", 0 ) // only ic17 differs from the parent
ROM_LOAD( "tvg_75.ic7", 0x0000, 0x1000, CRC(0d18c581) SHA1(0e0f89d644b79e887c53e5294783843ca7e875ba) )
ROM_LOAD( "tvg_76.ic8", 0x1000, 0x1000, CRC(5978d37a) SHA1(684c1092de4a0927a03752903c86c3bbe99e868a) )
ROM_LOAD( "tvg_77.ic9", 0x2000, 0x1000, CRC(522d1097) SHA1(09fe627a46d32df2e098d9fad7757f9d61bef41f) )
@@ -566,7 +805,7 @@ ROM_START( kangarool ) // runs on earlier revision TVG-1-CPU-A + TVG-1-VIDEO-A P
ROM_LOAD( "tvg_79.ic16", 0x4000, 0x1000, CRC(9e5cf8ca) SHA1(015387f038c5670f88c9b22453d074bd9b2a129d) )
ROM_LOAD( "tvg_80.ic17", 0x5000, 0x1000, CRC(62df0271) SHA1(4043d90d33ff04729077be7956d30bf82add103c) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_REGION( 0x1000, "audiocpu", 0 )
ROM_LOAD( "tvg_81.ic24", 0x0000, 0x1000, CRC(fb449bfd) SHA1(f593a0339f47e121736a927587132aeb52704557) )
ROM_REGION( 0x0800, "mcu", 0 ) // internal ROM from the 8841 custom MCU
@@ -575,13 +814,15 @@ ROM_START( kangarool ) // runs on earlier revision TVG-1-CPU-A + TVG-1-VIDEO-A P
ROM_REGION( 0x0800, "user1", 0 ) // data for the 8841 custom MCU
ROM_LOAD( "tvg_82.ic28", 0x0000, 0x0800, CRC(57766f69) SHA1(94a7a557d8325799523d5e1a88653a9a3fbe34f9) )
- ROM_REGION( 0x4000, "gfx1", 0 )
+ ROM_REGION( 0x4000, "blitter", 0 )
ROM_LOAD( "tvg_83.ic76", 0x0000, 0x1000, CRC(c0446ca6) SHA1(fca6ba565051337c0198c93b7b8477632e0dd0b6) )
ROM_LOAD( "tvg_85.ic77", 0x1000, 0x1000, CRC(72c52695) SHA1(87f4715fbb7d509bd9cc4e71e2afb0d475bbac13) )
ROM_LOAD( "tvg_84.ic52", 0x2000, 0x1000, CRC(e4cb26c2) SHA1(5016db9d48fdcfb757618659d063b90862eb0e90) )
ROM_LOAD( "tvg_86.ic53", 0x3000, 0x1000, CRC(9e6a599f) SHA1(76b4eddb4efcd8189d8cc5962d8497e82885f212) )
ROM_END
+} // anonymous namespace
+
/*************************************
*
@@ -589,8 +830,8 @@ ROM_END
*
*************************************/
-GAME( 1981, fnkyfish, 0, nomcu, fnkyfish, kangaroo_state, empty_init, ROT90, "Sun Electronics", "Funky Fish", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, kangaroo, 0, mcu, kangaroo, kangaroo_state, empty_init, ROT90, "Sun Electronics", "Kangaroo", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, kangarooa, kangaroo, mcu, kangaroo, kangaroo_state, empty_init, ROT90, "Sun Electronics (Atari license)", "Kangaroo (Atari)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, kangaroob, kangaroo, nomcu, kangaroo, kangaroo_state, empty_init, ROT90, "bootleg", "Kangaroo (bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, kangarool, kangaroo, mcu, kangaroo, kangaroo_state, empty_init, ROT90, "Sun Electronics (Loewen-Automaten license)", "Kangaroo (Loewen-Automaten)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, fnkyfish, 0, nomcu, fnkyfish, kangaroo_state, empty_init, ROT90, "Sun Electronics", "Funky Fish", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, kangaroo, 0, mcu, kangaroo, kangaroo_mcu_state, empty_init, ROT90, "Sun Electronics", "Kangaroo", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, kangarooa, kangaroo, mcu, kangaroo, kangaroo_mcu_state, empty_init, ROT90, "Sun Electronics (Atari license)", "Kangaroo (Atari)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, kangaroob, kangaroo, nomcu, kangaroo, kangaroo_state, empty_init, ROT90, "bootleg", "Kangaroo (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, kangarool, kangaroo, mcu, kangaroo, kangaroo_mcu_state, empty_init, ROT90, "Sun Electronics (Loewen-Automaten license)", "Kangaroo (Loewen-Automaten)", MACHINE_SUPPORTS_SAVE )