5 #include "fcs_trg_base.h"
15 void fcs_trg_base::stage_3_202201(
link_t link[], u_short *dsm_out)
19 if( (link[0].d[0] & 0x01) || (link[2].d[0] & 0x01) ) *dsm_out |= 0x1;
20 if( (link[0].d[0] & 0x02) || (link[2].d[0] & 0x02) ) *dsm_out |= 0x2;
21 if( (link[0].d[0] & 0x01) && (link[2].d[0] & 0x01) ) *dsm_out |= 0x4;
22 if( (link[0].d[1] & 0x01) || (link[2].d[1] & 0x01) ) *dsm_out |= 0x8;
23 if( (link[0].d[1] & 0x02) || (link[2].d[1] & 0x02) ) *dsm_out |= 0x10;
24 if( (link[0].d[1] & 0x01) && (link[2].d[1] & 0x01) ) *dsm_out |= 0x20;
25 if( (link[0].d[2] & 0x01) || (link[2].d[2] & 0x01) ) *dsm_out |= 0x40;
26 if( (link[0].d[2] & 0x02) || (link[2].d[2] & 0x02) ) *dsm_out |= 0x80;
27 if( (link[0].d[3] & 0x01) || (link[2].d[3] & 0x01) ) *dsm_out |= 0x100;
28 if( (link[0].d[4] & 0x01) || (link[2].d[4] & 0x01) ) *dsm_out |= 0x200;
29 if( (link[0].d[5] & 0x01) || (link[2].d[5] & 0x01) ) *dsm_out |= 0x400;
30 if( (link[0].d[5] & 0x02) || (link[2].d[5] & 0x02) ) *dsm_out |= 0x800;
35 printf(
"FCS STG3 input 0 = %02x %02x %02x %02x %02x %02x %02x %02x\n",
36 link[0].d[0],link[0].d[1],link[0].d[2],link[0].d[3],
37 link[0].d[4],link[0].d[5],link[0].d[6],link[0].d[7]);
38 printf(
"FCS STG3 input 1 = %02x %02x %02x %02x %02x %02x %02x %02x\n",
39 link[2].d[0],link[2].d[1],link[2].d[2],link[2].d[3],
40 link[2].d[4],link[2].d[5],link[2].d[6],link[2].d[7]);
41 printf(
"FCS STG3 output = %04x EM=%1d%1d%1d ELE=%1d%1d%1d GAM=%1d%1d HAD=%1d JP=%1d TOT=%1d%1d\n",
43 (*dsm_out)>>0 & 0x1,(*dsm_out)>>1 & 0x1,(*dsm_out)>>2 & 0x1,
44 (*dsm_out)>>3 & 0x1,(*dsm_out)>>4 & 0x1,(*dsm_out)>>5 & 0x1,
45 (*dsm_out)>>6 & 0x1,(*dsm_out)>>7 & 0x1,
48 (*dsm_out)>>10 & 0x1,(*dsm_out)>>11 & 0x1);