Home > Root > Log book > My big project

My big project

Sunday 13 November 2022, by Mathieu Brèthes

All the versions of this article: [Deutsch] [English] [français]

I like games with stories. I have had interest for interactive fiction (ex. Inform) and visual novels. Those kind of games have an advantage: the programming comes second - story comes first. They are not interaction-intensive and can be thought as trees where each branch leads to a different end.

I have developed a prototype visual novel with RenPY, a development environment with Python as a language. A RenPY program is a text file with commands that are interpreted and interfaced with Python. I thought I could develop a translator that would take a RenPY file and turn it into C code that could be ported to the Neo Geo Pocket.

A second stage would require creating tools to convert the media of the game (mostly static images) to a format suitable for the console.

Once we reach this point, compilation ensues, and it works.

But... There is no Open-Source C compiler for the Toshiba TLCS 900H. The one from Toshiba is expensive and works only on Windows. I may find it online... But what is the fun with that? And also, I am a linux freak.

So, what open-source tools do we have for this CPU? There is AS, an assembler. And there is an open-source C compiler SDCC, that allows to generate binaries for a cousin, the TLCS 90. According to Toshiba’s documentation, the assembly language of both processors is identical (with similar register names etc.), but the ABI is not. What if I could base myself on the TLCS 90 and modify the ABI generator of SDCC to create code for the 900?

The stages of this project would then be:

  1. Learn TLCS900H assembly with a test project
  2. Develop a simple RenPY game
  3. Choose whether I want to mess with SDCC
  4. If not:
    1. My converter will transform RenPY file to assembly
    2. Once this is validated, it works
  5. If yes:
    1. let’s dive into SDCC
    2. once I can get binaries from C for the TLCS900, let’s just make the RenPY translator to C.

That’s a lot... To think about!