Commit Graph

6 Commits

Author SHA1 Message Date
Philippe Symons
9268cbd42e Reduce binary size by eliminating libstdc++
This commit removes all references to things in the libstdc++ library to remove a decent chunk of bloat.

This means every std::to_string() call, std::string and std::vector. (as well as iostream related stuff).

I replaced those with my own versions ptgb::to_string() and ptgb::vector. Especially the latter is not exactly the same,
but close enough.

I also replaced operator new and delete with my own implementation to avoid pulling in everything related to exceptions
from libstdc++

Another problem was the fact that libtonc uses siscanf, which pulls in everything related to the scanf family of functions
and locale support. The worst part of that was that it included a 13KB "categories" symbol from libc_a-categories.o,
which was pulled in because of the locale support integrated into newlibc's siscanf() function. To fix that, I created a
custom, extremely restricted implementation of siscanf. libtonc only used this function to parse at most 2 integers from a
string anyway.
2025-04-09 20:04:08 +02:00
The Gears of Progress
7338828331 Removing graphics from loader 2025-04-06 17:29:22 -04:00
Philippe Symons
9663c13f24 Make it work on my Supercard SD 2025-03-25 21:04:10 +01:00
Philippe Symons
65b0e10b48 Fix bug with previous changes to execute_multiboot() 2025-03-24 14:17:01 +01:00
Philippe Symons
3d02b1aea7 Add some comments and a README 2025-03-24 14:06:38 +01:00
Philippe Symons
e10058c7d9 Proof of concept: add a loader that embeds the multiboot rom and allows to load it from a flashcart 2025-03-24 13:49:37 +01:00