News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_SRS

Adventure Interpreter Free Scott

Started by SRS, 21:20, 24 March 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SRS

Hi there,

I did not find a related post so I start this one, pls move if this was discussed earlier:

To bring more Adventures to CPC a "Scotts" machine would be cool. There is

"    SCOTT FREE
*
*    A free Scott Adams style adventure interpreter" in C on the net, which MAY be compilable with z88dk (as it brings curses.h and fileio libs). But I can't.

So any adventure freak out there that knows how to use z88dk and has solid c knowledge  - can you give it a try ?

scottfree 1.14-9, dir_506a57657c1f57d3ab56cacd82b520c8.html

Index: if-archive/scott-adams/interpreters/scottfree

which should give the cpc community the folowing adventures:

Index: if-archive/scott-adams/games/scottfree



Quote#1:  Adventureland

Wander through an enchanted realm and try to uncover the 13 lost
treasures. There are wild animals and magical beings to reckon with as
well as many other perils and mysteries. This is the Adams Classic
that started it all!
(Difficulty Level: Moderate)

#2:  Pirate Adventure

Only by exploring this strange island will you be able to uncover the
clues necessary to lead you to your elusive goal -- recovering the
lost treasures of Long John Silver.
(Difficulty Level: Beginner)

#3:  Secret Mission

In this exciting Adventure, time is of the essence as you race the
clock to complete your mission in time -- or else the world's first
automated nuclear reactor is doomed! If you survive this challenging
mission, consider yourself a true Adventurer!
(Difficulty Level: Advanced)

#4:  Voodoo Castle

The Count has fallen victim to a fiendish curse placed on him by his
enemies. There he lies, with you his only possible hope. Will you pull
off a rescue, or is he really down for the Count?!
(Difficulty Level: Moderate)

#5:  The Count

It begins when you awake in a large brass bed in a castle somewhere in
Transylvania. Who are you, what are you doing here and WHY did the
postman deliver a bottle of blood?
(Difficulty Level: Moderate)

#6:  Strange Odyssey

At the galaxy's rim, there are rewards aplenty to be harvested from a
long-dead alien civilization, including fabulous treasures and
advanced technologies far beyond human ken! Prepare yourself for the
incredible!
(Difficulty Level: Moderate)

#7:  The Mystery Fun House

As Adventure #7 begins, you find yourself hopelessly lost in the
middle of a carnival fun house. While escape may elude you, one thing
is very clear -- you're NOT here to have a good time!
(Difficulty Level: Moderate)

#8:  Pyramid of Doom

This is an Adventure that will transport you to a dangerous land of
crumbling ruins and trackless desert wastes into the PYRAMID OF DOOM!
Jewels, gold -- it's all here for the plundering -- IF you can find
the way.
(Difficulty Level: Moderate)

#9:  Ghost Town

You must explore a once-thriving mining town in search of the 13
hidden treasures. With everything from rattlesnakes to runaway horses,
it sure ain't going to be easy! Includes a special bonus scoring
system too!
(Difficulty Level: Advanced)

#10:  Savage Island Part I

A small island holds an awesome secret -- will you be able to discover
it? This is the beginning of a two-part Adventure.
NOTE: This one's a toughie -- for experienced Adventurers only!
(Difficulty Level: Advanced)

#11:  Savage Island Part II

The suspense begun in Adventure #10 now comes to an incredible
conclusion with SAVAGE ISLAND PART II! This Adventure requires you to
have successfully finished #10, wherein you were given the secret
password to begin this final half.
NOTE: For experienced Adventurers only!
(Difficulty Level: Advanced)

#12:  Golden Voyage

The king lies near death in the royal palace. You have only three days
to bring back the elixir needed to rejuvenate him. Journey through the
lands of magic fountains, sacred temples, stormy seas and gold, gold,
GOLD! This one is for experienced Adventurers only!
(Difficulty Level: Advanced)

#13:  Sorcerer of Claymorgue Castle

Solon the Master Wizard has learnt of Vileroth's destruction and how,
in his final days, he concealed the stolen 13 Stars of Power within
the Castle of Claymorgue, determined that no one should possess them.
As Solon's apprentice with a few spells, can you recover Solon's
stolen Stars? The Castle contains further spells but beware -- as an
apprentice you may find the results unpredictable!


Zoe Robinson

This sounds like a nice project for someone. I hope someone who knows how to port this over will give it a try. :)

reidrac

Yes, I mentioned it in a different thread and I thought it would be a nice project for a weekend.

Well, there are some challenges.

First of all it requires curses (a console based UI library, let's say). Is not too difficult to get rid of that code and use just your own stuff (like very basic stdio).

Second... the memory requirements. Scottfree currently reads files from disk, that would be OK in the CPC, but it would simplify things if the interpreter reads them from a memory location.

And finally I don't remember why I gave up. It could be that the adventure data is to big to load it in the CPC, but I don't remember, so I can't really say if it is possible or not; only that I kind of looked at it and run away!
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick, Hyperdrive and The Heart of Salamanderland for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

SRS

#3
Ah, yes, I found it.

Now I did spent hours trying to get ScottZX compiled (which "works") and running on CPC, which crashes ofc even after fixing some code.

(Org Source : Index: if-archive/scott-adams/interpreters/scottfree)

It seems I can hunt it down to the following start of programm:

._main
    ld    hl,65490    ;const
    add    hl,sp
    ld    sp,hl
    call    mallinit
    ld    hl,_heap
    ld    bc,4
    add    hl,bc
    push    hl
    ld    hl,12000    ;const
    push    hl
    call    sbrk_callee
    call    _ClearScreen


which seems to put SP somewhere that CPC does not like. I did NOT find out how to get this z88dk to put  the SP to where I want it ... it seems not to "understand"
my
#pragma output STACKPTR = 41728 //=&A300
#pragma output myzorg = 4096 //


well, I'll attach the source and generated ASM ... so someone else can start from there  :)

Compiled with:

Quotezcc +cpc -notemp -m -clib=ansi -lcpcfs -lmz -lmalloc -create-app ScottCPC.c --list

reidrac

The CPC backend of Z88DK is sooo broken, after some days I ported Space Pest Control to SDCC and never looked back!

I believe you can set those in a zcc_opt.def file in case they're ignored.

It usually looks like this:

IF !DEFINED_STACKPTR
defc DEFINED_STACKPTR = 1
ENDIF

DEFINE DEFINED_myzorg
defc myzorg = 24100

IF !NEED_floatpack
DEFINE NEED_floatpack
ENDIF


(that's for a speccy project)

After a quick look at cpc_crt0.asm (in lib dir of Z88DK), that CRT doesn't seem so support _STACKPTR (as spec_crt0.asm does, for example).

Sooo you're probably better off setting the stack yourself at the beginning of the main code.
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick, Hyperdrive and The Heart of Salamanderland for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

SRS

thx, maybe next weekend :)

After that it needs some redesign - I think it would to make it better on CPC to have "one exe" per Adventure and not a "load interpreter".

So the FILE part and the MALLOC could be thrown out. The game data would have be "compiled" to C source code for that ... ah well

Powered by SMFPacks Menu Editor Mod