Running on real hardware

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Running on real hardware

Post by Antti »

I had a chance to run my OS (a boot loader actually) on several real computers. I was surprised to see how many problems I got. None of them was a real bug in the strict sense but caused serious problems. Just to name a few that I recently fixed:

- One computer disabled interrupts when using INT 13h Extensions. I was not expecting this.

- One computer always returned zero in reserved mask size and position when getting a VBE mode information structure although there were such bits.

- At first I thought it would be enough to support just non-palette VBE video modes but on older real computers this would have been a problem. I found that I get much better resolutions if I support palette modes also. One computer I tested only had reasonable resolutions if using 8-bit colors.

I think making an OS and testing it only on an emulator is very far from having a real OS. I dare to say "emulator OSs" would have a high probability of failing if tested massively (e.g. 1000 computers) on real hardware. Why am I complaining? I do not know. Just keep testing on different computers as much as you can if you want to have something that really works.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Running on real hardware

Post by bluemoon »

Yes, to name a few common issues:
- memory was assumed to be zero and worked on emulators (BSS not zero'd).
- probably everyone has encountered issue with assuming certain hardware exists, like PS2 controller, or an VGA, or keyboard.
- booting takes forever long when using BIOS to load 2MB files from an USB stick - which enforce me to do disk caches in boot loader that half the boot time.
- without USB support yet, unable to do anything with the usb keyboard.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Running on real hardware

Post by Combuster »

Not to mention that all the common emulators out there have very limited video emulation.

But we have a solution to all that since ages: Revival of the test beds? :)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Hoozim
Member
Member
Posts: 53
Joined: Fri Jul 23, 2010 8:26 am

Re: Running on real hardware

Post by Hoozim »

I know what you mean! I do the majority of testing on real hardware just because I have plenty available and I feel like my OS is a lot more "legit" if I run it on real hardware. Drivers though are the real pain in the neck. Not long ago I bought a brand new netbook which has since become my new testbed, replacing my old 2000 PC as a testbed. I ran across a number of problems. My keyboard driver had to be reworked, only 1 nights work but still had to be updated. At the moment, I have to figure out why my EHCI/USB driver isn't working, could take a while.

Jacob
rdos
Member
Member
Posts: 3306
Joined: Wed Oct 01, 2008 1:55 pm

Re: Running on real hardware

Post by rdos »

Right, emulator-only OSes hardly should be called OSes at all. In order to qualify, they should run at least on one real machine. :mrgreen:
Post Reply