Bunyon / ScottCom

Scott Adams TI99/4A data file interpreter and Compiler

Wednesday, December 10, 2008

Other Projects

Random stuff that has been neglected for too long.

Bunyon
Cleaned up the head of the Bunyon interpreter last night, branched it for playing with the TRS80 format. The plan is to convert the TI99 bytecode into an more managable form of bytecode and strings internally. With the new internal representation I can load the TRS80 ScottFree format and convert that from its ASCII line oriented text into new one.

The hope is that there will be litle to no code change required regarding trs80 game code and ti99 game code for playing, but of course there are always edge cases, and probably the couple of opcodes that the TI99 does not use, the TRS80 probably will use…

I also need to test the remaining four Scott Adams games I have and create .apl code and transcriptions.

This will hopefully go hand in hand with the ScottCom compiler.

ScottCom
Speaking of the ScottCom compiler, the plan for that is to export the internal representation (which is TI99 bytecode) into TRS80 line oriented format.

The big problem here is with TRY blocks. I dont know how or even if, the TRS80 format uses or implements try blocks.

SmallC Cleanup
My little SmallC project is going ok, the first big hurdle is the need to add prototypes. I branched the AVR codebase and stripped all the junk out, the nice thing about this base is it handles structs and unions and ANSI-C functions, just not prototypes.

It would be really nice if it converted it into an AST but maybe I’ll consider that later. I need to also incorporate some of the ideas from the original SmallC 2.x tree (this has a different license than the original 1.x branch the AVR tree comes from), which turns it into pcode in memory rather than direct asm textual statements.

Codpiece
This is my little database system, kind of like an access database without the forms front end. It was inspired by the original PC-File+ database system (who remember the first shareware app?), and is more of an interesting excercise than anything serious (are not all my projects?).

Cracks and Cervices
Ahh my other big project (next to fishguts), this needs some loving, but until Fishguts gets to a more complete state I dont intend to focus on it much. I really need to cut a release of its current code base but I think it needs a few more extras added to it (you know, those things on the roadmap that I decided it should have, but never finished in my projected time allotment).

Posted by Stu on 12/10/2008 at 01:52 PM Permalink to this post.
Filed Under : ComputersDevelopmentBunyon / ScottComCracks and Crevices
Tags:

(0) Comments
Share/Bookmark

Saturday, April 21, 2007

Scott Adams TI99 Games

Well back in February I got some disk images that had

  • Hulk version TI/128.2
  • Spiderman version TI/001.0
  • Buckaroo Banzai version TI/229.1
  • Sorcerer of Claymorgeu Castle version TI/127.4

These have been converted with the Tex-Comp editor, so I’m not 100% sure if Scott wrote them or if someone converted the TRS80 game files (they would have needed knowledge of the TRS80 format back then)..

Anyway, I now am required to test them against Bunyon… more news later.

Posted by Stu on 04/21/2007 at 09:46 PM Permalink to this post.
Filed Under : ComputersDevelopmentBunyon / ScottCom
Tags:

(0) Comments
Share/Bookmark

Tuesday, November 15, 2005

jEdit and ScottCom

I’ve written up a syntax highliter for jEdit. See below for info.

edit the modes/catalog file and add;

<MODE NAME="scottcom"        FILE="scottcom.xml"
                
FILE_NAME_GLOB="*.apl" /> 

Then write this out to a file called modes/scottcom.xml

<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<
MODE>
    <
PROPS>
        <
PROPERTY NAME="lineComment" VALUE="#" />

        <
PROPERTY NAME="wordBreakChars" VALUE=",{}" />

        <
PROPERTY NAME="indentOpenBrackets" VALUE="{" />
        <
PROPERTY NAME="indentCloseBrackets" VALUE="}" />
        <
PROPERTY NAME="indentNextLine" VALUE="s*(try)s*" />
        <
PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
    </
PROPS>

    <
RULES ESCAPE="" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
        <
EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>

        
<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
            <
BEGIN>"</BEGIN>
            <END>"
</END>
        </
SPAN>
        <
SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
            <
BEGIN>'</BEGIN>
            <END>'
</END>
        </
