Jump to content
Random Terrain

set optimization (Only one or more than one?)

Recommended Posts

The bB page doesn't seem to be clear on this. Can you only use one of the four options, or can you use more than one?

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#optimization

 

If you can use more than one, is it similar to kernel options where only certain options can be used together?

 

 

Thanks.

Share this post


Link to post
Share on other sites

I assume you can use more than one. I've been using optimization speed and optimization inlinerand with Heartbreak. Maybe one of them isn't doing anything as a result, but I don't get any errors, anyway.

Share this post


Link to post
Share on other sites

Maybe we should gather some of these intriguing questions in one place then submit the list to batari. The only other way is to have our assembly gurus reverse engineer what Fred already knows.

Share this post


Link to post
Share on other sites

I think batari briefly browses this forum from time to time, so maybe he'll have the answer. Or maybe one of the other guys with big brains can tell by looking at the bB code.

Share this post


Link to post
Share on other sites

I confirmed by looking at the source code for the bB compiler... the optimizations can be mixed and matched.

  • Like 2

Share this post


Link to post
Share on other sites

I confirmed by looking at the source code for the bB compiler... the optimizations can be mixed and matched.

 

Can you tell if any of them are incompatible with each other? And can you tell if they can be on the same line like this:

 

set optimization speed size noinlinedata inlinerand

 

or if they need to be on separate lines like this:

 

set optimization speed

set optimization size

set optimization noinlinedata

set optimization inlinerand

 

 

Thanks.

Share this post


Link to post
Share on other sites

None of the settings are incompatible with each other, with the exception of "set optimization none". If you use that it will disable previous optimization lines.

 

You can't put optimizations all on the same line, they need to be separate lines.

  • Like 1

Share this post


Link to post
Share on other sites

None of the settings are incompatible with each other, with the exception of "set optimization none". If you use that it will disable previous optimization lines.

 

You can't put optimizations all on the same line, they need to be separate lines.

 

Thanks. I'll update the bB page later today.

Share this post


Link to post
Share on other sites

I took a look at the optimization description today, and what you have written for "size" isn't accurate. Based on what I see in the bB source code, this is how it works...

 

size

May decrease the size of generated code when using the multisprite kernel. bB will attempt to reuse bytes that may otherwise go wasted when it tries to align sprite data.

Share this post


Link to post
Share on other sites

I took a look at the optimization description today, and what you have written for "size" isn't accurate. Based on what I see in the bB source code, this is how it works...

 

size

May decrease the size of generated code when using the multisprite kernel. bB will attempt to reuse bytes that may otherwise go wasted when it tries to align sprite data.

 

Weird. That was written by batari. I guess he forgot how it worked when wrote up the description.

 

 

Thanks.

Share this post


Link to post
Share on other sites

Maybe his intent was to increase the scope for "size" beyond the multisprite kernel, but that's all it's affecting right now, and it doesn't have anything to with multiplication or division. (unlike "speed")

 

I'm not trying to claim I'm more authoritative on bB than batari, but the source code is pretty clear. Anyone with a rudimentary understanding of C can search statements.c for "optimization" and confirm what I'm saying.

Share this post


Link to post
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.

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...