Asmusr Posted May 11, 2014 Author Share Posted May 11, 2014 I have added a couple of new features (web site): - Mouse support: If you click on a screen character it will simulate a key press of the corresponding key. Great for navigating though menus. - Save/Load buttons: For saving or restoring the state of the 3 disks to persistent storage in you browser (nothing will be sent to the server). Only available in browsers that support IndexedDB (e.g. Chrome and Firefox). This is currently rather primitive. The plan, as you may have noticed, is to include a disk manager that allows you to maintain a library of disks and choose which disks to insert into which drives. Attached is a copy of the the latest full source code for local use. Note that for local use in Chrome you have to run with the --allow-file-access-from-files option. For Ciro and others who want to embed the emulator in your web sites, I have included a file minimal.html that demonstrates how to bring up the core emulator in a canvas without the user interface. This example is using the included parsec.json module file. To create your own modules in json format use the attached rpk2json tool. js99er-1.4.zip rpk2json.zip 5 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 11, 2014 Author Share Posted May 11, 2014 Where can I find the specifications for the V9t9 format for individual files? Quote Link to comment Share on other sites More sharing options...
Willsy Posted May 11, 2014 Share Posted May 11, 2014 (edited) The ability to embed the emulator in a website is very attractive. Would I be able to use it on my TurboForth site? Edit: Looking at minimal.html, I see you invoke the emulator and pass a reference to a .json file. Is it possible to invoke and provide a reference to a .bin file (a 16K cart image)? If so, could you provide an example? I'd very much like to use it on TurboForth.net to host TurboForth. :-) Edited May 11, 2014 by Willsy Quote Link to comment Share on other sites More sharing options...
Willsy Posted May 11, 2014 Share Posted May 11, 2014 To create your own modules in json format use the attached rpk2json tool. Doh! Should have read your post properly! I was too impatient! This is great work, and a huge contribution to the TI movement. 1 Quote Link to comment Share on other sites More sharing options...
Willsy Posted May 11, 2014 Share Posted May 11, 2014 Okay, I've already got it uploaded to my website! Just need to create a dedicated page for it on the site. TurboFort comes with a disk that contains various utilities. Is there any way to 'pre-insert' this disk so that it's 'in the disk drive' when the emulator starts up? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 11, 2014 Author Share Posted May 11, 2014 Okay, I've already got it uploaded to my website! Just need to create a dedicated page for it on the site. TurboFort comes with a disk that contains various utilities. Is there any way to 'pre-insert' this disk so that it's 'in the disk drive' when the emulator starts up? Not yet, but I will think of a way to do it. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 11, 2014 Author Share Posted May 11, 2014 Okay, I've already got it uploaded to my website! Just need to create a dedicated page for it on the site. TurboFort comes with a disk that contains various utilities. Is there any way to 'pre-insert' this disk so that it's 'in the disk drive' when the emulator starts up? The easiest solution for now is to provide the BLOCKS file as a static JavaScript array and load it onto DSK1 like this: ti994a.getDiskDrives()[0].getDiskImage().loadTIFile("BLOCKS", BLOCKS); See attached. forth.zip Quote Link to comment Share on other sites More sharing options...
Willsy Posted May 12, 2014 Share Posted May 12, 2014 Thanks! I'll give that a try and will report back in a few days when I've had a chance to play with it! Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 12, 2014 Author Share Posted May 12, 2014 I have now included support for loading disk images (.dsk files). Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 12, 2014 Share Posted May 12, 2014 Where can I find the specifications for the V9t9 format for individual files? I expected this would be up on Ninerpedia... full documentation exists in the V9T9 package, but as a summary... (because I don't have those files here - let me know if you can't find them and I'll dig them up at home). Files are stored in DOS format with an 8.3 filename - TI filenames longer than 8 characters simply run into the extension. (ie: HELLOWORLD would be HELLOWOR.LD). Filenames are always uppercase, since DOS didn't support case sensitivity, however, all DOS reserved characters are remapped by ORing 0x80 into the filename (todo: verify this, I don't remember the munging 100%). As I remember, no special handling was performed for reserved names like COM or PRN, they simply didn't work. There is a 128 byte header at the beginning of the file. The first 10 bytes are the actual TI filename, space padded as is convention. The next bytes are taken from the file descriptor block on the disk. 0-9 - TI filename 10-11 - ??? 12 - File type 13 - records per sector 14-15 - length in sectors (big endian) 16 - number of bytes in last sector 17 - record length 18-19 - number of records (/little/ endian!) 20-127 - undefined To see the rules on each field, you can check Thierry's disk controller data at http://nouspikel.group.shef.ac.uk/ti99/disks.htm#FDR Quote Link to comment Share on other sites More sharing options...
+mizapf Posted May 12, 2014 Share Posted May 12, 2014 http://www.ninerpedia.org/index.php/File_systems Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 13, 2014 Author Share Posted May 13, 2014 Thanks, so it's basically a 'File Descriptor Record' without the 'Data chain pointer blocks' followed by the sectors? What is the best way to determine that a file is a V9T9 file? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 13, 2014 Author Share Posted May 13, 2014 One problem with a JavaScript based emulator is that it's difficult to get your stuff out of it again. Importing files works well, and you can also store them persistently in your browser, but for security reasons JavaScript cannot save a binary file to your local disk. To do that you usually need to take a roundtrip to a server. One solution would be to add one or more drives to the TI DSR that would map directly to a directories on your Google Drive. E.g. if you saved a file to the GDR1 device it would go to a directory called 'js99er/GDR1' on your Google drive. With the API provided by Google it's not as difficult to implement as it sounds. Any thoughts? Quote Link to comment Share on other sites More sharing options...
Willsy Posted May 13, 2014 Share Posted May 13, 2014 (edited) Would there be any security implications? For example, could I examine the HTML/JS code, and determine the URL of your GDR folder on your Google drive? If so, I would presumably have the same read/write permissions as the Javascript applications, so I could presumably delete all your files in your GDR1 folder? It's not the end of the world - they're just TI files - not like it's your bank account info or anything, but it would be annoying! Edited May 13, 2014 by Willsy Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 13, 2014 Share Posted May 13, 2014 Thanks, so it's basically a 'File Descriptor Record' without the 'Data chain pointer blocks' followed by the sectors? What is the best way to determine that a file is a V9T9 file? Classic99 does a filename comparison. It's probably not the best way since the filename munging makes that difficult. If you are just trying to differentiate against TIFILES, a TIFILES file always starts with \x7TIFILES, you could check for that and assume otherwise. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 13, 2014 Author Share Posted May 13, 2014 Would there be any security implications? For example, could I examine the HTML/JS code, and determine the URL of your GDR folder on your Google drive? If so, I would presumably have the same read/write permissions as the Javascript applications, so I could presumably delete all your files in your GDR1 folder? It's not the end of the world - they're just TI files - not like it's your bank account info or anything, but it would be annoying! Nothing in the code would reveal any details about your Google account. The URL of the API is https://developers.google.com/drive/v2 in every case. You would have to log in to Google drive if your browser was not already logged in, but this would be done using state of the art security procedures. Quote Link to comment Share on other sites More sharing options...
S1500 Posted May 13, 2014 Share Posted May 13, 2014 I love it. This emulator on a web page is the anti-MESS. Quote Link to comment Share on other sites More sharing options...
Willsy Posted May 13, 2014 Share Posted May 13, 2014 Nothing in the code would reveal any details about your Google account. The URL of the API is https://developers.google.com/drive/v2 in every case. You would have to log in to Google drive if your browser was not already logged in, but this would be done using state of the art security procedures. In that case I'm in! Quote Link to comment Share on other sites More sharing options...
Gazoo Posted May 14, 2014 Share Posted May 14, 2014 I love it. This emulator on a web page is the anti-MESS. ? 1 Quote Link to comment Share on other sites More sharing options...
RobertLM78 Posted May 14, 2014 Share Posted May 14, 2014 (edited) I love it. This emulator on a web page is the anti-MESS. JS99er might be something one day, but it's day of passing up MESS is a ways out. Edited May 14, 2014 by RobertLM78 Quote Link to comment Share on other sites More sharing options...
S1500 Posted May 14, 2014 Share Posted May 14, 2014 JS99er might be something one day, but it's day of passing up MESS is a ways out. True, but I'm not getting an infinite chain of error dialogs when I try to open a disk image. That means a lot to me. Quote Link to comment Share on other sites More sharing options...
RobertLM78 Posted May 14, 2014 Share Posted May 14, 2014 True, but I'm not getting an infinite chain of error dialogs when I try to open a disk image. That means a lot to me.That's odd behaviour, what version of MESS are you using? Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted May 14, 2014 Share Posted May 14, 2014 It definitely has a lower learning curve than MESS does, but I really like both of them. MESS is great when I'm trying to replicate real TI hardware behavior, and JS99er is great for letting my boys play with their beloved TI on the PC when my wife decides they have to get the TI out of the middle of her living room! 1 Quote Link to comment Share on other sites More sharing options...
S1500 Posted May 14, 2014 Share Posted May 14, 2014 That's odd behaviour, what version of MESS are you using? I forgot, it was a couple of years ago. It had a bug where if the filename was in too deep in subdirs, hilarity ensued. Quote Link to comment Share on other sites More sharing options...
RobertLM78 Posted May 14, 2014 Share Posted May 14, 2014 I forgot, it was a couple of years ago. It had a bug where if the filename was in too deep in subdirs, hilarity ensued. I'm sorry to hear that you've had those problems - doesn't sound like fun at all. I've been using 0.15x, and I haven't had any problems like what you describe - but, that said, I don't have deeply buried files either on my emulated TI hard disk either. I think the most deeply buried file is three directories from the root directory. However, I would still give MESS another shot . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.