Comments (7)
Thanks for the comments @0xqookie, I'll definitely check those.
To all, sorry for the delays, this is a hobby project and I haven't had much time to update it, but it's definitely one of my priorities as soon as I can.
from os-tutorial.
@cfenollosa More links: http://wiki.osdev.org/PCI_IDE_Controller For writing an ATA/ATAPI driver.
My own ATA(No ATAPI) driver implementation:
https://gist.github.com/0xqookie/55926338493adcc337ff893c54558bc9
https://gist.github.com/0xqookie/61f5e6f1f4389cb45ddee6c3644e34c6
https://gist.github.com/0xqookie/da3c9b6ac585054a6336c13435ed5797
text_putstring() is kprint()
uint(x)_t is u(x) from cpu/types.h (eg. uint16_t = u16)
from os-tutorial.
This is what I'm currently into. And it's much more difficult than I expected.
Implementing FAT is easy, but to read from disk, you can either let the BIOS do it or implement an ATA/floppy driver. Many example OSs like this one just read from the disk in real mode, in assembly.
This is still undefined, but I'll probably try to make a dirty asm wrapper to read from disk, test the FAT driver, make the ATA/floppy driver, whichever is easier since qemu can mount disk images as both, then push the code. This will probably take a few weeks.
Thanks for your comments!
from os-tutorial.
I've been continuing my research into filesystems and the likes and it seems that the ASM wrapper SHOULD be the easiest way to go.
As a matter of personal opinion, I'm pretty much a happy camper as an OSdev if I can manage to get a simplistic shell with a simple text editor installed and running on a real device. :P
I shall be eagerly awaiting any updates while I muck about with liveUSBs and whatnot. Thanks again for making this tutorial, it's been immensely helpful!
from os-tutorial.
@cfenollosa You could take a look at DankOS floppy disk read routines. https://github.com/DankOSTeam/DankOS/tree/master/kernel/external/disk
Just realized it uses bios interrupt 0x13
from os-tutorial.
@cfenollosa You can also see this page http://web.archive.org/web/20041010081013/http://debs.future.easyspace.com/Programming/Hardware/FDC/floppy.html
from os-tutorial.
https://wiki.osdev.org/Floppy_Disk_Controller
EDIT:
https://wiki.osdev.org/ATA_read/write_sectors
https://board.flatassembler.net/topic.php?t=14373
https://programmersheaven.com/discussion/312492/how-to-get-bytes-from-hard-disk-inside-the-protected-mode-32-bit
from os-tutorial.
Related Issues (20)
- 14-checkpoint: Program received signal SIGTRAP, Trace/breakpoint trap HOT 4
- Problem with example 14 on real machine HOT 1
- cross-compiler for M1 MacBook? HOT 10
- Difference in binary code between the book and my PC HOT 2
- PLEASE CONTINUE !!!!!
- Multiple definition of 'idt' and 'idt_reg' HOT 1
- 3 - jump opcode causes a problem
- File driver fat32 HOT 4
- To whom it may concern! HOT 1
- Result displayed on the terminal itself HOT 1
- 11-Cross Compiler: GCC not compiling HOT 1
- I have a question about 13 kernel bare bones HOT 2
- Share my Makefile to everyone(macOS 13.5) HOT 1
- 05-bootsector-functions-strings/boot_sect_print_hex.asm
- [Open letter] long-standing problems with this tutorial and its consequences due to good SEO HOT 8
- Linker Error! HOT 1
- Print function will print to random locations
- Tut
- An OS from scratch started with this tutorial HOT 1
- Error: unable to disambiguate: -no-PIE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from os-tutorial.