trunk/src/mame/includes/scramble.h
| r242648 | r242649 | |
| 22 | 22 | optional_shared_ptr<UINT8> m_soundram; |
| 23 | 23 | |
| 24 | 24 | UINT8 m_cavelon_bank; |
| 25 | | UINT8 m_security_2B_counter; |
| 26 | | UINT8 m_xb; |
| 27 | 25 | |
| 28 | 26 | // harem |
| 29 | 27 | UINT8 m_harem_decrypt_mode; |
| r242648 | r242649 | |
| 83 | 81 | DECLARE_DRIVER_INIT(billiard); |
| 84 | 82 | DECLARE_MACHINE_RESET(scramble); |
| 85 | 83 | DECLARE_MACHINE_RESET(explorer); |
| 86 | | DECLARE_WRITE8_MEMBER(scramble_protection_w); |
| 87 | | DECLARE_READ8_MEMBER(scramble_protection_r); |
| 88 | 84 | DECLARE_WRITE_LINE_MEMBER(scramble_sh_7474_q_callback); |
| 89 | 85 | void cavelon_banksw(); |
| 90 | 86 | inline int bit(int i,int n); |
trunk/src/mame/machine/scramble.c
| r242648 | r242649 | |
| 19 | 19 | |
| 20 | 20 | if (m_audiocpu != NULL) |
| 21 | 21 | sh_init(); |
| 22 | | |
| 23 | | m_security_2B_counter = 0; |
| 24 | 22 | } |
| 25 | 23 | |
| 26 | 24 | MACHINE_RESET_MEMBER(scramble_state,explorer) |
| r242648 | r242649 | |
| 49 | 47 | |
| 50 | 48 | /* state of the security PAL (6J) */ |
| 51 | 49 | |
| 52 | | WRITE8_MEMBER(scramble_state::scramble_protection_w) |
| 53 | | { |
| 54 | | m_xb = data; |
| 55 | | } |
| 56 | 50 | |
| 57 | | READ8_MEMBER(scramble_state::scramble_protection_r) |
| 58 | | { |
| 59 | | switch (m_maincpu->pc()) |
| 60 | | { |
| 61 | | case 0x00a8: return 0xf0; |
| 62 | | case 0x00be: return 0xb0; |
| 63 | | case 0x0c1d: return 0xf0; |
| 64 | | case 0x0c6a: return 0xb0; |
| 65 | | case 0x0ceb: return 0x40; |
| 66 | | case 0x0d37: return 0x60; |
| 67 | | case 0x1ca2: return 0x00; /* I don't think it's checked */ |
| 68 | | case 0x1d7e: return 0xb0; |
| 69 | | default: |
| 70 | | logerror("%s: read protection\n",machine().describe_context()); |
| 71 | | return 0; |
| 72 | | } |
| 73 | | } |
| 74 | | |
| 75 | | |
| 76 | 51 | READ8_MEMBER(scramble_state::mariner_protection_1_r ) |
| 77 | 52 | { |
| 78 | 53 | return 7; |