Previous 199869 Revisions Next

r19422 Sunday 9th December, 2012 at 05:10:30 UTC by Robbbert
Fixed sf2mdta, inproved sf2mdt [Barry Harris]
- removed hack for row scroll table address in sf2mdt (bootleg layer render code doesn't use table, and the game isn't writing the address anywhere, hence the presence of the hack)
- aligned scroll 2 layer in sf2mdt
- boosted interleave when writing sound command to fix the issue of voice's being dropped
- decoded graphics in sf2mdta correctly
- hooked up sf2mdta reads and writes the same as sf2mdt with different a layer write layout
- hooked up sf2mdta work ram
[src/mame/drivers]fcrash.c
[src/mame/includes]cps1.h

trunk/src/mame/drivers/fcrash.c
r19421r19422
6464   {
6565      state->soundlatch_byte_w(space, 0, data  >> 8);
6666      state->m_audiocpu->set_input_line(0, HOLD_LINE);
67      machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); /* boost the interleave or some voices get dropped */
6768   }
6869}
6970
r19421r19422
120121   state->m_sample_buffer2 = data;
121122}
122123
124/* not verified */
125#define CPS1_ROWSCROLL_OFFS     (0x20/2)    /* base of row scroll offsets in other RAM */
123126
124127WRITE16_MEMBER(cps_state::kodb_layer_w)
125128{
r19421r19422
140143{
141144   cps_state *state = space.machine().driver_data<cps_state>();
142145   
143   /* layer enable and scroll registers are written here - passing them to m_cps_b_regs and m_cps_a_regs for now for drawing routines */
146   /* layer enable and scroll registers are written here - passing them to m_cps_b_regs and m_cps_a_regs for now for drawing routines
147   the scroll layers aren't buttery smooth, due to the lack of using the row scroll address tables in the rendering code, this is also
148   supported by the fact that the game doesn't write the table address anywhere */
149   
144150   if (offset == 0x0086)
145151      state->m_cps_a_regs[0x14 / 2] = data + 0xffce; /* scroll 3x */
146152   else
r19421r19422
148154      state->m_cps_a_regs[0x16 / 2] = data; /* scroll 3y */
149155   else
150156   if (offset == 0x0088)
151      state->m_cps_a_regs[0x10 / 2] = data + 0xffcd; /* scroll 2x */
157      state->m_cps_a_regs[0x10 / 2] = data + 0xffce; /* scroll 2x */
152158   else
153159   if (offset == 0x0089)
154160      state->m_cps_a_regs[0x0c / 2] = data + 0xffca; /* scroll 1x */
155161   else
156162   if (offset == 0x008a) {
157163      state->m_cps_a_regs[0x12 / 2] = data; /* scroll 2y */
158      state->m_cps_a_regs[0x20 / 2] = data; /* row scroll start */
159      state->m_cps_a_regs[0x08 / 2] = m_bootleg_work_ram[0x802e / 2]; /* pretty gross hack?, but the row scroll table address isn't written anywhere else */
164      state->m_cps_a_regs[CPS1_ROWSCROLL_OFFS] = data; /* row scroll start */
160165   } else   
161166   if (offset == 0x008b)
162167      state->m_cps_a_regs[0x0e / 2] = data; /* scroll 1y */
r19421r19422
165170      state->m_cps_b_regs[m_layer_enable_reg / 2] = data;
166171}
167172
173WRITE16_MEMBER(cps_state::sf2mdta_layer_w)
174{
175   cps_state *state = space.machine().driver_data<cps_state>();
176   
177   /* layer enable and scroll registers are written here - passing them to m_cps_b_regs and m_cps_a_regs for now for drawing routines
178   the scroll layers aren't buttery smooth, due to the lack of using the row scroll address tables in the rendering code, this is also
179   supported by the fact that the game doesn't write the table address anywhere */
180   
181   if (offset == 0x0086)
182      state->m_cps_a_regs[0x0c / 2] = data + 0xffbe; /* scroll 1x */
183   else
184   if (offset == 0x0087)
185      state->m_cps_a_regs[0x0e / 2] = data; /* scroll 1y */
186   else
187   if (offset == 0x0088)
188      state->m_cps_a_regs[0x14 / 2] = data + 0xffce; /* scroll 3x */
189   else
190   if (offset == 0x0089) {
191      state->m_cps_a_regs[0x12 / 2] = data; /* scroll 2y */
192      state->m_cps_a_regs[CPS1_ROWSCROLL_OFFS] = data; /* row scroll start */
193   } else
194   if (offset == 0x008a)
195      state->m_cps_a_regs[0x10 / 2] = data + 0xffce; /* scroll 2x */
196   else
197   if (offset == 0x008b)
198      state->m_cps_a_regs[0x16 / 2] = data; /* scroll 3y */
199   else
200   if (offset == 0x00a6)
201      state->m_cps_b_regs[m_layer_enable_reg / 2] = data;
202}
168203
169/* not verified */
170#define CPS1_ROWSCROLL_OFFS     (0x20/2)    /* base of row scroll offsets in other RAM */
171204
172205static void fcrash_update_transmasks( running_machine &machine )
173206{
r19421r19422
928961   m_layer_scroll3x_offset = 0;
929962   m_sprite_base = 0x1000;
930963   m_sprite_list_end_marker = 0x8000;
931   m_sprite_x_offset = 3;
964   m_sprite_x_offset = 2;
932965
933966   save_item(NAME(m_sample_buffer1));
934967   save_item(NAME(m_sample_buffer2));
r19421r19422
12961329   ROM_LOAD16_BYTE( "4.mdta", 0x100001, 0x20000, CRC(bd98ff15) SHA1(ed902d949b0b5c5beaaea78a4b418ffa6db9e1df) )
12971330
12981331   ROM_REGION( 0x600000, "gfx", 0 )
1299   ROMX_LOAD( "pf4 sh058.ic89", 0x000000, 0x80000, BAD_DUMP CRC(40fdf624) SHA1(cb928602744bf36e6851527f00d90da29de751e6), ROM_GROUPWORD | ROM_SKIP(6) )
1300   ROM_CONTINUE(                0x000002, 0x80000)
1301   ROMX_LOAD( "pf7 sh072.ic92", 0x000004, 0x80000, CRC(fb78022e) SHA1(b8974387056dd52db96b01cc4648edc814398c7e), ROM_GROUPWORD | ROM_SKIP(6) )
1302   ROM_CONTINUE(                0x000006, 0x80000)
1303   ROMX_LOAD( "pf5 sh036.ic90", 0x200000, 0x80000, CRC(0a6be48b) SHA1(b7e72c94d4e3eb4a6bba6608d9b9a093c8901ad9), ROM_GROUPWORD | ROM_SKIP(6) )
1304   ROM_CONTINUE(                0x200002, 0x80000)
1305   ROMX_LOAD( "pf8 sh074.ic93", 0x200004, 0x80000, CRC(6258c7cf) SHA1(4cd7519245c0aa816934a43e6743160f715d7dc2), ROM_GROUPWORD | ROM_SKIP(6) )
1306   ROM_CONTINUE(                0x200006, 0x80000)
1307   ROMX_LOAD( "pf6 sh070.ic88", 0x400000, 0x80000, CRC(9b5b09d7) SHA1(698a6aab41e495bd0c37a19aee16a84f04d15797), ROM_GROUPWORD | ROM_SKIP(6) )
1308   ROM_CONTINUE(                0x400002, 0x80000)
1309   ROMX_LOAD( "pf9 sh001.ic91", 0x400004, 0x80000, CRC(9f25090e) SHA1(12ff0431ef6550db446985c8914ac7d78eec6b6d), ROM_GROUPWORD | ROM_SKIP(6) )
1310   ROM_CONTINUE(                0x400006, 0x80000)
1332   ROMX_LOAD( "pf4 sh058.ic89", 0x000000, 0x100000, BAD_DUMP CRC(40fdf624) SHA1(cb928602744bf36e6851527f00d90da29de751e6), ROM_GROUPWORD | ROM_SKIP(2) )
1333   ROMX_LOAD( "pf7 sh072.ic92", 0x000002, 0x100000, CRC(fb78022e) SHA1(b8974387056dd52db96b01cc4648edc814398c7e), ROM_GROUPWORD | ROM_SKIP(2) )
1334   ROMX_LOAD( "pf5 sh036.ic90", 0x200000, 0x100000, CRC(0a6be48b) SHA1(b7e72c94d4e3eb4a6bba6608d9b9a093c8901ad9), ROM_GROUPWORD | ROM_SKIP(2) )
1335   ROMX_LOAD( "pf8 sh074.ic93", 0x200002, 0x100000, CRC(6258c7cf) SHA1(4cd7519245c0aa816934a43e6743160f715d7dc2), ROM_GROUPWORD | ROM_SKIP(2) )
1336   ROMX_LOAD( "pf6 sh070.ic88", 0x400000, 0x100000, CRC(9b5b09d7) SHA1(698a6aab41e495bd0c37a19aee16a84f04d15797), ROM_GROUPWORD | ROM_SKIP(2) )
1337   ROMX_LOAD( "pf9 sh001.ic91", 0x400002, 0x100000, CRC(9f25090e) SHA1(12ff0431ef6550db446985c8914ac7d78eec6b6d), ROM_GROUPWORD | ROM_SKIP(2) )
13111338
13121339   ROM_REGION( 0x30000, "soundcpu", 0 ) /* Sound program + samples  */
13131340   ROM_LOAD( "1.ic28",    0x00000, 0x20000, CRC(d5bee9cc) SHA1(e638cb5ce7a22c18b60296a7defe8b03418da56c) )
r19421r19422
14061433   
14071434   /* bootleg sprite ram */
14081435   m_bootleg_sprite_ram = (UINT16*)machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x700000, 0x703fff);
1409   machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram); /* both of these need to be mapped */
1436   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  */
14101437   machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x70c106, 0x70c107, write16_delegate(FUNC(cps_state::cawingbl_soundlatch_w),this));
14111438   
1412   m_bootleg_work_ram = (UINT16*)machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0xff0000, 0xffffff);
1439   machine().device("maincpu")->memory().space(AS_PROGRAM).unmap_write(0x800030, 0x800031); /* coin lockout doesn't work (unmap it) */
1440
1441   DRIVER_INIT_CALL(cps1);
1442}
1443
1444DRIVER_INIT_MEMBER(cps_state, sf2mdta)
1445{
1446   machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x70c018, 0x70c01f, read16_delegate(FUNC(cps_state::cps1_dsw_r),this));
1447   machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x708000, 0x708fff, write16_delegate(FUNC(cps_state::sf2mdta_layer_w),this));
1448   machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_port(0x70c000, 0x70c001, "IN1");
1449   machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_port(0x70c008, 0x70c009, "IN2");
14131450   
1451   /* bootleg sprite ram */
1452   m_bootleg_sprite_ram = (UINT16*)machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x700000, 0x703fff);
1453   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 */
1454   machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x70c106, 0x70c107, write16_delegate(FUNC(cps_state::cawingbl_soundlatch_w),this));
1455   
1456   m_bootleg_work_ram = (UINT16*)machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0xfc0000, 0xfcffff); /* this has moved */
1457   
14141458   machine().device("maincpu")->memory().space(AS_PROGRAM).unmap_write(0x800030, 0x800031); /* coin lockout doesn't work (unmap it) */
14151459
14161460   DRIVER_INIT_CALL(cps1);
r19421r19422
14211465GAME( 1991, kodb,      kod,     kodb,      kodb,     cps_state, kodb,     ROT0,   "bootleg (Playmark)", "The King of Dragons (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )   // 910731  "ETC"
14221466GAME( 1990, cawingbl,  cawing,  cawingbl,  cawingbl, cps_state, cawingbl, ROT0,   "bootleg", "Carrier Air Wing (bootleg with 2xYM2203 + 2xMSM205 set 1)", GAME_SUPPORTS_SAVE )
14231467GAME( 1990, cawingb2,  cawing,  cawingbl,  cawingbl, cps_state, cawingbl, ROT0,   "bootleg", "Carrier Air Wing (bootleg with 2xYM2203 + 2xMSM205 set 2)", GAME_SUPPORTS_SAVE )
1424GAME( 1992, sf2mdt,    sf2ce,   sf2mdt,    sf2mdt,   cps_state, sf2mdt,   ROT0,   "bootleg", "Street Fighter II': Magic Delta Turbo (bootleg, set 1)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )   // 920313 - based on (heavily modified) World version
1425GAME( 1992, sf2mdta,   sf2ce,   sf2mdt,    sf2mdt,   cps_state, sf2mdt,   ROT0,   "bootleg", "Street Fighter II': Magic Delta Turbo (bootleg, set 2)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )   // 920313 - based on World version
1468GAME( 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
1469GAME( 1992, sf2mdta,   sf2ce,   sf2mdt,    sf2mdt,   cps_state, sf2mdta,  ROT0,   "bootleg", "Street Fighter II': Magic Delta Turbo (bootleg, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )   // 920313 - based on World version
14261470GAME( 199?, sgyxz,     wof,     sgyxz,     fcrash,   cps_state, cps1,     ROT0,   "bootleg (All-In Electronic)", "Warriors of Fate ('sgyxz' bootleg)", GAME_NOT_WORKING | GAME_NO_SOUND )
trunk/src/mame/includes/cps1.h
r19421r19422
170170   DECLARE_READ16_MEMBER(qsound_sharedram2_r);
171171   DECLARE_WRITE16_MEMBER(qsound_sharedram2_w);
172172   DECLARE_WRITE8_MEMBER(qsound_banksw_w);
173   DECLARE_READ16_MEMBER(sf2mdt_r);
174173   DECLARE_READ16_MEMBER(sf2rb_prot_r);
175174   DECLARE_READ16_MEMBER(sf2rb2_prot_r);
176175   DECLARE_READ16_MEMBER(cps1_dsw_r);
r19421r19422
198197   DECLARE_DRIVER_INIT(pang3);
199198   DECLARE_DRIVER_INIT(sf2ee);
200199   DECLARE_DRIVER_INIT(cps1);
201   DECLARE_DRIVER_INIT(sf2mdt);
202200   DECLARE_DRIVER_INIT(dino);
203201   DECLARE_DRIVER_INIT(punisher);
204202   DECLARE_DRIVER_INIT(wof);
r19421r19422
231229   /* fcrash handlers */
232230   DECLARE_DRIVER_INIT(kodb);
233231   DECLARE_DRIVER_INIT(cawingbl);
232   DECLARE_DRIVER_INIT(sf2mdt);
233   DECLARE_DRIVER_INIT(sf2mdta);
234234   DECLARE_MACHINE_START(fcrash);
235235   DECLARE_MACHINE_RESET(fcrash);
236236   DECLARE_MACHINE_START(kodb);
r19421r19422
239239   DECLARE_WRITE16_MEMBER(kodb_layer_w);
240240   DECLARE_WRITE16_MEMBER(cawingbl_soundlatch_w);
241241   DECLARE_WRITE16_MEMBER(sf2mdt_layer_w);
242   DECLARE_WRITE16_MEMBER(sf2mdta_layer_w);
242243   UINT32 screen_update_fcrash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
243244};
244245

Previous 199869 Revisions Next


© 1997-2024 The MAME Team