ijor wrote: 19 Apr 2022 23:17
Badwolf wrote: 19 Apr 2022 23:14
Didn't we establish that the address lines aren't driven when ACSI and the Floppy are doing their thing & it's consequently impossible to snoop?
That's why I said in my previous message that you have to snoop writes to the DMA address registers.
exxos wrote: 19 Apr 2022 22:57
Time is never on anyone's side, unfortunately.
Yep. Very true!
Yeah that experiment was abandoned back in 2020 due to lack of time.
It worked well on my setup but getting it to a point where it would work for everyone felt like much too big of a hassle.
Just enabling L1 cache for ST-RAM gives a significant speed boost so that's what I went with in the end.
Not as fast but still very nice and a lot less complicated.
Snooping register access sounds like maybe it could work to some degree.
Or snoop instructions to detect when software invalidates the cache and act on that, assuming you are able to invalidate the shadow.
That simple proof-of-concept I experimented with couldn't do any such fancy things :)
Oh and that also assumes TOS is actually cache aware and issues cache flushes... EmuTos and PAK-TOS3 is, but I think people are still insisting on trying to have a good experience with that unholy combination of TOS206 + 68030 + TT-RAM :lol:
Here's another very different idea for the same problem.
I take it the main target is to run games fast.. games that does not work if you use the prgflags to put it into altram because its framebuffer ends up in there too.
One could make a game launcher that traps the games access to the shifter registers.
It would have a pool of a few pre-allocated framebuffers in st-ram.
When the game attempts to set the screen address it'll trigger an mmu exception. If it's not already been mapped to the st-ram pool, we grab a screen from the pool and set up a logical->physical mapping towards it. The value written to the shifter register is the ones for the st-ram buffer, and then we exit the exception handler letting it continue along its merry way..
It'll have to copy the contents on a first-access to I suppose.
I'm sure there's a lot of edge cases that would make this not work 100% for everything.
The obvious one is not knowing the upper 8 bits of where the game thinks it has the framebuffer.
You'd have to guess, but it's probably almost always going to be 0x01 unless you've somehow used up 16MB fastram already.
To improve the success rate, you could get fancy by checking where you're at when the program launches maybe?
This thing would make anything scrolling just become slower due to constantly having to reuse (and recopy to) screens in the st-ram pool.
As luck would have it, these types of games are very rarely the ones you want to boost into unplayable speeds anyway :)
The ones using two non-moving double buffered screens are usually the ones you do want to speed up, and these are also the ones that may work quite well with a "simple" software solution like that.
I have no idea if this would work well in practice but it feels doable.
(I'm not going to, even though I've been very tempted to try exactly this for quite some time now :lol: )