BTBX
- 25 Devlogs
- 231 Total hours
BTBX - Bare TinyBASIC eXecutor
BTBX - Bare TinyBASIC eXecutor
hi people! this time i worked on a v86-compatible version for the in-browser demo. it’s now possible to try the project directly in the browser, although there are still a few input-related issues, including with the shift key.
the browser version is mainly there as a quick way to look at the project without setting anything up. for proper testing, though, i’d still recommend using a local environment—the demo is mostly for anyone too busy to set one up. pong does work in it though ^^
hi people! recently i worked on adding proper graphics support to the project. instead of relying on text-mode attribute tricks, i went with direct pixel plotting, since it gives the system a much more flexible foundation for drawing things on screen.
i added a new Mode 13h framebuffer API with functions for entering and leaving graphics mode, clearing the screen, plotting and reading individual pixels, drawing lines, rectangles, and circles, and changing the VGA palette. the implementation writes directly to the linear framebuffer at 0xA0000, with palette updates handled through the VGA DAC ports.
on the BASIC side, there are now new statements for using these graphics features: SCREEN, GCLS, PSET, LINE, RECT, CIRCLE, and PALETTE. i also connected the new graphics code to the statement dispatcher and updated the built-in HELP text so the commands are documented.
finally, i cleaned up the build setup by adding the new graphics source files and removing an old ‘-display curses’ option from the run command.
this is a much more versatile approach than only the old text-based graphics, and it gives me a better base for anything visual i add later. that’s all for now!
hi people! i spent more time working on the graphics system. there still isn’t a finished result to show yet, but i’ve been continuing to work through the implementation and figuring out the pieces needed for proper pixel-based graphics support.
it’s taking a bit more iteration than expected, but the goal is still to have a solid graphics foundation rather than rushing in something limited. hopefully i’ll have the completed version ready to show soon. see y’all later!
hi people! i started working toward graphics support this time. i’m moving away from text-mode tricks and looking at direct pixel plotting instead, since it should be much more flexible to build on later.it’s still a work in progress, but i should have something more complete to show next time. what pmo is that 10 hour limit so i cant just devlog once i have a feature, i have to do it in the middle of nothing an wasting 3 hours anyways. see y’all later!
hi people! this time i added a set of bitwise operations to the language: AND(x,y), OR(x,y), XOR(x,y), NOT(x), SHL(x,n), and SHR(x,n). these work on values converted to 32-bit integers, and the shift functions keep large shift counts predictable by masking them to 31.
i also added HEX$(x) and BIN$(x) string functions for displaying numbers in hexadecimal and binary, without unnecessary leading zeroes. on top of that, the number parser now accepts hexadecimal and binary literals using &H… and &B….
finally, i updated the built-in HELP text so the new functions and literal formats are documented in the system itself. that’s all for now
hi people! this was mostly a behind-the-scenes work session rather than one with a major new feature to show off. i spent a lot of time working through the project, trying things out, and dealing with the smaller details that tend to take longer than expected.
there isn’t one big result for this devlog, but the time was still useful for getting a clearer picture of what needs attention next and making progress on the work that supports the larger features. sometimes development is less about a big visible change and more about putting time into the parts that make future work smoother.
that’s all for now!
hi guys! i took a short break from the project. first voluntarily to take care of my mental health, and then a bit longer than planned because i got sick.
after returning, i tackled a smaller but useful feature: RTC support via the TIME command. the command can now work with the real-time clock, which means the system has proper support for reading and handling time instead of relying on a manually managed value.
this was a fairly quick feature to work through, so it felt like a good way to get back into the project after the break. also, please excuse the old time shown in the photo, i hadn’t kept it up to date when I took it.
that’s all, see you later
hi people! this time, i mostly worked on cleaning things up after restructuring the working tree, and i also fixed a few issues with the text editor.
the biggest breakthrough was figuring out why the prime sieve computation kept failing. in the end, the problem had nothing to do with the math itself. instead, it came from the way the interpreter handled loops and writing to disk. those issues interacted in a way that caused the loop to stop after finding just one number.
that problem is now fixed, and while tracking it down i also ran into several other bugs, which i fixed along the way.
that’s all!
After my restructuring I was gonna ship the project but I just dont feel its finished enough so I wanted to add a few more features to make it a bit more standalone. Right now, you would in theory be able to use it on a computer without having to prepare programs on another computer because WE HAVE A TEXT EDITOR!!! finally. So you can write your BASIC and execute it, save the results and view them as much as you want!! There is a prime number sieve being edited on screen but it doesnt run yet because there are some issues in the way my BASIC is interpreted, some issue with loops or whatnot. Thats the next thing to work on.
Nothing incredible, except scut work right now. I was made aware by codefactor that my code was too complex in parts (complexity of 771) and so I cleaned up the file tree so its nice and organized, and I am most way through splitting stmt(), but I was made aware my devlogs are too long so here you go.
I started working on giving the system a voice. Yes, quite literally a dystopian, creepy voice synthetisation function. Originally I was only gonna do ‘BEEP freq, duration’ (which i managed in a good hour at most) but then I got invested in actual phoneme/allophone synthesys (Software Automatic Mouth style) and it turned into a lot more work. Sadly so far i’ve only ever gotten squeals out of it, or all quiet, so i am probably going to give up and do more important work like either a text editor or a directory support, or even a proper C compiler in-system (so far only precompiled binaries work).
I took a small hiatus (climbing in the caucas mountains for my mental health). Anyways i’m back and I added binary loading and execution support (for example precompiled C or whatever). I works, no too visible on the screenshot but look at the screen border (it was flashing). Also sorry for the long devlog but i had some time logged, and logged more now, and somehow ended up with 18 hrs.
I have finally fixed the floppy boot including its FAT12 init. There were many, many problems, I was running around in circles but I finally fixed it. The last thing I did was rewrote the EDD stuff front and back, and I assume that fixed it. I, honestly, am not sure. But anyways, now both HDD and floppy boot work including FAT12 init and all functions of BASIC that I have implemented insofar.
The floppy boot issue persists. I have moved past the FAT init failing visibly, but any read actions throw all zeros out. I came across the issue in the past, I feel like I am going in circles here,
At the moment I am still stuck on the same issue (floppy/HDD). I got the idea that the fs may be misconfigured so I am working a on that too. A lot of theories, and multiple issues i’ve fixed already, but on floppy FAT init still fails.
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.