Homebrew Attaching NES and GB roms to emulator core

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
Hi, I want to ask if someone can make a tool which enables a person to attach an NES and a GB/GBC rom to the core of nesDS and lameboy. For reference, perhaps the old SNES emulator SnezziDS is still remembered by some people. Basically with this SNES roms can be converted to NDS files and that's exactly what I want to do with NES and GB/GBC roms.

1) *.nes + nesDS core (pc tool) ---> *.nds (nes rom embedded)
2) *.gb + lameboy core (pc tool) ---> *.nds (gb rom embedded)

Now why the hell do I want that when I simply can choose a rom from the emulator gui?

Simply because I don't randomly play hundreds of pirated roms, but only a few favourites of mine. Oh, and I like NDS icons in the flash cart guis, especially when you can freely change them
smile.gif


Thanks.
 

Luigi2012SM64DS

G-old member
Banned
Joined
Aug 27, 2011
Messages
2,060
Trophies
0
Location
Minecrapt
XP
422
Country
Canada
T.Kuranari said:
Hi, I want to ask if someone can make a tool which enables a person to attach an NES and a GB/GBC rom to the core of nesDS and lameboy. For reference, perhaps the old SNES emulator SnezziDS is still remembered by some people. Basically with this SNES roms can be converted to NDS files and that's exactly what I want to do with NES and GB/GBC roms.

1) *.nes + nesDS core (pc tool) ---> *.nds (nes rom embedded)
2) *.gb + lameboy core (pc tool) ---> *.nds (gb rom embedded)

Now why the hell do I want that when I simply can choose a rom from the emulator gui?

Simply because I don't randomly play hundreds of pirated roms, but only a few favourites of mine. Oh, and I like NDS icons in the flash cart guis, especially when you can freely change them
smile.gif


Thanks.
it is possable in nesds but note that this version of nesds is VERY old
http://sites.google.com/site/danthemanms/n...?attredirects=0
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
Oh, didn't know there is version for nes games available. Hm.. it seems that saving is just work in progress and the overall compatibility and performance is worse than nesDS. Perhaps huiminghao can help me out here
smile.gif
 

avenir

Well-Known Member
Member
Joined
Dec 8, 2010
Messages
375
Trophies
0
XP
93
Country
United States
I can't understand you. Embedding rom file isn't good at all.
- Use nesDS menu
or
- Put nesDS as /moonshl2/extlink/nes.nesDS.nds then select nes in moonshell2
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
I don't mind if you don't understand me
smile.gif
No, the point of all of this is not to use nesDS menu. Telling me in this thread I should use nesDS menu shows that you missed the point here. Moonshell is not an option. Thanks for your reply though
smile.gif
 

avenir

Well-Known Member
Member
Joined
Dec 8, 2010
Messages
375
Trophies
0
XP
93
Country
United States
anyway nesDS now has special memory layout, so embedding isn't possible.
if you cannot accept one of my two options, just use that old version.
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
avenir said:
anyway nesDS now has special memory layout, so embedding isn't possible.
if you cannot accept one of my two options, just use that old version.
I don't see why one can claim why something like this isn't possible when it is perfectly possible. The source code is there, ndstool is there, NDS file system is well known and people with skill are also there. Seems like a piece of cake to me when you are a nds homebrew coder.

QUOTE(avenir @ Sep 15 2011, 05:41 PM) if you cannot accept one of my two options, just use that old version.
It's not that I can't accept your two options, it's just that they have absolutely nothing to do with what I want to achieve here, so I can't really consider them to be options
smile.gif
It's kinda the same as if a person asks if someone is willing to build him a boat because he wants to travel via the sea route from place A to place B without using his car and then gets the answer, "use your car".
 

Mbmax

Homebrew addicted
Member
Joined
Nov 7, 2006
Messages
2,275
Trophies
1
Website
Visit site
XP
413
Country
T.Kuranari said:
It's not that I can't accept your two options, it's just that they have absolutely nothing to do with what I want to achieve here, so I can't really consider them to be options
smile.gif
It's kinda the same as if a person asks if someone is willing to build him a boat because he wants to travel via the sea route from place A to place B without using his car and then gets the answer, "use your car".
The extlink option is exactly what you need, have you ever tried it ?
When you copy nes.nesDS.nds into /moonshl2/extlink/ folder every .nes files are launchable directly from moonshell.
The extlink launch nesDS and run directly the .nes.
 

jurassicplayer

