Author Topic: MelonDS DS emulator - Proof of Concept port  (Read 2418 times)

gameblabla (OP)

  • **
  • Posts: 766
MelonDS DS emulator - Proof of Concept port
« on: December 13, 2017, 07:26:01 am »
I had discovered MelonDS, yet another Nintendo DS emulator.
Unlike DesMume, this one requires real BIOS & firmware files.
It's also just as slow as DesMume. You may or may not prefer it.

Put your bios files in /usr/local/home/.config/melonds.
(bios7.bin, bios9.bin and firmware.bin)

Start + Select to exit the emulator.
Button mapping is like the Nintendo DS.

Also saves might not work properly, not sure why but given the slow speed of it, that won't be an issue i guess...

As usual, it's a proof of concept and thus, it should not be used for gaming. (because its so slow)
Hopefully, this will convince melonDS devs to work on an OpenGLES hardware renderer. (unlike Desmume devs...)

https://github.com/gameblabla/melonDS/raw/master/melonds.opk

zhongtiao1

  • *
  • Posts: 246
Re: MelonDS DS emulator - Proof of Concept port
« Reply #1 on: December 20, 2017, 08:08:59 am »
I had discovered MelonDS, yet another Nintendo DS emulator.
Unlike DesMume, this one requires real BIOS & firmware files.
It's also just as slow as DesMume. You may or may not prefer it.

Put your bios files in /usr/local/home/.config/melonds.
(bios7.bin, bios9.bin and firmware.bin)

Start + Select to exit the emulator.
Button mapping is like the Nintendo DS.

Also saves might not work properly, not sure why but given the slow speed of it, that won't be an issue i guess...

As usual, it's a proof of concept and thus, it should not be used for gaming. (because its so slow)
Hopefully, this will convince melonDS devs to work on an OpenGLES hardware renderer. (unlike Desmume devs...)

https://github.com/gameblabla/melonDS/raw/master/melonds.opk

Wow. Nice Job. It is slow. It can't even run super Mario bros well :P

Thank you for still supporting the GCW-Zero though!

Juggalo.Gamer.23

  • *
  • Posts: 79
Re: MelonDS DS emulator - Proof of Concept port
« Reply #2 on: December 29, 2017, 08:03:45 pm »
where do i get the NDS bios? cuz i got them and firmware off Loveroms and i put them in the correct
folders and the emulator didn't work it launched and immediately backed out

gameblabla (OP)

  • **
  • Posts: 766
Re: MelonDS DS emulator - Proof of Concept port
« Reply #3 on: December 30, 2017, 12:14:37 am »
where do i get the NDS bios? cuz i got them and firmware off Loveroms and i put them in the correct
folders and the emulator didn't work it launched and immediately backed out
If the emulators "blacks out", then it means you did not put the bios where they should be.
Read the instructions carefully, you need to put the 3 files (bios7.bin, bios9.bin and firmware.bin) in
/usr/local/home/.config/melonds

If you did that and it still doesn't work, then one of the files are corrupt.
Here are the md5 hashes for the 3 firmware files i use :
e45033d9b0fa6b0de071292bba7c9d13  firmware.bin
df692a80a5b1bc90728bc3dfc76cd948  bios7.bin
a392174eb3e572fed6447e956bde4b25  bios9.bin

Another option is to simply stick with Desmume, for which i have released a port here :
http://boards.dingoonity.org/gcw-development/desmume-for-gcw0-proof-of-concept/

Desmume does not require any bios files.

Juggalo.Gamer.23

  • *
  • Posts: 79
Re: MelonDS DS emulator - Proof of Concept port
« Reply #4 on: December 30, 2017, 01:53:46 am »
where can i get the bios you used? or do i have to get them off my DS Lite?
and i followed them exactly and it still didn't work

gameblabla (OP)

  • **
  • Posts: 766
Re: MelonDS DS emulator - Proof of Concept port
« Reply #5 on: December 30, 2017, 05:31:06 am »
where can i get the bios you used? or do i have to get them off my DS Lite?
and i followed them exactly and it still didn't work
The ones from loveroms should work (assuming you own a ds obv), except that the 2 bioses don't have the correct filenames and extensions.
biosnds7.rom
biosnds9.rom
Rename them to :
bios7.bin
bios9.bin

Make sure its in lower case, it has the bin extension rather than the rom extension, and make sure they're in /usr/local/home/.config/melonds.
Also, i don't know what NDS games you're trying to run.
If that's Pokemon Black 2, it's not going to work, melonDS isn't compatible with that game yet i think.

Juggalo.Gamer.23

  • *
  • Posts: 79
Re: MelonDS DS emulator - Proof of Concept port
« Reply #6 on: December 30, 2017, 08:07:10 pm »
i was trying Super Mario 64 DS i'll try everything again but if it still doesn't work maybe ill wait
awhile till it's all figured out and everything is all worked out with this emulator

Juggalo.Gamer.23

  • *
  • Posts: 79
Re: MelonDS DS emulator - Proof of Concept port
« Reply #7 on: December 30, 2017, 08:16:31 pm »
i got it to work thanks so much! obviously it's not working at full speed lol just happy that it's working
can't wait till it's fully figured and worked out

StapleButter

  • Posts: 3
Re: MelonDS DS emulator - Proof of Concept port
« Reply #8 on: January 04, 2019, 02:11:14 pm »
melonDS author here! sorry for the bump tho.

Hopefully, this will convince melonDS devs to work on an OpenGLES hardware renderer. (unlike Desmume devs...)
there's already an OpenGL renderer planned. that being said, I'd like to know what the target hardware here supports. the renderer being planned will be using compute shaders, so it needs to support that.

we can always build an alternate renderer using more 'conventional' OpenGL to yield more compatibility with lower-grade hardware, but it would remain imperfect due to how quirky the original DS GPU is.


edit- shit, that's a really bad bump. I didn't realize 2017 was one whole year ago and not a few days ago. feel free to outright ban me if that's an issue.
« Last Edit: January 04, 2019, 02:13:39 pm by StapleButter »

Surkow

  • * Administrator
  • Posts: 585
Re: MelonDS DS emulator - Proof of Concept port
« Reply #9 on: January 04, 2019, 02:34:41 pm »
melonDS author here! sorry for the bump tho.

Hopefully, this will convince melonDS devs to work on an OpenGLES hardware renderer. (unlike Desmume devs...)
there's already an OpenGL renderer planned. that being said, I'd like to know what the target hardware here supports. the renderer being planned will be using compute shaders, so it needs to support that.

we can always build an alternate renderer using more 'conventional' OpenGL to yield more compatibility with lower-grade hardware, but it would remain imperfect due to how quirky the original DS GPU is.


edit- shit, that's a really bad bump. I didn't realize 2017 was one whole year ago and not a few days ago. feel free to outright ban me if that's an issue.
The GPU is a Vivante GC860, which is only capable of OpenGL ES 2.0. Due to memory bandwidth problems most developers resort to batching gles calls or simply switch to softrendering (which is faster in some cases, like with pcsx4all, quake, doom, etc).

StapleButter

  • Posts: 3
Re: MelonDS DS emulator - Proof of Concept port
« Reply #10 on: January 04, 2019, 06:15:37 pm »
ouch.

well then, considering how things are when emulating the DS GPU, that sounds like it's doomed to fail.

basically the DS sorts polygons in some fancy way that will guarantee suboptimal ordering from a "save on config changes/draw calls" point of view.

for the average 3D game, though, you can do without Y-sorting, and if you're only separating opaque/translucent polygons, it would turn out OK. but, some games have UIs that rely on Y-sorting for proper layering.

Surkow

  • * Administrator
  • Posts: 585
Re: MelonDS DS emulator - Proof of Concept port
« Reply #11 on: January 04, 2019, 08:11:35 pm »
ouch.

well then, considering how things are when emulating the DS GPU, that sounds like it's doomed to fail.

basically the DS sorts polygons in some fancy way that will guarantee suboptimal ordering from a "save on config changes/draw calls" point of view.

for the average 3D game, though, you can do without Y-sorting, and if you're only separating opaque/translucent polygons, it would turn out OK. but, some games have UIs that rely on Y-sorting for proper layering.
Does it help that the included Ingenic JZ4770 SoC has a secondary 500mhz general purpose MIPS core? Maybe part of the rendering or audio can be offloaded there. It only has access to a small amount of dedicated memory via a TLB.

StapleButter

  • Posts: 3
Re: MelonDS DS emulator - Proof of Concept port
« Reply #12 on: January 04, 2019, 11:29:20 pm »
yup, one could well try to run the software 3D renderer on that second core, with appropriate sync. that would give it a bit of a speedup already.

from my profiling/testing, audio generation is hardly a bottleneck at all, so I doubt it's worth offloading.

I guess, seeing the characteristics of the target hardware, that to reach 60FPS one would need to start modifying the melonDS core to sacrifice some accuracy for more speed. or just build a different core entirely.

gameblabla (OP)

  • **
  • Posts: 766
Re: MelonDS DS emulator - Proof of Concept port
« Reply #13 on: January 19, 2019, 11:44:29 am »
Honestly, i think this is hopeless without significant work. Also, the VPU is also woefully documented.
As it is, the games on both MelonDS & Desmume run at about 2~3 FPS.
I don't remember what was the bottleneck on MelonDS but when i profiled Desmume,
the interpreter was by far taking most of the CPU cycles, followed by the renderer.
I don't think we would need perfect accuracy for games (and we could always resort to specific game hacks) but even then, it would require like two JIT engines, preferably the ARM7 one running on the VPU and the ARM9 on the main cpu.
We already have an ARM7 recompiler available for MIPS32 but no such thing for the ARM9.

I hope Exophase releases his source code for Drastic because i think that's the only emulator that could potentially be made to run in an acceptable way. But If you want to tackle this task @StapleButter then be my guest.

 

Post a new topic