protected void writeAddress(byte val) { /* >8C02, address write */ if (vdpaddrflag) { vdpaddr = (vdpaddr & 0xff) | (val << 8); } else { vdpaddr = (vdpaddr & 0xff00) | (val & 0xff); } if ((vdpaddrflag = !vdpaddrflag) == false) { if (dumpVdpAccess.getBoolean()) { PrintWriter pw = Logging.getLog(dumpFullInstructions); if (pw != null) pw.println("Address: " + HexUtils.toHex4(vdpaddr)); } if ((vdpaddr & 0x8000) != 0) { writeRegAddr(vdpaddr); vdpaddr &= 0x3fff; } else if ((vdpaddr & 0x4000) != 0) { vdpaddr &= 0x3fff; } else { // read ahead one byte vdpreadahead = videoMemory.readByte(vdpaddr); autoIncrementAddr(); } } }
protected byte readData() { /* >8800, memory read */ byte ret; ret = vdpreadahead; vdpreadahead = videoMemory.readByte(vdpaddr); autoIncrementAddr(); return ret; }