Jump to content
IGNORED

8.8 fixed point help please


TwentySixHundred

Recommended Posts

Hi all,

 

Having some sort of issue and not understanding where im going wrong.

 

For some reason i can compile the code fine if using integers only but as soon as i use decimal points it's saying syntax error. Not sure if its because im using it with the DPC+ kernel or something simple is missing.

 

Anyway here is the bas file if someone can take a quick look that would be much appreciated thanks.

 

default.bas

Edited by Tony The 2600
Link to comment
Share on other sites

I'm not sure why you were trying to define variables in a different bank, but that was what was confusing bB. I moved the variable definitions to the top like normal, and got rid of the goto to and from where you defined them. I commented out the fixed_point_math include as it only applies when you mix 4.4 ad 8.8 types in operations, and doesn't work with the DPC+ kernel, anyway. It seems to work after making these changes.

 

fixed.bas

  • Like 1
Link to comment
Share on other sites

I'm not sure why you were trying to define variables in a different bank, but that was what was confusing bB.

 

Thanks for having a look, yeah i started getting into the habit of defining the variables in bank6 because i would sometimes run out ROM space in bank1. Usually it was only with larger project but kind have got used to it.

 

Yeah seems a bit strange as the only warnings i was getting was a syntax error for the decimal values. Im sure there is a reason why bB was confused beyond my knowledge. Anyway thanks for picking up on the issue for me.

 

EDIT: I noticed you have defined the variables before bank1, interesting i never knew the was possible.

Edited by Tony The 2600
Link to comment
Share on other sites

This link will assist you from RT site.

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpc_harmony

 

It has a DPC template and more information. From what I recall bank 1 uses a lot of space for Vbkank (I think or something similar). You define everything in there though like dim, def, const, etc. Hope this helps you with you game.

Link to comment
Share on other sites

This link will assist you from RT site.

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpc_harmony

 

It has a DPC template and more information. From what I recall bank 1 uses a lot of space for Vbkank (I think or something similar). You define everything in there though like dim, def, const, etc. Hope this helps you with you game.

Yeah i use the DPC+ kernel template that comes with vbB, that exact one however i started defining variables in other banks that have more room. Thanks for the tip though

 

You might want to look at this:

 

Parts of a Program

Yeah i have your site book marked and always open your web page as a guide for whenever needing it. Without your website i would still be that plastic bag blowing in the wind. It's taught me alot from data arrays, stack pointers, to multi-sprites and so on. Im chipping away piece by piece of all the functions and features from the site and 8.8 fix points was my next project.

 

Basically my way of learning is to make an individual program for each of the features that does one thing/function so i can get a full understanding. Can't thank you enough for the effort and time you have put in to help teach us novice programmers by providing the website. Along with every other member that contributes.

 

Variable definitions shouldn't affect ROM space. What you are doing is giving a readable name to areas in RAM.

I once had an issue a long time ago compiling after clearing all variables and writing a big list of dim's. Thinking it was the variables using all the space left in bank1 i moved it to another and it compiled. The error log did say there was 0 bytes left in back1 although maybe it was a different issue i wasnt aware of, i have no idea.

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