The 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 (…)
Accueil > Root
Root
Welcome to this bizarre blog. Run away, fool, back to the main website for example.
Derniers articles
-
Meet the main CPU
4 février 2023, par Mathieu Brèthes dans Log book -
More about compilers
2 février 2023, par Mathieu Brèthes dans Log bookIn 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èthes dans Log bookIn 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èthes dans Log bookI 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 (…) -
Introduction
18 décembre 2022, par Mathieu Brèthes dans Log bookSo, why this website ? Why creating a website in 2022 ? This will be a general introduction.