Package com.loomcom.symon.exceptions

Examples of com.loomcom.symon.exceptions.MemoryAccessException


    @Override
    public void write(int address, int data) throws MemoryAccessException {
        Register[] registers = Register.values();

        if (address >= registers.length) {
            throw new MemoryAccessException("Unknown register: " + address);
        }

        Register r = registers[address];

        switch (r) {
View Full Code Here


    @Override
    public int read(int address) throws MemoryAccessException {
        Register[] registers = Register.values();

        if (address >= registers.length) {
            throw new MemoryAccessException("Unknown register: " + address);
        }

        Register r = registers[address];

        switch (r) {
View Full Code Here

                break;
        }

        if (startAddress + pageSize > memory.endAddress()) {
            startAddress = oldStartAddress;
            throw new MemoryAccessException("Cannot draw screen starting at selected address.");
        }

        if (cursorPosition > memory.endAddress()) {
            cursorPosition = oldCursorPosition;
            throw new MemoryAccessException("Cannot position cursor past end of memory.");
        }


        notifyListeners();
    }
View Full Code Here

                return rxRead();
            case STAT_REG:
                return statusReg();

            default:
                throw new MemoryAccessException("No register.");
        }
    }
View Full Code Here

                break;
            case CTRL_REG:
                setCommandRegister(data);
                break;
            default:
                throw new MemoryAccessException("No register.");
        }
    }
View Full Code Here

            case CMND_REG:
                return commandRegister;
            case CTRL_REG:
                return controlRegister;
            default:
                throw new MemoryAccessException("No register.");
        }
    }
View Full Code Here

                break;
            case 3:
                setControlRegister(data);
                break;
            default:
                throw new MemoryAccessException("No register.");
        }
    }
View Full Code Here

            MemoryRange range = d.getMemoryRange();
            int devAddr = address - range.startAddress();
            return d.read(devAddr) & 0xff;
        }
       
        throw new MemoryAccessException("Bus read failed. No device at address " + String.format("$%04X", address));
    }
View Full Code Here

            int devAddr = address - range.startAddress();
            d.write(devAddr, value);
            return;
        }
       
        throw new MemoryAccessException("Bus write failed. No device at address " + String.format("$%04X", address));
    }
View Full Code Here

TOP

Related Classes of com.loomcom.symon.exceptions.MemoryAccessException

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.