Thursday, 28 August 2025

"La Guerre du Feu" by Sanyo (1984-1985): A Text Adventure CRPG Combo


I received a really neat email from David Kilpatrick about my latest game port and translation project for the TRS-80 MC10:

------ Original Message ------

Hi Jim 

When I prompt Google Gemini 2.5 Flash chat AI with this:

"Provide non spoiler instructions for playing this game:" and then paste in the contents of "Firwar11.txt", I get:
 

This is a text-based adventure game written in a dialect of BASIC, likely for an older computer such as the TRS-80 Color Computer or a similar 8-bit machine. The core objective is to find a fire and bring it back to your village. The instructions below are based on an analysis of the code and are non-spoiler.


Gameplay Instructions

The game operates by having you type commands in response to prompts. The game world is a grid-based map, and your primary actions will involve moving around this map and interacting with your environment.

  • Movement: You can move in four cardinal directions: NORTH, SOUTH, EAST, and WEST. You can type the full word or just the first letter (N, S, E, W).
  • Interaction: The game will prompt you with "WHAT NOW:". This is your opportunity to type a command. The code supports a variety of commands, including:
    • GET or TAKE: To pick up an item. You must specify the item you want to take, e.g., "TAKE AX".
    • FIGHT, KILL, or ATTACK: To engage in combat. You'll then be prompted to specify which item you want to use, e.g., "FIGHT WITH SPEAR".
    • HUNT: To hunt for food.
    • EAT: To consume food you have collected.
    • DRINK: To drink from your flask.
    • FILL: To refill your flask with water.
    • SLEEP: To rest and recover.
    • HIT, STRIKE, or SCRAPE: These commands are related to crafting or creating something.
    • LOOK or EXAMINE: To get a description of your current location.
  • Inventory and Status: The game has a system for managing your health, hunger, and thirst.
    • The game keeps track of your health and other stats in the background.
    • Hunger and thirst increase as you travel. You will be alerted when your character is hungry or thirsty. If these needs are not met, your character will eventually die.
    • Meat is a resource you can collect, likely by hunting.
    • You have a flask that can hold water. The game will tell you when it is full or empty.
  • Goal: The main quest is to find the fire and return it to your village. You start in the village and must explore to find it.

Tips for Playing

  • Pay attention to the text: The game provides all the necessary information through text. The descriptions of locations and your character's status are crucial.
  • Manage your resources: Conserving food and water is critical to survival.
  • Explore and experiment: Some objects or actions may not be obvious. Try different commands in different locations.
  • Survival is key: Your main priority is to stay alive by managing your hunger, thirst, and fatigue. Death is a real possibility.


Thought you might be interested, if you don't already experiment with Gemini or ChatGPT.

Does it sound okay to you?

It doesn't mention a save feature though.

Cheers

 
David

Here was my response (edited):

That is soooo cool. Especially considering that there is so little (as far as my research has shown) about the game on the Net. Thanks. I suspect it's LLM training is drawing on some "generic advice" about "two-word parser" text adventures and integrating that somewhat with the  details available from the source. For example it states "You must specify the item you want to take, e.g., 'TAKE AX'" (neat-- it has definitely processed the Github source code). But this is originally a French language text adventure (It doesn't seem aware of that) and the French doesn't really work well in the two-word parser mode. For example, commands aren't usually grammatically put in a simple definitive verb-noun form (I think), but really require different definite or indefinite articles, injunctive conjugation of the verb, not to mention common polite two-verb forms for some actions. As such the French have a somewhat difficult time with the "two-word" format (not to mention that they simply don't like to bow to "anglicisms"). So, the game is actually a "one-word" parser. You input an injunctive verb. Then the game prompts you for a noun and responds. It also knows that you have an inventory, but doesn't recognize that it is simply always listed on screen.

With those qualifications made, I have to say that Google Gemini did a pretty bang up job at describing the game and providing basic instructions for how it works.

So AI has saved me from some writing drudgery. But as I have found with most of my own experience with LLM systems, it often makes subtle mistakes and has blind spots, such as the lack of awareness about the origins of the game. So I'll describe that stuff here.

The game was originally for the obscure (market failure in France--perhaps also in Japan) Sanyo PHC-25. There is a small amount of French software for the PHC-25 that I have come across:

http://www.phc25.com/collection.htm

I haven't been able to locate any Japanese stuff, but if folks out there know of any, please let me know. The reason the PHC-25 is useful for my projects is it uses the Motorola MC-6847 video chip (a Japanese variation of it), which is the chip used in the MC-10. So text and graphic screens are essentially compatible. I have done other conversions in the past, such as "Citadelle: The Shield of Oran."

The BASIC is also very similar to the MC-10s Microsoft variation. However, to use graphics commands on an MC-10 you need access to the MCX-SD or MCX-128 add-on pack. These add Coco BASIC graphic commands so hires screen stuff can be done. The entire game is in Color Graphics Three (CG3) mode. The fact that this is a graphic text adventure is another detail missed by Gemini.

I had to do some conversion of commands from Sanyo Basic v1.3 to Microsoft, but they are very close in most respects. The first big hurdle was that Sanyo Basic has a RESTORE (line number) feature, which Coco Extended BASIC doesn't have. So I had to count up all the DATA elements for the various data lines referenced for terrain graphic elements, and then create a subroutine to quickly read all the elements just before that line. This created a very excessive delay in drawing the tent, so I PEEKed and stored (as part of the startup screen delay) and restored that specific item's DATA read location.

The second big hurdle was that Sanyo Basic has built in text rendering for hires screens, whereas Coco  Basic does not. Instead I had to use DRAW commands and a subroutine for placing messages on screen of the right size and spacing. This required the most conversion, since the PHC-25 could just use regular LOCATE and PRINT commands for messages, whereas I had to set variables and GOSUB a bunch of subroutines instead.  I had to scale my text routine so it as closely matched the size of original as possible.  However, I think the original program used a slightly narrower font in the horizontal, which I couldn't get my routine to exactly match, so it had a couple of extra lines to work with. This required some condensing and re-formatting of messages for my version.  For example, I had to print 3 of the inventory items in a different color font (red) and list them on lines with other items.

Once that was done, I just had to use my old high school French and Google translate to convert all the commands and messages. There are always some challenges. In this case the word which I translate as FLASK was a little obscure. I think "OUTRE" means something like "skin," as in "wineskin." But I wanted a familiar term in English, which suggested a rustic form of container, but that was not too obscure or long since space for text on screen is at a premium given the font differences. "Flask" seemed to strike a good balance.

Then I just had to figure out playing the game so I could bug test it. The author of the French web page mentions in his comment on the game that he never was able to complete it:

LE jeu d'aventure pour le Sanyo.
Vous êtes un homme préhistorique et vous devez ramener le feu au village. Le chemin sera semé d'embûches. Personnellement, je n'ai jamais réussi à finir le jeu vivant :)

