Home
TilEm2 USER MANUAL - the Linux Programmer Group
Contents
1. Figure 5 10 The Receive File file save 69 5 4 Open Calculator A Send File p Receive File ctri s E Open Calculator Shift ctrl o qq Save Calculator Shitt ctri s Revert Calculator State amp Reset Calculator Shitt ctri Delete Debugger Pause Macro b Screenshot Ctrl Print Quick Screenshot Shitt cCtrl Print 36 Preferences 57 About a Quit Figure 5 11 The Open Calculator menu entry When you click on Open Calculator you choose a rom to load 50 in fact even if you already emulates a calculator you can switch to another just by opening a new rom file Another way to do that is to quit TilEm2 and restart it using another rom file option r a file chooser dialog pop up and let 10 A Etib myrom Location tis3 rom Search amp tis3 rom 256 0 KB 10 15 Recently Used 53 tib gt Desktop C File System 95 GB Filesys Gooze gt Documents 7 Mireie m ROM files M coe Bm Figure 5 12 The Open Calculator file chooser Rom files usually finish by rom as extension but you can use All files pattern if you have a rom with a odd extension ROM files All files Figure 5 13 The file chooser patterns T1 5 5 Save Calculator A Send File ej Receive File Open Calculator Save Calculator Revert Calculator State amp Reset Calculator Debugger Macro Screenshot Quic
2. Interpolation Cui v ipee owe Reon cin Figure 9 4 Resize the picture But it works with any size just 900 pixels is nice I think The picture is loaded and a popup ask you to give some informations title author model contrast The title is comment added in the skin file Same thing for the author which is very important for licencing informations Model is the model of the calc here I used ti83 Contrast is the contrast for the lcd you can choose the background and fore ground color or just set low contrast or high contrast 96 Title Game boy Author Duponchelle Thibault LCD color O High contrast 3 Low contrast TI 844 3 Titanium 3 TI 85 3 TI 92 TI 86 TI 92 Plus O TI 89 O Voyage 200 LaxsssasauuussssanausssaRaR Figure 9 5 Skinedit ask properties Then click on LCD then select the region dedicated to LCD When you re satisfied by the region simply do a right click to save the region Then click keys button 97 Figure 9 6 Select the Right arrow key to be defined Select the key then define a region select a region then right click to save File Edit Help eed eft click drag to define key position right click to save and go on Close the list window when done save Figure 9 7 Define the ENTER key What I could say about the skin format is that each key is defined by a 98 rectangular region there s a
3. 57 About l Quit Ctrl Q Figure 5 6 The Receive File menu entry When you click on Receive File menu entry TilEm2 firstly get the vars then prints it into a listview Reading variable list ERE Parsing IONZ Figure 5 7 The Receive File get the variables After the first launch refresh is made only on request If you click Receive File then close the window then create a program and click Receive File you will not see your program The variable list let you choose the stuff you want to backup 67 Ls LIST 2 La LIST 2 Ls LIST 2 Le LIST 2 ION ASM 1 336 ION Z ASM 17 8 ZMINFO ASM 79 Save as O Separate files Group file Refresh cancel Figure 5 8 The Receive File window If more than one variable is selected you can choose between two modes of backup Separate files or Group file If you choose separate each file is saved as if you have saved one by one ION IONZ ZMINFO E Refresh Cancel se Figure 5 9 The two modes of backup multiple files only If you save grouped a group file will be created on disk When you finally click on Save button a file save dialog is opened Choose a directory and a name and click Save 68 Name Thiset 3 Save infolder 4 Etib backup Create Folder i7 1 Fle System 95 GB Filesys Gooze gt Documents x m 1 S qn oo TI83 Table Setup M
4. 00 0008 C3 AS 19 FD CB 07 46 C9 uy gt x tlF 6 FFED 47E6 00 0010 C3 OD 22 FD CB 02 66 C9 wt x uf FFEF 2ECF 00 0018 C3 7F 29 FD CB 03 C6 C9 w xv 6 FFFl 3F9A 00 0020 C3 77 1A 3A 3C 91 B7 C9 uw lt gt FFF3 073D 00 0028 C3 83 09 97 32 3C 91 C9 us x 2 6 FFF5 0000 00 0030 C3 96 08 7E 23 66 6F C9 wpe f o b FFF7 0000 00 0038 08 D9 DB 03 CB 57 C2 Bl Jf x ev x W FFF9 0000 00 0040 00 1F 38 2F 1F 38 36 18 J 8 8 iz irrrFR casa Md Figure 5 23 The Debug menu entry The options are the same than buttons but there is a big news breakpoints Breakpoints are a big part of the life of a assembly developpers This option opens the Breakpoint menu when you can Add Remove Edit Clear or some special action like Break on invalid instructions or Break on undocumented instructions rg C Break on invalid instructions C Break on undocumented instructions 2 Close Figure 5 24 The Breakpoints menu The easiest way to add a breakpoint is to right click on the disasm view and click on Breakpoint here but you can also set a breakpoint using its adress logical or absolute Breakpoint Condition Breakpoint type Memory address logical Break when C Reading writing Executing Address Single O Range Value AX Cancel Figure 5 25 Adding a breakpoint The Go menu basically provide and easy way to navigate into the disasm view and
5. 3C 91 C8 ws x 2 6 JE 23 66 6F C9 gu f f o 4 Figure 4 33 The memory view AF 0054 AF JO1S9B BC E057 BC 0000 DE 87EQ0 DEN 2239 HL 8000 HL JIDDC7 IX BC6 nn 8567 SP FFE9 PC O67A Ba ce an Minor FF El Figure 4 34 The register view UBEEE DOBOL c2 6 Figure 4 35 The stack view All this view produce the debugger there s some other window hidden by example breakpoints dialog and keypad window Debug METI Go Keypad J8 A Logical Addresses ep Over Finish Subroutine 00 01A5 LD HL apdTimer 00 01A8 LD HL 74 00 01AA RET 00 01AB CALL 01F8 00 01AE JR C 01bD 00 01B0 LD HL kbdPsc 00 0000 3E 17 D3 04 C3 85 07 FF gt 5 wes li 00 0008 C3 AS 19 FD CB 07 46 C9 up 2 x LF o 00 0010 C3 OD 22 FD CB 02 66 C9 wt x f 6 00 0018 C3 7F 29 FD CB 03 C6 C9 w x vx 06 00 0020 C3 77 1A 3A 3C 91 B7 C9 puw 6 00 0028 C3 83 09 97 32 3C 91 C9 us x 6g 2 0 00 0030 C3 96 08 7E 23 66 6F C9 wpe f f Oo ob 00 0038 08 D9 DB 03 CB 57 C2 Bl x ev x WA 00 0040 00 1F 38 2F 1F 38 36 18 J 8 186 z x Figure 4 36 The debugger 37 4 4 3 Use the disasm view As you probably know there s a register which store the adress of the current instruction It s called PC Program Counter If you look into the value of PC you should recognize that the value is the same as the adress pointed by a yellow arrow in the disasm This is the current instruction which is execu
6. 5 34 The skin file chooser 84 5 13 About Send File ctrl o ej Receive File Ctr s A Open Calculator Shift ctrld o x Save Calculator Shift ctri s Revert Calculator State amp Reset Calculator Shitt ctri Delete Debugger Pause Macro b Screenshot Ctrl Print Quick Screenshot Shitt cCtrl Print 36 Preferences W About Figure 5 35 The About menu entry No more than an about dialog TilEm 2 0 TilEm is a TI Linux Emulator It emulates all current z80 models TI73 TI76 TI81 TI82 TIS3U SE TI84 SE T185 and TI86 D c Benjamin Moody c Thibault Duponchelle c Luc Bruant http J lpq ticalc org prj tilem Figure 5 36 The about dialog 85 5 14 Quit Send File ctrl o ej Receive File Cctr s A Open Calculator Shift ctrld o zi Save Calculator Shift Ctrl4 S Revert Calculator State amp Reset Calculator Shitt ctri Delete Debugger Pause Macro P Screenshot Ctrl Print Quick Screenshot Shiftt Ctrl Print 36 Preferences q gt About ctrl Q Figure 5 37 The Quit menu entry Bye Bye 86 Chapter 6 Command line usage 6 1 Basics TilEm2 is basically made for Linux and command line is our first love Here the options at launch Usage tilem2 OPTION FILE Help Options h help help all help gtk Show help options Show all help options Show GTK Options Application Options rom FILE The rom fi
7. C3 10 28 97 32 53 96 C9 u 2 S FFDD 0780 00 0030 C3 A7 OA 7E 23 66 6F C9 wp 6 f gt FFDF 5742 00 0038 18 2F DB 04 CB 57 C202 z ewx WA u FFEl 28E7 00 0040 01 CB 67 C2 Fl 00 1F 38 nx g2A l 8 FFE3 2D18 00 0048 54 1F 38 5C 18 27 FF FF T L8 z _ FFES 40E2 00 0050 C3 80 28 C3 4E 09 SA AS uo uN x z FFF 7 6EBS m Figure 4 70 Breakpoint reached As my first idea was to inspect the instructions into this subroutine I can step by step and eventually do F5 which will run and breaks immediately I ve said this is used very often in my code Ok I assume you have understood this basic example of uses breakpoints Now I want to add another breakpoint on 9e8f which is a bit higher in memory So CTRL B then Add then put 9e8f into the text input Now I have 99 4 MX MX SE4F SESF C Break on invalid instructions C Break on undocumented instructions 2 Close Figure 4 71 Breakpoint added Finally I see it s was never reached so I want to change the adress so I launch the breakpoints dialog and click Edit And I put an adress just after the first breakpoint Breakpoint Condition Breakpoint type Memory address logical 7 Break when C Reading writing Executing Address Single O Range Value pes TEZE Figure 4 72 Breakpoint edited Then I run and I see that the second breakpoint is reached 54 Debug View Go gt tl Ww JB eg
8. E Open Calculator Shift ctrl o zi Save Calculator Shift Ctrl S Revert Calculator State amp Reset Calculator Shift Ctrl Delete Debugger Pause Macro gt Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 36 Preferences About 8 Quit ctri Q Figure 4 10 The Quick Screenshot submenu 4 3 2 Grab a screenshot using the screnshot dialog Click on Screenshot menu option or use CTRL 4 PRINT B Send File Ctrl 0 H Receive File Ctrl S B Open Calculator Shift ctrl o E Save Calculator Shift ctrl S Revert Calculator State Reset Calculator Shift Ctrl Delete Debugger Pause Macro gt Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 36 Preferences x About I Quit Ctrl Q Figure 4 11 The Screenshot submenu The screenshot window will open TilEm2 automatically grab a screenshot at startup Preview E Fr 3mR gt Options X cancel fq Save Figure 4 12 The window opens with a first grabed screenshot You can choose to Save it or to grab another screenshot There s a lot of options as size foreground background color etc 26 Preview Grab EDIT HEW TN ELA i n Cm aL ar TI c Options Grayscale Image size 288 x 192 v Width 288 Height 192 Animation speed 1 0 g Eoreground Zz Background zz amp cancel Figure 4 13 The options There s some differents kind of
9. Each time you PUSH a value the SP is decremented by 2 each place is 2 bytes A POP increment the SP by 2 45 Push Figure 4 57 The stack concept LIFO As said previously if you try to set manually the SP to the value FFFF for 183 you will completely drop all values of the stack except the last one This view is basically more a feedback because you can t edit it E l sp FFFF PC s z y H x P N C m 1 FF PIE FFFF DB OO Figure 4 58 Trying to set manually SP to FFFF 46 There s an interesting feature in TilEm2 which help to find the instruction which modify the stack You can find these actions in Go menu into the menu bar Or using ALT PAGEUP or ALT PAGEDOWN i Previous Stack Entry Alt Page Up T Next Stack Entry Alt Page Down Figure 4 59 Look for the instruction which modify the stack When you use this you will jump not really jump to the instruction which modify the current stack value It will update your disasm view but change nothing to the current state of the calc no change in registers PC not modified etc 4 4 0 The memory view This should be easy to understand that this view only print the memory in hexadecimal format 0000 3E 17 D3 04 C3 85 07 FF gt w 0008 C3 A5 19 FD CB 07 46 C9 u gt x 0010 C3 0D 22 FD CB 02 66 C9 yu T x 0018 C3 7F 29 FD CB 03 C6 C9 uw x 0020 C3 77 lA 3A 3C 91 B7 C9 uw lt 0028 C3 83 09 97 32 3C 91 C8 ua x g 2
10. can break the program using a range of adress By example I want to stop the execution between 9e4f and 9e56 because I m not sure where exactly to add the breakpoint So I deactivate my previous breakpoints and Add a breakpoint with a range of value use toggle button Range starting from 9e4f then finishing at 9e56 Breakpoint Condition Breakpoint type Memory address logical i Break when C Reading writing Executing Address O Single Range Start Seat End sess og Cancel Figure 4 75 Breakpoint with a range of adress Our list look like this now 56 BE SE4F SE4F LJ MX 9E9396 9E9396 MX SEAF 9E56 J Edit C Break on invalid instructions C Break on undocumented instructions 9 close Figure 4 76 Breakpoint added with a range of adress And each instruction inside this range is marked as Break 41 9E4F Lo A 80 41 9E51 ou 10 A 41 9653 LD HL flags asm Flag 41 9E58 LD B 00 Figure 4 77 A bunch of breakpoints Now I want to put a breakpoint on each RET So I use Add then I choose Z80 Instruction into the Breakpoint type listbox As you know RET is C9 as opcode so just type C9 of Breakpoint Condition Breakpoint type 280 instruction 7 Opcode Single O Range Value cs ien Sa Figure 4 78 Set a breakpoint on RET instruction Then we have SE4F 9E36 C Break on invalid instructions C Break on
11. max number of keys hardcoded at the value 60 So each time you define a key it will be saved as a rectangle into the skin file the other unused slots keep the 0 0 0 0 values LCD region use the same system with some more information contrast When you ve defined all the keys usually it s what you should do or only some of them as it s the case in our funny example you can check it one by one to be sure it s ok The keys are listed in the right order First key in the list is the left top key usually Y last key is the right down key usually ENTER Warning do not supperpose regions it s sometimes hard to do with arrow keys For this tutorial I just defined arrows start ON select 2nd B button PRGM and A button ENTER When it s ok save the file with a skn file extension And let s see the result 99 Figure 9 8 No comment You can also convert a TiEmu or VTI skin file using skinedit then use it with TilEm2 Do not hesitate to send us your skins file maybe we could use it as official skin 100
12. of these registers are updated not always and you can inspect what your program is doing You can also edit these registers values just by clicking on the input and replace the current value AF AF 12 BC EoF1 BC Figure 4 54 Edit the register AF There s a bunch of toggle button to show and edit the F flag If you click on a button you will set or reset a bit of the F register You can see that each time you toggle a button the AF register is modified Figure 4 55 Toggle the bit flags of F register a part of AF You can change the values of the register as you want for testing what could happen if a value was different or whatever you want If you try to change PC value you will see the disasm view updated Warning this is usually not useful but why not If you try to change the SP value you will see the stack view updated Try by example to set FFFF as value of SP Then the stack view only con tains one value 4 4 5 Use the stack view TilEm2 provide a view of the stack represented as a list of address value 44 Figure 4 56 The stack view You can navigate through the values in the stack to inspect them Let s a little explanation about what s a stack The stack is a particular memory access to store an retrieve values using the LIFO method The higher place in the stack is always the lower adress For ti83 the stack starts at adress FFFF for the first value
13. put it with your project here into macro play txt Here s a sample of what you can do make tilem2 PROG 8xp p macro play txt I put this code into exec sh then for testing my program I simply do And my file is loaded and launched Chapter 9 Create your own skin As mentionned previously TilEm2 uses a TiEmu skin file format So it s easy to do your own skins 9 1 Download tiem skinedit Skinedit is a part of TiEmu you can download it here http www ticalc org archives files fileinfo 232 23201 html 9 2 Create the skin Now I will explain to you how to create your own skins A picture of a game boy will be our example 93 Figure 9 1 Game boy Firstly you need to download tiemu skinedit author Julien Solignac Then launch it by tiemu skinedit amp Or by clicking on the icon if you have it on your desktop skinedit starts 94 File Edit Help ISkinedit v1 28 Supported formats TiEmu v2 00 VTiv2 1 VTIv2 5 d Figure 9 2 The skinedit window Click on File New ctri o Ctri s d ctri Q Figure 9 3 Create a new skin Choose a picture then click Ok Then find a picture and resize it to 900 pixels of height keeping the propor tions Usually I use TheGimp like this 95 S Scale Image gameboy jpq 1 Image Size Width 539 B Height 900 B 7 pixels fe 539 900 pixels X resolution 300 000 lg resolution 300 000 B 5 pixels in 3 Quality
14. stack and the memory The values are written in hexadecimal format Not decimal What does it mean Simply one little sample increment 0 1 increment 1 2 increment 2 3 increment 3 4 increment 4 5 increment 5 6 34 increment 6 7 increment 7 8 increment 8 9 increment 9 A increment A B increment B C increment C D increment D E increment E F increment F 10 Ok we will not explain more the hexadecimal format just accept the fact that s in hexadecimal format For a large part of TilEm2 users hexadecimal is not a surprise Let s talk about widget organization 4 4 2 Widget organization There s at least 6 zones into this window e The menu bar Debug View Go Figure 4 30 The menu bar e The button bar L i ux Ja F Run Pause Step Step Over Finish Subroutine Figure 4 31 The button bar e The disasm view 30 067A HALT 067B JR 067D RES 0681 CALL 0684 BIT 0688 JR 068A SET TO06 A 7 IY 0F TSOlAS onRunnings IY onFlags NZ T O6CS onRunnings IY onFlags Figure 4 32 The disasm view e The memory view 0000 SE 17 D3 0008 C3 A3 18H 0010 C3 UD 22 0018 C3 JF 29 0020 C3 77 1A 0028 C3 83 09 0030 C3 96 08 e The register view e The stack view 04 C3 85 OF FF gt wus l1 _ FD CB 07 46 C9 Uu gt x LIF 6 FD CB 02 66 C9 u T x uf 4 FO CB 03 C6 cS u x v 3A 3C 91 BF C9 u w lt 8 d 97 32
15. th e stack 18 Address Ctrl L Current PC Alt Home Previous Stack Entry Alt Page Up Next Stack Entry Alt Page Down Figure 5 26 The Go menu entry Now I must talk about a nice tool called Keypad into View menu Scan Groups Keys Group 0 up Right Left bow Group 1 Clear Power Div Mul Sub Add Enter C Group 2 Vars Tan RParen 9 6 3 Chs C Group 3 stat Prgm Cos LParen 8 5 2 DecPnt C Group 4 Graphvar Matrix Sin comma 7 4 1 0 C Group 5 Alpha Math Recip Square Log Ln Store C Group 6 Del Mode 2nd YEqu Window Zoom Trace Graph 1 1 1 1 1 1 1 Input Value l 2 Close Figure 5 27 The keypad 5 9 Macro Macros are an easy way to simulates key press file loading reset automatically It means that you could record a macro then click on some keys then stop If you play it tilem will press the same keys for you Have you never think too lazy to press always 2nd catalog asm you want to test your new asm production Simply use a macro to load and launch your program automatically each time 19 Record Stop gt Play A Open Macro File ey Save Macro File Figure 5 28 The Macro submenu About the options you can play an already loaded macro or a macro you just have recorded You can also open a macro and save the current macro which one you just have recorded 5 10 S
16. undocumented instructions 2 Close Figure 4 79 The new breakpoint is added Ok now just remove this breakpoint You can also set a breakpoint when accessing the ports As I use Direct Input method to scan keys in the project I want to see when I read from the port 1 keyboard So I click on Add then I choose I O port then I check Reading then I give the 01 value for the keyboard port 08 Breakpoint Condition Breakpoint type I O port v Break when Reading Writing Port Number Single O Range Value og Cancel Figure 4 80 A breakpoint on keyboard port reading Let s see if all is correct SE4F C Break on invalid instructions C Break on undocumented instructions 9 close Figure 4 81 Successfully added And of course it works fine SgDEA LD A DF SDE6 OUT 01 A A 01 SDEA CP F Figure 4 82 Breaks just after the 01 port reading 59 As you can see it stops just after reading the port on the CP mnemo which is the group to test Now I want to stop on Undocumented instruction and Illegal instruc tion An undocumented instruction is an instruction which was not explained into the z80 datasheet but usable anyway A illegal instruction is just a bad instruction To do that I simply check the check button like this Break on invalid instructions Figure 4 83 Stop on illegal and undocumented instructions Finally as I finished to deb
17. window If it does not detect your calculator automatically select File gt Change Device for older versions of TiLP right click on the left pane and select Change Device Ensure that the Cable and Calc options are correct and that your calculator is turned on and connected Click the Dirlist button to list the variables on your calculator and test whether the cable is working Dumping the ROM requires you to run an assembly program on your cal culator Although these programs have been well tested there is always the possibility of something going wrong so you may want to take this opportunity to back up any important files from your calculator Installing a shell If you have a TI 73 TI 82 or TI 85 you will first need to install an assembly shell These shells are not included with TilEm or TiLP but can be downloaded from the Web 15 e Mallard for the TI 73 http www ticalc org pub 73 asm shells mallard zip e SNG for the TI 82 http www ticalc org pub 82 asm shells sng zip e ZShell for the TI 85 http www ticalc org pub 85 asm shells zshell zip To install the shell you will need to send a memory backup file Note that this replaces the entire calculator memory contents First put the calculator into link mode if necessary e On the TI 82 press 2nd X T gt ENTER e On the TI 85 press 2nd x VAR F2 Next use the Restore option in TiLP to send the 73B 82B or 85B file to
18. 0030 C3 96 08 7E 23 66 6F C9 u d Figure 4 60 The memory view You can scroll through the memory and edit it when it possible To edit simply click on a particular value C880 00 00 00 OO OO OO OO QOO case 00 00 00 op E 00 00 00 Figure 4 61 Edit the memory 4T L 7 m e Now try to edit the value in the adress 0000 for ti83 DB 02 E6 80 Cs DO 0l 0008 C3 8C ll C3 AS GA 00 CS u A u rg Figure 4 62 Can t edit the entire memory You simply can t Why TilEm2 do that Simply this is a place of ROM so read only In fact you can t edit the entire memory but only some part but your programs and variables will always be in RAM so you could edit it without any problem 4 4 7 Logical or Absolute adresses Now that we have seen a big part of the debugger let s see an option which will change the notation of the adress into logical or absolute representation Here s the result 48 00 0000 00 0002 AND 30 00 0004 JP O1D0 00 0007 RST 0038 00 0008 rOPITOOP2 LCD BUSY QUICK 00 000B JP OAAS 00 000E NOP 00 000F RET 00 3FE0 FF FF FF FF FF FF FF FF 00 3FE8 FF FF FF FF FF FF FF FF 00 3FFO FF FF FF FF FF FF FF FF 00 3FF8 FF FF FF FF FF FF FF FF Oo 01 4000 1C 54 98 45 9E 45 A4 45 o T 8 Ei 01 4008 AB 45 07 4F AE 45 Bl 45 UE O 01 4010 B4 45 B7 45 68 46 6B 46 NE Eh 01 4018 6E 46 71 46 74 46 77 46 n F F t 01 4020 BA 45 BD 45 co 45 C8 45 i E y E amp 01 4
19. 028 D3 45 DD 45 E7 45 EE 45 E E Figure 4 63 Absolute representation of the adresses 4 4 8 Keypad There s a completely independant widget which is poped up when you click on Keypad into the View menu into the menu bar AQ Logical Addresses e Absolute Addresses Figure 4 64 The Keypad menu entry into the View menu This widget allow you to see how the buttons are connected which bit in which group This is mostly used in direct input use non blocking port to scan keys instead of a system call as CALL GETKEY 5can Groups Keys FI Group 0 ue f mght Left Dow Group 1 Clear Power ov ww Sub Add Enter C Group 2 Vars Tan RParen z 6 3 Chs C Group 3 Stat Prqm Cos LParen 8 2 Z DecPnt Group 4 Graphvar Apps Sin Comma 7 4 1 0 Group 5 Alpha Math Recip Square Log Ln Store Group 6 Del Mode 2nd YEqu window Zoom Trace Graph l l l g l l l Input Value Figure 4 65 The DIV and MUL keys are connected to bit 4 and bit 5 in group 1 4 4 9 Breakpoints Imagine that you want to inspect a part of code but how to run the program normally and stop just before the part of the code you want inspect Try to run pause randomly to finally stop in the right zone is stupid and hard to do usually The solution is to use breakpoints What s a breakpoint A breakpoint is just say When the PC is equal to th
20. 8000 eee 4 4 7 Logical or Absolute adresses 20 4 AAS Keovpad ce vio s amp h ee ede dom ee ER we ew eS 44 9 Breakpoints 0 000 0 a List of functionnalities ol Men os mow m cou IN ee EUR es eee eo eee eee ee S Peewee ewe een ae eee ee ee ee ee eee TO CETT ee NES AERE SERERE S EE eee eee eee eee eee eee ee ee 5 7 Reset Calculator 00 8500 RR Meee eeu IBN SNR RSS ESSE P es D9 Maroja 2 2 de Aw ok Bee Se ACE vea a eee EEE os Phe ee Ree eee eee eee en eee eee wee 5 11 Quick Screenshot 2 2 5 12 Prelerences excu ow X XX EGER S See EERE ESSE EES D 19 ABOU i uc eek ew E ho e OR Xe Ewe Eee EK CX RO 9 a B2 OU S uum 4M 3 eoe Oh eee Lee eee eee 1909 WT 6 Command line usage OL 86S 2 29 xx ow m9 9 59 9959399424 5939 595 0 2 Examples isse eae eee eee eu hok cB OE O99 atten et 7 Configuration files f l General configuration a ek 4 eee ed eed dO Se 1 2 Nemes ras ewe be oo Ox ee Reed Eee oe 8 Tips and tricks for developpers 8 1 Scripting you application 2 00 9 Create your own skin 9 1 Download tiem skinedit 9 2 Create the skin hh Chapter 1 Introduction 1 1 What s TilEm2 TilEm2 is a TI calculator emulator It emulates all the Z80 calculators 73 76 fr 81 82 82stats 82stats fr 83 83 83 SE 84 84 SE 85 and 86 and all known ROM OS versions TilEm2 is com
21. IST 2 Ls LIST 2 Le LIST 2 ION ASM 1 336 IONZ ASM 178 ZMINFO ASM 79 ite Sa Separate files Group file E Refresh amp cancel Figure 4 8 Listing the variables A check button lets you choose the format of the output If you want to get more than one var you can save it as grouped file or as separate files separate files is as you get it one by one 24 Refresh X cancel aswe Figure 4 9 Listing the variables Then simply click save and choose a place to backup the var s 4 3 Record or grab a screenshot As screenies are a good way to show your projects or whatever you want TilEm2 provide a complete screenshot dialog We think this dialog to be user friendly and powerful There s also a special manner to quickly screenshoot the lcd content Quick Screenshot or SHIFT 4 CTRL 4 PRINT We will describe this method in a first subsection then we will talk about more powerful methods 4 3 1 Grab a screenshot using Quick Screenshot You can grab a screenshot without using screenshot dialog Simply click on the Quick Screenshot menu option or SHIFT CTRL PRINT The screenshot use the default options or the options you have given into screenshot dialog The picture is stored into the directory you usually use for screenshot OR if not exists into the config tilem2 screenshots or equivalent if you re not on Linux 20 B Send File Ctrl O fed Receive File ctrl s
22. L which push the return adress and finish by a RET 4 4 3 0 7 Finish Subroutine You can execute this action by clicking on the button in the button bar Finish Subroutine Figure 4 52 The Finish Subroutine button Or click on the Finish Subroutine menu entry into the Debug menu into the menu bar 59 Finish Subroutine F9 Figure 4 53 The Finish Subroutine menu entry Or simply use F9 This action simply run to the RET instruction then pause after the execu tion of the RET which is basically poping the value on the stack into PC This Finish Subroutine is helpful if you enter a subroutine which is quite long and you don t want to inspect it so simply finish the suroutine easily 4 4 4 Use the register view In addition to run step by step and inspect the disasm instruction you would probably know what s happening when you run one instruction Why a jump is never executed What s the content of a register after an in struction What s the flag state after an instruction The register view provide an easy way to inspect and edit the register val ues 42 Firstly some asm z80 reminiscence e SP is the Stack Pointer the top of the stack will always be stored into the value of SP e PC is the Progam Counter so the adress of the current instruction e HL DE BC are generalistic registers They could be splitted into 2 registers of 8 bits Usually HL is us
23. Run Pause Step Step Over Finish Subroutine 41 9E4F LD A 80 AF 804C AF JOD42 41 9E51 OUT 10 A BC 0000 BC 7E00 41 9E53 LD HL flags asm Flag2 DE 0007 HE oooc 41 9E56 LD A 00 um 41 9E58 LD B 00 HL 8212 HL asco 41 9E5A INC B IX azas IY 89FO 41 9ESB LD DE 000D SP FFD PC 9E56 41 9E5E ADD HL DE s z v M xTe n C 41 9ESF DJNZ 9ESB 41 9E61 LD A 20 IM i EFF CIEI FFD1 9DD1 00 0000 3E 1F D3 06 C3 95 01 FF gt L4 f n FFD3 9643 00 0008 C3 04 10 FD CB 07 46 C9 puw _x LF FFDS 5703 00 0010 C3 C8 18 FD CB 02 66 C9 yu tz xuf FFD7 FFFS 00 0018 C3 BF 20 FD CH 03 C6 C8 uban xv FFD9 0009 00 0020 C3 D6 10 3A 53 96 B7 C9 uy v S FFDB FFED 00 0028 C3 10 28 97 32 53 95 co wv a 2s o FFDD 0780 00 0030 C3 A7 OA 7E 23 66 6F C9 p Ff FFDE 5742 00 0038 18 2F DB 04 CB 57 C202 f ewx WB u FFEl 28E7 00 0040 010 CB 67 C2 Fl 00 1F 38 nx g _ 8 FFE3 2D18 00 0048 54 1F 38 SC 18 27 FF FF T 18V z _ FFES 40E2 00 0050 C3 80 28 C3 4E 09 SA AS uo u N x z FFE7 6EBS gt Figure 4 73 Breakpoint reached Now If I want to delete a breakpoint I simply use Delete If I want to keep the breakpoint but just deactivate it temporarly then uncheck the checkbox into the Type column 59 4 MX BE SE4F 9E9396 C Break on invalid instructions C Break on undocumented instructions 2 Close Figure 4 74 Breakpoint deactivated I
24. SP FFEC PC EU IM NN AF EOC F309 B123 0043 FFFF B576 H X PIN l JFF EI 0000 3E 17 D3 04 C3 85 OF FF gt wus _ 0008 C3 AS 19 FD CB 07 46 C9 u gt x LF 6 0010 C3 0D 22 FD CB 02 66 C9 u T x uf 0018 C3 7F 29 FD CB 03 C6 C9 yu x v 6 0020 C3 77 1A 3A 3C 91 B7 C9 uw lt 0028 C3 83 09 97 32 3C 91 C9 ws x q2 6 0030 C3 96 08 7E 23 66 6F C9 yu f o 6 Figure 5 21 The memory view For this view you can switch the adresses representation if you want In this view you can see what your calculator contains You can also edit the memory and change some values by your own C880 00 00 00 00 00 00 00 00 case 00 00 00 ob fe 00 00 00 Figure 5 22 Edit the memory A third view represents the registers You can edit them too Below registers there is a bunch of toggle button to represent the flags you can change it Then Interruption Mode IM I and Enable Interrupt checkbox The finally the stack At the top of the debugger window you can see a menu Debug 16 Ie x Step Over Finish Subroutine MEC Dar i AF 0054 AF OF08 9 Finish Subroutine F9 Bc E074 Bc rere Breakpoints Ctrl B camer DE 0203 pe rere 3 close crew HL 8000 HL g009 00 01AB CALL 01F8 IX o000 IY e567 00 01AE JR C O1ED SP FFED PC o1a3 00 01B0 LD HL kbdPsc e 00 0000 3E 17 D3 04 C3 85 07 FF S wus i E M LL
25. You can choose a skin at startup tilem2 r path to my rom rom k path to my skin Choose a save save state tilem2 r path to my rom rom k path to my skin skn s path to my Savestate sav Or just starting a model without giving a rom file tilem2 m ti83 Starting skinless 88 tilem2 m ti83 1 Reset the calc at startup tilem2 m ti82 reset Trying to get a var at startup tilem2 m ti82 get var ION Starting in full speed mode tilem2 r rom full speed Or in normal speed tilem2 r rom normal speed Play a macro at startup tilem2 r rom path to my best program p path to my macro Warning in this situation load macro play the load is done before the macro playing You can also launch debugger and pause the calc by extension tilem2 r rom d Chapter 7 Configuration files 7 1 General configuration You should not edit this file because you don t need it If something wrong by your fault or a bug in TilEm2 just get a new configu ration file from the TilEm2 website and replace the wrong config ini file It s usually copied into config tilem2 config ini 7 2 Keybindings The keybindings are defined in a keybindings ini file usually copied into config tilem2 keybindings ini There s currently no tool to interactively edit this file but you can edit it by hand if you do this carefully This file uses inheritance it means that a part of the keybinding
26. age can be used to copy the ROM contents using a digital camera The other option since the TI 81 has no I O ports is to take apart your calculator desolder its ROM chip and read the contents with an EEPROM programmer 3 1 Getting a ROM using TiLP TiLP is a free software program for communicating with TI calculators of all types Like TilEm it runs on a variety of platforms including Windows Mac OS X GNU Linux and FreeBSD If you ve installed TilEm from source you ve already done most of the work of installing TiLP You can download TiLP from http tilp sourceforge net To use TiLP you will also need a cable to connect your calculator to your computer The TI 84 Plus can be connected using a standard mini USB cable for other calculators you can either buy an official TI Graph Link cable or if you re feeling adventurous build your own 14 Starting TiLP When you launch TiLP the main window appears File Edit View Tools Help Ed wf 5S gg S Ready QDirist Backup Restore Folder Delete Refresh Calculator files Computer files sare Dwe e ee 7183 gt SilverLink 1 M 4 KB Feb 23 2012 Es rol eo eriperet tke Oct 212011 Operating System gt Desktop 4 KE Jan 27 2011 Variables WES Music 4KB Oct 312011 5 Podcasts 4 KB Oct 31 2011 gt Videos 4 KB Oct 312011 Memory Current folder RAM used 0 bytes free 0 bytes FLASH used 0 bytes free 0 bytes mj m Figure 3 1 The TiLP main
27. ak when C Reading writing Executing Address Single O Range Value aef AX Cancel ok Figure 4 68 Add a breakpoint The list of breakpoints is updated and as we can see the breakpoints is present AX SE4F SE4F C Break on invalid instructions C Break on undocumented instructions o 2 Close Figure 4 69 Breakpoint added Now use Run from the button bar of the Debug menu or simply F5 The debugger will stop when the adress is encountered could be never In our case I know that DrawGbuf is frequently used because I use it as soon as possible to refresh the lcd 02 So as soon as I do F5 run the debugger stop on the 9e4f adress Debug View Go 5 Jd tS JE i Run Pause Step Step Over Finish Subroutine 41 9E4F LD A 80 AF J004C AF JOD42 41 9E51 OUT 10 A BC 0000 BC 7E00 41 9E53 LD HL flags asm Flag2 DE 0007 DE oooc 41 9E56 LD A 00 t LT 41 9E58 LD B 00 HL 8403 HL asco 41 9E5A INC B x asas IY a9F0 41 9E5B LD DE 000D sp FFD1 pc ear 41 9ESE ADD HL DE s z v e xTe n c 41 9ESF DJNZ 9ESB 41 9E61 LD A 20 IM g KjFF CIE FFD1 9DD1 00 0000 3E 1F D3 06 C3 95 Ol FF gt THE FFD3 9E43 00 0008 C3 04 10 FD CB 07 46 C9 pu wvV x JF 6 FFDS 5703 00 0010 C3 C8 18 FD CB 02 66 C9 ut _ x uf FFD7 FFFS 00 0018 ca ar 20 FO CB 03 CE CS usn nox v FFD9 0009 00 0020 C3 D6 10 3A 53 96 B7 C9 uy v S b FFDB FFED 00 0028
28. alculator type for ti83 rom C TI 76 fr O TI 86 og Cancel Figure 2 2 Choose the model After that TilEm2 start but calc is off you need to press on 12 MATRAH VARS CLEAR Figure 2 3 It works The last used rom is automatically used for the next launch of TilEm2 You can save the current state of the calculator by using Save Calculator If you cancel the rom chooser dialog TilEm2 automatically shutdown 13 Chapter 3 Getting a ROM image In order to emulate a calculator you must have a copy of the calculator s operat ing system This file is referred to as a ROM image because traditionally the OS was stored in the calculator s Read Only Memory More recent calculator models store the OS in Flash memory instead but the name has stuck The ROM code which forms the brain of the calculator is copyrighted by TI so it is not included with TilEm Instead you will need to copy the ROM from a calculator you own There are various ways to do so e For most calculator models you can connect the calculator to your PC and download the ROM directly using the free software TiLP e For the TI 83 Plus and TI 84 Plus Andree Chea s rom8x tool allows you to copy a portion of the code from your calculator using either TiLP or some other software such as TI Graph Link or TI Connect and combine it with one of the OS upgrade files that are available from TI s website e For the TI 81 the dump81 pack
29. all configure If you have no errors so dependancies are checked and it s ok The Makefile have been generated so type make Then to copy the icons configuration files and tilem2 binary type sudo make install Usually icons will be copied into usr share tilem2 Keybindings and configuration file will be installed into SHOME config tilem2 Then you can launch TilEm2 with the command tilem2 r path to rom Or simply tilem2 2 4 First use If you do not specify explicitely a rom on the command line the first launch will ask you which rom you want to use If you don t know what s a rom or how to get it please read the chapter Get a rom 10 TilEm2 will open a file chooser dialog E E tib myrom Location Lisa rom Places Search tig3 rom 256 0 KB Yesterday at 10 15 Recently Used File Systern Gooze 95 GB Filesystem 3 Documents gt gt Music 3 Pictures 5 Downloads idcm ROM files M Cancel Figure 2 1 Starting TilEm2 for the first time As soon you press OK TilEm2 will try to guess the model of this rom and check if it s a correct rom When TilEm2 has a doubt he will ask you for the model but will display only the possible candidates not all the z80 calc Anyway if you launch a rom you usually know what s model it is because as I ve already said you should have the calculator of the rom you re trying to 11 emulate C
30. creenshot Send File ctrl o Receive Fila Ctr s B Open Calculator Shift ctrld o zi Save Calculator Shift ctri s Revert Calculator State Reset Calculator Shitt ctri Delete Debugger Pause Macro b Ctrl Print Shift ctril Print Preferences ctri Q Figure 5 29 The Screenshot submenu By clicking on this option you launch a screenshot dialog 80 Preview Grab EDIT NEW sog Ef J og S N f aag PFa aL a TI Lr a 4 Options Grayscale Image size 288 x 192 w Width 288 Height 192 Animation speed 1 0 B Foreground PED Background isa Gies Figure 5 30 The screenshot dialog You can grab static screenshot multiple format or animated screenshot will be saved as gif As you can see TilEm2 has a lot of screenshot configuration So you can change the size change the foreground and background colors Use or not grayscale Sl 5 11 Quick Screenshot Send File ctrl o Receive Fila Ctr s A Open Calculator Shift ctrl2 o zi Save Calculator Shift ctri s Revert Calculator State Reset Calculator Shitt ctri Delete Debugger Pause Macro b Screenshot Ctrl Print Quick Screenshot Shitt cCtrl Print 36 Preferences q About fl Quit Figure 5 31 The Quick Screenshot submenu By clicking on this option you grab a screenshot 5 12 Preferences This is where you can set the skin or disable usin
31. ctly the adress for a call When you use call BUFCOPY ti83 you don t want to see the exact value of this jump Always about the disasm view you can Goto adress Using right click on the disasm view Go to Address Figure 4 42 The Goto adress right click menu entry Or using the Go menu into the menu bar Ctrl L Current PC Alt Home 4 Previous Stack Entry Alt Page Up Jk Next Stack Entry Alt Page Down Figure 4 43 The Go menu ED Address Ctrl L Figure 4 44 The Goto adress from the go menu 39 This option lets you choose an adress to jump only user interface no ac tion on the calc Because it can be very annoying to scroll the disasm view Address ps1 af TM Figure 4 45 Enter the adress One more time Goto adress doesn t change anything to the PC or whatever You can also use CTRL L to do this task without using the mouse Another option is to jump to the PC It s like goto adress but without prompting an adress it will jump to the PC directly Using it from the menu bar Go menu Current PC Alt Home Figure 4 46 The Goto adress from the go menu Or right click on the disasm view Go to PC Figure 4 47 The Goto adress from the go menu Now let s talk about interactivity As you can see a a lot of informations are updated each time the calc run or do a step Stack registers and memory is updated in t
32. e Figure 4 26 The Grayscale checkbox 4 3 4 0 4 Grayscale A last setting called Grayscale let you choose the rendering mode 4 4 Use the debugger This is an important part of an emulator The debugger provide an easy way to inspect the core of the calc and to find bugs into your projects 4 4 1 General presentation When you start the debugger using Pause or the right click menu entry 33 B Send File ctrl o fe Receive File Ctrl S Open Calculator Shift ctrl o zj Save Calculator Shift ctrl s Revert Calculator State amp Reset Calculator Shift Ctrl Delete Debugger Pause Macro gt Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 26 Preferences x7 About 8 Quit ctri Q Figure 4 27 The Debugger menu entry The calc will be paused automatically you can t work with debugger while calc is running that s evident If you click on F5 to run the calc the emulator will be deactivated to prevent to edit anything in the debugger You can pause the calc by clicking ESC escape Escape o Step F7 Je Step Over F8 49 Finish Subroutine F9 Il Pause Breakpoints Ctrl B 3 Close Ctrl Ww Figure 4 28 The Pause menu entry Debug menu Or by using the Pause button tool bar behind the menu bar iil Pause Figure 4 29 The Pause button The aim of the debugger is to show the disasm memory the registers
33. ed as source for load memory operation DE is usually used as destination and BC is usually used as counter See by example LDIR and LDDR instructions There s a special register called AF which is basically rarely used as 16 bits register because F is a 8 bit flag register and A is the accumulator register e A is the most used register by the user e F is a register which is often updated depending the instruction LD never update it but AND CP SUB etc does Wikipedia says A and flag bits F carry zero minus parity over flow half carry used for BCD and an Add Subtract flag usually called N also for BCD The F register is used very often when you do JMP condition label or CALL condition label label could be an adress There s some other registers IX and IY which are 16bits registers e X and IY are usually used as offset SET use IY by example Some other registers are called shadow register Their names are AF HL DE BC You can exchange the value of non shadow register by executing EXX and EX To finish to explains what you can see in the register part there s IM which is interrupt mode e The level of IM 0 1 or 2 determine which interrupts are executed or not HALT or an home made interrupt by example are not executed in all modes e ET is enable interrupt 43 e is the adress of the interrupt vector The values
34. evert Calculator State Reset Calculator Shift Ctrl Delete Debugger Macro b Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 36 Preferences 5 About I Quit Ctril Q Figure 5 17 The Debugger menu entry 3 When you click on this option the debugger window will appear Debug View Go Run Pause Step Step Over Finish Subroutine 00 01A3 HALT 00 0144 RET 00 01A5 LD HL apdTimer 00 0148 LD HL 74 00 01AA RET OO 01AB CALL t OlF8 OO O01AE JR C O1ED 00 01B0 LD HL kbdPsc 00 0000 3E 17 D3 04 C3 85 OF FF gt zc w s ld 00 0008 C3 AS 19 FD CB 07 46 C9 yu x 1 F t 00 0010 C3 0D 22 FD CB 02 66 C8 u T x uf 64 00 0018 C3 7F 29 FD CB 03 C6 C9 u x v EX 00 0020 C3 77 1A 3A 3C 91 BF C9 uw 6 00 0028 C3 83 09 97 32 3C 91 C8 us xG 2 6 00 0030 C3 96 08 7E 23 66 6F C98 u f f 00 0038 08 DS DB 03 CB 57 C2 Bl f x ev x WA SER EIS 00 1F 38 F IF 38 36 18 8 I 8 zt kal Figure 5 18 A nice and powerful debugger There s a lot of things to say about debugger When you launch it calculator is automatically paused As you can see there are 5 big buttons Run Pause Step Step Over Finish Subroutine Step just execute one instruction As you can see all the instructions are not the same length that s why it doesn t step one byte per one byte Step over do the same job than step but do not follow call Finish subroutine just do basically the same job but
35. g it and some important other stuff 82 Send File ctrl o Receive Fila ctr s 1 Open Calculator Shift ctrld o x Save Calculator Shift ctri s Revert Calculator State Reset Calculator Shit ctri Delete Debugger Pause Macro b Screenshot Ctrl Print Quick Screenshot Shitt Ctrl Print ctrl Q Figure 5 32 The Preferences menu entry You can limit speed or not Emulate grayscale if you don t know just let it checked by default Use smooth scrolling Emulation Speed Limit to actual calculator speed As fast as possible Display Emulate grayscale Use smooth scaling Figure 5 33 The preferences dialog And an important user friendly feature Set skin When you click on the button a file choose will popup and lt you choose the skin 83 E 4 tib Code tilem590 trunk data skins Location tis3pfr skn 53 svn Monday Places i dl 4 Search Recently Used ti76 skn 334 3 KB Monday E tib tiB1 skn 75 6KB Monday gt Desktop ti82 skn 225 7 KB Monday tiB2stats skn 194 1 KB Monday ti83 skn 285 1KB Monday tiB3p skn 279 2 KB Monday i tissptrskn 268 3 KB tiB4p skn 86 9 KB Monday ID tigapa skn 196 4 KB Monday tiB6 skn 124 8 KB Monday File Syster Gooze 95 GB Filesystem gt Documents Monday 7 Music gt Pictures gt Downloads Skin files M Karce on Figure
36. he same time the disasm view is modified There s of course some possible actions to do to execute one or more steps Here we will only study disasm related stuff keeping breakpoints and register s stack for later The actions you could do e Step Execute one instruction 40 e Step Over Run to the next line skipping subroutines e Finish Subroutine Run to the end of the current subroutine 4 4 3 0 5 Step You can execute this action by clicking on the button in the button bar ba Step Figure 4 48 The Step button Or click on the Step menu entry into the Debug menu into the menu bar Un Step F7 Figure 4 49 The Step menu entry Or simply use F7 This action simply execute one step Warning Execute one step doesn t mean going to the next line If the instruction is a call or a jump it will load another value into the PC so possibly jump elsewhere This action is the best choice to follow step by step the behaviour of a program 4 4 3 0 6 Step Over You can execute this action by clicking on the button in the button bar ple step Over Figure 4 50 The Step Over button Or click on the Step Over menu entry into the Debug menu into the menu bar Je Step Over F8 Figure 4 51 The Step Over menu entry A1 Or simply use F8 This instruction is useful to do not enter into subroutines What s a subroutine Simply a jump materialized by a CALL or BCAL
37. his menu entry a file chooser dialog is opened and let you choose a file 64 E 4 ti 23p ion Location ion 83g Places Search RUEET 1 7 KB 06 18 2000 amp Recently Used 53 tib gt Desktop Fle System 95 GB Filesys Gooze 3 Documents gt Music I gt Pictures 3 Downloads a All compatible files M ees See Figure 5 3 The Send File file chooser dialog A lot of people don t know which file extension is associated with the emu lated model To help them some patterns are used to do the selection When you let All compatible files TilEm2 do the job for you but you can choose All files if you know what you re doing a file with an incorrect exten sion by example 65 All compatible files TI 73 files TI 82 files TI 83 Plus files TlGroup files All files Figure 5 4 The Send File patterns It could take some time to load a variable so a current progress bar is printed while loading to know what s happening Sending DoorsCS7 8xk nm M DoorsCS7 ENTER Figure 5 5 The Senf File progress bar update 66 5 3 Receive File A Send File ctrla o i Receive File Ctrl s B Open Calculator Shift ctrld o x Save Calculator Shitt ctri s Revert Calculator State amp Reset Calculator Shitt ctri Delete Debugger Pause Macro P Screenshot Ctrl Print Quick Screenshot Shitt cCtrl Print 36 Preferences
38. ht click menu As you can see there s all you need no more no less Send File Load a file from your computer to TilEm2 Receive File Launch a menu where you can store a variable from TilEm2 to your computer Open Calculator Load a ROM Save Calculator Save the current state of the calculator in a separate sav file Revert Calculator Revert the state of the calculator Reset Calculator Reset the calc of course Debugger Open the debugger window Macro Record play open or save a macro a kind of script to do some actions automatically Screenshot Open the screenshot menu static and animated screenshot Quick Screenshot Grab a screenshot and save it without prompting that s why it s quick Preferences Open the preference window 63 e About Open the about dialog informations on the authors and more e Quit Close TilEm2 properly 5 2 Send File amp Send File Ctrl o In Receive File Ctrl 5 B Open Calculator Shift ctrl o Ix Save Calculator Shift ctrl S Revert Calculator State amp Reset Calculator Shit cCtri Delete Debugger Pause Macro p Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 36 Preferences qy About a Quit Figure 5 2 The Send File menu entry This is one very important feature because emulators are usually used to try some programs before really transferring it to real calc When you click on t
39. ilesys Gooze 3 Documents gt Music I gt Pictures 3 Downloads Ta All compatible files M ees See Figure 4 2 The Send File file chooser dialog Then explore your computer and choose the file s you want to send Usually variable are suffixed by something like 82p ti82 83p ti83 8xp ti83 ti84 86p ti86 or something else Grouped files are generally suffixed by 82g ti82 83g ti83 8xg ti83 t1844 86g ti86 or something else Some other special extension as 8kv are flashapp for ti83 ti84 And a lot of other file extension It could take some time to load a variable so a current progress bar is printed while loading to know what s happening As soon as you press OK the file start to be loaded and a progress bar is 20 displayed Sending DoorsCS7 8xk D DoorsCS7 ENTER Figure 4 3 The Senf File progress bar update 4 1 2 Using drag and drop Simply select one or more files on your computer and use drag and drop to 21 asm bat ion 8xg ion inc ion txt ion z80 ion zip ionf z80 ionm z80 ionz z80 zminfo z80 VARS CLEAR Figure 4 4 Drag and Drop You will not see any visual feedback no progress bar but you can see in your terminal eventually the libticales debugging messages 1d 06 name ION VARS CLEAR ACK P OxO0B2 178 bytes S size 0x004F 79 id 06 name ZMINFO XDP OxOO4F 79 bytes ACK EOT cument Figu
40. imation speed Lo Foreground mm Background ien i Figure 4 21 Huge 4 3 4 0 2 Animation speed There s a setting called Animation speed which is used by the animated screenies If you increment this value the animation will run faster A visual feedback will show you the effect of increasing this value The max is set to 100 Animation speed 1 0 B Figure 4 22 The Animation speed widget 4 3 4 0 3 Foreground and background colors Below the animation speed there s 2 color chooser which allow you to set your own colors for foreground and background colors as you know z80 calc LCD is monochrome l Foreground Ee Background Figure 4 23 The Color chooser widget The grayscales screenies are fully compatible with this setting of course be cause it s no more than flashing Here s a sample of what you get if you choose a pink as foreground color and green as background color Preview Grab Record th v Options Grayscale Image size 192 x 128 v Width 192 B Height 128 Animation speed 1 0 B Foreground FRED Background X cancel d Save Figure 4 24 Colored screenshot Let s see a bunch of colored screenies 32 Figure 4 25 Some other samples Of course these settings are usually used to correct contrast or simply set a better color ratio not to do the useless but funny screenshots I ve shown just before Grayscal
41. is adress then pause the program Assuming you have a routine called DrawGbuf and you want to stop just at the start of this routine 90 3 Close How to know the adress Simply use the correct option in your assembler to generate the listing file which contains the equates between labels and adress T option with spasm Then look for the DrawGbuf label into the file with spasm the file use the Ist extension I found the adress 9e4f hexadecimal of course tib cobra Code z80 project5 project 1st grep drawGbuf Ti 9dce CD 4F 9E call drawGbuf 94 9e4f a drawGbuf As you can see a label does not take place into the final binary it s only a name for an adress only for human Now you have the adress simply run TilEm2 launch debugger then open the breakpoint dialog In the menu bar click on Debug and click on Breakpoints Breakpoints Ctrl B Figure 4 66 The Breakpoints menu entry in the menu bar Or simply press CTRL 4 B Then the Breakpoints dialog appears C Break on invalid instructions C Break on undocumented instructions 2 Close Figure 4 67 The Breakpoints menu ol As we want to set a breakpoint on 9e4f which is the start of the DrawG buf subroutine we need to Add so simply click on Add Another dialog opens and we simply keep the default values and type 9e4f in the Adress input Breakpoint Condition Bre
42. k Screenshot 36 Preferences 57 About fal Quit Ctr o Ctri s Shift ctrl o Shift Ctrl s Shift ctrl Delete Pause b Ctrl Print Shift 4 ctrl Print Figure 5 14 The Save Calculator menu entry This option just save the current state of the calculator in a sav file The file is created in the same directory as the rom file and with the same name 5 6 Revert Calculator State A Send File Receive Fila B Open Calculator x Save Calculator Revert Calculator State Reset Calculator Debugger Macro Screenshot Quick Screenshot 36 Preferences qr About fl Quit 12 Ctr 0 Ctr s Shift ctrl o Shift ctrl S Shift ctrl Dalete Pause b Ctrl Print Shift 4 Ctrl Print Figure 5 15 The Revert Calculator State menu entry No surprise this option just revert the calculator state if possible 5 7 Reset Calculator Send File ctrl o leq Receive File Ctr s A Open Calculator Shift ctrld o x Save Calculator Shitt ctri s Revert Calculator State e4 Reset Calculator Shitt cCtril Delete Debugger Pause Macro b Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 3 amp Preferences 57 About fal Quit Figure 5 16 The Reset Calculator menu entry Guess what does this option 5 8 Debugger B Send File ctrl o HA Receive File ctri S B Open Calculator Shift ctrl o E Save Calculator Shift ctrl s R
43. lc using your smartphone by example Scale it keeping proportion to have around 900 pixels high Then start skinedit create a new skin open the picture and set the key posi tions It takes less than 20 30 minutes I think See the chapter Create your own skins to know how to do Then you can test it with TilEm2 That s all Here are the current skins available by default Bo Uw O O O EEG p j og Figure 1 4 The skins Chapter 2 Installation 2 1 Generalities Before installing TilEm2 you should know that no ROM is included in this software In order to use TilEm2 you must use your own rom use TILP to get it TilEm2 provides an installer msi for windows and script autoconf for Linux There s not a lot of dependancies so you should really have no problem to install it 2 2 Dependancies TilEm2 uses the following libraries e GTK 2 6 or higher but 3 x not supported yet e libticalcs2 You can find libticalcs2 on ticalc from Romain Lievins 2 3 Install from sources Download the sources of TilEm2 on sourceforge net Or eventually Dowload the source from the trunk like this svn co https tilem svn sourceforge net svnroot tilem newline newline Then install gtk e g for debian sudo apt get install libgtk2 0 dev Then install libticalc2 http www ticalc org archives files fileinfo 374 37479 html After that simply use the configure script and the well know Linux inst
44. le to run skin FILE The skin file to use m model NAME The model to use s state file FILE The state file to use l without skin Start in skinless mode reset Reset the calc at startup get var FILE p play macro FILE d debug normal speed full speed Get a var at startup Run this macro at startup Launch debugger Run at normal speed Run at maximum speed display DISPLAY X display to use You should usually use something like tilem2 r path to my rom newline newline All the non option arguments are considered as files to be loaded But as you can see you can specify the skin with k If you usually use more than one model you can try m and it will load the rom 87 associated with this model if you already start a rom from this model You can specify a different save state by default it uses the one which is called as the rom file You can start skinless You can load a file and even launch a macro at startup in this case loading a file is done before macro playing You can reset too get a var if possible and launch debugger Some options could be set at startup as normal speed or full speed as fast as possible Other options are not TilEm2 options display by example Something is missing 6 2 Examples First starting using configuration file need to have already started one time before tilem2 You can specify the rom to use tilem2 r path to my rom rom
45. lilEm2 USER MANUAL DUPONCHELLE Thibault MOODY Benjamin May 15 2012 TI 84 Plus 4a TEXAS INSTRUMENTS TAT PLOT FI TBLSET F2 FORMAT F3 CALC F4 TABLE FS a ao o Figure 1 TilEm2 Contents 1 Introduction 11 What s Tilbm27 1 2 Somehistory 1 3 Features Lb DO KING sa e saa rases 2 1 Generalities MM 2 3 Install from sources JUIN 3 Getting a ROM image A 3 1 Getting a ROM using TiLP Main features 4 1 Send a file from PC to TilEm2 4 1 1 Using the right click menu option l 4 1 2 Using drag and drop 4 1 3 Using the command line 4 2 Get a var from calc to PCI 4 9 Record or grab a screenshot 4 3 1 Grab a screenshot using Quick Screenshot 4 3 2 Grab a screenshot using the screnshot dialog 4 3 3 Recordagifl 4 3 4 Screenshot options 4 3 4 0 1 DIZ s usd odo vus Emo Ek Om odes 4 3 4 0 2 Animationspeed 4 3 4 0 3 Foreground and background colors 4 3 4 0 4 4 4 Use the debugger 4 4 1 General presentation 4 4 2 Widget organization Grayscale Aa eA NNO l 5 eae e e r aa TER T1305 OUCD oc a4 dae wee Geom ew amp mos 4 4 3 0 6 Step Over 4 4 3 0 7 _ Finish Subroutine TT Cee eee ee eee EUREN DE 4 4 6 The memory view 00 0
46. nsfer EE Current transfer Figure 3 4 The transfert 17 Chapter 4 Main features In addition to emulate the behaviour of a real calc TilEm2 features main func tionnalities as file loading and file export screenshot debugger In this chapter we will talk about these main features In an another chapter yoou will find a detailled explanation of all options of TilEm2 4 1 Send a file from PC to TilEm2 Here we talk about sending a file from computer to emulated calc You downloaded a file on the web and you want to test it before sending it to your calc You compiled a file and you want to see the result So you probably want to use send file feature There s 3 ways to do that 4 1 1 Using the right click menu option Firstly right click on the calc This menu popup will appear 18 amp Send File Ctrl o Receive Fila Ctrl 5 Open Calculator shitt ctri o qq Save Calculator Shitt ctri Revert Calculator State amp Reset Calculator Shitt ctrl Delete Debugger Pause Macro Screenshot Ctrl Print Quick Screenshot Shift ctrl Print 35 Preferences T About fA Quit Figure 4 1 The Send File menu entry Click on Send file You can bypass the popup menu by clicking CTRL O 19 E 4 ti 23p ion Location ion 83g Places CX Search Bi ion 83q 7 KB 06 18 2000 amp Recently Used 3 tib I gt Desktop C File System 7 95 GB F
47. output format as png bmp or some other else 4 3 9 Record a gif Click on Screenshot menu option or use CTRL PRINT 3 Send File Ctrl 0 H Receive File Ctrl S E Open Calculator Shift ctrl o E Save Calculator Shift ctrl S Revert Calculator State Reset Calculator Shift Ctrl Delete Debugger Pause Macro b Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 3 Preferences a About A Quit Figure 4 14 The Screenshot The screenshot window will open 27 ctri Q submenu Grab EDIT NEW CN Options Grayscale Image size 288 x 192 Width 288 Height 192 E Animation speed Lo g Foreground a Background ie es Figure 4 15 The Screenshot window You can record a gif by clicking Record Stop the gif by clicking Stop What a surprise D As soon you click Stop a preview is available in the picture area There s a lot of options as size foreground background color etc You can set these options after recording the animation When you have the desired animation clickon Save button and choose a place and a filename to save the gif 4 3 4 Screenshot options Static screenshots and animated screenshots both use settings Here s how to use these seetings 4 3 4 0 1 Size You can choose between default size for the screenies 7 default size for the TI 86 and 3 for the other models 288 x 192 Cus
48. pletely free and designed for Linux but available for Windows We put a lot of work in this software to offer to the community the best possible product TilEm2 also provides a full featured debugger with disassembler breakpoints memory view and more 1 2 Some history Some of you probably already know TilEm because a first version was released around 2000 2001 by Julien Solignac then maintained by Benjamin Moody since 2004 This first version was working fine but there were some issues skins were too small and bad resolution and a lot of feature were missing Anyway this software was pretty good especially because the core emulation was very good Inc Plug ORAL CI Ef i FLOAT 9122u 557H3 e00 6000 0000000 C 1 999000 E 6e 0 pod un E E j 16 6 M a Figure 1 1 The old TilEm Debugger Hardware Linking Toggle autosave Toggle window Toggle speed Reset Reload state Quit without saving ctrl Q Exit and save state Alt X Figure 1 2 The old TilEm menu We decided to rewrite this emulator from scratch keeping the philosophy of TilEm but improving all the rest A new core has been developped by Benjamin Moody aka floppusmaximus and I Thibault Duponchelle aka contra sh started to work on the GTK user interface later he helped me for this task We are proud to release our work for beta tes
49. re 4 5 Drag and Drop You can check if your program is correctly uploaded to calc by listing them inside the program menu if it s a program 22 MODE XT 6 n MATRX VARS CLEAR Figure 4 6 Check if a programs is uploaded correctly here on a ti83 4 1 3 Using the command line You can also send a file to the calc at startup using command line parameters All the non options args are sent to the calc tilem2 r rom ion 83g This example will load the group file ion 83g in the calc memory 4 2 Get a var from calc to PC To get a program list screen application or whatever which is considered are a var on the calc you need to use the right click menu options Or you can simply use CTRL S 29 Send File Ctrl O w Receive File Ctrl S Open Calculator Shift ctrl o zi Save Calculator Shift ctrl s Revert Calculator State amp Reset Calculator Shift Ctrl Delete Debugger Pause Macro gt Screenshot Ctrl Print Quick Screenshot Shift Ctrl Print 36 Preferences About 8 amp 8 Quit ctri Q Figure 4 7 The Receive File dialog At this point TilEm2 will try to get the variables and print them into a list This is why you will see the progress bar Warning update is not done each time the window is popup you need to refresh manually the vars You can select one or more vars in the list then saving it by clicking Save Ls LIST 2 La L
50. s are common to all models but you can rewrite them for each model So firstly TilEm2 parses common then if he find another keybindings for the same keypress he rewrite it There s one subsection per model Here s a piece of the keybindings file Up Up KP_Up Up Down Down KP_Down Down Left Left KP_Left Left Right Right KP_Right Right Shift Up 2nd Up Shift Down 2nd Down Tab 2nd KP_Tab 2nd ISO_Left_Tab 2nd 90 Del Del Left Del Delete KP_Delete BackSpace 0 KP_O 4 lt S O DO D WONNWDOTHTPABWBWNHNFF O Left values are the computer keyboard key names Right values are calc keys means pressing the two or more keys simultaneously means the same thing for the calc We know that it s not easy for you to modify this file but if you make a mistake tilem will say error while parsing keybindings but it works even In the future we will probably add a user interface integrated to TilEm to change keybindings but for the moment it doesn t exist 91 Chapter 8 lips and tricks for developpers Here are some tips to help you to develop your projects 8 1 Scripting you application Each time you compile your program if you must do 5 or 6 click to launch you program on the emulator that s pretty annoying Record a macro to do that and execute it at startup If you load files they are stored into the memory before the macro is launched So record a macro and
51. stop after a ret Now just see what s the differents view of the debugger dialog There s a big frame for disassembly view In this frame you can see the adress and the disassembly instruction On right click you can do some useful actions Breakpoint here Go to adress 14 AF BC DE HL IX SP 0054 E074 0203 8000 0000 FFED DORDE BODDE APY DF08 Bot FFFF ieee FFFF HL 18009 Ns 8567 PC 01A3 P m IM FF El go to PC Debug View Go gt i 8 amp gH Run Pause Step Step Over Finish Subroutine 63 6 EXX Bai CP D B5 8 EXX B5 9 RET Fi BS A PLISH HL Breakpoint Here Go to Address Go to PC 0000 C3 77 00 OO 00 00 i us y y 0008 00 O0 00 OO OO OO OO DO W 4 4 4 54 M 0010 0 O0 00 OO OO OO OO DDO W W 4 4 5 54 a 0018 00 O0 00 OO OO OO OO 00 4 4 4 4 54 M 0020 0 O0 00 OO OO OO OO DDO W 4 4 54 4 a 0028 00 00 00 OO OO OO OO DDO W 4 4 4 4 54 0030 0 O0 00 OO OO OO OO DO 4 4 4 5 54 s Figure 5 19 The right click menu on disasm view There s 2 kind of adress notation for this view Logical and Absolute You can switch it into the View menu Logical Addresses Absolute Addresses Figure 5 20 Switch between logical and absolute adresses The second big frame is the memory view 19 AJAO BC A421 BC DE F329 DE HL 9683 HL Ix FFFF n ayaa ee HEEBE
52. ted See this example OSF3 LD B A IX 7Bc6 Iv 8567 OSF4 JR NZ 05EB SP FFES PC JOSF3 OSF6 DEC HL s z y H x P N C OSF7 LD A L OSES OR H IM 1 I FF CJ EI al Figure 4 37 The value of PC is 05F3 as the adress of the current instruction As you may know even if z80 is most like RISC methodology in the sense the mnemo are pretty simple and fast the size of the instruction depends the instruction itself That s why the adress are not linearly incremented Sometimes an instruction is stored on 1 byte sometimes 2 bytes sometimes 3 bytes etc A sample for 1 byte sized instruction OSES RET OSES LD B 00 Figure 4 38 Only one byte for RET A sample for 2 bytes sized instruction OSFO AND 08 OSF2 CP B Figure 4 39 2 bytes A sample for 3 bytes sized instruction 38 OSES LD cxPage A OSES RET Figure 4 40 3 bytes This view show the disasm memory so you can see the entire memory but not as hexadecimal value but as assembly mnemos As you can see some values are replaced by their symbols 2610 LD HL insDelPtr Figure 4 41 The value is replaced by its symbol This is not a default behavious of a z80 debugger so that s the job of an equate file loaded by TilEm2 at startup files called sym into the data direc tory In fact that s just adress values replaced by a label for human readable pur pose Exactly as you use an equate file instead of calling dire
53. ting 1 3 Features TilEm2 has basically all the TilEm old features plus a lot of new things e Emulates all TI z80 calc e Emulates all known rom OS versions e Linking Send and receive var use libticalcs2 e Screenshot e Animated screenshot e Grayscale e Save states e Use TiEmu skin file format easy to do your own skin e And more Here s the right click menu option amp Send File Ctrl o Receive File Ctr S A Open Calculator shitt ctri o Ix Save Calculator Shitt ctri s Revert Calculator State amp Reset Calculator Shift ctri Delete Debugger Pause Macro b Screenshot Ctrl Print Quick Screenshot Shitt Ctrl Print 5 amp Preferences q7 About A Quit Ctrl Q Figure 1 3 The right click popup menu 1 4 What TilEm2 do NOT do TilEm2 do a lot of stuff that TilEm1 was not able to do but there s always some feature not implemented yet e Sound handling e Calc to calc linking But do not forget that developpement goes on and we are planning to do it 1 5 Skins You can use TilEm2 without skin just uncheck the Use skin checkbox into the Preferences menu but skins are more user friendly We have made some officials and free to use skins thank you to our contribu tors You can do your own skins using skinedit If you want you can send us the skin file maybe it could become official What do you need to do your own skin Just take a picture of your ca
54. tom Figure 4 16 The Size listbox for all models except TI 86 28 For the TI 86 ratio and values proposed by default are different 128 x 64 128 x 77 214 x 128 256 x 128 321 x 192 384 x 192 Custom Figure 4 17 The Size listbox for TI 86 Default values are proposed to help you to choose correct ratio the choice depends on the size of the lcd Here s what you have for all models except TI 86 e 96 x 64 Preview v Options Grayscale Image size Width Height Animation speed 1 0 B Foreground fis sl Background M cancel d Save Figure 4 18 Small or normal e 192 x 128 29 Preview n O 0 v Options Grayscale Image size Width Height 128 Animation speed fio fF Foreground aa Background Cancel fl Save Figure 4 19 Medium e 288 x 192 Preview n v Options Grayscale Image size Width Height 192 Animation speed 1 0 B Foreground Background I M cancel d Save Figure 4 20 Big I will not show the same screenshot for the TI 86 it s not necessary This is default sized screenies but you can set your own warning try to keep the ratio Setting your own size could produce some curious results here the biggest pos sible 30 Preview I Grab il i ii n m zi v Options Grayscale Image size Custom v Width 750 Height boo B An
55. ug my application and just want to run it nor mally I just clear all the breakpoints by clicking Clear Clear all breakpoints All existing breakpoints will be deleted and cannot be restored Figure 4 84 The warning before clearing all the breakpoints Simply click Clear then all will disappear To finish about breakpoints you should know that you can check Reading Writing and Executing for a Memory adress breakpoint too You can also specify logical or absolute adresses You can set a breakpoint easily without using the breakpoint dialog by doing right click then Breakpoint Here It will put a breakpoint on the current instruction selected into the disasm view 60 Breakpoint Here Go to Address Goto PC Figure 4 85 Set a breakpoint here 61 Chapter 5 List of functionnalities This chapter is most like a dictionnary than real explanation Please refer to the first part Basic tasks for the subject which are already explained 5 1 Menu As TilEm1 the menu is a popup menu right click All you want to do need to use this menu 62 ES Send File mm Receive File ctrl4s Open Calculator Shift Ctrl O Ix Save Calculator Shift ECtrl 5 Revert Calculator State amp Reset Calculator Shift ctrl Delete Debugger Pause Macro p Screenshot Ctrl Print Quick Screenshot Shitt Ctrl Print 35 Preferences T About amp Quit Figure 5 1 The rig
56. your calculator You will need to press ENTER on the TI 82 or F1 on the TI 85 to accept the memory backup Running the ROM dumper If you have a TI 82 or TI 85 put the calculator into link mode again using the same key sequence as above Next double click on the Operating System item in TiLP It will show a warning message ROM contents is copyrighted by Texas Instruments You are not allowed to copy and or distributa any ROM e image For more informations see the License Agreement provided with any FLASH OS upgrade Figure 3 2 The warning about the law It will ask you again to confirm that you know what you re doing 16 If you have not made a backup yet you should do one before An assembly program is about to be sent on your calculator proceeding with ROM dumping For the way of proceeding take a look at the TILP manual especially if you have a USB cable gt Forward Figure 3 3 The warning before launching rom dumper The ROM dumper will then be transferred and if possible launched auto matically On the TI 73 TI 82 or TI 85 you will need to launch the ROM dumper manually e On the TI 73 run prgmA to start Mallard ROM Dump should already be selected so just press ENTER e On the TI 82 run prgnROMDUMP e On the TI 85 press CUSTOM F1 to start ZShell select ROMDump and press ENTER to run it The ROM transfer will take some time Total tra
Download Pdf Manuals
Related Search
Related Contents
Rode NTK microphone Sunbeam Bedding HE2100 User's Manual Used Oil and Waste Fuel Management Regulations Plain Language JRCPTB ePortfolio training user guide December 2013 Operating instructions with spare parts list ESG Plus Product Menual - SQLGate for SQL Server 株式会社 前田都市設計 Copyright © All rights reserved.
Failed to retrieve file