MSX1 Smooth scroll gpu accelerated

ページ 2/2
1 |

By GhostwriterP

Hero (663)

GhostwriterP さんの画像

22-08-2021, 12:44

yes, assuming they are sprite and not tile based

By Sandy Brand

Champion (279)

Sandy Brand さんの画像

22-08-2021, 13:35

It is an unconventional idea, to say the least Smile

It depends on the games you want to 'smoothen', of course, but assuming that their 'average' scroll speed is '1 pixel per frame' that would mean you would need 8 frames of delay in order to be able to obtain 2 snapshots between which you want to interpolate. That would make the game experience extremely laggy and unplayable.

Even if we assume the scroll speed is twice as fast, you'd still have 4 frames of delay which is not good.

The problem is that many of these old games are tough-as-nails and really require split-second reactions. Any introduced lag will frustrate the game-play experience.

I was trying to think of MSX 1 games that have really fast scrolling where this trick might work. Thexder comes to mind, but looking at it, I would guess it is still 4 frames between individual foreground updates?

By st1mpy

Paladin (850)

st1mpy さんの画像

22-08-2021, 13:47

I haven't done the calculation but that's why I was saying for the graphics processing purpose make the emulation of the game at max speed (whatever a 4ghz processor can do compared to 4mhz approx z80) which looks like it is seeing the future, and fill in the interpolated frames. So all that work for inserting 2 or 4 or 8 frames (more the smoother) have to be done in what sormally takes msx to do 1 8pix scroll. (... oh its cpu processing now... May be part of it can be done in gpu).

By Sandy Brand

Champion (279)

Sandy Brand さんの画像

22-08-2021, 14:31

You cannot see into the future without making wrong guesses about user input.

If you want to 'fix' that, you would need to take the current user input and assume this is what it will be in the future. That means storing the steering input in a queue and then pull it out of the queue when the MSX itself does the calculations for the frame which is by then already considered to be in the past. It depends on the length of the queue how many frames of delay you will introduce, but overall it is not good.

The concept you are proposing is basically the idea that Google engineers postulated to reduce lag on Stadia called "Negative Latency". The concept there is to simulate forwards for 'all possible input' combinations and then pick the frame that matches with the 'actual inputs' by the time you get there. Many people agree though that this very hard to pull off because there is just too much 'state' in modern games and the 'space' of potential input data per frame is very large. The amount of memory and computational power you would need makes this idea rather unpractical.

Now, you could argue that, for MSX, the amount of different inputs is smaller if you just assume keyboard and/or 8-way joysticks. But it still leaves a lot of button combinations you'd need to simulate forwards in order to have the correct frame constructed on time.

By st1mpy

Paladin (850)

st1mpy さんの画像

22-08-2021, 14:41

For shooting games like R-type for MSX, with one direction scroll at fixed intervals, it is totally predictable. And it just needs to do it for background.

By Sandy Brand

Champion (279)

Sandy Brand さんの画像

22-08-2021, 15:00

Fair enough, if you want to reduce the application of your technique to only games that do 'slow and monotone' scroll directions, then this would simplify it a bit.

Still, many of these games animate player weapons (e.g.: lasers), large explosions, (sub)-bosses, etc. by changing characters on the screen. And these things often move much faster than the scroll speed and have a dependency on user input.

So the resulting frames you obtain by forward simulation are most likely not 'clean' and you would somehow need to extract just the background pixels from that.

Even if you manage to do that; you would still need to put everything together and you end up with smoothly scrolling background and still 'jerky' movement for everything else that applies animations on the screen by changing characters?

(To be fair, Space Manbow also has that. In the first stage, for example, the ships that 'lift off' from the large ground vehicle animate upwards in steps of 8 pixels at the time).

By Micha

Resident (50)

Micha さんの画像

22-08-2021, 16:39

I don't think it is necessary to use an accelerator; the MSX1 is fast enough to do smooth one pixel per frame scrolling when using a tileset that has scrolling already built in. It has its limits, but when you take those limits in account it is perfectly possible to make a good looking game with it. (under the assumption that scrolling is either only vertical or only horizontal)

By ARTRAG

Enlighted (6843)

ARTRAG さんの画像

13-02-2022, 22:48

https://youtu.be/iK7TfeGIhJ4
This is using 512 tiles for scrolling 2 pixels at step
All tiles are pre-loaded in vram

By ducasp

Hero (550)

ducasp さんの画像

14-02-2022, 00:11

st1mpy wrote:

The idea is, this thing will smooth scroll any games without modifying the game itself.
Initially I was thinking it does this by AI. (Just like Nvidia's DLSS, but instead of upscale resolution, it's for smooth scroll).

If it works purely visually by just looking at the 2 frames output by msx (before, and after 8 pixel scroll) and does the interpolation, it is lagging behind. So it needs to see the 2nd frame quickly, hence the need for the fast emulator.

Issue with this idea is that you add input lag where input lag is not accounted for, so it will make some games really hard to play (as you have to have two different frames to calculate intermediary frames and then spit out all frames, so you will be always 8pixels behind in your input...

Now, if you work with something like frame ahead and calculate possibilities for several inputs, that is going to be complex and require quite powerful hardware.

I don't think this is a feasible idea, other than for an emulator targetting a powerful host processor.

By st1mpy

Paladin (850)

st1mpy さんの画像

14-02-2022, 03:21

Yes so the first posted comment of this thread it was suggested a powerful processor running an emulator inside a msx cartridge to eliminate the lag.

ページ 2/2
1 |