Emulators
Emulators
Hi
I am currently still battling with my OS. It runs perfectly on Bochs, VMWare, InnoTek Virtual Box, and QEMU. However, it does not run properly on either of my computers. It gets to a point and stops. Is there another Emulator which I can try which will behave like my pc so I don't have to reboot every 5minutes to check if my changes worked.
Thanks
I am currently still battling with my OS. It runs perfectly on Bochs, VMWare, InnoTek Virtual Box, and QEMU. However, it does not run properly on either of my computers. It gets to a point and stops. Is there another Emulator which I can try which will behave like my pc so I don't have to reboot every 5minutes to check if my changes worked.
Thanks
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
Re: Emulators
Check the stack!
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Re: Emulators
Virtual PC?
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Emulators
Tried it aswel same problem.
@Inflater: I have checked the stack, In fact I have moved my stack to after the kernel now. It functions fine on the emulator so the only thing I can think of is that it looses itself when running on the pc.
@Inflater: I have checked the stack, In fact I have moved my stack to after the kernel now. It functions fine on the emulator so the only thing I can think of is that it looses itself when running on the pc.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
Re: Emulators
Do you initializing all your variables, arrays, and structures before use? One of the core differences between emulators and real hardware is that there is usually garbage left in memory on real computers. If you don't clear memory areas before use, you may be reading garbage values or reading code past the 'end of strings/buffers' when they should be null terminated.
Website: https://joscor.com
Re: Emulators
well
have you entered pmode, and a20 activatede ( just to be sure), and as 01000101 says, are you sure about what values you are reading( not garbage values), and are you sure about loading sectors ( is it hdd, fdd, or usb ???), cause if it is fdd ( and your own driver) then it migth work perfect on emu, but not real.
i can test it when i have time ..
if you have a image, and can tell me what is supossed to happen ....
KMT dk
have you entered pmode, and a20 activatede ( just to be sure), and as 01000101 says, are you sure about what values you are reading( not garbage values), and are you sure about loading sectors ( is it hdd, fdd, or usb ???), cause if it is fdd ( and your own driver) then it migth work perfect on emu, but not real.
i can test it when i have time ..
if you have a image, and can tell me what is supossed to happen ....
KMT dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Emulators
You're right about the A20 gate. I know Bochs has it enabled when its BIOS transfers control to the OS (as opposed to what normal BIOSes do). Is this the same for QEMU, Virtual PC, VMWare, VirtualBox, etc?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Emulators
I enable A20, and go to PMODE, It jumps to the kernel fine and initilises my GDT, IDT, ISR, Keyboard. The 2nd stage loader is not my own code. I borrowed it and I will make my own at a later stage. It enables interrupts and the keyboard works fine but it doesn't continue executing after that. after STI I have code to clear the screen this never gets called though on my PC.
I will sit and check my variables. I thought maybe the Pascal stack frame it puts around procedures is causing the error? could this be true?
I will sit and check my variables. I thought maybe the Pascal stack frame it puts around procedures is causing the error? could this be true?
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
Re: Emulators
This may be an indication that the fault lies in a hardware interrupt handler. And, if it fails in Virtual PC (Which uses hardware support) then test your system in Virtual PC by making changes to it instead of real hardware for now while you try to pinpoint where the problem is at.after STI I have code to clear the screen this never gets called though on my PC.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Emulators
It works fine on all my emulators. I am trying to find the error.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Emulators
Of the above, only Bochs is an emulator. The rest are virtual machines.System123 wrote:It works fine on all my emulators. I am trying to find the error.
Interrupt support should be accurate for these programs, though. If you don't STI, does it still happen?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Emulators
If I don't STI then it carries on as it should. It clears the screen and print my headers.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS