English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 07 October 2018, 20:40   #1
fstarred
Registered User

fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 98
Share same resource over multiple executables

Suppose I want to use same binary (let's say a sprite ,blob , or mod data) across several executables in order to save a lot of space.
(For instance I'd want to use same sprite on different demo that should fit on one disk)
How can I do this using ASM one?
fstarred is offline  
Old 07 October 2018, 22:36   #2
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 553
Quote:
Originally Posted by fstarred View Post
Suppose I want to use same binary (let's say a sprite ,blob , or mod data) across several executables in order to save a lot of space.
(For instance I'd want to use same sprite on different demo that should fit on one disk)
How can I do this using ASM one?
It depends on what you mean here. Do you mean you wish to load in a file at runtime, or do you want to include the same binary object in multiple executables?

The former means either using the OS or a custom (track) loader to load in the required data. The latter can be achieved using the INCBIN directive. Note that INCBIN doesn't save any diskspace other than in your programming environment, the data will still be assembled into the final result every time it's used.

For example:
Code:
really_cool_sprite   INCBIN "sprite.raw"
roondar is offline  
Old 07 October 2018, 23:22   #3
fstarred
Registered User

fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 98
I meant the first case, I already know about incbin directive
fstarred is offline  
Old 08 October 2018, 00:41   #4
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 553
In that case, it depends. If you're using the OS, it's not too difficult to load in additional data. See the links below for more information on opening/closing files and reading data.

Open: http://amigadev.elowar.com/read/ADCD.../node02D6.html
Read: http://amigadev.elowar.com/read/ADCD.../node02E0.html
Close: http://amigadev.elowar.com/read/ADCD.../node028A.html

If you wish to use a trackloader & kill the OS, there are several floating around. Personally, I've been using the one from the Solid Gold source code with good results (note that this trackloader is fairly complete and allows for loading & writing data as well as run-time decrunching of Bytekiller files). There are others, which may be a better fit if you wish a smaller loader or don't care about the extra features.

http://aminet.net/search?query=solid+gold

Do note that using a trackloader does imply writing the data to disk first. You can use the diskimage tool provided in the Solid Gold source code for creating a full disk, but you can also use ASM-One's WS/WT commands: https://archive.org/details/AsmOne1.02Manual/page/n31

Hope this helps.
roondar is offline  
Old 08 October 2018, 10:02   #5
fstarred
Registered User

fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 98
roondar thank you for the hints, I'll give it a look for non-OS solutions
fstarred is offline  
Old 08 October 2018, 10:56   #6
Hewitson
Registered User
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 36
Posts: 2,618
I wonder if anyone has ever written a HDD trackloader. Obviously useless for computers, but maybe it found a use in some other application (possibly an arcade game).
Hewitson is offline  
Old 08 October 2018, 11:25   #7
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 553
I'd say that device drivers for HDD's on any system 'probably' include this functionality
roondar is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Capacitor of the Beast a small promo executables kikems Amiga scene 0 22 November 2017 23:20
Splitting a game into multiple executables earok Coders. Blitz Basic 10 05 May 2017 03:48
built-in rom crashes client and host on shrinkler-packed executables Hannibal support.WinUAE 6 28 December 2015 22:42
run executables as df0: jbl007 support.WinUAE 6 10 March 2015 21:39
Executables and initial register values copse Coders. General 6 01 January 2014 22:09

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06636 seconds with 13 queries