Closed movievertigo closed 6 months ago
This is trickier, as it implies changing the manual, may have impact on other code, the interpreters, etc. Not sure how many people will find this useful. So maybe better to keep it as optional, and not in the main trunk?
They are all new commands. The existing commands haven't been changed (So existing apps can still load the old way). As far as I'm aware this shouldn't break anything. But if you want to keep it on a separate branch, I'm happy to go with whatever you think is best.
Let's do a separate branch then. I will link to it from the main page once it's up (let me know). The ATmega sketch consumes almost all the available memory, so I rather integrate only necessary functions for optimal running or the interpreters, and keep some room for future needs.
I'm not too familiar with the intricacies of GitHub, but if you're talking about having it in a branch in your repository then I believe you have to make an empty branch first and then I can make a pull request into that branch. Or if there's another way of doing it, please let me know.
I meant to host this version in your own Github repository, and I will link to it from the website and my repository, so people know this option is available.
My fork can be found here... https://github.com/movievertigo/CERBERUS2100
I just updated the website with this and some other stuff by you. Check out the latest news section.
The current file load command can only load a whole file at a time, which makes loading parts of a file impossible if the file is bigger then the available free memory, so I've added support for common file streaming commands. You can now open a file, seek to a particular location, and read from it.
Here's a summary of the new commands...
Command 0x07: FileOpen (Open the file with the given name) address+0 = Filename
Command 0x08: FileClose (Close the currently open file)
Command 0x09: FileRead (Read from the currently open file) On entry: address+0 = Start address (2 bytes) Where to load the file in memory address+2 = Byte count (2 bytes) How many bytes of the file to load On exit: address+2 = Byte read (2 bytes) The number of bytes actually loaded
Command 0x0A: FileSeek (Seek to the given position in the file) address+0 = File position (4 bytes) How many bytes through the file to seek to