I have added the following to my external program loader:
- A header signature (only "RAWEXE32" is implemented), 8 bytes.
- An EOF mark at the end of the file, preferably aligned to the last 4 bytes of the 16-byte alignment ("EOF",0 ASCIIZ assembly string), 4 bytes.
A good checksum algorithm like MD5 could be tried later, to ensure that not only the headers are present, but also the whole binary, or just start a new task and let it be terminated on error without affecting the core system run time.
It's dangerous to load more than 1 sector, not even a whole cluster, to a final place that isn't a temporary disk read buffer. Once we verify that the header signature is present, we can read the final address where the progam wants to be loaded.
Not having the EOF signature is also dangerous, but is easier to abort running a program that doesn't have a header signature.
________________________________________
________________________________________
________________________________________
________________________________________
Now I will add generic ATA code and routines to detect recognized FAT32 partitions to read them and finally read files and programs from a hard disk.
I will actually start by implementing a function to turn off an ATA disk when I want to turn off the machine, so it suffers considerably, much less on power loss.
I will also keep adding to my relocatable executable code, for which I need to have the address of all instructions and machine word-sized data to relocate by adding the actual base address where it ends up being loaded to all of them. For that I need a fraction of an emulator that can recognize reliably all x86 instructions looking to relocate immediate offsets. I have added code for it but it doesn't really work yet.
At this point I could test things like whether the configuration the ESS-SOLO1 DOS driver leaves the Sound Blaster features of the Thinkpad 390X, and the DOS drivers for native Sound Blaster 16, AWE32 and Vibra16S, works once DOS is disabled, and can still be programmed by the kernel. At this point I could also port abandonware source code and C libraries fully to x86 Portable Assembly, I could port games like Digger or WOLF3D loaded to a fixed memory address as big monolithic binaries that embed all of their required program data and code, to learn the use of peripherals, graphics/sound algorithms and programming in general at the level of those programs... and with that improve my loader and the kernel, for example being able to select VESA modes at kernel load time and, by being able to exit to DOS, try another configuration the next time I load the kernel without rebooting, as long as the code isn't broken enough as to prevent me from returning to DOS.
_____________________________________________
_____________________________________________
_____________________________________________
_____________________________________________
zaval wrote:these numerous ARM SBCs and MIPS one for me are pretty the same PCs, I always have been dreaming about many CPU architectures on PC (x86, mips, alpha, itanium, arm). So at least it partially happenned now. They are mini-PC so to say. And they have the same PC peripherals to mess around, - VGA (some), HDMI (every), USB (OHCI, EHCI, XHCI), Ethernet, DDR2/3/4, SATA and even PCIe.
Yes, they don't yet have a standardized FW (UEFI + ACPI), having instead half-arsed uboot + ripped off from OF device tree. >_> There is no easy "on-board", platform, device enumeration mechanism. they don't give a damn about a proper implementation hw fetures needed for even such innocuous and desirable thing as S3 state. They might put a button on a board just as a boot selector. And not put a "power" button...
But on the other hand, if you want a "full system level control, the lowest possible ever", then please, they are for you - here you would have it as much as you want and can or even more.
In that respect it really sounds like a collection of a 386 (90's), Pentium I (90's), Pentium III (2000), Sound Blaster equipped laptop (2000) and AMD64 PC (2005) and dual core Pentium (2009), all them with PS/2 or compatible, serial, parallel, IDE, floppy ports and related circuitry, some with ISA slots, have much more quality than those boards, and offer much more to learn in the long run, while they can be also used for everyday work in addition to heavy development. The test boards still aren't heard to offer enough openness or information as to allow developing PCI devices in an increasingly simpler and accessible way to "normal" people (anyone), even ISA devices are difficult, although a bit less than PCI development. Even finding information on how to assemble a base board for a motherboard with only the standard devices and expansion slots using a modern CPU and supporting chipset is practically non-existent with regular Google searches, only pre-built Galileo boards seem to appear. Maybe information to construct a 386 or 8088 board from scratch....
At this point the hardware is more important than the software alone, platform independent or not. If a good machine isn't developed and if OS developers, or any developer for that matter, doesn't know how to build a motherboard and the usual peripheral device cards, then we have to settle with whichever badly implemented machine with closed drivers a manufacturer makes.