Updated Web Emulator
-
- Posts: 913
- Joined: Tue Apr 28, 2020 2:45 am
Updated Web Emulator
If you are using cc65, the default behavior is to remap string literals to PETSCII, so the cases are effectively reversed from ASCII. If you put capital letters in source assembly, the resulting machine code will use codes that are in the graphics range for the default character set. So, unless you put in specific character mapping directives in your code, use all lowercase for filenames in assembly. You can always double-check what is generated by using -l to generate a machine code listing. Then, you need to have all actual filenames in all caps so that they can be loaded successfully by the kernal.
Updated Web Emulator
Yes, thats how I did it. Lower case in source code, upper case on disk. This is really strange... Hm... I compose the filenames with sprintf(), maybe that's an issue?
In any case it would be nice to have a test function for the "try now" feature. Like upload a zip file for testing without showing it on the download page.
- StephenHorn
- Posts: 565
- Joined: Tue Apr 28, 2020 12:00 am
- Contact:
Updated Web Emulator
The lesson I learned from my own adventures in case-sensitivity was to just put the filenames in the source file in same case as the filenames will exist on disk or in the zip. The reason being that the emulator's hooks for LOAD() and SAVE() don't bother converting between PETSCII and ASCII, they just take the binary filename in memory at face value and pass it straight to the OS functions.
Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
-
- Posts: 913
- Joined: Tue Apr 28, 2020 2:45 am
Updated Web Emulator
3 hours ago, AndyMt said:
Yes, thats how I did it. Lower case in source code, upper case on disk. This is really strange... Hm... I compose the filenames with sprintf(), maybe that's an issue?
Ah, you are using C. I'm not sure how cc65 handles ASCII character literals in that context. You may have to use integer character values for consistency, which sucks. PETSCII is fun when you are playing around in BASIC, but it's a pain when you are cross-developing on an ASCII/Unicode platform. You may need to experiment with disassembling the compiled code and see how it handles string and character literals in different contexts.
Updated Web Emulator
In my code (also C) I've used lower case in source code (string literals, not composed with sprintf()), upper case on disk. This has worked for me on Linux and (briefly) in setting up a new laptop w/Windows 10 to support X16 development.
-
- Posts: 511
- Joined: Sat Apr 25, 2020 4:53 pm
Updated Web Emulator
4 hours ago, AndyMt said:
In any case it would be nice to have a test function for the "try now" feature. Like upload a zip file for testing without showing it on the download page.
Given that an upload can be edited, updated, or deleted after going live if it doesn't work to your liking, I don't think we can devote coding time/money to adding a "Test Try It Now" feature, sorry.
Updated Web Emulator
3 hours ago, Perifractic said:
Given that an upload can be edited, updated, or deleted after going live if it doesn't work to your liking, I don't think we can devote coding time/money to adding a "Test Try It Now" feature, sorry.
Ok, I understand ? that. But "delete" for a specific version I didn't find. If you look at the change log for Brixx, you'll see what I mean ?.
-
- Posts: 511
- Joined: Sat Apr 25, 2020 4:53 pm
Updated Web Emulator
Ah ok that's more specific. At this stage I would just suggest leaving them there. Honestly I do not foresee many people digging down to earlier revisions. 99% of people will just download the latest one.Ok, I understand [emoji846] that. But "delete" for a specific version I didn't find. If you look at the change log for Brixx, you'll see what I mean [emoji6].
Updated Web Emulator
You're probably right. I'll build the webassembly myself and run it on my raspberry. So I can do the pre-testing from there.
Updated Web Emulator
3 hours ago, AndyMt said:
You're probably right. I'll build the webassembly myself and run it on my raspberry. So I can do the pre-testing from there.
Argh - the "emscripten" base for the webassembly doesn't build on 32 bit raspberries ?... Can someone please provide me with the actual web-emulator files:
ex16mu.data x16emu.html x16emu.js x16mu.wasm webassembly/styles.css webassembly/main.js
and maybe what's needed to mimmic the "try now" button?