Completionist Themer
Member
Joined
Mar 7, 2009
Messages
4,485
Trophies
1
Location
Pantsuland
Website
www.youtube.com
XP
2,917
Country
United States
T.Kuranari said:
I don't see why one can claim why something like this isn't possible when it is perfectly possible. The source code is there, ndstool is there, NDS file system is well known and people with skill are also there.
Right, you are talking to one of those people with skill that is there and he just told you that there is a special memory layout in the newer versions of nesDS.
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
This is not exactly what I want. I am not using Moonshell very often and don't want to depend on it. What I want is a way to make a rom and an emulator in one executable, kinda like Nintendos Virtual Console titles with own icons. That's it
smile.gif


jurassicplayer said:
T.Kuranari said:
I don't see why one can claim why something like this isn't possible when it is perfectly possible. The source code is there, ndstool is there, NDS file system is well known and people with skill are also there.
Right, you are talking to one of those people with skill that is there and he just told you that there is a special memory layout in the newer versions of nesDS.

You don't quite get it. With source code freely available everything is possible if it's allowed by the hardware. Meaning if the memory layout doesn't allow it, then just modify the memory layout so that it becomes possible
smile.gif
 

Mbmax

Homebrew addicted
Member
Joined
Nov 7, 2006
Messages
2,275
Trophies
1
Website
Visit site
XP
413
Country
T.Kuranari said:
You don't quite get it. With source code freely available everything is possible if it's allowed by the hardware. Meaning if the memory layout doesn't allow it, then just modify the memory layout so that it becomes possible
smile.gif
Hehe. you seems to think it's as simple as write words in a thread to code something.
Then, here you go ! Grab the source code and don't hesitate to rewrite everything.
wink.gif
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
If I could do this myself, this thread would not exist in the first place. The point of this thread is looking for someone who wants to make it happen and not to argue about whether or not it's possible, how hard it is to achieve or point out alternatives like using extlink/Moonshell
smile.gif
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
Now here comes the fun part. I replaced the nesDS.bin from the old nesDS package with the new nesDS.nds, renamed it to nes.bin and successfully embedded it to a nds file using ndstool. The rom doesn't work with emulators, but it works with flash carts
smile.gif
So how could that happen when the memory layout doesn't allow this
rolleyes.gif
?

Now all that is left is a bit fine tuning. I can't access any emulator settings when a rom is launched, so a version with either support for settings or a tool that lets you predefine the settings on the pc and embedd them into the executable would be awesome.

And finally a version for lameboy would be much appreciated
smile.gif


Edit: Actually I can access the settings, the only thing that doesn't work is saving, perhaps due to a missing nesDS.ini file or just because the rom is embedded. Will investigate.
 

huiminghao

Well-Known Member
Member
Joined
Mar 6, 2011
Messages
175
Trophies
0
Website
Visit site
XP
96
Country
Switzerland
Now, the nesDS does NOT support that. Some older nesDS(EX) versions could, but ONLY ONE rom can be attached and that is for developing/debugging nesDS. If you want to do that, you should follow this:
1. get the source from sourceforge.net
2. edit ./arm9/Makefile,
there is a line: CFLAGS += $(INCLUDE) -DARM9 #-DROM_EMBEDED
delete the char '#'
3. make a folder under arm9/source/, named 'nes'
4. copy the nes rom to the 'nes' dir
5. edit memory.s
some code like this:
romebd_s:
.incbin "fm.nes"
change the fm.nes to your own nes game.

6. use devkitARM to re-compile the whole project.

NOTE: I am not sure if it works well with the newer nesDS.
I dont have time to make such a tool, now....
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
Wow, thank you huiminghao for your reply and instruction, will test this asap
smile.gif



One more thing, actually I tried the newest nesDS with ndstool and the nesDS.exe from the package linked here and it indeed works. I tested it with several roms and they really work
smile.gif
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
First off I need to clear something up. In this package there are 7 files that let you embedd a rom to a nds file.

1) arm7.bin
2) arm9.bin
3) nesDS.bin
4) nesDS.exe
5) ndstool.exe
6) icon.bmp
7) make_nds.bat

I thought that the emulator core is the nesDS.bin which happens to be a renamed nesDS.nds file. I tested if newer versions of nesDS are compatible by replacing the nesDS.bin with the lastest nesDS from sourceforge and run the make_nds.bat with Super Mario Bros as rom file. To my surprise it worked and I got a fully working nds file. Now how can that be?

I discovered later that the nesDS.bin actually does nothing. I deleted it and ran again the make_nds.bat. Result: I got the same working nds file. The actual emulator core is not the nesDS.bin, but the nesDS.exe. So all the time when I thought I built a working nds rom with latest nesDS the truth is I always built it with the same old nesDS version.


Now as far as huiminghao instructions go, it cleary shows that embedding a rom file to latest nesDS is NOT "impossible due to a incompatible memory layout", but it's actually quite easy and works well
smile.gif
So I was right all the time. All that it takes is modifying 2 lines in the source code. Big thanks huiminghao, I new that you could help
smile.gif


