Homebrew lolSnes -- SNES emulator for DS

VMM

Hamon > Stand
Member
Joined
Jul 1, 2010
Messages
3,132
Trophies
2
Age
33
XP
2,243
Country
Brazil
LOLSNES is a great name.


Dude, why have you quoted a post so old?
This discussion is over, the name is already set, it's not going to change.
I think lolsnes is a terrible name and extremely unoriginal, but that's my opinion,
just as your's that it's a good name, discussing it won't go anywhere.
 

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
It's original, and it should be LOL because even if it were to ever run at 100%, it'll never be able to show all the snes game pixels, thus it's LOL Graphics.


Also keep in mind that given the DS' power, the fact it's as good as it is thus far is pretty amazing :D
 

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
Long time no news.

I'm busy with real life. It's getting a bitch, projects everywhere, blarg.

Then there are also other non-RL projects, like Blargboard or MKDS revival. I'd like to get those somewhere too.


About lolSnes, what is there to say? It's reaching a point where improving it will become tricky.

Weird issues happen in some games. Like, in Super Metroid, layers don't scroll properly. Those are likely annoying sync issues. At this point, given the amount of things the PPU does at each HBlank and VBlank, it sometimes desyncs if emulation is slow enough. And there's not much I can do against that. Aside from adding more code against those cases, which in turn slows it down and makes desyncs more likely.

SMW runs well, as well as a few other games I tested, but the compatibility list is discouraging. I figure it'd need an update, though, as the games were all tested with an old revision. Since then, the IRQ related fixes probably helped in many games.

And then there's the performance issues. SMW suffers from slowdowns when many enemies are onscreen. And that's not all: DKC periodically suffers from major slowdown. I don't get what's happening, the game runs at fullspeed on SNemulDS. At this point I'd need a proper profiler to understand what's taking so much time. I hope it's not the ROM cache fucking up, I thought I had finally gotten that thing right.

The audio side suffers from slowdown too. Yes, it produces better sound than SNemulDS. But it's more prone to slowdowns.

At this point, given both CPU cores are written in ASM and fairly well optimized, I don't know what else I could do. I could rework the CPU cores to use the ARM's status flags instead of emulating them, but I don't know what the benefit of that would be. ALU operations would benefit from it for sure, but the rest would need to save and restore the CPSR. Not to mention that some instructions don't update all the flags, and on the other hand it seems that ARM instructions either update all the flags or don't update them at all. Doing it properly would basically end up as: read CPSR, OR/AND it with immediate values, write it back.


So basically, I don't quite know where to go.
 

Shicky256

Well-Known Member
Member
Joined
Oct 13, 2013
Messages
140
Trophies
0
Age
34
XP
192
Country
United States
Honestly, I think the best route would be to make special optimized emulators for several popular games, e.g. Super Mario World, All-Stars, Super Metroid, etc. You wouldn't have to worry about graphics modes- just pick whatever mode would be required for that specific game. This would make the code not overbearing, and thus you wouldn't have to worry about compatibility.
 
  • Like
Reactions: ipwndeveloper

ipwndeveloper

Well-Known Member
Member
Joined
Jun 3, 2013
Messages
276
Trophies
0
Age
35
Location
San Fransisco, CA
Website
gb4iphone.x10.mx
XP
189
Country
United States
Honestly, I think the best route would be to make special optimized emulators for several popular games, e.g. Super Mario World, All-Stars, Super Metroid, etc. You wouldn't have to worry about graphics modes- just pick whatever mode would be required for that specific game. This would make the code not overbearing, and thus you wouldn't have to worry about compatibility.
The best idea, that would be almost a pain to implement:
Autodetect ROM via MD5, based on this have a generic loader for unrecognized games, and specialized loaders for more complex/specialized games similar to gbaemu4ds, except for automated via argv and md5.

also if I recall correctly, you can save some resources by completely shutting off the bottom screen re-allocating the resources to the top. It would not be much, but look at how many things have been done with 4mb Ram and 66mhz processor.
 

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
I had similar ideas. Making separate emulators for popular games. Hell, one could even use static recompilation to achieve fullspeed. I don't think it's possible to fully ditch the interpreters though, as there are cases of self-modifying code. Handling that would require very clever and complex algorithms.

One would then build a NDS ROM out of the emulator template and a SNES ROM, pretty much like with SnezziDS. The emulator template could then be configured with stuff like PPU settings, to better match the game.

Another issue static recompilation would raise is timing. Some SNES games rely on precise timings to work properly.


As for reusing the bottom screen's resources, it'd only be useful for saving power and postprocessing the SNES video output. The bottom screen only uses VRAM bank H, and that bank can't be mapped to the top screen.

Oh and postprocessing isn't even possible. It requires using two of the VRAM banks A, B, C and D. Banks A, B and D are used by the PPU, and bank C is used by the SPC700 (the thing just can't fit in the original 96KB, considering it needs a whole 64KB to emulate the SPC700 RAM).
 

ILuvGames

The Avatar-less One
Member
GBAtemp Patron
Joined
Nov 13, 2011
Messages
658
Trophies
2
Location
London
XP
2,217
Country
United Kingdom
The Snes was slow, anyway. I thought it used an extended version of the 8-bit 6502 used in the NES because Nintendo wanted backwards compatibility.
 

gego51

Member
Newcomer
Joined
Oct 14, 2013
Messages
6
Trophies
0
Age
34
Location
Reims, France
XP
60
Country
France
I had similar ideas. Making separate emulators for popular games. Hell, one could even use static recompilation to achieve fullspeed. I don't think it's possible to fully ditch the interpreters though, as there are cases of self-modifying code. Handling that would require very clever and complex algorithms.

One would then build a NDS ROM out of the emulator template and a SNES ROM, pretty much like with SnezziDS. The emulator template could then be configured with stuff like PPU settings, to better match the game.

Another issue static recompilation would raise is timing. Some SNES games rely on precise timings to work properly.


As for reusing the bottom screen's resources, it'd only be useful for saving power and postprocessing the SNES video output. The bottom screen only uses VRAM bank H, and that bank can't be mapped to the top screen.

Oh and postprocessing isn't even possible. It requires using two of the VRAM banks A, B, C and D. Banks A, B and D are used by the PPU, and bank C is used by the SPC700 (the thing just can't fit in the original 96KB, considering it needs a whole 64KB to emulate the SPC700 RAM).


with the 3ds, it's possible to use 3ds or dsi hardware on ds mode?
 

Sora de Eclaune

All our splendor...
Member
Joined
Feb 15, 2011
Messages
2,850
Trophies
1
Location
Home
Website
www.youtube.com
XP
1,192
Country
United States
Honestly, I think the best route would be to make special optimized emulators for several popular games, e.g. Super Mario World, All-Stars, Super Metroid, etc. You wouldn't have to worry about graphics modes- just pick whatever mode would be required for that specific game. This would make the code not overbearing, and thus you wouldn't have to worry about compatibility.

This would be amazing to have. It could basically mean each game gets the best experience.

For similar-engine games, there could even be just one emulator for all of them. For example, every volume of Picross NP is identical except for the puzzles.
 

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,464
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,316
Country
Just wanted to note that Pocky & Rocky has become playable since the previous report (I'm using the 2014/01/01 build). The story cutscenes between stages will not display (push Start to skip them), but gameplay is largely unaffected; occasional layer problems and some flickering/slowdown when the game is busy, but seems entirely playable so far. Overall I'd say it performs better than in SNEmulDS, where the story sequences do work, but there's graphical issues that make the game difficult to play.

Donkey Kong Country also seems to be working, with some background glitching and overall quite slow.

EDIT: Another handful of games on the "largely working" pile.

Nichibutsu Arcade Classics (arcade compilation of Moon Cresta, Crazy Climber and Frisky Tom) is 2/3 working, with only Frisky Tom unplayable, throwing a Guru Meditation Error. Frisky Tom sucks, so too bad. The games run slow, but otherwise performs the same as SNEmulDS--Frisky Tom won't run on SNEmulDS, either.

Nichibutsu Arcade Classics 2 (which is only one game, Heiankyo Alien, so the title is weird) also seems to work perfectly aside from running slow. SNEmulDS can also run this one, and full speed, but it's a start.

Tetris & Dr. Mario half works. You can play the hell out of Tetris. It's a bit hard because the bottom of the well is slightly off-screen, but that's not an emulation issue. Seems to be full speed. (Both games work in SNEmulDS.)

But saving the best for last: the absolute classic Soul Blazer appears to be very much playable in lolSnes. The game runs at full speed and seems perfect in terms of gameplay. The sound is kind of crunchy/static-y and sometimes messes up entirely. Besides that, lolSnes's lack of transparency support means the clouds are fully opaque. The latter probably continues to be an issue throughout; from memory, the final dungeon has a transparent effect over it too. That said, it's Soul Blazer on the DS! For what it's worth, SNEmulDS is useless here, displaying only a black screen.
 

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
Sounds cool! The compatibility list definitely needs an update.


Speaking of lolSnes, well. Dunno where that is going. I have ideas to improve the PPU emulation and the overall speed, that I'd like to try out.

But at this point, is it worth continuing? 3DS homebrew is beginning to surface, and if that gets easily accessible, you'll get good SNES emulators there. No speed issues, no inaccurate graphics, no 'how to fit the 256x224 SNES screen into the 256x192 DS screen', no more of all those problems.

On the other hand, it's too early to tell how 3DS homebrew will be going. Chances are it'll be like the DS, requiring you to get a linker likened with piracy. Chances are it'll be like the Wii, easily softmoddable. But chances are also that it'll be like the DSi, ie unhackable unless you have the right firmware version or the right game. (although the DSi mostly remained in that status due to lack of interest)


Oh well. I figure there is a reason to continue lolSnes until 3DS homebrew becomes widely available. But then, as I said, things get tricky.
 

_47iscool

Noticer
Member
Joined
Nov 18, 2013
Messages
680
Trophies
1
XP
1,158
Country
United States
How about a plugin system? You know, sort of like gbaemu4ds. Only load the needed functions or whatever for games that need them instead everything at once.
 

Ulieq

Well-Known Member
Member
Joined
Jan 14, 2014
Messages
405
Trophies
1
Location
Los Angeles, California
XP
524
Country
United States
Just drop the project. DS doesn't have the resolution to display the game correctly, so there's no reason to try. 3ds and phones are here. I rather someone work on a gba emulator for the ds.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
    +1
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
  • Psionic Roshambo @ Psionic Roshambo:
    @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87 cents. Free shipping from China... It arrived it works and honestly I don't understand how it was so cheap.
    +1
    Psionic Roshambo @ Psionic Roshambo: @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87... +1