Previous 199869 Revisions Next

r21937 Monday 18th March, 2013 at 11:59:52 UTC by Robbbert
knightsb - saving wip. Game is almost playable.
[src/mame/drivers]fcrash.c
[src/mame/includes]cps1.h
[src/mame/video]cps1.c

trunk/src/mame/video/cps1.c
r21936r21937
13651365   {"knightsu",    CPS_B_21_BT4, mapper_KR63B,  0x36, 0, 0x34 },
13661366   {"knightsj",    CPS_B_21_BT4, mapper_KR63B,  0x36, 0, 0x34 },
13671367   {"knightsja",   CPS_B_21_BT4, mapper_KR63B,  0x36, 0, 0x34 },   // wrong, this set uses KR22B, still not dumped
1368   {"knightsb",    CPS_B_21_BT4, mapper_KR63B,  0x36, 0, 0x34 },   // wrong, knightsb bootleg doesn't use the KR63B PAL
1368   //{"knightsb",    CPS_B_21_BT4, mapper_KR63B,  0x36, 0, 0x34 },   // wrong, knightsb bootleg doesn't use the KR63B PAL
13691369   {"sf2ce",       CPS_B_21_DEF, mapper_S9263B, 0x36 },
13701370   {"sf2ceea",     CPS_B_21_DEF, mapper_S9263B, 0x36 },
13711371   {"sf2ceua",     CPS_B_21_DEF, mapper_S9263B, 0x36 },
trunk/src/mame/includes/cps1.h
r21936r21937
248248   /* fcrash handlers */
249249   DECLARE_DRIVER_INIT(kodb);
250250   DECLARE_DRIVER_INIT(cawingbl);
251   DECLARE_DRIVER_INIT(knightsb);
251252   DECLARE_DRIVER_INIT(sf2mdt);
252253   DECLARE_DRIVER_INIT(sf2mdta);
253254   DECLARE_MACHINE_START(fcrash);
trunk/src/mame/drivers/fcrash.c
r21936r21937
168168WRITE16_MEMBER(cps_state::knightsb_layer_w)
169169{
170170   if (offset == 0x05)
171      m_cps_a_regs[0x14 / 2] = data + 0xffce; /* scroll 3x */
171      m_cps_a_regs[0x14 / 2] = data; /* scroll 3x */
172172   else
173173   if (offset == 0x04)
174174      m_cps_a_regs[0x16 / 2] = data; /* scroll 3y */
175175   else
176176   if (offset == 0x03)
177      m_cps_a_regs[0x10 / 2] = data + 0xffce; /* scroll 2x */
177      m_cps_a_regs[0x10 / 2] = data; /* scroll 2x */
178178   else
179179   if (offset == 0x01)
180      m_cps_a_regs[0x0c / 2] = data + 0xffc2; /* scroll 1x */
180      m_cps_a_regs[0x0c / 2] = data; /* scroll 1x */
181181   else
182182   if (offset == 0x02)
183183   {
r21936r21937
189189      m_cps_a_regs[0x0e / 2] = data; /* scroll 1y - fixes scroll of high scores */
190190   else
191191   if (offset == 0x06)
192   {
193      switch (data)
194      {
195      case 0x0000:
196      case 0x001f:
197      case 0x00ff:
198         data = 0x12f2;
199         break;
200      case 0x2000:
201         data = 0x06f2;
202         break;
203      case 0xa000:
204         data = 0x24d0;
205         break;
206      default:
207         printf ("Unknown control word = %X\n",data);
208         data = 0x12c0;
209      }
192210      m_cps_b_regs[m_layer_enable_reg / 2] = data;
211   }
193212   else
194213   if (offset == 0x10)
195214      m_cps_b_regs[m_layer_mask_reg[1] / 2] = data;
r21936r21937
466485   AM_RANGE(0x000000, 0x3fffff) AM_ROM
467486   AM_RANGE(0x800000, 0x800001) AM_READ_PORT("IN1")            /* Player input ports */
468487   AM_RANGE(0x800002, 0x800003) AM_READ_PORT("IN2")//(cps1_in2_r)            /* Player 3 controls */
488   AM_RANGE(0x800004, 0x800005) AM_WRITENOP // writes 0000 here
469489   AM_RANGE(0x800006, 0x800007) AM_WRITE(fcrash_soundlatch_w)    /* Sound command */
470490   AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_dsw_r)            /* System input ports / Dip Switches */
471491   AM_RANGE(0x800030, 0x800037) AM_WRITENOP //AM_WRITE(cps1_coinctrl_w) only writes bit 15
472   AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_SHARE("cps_a_regs")  /* CPS-A custom */
473   AM_RANGE(0x800140, 0x80017f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) AM_SHARE("cps_b_regs")    /* CPS-B custom */
474   AM_RANGE(0x800180, 0x800181) AM_WRITE(cps1_soundlatch2_w)   /* Sound timer fade */
475   AM_RANGE(0x880000, 0x880001) AM_WRITENOP //?
492   AM_RANGE(0x800100, 0x80013f) AM_RAM AM_SHARE("cps_a_regs")  /* CPS-A custom */
493   AM_RANGE(0x800140, 0x80017f) AM_RAM AM_SHARE("cps_b_regs")  /* CPS-B custom */
494   AM_RANGE(0x800180, 0x800181) AM_WRITENOP //AM_WRITE(cps1_soundlatch2_w)   /* Sound timer fade */
495   AM_RANGE(0x880000, 0x880001) AM_WRITENOP // unknown
476496   AM_RANGE(0x900000, 0x93ffff) AM_RAM_WRITE(cps1_gfxram_w) AM_SHARE("gfxram")
477497   AM_RANGE(0x980000, 0x98002f) AM_WRITE(knightsb_layer_w)
478   AM_RANGE(0x991000, 0x993fff) AM_WRITENOP // could be bootleg_sprite_ram
479498   AM_RANGE(0xff0000, 0xffffff) AM_RAM
480499ADDRESS_MAP_END
481500
r21936r21937
543562static ADDRESS_MAP_START( knightsb_z80map, AS_PROGRAM, 8, cps_state )
544563   AM_RANGE(0x0000, 0x7fff) AM_ROM
545564   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
565   AM_RANGE(0xcffe, 0xcfff) AM_WRITENOP // writes lots of data
546566   AM_RANGE(0xd000, 0xd7ff) AM_RAM
547567   AM_RANGE(0xd800, 0xd801) AM_DEVREADWRITE("2151", ym2151_device, read, write)
548568   AM_RANGE(0xdc00, 0xdc00) AM_READ(soundlatch_byte_r)
r21936r21937
11611181   m_audiocpu = machine().device<cpu_device>("audiocpu");
11621182   m_msm_1 = machine().device<msm5205_device>("msm1");
11631183   m_msm_2 = machine().device<msm5205_device>("msm2");
1164   m_layer_enable_reg = 0x20;
1184   m_layer_enable_reg = 0x30;
11651185   m_layer_mask_reg[0] = 0x28;
11661186   m_layer_mask_reg[1] = 0x2a;
11671187   m_layer_mask_reg[2] = 0x2c;
11681188   m_layer_mask_reg[3] = 0x2e;
1169   m_layer_scroll1x_offset = 0;
1170   m_layer_scroll2x_offset = 0;
1171   m_layer_scroll3x_offset = 0;
1189   m_layer_scroll1x_offset = 0x3e; //text
1190   m_layer_scroll2x_offset = 0x3c; //bricks around scores
1191   m_layer_scroll3x_offset = 0x40; //hill with sword going in
11721192   m_sprite_base = 0x1000;
1173   m_sprite_list_end_marker = 0xffff;
1193   m_sprite_list_end_marker = 0x8000;
11741194   m_sprite_x_offset = 0;
11751195}
11761196
r21936r21937
13431363   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
13441364   MCFG_SCREEN_SIZE(64*8, 32*8)
13451365   MCFG_SCREEN_VISIBLE_AREA(8*8, (64-8)*8-1, 2*8, 30*8-1 )
1346   MCFG_SCREEN_UPDATE_DRIVER(cps_state, screen_update_cps1)
1366   MCFG_SCREEN_UPDATE_DRIVER(cps_state, screen_update_fcrash)
13471367   MCFG_SCREEN_VBLANK_DRIVER(cps_state, screen_eof_cps1)
13481368
13491369   MCFG_GFXDECODE(cps1)
r21936r21937
17771797      rom[i + 6] = tmp;
17781798   }
17791799
1780   machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x70c018, 0x70c01f, read16_delegate(FUNC(cps_state::cps1_dsw_r),this));
1781   machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x708000, 0x708fff, write16_delegate(FUNC(cps_state::sf2mdt_layer_w),this));
1782   machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_port(0x70c000, 0x70c001, "IN1");
1783   machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_port(0x70c008, 0x70c009, "IN2");
1784
1785   /* bootleg sprite ram */
1786   m_bootleg_sprite_ram = (UINT16*)machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x700000, 0x703fff);
1787   machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram); /* both of these need to be mapped - see the "Magic Delta Turbo" text on the title screen  */
1788   machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x70c106, 0x70c107, write16_delegate(FUNC(cps_state::cawingbl_soundlatch_w),this));
1789
1790   machine().device("maincpu")->memory().space(AS_PROGRAM).unmap_write(0x800030, 0x800031); /* coin lockout doesn't work (unmap it) */
1791
1792   DRIVER_INIT_CALL(cps1);
1800   DRIVER_INIT_CALL(sf2mdta);
17931801}
17941802
17951803DRIVER_INIT_MEMBER(cps_state, sf2mdta)
r21936r21937
18111819   DRIVER_INIT_CALL(cps1);
18121820}
18131821
1822DRIVER_INIT_MEMBER(cps_state, knightsb)
1823{
1824   /* bootleg sprite ram */
1825   m_bootleg_sprite_ram = (UINT16*)machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x990000, 0x993fff);
18141826
1827   DRIVER_INIT_CALL(cps1);
1828}
1829
1830
18151831GAME( 1990, fcrash,    ffight,  fcrash,    fcrash,   cps_state, cps1,     ROT0,   "bootleg (Playmark)", "Final Crash (bootleg of Final Fight)", GAME_SUPPORTS_SAVE )
18161832GAME( 1991, kodb,      kod,     kodb,      kodb,     cps_state, kodb,     ROT0,   "bootleg (Playmark)", "The King of Dragons (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // 910731  "ETC"
1817GAME( 1991, knightsb,  knights, knightsb,  knights,  cps_state, cps1,    ROT0,   "bootleg", "Knights of the Round (bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )    // 911127 - based on World version
1833GAME( 1991, knightsb,  knights, knightsb,  knights,  cps_state, knightsb, ROT0,   "bootleg", "Knights of the Round (bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )    // 911127 - based on World version
18181834GAME( 1990, cawingbl,  cawing,  cawingbl,  cawingbl, cps_state, cawingbl, ROT0,   "bootleg", "Carrier Air Wing (bootleg with 2xYM2203 + 2xMSM205 set 1)", GAME_SUPPORTS_SAVE )
18191835GAME( 1990, cawingb2,  cawing,  cawingbl,  cawingbl, cps_state, cawingbl, ROT0,   "bootleg", "Carrier Air Wing (bootleg with 2xYM2203 + 2xMSM205 set 2)", GAME_SUPPORTS_SAVE )
18201836GAME( 1992, sf2mdt,    sf2ce,   sf2mdt,    sf2mdt,   cps_state, sf2mdt,   ROT0,   "bootleg", "Street Fighter II': Magic Delta Turbo (bootleg, set 1)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )   // 920313 - based on (heavily modified) World version

Previous 199869 Revisions Next


© 1997-2024 The MAME Team