Translation:

THE adventure game for the Sanyo. You are a prehistoric man and you must bring fire back to the village. The path will be fraught with pitfalls. Personally, I never managed to finish the game alive :)

I also found this to be the case. I kept dying from exhaustion, or thirst or hunger. Exhaustion (from lack of SLEEP) was particularly difficult.  As much as I would try to EAT and DRINK and SLEEP regularly it didn't seem enough, and when I started doing these actions, it seemed like the opponents I met would become particularly difficult to defeat. The SN, SB and SS variables in the following code refer to your level of eating, drinking and sleep. You start at zero. If you rise above certain levels (10, 8 and 30), you starve to death, die of thirst, or die from exhaustion.

30250 IFSN<0THENEX=EX+SN:SN=0

30256 IFSB<0THENEX=EX+SB:SB=0

30258 IFSS<0THENEX=EX+8*SS:SB=0

When you do the actions of EAT or DRINK, an amount 5.1 gets subtracted from these counts. The lines of code above are meant (I think) to reset you to zero if amounts go below zero and penalize you for being excessive by subtracting the amount you went under zero from your EX (experience). This is, I think, meant to be an encouragement for being judicious in these actions and not just "pounding" down the food and drink (if available) and sleeping to excess. I switched the starvation and death by thirst levels to both trigger at above 10. They count up by 1 per turn. Sleep counts up by 2 or 3, and I left the trigger at above 30.

You might also notice that the penalty routine doesn't reset the sleep variable SS to 0, but resets the thirst variable to zero if you sleep excessively.  I think this was a simple typo, so I fixed it:

30258 IFSS<0THENEX=EX+SS:SS=0

The real problem was with the SLEEP routine. Whereas the first two actions would subtract 5 when done, sleeping would only subtract 2 or 3 (in a 6 turn cycle of "nighttime" and "daytime"-- indicated by the color of the sky-- yellow for day, blue for night). This meant the effect of sleeping was very limited, and encouraged doing multiple "sessions" of it.  But each SLEEP also increases the food and drink counts by 1 (I guess one is usually hungry and thirsty after sleeping), so you also need to do more of these actions if you slept multiple times. But doing too much of any actions, again, can degrade EX.  Also, notice that the penalty for excessive sleep is *8 (times 8 the amount you went under zero). The EX variable plays a role in hunting success (which you need to eat) and combat success, which helps make areas safe to drink. So I found I would easily fall into a terminal spiral of needing these resources but not being able to get enough sleep before death occurred. Once entered into, it seemed impossible to get back to a healthy equilibrium.

This dynamic was further exacerbated by the warning routines for sleeping and drinking. These warnings only trigger if SN=8 or SB=5 exactly:
30230 IFSN=8THENCLS:LOCATE0,10:PRINT"VOUS AVEZ FAIM" ELSE IFSN>10THENCLS:LOCATE0,11:PRINT"VOUS ETES MORT   DE FAIM":GOTO40000

