chunkypixel / atari-dev-studio

Homebrew game creation for the Atari 8-bit consoles (VS Code Extension)
http://atariage.com/forums/topic/290365-atari-dev-studio-for-homebrew-development-release/
GNU General Public License v3.0
77 stars 8 forks source link

M1 Stella #51

Open mengstr opened 1 month ago

mengstr commented 1 month ago

It was quite a few years ago since I played around with this project and started to write 2600 games, and I felt it was time to give it a go again.

The readme is a bit ambiguous about whether I need to use the X86 version of code or not as you're mentioning that "the current dev stack should now have compatibility with the M1".

So I tried running it as-is on my machine but Stella failed to start. It seems like that theX86-only version is the one being installed with this extension. After downloading the M1+Intel version directly from Stella and copying the Stella.app into /Users/mats/.vscode/extensions/chunkypixel.atari-dev-studio-0.9.6/out/bin/emulators/stella/darwin/arm64/ it all works just fine.

It would probably be a good thing to use that version in the ADS extension - unless there's some other issue preventing that.

Now.... If I only could finish one of the games I started coding all those years ago ;-)

chunkypixel commented 1 month ago

Hey Mats - welcome back!

Looks like I had a reference?? file to redirect from the arm64 to x64 folder - I've just replaced that with a full copy of the M1+Intel version as you suggested. I've left the x64 folder as well as I think older users of MacOS will require that right?

Look out for a new release shortly đź‘Ť

Good luck with your Dev!

mengstr commented 1 month ago

The Stella for Mac is a universal binary so it should work on both platforms, but you probably shouldn't have the x86/arm -folders then. Just a Darwin folder.

Screenshot 2024-08-06 at 08 29 58

But I now uninstalled and removed all old chunky pixel-folders before installing the latest release and there's still the same problem as previously.

- failed to set chmod permissions: ENOTDIR: not a directory, chmod '/Users/mats/.vscode/extensions/chunkypixel.atari-dev-studio-0.9.9/out/bin/emulators/stella/darwin/arm64/Stella.app'
Launching Stella emulator...
The application /Users/mats/.vscode/extensions/chunkypixel.atari-dev-studio-0.9.9/out/bin/emulators/stella/darwin/arm64/Stella.app cannot be opened for an unexpected reason, error=Error Domain=NSCocoaErrorDomain Code=256 "The file “Stella.app” couldn’t be opened." UserInfo={NSURL=file:///Users/mats/.vscode/extensions/chunkypixel.atari-dev-studio-0.9.9/out/bin/emulators/stella/darwin/arm64/Stella.app, NSFilePath=/Users/mats/.vscode/extensions/chunkypixel.atari-dev-studio-0.9.9/out/bin/emulators/stella/darwin/arm64/Stella.app, NSUnderlyingError=0x145619d20 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"}}

Exit code: 1

It was 0.9.9 that got installed.

mats@Matss-MacBook-Pro darwin % cd /Users/mats/.vscode/extensions/chunkypixel.atari-dev-studio-0.9.9/out/bin/emulators/stella/darwin/
mats@Matss-MacBook-Pro darwin % ls -la
total 8
drwxr-xr-x  4 mats  staff  128 Aug  6 08:33 .
drwxr-xr-x  5 mats  staff  160 Aug  6 08:33 ..
-rw-r--r--  1 mats  staff    3 Aug  6 08:33 arm64
drwxr-xr-x  3 mats  staff   96 Aug  6 08:33 x64
mats@Matss-MacBook-Pro darwin % cat arm64
x64%                                                                                                                                                                
mats@Matss-MacBook-Pro darwin % 

But maybe that's not the version with the fix that you just made?

chunkypixel commented 1 month ago

Hi Mats,

I still have the version to upload - 0.9.9 was essentially 0.9.7/0.9.8 due to uploading issues to the marketplace.

I think I'll put your suggestion into this and remove the hardware designation (x64/arm64) for Mac. I'll attach a test build for you to try out shortly.

chunkypixel commented 1 month ago

Actually I just released v0.10.0 so install that via VS Code and see how it works đź‘Ś

mengstr commented 1 month ago

I just tried it and it kinda works. It complains about needing a debugger for Dasm and suggest that I install "Dash macro assembler for VSCode" by Zen Fernando. After doing that my code assembles and Stella starts. The previous version worked as-is as long as I had copied in Stella to the arm folder, so I think that something is slightly off.

It also seems like the uninstaller dosen't remove the chunkypixel folders. I would have imagined that the uninstall process was a part of the core VScode and not something that was left to the extension itself to handle.

Screenshot 2024-08-07 at 08 29 55 Screenshot 2024-08-07 at 08 23 30 Screenshot 2024-08-07 at 08 21 44
chunkypixel commented 1 month ago

Can I ask are you doing assembly (via dasm) or bB? And I'm assuming your process didn't change between 0.9.6 and 0.10.0?

mengstr commented 1 month ago

Never mind ^__^ I guess it was just a fluke or a PEBCAK. I uninstalled, deleted folders and restarted vs code and reinstalled ADS and it works just fine. But! While writing this I tested some more, and I think I found the PEBCAK or an actual bug in VS Code. If a have the editor/code frame active, then it works. If I instead have the OUTPUT or TERMINAL fram active I get the popup saying that I don't have a dasm extension. I wonder if it's the same with other extensions as well...

Screenshot 2024-08-08 at 07 08 09

Assembly. When having the editor-tab with the asm source open I simply do a F5 for "Start Debugging" or ^F5 for "Run without debugging".

Im pretty sure I previously didn't have either the dasm extension nor a really old version of atari-dev-studio installed. And the version I downloaded a day or two ago didn't complain about the dasm being unavailable.

chunkypixel commented 1 month ago

Actually I do see similar issues with the language extension notifications in the scenarios you describe. I try and activate the currently selected tab which sometimes might be the console windows. I might look at reworking this to track the last compiled tab (or try and find the active document rather than the console - it's annoying at times - a bit like the save/compile issue I just fixed.