Guest User

diff of fastdosbox

a guest
Feb 19th, 2014
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. diff /home/luke/Downloads/fastdosbox/fastdosbox-1.6/src/cpu/callback.cpp /home/luke/Downloads/db/dosbox-0.74/src/cpu/callback.cpp
  2. 18a19
  3. > /* $Id: callback.cpp,v 1.42 2009-08-23 17:24:54 c2woody Exp $ */
  4. 48c49
  5. < return i;
  6. ---
  7. > return i;
  8. 59c60
  9. <
  10. ---
  11. >
  12. 67c68
  13. < reg_eip=CB_SOFFSET+call_idle*CB_SIZE;
  14. ---
  15. > reg_eip=call_idle*CB_SIZE;
  16. 72c73
  17. < if (!CPU_CycleAutoAdjust && CPU_Cycles>0)
  18. ---
  19. > if (!CPU_CycleAutoAdjust && CPU_Cycles>0)
  20. 111,114c112,115
  21. < Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
  22. < if (val) tempf |= FLAG_ZF;
  23. < else tempf &= ~FLAG_ZF;
  24. < mem_writew(SegPhys(ss)+reg_sp+4,tempf);
  25. ---
  26. > Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
  27. > if (val) tempf |= FLAG_ZF;
  28. > else tempf &= ~FLAG_ZF;
  29. > mem_writew(SegPhys(ss)+reg_sp+4,tempf);
  30. 118,121c119,122
  31. < Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
  32. < if (val) tempf |= FLAG_CF;
  33. < else tempf &= ~FLAG_CF;
  34. < mem_writew(SegPhys(ss)+reg_sp+4,tempf);
  35. ---
  36. > Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
  37. > if (val) tempf |= FLAG_CF;
  38. > else tempf &= ~FLAG_CF;
  39. > mem_writew(SegPhys(ss)+reg_sp+4,tempf);
  40. 125,128c126,129
  41. < Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
  42. < if (val) tempf |= FLAG_IF;
  43. < else tempf &= ~FLAG_IF;
  44. < mem_writew(SegPhys(ss)+reg_sp+4,tempf);
  45. ---
  46. > Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
  47. > if (val) tempf |= FLAG_IF;
  48. > else tempf &= ~FLAG_IF;
  49. > mem_writew(SegPhys(ss)+reg_sp+4,tempf);
  50. 145c146
  51. < if (callback>=CB_MAX)
  52. ---
  53. > if (callback>=CB_MAX)
  54. 221d221
  55. < phys_writeb(physAddress+0x00,(Bit8u)0xFB); //STI
  56. 223,225c223,225
  57. < phys_writeb(physAddress+0x01,(Bit8u)0xFE); //GRP 4
  58. < phys_writeb(physAddress+0x02,(Bit8u)0x38); //Extra Callback instruction
  59. < phys_writew(physAddress+0x03,(Bit16u)callback); //The immediate word
  60. ---
  61. > phys_writeb(physAddress+0x00,(Bit8u)0xFE); //GRP 4
  62. > phys_writeb(physAddress+0x01,(Bit8u)0x38); //Extra Callback instruction
  63. > phys_writew(physAddress+0x02,(Bit16u)callback); //The immediate word
  64. 228,235c228,236
  65. < phys_writeb(physAddress+0x01,(Bit8u)0x1e); // push ds
  66. < phys_writeb(physAddress+0x02,(Bit8u)0x50); // push ax
  67. < phys_writeb(physAddress+0x03,(Bit8u)0x52); // push dx
  68. < phys_writew(physAddress+0x04,(Bit16u)0x1ccd); // int 1c
  69. < phys_writeb(physAddress+0x06,(Bit8u)0xfa); // cli
  70. < phys_writew(physAddress+0x07,(Bit16u)0x20b0); // mov al, 0x20
  71. < phys_writew(physAddress+0x09,(Bit16u)0x20e6); // out 0x20, al
  72. < phys_writeb(physAddress+0x0b,(Bit8u)0x5a); // pop dx
  73. ---
  74. > phys_writeb(physAddress+0x00,(Bit8u)0x50); // push ax
  75. > phys_writeb(physAddress+0x01,(Bit8u)0x52); // push dx
  76. > phys_writeb(physAddress+0x02,(Bit8u)0x1e); // push ds
  77. > phys_writew(physAddress+0x03,(Bit16u)0x1ccd); // int 1c
  78. > phys_writeb(physAddress+0x05,(Bit8u)0xfa); // cli
  79. > phys_writeb(physAddress+0x06,(Bit8u)0x1f); // pop ds
  80. > phys_writeb(physAddress+0x07,(Bit8u)0x5a); // pop dx
  81. > phys_writew(physAddress+0x08,(Bit16u)0x20b0); // mov al, 0x20
  82. > phys_writew(physAddress+0x0a,(Bit16u)0x20e6); // out 0x20, al
  83. 237,239c238,239
  84. < phys_writeb(physAddress+0x0d,(Bit8u)0x1f); // pop ds
  85. < phys_writeb(physAddress+0x0e,(Bit8u)0xcf); //An IRET Instruction
  86. < return (use_cb?0x13:0x0f);
  87. ---
  88. > phys_writeb(physAddress+0x0d,(Bit8u)0xcf); //An IRET Instruction
  89. > return (use_cb?0x12:0x0e);
  90. 354,363c354,359
  91. < phys_writeb(physAddress+0x00,(Bit8u)0x50); // push ax
  92. < phys_writeb(physAddress+0x01,(Bit8u)0x53); // push bx
  93. < phys_writew(physAddress+0x02,(Bit16u)0x0eb4); // mov ah, 0x0e
  94. < phys_writeb(physAddress+0x04,(Bit8u)0xbb); // mov bx,
  95. < phys_writew(physAddress+0x05,(Bit16u)0x0007); // 0x0007
  96. < phys_writew(physAddress+0x07,(Bit16u)0x10cd); // int 10
  97. < phys_writeb(physAddress+0x09,(Bit8u)0x5b); // pop bx
  98. < phys_writeb(physAddress+0x0a,(Bit8u)0x58); // pop ax
  99. < phys_writeb(physAddress+0x0b,(Bit8u)0xcf); //An IRET Instruction
  100. < return (use_cb?0x10:0x0c);
  101. ---
  102. > phys_writeb(physAddress+0x00,(Bit8u)0x50); // push ax
  103. > phys_writew(physAddress+0x01,(Bit16u)0x0eb4); // mov ah, 0x0e
  104. > phys_writew(physAddress+0x03,(Bit16u)0x10cd); // int 10
  105. > phys_writeb(physAddress+0x05,(Bit8u)0x58); // pop ax
  106. > phys_writeb(physAddress+0x06,(Bit8u)0xcf); //An IRET Instruction
  107. > return (use_cb?0x0b:0x07);
  108. 437,448c433
  109. < case CB_INT13:
  110. < phys_writeb(physAddress+0x00,(Bit8u)0xFB); //STI
  111. < if (use_cb) {
  112. < phys_writeb(physAddress+0x01,(Bit8u)0xFE); //GRP 4
  113. < phys_writeb(physAddress+0x02,(Bit8u)0x38); //Extra Callback instruction
  114. < phys_writew(physAddress+0x03,(Bit16u)callback); //The immediate word
  115. < physAddress+=4;
  116. < }
  117. < phys_writeb(physAddress+0x01,(Bit8u)0xCF); //An IRET Instruction
  118. < phys_writew(physAddress+0x02,(Bit16u)0x0ECD); // int 0e
  119. < phys_writeb(physAddress+0x04,(Bit8u)0xCF); //An IRET Instruction
  120. < return (use_cb?9:5);
  121. ---
  122. >
  123. 474c459
  124. < for (Bitu i = 0;i < CB_SIZE;i++) {
  125. ---
  126. > for (Bitu i = 0;i < 16;i++) {
  127. 479c464
  128. < void CALLBACK_HandlerObject::Uninstall(){
  129. ---
  130. > CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
  131. 486c471
  132. < } else
  133. ---
  134. > } else
  135. 498,502d482
  136. < installed=false;
  137. < }
  138. <
  139. < CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
  140. < Uninstall();
  141. 511c491
  142. < } else E_Exit("Callback handler object already installed");
  143. ---
  144. > } else E_Exit("Allready installed");
  145. 519c499
  146. < } else E_Exit("Callback handler object already installed");
  147. ---
  148. > } else E_Exit("Allready installed");
  149. 529c509
  150. < } else E_Exit("Callback handler object already installed");
  151. ---
  152. > } else E_Exit("Allready installed");
  153. 568c548
  154. <
  155. ---
  156. >
Advertisement
Add Comment
Please, Sign In to add comment