- Timestamp:
- Nov 15, 2017 1:05:01 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/DevPS2.cpp
r69500 r69704 661 661 PDMBOTHCBDECL(int) kbdIOPortDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb) 662 662 { 663 uint32_t fluff = 0; 664 KBDState *pThis = PDMINS_2_DATA(pDevIns, KBDState *); 665 663 666 NOREF(pvUser); 664 if (cb == 1) 665 { 666 KBDState *pThis = PDMINS_2_DATA(pDevIns, KBDState *); 667 *pu32 = kbd_read_data(pThis, Port); 667 switch (cb) { 668 case 4: 669 fluff |= 0xffff0000; /* Crazy Apple (Darwin 6.0.2 and earlier). */ 670 RT_FALL_THRU(); 671 case 2: 672 fluff |= 0x0000ff00; 673 RT_FALL_THRU(); 674 case 1: 675 *pu32 = fluff | kbd_read_data(pThis, Port); 668 676 Log2(("kbdIOPortDataRead: Port=%#x cb=%d *pu32=%#x\n", Port, cb, *pu32)); 669 677 return VINF_SUCCESS; 670 } 671 AssertMsgFailed(("Port=%#x cb=%d\n", Port, cb)); 672 return VERR_IOM_IOPORT_UNUSED; 678 default: 679 AssertMsgFailed(("Port=%#x cb=%d\n", Port, cb)); 680 return VERR_IOM_IOPORT_UNUSED; 681 } 673 682 } 674 683 … … 712 721 PDMBOTHCBDECL(int) kbdIOPortStatusRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb) 713 722 { 714 uint 16_t fluff = 0;723 uint32_t fluff = 0; 715 724 KBDState *pThis = PDMINS_2_DATA(pDevIns, KBDState *); 716 725 717 726 NOREF(pvUser); 718 727 switch (cb) { 728 case 4: 729 fluff |= 0xffff0000; /* Crazy Apple (Darwin 6.0.2 and earlier). */ 730 RT_FALL_THRU(); 719 731 case 2: 720 fluff = 0xff00;732 fluff |= 0x0000ff00; 721 733 RT_FALL_THRU(); 722 734 case 1:
Note:
See TracChangeset
for help on using the changeset viewer.