Previous 15994 Revisions Next

r1890 Monday 10th March, 2008 at 15:05:00 UTC by Dirk Best
[ASTROCDE] Simplified cartridge loading, various cleanups
[src/mess/drivers]astrocde.c
[src/mess/includes]astrocde.h
[src/mess/machine]astrocde.c

src/mess/includes/astrocde.h
r1889r1890
1010
1111/*----------- defined in machine/astrocde.c -----------*/
1212
13DEVICE_LOAD(astrocade_rom);
14
1513extern WRITE8_HANDLER( astrocade_interrupt_enable_w );
1614extern WRITE8_HANDLER( astrocade_interrupt_w );
1715extern INTERRUPT_GEN( astrocade_interrupt );
src/mess/machine/astrocde.c
r1889r1890
3030static int lightpen_interrupts_enabled;
3131static int lightpen_interrupt_mode;
3232
33DEVICE_LOAD(astrocade_rom)
34{
35   int size = 0;
3633
37    /* load a cartidge  */
38   size = image_fread(image, memory_region(REGION_CPU1) + 0x2000, 0x8000);
39   return 0;
40}
41
4234WRITE8_HANDLER ( astrocade_interrupt_enable_w )
4335{
4436
src/mess/drivers/astrocde.c
r1889r1890
5050   astrocade_sound1_w(machine, offset + 0x18, data);
5151}
5252
53
54
55/*************************************
56 *
57 *  Memory maps
58 *
59 *************************************/
60
5361static ADDRESS_MAP_START( astrocade_mem, ADDRESS_SPACE_PROGRAM, 8 )
5462   AM_RANGE(0x0000, 0x0fff) AM_READWRITE(MRA8_ROM, astrocade_magicram_w)
5563   AM_RANGE(0x1000, 0x3fff) AM_ROM /* Star Fortress writes in here?? */
5664   AM_RANGE(0x4000, 0x4fff) AM_READWRITE(MRA8_RAM, astrocade_videoram_w) AM_BASE(&astrocade_videoram) AM_SIZE(&videoram_size) /* ASG */
5765ADDRESS_MAP_END
5866
67
5968static ADDRESS_MAP_START( astrocade_io, ADDRESS_SPACE_IO, 8 )
6069   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
6170   AM_RANGE(0x00, 0x07) AM_WRITE(astrocade_colour_register_w)
r1889r1890
8594   AM_RANGE(0x18, 0xff) AM_WRITE(astrocade_soundblock1_w)
8695ADDRESS_MAP_END
8796
97
98
99/*************************************
100 *
101 *  Input ports
102 *
103 *
104 *  The Astrocade has ports for four hand controllers.  Each controller has a
105 *  knob on top that can be simultaneously pushed as an eight-way joystick and
106 *  twisted as a paddle, in addition to a trigger button.  The knob can twist
107 *  through about 270 degrees, registering 256 unique positions.  It does not
108 *  autocenter.  When selecting options on the menu, twisting the knob to the
109 *  right gives lower numbers, and twisting to the left gives larger numbers.
110 *  Paddle games like Clowns have more intuitive behavior -- twisting to the
111 *  right moves the character right.
112 *
113 *  There is a 24-key keypad on the system itself (6 rows, 4 columns).  It is
114 *  labeled for the built-in calculator, but overlays were released for other
115 *  programs, the most popular being the BASIC cartridges, which allowed a
116 *  large number of inputs by making the bottom row shift buttons.  The labels
117 *  below first list the calculator key, then the BASIC keys in the order of no
118 *  shift, GREEN shift, RED shift, BLUE shift, WORDS shift.
119 *
120 *************************************/
121
88122static INPUT_PORTS_START( astrocde )
89123   PORT_START_TAG("P1_HANDLE")
90124    PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY
r1889r1890
181215
182216
183217
218/*************************************
219 *
220 *  Machine drivers
221 *
222 *************************************/
223
184224static MACHINE_DRIVER_START( astrocde )
185225   /* basic machine hardware */
186226   MDRV_CPU_ADD(Z80, 1789000)        /* 1.789 Mhz */
r1889r1890
209249MACHINE_DRIVER_END
210250
211251
252
253/*************************************
254 *
255 *  ROM definitions
256 *
257 *************************************/
258
212259ROM_START( astrocde )
213260    ROM_REGION( 0x10000, REGION_CPU1, 0 )
214261    ROM_LOAD( "astro.bin",  0x0000, 0x2000, CRC(ebc77f3a) SHA1(b902c941997c9d150a560435bf517c6a28137ecc))
262    ROM_CART_LOAD(0, "bin", 0x2000, 0x8000, ROM_OPTIONAL)
215263ROM_END
216264
217265ROM_START( astrocdw )
218266    ROM_REGION( 0x10000, REGION_CPU1, 0 )
219267    ROM_LOAD( "bioswhit.bin",  0x0000, 0x2000, CRC(6eb53e79) SHA1(d84341feec1a0a0e8aa6151b649bc3cf6ef69fbf))
268    ROM_CART_LOAD(0, "bin", 0x2000, 0x8000, ROM_OPTIONAL)
220269ROM_END
221270
222static void astrocde_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
223{
224   /* cartslot */
225   switch(state)
226   {
227      /* --- the following bits of info are returned as 64-bit signed integers --- */
228      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
229271
230      /* --- the following bits of info are returned as pointers to data or functions --- */
231      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_astrocade_rom; break;
232272
233      /* --- the following bits of info are returned as NULL-terminated strings --- */
234      case MESS_DEVINFO_STR_FILE_EXTENSIONS:            strcpy(info->s = device_temp_str(), "bin"); break;
273/*************************************
274 *
275 *  System configs
276 *
277 *************************************/
235278
236      default:                              cartslot_device_getinfo(devclass, state, info); break;
237   }
238}
239
240279SYSTEM_CONFIG_START(astrocde)
241   CONFIG_DEVICE(astrocde_cartslot_getinfo)
280   CONFIG_DEVICE(cartslot_device_getinfo)
242281SYSTEM_CONFIG_END
243282
244/***************************************************************************
245283
246  Game driver(s)
247284
248***************************************************************************/
285/*************************************
286 *
287 *  Driver definitions
288 *
289 *************************************/
249290
250/*    YEAR  NAME      PARENT    COMPAT    MACHINE   INPUT     INIT  CONFIG      COMPANY         FULLNAME */
251CONS( 1978, astrocde, 0,   0,     astrocde, astrocde, 0,   astrocde,   "Bally Manufacturing", "Bally Professional Arcade", 0)
252CONS( 1977, astrocdw, astrocde, 0, astrocde, astrocde, 0,        astrocde,       "Bally Manufacturing", "Bally Computer System", 0)
291/*    YEAR  NAME      PARENT    COMPAT    MACHINE   INPUT     INIT  CONFIG    COMPANY                FULLNAME                     FLAGS */
292CONS( 1978, astrocde, 0,        0,        astrocde, astrocde, 0,    astrocde, "Bally Manufacturing", "Bally Professional Arcade", 0)
293CONS( 1977, astrocdw, astrocde, 0,        astrocde, astrocde, 0,    astrocde, "Bally Manufacturing", "Bally Computer System",     0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team