Author Topic: TI-Nspire emulator  (Read 329769 times)

0 Members and 2 Guests are viewing this topic.

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: TI-Nspire emulator
« Reply #135 on: March 05, 2012, 05:40:49 pm »
Sorry for the doublepost, but I just realized something really simple. You could just run Notepad, send the .txt file to your computer and then remove the .tns extension! I'm so stupid...  :banghead:  :banghead:

The only problem with that is notepad doesn't work on ndless 3.1...

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: TI-Nspire emulator
« Reply #136 on: March 06, 2012, 04:13:40 am »
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.
« Last Edit: March 06, 2012, 04:14:24 am by Jonius7 »
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: TI-Nspire emulator
« Reply #137 on: March 06, 2012, 05:08:55 am »
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.
I've got one optimized for the Linux version.
I just didn't get the time to redo them all :D

Code: [Select]
#!/bin/bash

# Répertoire absolu du fichier
RELPAT="$(dirname $0)"

function menup {
select_menup=$(zenity --list --title="Menu Principal" \
--text="Veuillez choisir un item" \
--column="select" --column=" " \
"quit" "Quitter" \
"tnc" "TI-nSpire CAS" \
"tno" "TI-nSpire" \
"tcc" "TI-nSpire CAS CX" \
"tco" "TI-nSpire CX" \
"binrun" "Fichier bin" \
"aide" "Aide" \
--hide-column="1" \
--height="300" \
--width="500");
}

function calc {
# $1 = tnc tno tcc tco
if [ "$1" = "tno" ]; then
select_menuc=$(zenity --list --title="Menu TI-nSpire" \
--text="Veuillez choisir un item" \
--column="select" --column=" " \
"return" "Retour" \
"extboot2" "Extraire le boot2" \
"rom" "Créer une ROM" \
"runb1" "Lancer une ROM sur le boot1" \
"runb2" "Lancer une ROM sur le boot2" \
"run84b1" "Lancer une ROM en mode 84+ sur le boot1" \
"run84b2" "Lancer une ROM en mode 84+ sur le boot2" \
"dump" "Dumper un classeur (Ctrl+S -- dump.xml)" \
--hide-column="1" \
--height="300" \
--width="500");
else
select_menuc=$(zenity --list --title="Menu TI-nSpire" \
--text="Veuillez choisir un item" \
--column="select" --column=" " \
"return" "Retour" \
"extboot2" "Extraire le boot2" \
"rom" "Créer une ROM" \
"runb1" "Lancer une ROM sur le boot1" \
"runb2" "Lancer une ROM sur le boot2" \
--hide-column="1" \
--height="300" \
--width="500");
fi
}


function binrun {
binfile=$(zenity --file-selection --title="Sélectionnez un fichier *.bin"  --height="30" --width="500"  --filename="$RELPAT/");
if [ "$binfile" ]; then
"$RELPAT"/nspire_emu.exe /B="$binfile"
fi
}

function extboot2 {
clear
echo "#####################################################"
echo "#           Extraire le Boot2 de boot2.img          #"
echo "#####################################################"
wine "$RELPAT"/imgdump.exe boot2.img
}

