BTBX
- 10 Devlogs
- 92 Total hours
BTBX - Bare TinyBASIC eXecutor
BTBX - Bare TinyBASIC eXecutor
I dont have any major update, I am stuck fixing a regression where FAT initialization fails exclusively on QEMU floppy boots, while HDDs work fine. I always fix one thing and something else breaks, like EDD probing panics, false failiures, reset storms and others. The end result is always the same, the boot takes a long time (timeouts) and no disk is available.
I decided to put some work into booting in hard-drive (DL 0x80). That in itself wasn’t too big an issue, but it in turn made floppy boot (DL 0x00) nonfunctional. I went back and forth, fixing one, breaking the other, again and again. Right now there is some kind of silent failiure in floppy mode that causes it to take minutes to boot (I think its failing and retrying 3 times on every sector) and then it finds the root dir populated as all zeros. The issue is all the processes come back as successes when reading registers. So right now, only hard drive mode works, but this devlog is already wayyyy too long and I wouldnt want to lose all this time.
And we have a complete functioning FAT12! Reading and writing have been working smoothly. The fs writing wasn’t even that hard to implement, and I also added a few more mathematicals to to once again appoach GWBASIC. We have direct hardware access (PEEK/POKE into ram, etc), arrays, nonblocking input (INKEY$) and I also added 2 string functions.
After countless fixes I have managed to get a functioning FAT12 filesystem working, including listing and loading files. Saving (writing) is not functional yet. The key issues were: CHS mismatch, BPB was wrong, broken multisector loading, and other. Next I will try to make writing possible.
I’ve changed some kernel details, like that instead of straight crashing, it might tell you whats wrong before, design details, etc. I changed the approach to disk wiriting from straight dd to a python script that actually makes a mountable volume, and I am still working on getting filesystem working. There has been so so many issues ive been running into as the complexity of the system rises (and so does entropy, I guess). This will take an unprecedented amount of work to get even remotely to the level that is GWBASIC, much less what I aspired to (ISO/IEC 10279:1991).
I managed to implement longer variable names possible, a lof of trig/calc functions and overall perked up some details. Im heading towards Full BASIC instead of just Tiny BASIC but Im not sure how far I will go with this.
Ive gotten to the point where it actually boots from floppy in QEMU (no hd working) AND to an extent BASIC works. Its not perfect yet but ill get there soon.
What a poor choice this project. I wanna sleep so much and yet I cant fall asleep because I just have to get it running and it will definietly only be an hour or less.
I changed the approach. Instead of just messing around in assembly, I will do most of it in C and assembly is only for the bootloader. Yes, bootloader. Simplest way to keep this as bare-metal and universal as possible was, in my opinion, to just write a kernel, grub, crosscompile for i868 (in distrobox because the toolchain doesnt run on my distro) and boot via QEMU. I got far enough that it compiles and builds into an ISO, but doesnt actaully even boot, instead bugs out in SeaBIOS. Seems I bit off more than I could chew.
After an all-nighter i got it to assemble, but to call it functional would be a joke.