trunk/src/mame/drivers/fcrash.c
| r19422 | r19423 | |
| 31 | 31 | --- |
| 32 | 32 | |
| 33 | 33 | kodb has various graphical issues, mainly with old info not being cleared away. |
| 34 | | Also, when you are hit, you should flash, but you go invisible instead. |
| 34 | Also, it should be using a vblank irq value of 4. This triggers the following bootleg read/writes; |
| 35 | - IN1 is read at 0x992000 |
| 36 | - IN0 is read of 0x992008 |
| 37 | - dips continue to be read at 0x80001a |
| 38 | - sound command is wrote at 0x992006 |
| 39 | - scroll 1Y is wrote at 0x980000 |
| 40 | - scroll 1X is wrote at 0x980002 |
| 41 | - scroll 2Y is wrote at 0x980004 |
| 42 | - scroll 2X is wrote at 0x980006 |
| 43 | - scroll 3Y is wrote at 0x980008 |
| 44 | - scroll 3X is wrote at 0x98000a |
| 45 | - the layer enable and layer mask writes continue at 0x98000c and 0x980020-2 |
| 46 | |
| 47 | These read/writes are identical to those used by a Knights of the Round bootleg which uses the all sf2mdt sound |
| 48 | hardware. This set is currently non-working in cps1.c but I will move it here soon. |
| 35 | 49 | |
| 50 | This also prevents the game from toggling the sprite address at m_cps_a_regs[0], similar to other bootlegs. |
| 51 | Currently the game is working somewhat, but only using the code left over from the original. If anyone wants to |
| 52 | do any development work on the set, (eg, find the sprite clearing issue), then this should be changed as the game |
| 53 | likely won't write any sprite clearing values otherwise. |
| 54 | |
| 55 | None of this is hooked up currently due to issues with row scroll on the scroll2 layer. |
| 36 | 56 | */ |
| 37 | 57 | |
| 38 | 58 | #include "emu.h" |
| r19422 | r19423 | |
| 920 | 940 | m_layer_scroll1x_offset = 0; |
| 921 | 941 | m_layer_scroll2x_offset = 0; |
| 922 | 942 | m_layer_scroll3x_offset = 0; |
| 923 | | m_sprite_base = 0x50c8; |
| 943 | m_sprite_base = 0x1000; |
| 924 | 944 | m_sprite_list_end_marker = 0xffff; |
| 925 | 945 | m_sprite_x_offset = 0; |
| 926 | 946 | } |
| r19422 | r19423 | |
| 1396 | 1416 | machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x800018, 0x80001f, read16_delegate(FUNC(cps_state::cps1_dsw_r),this)); |
| 1397 | 1417 | machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x800180, 0x800187, write16_delegate(FUNC(cps_state::cps1_soundlatch_w),this)); |
| 1398 | 1418 | machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x980000, 0x98002f, write16_delegate(FUNC(cps_state::kodb_layer_w),this)); |
| 1419 | |
| 1420 | /* the original game alternates between 2 sprite ram areas to achieve flashing sprites - the bootleg doesn't do the write to the register to achieve this |
| 1421 | mapping both sprite ram areas to the same bootleg sprite ram - similar to how sf2mdt works */ |
| 1422 | m_bootleg_sprite_ram = (UINT16*)machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x900000, 0x902fff); |
| 1423 | machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x904000, 0x906fff, m_bootleg_sprite_ram); /* both of these need to be mapped */ |
| 1399 | 1424 | |
| 1400 | 1425 | DRIVER_INIT_CALL(cps1); |
| 1401 | 1426 | } |