Where we try to start something.
Home > Keywords > Log book > NGPC C
NGPC C
Articles
-
A very preliminary approach of µCsim
12 August, by Mathieu Brèthes -
My big project
13 November 2022, by Mathieu BrèthesI’ve been considering for a while to do some new development on handheld consoles. I have developed long ago games for the Game Boy and Advanced Game Boy (I’ll post something about that later). This year I retrieved my Neo Geo Pocket and I started thinking... Should I program something on it...
-
More about compilers
2 February 2023, by 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 (…)
-
Meet the main CPU
4 February 2023, by 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 (…) -
Docs and tools
16 November 2022, by Mathieu BrèthesDocumentation about the Neo Geo Pocket.
-
More compilers
29 January 2023, by 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 be (…) -
A first dive into SDCC
22 January 2023, by 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 (…)