function rom {
# $1 = tnc tno tcc tco
os=$(zenity --file-selection --title="Sélectionnez un fichier *.$1" --filename="$RELPAT/");
if [ "$os" ]; then
if [ "${os##*.}" = "$1" ]; then
rom=$(zenity --file-selection --title="Enregistrer une ROM" --save --confirm-overwrite --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" != "rom" ]; then
rom="$rom.rom"
fi
if [ "$1" = "tno" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os"
elif [ "$1" = "tnc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os" /C
elif [ "$1" = "tco" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os" /X
elif [ "$1" = "tcc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os" /C /X
fi
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.$1 et pas autre chose ! \n Opération annulée"
fi
fi
}

function runb1 {
# $1 = tnc tno tcc tco
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
boot1=$(zenity --file-selection --title="Sélectionnez un fichier BOOT1" --filename="$RELPAT/");
if [ "$boot1" ]; then
if [ "$1" = "tno" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1"
elif [ "$1" = "tnc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /C
elif [ "$1" = "tco" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /X
elif [ "$1" = "tcc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /C /X
fi
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function runb2 {
# $1 = tnc tno tcc tco
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
if [ "$1" = "tno" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw
elif [ "$1" = "tnc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /C
elif [ "$1" = "tco" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /X
elif [ "$1" = "tcc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /C /X
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function run84b1 {
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
boot1=$(zenity --file-selection --title="Sélectionnez un fichier BOOT1" --filename="$RELPAT/");
if [ "$boot1" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /K
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function run84b2 {
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /K
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

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 -f "$winePath/dump"*
rm -f "$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
}

function aide {
clear
echo "#####################################################"
echo "#                      Aide                         #"
echo "#                   ----------                     ##"
echo "##    sur l'utilisation de l'emulateur en boot2    ##"
echo "#####################################################"
echo "- Recuperez le fichier de mise a jour TI (*.tnc/*.tno/*.tcc/*.tco) en le telechargeant  "
echo "  depuis le site de TI ou sur TI-bank, qui lui ressence une grande partie "
echo "  des OS ayant existes."
echo "- Copiez ce fichier dans la racine du dossier de l'emulateur."
echo "- Le renommer pour plus de simplicite (ex : 17.tnc) !"
echo "- L'assimiler a un format *.zip."
echo "- Ouvrir l'archive et en extraire 'boot2.img' et le placer dans la racine"
echo "  du dossier de l'emulateur."
echo "- Retablir l'extension du fichier de mise a jour TI (*.tnc/*.tno)."
echo "- Grace a ce fichier batch, decryptez le 'boot2.img'."
echo "- Grace a ce fichier batch, lancez l'emulation."
echo "### Pour regarder ce tutoriel en video : http://vimeo.com/8884626"
echo ""
echo "Appuyer la touche <Entrée> pour continuer..."
read touche
}

while [  "$select_menup" != "quit"  ]; do
menup
if [ "$select_menup" = "binrun" ]; then
binrun
elif [ "$select_menup" = "aide" ]; then
aide
elif [ "${select_menup:0:1}" = "t" ]; then
while [ "$select_menuc" != "return" ]; do
calc $select_menup
if [ "$select_menuc" = "extboot2" ]; then
extboot2
elif [ "$select_menuc" = "rom" ]; then
rom $select_menup
elif [ "$select_menuc" = "runb1" ]; then
runb1 $select_menup
elif [ "$select_menuc" = "runb2" ]; then
runb2 $select_menup
elif [ "$select_menuc" = "run84b1" ]; then
run84b1
elif [ "$select_menuc" = "run84b2" ]; then
run84b2
elif [ "$select_menuc" = "dump" ]; then
            dump
else break;
fi
done
select_menuc="none"
else break;
fi
done

# Credits
clear
zenity --info --title="Credits" \
--text=\
"Merci d'avoir utilisé ce shell Bash réalisé par Levak.
Un grand merci à Goplat pour son émulateur !"
clear

I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: TI-Nspire emulator
« Reply #138 on: March 06, 2012, 05:18:21 am »
Levak, Would it be ok if I worked on what was originally your v053 batch file in English/Windows, and released it as a Jonius7 edited version?
PS: I wouldn't know much about a French version.
« Last Edit: March 14, 2012, 04:51:24 am by Jonius7 »
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline ash47

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +0/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #139 on: March 10, 2012, 09:40:35 pm »
Hi! I've been following this website for a long time, first time I've really had a question, I've searched the hell out of it, but I can't find boot1cx.raw anywhere, and I can't find instructions on how to make one, can someone please point me in the correct direction?

Might as well say you are all doing an amazing job here :P

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: TI-Nspire emulator
« Reply #140 on: March 10, 2012, 11:51:57 pm »
You either have to use polydumper (available at tiplanet.org) on a real CX to get boot 1 in order to run nspire_emu, or ask someone else for a boot 1 raw file. However it technicially is considered illegal to distribute roms, it still happens sometime :P

Also welcome to Omnimaga!
Please introduce yourself in the Introduce Yourself Board http://www.omnimaga.org/index.php?board=10.0
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline ash47

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +0/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #141 on: March 14, 2012, 04:39:22 am »
Damned, I don't own a CX, only got the normal TI-Nspire, would appreciate it if someone could send a PM my way as suggested above :P

Edit: No idea how to reply to PMs, but thanks :D If I could work out how to +rep you, I would :P
« Last Edit: March 14, 2012, 08:25:14 pm by ash47 »

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: TI-Nspire emulator
« Reply #142 on: March 14, 2012, 04:59:08 am »
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.

I hope the Touchpad mapping is just wrongly configured for me, because it is quite confusing at the moment and nearly every key is mapped to another key that shouldn't be.
« Last Edit: March 14, 2012, 04:59:25 am by Jonius7 »
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: TI-Nspire emulator
« Reply #143 on: March 14, 2012, 10:47:50 am »
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.

I hope the Touchpad mapping is just wrongly configured for me, because it is quite confusing at the moment and nearly every key is mapped to another key that shouldn't be.
Hi everyone, (my very first message here)

As far as i can figure, 'touchpad' only works with non-cas OSes.
Unfortunately, for cas Oses, only 'clickpad' seems to work.
The problem is we don't get certain touchpad's keys mapped at all, eg: "trig>"+ "frac" + "?!>" + "pi>" + "ctrl+>="

Maybe Goplat (he's the man!) could find sometime to fix it, notably because nowadays most of the folks only have/want cas-machines.

Cheers,
SpiroH
btw: thank you Jonius7 for your help.

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: TI-Nspire emulator
« Reply #144 on: March 19, 2012, 03:19:48 am »
No problem SpiroH. I am glad i am able to help so many people! :D Also im using a non-cas os so? I may go back and double check. ;)
« Last Edit: March 28, 2012, 01:24:04 am by Jonius7 »
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: TI-Nspire emulator
« Reply #145 on: October 08, 2012, 05:15:21 pm »
Could you/someone implement the missing instructions which libndls' show_msg_user_input uses?

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: TI-Nspire emulator
« Reply #146 on: October 08, 2012, 09:20:25 pm »
Could you/someone implement the missing instructions which libndls' show_msg_user_input uses?
What missing instructions ?
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: TI-Nspire emulator
« Reply #147 on: October 09, 2012, 07:22:09 am »
Sorry, I was just stupid and had a wrong revision of ndless installed.
Although I still don't understand what I have to do in order to not make it crash if esc or cancel is pressed. But that isn't a problem of the emulator.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: TI-Nspire emulator
« Reply #148 on: October 09, 2012, 11:38:51 am »
Although I still don't understand what I have to do in order to not make it crash if esc or cancel is pressed. But that isn't a problem of the emulator.
Oh ... =(
I know that bug and I have no idea at the moment why it is crashing.
I've changed the code from using dynamic strings (like internally) instead of char * in utf16 in order to support larger string, but I somehow broke the cancel feature and them BOOM, I had school stuff to do (still now). I know where to look but do not have currently the tools nor the time to look and fix it.
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: TI-Nspire emulator
« Reply #149 on: October 10, 2012, 09:54:53 am »
I think the only problem was that if cancel or esc is pressed, it doesn't malloc, and therefore you free a not allocated pointer if you don't check whether it returns -1. At least this solved the bug for me.

You should also mention in the documentation that it doesn't work if lcd_ingray() is called, or change this.
« Last Edit: October 10, 2012, 10:02:42 am by lkj »