Windows 10 UNIVERSAL

Discuss anything about DraStic here.
TkSilver
Posts:576
Joined:Wed Mar 25, 2015 3:30 am
Re: Windows 10 UNIVERSAL

Post by TkSilver » Sat Feb 06, 2016 3:26 am

Exophase wrote:I talked to Lordus and we went over some Windows tests he did a while ago (this would be plain desktop Windows). One issue is that on Windows the memory map allocation is limited to 64KB granularity, while we need 16KB granularity to map the DS's VRAM. It'll take some pretty serious hacks to try to work around this and it could have a performance impact. It's not an easy change.
Yea having memory allocation granularity higher larger then page size is an odd thing, but you have the DEC Alpha (and the "brilliant" idea of combining 2 signed 16-bit integers to create a 32-bit integer) to thank for that odd compatibility oddness being created and carried foward in the name of not breaking things that work.

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: Windows 10 UNIVERSAL

Post by Exophase » Sat Feb 06, 2016 5:28 am

TkSilver wrote:Yea having memory allocation granularity higher larger then page size is an odd thing, but you have the DEC Alpha (and the "brilliant" idea of combining 2 signed 16-bit integers to create a 32-bit integer) to thank for that odd compatibility oddness being created and carried foward in the name of not breaking things that work.
Yeah good job Microsoft, let the page sizes on a very old platform that not a lot of people used Windows on in the first place dictate the minimal allocation granularity for the rest of time. I get why they did it in the 90s but they should have changed it by now.

Ezequiel Gomes
Posts:36
Joined:Wed Feb 03, 2016 4:00 pm

Re: Windows 10 UNIVERSAL

Post by Ezequiel Gomes » Sat Feb 06, 2016 6:05 pm

This is the idea of "universal" universal applications run on smartphones, pcs and Xbox soon suppressing the idea of low Public friend, and the W10 is a new system, with new Drivers, DirectX12 etc. don't you think that the system should have been a little more studied than simply label as "only name change"? a hug

TkSilver
Posts:576
Joined:Wed Mar 25, 2015 3:30 am

Re: Windows 10 UNIVERSAL

Post by TkSilver » Sat Feb 06, 2016 7:07 pm

Ezequiel Gomes wrote:This is the idea of "universal" universal applications run on smartphones, pcs and Xbox soon suppressing the idea of low Public friend, and the W10 is a new system, with new Drivers, DirectX12 etc. don't you think that the system should have been a little more studied than simply label as "only name change"? a hug
The name change was a comment was that Windows 10 (desktop) is not the same as Windows 10 (on a phone). It is for all intents and purposes Windows Phone 10.

Unity engine was designed for 1 click deployment across multiple platforms. A multi-platform api has been an idea in existance for quite a while. The major difference for Microsoft is having a single unified store for multiple different device types (computer, mobile and game console), so from the point of view of a consumer this is one of the first times someone could buy an app on their phone and not have to buy it on their pc if they want the same app on multiple devices. Microsoft is in a unique position to be able to do that since no other tech company has as many platforms available, since Apple does not make a game console (well not a real one) and linux is not really a company though I do believe ubuntu did try to cross platform ubuntu phone apps and desktop apps.

The rest of the upgrades are like android going from 5.0 to 6.0 or iOS going from iOS6 to iOS7. You get new features like continuum (window 10 mobile) or adding Siri/google now/cortana or apple adding metal api. They are all neat and useful things but in the end, iOS is iOS, android is android and Windows phone is now called windows 10 mobile.

Ezequiel Gomes
Posts:36
Joined:Wed Feb 03, 2016 4:00 pm

Re: Windows 10 UNIVERSAL

Post by Ezequiel Gomes » Mon Feb 08, 2016 10:24 pm

however , I think there should be more study on the W10 because if PPSSPP the developers have managed to port the emulator to W10 , means or MS solved the JIT problem or they were able to replace it with something else (perhaps DirectX12 has resolved ).A hug

User avatar
huckleberrypie
Posts:442
Joined:Sat May 31, 2014 4:21 am
Contact:

Re: Windows 10 UNIVERSAL

Post by huckleberrypie » Wed Feb 17, 2016 10:39 am

Exophase wrote:
kaikun97 wrote:Also if I rightly recall, Drastic DS is partially a hypervisor on ARM devices because of the similarities of the DS's ARM9 and modern ARMv7 and v8 CPUs on phones or am I wrong? :P
There's nothing resembling a hypervisor/virtualization in DraStic. That's a common mistaken assumption people have it. It uses a traditional recompiler.
As what you mentioned before i.e. electing to use a dynarec rather than flat-out run the code as is just because both are on the same architecture.

kaikun97
Posts:717
Joined:Thu Dec 26, 2013 11:41 am

Re: Windows 10 UNIVERSAL

Post by kaikun97 » Wed Feb 17, 2016 10:43 am

