Previous 199869 Revisions Next

r18930 Sunday 11th November, 2012 at 11:37:54 UTC by Luca Elia
Decrypted code in "Harem" [Luca Elia]

New games added or promoted from NOT_WORKING status
---------------------------------------------------
Harem [Dave Hollister, hap, Luca Elia]
[src/mame/audio]scramble.c
[src/mame/drivers]scramble.c yunsung8.c
[src/mame/includes]galaxold.h scramble.h
[src/mame/machine]scramble.c
[src/mame/video]galaxold.c

trunk/src/mame/machine/scramble.c
r18929r18930
621621   }
622622}
623623
624/************************************************************
625 Harem run-time decryption
626*************************************************************/
627
628WRITE8_MEMBER(scramble_state::harem_decrypt_bit_w)
629{
630   m_harem_decrypt_bit = data;
631}
632
633WRITE8_MEMBER(scramble_state::harem_decrypt_clk_w)
634{
635   if ((data & 1) && !(m_harem_decrypt_clk & 1))
636   {
637      m_harem_decrypt_mode = ((m_harem_decrypt_mode >> 1) | ((m_harem_decrypt_bit & 1) << 3)) & 0x0f;
638      m_harem_decrypt_count++;
639
640//      logerror("%s: decrypt mode = %02x, count = %x\n", machine().describe_context(), m_harem_decrypt_mode, m_harem_decrypt_count);
641   }
642
643   m_harem_decrypt_clk = data;
644
645   if (m_harem_decrypt_count == 4)
646   {
647      int bank;
648      switch (m_harem_decrypt_mode)
649      {
650         case 0x03:   bank = 0;   break;
651         case 0x09:   bank = 1;   break;
652         case 0x0a:   bank = 2;   break;
653         default:
654            logerror("%s: warning, unknown decrypt mode = %02x\n", machine().describe_context(), m_harem_decrypt_mode);
655            bank = 0;
656      }
657         
658      membank("rombank")->set_base         (m_harem_decrypted_data      + 0x2000 * bank);
659      membank("rombank")->set_base_decrypted   (m_harem_decrypted_opcodes   + 0x2000 * bank);
660
661//      logerror("%s: decrypt mode = %02x (bank %x) active\n", machine().describe_context(), m_harem_decrypt_mode, bank);
662
663      m_harem_decrypt_mode = 0;
664      m_harem_decrypt_count = 0;
665   }
666}
667
668WRITE8_MEMBER(scramble_state::harem_decrypt_rst_w)
669{
670   m_harem_decrypt_mode = 0;
671   m_harem_decrypt_count = 0;
672
673//   logerror("%s: decrypt mode reset\n", machine().describe_context());
674}
675
624676DRIVER_INIT_MEMBER(scramble_state,harem)
625677{
678   UINT8 *ROM      =   machine().root_device().memregion("maincpu")->base() + 0x8000;
679   size_t size      =   0x2000;
680
681   UINT8 *data      =   m_harem_decrypted_data      = auto_alloc_array(machine(), UINT8, size * 3);
682   UINT8 *opcodes   =   m_harem_decrypted_opcodes   = auto_alloc_array(machine(), UINT8, size * 3);
683
684   // decryption 03
685   for (int i = 0; i < size; i++)
686   {
687      UINT8 x = ROM[i];
688      opcodes[size * 0 + i]   =   BITSWAP8(x, 7,0,5,2,3,4,1,6);
689      data   [size * 0 + i]   =   BITSWAP8(x, 7,6,5,0,3,4,1,2);
690   }
691
692   // decryption 09
693   for (int i = 0; i < size; i++)
694   {
695      UINT8 x = ROM[i];
696      opcodes[size * 1 + i]   =   BITSWAP8(x, 7,0,5,6,3,2,1,4);
697      data   [size * 1 + i]   =   BITSWAP8(x, 7,4,5,0,3,6,1,2);
698   }
699
700   // decryption 0a
701   for (int i = 0; i < size; i++)
702   {
703      UINT8 x = ROM[i];
704      opcodes[size * 2 + i]   =   BITSWAP8(x, 7,2,5,6,3,0,1,4);
705      data   [size * 2 + i]   =   BITSWAP8(x, 7,2,5,4,3,0,1,6);
706   }
707
708   membank("rombank")->set_base         (m_harem_decrypted_data);
709   membank("rombank")->set_base_decrypted   (m_harem_decrypted_opcodes);
626710}
trunk/src/mame/includes/scramble.h
r18929r18930
1919   UINT8 m_security_2B_counter;
2020   UINT8 m_xb;
2121
22   // harem
23   UINT8 m_harem_decrypt_mode;
24   UINT8 m_harem_decrypt_bit;
25   UINT8 m_harem_decrypt_clk;
26   UINT8 m_harem_decrypt_count;
27   UINT8 *m_harem_decrypted_data;
28   UINT8 *m_harem_decrypted_opcodes;
29
2230   DECLARE_CUSTOM_INPUT_MEMBER(darkplnt_custom_r);
2331   DECLARE_CUSTOM_INPUT_MEMBER(ckongs_coinage_r);
2432   DECLARE_READ8_MEMBER(hncholms_prot_r);
r18929r18930
3240   DECLARE_WRITE8_MEMBER(mars_ppi8255_0_w);
3341   DECLARE_WRITE8_MEMBER(mars_ppi8255_1_w);
3442
43   DECLARE_WRITE8_MEMBER(harem_decrypt_bit_w);
44   DECLARE_WRITE8_MEMBER(harem_decrypt_clk_w);
45   DECLARE_WRITE8_MEMBER(harem_decrypt_rst_w);
46
3547   DECLARE_DRIVER_INIT(cavelon);
3648   DECLARE_DRIVER_INIT(mariner);
3749   DECLARE_DRIVER_INIT(mrkougb);
r18929r18930
91103DECLARE_WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w );
92104DECLARE_WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w );
93105
106DECLARE_WRITE8_DEVICE_HANDLER( harem_portA_w );
107DECLARE_WRITE8_DEVICE_HANDLER( harem_portB_w );
108
94109MACHINE_CONFIG_EXTERN( ad2083_audio );
95110
trunk/src/mame/includes/galaxold.h
r18929r18930
141141   TILE_GET_INFO_MEMBER(dambustr_get_tile_info2);
142142   TILE_GET_INFO_MEMBER(get_tile_info);
143143   TILE_GET_INFO_MEMBER(rockclim_get_tile_info);
144   TILE_GET_INFO_MEMBER(harem_get_tile_info);
144145   DECLARE_MACHINE_RESET(galaxold);
145146   DECLARE_VIDEO_START(galaxold);
146147   DECLARE_PALETTE_INIT(galaxold);
r18929r18930
175176   DECLARE_VIDEO_START(scorpion);
176177   DECLARE_VIDEO_START(ad2083);
177178   DECLARE_VIDEO_START(dambustr);
179   DECLARE_VIDEO_START(harem);
178180   UINT32 screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
179181   UINT32 screen_update_dambustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
180182   INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt);
r18929r18930
183185   TIMER_DEVICE_CALLBACK_MEMBER(galaxold_interrupt_timer);
184186   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback);
185187   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback);
186
187
188188};
189189
190190/*----------- defined in video/galaxold.c -----------*/
trunk/src/mame/video/galaxold.c
r18929r18930
765765   m_color_mask = 0xff;
766766}
767767
768
769// Harem
770
771TILE_GET_INFO_MEMBER(galaxold_state::harem_get_tile_info)
772{
773   int code = m_videoram[tile_index];
774   UINT8 x = tile_index & 0x1f;
775   UINT8 color = m_attributesram[(x << 1) | 1] & 7;
776   UINT8 bank = BIT(m_racknrol_tiles_bank[0], x/4);   // 1 bit every 4 columns
777
778   code  |= bank * 0x200;
779
780   SET_TILE_INFO_MEMBER(0, code, color, 0);
781}
782
783static void harem_modify_spritecode(running_machine &machine, UINT8 *spriteram, int *code, int *flipx, int *flipy, int offs)
784{
785   galaxold_state *state = machine.driver_data<galaxold_state>();
786   *code |= (state->m_gfxbank[0] << 7) | 0x40;
787}
788
789VIDEO_START_MEMBER(galaxold_state,harem)
790{
791   video_start_common(machine());
792   m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(galaxold_state::harem_get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
793//   m_bg_tilemap->set_transparent_pen(0);   // opaque tilemap to get sky and sand colors
794
795   m_bg_tilemap->set_scroll_cols(32);
796
797   m_color_mask = (machine().gfx[0]->granularity() == 4) ? 7 : 3;
798
799   m_modify_spritecode = harem_modify_spritecode;
800}
801
802
768803VIDEO_START_MEMBER(galaxold_state,bongo)
769804{
770805   VIDEO_START_CALL_MEMBER(galaxold_plain);
trunk/src/mame/drivers/scramble.c
r18929r18930
371371ADDRESS_MAP_END
372372
373373
374// Harem
374375
375376static ADDRESS_MAP_START( harem_map, AS_PROGRAM, 8, scramble_state )
376377   AM_RANGE(0x0000, 0x1fff) AM_ROM
378
377379   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
380
381   AM_RANGE(0x4000, 0x403f) AM_RAM_WRITE(galaxold_attributesram_w) AM_SHARE("attributesram")
382   AM_RANGE(0x4040, 0x405f) AM_RAM AM_SHARE("spriteram")
383   AM_RANGE(0x4060, 0x407f) AM_RAM AM_SHARE("bulletsram")
384   AM_RANGE(0x4080, 0x47ff) AM_RAM
385
386   AM_RANGE(0x4800, 0x4bff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_SHARE("videoram")
387   AM_RANGE(0x4c00, 0x4fff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w)   // mirror address
388
389   AM_RANGE(0x5000, 0x5000) AM_RAM_WRITE(racknrol_tiles_bank_w) AM_SHARE("racknrol_tbank")   // high bits of tiles, 1 bit every 4 columns
390   AM_RANGE(0x5800, 0x5800) AM_READ(watchdog_reset_r) AM_WRITE(galaxold_nmi_enable_w)
391
392   AM_RANGE(0x5801, 0x5801) AM_WRITE(harem_decrypt_clk_w)         // run-time bitswap selection
393   AM_RANGE(0x5802, 0x5802) AM_WRITE(harem_decrypt_bit_w)
394   AM_RANGE(0x5803, 0x5803) AM_WRITE(harem_decrypt_rst_w)
395
396   AM_RANGE(0x5804, 0x5804) AM_WRITE(galaxold_coin_counter_w)
397   AM_RANGE(0x5805, 0x5805) AM_WRITE(galaxold_gfxbank_w)         // bit 0 = sprite tiles high bit
398   AM_RANGE(0x5806, 0x5806) AM_WRITE(galaxold_flip_screen_x_w)      // maybe (0 at boot)
399   AM_RANGE(0x5807, 0x5807) AM_WRITE(galaxold_flip_screen_y_w)      // ""
400
383401   AM_RANGE(0x6100, 0x6103) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
384402   AM_RANGE(0x6200, 0x6203) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
385   AM_RANGE(0x8000, 0x9fff) AM_ROM
386403
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")
404   AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("rombank")               // bitswapped rom
391405ADDRESS_MAP_END
392406
393407static ADDRESS_MAP_START( harem_sound_map, AS_PROGRAM, 8, scramble_state )
394408   AM_RANGE(0x0000, 0x2fff) AM_ROM
409   AM_RANGE(0x6000, 0x6000) AM_READNOP
395410   AM_RANGE(0x8000, 0x83ff) AM_RAM
396   AM_RANGE(0xa000, 0xa000) AM_WRITENOP
411   AM_RANGE(0xa000, 0xafff) AM_WRITE(scramble_filter_w)
397412ADDRESS_MAP_END
398413
399414static ADDRESS_MAP_START( harem_sound_io_map, AS_IO, 8, scramble_state )
400415   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)
416
417   // ports->speech?:
418   AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY    ("8910.3", ay8910_address_w)
419   AM_RANGE(0x08, 0x08) AM_DEVREADWRITE_LEGACY("8910.3", ay8910_r, ay8910_data_w)
420   // same as scramble:
421   AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY    ("8910.1", ay8910_address_w)
422   AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("8910.1", ay8910_r, ay8910_data_w)
423   AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY    ("8910.2", ay8910_address_w)
424   AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("8910.2", ay8910_r, ay8910_data_w)   // read soundlatch
408425ADDRESS_MAP_END
409426
410427
r18929r18930
11441161
11451162
11461163static 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 ) )
1164   PORT_START("IN0")   // $6100 - PPI0 Port A
1165   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
1166   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
1167   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1168   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
1169   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
1170   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
1171   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
1172   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
11721173
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 ) )
1174   PORT_START("IN1")   // $6101 - PPI0 Port B
1175   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
1176   PORT_DIPSETTING(   0x03, "2" )
1177   PORT_DIPSETTING(   0x02, "3" )
1178   PORT_DIPSETTING(   0x01, "4" )
1179   PORT_DIPSETTING(   0x00, DEF_STR( Infinite ) )
1180   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
1181   PORT_DIPSETTING(   0x04, DEF_STR( Off ) )
1182   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
1183   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
1184   PORT_DIPSETTING(   0x08, DEF_STR( Off ) )
1185   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
1186   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
1187   PORT_DIPSETTING(   0x10, DEF_STR( Off ) )
1188   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
1189   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
1190   PORT_DIPSETTING(   0x20, DEF_STR( Off ) )
1191   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
1192   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
1193   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
11981194
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 ) )
1195   PORT_START("IN2")   // $6102 - PPI0 Port C
1196   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
1197   PORT_DIPSETTING(   0x01, DEF_STR( Off ) )
1198   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
1199   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )   // used
1200   PORT_DIPSETTING(   0x02, DEF_STR( Off ) )
1201   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
1202   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
1203   PORT_DIPSETTING(   0x0c, DEF_STR( 2C_1C ) )
1204   PORT_DIPSETTING(   0x08, DEF_STR( 1C_1C ) )
1205   PORT_DIPSETTING(   0x04, DEF_STR( 1C_2C ) )
1206   PORT_DIPSETTING(   0x00, DEF_STR( 1C_3C ) )
1207   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
1208   PORT_DIPNAME( 0xa0, 0xa0, "Difficulty?" )
1209   PORT_DIPSETTING(   0xa0, "0" )
1210   PORT_DIPSETTING(   0x80, "1" )
1211   PORT_DIPSETTING(   0x20, "2" )
1212   PORT_DIPSETTING(   0x00, "3" )
1213   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
12241214INPUT_PORTS_END
12251215
12261216
r18929r18930
14491439   DEVCB_NULL
14501440};
14511441
1442static const ay8910_interface harem_ay8910_interface_3 =
1443{
1444   AY8910_LEGACY_OUTPUT,
1445   AY8910_DEFAULT_LOADS,
1446   DEVCB_NULL,                  // Port A read
1447   DEVCB_NULL,                  // Port B read
1448   DEVCB_HANDLER(harem_portA_w),   // Port A write
1449   DEVCB_HANDLER(harem_portB_w),   // Port B write
1450};
14521451
14531452
14541453/**************************************************************************/
r18929r18930
14911490
14921491   /* sound hardware */
14931492   MCFG_SPEAKER_STANDARD_MONO("mono")
1493
14941494   MCFG_SOUND_ADD("8910.1", AY8910, 14318000/8)
14951495   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
14961496
r18929r18930
17411741   MCFG_CPU_PROGRAM_MAP(harem_sound_map)
17421742   MCFG_CPU_IO_MAP(harem_sound_io_map)
17431743
1744   /* sound hardware */
1745   MCFG_SOUND_MODIFY("8910.2")
1746   MCFG_SOUND_CONFIG(triplep_ay8910_interface)
1744   MCFG_VIDEO_START_OVERRIDE(scramble_state,harem)
17471745
1746   /* sound hardware */
17481747   MCFG_SOUND_ADD("8910.3", AY8910, 14318000/8)
17491748   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
1749   MCFG_SOUND_CONFIG(harem_ay8910_interface_3)
17501750MACHINE_CONFIG_END
17511751
17521752/***************************************************************************
r18929r18930
22082208
22092209ROM_START( harem )
22102210   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)
2211   ROM_LOAD( "p0_ic85.bin", 0x0000, 0x2000, CRC(4521b753) SHA1(9033f9c3be8fec1e5ff251e9f60faaf3848a1a1e) )
2212   ROM_LOAD( "p1_ic87.bin", 0x8000, 0x2000, CRC(3cc5d1e8) SHA1(827e2d20de2a00ec016ead249ed3afdccd0c856c) ) // encrypted
22152213
22162214   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) )
2215   ROM_LOAD( "s1_ic12.bin", 0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) )
2216   ROM_LOAD( "s2_ic13.bin", 0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) )
22192217
2220   ROM_REGION( 0x2000, "unknown", 0 ) /* TMS-based ROM? */
2218   ROM_REGION( 0x2000, "unknown", 0 ) // TMS-based ROM?
22212219   ROM_LOAD( "a1_ic25.bin",  0x0000, 0x2000, CRC(279f923a) SHA1(166b1b625997766f0de7cc18af52c42268022fcb) )
22222220
22232221   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) )
2222   ROM_LOAD( "m1_ic37.bin", 0x0000, 0x2000, CRC(cb0324fb) SHA1(61612f683810339d5d5f31daa4c475d0338d446f) )
2223   ROM_LOAD( "m0_ic36.bin", 0x2000, 0x2000, CRC(64b3c6d6) SHA1(e71092585f7ffdae85b2a4c9add1bc71e5a608a8) )
22262224
22272225   ROM_REGION( 0x0020, "proms", 0 )
2228   ROM_LOAD( "harem.clr",    0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) )
2226   ROM_LOAD( "harem.clr", 0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) )
22292227ROM_END
22302228
22312229
2232GAME( 1982, triplep,  0,        triplep,  triplep,  scramble_state, scramble_ppi, ROT90, "K.K. International", "Triple Punch", GAME_SUPPORTS_SAVE )
2233GAME( 1982, knockout, triplep,  triplep,  triplep,  scramble_state, scramble_ppi, ROT90, "bootleg? (KKK)", "Knock Out!! (bootleg?)", GAME_SUPPORTS_SAVE )
2234GAME( 1981, mariner,  0,        mariner,  scramble, scramble_state, mariner,      ROT90, "Amenip", "Mariner", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE)
2235GAME( 1981, 800fath,  mariner,  mariner,  800fath,  scramble_state, mariner,      ROT90, "Amenip (US Billiards Inc. license)", "800 Fathoms", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
2236GAME( 1981, ckongs,   ckong,    ckongs,   ckongs,   scramble_state, ckongs,       ROT90, "bootleg", "Crazy Kong (Scramble hardware)", GAME_SUPPORTS_SAVE )
2237GAME( 1981, mars,     0,        mars,     mars,     scramble_state, mars,         ROT90, "Artic", "Mars", GAME_SUPPORTS_SAVE )
2238GAME( 1982, devilfsh, 0,        devilfsh, devilfsh, scramble_state, devilfsh,     ROT90, "Artic", "Devil Fish", GAME_SUPPORTS_SAVE )
2239GAME( 1983, newsin7,  0,        newsin7,  newsin7,  scramble_state, mars,         ROT90, "ATW USA, Inc.", "New Sinbad 7", GAME_SUPPORTS_SAVE )
2240GAME( 1984, mrkougar, 0,        mrkougar, mrkougar, scramble_state, mrkougar,     ROT90, "ATW", "Mr. Kougar", GAME_SUPPORTS_SAVE )
2241GAME( 1983, mrkougar2,mrkougar, mrkougar, mrkougar, scramble_state, mrkougar,     ROT90, "ATW", "Mr. Kougar (earlier)", GAME_SUPPORTS_SAVE )
2242GAME( 1983, mrkougb,  mrkougar, mrkougb,  mrkougar, scramble_state, mrkougb,      ROT90, "bootleg", "Mr. Kougar (bootleg set 1)", GAME_SUPPORTS_SAVE )
2243GAME( 1983, mrkougb2, mrkougar, mrkougb,  mrkougar, scramble_state, mrkougb,      ROT90, "bootleg", "Mr. Kougar (bootleg set 2)", GAME_SUPPORTS_SAVE )
2244GAME( 1982, hotshock, 0,        hotshock, hotshock, scramble_state, hotshock,     ROT90, "E.G. Felaco (Domino license)", "Hot Shocker", GAME_SUPPORTS_SAVE )
2245GAME( 1982, hotshockb,hotshock, hotshock, hotshock, scramble_state, hotshock,     ROT90, "E.G. Felaco", "Hot Shocker (early revision?)", GAME_SUPPORTS_SAVE ) // has "Dudley presents" (protagonist of the game), instead of Domino
2246GAME( 198?, conquer,  0,        hotshock, hotshock, driver_device,  0,            ROT90, "<unknown>", "Conqueror", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE)
2247GAME( 1983, hunchbks, hunchbak, hunchbks, hunchbks, scramble_state, scramble_ppi, ROT90, "Century Electronics", "Hunchback (Scramble hardware)", GAME_SUPPORTS_SAVE )
2230GAME( 1982, triplep,  0,        triplep,  triplep,  scramble_state, scramble_ppi, ROT90, "K.K. International",  "Triple Punch",                   GAME_SUPPORTS_SAVE )
2231GAME( 1982, knockout, triplep,  triplep,  triplep,  scramble_state, scramble_ppi, ROT90, "bootleg? (KKK)",      "Knock Out!! (bootleg?)",         GAME_SUPPORTS_SAVE )
2232GAME( 1981, mariner,  0,        mariner,  scramble, scramble_state, mariner,      ROT90, "Amenip",              "Mariner",                        GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
2233GAME( 1981, 800fath,  mariner,  mariner,  800fath,  scramble_state, mariner,      ROT90, "Amenip (US Billiards Inc. license)", "800 Fathoms",     GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
2234GAME( 1981, ckongs,   ckong,    ckongs,   ckongs,   scramble_state, ckongs,       ROT90, "bootleg",             "Crazy Kong (Scramble hardware)", GAME_SUPPORTS_SAVE )
2235GAME( 1981, mars,     0,        mars,     mars,     scramble_state, mars,         ROT90, "Artic",               "Mars",                           GAME_SUPPORTS_SAVE )
2236GAME( 1982, devilfsh, 0,        devilfsh, devilfsh, scramble_state, devilfsh,     ROT90, "Artic",               "Devil Fish",                     GAME_SUPPORTS_SAVE )
2237GAME( 1983, newsin7,  0,        newsin7,  newsin7,  scramble_state, mars,         ROT90, "ATW USA, Inc.",       "New Sinbad 7",                   GAME_SUPPORTS_SAVE )
2238GAME( 1984, mrkougar, 0,        mrkougar, mrkougar, scramble_state, mrkougar,     ROT90, "ATW",                 "Mr. Kougar",                     GAME_SUPPORTS_SAVE )
2239GAME( 1983, mrkougar2,mrkougar, mrkougar, mrkougar, scramble_state, mrkougar,     ROT90, "ATW",                 "Mr. Kougar (earlier)",           GAME_SUPPORTS_SAVE )
2240GAME( 1983, mrkougb,  mrkougar, mrkougb,  mrkougar, scramble_state, mrkougb,      ROT90, "bootleg",             "Mr. Kougar (bootleg set 1)",     GAME_SUPPORTS_SAVE )
2241GAME( 1983, mrkougb2, mrkougar, mrkougb,  mrkougar, scramble_state, mrkougb,      ROT90, "bootleg",             "Mr. Kougar (bootleg set 2)",     GAME_SUPPORTS_SAVE )
2242GAME( 1982, hotshock, 0,        hotshock, hotshock, scramble_state, hotshock,     ROT90, "E.G. Felaco (Domino license)", "Hot Shocker",           GAME_SUPPORTS_SAVE )
2243GAME( 1982, hotshockb,hotshock, hotshock, hotshock, scramble_state, hotshock,     ROT90, "E.G. Felaco",         "Hot Shocker (early revision?)",  GAME_SUPPORTS_SAVE ) // has "Dudley presents" (protagonist of the game), instead of Domino
2244GAME( 198?, conquer,  0,        hotshock, hotshock, driver_device,  0,            ROT90, "<unknown>",           "Conqueror",                      GAME_NOT_WORKING   )
2245GAME( 1983, hunchbks, hunchbak, hunchbks, hunchbks, scramble_state, scramble_ppi, ROT90, "Century Electronics", "Hunchback (Scramble hardware)",  GAME_SUPPORTS_SAVE )
22482246GAME( 1984, hncholms, huncholy, hncholms, hncholms, scramble_state, scramble_ppi, ROT90, "Century Electronics / Seatongrove Ltd", "Hunchback Olympic (Scramble hardware)", GAME_SUPPORTS_SAVE )
2249GAME( 1983, cavelon,  0,        cavelon,  cavelon,  scramble_state, cavelon,      ROT90, "Jetsoft", "Cavelon", GAME_SUPPORTS_SAVE )
2250GAME( 1982, mimonscr, mimonkey, mimonscr, mimonscr, scramble_state, mimonscr,     ROT90, "bootleg", "Mighty Monkey (bootleg on Scramble hardware)", GAME_SUPPORTS_SAVE )
2251GAME( 1983, ad2083,   0,        ad2083,   ad2083,   scramble_state, ad2083,       ROT90, "Midcoin", "A. D. 2083", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE)
2252GAME( 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 )
2247GAME( 1983, cavelon,  0,        cavelon,  cavelon,  scramble_state, cavelon,      ROT90, "Jetsoft",             "Cavelon",                        GAME_SUPPORTS_SAVE )
2248GAME( 1982, mimonscr, mimonkey, mimonscr, mimonscr, scramble_state, mimonscr,     ROT90, "bootleg",             "Mighty Monkey (bootleg on Scramble hardware)", GAME_SUPPORTS_SAVE )
2249GAME( 1983, ad2083,   0,        ad2083,   ad2083,   scramble_state, ad2083,       ROT90, "Midcoin",             "A. D. 2083",                     GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
2250GAME( 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
2251GAME( 1983, harem,    0,        harem,    harem,    scramble_state, harem,        ROT90, "I.G.R.",              "Harem",                          GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) // colors, missing speech?
trunk/src/mame/drivers/yunsung8.c
r18929r18930
713713GAME( 1995,  cannball,  0,        yunsung8, cannball, driver_device, 0, ROT0,   "Yun Sung / Soft Vision", "Cannon Ball (Yun Sung, horizontal)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
714714GAME( 1995,  cannballv, cannball, yunsung8, cannbalv, driver_device, 0, ROT270, "Yun Sung / T&K",         "Cannon Ball (Yun Sung, vertical)",   GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
715715GAME( 1995,  magix,     0,        yunsung8, magix,    driver_device, 0, ROT0,   "Yun Sung",               "Magix / Rock",                       GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
716GAME( 1995,  magixb,    0,        yunsung8, magix,    driver_device, 0, ROT0,   "bootleg",                "Magix / Rock (bootleg)",             GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
716GAME( 1995,  magixb,    magix,    yunsung8, magix,    driver_device, 0, ROT0,   "bootleg",                "Magix / Rock (bootleg)",             GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
717717GAME( 1994?, rocktris,  0,        yunsung8, rocktris, driver_device, 0, ROT0,   "Yun Sung",               "Rock Tris",                          GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
trunk/src/mame/audio/scramble.c
r18929r18930
170170}
171171
172172
173// Harem
174
175WRITE8_DEVICE_HANDLER( harem_portA_w )
176{
177   // Speech?
178}
179WRITE8_DEVICE_HANDLER( harem_portB_w )
180{
181   // Speech?
182}
183
184
173185/***************************************************************************
174186    AD2083 TMS5110 implementation (still wrong!)
175187

Previous 199869 Revisions Next


© 1997-2024 The MAME Team