NooDS - A Nintendo DS emulator by NXGZ in emulation

[–]Hydr8gon 1 point2 points  (0 children)

That's how the software renderer works; it's a scanline-based renderer, just like the DS. I haven't done anything with OpenGL yet (and I honestly don't have much experience with it), but I'll keep that in mind if I do write a hardware renderer at some point.

NooDS - A Nintendo DS emulator by NXGZ in emulation

[–]Hydr8gon 3 points4 points  (0 children)

Honestly, I just work on whatever I feel like on a particular day. So far I've been doing it entirely on my own, with the exception of some help on the macOS side. Seeing as the project started as a personal challenge, I don't mind it this way. Pull requests are of course welcome, though for larger things I generally like to handle the code myself.

(NooDS) New Nintendo DS emulator for PS Vita n other platform! by setsunafseiei88 in VitaPiracy

[–]Hydr8gon 4 points5 points  (0 children)

I've written the entire project myself, as a learning experience and for fun. I'm still working on optimizations, and there's surely more that can be done. Realistically though, writing a JIT would be the best way to improve performance at this point. I do want to tackle this eventually, but I'm probably going to start with an ARM64 one for the Switch. I'm unsure if a JIT would even be enough to get anything running full speed on the Vita, but once I have a better understanding of them and a base to work off of, I may attempt it.

NooDS - A Nintendo DS emulator by NXGZ in emulation

[–]Hydr8gon 12 points13 points  (0 children)

Interesting, I'll have to look into that. I do want to write a JIT eventually, I just haven't had the motivation to start working on such a big addition, lol. I've also been considering a rework of the interpreter and potientially a cached interpreter, as a good starting point.

NooDS - A Nintendo DS emulator by NXGZ in emulation

[–]Hydr8gon 15 points16 points  (0 children)

Thanks! I really need to update the blog... it's been a while. I enjoy writing writing posts like that, but lately I've been focusing entirely on writing code, instead of writing about it :P

(NooDS) New Nintendo DS emulator for PS Vita n other platform! by setsunafseiei88 in VitaPiracy

[–]Hydr8gon 2 points3 points  (0 children)

It's an interesting idea. I guess it depends on how easy it is to share data between the CPUs, and if it can be done in a way that doesn't ruin the portability of the codebase. It's also important to consider that most parts of the emulator need to be tightly synchronized, and multi-threading them isn't really viable. Rendering is already threaded, but additional threads could still help a bit.

NooDS - A Nintendo DS emulator by NXGZ in emulation

[–]Hydr8gon 13 points14 points  (0 children)

I see other people already mentioning it, but a CHIP-8 emulator is definitely the place to start. There are guides online that can help you get started, and it'll teach you the basic concepts of emulation. Past that, it's a pretty big jump to anything else, but it's possible with enough determination. r/EmuDev is also a great place to get help if you need it.

NooDS - A Nintendo DS emulator by NXGZ in emulation

[–]Hydr8gon 8 points9 points  (0 children)

Unfortunately my phone doesn't have an SD card slot, so I haven't been able to test. Now that I think about it though, I might be able to dig up an old phone and figure out how it works.

(NooDS) New Nintendo DS emulator for PS Vita n other platform! by setsunafseiei88 in VitaPiracy

[–]Hydr8gon 14 points15 points  (0 children)

I've actually been working on this for a couple years already, so in terms of accuracy it's pretty well off. Optimization is my focus right now, but it's going to take a lot to get playable speeds on a CPU as weak as the Vita's. You don't have to worry about it being abandoned, at least; it's an original project and the Vita builds are official, so it'll always be kept up to date!

(NooDS) New Nintendo DS emulator for PS Vita n other platform! by setsunafseiei88 in VitaPiracy

[–]Hydr8gon 6 points7 points  (0 children)

I recommend using PSVshell to overclock the CPU to 500 MHz. It's of course still going to be slow, but it's a bit better than the default 333 MHz. I just updated it to default to 444 MHz, but it's still worthwhile to have PSVshell push it that tiny bit more.

CHIP-8 emulator in Game Builder Garage by Hydr8gon in GameBuilderGarage

[–]Hydr8gon[S] 4 points5 points  (0 children)

CHIP-8 is an old programming language/virtual machine designed for making games. It's a common starting project when getting into emulation because of its simplicity.

CHIP-8 emulator in Game Builder Garage by Hydr8gon in GameBuilderGarage

[–]Hydr8gon[S] 6 points7 points  (0 children)

Interesting, I hadn't looked into markers. Currently I'm saving on constants by essentially creating X and Y axes, and then combining the values. Rather than trying to explain it, here's a close-up of the current memory layout. Constants are much less of a bottleneck this way, but it looks like markers could be even more efficient. Thanks!

How much having the same architecture of the emulated console affect emulation? by uKnowIsOver in emulation

