Previous 199869 Revisions Next

r19543 Friday 14th December, 2012 at 08:36:57 UTC by Robbbert
New WORKING game [Barry Harris]
----------------
Ganbare Marin-kun (Marine 2K0411 JPN)

vas crabb translated the dip switch screens so he should be credited for that.
[src/mame]mame.lst
[src/mame/drivers]cps1.c
[src/mame/includes]cps1.h
[src/mame/video]cps1.c

trunk/src/mame/drivers/cps1.c
r19542r19543
192192    For example, magic power will be increased at the end of level 1 but you won't notice
193193    it before level 3, and sword power will be increased at the end of level 2 but you
194194    won't notice it before level 4.
195   
1966) 'ganbare'
195197
198  - Using the payout setting dip switch results in some occasional hopper errors, if this
199    happens, then the clear ram dip switch needs to be used. This needs to be resolved.
200
196201TO DO (2006.09.20) :
197202
198203  - Check 'strider' and its clones and add debug features
r19542r19543
239244#include "sound/okim6295.h"
240245#include "sound/qsound.h"
241246#include "sound/msm5205.h"
247#include "machine/timekpr.h"
242248
243249#include "includes/cps1.h"       /* External CPS1 definitions */
244250
r19542r19543
333339   device.execute().set_input_line(2, HOLD_LINE);
334340}
335341
342TIMER_CALLBACK_MEMBER(cps_state::ganbare_interrupt4)
343{
344   /* not sure on the timing or source of this - the game needs it once per frame, */
345   /* otherwise you get a "HARD ERROR" after boot */
346   m_maincpu->set_input_line(4, HOLD_LINE);
347}
348
349INTERRUPT_GEN_MEMBER(cps_state::ganbare_interrupt)
350{
351   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(150000 - 500), timer_expired_delegate(FUNC(cps_state::ganbare_interrupt4),this));
352   device.execute().set_input_line(2, HOLD_LINE);
353}
354
336355/********************************************************************
337356*
338357*  Q Sound
r19542r19543
29002919   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Coin 3 (P3 Button 3 in-game)")
29012920INPUT_PORTS_END
29022921
2922static INPUT_PORTS_START( ganbare )
2923   PORT_START("IN0")
2924   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
2925   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) /* definitely read here in test mode, coin lock prevents it though */
2926   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
2927   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
2928   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
2929   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
2930   PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
2931   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2932   
2933   PORT_START("IN1")
2934   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
2935   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
2936   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
2937   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
2938   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
2939   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
2940   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
2941   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
2942   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
2943   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
2944   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
2945   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
2946   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
2947   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
2948   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
2949   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
29032950
2951   PORT_START("DSWA")
2952   PORT_DIPNAME( 0x01, 0x01, "Medal Setup" )               PORT_DIPLOCATION("SW(A):1")
2953   PORT_DIPSETTING(    0x01, "1 Medal 1 Credit" )
2954   PORT_DIPSETTING(    0x00, "Don't use" )
2955   PORT_DIPNAME( 0x02, 0x02, "Coin Setup" )               PORT_DIPLOCATION("SW(A):2")
2956   PORT_DIPSETTING(    0x02, "100 Yen" )
2957   PORT_DIPSETTING(    0x00, "10 Yen" )
2958   PORT_DIPNAME( 0x1c, 0x1c, "Change Setup" )               PORT_DIPLOCATION("SW(A):3,4,5")
2959   PORT_DIPSETTING(    0x04, "12" )
2960   PORT_DIPSETTING(    0x00, "11" )
2961   PORT_DIPSETTING(    0x1c, "10" )
2962   PORT_DIPSETTING(    0x18, "8" )
2963   PORT_DIPSETTING(    0x14, "7" )
2964   PORT_DIPSETTING(    0x10, "6" )
2965   PORT_DIPSETTING(    0x0c, "5" )
2966   PORT_DIPSETTING(    0x08, "No change" )
2967   PORT_DIPNAME( 0x60, 0x60, "10 Yen Setup" )               PORT_DIPLOCATION("SW(A):6,7")
2968   PORT_DIPSETTING(    0x60, DEF_STR( 1C_1C ) )
2969   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
2970   PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
2971   PORT_DIPSETTING(    0x00, "Don't use" )
2972   PORT_DIPNAME( 0x80, 0x80, "Payout Setup" )               PORT_DIPLOCATION("SW(A):8")
2973   PORT_DIPSETTING(    0x80, "Credit Mode" )
2974   PORT_DIPSETTING(    0x00, "Payout Mode" )
2975   
2976   PORT_START("DSWB")
2977   PORT_DIPNAME( 0x07, 0x07, "Payout Rate Setup" )            PORT_DIPLOCATION("SW(B):1,2,3")
2978   PORT_DIPSETTING(    0x01, "90%" )
2979   PORT_DIPSETTING(    0x00, "85%" )
2980   PORT_DIPSETTING(    0x07, "80%" )
2981   PORT_DIPSETTING(    0x06, "75%" )
2982   PORT_DIPSETTING(    0x05, "70%" )
2983   PORT_DIPSETTING(    0x04, "65%" )
2984   PORT_DIPSETTING(    0x03, "60%" )
2985   PORT_DIPSETTING(    0x02, "55%" )
2986   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW(B):4" )
2987   PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW(B):5" )
2988   PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW(B):6" )
2989   PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW(B):7" )
2990   PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW(B):8" )
2991
2992   PORT_START("DSWC")
2993   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Demo_Sounds ) )         PORT_DIPLOCATION("SW(C):1,2")
2994   PORT_DIPSETTING(    0x03, DEF_STR( On ) )
2995   PORT_DIPSETTING(    0x02, "Every second sound" )
2996   PORT_DIPSETTING(    0x01, "Every third sound" )
2997   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2998   PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW(C):3" )
2999   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW(C):4" )
3000   PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW(C):5" )
3001   PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW(C):6" )
3002   PORT_DIPNAME( 0x40, 0x40, "Clear RAM" )                  PORT_DIPLOCATION("SW(C):7")
3003   PORT_DIPSETTING(    0x40, DEF_STR( No ) )
3004   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
3005   PORT_DIPNAME( 0x80, 0x80, "Tes Mode Display" )            PORT_DIPLOCATION("SW(C):8")
3006   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
3007   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3008INPUT_PORTS_END
3009
3010
29043011static INPUT_PORTS_START( sfzch )
29053012   PORT_START("IN0")     /* IN0 */
29063013   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_PLAYER(1)
r19542r19543
31353242   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
31363243MACHINE_CONFIG_END
31373244
3245static MACHINE_CONFIG_DERIVED( ganbare, cps1_10MHz )
3246
3247   /* basic machine hardware */
3248   MCFG_CPU_MODIFY("maincpu")
3249   MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state,  ganbare_interrupt)
3250
3251   MCFG_M48T35_ADD("m48t35")
3252MACHINE_CONFIG_END
3253
31383254/* bootlegs with PIC */
31393255
31403256static MACHINE_CONFIG_START( cpspicb, cps_state )
r19542r19543
1072310839   ROM_LOAD( "c632.ic1",     0x0000, 0x0117, CRC(0fbd9270) SHA1(d7e737b20c44d41e29ca94be56114b31934dde81) )
1072410840ROM_END
1072510841
10842/* B-Board 91634B-2 */
10843ROM_START( ganbare )
10844   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
10845   ROM_LOAD16_WORD_SWAP( "mrnj_23d.8f", 0x00000, 0x80000, CRC(f929be72) SHA1(d175bdcace469277479ef85bf4e1b9d5a63cffde) )
10846
10847   ROM_REGION( 0x400000, "gfx", 0 )
10848   ROMX_LOAD( "mrnj_01.3a",  0x000000, 0x80000, CRC(3f878020) SHA1(b18faa50d88c76d19db1af73cf4b3095e928f51f) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-5m.4a
10849   ROMX_LOAD( "mrnj_02.4a",  0x000002, 0x80000, CRC(3e5624d8) SHA1(502e4897916af1c9e121b096de1369d06f1ffe87) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-7m.6a
10850   ROMX_LOAD( "mrnj_03.5a",  0x000004, 0x80000, CRC(d1e61f96) SHA1(5f6dee8adbf83c697416e440fbdd3a84a6e698da) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-1m.3a
10851   ROMX_LOAD( "mrnj_04.6a",  0x000006, 0x80000, CRC(d241971b) SHA1(b641740b40a043affbb79ea91ba12f821a259bad) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-3m.5a
10852   ROMX_LOAD( "mrnj_05.7a",  0x200000, 0x80000, CRC(c0a14562) SHA1(2fb6cf98fed83ac92c33df9526102a101454e276) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-6m.4c
10853   ROMX_LOAD( "mrnj_06.8a",  0x200002, 0x80000, CRC(e6a71dfc) SHA1(67178b020f87fb28ef35292d008ce9b80e02a2db) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-8m.6c
10854   ROMX_LOAD( "mrnj_07.9a",  0x200004, 0x80000, CRC(99afb6c7) SHA1(5caead2b71cd54f6b53765f09829cc9e92e1e2d6) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-2m.3c
10855   ROMX_LOAD( "mrnj_08.10a", 0x200006, 0x80000, CRC(52882c20) SHA1(5e3fca6da3470aeb78534f01e1575d8c0e067c0e) , ROM_GROUPWORD | ROM_SKIP(6) )   // == kd-4m.5c
10856
10857   ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
10858   ROM_LOAD( "mrnj_09.12c",  0x00000, 0x08000, CRC(62470d72) SHA1(1de357a20f794defb49ed01af5b95ad00e2aa1d9) )   // == kd_9.12a
10859   ROM_CONTINUE(           0x10000, 0x08000 )
10860
10861   ROM_REGION( 0x40000, "oki", 0 )   /* Samples */
10862   ROM_LOAD( "mrnj_18.11c",  0x00000, 0x20000, CRC(08e13940) SHA1(5c7dd7ff6a66f100b59cf9244e78f2c8702faca1) )
10863   ROM_LOAD( "mrnj_19.12c",  0x20000, 0x20000, CRC(5fa59927) SHA1(f05246cf566c214b008a91816c71e7c03b7cc218) )
10864   
10865   ROM_REGION( 0x8000, "timekeeper", 0) /* Timekeeper internal RAM was dumped (but game overwrites it - should I keep this here or remove it?) */
10866   ROM_LOAD( "m48t35y.9n", 0x00000, 0x8000, CRC(96107b4a) SHA1(be9149736030e06c96083dcac73b5be3dbc318ac) )
10867
10868   ROM_REGION( 0x0200, "aboardplds", 0 )
10869   ROM_LOAD( "buf1",         0x0000, 0x0117, CRC(eb122de7) SHA1(b26b5bfe258e3e184f069719f9fd008d6b8f6b9b) )
10870   ROM_LOAD( "ioa1",         0x0000, 0x0117, CRC(59c7ee3b) SHA1(fbb887c5b4f5cb8df77cec710eaac2985bc482a6) )
10871   ROM_LOAD( "prg1",         0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) )
10872   ROM_LOAD( "rom1",         0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) )
10873   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
10874
10875   ROM_REGION( 0x0200, "bboardplds", 0 )
10876   ROM_LOAD( "gbp.1a",       0x0000, 0x0117, NO_DUMP )
10877   ROM_LOAD( "iob1.12e",     0x0000, 0x0117, NO_DUMP )
10878   ROM_LOAD( "bprg1.11e",    0x0000, 0x0117, NO_DUMP )
10879ROM_END
10880
1072610881/* Home 'CPS Changer' Unit - For MESS */
1072710882
1072810883/* B-Board 91635B-2 */
r19542r19543
1103011185   DRIVER_INIT_CALL(pang3b);
1103111186}
1103211187
11188READ16_MEMBER(cps_state::ganbare_ram_r)
11189{
11190   device_t *device = machine().device("m48t35");
11191   UINT16 result = 0xffff;
11192   
11193   if ((mem_mask & 0x00ff) != 0)
11194      result = (result & ~0x00ff) | timekeeper_r(device, space, offset);
11195   if ((mem_mask & 0xff00) != 0)
11196      result = (result & ~0xff00) | (m_ganbare_shared_ram[offset] << 8);
11197   
11198   return result;
11199}
11200
11201WRITE16_MEMBER(cps_state::ganbare_ram_w)
11202{
11203   device_t *device = machine().device("m48t35");
11204
11205   if ((mem_mask & 0x00ff) != 0)
11206      timekeeper_w(device, space, offset, data & 0xff);
11207   if ((mem_mask & 0xff00) != 0)
11208      m_ganbare_shared_ram[offset] = data >> 8;
11209}
11210
11211DRIVER_INIT_MEMBER(cps_state, ganbare)
11212{
11213   DRIVER_INIT_CALL(cps1);
11214   
11215   /* ram is shared between the CPS work ram and the timekeeper ram */
11216   m_ganbare_shared_ram = auto_alloc_array(machine(), UINT16, 0x10000 / 2);
11217   save_pointer(NAME(m_ganbare_shared_ram), 0x10000 / 2);
11218   machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0xff0000, 0xffffff, read16_delegate(FUNC(cps_state::ganbare_ram_r),this), write16_delegate(FUNC(cps_state::ganbare_ram_w),this));
11219}
11220
1103311221DRIVER_INIT_MEMBER(cps_state,dinohunt)
1103411222{
1103511223   // is this shared with the new sound hw?
r19542r19543
1120111389GAME( 1995, megaman,     0,        cps1_12MHz, megaman,  cps_state,   cps1,     ROT0,   "Capcom", "Mega Man: The Power Battle (CPS1, USA 951006)", GAME_SUPPORTS_SAVE )
1120211390GAME( 1995, megamana,    megaman,  cps1_12MHz, megaman,  cps_state,   cps1,     ROT0,   "Capcom", "Mega Man: The Power Battle (CPS1, Asia 951006)", GAME_SUPPORTS_SAVE )
1120311391GAME( 1995, rockmanj,    megaman,  cps1_12MHz, rockmanj, cps_state,   cps1,     ROT0,   "Capcom", "Rockman: The Power Battle (CPS1, Japan 950922)", GAME_SUPPORTS_SAVE )
11392GAME( 2000, ganbare,     0,        ganbare,    ganbare,  cps_state,   ganbare,  ROT0,   "Capcom", "Ganbare Marin-kun (Marine 2K0411 JPN)", GAME_SUPPORTS_SAVE )
1120411393
1120511394/* Games released on CPS-1 hardware by Mitchell */
1120611395
trunk/src/mame/mame.lst
r19542r19543
30173017megamana      // 06/10/1995 (c) 1995 (Asia)
30183018rockmanj      // 22/09/1995 (c) 1995 (Japan)
30193019fcrash         // bootleg of Final Fight
3020ganbare         // 11/04/2000
30203021
30213022// Capcom CPS2 games
30223023// list completed by CPS2Shock
trunk/src/mame/video/cps1.c
r19542r19543
14351435   {"pang3r1",     CPS_B_21_DEF, mapper_pang3 },   /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */   // should use one of these three CP1B1F,CP1B8K,CP1B9K
14361436   {"pang3j",      CPS_B_21_DEF, mapper_pang3 },   /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */   // should use one of these three CP1B1F,CP1B8K,CP1B9K
14371437   {"pang3b",      CPS_B_21_DEF, mapper_pang3 },   /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */   // should use one of these three CP1B1F,CP1B8K,CP1B9K
1438   {"ganbare",     CPS_B_21_DEF, mapper_sfzch },   /* no dump of PAL, using sfzch for now */
14381439
14391440   /* CPS Changer */
14401441
trunk/src/mame/includes/cps1.h
r19542r19543
9393   UINT16 *     m_cps2_buffered_obj;
9494   // game-specific
9595   UINT16 *     m_gigaman2_dummyqsound_ram;
96   UINT16 *     m_ganbare_shared_ram;
9697
9798   /* video-related */
9899   tilemap_t      *m_bg_tilemap[3];
r19542r19543
176177   DECLARE_WRITE16_MEMBER(cps1_coinctrl_w);
177178   DECLARE_READ16_MEMBER(qsound_sharedram1_r);
178179   DECLARE_WRITE16_MEMBER(qsound_sharedram1_w);
180   DECLARE_READ16_MEMBER(ganbare_ram_r);
181   DECLARE_WRITE16_MEMBER(ganbare_ram_w);
179182   DECLARE_WRITE16_MEMBER(cps1_cps_a_w);
180183   DECLARE_READ16_MEMBER(cps1_cps_b_r);
181184   DECLARE_WRITE16_MEMBER(cps1_cps_b_w);
r19542r19543
200203   DECLARE_DRIVER_INIT(dino);
201204   DECLARE_DRIVER_INIT(punisher);
202205   DECLARE_DRIVER_INIT(wof);
206   DECLARE_DRIVER_INIT(ganbare);
203207   DECLARE_DRIVER_INIT(cps2_video);
204208   DECLARE_DRIVER_INIT(cps2);
205209   DECLARE_DRIVER_INIT(cps2crpt);
r19542r19543
218222   DECLARE_MACHINE_START(cps2);
219223   DECLARE_VIDEO_START(cps2);
220224   DECLARE_MACHINE_START(qsound);
225   DECLARE_MACHINE_START(ganbare);
221226   DECLARE_MACHINE_RESET(cps);
222227   DECLARE_VIDEO_START(cps);
223228   UINT32 screen_update_cps1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
224229   void screen_eof_cps1(screen_device &screen, bool state);
225230   INTERRUPT_GEN_MEMBER(cps1_interrupt);
226231   INTERRUPT_GEN_MEMBER(cps1_qsound_interrupt);
232   INTERRUPT_GEN_MEMBER(ganbare_interrupt);
233   TIMER_CALLBACK_MEMBER(ganbare_interrupt4);
227234   TIMER_DEVICE_CALLBACK_MEMBER(cps2_interrupt);
228235   
229236   /* fcrash handlers */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team