Jump to content
IGNORED

Converting basic?


Jinks

Recommended Posts

I can't imagine it would be too difficult (relatively) to read a file, accept commands in one style of BASIC, and convert it to 7800 BASIC. The problem is that there is no standard all encompassing BASIC so you would have to allow for all the system specific things (graphics, sound, input) in a way that makes sense for the 7800. Once you've done that you would just be left with 7800 BASIC but with slightly different command names.

Link to comment
Share on other sites

I think I may be too dumb... I was looking at c64 basic like in compute magazine. I have a pile of them and was thinking perhaps a person could use those and convert to 7800 basic. start with a small program maybe and go from there.

Thanks for the response..

Link to comment
Share on other sites

In general you need to have some understanding of both the system you are converting from, and the system you are converting to, for a successful result. Most of the action in C64 programs come from PEEK and POKE to various addresses and chips: screen memory matrix, VIC-II chip for sprites etc, SID for sounds, CIA for reading joysticks and so on. Then again another dialect of BASIC with built-in commands to handle such functions would still require you to know how these commands are carried out, what the syntax really means so in that respect a good set of C64 memory maps might be equally good.


Correct me if I'm wrong, but my understanding is that 7800Basic doesn't support string variables, which might limit your source of suitable programs further, as the early books with generic BASIC listings meant to run on any dialect mostly rely on PRINT and INPUT statements rather than custom graphics commands. Arrays is also something to look out for, although I understand the language has some support for that.


Of course INPUT doesn't make sense on a system that doesn't have a keyboard anyway, but never mind that little detail... :)

Edited by carlsson
Link to comment
Share on other sites

Correct me if I'm wrong, but my understanding is that 7800Basic doesn't support string variables, which might limit your source of suitable programs further, as the early books with generic BASIC listings meant to run on any dialect mostly rely on PRINT and INPUT statements rather than custom graphics commands.

Pretty much. In 7800basic you can work with a set of bytes, and plot them to the screen as characters or values. There's nothing equivalent to string manipulators, or a versatile print routine that can display different variable types in a single statement, and scroll the screen when it hits the bottom.

 

Nothing that prevents you from rolling your own subset of the above functionality in your basic program, of course.

 

Since it's meant to be a game producing language on a system with no secondary storage, most of the 7800basic commands are meant to produce simple+fast low level code, and keep the embedded library functions to a small footprint. String/print functions didn't fit into that, and didn't seem to be required for most console games - I may implement them some day (as a module) but there are much bigger fish to fry right now. (e.g. easy scrolling)

  • Like 1
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...