huckleberrypie wrote:
Exophase wrote:
kaikun97 wrote:Also if I rightly recall, Drastic DS is partially a hypervisor on ARM devices because of the similarities of the DS's ARM9 and modern ARMv7 and v8 CPUs on phones or am I wrong? :P
There's nothing resembling a hypervisor/virtualization in DraStic. That's a common mistaken assumption people have it. It uses a traditional recompiler.
As what you mentioned before i.e. electing to use a dynarec rather than flat-out run the code as is just because both are on the same architecture.
There was a GBA hypervisor for the original NDS which was how full speed gba slot 1 emulation was achieved for it. surely if some hypervising is added to drastic due to same/similar architecture, it would give even more speed improvements? Id assume the ARMv7 and v8 series of ARM based CPUs in most devices are able to take ARM9 instructions but im not an expert on the architecture myself :P

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: Windows 10 UNIVERSAL

Post by Exophase » Wed Feb 17, 2016 1:48 pm

kaikun97 wrote:There was a GBA hypervisor for the original NDS which was how full speed gba slot 1 emulation was achieved for it. surely if some hypervising is added to drastic due to same/similar architecture, it would give even more speed improvements? Id assume the ARMv7 and v8 series of ARM based CPUs in most devices are able to take ARM9 instructions but im not an expert on the architecture myself :P
This is how that GBA emulator did.. http://wiki.gbatemp.net/wiki/Gbaemu4ds_ ... ility_List And this is on a system where you have full access to the CPU without some other OS getting in the way.

Trying to emulate DS by running unmodified code has a lot of problems. Like if you don't synchronize ARM9 and ARM7 execution tightly enough communication loops will time out and the game won't start. The entire DS address space has to be managed, but there isn't room to do so in an Android address space unless you use actual virtualization which isn't enabled on most devices and isn't supported on all hardware anyway. It would not only be impossible to regulate emulation timing at a fine grained level (no cycle counting in the executed code) but you'd end up with different timing on different devices inevitably leading to games that work on one game and not another. Bugs and crashes would be much, much harder to reproduce. Savestates would be a lot more cumbersome to implement. There'd be a lot of overhead in accessing I/O registers since they'd have to be done via exceptions and signal handlers (and DS games access I/O a lot), this could easily negate any actual performance benefit unless the code is patched as it happens, but that could then cause the game's anti-piracy checks to go off. There's also the issue where self-modifying code to the DS's ITCM (like in Golden Sun) could fail because they don't go through the steps to make cache coherent in the code, because ITCM is uncached.

The time spent executing ARM9 and ARM7 code isn't exactly a majority of emulation time anyway. There are a lot of other optimizations that are worth doing on the CPU, although I've been very cautious about approaching any of them because these are the type of optimizations that are most likely to break individuals games in obscure ways, and they're hard to fix. I wouldn't touch something like what you're suggesting with a ten foot pole.

RexRacing
Posts:13
Joined:Wed May 20, 2015 4:08 pm

Re: Windows 10 UNIVERSAL

Post by RexRacing » Wed Feb 17, 2016 5:39 pm

I know this is off topic but is there away to make a shader that makes Ds games cell shaded? And if there's a way can someone help me

Ezequiel Gomes
Posts:36
Joined:Wed Feb 03, 2016 4:00 pm

Re: Windows 10 UNIVERSAL

Post by Ezequiel Gomes » Wed Feb 17, 2016 8:05 pm

I'd like to hear people's experiences and opinions on the performance benefits of threaded interpreters vs traditional interpreters vs dynamic binary translation/JIT. For those who are not aware of what threaded interpreters are I shall provide a brief description:

As each instruction is fetched and decoded by the standard interpreter a function pointer to the final native code is added to an array indexed by the program counter. Each time an instruction is fetched the function pointer array is read to see if there is a valid function pointer. If so the code is called using the function pointer and the instruction executed while bypassing the decode. The aim being to create threaded code (i.e. a contiguous sequence of unconditional subroutine calls) which will execute much faster than the sequence of conditional calls/branches which make up an interpreter's decode. On the other hand there is still some overhead in calling and returning when compared to the use of cached basic blocks in dynamic binary translation.

Why would I be interested in using this method? As it happens platform X prevents execution of data by application code, meaning dynamic binary translation cannot be used under any circumstances. It is however permissible to call static code using function pointers. It is widely agreed to be impractical to emulate target Y on platform X using a basic linear interpretation. A proof of concept of threaded interpretation to emulate targets similar in complexity/speed to target Y has been published but has suffered from neglect due to IRL issues facing the lone developer. Other developers continue to disparage platform X as "useless" for emulation purposes due to the inability to use dynarec.

My question therefore is; how widespread is use/knowledge of threaded interpretation techniques in emulation? Or is there a legitimate reason behind developers apparent ignorance of this method of optimization?

The text is not mine, but I found it very interesting about resorting to JIT missing on Windows Phone

Post Reply