well, that might be where i messed up, which code is the extend.m?
#!/bin/bash
#Enable powershot basic scripting on a memory card
if [ $# -ne 1 ] ; then
echo
echo "Usage : ./makeScriptCard.sh [ device ]"
echo
echo " [ device ] is a fat32 / fat16 partition on the memory card"
echo " example : ./makeScriptCard.sh /dev/sdb1"
echo "NOTE: please run as root"
exit 112
fi
#TAG on boot sector
echo -n SCRIPT | dd bs=1 count=6 seek=496 of=$1
#mount card
umount /mnt
mount $1 /mnt
#create script request file
echo "for DC_scriptdisk" > /mnt/script.req
#Example script
echo 'private sub sayHello()
a=LCDMsg_Create()
LCDMsg_SetStr(a,"Hello World!")
end sub
private sub Initialize()
UI.CreatePublic()
sayHello()
end sub
'>/mnt/extend.m
#Done !
echo "Please check /mnt for files extend.m and script.req"
or is it this one?
--[[
@title prepare script disk
]]
f=io.open("A/SCRIPT.REQ","w")
if not f then
error("file open failed")
end
f:write("for DC_scriptdisk")
f:close()
if call_event_proc("SystemEventInit") == -1 then
call_event_proc("System.Create")
end
call_event_proc("MakeScriptDisk",0)
--
and if im correct the script.req is this one???
' dump ROM to A/PRIMARY.BIN
' log to A/CBDUMPER.LOG
DIM startaddr=0
DIM os="unk"
DIM lcdmsg=0
DIM msgstr=0
' detect start address and OS
' order must be from highest to lowest, since accessing outside of ROM may trigger an exception
private sub GetStart()
if memcmp(0xFFC00004,"gaonisoy",8) = 0 then
startaddr = 0xFFC00000
os = "dry"
exit sub
end if
if memcmp(0xFFC00008,"Copyrigh",8) = 0 then
startaddr = 0xFFC00000
os = "vx"
exit sub
end if
if memcmp(0xFF810004,"gaonisoy",8) = 0 then
startaddr = 0xFF810000
os = "dry"
exit sub
end if
if memcmp(0xFF810008,"Copyrigh",8) = 0 then
startaddr = 0xFF810000
os = "vx"
exit sub
end if
if memcmp(0xFF000004,"gaonisoy",8) = 0 then
startaddr = 0xFF000000
os = "dry"
exit sub
end if
end sub
private sub RegisterProcs()
' Newest cams (Dryos rel 43 and later) only have System.Create()
' on older dryos cams SystemEventInit is an alias for System.Create()
' ExecuteEventProcedure does is not registered by default on vx,
' but calling an unregistered is not fatal
if System.Create() = -1 then
SystemEventInit()
end if
if ExecuteEventProcedure("UI_RegistDebugEventProc") = -1 then
ExecuteEventProcedure("UI.CreatePublic")
end if
end sub
private sub InitMsg()
lcdmsg = ExecuteEventProcedure("LCDMsg_Create")
msgstr = AllocateMemory(80)
' truncate log
msgfile = Fopen_Fut("A/CBDUMPER.LOG","w")
if msgfile <> 0 then
Fclose_Fut(msgfile)
end if
end sub
private sub PutMsg(msg)
if lcdmsg >= 0 then
LCDMsg_SetStr(lcdmsg,msg)
end if
msgfile = Fopen_Fut("A/CBDUMPER.LOG","a")
if msgfile <> 0 then
Fwrite_Fut(msg,strlen(msg),1,msgfile)
Fwrite_Fut("\n",1,1,msgfile)
Fclose_Fut(msgfile)
end if
end sub
private sub Initialize()
RegisterProcs()
InitMsg()
PutMsg("Started")
GetStart()
if startaddr <> 0 then
sprintf(msgstr,"%0X %s",startaddr,os)
PutMsg(msgstr)
romsize = 0xFFFFFFFC - startaddr
dumpfile = Fopen_Fut("A/PRIMARY.BIN","w")
if dumpfile <> 0 then
Fwrite_Fut(startaddr,romsize,1,dumpfile)
Fclose_Fut(dumpfile)
Wait(500)
PutMsg("done")
else
PutMsg("file error")
end if
else
PutMsg("not found!")
end if
FreeMemory(msgstr)
end sub