Ejemplo n.º 1
0
void mfp_put_tcr(mfp_t * const mfp, int timer, int v, const bogoc68_t bogoc)
{
  timer &= 3;

  if (timer < TIMER_C) {
    /* Timer A or B */
    mfp->map[0x19+2*timer] = v;
    /* $$$ Event mode + Pulse mode not emulate */
    if (v&0x10) {
      if (mfp_feature) fprintf(stderr,"timer-%c: mode(%02x) not supported\n",
	      timer_def[timer].letter,(int)(u8)v);
    }
    mfp_put_tcr_bogo(mfp->timers+timer, v&7, bogoc);
  } else {
    /* Timer C and D */
    mfp->map[0x1D] = v;
    mfp_put_tcr_bogo(mfp->timers+TIMER_C, (v>>4)&7, bogoc);
    mfp_put_tcr_bogo(mfp->timers+TIMER_D,  v    &7, bogoc);
  }
}
Ejemplo n.º 2
0
void mfp_put_tcr(mfp_t * const mfp,
                 int timer, int68_t v, const bogoc68_t bogoc)
{
  timer &= 3;
  if (timer < TIMER_C) {
    /* Timer A or B */
    mfp->map[0x19+2*timer] = v;
    /* $$$ Event mode + Pulse mode is NOT simulate yet ! */
    if (v&0x10) {
      TRACE68(mfp_cat,
            MYHD "timer-%c -- mode not supported --  %02x\n",
            timer_def[timer].letter,(int)(u8)v);
      assert(0 == "mfp mode not supported");
    }
    mfp_put_tcr_bogo(mfp->timers+timer, v&7, bogoc);
  } else {
    /* Timer C and D */
    mfp->map[0x1D] = v;
    mfp_put_tcr_bogo(mfp->timers+TIMER_C, (v>>4)&7, bogoc);
    mfp_put_tcr_bogo(mfp->timers+TIMER_D,  v    &7, bogoc);
  }
}