BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
303 stars 38 forks source link

FS-UAE warp launch? #205

Closed torkildl closed 10 months ago

torkildl commented 1 year ago

I noticed that WinUAE has a warp launch (which I think is skipping hw tests). Would it be possible to get that option also for FS-UAE? It would be very useful oæif it speeds up the debugger startup.

grahambates commented 1 year ago

FS-UAE does (should!) already start in warp mode aka fast-forward, which gets disabled when the Amiga program starts. To confirm that this is working for you, should see this overlay when it's starts up.

image

AFAIK this doesn't skip anything, it just runs fast than realtime. If there's another setting in WinUAE that skips hardware checks that would definitely be worth looking at. Do you have any references for this as I haven't been able to find anything?

torkildl commented 1 year ago

I had the impression that Warp-launch in WinUAE was about the boot sequence ("turbo boot"), and not the emulator speed. Maybe I am mistaken! My only reference is this, from the README: image

grahambates commented 1 year ago

@BartmanAbyss is this a separate feature or is it just referring to starting in warp mode? I don't see any reference to it outside of this project.

grahambates commented 1 year ago

@torkildl are you getting noticably slow startup times? On an A1200 config I get <2 secs delay from FS-UAE opening to the program running. For A500 it's more like 6 secs.

BartmanAbyss commented 1 year ago

Yeah, this is just referring to the starting in warp-mode.

grahambates commented 1 year ago

One possible tip for quicker iteration is that if you're just running your program and not using the debugger, you don't have to restart the emulator each time. If your program quits back to CLI you can just run it again, having updated the exe.

torkildl commented 1 year ago

I get about 6sec on A500. These are good tips! But would it at all be possible to patch the emulator in a way that increases startup speed?

grahambates commented 1 year ago

Yeah all for it if there are any ideas! To be clear though, starting in warp mode already improves matters considerably and this is really more of a feature request for FS-UAE / WinUAE, and not really specific to this extension. The remote debugger connecting doesn't really add noticable delay in addition to the normal startup time in my experience.

All that being said, one idea that comes to mind is snapshots. Perhaps the emulator could start with a snapshot of the state right before the program runs.

BartmanAbyss commented 1 year ago

All that being said, one idea that comes to mind is snapshots. Perhaps the emulator could start with a snapshot of the state right before the program runs.

I'm not sure that would work. Need to get the current filesystem and all. Maybe your PC is just too slow? A faster PC speeds up startup time. I think I change all accuracy settings during bootup to be as relaxed and fast as possible.

BartmanAbyss commented 1 year ago

Are you using AROS or Kickstart? There seems to be a difference in start-up time. Anyways, for reference here are the startup times for my Windows 11, Ryzen 5950X machine: https://user-images.githubusercontent.com/19374186/215106704-a6110705-6046-42fe-8301-d14466d11189.mp4 Seems pretty quick for me..

grahambates commented 1 year ago

To be fair that's a bit quicker than what I see on Mac and I'd suspect that one reason is that FS-UAE has limited options for accuracy so doesn't benefit from the optimisation you mentioned. I tend to use A1200 config for fast iteration.

torkildl commented 1 year ago

I have noticed that kickstart is preferable, but I think the startup time still could be improved. Agree it is an FS-UAE/winUAE-issue and I will open an issue on the FS-UAE repo.

emoon commented 1 year ago

What I did a while ago was to modify FS-UAE so it would boot start with warp mode enable and then from code I would disable to warp mode (so I added a hook inside the emulator that I could call from the emulated code) that way I would get the fastest boot speed, program loading, etc and run directly at normal speed at a specific point in my program.

BartmanAbyss commented 1 year ago

That's exactly the same thing I did ;)