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 : Super Breakout : VM Driver Source

Source Listing


     1: /***************************************************************************
     2: 
     3: 	Atari Super Breakout hardware
     4: 
     5: 	driver by Mike Balfour
     6: 
     7: 	Games supported:
     8: 		* Super Breakout
     9: 
    10: 	Known issues:
    11: 		* none at this time
    12: 
    13: ****************************************************************************
    14: 
    15: 	Note:  I'm cheating a little bit with the paddle control.  The original
    16: 	game handles the paddle control as following.  The paddle is a potentiometer.
    17: 	Every VBlank signal triggers the start of a voltage ramp.  Whenever the
    18: 	ramp has the same value as the potentiometer, an NMI is generated.	In the
    19: 	NMI code, the current scanline value is used to calculate the value to
    20: 	put into location $1F in memory.  I cheat in this driver by just putting
    21: 	the paddle value directly into $1F, which has the same net result.
    22: 
    23: 	If you have any questions about how this driver works, don't hesitate to
    24: 	ask.  - Mike Balfour (mab22@po.cwru.edu)
    25: 
    26: 	CHANGES:
    27: 	MAB 05 MAR 99 - changed overlay support to use artwork functions
    28: 
    29: ***************************************************************************/
    30: 
    31: #include "driver.h" 
    32: #include "artwork.h" 
    33: #include "vidhrdw/generic.h" 
    34: 
    35: extern WRITE_HANDLER( sbrkout_serve_led_w );
    36: extern WRITE_HANDLER( sbrkout_start_1_led_w );
    37: extern WRITE_HANDLER( sbrkout_start_2_led_w );
    38: extern READ_HANDLER( sbrkout_read_DIPs_r );
    39: extern INTERRUPT_GEN( sbrkout_interrupt );
    40: extern READ_HANDLER( sbrkout_select1_r );
    41: extern READ_HANDLER( sbrkout_select2_r );
    42: 
    43: extern UINT8 *sbrkout_horiz_ram;
    44: extern UINT8 *sbrkout_vert_ram;
    45: 
    46: extern WRITE_HANDLER( sbrkout_videoram_w );
    47: 
    48: extern VIDEO_START( sbrkout );
    49: extern VIDEO_UPDATE( sbrkout );
    50: 
    51: 
    52: /*************************************
    53:  *
    54:  *	Video overlay
    55:  *
    56:  *************************************/
    57: 
    58: OVERLAY_START( sbrkout_overlay )
    59: 	OVERLAY_RECT( 208,   8, 248, 218, MAKE_ARGB(0x04,0x20,0x20,0xff) )
    60: 	OVERLAY_RECT( 176,   8, 208, 218, MAKE_ARGB(0x04,0xff,0x80,0x10) )
    61: 	OVERLAY_RECT( 144,   8, 176, 218, MAKE_ARGB(0x04,0x20,0xff,0x20) )
    62: 	OVERLAY_RECT(  96,   8, 144, 218, MAKE_ARGB(0x04,0xff,0xff,0x20) )
    63: 	OVERLAY_RECT(  16,   8,  24, 218, MAKE_ARGB(0x04,0x20,0x20,0xff) )
    64: OVERLAY_END
    65: 
    66: 
    67: 
    68: /*************************************
    69:  *
    70:  *	Temporary sound hardware
    71:  *
    72:  *************************************/
    73: 
    74: #define TIME_4V 4.075/4 
    75: 
    76: static UINT8 *sbrkout_sound;
    77: 
    78: static WRITE_HANDLER( sbrkout_dac_w )
    79: {
    80: 	sbrkout_sound[offset]=data;
    81: }
    82: 
    83: 
    84: static void sbrkout_tones_4V(int foo)
    85: {
    86: 	static int vlines=0;
    87: 
    88: 	if ((*sbrkout_sound) & vlines)
    89: 		DAC_data_w(0,255);
    90: 	else
    91: 		DAC_data_w(0,0);
    92: 
    93: 	vlines = (vlines+1) % 16;
    94: }
    95: 
    96: 
    97: static MACHINE_INIT( sbrkout )
    98: {
    99: 	timer_pulse(TIME_IN_MSEC(TIME_4V), 0, sbrkout_tones_4V);
   100: }
   101: 
   102: 
   103: /*************************************
   104:  *
   105:  *	Palette generation
   106:  *
   107:  *************************************/
   108: 
   109: static PALETTE_INIT( sbrkout )
   110: {
   111: 	palette_set_color(0,0x00,0x00,0x00);
   112: 	palette_set_color(1,0xff,0xff,0xff);
   113: }
   114: 
   115: 
   116: 
   117: /*************************************
   118:  *
   119:  *	Main CPU memory handlers
   120:  *
   121:  *************************************/
   122: 
   123: static MEMORY_READ_START( readmem )
   124: 	{ 0x001f, 0x001f, input_port_6_r }, /* paddle value */
   125: 	{ 0x0000, 0x00ff, MRA_RAM }, /* Zero Page RAM */
   126: 	{ 0x0100, 0x01ff, MRA_RAM }, /* ??? */
   127: 	{ 0x0400, 0x077f, MRA_RAM }, /* Video Display RAM */
   128: 	{ 0x0828, 0x0828, sbrkout_select1_r }, /* Select 1 */
   129: 	{ 0x082f, 0x082f, sbrkout_select2_r }, /* Select 2 */
   130: 	{ 0x082e, 0x082e, input_port_5_r }, /* Serve Switch */
   131: 	{ 0x0830, 0x0833, sbrkout_read_DIPs_r }, /* DIP Switches */
   132: 	{ 0x0840, 0x0840, input_port_1_r }, /* Coin Switches */
   133: 	{ 0x0880, 0x0880, input_port_2_r }, /* Start Switches */
   134: 	{ 0x08c0, 0x08c0, input_port_3_r }, /* Self Test Switch */
   135: 	{ 0x0c00, 0x0c00, input_port_4_r }, /* Vertical Sync Counter */
   136: 	{ 0x2c00, 0x3fff, MRA_ROM }, /* PROGRAM */
   137: 	{ 0xfff0, 0xffff, MRA_ROM }, /* PROM8 for 6502 vectors */
   138: MEMORY_END
   139: 
   140: 
   141: static MEMORY_WRITE_START( writemem )
   142: 	{ 0x0011, 0x0011, sbrkout_dac_w, &sbrkout_sound }, /* Noise Generation Bits */
   143: 	{ 0x0010, 0x0014, MWA_RAM, &sbrkout_horiz_ram }, /* Horizontal Ball Position */
   144: 	{ 0x0018, 0x001d, MWA_RAM, &sbrkout_vert_ram }, /* Vertical Ball Position / ball picture */
   145: 	{ 0x0000, 0x00ff, MWA_RAM }, /* WRAM */
   146: 	{ 0x0100, 0x01ff, MWA_RAM }, /* ??? */
   147: 	{ 0x0400, 0x07ff, sbrkout_videoram_w, &videoram }, /* DISPLAY */
   148: 	{ 0x0c10, 0x0c11, sbrkout_serve_led_w }, /* Serve LED */
   149: 	{ 0x0c30, 0x0c31, sbrkout_start_1_led_w }, /* 1 Player Start Light */
   150: 	{ 0x0c40, 0x0c41, sbrkout_start_2_led_w }, /* 2 Player Start Light */
   151: 	{ 0x0c50, 0x0c51, MWA_RAM }, /* NMI Pot Reading Enable */
   152: 	{ 0x0c70, 0x0c71, MWA_RAM }, /* Coin Counter */
   153: 	{ 0x0c80, 0x0c80, MWA_NOP }, /* Watchdog */
   154: 	{ 0x0e00, 0x0e00, MWA_NOP }, /* IRQ Enable? */
   155: 	{ 0x1000, 0x1000, MWA_RAM }, /* LSB of Pot Reading */
   156: 	{ 0x2c00, 0x3fff, MWA_ROM }, /* PROM1-PROM8 */
   157: MEMORY_END
   158: 
   159: 
   160: 
   161: /*************************************
   162:  *
   163:  *	Port definitions
   164:  *
   165:  *************************************/
   166: 
   167: INPUT_PORTS_START( sbrkout )
   168: 	PORT_START		/* DSW - fake port, gets mapped to Super Breakout ports */
   169: 	PORT_DIPNAME( 0x03, 0x00, "Language" )
   170: 	PORT_DIPSETTING(	0x00, "English" )
   171: 	PORT_DIPSETTING(	0x01, "German" )
   172: 	PORT_DIPSETTING(	0x02, "French" )
   173: 	PORT_DIPSETTING(	0x03, "Spanish" )
   174: 	PORT_DIPNAME( 0x0C, 0x08, DEF_STR( Coinage ) )
   175: 	PORT_DIPSETTING(	0x0C, DEF_STR( 2C_1C ) )
   176: 	PORT_DIPSETTING(	0x08, DEF_STR( 1C_1C ) )
   177: 	PORT_DIPSETTING(	0x04, DEF_STR( 1C_2C ) )
   178: 	PORT_DIPSETTING(	0x00, DEF_STR( Free_Play ) )
   179: 	PORT_DIPNAME( 0x70, 0x00, "Extended Play" ) /* P=Progressive, C=Cavity, D=Double */
   180: 	PORT_DIPSETTING(	0x10, "200P/200C/200D" )
   181: 	PORT_DIPSETTING(	0x20, "400P/300C/400D" )
   182: 	PORT_DIPSETTING(	0x30, "600P/400C/600D" )
   183: 	PORT_DIPSETTING(	0x40, "900P/700C/800D" )
   184: 	PORT_DIPSETTING(	0x50, "1200P/900C/1000D" )
   185: 	PORT_DIPSETTING(	0x60, "1600P/1100C/1200D" )
   186: 	PORT_DIPSETTING(	0x70, "2000P/1400C/1500D" )
   187: 	PORT_DIPSETTING(	0x00, "None" )
   188: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Lives ) )
   189: 	PORT_DIPSETTING(	0x80, "3" )
   190: 	PORT_DIPSETTING(	0x00, "5" )
   191: 
   192: 	PORT_START		/* IN0 */
   193: 	PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 )
   194: 	PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 )
   195: 
   196: 	PORT_START		/* IN1 */
   197: 	PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_START1 )
   198: 	PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_START2 )
   199: 
   200: 	PORT_START		/* IN2 */
   201: 	PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_TILT )
   202: 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
   203: 
   204: 	PORT_START		/* IN3 */
   205: 	PORT_BIT ( 0xFF, IP_ACTIVE_LOW, IPT_VBLANK )
   206: 
   207: 	PORT_START		/* IN4 */
   208: 	PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 )
   209: 
   210: 	PORT_START		/* IN5 */
   211: 	PORT_ANALOG( 0xff, 0x00, IPT_PADDLE | IPF_REVERSE, 50, 10, 0, 255 )
   212: 
   213: 	PORT_START		/* IN6 - fake port, used to set the game select dial */
   214: 	PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_BUTTON2, "Progressive", KEYCODE_E, IP_JOY_DEFAULT )
   215: 	PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_BUTTON3, "Double",      KEYCODE_D, IP_JOY_DEFAULT )
   216: 	PORT_BITX(0x04, IP_ACTIVE_HIGH, IPT_BUTTON4, "Cavity",      KEYCODE_C, IP_JOY_DEFAULT )
   217: INPUT_PORTS_END
   218: 
   219: 
   220: 
   221: /*************************************
   222:  *
   223:  *	Graphics definitions
   224:  *
   225:  *************************************/
   226: 
   227: static struct GfxLayout charlayout =
   228: {
   229: 	8,8,
   230: 	64,
   231: 	1,
   232: 	{ 0 },
   233: 	{ 4, 5, 6, 7, 0x200*8 + 4, 0x200*8 + 5, 0x200*8 + 6, 0x200*8 + 7 },
   234: 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
   235: 	8*8
   236: };
   237: 
   238: 
   239: static struct GfxLayout balllayout =
   240: {
   241: 	3,3,
   242: 	2,
   243: 	1,
   244: 	{ 0 },
   245: 	{ 0, 1, 2 },
   246: 	{ 0*8, 1*8, 2*8 },
   247: 	3*8
   248: };
   249: 
   250: 
   251: static struct GfxDecodeInfo gfxdecodeinfo[] =
   252: {
   253: 	{ REGION_GFX1, 0, &charlayout, 0, 1 },
   254: 	{ REGION_GFX2, 0, &balllayout, 0, 1 },
   255: 	{ -1 } /* end of array */
   256: };
   257: 
   258: 
   259: 
   260: /*************************************
   261:  *
   262:  *	Sound interfaces
   263:  *
   264:  *************************************/
   265: 
   266: static struct DACinterface dac_interface =
   267: {
   268: 	1,
   269: 	{ 100 }
   270: };
   271: 
   272: 
   273: 
   274: /*************************************
   275:  *
   276:  *	Machine driver
   277:  *
   278:  *************************************/
   279: 
   280: static MACHINE_DRIVER_START( sbrkout )
   281: 
   282: 	/* basic machine hardware */
   283: 	MDRV_CPU_ADD(M6502,375000) 	   /* 375 KHz? Should be 750KHz? */
   284: 	MDRV_CPU_MEMORY(readmem,writemem)
   285: 	MDRV_CPU_VBLANK_INT(sbrkout_interrupt,1)
   286: 
   287: 	MDRV_FRAMES_PER_SECOND(60)
   288: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
   289: 
   290: 	MDRV_MACHINE_INIT(sbrkout)
   291: 
   292: 	/* video hardware */
   293: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
   294: 	MDRV_SCREEN_SIZE(32*8, 28*8)
   295: 	MDRV_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
   296: 	MDRV_GFXDECODE(gfxdecodeinfo)
   297: 	MDRV_PALETTE_LENGTH(2)
   298: 
   299: 	MDRV_PALETTE_INIT(sbrkout)
   300: 	MDRV_VIDEO_START(sbrkout)
   301: 	MDRV_VIDEO_UPDATE(sbrkout)
   302: 
   303: 	/* sound hardware */
   304: 	MDRV_SOUND_ADD(DAC, dac_interface)
   305: MACHINE_DRIVER_END
   306: 
   307: 
   308: 
   309: /*************************************
   310:  *
   311:  *	ROM definitions
   312:  *
   313:  *************************************/
   314: 
   315: ROM_START( sbrkout )
   316: 	ROM_REGION( 0x10000, REGION_CPU1, 0 ) /* 64k for code */
   317: 	ROM_LOAD( "033453.c1",    0x2800, 0x0800, CRC(a35d00e3) SHA1(53617ed1d362e82d6f45abd66056bffe23300e3b) )
   318: 	ROM_LOAD( "033454.d1",    0x3000, 0x0800, CRC(d42ea79a) SHA1(66c9b29226cde36d1ac6d1e81f34ebb5c79eded4) )
   319: 	ROM_LOAD( "033455.e1",    0x3800, 0x0800, CRC(e0a6871c) SHA1(1bdfa73d7b8d91e1c68b7847fc310cac314ee02d) )
   320: 	ROM_RELOAD(               0xf800, 0x0800 )
   321: 
   322: 	ROM_REGION( 0x0400, REGION_GFX1, ROMREGION_DISPOSE )
   323: 	ROM_LOAD( "033280.p4",    0x0000, 0x0200, CRC(5a69ce85) SHA1(ad9078d12495c350738bdb0b1e1b6120d9e01f60) )
   324: 	ROM_LOAD( "033281.r4",    0x0200, 0x0200, CRC(066bd624) SHA1(cfb86c7013a70b8375126b23a4e66df5f3b9186b) )
   325: 
   326: 	ROM_REGION( 0x0020, REGION_GFX2, ROMREGION_DISPOSE )
   327: 	ROM_LOAD( "033282.k6",    0x0000, 0x0020, CRC(6228736b) SHA1(bc176261dba11521df19d545ce604f8cc294287a) )
   328: 
   329: 	ROM_REGION( 0x0120, REGION_PROMS, 0 )
   330: 	ROM_LOAD( "006400.m2",    0x0000, 0x0100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) )	/* sync (not used) */
   331: 	ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )	/* unknown */
   332: ROM_END
   333: 
   334: 
   335: 
   336: /*************************************
   337:  *
   338:  *	Driver initialization
   339:  *
   340:  *************************************/
   341: 
   342: static DRIVER_INIT( sbrkout )
   343: {
   344: 	artwork_set_overlay(sbrkout_overlay);
   345: }
   346: 
   347: 
   348: 
   349: /*************************************
   350:  *
   351:  *	Game drivers
   352:  *
   353:  *************************************/
   354: 
   355: GAME( 1978, sbrkout, 0, sbrkout, sbrkout, sbrkout, ROT270, "Atari", "Super Breakout" )
   356: 




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