#include "../mame/drivers/astinvad.c"


/* misfitmame start */

/* misfitmame - fixed cocktail mode */
static VIDEO_UPDATE( spacein2 )
{
	const UINT8 *color_prom = memory_region(screen->machine, "proms");
	int offs,n;
	UINT8 data,color,y,x,c;

	for (offs = 0; offs < videoram_size; offs++)
	{
		data = videoram[offs];
		c = colorram[offs];

		if (screen_flip)
		{
			y = offs;
			x = ~offs >> 8 << 3;
		}
		else
		{
			y = ~offs;
			x = offs >> 8 << 3;
		}

		n = ((offs >> 5) & 0xd0) | c;
		color = (color_prom[n]);
		plot_byte(bitmap, y, x, data, color);
	}

	return 0;
}

static MACHINE_DRIVER_START( spacein2 )
	MDRV_IMPORT_FROM(spaceint)
	MDRV_VIDEO_UPDATE(spacein2)
MACHINE_DRIVER_END

/* Dumped by Andy Welburn. Rom 1 only has 3 bytes different to the official one. No gameplay differences are evident. */
ROM_START( spacein2 )
	ROM_REGION( 0x10000, "main", 0 )
	ROM_LOAD( "spacein2.1",		  0x0000, 0x0400, CRC(45505405) SHA1(c824fa365ca293e3af51058b8f9e37a475de99f0) )
	ROM_LOAD( "2",			  0x0400, 0x0400, CRC(55459aa1) SHA1(5631d8de4e41682962cde65002b0fe86f2b189f9) )
	ROM_LOAD( "3",			  0x0800, 0x0400, CRC(9d6819be) SHA1(da061b908ca6a9f3312d6adc4395a138eed473c8) )
	ROM_LOAD( "4",			  0x0c00, 0x0400, CRC(432052d4) SHA1(0c944c91cc7b1f03cd817250af13238eb62539ec) )
	ROM_LOAD( "5",			  0x1000, 0x0400, CRC(c6cfa650) SHA1(afdfaedddf6703101856944bb49ba13fc40ede39) )
	ROM_LOAD( "6",			  0x1400, 0x0400, CRC(c7ccf40f) SHA1(10efe05a4e0625ce427871fbb6e55df112fdd783) )

	ROM_REGION( 0x0100, "proms", 0 )
	ROM_LOAD( "clr",		  0x0000, 0x0100, CRC(13c1803f) SHA1(da59bf63d9e84aca32904c107674bc89974648eb) )
ROM_END

GAME( 1980, spacein2, 0,        spacein2, spaceint, 0,        ROT90,  "Shoei", "Space Intruder (ver 2)", GAME_SUPPORTS_SAVE | GAME_WRONG_COLORS )

/* misfitmame end */
