prb28 / vscode-amiga-assembly

Amiga Assembly extension for Visual Studio Code
GNU General Public License v3.0
178 stars 12 forks source link

Fresh install and issues with winuae #196

Closed Bippym closed 2 years ago

Bippym commented 2 years ago

So I have completed a fresh install of v1.14. I have assigned my roms folder for winuae. Whenever I run winuae I get an error saying there is no disk present in DH0.

This is with both a500 and a1200 quickstart configs.

The installed version of WinUAE is 4.9.0

I haven't made any changes. FSUAE seems to work as intended

prb28 commented 2 years ago

You already found that it was discussed here : http://eab.abime.net/showthread.php?p=1527216#post1527216. The problem is the use of you standard winuae configuration in replacement of the on needed for the extensions.

You'll have to change the launch parameters, in your .vscode/launch.json try to add these options :

"-f",
"./default.uae",

The result will look like :


        {
          "type": "winuae",
          "request": "launch",
          "name": "WinUAE Debug",
          "stopOnEntry": true,
          "serverName": "localhost",
          "serverPort": 2345,
          "startEmulator": true,
          "trace": false,
          "exceptionMask": 8188,
          "emulatorStartDelay": 1500,
          "emulator": "${config:amiga-assembly.binDir}/winuae.exe",
          "emulatorWorkingDir": "${config:amiga-assembly.binDir}",
          "program": "${workspaceFolder}/uae/dh0/gencop",
          "options": [
                      "-f",
                      "./default.uae",
                      "-s",
                      "quickstart=a500,1",
                      "-s",
                      "filesystem=rw,dh0:${workspaceFolder}/uae/dh0",
                      "-s",
                      "debugging_trigger=SYS:gencop",
                      "-s",
                      "debugging_features=gdbserver"
                      ],
          "preLaunchTask": "amigaassembly: build"
        }
phaze101 commented 2 years ago

@prb28 I have seen this personally on Windows 11 WinUAE is behaving strangely. @Bippym shared his screen with me to see the issue. There is definitely something weird going on. The extension seems fine but not the WinUAE that gets installed with the extension. We tested Ver 1.0 of the extension and it behaved the same on Windows 11. This was done on a fresh install of Windows and fresh install of the extension.

prb28 commented 2 years ago

Ok, I have to install w11 in a vm to try to see and debug it.

Bippym commented 2 years ago

(copied from eab)

Okay so...

I spent about an hour with phaze101 screen sharing and the issue persisted. I have made a video to show the issues, and had an idea .. I decided to run vscode as admin (that makes no difference) and then I created a new project and put it on the desktop... That worked.. This was recorded, here is the link

[url]https://youtu.be/m-HKBwUVVaI[/url]

I have since run vscode not in admin mode and can confirm the project in users/desktop works and c:\dev\ does not. Seems to be a windows 11 permissions issue

prb28 commented 2 years ago

@Bippym Thanks for this video. Yes I agree with you, maybe there is some security limitation with w11 and the C:/ drive. It also can be this "../../../.." path that is too long. When you use your desktop you have a nearest path so maybe it stays under the 256 chars. (I don't know why winuae does this, certainly a question for Toni). You can try to enable long paths : https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd I've started a download of w11 to create a vm and try it. But it will take me some time.

prb28 commented 2 years ago

https://www.thewindowsclub.com/how-to-enable-or-disable-win32-long-paths-in-windows-11-10

Bippym commented 2 years ago

My path is

C:/development/test/

Definitely not a long path.

prb28 commented 2 years ago

Yes I agree, but I was wondering if winuae, as you noted, uses relative paths. From here:

c:\Users\Bippy\AppData\Roaming\Code\User\globalStorage\prb28.amiga-assembly\file-downloader-downloads\vscode-amiga-assembly-binaries-@-1.1.4\vscode-amiga-assembly-binaries-windows_x64\winuae.exe

You will have :

c:\Users\Bippy\AppData\Roaming\Code\User\globalStorage\prb28.amiga-assembly\file-downloader-downloads\vscode-amiga-assembly-binaries-@-1.1.4\vscode-amiga-assembly-binaries-windows_x64\../../../../../../../../../../../development/test/uae\dh0\s\startup-sequence

It is 261 characters.

Bippym commented 2 years ago

Yeah, i follow now. Worth asking Toni

prb28 commented 2 years ago

I've just finished my vm in windows 11, I did reproduce it with the path "C:/development/test/". Modifying the regexp to active the long path as in page: https://www.thewindowsclub.com/how-to-enable-or-disable-win32-long-paths-in-windows-11-10 resolves the issue.

Folder: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem key: LongPathsEnabled Value: 1

prb28 commented 2 years ago

The worst thing about this .... it that I already had it in the FAQ (I feel dumb...). https://github.com/prb28/vscode-amiga-assembly/wiki/FAQ#the-emulator-starts-but-it-does-not-boot

Bippym commented 2 years ago

That's great. Is it possible to make thr registry change when installing the extension?

prb28 commented 2 years ago

Maybe, but I won't mess with the user registry when he uses the extension. So maybe I'll shorten a bit the download path but it's just hiding the issue a bit. The real solution would come from winuae binary.