SPAN>

        <
SEQ TYPE="OPERATOR">=</SEQ>
        <
SEQ TYPE="OPERATOR">}</SEQ>
        <
SEQ TYPE="OPERATOR">{</SEQ>
        <
SEQ TYPE="OPERATOR">)</SEQ>
        <
SEQ TYPE="OPERATOR">(</SEQ>
        <
SEQ TYPE="OPERATOR">;</SEQ>

        <
KEYWORDS>
            <!-- 
Top level stuff -->
            <
KEYWORD1>verb</KEYWORD1>
            <
KEYWORD1>noun</KEYWORD1>
            <
KEYWORD1>act</KEYWORD1>
            <
KEYWORD1>timreg</KEYWORD1>
            <
KEYWORD1>roomreg</KEYWORD1>
            <
KEYWORD1>flag</KEYWORD1>
            <
KEYWORD1>room</KEYWORD1>
            <
KEYWORD1>item</KEYWORD1>
            <
KEYWORD1>alias</KEYWORD1>

            <
KEYWORD1>n_to</KEYWORD1>
            <
KEYWORD1>s_to</KEYWORD1>
            <
KEYWORD1>e_to</KEYWORD1>
            <
KEYWORD1>w_to</KEYWORD1>
            <
KEYWORD1>u_to</KEYWORD1>
            <
KEYWORD1>d_to</KEYWORD1>

            <
KEYWORD1>void</KEYWORD1>
            <
KEYWORD1>limbo</KEYWORD1>
            <
KEYWORD1>player</KEYWORD1>
            <
KEYWORD1>rm_Zero</KEYWORD1>

            <
KEYWORD1>auto</KEYWORD1>
            <
KEYWORD1>initial</KEYWORD1>
            <
KEYWORD1>treasure</KEYWORD1>
            <
KEYWORD1>word_length</KEYWORD1>
            <
KEYWORD1>light_time</KEYWORD1>
            <
KEYWORD1>max_load</KEYWORD1>
            <
KEYWORD1>title_screen</KEYWORD1>

            <!-- IF'
s -->
            <KEYWORD2>has</KEYWORD2>
            <KEYWORD2>here</KEYWORD2>
            <KEYWORD2>avail</KEYWORD2>
            <KEYWORD2>!here</KEYWORD2>
            <KEYWORD2>!has</KEYWORD2>
            <KEYWORD2>!avail</KEYWORD2>
            <KEYWORD2>exists</KEYWORD2>
            <KEYWORD2>!exists</KEYWORD2>
            <KEYWORD2>in</KEYWORD2>
            <KEYWORD2>!in</KEYWORD2>
            <KEYWORD2>set</KEYWORD2>
            <KEYWORD2>!set</KEYWORD2>
            <KEYWORD2>something</KEYWORD2>
            <KEYWORD2>nothing</KEYWORD2>
            <KEYWORD2>le</KEYWORD2>
            <KEYWORD2>gt</KEYWORD2>
            <KEYWORD2>eq</KEYWORD2>
            <KEYWORD2>moved</KEYWORD2>
            <KEYWORD2>!moved</KEYWORD2>

            <!-- Commands -->
            <KEYWORD2>cls</KEYWORD2>
            <KEYWORD2>pic</KEYWORD2>
            <KEYWORD2>inv</KEYWORD2>
            <KEYWORD2>!inv</KEYWORD2>
            <KEYWORD2>ignore</KEYWORD2>
            <KEYWORD2>success</KEYWORD2>
            <KEYWORD2>try</KEYWORD2>
            <KEYWORD2>get</KEYWORD2>
            <KEYWORD2>drop</KEYWORD2>
            <KEYWORD2>goto</KEYWORD2>
            <KEYWORD2>zap</KEYWORD2>
            <KEYWORD2>die</KEYWORD2>
            <KEYWORD2>move</KEYWORD2>
            <KEYWORD2>quit</KEYWORD2>
            <KEYWORD2>.score</KEYWORD2>
            <KEYWORD2>.inv</KEYWORD2>
            <KEYWORD2>refill</KEYWORD2>
            <KEYWORD2>save</KEYWORD2>
            <KEYWORD2>steal</KEYWORD2>
            <KEYWORD2>same</KEYWORD2>
            <KEYWORD2>nop</KEYWORD2>
            <KEYWORD2>.room</KEYWORD2>
            <KEYWORD2>.timer</KEYWORD2>
            <KEYWORD2>timer</KEYWORD2>
            <KEYWORD2>.noun</KEYWORD2>
            <KEYWORD2>.noun_nl</KEYWORD2>
            <KEYWORD2>.nl</KEYWORD2>
            <KEYWORD2>delay</KEYWORD2>
            <KEYWORD2>end</KEYWORD2>
            <KEYWORD2>on</KEYWORD2>
            <KEYWORD2>off</KEYWORD2>
            <KEYWORD2>add</KEYWORD2>
            <KEYWORD2>sub</KEYWORD2>
            <KEYWORD2>swap</KEYWORD2>
            <KEYWORD2>has</KEYWORD2>
            <KEYWORD2>has</KEYWORD2>
            <KEYWORD2>has</KEYWORD2>

            <!-- Tags -->
            <LITERAL2>north</LITERAL2>
            <LITERAL2>south</LITERAL2>
            <LITERAL2>east</LITERAL2>
            <LITERAL2>west</LITERAL2>
            <LITERAL2>up</LITERAL2>
            <LITERAL2>down</LITERAL2>

            <LITERAL2>go</LITERAL2>
            <LITERAL2>get</LITERAL2>
            <LITERAL2>drop</LITERAL2>

            <LITERAL2>light</LITERAL2>
            <LITERAL2>night</LITERAL2>
            <LITERAL2>runout</LITERAL2>
        </KEYWORDS>
    </RULES>
</MODE> 
Posted by Stu on 11/15/2005 at 01:43 PM Permalink to this post.
Filed Under : ComputersDevelopmentBunyon / ScottCom
Tags:

(0) Comments
Share/Bookmark

Friday, October 28, 2005

Lost Dutchmans Mine

I’ve written up / ported, Lost Dutchmans Mine as a new example for the ScottCom compiler…

title_screen =
    #1234567890123456789012345678901234567890
    "          Lost Dutchman's Mine",
    "                   By",
    "",
    "          Cleveland M. Blakemore",
    "",
    "",
    "         Press a key to continue.",
    "",
    "";

word_length = 31;
light_time = 1000;
max_load = 6;

noun(north) north;
noun(south) south;
noun(east)  east;
noun(west)  west;
noun(up)    up;
noun(down)  down;

verb(go) 	go;
verb(drop) 	drop, putdown, put, place, leave;
verb(get) 	get, take, pickup, grab, steal, grift, lift, snatch;

verb call;
verb dig;
verb shoot;
verb kill;
verb say;
verb turn, rotate, twist;
verb whistle, blow;

verb read, see, glance, peruse;
verb inventory, inv, i;
verb quit, q;
verb climb, shinny;
verb throw, chuck, pitch, lob, toss;
verb look, l, examine, ex, x;

verb light, ignite;

noun gozer;
noun shelf;

room rm_GasStation
	"You are in a deserted last chance gas station."
	;

initial = rm_GasStation;
treasure = rm_GasStation;

room rm_AdobeHouse
	"You are in a dusty adobe house with a sunbeam coming through an east window.",
	n_to rm_MineEnterance
	;

room rm_EW_MineShaft
	"You are in a long e-w mineshaft",
	u_to rm_GraniteTunnel,
	w_to rm_StoneStaircase,
	e_to rm_CoolCavern
	;

room rm_GraniteTunnel
	"You are in a sloping granite tunnel.",
	d_to rm_EW_MineShaft,
	u_to rm_MineEnterance
	;

room rm_MineEnterance
	"You are in front of an old boarded up mineshaft entrance",
	n_to rm_GraniteTunnel,
	s_to rm_AdobeHouse,
	w_to rm_Ravine
	;

room rm_CoolCavern
	"You are inside a cool cavern with a small crack leading down to the north.",
	n_to rm_RiverBed,
	d_to rm_RiverBed,
	w_to rm_EW_MineShaft
	;


room rm_StoneStaircase
	"You are on a spiral stone staircase.",
	e_to rm_EW_MineShaft,
	e_to rm_EW_MineShaft,
	d_to rm_BurialGround
	;

room rm_RiverBed
	"You are in a subterranean river bed running east & west.",
	s_to rm_CoolCavern,
	u_to rm_CoolCavern
	;


room rm_BurialGround
	"You are in an ancient indian burial ground.",
	u_to rm_StoneStaircase
	;

room rm_Ravine
	"You are in a deep ravine.",
	e_to rm_MineEnterance
	;

noun plaque;
item itm_Plaque (plaque) "a metal plaque above a glass shelf" rm_GasStation;

noun skull;
item itm_Skull (skull) "a skull mounted on a spear" rm_AdobeHouse;

noun skeleton;
item itm_Skeleton (skeleton) "a skeleton draped with cobwebs" rm_EW_MineShaft;

noun spirit;
item itm_Spirit (spirit) "a whistling evil spirit" rm_MineEnterance;

noun calendar;
item itm_Calendar (calendar) "a colossal stone sun calendar" rm_CoolCavern;

noun wolf, timber;
item itm_Wolf (wolf) "a ravenous snarling timber wolf!" rm_StoneStaircase;
item itm_DeadWolf (wolf) "a dead timber wolf" void;

noun wheel;
item itm_Wheel (wheel) "a circular wheel set in the middle of an iron door to the east" rm_RiverBed;

noun mound;
item itm_Mound (mound) "a large burial mound" rm_BurialGround;

noun matchbook, book;
item itm_Matchbook (matchbook) "a matchbook" rm_GasStation;

noun torch;
item itm_UnlightTorch (torch) "a wooden torch" rm_AdobeHouse;
item (light) itm_Torch (torch) "a lit torch" void;

noun revolver, gun, pistol;
item itm_Revolver (revolver) "a perl handled revolver" rm_GasStation;

noun bottle;
item itm_Bottle (bottle) "an empty 7-Up bottle" rm_GasStation ;

noun ruby;
item itm_Ruby (ruby) "a lustrous red ruby." void;

noun bullets;
item itm_Bullets (bullets) "a handfull of rusty bullets." rm_EW_MineShaft;

noun shovel;
item itm_Shovel (shovel) "a rusty shovel" rm_Ravine;

noun diamond;
item itm_Diamond (diamond) "a glowing diamond" rm_RiverBed;

noun nugget;
item itm_Nugget (nugget) "the dutchman's nugget" void;

flag (night) f_Darkness;
flag f_Intro;
flag f_Temp;

flag f_GoCrack;
flag f_ReleasedWater;

timreg t_Zero;
timreg t_WolfCount;
timreg t_GhostCount;
timreg t_River;

roomreg rSwap;

act auto 100
{
	!set(f_Intro);
	on f_Intro;

	# set some variables, so our interp sees a special sign…..
	timer 115;	# s
	timer 103;	# g
	timer 101;	# e
	timer 111;	# o
	timer 114;	# r
	timer 103;	# g
	timer 101;	# e
	sub 102;	# reset back to -1

	"Welcome to the Lost Ducthman's Mine by Cleveland M. Blakemore, written in 1988 for Ahoy! magazine. Ported to Scott Adams Format as a test.";

	# set wolf attack to 0.
	timer 0;
	swap t_WolfCount;

	# set ghost attack to 0
	timer 0;
	swap t_GhostCount;

	timer 0;
	swap t_Zero;

	timer 3;
	swap t_River;

	goto rm_AdobeHouse;
	swap rSwap;
	goto rm_GasStation;

	!inv;
}


act go down
{
	in(rm_CoolCavern);
	on f_GoCrack;
}

act go north
{
	in(rm_CoolCavern);
	on f_GoCrack;
}

act go crack
{
	in(rm_CoolCavern);
	on f_GoCrack;
}

act auto 100
{
	in(rm_CoolCavern);
	set(f_GoCrack);
	off f_GoCrack;
	timer 0;

	try
	{
		has(itm_Matchbook);
		add 1;
	}

	try
	{
		has(itm_Revolver);
		add 1;
	}

	try
	{
		has(itm_Bottle);
		add 1;
	}

	try
	{
		has(itm_Ruby);
		add 1;
	}

	try
	{
		has(itm_Bullets);
		add 1;
	}

	try
	{
		has(itm_Shovel);
		add 1;
	}

	try
	{
		has(itm_Diamond);
		add 1;
	}

	try
	{
		has(itm_Nugget);
		add 1;
	}

	try
	{
		has(itm_Torch);
		add 1;
	}

	try
	{
		gt(1);
		"You are carrying too much to fit throughthe crack.";
		end;
	}

	try
	{
		eq(1);			# has torch?
		"OK.";
		goto rm_RiverBed;
	}
}

act auto 100
{
	in(rm_GraniteTunnel);
	has(itm_Torch);
	!exists(itm_Ruby);
	move rm_GraniteTunnel, itm_Ruby;
}

act auto 100
{
	in(rm_EW_MineShaft);

	# reset wolf attack count
	timer 0;
	swap t_WolfCount;
}

act read matchbook
{
	has(itm_Matchbook);
	"Gozer Travel inc. 'Need to travel?? Call Gozer!!'";
}

act read plaque
{
	here(itm_Plaque);
	"Put all the treasure on this shelf.";
}

act call gozer
{
	off f_Temp;

	try
	{
		in(rm_AdobeHouse);
		on f_Temp;
	}

	try
	{
		in(rm_GasStation);
		on f_Temp;
	}

	set(f_Temp);
	swap rSwap;
}

act call gozer
{
	"Not from here.";
}

act whistle bottle
{
	has(itm_Bottle);
	here(itm_Spirit);
	
	.nl;
	"The spirit writhes and vanishes in a cloud of smoke.";

	zap itm_Spirit;
}

act whistle any
{
 	"Tweet Tweet Tweet…";

 	# load ghost count
 	swap t_GhostCount;
 	here(itm_Spirit);

 	try
 	{
 		.nl;
		"The spirit trembles and wavers a little.";

		add 1;
		.nl;
	}

	try
	{

		gt(2);
		.nl;
		.nl;
		"The spirit looks real angry!";
	}

	try
	{
		eq(5);
		.nl;
		.nl;
		"The evil spirit sucked the breath out of you!";
		die;
		quit;
	}

	# save it back
	swap t_GhostCount;
}

act auto 100
{
	try
	{
		in(rm_EW_MineShaft);
		off f_Darkness;
	}

	try
	{
		in(rm_GraniteTunnel);
		on f_Darkness;
	}
}


act auto 100
{
	in(rm_StoneStaircase);
	here(itm_Wolf);

	# load wolfcount
	swap t_WolfCount;
	add 1;

	try
	{
		eq(2);
		.nl;
		"The timber wolf tears you to shreds.";
		die;
		quit;
	}

	# save wlfcount
	swap t_WolfCount;
}

act go north
{
	in(rm_MineEnterance);
	here(itm_Spirit);
	"The spirit scares you back.";
}

act light torch
{
	try
	{
		has(itm_Torch);
		"It's already burning.";
		end;
	}

	try
	{
		!has(itm_UnlightTorch);
		!has(itm_Torch);

		"I dont have it.";
		end;
	}

	try
	{
		has(itm_UnlightTorch);
		!has(itm_Matchbook);

		"What with?";
		end;
	}

	try
	{
		has(itm_UnlightTorch);
		has(itm_Matchbook);

		swap itm_UnlightTorch, itm_Torch;

		"It's burning.";
	}
}

act look skeleton
{
	here(itm_Skeleton);
	"His bony claw points to the east.";
}


act shoot wolf
{
	here(itm_Wolf);
	has(itm_Revolver);

	try
	{
		!has(itm_Bullets);
		"I have no bullets!";
		end;
	}

	try
	{
		has(itm_Bullets);
		"The revolver thunders fire and the wolf falls over dead in mid-leap.";
		swap itm_DeadWolf, itm_Wolf;
	}
}

act turn wheel
{
	in(rm_RiverBed);
	!set(f_ReleasedWater);
	on f_ReleasedWater;

	"The door blasts open with a tidal wave of water!!!";
	.nl;
	"The river bed quickly fills up and you are drenched.";
	.nl;
	"You'd better leave. It's almost neck deep in here!";

	swap t_River;
	timer 3;
	swap t_River;
}

act auto 100
{
	in(rm_RiverBed);
	set(f_ReleasedWater);
	swap t_River;

	try
	{
		gt(0);
		sub 1;
	}

	try
	{
		eq(1);
		"Bubbles are coming out of your clenched lips under water.";
	}

	try
	{
		eq(0);
		"You drowned in the river.";
		die;
		quit;
	}

	swap t_River;
}

act go down
{
	in(rm_StoneStaircase);

	try
	{
		here(itm_Wolf);
		"The wolf wont let me….";
		end;
	}

	try
	{
		!set(f_ReleasedWater);
		!here(itm_Wolf);
		goto rm_BurialGround;
		.room;
		goto rm_StoneStaircase;

		"You quickly come back up, its flooded down there.";
		end;
	}

	try
	{
		set(f_ReleasedWater);
		!here(itm_Wolf);
		goto rm_BurialGround;
	}
}

act dig any
{
	in(rm_BurialGround);

	try
	{
		moved(itm_Nugget);
		"The mound has already been excavated.";
		end;
	}

	try
	{
		!moved(itm_Nugget);
		"okay, you have dug a deep hole…";
		move rm_BurialGround, itm_Nugget;
	}
}

act inventory any
{
	.inv;
}

act look any
{
	.room;
}

act quit any
{
	.nl;
	.nl;
	"Game is over. Press any key to quit.";
	quit;
}

act save any
{
	save;
}


act auto 100
{
	in(rm_GasStation);
	here(itm_Ruby);
	here(itm_Diamond);
	here(itm_Nugget);

	"Congratulations! you've won the game!";
	quit;
}
Posted by Stu on 10/28/2005 at 11:47 AM Permalink to this post.
Filed Under : ComputersDevelopmentBunyon / ScottCom
Tags:

(0) Comments
Share/Bookmark

Tuesday, August 23, 2005

Bunyon nears first release

Complete Savage Island part 2 this morning (no hiccups at all….)...

So, now its time to get a relase of 0.1 out there and see what happens… Then on to testing the home brew games I have….

Posted by Stu on 08/23/2005 at 05:05 PM Permalink to this post.
Filed Under : ComputersDevelopmentBunyon / ScottCom
Tags:

(0) Comments
Share/Bookmark

Saturday, August 20, 2005

Bunyon nearing release stage…

Made some good progress today… Only have savage island part 2 to test before I make a public release of the interpreter.. (unix/windows)...

Status;

  1. Adventureland : 100%
  2. Pirate Isle : 100%
  3. Mission Impossible : 100%
  4. Voodoo Island : 100%
  5. The Count : 100%
  6. Strange Odyssey : 100%
  7. The Mystery Fun House : 100%
  8. Pyramid of Doom : 100%
  9. Ghost Town : 100%
  10. Savage Island Part I : 100%
  11. Savage Island Part II : 0%
  12. Golden Voyage : 100%
  1. Great Advocado Adventure : 0%
  2. Matilda’s Dilema : 0%
  3. Escape from Cannibal Island : 0%
  4. Mystery of Captain Kidd : 0%
  5. Colossal Cave v4.0 Part 1 : 0%
  6. Colossal Cave v4.0 Part 2 Masters Game : 0%
  7. Computorama : 0%
  8. Escape from Alcatraz : 0%
  9. Gerrys Place : 0%
  10. Tomb of the Gray Elf : 0%
  11. Knight Ironheart : 0%
  12. Moon Adventure : 0%
  13. Nessy : 0%
  14. Travelling : 0%

Posted by Stu on 08/20/2005 at 03:28 AM Permalink to this post.
Filed Under : ComputersDevelopmentBunyon / ScottCom
Tags:

(0) Comments
Share/Bookmark
Page 1 of 2 pages  1 2 >