Graphics don't seem right

Subforum for discussion and help with ScummVM's Nintendo DS port

Moderator: ScummVM Team

Nisei
Posts: 8
Joined: Wed Mar 21, 2007 9:48 pm

Graphics don't seem right

Post by Nisei »

I've been through a few ScummVM versions so far (Win32, Mac and Nokia 7100 Symbian) but the menus in the DS version seem to be made at the wrong resolution. They're hardly readable and I can't get the games to play in the right aspect ratio. E.G. Monkey Island 1 seems to be missing the lower part of the screen so the menus are not showing completely. I've tried some of the Graphics options but this doesn't change anything. Am I doing something wrong or is the DS version still in a very early stage of developement?
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

The DS cannot perform any filtering when it scales the screen. Using a nearest-neighbour scale makes the text completly unreadable so a 'flicker scaling' technique is used. This can only be used to scale the screen in one direction, so it is used to scale the width from 320 to 256. This means the bottom 8 pixels are missing. (as the DS screens are 192 pixels high, displaying a 200 pixel image) These can be seen by scrolling the screen up and down (hold L and use the D-pad to scroll).

A software-rendered scale was in the works by another developer but development on it seems to have slowed at the moment. When it gets done though, it is likely that it will cause slowdown in all but the oldest of games.

The other option is to switch to unscaled mode (the option is on the DS Option Menu, which you can get to by pressing Select when in the game) where the screen isn't scaled at all and you must scroll left and right to see the whole width.
Nisei
Posts: 8
Joined: Wed Mar 21, 2007 9:48 pm

Post by Nisei »

Ah OK, thanks for explaining. It's a pity they didn't opt for scaling the height to 192 pixels and leaving 2 small black bars on both sides. That would've been less annoying than missing 8 pixels in height.
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

Nisei wrote:Ah OK, thanks for explaining. It's a pity they didn't opt for scaling the height to 192 pixels and leaving 2 small black bars on both sides. That would've been less annoying than missing 8 pixels in height.
It's a pity they didn't put a 320x240 screen in there :)
Nisei
Posts: 8
Joined: Wed Mar 21, 2007 9:48 pm

Post by Nisei »

Yeah indeed, that would've made it a perfect ScummVM handheld :)
Tramboi
Posts: 42
Joined: Fri Sep 22, 2006 7:20 pm

Re: Graphics don't seem right

Post by Tramboi »

Hi everybody, there *is* a software scaler that is nearly working and has been optimized by Robin "I-write-plenty-of-ARM-code-and-I-like-it" but you have to tweak the sources, build your own binary and live with the glitches.

By the way, sorry I don't have much time for investigating the issue and finish the stuff rightly, but I've been pretty busy with development at work and stuff at home.
Yeah, yeah, real lame excuse, so does everybody, I know :)

Edit: the real perfect handheld machine for emulating these games is probably the new GP2X with the touch screen, it supports 320x240, it has plenty of RAM and faster CPUs!
But it is way less classy than our beloved DS Lites :)
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

Yeah, I know how it is Tramboi, work always gets in the way of the interesting stuff! I also haven't had much time to work on ScummVM lately either.
User avatar
robinwatts
ScummVM Developer
Posts: 84
Joined: Sat Apr 07, 2007 5:16 pm
Location: Hook Norton, Oxfordshire, UK

Re: Graphics don't seem right

Post by robinwatts »

Tramboi wrote:Hi everybody, there *is* a software scaler that is nearly working and has been optimized by Robin "I-write-plenty-of-ARM-code-and-I-like-it" but you have to tweak the sources, build your own binary and live with the glitches.
Some people do crosswords, some people do suduko. I do ARM :)

What glitches are there?

Robin
User avatar
DJWillis
ScummVM Porter
Posts: 174
Joined: Wed Oct 26, 2005 8:55 pm

Re: Graphics don't seem right

Post by DJWillis »

Tramboi wrote:Edit: the real perfect handheld machine for emulating these games is probably the new GP2X with the touch screen, it supports 320x240, it has plenty of RAM and faster CPUs!
Have you tried the port, still needs work ;).
Tramboi wrote:But it is way less classy than our beloved DS Lites :)
Amen to that, I still think the DSL is a lovely looking bit of kit and fun to hack on.

Personally I don't find the missing 8 lines to bad on the DS but then I am happy to use the scroll feature.
Tramboi
Posts: 42
Joined: Fri Sep 22, 2006 7:20 pm

Re: Graphics don't seem right

Post by Tramboi »

robinwatts wrote:What glitches are there?
Nothing related with the scaling routine itself but more with the context.
The first line is garbage, which seems to me like a DMA/D$ incoherence, or something like that...
Last time I checked, I found several bugs but nothing that fixed it.
And I don't have a debugger, I can just build, dump on the cartridge and test, which makes testing... tedious :D
Tramboi
Posts: 42
Joined: Fri Sep 22, 2006 7:20 pm

Re: Graphics don't seem right

Post by Tramboi »

DJWillis wrote:Have you tried the port, still needs work ;).
Sadly I don't have the money right now to buy "Yet another toy", but I'd love to find one under the christmas tree!
Tramboi
Posts: 42
Joined: Fri Sep 22, 2006 7:20 pm

Post by Tramboi »

Victory!

At last it works without any glitch in Maniac Mansion (didn't test any other game yet).

The ARM scalers don't seem to conform to the behaviour of the C++ ones so I disabled those for now.
Which disabled optimized versions of asmDrawStripToScreen and asmCopy8Col in the process... hum...
I put the smart swizzling of the ASM version in the C++ ones which presumably made it faster, till we fix the asm routine :)
(Didn't think of it myself, I'm too used to ARGB32 SIMD and Altivec I guess for 16bit pixels twiddling ;) )
(The compiler makes quite good use of the postfix shifts btw )

Everything is ready to build on the trunk.
Enjoy text smoothness at its best :)

Cheers
Bertrand
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

Does that mean that the games run slower even when the CPU scaler is disabled (because the asm routines are disabled)?

And did you get the debug console working when the scaler is enabled? It should be straightforward as long as there is a small amount of VRAM for the text buffer.
Tramboi
Posts: 42
Joined: Fri Sep 22, 2006 7:20 pm

Post by Tramboi »

agentq wrote:Does that mean that the games run slower even when the CPU scaler is disabled (because the asm routines are disabled)?
Yep, but hopefully soon either all the ASM routines will be working, either I will cherry pick which routine is in ASM and which isn't and that will be back to normal.
From the logs it seems that Robin has already found a bug, but as he cannot test, I'll have to validate and integrate his fix.
agentq wrote:And did you get the debug console working when the scaler is enabled? It should be straightforward as long as there is a small amount of VRAM for the text buffer.
I'll check.
Tramboi
Posts: 42
Joined: Fri Sep 22, 2006 7:20 pm

Post by Tramboi »

Okay I fixed the last bug in the ASM scalers so it works now.
At last :)

(And I couldn't resist scrapping a few more cycles: it should be around 5 ms per frame which seems pretty good to me)

What is supposed to work and how relating to the debug console? What should I test exactly, Neil?
Even when the scaler is off I only get black text on the bottom screen which seems suspect to me.
Post Reply