The embedded rom files works exactly as if they were launched from the nesDS emu, but only lacks support for saving. Perhaps there is a workaround for this?
unsure.gif
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
752
Country
United States
Wow. I barely even remember making that "nesDS_snesDS_slot1_usage" package. Yeah, that was made back when DLDI was in its infancy. I'm actually rather flattered that someone saved that link for several years.

There is one way to "fake" a filesystem for modern programs using DLDI, but it's similarly ancient, and I'm pretty sure it's read-only, so you can't save your progress using either in-game saving or a savestate. The process is outlined at http://www.pocketheaven.com/ph/wiki/index....GBA_flash_carts

I believe there was a write-capable driver at some point (called FCSR2) but I know practically nothing about it other than the name.

EDIT: So apparently the DCEmu links are no longer valid. Give me a second, and I'll try to remember what was in those .zip files and re-upload them somewhere.

EDIT 2: They should be here, I think. http://www.zumodrive.com/share/euiGODg2ZD

Dwedit's "Add_to_disk_image.exe" is a better version of BFI which is called in the build.bat batch file, but I forgot the exact syntax for it. If BFI works for you, then go for it. If not, try add_to_disk_image.

EDIT 3: This wiki page might help. They copy-pasted my tutorial above but added some notes regarding FCSR2. http://dev-scene.com/NDS/FCSR_Tutorial

EDIT 4: This thread has instructions on the add_to_disk_image syntax and how to replace BFI.exe with it - http://www.pocketheaven.com/ph/boards/view...&highlight=
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
752
Country
United States
Random note: this thread alone is a huge example of the importance of self-documenting. My memory of FCSR is flaky as hell, and I'm glad I wrote things down back when I actually knew such things.

EDIT: Case in point, Pogoshell, from the GBA era. If Kuwanger ( http://kuwanger.net/gba/pogoshell/ ) didn't document his Pogoshell improvements, they could have easily been forgotten. I know nobody here really cares about Pogoshell, but the fact that the documentation exists means a lot.
 

T.Kuranari

Well-Known Member
OP
Member
Joined
Aug 30, 2011
Messages
150
Trophies
0
Website
Visit site
XP
7
Country
First off thank you very much for your kind help, I really appreciate it
smile.gif
Now I tried both the add_to_disk_image method described here and the method described here but I got the same error message in my command line window saying that "300000 cannot be syntactically processed at this point ". I have no clue what that means but trying to change 300000 in the bat file to another number doesn't work either and when I manually execute the add_to_disk_image.exe on the nds file it crashes
frown.gif


Will look into pogoshell shortly. Thanks again
smile.gif
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
752
Country
United States
Pogoshell won't help you at all here. I just mentioned it as a random side comment.

I've never heard of that error before. Maybe it's an issue with Windows Vista/7? *shrugs*
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • K3Nv2 @ K3Nv2:
    I liked the cameo the original cast did
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, I heard a member of the original cast died
  • K3Nv2 @ K3Nv2:
    Rest of the plot was just average
  • K3Nv2 @ K3Nv2:
    Egon was the best character
    +1
  • BigOnYa @ BigOnYa:
    My favorite was the Key master in the first one, "Ok, who brought the dog?" - Rick Moranis
  • K3Nv2 @ K3Nv2:
    Was way better than that ghostbusters: frozen in women power one
    +1
  • K3Nv2 @ K3Nv2:
    It was kind of a passing the torch idea which I didn't hate finally
  • BigOnYa @ BigOnYa:
    The old Ghostbuster video game was pretty good also, newer one is just ok.
  • K3Nv2 @ K3Nv2:
    Gotta be more specific nes one was garbage 360 was decent
  • BigOnYa @ BigOnYa:
    Yea 360/ps3 one I meant, I don't remember the Nes one tbh
  • BigOnYa @ BigOnYa:
    Yea I never played that one.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, me neither
    +1
  • The Real Jdbye @ The Real Jdbye:
    @K3Nv2 gotta be more specific, there were 2 on the NES and one of them was pretty decent
  • K3Nv2 @ K3Nv2:
    Well it's probably the one youtube link I posted
    +1
  • Xdqwerty @ Xdqwerty:
    deleted my newgrounds account
  • Xdqwerty @ Xdqwerty:
    bc of shame
  • K3Nv2 @ K3Nv2:
    You have shame?
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, made a new one
  • Xdqwerty @ Xdqwerty:
    yawn
  • BakerMan @ BakerMan:
    guys, who would win
  • BakerMan @ BakerMan:
    Every character from HH/HB (hazbin hotel/helluva boss) VS Dante (devil may cry), Doom Guy (doom) and V1(ultrakill)
  • K3Nv2 @ K3Nv2:
    Fairly odd parents
    K3Nv2 @ K3Nv2: Fairly odd parents