dreamos82 / Dreamos64

My experiments with osdev... again
160 stars 8 forks source link

Update keyboard.c #216

Open hyunjun1234 opened 4 months ago

hyunjun1234 commented 4 months ago

function to read keyboard input

dreamos82 commented 4 months ago

Hi thanks for the PR, i did a quick review, and i think how it is implemented it is not working.

So far the kernel doesn't have scanf fgets and similar functions, they aren't implemented yet (my bad).

Also for the output probably better to us pretty_logf (for logging into serial) and _fb_printStrAndNumber (i don't remember the exact right name right now) if we want to read a line, we need to implement the logic for it, there is a getCh function that is reading a character, so maybe this can be used to implement a getString logic, for now i would avoid using scanf and fscanf, since we are far from implementing them, you can probably implement the getString and for now get away with it.

I also would suggest if possible to check that it compiles and works at least on qemu. In the docs folder you should find the build instructions.

Let me know if you want to try and implement it, and feel free to ask any question i will be happy to help!

Thanks, Ivan

hyunjun1234 commented 4 months ago

Can i use 'kgetch' function?

2024년 6월 3일 (월) 오후 10:40, Ivan G. @.***>님이 작성:

Hi thanks for the PR, i did a quick review, and i think how it is implemented it is not working.

So far the kernel doesn't have scanf fgets and similar functions, they aren't implemented yet (my bad).

Also for the output probably better to us pretty_logf (for logging into serial) and _fb_printStrAndNumber (i don't remember the exact right name right now) if we want to read a line, we need to implement the logic for it, there is a getCh function that is reading a character, so maybe this can be used to implement a getString logic, for now i would avoid using scanf and fscanf, since we are far from implementing them, you can probably implement the getString and for now get away with it.

I also would suggest if possible to check that it compiles and works at least on qemu. In the docs folder you should find the build instructions.

Let me know if you want to try and implement it, and feel free to ask any question i will be happy to help!

Thanks, Ivan

— Reply to this email directly, view it on GitHub https://github.com/dreamos82/Dreamos64/pull/216#issuecomment-2145233740, or unsubscribe https://github.com/notifications/unsubscribe-auth/BG7JRXDCE3B5NHQLZDC22FDZFRW4DAVCNFSM6AAAAABIWPRYASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVGIZTGNZUGA . You are receiving this because you authored the thread.Message ID: @.***>

inuyasha82 commented 4 months ago

Yes, for now yes. (it's still me @dreamos82 from another account!)

hyunjun1234 commented 4 months ago

Also I want to try this OS.. So I need your help to try this OS! Can you explain the install process? :)

2024년 6월 6일 (목) 오후 11:22, 188댕이 @.***>님이 작성:

Can i use 'kgetch' function?

2024년 6월 3일 (월) 오후 10:40, Ivan G. @.***>님이 작성:

Hi thanks for the PR, i did a quick review, and i think how it is implemented it is not working.

So far the kernel doesn't have scanf fgets and similar functions, they aren't implemented yet (my bad).

Also for the output probably better to us pretty_logf (for logging into serial) and _fb_printStrAndNumber (i don't remember the exact right name right now) if we want to read a line, we need to implement the logic for it, there is a getCh function that is reading a character, so maybe this can be used to implement a getString logic, for now i would avoid using scanf and fscanf, since we are far from implementing them, you can probably implement the getString and for now get away with it.

I also would suggest if possible to check that it compiles and works at least on qemu. In the docs folder you should find the build instructions.

Let me know if you want to try and implement it, and feel free to ask any question i will be happy to help!

Thanks, Ivan

— Reply to this email directly, view it on GitHub https://github.com/dreamos82/Dreamos64/pull/216#issuecomment-2145233740, or unsubscribe https://github.com/notifications/unsubscribe-auth/BG7JRXDCE3B5NHQLZDC22FDZFRW4DAVCNFSM6AAAAABIWPRYASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVGIZTGNZUGA . You are receiving this because you authored the thread.Message ID: @.***>

inuyasha82 commented 4 months ago

So i strongly suggest first to set-up a cross-compile environment on your machine, you can follow this guide here; First you : https://github.com/dreamportdev/Osdev-Notes/blob/master/99_Appendices/E_Cross_Compilers.md, if you never done it i strongly advise to use llvm and clang, since it should be easier.

Then you should install qemu too if you don't have it already installed.

This is the first time i'm guiding someone else through the process of building Dreamos, so it could be also a good help for me to see if the documentation and the build process is straightforward.

If you already have gcc or clang, and qemu let me know and we can do couple of tests to check if it build on a default non cross-dev environment.

There is also the section on how to build dreamos (if you have everything intsalled) in the Readme: https://github.com/dreamos82/Dreamos64?tab=readme-ov-file#compiling-and-running-the-os, try to see if it is clear to you (also in the Building Document pointed on that section make sure to read through the psf part, this step needs to be done) if you want to be able to compile it.

Feel free to ask any question, as i said, it is a good exercise also for the documentation i wrote.

hyunjun1234 commented 4 months ago

Thank you for your kind resp! I'll chekout!! Have a nice day 😊

2024년 6월 7일 (금) 오전 12:09, Ivan @.***>님이 작성:

So i strongly suggest first to set-up a cross-compile environment on your machine, you can follow this guide here; First you : https://github.com/dreamportdev/Osdev-Notes/blob/master/99_Appendices/E_Cross_Compilers.md, if you never done it i strongly advise to use llvm and clang, since it should be easier.

Then you should install qemu too if you don't have it already installed.

This is the first time i'm guiding someone else through the process of building Dreamos, so it could be also a good help for me to see if the documentation and the build process is straightforward.

If you already have gcc or clang, and qemu let me know and we can do couple of tests to check if it build on a default non cross-dev environment.

There is also the section on how to build dreamos (if you have everything intsalled) in the Readme: https://github.com/dreamos82/Dreamos64?tab=readme-ov-file#compiling-and-running-the-os, try to see if it is clear to you (also in the Building Document pointed on that section make sure to read through the psf part, this step needs to be done) if you want to be able to compile it.

Feel free to ask any question, as i said, it is a good exercise also for the documentation i wrote.

— Reply to this email directly, view it on GitHub https://github.com/dreamos82/Dreamos64/pull/216#issuecomment-2152776391, or unsubscribe https://github.com/notifications/unsubscribe-auth/BG7JRXCDOGS5VQMY4BYEO43ZGB3QTAVCNFSM6AAAAABIWPRYASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSG43TMMZZGE . You are receiving this because you authored the thread.Message ID: @.***>

dreamos82 commented 4 months ago

i've enabled the dreamos workflow builds on your pr, now you should be able to check at least if it compiles when making changes.

dreamos82 commented 4 months ago

ALso if you have problems in finding a psf font, let me know i'll send you the file i'm using for dreamos.

hyunjun1234 commented 4 months ago

I'm building a cross-compile environment by installing qemu in Ubuntu. I need many help but I try to solve it myself as much as I can! I appreciate for your continued interest to me :) Thanks!!

2024년 6월 10일 (월) 오후 7:34, Ivan G. @.***>님이 작성:

ALso if you have problems in finding a psf font, let me know i'll send you the file i'm using for dreamos.

— Reply to this email directly, view it on GitHub https://github.com/dreamos82/Dreamos64/pull/216#issuecomment-2157984279, or unsubscribe https://github.com/notifications/unsubscribe-auth/BG7JRXEFTE4ZQSE62VZGZILZGV6LBAVCNFSM6AAAAABIWPRYASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXHE4DIMRXHE . You are receiving this because you authored the thread.Message ID: @.***>

dreamos82 commented 4 months ago

You can ask any question if you face any problem, or anything is not clear from the documentation, this help me also in writing a better documentation.

And lastly thanks to you in taking time to contribute to my small project, i really appreciate it.