OSDev.org
https://forum.osdev.org/

FAT can't read big files.
https://forum.osdev.org/viewtopic.php?f=1&t=32993
Page 2 of 2

Author:  GhelloWorld [ Thu Jun 14, 2018 8:51 am ]
Post subject:  Re: FAT can't read big files.

iansjack wrote:
You can use gdb in conjunction with qemu for kernel debugging. This requires nothing extra of your code, just that you start qemu with the appropriate options. gdb allows you to work with assembler or C/C++. So you can step through C code, display (and alter) C variables - including structures, set breakpoints in C code and set watches (which break into the program when a variable changes) on C variables. It is an order of magnitude easier to work with C code this way than with an assembly-only debugger.

https://wiki.osdev.org/Kernel_Debugging ... _with_QEMU

I have managed to setup the qemu debugger with kgdb and I really like it, I had no idea that it was possible to view the direct source code because this makes things a whole lot easier.
zaval wrote:
but have you rechecked your Console code? it might be working perfectly if the length of the "MEGA, " string is small, but producing errors when it gets large. Try with the much longer string.

I have tried now with a large string containing only 'A' but this is also displayed correctly, I have also tried loading a bmp image via fat but that image is corrupted as well when I draw it to the screen. So the issue probably really exists in the reading code, but it could have been a logical explanation for the problem so thanks anyway.

Author:  zaval [ Thu Jun 14, 2018 2:03 pm ]
Post subject:  Re: FAT can't read big files.

by the way, where this
Code:
class Port16Bit : public Port{
...
virtual myos::common::uint16_t Read();
...
}

thing is really filled with some sense? implemented I mean.
I couldn't find it anywhere. But I have big problems with c++.

Author:  GhelloWorld [ Fri Jun 15, 2018 3:19 am ]
Post subject:  Re: FAT can't read big files.

It is indeed a bit weird that the function is virtual but for some reason they all do work because I also use them for reading pci and some drivers and those never gave me any problems. But I will have to change the layout of that file because it is a bit messy.

Author:  simeonz [ Fri Jun 15, 2018 3:24 am ]
Post subject:  Re: FAT can't read big files.

GhelloWorld wrote:
It is indeed a bit weird that the function is virtual but for some reason they all do work because I also use them for reading pci and some drivers and those never gave me any problems. But I will have to change the layout of that file because it is a bit messy.
I haven't looked at the sources, but from the snippet I can tell that the function is virtual, meaning that it can be overridden in subtypes, but it is not pure virtual, meaning that the class can be instantiated on its own and a default implementation is provided somewhere that will kick in.

Page 2 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/