Jump to content
IGNORED

Scott Adams Driver


devwebcl

Recommended Posts

Hello,

 

Once again playing with cc65 & Text Adventures I was able to port ScottFree

 

The problem is after compilation the memory left is to small, therefore all the games run out of memory, however there is a small adventure called Cloak Adventure small enough to be ported to different Text Adventure dialects (It's similar to a Hello World )

 

The game can be downloaded from http://devweb.cl/atari/cc65/cloak.xex

As you can see it's a very alpha release, where there is no layout control (as usually in this kind of games).

 

The final idea was to see something with this Parser to compiled and functional in the a8.

 

Regards,

 

Devwebcl

Edited by devwebcl
Link to comment
Share on other sites

If you can convert the I/O so that it bypasses stdio you'll save several K of RAM.

You might check to see if any of the other 6502 compilers generate smaller code.

 

You might also try starting with this interpreter instead.

http://www.ifarchive.org/if-archive/scott-...ree/scottzx.zip

Edited by JamesD
Link to comment
Share on other sites

If you can convert the I/O so that it bypasses stdio you'll save several K of RAM.

You might check to see if any of the other 6502 compilers generate smaller code.

 

You might also try starting with this interpreter instead.

http://www.ifarchive.org/if-archive/scott-...ree/scottzx.zip

 

Thanks for the tip, anyway I'm using ScottFree, the one you mention is a version for ZX of it, but I have compared the code and the difference is most about the printing of information (about layout) and load/save feature, but I don't see any improvement about data structure or else.

 

I think the big problem is the atari free memory and perhaps the heuristics of cc65 for optimization, however is great compiler, thus I think the TODO is to implement a compression algorithm for the data.

Link to comment
Share on other sites

I'm using the original interpreter (well the one from the value packs)

and relocating it to run from RAM after loading from ROM and that is

fitting fine in 8K. I use CA65 and LD65 to build a cart image and this

also contains the game data for titles 1-12 which is accessed at runtime

as required, a menu to select which game you want to play and the

original script font. A game at runtime can now run in 16K :)

 

Certainly your overheads of C->asm, use of heap/stack and the

need for support of the runtime libraries when building ScottFree

are probably too great, I tried a similar thing before with the ITF

infocom interpreter for the Atari ST, building it under CC65, for me

I think the approach is to come up with a method of putting segment

code in separate banks and have a 'far' call type way of swapping

between then, say a subroutine/function jump table in RAM.

 

Regards,

Mark

Edited by Wrathchild
Link to comment
Share on other sites

....Certainly your overheads of C->asm, use of heap/stack and the

need for support of the runtime libraries when building ScottFree

are probably too great, I tried a similar thing before with the ITF

infocom interpreter for the Atari ST, building it under CC65,

Do you have a final executable of that porting, or did you have the same

problems than me? (to run out fo memory).

 

I think the approach is to come up with a method of putting segment

code in separate banks and have a 'far' call type way of swapping

between then, say a subroutine/function jump table in RAM.

 

Regards,

Mark

 

Do you know where I can find more information of segments rearrangement

in memory banks? I found something in the compiler documentation, but I it wasn't very clear.

Link to comment
Share on other sites

What are looking to do with segment rearrangement, devweb?

 

You could put your subroutine/jump table in LOWCODE (use #pragma codeseg("LOWCODE") ) and that will insure that your jumptable code is below the extended RAM window ($4000), as long as you are using the default linker config. I'm doing that in one of my programs that automatically switches in BASIC (which would overwrite some of the program, not to mention the default display list and screen ram.)

Link to comment
Share on other sites

What are looking to do with segment rearrangement, devweb?

 

You could put your subroutine/jump table in LOWCODE (use #pragma codeseg("LOWCODE") ) and that will insure that your jumptable code is below the extended RAM window ($4000), as long as you are using the default linker config. I'm doing that in one of my programs that automatically switches in BASIC (which would overwrite some of the program, not to mention the default display list and screen ram.)

 

thanks for the help :) , I'll take a look to it.

Link to comment
Share on other sites

Sorry for the delay in replying, I wanted to experiment a bit

with a cart model switching example which I've posted on the

programming forum for further discussion on it there.

It certainly ain't pretty, but does give some idea as to how

this can be done (in this case using the XEGS model).

 

Regards,

Mark

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...