Jump to content

freetz

Members
  • Posts

    446
  • Joined

  • Last visited

Recent Profile Visitors

6,115 profile views

freetz's Achievements

Moonsweeper

Moonsweeper (5/9)

486

Reputation

  1. Because that's what you define under "input" in the config. Read about the new settings possibilities so you can do it without the config.
  2. On my system, it spawns /bin/sh - which is not the same as bash. It clearly says that: /bin/sh: ~/altirra.sh: No such file or directory You are right that /bin/sh does not support ~ to refer to the home directory. /bin/bash would do it that way I think from when it was invented, that's why I was wondering. I'm also surprised why spawn() would use a non-default shell (on MacOS that would be zsh) and instead uses /bin/sh. Maybe because that is available on every system, no matter how old? In any case, good to know about this caveat!
  3. I don't know what you mean with the shells you mention: The default shell in MacOS is zsh. sh and bash are two quite different shells, and no matter what the default shell might be, if you hashbang the shell of your choice at the beginning of the script, that one will be taken no matter what. I'm still used to bash, so that's what you can find in my altirra.sh, and using the tilde to refer to the home directory works fine here on MacOS Sonoma. In the standard terminal of VSC I can also open a terminal which will give me zsh, and doing ls ~ there will give me the contents of my home directory. So what exactly isn't working for you, and where?
  4. Cool, thanks a lot! So just for the record, this is how altirra.sh will now have to look like (cleaned it up a bit by having the paths right at the beginning): #!/bin/bash WINE_EXEC=/opt/homebrew/bin/wine64 ALTIRRA_EXEC=~/Downloads/Altirra-4.01/Altirra64.exe filename="${2//\//\\}" set -- "$1" "$filename" "${@:3}" WINEDEBUG=-all $WINE_EXEC $ALTIRRA_EXEC $@ Feel free to add this to your repo, if this might help Mac and Linux users. Thanks again for being so responsive, @RetroCoder, programming for the Atari has become even more fun with your extension :)! P.S.: Let me know if you need me to build any mac binaries, happy to help if possible. P.P.S.: If Atasm and the other compilers are also hosted on GitHub, there is a way to use GitHub workflows to regularly pull the most recent versions into your repository and then have them compiled as binaries, provided the compiler exists under Ubuntu, I think, as this is the OS that the workflows run under...
  5. I managed to find a solution using the shell, so my altirra.sh now looks like this: #!/bin/bash filename="${3//\//\\}" set -- "${@:1:2}" "$filename" "${@:4}" WINEDEBUG=-all /opt/homebrew/bin/wine64 ~/Downloads/Altirra-4.01/Altirra64.exe $@ So there's no need for you to make any further changes, because I was wrong in assuming that not every Altirra option could be configured via the extension – all the options are in fact coming from the extension (such as /pal). The only thing where my script would have to be adjusted is if the filename is not on third position, currently for me it's /pal /run "out/WozMon.xex" /singleinstance I don't know if this can change or if it would be easier to always put the /run "..." at the very beginning, then the filename would always be on position 2. This would be the only benefit to do the slash-conversion on the level of the extension as this uncertainty would then be overcome, preventing that Altirra gets confused because my script suddenly changes a worng parameter. But if it's clear that no matter what, the filename will always be on position 3 (as it is in my example), then there is also no issue at all.
  6. Ok, some interesting findings about wine and pathnames in command line arguments: Wine requires backslashes instead of slashes, even on Unix-like systems such as Linux and MacOS. So it was probably not Altirra's problem that I had to do all this scripting on the previous page in order to change to the output directory and then call Altirra just with the filename.xex only, it seems to be a wine thing. Because if I call Altirra with a filename including the full path, but have the slashes converted to (simple, single) backslashes, it works perfectly fine also with any kind of filename with a preceding full path. @RetroCoder: Since the default output is the "out" directory underneath the code directory (which is great and should stay that way), the question is whether you could detect what kind of system your extension runs on, and if it is a non-Windows system, replace all instances of a forward slash (as a path delimiter) with a backslash (as it would be on Windows)? So that "out/WozMon.asm" becomes "out\Wozmon.asm"? If so, then my whole workaround with the altirra.sh script above would no longer be necessary and everything could be just configured via your extension's settings, which would be much more transparent. If not, I'd have to find a way how to replace all slashes inside the $@ array of command line arguments. That is unfortunately not as easy as in Perl, for example, but would probably be somehow doable. But as I said, if you could do this already on the level of the extension, it would be much easier for everyone...
  7. Wow, that's awesome! Thanks for adding this so quickly - and just compiling the current editor file is a really great idea! Will try it out right away :)!
  8. Awesome, thanks! And if I may ask for one more thing: Would it be possible to add a configuration where the most recently edited file would be built/run with DEBUG options? In that case, I could just put a number of .asm files that I'm working on in one folder, and whichever is edited/saved most recently will be run with Altirra?
  9. @RetroCoder: Thanks again for this great plugin, would it be possible to change the behaviour of the "input" attribute in such a way that if it's left empty, then the first .asm file found in the directory will be used? In that case, I would not have to adjust the atasm-build.json file for every folder I work in (which usually just has one .asm file). And to expand on this even further: If there is no atasm-build.json file in a directory, the plugin just uses these default values, so you could completely do without this config. At least for me, I never use any other configuration than the default one above. This would make working with a larger number of already existing projects much easier. Again, thanks for this!
  10. You're welcome. Also note that the WINEDEBUG=-all removes countless warnings relating to graphic output etc. that I decided to remove that. In case you need to debug something, you may want to remove that part of the line.
  11. You are right, I had to adjust altirra.sh in the meantime because wine in combination with Altirra would only accept the xex executable without any path. So I had to change altirra.sh to this: #!/bin/bash directory=${3%.xex} cd ~/Documents/PlatformIO/Projects/$directory WINEDEBUG=-all /opt/homebrew/bin/wine64 ~/Downloads/Altirra-4.01/Altirra64.exe $@ Again, adjust the path to Altirra64.exe (and possibly wine64). And yes, what you describe with the debugger is the same for me. Not having to shift muscle-memory would be nice, especially as the icons are small and easy to miss. If anyone knows how to start run/debug by just using one key(-combination), that would be great.
  12. Thanks for listing 1K RainboX, but there is another entry "Rainbox" which can be removed since it is the same game. In the video, I call it "RainboX", but the official title is "1K RainboX".
  13. ...I've also made a short YouTube video where you can see the game in action:
×
×
  • Create New...