示例#1
0
 public void setBCD6(BCD6 bcd6) // with sign extension
 {
     for (int i = 0; i < 6; i++)
     {
         digits[i] = bcd6.digits[i];
     }
     if (bcd6.isNegative())
     {
         for (int i = 6; i < DIGITS; i++)
         {
             digits[i] = 9;
         }
     }
     else
     {
         for (int i = 6; i < DIGITS; i++)
         {
             digits[i] = 0;
         }
     }
 }
示例#2
0
// Start is called before the first frame update
    void Start()
    {
        accumulators = new BCD10[10]; // accumulators[0] holds content to be displayed, not 0.
        for (int i = 0; i < 10; i++)
        {
            accumulators[i] = new BCD10();
        }

        currentOrder     = new BCD10();
        siriusOperand    = new BCD6();
        effectiveOperand = new BCD10();

        mainStore = new UInt64[mainStoreSize];

        primaryInputMicroProgram = new UInt64[] {
            0x0000007140L, 0x0000065440L, 0x0000001544L, 0x0000001544L, 0x0000003954L,
            0x0000005500L, 0x0000006051L, 0x0000010010L, 0x0000007140L, 0x0000025940L,
            0x0000009900L
        };

        mask66_68 = new byte[, ] // in the order: N+b, a
        {
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
            { 0, 0, 2, 2, 4, 5, 5, 7, 7, 9 },
            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
            { 0, 0, 0, 0, 4, 5, 5, 5, 5, 9 },
            { 0, 0, 0, 0, 0, 5, 5, 5, 5, 5 },
            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
            { 0, 0, 2, 2, 4, 5, 5, 7, 7, 9 },
            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
            { 0, 0, 0, 0, 4, 5, 5, 5, 5, 9 }
        };
        mask65_67 = new byte[, ] // in the order: N+b, a
        {
            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 1, 2, 3, 0, 0, 1, 2, 3, 0 },
            { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 1, 2, 3, 0, 0, 1, 2, 3, 0 }
        };

        cycleTimes = new float[]
        {
            0.00008f, 0.00008f, 0.00008f, 0.00008f, 0.00008f,
            0.00008f,
            0.00004f, 0.00002f, 0.00001f, 0.000005f, 0.0000025f
        };
        cycleFactors = new uint[]
        {
            4167, 2083, 1042, 100, 10,
            1,
            1, 1, 1, 1, 1
        };

        cycleTime          = cycleTimes[5];
        cycleFactor        = cycleFactors[5];
        isPrimaryInput     = false;
        isStopped99        = false;
        isStoppedByError   = false;
        isStoppedKB        = false;
        isStopped6910      = false;
        isRetrying         = false;
        isRetryingForFrame = false;
        isWaitingR         = false;
        isWaitingP         = false;
        isRBusy            = false; // only when no tape
        isPBusy            = false; // always false
        flagOVR            = false;

        flagInputAccepted = false;

        delayLinePos = 0;
        timeLeft     = 0.0f;
    }
示例#3
0
 public BCD10(BCD6 bcd6) // with sign extension
 {
     digits = new byte[DIGITS];
     setBCD6(bcd6);
 }