trunk/src/mame/machine/3do.c
| r20175 | r20176 | |
| 119 | 119 | { |
| 120 | 120 | /* |
| 121 | 121 | x--- fablode flag (wtf?) |
| 122 | | -x-- cascade flag (TODO: not knowing the timing also means that this one would be VERY slow if implemented) |
| 122 | -x-- cascade flag |
| 123 | 123 | --x- reload flag |
| 124 | 124 | ---x decrement flag (enable) |
| 125 | 125 | */ |
| 126 | 126 | UINT8 timer_flag; |
| 127 | UINT8 carry_val; |
| 127 | 128 | |
| 129 | carry_val = 1; |
| 130 | |
| 128 | 131 | for(int i = 0;i < 16; i++) |
| 129 | 132 | { |
| 130 | 133 | timer_flag = (m_clio.timer_ctrl >> i*4) & 0xf; |
| 131 | 134 | |
| 132 | 135 | if(timer_flag & 1) |
| 133 | 136 | { |
| 134 | | m_clio.timer_count[i]--; |
| 137 | if(timer_flag & 4) |
| 138 | m_clio.timer_count[i]-=carry_val; |
| 139 | else |
| 140 | m_clio.timer_count[i]--; |
| 135 | 141 | |
| 136 | 142 | if(m_clio.timer_count[i] == 0xffffffff) // timer hit |
| 137 | 143 | { |
| 138 | 144 | if(i & 1) // odd timer irq fires |
| 139 | 145 | m_3do_request_fiq(8 << (7-(i >> 1)),0); |
| 140 | 146 | |
| 147 | carry_val = 1; |
| 148 | |
| 141 | 149 | if(timer_flag & 2) |
| 150 | { |
| 142 | 151 | m_clio.timer_count[i] = m_clio.timer_backup[i]; |
| 152 | } |
| 143 | 153 | else |
| 144 | 154 | m_clio.timer_ctrl &= ~(1 << i*4); |
| 145 | 155 | } |
| 156 | else |
| 157 | carry_val = 0; |
| 146 | 158 | } |
| 147 | 159 | } |
| 148 | 160 | } |
| r20175 | r20176 | |
| 871 | 883 | m_clio.slack = data & 0x000003ff; |
| 872 | 884 | break; |
| 873 | 885 | |
| 886 | |
| 874 | 887 | case 0x0308/4: |
| 875 | 888 | m_clio.dmareqdis = data; |
| 876 | 889 | break; |