xboxscene.org forums

Pages: 1 [2]

Author Topic: Tribute Whdload Edition V1.0 Finished  (Read 236 times)

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Tribute Whdload Edition V1.0 Finished
« Reply #15 on: August 01, 2006, 02:38:00 AM »

BobBorakovitz you could always us ISObuster to extract the files from the iso file and then rebuild it in xbox format if you want to.
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Tribute Whdload Edition V1.0 Finished
« Reply #16 on: August 03, 2006, 11:29:00 AM »

QUOTE(gonkle @ Jul 31 2006, 04:20 AM) *

Yes its for linux/unix bash only atm, maybe i can write down the concept/steps and you can convert it to the windows shell, also wouldnt be that hard to code it in C, if i had the time for this.


Sure.. Go ahead and list it here.. use the "Code" BB Code and maybe some comments to explain what is going on.  I know a bit of kornshell so I might be able to figure it out.  (IMG:style_emoticons/default/wink.gif)

Thanks
Logged

gonkle

  • Archived User
  • Full Member
  • *
  • Posts: 179
Tribute Whdload Edition V1.0 Finished
« Reply #17 on: August 04, 2006, 08:44:00 AM »

here we go.
this coipies the files, the hdf gets created with a different script.
dont know if you find a way to simulate the 2nd one because I can mount
hdf files directly onto my system, but i can do the work if we have a concept running.

EDIT: looks awfull, im trying to find the login data from my signature avvount and upload the scripts there.
CODE

#!/bin/bash
#
# This script unpacks the lzx file
# copies the neccesary data for a bootable affs and also parses the Readme for a needed kickstart image and copies one if needed
# it also creates a game.bat wich calls whdload to start the slave file, it is runs from the startup-sequence in folder C
# to madmab and syncro
# the idea with teh xport autoboot feature is to have always the workbench hdf to load the game from dh1, so

# we need to have always the same name for the file/script that boots the game,
# in winuaeX we have to assign hd0 for the WB and dh1 for the game

echo unpacking data
/home/gonkle/Desktop/HDF/unlzx *
#unzip *

WD=$(pwd)
find -type d -maxdepth 1 -noleaf | while read dir; do


