Package com.loomcom.symon

Examples of com.loomcom.symon.Cpu


    private       Memory rom;


    public SymonMachine() throws Exception {
        this.bus = new Bus(BUS_BOTTOM, BUS_TOP);
        this.cpu = new Cpu();
        this.ram = new Memory(MEMORY_BASE, MEMORY_BASE + MEMORY_SIZE - 1, false);
        this.pia = new Via6522(PIA_BASE);
        this.acia = new Acia6551(ACIA_BASE);
        this.crtc = new Crtc(CRTC_BASE, ram);
View Full Code Here


    private       Memory rom;


    public MulticompMachine() throws Exception {
        this.bus = new Bus(BUS_BOTTOM, BUS_TOP);
        this.cpu = new Cpu();
        this.ram = new Memory(MEMORY_BASE, MEMORY_BASE + MEMORY_SIZE - 1, false);
        this.acia = new Acia6850(ACIA_BASE);
        this.acia.setBaudRate(0);
        this.sdController = new SdController(SD_BASE);
View Full Code Here

    private final Cpu cpu;

    public SimpleMachine() throws MemoryRangeException {
        this.bus = new Bus(BUS_BOTTOM, BUS_TOP);
        this.ram = new Memory(BUS_BOTTOM, BUS_TOP, false);
        this.cpu = new Cpu();

        bus.addCpu(cpu);
        bus.addDevice(ram);
    }
View Full Code Here

    /**
     * Update the display based on the current state of the CPU.
     */
    public void updateState() {
        Cpu cpu = machine.getCpu();
        Cpu.CpuState cpuState = cpu.getCpuState();

        // Update the Processor Status Flag display
        int status = cpuState.getStatusFlag();

        carryFlagLabel.setIcon(iconForFlag(status, 0));
        zeroFlagLabel.setIcon(iconForFlag(status, 1));
        irqDisableFlagLabel.setIcon(iconForFlag(status, 2));
        decimalModeFlagLabel.setIcon(iconForFlag(status, 3));
        breakFlagLabel.setIcon(iconForFlag(status, 4));
        overflowFlagLabel.setIcon(iconForFlag(status, 6));
        negativeFlagLabel.setIcon(iconForFlag(status, 7));

        // Update the register and address displays
        opcodeField.setText(cpu.getCpuState().disassembleOp());
        pcField.setText(cpu.getProgramCounterStatus());
        spField.setText(cpu.getStackPointerStatus());
        aField.setText(cpu.getAccumulatorStatus());
        xField.setText(cpu.getXRegisterStatus());
        yField.setText(cpu.getYRegisterStatus());

        repaint();
    }
View Full Code Here

TOP

Related Classes of com.loomcom.symon.Cpu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.