CX16UserSteveC 38 Posted August 25, 2020 Where are the limitations of the "Try it now" web emulator documented? None of the cc65 applications I've uploaded seem to work with the "Try it now" feature. Quote Share this post Link to post Share on other sites
StephenHorn 292 Posted August 25, 2020 The most typical problems applications have in the web emulator are due to case sensitivity regarding filenames, and files using an extension that is not whitelisted. It is also possible to go astray if you place your executable in a subdirectory within the zip file. I don't think these limitations are specifically documented anymore. Files must use .prg or .seq extensions, and filenames are case-sensitive. There may be a very few other acceptable extensions, but those are the only ones I immediately know are valid. It's easy to mess up the case sensitivity if you originally worked on Windows. The hook in the emulator (as far as r37 is concerned, anyways) does a straight-up byte copy of the filename string without performing any PETSCII/ASCII conversion, so this is something to be aware of if your compiler or assembler is attempting to convert an ASCII string into, say, PETSCII (whether shifted or unshifted). 1 Quote Share this post Link to post Share on other sites
Perifractic 646 Posted August 25, 2020 40 minutes ago, StephenHorn said: The most typical problems applications have in the web emulator are due to case sensitivity regarding filenames, and files using an extension that is not whitelisted. It is also possible to go astray if you place your executable in a subdirectory within the zip file. I don't think these limitations are specifically documented anymore. Files must use .prg or .seq extensions, and filenames are case-sensitive. There may be a very few other acceptable extensions, but those are the only ones I immediately know are valid. It's easy to mess up the case sensitivity if you originally worked on Windows. The hook in the emulator (as far as r37 is concerned, anyways) does a straight-up byte copy of the filename string without performing any PETSCII/ASCII conversion, so this is something to be aware of if your compiler or assembler is attempting to convert an ASCII string into, say, PETSCII (whether shifted or unshifted). @StephenHorn is there anything I can add to the upload page to make it clearer to people what the requirements are? If you wanted to make a little Google Doc I could easily link to that. Quote Share this post Link to post Share on other sites
StephenHorn 292 Posted August 25, 2020 1 minute ago, Perifractic said: @StephenHorn is there anything I can add to the upload page to make it clearer to people what the requirements are? If you wanted to make a little Google Doc I could easily link to that. Well, the best person to write that documentation would probably be the guy who maintains the web emulator. :3 I'm just offering what I know from my own experience, and what I can recall from the handful of other threads that have been troubleshooting problems. Hopefully @SebastianVoges or @MattGrandis can chime in. I thought there was another thread where someone needed to troubleshoot web emulator problems, asides from my own, of course. From the original web emulator thread, it looks like DAT and REL may also be valid extensions, but I haven't personally tried them. Crazy Tetronimoes' issues seemed to be solved when someone converted the BASIC source code that was originally uploaded into an encoded BASIC file. I could collate this stuff into a Google doc, sure. Might make more sense to make it a github wiki page, though, on the web emulator's repo. Quote Share this post Link to post Share on other sites
Perifractic 646 Posted August 25, 2020 Apologies @StephenHorn, I saw your reply about the web emulator and in my haste mistook your username for @SebastianVoges! The question was intended for Sebastian in either case. 1 Quote Share this post Link to post Share on other sites
CX16UserSteveC 38 Posted August 26, 2020 (edited) 18 hours ago, StephenHorn said: The most typical problems applications have in the web emulator are due to case sensitivity regarding filenames, and files using an extension that is not whitelisted. It is also possible to go astray if you place your executable in a subdirectory within the zip file. I don't think these limitations are specifically documented anymore. Files must use .prg or .seq extensions, and filenames are case-sensitive. There may be a very few other acceptable extensions, but those are the only ones I immediately know are valid. It's easy to mess up the case sensitivity if you originally worked on Windows. The hook in the emulator (as far as r37 is concerned, anyways) does a straight-up byte copy of the filename string without performing any PETSCII/ASCII conversion, so this is something to be aware of if your compiler or assembler is attempting to convert an ASCII string into, say, PETSCII (whether shifted or unshifted). My cc65 application file names are currently all upper case but with no extension. My programs can be loaded into the local emulator using the -prg option using their current file names, and so I thought it was only necessary to specify the file name for the web emulator as well. I always use upper case for my file names in case the user chooses to start the emulator first and then load the application via the Basic LOAD command. Should I use the .prg or .seq extension, and should these be .PRG or .SEQ when added to my file names? Also, I have no zip file. Is a zip file required? Edited August 26, 2020 by CX16UserSteveC Added question on zip file. Quote Share this post Link to post Share on other sites
StephenHorn 292 Posted August 26, 2020 I'm not sure what the answers are to some of those questions. If you rename the application to have a .prg extension, it might work to upload that. If not, then in addition to renaming the .prg, you'll need to pack it into a zipfile. I would suggest using .prg instead of .seq for your program. I don't know if the extension will make a difference eventually, but I don't think it makes a difference in r37. My understanding, though, is that there is some subtle difference between how C64s treated .prg files and .seq files, and cc65 normally outputs .prg files. (There are ways to override cc65's behavior, but I assume you're not doing that.) Quote Share this post Link to post Share on other sites
MattGrandis 146 Posted August 26, 2020 @CX16UserSteveCPlease upload or link to the file(s) in question so I can have a look. Quote Share this post Link to post Share on other sites
CX16UserSteveC 38 Posted August 26, 2020 12 minutes ago, StephenHorn said: I'm not sure what the answers are to some of those questions. If you rename the application to have a .prg extension, it might work to upload that. If not, then in addition to renaming the .prg, you'll need to pack it into a zipfile. I would suggest using .prg instead of .seq for your program. I don't know if the extension will make a difference eventually, but I don't think it makes a difference in r37. My understanding, though, is that there is some subtle difference between how C64s treated .prg files and .seq files, and cc65 normally outputs .prg files. (There are ways to override cc65's behavior, but I assume you're not doing that.) Thanks for your feedback. I added the .PRG extension to my file names and now my cc65 applications seem to work (at least to some degree) with the web emulator. Quote Share this post Link to post Share on other sites
CX16UserSteveC 38 Posted August 26, 2020 10 minutes ago, MattGrandis said: @CX16UserSteveCPlease upload or link to the file(s) in question so I can have a look. Thanks for your offer to take a look but I added the .PRG extension to my file names and now all of my cc65 applications seem to work (at least to some degree) with the web emulator. My currently uploaded cc65 applications can all be downloaded (or tested with the "try it now" feature) from the Graphics Apps folder. 3 Quote Share this post Link to post Share on other sites
SebastianVoges 37 Posted August 27, 2020 Sorry, late to reply here, but it looks like everything got covered I think it would be good to list the supported file extensions on the the upload page if possible. And/or a link to a document/sticky forum post. On the web-emulator I can be more pro-active and put out a visible dialog/warning if the webemulator is not able to load/find a file at startup, at least it will be easier to pinpoint what went wrong. (Right now it will log it in the javascript console, but I assume most people will never look at it) Lastly i looked a bit into the case sensitivity issue from the web emulators perspective. I could make the WebEmulators file-system case-insensitive, so it would work more like as it does on Windows. I will give it a try I probably can make those changes over the weekend and also update the webemulator to the latest r38 release. Cheers, Sebastian Quote Share this post Link to post Share on other sites
Cyber 125 Posted August 27, 2020 Right now it will log it in the javascript console, but I assume most people will never look at itNow I will! ) I could make the WebEmulators file-system case-insensitive, so it would work more like as it does on Windows.The important thing is how the casing work on real X16. Would be logical to have same casing on real hardware, web emulator and desktop emulator. Quote Share this post Link to post Share on other sites
Perifractic 646 Posted August 27, 2020 4 hours ago, SebastianVoges said: Sorry, late to reply here, but it looks like everything got covered I think it would be good to list the supported file extensions on the the upload page if possible. And/or a link to a document/sticky forum post. On the web-emulator I can be more pro-active and put out a visible dialog/warning if the webemulator is not able to load/find a file at startup, at least it will be easier to pinpoint what went wrong. (Right now it will log it in the javascript console, but I assume most people will never look at it) Lastly i looked a bit into the case sensitivity issue from the web emulators perspective. I could make the WebEmulators file-system case-insensitive, so it would work more like as it does on Windows. I will give it a try I probably can make those changes over the weekend and also update the webemulator to the latest r38 release. Cheers, Sebastian Sounds great, thanks Sebastian. If you wanted to make a "how to" post that you/we could keep updated and post it at https://www.commanderx16.com/forum/index.php?/forum/27-x16-how-tos/ that would be great, and we can link to it as part of the upload process. Thanks in advance. Quote Share this post Link to post Share on other sites