private byte readByte(int address) {
		byte value = (byte)0x00;
		
		if (address >= 0 && address < MAX_ADDRESS_SPACE) {
			
			if (map[address] == HARDWARE_ACCESS) {
				
				switch (address) {
				
				case PORT_A_DATA:
					// TODO make specific bits readable based on data direction value?
					// allow reads if data direction is set to input (0x00)
					if (memory[UnsignedData.convertShortToUnsignedShort(PORT_A_DATA_DIRECTION)] == (byte)0x00) {
						value = memory[address];
					}
					else {
						// give error?
					}
					break;
					
				case PORT_A_DATA_DIRECTION:
					value = memory[address];
					break;
					
				default:
					value = memory[address];
					break;
				}
			}
			
			else if (map[address] == RAM_MEMORY) {
				value = memory[address];
			}
			
			else if (map[address] == ROM_MEMORY) {
				value = memory[address];
			}
			
			else if (map[address] == NOTHING_ATTACHED) {
				// give error?
			}
		}
		
		return value;
	}