示例#1
0
 /** @see org.jnode.driver.video.vgahw.VgaIO#setDACData(int) */
 public void setDACData(int data) {
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   ports.outPortByte(HDR_HIDDEN_DAC_REGISTER, data);
 }
示例#2
0
 /** @see org.jnode.driver.video.vgahw.VgaIO#getDACData() */
 public int getDACData() {
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
   return ports.inPortByte(HDR_HIDDEN_DAC_REGISTER);
 }
示例#3
0
  /** Not implemented by kvm's cirrus emulation! */
  public boolean getDDC1Bit() {

    ports.outPortByte(SRX_SEQUENCER_INDEX, SR8_DDC2B);
    int data = ports.inPortByte(SRX_SEQUENCER_DATA) & 0xFF;

    if ((data & 0x40) == 0) {
      log.error("DDC2B/I2C configured in EEPROM mode!");
      return false;
    }

    // Anything else to check?

    return (data & (1 << 7)) != 0;
  }
示例#4
0
 /**
  * Gets the contents of the select register
  *
  * @return the contents of the select register
  */
 public final int getSelectReg() {
   return cmdBlock.inPortByte(cmdBlockStart + RW8_SELECT_OFFSET);
 }
示例#5
0
 /** Gets the combined cylinder value out the the cylinder LSB and MSB registers. */
 protected final int getCylinderRegs() {
   final int lsb = cmdBlock.inPortByte(cmdBlockStart + RW8_CYLINDER_LSB_OFFSET);
   final int msb = cmdBlock.inPortByte(cmdBlockStart + RW8_CYLINDER_MSB_OFFSET);
   return ((msb & 0xFF) << 8) | (lsb & 0xFF);
 }
示例#6
0
 /**
  * Gets the contents of the LBA high register
  *
  * @return the contents of the LBA high register
  */
 public final int getLbaHighReg() {
   return cmdBlock.inPortByte(cmdBlockStart + RW8_LBA_HIGH_OFFSET);
 }
示例#7
0
 /**
  * Gets the contents of the LBA mid register
  *
  * @return the contents of the LBA mid register
  */
 public final int getLbaMidReg() {
   return cmdBlock.inPortByte(cmdBlockStart + RW8_LBA_MID_OFFSET);
 }
示例#8
0
 /**
  * Gets the contents of the LBA low register
  *
  * @return the contents of the LBA low register
  */
 public final int getLbaLowReg() {
   return cmdBlock.inPortByte(cmdBlockStart + RW8_LBA_LOW_OFFSET);
 }
示例#9
0
 /**
  * Gets the contents of the sector register
  *
  * @return the contents of the sector register
  */
 public final int getSectorReg() {
   return cmdBlock.inPortByte(cmdBlockStart + RW8_SECTOR_OFFSET);
 }
示例#10
0
 /** @see org.jnode.driver.video.vgahw.VgaIO#getSEQ(int) */
 public int getSEQ(int index) {
   ports.outPortByte(SRX_SEQUENCER_INDEX, (byte) index);
   return ports.inPortByte(SRX_SEQUENCER_DATA) & 0xff;
 }
示例#11
0
 /** Gets the start of frame (SOF) modify register */
 protected final int getStartOfFrame() {
   return io.inPortByte(base + USBSOF);
 }
示例#12
0
 /** @see org.jnode.driver.video.vgahw.VgaIO#getCRT(int) */
 public int getCRT(int index) {
   ports.outPortByte(CRX_CRTC_INDEX, index);
   return ports.inPortByte(CRX_CRTC_DATA);
 }
示例#13
0
 /** @see org.jnode.driver.video.vgahw.VgaIO#getSTAT() */
 public int getSTAT() {
   return ports.inPortByte(STAT_INPUT_STATUS_REGISTER1) & 0xff;
 }
示例#14
0
 /**
  * Gets the status of the IDE controller. Any pending IRQ is reset.
  *
  * @return the status of the IDE controller. Any pending IRQ is reset.
  */
 public final int getStatusReg() {
   return cmdBlock.inPortByte(cmdBlockStart + R8_STATUS_OFFSET);
 }
示例#15
0
 /**
  * Gets the contents of the error register
  *
  * @return the contents of the error register
  */
 public final int getErrorReg() {
   return cmdBlock.inPortByte(cmdBlockStart + R8_ERROR_OFFSET);
 }
示例#16
0
 /**
  * Gets the alternative status of the IDE controller. Any pending IRQ is NOT reset.
  *
  * @return the alternative status of the IDE controller
  */
 public final int getAltStatusReg() {
   return ctrlBlock.inPortByte(altStatusPort);
 }
示例#17
0
 /** @see org.jnode.driver.video.vgahw.VgaIO#getMISC() */
 public int getMISC() {
   return ports.inPortByte(MISC_MISCELLANEOUS_OUTPUT_READ) & 0xff;
 }