()
| 806 | } |
| 807 | |
| 808 | func (c *CPU) refreshFlagStateGates() { |
| 809 | /* |
| 810 | // C |
| 811 | c.flagStateGates[0].Update(c.ir.Bit(12), c.flagsBus.GetOutputWire(FLAGS_BUS_CARRY)) |
| 812 | // A |
| 813 | c.flagStateGates[1].Update(c.ir.Bit(13), c.flagsBus.GetOutputWire(FLAGS_BUS_A_LARGER)) |
| 814 | // E |
| 815 | c.flagStateGates[2].Update(c.ir.Bit(14), c.flagsBus.GetOutputWire(FLAGS_BUS_EQUAL)) |
| 816 | // Z |
| 817 | c.flagStateGates[3].Update(c.ir.Bit(15), c.flagsBus.GetOutputWire(FLAGS_BUS_ZERO)) |
| 818 | */ |
| 819 | // C |
| 820 | c.flagStateGates[0].Update(c.ir.Bit(12), c.flagsBus.GetOutputWire(FLAGS_BUS_CARRY)) |
| 821 | // A |
| 822 | c.flagStateGates[1].Update(c.ir.Bit(13), c.flagsBus.GetOutputWire(FLAGS_BUS_A_LARGER)) |
| 823 | // E |
| 824 | c.flagStateGates[2].Update(c.ir.Bit(14), c.flagsBus.GetOutputWire(FLAGS_BUS_EQUAL)) |
| 825 | // Z |
| 826 | c.flagStateGates[3].Update(c.ir.Bit(15), c.flagsBus.GetOutputWire(FLAGS_BUS_ZERO)) |
| 827 | |
| 828 | c.flagStateORGate.Update( |
| 829 | c.flagStateGates[0].Output(), |
| 830 | c.flagStateGates[1].Output(), |
| 831 | c.flagStateGates[2].Output(), |
| 832 | c.flagStateGates[3].Output(), |
| 833 | ) |
| 834 | } |
| 835 | |
| 836 | func (c *CPU) runSetOnIO(state bool) { |
| 837 | c.ioBusSetGate.Update(state, c.step4Gate3And.Output()) |
no test coverage detected