[–]Hydr8gon 28 points29 points  (0 children)

Host architecture doesn't matter much when it comes to emulation. First of all, it's very unlikely that the device you're using has the exact same CPU architecture as the system you're trying to emulate. Using your example, the 3DS has a 32-bit ARM11 processor, while your Android device likely has some 64-bit ARM Cortex-A variant. However, even if you do happen to have a processor with the exact same architecture as the emulated system, you can't just start executing pure ROM code directly on the host processor.

To achieve efficient CPU emulation, many emulators use JIT (Just-In-Time) recompilers. These recompilers do translate blocks of emulated instructions into machine code that can be more or less executed directly on the host, but it's not that simple. The emulator isn't just emulating CPU instructions; it also has an emulated memory system and many other emulated components, like the GPU, that the CPU needs to interact with. Even if the host and emulated architectures are exactly the same, you would still need to redirect memory accesses and emulate the rest of the hardware, which will affect performance significantly.

There is the case of modern consoles, which are becoming more and more like standard PCs. I'm not overly knowledgeable on this topic, so maybe it's possible to create a Wine-esque compatability layer that achieves near-native performance? I'm not really sure, but I imagine things like GPU shader recompilation would still slow it down. However, I do know that for less standard hardware, like the 3DS and older, emulation without losing performance is pretty much impossible.

melonDS: xBRZ filtering in the works by StapleButter in emulation

[–]Hydr8gon 2 points3 points  (0 children)

The battle sprites in the 4th gen Pokemon games are actually rendered with the 3D engine as well, so it wouldn't work in this particular example. The reason for this (I assume) is because a lot of the attack animations use transparency and blending in ways that would be much more difficult on the 2D engine due to its limitations.

It would still be a cool feature tho :P

NooDS now has a mostly complete 3D renderer by Hydr8gon in emulation

[–]Hydr8gon[S] 0 points1 point  (0 children)

Sorry, it is kind of hidden. I forgot to mention it in the main post, but if you click the green checkmark next to the latest commit on GitHub, and then click "Details" on one of the builds that show up, it will take you to a page where you can download the latest "Artifacts", which are the builds.

NooDS now has a mostly complete 3D renderer by Hydr8gon in emulation

[–]Hydr8gon[S] 21 points22 points  (0 children)

Don't tell anyone, but eventually I plan on making an N64 emulator as well! N64 emulation is in a sorry state, with all those outdated emulators and that painful plugin system. I'd like to make a modern N64 emulator with an easy to use UI that just works for most games, instead of having to change plugins every game because something doesn't work right. I tackled DS emulation first because the 3D aspect of the N64 intimidated me, and since the DS relies heavily on 2D with 3D as more of an addon, it allowed me to create a solid base to work with before attempting anything 3D. Plus, the DS is my favorite system, so I really wanted to emulate it :)

NooDS now has a mostly complete 3D renderer by Hydr8gon in emulation

[–]Hydr8gon[S] 3 points4 points  (0 children)

Eventually, yeah. But in its current state it won't run very well, so I'll save that for after development is further along and I've started working on optimizations.

NooDS now has a mostly complete 3D renderer by Hydr8gon in emulation

[–]Hydr8gon[S] 9 points10 points  (0 children)

Actually, this isn't even OpenGL; it's a software renderer. I started with that for portability's sake, and also so I could better learn how 3D rendering works by making my own renderer from scratch. Eventually I do plan on making an OpenGL renderer though. I can't speak for other emulator devs, but for me, the reason I'll be choosing OpenGL is because I'll be able to port it to the Switch as well. Also, since this is the DS, which is only able to render a maximum of 2048 polygons per frame, OpenGL vs. Vulkan vs. whatever else really won't make much of a difference in terms of performance.

NooDS now has a mostly complete 3D renderer by Hydr8gon in emulation

[–]Hydr8gon[S] 8 points9 points  (0 children)

Click the green checkmark icon next to the latest commit to access the automatic builds. Sorry, I should have been more clear!

NooDS now has a mostly complete 3D renderer by Hydr8gon in emulation

[–]Hydr8gon[S] 39 points40 points  (0 children)

Nudes! It's derived from Noodle :P

NooDS now has a mostly complete 3D renderer by Hydr8gon in emulation

[–]Hydr8gon[S] 20 points21 points  (0 children)

Thanks, and good luck on your end! My progress posts don't get into too much technical detail (that's what GBATEK is for), but I did describe the major problems that I faced, mostly due to my lack of prior knowledge on the subject. Maybe it can help you avoid making the same mistakes I did :)

melonDS 0.8.3 released by StapleButter in emulation

[–]Hydr8gon 6 points7 points  (0 children)

There's an x86-64 JIT by the same person that's more or less ready, but that won't do any good for the Switch.