| |
Raistlin
Registered: Mar 2007 Posts: 685 |
VICE - "warp mode" is sometimes super-slow..?
I've noticed that entering Warp Mode on VICE, the results can vary quite a lot and wondered what might be happening. In particular, some of the dot-scroller parts in such as I Love the Cube 100% will run almost at 100% in Warp Mode .. where other parts will run at 800% or so.
I noticed that the code has a load of ANE instructions .. so maybe there's some problem with those?
Just thought I'd ask. I hope this is the correct forum category.
(I'm running the Windows build BTW, 3.7.1) |
|
| |
Jetboy
Registered: Jul 2006 Posts: 338 |
it runs 80% for me without warp mode :) |
| |
Gordian
Registered: May 2022 Posts: 87 |
Warp mode depends on "Enable sound playback" option for sure. It's much more faster when sound is disabled.
Maybe the part you mentioned uses SID quite intensively. |
| |
spider-j
Registered: Oct 2004 Posts: 498 |
Quoting RaistlinI've noticed that entering Warp Mode on VICE, the results can vary quite a lot and wondered what might be happening. In particular, some of the dot-scroller parts in such as I Love the Cube 100% will run almost at 100% in Warp Mode .. where other parts will run at 800% or so.
Here the dot scroller part goes down a bit (~650% instead of 750%-850% like the rest), but I do use recent trunk (VICE 3.8 SVN r45251) and have compiled it myself running on Linux.
Maybe there's less optimization with generic builds or newer VICE version perfoms better or for some reason Windows perform poorly at that part.
In general when it comes to VICE: if I encounter any "problems" I make sure to get the most current trunk version first to make sure I don't find anything that VICE team had addressed already. Afair there are nightly Windows builds somewhere to be found. |
| |
iAN CooG
Registered: May 2002 Posts: 3201 |
use older Vice 3.2 instead of the new ones if you want a real warp mode. |
| |
Jetboy
Registered: Jul 2006 Posts: 338 |
Quote: Warp mode depends on "Enable sound playback" option for sure. It's much more faster when sound is disabled.
Maybe the part you mentioned uses SID quite intensively.
Not the case here. I turned off sound, and it slows down in the same spot.
It's not ANE instruction most probably, as i tried to run:
c000 sei
c001 ane #$80
c003 jmp *c001
and it runs at full speed.
VICE 3.6.1 here on win10 |
| |
jab
Registered: Apr 2020 Posts: 20 |
Quote: I've noticed that entering Warp Mode on VICE, the results can vary quite a lot and wondered what might be happening. In particular, some of the dot-scroller parts in such as I Love the Cube 100% will run almost at 100% in Warp Mode .. where other parts will run at 800% or so.
I noticed that the code has a load of ANE instructions .. so maybe there's some problem with those?
Just thought I'd ask. I hope this is the correct forum category.
(I'm running the Windows build BTW, 3.7.1)
Quoting Raistlin(I'm running the Windows build BTW, 3.7.1)
Generally speaking, I understand there are sometimes reasons™ to use older versions of VICE, but is it really too much trouble to at least try it with the most recent one, before bringing up an issue? It could have been fixed already.
...but in this case seems it's not. With the Windows 3.8 build the CPU meter drops from around 600% to 40% on my machine. Turning warp mode off at that point returns to 100%. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
Those things must be genuine windows problems, warp works just fine for me :)
(also make sure to use the exact same settings when comparing those numbers, else it makes even less sense)
Quote:Warp mode depends on "Enable sound playback" option for sure. It's much more faster when sound is disabled.
It used to do this in older releases, it doesn't do this anymore in newer releases, as that broke certain things (in particular the testbench).
Quote:Generally speaking, I understand there are sometimes reasons™ to use older versions of VICE, but is it really too much trouble to at least try it with the most recent one, before bringing up an issue? It could have been fixed already.
If there are reasons to use 3.7.1 over a recent one then we definitely want to hear them - because there shouldn't be any. For coding, you really want to use the head revision in all cases. |
| |
Gordian
Registered: May 2022 Posts: 87 |
Quoting chatGPZ
Quote:Warp mode depends on "Enable sound playback" option for sure. It's much more faster when sound is disabled.
It used to do this in older releases, it doesn't do this anymore in newer releases, as that broke certain things (in particular the testbench).
Is it intended that uncheck "Enable sound playback" disables emulating SID entirely? I've noticed that random number generator based on $D41B doesn't work while sound is disabled. |
| |
tlr
Registered: Sep 2003 Posts: 1791 |
Quoting GordianIs it intended that uncheck "Enable sound playback" disables emulating SID entirely? I've noticed that random number generator based on $D41B doesn't work while sound is disabled.
Of course. The random number generator is part of the SID emulation. The same happens if you pull the SID from a c64. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
I should have been more precise: in the past warpmode did disable some things which DO change the emulation (besides running faster of course) - on of them was that it disabled the SID alltogether (which produces problems with programs that require SID emulation, obviously). It does not do that anymore for a while. So yes, if you manually disable the SID, then warp will be faster. The same is true for a few other things, some of which may or may not be enabled by default. |
| |
hedning
Registered: Mar 2009 Posts: 4732 |
<Post edited by hedning on 28/7-2024 19:30>
Vice 2.4 <3 Best ever. |
| |
Gordian
Registered: May 2022 Posts: 87 |
Quoting tlrQuoting GordianIs it intended that uncheck "Enable sound playback" disables emulating SID entirely? I've noticed that random number generator based on $D41B doesn't work while sound is disabled.
Of course. The random number generator is part of the SID emulation. The same happens if you pull the SID from a c64.
Really?:)
I was asking about what the option does or should do. Because it may work as a mute or completely disabling SID emulation.
Now I can think it was intentional - maybe for faster warp, may for testing without SID. |
| |
Raistlin
Registered: Mar 2007 Posts: 685 |
Quote: I should have been more precise: in the past warpmode did disable some things which DO change the emulation (besides running faster of course) - on of them was that it disabled the SID alltogether (which produces problems with programs that require SID emulation, obviously). It does not do that anymore for a while. So yes, if you manually disable the SID, then warp will be faster. The same is true for a few other things, some of which may or may not be enabled by default.
I'm running a lot of releases lately while updating things on C64GFX.. and have had a few releases where if I enable Warp Mode, the release will crash. Not using Warp Mode, it works fine. As my backlog's huge I've never really stopped to look into it further - sorry - but I'd say that there's -something- happening with Warp on Windows that is untoward.....
And that Warp Mode seems to gradually get slower on certain demo parts makes me think that there's something quite "nasty" happening. |
| |
tlr
Registered: Sep 2003 Posts: 1791 |
Quoting RaistlinI'm running a lot of releases lately while updating things on C64GFX.. and have had a few releases where if I enable Warp Mode, the release will crash. Not using Warp Mode, it works fine. As my backlog's huge I've never really stopped to look into it further - sorry - but I'd say that there's -something- happening with Warp on Windows that is untoward.....
And that Warp Mode seems to gradually get slower on certain demo parts makes me think that there's something quite "nasty" happening.
Sounds really weird! I never saw anything like that when running regression tests in warp for quite long durations (Ubuntu Linux).
If you have suboptimal thermal solution, like a typical 13” laptop, it could in theory be CPU core throttling you are seeing. |
| |
Jetboy
Registered: Jul 2006 Posts: 338 |
Quoting tlrIf you have suboptimal thermal solution, like a typical 13” laptop, it could in theory be CPU core throttling you are seeing.
That is not it. I'm sure. Those dot scrolls are really slowing down the emulation. I can normally run a few instances of vice and it runs fine in pararell, each at 100% speed.
I would expect if there is a lot of code running on the drive, and c64it might slow down, but not to a crawl.
@Raistlin if you find some more prods with similar behaviour, please list them here. |
| |
algorithm
Registered: May 2002 Posts: 705 |
Tried the dot parts in vice (windows) 3.8 r45202 on zen3 (5800h) no thermal throttling. 80% speed even with warp set to off. No other demo part i have tried goes under 100% apart from this dot scroller part |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
What happens is that it writs a line to the log on each ANE ... in the settings, try setting "log to stdout" and see if that changes anything. (this was just recently fixed so maybe has a different effect in older VICE)
Quote:I'm running a lot of releases lately while updating things on C64GFX.. and have had a few releases where if I enable Warp Mode, the release will crash. Not using Warp Mode, it works fine. As my backlog's huge I've never really stopped to look into it further - sorry - but I'd say that there's -something- happening with Warp on Windows that is untoward.....
It would help to know what releases those are, obviously :) |
| |
algorithm
Registered: May 2002 Posts: 705 |
Quote: What happens is that it writs a line to the log on each ANE ... in the settings, try setting "log to stdout" and see if that changes anything. (this was just recently fixed so maybe has a different effect in older VICE)
Quote:I'm running a lot of releases lately while updating things on C64GFX.. and have had a few releases where if I enable Warp Mode, the release will crash. Not using Warp Mode, it works fine. As my backlog's huge I've never really stopped to look into it further - sorry - but I'd say that there's -something- happening with Warp on Windows that is untoward.....
It would help to know what releases those are, obviously :)
That fixed it (setting std out) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
That's crazy... |
| |
Raistlin
Registered: Mar 2007 Posts: 685 |
Quote: That fixed it (setting std out)
Ahhhh, nice! So are we saying this is fixed on the latest nightly build? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
Something related to that setting was fixed, not something related to the slowdown :D |
| |
Jetboy
Registered: Jul 2006 Posts: 338 |
Quoting chatGPZWhat happens is that it writs a line to the log on each ANE ... in the settings, try setting "log to stdout" and see if that changes anything.
Sorry for a stupid question. Where is that setting in settings? Coz i can't find it. Thanks in advance. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
Host->Environment->VICE log file |
| |
Raistlin
Registered: Mar 2007 Posts: 685 |
Quote: Host->Environment->VICE log file
Is that just on the Head version? On 3.7.1 Windows, I don't see that. Under Host I just have: Autostart, Hotkeys, Monitor, Netplay, Snapshot/event/..., Current directory, CPU Jam action. |
| |
iAN CooG
Registered: May 2002 Posts: 3201 |
in my gtkvice 3.7.1 is there as 2nd to last option between "Snapshot/event/media recording" and "CPU JAM action".
Maybe take the occasion to upgrade to VICE 3.8 |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
Try r45253 from here (when it shows up in 15 minutes or so).
The actual problem in that demo was that it uses ANE so often, the warnings that went into the log just was too much :) So these are disabled now by default, which fixes that part (GUI options for this coming up later).
And while at it, i added an option that allows to (optionally) skip the soundchip emulation(s) in warp mode. Right now use "-soundwarpmode 0" on the commandline (or resset "SoundEmulateOnWarp" "0" in the monitor) and then save settings. This will considerably speed up warp mode at the cost of some (little) compatibility :) (again: GUI options for this coming up later).
It'd be interesting to know if there are still any releases which show unusual behaviour like this (with r45253 or later that is) |
| |
Exile
Registered: Dec 2002 Posts: 58 |
I used my old pc first with a 6 core amd phenom 3.2ghz and it warped 3000x faster, but with my intel quadcore laptop only 400x faster. Could that be it? AMD or Intel? |
| |
spider-j
Registered: Oct 2004 Posts: 498 |
@Exile: ChadGPZ will know better, but I guess VICE is probably still very much "single threaded" (maybe 2?!?):
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
That is very much true for the SDL port - GTK is multithreaded though ;) |
| |
Martin Piper
Registered: Nov 2007 Posts: 726 |
Isn't ANE highly unstable anyway? |
| |
spider-j
Registered: Oct 2004 Posts: 498 |
Quoting chatGPZThat is very much true for the SDL port - GTK is multithreaded though ;)
WAT? As a SDL fan I just can say: Nooooooooooooooooooooooo! XD |
| |
tlr
Registered: Sep 2003 Posts: 1791 |
Quoting Martin PiperIsn't ANE highly unstable anyway?
The "magic" constant of ANE #<imm> and LAX #<imm> is indeed unstable but there are conditions (values) where the constant does not influence the result. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
That demo falls flat if the constant isnt at least very similar to 0xee though, so it will not work properly on all C64s :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
So noone bothered to test r45253 eh? |
| |
Jetboy
Registered: Jul 2006 Posts: 338 |
I guess people call that "unrealistic expectations" ;) |
| |
Raistlin
Registered: Mar 2007 Posts: 685 |
Quote: So noone bothered to test r45253 eh?
Hey, sorry, I need to come back to this sometime. I wish I’d kept a note of releases I saw with problems… I’ve been getting through running a lot of releases lately - you probably saw a slight increase in my CSDb release commenting of late ;p - so for sure can test more soon.
I’ll stick with my current VICE until I see another demo with a problem - then I can do an old vs new test and let you know. |
| |
jab
Registered: Apr 2020 Posts: 20 |
Quoting chatGPZTry r45253 from here (when it shows up in 15 minutes or so).
Had time to try it out now. Cpu doesn't drop anymore from its value around 600%. Nice.
Quoting chatGPZAnd while at it, i added an option that allows to (optionally) skip the soundchip emulation(s) in warp mode. Right now use "-soundwarpmode 0" on the commandline (or resset "SoundEmulateOnWarp" "0" in the monitor) and then save settings. This will considerably speed up warp mode at the cost of some (little) compatibility :) (again: GUI options for this coming up later).
This made my warp mode go to eleven! Err, I mean 1100%. WOW! Thanks! |
| |
Raistlin
Registered: Mar 2007 Posts: 685 |
Just to come back to this, I can confirm that the bug is fixed on the latest VICE :-)
I found another demo exhibiting the same problems - and on a very similar effect (is using ANE a well-known trick for these dot scrollers I wonder?). Latest VICE works fine, though.
Farbraus |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
LAX#imm had the same "problem" - guess that one is much more common than ANE#imm :) |