0 Members and 2 Guests are viewing this topic.
k 10032AA0 +xcw dump1.xml r1 r2cw dump2.xml r1 r2cw dump3.xml r1 r2cw dump4.xml r1 r2cw dump5.xml r1 r2cw dump6.xml r1 r2(...for as long as you expect the xml to be...)
Two bugs related to replacing & and < in lua source with character entities:* escape_special_xml_chars stops processing when it reaches the offset equal to the size of the original input ("p < in_buf + header_size + in_size"), not taking into account that the size is changing during the loop, so characters near the end of the program may not get escaped* xml_compress copies the footer without taking into account the change in size ("memcpy(in_buf + header_size + in_size, lua_footer, sizeof(lua_footer));"), resulting in a truncated program and garbage at the end of the xml
Levak: You could create a file containing all the debugger commands to enter:then run: nspire_emu ... /D < commands.txt
function dump { local winePath="$HOME/.wine/dosdevices/c:" local rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/"); if [ "$rom" ]; then if [ "${rom##*.}" = "rom" ]; then local size=$(zenity --entry --title="Taille du classeur à dumper (octets)" --entry-text="0"); let num=$size/170 echo "k 10032AA0 +x" > "$RELPAT/commands.txt" echo "c" >> "$RELPAT/commands.txt" local i=0 while [ $i -le $num ]; do # Complete tempory file names with zeros so that it's listed correclty let local dif=${#num}-${#i} local spaces=$(printf "%"$dif"s") local zeros=${spaces// /0} # Fill command list echo "w C:\dump$zeros$i.xml r1 r2" >> "$RELPAT/commands.txt" echo "c" >> "$RELPAT/commands.txt" let i=$i+1 done # Launch emulator with debug command list "$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /D < "$RELPAT/commands.txt" # Concatenate final XML file using tempory files echo -n "" > "$RELPAT/dump.xml" for f in "$winePath/dump*"; do cat $f >> "$RELPAT/dump.xml" done rm "$winePath/dump*" rm "$RELPAT/commands.txt" else zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée" fi fi}
echo $(perl -0777 -pe 's/(.*<r2dtotree>|<\/r2dtotree>.*)//gsm' dump.xml | sed "s/<node name="1para">/\x0D/g;s/<\/*node[^g]*>//g;s/<\/*leaf[^g]*>//g;s/<cursor[^g]*>//g;s/&quot;/\"/g;s/&apos;/'/g;s/&lt;/</g;s/&gt;/>/g" | sed 's/&/\&/g' ) > dump.lua
Luna v0.2a is now available with several bug fixes. Sorry for this unable v0.2.http://ndlessly.wordpress.com/2011/09/27/luna-bug-fixes/
Quote from: ExtendeD on September 27, 2011, 05:42:54 amLuna v0.2a is now available with several bug fixes. Sorry for this unable v0.2.http://ndlessly.wordpress.com/2011/09/27/luna-bug-fixes/Do you plan to include a Linux and a Mac build the next time (or does this one already feature it)? For people who can't build one themselves, it'd be neat.
@Levak:Nope, the x86-Version should work on any Mac with an Intel processor (built since 2005/2006, should run on Mac OS X >= 10.4), I only provide a x86_64 version for those who really want to use 64-Bit (which should have no effect on Luna^^)