Previous 199869 Revisions Next

r18576 Wednesday 17th October, 2012 at 15:47:58 UTC by hap
moved harem to scramble.c
[src/mame/drivers]galaxold.c scramble.c
[src/mame/includes]galaxold.h scramble.h
[src/mame/machine]scramble.c

trunk/src/mame/drivers/galaxold.c
r18575r18576
762762ADDRESS_MAP_END
763763
764764
765WRITE8_MEMBER(galaxold_state::harem_nmi_mask_w)
766{
767
768   m_nmi_mask = data & 1;
769}
770
771static ADDRESS_MAP_START( harem_cpu1, AS_PROGRAM, 8, galaxold_state )
772   AM_RANGE(0x0000, 0x1fff) AM_ROM
773   AM_RANGE(0x2000, 0x27ff) AM_RAM
774   AM_RANGE(0x4000, 0x47ff) AM_RAM
775   AM_RANGE(0x4800, 0x4fff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_SHARE("videoram")
776   AM_RANGE(0x5000, 0x5000) AM_WRITENOP
777   AM_RANGE(0x5800, 0x5800) AM_READNOP AM_WRITE(harem_nmi_mask_w) // or is nmi mask 5801 like other games?
778   AM_RANGE(0x5801, 0x5807) AM_WRITENOP
779   AM_RANGE(0x6101, 0x6101) AM_READ_PORT("IN0")
780   AM_RANGE(0x6102, 0x6102) AM_READ_PORT("IN1")
781   AM_RANGE(0x6103, 0x6103) AM_WRITENOP // 6100-6103 should be a 8255 ppi
782   AM_RANGE(0x6200, 0x6203) AM_WRITENOP AM_SHARE("attributesram") // 6200-6203 a 2nd 8255 chip
783   AM_RANGE(0x8000, 0x9fff) AM_ROM
784   AM_RANGE(0xffe6, 0xffff) AM_RAM AM_SHARE("spriteram")
785ADDRESS_MAP_END
786
787static ADDRESS_MAP_START( harem_cpu2, AS_PROGRAM, 8, galaxold_state )
788   AM_RANGE(0x0000, 0x2fff) AM_ROM
789   AM_RANGE(0x8000, 0x83ff) AM_RAM
790   AM_RANGE(0xa000, 0xa000) AM_WRITENOP
791ADDRESS_MAP_END
792
793static ADDRESS_MAP_START( harem_cpu2_io, AS_IO, 8, galaxold_state )
794   ADDRESS_MAP_GLOBAL_MASK(0xff)
795   AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w)
796   AM_RANGE(0x08, 0x08) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w)
797   AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w)
798   AM_RANGE(0x20, 0x20) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w)
799   AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("ay3", ay8910_address_w)
800   AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("ay3", ay8910_data_w)
801   AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r)
802ADDRESS_MAP_END
803
804765static ADDRESS_MAP_START( hunchbkg, AS_PROGRAM, 8, galaxold_state )
805766   AM_RANGE(0x0000, 0x0fff) AM_ROM
806767   AM_RANGE(0x1480, 0x14bf) AM_MIRROR(0x6000) AM_RAM_WRITE(galaxold_attributesram_w) AM_SHARE("attributesram")
r18575r18576
17271688INPUT_PORTS_END
17281689
17291690
1730static INPUT_PORTS_START( harem )
1731   PORT_START("IN0")//Change tag when major usage uncovered.
1732   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1733   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1734   PORT_DIPSETTING(   0x01, DEF_STR( On ) )
1735   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1736   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1737   PORT_DIPSETTING(   0x02, DEF_STR( On ) )
1738   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1739   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1740   PORT_DIPSETTING(   0x04, DEF_STR( On ) )
1741   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1742   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1743   PORT_DIPSETTING(   0x08, DEF_STR( On ) )
1744   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1745   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1746   PORT_DIPSETTING(   0x10, DEF_STR( On ) )
1747   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1748   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1749   PORT_DIPSETTING(   0x20, DEF_STR( On ) )
1750   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1751   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1752   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
1753   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1754   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1755   PORT_DIPSETTING(   0x80, DEF_STR( On ) )
1756
1757   PORT_START("IN1")
1758   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1759   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1760   PORT_DIPSETTING(   0x01, DEF_STR( On ) )
1761   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1762   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1763   PORT_DIPSETTING(   0x02, DEF_STR( On ) )
1764   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1765   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1766   PORT_DIPSETTING(   0x04, DEF_STR( On ) )
1767   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1768   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1769   PORT_DIPSETTING(   0x08, DEF_STR( On ) )
1770   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1771   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1772   PORT_DIPSETTING(   0x10, DEF_STR( On ) )
1773   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1774   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1775   PORT_DIPSETTING(   0x20, DEF_STR( On ) )
1776   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1777   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1778   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
1779   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1780   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1781   PORT_DIPSETTING(   0x80, DEF_STR( On ) )
1782INPUT_PORTS_END
1783
1784
17851691static INPUT_PORTS_START( hunchbkg )
17861692   PORT_START("IN0")
17871693   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
r18575r18576
23842290   MCFG_FRAGMENT_ADD(galaxian_audio)
23852291MACHINE_CONFIG_END
23862292
2387INTERRUPT_GEN_MEMBER(galaxold_state::vblank_irq)
2388{
2389
2390   if(m_nmi_mask)
2391      device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
2392}
2393
2394static MACHINE_CONFIG_DERIVED( harem, galaxold_base )
2395
2396   /* basic machine hardware */
2397   MCFG_CPU_MODIFY("maincpu")
2398   MCFG_CPU_PROGRAM_MAP(harem_cpu1)
2399   MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxold_state,  vblank_irq)
2400
2401   MCFG_CPU_ADD("audiocpu", Z80, 1620000) //?
2402   MCFG_CPU_PROGRAM_MAP(harem_cpu2)
2403   MCFG_CPU_IO_MAP(harem_cpu2_io)
2404
2405   MCFG_MACHINE_RESET(0)
2406
2407   MCFG_PALETTE_INIT_OVERRIDE(galaxold_state,rockclim)
2408   MCFG_PALETTE_LENGTH(32)
2409
2410   MCFG_VIDEO_START_OVERRIDE(galaxold_state,galaxold_plain)
2411
2412   MCFG_SOUND_ADD("ay1", AY8910, 2000000) //?
2413   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33/3)
2414
2415   MCFG_SOUND_ADD("ay2", AY8910, 2000000) //?
2416   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33/3)
2417
2418   MCFG_SOUND_ADD("ay3", AY8910, 2000000) //?
2419   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33/3)
2420MACHINE_CONFIG_END
2421
24222293static MACHINE_CONFIG_DERIVED( tazzmang, galaxian )
24232294
24242295   /* basic machine hardware */
r18575r18576
29522823   ROM_LOAD( "k.bin",     0x0000, 0x0020, CRC(d46ed869) SHA1(9c0a11df11b1a24ee933d1aa435337b78c3ca643) )
29532824ROM_END
29542825
2955ROM_START( harem )
2956   ROM_REGION( 0x10000, "maincpu", 0 )
2957   ROM_LOAD( "p0_ic85.bin",  0x0000, 0x2000, CRC(4521b753) SHA1(9033f9c3be8fec1e5ff251e9f60faaf3848a1a1e) )
2958   ROM_LOAD( "p1_ic87.bin",  0x8000, 0x2000, BAD_DUMP CRC(3cc5d1e8) SHA1(827e2d20de2a00ec016ead249ed3afdccd0c856c) ) // encrypted?
2959   // looks like a bitswap on data, call addresses from $0000-$1fff to here tell that $99 is near certainly $c9(ret)
2960   // Other values with a pretty good chance: $40 is $10(djnz), $dd is $dd(ix prefix)
2961
2962   ROM_REGION( 0x10000, "audiocpu", 0 )
2963   ROM_LOAD( "s1_ic12.bin",  0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) )
2964   ROM_LOAD( "s2_ic13.bin",  0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) )
2965
2966   ROM_REGION( 0x2000, "unknown", 0 ) /* TMS-based ROM? */
2967   ROM_LOAD( "a1_ic25.bin",  0x0000, 0x2000, CRC(279f923a) SHA1(166b1b625997766f0de7cc18af52c42268022fcb) )
2968
2969   ROM_REGION( 0x4000, "gfx1", 0 )
2970   ROM_LOAD( "m0_ic36.bin",  0x0000, 0x2000, CRC(64b3c6d6) SHA1(e71092585f7ffdae85b2a4c9add1bc71e5a608a8) )
2971   ROM_LOAD( "m1_ic37.bin",  0x2000, 0x2000, CRC(cb0324fb) SHA1(61612f683810339d5d5f31daa4c475d0338d446f) )
2972
2973   ROM_REGION( 0x0020, "proms", 0 )
2974   ROM_LOAD( "harem.clr",    0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) )
2975ROM_END
2976
29772826ROM_START( hunchbkg )
29782827   ROM_REGION( 0x8000, "maincpu", 0 )
29792828   ROM_LOAD( "gal_hb_1",     0x0000, 0x0800, CRC(46590e9b) SHA1(5d26578c91adec20d8d8a17d5dade9ef2febcbe5) )
r18575r18576
32303079GAME( 1983, ozon1,    0,        ozon1,    ozon1, driver_device,    0,         ROT90,  "Proma", "Ozon I", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
32313080GAME( 1983, ladybugg, ladybug,  batman2,  ladybugg, galaxold_state, ladybugg, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
32323081GAME( 1982, vstars,   0,        mooncrst, porter, driver_device,   0,        ROT90,  "Competitive Video?", "Video Stars", GAME_NOT_WORKING )
3233GAME( 1983, harem,    0,        harem,    harem, driver_device,    0,        ROT90,  "I.G.R.", "Harem", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
32343082
32353083/* S2650 games */
32363084GAME( 1983, hunchbkg, hunchbak,   hunchbkg, hunchbkg, driver_device, 0,        ROT90,  "Century Electronics", "Hunchback (Galaxian hardware)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/scramble.c
r18575r18576
5858   AM_RANGE(0x8200, 0x8203) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
5959ADDRESS_MAP_END
6060
61READ8_MEMBER(scramble_state::scramble_soundram_r)
62{
63   return m_soundram[offset & 0x03ff];
64}
6165
66WRITE8_MEMBER(scramble_state::scramble_soundram_w)
67{
68   m_soundram[offset & 0x03ff] = data;
69}
70
71static ADDRESS_MAP_START( scramble_sound_map, AS_PROGRAM, 8, scramble_state )
72   AM_RANGE(0x0000, 0x2fff) AM_ROM
73   AM_RANGE(0x8000, 0x8fff) AM_READWRITE(scramble_soundram_r, scramble_soundram_w)
74   AM_RANGE(0x8000, 0x83ff) AM_WRITENOP AM_SHARE("soundram")  /* only here to initialize pointer */
75   AM_RANGE(0x9000, 0x9fff) AM_WRITE(scramble_filter_w)
76ADDRESS_MAP_END
77
78static ADDRESS_MAP_START( scramble_sound_io_map, AS_IO, 8, scramble_state )
79   ADDRESS_MAP_GLOBAL_MASK(0xff)
80   AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w)
81   AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("8910.1", ay8910_r, ay8910_data_w)
82   AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_w)
83   AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("8910.2", ay8910_r, ay8910_data_w)
84ADDRESS_MAP_END
85
86
87
6288static ADDRESS_MAP_START( turpins_map, AS_PROGRAM, 8, scramble_state )
6389   AM_RANGE(0x0000, 0x5fff) AM_ROM
6490   AM_RANGE(0x8000, 0x87ff) AM_RAM
r18575r18576
89115   AM_RANGE(0xf000, 0xffff) AM_READONLY
90116ADDRESS_MAP_END
91117
118
119
92120static ADDRESS_MAP_START( ckongs_map, AS_PROGRAM, 8, scramble_state )
93121   AM_RANGE(0x0000, 0x5fff) AM_ROM
94122   AM_RANGE(0x6000, 0x6bff) AM_RAM
r18575r18576
107135ADDRESS_MAP_END
108136
109137
138
110139READ8_MEMBER(scramble_state::mars_ppi8255_0_r)
111140{
112141   return m_ppi8255_0->read(space, ((offset >> 2) & 0x02) | ((offset >> 1) & 0x01));
r18575r18576
149178ADDRESS_MAP_END
150179
151180
181
152182static ADDRESS_MAP_START( newsin7_map, AS_PROGRAM, 8, scramble_state )
153183   AM_RANGE(0x0000, 0x3fff) AM_ROM
154184   AM_RANGE(0x4000, 0x47ff) AM_RAM
r18575r18576
171201ADDRESS_MAP_END
172202
173203
204
174205static ADDRESS_MAP_START( mrkougar_map, AS_PROGRAM, 8, scramble_state )
175206   AM_RANGE(0x0000, 0x3fff) AM_ROM
176207   AM_RANGE(0x4000, 0x47ff) AM_RAM
r18575r18576
191222ADDRESS_MAP_END
192223
193224
225
194226static ADDRESS_MAP_START( hotshock_map, AS_PROGRAM, 8, scramble_state )
195227   AM_RANGE(0x0000, 0x3fff) AM_ROM
196228   AM_RANGE(0x4000, 0x47ff) AM_RAM
r18575r18576
215247ADDRESS_MAP_END
216248
217249
250
218251static ADDRESS_MAP_START( hunchbks_map, AS_PROGRAM, 8, scramble_state )
219252   AM_RANGE(0x0000, 0x0fff) AM_ROM
220253   AM_RANGE(0x1210, 0x1213) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
r18575r18576
238271ADDRESS_MAP_END
239272
240273
274
241275static ADDRESS_MAP_START( mimonscr_map, AS_PROGRAM, 8, scramble_state )
242276   AM_RANGE(0x0000, 0x3fff) AM_ROM
243277   AM_RANGE(0x4000, 0x43ff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w)   /* mirror address?, probably not */
r18575r18576
258292ADDRESS_MAP_END
259293
260294
295
261296static ADDRESS_MAP_START( ad2083_map, AS_PROGRAM, 8, scramble_state )
262297   AM_RANGE(0x0000, 0x3fff) AM_ROM
263298   AM_RANGE(0x4000, 0x47ff) AM_RAM
r18575r18576
285320ADDRESS_MAP_END
286321
287322
323
288324static ADDRESS_MAP_START( triplep_map, AS_PROGRAM, 8, scramble_state )
289325   AM_RANGE(0x0000, 0x3fff) AM_ROM
290326   AM_RANGE(0x4000, 0x47ff) AM_RAM
r18575r18576
303339   AM_RANGE(0x8100, 0x8103) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
304340ADDRESS_MAP_END
305341
306
307342static ADDRESS_MAP_START( triplep_io_map, AS_IO, 8, scramble_state )
308343   ADDRESS_MAP_GLOBAL_MASK(0xff)
309344   AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("8910.1", ay8910_data_address_w)
r18575r18576
320355   AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_w)
321356ADDRESS_MAP_END
322357
358
359
323360READ8_MEMBER(scramble_state::hncholms_prot_r)
324361{
325362   if(space.device().safe_pc() == 0x2b || space.device().safe_pc() == 0xa27)
r18575r18576
333370    AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE")
334371ADDRESS_MAP_END
335372
373
374
375static ADDRESS_MAP_START( harem_map, AS_PROGRAM, 8, scramble_state )
376   AM_RANGE(0x0000, 0x1fff) AM_ROM
377   AM_RANGE(0x2000, 0x27ff) AM_RAM
378   AM_RANGE(0x4000, 0x47ff) AM_RAM
379   AM_RANGE(0x4800, 0x4fff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_SHARE("videoram")
380   AM_RANGE(0x5000, 0x5000) AM_WRITENOP
381   AM_RANGE(0x5800, 0x5800) AM_READ(watchdog_reset_r) AM_WRITE(galaxold_nmi_enable_w) // or is nmi mask 5801 like other games?
382   AM_RANGE(0x5801, 0x5807) AM_WRITENOP
383   AM_RANGE(0x6100, 0x6103) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
384   AM_RANGE(0x6200, 0x6203) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
385   AM_RANGE(0x8000, 0x9fff) AM_ROM
386
387   // placeholders
388   AM_RANGE(0xff00, 0xff3f) AM_RAM_WRITE(galaxold_attributesram_w) AM_SHARE("attributesram")
389   AM_RANGE(0xff40, 0xff5f) AM_RAM AM_SHARE("spriteram")
390   AM_RANGE(0xff60, 0xff7f) AM_RAM AM_SHARE("bulletsram")
391ADDRESS_MAP_END
392
393static ADDRESS_MAP_START( harem_sound_map, AS_PROGRAM, 8, scramble_state )
394   AM_RANGE(0x0000, 0x2fff) AM_ROM
395   AM_RANGE(0x8000, 0x83ff) AM_RAM
396   AM_RANGE(0xa000, 0xa000) AM_WRITENOP
397ADDRESS_MAP_END
398
399static ADDRESS_MAP_START( harem_sound_io_map, AS_IO, 8, scramble_state )
400   ADDRESS_MAP_GLOBAL_MASK(0xff)
401   AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w)
402   AM_RANGE(0x08, 0x08) AM_DEVWRITE_LEGACY("8910.1", ay8910_data_w)
403   AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_w)
404   AM_RANGE(0x20, 0x20) AM_DEVWRITE_LEGACY("8910.2", ay8910_data_w)
405   AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("8910.3", ay8910_address_w)
406   AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("8910.3", ay8910_data_w)
407   AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r)
408ADDRESS_MAP_END
409
410
411
412/**************************************************************************/
413
336414static INPUT_PORTS_START( scramble )
337415   PORT_START("IN0")
338416   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
r18575r18576
507585   return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00;
508586}
509587
510
511588static INPUT_PORTS_START( ckongs )
512589   PORT_START("IN0")
513590   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
r18575r18576
10651142   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
10661143INPUT_PORTS_END
10671144
1145
1146static INPUT_PORTS_START( harem )
1147   PORT_START("IN0")
1148   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1149   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1150   PORT_DIPSETTING(   0x01, DEF_STR( On ) )
1151   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1152   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1153   PORT_DIPSETTING(   0x02, DEF_STR( On ) )
1154   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1155   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1156   PORT_DIPSETTING(   0x04, DEF_STR( On ) )
1157   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1158   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1159   PORT_DIPSETTING(   0x08, DEF_STR( On ) )
1160   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1161   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1162   PORT_DIPSETTING(   0x10, DEF_STR( On ) )
1163   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1164   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1165   PORT_DIPSETTING(   0x20, DEF_STR( On ) )
1166   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1167   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1168   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
1169   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1170   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1171   PORT_DIPSETTING(   0x80, DEF_STR( On ) )
1172
1173   PORT_START("IN1")
1174   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1175   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1176   PORT_DIPSETTING(   0x01, DEF_STR( On ) )
1177   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1178   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1179   PORT_DIPSETTING(   0x02, DEF_STR( On ) )
1180   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1181   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1182   PORT_DIPSETTING(   0x04, DEF_STR( On ) )
1183   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1184   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1185   PORT_DIPSETTING(   0x08, DEF_STR( On ) )
1186   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1187   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1188   PORT_DIPSETTING(   0x10, DEF_STR( On ) )
1189   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1190   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1191   PORT_DIPSETTING(   0x20, DEF_STR( On ) )
1192   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1193   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1194   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
1195   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1196   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1197   PORT_DIPSETTING(   0x80, DEF_STR( On ) )
1198
1199   PORT_START("IN2")
1200   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1201   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1202   PORT_DIPSETTING(   0x01, DEF_STR( On ) )
1203   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1204   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1205   PORT_DIPSETTING(   0x02, DEF_STR( On ) )
1206   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1207   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1208   PORT_DIPSETTING(   0x04, DEF_STR( On ) )
1209   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1210   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1211   PORT_DIPSETTING(   0x08, DEF_STR( On ) )
1212   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1213   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1214   PORT_DIPSETTING(   0x10, DEF_STR( On ) )
1215   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1216   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1217   PORT_DIPSETTING(   0x20, DEF_STR( On ) )
1218   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1219   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1220   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
1221   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1222   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
1223   PORT_DIPSETTING(   0x80, DEF_STR( On ) )
1224INPUT_PORTS_END
1225
1226
1227
1228/**************************************************************************/
1229
1230static const gfx_layout scramble_charlayout =
1231{
1232   8,8,
1233   RGN_FRAC(1,2),
1234   2,
1235   { RGN_FRAC(0,2), RGN_FRAC(1,2) },
1236   { 0, 1, 2, 3, 4, 5, 6, 7 },
1237   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
1238   8*8
1239};
1240static const gfx_layout scramble_spritelayout =
1241{
1242   16,16,
1243   RGN_FRAC(1,2),
1244   2,
1245   { RGN_FRAC(0,2), RGN_FRAC(1,2) },
1246   { 0, 1, 2, 3, 4, 5, 6, 7,
1247         8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7 },
1248   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
1249         16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
1250   32*8
1251};
1252
10681253static const gfx_layout devilfsh_charlayout =
10691254{
10701255   8,8,   /* 8*8 characters */
r18575r18576
11561341   32*8   /* every sprite takes 32 consecutive bytes */
11571342};
11581343
1344static GFXDECODE_START( scramble )
1345   GFXDECODE_ENTRY( "gfx1", 0x0000, scramble_charlayout,   0, 8 )
1346   GFXDECODE_ENTRY( "gfx1", 0x0000, scramble_spritelayout, 0, 8 )
1347GFXDECODE_END
11591348
11601349static GFXDECODE_START( devilfsh )
11611350   GFXDECODE_ENTRY( "gfx1", 0x0000, devilfsh_charlayout,   0, 8 )
r18575r18576
12611450};
12621451
12631452
1264static const gfx_layout scramble_charlayout =
1265{
1266   8,8,
1267   RGN_FRAC(1,2),
1268   2,
1269   { RGN_FRAC(0,2), RGN_FRAC(1,2) },
1270   { 0, 1, 2, 3, 4, 5, 6, 7 },
1271   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
1272   8*8
1273};
1274static const gfx_layout scramble_spritelayout =
1275{
1276   16,16,
1277   RGN_FRAC(1,2),
1278   2,
1279   { RGN_FRAC(0,2), RGN_FRAC(1,2) },
1280   { 0, 1, 2, 3, 4, 5, 6, 7,
1281         8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7 },
1282   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
1283         16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
1284   32*8
1285};
12861453
1287static GFXDECODE_START( scramble )
1288   GFXDECODE_ENTRY( "gfx1", 0x0000, scramble_charlayout,   0, 8 )
1289   GFXDECODE_ENTRY( "gfx1", 0x0000, scramble_spritelayout, 0, 8 )
1290GFXDECODE_END
1454/**************************************************************************/
12911455
1292
1293
1294READ8_MEMBER(scramble_state::scramble_soundram_r)
1295{
1296   return m_soundram[offset & 0x03ff];
1297}
1298
1299WRITE8_MEMBER(scramble_state::scramble_soundram_w)
1300{
1301   m_soundram[offset & 0x03ff] = data;
1302}
1303
1304static ADDRESS_MAP_START( scramble_sound_map, AS_PROGRAM, 8, scramble_state )
1305   AM_RANGE(0x0000, 0x2fff) AM_ROM
1306   AM_RANGE(0x8000, 0x8fff) AM_READWRITE(scramble_soundram_r, scramble_soundram_w)
1307   AM_RANGE(0x8000, 0x83ff) AM_WRITENOP AM_SHARE("soundram")  /* only here to initialize pointer */
1308   AM_RANGE(0x9000, 0x9fff) AM_WRITE(scramble_filter_w)
1309ADDRESS_MAP_END
1310
1311static ADDRESS_MAP_START( scramble_sound_io_map, AS_IO, 8, scramble_state )
1312   ADDRESS_MAP_GLOBAL_MASK(0xff)
1313   AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w)
1314   AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("8910.1", ay8910_r, ay8910_data_w)
1315   AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_w)
1316   AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("8910.2", ay8910_r, ay8910_data_w)
1317ADDRESS_MAP_END
1318
13191456static MACHINE_CONFIG_START( scramble, scramble_state )
13201457
13211458   /* basic machine hardware */
r18575r18576
15941731
15951732MACHINE_CONFIG_END
15961733
1734static MACHINE_CONFIG_DERIVED( harem, scramble )
1735
1736   /* basic machine hardware */
1737   MCFG_CPU_MODIFY("maincpu")
1738   MCFG_CPU_PROGRAM_MAP(harem_map)
1739
1740   MCFG_CPU_MODIFY("audiocpu")
1741   MCFG_CPU_PROGRAM_MAP(harem_sound_map)
1742   MCFG_CPU_IO_MAP(harem_sound_io_map)
1743
1744   /* sound hardware */
1745   MCFG_SOUND_MODIFY("8910.2")
1746   MCFG_SOUND_CONFIG(triplep_ay8910_interface)
1747
1748   MCFG_SOUND_ADD("8910.3", AY8910, 14318000/8)
1749   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
1750MACHINE_CONFIG_END
1751
15971752/***************************************************************************
15981753
15991754  Game driver(s)
r18575r18576
20512206   ROM_LOAD( "turtles.clr",     0x0000, 0x0020, CRC(f3ef02dd) SHA1(09fd795170d7d30f101d579f57553da5ff3800ab) )
20522207ROM_END
20532208
2209ROM_START( harem )
2210   ROM_REGION( 0x10000, "maincpu", 0 )
2211   ROM_LOAD( "p0_ic85.bin",  0x0000, 0x2000, CRC(4521b753) SHA1(9033f9c3be8fec1e5ff251e9f60faaf3848a1a1e) )
2212   ROM_LOAD( "p1_ic87.bin",  0x8000, 0x2000, BAD_DUMP CRC(3cc5d1e8) SHA1(827e2d20de2a00ec016ead249ed3afdccd0c856c) ) // encrypted?
2213   // looks like a bitswap on data, call addresses from $0000-$1fff to here tell that $99 is near certainly $c9(ret)
2214   // Other values with a pretty good chance: $40 is $10(djnz), $dd is $dd(ix prefix)
2215
2216   ROM_REGION( 0x10000, "audiocpu", 0 )
2217   ROM_LOAD( "s1_ic12.bin",  0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) )
2218   ROM_LOAD( "s2_ic13.bin",  0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) )
2219
2220   ROM_REGION( 0x2000, "unknown", 0 ) /* TMS-based ROM? */
2221   ROM_LOAD( "a1_ic25.bin",  0x0000, 0x2000, CRC(279f923a) SHA1(166b1b625997766f0de7cc18af52c42268022fcb) )
2222
2223   ROM_REGION( 0x4000, "gfx1", 0 )
2224   ROM_LOAD( "m0_ic36.bin",  0x0000, 0x2000, CRC(64b3c6d6) SHA1(e71092585f7ffdae85b2a4c9add1bc71e5a608a8) )
2225   ROM_LOAD( "m1_ic37.bin",  0x2000, 0x2000, CRC(cb0324fb) SHA1(61612f683810339d5d5f31daa4c475d0338d446f) )
2226
2227   ROM_REGION( 0x0020, "proms", 0 )
2228   ROM_LOAD( "harem.clr",    0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) )
2229ROM_END
2230
2231
20542232GAME( 1982, triplep,  0,        triplep,  triplep,  scramble_state, scramble_ppi, ROT90, "K.K. International", "Triple Punch", GAME_SUPPORTS_SAVE )
20552233GAME( 1982, knockout, triplep,  triplep,  triplep,  scramble_state, scramble_ppi, ROT90, "bootleg? (KKK)", "Knock Out!! (bootleg?)", GAME_SUPPORTS_SAVE )
20562234GAME( 1981, mariner,  0,        mariner,  scramble, scramble_state, mariner,      ROT90, "Amenip", "Mariner", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE)
r18575r18576
20722250GAME( 1982, mimonscr, mimonkey, mimonscr, mimonscr, scramble_state, mimonscr,     ROT90, "bootleg", "Mighty Monkey (bootleg on Scramble hardware)", GAME_SUPPORTS_SAVE )
20732251GAME( 1983, ad2083,   0,        ad2083,   ad2083,   scramble_state, ad2083,       ROT90, "Midcoin", "A. D. 2083", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE)
20742252GAME( 1981, turpins,  turtles,  turpins,  turpins,  driver_device,  0,            ROT90, "bootleg", "Turpin (bootleg on Scramble hardware)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) // haven't hooked up the sound CPU yet
2253GAME( 1983, harem,    0,        harem,    harem,    scramble_state, harem,        ROT90, "I.G.R.", "Harem", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mame/machine/scramble.c
r18575r18576
620620      ROM[i] = c;
621621   }
622622}
623
624DRIVER_INIT_MEMBER(scramble_state,harem)
625{
626}
trunk/src/mame/includes/scramble.h
r18575r18576
88      : galaxold_state(mconfig, type, tag),
99        m_ppi8255_0(*this, "ppi8255_0"),
1010        m_ppi8255_1(*this, "ppi8255_1"),
11        m_soundram(*this, "soundram") { }
11        m_soundram(*this, "soundram")
12   { }
1213
1314   optional_device<i8255_device>  m_ppi8255_0;
1415   optional_device<i8255_device>  m_ppi8255_1;
1516   optional_shared_ptr<UINT8> m_soundram;
17
1618   UINT8 m_cavelon_bank;
1719   UINT8 m_security_2B_counter;
1820   UINT8 m_xb;
21
1922   DECLARE_CUSTOM_INPUT_MEMBER(darkplnt_custom_r);
2023   DECLARE_CUSTOM_INPUT_MEMBER(ckongs_coinage_r);
2124   DECLARE_READ8_MEMBER(hncholms_prot_r);
r18575r18576
2831   DECLARE_WRITE8_MEMBER(frogger_filter_w);
2932   DECLARE_WRITE8_MEMBER(mars_ppi8255_0_w);
3033   DECLARE_WRITE8_MEMBER(mars_ppi8255_1_w);
34
3135   DECLARE_DRIVER_INIT(cavelon);
3236   DECLARE_DRIVER_INIT(mariner);
3337   DECLARE_DRIVER_INIT(mrkougb);
r18575r18576
3943   DECLARE_DRIVER_INIT(ad2083);
4044   DECLARE_DRIVER_INIT(devilfsh);
4145   DECLARE_DRIVER_INIT(mrkougar);
46   DECLARE_DRIVER_INIT(harem);
4247
4348   DECLARE_DRIVER_INIT(scobra);
4449   DECLARE_DRIVER_INIT(stratgyx);
trunk/src/mame/includes/galaxold.h
r18575r18576
3131        m_attributesram(*this,"attributesram"),
3232        m_bulletsram(*this,"bulletsram"),
3333        m_rockclim_videoram(*this,"rockclim_vram"),
34        m_racknrol_tiles_bank(*this,"racknrol_tbank") { }
34        m_racknrol_tiles_bank(*this,"racknrol_tbank")
35   { }
3536
3637   required_shared_ptr<UINT8> m_videoram;
3738   required_shared_ptr<UINT8> m_spriteram;
r18575r18576
8586   emu_timer *m_stars_scroll_timer;
8687   struct star m_stars[STAR_COUNT];
8788
88   UINT8 m_nmi_mask; /* Harem per-game specific */
8989   DECLARE_READ8_MEMBER(drivfrcg_port0_r);
9090   DECLARE_READ8_MEMBER(scramb2_protection_r);
9191   DECLARE_READ8_MEMBER(scramb2_port0_r);
9292   DECLARE_READ8_MEMBER(scramb2_port1_r);
9393   DECLARE_READ8_MEMBER(scramb2_port2_r);
94   DECLARE_WRITE8_MEMBER(harem_nmi_mask_w);
9594   DECLARE_READ8_MEMBER(hexpoola_data_port_r);
9695   DECLARE_READ8_MEMBER(bullsdrtg_data_port_r);
9796   DECLARE_WRITE8_MEMBER(galaxold_nmi_enable_w);
r18575r18576
178177   DECLARE_VIDEO_START(dambustr);
179178   UINT32 screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
180179   UINT32 screen_update_dambustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
181   INTERRUPT_GEN_MEMBER(vblank_irq);
182180   INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt);
183181   TIMER_CALLBACK_MEMBER(stars_blink_callback);
184182   TIMER_CALLBACK_MEMBER(stars_scroll_callback);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team