tatOS and USB
tatOS and USB
Well I have uploaded a new copy of tatOS to github.
This little hobby OS now has a usb keyboard driver along with the usb mouse and flash drive.
The supported USB controllers are:
* UHCI usb 1.0
* EHCI usb 2.0 with UHCI companion controllers
* EHCI with integrated root hub (rate matching hub)
tatOS may be a useful study for developers eager to develop their own drivers for USB.
Thanks for trying tatOS.
TomT
https://github.com/tatimmer/tatOS
This little hobby OS now has a usb keyboard driver along with the usb mouse and flash drive.
The supported USB controllers are:
* UHCI usb 1.0
* EHCI usb 2.0 with UHCI companion controllers
* EHCI with integrated root hub (rate matching hub)
tatOS may be a useful study for developers eager to develop their own drivers for USB.
Thanks for trying tatOS.
TomT
https://github.com/tatimmer/tatOS
- max
- Member
- Posts: 616
- Joined: Mon Mar 05, 2012 11:23 am
- Libera.chat IRC: maxdev
- Location: Germany
- Contact:
Re: tatOS and USB
Hey TomT,TomT wrote:Well I have uploaded a new copy of tatOS to github.
This little hobby OS now has a usb keyboard driver along with the usb mouse and flash drive.
The supported USB controllers are:
* UHCI usb 1.0
* EHCI usb 2.0 with UHCI companion controllers
* EHCI with integrated root hub (rate matching hub)
tatOS may be a useful study for developers eager to develop their own drivers for USB.
Thanks for trying tatOS.
TomT
https://github.com/tatimmer/tatOS
nice work! Do you have some prebuilt images to try it out? And, how does "doc/faith" relate to the OS?
Greets
Re: tatOS and USB
Haven't tried it yet, but boot1.s mov sp, 0xffff should be mov sp, 0x0000.
Just trust me.
EDIT: Tried out the floppy image when I got home, and I'm genuinely impressed. I like the graphics mode, and the look and feel, and the menus are simple and navigable. The whole system seems pleasantly stable.
I had VirtualBox set up with and OHCI USB controller, and ran the UHCI initialization, and it still seemed to work, so I'm not sure what's actually going on there.
But overall, nice work! Keep at it, and let us know when new features are added and are ready to use.
Just trust me.
EDIT: Tried out the floppy image when I got home, and I'm genuinely impressed. I like the graphics mode, and the look and feel, and the menus are simple and navigable. The whole system seems pleasantly stable.
I had VirtualBox set up with and OHCI USB controller, and ran the UHCI initialization, and it still seemed to work, so I'm not sure what's actually going on there.
But overall, nice work! Keep at it, and let us know when new features are added and are ready to use.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Re: tatOS and USB
https://github.com/tatimmer/tatOS/blob/master/doc/faith
It's my favorite part. It's always a pleasure to see a religious person, especially an Abrahamic religion follower. I love Jesus too; you're not alone. Keep it up!
I liked the detail in /doc/.
It's my favorite part. It's always a pleasure to see a religious person, especially an Abrahamic religion follower. I love Jesus too; you're not alone. Keep it up!
I liked the detail in /doc/.
Last edited by Muazzam on Sat Feb 27, 2016 10:33 am, edited 1 time in total.
Re: tatOS and USB
Hello Max,
tatOS.img is a prebuilt image for USBCONTROLLERTYPE == 2 (see tatOS.config)
Technically doc/faith has nothing to do with assembly language programming and OS development, but then again, it is a big part of who I am.
Spyder, thanks for your feedback.
TomT
tatOS.img is a prebuilt image for USBCONTROLLERTYPE == 2 (see tatOS.config)
Technically doc/faith has nothing to do with assembly language programming and OS development, but then again, it is a big part of who I am.
Spyder, thanks for your feedback.
TomT
Re: tatOS and USB
Spyder,
By suggesting to set sp=0 you are talking about stack alignment/misalignment ?
At sp=0, one WORD push will decrement sp to 0xfffe keeping it WORD aligned.
How serious is my error ?
I have been running the real mode stack this way for quite some time with no noticeable performance issue.
Thanks,
TomT
By suggesting to set sp=0 you are talking about stack alignment/misalignment ?
At sp=0, one WORD push will decrement sp to 0xfffe keeping it WORD aligned.
How serious is my error ?
I have been running the real mode stack this way for quite some time with no noticeable performance issue.
Thanks,
TomT
Re: tatOS and USB
But why do you want to run with a misaligned stack? What's the point when you can so easily just do it correctly?
Re: tatOS and USB
Plus you are wasting one byte of stack memory.
Setting SP to 0xFFFF is just one of those things that seems correct, at first, until you think about it. Just tryin to help.
Setting SP to 0xFFFF is just one of those things that seems correct, at first, until you think about it. Just tryin to help.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
-
- Member
- Posts: 501
- Joined: Wed Jun 17, 2015 9:40 am
- Libera.chat IRC: glauxosdever
- Location: Athens, Greece
Re: tatOS and USB
Hi,
TomT, I like that you are still improving your USB code. I based my USB implementation on it. I also like the way it's documented. Good work!
But, no offense, setting SP=0xFFFF is one of the mistakes that happen when writing your own bootloader (reference to the wiki). Even if it worked for all of this time, it's no good.
Regards,
glauxosdever
TomT, I like that you are still improving your USB code. I based my USB implementation on it. I also like the way it's documented. Good work!
But, no offense, setting SP=0xFFFF is one of the mistakes that happen when writing your own bootloader (reference to the wiki). Even if it worked for all of this time, it's no good.
Regards,
glauxosdever
Re: tatOS and USB
For some stack-intensive tasks it can slow system for roughly 25%. But such tasks are not very common, so you can keep the thing unchanged.TomT wrote:At sp=0, one WORD push will decrement sp to 0xfffe keeping it WORD aligned.
How serious is my error ?
But it's as serious as any inefficiency you allow your OS to have. Your OS can do something relatively quickly, but when you approach a serious goal it can slow and keep you from reaching your goal.
And there's another possibility - you won't ever notice anything bad for the whole your life. The latter is happen very often. But the former can hurt a lot after you realize that now it is required to rewrite your OS from scratch because of a lot of inefficiencies here and there.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
Re: tatOS and USB
Thank you all for your comments about stack alignment.
I will fix that.
Back in 2009 when I wrote that code, I was a very green OS developer and did not make a conscience decision to misalign the stack but now that you have pointed this out, with potential pit falls, "I see the light".
Thanks
TomT
I will fix that.
Back in 2009 when I wrote that code, I was a very green OS developer and did not make a conscience decision to misalign the stack but now that you have pointed this out, with potential pit falls, "I see the light".
Thanks
TomT