Possiblity of implementing cache emulation

Support and general discussion.
Post Reply
grommit2007
Posts: 21
Joined: Sat 22 Apr, 2017 3:26 pm

Possiblity of implementing cache emulation

Post by grommit2007 » Tue 18 Jun, 2019 4:02 pm

Would an implementation of CPU cache and motherboard cache be possible, now that there is a new recompiler in PCem?

User avatar
SarahWalker
Site Admin
Posts: 1722
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Possiblity of implementing cache emulation

Post by SarahWalker » Tue 18 Jun, 2019 4:41 pm

No.


grommit2007
Posts: 21
Joined: Sat 22 Apr, 2017 3:26 pm

Re: Possiblity of implementing cache emulation

Post by grommit2007 » Tue 18 Jun, 2019 5:01 pm

How come?

User avatar
ppgrainbow
Posts: 467
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Possiblity of implementing cache emulation

Post by ppgrainbow » Tue 18 Jun, 2019 5:22 pm

grommit2007 wrote:
Tue 18 Jun, 2019 5:01 pm
How come?
CPU cache emulation was guesswork in early versions of PCem and since the cache emulation proved to be no improvement to CPU emulation, it was removed.

User avatar
omarsis81
Posts: 719
Joined: Thu 17 Dec, 2015 6:20 pm

Re: Possiblity of implementing cache emulation

Post by omarsis81 » Wed 19 Jun, 2019 12:50 pm

I'd love to have cache emulation too, but Sarah said that would cost a lot of CPU host resources
http://pcem-emulator.co.uk/phpBB3/viewt ... 508&p=3436

grommit2007
Posts: 21
Joined: Sat 22 Apr, 2017 3:26 pm

Re: Possiblity of implementing cache emulation

Post by grommit2007 » Wed 19 Jun, 2019 3:43 pm

Would it ever be possible to implement this in the future, when the CPU host resources aren't much of a problem, and with an option to select the old (current) behavior?

User avatar
SarahWalker
Site Admin
Posts: 1722
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Possiblity of implementing cache emulation

Post by SarahWalker » Wed 19 Jun, 2019 4:21 pm

No. I don't know how many times I have to say this...

Cheez
Posts: 28
Joined: Tue 19 Dec, 2017 4:08 am

Re: Possiblity of implementing cache emulation

Post by Cheez » Wed 19 Jun, 2019 5:38 pm

I don't even know how we got from "there's no improvement" to "will we ever have it" because it probably should have ended right there. Is there even anything that absolutely requires the cache in order to behave properly? I haven't heard of anything.

User avatar
ppgrainbow
Posts: 467
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Possiblity of implementing cache emulation

Post by ppgrainbow » Wed 19 Jun, 2019 6:17 pm

grommit2007 wrote:
Wed 19 Jun, 2019 3:43 pm
Would it ever be possible to implement this in the future, when the CPU host resources aren't much of a problem, and with an option to select the old (current) behavior?
Not in the next release or in the foreseeable future. You can just forget about the CPU cache. It's a joke.

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: Possiblity of implementing cache emulation

Post by szadycbr » Wed 19 Jun, 2019 6:22 pm

ppgrainbow, it might be not feasible to put it to PCem, but its not a joke, there always was hudge performance impact where ex. celeron 300 and 300a with difference in L1cache speed. pentium 1 and MMX also did vary with L1 cache and speed difference was also not small at all.

User avatar
ppgrainbow
Posts: 467
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Possiblity of implementing cache emulation

Post by ppgrainbow » Wed 19 Jun, 2019 6:27 pm

szadycbr wrote:
Wed 19 Jun, 2019 6:22 pm
ppgrainbow, it might be not feasible to put it to PCem, but its not a joke, there always was hudge performance impact where ex. celeron 300 and 300a with difference in L1cache speed. pentium 1 and MMX also did vary with L1 cache and speed difference was also not small at all.
Sorry for getting riled up and I just didn't know that it's not feasible to add CPU cache. But what about cache memory? For example, the DataExpert OPTi-495SX motherboard defaults to 64 KB of cache RAM and can go up to 256 KB of cache RAM. If cache RAM is never going to be emulated in PCem, it should be disabled in the BIOS. :p

tk421
Posts: 58
Joined: Sat 18 Jun, 2016 6:57 am

Re: Possiblity of implementing cache emulation

Post by tk421 » Wed 19 Jun, 2019 7:44 pm

I can say that I agree with the current development of PCem. I think the devs are following a logical and straightforward design strategy that has so far produced a very nice program that runs well on modern PCs. Obviously the power of the host CPU is key to using this program.

I think perfect cache emulation is something we all like to have with PCem, but I like the current state of the program. I am still testing v15, but I like what I see thus far.

UPerschke
Posts: 47
Joined: Wed 25 May, 2016 7:43 pm

Re: Possiblity of implementing cache emulation

Post by UPerschke » Thu 20 Jun, 2019 9:07 pm

I think perfect cache emulation is something we all like to have with PCem
Why? There is no speed gain from it.

On a physical computer speed gain with cache arises from the fact that cache memory is several orders of magnitute faster than DRAM.
In PCem all emulation is taking place in it's host DRAM environment, which is already buffered by the host cache.

There is no point in wasting CPU time and memory to mimic cache behaviour that will never be faster than how memory and cache access is taking place on the host.
For an emulated CPU it's DRAM memory and it's cache are driven from the same host ressource, regardless how you turn it.

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: Possiblity of implementing cache emulation

Post by szadycbr » Fri 21 Jun, 2019 9:06 am

"Why? There is no speed gain from it"? its not about the speed gain, it is about behaviour, to slow dawn or speedup to match original.
And i also think it would be nice to have it, but although i am not a programmer i can see now that it would be a lot of work, will also eat lots of resources which we dont have. i can only guess that it would need major rewrite or addittion to the code with so many problems, dependiences etc. not worth for now or foreseeable future.

"There is no point in wasting CPU time and memory to mimic cache behaviour that will never be faster than how memory and cache access is taking place on the host" true, very right, but , although i did not research extensively pentium cpu cache speeds i am sure that if not now then in very near future our RAM memories will have speeds much greater than cache speed of this old cpus, so then , in the future we will be able to mimic that behaviour.

So i just wanted to put my few pennies, i do disagree with you and i do agree also :)

Post Reply