30240 IFSB=5THENCLS:LOCATE0,10:PRINT"VOUS AVEZ SOIF"ELSEIFSB>7THENCLS:LOCATE0,11:PRINT"VOUS ETES MORT      DE SOIF":GOTO40000
So you would only get a single warning for each. But once you eat or drink, a decimal amount was subtracted, which means you would get no more warnings until you ate and drank to below zero, which would reset the count to zero but result in a EX penalty. Here are the original eating and sleeping IF routines showing how they reduce by 5.1:
15080 IFBB=1THENCLS:LOCATE0,11:PRINT"VOUS BUVEZ":SB=SB-5.1:IFDR=1THENDR=0:BB=0:GOTO30000 ELSE GOTO30000

15150 IFVI>0THENCLS:LOCATE0,11:PRINT"VOUS MANGEZ":SN=SN-5.1:VI=VI-1:DR=1:IFVI<>0THENGOTO30000
The lack of warning, the downward spiraling interaction between drinking, eating and sleeping, the lack of the effectiveness of sleeping, and the excessive punishment for over sleeping made the game seem exceedingly brutal and unfair.  In fact, I think the fact that SS (sleep) would not get reset to zero would mean that for every turn thereafter EX would continue to be subtracted, making hunting impossible from then on. This would explain the "death spiral."

So I made a judgement call that this is one of those instances from back in the day (when very little software was available) of making games brutally hard just to allow players to get "maximum play value" from a game (i.e. days and days of frustration chasing the exact random conditions that would allow a win after a brutal education in the finicky expectations of a program). So I trebled the effect of sleeping (to -6 or -9), and took out the *8 EX punishment for oversleeping, which brings it into line with the other two factors. And I changed the decimal reduction (-5.1) for eating and drinking to just -5, so that warnings will always be able to be given about your needs. And I added an additional warning for both at the second to last turn before death. When you kill a bison, you get +2 EX, but killing a bird only earned you +.1. This seemed an excessive contrast so I set the value of killing a bird at +.5.

After those changes I found the game more playable and was able to concentrate on trying to win. I wont give away how to get fire back to your village, except to note that there are multiple pathways, and that I clarified a graphics hint, which can only be seen during daylight. Once you get fire you need to get back to your village, so mapping is probably a requirement. Here is a partial (and possibly somewhat inaccurate) map from my own rough notes:


The game creatively uses combinations of terrain graphic elements to make a diverse array of location types. The variety is more than the code might otherwise appear to be capable of, given that it is under 16K in size. It is really a clever little resource management, simulation, with text adventure and CRPG elements.

It has some charming images given the limitations of the graphics screen. I tweaked a few of them to provide greater contrast of some objects such as the bird and the tree trunk. I also had to shift a few of the coordinates of the PAINT commands, or add a pixel so that some areas would get filled, such as the leaves of the tree on the plain (top left below). It took quite a while for me to figure out the bird. I finally realized (gestalt shift) that it was a bird diving to the left rather than a large beaked toucan-like bird flying upward. Close examination of the operation of the PAINT command, which seems to work slightly differently on the Sanyo, revealed hidden elements when fills worked correctly, such as one of the arms of the tyrannosaur. One of the legs of the cave man didn't fill either. I also added colour to his spear hand and right foot to match his body.


Similarly with the different types of the terrains, I had to tweak the PAINT commands to get certain features to fill in, such as the red hill on the hill terrain, or the yellow horizon of the forest terrain. The images of the top row of the following set are how the terrains looked untweaked. The bottom two rows represent the tweaked day and night variations. The night variation of the forest is quite different from the original PHC-25 game.  That version filled almost the entire screen with blue, except for the very bottoms of the trunks below the horizon level. I opted instead for a moody green background color and simply filling the leaf canopy dark blue. I also adjusted the waves/ripples on the river terrain to make them look more wavy.  On the mountain terrain, there was a little sliver on the bottom right which didn't get turned red as in the original, but stayed the color of the day or night sky. I made sure it got filled in.


I hope my edits haven't maimed the game (made it too easy), but simply more playable and fair (given the patience levels of modern audiences). But if you want the raw original, you can always try it in French using a PHC-emulator, which I believe can also be found on the phc25.com site link above. Thanks to David Kilpatrick, Nicolas of phc25.com, and to Dave Bernazzani for spotting a spelling variance between the LOOK description and GET routine (AX versus AXE) in my translation.

FIREWAR.C10 for the Tandy MC-10 with MCX-BASIC can be downloaded here:

FIREWAR.BAS for the Tandy Color Computer can be downloaded or played online here:

The conversion to Coco Basic from MCX Basic required putting spaces into the code after certain uses of variables. And you can't use a simple color number after LINE commands, but must change the foreground color using the COLOR command first. Then you must use PSET or PRESET for the color attribute of the LINE command. Also, I had to change to different POKES and PEEKS for the DATA statement pointers.

The source code for both version can be found here: https://github.com/jggames/trs80mc10/tree/master/quicktype/MCX/FireWar

** SPOILER ALERT **

If you are really curious, here is a video of me winning the game, to show that it can be done:


And here is a screenshot of me winning on the Coco version: