Homebrew lolSnes -- SNES emulator for DS

profi200

Banned!
Banned
Joined
Sep 3, 2011
Messages
330
Trophies
0
XP
282
Country
Gambia, The
Wow, this is awesome! One of the first games, which should run, is definitely Super Metroid. The sprite priority handling of SNEmulDS is shit. Hope you can get it working better ;) Oh, and btw. Please include a option to disable sound interpolation. I don't like interpolation.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Wow, this is awesome! One of the first games, which should run, is definitely Super Metroid. The sprite priority handling of SNEmulDS is shit. Hope you can get it working better ;) Oh, and btw. Please include a option to disable sound interpolation. I don't like interpolation.


If the DS can handle it being on or off with this emulator, it would be a first for sure. It has a lot of potential :P
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,565
Country
Chile
That's still not quite right... I'd recommend you learn a bit about hex and that stuff ;).



Trust me I do it everyday ;), it's just this is my first time guessing how NDS works internally. Not that easy considering this project is 5 years old, and lots of opcodes are directly translated on ARM asm.
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
751
Country
United States
So hey, I'm a huge "SNES emulation on the GBA and DS" nut for some reason (I think this was the first video I made about it). I haven't visited GBATemp in the past half-week, so I apologize for the delayed response.

A lot of the issues you're going through seem to be the same issues faced by SNES DS, SnezziDS, and SNEmulDS that were eventually resolved. I would like to offer the following link to Snezziboy's SourceForge page which should offer sourcecode downloads for help, even though it's all in ARM7 assembly: http://sourceforge.net/projects/snezziboy/

Random side note: If I remember correctly, only SMW and the first two levels of Donkey Kong Country actually care about this "background color" property. All other games I tested had no difference when toggling that specific setting in Snezziboy.

Best of luck to you dude. I'll be checking in much more often now that I know of this project's existence.

EDIT: I'm probably one of the few people left who still understand the format of the snesadvance.dat file. If you have any questions about it, let me know. Long story short, the first fields are for the game's checksum and human-recognizeable name, and the last field is all the speedhacks and sound fixes and such. Everything in the middle is specific to SNES Advance and was stuff like proper graphics layering settings and main character autoscroll settings. So it's the first, second, and last fields you want to concern yourself with.

EDIT 2: of course, SNEmulDS managed to auto-detect about 90% of the idle loops that make up the vast majority of the speedhacks in the "snesadvance.dat" file, rendering that file obsolete. I don't know how he managed to detect them all, but it was a much more preferable solution to having a hardcoded patch file.
 
  • Like
Reactions: VatoLoco

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
751
Country
United States
If anyone is curious as to the way SNES games can be "speedhacked" by emulators like this I did make a video about this several years ago (I do apologize for the intense volume increase halfway through)



Hopefully I strike a good balance of being technical enough to explain things thoroughly without sounding like I'm just spouting jargon the whole time.

EDIT: To the author here, snesadvance.org is still alive. Loopy's "technotes.txt" file there may help.
 

Arisotura

rise of melonism
OP
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
France
Cool! I'm enjoying it too, feels like a challenge to emulate the SNES as closely as possible on a DS :) That must be even trickier on the GBA considering it only has 25% of the DS's ARM9 power, and there's no way sound can be emulated there...

I have seen those emulators' sources already, infact the design of lolSnes' CPU core is inspired by those. It's not a direct rip-off though, there are several differences in the way they work...

As for snesadvance.dat, I considered adding support for it, but yeah, doing speedhacks automatically sounds like a better option. lolSnes has some support for that. The technique is actually the same as in SNES Advance, except it's applied automatically. It can recognize two forms of idle loops, hopefully it should cover several games.

And graphics layering, ah, that's the main issue, with that per-tile priority thing. I have a few tricks in mind for emulating that that should work for most games, but if not, there'll have to be game-specific hacks. And then come more insane features, like offset-per-tile. Blarg.

Anyway, thanks!


-----------------------------------------------


lolSnes 1.0 is out.

It supports SRAM with auto-saving, and it has a basic ROM selection menu (renaming ROMs around was becoming a major pain in the ass).

What else is there to say? Graphics support is still incomplete (namely, no mode 7, no windows, etc), no sound, and I hope to fix those lacks in the next version.

Get it from the link in the main post. Feedback is welcome.
 
  • Like
Reactions: the_randomizer

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Cool! I'm enjoying it too, feels like a challenge to emulate the SNES as closely as possible on a DS :) That must be even trickier on the GBA considering it only has 25% of the DS's ARM9 power, and there's no way sound can be emulated there...

I have seen those emulators' sources already, infact the design of lolSnes' CPU core is inspired by those. It's not a direct rip-off though, there are several differences in the way they work...

As for snesadvance.dat, I considered adding support for it, but yeah, doing speedhacks automatically sounds like a better option. lolSnes has some support for that. The technique is actually the same as in SNES Advance, except it's applied automatically. It can recognize two forms of idle loops, hopefully it should cover several games.

And graphics layering, ah, that's the main issue, with that per-tile priority thing. I have a few tricks in mind for emulating that that should work for most games, but if not, there'll have to be game-specific hacks. And then come more insane features, like offset-per-tile. Blarg.

Anyway, thanks!


-----------------------------------------------


lolSnes 1.0 is out.

It supports SRAM with auto-saving, and it has a basic ROM selection menu (renaming ROMs around was becoming a major pain in the ass).

What else is there to say? Graphics support is still incomplete (namely, no mode 7, no windows, etc), no sound, and I hope to fix those lacks in the next version.

Get it from the link in the main post. Feedback is welcome.


For testing, would it be okay for me to test on Desmume since I uh, don't have any way of loading on a real DS or would that not be efficacious? :unsure:
 

Arisotura

rise of melonism
OP
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
France
You can run it on desmume, but you need a good PC-- emulator on emulator is not something light to run. Even on my quad core powered PC, it doesn't always reach fullspeed.

Also, desmume may ignore some crashes that would cause a 'Guru Meditation' error on the DS, because it doesn't emulate memory protection.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
You can run it on desmume, but you need a good PC-- emulator on emulator is not something light to run. Even on my quad core powered PC, it doesn't always reach fullspeed.

Also, desmume may ignore some crashes that would cause a 'Guru Meditation' error on the DS, because it doesn't emulate memory protection.


Oh, my PC is plenty powerful, I don't have a flash cart to test it on though. Ugh, maybe it's not such a good idea for me to test it on Desmume after all. :huh:
I'd love to test, I really would, but....yeah like you said, lack of memory protection emulation....yeah. Damn.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
That isn't a problem. It only makes a difference if a ROM malfunctions.


But not actual actual emulation for Snes hardware (DSP, CPU, DMA, etc)? Well, in that case, I can definitely test games out after all and post results of what I test in this thread (or another one if need be). B-) I mean, if that's what you want me to do ;)
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Go ahead and post results in this thread :)


Cool, cool, will do! How does having multiple ROM files work in the ROM folder? Don't they all have to be named ROM.smc, esp. when testing with Desmume? I mean, do I do it the same way I did before? Sorry for the numerous questions, I just want to make sure I test this right. :D

lolsnes folder, then roms/rom.smc or can there several ROM files in the same folder?
 

Aqua1234

Well-Known Member
Member
Joined
Aug 8, 2013
Messages
122
Trophies
0
Age
36
XP
113
Country
Canada
Alright, downloaded this installed it on my Root of my R4 card for my DS Lite. Played Super Mario World for about 5 minutes, it works perfect. However there is no sound, and that sucks :/. Does anyone know why?
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Alright, downloaded this installed it on my Root of my R4 card for my DS Lite. Played Super Mario World for about 5 minutes, it works perfect. However there is no sound, and that sucks :/. Does anyone know why?


Please read the first post, there is no sound emulation yet, he has to implement it, so we need to wait. Right now, we're testing ROMs mostly.


What is currently supported
* CPU -- 99% (all opcodes emulated; may miss a few unimportant bits about timing)
* PPU -- ~40% (mode 1 BGs, OBJs, mosaic, master brightness, giant kludge for BG3 prio)
* SPC700 -- 80% (most useful opcodes implemented, CPU/SPC I/O, timers)
* DSP -- 0% (yep, no sound)
* SRAM with auto-saving


I however, am confident SPC700/S-SMP can be done. I'll help with testing.
 

Arisotura

rise of melonism
OP
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
France
Hoping to do sound for the next version :)

Also, the ROMs can be named anything. They just have to be in a folder named 'snes'.

Oh and you can't complete SMW. Autoscroll malfunctions in Donut Plains 2, and that bug probably affects every autoscrolling level in the game. (except the second part in Iggy's Castle apparently...)
 
  • Like
Reactions: the_randomizer

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: