It is currently Mon Oct 20, 2014 4:01 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Feb 19, 2011 10:27 pm 
Offline
 Profile

Joined: Sat Sep 04, 2010 5:28 pm
Posts: 92
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.


Top
 
PostPosted: Wed Feb 23, 2011 2:43 pm 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
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).


Top
 
PostPosted: Wed Feb 23, 2011 2:52 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
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 ... :oops:

Sam.


Top
 
PostPosted: Sun Feb 27, 2011 5:45 pm 
Offline
 Profile

Joined: Sat Sep 04, 2010 5:28 pm
Posts: 92
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.


Attachments:
BBCreader.zip [10.83 KiB]
Downloaded 6 times
Top
 
PostPosted: Sun Feb 27, 2011 9:11 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
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.


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron