So sometimes I geek. This is stored here for posterity.
So you have this super cool Java binary code, that you want to run on Linux. The source code is long lost. You eagerly run the program, because Java is multiplatform it should just work, right ?
Exception in thread "main" java.io.FileNotFoundException : c :\hello.txt (No such file or directory.)
Right, human stupidity. How to get this to run : start Windows ? No way. Use Wine ? Hmm...
What if, in all simplicity, we could (…)
Log book
Everything that can’t go anywhere else.
-
Java hack to deal with Windows file paths in Linux - 2023 version
2 avril 2023, par Mathieu Brèthes -
Meet the main CPU
4 février 2023, par Mathieu BrèthesThe Neo Geo Pocket uses a Toshiba processor, the TLCS900H, as main processor. For the sound, it uses a Z80 (the same processor as the Game Boy), but that’s not the question of this article.
So I decided to make a program in assembler for this console, in order to familiarize myself with the processor architecture, with the ultimate goal to port a C compiler to this architecture. To do this, I have to think of my assembler program as if it were a C program. It would be easy to tinker, but (…) -
More about compilers
2 février 2023, par Mathieu BrèthesIn my previous post I wrote about my documentation research on other compilers. I checked SmallC more closely and I think it won’t be adapted to my project for the following reasons : it has been closely designed for the Z80, and in particular it does not have a dynamic register allocator, which means it won’t make good code for the TLCS900H and its 20 registers it only compiles a subset of C, missing are structures, 2D arrays... it does not support long integers, and the standard int type (…)
-
More compilers
29 janvier 2023, par Mathieu BrèthesIn my previous article I checked SDCC as a possible candidate for extending C compiler to the TLCS900H, the NeoGeo Pocket CPU. This compiler already has a backend for the TLCS90, and on the Toshiba documentation it was writtent that both instruction sets look alike.
However there are three problems : The two CPUS are really very different : the 900 is a 16bit processor with 32 bit registers, and it has a 24bit bus. The 90 is a 8-bit CPU. The instructions of both look alike but the code to (…) -
A first dive into SDCC
22 janvier 2023, par Mathieu BrèthesI think I’m going to work on SDCC as I feel I’d rather make tools than make games. Making tools for one’s own work is very satisfying. And also, who wouldn’t want to write his own compiler ?
Just joking. What I’ll try to do is, to add a processor to an existing compiler. That’s complicated enough.
So why SDCC ? it’s adapted for older processors and controllers one finds in old video game consoles it allows to generate binaries for a cousin of the TLCS-900, the TLCS-90.
So I downloaded (…)