trunk/src/mess/drivers/ng_aes.c
| r19395 | r19396 | |
| 39 | 39 | - NeoCDZ runs, the original NeoCD does not |
| 40 | 40 | - Might think the tray is open? (check) |
| 41 | 41 | - Some unknown / unhandled CD commands, code is still a bit messy |
| 42 | | - Games using Raster Effects are broken, even non-IRQ based ones like mosyougi |
| 43 | | - Are we overloading the CPU with interrupts from the CDC, incorrect masking? or something else? |
| 42 | - CDDA continues to play during loading, should stop it |
| 43 | - Games using Raster Effects are broken without a kludge |
| 44 | - CPU gets overloaded with IRQs from the timer callback... |
| 44 | 45 | - Double Dragon doesn't load, it erases the IRQ table |
| 45 | 46 | - might need better handling of the Vector Table Mapping, or better interrupts (see point above) |
| 46 | 47 | - Softlist are based on an old Tosec set and should be updated to the TruRip set once we can convert CCD |
| r19395 | r19396 | |
| 133 | 134 | DECLARE_READ16_MEMBER(aes_in0_r); |
| 134 | 135 | DECLARE_READ16_MEMBER(aes_in1_r); |
| 135 | 136 | DECLARE_READ16_MEMBER(aes_in2_r); |
| 136 | | DECLARE_DRIVER_INIT(neogeo); |
| 137 | |
| 137 | 138 | DECLARE_MACHINE_START(neocd); |
| 138 | 139 | DECLARE_MACHINE_START(neogeo); |
| 139 | 140 | DECLARE_MACHINE_RESET(neogeo); |
| r19395 | r19396 | |
| 171 | 172 | |
| 172 | 173 | UINT8 nTransferWriteEnable; |
| 173 | 174 | |
| 174 | | address_space* curr_space; |
| 175 | bool prohibit_cdc_irq; // hack? |
| 176 | |
| 177 | DECLARE_DRIVER_INIT(neogeo); |
| 178 | |
| 179 | DECLARE_DRIVER_INIT(neocdz); |
| 180 | DECLARE_DRIVER_INIT(neocdzj); |
| 181 | |
| 175 | 182 | }; |
| 176 | 183 | |
| 177 | 184 | |
| r19395 | r19396 | |
| 472 | 479 | { |
| 473 | 480 | // not a good idea, causes hangs |
| 474 | 481 | // m_tempcdc->NeoCDCommsReset(); |
| 482 | |
| 483 | // I doubt this is correct either, but we need something to stop |
| 484 | // the interrupts during gameplay and I'm not sure what... |
| 485 | prohibit_cdc_irq = true; |
| 475 | 486 | } |
| 487 | else |
| 488 | { |
| 489 | prohibit_cdc_irq = false; |
| 490 | } |
| 476 | 491 | } |
| 477 | 492 | break; |
| 478 | 493 | } |
| r19395 | r19396 | |
| 1073 | 1088 | |
| 1074 | 1089 | MACHINE_START_MEMBER(ng_aes_state,neocd) |
| 1075 | 1090 | { |
| 1076 | | // UINT8* ROM = machine().root_device().memregion("mainbios")->base(); |
| 1077 | | // UINT8* RAM = machine().root_device().memregion("maincpu")->base(); |
| 1078 | | // UINT8* Z80bios = machine().root_device().memregion("audiobios")->base(); |
| 1079 | | // int x; |
| 1080 | 1091 | m_has_audio_banking = false; |
| 1081 | 1092 | m_is_cartsys = false; |
| 1082 | 1093 | |
| r19395 | r19396 | |
| 1093 | 1104 | m_memcard_data = auto_alloc_array_clear(machine(), UINT8, 0x2000); |
| 1094 | 1105 | save_pointer(NAME(m_memcard_data), 0x2000); |
| 1095 | 1106 | |
| 1096 | | // copy initial 68k vectors into RAM |
| 1097 | | // memcpy(RAM,ROM,0x80); |
| 1098 | | |
| 1099 | | |
| 1100 | | |
| 1101 | | |
| 1102 | 1107 | // for custom vectors |
| 1103 | 1108 | machine().device("maincpu")->execute().set_irq_acknowledge_callback(neocd_int_callback); |
| 1104 | 1109 | |
| 1105 | 1110 | neogeo_set_main_cpu_vector_table_source(machine(), 0); // default to the BIOS vectors |
| 1106 | 1111 | |
| 1107 | 1112 | m_tempcdc->reset_cd(); |
| 1108 | | |
| 1109 | 1113 | } |
| 1110 | 1114 | |
| 1111 | 1115 | |
| r19395 | r19396 | |
| 1564 | 1568 | |
| 1565 | 1569 | nIRQAcknowledge |= (byteValue & 0x38); |
| 1566 | 1570 | |
| 1567 | | if ((nIRQAcknowledge & 0x08) == 0) { |
| 1568 | | nNeoCDIRQVector = 0x17; |
| 1569 | | nNeoCDIRQVectorAck = 1; |
| 1570 | | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); |
| 1571 | | return; |
| 1571 | if (!prohibit_cdc_irq) |
| 1572 | { |
| 1573 | if ((nIRQAcknowledge & 0x08) == 0) { |
| 1574 | nNeoCDIRQVector = 0x17; |
| 1575 | nNeoCDIRQVectorAck = 1; |
| 1576 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); |
| 1577 | return; |
| 1578 | } |
| 1579 | if ((nIRQAcknowledge & 0x10) == 0) { |
| 1580 | nNeoCDIRQVector = 0x16; |
| 1581 | nNeoCDIRQVectorAck = 1; |
| 1582 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); |
| 1583 | return; |
| 1584 | } |
| 1585 | if ((nIRQAcknowledge & 0x20) == 0) { |
| 1586 | nNeoCDIRQVector = 0x15; |
| 1587 | nNeoCDIRQVectorAck = 1; |
| 1588 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); |
| 1589 | return; |
| 1590 | } |
| 1572 | 1591 | } |
| 1573 | | if ((nIRQAcknowledge & 0x10) == 0) { |
| 1574 | | nNeoCDIRQVector = 0x16; |
| 1575 | | nNeoCDIRQVectorAck = 1; |
| 1576 | | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); |
| 1577 | | return; |
| 1578 | | } |
| 1579 | | if ((nIRQAcknowledge & 0x20) == 0) { |
| 1580 | | nNeoCDIRQVector = 0x15; |
| 1581 | | nNeoCDIRQVectorAck = 1; |
| 1582 | | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); |
| 1583 | | return; |
| 1584 | | } |
| 1585 | 1592 | } |
| 1586 | 1593 | |
| 1587 | 1594 | struct cdrom_interface neocd_cdrom = |
| r19395 | r19396 | |
| 1622 | 1629 | * |
| 1623 | 1630 | *************************************/ |
| 1624 | 1631 | |
| 1625 | | DRIVER_INIT_MEMBER(ng_aes_state,neogeo) |
| 1626 | | { |
| 1627 | | } |
| 1628 | 1632 | |
| 1629 | | |
| 1630 | 1633 | ROM_START( aes ) |
| 1631 | 1634 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) |
| 1632 | 1635 | ROM_SYSTEM_BIOS( 0, "jap-aes", "Japan AES" ) |
| r19395 | r19396 | |
| 1707 | 1710 | ROM_REGION( 0x20000, "fixed", ROMREGION_ERASEFF ) |
| 1708 | 1711 | /* 128KB of Text Tile RAM */ |
| 1709 | 1712 | |
| 1710 | | |
| 1711 | | |
| 1712 | | |
| 1713 | 1713 | ROM_REGION( 0x20000, "audiobios", ROMREGION_ERASEFF ) |
| 1714 | 1714 | ROM_REGION( 0x20000, "fixedbios", ROMREGION_ERASEFF ) |
| 1715 | 1715 | |
| r19395 | r19396 | |
| 1717 | 1717 | ROM_LOAD( "000-lo.lo", 0x00000, 0x20000, CRC(5a86cff2) SHA1(5992277debadeb64d1c1c64b0a92d9293eaf7e4a) ) |
| 1718 | 1718 | ROM_END |
| 1719 | 1719 | |
| 1720 | #define rom_neocdzj rom_neocdz |
| 1721 | |
| 1722 | DRIVER_INIT_MEMBER(ng_aes_state,neogeo) |
| 1723 | { |
| 1724 | } |
| 1725 | |
| 1726 | |
| 1720 | 1727 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 1721 | 1728 | CONS( 1990, aes, 0, 0, aes, aes, ng_aes_state, neogeo, "SNK", "Neo-Geo AES", 0) |
| 1722 | 1729 | |
| 1723 | | CONS( 1996, neocdz, 0, 0, neocd, aes, ng_aes_state, neogeo, "SNK", "Neo-Geo CDZ", GAME_NOT_WORKING ) // the CDZ is the newer slot-loading model, faster drive etc. |
| 1724 | | CONS( 1994, neocd, neocdz, 0, neocd, aes, ng_aes_state, neogeo, "SNK", "Neo-Geo CD", GAME_NOT_WORKING ) // older Top Loading model, ignores disc protections? |
| 1730 | DRIVER_INIT_MEMBER(ng_aes_state,neocdz) |
| 1731 | { |
| 1732 | NeoSystem = NEOCD_REGION_US; |
| 1733 | } |
| 1734 | |
| 1735 | DRIVER_INIT_MEMBER(ng_aes_state,neocdzj) |
| 1736 | { |
| 1737 | NeoSystem = NEOCD_REGION_JAPAN; |
| 1738 | } |
| 1739 | |
| 1740 | |
| 1741 | CONS( 1996, neocdz, 0, 0, neocd, aes, ng_aes_state, neocdz, "SNK", "Neo-Geo CDZ (US)", 0 ) // the CDZ is the newer model |
| 1742 | CONS( 1996, neocdzj, neocdz, 0, neocd, aes, ng_aes_state, neocdzj, "SNK", "Neo-Geo CDZ (Japan)", 0 ) |
| 1743 | |
| 1744 | |
| 1745 | CONS( 1994, neocd, neocdz, 0, neocd, aes, ng_aes_state, neogeo, "SNK", "Neo-Geo CD", GAME_NOT_WORKING ) // older model, ignores disc protections? |