Diff for /np2/bios/bios09.c between versions 1.3 and 1.9

version 1.3, 2003/12/12 01:04:39 version 1.9, 2005/02/07 14:46:07
Line 17  void bios0x09_init(void) { Line 17  void bios0x09_init(void) {
         SETBIOSMEM16(MEMW_KB_BUF_HEAD, 0x0502);          SETBIOSMEM16(MEMW_KB_BUF_HEAD, 0x0502);
         SETBIOSMEM16(MEMW_KB_BUF_TAIL, 0x0502);          SETBIOSMEM16(MEMW_KB_BUF_TAIL, 0x0502);
         SETBIOSMEM16(MEMW_KB_CODE_OFF, 0x0e00);          SETBIOSMEM16(MEMW_KB_CODE_OFF, 0x0e00);
         SETBIOSMEM16(MEMW_KB_CODE_SEG, 0xfd00);          SETBIOSMEM16(MEMW_KB_CODE_SEG, 0xfd80);
         keyboard_resetsignal();  
 }  }
   
 static void updateshiftkey(void) {  static void updateshiftkey(void) {
   
         BYTE    shiftsts;          UINT8   shiftsts;
         UINT    base;          UINT    base;
   
         shiftsts = mem[MEMB_SHIFT_STS];          shiftsts = mem[MEMB_SHIFT_STS];
         mem[0xa3ff6] &= 0x3f;                                                   // KEYBOARD LED          mem[MEMB_MSW6] &= 0x3f;                                                 // KEYBOARD LED
         mem[0xa3ff6] |= (BYTE)(shiftsts << 5);          mem[MEMB_MSW6] |= (UINT8)(shiftsts << 5);
         if (shiftsts & 0x10) {          if (shiftsts & 0x10) {
                 base = 7;                  base = 7;
         }          }
Line 47  static void updateshiftkey(void) { Line 46  static void updateshiftkey(void) {
   
 void bios0x09(void) {  void bios0x09(void) {
   
         BYTE    key;          UINT8   key;
         UINT    pos;          UINT    pos;
         BYTE    bit;          UINT8   bit;
         UINT16  code;          UINT16  code;
         UINT32  base;          UINT32  base;
         UINT    kbbuftail;          UINT    kbbuftail;
   
         key = iocore_inp8(0x41);          key = CPU_AL;
         pos = (key & 0x7f) >> 3;          pos = (key & 0x7f) >> 3;
         bit = 1 << (key & 7);          bit = 1 << (key & 7);
         if (!(key & 0x80)) {          if (!(key & 0x80)) {
                 mem[0x0052a + pos] |= bit;                  mem[MEMX_KB_KY_STS + pos] |= bit;
                 code = 0xffff;                  code = 0xffff;
                 base = GETBIOSMEM16(MEMW_KB_SHIFT_TBL);                  base = GETBIOSMEM16(MEMW_KB_SHIFT_TBL);
                 base += 0xfd000;                  base += 0xfd800;
                 if (key <= 0x51) {                  if (key <= 0x51) {
                         if ((key == 0x51) || (key == 0x35) || (key == 0x3e)) {                          if ((key == 0x51) || (key == 0x35) || (key == 0x3e)) {
                                 code = mem[base + key] << 8;                                  code = mem[base + key] << 8;
Line 86  void bios0x09(void) { Line 85  void bios0x09(void) {
                 }                  }
                 else {                  else {
                         if (key == 0x60) {                          if (key == 0x60) {
                                 CPU_INTERRUPT(6);  //                              CPU_INTERRUPT(6, -1);
                         }                          }
                         else if (key == 0x61) {                          else if (key == 0x61) {
                                 CPU_INTERRUPT(5);  //                              CPU_INTERRUPT(5, -1);
                         }                          }
                         else if (key < 0x70) {                          else if (key < 0x70) {
                                 code = mem[base + key - 0x0c] << 8;                                  code = mem[base + key - 0x0c] << 8;
Line 116  void bios0x09(void) { Line 115  void bios0x09(void) {
                 }                  }
         }          }
         else {          else {
                 mem[0x0052a + pos] &= ~bit;                  mem[MEMX_KB_KY_STS + pos] &= ~bit;
                 if ((key >= 0xf0) && (key < 0xf5)) {                  if ((key >= 0xf0) && (key < 0xf5)) {
                         mem[MEMB_SHIFT_STS] &= ~bit;                          mem[MEMB_SHIFT_STS] &= ~bit;
                         updateshiftkey();                          updateshiftkey();
                 }                  }
         }          }
         iocore_out8(0x00, 0x20);  
 }  }
   

Removed from v.1.3  
changed lines
  Added in v.1.9


RetroPC.NET-CVS <cvs@retropc.net>