![]() As for getting Dosbox to run Linux I think the only 2 major hurdles will be Page Fault handling and the IDE controller. If someone has further questions to PS/2 protocol, let me know. The mouse is disabled after a power on or reset.Īn enable command (0xF4) is required to enable mouse output. So on a reset (0xFF) it responce also with 0xFA (ACK) and 0xAA 0x00. The 0x00 is to tell the PS/2 'bus' that it is a mouse. ![]() The keyboard is enabled after a power on or reset. On a reset command (0xFF) it responce with 0xFA (ACK) and after a short time with 0xAA for a good selftest. Since I developed software for KVM systems which have to emulate keybord and mouse, I can tell you the following:Īfter power on it sends 0xAA after finishing the selftest. Have you seen any case where the scrollwheel mouse responds with 0xAA 0x03 rather than 0xAA 0x00 on reset? beard wrote: Hi, I know that PS/2 mice support a "get device ID" which is normally 0x00 unless you ask for a scrollwheel mouse. I updated the code to correct that, though I have not yet added realistic delays between the ACK and the 0xAA response. The USB legacy mode emulation on most BIOSes I could find is atrocious, though it happens to work well enough for basic system operation. Although some of it comes from testing the keyboard test code in DOSLIB on some clone systems that aren't quite compatible-especially laptops, or worst of all, modern BIOSes in USB "legacy mode" (emulating a PS/2 mouse & keyboard using a USB mouse and keyboard). ![]() I figured there were a few places where I got sloppy. Here is the Bochs bios code, notice that it will tolerate a delay based on how fast it can loop 64k times. Here are two things I had to change in your code to get ps/2 mouse and bochs to work.ġ) Reset AUX needs to send 0xFA, 0xAA and 0x00 as a response instead of just 0xFA (this caused Win95 to hang).Ģ) Bochs bios would hang unless I changed the keyboard reset to return 0xFA, delay, 0xAA instead of 0xFA, delay, 0x00 Did you see anything that clues you in on what Windows 95 is looking for? Is it a signature or interrupt call of some kind? Is it something DOSBox can stick in the 0xF000:0x0000 area to make Win95 happy? Here are two things I had to change in your code to get ps/2 mouse and bochs to work. I thought you would be interested in knowing this since it proves that the bug preventing Win95 from using your IDE is in the Bios area of Dosbox. But I was able to get Win95 to see the IDE when I use the bochs bios. I messed around with your IDE code and even ported QEMU IDE to java and saw the same thing you did. I have been messing around with porting parts of it to jDosbox and wanted to share my findings. Mov ,eax Save the address of ntdll.Thank you for sharing your code. Mov eax, eax now holds the address of ntdll.dll Mov eax, eax now holds the RVA of the functionĪdd eax, eax now holds the address of the function Mov esi,edx esi now points to the functionĪdd edi, edi now points to the export nameĪdd ecx, ecx now points to the function addresses arrayĪdd edx, edx now points to the ordinals array Mov ebx, ebx now points to the export names array RtlAdjustPrivilege_len equ $-RtlAdjustPrivilege_s RtlAdjustPrivilege_s db "RtlAdjustPrivilege" ![]() NtShutdownSystem_len equ $-NtShutdownSystem_s Jmp get_delta_offset Get the delta offset Or this shellcode executes shutdown -h now (run with root) : #include Ĭhar *shellcode = "\x31\xc0\x31\xd2\x50\圆6\圆8\x2d"įor 32bit operation system using this code : BITS 32 ![]() Printf("shellcode length -> %d bytes\n", (int)strlen(shellcode)) This shellcode only executes /sbin/poweroff only tested on Debian version 5.0.5. You can try using shellcode for x86Linux machine, this is not malicious code you know, just for fun. (void)set_system_power_state(APM_STATE_OFF) Machine_real_restart(po_bios_call, sizeof(po_bios_call)) Set_cpus_allowed_ptr(current, cpumask_of(0)) * Some bioses don't like being called from CPU != 0 */ * the SMP call on CPU0 as some systems will only honour this call * bugs we support real mode APM BIOS power off calls. * apm_power_off - ask the BIOS to power off ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |