Hydr8gon / sm64

A port of Super Mario 64 for the DSi
Creative Commons Zero v1.0 Universal
127 stars 10 forks source link

The game lags a lot when there are many entities in the frame #11

Open Alexboy2334 opened 3 years ago

Alexboy2334 commented 3 years ago

That's all. I know that perfect emulation is difficult because of the hardware but I wanted to point out this problem. If there is no way to fix it, I will close the issue.

Hydr8gon commented 3 years ago

Well, nothing here is really emulation. In terms of further optimizing the port, the best bet would be moving the rest of the audio work to the ARM7, but I'm not sure how feasible that is. Other than that, we'd have to dive into the actual game code and try to optimize it by rewriting things. Either way it'd probably be a lot of work. You can disable audio output with the select button to get a few more FPS, but even then it's not quite full speed in some areas.

Alexboy2334 commented 3 years ago

Well, nothing here is really emulation. In terms of further optimizing the port, the best bet would be moving the rest of the audio work to the ARM7, but I'm not sure how feasible that is. Other than that, we'd have to dive into the actual game code and try to optimize it by rewriting things. Either way it'd probably be a lot of work. You can disable audio output with the select button to get a few more FPS, but even then it's not quite full speed in some areas.

Ok, sorry, I meant porting. 😅

TheMamaMiaGuy commented 3 years ago

Quick question Hydr8gon, will this issue apply to the 3DS? oh, and do you have plans for a 3DS port because the current one really sucks...

Hydr8gon commented 3 years ago

@Antman5000 running this port on the 3DS means booting into DSi mode, which runs at the same clock speeds as the DSi, so performance will be the same. I've heard the 3DS port is a bit slow on old 3DS though; maybe this is still faster? :P

I don't really have plans to make my own 3DS port, although I have joked about it! I did the DSi port because it was exciting to take specific advantage of hardware to make it run well on a weaker system, and I'm pretty familiar with how the DS GPU works. I don't really know much about "modern" graphics or the 3DS in general so I'm a bit less inclined to attempt a port there. But hey, maybe I'll make a 3DS emulator and become interested in making a port then :P

TheMamaMiaGuy commented 3 years ago

@Antman5000 running this port on the 3DS means booting into DSi mode, which runs at the same clock speeds as the DSi, so performance will be the same. I've heard the 3DS port is a bit slow on old 3DS though; maybe this is still faster? :P

I don't really have plans to make my own 3DS port, although I have joked about it! I did the DSi port because it was exciting to take specific advantage of hardware to make it run well on a weaker system, and I'm pretty familiar with how the DS GPU works. I don't really know much about "modern" graphics or the 3DS in general so I'm a bit less inclined to attempt a port there. But hey, maybe I'll make a 3DS emulator and become interested in making a port then :P

Alright, thats good know. I forgot about the whole DSi mode thing. Also, I’m just really disappointed in the 3DS port. I mean, I get the struggle of reverse engineering the n64 but seriously. Heck, even the DSi port runs better, thanks to you. By the way, I just opened a new issue so please help me out on this one. I’m pretty amateur when it come to compiling!

Hydr8gon commented 3 years ago

The main reason the 3DS port is so slow is because it uses code from the PC port, which does a lot of slow 3D calculations in software. I scrapped all of this for the DSi port and rewrote it to do all of this on hardware, which is significantly faster (GPUs are designed for these sort of calculations, after all). The 3DS port could definitely use the same treatment, although reimplenting the entire graphics pipeline is a bit of an undertaking!