if ( ls "$dir"/*.[sS][lL][aA][vV][eE] 2> /dev/null ); then

echo "changing to folder "$dir""
cd "$dir"
    
    echo "copying the neccesary data"
# cleandisk contains a minimal workbench, only the files needed to boot
# this can be skiped when using a second HD for the WB
    cp -pr /home/gonkle/Desktop/HDF/cleandisk/* .
#can also be skipped
    echo "checking for kickstart image"
    if grep -qE "[Kk][Ii][Cc][Kk]34005.[Aa]500"  [Rr][Ee][Aa][Dd][Mm][Ee]; then cp -pr /home/gonkle/Desktop/HDF/cleandisk_kicks/kick34005.A500* Devs/kickstarts/; fi
    if grep -qE "[Kk][Ii][Cc][Kk]40068.[Aa]1200" [Rr][Ee][Aa][Dd][Mm][Ee]; then cp -pr /home/gonkle/Desktop/HDF/cleandisk_kicks/kick40068.A1200* Devs/kickstarts/; fi
    if grep -qE "[Kk][Ii][Cc][Kk]40068.[Aa]4000" [Rr][Ee][Aa][Dd][Mm][Ee]; then cp -pr /home/gonkle/Desktop/HDF/cleandisk_kicks/kick40068.A4000* Devs/kickstarts/; fi
# here is the game.bat, this should be called while booting, it assigns the slave to whdload
    echo "creating the game.bat"
    SLAVE="*.[sS][lL][aA][vV][eE]"
    echo C:ADD44k > S/Startup-Sequence
    echo C:whdload  $SLAVE preload >> S/Startup-Sequence
    chmod a+rwx -R *
#here i copied the manuals and readmes, usefull since xport has a textviewer in his emus.
    cp [Rr][Ee][Aa][Dd][Mm][Ee] /media/Daten/amiga/HDFREADME/"$dir".txt
    cp [Dd][Oo][Cc][Ss] /media/Daten/amiga/HDFMANUAL/"$dir".txt
    cp [Mm][Aa][Nn][Uu][Aa][Ll] /media/Daten/amiga/HDFMANUAL/"$dir".txt
    cp [Ii][Nn][Ss][Rr][Uu][Cc][Ii][Oo][Nn][Ss] /media/Daten/amiga/HDFMANUAL/"$dir".txt
    cd "$WD"
    
else
# this was for non whdload install
    mv "$dir" -f /media/Daten/amiga/Games_-_WHDLOAD/OTHERS/
#    mv "$dir".lzx /media/Daten/amiga/Games_-_WHDLOAD/OTHERS/

fi
    
done

rm -r C Devs T S game.bat

./make_uscore.sh

exit 0



here is the script that copies the content to the hdf files,
i had to use preformated hdf files that get choosen by size of the install

CODE

#!/bin/bash
#
# This script creates hdf files from folders where it is run
# it checks for the size and gives each game a hdf file where it fits in
# Need preformated hdf files because I havent found a way to format loop devices under linux, for now
#
#     This must be run as root or with 'sudo ./this_file.sh'


#WORKPATH="/home/gonkle/Desktop/HDF/WORK"
WORKPATH="/media/Daten/amiga/Games_-_WHDLOAD/INSTALLS"
MOUNTPATH="/home/gonkle/Desktop/HDF/WORK_TMP"

find -maxdepth 1 -type d  | while read dir; do

    SIZE=$(du -s $dir | awk '{print $1}')

    if (( "$SIZE" < "1024" )); then
        cp /home/gonkle/Desktop/HDF/Empty_HDF/1mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
        
    fi
    if (( "$SIZE" > "1024" && "$SIZE" < "2048" )); then
        cp  /home/gonkle/Desktop/HDF/Empty_HDF/2mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi    
        if (( "$SIZE" > "2048" && "$SIZE" < "3072" )); then
        cp  /home/gonkle/Desktop/HDF/Empty_HDF/3mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi
    if (( "$SIZE" > "3072" && "$SIZE" < "4096" )); then
        cp  /home/gonkle/Desktop/HDF/Empty_HDF/4mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi
    if (( "$SIZE" > "4096" && "$SIZE" < "5120" )); then
        cp  /home/gonkle/Desktop/HDF/Empty_HDF/5mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi
    if (( "$SIZE" > "5120" && "$SIZE" < "6144" )); then
        cp  /home/gonkle/Desktop/HDF/Empty_HDF/6mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi
    if (( "$SIZE" > "6144" && "$SIZE" < "8192" )); then
        cp  /home/gonkle/Desktop/HDF/Empty_HDF/8mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi
        if (( "$SIZE" > "8192" && "$SIZE" < "10240" )); then
        cp  /home/gonkle/Desktop/HDF/Empty_HDF/10mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
    mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi
        if (( "$SIZE" > "10240" && "$SIZE" < "12288" )); then
        cp /home/gonkle/Desktop/HDF/Empty_HDF/12mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi
        if (( "$SIZE" > "12288" && "$SIZE" < "16384" )); then
        cp /home/gonkle/Desktop/HDF/Empty_HDF/16mb.hdf $WORKPATH/$dir.hdf
        chmod a+rwx $WORKPATH/$dir.hdf && chgrp users $WORKPATH/$dir.hdf && chown gonkle $WORKPATH/$dir.hdf
        mount -o loop -t affs $WORKPATH/$dir.hdf $MOUNTPATH/MOUNT/
        cp -p -r $dir/* $MOUNTPATH/MOUNT/
        chmod a+rwx -R $MOUNTPATH/MOUNT/*
        umount $MOUNTPATH/MOUNT
        echo "done $dir"
        rm -r $dir
    fi

done
#rm MOUNT.hdf
rm *.info
mv *.lzx /media/Daten/amiga/Games_-_WHDLOAD/DONE/
exit 0


This post has been edited by gonkle: Aug 4 2006, 03:45 PM
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Tribute Whdload Edition V1.0 Finished
« Reply #18 on: August 04, 2006, 02:01:00 PM »

Ok I read thru most of it and have a pretty good idea of what is going on.  Like you said the 2nd part may be a little difficult.  (IMG:style_emoticons/default/laugh.gif)  I'm not sure how hard it will be to get the size of a directory under DOS, but that might be possible.

Are there winblows/dos based tools that allow manipulation of .hdf files?  I'm not really familar with PC based Amiga tools at all.  Is there a place I can look around to find some?

I take it the preformatted .hdf files already have the needed workbench files?
Logged

gonkle

  • Archived User
  • Full Member
  • *
  • Posts: 179
Tribute Whdload Edition V1.0 Finished
« Reply #19 on: August 05, 2006, 12:56:00 AM »

QUOTE(madmab @ Aug 4 2006, 09:32 PM) *

Ok I read thru most of it and have a pretty good idea of what is going on.  Like you said the 2nd part may be a little difficult.  (IMG:style_emoticons/default/laugh.gif)  I'm not sure how hard it will be to get the size of a directory under DOS, but that might be possible.

Are there winblows/dos based tools that allow manipulation of .hdf files?  I'm not really familar with PC based Amiga tools at all.  Is there a place I can look around to find some?

I take it the preformatted .hdf files already have the needed workbench files?

nope, thy get copied in the first script, but it doenst really matter when they get added.
One problem you will get is that AmigaOS and Linux are case sensitive and windows dont,
because some Installs contain files/folders with the same name but different cases.

I have no idea if there are cmd tools for amiga fs. maybe you can isntall cygwin, that gives you a bash under windows.

If I have time this weekend i will test the autoboot feature by changing the startuo-sequence of my WB disk to load a game.bat from dh1 and report if its working right.
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Tribute Whdload Edition V1.0 Finished
« Reply #20 on: August 05, 2006, 03:37:00 AM »

QUOTE(gonkle @ Aug 5 2006, 02:27 AM) *

nope, thy get copied in the first script, but it doenst really matter when they get added.
One problem you will get is that AmigaOS and Linux are case sensitive and windows dont,
because some Installs contain files/folders with the same name but different cases.

I have no idea if there are cmd tools for amiga fs. maybe you can isntall cygwin, that gives you a bash under windows.

If I have time this weekend i will test the autoboot feature by changing the startuo-sequence of my WB disk to load a game.bat from dh1 and report if its working right.


Oops I meant to say workbench boot files...  (IMG:style_emoticons/default/biggrin.gif)

Not the kickstart files used by WHDload..

I might need a little help with acquiring a WHDload ready bootable .adf file.  When I created one myself it seemed to have problems crashing.  Whereas the setup in the ClassicWB seems to work just fine.

cygwin might help but it won't help me overcome the problem of mounting an .hdf file.  (IMG:style_emoticons/default/wink.gif)
Logged

gonkle

  • Archived User
  • Full Member
  • *
  • Posts: 179
Tribute Whdload Edition V1.0 Finished
« Reply #21 on: August 05, 2006, 05:55:00 AM »

it would help if we find someone who knows the amiga commandline, maybe we can edit the startup-sequence in that way that it always starts whdload with the *.slave from dh1.
So we can pack the whdinstalls without modfying into a hdf file.
I just tried to rename the *.slave into game.salve and start it with c:whdload dh1:game.slave,
but that didnt work, because it couldnt find the diskimages on dh1
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Tribute Whdload Edition V1.0 Finished
« Reply #22 on: August 05, 2006, 03:15:00 PM »

QUOTE(gonkle @ Aug 5 2006, 07:26 AM) *

it would help if we find someone who knows the amiga commandline, maybe we can edit the startup-sequence in that way that it always starts whdload with the *.slave from dh1.
So we can pack the whdinstalls without modfying into a hdf file.
I just tried to rename the *.slave into game.salve and start it with c:whdload dh1:game.slave,
but that didnt work, because it couldnt find the diskimages on dh1

It's been a while but I don't think the amiga command line uses the * symbol.

#? is the appropriate designation.  So it would be #?.slave

But I'm not sure if "c:whdload dh1:#?.slave" would work or not.

I completely forget how commandline variables work.  (IMG:style_emoticons/default/laugh.gif)

But let me get this straight about your script.  It simply copies the whd files over to the .hdf file.  The actual workbench files for booting are in a seperate .adf file?

Logged
Pages: 1 [2]