Code Monkey home page Code Monkey logo

Comments (5)

ukcroupier avatar ukcroupier commented on May 22, 2024

Had another think.

If I start my data on first line then put in 528 dummy bytes I can then put as many characters sets into the array as I need after that.

It means having 1/2k of wasted data, but I'm sure most programs would find a use for that. Or I can probably put a small amount of code before the array and just recalculate where my character set data needs to be.

I really should think more before posting a request :)

from fastbasic.

dmsc avatar dmsc commented on May 22, 2024

Hi!

It would be great if I could point the location of an arrays data at a specific page in memory to make character sets.

DATA FONT(),40960 BYTE = 0,0,0,etc

This would save on doubling up on memory due to having an array and then needing to move that data to the character set location. And it's a lot easier than creating external data files and loading them directly into memory.

This is not currently possible in the IDE, because the compiler (CONTROL-W) writes all code in one big block and can't produce segmented binaries.

I think that using external data files is not that difficult:

 OPEN #1,4,0,"D:CHAR.BIN" : BGET #1, 40960, 1024 : CLOSE #1

There is another option if you want generate a single Atari executable file: you can join multiple loadable parts together so that the OS loads all the data. So, you generate a file with the character data (for example, with DOS 2.5 "write binary data", or with many other tools, the you append the compiled binary file to the data file. Hope it makes sense.

And, using the cross compiler you also can append the data or you can use a custom linker script and place binary data directly in any address with a little assembler file.

Had another think.

If I start my data on first line then put in 528 dummy bytes I can then put as many characters sets into the array as I need after that.

It means having 1/2k of wasted data, but I'm sure most programs would find a use for that. Or I can probably put a small amount of code before the array and just recalculate where my character set data needs to be.

Problem with that is that using different versions of FastBasic will reorder data and change the number of bytes you have to skip, so it won't work.

What I could do is add a "align" command to the DATA statement that automatically adds the correct amount of dummy bytes so that the start of the data is correctly aligned.

Something like this could work:

    DATA mychar() byte @1024 = 1,2,3,

In the weekend I could test if this is feasible. Also, the above has the advantage that if you use the cross compiler, I can optimize the location so that a minimum amount of space is wasted.

Have Fun!

from fastbasic.

ukcroupier avatar ukcroupier commented on May 22, 2024

Since I figured out how to autorun the cross compiler from notepad++ that's all I've been using. I understand that using my system I might have to tweak a program in development, but once it's finalised everything should be ok.

Your final idea sounds cool, would be nice to have if that was an easy update for you.

And, using the cross compiler you also can append the data or you can use a custom linker script and place binary data directly in any address with a little assembler file.

This is probably the best solution if I can figure it out. I'm just being lazy wanting to simply write in notepad++ and get a complete program by press F7 :)

from fastbasic.

Philsan69 avatar Philsan69 commented on May 22, 2024

This is probably the best solution if I can figure it out. I'm just being lazy wanting to simply write in notepad++ and get a complete program by press F7 :)

I like to compile and run with one key too!
I use Mad Studio but could you please explain how you do the same with Notepad++?

from fastbasic.

ukcroupier avatar ukcroupier commented on May 22, 2024

I explained what I did in this post on atariage

https://atariage.com/forums/topic/288617-fastbasic-40-tenliners19-release/page/2/?tab=comments#comment-4346489

I'm a million miles away from an expert in this stuff but it worked. It also works in some of my sub folders but not others, I think it has something to do with the .bat file from the cc65 post I link to.

from fastbasic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.