public void performHdma() {
		int dmaSrc = (unsign(registers[0x51]) << 8) +
		(unsign(registers[0x52]) & 0xF0);
		int dmaDst = ((unsign(registers[0x53]) & 0x1F) << 8) +
		(unsign(registers[0x54]) & 0xF0) + 0x8000;

		//  System.out.println("Copied 16 bytes from " + JavaBoy.hexWord(dmaSrc) + " to " + JavaBoy.hexWord(dmaDst));

		for (int r = 0; r < 16; r++) {
			dmgcpu.addressWrite(dmaDst + r, dmgcpu.addressRead(dmaSrc + r));
		}

		dmaSrc += 16;
		dmaDst += 16;
		registers[0x51] = (byte) ((dmaSrc & 0xFF00) >> 8);
		registers[0x52] = (byte) (dmaSrc & 0x00F0);
		registers[0x53] = (byte) ((dmaDst & 0x1F00) >> 8);
		registers[0x54] = (byte) (dmaDst & 0x00F0);

		int len = unsign(registers[0x55]);
		if (len == 0x00) {
			registers[0x55] = (byte) 0xFF;
			hdmaRunning = false;
		} else {
			len--;
			registers[0x55] = (byte) len;
		}

	}