| www.retrosoftware.co.uk http://www.retrosoftware.co.uk/forum/ |
|
| Feature Request: Copy command http://www.retrosoftware.co.uk/forum/viewtopic.php?f=17&t=590 |
Page 1 of 1 |
| Author: | tautology [ Sat Feb 19, 2011 10:27 pm ] |
| Post subject: | Feature Request: Copy command |
As I'm trying to build an image with multiple data files on it, it would be useful to be able to "copy" multiple files from Windows to the image as part of the build. At the moment I do: Code: org graphics { .binstart incbin "tgbgfx" .binend save "tgbgfx",binstart,binend } But I'd like multiple files with the same load address. I know that a work around would be to use DFS Explorer (or my own code to edit DFS images); but it would be nice if I could build the whole disc with one call to Beebasm. |
|
| Author: | RichTW [ Wed Feb 23, 2011 2:43 pm ] |
| Post subject: | Re: Feature Request: Copy command |
You can use the clear command to allow you to reuse the same memory area, e.g. Code: loadaddr = &6000 CLEAR loadaddr, &8000 ORG loadaddr INCBIN "file1" SAVE "file1", loadaddr, P% CLEAR loadaddr, &8000 ORG loadaddr INCBIN "file2" SAVE "file2", loadaddr, P% etc I know it looks a little clumsy, but it will work. Of course, the other option is simply to put the files on the template disc image (specified by -di), which was exactly what it was intended for in the first place. But I guess this isn't so convenient if you're changing the files' contents all the time. Perhaps in the next release, I'll implement a PUTFILE <host_filename>, <beeb_filename> command, although it'd be unusual in function, compared to the other commands in BeebAsm (because it doesn't affect the memory image, nor the assembly). |
|
| Author: | Samwise [ Wed Feb 23, 2011 2:52 pm ] |
| Post subject: | Re: Feature Request: Copy command |
I should add that I have been working on another command line utility which would allow you to do this for very similar reasons. Unfortunately, despite pinching most of the code from Rich and Thomas Harte, and copious amounts of patient assistance from Rich too, I still haven't quite got a binary out that will do this just yet. Give me another couple of days to work on it and I'll try and post a WIP version. Apologies, but as Rich will testify my C / C++ coding skills are as woeful as my 6502 assember ... Sam. |
|
| Author: | tautology [ Sun Feb 27, 2011 5:45 pm ] | ||
| Post subject: | Re: Feature Request: Copy command | ||
I actually have some C library code that will read to and write to an ssd disk. I stopped using it for reading as I use DFS explorer; and I only rarely have to write to a disk. I've attached what I have, plus the alpha version where I was trying to get it to work with fuse (before my Linux dev box blew up). I originally wrote this nearly 10 years ago so it may work, but probably needs some looking at. I also have similar code for reading from d64 files and some notes on Atari disc images.
|
|||
| Author: | Samwise [ Sun Feb 27, 2011 9:11 pm ] |
| Post subject: | Re: Feature Request: Copy command |
I haven't had a chance to look at your code yet, Dave, but I've posted as far as I've got here. I've ground to a bit of a halt again. I've tried to document everything I was up to, but I may not be able to pick it up again for a few weeks, realistically. I've also linked to another five year old command line C tool which looks relevant, but I can't get to compile. Sam. |
|
| Page 1 of 1 | All times are UTC [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|