Homebrew blargSnes -- SNES emulator for the 3DS (WIP)

Status
Not open for further replies.

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 gave it a try, and I may have missed something, but it didn't work. It basically just returned a 'not implemented' error code.

I also tried replacing the 0 value with APPID_APPLICATION and 0xFFFF8001, to no avail.


If this only works with APT:S, well, I'm fucked.
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,194
Country
New Zealand
I gave it a try, and I may have missed something, but it didn't work. It basically just returned a 'not implemented' error code.

I also tried replacing the 0 value with APPID_APPLICATION and 0xFFFF8001, to no avail.


If this only works with APT:S, well, I'm fucked.


It should work at least according to NSMB2. (SML3D doesn't use it)
 

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
Well then, I'd be curious to see how NSMB2 does it.

Given how much resources PPU emulation is taking, I fail to see how I'll be able to emulate sound without another severe performance hit if I can't offload that to something else than the appcore.


Unrelatedly, I guess I'm done with the 'PPU tidbits' part. Mode 3 and 256-color layers are done: http://i.imgur.com/Othvtn2.jpg -- this finally makes SMAS playable without having to choose a game blindly.

At this point, implementing modes 0/2/4 would be ridiculously easy, if we ignore offset-per-tile for a while.


I'm going to focus on the new scheduler I guess. Last big thing to do before a first release.
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,194
Country
New Zealand
Well then, I'd be curious to see how NSMB2 does it.

Given how much resources PPU emulation is taking, I fail to see how I'll be able to emulate sound without another severe performance hit if I can't offload that to something else than the appcore.


Unrelatedly, I guess I'm done with the 'PPU tidbits' part. Mode 3 and 256-color layers are done: http://i.imgur.com/Othvtn2.jpg -- this finally makes SMAS playable without having to choose a game blindly.

At this point, implementing modes 0/2/4 would be ridiculously easy, if we ignore offset-per-tile for a while.


I'm going to focus on the new scheduler I guess. Last big thing to do before a first release.


According to NSMB its arguments are:

cmdbuf[0] = 0x4F0080
cmdbuf[1] = 1
cmdbuf[2] = *percentage* (if you want the entire 30%, make it 30)

Bond697 had an extra entry in it which NSMB2 doesn't seem to have.
 

Bond697

Dies, died, will die.
Member
Joined
Jun 7, 2009
Messages
350
Trophies
0
Age
39
Location
CT
XP
464
Country
United States
yeah, i misread. just had another look. in my haste at work yesterday, or maybe a graphical glitch in remote desktop from scrolling around too fast, i definitely thought there were 2 strd instructions in a row.

e: while i'm here, if you wanted to check the amount of syscore time that was being used:

cmdbuf[0] = 0x500040
cmdbuf[1] = 1
 

cracker

Nyah!
Member
Joined
Aug 24, 2005
Messages
3,619
Trophies
1
XP
2,213
Country
United States
SNES Games always have a sprite layer, basic 3DS should just have the sprite layer in the front and thats it :)

bQDr9UR.png

Did you render that yourself or is there an emulator that gives an exploded view? I hope the latter because that looks pretty sweet.

Good job StapleButter! You're kicking some ass on this emulator. :grog:
 
  • Like
Reactions: Margen67

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,194
Country
New Zealand
Well then, I'd be curious to see how NSMB2 does it.

Given how much resources PPU emulation is taking, I fail to see how I'll be able to emulate sound without another severe performance hit if I can't offload that to something else than the appcore.


Unrelatedly, I guess I'm done with the 'PPU tidbits' part. Mode 3 and 256-color layers are done: http://i.imgur.com/Othvtn2.jpg -- this finally makes SMAS playable without having to choose a game blindly.

At this point, implementing modes 0/2/4 would be ridiculously easy, if we ignore offset-per-tile for a while.


I'm going to focus on the new scheduler I guess. Last big thing to do before a first release.

Just took a quick look and it seems your drawing the screen twice, why not just memcpy the first buffer to the second instead of calling the drawing methods again?

EDIT: NM misread your code.

Thank you two! I just tried it and it works like a charm. Amazing!
:)
 

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
Normmatt: Each time, it uses a different layer enable register for drawing the layers (PPU_MainScreen/PPU_SubScreen).

The SNES has two 'screens': main screen and sub screen. For each, the PPU draws the layers according to the corresponding layer enable register, and the two screens are mixed together, optionally with blending.

Emulating this is important because it also affects priorities. For example, in SMW, the background layer is enabled in the subscreen, and the other layers and sprites are enabled in the mainscreen. Ignoring the mainscreen/subscreen feature would cause some sprites (like those flying piranha plants that jump out of pipes) to appear behind the background when they should appear in front of it.

(you reminded me of the workarounds lolSnes used to make up for the lack of mainscreen/subscreen on the DS, heh)


Idaho: Exactly :)
 
  • Like
Reactions: DSoryu and Idaho

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 get the same screen transition as on the real thing. Garbage may show up inbetween though, as I don't emulate master brightness.


Also, fuck no. I can't use CSND. It's not listed in gw_workaround.rsf. And of course, adding it there doesn't work either (3DS menu just goes 'card has been ejected, press home to return to menu').

fuuuuuuuuck >_<
 

Doran754

Conform comrades
Member
Joined
Mar 19, 2014
Messages
1,256
Trophies
0
Location
UTS
XP
1,761
Country
United Kingdom
You get the same screen transition as on the real thing. Garbage may show up inbetween though, as I don't emulate master brightness.


Also, fuck no. I can't use CSND. It's not listed in gw_workaround.rsf. And of course, adding it there doesn't work either (3DS menu just goes 'card has been ejected, press home to return to menu').

fuuuuuuuuck >_<

I don't have a clue on what you are talking about, I just no you're doing a great job and you'll figure out whatever it is that needs to be done :) don't give up!
 

bobmcjr

Well-Known Member
Member
Joined
Apr 26, 2013
Messages
1,156
Trophies
1
XP
3,220
Country
United States
You get the same screen transition as on the real thing. Garbage may show up inbetween though, as I don't emulate master brightness.


Also, fuck no. I can't use CSND. It's not listed in gw_workaround.rsf. And of course, adding it there doesn't work either (3DS menu just goes 'card has been ejected, press home to return to menu').

fuuuuuuuuck >_<
I'm guessing that CSND has to be part of ServiceAccessControl? It's in SystemControlInfo. I find it odd they would leave CSND out since the microphone and camera appear to be included in ServiceAccessControl
 

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
Isn't there a DSP microcode set up by the firmware? (or does it use CSND?)

DSP would be tricky. I started looking into it, and well... it's a pain. The only documentation is littered with errors, the assembly language is weird and confusing, and half the disassembled code makes no sense.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    as to you
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
    The Real Jdbye @ The Real Jdbye: never had that i don't think