A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Trackloader source needed for amiga 500 production.

 

Author Message
sp_
Member
#1 - Posted: 11 Jul 2007 23:44
Reply Quote
Anyone who have an old source for me? Should work on all amigas.(so that Stingray doesn't need to make a patch. he-he
winden
Member
#2 - Posted: 11 Jul 2007 23:52
Reply Quote
bootblock from batman vuelve had one that worked ok both on a500, a1200 and escom a1200 IIRC
noname
Member
#3 - Posted: 12 Jul 2007 12:53
Reply Quote
Consider using trackdisk.device. This would ensure it works with whatever device has been built into the Amiga. I have an old interactive shell that lets you put files on disk in its own filesystem. I used it for a 1994 music-disk which was written in Amos and had its trackload written in Basic. You can have the system, if you want. You would only need to write a confirming bootloader for the given file-structure which should be doable.
sp_
Member
#4 - Posted: 12 Jul 2007 14:31
Reply Quote
I need full control of the system and memory, so I don't want to use trackdisk.device. I did some searches on the net.
For the trackloader source,
I found this one:

http://aminet.net/dev/asm/t-loader.lha

To fill the disk I found this program:

http://ftp.wustl.edu/pub/aminet/disk/misc/DiskFill er11.lha

Now I need a bootblock code that will load my (crunched) exefile.
Wich cruncher is best for the a-500 and 68000.
I remember two crunchers named titanic cruncher and powerpacker.
StingRay
Member
#5 - Posted: 12 Jul 2007 15:23 - Edited
Reply Quote
Loading your file from the bootblock is easily done using trackdisk.device.

move.l $4.w,a6 ; not really required as a6 = execbase at boot :)
move.l #LOADADDRESS,$28(a1)
move.l #LENGTH,$24(a1)
move.l #OFFSET,$2c(a1)
jsr -456(a6)

Offset and Length are in bytes.

As for your question about the cruncher, titanics is not suitable for a trackmo, I would either use CrunchMania (don't forget to fix the decruncher for 060 though) or StoneCracker. Both have fine packratios and the decrunching time is ok as well.
StingRay
Member
#6 - Posted: 12 Jul 2007 15:25
Reply Quote
Oh, and about the trackloader, I'd just use the good old Rob Northen loader, it was used in many games, is 100% pc-relative and works just fine. Drop me a line if you want to have it.
Blueberry
Member
#7 - Posted: 13 Jul 2007 22:10
Reply Quote
You should of course use my cruncher. ;-)

You will need to implement some kind of executable file loader which constructs the correct segment structures in memory. You won't have to worry about relocation, since the decrunch code handles that.

It might be possible to use InternalLoadSeg to do the loading. Haven't looked much into that function. Anyone know if it is any good for things like this?
StingRay
Member
#8 - Posted: 13 Jul 2007 23:36
Reply Quote
Oh, how could I forget your cruncher! Shame on me! :-) But actually, I thought he wanted to have full control, i.e. using absolute address crunchers which I think your's doesn't allow. :) Still, yours rocks of course! :)
Blueberry
Member
#9 - Posted: 14 Jul 2007 10:17
Reply Quote
If you control the loading yourself, you can place the hunks at any addresses you want. As long as the hunk structure is initialized correctly, the decrunch code will just relocate the code to whereever it is placed.

For each hunk, allocate hunksize+8 bytes and place data like this:
offset -4: length of hunk in longwords
offset 0: pointer to next hunk (offset 0) / 4
offset 4: data

Then jump to the code in the first hunk. Remember to flush the caches first if running on kickstart 2.0 or higher.

Only thing left is to parse the executable file hunk information. This is quite easy. Just look at some files (and perhaps compare with the hunk dump outputs from my cruncher) and they will almost tell you how to do it. :)

 

  Please log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0