Previous 199869 Revisions Next

r20176 Thursday 10th January, 2013 at 13:29:22 UTC by Angelo Salese
Added Cascade mechanism, expects a DSPP irq now ...
[src/mame/machine]3do.c

trunk/src/mame/machine/3do.c
r20175r20176
119119{
120120   /*
121121      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
123123      --x- reload flag
124124      ---x decrement flag (enable)
125125   */
126126   UINT8 timer_flag;
127   UINT8 carry_val;
127128
129   carry_val = 1;
130
128131   for(int i = 0;i < 16; i++)
129132   {
130133      timer_flag = (m_clio.timer_ctrl >> i*4) & 0xf;
131134
132135      if(timer_flag & 1)
133136      {
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]--;
135141
136142         if(m_clio.timer_count[i] == 0xffffffff) // timer hit
137143         {
138144            if(i & 1) // odd timer irq fires
139145               m_3do_request_fiq(8 << (7-(i >> 1)),0);
140146
147            carry_val = 1;
148
141149            if(timer_flag & 2)
150            {
142151               m_clio.timer_count[i] = m_clio.timer_backup[i];
152            }
143153            else
144154               m_clio.timer_ctrl &= ~(1 << i*4);
145155         }
156         else
157            carry_val = 0;
146158      }
147159   }
148160}
r20175r20176
871883      m_clio.slack = data & 0x000003ff;
872884      break;
873885
886
874887   case 0x0308/4:
875888      m_clio.dmareqdis = data;
876889      break;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team