QuarterArcade Coin-Op Tech Net

Quick Nav: # A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Coin-Op : Arcade : Columns II: The Voyage Through Time : VM Driver Source

Source Listing


     1: /***********************************************************************************************
     2: 
     3: 	Sega System C/C2 Driver
     4: 	driver by David Haywood and Aaron Giles
     5: 	---------------------------------------
     6: 	Version 0.54 - 02 Feb 2003
     7: 
     8: 	Latest Changes :
     9: 	-----+-------------------------------------------------------------------------------------
    10: 	0.71 | Started adding Support for Megatech, first step is improving the Genesis Emulation
    11: 		 | The rendering will also need improving to support mid-frame palette changes
    12: 		 | (RGB_DIRECT) maybe use tilemaps if its not too messy, added Genesis sound based on
    13: 		 | Mess code
    14: 	0.54 | Added Ribbit! support. Recoded some of the VDP to handle vertical windows. Removed
    15: 	     | the bitmap cache and added partial updating support.
    16: 	0.53 | Set the Protection Read / Write buffers to be cleared at reset in init_machine, this
    17: 		 | fixes a problem with columns when you reset it and then attempted to play.
    18: 		 |  (only drivers/segac2.c was changed)
    19: 	0.52 | Added basic save state support .. not too sure how well it will work (seems to be
    20: 		 | ok apart from sound where i guess the sound core needs updating) size of states
    21: 		 | could probably be cut down a bit with an init variables from vdp registers function
    22: 	0.51 | Added some Puyo Puyo (English Lang) Bootleg set, we don't have an *original* english
    23: 		 | set yet however.  Also added a 2nd Bootleg of Tant-R, this one still has protection
    24: 		 | inplace, however the apparently board lacks the sample playing hardware.
    25: 		 | Removed 'Button3' from Puyo Puyo 2, its unneeded, the Rannyu Button is actually the
    26: 		 | player 1 start button, its used for stopping a 2nd player interupting play.
    27: 	0.50 | Added some Columns/Puyo Puyo 2 dips from Gerardo. Fixed nasty crash bug for games
    28: 		 | not using the UPD7759. Made some minor tweaks to the VDP register accesses. Added
    29: 		 | counter/timer description. Attempted to hook up battery RAM.
    30: 	0.49 | Fixed clock speeds on sound chips and CPU. Tweaked the highlight color a bit.
    31: 	0.48 | Added a kludge to make Stack Columns high score work. Fixed several video-related
    32: 		 | differences from c2emu which caused problems in Puyo Puyo.
    33: 	0.47 | Fixed Thunder Force hanging problem. No longer calling the UPD7759 on the C-system
    34: 		 | games.
    35:     0.46 | Cleaned up the Dip Switches. Added Ichidant and Puyopuy2 Dips.
    36:          | Todo: Complete Columns and Bloxeedc Dips.
    37: 	0.45 | Fixed interrupt timing to match c2emu, which fixes scroll effects in several games.
    38: 		 | Swapped sample ROM loading in some bootlegs. Added support for screen disable.
    39: 	0.44 | Major cleanup. Figured out general protection mechanism. Added INT 4 and INT 2
    40: 		 | support. Added shadow effects. Hooked up sound chips. Fixed palette banking. ASG
    41: 	0.43 | Added Support for an English Language version of Ichidant-R (and I didn't even think
    42: 		 | it was released outside of Japan, this is a nice Turn-Up) .. I wonder if Tant-R was
    43: 		 | also released in English ...
    44: 	0.42 | Removed WRITE_WORD which was being used to patch the roms as it is now obsolete,
    45: 		 | replaced it with mem16[addy >> 1] = 0xXXXX which is the newer way of doing things.
    46: 	0.41 | Mapped more Dipswitches and the odd minor fix.
    47: 	0.40 | Updated the Driver so it 'works' with the new memory system introduced in 0.37b8
    48: 		 | I'm pretty sure I've not done this right in places (for example writes to VRAM
    49: 		 | should probably use data16_t or something.  <request>Help</request> :)
    50: 		 | Also Added dipswitches to a few more of the games (Borench & PotoPoto) zzzz.
    51: 	0.38 | Started Mapping Dipswitches & Controls on a Per Game basis.  Thunderforce AC now has
    52: 		 | this information correct.
    53: 	0.37 | Set it to Clear Video Memory in vh_start, this stops the corrupt tile in Puyo Puyo 2
    54: 		 | however the game isn't really playable past the first level anyhow due to protection
    55: 	0.36 | Mainly a tidy-up release, trying to make the thing more readable :)
    56: 		 | also very minor fixes & changes
    57: 	0.35 | Added Window Emualtion, Horizontal Screen Splitting only (none of the C2 Games
    58: 		 | split the screen Vertically AFAIK so that element of the Genesis Hardware doesn't
    59: 		 | need to be emulated here.
    60: 		 | Thunderforce AC (bootleg)  tfrceacb is now playable and the test screens in Potopoto
    61: 		 | will display correctly.  Don't think I broke anything but knowing me :)
    62: 	0.34 | Fixed Some Things I accidentally broke (well forgot to put back) for the
    63: 		 | previous version ...
    64: 	0.33 | Fixed the Driver to Work in Pure Dos Mode (misunderstanding of the way MAME
    65: 		 | allocated (or in this case didn't allocate) the Palette Ram.
    66: 		 | Fixed a minor bug which was causing some problems in the scrolling in
    67: 		 | potopoto's conveyer belt.
    68: 	0.32 | Added Sprite Flipping This improves the GFX in several games, Tant-R (bootleg)
    69: 		 | is probably now playable just with bad colours on the status bar due to missing
    70: 		 | IRQ 4 Emulation.  Sprite Priority Also fixed .. another Typo
    71: 	0.31 | Fixed Several Stupid Typo Type Bugs :p
    72: 	-----+-------------------------------------------------------------------------------------
    73: 
    74: 	Sega's C2 was used between 1989 and 1994, the hardware being very similar to that
    75: 	used by the Sega MegaDrive/Genesis Home Console Sega produced around the same time.
    76: 
    77: 	Year  Game                  Developer         Versions Dumped  Board  Status        Gen Ver Exists?
    78: 	====  ====================  ================  ===============  =====  ============  ===============
    79: 	1989  Bloxeed               Sega / Elorg      Eng              C      Playable      n
    80: 	1990  Columns               Sega              Jpn              C      Playable      y
    81: 	1990  Columns II            Sega              Jpn              C      Playable      n
    82: 	1990  Borench               Sega              Eng              C2     Playable      n
    83: 	1990  ThunderForce AC       Sega / Technosoft Eng, Jpn, EngBL  C2     Playable      y (as ThunderForce 3?)
    84: 	1992  Ribbit!               Sega              Eng?             C2     Playable      ?
    85: 	1992  Tant-R                Sega              Jpn, JpnBL       C2     Playable      y
    86: 	1992  Puyo Puyo             Sega / Compile    Jpn (2 Vers)     C2     Playable      y
    87: 	1994  Ichidant-R            Sega              Jpn              C2     Playable      y
    88: 	1994  PotoPoto              Sega              Jpn              C2     Playable      n
    89: 	1994  Puyo Puyo 2           Compile           Jpn              C2     Playable      y
    90: 	1994  Stack Columns         Sega              Jpn              C2     Playable      n
    91: 	1994  Zunzunkyou No Yabou   Sega              Jpn              C2     Playable      n
    92: 
    93: 
    94: 	Notes:	Eng indicates game is in the English Language, Most Likely a European / US Romset
    95: 			Jpn indicates the game plays in Japanese and is therefore likely a Japanes Romset
    96: 
    97: 			Another way to play these games is with Charles Macdonald's C2Emu, which was the
    98: 			inspiration for much of this code. Visit http://cgfm2.emuviews.com for the
    99: 			download, also home of some _very_ good Sega Genesis VDP documentation.
   100: 
   101: 			The ASM 68k Core causes a scoring problem in Columns, Starscream does this also,
   102: 			with the C 68k Core the scoring in columns is correct.
   103: 
   104: 			Bloxeed doesn't Read from the Protection Chip at all; all of the other games do.
   105: 			Currently the protection chip is mostly understood, and needs a table of 256
   106: 			4-bit values for each game. In all cases except for Poto Poto and Puyo Puyo 2,
   107: 			the table is embedded in the code. Workarounds for the other 2 cases are
   108: 			provided.
   109: 
   110: 			I'm assuming System-C was the Board without the uPD7759 chip and System-C2 was the
   111: 			version of the board with it, this could be completely wrong but it doesn't really
   112: 			matter anyway.
   113: 
   114: 			Vertical 2 Cell Based Scrolling won't be 100% accurate on a line that uses a Line
   115: 			Scroll value which isn't divisible by 8.. I've never seen a C2 game do this tho.
   116: 
   117: 
   118: 	Bugs:	Puyo Puyo ends up with a black screen after doing memory tests
   119: 			Battery-backed RAM needs to be figured out
   120: 
   121: 
   122: 	Thanks:	(in no particular order) to any MameDev that helped me out .. (OG, Mish etc.)
   123: 			Charles MacDonald for his C2Emu .. without it working out what were bugs in my code
   124: 				and issues due to protection would have probably killed the driver long ago :p
   125: 			Razoola & Antiriad .. for helping teach me some 68k ASM needed to work out just why
   126: 				the games were crashing :)
   127: 			Sega for producing some Fantastic Games...
   128: 			and anyone else who knows they've contributed :)
   129: 
   130: ***********************************************************************************************/
   131: 
   132: 
   133: #include "driver.h" 
   134: #include "vidhrdw/generic.h" 
   135: #include "cpu/m68000/m68000.h" 
   136: #include "state.h" 
   137: #include "segac2.h" 
   138: #include "machine/random.h" 
   139: 
   140: #define LOG_PROTECTION		0 
   141: #define LOG_PALETTE			0 
   142: #define LOG_IOCHIP			0 
   143: 
   144: 
   145: /******************************************************************************
   146: 	Constants
   147: ******************************************************************************/
   148: 
   149: #define MASTER_CLOCK		53693100 
   150: 
   151: 
   152: /******************************************************************************
   153: 	Global variables
   154: ******************************************************************************/
   155: 
   156: /* interrupt states */
   157: static UINT8		ym3438_int;			/* INT2 - from YM3438 */
   158: static UINT8		scanline_int;		/* INT4 - programmable */
   159: static UINT8		vblank_int;			/* INT6 - on every VBLANK */
   160: 
   161: /* internal states */
   162: static UINT8		iochip_reg[0x10];	/* holds values written to the I/O chip */
   163: 
   164: /* protection-related tracking */
   165: static const UINT32 *prot_table;		/* table of protection values */
   166: static UINT16 		prot_write_buf;		/* remembers what was written */
   167: static UINT16		prot_read_buf;		/* remembers what was returned */
   168: 
   169: /* Ribbit! palette swizzling */
   170: static data16_t *	ribbit_palette_select;	/* pointer to base of ROM we're interested in */
   171: static offs_t		swizzle_table_index;/* which kind of swizzling is active? */
   172: 
   173: /* sound-related variables */
   174: static UINT8		sound_banks;		/* number of sound banks */
   175: static UINT8		bloxeed_sound;		/* use kludge for bloxeed sound? */
   176: 
   177: /* RAM pointers */
   178: static data16_t *	main_ram;			/* pointer to main RAM */
   179: 
   180: /* Genesis based */
   181: unsigned int	z80_68000_latch			= 0;
   182: unsigned int	z80_latch_bitcount		= 0;
   183: static int z80running;
   184: static data16_t *genesis_68k_ram;
   185: static unsigned char *genesis_z80_ram;
   186: 
   187: /* Megatech BIOS specific */
   188: unsigned int bios_port_ctrl;
   189: unsigned int bios_ctrl_inputs;
   190: 
   191: 
   192: /******************************************************************************
   193: 	Interrupt handling
   194: *******************************************************************************
   195: 
   196: 	The C/C2 System uses 3 Different Interrupts, IRQ2, IRQ4 and IRQ6.
   197: 
   198: 	IRQ6 = Vblank, this happens after the last visible line of the display has
   199: 			been drawn (after line 224)
   200: 
   201: 	IRQ4 = H-Int, this happens based upon the value in H-Int Counter.  If the
   202: 			Horizontal Interrupt is enabled and the Counter Value = 0 there
   203: 			will be a Level 4 Interrupt Triggered
   204: 
   205: 	IRQ2 = sound int, generated by the YM3438
   206: 
   207: 	--------
   208: 
   209: 	More H-Counter Information:
   210: 
   211: 	Providing Horizontal Interrupts are active the H-Counter will be loaded
   212: 	with the value stored in register #10 (0x0A) at the following times:
   213: 		(1) At the top of the display, before drawing the first line
   214: 		(2) When the counter has expired
   215: 		(3) During the VBlank Period (lines 224-261)
   216: 	The Counter is decreased by 1 after every line.
   217: 
   218: ******************************************************************************/
   219: 
   220: /* call this whenever the interrupt state has changed */
   221: static void update_interrupts(void)
   222: {
   223: 	int level = 0;
   224: 
   225: 	/* determine which interrupt is active */
   226: 	if (ym3438_int) level = 2;
   227: 	if (scanline_int) level = 4;
   228: 	if (vblank_int) level = 6;
   229: 
   230: 	/* either set or clear the appropriate lines */
   231: 	if (level)
   232: 		cpu_set_irq_line(0, level, ASSERT_LINE);
   233: 	else
   234: 		cpu_set_irq_line(0, 7, CLEAR_LINE);
   235: }
   236: 
   237: 
   238: /* timer callback to turn off the IRQ4 signal after a short while */
   239: static void vdp_int4_off(int param)
   240: {
   241: 	scanline_int = 0;
   242: 	update_interrupts();
   243: }
   244: 
   245: 
   246: /* timer callback to handle reloading the H counter and generate IRQ4 */
   247: static void vdp_reload_counter(int scanline)
   248: {
   249: 	/* generate an int if they're enabled */
   250: 	if ((segac2_vdp_regs[0] & 0x10) && !(iochip_reg[7] & 0x10))
   251: 		if (scanline != 0 || segac2_vdp_regs[10] == 0)
   252: 		{
   253: 			scanline_int = 1;
   254: 			update_interrupts();
   255: 			timer_set(cpu_getscanlinetime(scanline + 1), 0, vdp_int4_off);
   256: 		}
   257: 
   258: 	/* advance to the next scanline */
   259: 	/* behavior 2: 0 count means interrupt after one scanline */
   260: 	/* (this behavior matches the Sega C2 emulator) */
   261: 	/* (in this case the vidhrdw ichidant kludge should be -2) */
   262: 	scanline += segac2_vdp_regs[10] + 1;
   263: 	if (scanline >= 224)
   264: 		scanline = 0;
   265: 
   266: 	/* set a timer */
   267: 	timer_set(cpu_getscanlinetime(scanline) + cpu_getscanlineperiod() * (320. / 342.), scanline, vdp_reload_counter);
   268: }
   269: 
   270: 
   271: /* timer callback to turn off the IRQ6 signal after a short while */
   272: static void vdp_int6_off(int param)
   273: {
   274: 	vblank_int = 0;
   275: 	update_interrupts();
   276: }
   277: 
   278: 
   279: /* interrupt callback to generate the VBLANK interrupt */
   280: static INTERRUPT_GEN( vblank_interrupt )
   281: {
   282: 	/* generate the interrupt */
   283: 	vblank_int = 1;
   284: 	update_interrupts();
   285: 
   286: 	/* set a timer to turn it off */
   287: 	timer_set(cpu_getscanlineperiod() * (22. / 342.), 0, vdp_int6_off);
   288: }
   289: 
   290: 
   291: /* interrupt callback to generate the YM3438 interrupt */
   292: static void ym3438_interrupt(int state)
   293: {
   294: 	ym3438_int = state;
   295: 	update_interrupts();
   296: }
   297: 
   298: 
   299: 
   300: /******************************************************************************
   301: 	Machine init
   302: *******************************************************************************
   303: 
   304: 	This is called at init time, when it's safe to create a timer. We use
   305: 	it to prime the scanline interrupt timer.
   306: 
   307: ******************************************************************************/
   308: 
   309: static MACHINE_INIT( segac2 )
   310: {
   311: 	/* set the first scanline 0 timer to go off */
   312: 	timer_set(cpu_getscanlinetime(0) + cpu_getscanlineperiod() * (320. / 342.), 0, vdp_reload_counter);
   313: 
   314: 	/* determine how many sound banks */
   315: 	sound_banks = 0;
   316: 	if (memory_region(REGION_SOUND1))
   317: 		sound_banks = memory_region_length(REGION_SOUND1) / 0x20000;
   318: 
   319: 	/* reset the protection */
   320: 	prot_write_buf = 0;
   321: 	prot_read_buf = 0;
   322: 	swizzle_table_index = 0;
   323: }
   324: 
   325: static MACHINE_INIT( genesis )
   326: {
   327:     /* the following ensures that the Z80 begins without running away from 0 */
   328: 	/* 0x76 is just a forced 'halt' as soon as the CPU is initially run */
   329:     genesis_z80_ram[0] = 0x76;
   330: 	genesis_z80_ram[0x38] = 0x76;
   331: 
   332: 	/* mirroring of ram etc. */
   333: 	cpu_setbank(1, &genesis_z80_ram[0]);
   334: 	cpu_setbank(2, &genesis_z80_ram[0]);
   335: 	cpu_setbank(3, &genesis_68k_ram[0]);
   336: 
   337: 	cpu_set_halt_line(1, ASSERT_LINE);
   338: 
   339: 	z80running = 0;
   340: 	logerror("Machine init\n");
   341: 
   342: 	timer_set(cpu_getscanlinetime(0) + cpu_getscanlineperiod() * (320. / 342.), 0, vdp_reload_counter);
   343: 
   344: }
   345: 
   346: 
   347: /******************************************************************************
   348: 	Sound handlers
   349: *******************************************************************************
   350: 
   351: 	These handlers are responsible for communicating with the (genenerally)
   352: 	8-bit sound chips. All accesses are via the low byte.
   353: 
   354: 	The Sega C/C2 system uses a YM3438 (compatible with the YM2612) for FM-
   355: 	based music generation, and an SN76489 for PSG and noise effects. The
   356: 	C2 board also appears to have a UPD7759 for sample playback.
   357: 
   358: ******************************************************************************/
   359: 
   360: /* handle reads from the YM3438 */
   361: static READ16_HANDLER( ym3438_r )
   362: {
   363: 	switch (offset)
   364: 	{
   365: 		case 0: return YM2612_status_port_0_A_r(0);
   366: 		case 1: return YM2612_read_port_0_r(0);
   367: 		case 2: return YM2612_status_port_0_B_r(0);
   368: 	}
   369: 	return 0xff;
   370: }
   371: 
   372: static READ16_HANDLER( puckpkmn_YM3438_r )
   373: {
   374: 	return	YM2612_status_port_0_A_r(0) << 8;
   375: }
   376: 
   377: 
   378: /* handle writes to the YM3438 */
   379: static WRITE16_HANDLER( ym3438_w )
   380: {
   381: 	/* only works if we're accessing the low byte */
   382: 	if (ACCESSING_LSB)
   383: 	{
   384: 		static UINT8 last_port;
   385: 
   386: 		/* kludge for Bloxeed - it seems to accidentally trip timer 2  */
   387: 		/* and has no recourse for clearing the interrupt; until we    */
   388: 		/* find more documentation on the 2612/3438, it's unknown what */
   389: 		/* to do here */
   390: 		if (bloxeed_sound && last_port == 0x27 && (offset & 1))
   391: 			data &= ~0x08;
   392: 
   393: 		switch (offset)
   394: 		{
   395: 			case 0: YM2612_control_port_0_A_w(0, data & 0xff);	last_port = data;	break;
   396: 			case 1: YM2612_data_port_0_A_w(0, data & 0xff);							break;
   397: 			case 2: YM2612_control_port_0_B_w(0, data & 0xff);	last_port = data;	break;
   398: 			case 3: YM2612_data_port_0_B_w(0, data & 0xff);							break;
   399: 		}
   400: 	}
   401: }
   402: 
   403: static WRITE16_HANDLER( puckpkmn_YM3438_w )
   404: {
   405: 	switch (offset)
   406: 	{
   407: 		case 0:
   408: 			if (ACCESSING_MSB)	YM2612_control_port_0_A_w	(0,	(data >> 8) & 0xff);
   409: 			else 				YM2612_data_port_0_A_w		(0,	(data >> 0) & 0xff);
   410: 			break;
   411: 		case 1:
   412: 			if (ACCESSING_MSB)	YM2612_control_port_0_B_w	(0,	(data >> 8) & 0xff);
   413: 			else 				YM2612_data_port_0_B_w		(0,	(data >> 0) & 0xff);
   414: 			break;
   415: 	}
   416: }
   417: 
   418: 
   419: 
   420: /* handle writes to the UPD7759 */
   421: static WRITE16_HANDLER( upd7759_w )
   422: {
   423: 	/* make sure we have a UPD chip */
   424: 	if (!sound_banks)
   425: 		return;
   426: 
   427: 	/* only works if we're accessing the low byte */
   428: 	if (ACCESSING_LSB)
   429: 	{
   430: 		UPD7759_reset_w(0, 0);
   431: 		UPD7759_reset_w(0, 1);
   432: 		UPD7759_port_w(0, data & 0xff);
   433: 		UPD7759_start_w(0, 0);
   434: 		UPD7759_start_w(0, 1);
   435: 	}
   436: }
   437: 
   438: 
   439: /* handle writes to the SN764896 */
   440: static WRITE16_HANDLER( sn76489_w )
   441: {
   442: 	/* only works if we're accessing the low byte */
   443: 	if (ACCESSING_LSB)
   444: 		SN76496_0_w(0, data & 0xff);
   445: }
   446: 
   447: 
   448: 
   449: /******************************************************************************
   450: 	Palette RAM Read / Write Handlers
   451: *******************************************************************************
   452: 
   453: 	The following Read / Write Handlers are used when accessing Palette RAM.
   454: 	The C2 Hardware appears to use 4 Banks of Colours 1 of which can be Mapped
   455: 	to 0x8C0000 - 0x8C03FF at any given time by writes to 0x84000E (This same
   456: 	address also looks to be used for things like Sample Banking)
   457: 
   458: 	Each Colour uses 15-bits (from a 16-bit word) in the Format
   459: 		xBGRBBBB GGGGRRRR  (x = unused, B = Blue, G = Green, R = Red)
   460: 
   461: 	As this works out the Palette RAM Stores 2048 from a Possible 4096 Colours
   462: 	at any given time.
   463: 
   464: ******************************************************************************/
   465: 
   466: /* handle reads from the paletteram */
   467: static READ16_HANDLER( palette_r )
   468: {
   469: 	return paletteram16[(offset & 0x1ff) + segac2_palbank];
   470: }
   471: 
   472: 
   473: /* handle writes to the paletteram */
   474: static WRITE16_HANDLER( palette_w )
   475: {
   476: 	int r,g,b,newword;
   477: 
   478: 	/* adjust for the palette bank */
   479: 	offset = (offset & 0x1ff) + segac2_palbank;
   480: 
   481: 	/* combine data */
   482: 	COMBINE_DATA(&paletteram16[offset]);
   483: 	newword = paletteram16[offset];
   484: 
   485: 	/* up to 8 bits */
   486: 	r = ((newword << 4) & 0xf0) | ((newword >>  9) & 0x08);
   487: 	g = ((newword >> 0) & 0xf0) | ((newword >> 10) & 0x08);
   488: 	b = ((newword >> 4) & 0xf0) | ((newword >> 11) & 0x08);
   489: 	r |= r >> 5;
   490: 	g |= g >> 5;
   491: 	b |= b >> 5;
   492: 
   493: 	/* set the color */
   494: 	palette_set_color(offset + 0x0000, r, g, b);
   495: }
   496: 
   497: 
   498: 
   499: /******************************************************************************
   500: 	Ribbit! Palette Swizzling
   501: *******************************************************************************
   502: 
   503: 	As additional protection, Ribbit! has some hardware that munges the
   504: 	palette addresses. The exact mechanism that enables/disables this is not
   505: 	really known, but can be reliably deduced by watching for certain ROM
   506: 	accesses.
   507: 
   508: ******************************************************************************/
   509: 
   510: static const UINT8 swizzle_table[][32] =
   511: {
   512: 	{	/* case 0 */
   513: 		0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
   514: 		0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f
   515: 	},
   516: 	{	/* case 1 */
   517: 		0x04,0x05,0x0c,0x0d,0x06,0x07,0x0e,0x0f,0x14,0x15,0x1c,0x1d,0x16,0x17,0x1e,0x1f,
   518: 		0x00,0x01,0x08,0x09,0x02,0x03,0x0a,0x0b,0x10,0x11,0x18,0x19,0x12,0x13,0x1a,0x1b
   519: 	},
   520: 	{	/* case 2 */
   521: 		0x14,0x15,0x1c,0x1d,0x00,0x01,0x02,0x03,0x16,0x17,0x1e,0x1f,0x04,0x05,0x06,0x07,
   522: 		0x10,0x11,0x18,0x19,0x08,0x09,0x0a,0x0b,0x12,0x13,0x1a,0x1b,0x0c,0x0d,0x0e,0x0f
   523: 	},
   524: 	{	/* case 3 */
   525: 		0x00,0x01,0x04,0x05,0x02,0x03,0x06,0x07,0x08,0x09,0x0c,0x0d,0x0a,0x0b,0x0e,0x0f,
   526: 		0x14,0x15,0x16,0x17,0x1c,0x1d,0x1e,0x1f,0x10,0x11,0x12,0x13,0x18,0x19,0x1a,0x1b
   527: 	}
   528: };
   529: 
   530: 
   531: /* handle palette RAM reads */
   532: static READ16_HANDLER( ribbit_palette_r )
   533: {
   534: 	int newoffs = (offset & 0x60f) | (swizzle_table[swizzle_table_index][(offset >> 4) & 0x1f] << 4);
   535: 	return palette_r(newoffs, mem_mask);
   536: }
   537: 
   538: 
   539: /* handle palette RAM writes */
   540: static WRITE16_HANDLER( ribbit_palette_w )
   541: {
   542: 	int newoffs = (offset & 0x60f) | (swizzle_table[swizzle_table_index][(offset >> 4) & 0x1f] << 4);
   543: 	if (LOG_PALETTE)
   544: 		if (offset % 16 == 0) logerror("%06X:palette_w @ %03X(%03X) = %04X [swizzle_table=%d]\n", activecpu_get_previouspc(), newoffs, offset, data, swizzle_table_index);
   545: 	palette_w(newoffs, data, mem_mask);
   546: }
   547: 
   548: 
   549: /* detect palette RAM swizzle accesses */
   550: static READ16_HANDLER( ribbit_palette_select_r )
   551: {
   552: 	/* if this is an access from the decryption code, check it out */
   553: 	if (activecpu_get_previouspc() == 0x2b4c)
   554: 	{
   555: 		switch (0x2000 + 2 * offset)
   556: 		{
   557: 			case 0x2006:	/* logs */
   558: 			case 0x2116:	/* gears, garden */
   559: 			case 0x2236:	/* ocean, bonus 1 */
   560: 			case 0x2356:	/* factory */
   561: 				swizzle_table_index = (offset >> 7) & 3;
   562: 				break;
   563: 
   564: 			case 0x2476:	/* intro screen L4 */
   565: 			case 0x2576:	/* intro screen L1 */
   566: 			case 0x2676:
   567: 				swizzle_table_index = ((offset >> 7) & 3) + 1;
   568: 				break;
   569: 		}
   570: 	}
   571: 	return ribbit_palette_select[offset];
   572: }
   573: 
   574: 
   575: 
   576: /******************************************************************************
   577: 	Palette I/O Read & Write Handlers
   578: *******************************************************************************
   579: 
   580: 	Controls, and Poto Poto reads 'S' 'E' 'G' and 'A' (SEGA) from this area
   581: 	as a form of protection.
   582: 
   583: 	Lots of unknown writes however offset 0E certainly seems to be banking,
   584: 	both colours and sound sample banks.
   585: 
   586: ******************************************************************************/
   587: 
   588: /* handle I/O chip reads */
   589: static READ16_HANDLER( iochip_r )
   590: {
   591: 	switch (offset)
   592: 	{
   593: 		case 0x00:	return 0xff00 | readinputport(1);
   594: 		case 0x01:	return 0xff00 | readinputport(2);
   595: 		case 0x02:	if (sound_banks)
   596: 						return 0xff00 | (UPD7759_0_busy_r(0) << 6) | 0xbf; /* must return high bit on */
   597: 					else
   598: 						return 0xffff;
   599: 		case 0x04:	return 0xff00 | readinputport(0);
   600: 		case 0x05:	return 0xff00 | readinputport(3);
   601: 		case 0x06:	return 0xff00 | readinputport(4);
   602: 		case 0x08:	return 0xff00 | 'S'; /* for Poto Poto */
   603: 		case 0x09:	return 0xff00 | 'E'; /* for Poto Poto */
   604: 		case 0x0a:	return 0xff00 | 'G'; /* for Poto Poto */
   605: 		case 0x0b:	return 0xff00 | 'A'; /* for Poto Poto */
   606: 		default:	return 0xff00 | iochip_reg[offset];
   607: 	}
   608: 	return 0xffff;
   609: }
   610: 
   611: 
   612: /* handle I/O chip writes */
   613: static WRITE16_HANDLER( iochip_w )
   614: {
   615: 	int newbank;
   616: 
   617: 	/* only LSB matters */
   618: 	if (!ACCESSING_LSB)
   619: 		return;
   620: 
   621: 	/* track what was written */
   622: 	iochip_reg[offset] = data;
   623: 
   624: 	/* handle special writes */
   625: 	switch (offset)
   626: 	{
   627: 		case 0x03:
   628: 			/* Bit  4   = ??? */
   629: 			break;
   630: 
   631: 		case 0x07:
   632: 			/* Bits 0-1 = master palette base - maps 1 of 4 1024-entry banks into paletteram */
   633: 			/* Bits 2-3 = UPD7759 sample bank - maps 1 of 4 128k banks into the UPD7759 space */
   634: 			/* Bit  4   = IRQ4 enable/acknowledge */
   635: 			/* Bit  5   = IRQ6 enable/acknowledge (?) */
   636: 			newbank = (data & 3) * 0x200;
   637: 			if (newbank != segac2_palbank)
   638: 			{
   639: 				force_partial_update(cpu_getscanline() + 1);
   640: 				segac2_palbank = newbank;
   641: 			}
   642: 			if (sound_banks > 1)
   643: 			{
   644: 				newbank = (data >> 2) & (sound_banks - 1);
   645: 				UPD7759_set_bank_base(0, newbank * 0x20000);
   646: 			}
   647: 			break;
   648: 
   649: 		case 0x0e:
   650: 			/* Bit  1   = YM3438 reset? no - breaks poto poto */
   651: /*			if (!(data & 2))
   652: 				YM2612_sh_reset();*/
   653: 			break;
   654: 
   655: 		case 0x0f:
   656: 			/* ???? */
   657: 			if (data != 0x88)
   658: 				if (LOG_IOCHIP) logerror("%06x:I/O write @ %02x = %02x\n", activecpu_get_previouspc(), offset, data & 0xff);
   659: 			break;
   660: 
   661: 		default:
   662: 			if (LOG_IOCHIP) logerror("%06x:I/O write @ %02x = %02x\n", activecpu_get_previouspc(), offset, data & 0xff);
   663: 			break;
   664: 	}
   665: }
   666: 
   667: 
   668: 
   669: /******************************************************************************
   670: 	Control Write Handler
   671: *******************************************************************************
   672: 
   673: 	Seems to control some global states. The most important bit is the low
   674: 	one, which enables/disables the display. This is used while tiles are
   675: 	being modified in Bloxeed.
   676: 
   677: ******************************************************************************/
   678: 
   679: static WRITE16_HANDLER( control_w )
   680: {
   681: 	/* skip if not LSB */
   682: 	if (!ACCESSING_LSB)
   683: 		return;
   684: 	data &= 0xff;
   685: 
   686: 	/* bit 0 controls display enable */
   687: 	segac2_enable_display(~data & 1);
   688: 
   689: 	/* log anything suspicious */
   690: 	if (LOG_IOCHIP)
   691: 		if (data != 6 && data != 7) logerror("%06x:control_w suspicious value = %02X (%d)\n", activecpu_get_previouspc(), data, cpu_getscanline());
   692: }
   693: 
   694: 
   695: 
   696: /******************************************************************************
   697: 	Protection Read / Write Handlers
   698: *******************************************************************************
   699: 
   700: 	The protection chip is fairly simple. Writes to it control the palette
   701: 	banking for the sprites and backgrounds. The low 4 bits are also
   702: 	remembered in a 2-stage FIFO buffer. A read from this chip should
   703: 	return a value from a 256x4-bit table. The index into this table is
   704: 	computed by taking the second-to-last value written in the upper 4 bits,
   705: 	and the previously-fetched table value in the lower 4 bits.
   706: 
   707: ******************************************************************************/
   708: 
   709: /* protection chip reads */
   710: static READ16_HANDLER( prot_r )
   711: {
   712: 	if (LOG_PROTECTION) logerror("%06X:protection r=%02X\n", activecpu_get_previouspc(), prot_table ? prot_read_buf : 0xff);
   713: 	return prot_read_buf | 0xf0;
   714: }
   715: 
   716: 
   717: /* protection chip writes */
   718: static WRITE16_HANDLER( prot_w )
   719: {
   720: 	int new_sp_palbase = ((data >> 2) & 3) * 0x40 + 0x100;
   721: 	int new_bg_palbase = (data & 3) * 0x40;
   722: 	int table_index;
   723: 
   724: 	/* only works for the LSB */
   725: 	if (!ACCESSING_LSB)
   726: 		return;
   727: 
   728: 	/* keep track of the last few writes */
   729: 	prot_write_buf = (prot_write_buf << 4) | (data & 0x0f);
   730: 
   731: 	/* compute the table index */
   732: 	table_index = (prot_write_buf & 0xf0) | prot_read_buf;
   733: 
   734: 	/* determine the value to return, should a read occur */
   735: 	if (prot_table)
   736: 		prot_read_buf = (prot_table[table_index >> 3] << (4 * (table_index & 7))) >> 28;
   737: 	if (LOG_PROTECTION) logerror("%06X:protection w=%02X, new result=%02X\n", activecpu_get_previouspc(), data & 0x0f, prot_read_buf);
   738: 
   739: 	/* if the palette changed, force an update */
   740: 	if (new_sp_palbase != segac2_sp_palbase || new_bg_palbase != segac2_bg_palbase)
   741: 	{
   742: 		force_partial_update(cpu_getscanline() + 1);
   743: 		segac2_sp_palbase = new_sp_palbase;
   744: 		segac2_bg_palbase = new_bg_palbase;
   745: 		if (LOG_PALETTE) logerror("Set palbank: %d/%d (scan=%d)\n", segac2_bg_palbase, segac2_sp_palbase, cpu_getscanline());
   746: 	}
   747: }
   748: 
   749: 
   750: /* special puyo puyo 2 chip reads */
   751: static READ16_HANDLER( puyopuy2_prot_r )
   752: {
   753: 	/* Puyo Puyo 2 uses the same protection mechanism, but the table isn't */
   754: 	/* encoded in a way that tells us the return values directly; this */
   755: 	/* function just feeds it what it wants */
   756: 	int table_index = (prot_write_buf & 0xf0) | ((prot_write_buf >> 8) & 0x0f);
   757: 	if (prot_table)
   758: 		prot_read_buf = (prot_table[table_index >> 3] << (4 * (table_index & 7))) >> 28;
   759: 	if (LOG_PROTECTION) logerror("%06X:protection r=%02X\n", activecpu_get_previouspc(), prot_table ? prot_read_buf : 0xff);
   760: 	return prot_read_buf | 0xf0;
   761: }
   762: 
   763: 
   764: /* kludge for Ribbit! */
   765: static READ16_HANDLER( ribbit_prot_hack_r )
   766: {
   767: 	data16_t result = main_ram[0xc166/2];
   768: 
   769: 	/* Ribbit is kind of evil in that they store the table shifted one state out of sequence */
   770: 	/* the following code just makes sure that the important comparison works */
   771: 	if (activecpu_get_previouspc() >= 0xff0000)
   772: 		result = (result & 0xff00) | (result >> 8);
   773: 	return result;
   774: }
   775: 
   776: 
   777: 
   778: /******************************************************************************
   779: 	Counter/timer I/O
   780: *******************************************************************************
   781: 
   782: 	There appears to be a chip that is used to count coins and track time
   783: 	played, or at the very least the current status of the game. All games
   784: 	except Puyo Puyo 2 and Poto Poto access this in a mostly consistent
   785: 	manner.
   786: 
   787: ******************************************************************************/
   788: 
   789: static WRITE16_HANDLER( counter_timer_w )
   790: {
   791: 	/* only LSB matters */
   792: 	if (ACCESSING_LSB)
   793: 	{
   794: 		/*int value = data & 1;*/
   795: 		switch (data & 0x1e)
   796: 		{
   797: 			case 0x00:	/* player 1 start/stop */
   798: 			case 0x02:	/* player 2 start/stop */
   799: 			case 0x04:	/* ??? */
   800: 			case 0x06:	/* ??? */
   801: 			case 0x08:	/* player 1 game timer? */
   802: 			case 0x0a:	/* player 2 game timer? */
   803: 			case 0x0c:	/* ??? */
   804: 			case 0x0e:	/* ??? */
   805: 				break;
   806: 
   807: 			case 0x10:	/* coin counter */
   808: 				coin_counter_w(0,1);
   809: 				coin_counter_w(0,0);
   810: 				break;
   811: 
   812: 			case 0x12:	/* set coinage info -- followed by two 4-bit values */
   813: 				break;
   814: 
   815: 			case 0x14:	/* game timer? (see Tant-R) */
   816: 			case 0x16:	/* intro timer? (see Tant-R) */
   817: 			case 0x18:	/* ??? */
   818: 			case 0x1a:	/* ??? */
   819: 			case 0x1c:	/* ??? */
   820: 				break;
   821: 
   822: 			case 0x1e:	/* reset */
   823: 				break;
   824: 		}
   825: 	}
   826: }
   827: 
   828: 
   829: 
   830: /******************************************************************************
   831: 	NVRAM Handling
   832: *******************************************************************************
   833: 
   834: 	There is a battery on the board that keeps the high scores. However,
   835: 	simply saving the RAM doesn't seem to be good enough. This is still
   836: 	pending investigation.
   837: 
   838: ******************************************************************************/
   839: 
   840: /*
   841: static void nvram_handler(mame_file *file, int read_or_write)
   842: {
   843: 	int i;
   844: 
   845: 	if (read_or_write)
   846: 		mame_fwrite(file, main_ram, 0x10000);
   847: 	else if (file)
   848: 		mame_fread(file, main_ram, 0x10000);
   849: 	else
   850: 		for (i = 0; i < 0x10000/2; i++)
   851: 			main_ram[i] = rand();
   852: }
   853: */
   854: 
   855: /**************
   856: 
   857: Hiscores:
   858: 
   859: Bloxeed  @ f400-????			[key = ???]
   860: Columns  @ fc00-ffff			[key = '(C) SEGA 1990.JAN BY.TAKOSUKEZOU' @ fc00,ffe0]
   861: Columns2 @ fc00-ffff			[key = '(C) SEGA 1990.SEP.COLUMNS2 JAPAN' @ fc00,fd00,fe00,ffe0]
   862: Borench  @ f400-f5ff			[key = 'EIJI' in last word]
   863: TForceAC @ 8100-817f/8180-81ff	[key = '(c)Tehcno soft90' @ 8070 and 80f0]
   864: TantR    @ fc00-fcff/fd00-fdff	[key = 0xd483 in last word]
   865: PuyoPuyo @ fc00-fdff/fe00-ffff	[key = 0x28e1 in first word]
   866: Ichidant @ fc00-fcff/fd00-fdff	[key = 0x85a9 in last word]
   867: StkClmns @ fc00-fc7f/fc80-fcff	[key = ???]
   868: PuyoPuy2
   869: PotoPoto
   870: ZunkYou
   871: 
   872: ***************/
   873: 
   874: 
   875: 
   876: /******************************************************************************
   877: 	Memory Maps
   878: *******************************************************************************
   879: 
   880: 	The System C/C2 68k Memory map is fairly similar to the Genesis in terms
   881: 	of RAM, ROM, VDP access locations, although the differences between the
   882: 	arcade system and the Genesis means its not same.
   883: 
   884: 	The information here has been worked out from the games, and there may
   885: 	be some uncertain things, for example Puyo Puyo 2 I believe accesses
   886: 	0x8C0400 - 0x8C0FFF which is outside of what is seeminly valid paletteram.
   887: 
   888: ******************************************************************************/
   889: 
   890: static MEMORY_READ16_START( readmem )
   891: 	{ 0x000000, 0x1fffff, MRA16_ROM },					/* Main 68k Program Roms */
   892: 	{ 0x800000, 0x800001, prot_r },						/* The Protection Chip? */
   893: 	{ 0x840000, 0x84001f, iochip_r },					/* I/O Chip */
   894: 	{ 0x840100, 0x840107, ym3438_r },					/* Ym3438 Sound Chip Status Register */
   895: 	{ 0x8c0000, 0x8c0fff, palette_r },					/* Palette Ram */
   896: 	{ 0xc00000, 0xc0001f, segac2_vdp_r },				/* VDP Access */
   897: 	{ 0xff0000, 0xffffff, MRA16_RAM },					/* Main Ram */
   898: MEMORY_END
   899: 
   900: static MEMORY_WRITE16_START( writemem )
   901: 	{ 0x000000, 0x1fffff, MWA16_ROM },					/* Main 68k Program Roms */
   902: 	{ 0x800000, 0x800001, prot_w },						/* The Protection Chip? */
   903: 	{ 0x800200, 0x800201, control_w },					/* Seems to be global controls */
   904: 	{ 0x840000, 0x84001f, iochip_w },					/* I/O Chip */
   905: 	{ 0x840100, 0x840107, ym3438_w },					/* Ym3438 Sound Chip Writes */
   906: 	{ 0x880000, 0x880001, upd7759_w },					/* UPD7759 Sound Writes */
   907: 	{ 0x880134, 0x880135, counter_timer_w },			/* Bookkeeping */
   908: 	{ 0x880334, 0x880335, counter_timer_w },			/* Bookkeeping (mirror) */
   909: 	{ 0x8c0000, 0x8c0fff, palette_w, &paletteram16 },	/* Palette Ram */
   910: 	{ 0xc00000, 0xc0000f, segac2_vdp_w },				/* VDP Access */
   911: 	{ 0xc00010, 0xc00017, sn76489_w },					/* SN76489 Access */
   912: 	{ 0xff0000, 0xffffff, MWA16_RAM, &main_ram },		/* Main Ram */
   913: MEMORY_END
   914: 
   915: 
   916: static MEMORY_READ16_START( puckpkmn_readmem )
   917: 	{ 0x000000, 0x1fffff, MRA16_ROM },					/* Main 68k Program Roms */
   918: 	{ 0x700010, 0x700011, input_port_0_word_r },		/* Input (P2) */
   919: 	{ 0x700012, 0x700013, input_port_1_word_r },		/* Input (P1) */
   920: 	{ 0x700014, 0x700015, input_port_2_word_r },		/* Input (?) */
   921: 	{ 0x700016, 0x700017, input_port_3_word_r },		/* Input (DSW1) */
   922: 	{ 0x700018, 0x700019, input_port_4_word_r },		/* Input (DSW2) */
   923: 	{ 0x700022, 0x700023, OKIM6295_status_0_lsb_r },	/* M6295 Sound Chip Status Register */
   924: 	{ 0xa04000, 0xa04001, puckpkmn_YM3438_r },			/* Ym3438 Sound Chip Status Register */
   925: 	{ 0xc00000, 0xc0001f, segac2_vdp_r },				/* VDP Access */
   926: 	{ 0xe00000, 0xe1ffff, MRA16_BANK1 },				/* VDP sees the roms here */
   927: 	{ 0xfe0000, 0xfeffff, MRA16_BANK2 },				/* VDP sees the ram here */
   928: 	{ 0xff0000, 0xffffff, MRA16_RAM	},					/* Main Ram */
   929: 
   930: 	/* Unknown reads: */
   931: //	{ 0xa10000, 0xa10001, MRA16_NOP },					/* ? once */
   932: 	{ 0xa10002, 0xa10005, MRA16_NOP },					/* ? alternative way of reading inputs ? */
   933: 	{ 0xa11100, 0xa11101, MRA16_NOP },					/* ? */
   934: MEMORY_END
   935: 
   936: static MEMORY_WRITE16_START( puckpkmn_writemem )
   937: 	{ 0x000000, 0x1fffff, MWA16_ROM },					/* Main 68k Program Roms */
   938: 	{ 0x700022, 0x700023, OKIM6295_data_0_lsb_w },		/* M6295 Sound Chip Writes */
   939: 	{ 0xa04000, 0xa04003, puckpkmn_YM3438_w },			/* Ym3438 Sound Chip Writes */
   940: 	{ 0xc00000, 0xc0000f, segac2_vdp_w },				/* VDP Access */
   941: 	{ 0xc00010, 0xc00017, sn76489_w },					/* SN76489 Access */
   942: 	{ 0xff0000, 0xffffff, MWA16_RAM, &main_ram },		/* Main Ram */
   943: 
   944: 	/* Unknown writes: */
   945: 	{ 0xa00000, 0xa00551, MWA16_RAM },					/* ? */
   946: 	{ 0xa10002, 0xa10005, MWA16_NOP },					/* ? alternative way of reading inputs ? */
   947: //	{ 0xa10008, 0xa1000d, MWA16_NOP },					/* ? once */
   948: //	{ 0xa14000, 0xa14003, MWA16_NOP },					/* ? once */
   949: 	{ 0xa11100, 0xa11101, MWA16_NOP },					/* ? */
   950: 	{ 0xa11200, 0xa11201, MWA16_NOP },					/* ? */
   951: MEMORY_END
   952: 
   953: /******************** Sega Genesis ******************************/
   954: 
   955: /* from MESS */
   956: READ16_HANDLER(genesis_ctrl_r)
   957: {
   958: /*	int returnval; */
   959: 
   960: /*  logerror("genesis_ctrl_r %x\n", offset); */
   961: 	switch (offset)
   962: 	{
   963: 	case 0:							/* DRAM mode is write only */
   964: 		return 0xffff;
   965: 		break;
   966: 	case 0x80:						/* return Z80 CPU Function Stop Accessible or not */
   967: 		/* logerror("Returning z80 state\n"); */
   968: 		return (z80running ? 0x0100 : 0x0);
   969: 		break;
   970: 	case 0x100:						/* Z80 CPU Reset - write only */
   971: 		return 0xffff;
   972: 		break;
   973: 	}
   974: 	return 0x00;
   975: 
   976: }
   977: 
   978: /* from MESS */
   979: WRITE16_HANDLER(genesis_ctrl_w)
   980: {
   981: 	data &= ~mem_mask;
   982: 
   983: /*	logerror("genesis_ctrl_w %x, %x\n", offset, data); */
   984: 
   985: 	switch (offset)
   986: 	{
   987: 	case 0:							/* set DRAM mode... we have to ignore this for production cartridges */
   988: 		return;
   989: 		break;
   990: 	case 0x80:						/* Z80 BusReq */
   991: 		if (data == 0x100)
   992: 		{
   993: 			z80running = 0;
   994: 			cpu_set_halt_line(1, ASSERT_LINE);	/* halt Z80 */
   995: 			/* logerror("z80 stopped by 68k BusReq\n"); */
   996: 		}
   997: 		else
   998: 		{
   999: 			z80running = 1;
  1000: 			cpu_setbank(1, &genesis_z80_ram[0]);
  1001: 
  1002: 			cpu_set_halt_line(1, CLEAR_LINE);
  1003: 			/* logerror("z80 started, BusReq ends\n"); */
  1004: 		}
  1005: 		return;
  1006: 		break;
  1007: 	case 0x100:						/* Z80 CPU Reset */
  1008: 		if (data == 0x00)
  1009: 		{
  1010: 			cpu_set_halt_line(1, ASSERT_LINE);
  1011: 			cpu_set_reset_line(1, PULSE_LINE);
  1012: 
  1013: 			cpu_set_halt_line(1, ASSERT_LINE);
  1014: 			/* logerror("z80 reset, ram is %p\n", &genesis_z80_ram[0]); */
  1015: 			z80running = 0;
  1016: 			return;
  1017: 		}
  1018: 		else
  1019: 		{
  1020: 			/* logerror("z80 out of reset\n"); */
  1021: 		}
  1022: 		return;
  1023: 
  1024: 		break;
  1025: 	}
  1026: }
  1027: 
  1028: static READ16_HANDLER ( genesis_68k_to_z80_r )
  1029: {
  1030: 	offset *= 2;
  1031: 	offset &= 0x7fff;
  1032: 
  1033: 	/* Shared Ram */
  1034: 	if ((offset >= 0x0000) && (offset <= 0x3fff))
  1035: 	{
  1036: 		offset &=0x1fff;
  1037: //		logerror("soundram_r returning %x\n",(gen_z80_shared[offset] << 8) + gen_z80_shared[offset+1]);
  1038: 		return (genesis_z80_ram[offset] << 8) + genesis_z80_ram[offset+1];
  1039: 	}
  1040: 
  1041: 	/* YM2610 */
  1042: 	if ((offset >= 0x4000) && (offset <= 0x5fff))
  1043: 	{
  1044: 		switch (offset & 3)
  1045: 		{
  1046: 		case 0:
  1047: 			if (ACCESSING_MSB)	 return YM2612_status_port_0_A_r(0) << 8;
  1048: 			else 				 return YM2612_read_port_0_r(0);
  1049: 			break;
  1050: 		case 2:
  1051: 			if (ACCESSING_MSB)	return YM2612_status_port_0_B_r(0) << 8;
  1052: 			else 				return 0;
  1053: 			break;
  1054: 		}
  1055: 	}
  1056: 
  1057: 	/* Bank Register */
  1058: 	if ((offset >= 0x6000) && (offset <= 0x60ff))
  1059: 	{
  1060: 
  1061: 	}
  1062: 
  1063: 	/* Unused / Illegal */
  1064: 	if ((offset >= 0x6100) && (offset <= 0x7eff))
  1065: 	{
  1066: 		/* nothing */
  1067: 	}
  1068: 
  1069: 	/* VDP */
  1070: 	if ((offset >= 0x7f00) && (offset <= 0x7fff))
  1071: 	{
  1072: 
  1073: 	}
  1074: 
  1075: 	return 0x0000;
  1076: }
  1077: 
  1078: 
  1079: static WRITE16_HANDLER ( genesis_68k_to_z80_w )
  1080: {
  1081: 	offset *= 2;
  1082: 	offset &= 0x7fff;
  1083: 
  1084: 	/* Shared Ram */
  1085: 	if ((offset >= 0x0000) && (offset <= 0x3fff))
  1086: 	{
  1087: 		offset &=0x1fff;
  1088: 
  1089: 	if (ACCESSING_LSB) genesis_z80_ram[offset+1] = data & 0xff;
  1090: 	if (ACCESSING_MSB) genesis_z80_ram[offset] = (data >> 8) & 0xff;
  1091: 	}
  1092: 
  1093: 	/* YM2610 */
  1094: 	if ((offset >= 0x4000) && (offset <= 0x5fff))
  1095: 	{
  1096: 		switch (offset & 3)
  1097: 		{
  1098: 		case 0:
  1099: 			if (ACCESSING_MSB)	YM2612_control_port_0_A_w	(0,	(data >> 8) & 0xff);
  1100: 			else 				YM2612_data_port_0_A_w		(0,	(data >> 0) & 0xff);
  1101: 			break;
  1102: 		case 2:
  1103: 			if (ACCESSING_MSB)	YM2612_control_port_0_B_w	(0,	(data >> 8) & 0xff);
  1104: 			else 				YM2612_data_port_0_B_w		(0,	(data >> 0) & 0xff);
  1105: 			break;
  1106: 		}
  1107: 	}
  1108: 
  1109: 	/* Bank Register */
  1110: 	if ((offset >= 0x6000) && (offset <= 0x60ff))
  1111: 	{
  1112: 
  1113: 	}
  1114: 
  1115: 	/* Unused / Illegal */
  1116: 	if ((offset >= 0x6100) && (offset <= 0x7eff))
  1117: 	{
  1118: 		/* nothing */
  1119: 	}
  1120: 
  1121: 	/* VDP */
  1122: 	if ((offset >= 0x7f00) && (offset <= 0x7fff))
  1123: 	{
  1124: 		offset &= 0x1f;
  1125: 
  1126: 		if ( (offset >= 0x10) && (offset <=0x17) )
  1127: 		{
  1128: 			if (ACCESSING_LSB) SN76496_0_w(0, data & 0xff);
  1129: 			if (ACCESSING_MSB) SN76496_0_w(0, (data >>8) & 0xff);
  1130: 		}
  1131: 
  1132: 	}
  1133: }
  1134: 
  1135: /* Gen I/O */
  1136: 
  1137: /*
  1138: cgfm info
  1139: 
  1140: $A10001 Version
  1141: $A10003 Port A data
  1142: $A10005 Port B data
  1143: $A10007 Port C data
  1144: $A10009 Port A control
  1145: $A1000B Port B control
  1146: $A1000D Port C control
  1147: $A1000F Port A TxData
  1148: $A10011 Port A RxData
  1149: $A10013 Port A serial control
  1150: $A10015 Port B TxData
  1151: $A10017 Port B RxData
  1152: $A10019 Port B serial control
  1153: $A1001B Port C TxData
  1154: $A1001D Port C RxData
  1155: $A1001F Port C serial control
  1156: 
  1157: */
  1158: 
  1159: data16_t *genesis_io_ram;
  1160: 
  1161: READ16_HANDLER ( genesis_io_r )
  1162: {
  1163: 	/* 8-bit only, data is mirrored in both halves */
  1164: 
  1165: 	UINT8 return_value = 0;
  1166: 
  1167: 	switch (offset)
  1168: 	{
  1169: 		case 0:
  1170: 		/* Charles MacDonald ( http://cgfm2.emuviews.com/ )
  1171: 		    D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan)
  1172: 		    D6 : Video type is 1= PAL, 0= NTSC
  1173: 		    D5 : Sega CD unit is 1= not present, 0= connected.
  1174: 		    D4 : Unused (always returns zero)
  1175: 		    D3 : Bit 3 of version number
  1176: 		    D2 : Bit 2 of version number
  1177: 		    D1 : Bit 1 of version number
  1178: 		    D0 : Bit 0 of version number
  1179: 		*/
  1180: 			return_value = 0x80; /* ? megatech is usa? */
  1181: 			break;
  1182: 
  1183: 		case 1: /* port A data (joypad 1) */
  1184: 
  1185: 			if (genesis_io_ram[offset] & 0x40) 
  1186: 			{
  1187: 				int iport = readinputport(9);
  1188: 				return_value = iport & 0x3f;
  1189: 			}
  1190: 			else 
  1191: 			{
  1192: 				int iport1 = readinputport(12);
  1193: 				int iport2 = readinputport(7) >> 1;
  1194: 				return_value = (iport1 & 0x10) + (iport2 & 0x20);
  1195: 			}
  1196: 
  1197: 			return_value = (genesis_io_ram[offset] & 0x80) | return_value;
  1198: 			logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0x80, return_value &0x7f);
  1199: 			if(bios_ctrl_inputs & 0x04) return_value = 0xff;
  1200: 			break;
  1201: 
  1202: 		case 2: /* port B data (joypad 1) */
  1203: 
  1204: 			if (genesis_io_ram[offset] & 0x40) 
  1205: 			{
  1206: 				int iport1 = (readinputport(9) & 0xc0) >> 6;
  1207: 				int iport2 = (readinputport(8) & 0x0f) << 2;
  1208: 				return_value = (iport1 + iport2) & 0x3f;
  1209: 			}
  1210: 			else
  1211: 			{
  1212: 				int iport1 = readinputport(12) << 2;
  1213: 				int iport2 = readinputport(7) >> 2;
  1214: 				return_value = (iport1 & 0x10) + (iport2 & 0x20);
  1215: 			}
  1216: 			return_value = (genesis_io_ram[offset] & 0x80) | return_value;
  1217: 			logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0x80, return_value &0x7f);
  1218: 			if(bios_ctrl_inputs & 0x04) return_value = 0xff;
  1219: 			break;
  1220: 
  1221: 		default:
  1222: 			return_value = 0x00;
  1223: 
  1224: 	}
  1225: 	return return_value | return_value << 8;
  1226: 
  1227: 
  1228: 
  1229: }
  1230: 
  1231: WRITE16_HANDLER ( genesis_io_w )
  1232: {
  1233: 	logerror ("write io offset :%02x data %04x\n",offset,data);
  1234: 
  1235: 	switch (offset)
  1236: 	{
  1237: 		case 0x00:
  1238: 		/*??*/
  1239: 		break;
  1240: 
  1241: 		case 0x01:/* port A data */
  1242: 		genesis_io_ram[offset] = data;
  1243: 		break;
  1244: 
  1245: 		case 0x02: /* port B data */
  1246: 		genesis_io_ram[offset] = data;
  1247: 		break;
  1248: 
  1249: 		case 0x03: /* port B data */
  1250: 		genesis_io_ram[offset] = data;
  1251: 		break;
  1252: 
  1253: 		case 0x04: /* port C data */
  1254: 		genesis_io_ram[offset] = data;
  1255: 		break;
  1256: 
  1257: 		case 0x05: /* port A control */
  1258: 		genesis_io_ram[offset] = data;
  1259: 		break;
  1260: 
  1261: 		case 0x06: /* port B control */
  1262: 		genesis_io_ram[offset] = data;
  1263: 		break;
  1264: 
  1265: 		case 0x07: /* port C control */
  1266: 		genesis_io_ram[offset] = data;
  1267: 		break;
  1268: 	}
  1269: 
  1270: }
  1271: 
  1272: 
  1273: static MEMORY_READ16_START( genesis_readmem )
  1274: 	{ 0x000000, 0x3fffff, MRA16_ROM },					/* Cartridge Program Rom */
  1275: 	{ 0xa10000, 0xa1001f, genesis_io_r },				/* Genesis Input */
  1276: 	{ 0xa00000, 0xa0ffff, genesis_68k_to_z80_r },
  1277: 	{ 0xc00000, 0xc0001f, segac2_vdp_r },				/* VDP Access */
  1278: 	{ 0xfe0000, 0xfeffff, MRA16_BANK3 },				/* Main Ram */
  1279: 	{ 0xff0000, 0xffffff, MRA16_RAM },					/* Main Ram */
  1280: MEMORY_END
  1281: 
  1282: static MEMORY_WRITE16_START( genesis_writemem )
  1283: 	{ 0x000000, 0x3fffff, MWA16_ROM },					/* Cartridge Program Rom */
  1284: 	{ 0xa10000, 0xa1001f, genesis_io_w, &genesis_io_ram },				/* Genesis Input */
  1285: 	{ 0xa11000, 0xa11203, genesis_ctrl_w },
  1286: 	{ 0xa00000, 0xa0ffff, genesis_68k_to_z80_w },
  1287: 	{ 0xc00000, 0xc0000f, segac2_vdp_w },				/* VDP Access */
  1288: 	{ 0xc00010, 0xc00017, sn76489_w },					/* SN76489 Access */
  1289: 	{ 0xfe0000, 0xfeffff, MWA16_BANK3 },				/* Main Ram */
  1290: 	{ 0xff0000, 0xffffff, MWA16_RAM, &genesis_68k_ram },/* Main Ram */
  1291: MEMORY_END
  1292: 
  1293: /* Z80 Sound Hardware - based on MESS code, to be improved, it can do some strange things */
  1294: 
  1295: #ifdef LSB_FIRST 
  1296: 	#define BYTE_XOR(a) ((a) ^ 1)
  1297: #else 
  1298: 	#define BYTE_XOR(a) (a)
  1299: #endif 
  1300: 
  1301: 
  1302: 
  1303: static WRITE_HANDLER ( genesis_bank_select_w ) /* note value will be meaningless unless all bits are correctly set in */
  1304: {
  1305: 	if (offset !=0 ) return;
  1306: //	if (!z80running) logerror("undead Z80 latch write!\n");
  1307: 	if (z80_latch_bitcount == 0) z80_68000_latch = 0;
  1308: 
  1309: 	z80_68000_latch = z80_68000_latch | ((( ((unsigned char)data) & 0x01) << (15+z80_latch_bitcount)));
  1310:  	logerror("value %x written to latch\n", data);
  1311: 	z80_latch_bitcount++;
  1312: 	if (z80_latch_bitcount == 9)
  1313: 	{
  1314: 		z80_latch_bitcount = 0;
  1315: 		logerror("latch set, value %x\n", z80_68000_latch);
  1316: 	}
  1317: }
  1318: 
  1319: static READ_HANDLER ( genesis_z80_r )
  1320: {
  1321: 	offset += 0x4000;
  1322: 
  1323: 	/* YM2610 */
  1324: 	if ((offset >= 0x4000) && (offset <= 0x5fff))
  1325: 	{
  1326: 		switch (offset & 3)
  1327: 		{
  1328: 		case 0: return YM2612_status_port_0_A_r(0);
  1329: 		case 1: return YM2612_read_port_0_r(0);
  1330: 		case 2: return YM2612_status_port_0_B_r(0);
  1331: 		case 3: return 0;
  1332: 		}
  1333: 	}
  1334: 
  1335: 	/* Bank Register */
  1336: 	if ((offset >= 0x6000) && (offset <= 0x60ff))
  1337: 	{
  1338: 
  1339: 	}
  1340: 
  1341: 	/* Unused / Illegal */
  1342: 	if ((offset >= 0x6100) && (offset <= 0x7eff))
  1343: 	{
  1344: 		/* nothing */
  1345: 	}
  1346: 
  1347: 	/* VDP */
  1348: 	if ((offset >= 0x7f00) && (offset <= 0x7fff))
  1349: 	{
  1350: 
  1351: 	}
  1352: 
  1353: 	return 0x00;
  1354: }
  1355: 
  1356: static WRITE_HANDLER ( genesis_z80_w )
  1357: {
  1358: 	offset += 0x4000;
  1359: 
  1360: 	/* YM2610 */
  1361: 	if ((offset >= 0x4000) && (offset <= 0x5fff))
  1362: 	{
  1363: 		switch (offset & 3)
  1364: 		{
  1365: 		case 0: YM2612_control_port_0_A_w	(0,	data);
  1366: 			break;
  1367: 		case 1: YM2612_data_port_0_A_w		(0, data);
  1368: 			break;
  1369: 		case 2: YM2612_control_port_0_B_w	(0,	data);
  1370: 			break;
  1371: 		case 3: YM2612_data_port_0_B_w		(0,	data);
  1372: 			break;
  1373: 		}
  1374: 	}
  1375: 
  1376: 	/* Bank Register */
  1377: 	if ((offset >= 0x6000) && (offset <= 0x60ff))
  1378: 	{
  1379: 		genesis_bank_select_w(offset & 0xff, data);
  1380: 	}
  1381: 
  1382: 	/* Unused / Illegal */
  1383: 	if ((offset >= 0x6100) && (offset <= 0x7eff))
  1384: 	{
  1385: 		/* nothing */
  1386: 	}
  1387: 
  1388: 	/* VDP */
  1389: 	if ((offset >= 0x7f00) && (offset <= 0x7fff))
  1390: 	{
  1391: 
  1392: 	}
  1393: }
  1394: 
  1395: static READ_HANDLER ( genesis_z80_bank_r )
  1396: {
  1397: 	int address = (z80_68000_latch) + (offset & 0x7fff);
  1398: 
  1399: 	if (!z80running) logerror("undead Z80->68000 read!\n");
  1400: 
  1401: 	if (z80_latch_bitcount != 0) logerror("reading whilst latch being set!\n");
  1402: 
  1403: 	logerror("z80 read from address %x\n", address);
  1404: 
  1405: 	/* Read the data out of the 68k ROM */
  1406: 	if (address < 0x400000) return memory_region(REGION_CPU1)[BYTE_XOR(address)];
  1407: 	/* else read the data out of the 68k RAM */
  1408: // 	else if (address > 0xff0000) return genesis_68k_ram[BYTE_XOR(offset)];
  1409: 
  1410: 	return -1;
  1411: }
  1412: 
  1413: static WRITE16_HANDLER ( genesis_z80_ram_w )
  1414: {
  1415: 	if (z80running) logerror("Z80 written whilst running!\n");
  1416: 	logerror("68000->z80 sound write, %x to %x\n", data, offset);
  1417: 
  1418: 	if (ACCESSING_LSB) genesis_z80_ram[(offset<<1)+1] = data & 0xff;
  1419: 	if (ACCESSING_MSB) genesis_z80_ram[offset<<1] = (data >> 8) & 0xff;
  1420: }
  1421: 
  1422: static MEMORY_READ_START(genesis_z80_readmem)
  1423:  	{ 0x0000, 0x1fff, MRA_BANK1 },
  1424:  	{ 0x2000, 0x3fff, MRA_BANK2 }, /* mirror */
  1425: 	{ 0x4000, 0x7fff, genesis_z80_r },
  1426: 	{ 0x8000, 0xffff, genesis_z80_bank_r },
  1427: MEMORY_END
  1428: 
  1429: static MEMORY_WRITE_START(genesis_z80_writemem)
  1430: 	{ 0x0000, 0x1fff, MWA_BANK1, &genesis_z80_ram },
  1431:  	{ 0x2000, 0x3fff, MWA_BANK2 }, /* mirror */
  1432: 	{ 0x4000, 0x7fff, genesis_z80_w },
  1433:  //	{ 0x8000, 0xffff, genesis_z80_bank_w },
  1434: MEMORY_END
  1435: 
  1436: /* MEGATECH specific */
  1437: 
  1438: static READ_HANDLER( instr_r )
  1439: {
  1440: 	unsigned char* instr = memory_region(REGION_USER1);
  1441: 	unsigned char* ram = memory_region(REGION_CPU3);
  1442: 
  1443: 	if(ram[0x6404] == 0)
  1444: 		return instr[offset/2];
  1445: 	else 
  1446: 		return 0xFF;
  1447: }
  1448: 
  1449: unsigned char bios_ctrl[6];
  1450: 
  1451: static READ_HANDLER( bios_ctrl_r )
  1452: {
  1453: 	if(offset == 0)
  1454: 		return 0;
  1455: 	if(offset == 2)
  1456: 		return bios_ctrl[offset] & 0xfe;
  1457: 
  1458: 	return bios_ctrl[offset];
  1459: }
  1460: 
  1461: static WRITE_HANDLER( bios_ctrl_w )
  1462: {
  1463: 	if(offset == 1)
  1464: 	{
  1465: 		bios_ctrl_inputs = data & 0x04;  // Genesis/SMS input ports disable bit
  1466: 	}
  1467: 	bios_ctrl[offset] = data;
  1468: }
  1469: 
  1470: 
  1471: static MEMORY_READ_START(megatech_bios_readmem)
  1472:  	{ 0x0000, 0x2fff, MRA_ROM },
  1473: 	{ 0x3000, 0x3fff, MRA_RAM },
  1474: 	{ 0x4000, 0x4fff, MRA_RAM },
  1475: 	{ 0x5000, 0x5fff, MRA_RAM },
  1476: 	{ 0x6000, 0x63ff, MRA_RAM },
  1477: 	{ 0x6400, 0x6400, input_port_10_r },
  1478: 	{ 0x6401, 0x6401, input_port_11_r },
  1479: 	{ 0x6800, 0x6800, input_port_6_r },
  1480: 	{ 0x6801, 0x6801, input_port_7_r },
  1481: 	{ 0x6802, 0x6807, bios_ctrl_r },
  1482: //	{ 0x6805, 0x6805, input_port_8_r },
  1483: 	{ 0x6808, 0x6fff, MRA_RAM },
  1484: 	{ 0x7000, 0x77ff, MRA_RAM },
  1485: 	{ 0x8000, 0xffff, instr_r },
  1486: MEMORY_END
  1487: 
  1488: static MEMORY_WRITE_START(megatech_bios_writemem)
  1489: 	{ 0x0000, 0x2fff, MWA_ROM },
  1490: 	{ 0x3000, 0x3fff, MWA_RAM },
  1491: 	{ 0x4000, 0x4fff, MWA_RAM },
  1492: 	{ 0x5000, 0x5fff, MWA_RAM },
  1493: 	{ 0x6000, 0x63ff, MWA_RAM },
  1494: 	{ 0x6802, 0x6807, bios_ctrl_w },
  1495: 	{ 0x6808, 0x6fff, MWA_RAM },
  1496: 	{ 0x7000, 0x77ff, MWA_RAM },
  1497: MEMORY_END
  1498: 
  1499: 
  1500: /* basically from src/drivers/segasyse.c */
  1501: unsigned char segae_vdp_ctrl_r ( UINT8 chip );
  1502: unsigned char segae_vdp_data_r ( UINT8 chip );
  1503: void segae_vdp_ctrl_w ( UINT8 chip, UINT8 data );
  1504: void segae_vdp_data_w ( UINT8 chip, UINT8 data );
  1505: 
  1506: static READ_HANDLER (megatech_bios_port_be_bf_r)
  1507: {
  1508: 	UINT8 temp = 0;
  1509: 
  1510: 	switch (offset)
  1511: 	{
  1512: 		case 0: /* port 0xbe, VDP 1 DATA Read */
  1513: 			temp = segae_vdp_data_r(0); break ;
  1514: 		case 1: /* port 0xbf, VDP 1 CTRL Read */
  1515: 			temp = segae_vdp_ctrl_r(0); break ;
  1516: 	}
  1517: 	return temp;
  1518: }
  1519: static WRITE_HANDLER (megatech_bios_port_be_bf_w)
  1520: {
  1521: 	switch (offset)
  1522: 	{
  1523: 		case 0: /* port 0xbe, VDP 1 DATA Write */
  1524: 			segae_vdp_data_w(0, data); break;
  1525: 		case 1: /* port 0xbf, VDP 1 CTRL Write */
  1526: 			segae_vdp_ctrl_w(0, data); break;
  1527: 	}
  1528: }
  1529: 
  1530: static WRITE_HANDLER (megatech_bios_port_ctrl_w)
  1531: {
  1532: 	bios_port_ctrl = data;
  1533: }
  1534: 
  1535: static READ_HANDLER (megatech_bios_port_dc_r)
  1536: {
  1537: 	if(bios_port_ctrl == 0x55)
  1538: 		return readinputport(12);
  1539: 	else
  1540: 		return readinputport(9);
  1541: }
  1542: 
  1543: static READ_HANDLER (megatech_bios_port_dd_r)
  1544: {
  1545: 	if(bios_port_ctrl == 0x55)
  1546: 		return readinputport(12);
  1547: 	else
  1548: 		return readinputport(8);
  1549: }
  1550: 
  1551: static WRITE_HANDLER (megatech_bios_port_7f_w)
  1552: {
  1553: //	usrintf_showmessage("CPU #3: I/O port 0x7F write, data %02x",data);
  1554: }
  1555: 
  1556: 
  1557: static PORT_READ_START( megatech_bios_readport )
  1558: 	{ 0xdc, 0xdc, megatech_bios_port_dc_r },  // player inputs
  1559: 	{ 0xdd, 0xdd, megatech_bios_port_dd_r },  // other player 2 inputs
  1560: 	{ 0xbe, 0xbf, megatech_bios_port_be_bf_r },			/* VDP */
  1561: PORT_END
  1562: 
  1563: static PORT_WRITE_START( megatech_bios_writeport )
  1564: 	{ 0x3f, 0x3f, megatech_bios_port_ctrl_w },
  1565: 	{ 0x7f, 0x7f, megatech_bios_port_7f_w },
  1566: 	{ 0xbe, 0xbf, megatech_bios_port_be_bf_w },			/* VDP */
  1567: PORT_END
  1568: 
  1569: static UINT8 hintcount;			/* line interrupt counter, decreased each scanline */
  1570: extern UINT8 vintpending;
  1571: extern UINT8 hintpending;
  1572: extern UINT8 *segae_vdp_regs[];		/* pointer to vdp's registers */
  1573: 
  1574: // Interrupt handler - from drivers/segasyse.c
  1575: INTERRUPT_GEN (megatech_irq)
  1576: {
  1577: 	int sline;
  1578: 	sline = 261 - cpu_getiloops();
  1579: 
  1580: 	if (sline ==0) {
  1581: 		hintcount = segae_vdp_regs[0][10];
  1582: 	}
  1583: 
  1584: 	if (sline <= 192) {
  1585: 
  1586: //		if (sline != 192) segae_drawscanline(sline,1,1);
  1587: 
  1588: 		if (sline == 192)
  1589: 			vintpending = 1;
  1590: 
  1591: 		if (hintcount == 0) {
  1592: 			hintcount = segae_vdp_regs[0][10];
  1593: 			hintpending = 1;
  1594: 
  1595: 			if  ((segae_vdp_regs[0][0] & 0x10)) {
  1596: 				cpu_set_irq_line(2, 0, HOLD_LINE);
  1597: 				return;
  1598: 			}
  1599: 
  1600: 		} else {
  1601: 			hintcount--;
  1602: 		}
  1603: 	}
  1604: 
  1605: 	if (sline > 192) {
  1606: 		hintcount = segae_vdp_regs[0][10];
  1607: 
  1608: 		if ( (sline<0xe0) && (vintpending) ) {
  1609: 			cpu_set_irq_line(2, 0, HOLD_LINE);
  1610: 		}
  1611: 	}
  1612: 
  1613: }
  1614: 
  1615: 
  1616: /******************************************************************************
  1617: 	Input Ports
  1618: *******************************************************************************
  1619: 
  1620: 	The input ports on the C2 games always consist of 1 Coin Port, 2 Player
  1621: 	Input ports and 2 Dipswitch Ports, 1 of those Dipswitch Ports being used
  1622: 	for coinage, the other for Game Options.
  1623: 
  1624: 	Most of the Games List the Dipswitchs and Inputs in the Test Menus, adding
  1625: 	them is just a tedious task.  I think Columnns & Bloxeed are Exceptions
  1626: 	and will need their Dipswitches working out by observation.  The Coin Part
  1627: 	of the DSW's seems fairly common to all games.
  1628: 
  1629: ******************************************************************************/
  1630: 
  1631: #define COINS \ 
  1632:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) \
  1633:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) \
  1634:     PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE ) \
  1635:     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) \
  1636:     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) \
  1637:     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
  1638: 
  1639: #define JOYSTICK_1 \ 
  1640:     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) \
  1641:     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) \
  1642:     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) \
  1643:     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  1644: 
  1645: #define JOYSTICK_2 \ 
  1646:     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) \
  1647:     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) \
  1648:     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) \
  1649:     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
  1650: 
  1651: #define COIN_A \ 
  1652:     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) \
  1653:     PORT_DIPSETTING(    0x07, DEF_STR( 4C_1C ) ) \
  1654:     PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) ) \
  1655:     PORT_DIPSETTING(    0x09, DEF_STR( 2C_1C ) ) \
  1656:     PORT_DIPSETTING(    0x05, "2 Coins/1 Credit 5/3 6/4" ) \
  1657:     PORT_DIPSETTING(    0x04, "2 Coins/1 Credit, 4/3" ) \
  1658:     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) ) \
  1659:     PORT_DIPSETTING(    0x03, "1 Coin/1 Credit, 5/6" ) \
  1660:     PORT_DIPSETTING(    0x02, "1 Coin/1 Credit, 4/5" ) \
  1661:     PORT_DIPSETTING(    0x01, "1 Coin/1 Credit, 2/3" ) \
  1662:     PORT_DIPSETTING(    0x06, DEF_STR( 2C_3C ) ) \
  1663:     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) ) \
  1664:     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) ) \
  1665:     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) ) \
  1666:     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) ) \
  1667:     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) ) \
  1668:     PORT_DIPSETTING(    0x00, "1 Coin/1 Credit (Freeplay if Coin B also)" )
  1669: 
  1670: #define COIN_B \ 
  1671:     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) \
  1672:     PORT_DIPSETTING(    0x70, DEF_STR( 4C_1C ) ) \
  1673:     PORT_DIPSETTING(    0x80, DEF_STR( 3C_1C ) ) \
  1674:     PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) ) \
  1675:     PORT_DIPSETTING(    0x50, "2 Coins/1 Credit 5/3 6/4" ) \
  1676:     PORT_DIPSETTING(    0x40, "2 Coins/1 Credit, 4/3" ) \
  1677:     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) ) \
  1678:     PORT_DIPSETTING(    0x30, "1 Coin/1 Credit, 5/6" ) \
  1679:     PORT_DIPSETTING(    0x20, "1 Coin/1 Credit, 4/5" ) \
  1680:     PORT_DIPSETTING(    0x10, "1 Coin/1 Credit, 2/3" ) \
  1681:     PORT_DIPSETTING(    0x60, DEF_STR( 2C_3C ) ) \
  1682:     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) ) \
  1683:     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) ) \
  1684:     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) ) \
  1685:     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) ) \
  1686:     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) ) \
  1687: 	PORT_DIPSETTING(    0x00, "1 Coin/1 Credit (Freeplay if Coin A also)" )
  1688: 
  1689: 
  1690: INPUT_PORTS_START( columns ) /* Columns Input Ports */
  1691:     PORT_START
  1692:     COINS
  1693:     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1694:     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1695: 
  1696: 	PORT_START		/* Player 1 Controls */
  1697:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )     // Button 'Rotate'
  1698:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED  )     // Button 2 Unused
  1699:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )     // Button 3 Unused
  1700: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1701:     JOYSTICK_1
  1702: 
  1703: 	PORT_START		/* Player 2 Controls */
  1704:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )    // Button 'Rotate'
  1705:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED                )    // Button 2 Unused
  1706:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )    // Button 3 Unused
  1707: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1708:     JOYSTICK_2
  1709: 
  1710: 	PORT_START		/* Coinage */
  1711:     COIN_A
  1712:     COIN_B
  1713: 
  1714: 	PORT_START		 /* Game Options */
  1715: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )							// Game Options..
  1716: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1717: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1718:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1719: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1720: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1721: 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  1722: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  1723: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1724: 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1725: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1726: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1727:     /* The first level increase (from 0 to 1) is allways after destroying
  1728:        35 jewels. Then, the leve gets 1 level more every : */
  1729:     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  1730:     PORT_DIPSETTING(    0x00, "Easy" )     // 50 jewels
  1731:     PORT_DIPSETTING(    0x10, "Medium" )   // 40 jewels
  1732:     PORT_DIPSETTING(    0x30, "Hard" )     // 35 jewels
  1733:     PORT_DIPSETTING(    0x20, "Hardest" )  // 25 jewels
  1734: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  1735: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  1736: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1737: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  1738: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1739: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1740: INPUT_PORTS_END
  1741: 
  1742: 
  1743: INPUT_PORTS_START( columns2 ) /* Columns 2 Input Ports */
  1744:     PORT_START
  1745:     COINS
  1746:     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1747:     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1748: 
  1749: 	PORT_START		/* Player 1 Controls */
  1750:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )     // Button 'Rotate'
  1751:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED  )     // Button 2 Unused == Button 1
  1752:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )     // Button 3 Unused == Button 1
  1753: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1754:     JOYSTICK_1
  1755: 
  1756: 	PORT_START		/* Player 2 Controls */
  1757:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )     // Button 'Rotate'
  1758:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED                )     // Button 2 Unused == Button 1
  1759:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )     // Button 3 Unused == Button 1
  1760: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1761:     JOYSTICK_2
  1762: 
  1763: 	PORT_START		/* Coinage */
  1764:     COIN_A
  1765:     COIN_B
  1766: 
  1767: 	PORT_START		 /* Game Options */
  1768: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  1769: 	PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
  1770: 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  1771:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1772: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1773: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1774: 	PORT_DIPNAME( 0x0c, 0x0c, "VS. Mode Credits/Match" )
  1775: 	PORT_DIPSETTING(    0x0c, "1" )
  1776: 	PORT_DIPSETTING(    0x08, "2" )
  1777: 	PORT_DIPSETTING(    0x04, "3" )
  1778: 	PORT_DIPSETTING(    0x00, "4" )
  1779: 	PORT_DIPNAME( 0x30, 0x30, "Flash Mode Difficulty" )
  1780: 	PORT_DIPSETTING(    0x20, "Easy" )
  1781:     PORT_DIPSETTING(    0x30, "Medium" )
  1782: 	PORT_DIPSETTING(    0x10, "Hard" )
  1783: 	PORT_DIPSETTING(    0x00, "Hardest" )
  1784:     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  1785:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  1786:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1787:     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  1788:     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1789:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1790: INPUT_PORTS_END
  1791: 
  1792: 
  1793: INPUT_PORTS_START( borench ) /* Borench Input Ports */
  1794: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  1795:     COINS
  1796: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1797: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1798: 
  1799: 	PORT_START		/* Player 1 Controls */
  1800:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )      // Button 'Set'
  1801:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )      // Button 'Turbo'
  1802:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )      // Button 3 Unused
  1803: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1804:     JOYSTICK_1
  1805: 
  1806: 	PORT_START		/* Player 2 Controls */
  1807:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )       // Button 'Set'
  1808:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )       // Button 'Turbo'
  1809:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )       // Button 3 Unused
  1810: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1811:     JOYSTICK_2
  1812: 
  1813: 	PORT_START		/* Coinage */
  1814:     COIN_A
  1815:     COIN_B
  1816: 
  1817: 	PORT_START		 /* Game Options */
  1818: 	PORT_DIPNAME( 0x01, 0x01, "Credits to Start" )
  1819: 	PORT_DIPSETTING(    0x01, "1" )
  1820: 	PORT_DIPSETTING(    0x00, "2" )
  1821:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1822: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1823: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1824:     PORT_DIPNAME( 0x0c, 0x0c, "Lives 1P Mode" )
  1825: 	PORT_DIPSETTING(    0x00, "1" )
  1826: 	PORT_DIPSETTING(    0x0c, "2" )
  1827: 	PORT_DIPSETTING(    0x08, "3" )
  1828: 	PORT_DIPSETTING(    0x04, "4" )
  1829:     PORT_DIPNAME( 0x30, 0x30, "Lives 2P Mode" )
  1830: 	PORT_DIPSETTING(    0x00, "2" )
  1831: 	PORT_DIPSETTING(    0x30, "3" )
  1832: 	PORT_DIPSETTING(    0x20, "4" )
  1833: 	PORT_DIPSETTING(    0x10, "5" )
  1834: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
  1835: 	PORT_DIPSETTING(    0x80, "Easy" )
  1836:     PORT_DIPSETTING(    0xc0, "Medium" )
  1837: 	PORT_DIPSETTING(    0x40, "Hard" )
  1838: 	PORT_DIPSETTING(    0x00, "Hardest" )
  1839: INPUT_PORTS_END
  1840: 
  1841: 
  1842: INPUT_PORTS_START( tfrceac ) /* ThunderForce AC Input Ports */
  1843: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  1844:     COINS
  1845: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1846: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1847: 
  1848: 	PORT_START		/* Player 1 Controls */
  1849:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )      // Button Speed Change
  1850:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )      // Button Shot
  1851:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )      // Button Weapon Select
  1852: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1853:     JOYSTICK_1
  1854: 
  1855: 	PORT_START		/* Player 2 Controls */
  1856:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )      // Button Speed Change
  1857:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )      // Button Shot
  1858:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )      // Button Weapon Select
  1859: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1860:     JOYSTICK_2
  1861: 
  1862: 	PORT_START		/* Coinage */
  1863:     COIN_A
  1864:     COIN_B
  1865: 
  1866: 	PORT_START		 /* Game Options */
  1867: 	PORT_DIPNAME( 0x01, 0x01, "Credits to Start" )
  1868: 	PORT_DIPSETTING(    0x01, "1" )
  1869: 	PORT_DIPSETTING(    0x00, "2" )
  1870:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1871: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1872: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1873:     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  1874: 	PORT_DIPSETTING(    0x00, "2" )
  1875: 	PORT_DIPSETTING(    0x0c, "3" )
  1876: 	PORT_DIPSETTING(    0x08, "4" )
  1877: 	PORT_DIPSETTING(    0x04, "5" )
  1878: 	PORT_DIPNAME( 0x30, 0x30,  DEF_STR( Bonus_Life ) )
  1879:     PORT_DIPSETTING(    0x10, "10k, 70k, 150k" )
  1880:     PORT_DIPSETTING(    0x30, "20k, 100k, 200k" )
  1881:     PORT_DIPSETTING(    0x20, "40k, 150k, 300k" )
  1882:     PORT_DIPSETTING(    0x00, "None" )
  1883: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
  1884: 	PORT_DIPSETTING(    0x80, "Easy" )
  1885:     PORT_DIPSETTING(    0xc0, "Medium" )
  1886: 	PORT_DIPSETTING(    0x40, "Hard" )
  1887: 	PORT_DIPSETTING(    0x00, "Hardest" )
  1888: INPUT_PORTS_END
  1889: 
  1890: 
  1891: INPUT_PORTS_START( ribbit ) /* Ribbit! Input Ports */
  1892: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  1893:     COINS
  1894: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1895: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1896: 
  1897: 	PORT_START		/* Player 1 Controls */
  1898: 	PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1899:     JOYSTICK_1
  1900: 
  1901: 	PORT_START		/* Player 2 Controls */
  1902: 	PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1903:     JOYSTICK_2
  1904: 
  1905: 	PORT_START		/* Coinage */
  1906:     COIN_A
  1907:     COIN_B
  1908: 
  1909: 	PORT_START		 /* Game Options */
  1910: 	PORT_DIPNAME( 0x01, 0x01, "Credits to Start" )
  1911: 	PORT_DIPSETTING(    0x01, "1" )
  1912: 	PORT_DIPSETTING(    0x00, "2" )
  1913:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1914: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1915: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1916:     PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) )
  1917: 	PORT_DIPSETTING(    0x08, "1" )
  1918: 	PORT_DIPSETTING(    0x0c, "2" )
  1919: 	PORT_DIPSETTING(    0x04, "3" )
  1920: 	PORT_DIPSETTING(    0x00, "5" )
  1921: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  1922:     PORT_DIPSETTING(    0x20, "Easy" )
  1923:     PORT_DIPSETTING(    0x30, "Normal" )
  1924:     PORT_DIPSETTING(    0x10, "Hard" )
  1925:     PORT_DIPSETTING(    0x00, "Hardest" )
  1926: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  1927: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1928: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  1929: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  1930: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1931: 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  1932: INPUT_PORTS_END
  1933: 
  1934: 
  1935: INPUT_PORTS_START( puyopuyo ) /* PuyoPuyo Input Ports */
  1936: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  1937:     COINS
  1938: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1939: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1940: 
  1941: 	PORT_START		/* Player 1 Controls */
  1942:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )        // Button 'Rotate'
  1943:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED  )        // Button 2 Unused == Button 1
  1944:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )
  1945:     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1946:     JOYSTICK_1
  1947: 
  1948: 	PORT_START		/* Player 2 Controls */
  1949:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )      // Button 'Rotate'
  1950:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED                )      // Button 2 Unused == Button 1
  1951:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )      // Button 3 Unused == Button 1
  1952: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1953:     JOYSTICK_2
  1954: 
  1955: 	PORT_START		/* Coinage */
  1956:     COIN_A
  1957:     COIN_B
  1958: 
  1959: 	PORT_START		 /* Game Options */
  1960:     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
  1961:     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1962:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1963:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1964: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1965: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1966: 	PORT_DIPNAME( 0x04, 0x04, "VS. Mode Credits/Match" )
  1967: 	PORT_DIPSETTING(    0x04, "1" )
  1968: 	PORT_DIPSETTING(    0x00, "3" )
  1969: 	PORT_DIPNAME( 0x18, 0x18, "1P Mode Difficulty" )
  1970: 	PORT_DIPSETTING(    0x10, "Easy" )
  1971:     PORT_DIPSETTING(    0x18, "Medium" )
  1972: 	PORT_DIPSETTING(    0x08, "Hard" )
  1973: 	PORT_DIPSETTING(    0x00, "Hardest" )
  1974:     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
  1975:     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  1976:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1977:     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  1978:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  1979:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1980: 	PORT_DIPNAME( 0x80, 0x80, "Moving Seat" )
  1981: 	PORT_DIPSETTING(    0x80, "No Use" )
  1982: 	PORT_DIPSETTING(    0x00, "In Use" )
  1983: INPUT_PORTS_END
  1984: 
  1985: 
  1986: INPUT_PORTS_START( stkclmns ) /* Stack Columns Input Ports */
  1987: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  1988:     COINS
  1989: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1990: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1991: 
  1992: 	PORT_START		/* Player 1 Controls */
  1993:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )      // Button 'Rotate'
  1994:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )      // Button 'Attack'
  1995:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )      // Button 3 Unused
  1996: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1997:     JOYSTICK_1
  1998: 
  1999: 	PORT_START		/* Player 2 Controls */
  2000:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )      // Button 'Rotate'
  2001:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )      // Button 'Attack'
  2002:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )      // Button 3 Unused
  2003: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2004:     JOYSTICK_2
  2005: 
  2006: 	PORT_START		/* Coinage */
  2007:     COIN_A
  2008:     COIN_B
  2009: 
  2010: 	PORT_START		 /* Game Options */
  2011:     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
  2012:     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2013:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2014: 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  2015: 	PORT_DIPSETTING(    0x02, "Easy" )
  2016:     PORT_DIPSETTING(    0x03, "Medium" )
  2017: 	PORT_DIPSETTING(    0x01, "Hard" )
  2018: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2019:     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) )
  2020: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  2021: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2022: 	PORT_DIPNAME( 0x08, 0x08, "Match Mode Price" )
  2023: 	PORT_DIPSETTING(    0x08, "1" )
  2024: 	PORT_DIPSETTING(    0x00, "2" )
  2025:     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
  2026:     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2027:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2028:     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
  2029:     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  2030:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2031:     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  2032:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2033:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2034:     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  2035:     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2036:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2037: INPUT_PORTS_END
  2038: 
  2039: 
  2040: INPUT_PORTS_START( potopoto ) /* PotoPoto Input Ports */
  2041: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  2042:     COINS
  2043: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2044: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2045: 
  2046: 	PORT_START		/* Player 1 Controls */
  2047:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )     // Button 'Bomb'
  2048:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED  )     // Button 2 Unused == Button 1
  2049:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )     // Button 3 Unused == Button 1
  2050: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2051:     JOYSTICK_1
  2052: 
  2053: 	PORT_START		/* Player 2 Controls */
  2054:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )    // Button 'Bomb'
  2055:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED                )    // Button 2 Unused == Button 1
  2056:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )    // Button 3 Unused == Button 1
  2057: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2058:     JOYSTICK_2
  2059: 
  2060: 	PORT_START		/* Coinage */
  2061:     COIN_A
  2062:     COIN_B
  2063: 
  2064: 	PORT_START		 /* Game Options */
  2065: 	PORT_DIPNAME( 0x01, 0x01, "Credits to Start" )
  2066: 	PORT_DIPSETTING(    0x01, "1" )
  2067: 	PORT_DIPSETTING(    0x00, "2" )
  2068:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  2069: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2070: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2071: 	PORT_DIPNAME( 0x04, 0x04, "Coin Chute Type" )
  2072: 	PORT_DIPSETTING(    0x04, "Common" )
  2073: 	PORT_DIPSETTING(    0x00, "Individual" )
  2074: 	PORT_DIPNAME( 0x08, 0x08, "Credits to Continue" )
  2075: 	PORT_DIPSETTING(    0x08, "1" )
  2076: 	PORT_DIPSETTING(    0x00, "2" )
  2077: 	PORT_DIPNAME( 0x10, 0x10, "Buy-In" )
  2078: 	PORT_DIPSETTING(    0x10, DEF_STR( No ) )
  2079: 	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  2080: 	PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) )
  2081: 	PORT_DIPSETTING(    0x40, "Easy" )
  2082:     PORT_DIPSETTING(    0x60, "Medium" )
  2083: 	PORT_DIPSETTING(    0x20, "Hard" )
  2084: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2085: 	PORT_DIPNAME( 0x80, 0x80, "Moving Seat" )
  2086: 	PORT_DIPSETTING(    0x80, "No Use" )
  2087: 	PORT_DIPSETTING(    0x00, "In Use" )
  2088: INPUT_PORTS_END
  2089: 
  2090: 
  2091: INPUT_PORTS_START( zunkyou ) /* ZunkYou Input Ports */
  2092: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  2093:     COINS
  2094: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2095: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2096: 
  2097: 	PORT_START		/* Player 1 Controls */
  2098:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )       // Button 'Shot'
  2099:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )       // Button 'Bomb'
  2100:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )       // Button 3 Unused
  2101: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2102:     JOYSTICK_1
  2103: 
  2104: 	PORT_START		/* Player 2 Controls */
  2105:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )      // Button 'Shot'
  2106:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )      // Button 'Bomb'
  2107:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )      // Button 3 Unused
  2108: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2109:     JOYSTICK_2
  2110: 
  2111: 	PORT_START		/* Coinage */
  2112:     COIN_A
  2113:     COIN_B
  2114: 
  2115: 	PORT_START		 /* Game Options */
  2116: 	PORT_DIPNAME( 0x01, 0x01, "Game Difficulty 1" )
  2117:     PORT_DIPSETTING(    0x01, "Medium" )
  2118: 	PORT_DIPSETTING(    0x00, "Hard" )
  2119: 	PORT_DIPNAME( 0x02, 0x02, "Game Difficulty 2" )
  2120:     PORT_DIPSETTING(    0x02, "Medium" )
  2121: 	PORT_DIPSETTING(    0x00, "Hard" )
  2122:     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  2123: 	PORT_DIPSETTING(    0x08, "1" )
  2124: 	PORT_DIPSETTING(    0x04, "2" )
  2125: 	PORT_DIPSETTING(    0x0c, "3" )
  2126: 	PORT_DIPSETTING(    0x00, "5" )
  2127:     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
  2128: 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2129: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2130:     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
  2131:     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  2132:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2133:     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  2134:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2135:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2136:     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  2137:     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2138:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2139: INPUT_PORTS_END
  2140: 
  2141: 
  2142: INPUT_PORTS_START( ichidant ) /*  Ichidant-R and Tant-R Input Ports */
  2143: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  2144:     COINS
  2145: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2146: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2147: 
  2148: 	PORT_START		/* Player 1 Controls */
  2149:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )      // Button 'Rotate'
  2150:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED  )      // Button 2 Unused == Button 1
  2151:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )      // Button 3 Unused == Button 1
  2152: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2153:     JOYSTICK_1
  2154: 
  2155: 	PORT_START		/* Player 2 Controls */
  2156:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )    // Button 'Rotate'
  2157:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED                )    // Button 2 Unused == Button 1
  2158:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )    // Button 3 Unused == Button 1
  2159: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2160:     JOYSTICK_2
  2161: 
  2162: 	PORT_START		/* Coinage */
  2163:     COIN_A
  2164:     COIN_B
  2165: 
  2166: 	PORT_START		 /* Game Options */
  2167:     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  2168:     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2169: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2170:     PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) )
  2171:     PORT_DIPSETTING(    0x04, "Easy" )
  2172:     PORT_DIPSETTING(    0x06, "Medium" )
  2173:     PORT_DIPSETTING(    0x02, "Hard" )
  2174: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2175:     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
  2176:     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  2177:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2178:     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
  2179:     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2180:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2181:     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
  2182:     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  2183:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2184:     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  2185:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2186:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2187:     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  2188:     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2189:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2190: INPUT_PORTS_END
  2191: 
  2192: 
  2193: INPUT_PORTS_START( bloxeedc ) /*  Bloxeed Input Ports */
  2194: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  2195:     COINS
  2196: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2197: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2198: 
  2199: 	PORT_START		/* Player 1 Controls */
  2200:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )      // Button 'Rotate'
  2201:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED  )      // Button 2 Unused == Button 1
  2202:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )      // Button 3 Unused == Button 1
  2203: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2204:     JOYSTICK_1
  2205: 
  2206: 	PORT_START		/* Player 2 Controls */
  2207:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )     // Button 'Rotate'
  2208:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED                )     // Button 2 Unused == Button 1
  2209:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED                )     // Button 3 Unused == Button 1
  2210: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2211:     JOYSTICK_2
  2212: 
  2213: 	PORT_START		/* Coinage */
  2214:     COIN_A
  2215:     COIN_B
  2216: 
  2217: 	PORT_START		 /* Game Options */
  2218:     PORT_DIPNAME( 0x01, 0x01, "VS Mode Price" )
  2219:     PORT_DIPSETTING(    0x00, "Same as Ordinary" )
  2220:     PORT_DIPSETTING(    0x01, "Double as Ordinary" )
  2221:     PORT_DIPNAME( 0x02, 0x02, "Credits to Start" )
  2222:     PORT_DIPSETTING(    0x02, "1" )
  2223: 	PORT_DIPSETTING(    0x00, "2" )
  2224:     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  2225:     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  2226: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2227:     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  2228:     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  2229: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2230:     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  2231:     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2232: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2233:     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  2234:     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  2235: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2236:     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  2237:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2238: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2239:     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  2240:     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2241: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2242: INPUT_PORTS_END
  2243: 
  2244: 
  2245: INPUT_PORTS_START( puyopuy2 ) /*  Puyo Puyo 2 Input Ports */
  2246: 	PORT_START		/* Coins, Start, Service etc, Same for All */
  2247:     COINS
  2248: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2249: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2250: 
  2251: 	PORT_START		/* Player 1 Controls */
  2252:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )   // Rotate clockwise
  2253:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )   // Rotate anti-clockwise. Can be inverted using the dips
  2254:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )   // Button 3 Unused  _NOT_ Rannyu which is Start 1
  2255: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2256:     JOYSTICK_1
  2257: 
  2258: 	PORT_START		/* Player 2 Controls */
  2259:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  2260:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  2261:     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED  )
  2262: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2263:     JOYSTICK_2
  2264: 
  2265: 	PORT_START		/* Coinage */
  2266:     COIN_A
  2267:     COIN_B
  2268: 
  2269: 	PORT_START		 /* Game Options */
  2270:     PORT_DIPNAME( 0x01, 0x01, "Rannyu Off Button" )
  2271:     PORT_DIPSETTING(    0x01, "Use" )
  2272:     PORT_DIPSETTING(    0x00, "No Use" )
  2273:     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  2274:     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2275: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2276:     PORT_DIPNAME( 0x04, 0x04, "Turn Direction" )
  2277:     PORT_DIPSETTING(    0x04, "1:Right  2:Left" )
  2278:     PORT_DIPSETTING(    0x00, "1:Left  2:Right")
  2279:     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) )
  2280:     PORT_DIPSETTING(    0x10, "Easy" )
  2281:     PORT_DIPSETTING(    0x18, "Medium" )
  2282:     PORT_DIPSETTING(    0x08, "Hard" )
  2283: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2284:     PORT_DIPNAME( 0x60, 0x60, "VS Mode Match/1 Play" )
  2285:     PORT_DIPSETTING(    0x60, "1" )
  2286:     PORT_DIPSETTING(    0x40, "2" )
  2287:     PORT_DIPSETTING(    0x20, "3" )
  2288:     PORT_DIPSETTING(    0x00, "4" )
  2289:     PORT_DIPNAME( 0x80, 0x80, "Battle Start credit" )
  2290:     PORT_DIPSETTING(    0x00, "1" )
  2291:     PORT_DIPSETTING(    0x80, "2" )
  2292: INPUT_PORTS_END
  2293: 
  2294: INPUT_PORTS_START( puckpkmn ) /* Puckman Pockimon Input Ports */
  2295: 	PORT_START	/* Player 2 Controls ($700011.b) */
  2296: 	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2297: 	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2298: 	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_START2 )
  2299: 	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER2 )
  2300: 	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 )
  2301: 	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER2 )
  2302: 	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  2303: 	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER2 )
  2304: 
  2305: 	PORT_START	/* Player 1 Controls ($700013.b) */
  2306: 	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2307: 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_LOW, IPT_COIN1, 10 )
  2308: 	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_START1 )
  2309: 	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER1 )
  2310: 	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER1 )
  2311: 	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER1 )
  2312: 	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
  2313: 	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER1 )
  2314: 
  2315: 	PORT_START	/* ? ($700015.b) */
  2316: 
  2317: 	PORT_START	/* DSW 1 ($700017.b) */
  2318: 	PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
  2319: 	PORT_DIPSETTING(    0x03, DEF_STR( 5C_1C ) )
  2320: 	PORT_DIPSETTING(    0x04, DEF_STR( 4C_1C ) )
  2321: 	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  2322: 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_1C ) )
  2323: 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
  2324: 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  2325: 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
  2326: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_4C ) )
  2327: 	PORT_DIPNAME( 0x38, 0x28, DEF_STR( Lives ) )
  2328: 	PORT_DIPSETTING(    0x38, "1" )
  2329: 	PORT_DIPSETTING(    0x30, "2" )
  2330: 	PORT_DIPSETTING(    0x28, "3" )
  2331: 	PORT_DIPSETTING(    0x20, "4" )
  2332: 	PORT_DIPSETTING(    0x18, "5" )
  2333: 	PORT_DIPSETTING(    0x10, "6" )
  2334: 	PORT_DIPSETTING(    0x08, "7" )
  2335: 	PORT_DIPSETTING(    0x00, "8" )
  2336: 	PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) )
  2337: 	PORT_DIPSETTING(    0xc0, "Easy"    )
  2338: 	PORT_DIPSETTING(    0x80, "Normal"  )
  2339: 	PORT_DIPSETTING(    0x40, "Hard"    )
  2340: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2341: 
  2342: 	PORT_START	/* DSW 1 ($700019.b) */
  2343: 	PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  2344: 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
  2345: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  2346: 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  2347: 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
  2348: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  2349: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2350: 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
  2351: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  2352: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2353: 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
  2354: 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2355: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2356: 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
  2357: 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  2358: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2359: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  2360: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2361: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2362: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  2363: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2364: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2365: INPUT_PORTS_END
  2366: 
  2367: INPUT_PORTS_START( pclub ) /* Print Club Input Ports */
  2368: 	PORT_START		 /* Coins */
  2369:     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  2370:     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  2371:     PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2372:     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
  2373: 	PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Probably Unused */
  2374: 
  2375: 	PORT_START		 /* Controls */
  2376: 	PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Probably Unused */
  2377:     PORT_BIT_NAME( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1, "Ok" )
  2378:     PORT_BIT_NAME( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2, "Cancel" )
  2379:     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY )
  2380:     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY )
  2381: 
  2382: 	PORT_START		 /* Controls */
  2383: 	PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Probably Unused */
  2384: 
  2385: 	PORT_START		 /* Coinage */
  2386: 	PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
  2387: 	PORT_DIPSETTING(    0x00, DEF_STR( 7C_1C ) )
  2388: 	PORT_DIPSETTING(    0x01, DEF_STR( 6C_1C ) )
  2389: 	PORT_DIPSETTING(    0x02, DEF_STR( 5C_1C ) )
  2390: 	PORT_DIPSETTING(    0x03, DEF_STR( 4C_1C ) )
  2391:     PORT_DIPSETTING(    0x07, DEF_STR( 3C_1C ) )
  2392: 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  2393: 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_1C ) )
  2394:     PORT_DIPSETTING(    0x06, DEF_STR( Free_Play ) )
  2395:     PORT_DIPNAME( 0x08, 0x08, "Unknown 4-4" )
  2396:     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  2397: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2398:     PORT_DIPNAME( 0x10, 0x10, "Unknown 4-5" )
  2399:     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2400: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2401:     PORT_DIPNAME( 0x20, 0x20, "Unknown 4-6" )
  2402:     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  2403: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2404:     PORT_DIPNAME( 0x40, 0x40, "Unknown 4-7" )
  2405:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2406: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2407:     PORT_DIPNAME( 0x80, 0x80, "Unknown 4-8" )
  2408:     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2409: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2410: 
  2411: 	PORT_START		 /* Game Options */
  2412:     PORT_DIPNAME( 0x01, 0x01, "Unknown 5-1" )
  2413:     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2414:     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2415:     PORT_DIPNAME( 0x02, 0x02, "Unknown 5-2" )
  2416:     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2417: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2418:     PORT_DIPNAME( 0x04, 0x04, "Unknown 5-3" )
  2419:     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  2420: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2421:     PORT_DIPNAME( 0x08, 0x08, "Unknown 5-4" )
  2422:     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  2423: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2424:     PORT_DIPNAME( 0x10, 0x10, "Unknown 5-5" )
  2425:     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2426: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2427:     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ))
  2428:     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  2429: 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  2430:     PORT_DIPNAME( 0x40, 0x40, "Unknown 5-7" )
  2431:     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2432: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2433:     PORT_DIPNAME( 0x80, 0x80, "Unknown 5-8" )
  2434:     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2435: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2436: INPUT_PORTS_END
  2437: 
  2438: INPUT_PORTS_START( genesis ) /* Genesis Input Ports */
  2439: 	PORT_START
  2440: 
  2441: 	PORT_START	/* Player 1 Controls - part 1 */
  2442: 	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
  2443: 	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
  2444: 	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  2445: 	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
  2446: 	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  2447: 	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  2448: 	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  2449: 	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  2450: 
  2451: 	PORT_START	/* Player 1 Controls - part 2 */
  2452: 	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_UNUSED )
  2453: 	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_UNUSED )
  2454: 	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_UNUSED )
  2455: 	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_UNUSED )
  2456: 	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON3 )
  2457: 	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_BUTTON4 )
  2458: 	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  2459: 	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  2460: 
  2461: 	PORT_START	/* Player 2 Controls - part 1 */
  2462: 	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 )
  2463: 	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 )
  2464: 	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
  2465: 	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2  )
  2466: 	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  2467: 	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  2468: 	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  2469: 	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  2470: 
  2471: 	PORT_START	/* Player 2 Controls - part 2 */
  2472: 	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_UNUSED )
  2473: 	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_UNUSED )
  2474: 	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_UNUSED )
  2475: 	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_UNUSED )
  2476: 	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  2477: 	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
  2478: 	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  2479: 	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  2480: INPUT_PORTS_END
  2481: 
  2482: INPUT_PORTS_START( megatech ) /* Genesis Input Ports */
  2483: 	PORT_START
  2484: 
  2485: 
  2486: 	PORT_START	/* Player 1 Controls - part 2 */
  2487: //	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
  2488: //	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
  2489: //	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  2490: //	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
  2491: //	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
  2492: //	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
  2493: //	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  2494: //	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  2495: 
  2496: 	PORT_START	/* Player 1 Controls - part 1 */
  2497: //	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  2498: //	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_START1 )
  2499: 
  2500: 
  2501: 	PORT_START	/* Player 2 Controls - part 2 */
  2502: //	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 )
  2503: //	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 )
  2504: //	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
  2505: //	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2  )
  2506: //	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  2507: //	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  2508: //	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  2509: //	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  2510: 
  2511: 	PORT_START	/* Player 2 Controls - part 1 */
  2512: //	PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  2513: //	PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_START1 | IPF_PLAYER2 )
  2514: 
  2515: 	PORT_START	/* Temp - Fake dipswitch to turn on / off sms vdp display */
  2516: //	PORT_DIPNAME( 0x01, 0x01, "SMS VDP Display (fake)" )
  2517: //	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  2518: //	PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  2519: 
  2520: 	PORT_START
  2521:     PORT_BITX( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2, "Select", KEYCODE_0, JOYCODE_NONE ) 
  2522:     PORT_BITX( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN , "0x6800 bit 1", KEYCODE_Y, JOYCODE_NONE ) 
  2523:     PORT_BITX( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN, "0x6800 bit 2", KEYCODE_U, JOYCODE_NONE ) 
  2524:     PORT_BITX( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN, "0x6800 bit 3", KEYCODE_I, JOYCODE_NONE ) 
  2525:     PORT_BITX( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL, "Door 1", KEYCODE_K, JOYCODE_NONE ) 
  2526:     PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL, "Door 2", KEYCODE_L, JOYCODE_NONE )
  2527: 	PORT_BITX( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN, "0x6800 bit 6", KEYCODE_O, JOYCODE_NONE )
  2528: 	PORT_BITX( 0x80, IP_ACTIVE_LOW, IPT_SERVICE, "Test mode", KEYCODE_F2, JOYCODE_NONE )
  2529: 
  2530: 	PORT_START	 
  2531: 	PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_COIN1 )  // a few coin inputs here
  2532: 	PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  2533: 	PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  2534: 	PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_COIN4 )
  2535: 	PORT_BITX( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1, "Service coin", KEYCODE_9, JOYCODE_NONE )
  2536: 	PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_SERVICE3,"Enter", KEYCODE_MINUS, JOYCODE_NONE )
  2537: 	PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_START1 )
  2538: 	PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_START2 )
  2539: 
  2540: 	PORT_START	 
  2541: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2) 
  2542: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2) 
  2543: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2) 
  2544: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2) 
  2545: 	PORT_BITX( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 4", KEYCODE_NONE, JOYCODE_NONE ) 
  2546: 	PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 5", KEYCODE_NONE, JOYCODE_NONE ) 
  2547: 	PORT_BITX( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 6", KEYCODE_NONE, JOYCODE_NONE ) 
  2548: 	PORT_BITX( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 7", KEYCODE_NONE, JOYCODE_NONE ) 
  2549: 
  2550: 	PORT_START	 // up, down, left, right, button 2,3, 2P up, down.
  2551: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) 
  2552: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) 
  2553: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) 	
  2554: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) 	
  2555: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) 	
  2556: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) 	
  2557: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) 	
  2558: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) 	
  2559: 
  2560:     PORT_START	/* DSW A */
  2561: 	PORT_DIPNAME( 0x02, 0x02, "Coin slot 3" )
  2562: 	PORT_DIPSETTING (   0x00, "Inhibit" )
  2563: 	PORT_DIPSETTING (   0x02, "Accept" )
  2564: 	PORT_DIPNAME( 0x01, 0x01, "Coin slot 4" )
  2565: 	PORT_DIPSETTING (   0x00, "Inhibit" )
  2566: 	PORT_DIPSETTING (   0x01, "Accept" )
  2567: 	PORT_DIPNAME( 0x1c, 0x1c, "Coin slot 3/4 value" )
  2568: 	PORT_DIPSETTING(    0x1c, DEF_STR( 1C_1C ) )
  2569: 	PORT_DIPSETTING(    0x18, DEF_STR( 1C_2C ) )
  2570: 	PORT_DIPSETTING(    0x14, DEF_STR( 1C_3C ) )
  2571: 	PORT_DIPSETTING(    0x10, DEF_STR( 1C_4C ) )
  2572: 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_5C ) )
  2573: 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_6C ) )
  2574: 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_8C ) )
  2575: 	PORT_DIPSETTING(    0x00, "1 Coin/10 credits" )
  2576: 	PORT_DIPNAME( 0xe0, 0x60, "Coin slot 2 value" )
  2577: 	PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  2578: 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_1C ) )
  2579: 	PORT_DIPSETTING(    0x60, DEF_STR( 1C_2C ) )
  2580: 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
  2581: 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_4C ) )
  2582: 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_5C ) )
  2583: 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_6C ) )
  2584: 	PORT_DIPSETTING(    0x00, "Inhibit" )
  2585: 
  2586: 	PORT_START /* DSW B */
  2587: 	PORT_DIPNAME( 0x0f, 0x01, "Coin Slot 1 value" )
  2588: 	PORT_DIPSETTING(    0x00, "Inhibit" )
  2589: 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_1C ) )
  2590: 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  2591: 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_3C ) )
  2592: 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
  2593: 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_5C ) )
  2594: 	PORT_DIPSETTING(    0x06, DEF_STR( 1C_6C ) )
  2595: 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_7C ) )
  2596: 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_8C ) )
  2597: 	PORT_DIPSETTING(    0x09, DEF_STR( 1C_9C ) )
  2598: 	PORT_DIPSETTING(    0x0a, "1 coin/10 credits" )
  2599: 	PORT_DIPSETTING(    0x0b, "1 coin/11 credits" )
  2600: 	PORT_DIPSETTING(    0x0c, "1 coin/12 credits" )
  2601: 	PORT_DIPSETTING(    0x0d, "1 coin/13 credits" )
  2602: 	PORT_DIPSETTING(    0x0e, "1 coin/14 credits" )
  2603: 	PORT_DIPSETTING(    0x0f, "1 coin/15 credits" )
  2604: 	PORT_DIPNAME( 0xf0, 0xa0, "Time per credit" )
  2605: 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  2606: 	PORT_DIPSETTING(    0x10, "7:30" )
  2607: 	PORT_DIPSETTING(    0x20, "7:00" )
  2608: 	PORT_DIPSETTING(    0x30, "6:30" )
  2609: 	PORT_DIPSETTING(    0x40, "6:00" )
  2610: 	PORT_DIPSETTING(    0x50, "5:30" )
  2611: 	PORT_DIPSETTING(    0x60, "5:00" )
  2612: 	PORT_DIPSETTING(    0x70, "4:30" )
  2613: 	PORT_DIPSETTING(    0x80, "4:00" )
  2614: 	PORT_DIPSETTING(    0x90, "3:30" )
  2615: 	PORT_DIPSETTING(    0xa0, "3:00" )
  2616: 	PORT_DIPSETTING(    0xb0, "2:30" )
  2617: 	PORT_DIPSETTING(    0xc0, "2:00" )
  2618: 	PORT_DIPSETTING(    0xd0, "1:30" )
  2619: 	PORT_DIPSETTING(    0xe0, "1:00" )
  2620: 	PORT_DIPSETTING(    0xf0, "0:30" )
  2621: 
  2622: 	PORT_START	 // BIOS input ports extra
  2623: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2) 
  2624: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) 
  2625: //	PORT_BITX( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 4", KEYCODE_NONE, JOYCODE_NONE ) 
  2626: //	PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 5", KEYCODE_NONE, JOYCODE_NONE ) 
  2627: //	PORT_BITX( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 6", KEYCODE_NONE, JOYCODE_NONE ) 
  2628: //	PORT_BITX( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN , "port DD bit 7", KEYCODE_NONE, JOYCODE_NONE ) 
  2629: 
  2630: INPUT_PORTS_END
  2631: 
  2632: 
  2633: /******************************************************************************
  2634: 	Sound interfaces
  2635: ******************************************************************************/
  2636: 
  2637: static struct UPD7759_interface upd7759_intf =
  2638: {
  2639: 	1,								/* One chip */
  2640: 	{ 50 },							/* Volume */
  2641: 	{ REGION_SOUND1 },				/* Memory pointer (gen.h) */
  2642: 	UPD7759_STANDALONE_MODE			/* Chip mode */
  2643: };
  2644: 
  2645: static struct YM2612interface ym3438_intf =
  2646: {
  2647: 	1,								/* One chip */
  2648: 	MASTER_CLOCK/7,					/* Clock: 7.67 MHz */
  2649: 	{ YM3012_VOL(50,MIXER_PAN_CENTER,50,MIXER_PAN_CENTER) },	/* Volume */
  2650: 	{ 0 },							/* port I/O */
  2651: 	{ 0 },							/* port I/O */
  2652: 	{ 0 },							/* port I/O */
  2653: 	{ 0 },							/* port I/O */
  2654: 	{ ym3438_interrupt }			/* IRQ handler */
  2655: };
  2656: 
  2657: static struct YM2612interface gen_ym3438_intf =
  2658: {
  2659: 	1,								/* One chip */
  2660: 	MASTER_CLOCK/7,					/* Clock: 7.67 MHz */
  2661: 	{ YM3012_VOL(50,MIXER_PAN_CENTER,50,MIXER_PAN_CENTER) },	/* Volume */
  2662: 	{ 0 },							/* port I/O */
  2663: 	{ 0 },							/* port I/O */
  2664: 	{ 0 },							/* port I/O */
  2665: 	{ 0 },							/* port I/O */
  2666: //	{ ym3438_interrupt }			/* IRQ handler */
  2667: };
  2668: 
  2669: static struct SN76496interface sn76489_intf =
  2670: {
  2671: 	1,								/* One chip */
  2672: 	{ MASTER_CLOCK/15 },			/* Clock: 3.58 MHz */
  2673: 	{ 50 }							/* Volume */
  2674: };
  2675: 
  2676: static struct OKIM6295interface puckpkmn_m6295_intf =
  2677: {
  2678: 	1,
  2679: 	{ 8000 },	/* ? */
  2680: 	{ REGION_SOUND1 },
  2681: 	{ 50 }
  2682: };
  2683: 
  2684: 
  2685: /******************************************************************************
  2686: 	Machine Drivers
  2687: *******************************************************************************
  2688: 
  2689: 	General Overview
  2690: 		M68000 @ 10MHz (Main Processor)
  2691: 		YM3438 (Fm Sound)
  2692: 		SN76489 (PSG, Noise, Part of the VDP)
  2693: 		UPD7759 (Sample Playback, C-2 Only)
  2694: 
  2695: ******************************************************************************/
  2696: 
  2697: static MACHINE_DRIVER_START( segac )
  2698: 
  2699: 	/* basic machine hardware */
  2700: 	MDRV_CPU_ADD_TAG("main",M68000, MASTER_CLOCK/7) 		/* yes, there is a divide-by-7 circuit */
  2701: 	MDRV_CPU_MEMORY(readmem,writemem)
  2702: 	MDRV_CPU_VBLANK_INT(vblank_interrupt,1)
  2703: 
  2704: 	MDRV_FRAMES_PER_SECOND(60)
  2705: 	MDRV_VBLANK_DURATION((int)(((262. - 224.) / 262.) * 1000000. / 60.))
  2706: 
  2707: 	MDRV_MACHINE_INIT(segac2)
  2708: 
  2709: 	/* video hardware */
  2710: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS)
  2711: 	MDRV_SCREEN_SIZE(320,224)
  2712: 	MDRV_VISIBLE_AREA(0, 319, 0, 223)
  2713: 	MDRV_PALETTE_LENGTH(2048)
  2714: 
  2715: 	MDRV_VIDEO_START(segac2)
  2716: 	MDRV_VIDEO_EOF(segac2)
  2717: 	MDRV_VIDEO_UPDATE(segac2)
  2718: 
  2719: 	/* sound hardware */
  2720: 	MDRV_SOUND_ADD(YM2612, ym3438_intf)
  2721: 	MDRV_SOUND_ADD(SN76496, sn76489_intf)
  2722: MACHINE_DRIVER_END
  2723: 
  2724: 
  2725: static MACHINE_DRIVER_START( segac2 )
  2726: 
  2727: 	/* basic machine hardware */
  2728: 	MDRV_IMPORT_FROM( segac )
  2729: 
  2730: 	/* sound hardware */
  2731: 	MDRV_SOUND_ADD(UPD7759, upd7759_intf)
  2732: MACHINE_DRIVER_END
  2733: 
  2734: 
  2735: static MACHINE_DRIVER_START( puckpkmn )
  2736: 
  2737: 	/* basic machine hardware */
  2738: 	MDRV_IMPORT_FROM( segac )
  2739: 	MDRV_CPU_MODIFY("main")
  2740: 	MDRV_CPU_MEMORY(puckpkmn_readmem,puckpkmn_writemem)
  2741: 
  2742: 	/* video hardware */
  2743: 	MDRV_VIDEO_START(puckpkmn)
  2744: 	MDRV_VISIBLE_AREA(8, 319, 0, 223)
  2745: 
  2746: 	/* sound hardware */
  2747: 	MDRV_SOUND_ADD(OKIM6295, puckpkmn_m6295_intf)
  2748: MACHINE_DRIVER_END
  2749: 
  2750: static MACHINE_DRIVER_START( genesis )
  2751: 	/*basic machine hardware */
  2752: 	MDRV_CPU_ADD_TAG("main", M68000, 53693100 / 7)
  2753: 	MDRV_CPU_MEMORY(genesis_readmem, genesis_writemem)
  2754: 	MDRV_CPU_VBLANK_INT(vblank_interrupt,1)
  2755: 
  2756: 	MDRV_CPU_ADD_TAG("sound", Z80, 53693100 / 15)
  2757: 	MDRV_CPU_MEMORY(genesis_z80_readmem, genesis_z80_writemem)
  2758: 	MDRV_CPU_VBLANK_INT(irq0_line_hold, 1) /* from vdp at scanline 0xe0 */
  2759: 
  2760: 	MDRV_FRAMES_PER_SECOND(60)
  2761: 	MDRV_VBLANK_DURATION((int)(((262. - 224.) / 262.) * 1000000. / 60.))
  2762: 
  2763: 	MDRV_INTERLEAVE(100)
  2764: 
  2765: 	MDRV_MACHINE_INIT(genesis)
  2766: 
  2767: 	/* video hardware */
  2768: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS)
  2769: 	MDRV_SCREEN_SIZE(320,224)
  2770: 	MDRV_VISIBLE_AREA(0, 319, 0, 223)
  2771: 	MDRV_PALETTE_LENGTH(2048)
  2772: 
  2773: 	MDRV_VIDEO_START(puckpkmn)
  2774: 	MDRV_VIDEO_EOF(segac2)
  2775: 	MDRV_VIDEO_UPDATE(segac2)
  2776: 
  2777: 	/* sound hardware */
  2778: 	MDRV_SOUND_ADD(YM2612, gen_ym3438_intf )
  2779: 	MDRV_SOUND_ADD(SN76496, sn76489_intf)
  2780: MACHINE_DRIVER_END
  2781: 
  2782: 
  2783: static MACHINE_DRIVER_START( megatech )
  2784: 
  2785: 	/* basic machine hardware */
  2786: 	MDRV_IMPORT_FROM( genesis )
  2787: 
  2788: 	MDRV_VIDEO_START(megatech)
  2789: 	MDRV_VIDEO_UPDATE(megatech)
  2790: 
  2791: 	MDRV_ASPECT_RATIO(4,6)
  2792: 	MDRV_SCREEN_SIZE(320,224+192) /* +192 for megatech BIOS screen/menu */
  2793: 	MDRV_VISIBLE_AREA(0, 319, 0, 223+192)
  2794: 	MDRV_PALETTE_LENGTH(2048+32) /* +32 for megatech bios vdp part */
  2795: 
  2796: 	MDRV_CPU_ADD_TAG("megatech_bios", Z80, 53693100 / 15) /* ?? */
  2797: 	MDRV_CPU_MEMORY(megatech_bios_readmem, megatech_bios_writemem)
  2798: 	MDRV_CPU_PORTS(megatech_bios_readport,megatech_bios_writeport)
  2799: 	MDRV_CPU_VBLANK_INT(megatech_irq, 262)
  2800: MACHINE_DRIVER_END
  2801: 
  2802: /******************************************************************************
  2803: 	Rom Definitions
  2804: *******************************************************************************
  2805: 
  2806: 	All the known System C/C2 Dumps are listed here with the exception of
  2807: 	the version of Puzzle & Action (I believe its actually Ichidant-R) which
  2808: 	was credited to SpainDumps in the included text file.  This appears to be
  2809: 	a bad dump (half sized roms) however the roms do not match up exactly with
  2810: 	the good dump of the game.  English language sets are assumed to be the
  2811: 	parent where they exist.  Hopefully some more alternate version dumps will
  2812: 	turn up sometime soon for example English Language version of Tant-R or
  2813: 	Japanese Language versions of Borench (if of course these games were
  2814: 	released in other locations.
  2815: 
  2816: 	Games are in Order of Date (Year) with System-C titles coming first.
  2817: 
  2818: ******************************************************************************/
  2819: 
  2820: /***************************************************************************
  2821: Puckman Pokemon Genie 2000
  2822: (c) 2000?  Manufacturer ?
  2823: 
  2824: Hardware looks bootleg-ish, but is newly manufactured.
  2825: 
  2826: CPU: ? (one of the SMD chips)
  2827: SND: OKI6295, U6612 (probably YM3812), U6614B (Probably YM3014B)
  2828: XTAL: 3.579545MHz, 4.0000MHz
  2829: OSC: 53.693175MHz
  2830: Other Chips: Possible CPU: TA-06SD 9933 B816453 128 pin square SMD
  2831:              GFX support chips: Y-BOX TA891945 100 pin SMD
  2832:                                 TV16B 0010 ME251271 160 pin SMD
  2833: 
  2834: There are 13 PAL's on the PCB !
  2835: 
  2836: RAM: 62256 x 3, D41264 x 2 (ZIP Ram)
  2837: DIPS: 2 x 8 position
  2838: SW1:
  2839:                			1	2	3	4	5	6	7	8
  2840: coins   1coin 1 Cred.  	off	off	off
  2841: 		2c 1c			on	off	off
  2842: 		3c 1c			off	on	off
  2843: 		4c 1c			on	on	off
  2844: 		5c 1c			off	off	on
  2845: 		1c 2c			on	off	on
  2846: 		1c 3c			off	on	on
  2847: 		1c 4c			on	on	on
  2848: 
  2849: players	1							off	off	off
  2850:  		2							on	off	off
  2851: 		3							off	on	off
  2852: 		4							on	on	off
  2853: 		5							off	off	on
  2854: 		6							on	off	on
  2855: 		7							off	on	on
  2856: 		8							on	on	on
  2857: 
  2858: diffic-
  2859: ulty	v.easy									off	off
  2860: 		normal									on	off
  2861: 		diffic.									off	on
  2862: 		v. diffic.								on	on
  2863: 
  2864: 
  2865: SW2
  2866: 
  2867: note position 3-8 not used
  2868: 
  2869:                		1	2	3	4	5	6	7	8
  2870: test mode	no		off
  2871: 			yes		on
  2872: 
  2873: demo sound	yes			off
  2874: 			no			on
  2875: 
  2876: 
  2877: ROMS:
  2878: PUCKPOKE.U3	M5M27C201	Sound
  2879: PUCKPOKE.U4	27C040--\
  2880: PUCKPOKE.U5	27C040---\
  2881: PUCKPOKE.U7	27C040----- Main program & GFX
  2882: PUCKPOKE.U8	27C4001---/
  2883: 
  2884: ROM sockets U63 & U64 empty
  2885: 
  2886: Hi-res PCB scan available on request.
  2887: Screenshots available on my site at http://unemulated.emuunlim.com (under PCB Shop Raid #2)
  2888: 
  2889: More info reqd? email me.
  2890: theguru@emuunlim.com
  2891: 
  2892: ****************************************************************************/
  2893: 
  2894: 
  2895: /* ----- System C Games ----- */
  2896: 
  2897: ROM_START( bloxeedc ) /* Bloxeed (C System Version)  (c)1989 Sega / Elorg */
  2898: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2899: 	ROM_LOAD16_BYTE( "epr12908.32", 0x000000, 0x020000, CRC(fc77cb91) SHA1(248a462e3858ffdc171af7d806e57deecb5dae50) )
  2900: 	ROM_LOAD16_BYTE( "epr12907.31", 0x000001, 0x020000, CRC(e5fcbac6) SHA1(a1adec5ef5574bff96a3d66619a24a6715097bb9) )
  2901: 	ROM_LOAD16_BYTE( "epr12993.34", 0x040000, 0x020000, CRC(487bc8fc) SHA1(3fb205bf56f35443e993e08b39c1a08c13ca5e3b) )
  2902: 	ROM_LOAD16_BYTE( "epr12992.33", 0x040001, 0x020000, CRC(19b0084c) SHA1(b3ba0f3d8d39a19aa66edb24885ea21192e22704) )
  2903: ROM_END
  2904: 
  2905: 
  2906: ROM_START( columns ) /* Columns (US) (c)1990 Sega */
  2907: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2908: 	ROM_LOAD16_BYTE( "epr13114.32", 0x000000, 0x020000, CRC(ff78f740) SHA1(0a034103a4b942f43e62f6e717f5dbf1bfb0b613) )
  2909: 	ROM_LOAD16_BYTE( "epr13113.31", 0x000001, 0x020000, CRC(9a426d9b) SHA1(3322e65ebf8d0a6047f7d408387c63ea401b8973) )
  2910: ROM_END
  2911: 
  2912: 
  2913: ROM_START( columnsj ) /* Columns (Jpn) (c)1990 Sega */
  2914: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2915: 	ROM_LOAD16_BYTE( "epr13112.32", 0x000000, 0x020000, CRC(bae6e53e) SHA1(2c2fd621eecd55591f22d076323972a7d0314615) )
  2916: 	ROM_LOAD16_BYTE( "epr13111.31", 0x000001, 0x020000, CRC(aa5ccd6d) SHA1(480e29e3112282d1790f1fb68075453325ba4336) )
  2917: ROM_END
  2918: 
  2919: 
  2920: ROM_START( columns2 ) /* Columns II - The Voyage Through Time (Jpn)  (c)1990 Sega */
  2921: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2922: 	ROM_LOAD16_BYTE( "epr13361.rom", 0x000000, 0x020000, CRC(b54b5f12) SHA1(4d7fbae7d9bcadd433ebc25aef255dc43df611bc) )
  2923: 	ROM_LOAD16_BYTE( "epr13360.rom", 0x000001, 0x020000, CRC(a59b1d4f) SHA1(e9ee315677782e1c61ae8f11260101cc03176188) )
  2924: ROM_END
  2925: 
  2926: 
  2927: ROM_START( tantrbl2 ) /* Tant-R (Puzzle & Action) (Alt Bootleg Running on C Board?, No Samples) */
  2928: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2929: 	ROM_LOAD16_BYTE( "trb2_2.32",    0x000000, 0x080000, CRC(8fc99c48) SHA1(d90ed673fe1f6e1f878c0d8fc62f5439b56d0a47) )
  2930: 	ROM_LOAD16_BYTE( "trb2_1.31",    0x000001, 0x080000, CRC(c318d00d) SHA1(703760d4ddc45bc0921ae96a27d9a8fbf12a1e96) )
  2931: 	ROM_LOAD16_BYTE( "mpr15616.34",  0x100000, 0x080000, CRC(17b80202) SHA1(f47bf2aa0c5972647438619b8453c7dede5c422f) )
  2932: 	ROM_LOAD16_BYTE( "mpr15615.33",  0x100001, 0x080000, CRC(36a88bd4) SHA1(cc7f6a947d1b79bb86957c43035b53d6d2bcfa28) )
  2933: ROM_END
  2934: 
  2935: ROM_START( ichidntb ) /* Ichident-R (Puzzle & Action 2) (Bootleg Running on C Board?, No Samples) */
  2936: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2937: 	ROM_LOAD16_BYTE( "27c4000.2",0x000000, 0x080000, CRC(5a194f44) SHA1(67a4d21b91704f8c2210b5106e82e22ba3366f4c) )
  2938: 	ROM_LOAD16_BYTE( "27c4000.1",0x000001, 0x080000, CRC(de209f84) SHA1(0860d0ebfab2952e82fc1e292bf9410d673d9322) )
  2939: 	ROM_LOAD16_BYTE( "epr16888", 0x100000, 0x080000, CRC(85d73722) SHA1(7ebe81b4d6c89f87f60200a3a8cddb07d581adef) )
  2940: 	ROM_LOAD16_BYTE( "epr16887", 0x100001, 0x080000, CRC(bc3bbf25) SHA1(e760ad400bc183b38e9787d88c8ac084fbe2ae21) )
  2941: ROM_END
  2942: 
  2943: /* ----- System C-2 Games ----- */
  2944: 
  2945: ROM_START( borench ) /* Borench  (c)1990 Sega */
  2946: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2947: 	ROM_LOAD16_BYTE( "ic32.bin", 0x000000, 0x040000, CRC(2c54457d) SHA1(adf3ea5393d2633ec6215e64f0cd89ad4567e765) )
  2948: 	ROM_LOAD16_BYTE( "ic31.bin", 0x000001, 0x040000, CRC(b46445fc) SHA1(24e85ef5abbc5376a854b13ed90f08f0c30d7f25) )
  2949: 
  2950: 	ROM_REGION( 0x020000, REGION_SOUND1, 0 )
  2951: 	ROM_LOAD( "ic4.bin", 0x000000, 0x020000, CRC(62b85e56) SHA1(822ab733c87938bb70a9e32cc5dd36bbf6f21d11) )
  2952: ROM_END
  2953: 
  2954: 
  2955: ROM_START( tfrceac ) /* ThunderForce AC  (c)1990 Technosoft / Sega */
  2956: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2957: 	ROM_LOAD16_BYTE( "ic32.bin", 0x000000, 0x040000, CRC(95ecf202) SHA1(92b0f351f2bee7d59873a4991615f14f1afe4da7) )
  2958: 	ROM_LOAD16_BYTE( "ic31.bin", 0x000001, 0x040000, CRC(e63d7f1a) SHA1(a40d0a5a96f379a467048dc8fddd8aaaeb94da1d) )
  2959: 	/* 0x080000 - 0x100000 Empty */
  2960: 	ROM_LOAD16_BYTE( "ic34.bin", 0x100000, 0x040000, CRC(29f23461) SHA1(032a7125fef5a660b85654d595aafc46812cdde6) )
  2961: 	ROM_LOAD16_BYTE( "ic33.bin", 0x100001, 0x040000, CRC(9e23734f) SHA1(64d27dc53f0ffc3513345a26ed077751b25d15f1) )
  2962: 
  2963: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )
  2964: 	ROM_LOAD( "ic4.bin", 0x000000, 0x040000, CRC(e09961f6) SHA1(e109b5f41502b765d191f22e3bbcff97d6defaa1) )
  2965: ROM_END
  2966: 
  2967: 
  2968: ROM_START( tfrceacj ) /* ThunderForce AC (Jpn)  (c)1990 Technosoft / Sega */
  2969: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2970: 	ROM_LOAD16_BYTE( "epr13657.32", 0x000000, 0x040000, CRC(a0f38ffd) SHA1(da548e7f61aed0e82a460553a119941da8857bc4) )
  2971: 	ROM_LOAD16_BYTE( "epr13656.31", 0x000001, 0x040000, CRC(b9438d1e) SHA1(598209c9fec3527fde720af09e5bebd7379f5b2b) )
  2972: 	/* 0x080000 - 0x100000 Empty */
  2973: 	ROM_LOAD16_BYTE( "ic34.bin",    0x100000, 0x040000, CRC(29f23461) SHA1(032a7125fef5a660b85654d595aafc46812cdde6) )
  2974: 	ROM_LOAD16_BYTE( "ic33.bin",    0x100001, 0x040000, CRC(9e23734f) SHA1(64d27dc53f0ffc3513345a26ed077751b25d15f1) )
  2975: 
  2976: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )
  2977: 	ROM_LOAD( "ic4.bin", 0x000000, 0x040000, CRC(e09961f6) SHA1(e109b5f41502b765d191f22e3bbcff97d6defaa1) )
  2978: ROM_END
  2979: 
  2980: 
  2981: ROM_START( tfrceacb ) /* ThunderForce AC (Bootleg)  (c)1990 Technosoft / Sega */
  2982: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2983: 	ROM_LOAD16_BYTE( "4.bin",    0x000000, 0x040000, CRC(eba059d3) SHA1(7bc04401f9a138fa151ac09a528b70acfb2021e3) )
  2984: 	ROM_LOAD16_BYTE( "3.bin",    0x000001, 0x040000, CRC(3e5dc542) SHA1(4a66dc842afaa145dab82b232738eea107bdf0f8) )
  2985: 	/* 0x080000 - 0x100000 Empty */
  2986: 	ROM_LOAD16_BYTE( "ic34.bin", 0x100000, 0x040000, CRC(29f23461) SHA1(032a7125fef5a660b85654d595aafc46812cdde6) )
  2987: 	ROM_LOAD16_BYTE( "ic33.bin", 0x100001, 0x040000, CRC(9e23734f) SHA1(64d27dc53f0ffc3513345a26ed077751b25d15f1) )
  2988: 
  2989: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )
  2990: 	ROM_LOAD( "ic4.bin", 0x000000, 0x040000, CRC(e09961f6) SHA1(e109b5f41502b765d191f22e3bbcff97d6defaa1) )
  2991: ROM_END
  2992: 
  2993: 
  2994: ROM_START( ribbit ) /* Ribbit  (c)1991 Sega */
  2995: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  2996: 	ROM_LOAD16_BYTE( "ep13833.32", 0x000000, 0x040000, CRC(5347f8ce) SHA1(b95b99536157edfbf0d74a42f64235f47dca7ee1) )
  2997: 	ROM_LOAD16_BYTE( "ep13832.31", 0x000001, 0x040000, CRC(889c42c2) SHA1(0839a50a68b64a66d995f1bfaff42fcb60bb4d45) )
  2998: 	ROM_COPY( REGION_CPU1, 0x000000, 0x080000, 0x080000 )
  2999: 	ROM_LOAD16_BYTE( "ep13838.34", 0x100000, 0x080000, CRC(a5d62ac3) SHA1(8d83a7bc4017e125ef4231278f766b2368d5fc1f) )
  3000: 	ROM_LOAD16_BYTE( "ep13837.33", 0x100001, 0x080000, CRC(434de159) SHA1(cf2973131cabf2bc0ebb2bfe9f804ad3d7d0a733) )
  3001: 
  3002: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3003: 	ROM_LOAD( "ep13834.4", 0x000000, 0x020000, CRC(ab0c1833) SHA1(f864e12ecf6c0524da20fc66747a4fa4280e67e9) )
  3004: ROM_END
  3005: 
  3006: 
  3007: ROM_START( tantr ) /* Tant-R (Puzzle & Action)  (c)1992 Sega */
  3008: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3009: 	ROM_LOAD16_BYTE( "epr15614.32", 0x000000, 0x080000, CRC(557782bc) SHA1(1546a999ab97c380dc87f6c95d5687722206740d) )
  3010: 	ROM_LOAD16_BYTE( "epr15613.31", 0x000001, 0x080000, CRC(14bbb235) SHA1(8dbfec5fb1d7a695acbb2fc0e78e4bdf76eb8d9d) )
  3011: 	ROM_LOAD16_BYTE( "mpr15616.34", 0x100000, 0x080000, CRC(17b80202) SHA1(f47bf2aa0c5972647438619b8453c7dede5c422f) )
  3012: 	ROM_LOAD16_BYTE( "mpr15615.33", 0x100001, 0x080000, CRC(36a88bd4) SHA1(cc7f6a947d1b79bb86957c43035b53d6d2bcfa28) )
  3013: 
  3014: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )
  3015: 	ROM_LOAD( "epr15617.4", 0x000000, 0x040000, CRC(338324a1) SHA1(79e2782d0d4764dd723886f846c852a6f6c1fb64) )
  3016: ROM_END
  3017: 
  3018: 
  3019: ROM_START( tantrbl ) /* Tant-R (Puzzle & Action) (Bootleg)  (c)1992 Sega */
  3020: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3021: 	ROM_LOAD16_BYTE( "pa_e10.bin",  0x000000, 0x080000, CRC(6c3f711f) SHA1(55aa2d50422134b95d9a7c5cbdc453b207b91b4c) )
  3022: 	ROM_LOAD16_BYTE( "pa_f10.bin",  0x000001, 0x080000, CRC(75526786) SHA1(8f5aa7f6918b71a79e6fca18194beec2aef15844) )
  3023: 	ROM_LOAD16_BYTE( "mpr15616.34", 0x100000, 0x080000, CRC(17b80202) SHA1(f47bf2aa0c5972647438619b8453c7dede5c422f) )
  3024: 	ROM_LOAD16_BYTE( "mpr15615.33", 0x100001, 0x080000, CRC(36a88bd4) SHA1(cc7f6a947d1b79bb86957c43035b53d6d2bcfa28) )
  3025: 
  3026: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )
  3027: 	ROM_LOAD( "pa_e03.bin", 0x000000, 0x020000, CRC(72918c58) SHA1(cb42363b163727a887a0b762519c72dcdf0a6460) )
  3028: 	ROM_LOAD( "pa_e02.bin", 0x020000, 0x020000, CRC(4e85b2a3) SHA1(3f92fb931d315c5a2d6c54b3204718574928cb7b) )
  3029: ROM_END
  3030: 
  3031: 
  3032: ROM_START( puyopuyo	) /* Puyo Puyo  (c)1992 Sega / Compile */
  3033: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3034: 	ROM_LOAD16_BYTE( "epr15036", 0x000000, 0x020000, CRC(5310ca1b) SHA1(dcfe2bf7476b640dfb790e8716e75b483d535e48) )
  3035: 	ROM_LOAD16_BYTE( "epr15035", 0x000001, 0x020000, CRC(bc62e400) SHA1(12bb6031574838a28889f6edb31dbb689265287c) )
  3036: 	/* 0x040000 - 0x100000 Empty */
  3037: 	ROM_LOAD16_BYTE( "epr15038", 0x100000, 0x020000, CRC(3b9eea0c) SHA1(e3e6148c1769834cc0061932eb035daa79673144) )
  3038: 	ROM_LOAD16_BYTE( "epr15037", 0x100001, 0x020000, CRC(be2f7974) SHA1(77027ced7a62f94e9fc6e8a0a4ac0c62f7ea813b) )
  3039: 
  3040: 	ROM_REGION( 0x020000, REGION_SOUND1, 0 )
  3041: 	ROM_LOAD( "epr15034", 0x000000, 0x020000, CRC(5688213b) SHA1(f3f234e482871ca903a782e51008f3bfed04ee63) )
  3042: ROM_END
  3043: 
  3044: 
  3045: ROM_START( puyopuya	) /* Puyo Puyo (Rev A)  (c)1992 Sega / Compile */
  3046: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3047: 	ROM_LOAD16_BYTE( "ep15036a.32", 0x000000, 0x020000, CRC(61b35257) SHA1(e09a7e992999befc88fc7928a478d1e2d14d7b08) )
  3048: 	ROM_LOAD16_BYTE( "ep15035a.31", 0x000001, 0x020000, CRC(dfebb6d9) SHA1(6f685729ef4660c2eba409c5236c6d2f313eef5b) )
  3049: 	/* 0x040000 - 0x100000 Empty */
  3050: 	ROM_LOAD16_BYTE( "epr15038",    0x100000, 0x020000, CRC(3b9eea0c) SHA1(e3e6148c1769834cc0061932eb035daa79673144) )
  3051: 	ROM_LOAD16_BYTE( "epr15037",    0x100001, 0x020000, CRC(be2f7974) SHA1(77027ced7a62f94e9fc6e8a0a4ac0c62f7ea813b) )
  3052: 
  3053: 	ROM_REGION( 0x020000, REGION_SOUND1, 0 )
  3054: 	ROM_LOAD( "epr15034", 0x000000, 0x020000, CRC(5688213b) SHA1(f3f234e482871ca903a782e51008f3bfed04ee63) )
  3055: ROM_END
  3056: 
  3057: 
  3058: ROM_START( puyopuyb ) /* Puyo Puyo  (c)1992 Sega / Compile  Bootleg */
  3059: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3060: 	ROM_LOAD16_BYTE( "puyopuyb.4bo", 0x000000, 0x020000, CRC(89ea4d33) SHA1(bef9d011524e71c072d309f6da3c2ebc38878e0e) )
  3061: 	ROM_LOAD16_BYTE( "puyopuyb.3bo", 0x000001, 0x020000, CRC(c002e545) SHA1(7a59ac764d60e9955830d9617b0bd122b44e7b2f) )
  3062: 	/* 0x040000 - 0x100000 Empty */
  3063: 	ROM_LOAD16_BYTE( "puyopuyb.6bo", 0x100000, 0x020000, CRC(0a0692e5) SHA1(d4ecc5b1791a91e3b33a5d4d0dd305f1623483d9) )
  3064: 	ROM_LOAD16_BYTE( "puyopuyb.5bo", 0x100001, 0x020000, CRC(353109b8) SHA1(92440987add3124b758e7eaa77a3a6f54ca61bb8) )
  3065: 
  3066: 	ROM_REGION( 0x020000, REGION_SOUND1, 0 )
  3067: 	ROM_LOAD( "puyopuyb.abo", 0x000000, 0x020000, CRC(79112b3b) SHA1(fc3a202e1e2ff39950d4af689b7fcca86c301805) )
  3068: ROM_END
  3069: 
  3070: 
  3071: ROM_START( ichidant ) /* Ichident-R (Puzzle & Action 2)  (c)1994 Sega */
  3072: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3073: 	ROM_LOAD16_BYTE( "epr16886", 0x000000, 0x080000, CRC(38208e28) SHA1(07fc634bdf2d3e25274c9c374b3506dec765114c) )
  3074: 	ROM_LOAD16_BYTE( "epr16885", 0x000001, 0x080000, CRC(1ce4e837) SHA1(16600600e12e3f35e3da89524f7f51f019b5ad17) )
  3075: 	ROM_LOAD16_BYTE( "epr16888", 0x100000, 0x080000, CRC(85d73722) SHA1(7ebe81b4d6c89f87f60200a3a8cddb07d581adef) )
  3076: 	ROM_LOAD16_BYTE( "epr16887", 0x100001, 0x080000, CRC(bc3bbf25) SHA1(e760ad400bc183b38e9787d88c8ac084fbe2ae21) )
  3077: 
  3078: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3079: 	ROM_LOAD( "epr16884", 0x000000, 0x080000, CRC(fd9dcdd6) SHA1(b8053a2e68072e7664ffc3c53f983f3ba72a892b) )
  3080: ROM_END
  3081: 
  3082: 
  3083: ROM_START( ichidnte ) /* Ichident-R (Puzzle & Action 2)  (c)1994 Sega */
  3084: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3085: 	ROM_LOAD16_BYTE( "pa2_32.bin", 0x000000, 0x080000, CRC(7ba0c025) SHA1(855e9bb2a20c6f51b26381233c57c26aa96ad1f6) )
  3086: 	ROM_LOAD16_BYTE( "pa2_31.bin", 0x000001, 0x080000, CRC(5f86e5cc) SHA1(44e201de00dfbf7c66d0e0d40d17b162c6f0625b) )
  3087: 	ROM_LOAD16_BYTE( "epr16888",   0x100000, 0x080000, CRC(85d73722) SHA1(7ebe81b4d6c89f87f60200a3a8cddb07d581adef) )
  3088: 	ROM_LOAD16_BYTE( "epr16887",   0x100001, 0x080000, CRC(bc3bbf25) SHA1(e760ad400bc183b38e9787d88c8ac084fbe2ae21) )
  3089: 
  3090: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3091: 	ROM_LOAD( "pa2_02.bin", 0x000000, 0x080000, CRC(fc7b0da5) SHA1(46770aa7e19b4f8a183be3f433c48ad677b552b1) )
  3092: ROM_END
  3093: 
  3094: ROM_START( stkclmns ) /* Stack Columns  (c)1994 Sega */
  3095: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3096: 	ROM_LOAD16_BYTE( "epr16795.32", 0x000000, 0x080000, CRC(b478fd02) SHA1(aaf9d9f9f4dc900b4e8ff6f258f26e782e5c3166) )
  3097: 	ROM_LOAD16_BYTE( "epr16794.31", 0x000001, 0x080000, CRC(6d0e8c56) SHA1(8f98d9fd98a1faa70b173cfd72f15102d11e79ae) )
  3098: 	ROM_LOAD16_BYTE( "mpr16797.34", 0x100000, 0x080000, CRC(b28e9bd5) SHA1(227eb591d10c9dbc52b35954ebd322e2a4451df2) )
  3099: 	ROM_LOAD16_BYTE( "mpr16796.33", 0x100001, 0x080000, CRC(ec7de52d) SHA1(85bc48cef15e615ad9059500808d17916c854a87) )
  3100: 
  3101: 	ROM_REGION( 0x020000, REGION_SOUND1, 0 )
  3102: 	ROM_LOAD( "epr16793.4", 0x000000, 0x020000, CRC(ebb2d057) SHA1(4a19ee5d71e4aabe7d9b9b968ab5ee4bc6262aad) )
  3103: ROM_END
  3104: 
  3105: 
  3106: ROM_START( puyopuy2 ) /* Puyo Puyo 2  (c)1994 Compile */
  3107: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3108: 	ROM_LOAD16_BYTE( "pp2.eve", 0x000000, 0x080000, CRC(1cad1149) SHA1(77fb0482fa35e615c0bed65f4d7f4dd89b241f23) )
  3109: 	ROM_LOAD16_BYTE( "pp2.odd", 0x000001, 0x080000, CRC(beecf96d) SHA1(c2bdad4b6184c11f81f2a5db409cb4ea186205a7) )
  3110: 
  3111: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3112: 	ROM_LOAD( "pp2.snd", 0x000000, 0x080000, CRC(020ff6ef) SHA1(6095b8277b47a6fd7a9721f15a70ae5bf6be9b1a) )
  3113: ROM_END
  3114: 
  3115: 
  3116: ROM_START( potopoto ) /* Poto Poto  (c)1994 Sega */
  3117: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3118: 	ROM_LOAD16_BYTE( "epr16662", 0x000000, 0x040000, CRC(bbd305d6) SHA1(1a4f4869fefac188c69bc67df0b625e43a0c3f1f) )
  3119: 	ROM_LOAD16_BYTE( "epr16661", 0x000001, 0x040000, CRC(5a7d14f4) SHA1(a615b5f481256366db7b1c6302a8dcb69708102b) )
  3120: 
  3121: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )
  3122: 	ROM_LOAD( "epr16660", 0x000000, 0x040000, CRC(8251c61c) SHA1(03eef3aa0bdde2c1d93128648f54fd69278d85dd) )
  3123: ROM_END
  3124: 
  3125: 
  3126: ROM_START( zunkyou ) /* Zunzunkyou No Yabou  (c)1994 Sega */
  3127: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3128: 	ROM_LOAD16_BYTE( "epr16812.32", 0x000000, 0x080000, CRC(eb088fb0) SHA1(69089a3516ad50f35e81971ef3c33eb3f5d52374) )
  3129: 	ROM_LOAD16_BYTE( "epr16811.31", 0x000001, 0x080000, CRC(9ac7035b) SHA1(1803ffbadc1213e04646d483e27da1591e22cd06) )
  3130: 	ROM_LOAD16_BYTE( "epr16814.34", 0x100000, 0x080000, CRC(821b3b77) SHA1(c45c7393a792ce8306a52f83f8ed8f6b0d7c11e9) )
  3131: 	ROM_LOAD16_BYTE( "epr16813.33", 0x100001, 0x080000, CRC(3cba9e8f) SHA1(208819bc1a205eaab089542afc7a59f69ce5bb81) )
  3132: 
  3133: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3134: 	ROM_LOAD( "epr16810.4", 0x000000, 0x080000, CRC(d542f0fe) SHA1(23ea50110dfe1cd9f286a535d15e0c3bcba73b00) )
  3135: ROM_END
  3136: 
  3137: 
  3138: ROM_START( puckpkmn ) /* Puckman Pockimon  (c)2000 Genie */
  3139: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3140: 	ROM_LOAD16_BYTE( "puckpoke.u5", 0x000000, 0x080000, CRC(fd334b91) SHA1(cf8bf6645a4082ea4392937e169b1686c9c7e246) )
  3141: 	ROM_LOAD16_BYTE( "puckpoke.u4", 0x000001, 0x080000, CRC(839cc76b) SHA1(e15662a7175db7a8e222dda176a8ed92e0d56e9d) )
  3142: 	ROM_LOAD16_BYTE( "puckpoke.u8", 0x100000, 0x080000, CRC(7936bec8) SHA1(4b350105abe514fbfeabae1c6f3aeee695c3d07a) )
  3143: 	ROM_LOAD16_BYTE( "puckpoke.u7", 0x100001, 0x080000, CRC(96b66bdf) SHA1(3cc2861ad9bc232cbe683e01b58090f832d03db5) )
  3144: 
  3145: 	ROM_REGION( 0x40000, REGION_SOUND1, ROMREGION_SOUNDONLY )
  3146: 	ROM_LOAD( "puckpoke.u3", 0x00000, 0x40000, CRC(7b066bac) SHA1(429616e21c672b07e0705bc63234249cac3af56f) )
  3147: ROM_END
  3148: 
  3149: ROM_START( pclubj ) /* Print Club (c)1995 Atlus */
  3150: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3151: 	ROM_LOAD16_BYTE( "epr18171.32", 0x000000, 0x080000, CRC(6c8eb8e2) )
  3152: 	ROM_LOAD16_BYTE( "epr18170.31", 0x000001, 0x080000, CRC(72c631e6) )
  3153: 	ROM_LOAD16_BYTE( "epr18173.34", 0x100000, 0x080000, CRC(9809dc72) )
  3154: 	ROM_LOAD16_BYTE( "epr18172.33", 0x100001, 0x080000, CRC(c61d819b) )
  3155: 
  3156: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3157: 	ROM_LOAD( "epr18169.4", 0x000000, 0x080000, CRC(5c00ccfb) )
  3158: ROM_END
  3159: 
  3160: ROM_START( pclubjv2 ) /* Print Club vol.2 (c)1995 Atlus */
  3161: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3162: 	ROM_LOAD16_BYTE( "p2jwn.u32", 0x000000, 0x080000, CRC(dfc0f7f1) )
  3163: 	ROM_LOAD16_BYTE( "p2jwn.u31", 0x000001, 0x080000, CRC(6ab4c694) )
  3164: 	ROM_LOAD16_BYTE( "p2jwn.u34", 0x100000, 0x080000, CRC(854fd456) )
  3165: 	ROM_LOAD16_BYTE( "p2jwn.u33", 0x100001, 0x080000, CRC(64428a69) )
  3166: 
  3167: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3168: 	ROM_LOAD( "epr18169.4", 0x000000, 0x080000, CRC(5c00ccfb) )
  3169: ROM_END
  3170: 
  3171: ROM_START( pclubjv4 ) /* Print Club vol.4 (c)1996 Atlus */
  3172: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3173: 	ROM_LOAD16_BYTE( "p4jsm.u32", 0x000000, 0x080000, CRC(36ff5f80) )
  3174: 	ROM_LOAD16_BYTE( "p4jsm.u31", 0x000001, 0x080000, CRC(f3c021ad) )
  3175: 	ROM_LOAD16_BYTE( "p4jsm.u34", 0x100000, 0x080000, CRC(d0fd4b33) )
  3176: 	ROM_LOAD16_BYTE( "p4jsm.u33", 0x100001, 0x080000, CRC(ec667875) )
  3177: 
  3178: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3179: 	ROM_LOAD( "epr18169.4", 0x000000, 0x080000, CRC(5c00ccfb) )
  3180: ROM_END
  3181: 
  3182: ROM_START( pclubjv5 ) /* Print Club vol.5 (c)1996 Atlus */
  3183: 	ROM_REGION( 0x200000, REGION_CPU1, 0 )
  3184: 	ROM_LOAD16_BYTE( "p5jat.u32", 0x000000, 0x080000, CRC(72220e69) )
  3185: 	ROM_LOAD16_BYTE( "p5jat.u31", 0x000001, 0x080000, CRC(06d83fde) )
  3186: 	ROM_LOAD16_BYTE( "p5jat.u34", 0x100000, 0x080000, CRC(b172ab58) )
  3187: 	ROM_LOAD16_BYTE( "p5jat.u33", 0x100001, 0x080000, CRC(ba38ec50) )
  3188: 
  3189: 	ROM_REGION( 0x080000, REGION_SOUND1, 0 )
  3190: 	ROM_LOAD( "epr18169.4", 0x000000, 0x080000, CRC(5c00ccfb) )
  3191: ROM_END
  3192: 
  3193: /* MegaTech Games - Genesis & sms! Games with a timer */
  3194: 
  3195: /* 12368-xx  xx is the game number? if so there are a _lot_ of carts, mt_beast is 01, mt_sonic is 52! */
  3196: 
  3197: ROM_START( megatech )
  3198: 	ROM_REGION( 0x8000, REGION_USER1, 0 )
  3199: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3200: ROM_END
  3201: 
  3202: ROM_START( mt_beast ) /* Altered Beast */
  3203: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3204: 	ROM_LOAD16_WORD_SWAP( "mp12538.ic1", 0x000000, 0x080000, CRC(3bea3dce) SHA1(ec72e4fde191dedeb3f148f132603ed3c23f0f86) )
  3205: 
  3206: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3207: 
  3208: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3209: 	ROM_LOAD( "12368-01.ic2", 0x000000, 0x08000, CRC(40cb0088) SHA1(e1711532c29f395a35a1cb34d789015881b5a1ed) )
  3210: 
  3211: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3212: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3213: ROM_END
  3214: 
  3215: ROM_START( mt_astro ) /* Astro Warrior (Sms Game!) */
  3216: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3217: 	/* z80 code because this is sms based .... */
  3218: 	ROM_LOAD( "ep13817.ic2", 0x000000, 0x020000, CRC(299cbb74) SHA1(901697a3535ad70190647f34ad5b30b695d54542) )
  3219: 
  3220: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3221: 
  3222: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3223: 	ROM_LOAD( "12368-13.ic1", 0x000000, 0x08000,  CRC(4038cbd1) SHA1(696bc1efce45d9f0052b2cf0332a232687c8d6ab) )
  3224: 
  3225: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3226: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3227: ROM_END
  3228: 
  3229: 
  3230: ROM_START( mt_wcsoc ) /* World Cup Soccer */
  3231: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3232: 	ROM_LOAD16_WORD_SWAP( "12607.ic1", 0x000000, 0x080000, CRC(bc591b30) SHA1(55e8577171c0933eee53af1dabd0f4c6462d5fc8) )
  3233: 
  3234: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3235: 
  3236: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3237: 	ROM_LOAD( "12368-21.ic2", 0x000000, 0x08000, CRC(028ee46b) SHA1(cd8f81d66e5ae62107eb20e0ca5db4b66d4b2987) )
  3238: 
  3239: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3240: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3241: ROM_END
  3242: 
  3243: ROM_START( mt_gng ) /* Ghouls and Ghosts (bad dump?) */
  3244: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3245: 	ROM_LOAD16_WORD_SWAP( "mp12605.ic1", 0x000000, 0x080000, BAD_DUMP CRC(0c6d6f25) SHA1(96c9c0e41036a23fc8e75e18ee2dad87654f200f) )
  3246: 	ROM_LOAD16_WORD_SWAP( "mpr12605.14", 0x080000, 0x020000, CRC(1066c6ab) SHA1(c30e4442732bdb38c96d780542f8550a94d127b0) )
  3247: 
  3248: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3249: 
  3250: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3251: 	ROM_LOAD( "12368-23.ic3", 0x000000, 0x08000, CRC(7ee58546) SHA1(ad5bb0934475eacdc5e354f67c96fe0d2512d33b) )
  3252: 
  3253: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3254: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3255: ROM_END
  3256: 
  3257: 
  3258: ROM_START( mt_gaxe ) /* Golden Axe */
  3259: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3260: 	ROM_LOAD16_WORD_SWAP( "12806.ic1", 0x000000, 0x080000, CRC(43456820) SHA1(2f7f1fcd979969ac99426f11ab99999a5494a121) )
  3261: 
  3262: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3263: 
  3264: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3265: 	ROM_LOAD( "12368-25.ic2", 0x000000, 0x08000, CRC(1f07ed28) SHA1(9d54192f4c6c1f8a51c38a835c1dd1e4e3e8279e) )
  3266: 
  3267: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3268: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3269: ROM_END
  3270: 
  3271: ROM_START( mt_smgp ) /* Super Monaco Grand Prix */
  3272: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3273: 	ROM_LOAD16_WORD_SWAP( "13250.ic1", 0x000000, 0x080000, CRC(189b885f) SHA1(31c06ffcb48b1604989a94e584261457de4f1f46) )
  3274: 
  3275: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3276: 
  3277: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3278: 	ROM_LOAD( "12368-39.ic2", 0x000000, 0x08000, CRC(64b3ce25) SHA1(83a9f2432d146a712b037f96f261742f7dc810bb) )
  3279: 
  3280: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3281: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3282: ROM_END
  3283: 
  3284: ROM_START( mt_sonic ) /* Sonic */
  3285: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3286: 	ROM_LOAD16_WORD_SWAP( "mp13913.ic1", 0x000000, 0x080000, CRC(480b4b5c) SHA1(ab1dc1f738e3b2d0898a314b123fa71182bf572e) )
  3287: 
  3288: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3289: 
  3290: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3291: 	ROM_LOAD( "12368-52.ic2", 0x0000, 0x8000,  CRC(6a69d20c) SHA1(e483b39ff6eca37dc192dc296d004049e220554a) )
  3292: 
  3293: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3294: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3295: ROM_END
  3296: 
  3297: ROM_START( mt_gaxe2 ) /* Golden Axe 2 */
  3298: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3299: 	ROM_LOAD16_WORD_SWAP( "mp14272.ic1", 0x000000, 0x080000, CRC(d4784cae) SHA1(b6c286027d06fd850016a2a1ee1f1aeea080c3bb) )
  3300: 
  3301: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3302: 
  3303: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3304: 	ROM_LOAD( "12368-57.ic2", 0x000000, 0x08000, CRC(dc9b4433) SHA1(efd3a598569010cdc4bf38ecbf9ed1b4e14ffe36) )
  3305: 
  3306: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3307: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3308: ROM_END
  3309: 
  3310: ROM_START( mt_fshrk ) /* Fire Shark */
  3311: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3312: 	ROM_LOAD16_WORD_SWAP( "mp14341.ic1", 0x000000, 0x080000, CRC(04d65ebc) SHA1(24338aecdc52b6f416548be722ca475c83dbae96) )
  3313: 
  3314: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3315: 
  3316: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3317: 	ROM_LOAD( "12368-53.ic2", 0x000000, 0x08000,  CRC(4fa61044) SHA1(7810deea221c10b0b2f5233443d81f4f1998ee58) )
  3318: 
  3319: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3320: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3321: ROM_END
  3322: 
  3323: 
  3324: ROM_START( mt_eswat ) /* E-Swat */
  3325: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3326: 	ROM_LOAD16_WORD_SWAP( "mp13192.ic1", 0x000000, 0x080000, CRC(82f458ef) SHA1(58444b783312def71ecffc4ad021b72a609685cb) )
  3327: 
  3328: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3329: 
  3330: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3331: 	ROM_LOAD( "12368-38.ic2", 0x000000, 0x08000, CRC(43c5529b) SHA1(104f85adea6da1612c0aa96d553efcaa387d7aaf) )
  3332: 
  3333: 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Bios */
  3334: 	ROM_LOAD( "epr12664.20", 0x000000, 0x8000, CRC(f71e9526) SHA1(1c7887541d02c41426992d17f8e3db9e03975953) )
  3335: ROM_END
  3336: 
  3337: /* MegaPlay Games - Modified Genesis games, uses credits? doesn't boot yet */
  3338: 
  3339: ROM_START( megaplay )
  3340: 	ROM_REGION( 0x20000, REGION_USER1, 0 )
  3341: 	ROM_LOAD( "ep15294.ic2", 0x000000, 0x20000, CRC(aa8dc2d8) SHA1(96771ad7b79dc9c83a1594243250d65052d23176) )
  3342: ROM_END
  3343: 
  3344: ROM_START( mp_sonic ) /* Sonic */
  3345: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3346: 	ROM_LOAD16_BYTE( "ep15177.ic2", 0x000000, 0x040000, CRC(a389b03b) SHA1(8e9e1cf3dd65ddf08757f5a1ce472130c902ea2c) )
  3347: 	ROM_LOAD16_BYTE( "ep15176.ic1", 0x000001, 0x040000, CRC(d180cc21) SHA1(62805cfaaa80c1da6146dd89fc2b49d819fd4f22) )
  3348: 
  3349: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3350: 
  3351: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3352: 	ROM_LOAD( "15175-01.ic3", 0x000000, 0x08000, CRC(99246889) SHA1(184aa3b7fdedcf578c5e34edb7ed44f57f832258) )
  3353: 
  3354: 	ROM_REGION( 0x20000, REGION_USER2, 0 ) /* Bios */
  3355: 	ROM_LOAD( "ep15294.ic2", 0x000000, 0x20000, CRC(aa8dc2d8) SHA1(96771ad7b79dc9c83a1594243250d65052d23176) )
  3356: ROM_END
  3357: 
  3358: ROM_START( mp_gaxe2 ) /* Golden Axe 2 */
  3359: 	ROM_REGION( 0x400000, REGION_CPU1, 0 )
  3360: 	ROM_LOAD16_BYTE( "ep15179b.ic2", 0x000000, 0x040000, CRC(00d97b84) SHA1(914bbf566ddf940aab67b92af237d251650ddadf) )
  3361: 	ROM_LOAD16_BYTE( "ep15178b.ic1", 0x000001, 0x040000, CRC(2ea576db) SHA1(6d96b948243533de1f488b1f80e0d5431a4f1f53) )
  3362: 
  3363: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
  3364: 
  3365: 	ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
  3366: 	ROM_LOAD( "1517502b.ic3", 0x000000, 0x08000, CRC(3039b653) SHA1(b19874c74d0fc0cca1169f62e5e74f0e8ca83679) ) // 15175-02b.ic3
  3367: 
  3368: 	ROM_REGION( 0x20000, REGION_USER2, 0 ) /* Bios */
  3369: 	ROM_LOAD( "ep15294.ic2", 0x000000, 0x20000, CRC(aa8dc2d8) SHA1(96771ad7b79dc9c83a1594243250d65052d23176) )
  3370: ROM_END
  3371: 
  3372: /******************************************************************************
  3373: 	Machine Init Functions
  3374: *******************************************************************************
  3375: 
  3376: 	All of the Sega C/C2 games apart from Bloxeed used a protection chip.
  3377: 	The games contain various checks which make sure this protection chip is
  3378: 	present and returning the expected values.  The chip uses a table of
  3379: 	256x4-bit values to produce its results.  It appears that different
  3380: 	tables are used for Japanese vs. English variants of some games
  3381: 	(Puzzle & Action 2) but not others (Columns).
  3382: 
  3383: ******************************************************************************/
  3384: 
  3385: static void init_saves(void)
  3386: {
  3387: 	/* Do we need the int states ? */
  3388: 	state_save_register_UINT8 ("C2_main", 0, "Int 2 Status", &ym3438_int, 1);
  3389: 	state_save_register_UINT8 ("C2_main", 0, "Int 4 Status", &scanline_int, 1);
  3390: 	state_save_register_UINT8 ("C2_main", 0, "Int 6 Status", &vblank_int, 1);
  3391: 
  3392: 	state_save_register_UINT8 ("C2_IO", 0, "I/O Writes", iochip_reg, 0x10);
  3393: 
  3394: 	state_save_register_UINT16 ("C2 Protection", 0, "Write Buffer", &prot_write_buf, 1);
  3395: 	state_save_register_UINT16 ("C2 Protection", 0, "Read Buffer", &prot_read_buf, 1);
  3396: }
  3397: 
  3398: static DRIVER_INIT( segac2 )
  3399: {
  3400: 	bloxeed_sound = 0;
  3401: 	init_saves();
  3402: }
  3403: 
  3404: static DRIVER_INIT( bloxeedc )
  3405: {
  3406: 	init_saves();
  3407: 	bloxeed_sound = 1;
  3408: }
  3409: 
  3410: static DRIVER_INIT( columns )
  3411: {
  3412: 	static const UINT32 columns_table[256/8] =
  3413: 	{
  3414: 		0x20a41397, 0x64e057d3, 0x20a41397, 0x64e057d3,
  3415: 		0x20a41397, 0x64e057d3, 0xa8249b17, 0xec60df53,
  3416: 		0x20a41397, 0x64e057d3, 0x75f546c6, 0x31b10282,
  3417: 		0x20a41397, 0x64e057d3, 0xfd75ce46, 0xb9318a02,
  3418: 		0xb8348b07, 0xfc70cf43, 0xb8348b07, 0xfc70cf43,
  3419: 		0x9a168b07, 0xde52cf43, 0x9a168b07, 0xde52cf43,
  3420: 		0x30b40387, 0x74f047c3, 0x75f546c6, 0x31b10282,
  3421: 		0x30b40387, 0x74f047c3, 0xfd75ce46, 0xb9318a02
  3422: 	};
  3423: 	prot_table = columns_table;
  3424: 	bloxeed_sound = 0;
  3425: 	init_saves();
  3426: }
  3427: 
  3428: static DRIVER_INIT( columns2 )
  3429: {
  3430: 	static const UINT32 columns2_table[256/8] =
  3431: 	{
  3432: 		0x0015110c, 0x0015110c, 0x889d9984, 0xcedb9b86,
  3433: 		0x4455554c, 0x4455554c, 0xddddccc4, 0x9b9bcec6,
  3434: 		0x2237332e, 0x2237332e, 0x6677776e, 0x2031756c,
  3435: 		0x6677776e, 0x6677776e, 0x7777666e, 0x3131646c,
  3436: 		0x0015110c, 0x0015110c, 0x889d9984, 0xcedb9b86,
  3437: 		0x6677776e, 0x6677776e, 0xffffeee6, 0xb9b9ece4,
  3438: 		0xaabfbba6, 0xaabfbba6, 0xeeffffe6, 0xa8b9fde4,
  3439: 		0xeeffffe6, 0xeeffffe6, 0xffffeee6, 0xb9b9ece4
  3440: 	};
  3441: 	prot_table = columns2_table;
  3442: 	bloxeed_sound = 0;
  3443: 	init_saves();
  3444: }
  3445: 
  3446: static DRIVER_INIT( borench )
  3447: {
  3448: 	static const UINT32 borench_table[256/8] =
  3449: 	{
  3450: 		0x12fe56ba, 0x56ba56ba, 0x00aa44ee, 0xcceeccee,
  3451: 		0x13ff57bb, 0x759957bb, 0x11bb55ff, 0xffddddff,
  3452: 		0x12ba56fe, 0x56fe56fe, 0x00aa44ee, 0xcceeccee,
  3453: 		0x933bd77f, 0xf55dd77f, 0x913bd57f, 0x7f5d5d7f,
  3454: 		0x12fe56ba, 0x56ba56ab, 0x00aa44ee, 0xcceeccff,
  3455: 		0xd73bd73b, 0xf519d72a, 0xd57fd57f, 0x7f5d5d6e,
  3456: 		0x12ba56fe, 0x56fe56ef, 0x00aa44ee, 0xcceeccff,
  3457: 		0xd77fd77f, 0xf55dd76e, 0xd57fd57f, 0x7f5d5d6e
  3458: 	};
  3459: 	prot_table = borench_table;
  3460: 	bloxeed_sound = 0;
  3461: 	init_saves();
  3462: }
  3463: 
  3464: static DRIVER_INIT( tfrceac )
  3465: {
  3466: 	static const UINT32 tfrceac_table[256/8] =
  3467: 	{
  3468: 		0x3a3a6f6f, 0x38386d6d, 0x3a3a6f6f, 0x28287d7d,
  3469: 		0x3a3a6f6f, 0x38386d6d, 0x3a3a6f6f, 0x28287d7d,
  3470: 		0x7e3a2b6f, 0x7c38296d, 0x7eb22be7, 0x6ca039f5,
  3471: 		0x7e3a2b6f, 0x7c38296d, 0x7eb22be7, 0x6ca039f5,
  3472: 		0x3b3b6e6e, 0x39396c6c, 0x5dd50880, 0x4ec61b93,
  3473: 		0x3b3b6e6e, 0x39396c6c, 0x3bb36ee6, 0x28a07df5,
  3474: 		0x5d19084c, 0x5d19084c, 0x7ff72aa2, 0x6ee63bb3,
  3475: 		0x5d19084c, 0x5d19084c, 0x5d9108c4, 0x4c8019d5
  3476: 	};
  3477: 	prot_table = tfrceac_table;
  3478: 	bloxeed_sound = 0;
  3479: 	init_saves();
  3480: }
  3481: 
  3482: static DRIVER_INIT( tfrceacb )
  3483: {
  3484: 	/* disable the palette bank switching from the protection chip */
  3485: 	install_mem_write16_handler(0, 0x800000, 0x800001, MWA16_NOP);
  3486: }
  3487: 
  3488: static DRIVER_INIT( ribbit )
  3489: {
  3490: 	static const UINT32 ribbit_table[256/8] =
  3491: 	{
  3492: 		0xffeeddcc, 0xffeeddcc, 0xfeeffeef, 0xfeeffeef,
  3493: 		0xbb8899aa, 0xffccddee, 0xba89ba89, 0xfecdfecd,
  3494: 		0x7f6e5d4c, 0x3b2a1908, 0x7e6f7e6f, 0x3a2b3a2b,
  3495: 		0x3b19193b, 0x3b19193b, 0xba98ba98, 0xba98ba98,
  3496: 		0xffff5555, 0xffff5555, 0xfefe7676, 0xfefe7676,
  3497: 		0xbb991133, 0xffdd5577, 0xfedc7654, 0xfedc7654,
  3498: 		0x7f7ff7f7, 0x3b3bb3b3, 0x7e7ef6f6, 0x3a3ab2b2,
  3499: 		0x3b19b391, 0x3b19b391, 0xfedc7654, 0xba983210
  3500: 	};
  3501: 	prot_table = ribbit_table;
  3502: 	bloxeed_sound = 0;
  3503: 	init_saves();
  3504: 
  3505: 	/* kludge for protection */
  3506: 	install_mem_read16_handler(0, 0xffc166, 0xffc167, ribbit_prot_hack_r);
  3507: 
  3508: 	/* additional palette swizzling */
  3509: 	install_mem_read16_handler(0, 0x8c0000, 0x8c0fff, ribbit_palette_r);
  3510: 	install_mem_write16_handler(0, 0x8c0000, 0x8c0fff, ribbit_palette_w);
  3511: 	ribbit_palette_select = install_mem_read16_handler(0, 0x2000, 0x27ff, ribbit_palette_select_r);
  3512: }
  3513: 
  3514: static DRIVER_INIT( tantr )
  3515: {
  3516: 	static const UINT32 tantr_table[256/8] =
  3517: 	{
  3518: 		0x91ddd19d, 0x91ddd19d, 0xd4dc949c, 0xf6feb6be,
  3519: 		0x91bbd1fb, 0x91bbd1fb, 0xd4fe94be, 0xf6feb6be,
  3520: 		0x80cce2ae, 0x88cceaae, 0xc5cda7af, 0xefef8d8d,
  3521: 		0x91bbf3d9, 0x99bbfbd9, 0xd4feb69c, 0xfefe9c9c,
  3522: 		0x5d55959d, 0x5d55959d, 0x5c54949c, 0x7e76b6be,
  3523: 		0x5d7795bf, 0x5d7795bf, 0x5c7694be, 0x7e76b6be,
  3524: 		0x5d55b7bf, 0x4444aeae, 0x5c54b6be, 0x67678d8d,
  3525: 		0x5d77b79d, 0x5577bf9d, 0x5c76b69c, 0x76769c9c
  3526: 	};
  3527: 	prot_table = tantr_table;
  3528: 	bloxeed_sound = 0;
  3529: 	init_saves();
  3530: }
  3531: 
  3532: static DRIVER_INIT( ichidant )
  3533: {
  3534: 	static const UINT32 ichidant_table[256/8] =
  3535: 	{
  3536: 		0x55116622, 0x55116622, 0x55117733, 0x55117733,
  3537: 		0x8800aa22, 0x8800aa22, 0x8800bb33, 0x8800bb33,
  3538: 		0x11550044, 0x55114400, 0x11551155, 0x55115511,
  3539: 		0xcc44cc44, 0x88008800, 0xcc44dd55, 0x88009911,
  3540: 		0xdd99eeaa, 0xdd99eeaa, 0xdd99ffbb, 0xdd99ffbb,
  3541: 		0xaa228800, 0xaa228800, 0xaa229911, 0xaa229911,
  3542: 		0x99dd88cc, 0xdd99cc88, 0x99dd99dd, 0xdd99dd99,
  3543: 		0xee66ee66, 0xaa22aa22, 0xee66ff77, 0xaa22bb33
  3544: 	};
  3545: 	prot_table = ichidant_table;
  3546: 	bloxeed_sound = 0;
  3547: 	init_saves();
  3548: }
  3549: 
  3550: static DRIVER_INIT( ichidnte )
  3551: {
  3552: 	static const UINT32 ichidnte_table[256/8] =
  3553: 	{
  3554: 		0x4c4c4c4c, 0x08080808, 0x5d5d4c4c, 0x19190808,
  3555: 		0x33332222, 0x33332222, 0x22222222, 0x22222222,
  3556: 		0x082a082a, 0x082a082a, 0x193b082a, 0x193b082a,
  3557: 		0x77556644, 0x33112200, 0x66446644, 0x22002200,
  3558: 		0x6e6e6e6e, 0x2a2a2a2a, 0x7f7f6e6e, 0x3b3b2a2a,
  3559: 		0xbbbbaaaa, 0xbbbbaaaa, 0xaaaaaaaa, 0xaaaaaaaa,
  3560: 		0x2a082a08, 0x2a082a08, 0x3b192a08, 0x3b192a08,
  3561: 		0xffddeecc, 0xbb99aa88, 0xeecceecc, 0xaa88aa88
  3562: 	};
  3563: 	prot_table = ichidnte_table;
  3564: 	bloxeed_sound = 0;
  3565: 	init_saves();
  3566: }
  3567: 
  3568: 
  3569: static DRIVER_INIT( potopoto )
  3570: {
  3571: 	/* note: this is not the real table; Poto Poto only tests one  */
  3572: 	/* very specific case, so we don't have enough data to provide */
  3573: 	/* the correct table in its entirety */
  3574: 	static const UINT32 potopoto_table[256/8] =
  3575: 	{
  3576: 		0x00000000, 0x00000000, 0x00000000, 0x00000000,
  3577: 		0x00000000, 0x00000000, 0x00000000, 0x00000000,
  3578: 		0x00000000, 0x00000000, 0x00000000, 0x00000000,
  3579: 		0x00000000, 0x00000000, 0x00000000, 0x00000000,
  3580: 		0x00000000, 0x00000000, 0x00000000, 0x00000000,
  3581: 		0x00000000, 0x00000000, 0x22222222, 0x22222222,
  3582: 		0x00000000, 0x00000000, 0x00000000, 0x00000000,
  3583: 		0x00000000, 0x00000000, 0x00000000, 0x00000000
  3584: 	};
  3585: 	prot_table = potopoto_table;
  3586: 	bloxeed_sound = 0;
  3587: 	init_saves();
  3588: }
  3589: 
  3590: static DRIVER_INIT( puyopuyo )
  3591: {
  3592: 	static const UINT32 puyopuyo_table[256/8] =
  3593: 	{
  3594: 		0x33aa55cc, 0x33aa55cc, 0xba22fe66, 0xba22fe66,
  3595: 		0x77ee55cc, 0x55cc77ee, 0xfe66fe66, 0xdc44dc44,
  3596: 		0x33aa77ee, 0x77aa33ee, 0xba22fe66, 0xfe22ba66,
  3597: 		0x77ee77ee, 0x11cc11cc, 0xfe66fe66, 0x98449844,
  3598: 		0x22bb44dd, 0x3ba25dc4, 0xab33ef77, 0xba22fe66,
  3599: 		0x66ff44dd, 0x5dc47fe6, 0xef77ef77, 0xdc44dc44,
  3600: 		0x22bb66ff, 0x7fa23be6, 0xab33ef77, 0xfe22ba66,
  3601: 		0x66ff66ff, 0x19c419c4, 0xef77ef77, 0x98449844
  3602: 	};
  3603: 	prot_table = puyopuyo_table;
  3604: 	bloxeed_sound = 0;
  3605: 	init_saves();
  3606: }
  3607: 
  3608: static DRIVER_INIT( puyopuy2 )
  3609: {
  3610: 	/* note: this is not the real table; Puyo Puyo 2 doesn't  */
  3611: 	/* store the original table; instead it loops through all */
  3612: 	/* combinations 0-255 and expects the following results;  */
  3613: 	/* to work around this, we install a custom read handler  */
  3614: 	static const UINT32 puyopuy2_table[256/8] =
  3615: 	{
  3616: 		0x00008383, 0xb3b33030, 0xcccc4f4f, 0x7f7ffcfc,
  3617: 		0x02028181, 0xb1b13232, 0xcece4d4d, 0x7d7dfefe,
  3618: 		0x4444c1c1, 0x91911414, 0x99991c1c, 0x4c4cc9c9,
  3619: 		0x4646c3c3, 0x93931616, 0x9b9b1e1e, 0x4e4ecbcb,
  3620: 		0x5555d7d7, 0xf7f77575, 0xdddd5f5f, 0x7f7ffdfd,
  3621: 		0x5757d5d5, 0xf5f57777, 0xdfdf5d5d, 0x7d7dffff,
  3622: 		0x11119595, 0xd5d55151, 0x88880c0c, 0x4c4cc8c8,
  3623: 		0x13139797, 0xd7d75353, 0x8a8a0e0e, 0x4e4ecaca
  3624: 	};
  3625: 	prot_table = puyopuy2_table;
  3626: 	bloxeed_sound = 0;
  3627: 
  3628: 	install_mem_read16_handler(0, 0x800000, 0x800001, puyopuy2_prot_r);
  3629: 	init_saves();
  3630: }
  3631: 
  3632: static DRIVER_INIT( stkclmns )
  3633: {
  3634: 	static const UINT32 stkclmns_table[256/8] =
  3635: 	{
  3636: 		0xcc88cc88, 0xcc88cc88, 0xcc99cc99, 0xcc99cc99,
  3637: 		0x00001111, 0x88889999, 0x00111100, 0x88999988,
  3638: 		0xaaee88cc, 0xeeaacc88, 0xaaff88dd, 0xeebbcc99,
  3639: 		0x66665555, 0xaaaa9999, 0x66775544, 0xaabb9988,
  3640: 		0xeeaaeeaa, 0xeeaaeeaa, 0xeebbeebb, 0xeebbeebb,
  3641: 		0x00001111, 0x88889999, 0x00111100, 0x88999988,
  3642: 		0x00442266, 0x44006622, 0x00552277, 0x44116633,
  3643: 		0xeeeedddd, 0x22221111, 0xeeffddcc, 0x22331100
  3644: 	};
  3645: 	prot_table = stkclmns_table;
  3646: 	bloxeed_sound = 0;
  3647: 
  3648: 	/* until the battery RAM is understood, we must fill RAM with */
  3649: 	/* random values so that the high scores are properly reset at */
  3650: 	/* startup */
  3651: 	{
  3652: 		int i;
  3653: 		for (i = 0; i < 0x10000/2; i++)
  3654: 			main_ram[i] = mame_rand();
  3655: 	}
  3656: 	init_saves();
  3657: }
  3658: 
  3659: static DRIVER_INIT( zunkyou )
  3660: {
  3661: 	static const UINT32 zunkyou_table[256/8] =
  3662: 	{
  3663: 		0xa0a06c6c, 0x82820a0a, 0xecec2020, 0xecec6464,
  3664: 		0xa2a26e6e, 0x80800808, 0xaaaa6666, 0xaaaa2222,
  3665: 		0x39287d6c, 0x1b0a1b0a, 0x75643120, 0x75647564,
  3666: 		0x3b2a7f6e, 0x19081908, 0x33227766, 0x33223322,
  3667: 		0xb1b17d7d, 0x93931b1b, 0xfdfd3131, 0xfdfd7575,
  3668: 		0xa2a26e6e, 0x80800808, 0xaaaa6666, 0xaaaa2222,
  3669: 		0x28396c7d, 0x0a1b0a1b, 0x64752031, 0x64756475,
  3670: 		0x3b2a7f6e, 0x19081908, 0x33227766, 0x33223322
  3671: 	};
  3672: 	prot_table = zunkyou_table;
  3673: 	bloxeed_sound = 0;
  3674: 	init_saves();
  3675: }
  3676: 
  3677: /* Print Club hardware (C2 with a printer) */
  3678: 
  3679: static int cam_data;
  3680: 
  3681: static READ16_HANDLER( printer_r )
  3682: {
  3683: 	return cam_data;
  3684: }
  3685: 
  3686: static WRITE16_HANDLER( print_club_camera_w )
  3687: {
  3688: 	cam_data = data;
  3689: }
  3690: 
  3691: static DRIVER_INIT( pclub )
  3692: {
  3693: 	static const UINT32 printc1_table[256/8] =
  3694: 	{
  3695: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
  3696: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
  3697: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
  3698: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
  3699: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
  3700: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
  3701: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
  3702: 		0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
  3703: 	};
  3704: 	prot_table = printc1_table;
  3705: 	bloxeed_sound = 0;
  3706: 	init_saves();
  3707: 
  3708: 	install_mem_read16_handler(0,  0x880120, 0x880121, printer_r );/*Print Club Vol.1*/
  3709: 	install_mem_read16_handler(0,  0x880124, 0x880125, printer_r );/*Print Club Vol.2*/
  3710: 	install_mem_write16_handler(0, 0x880124, 0x880125, print_club_camera_w);
  3711: }
  3712: 
  3713: /* Genie's Hardware (contains no real sega parts) */
  3714: 
  3715: DRIVER_INIT( puckpkmn )
  3716: {
  3717: 	data8_t *rom	=	memory_region(REGION_CPU1);
  3718: 	size_t len		=	memory_region_length(REGION_CPU1);
  3719: 	int i;
  3720: 	for (i = 0; i < len; i++)
  3721: 		rom[i] = BITSWAP8(rom[i],1,4,2,0,7,5,3,6);
  3722: 
  3723: 	cpu_setbank(1, memory_region(REGION_CPU1) );	// VDP reads the roms from here
  3724: 	cpu_setbank(2, main_ram );						// VDP reads the ram from here
  3725: 
  3726: 	init_segac2();
  3727: }
  3728: 
  3729: 
  3730: /******************************************************************************
  3731: 	Game Drivers
  3732: *******************************************************************************
  3733: 
  3734: 	These cover all the above games.
  3735: 
  3736: 	Dates are all verified correct from Ingame display, some of the Titles
  3737: 	such as Ichidant-R, Tant-R might be slightly incorrect as I've seen the
  3738: 	games refered to by other names such as Ichident-R, Tanto-R, Tanto Arle
  3739: 	etc.
  3740: 
  3741: 	bloxeedc is set as as clone of bloxeed as it is the same game but running
  3742: 	on a different piece of hardware.  The parent 'bloxeed' is a system18 game
  3743: 	and does not currently work due to it being encrypted.
  3744: 
  3745: ******************************************************************************/
  3746: 
  3747: /* System C Games */
  3748: GAME ( 1989, bloxeedc, bloxeed,  segac,    bloxeedc, bloxeedc, ROT0, "Sega / Elorg",           "Bloxeed (C System)" )
  3749: GAME ( 1990, columns,  0,        segac,    columns,  columns,  ROT0, "Sega",                   "Columns (US)" )
  3750: GAME ( 1990, columnsj, columns,  segac,    columns,  columns,  ROT0, "Sega",                   "Columns (Japan)" )
  3751: GAME ( 1990, columns2, 0,        segac,    columns2, columns2, ROT0, "Sega",                   "Columns II - The Voyage Through Time (Japan)" )
  3752: 
  3753: /* System C-2 Games */
  3754: GAME ( 1990, borench,  0,        segac2,   borench,  borench,  ROT0, "Sega",                   "Borench" )
  3755: GAME ( 1990, tfrceac,  0,        segac2,   tfrceac,  tfrceac,  ROT0, "Sega / Technosoft",      "ThunderForce AC" )
  3756: GAME ( 1990, tfrceacj, tfrceac,  segac2,   tfrceac,  tfrceac,  ROT0, "Sega / Technosoft",      "ThunderForce AC (Japan)" )
  3757: GAME ( 1990, tfrceacb, tfrceac,  segac2,   tfrceac,  tfrceacb, ROT0, "bootleg",                "ThunderForce AC (bootleg)" )
  3758: GAME ( 1991, ribbit,   0,        segac2,   ribbit,   ribbit,   ROT0, "Sega",                   "Ribbit!" )
  3759: GAME ( 1992, tantr,    0,        segac2,   ichidant, tantr,    ROT0, "Sega",                   "Tant-R (Puzzle & Action) (Japan)" )
  3760: GAME ( 1992, tantrbl,  tantr,    segac2,   ichidant, segac2,   ROT0, "bootleg",                "Tant-R (Puzzle & Action) (Japan) (bootleg set 1)" )
  3761: GAME ( 1994, tantrbl2, tantr,    segac,    ichidant, tantr,    ROT0, "bootleg",                "Tant-R (Puzzle & Action) (Japan) (bootleg set 2)" )
  3762: GAME ( 1992, puyopuyo, 0,        segac2,   puyopuyo, puyopuyo, ROT0, "Sega / Compile",         "Puyo Puyo (Japan)" )
  3763: GAME ( 1992, puyopuya, puyopuyo, segac2,   puyopuyo, puyopuyo, ROT0, "Sega / Compile",         "Puyo Puyo (Japan) (Rev A)" )
  3764: GAME ( 1992, puyopuyb, puyopuyo, segac2,   puyopuyo, puyopuyo, ROT0, "bootleg",                "Puyo Puyo (English) (bootleg)" )
  3765: GAME ( 1994, ichidant, 0,        segac2,   ichidant, ichidant, ROT0, "Sega",                   "Ichidant-R (Puzzle & Action 2) (Japan)" )
  3766: GAME ( 1994, ichidnte, ichidant, segac2,   ichidant, ichidnte, ROT0, "Sega",                   "Ichidant-R (Puzzle & Action 2) (English)" )
  3767: GAME ( 1994, ichidntb, ichidant, segac,    ichidant, segac2,   ROT0, "bootleg",                "Ichidant-R (Puzzle & Action 2) (Japan) (bootleg)" )
  3768: GAME ( 1994, stkclmns, 0,        segac2,   stkclmns, stkclmns, ROT0, "Sega",                   "Stack Columns (Japan)" )
  3769: GAME ( 1994, puyopuy2, 0,        segac2,   puyopuy2, puyopuy2, ROT0, "Compile (Sega license)", "Puyo Puyo 2 (Japan)" )
  3770: GAME ( 1994, potopoto, 0,        segac2,   potopoto, potopoto, ROT0, "Sega",                   "Poto Poto (Japan)" )
  3771: GAME ( 1994, zunkyou,  0,        segac2,   zunkyou,  zunkyou,  ROT0, "Sega",                   "Zunzunkyou No Yabou (Japan)" )
  3772: GAME ( 2000, puckpkmn, 0,        puckpkmn, puckpkmn, puckpkmn, ROT0, "Genie",                  "Puckman Pockimon" )
  3773: 
  3774: /* Atlus Print Club 'Games' (C-2 Hardware, might not be possible to support them because they use camera + printer, really just put here for reference) */
  3775: GAMEX( 1995, pclubj,   0,        segac2, pclub,    pclub,    ROT0, "Atlus",                   "Print Club (Japan Vol.1)", GAME_NOT_WORKING )
  3776: GAMEX( 1995, pclubjv2, pclubj,   segac2, pclub,    pclub,    ROT0, "Atlus",                   "Print Club (Japan Vol.2)", GAME_NOT_WORKING )
  3777: GAMEX( 1996, pclubjv4, pclubj,   segac2, pclub,    pclub,    ROT0, "Atlus",                   "Print Club (Japan Vol.4)", GAME_NOT_WORKING )
  3778: GAMEX( 1996, pclubjv5, pclubj,   segac2, pclub,    pclub,    ROT0, "Atlus",                   "Print Club (Japan Vol.5)", GAME_NOT_WORKING )
  3779: 
  3780: /* Mega Tech - the menu needs emulating, genesis emulation needs finishing, some of the games are sms based! */
  3781: /* several games can't be started, bug in i/o? haven't managed to get bios to identify carts yet either */
  3782: GAMEX( 1989, megatech, 0,        megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Bios", NOT_A_DRIVER )
  3783: GAMEX( 1989, mt_beast, megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Altered Beast", GAME_NOT_WORKING )
  3784: GAMEX( 1989, mt_astro, megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Astro Warrior", GAME_NOT_WORKING ) /* sms! */
  3785: GAMEX( 1989, mt_gaxe,  megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Golden Axe", GAME_NOT_WORKING )
  3786: GAMEX( 1989, mt_gng,   megatech, megatech, megatech, segac2, ROT0, "Capcom / Sega",         "MegaTech: Ghouls and Ghosts", GAME_NOT_WORKING )
  3787: GAMEX( 1990, mt_smgp,  megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Super Monaco Grand Prix", GAME_NOT_WORKING )
  3788: GAMEX( 1989, mt_wcsoc, megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: World Cup Soccer", GAME_NOT_WORKING )
  3789: GAMEX( 1989, mt_sonic, megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Sonic the Hedgehog", GAME_NOT_WORKING )
  3790: GAMEX( 1989, mt_fshrk, megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Fire Shark", GAME_NOT_WORKING )
  3791: GAMEX( 1989, mt_gaxe2, megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: Golden Axe 2", GAME_NOT_WORKING )
  3792: GAMEX( 1989, mt_eswat, megatech, megatech, megatech, segac2, ROT0, "Sega",                  "MegaTech: E-Swat", GAME_NOT_WORKING )
  3793: 
  3794: /* Mega Play - doesn't boot yet */
  3795: 
  3796: GAMEX( 1989, megaplay, 0,        genesis, genesis, segac2, ROT0, "Sega",                  "MegaPlay: Bios", NOT_A_DRIVER )
  3797: GAMEX( 1989, mp_sonic, megaplay, genesis, genesis, segac2, ROT0, "Sega",                  "MegaPlay: Sonic The Hedgehog", GAME_NOT_WORKING  )
  3798: GAMEX( 1989, mp_gaxe2, megaplay, genesis, genesis, segac2, ROT0, "Sega",                  "MegaPlay: Golden Axe 2", GAME_NOT_WORKING  )
  3799: 




powered by ggdb.com this page took approx. 0.002s