port 60h wonder

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.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

Philip wrote:could not read from port 60h of tc1000, i bought a different computer already, what a waste of money, damn the USB keyboard
Like JAAMan already said, it may be a setting in the BIOS, and you did not respond to any suggestion I made: using Bochs, checking BIOS, etc. In general it is very unwise to buy non-standard hardware for OS development, especially notebooks and such. But again, and I'll write it in bold so you cannot miss it: Use an emulator like Bochs or Qemu for the early stages of OS development. You cannot do without. If you think you can, you are wrong.


JAL
User avatar
Philip
Member
Member
Posts: 59
Joined: Thu Mar 06, 2008 11:37 pm
Location: Singapore

Post by Philip »

i can built my basic input output already, without bochs
i debug by printing values to screen
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

Philip wrote:i can built my basic input output already, without bochs
i debug by printing values to screen
That's not the point. Development on real hardware is infinitly slower than that in an emulator. And perhaps you can still debug now by printing values, but that really won't help when tripple faulting or the like.


JAL
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

jal wrote:
Philip wrote:i can built my basic input output already, without bochs
i debug by printing values to screen
That's not the point. Development on real hardware is infinitly slower than that in an emulator. And perhaps you can still debug now by printing values, but that really won't help when tripple faulting or the like.


JAL
I expect, in one or two months time, to see a post under the "General Programming" subforum with the title "Help! I've destroyed my harddrive while testing my ATA driver! Help!".

When it appears, Mr. Smug (me) will appear and laugh at you.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

I disagree, i have never used a emulator in my OS Dev cycle, i have done all my Dev work on real PC's, i must turn my main test PC on/off about a 100 times aday (at least ) and i have never had any of my PC's break in anyway.
Maybe had to replace one or two floppy's, disks, not drives.
The only time i use emulators is so others can test.

This is all you need to debug code

Code: Select all

	mov   byte [fs:0xB809E], "1"
; Some code
	mov   byte [fs:0xB809E], "2"
; Some code
	mov   byte [fs:0xB809E], "3"
; Some code
	mov   byte [fs:0xB809E], "4"
; Some code
	mov   byte [fs:0xB809E], "5"
; Some code
I was surprised when Tomasz Grysztar said thats he user's (the coder of Fasm) only this method and if its good enough for him, it good enough for me.
Ninjarider
Member
Member
Posts: 62
Joined: Fri Jun 29, 2007 8:36 pm

Post by Ninjarider »

once your in protected mode you cant use a usb keyboard without having your own usb drivers. i had a lot of issues with switching to p because my keyboard wouldn't respond and that was with legacy enabled.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

Dex wrote:I disagree, i have never used a emulator in my OS Dev cycle, i have done all my Dev work on real PC's, i must turn my main test PC on/off about a 100 times aday (at least ) and i have never had any of my PC's break in anyway.
It's not just about breaking, it's that transferring your OS to a floppy, move the floppy to the test machine, reboot the test machine, wait until the OS boots, etc. etc. takes a pretty long time. So unless you're truely multi tasking and can do something else in the meanwhile, you are wasting time. Emulators are far faster, and there's not the physical floppy moving etc. you need. I'm not critiquing you're preferred method of OS development (you seem to have done pretty well this way), but in general it's not a wise thing to do this.
This is all you need to debug code
Code:

Code: Select all

mov   byte [fs:0xB809E], "1"
; Some code
   mov   byte [fs:0xB809E], "2"
; Some code
   mov   byte [fs:0xB809E], "3"
; Some code
   mov   byte [fs:0xB809E], "4"
; Some code
   mov   byte [fs:0xB809E], "5"
; Some code
That won't help you when tripple faulting and/or when using paging, unless you manage to reboot into some special monitor that can still analyze that address (provided it knows the physical address in case of paging).

I think that most here agree that for a newbee, using an emulator like Bochs is the wisest thing to do. Noone says one cannot do without, just that it is very cumbersome and (even more) time consuming.


JAL
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Yes your right jal, emulator's do have there placers, and are a big help to many newbee and life would be much harder without them, from a OS dev point of view.

But i was just disagreeing with this point
Use an emulator like Bochs or Qemu for the early stages of OS development. You cannot do without. If you think you can, you are wrong
I would say
Use an emulator like Bochs or Qemu for the early stages of OS development. Or you will end up doing a lot more work.
Last edited by Dex on Wed Mar 26, 2008 12:25 pm, edited 1 time in total.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

Dex wrote:I would say
Use an emulator like Bochs or Qemu for the early stages of OS development. Or you will end up doing more work.
Ok, if you change "more work" with "a lot more work (unless you're a damn good programmer)" I can agree with that :).


JAL
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Done :)
Post Reply