Mesen-S - SNES Emulator
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: Mesen-S - SNES Emulator
I was looking through Super Metroid's code and I came across BRK #$9C. To my understanding BRK shouldn't have an operand, so is this a disassembly error in the debugger or is there another reason why it is displayed this way?
Also, would it be possible to add options in the debugger to hide RAM and mirror areas to make the overall length of the disassembly window shorter. If I remember correctly on LoROM simply hiding mirrors would already shorten the length almost 50% shorter since the $80:0000 - $FF:FFFF region mostly is mirrored to $00:0000 - $7F:FFFF, the only exception might be the work RAM and SRAM since they don't mirror (probably). I'm not sure if the entire $00:0000 - $FF:FFFF is displayed on the debugger, but also hiding areas that aren't mapped to anything could shorten the list a good amount as well.
EDIT: By the way, does Mesen-S have a display for how much of the ROM is logged as code, data, graphics, etc. ? I'm pretty sure Mesen did have that feature on the debugger.
Also, would it be possible to add options in the debugger to hide RAM and mirror areas to make the overall length of the disassembly window shorter. If I remember correctly on LoROM simply hiding mirrors would already shorten the length almost 50% shorter since the $80:0000 - $FF:FFFF region mostly is mirrored to $00:0000 - $7F:FFFF, the only exception might be the work RAM and SRAM since they don't mirror (probably). I'm not sure if the entire $00:0000 - $FF:FFFF is displayed on the debugger, but also hiding areas that aren't mapped to anything could shorten the list a good amount as well.
EDIT: By the way, does Mesen-S have a display for how much of the ROM is logged as code, data, graphics, etc. ? I'm pretty sure Mesen did have that feature on the debugger.
Avatar is pixel art of Noah Prime from Astral Chain
-
- Posts: 1565
- Joined: Tue Feb 07, 2017 2:03 am
Re: Mesen-S - SNES Emulator
BRK has an param and adds 2 to the return address. Thus brk can be used to skip a byte if needed and you have an RTI BRK handler. It does nothing with said byte and it won't read it, so its a 1 byte instruction with an immediate param
Re: Mesen-S - SNES Emulator
I don't really get the point, but it can still cause incorrectly displayed code if the "BRK operand" is actually the next opcode. In this case a branch jumps over the BRK instruction. The BRK code itself is a JML instruction pointing to itself. I guess the debugger needs a check to see if the byte after BRK is executed an use that to judge how the code should be displayed.
Avatar is pixel art of Noah Prime from Astral Chain
Re: Mesen-S - SNES Emulator
Mesen-S github repository is now archived.
https://github.com/SourMesen
https://github.com/SourMesen
-
- Posts: 611
- Joined: Mon Jan 23, 2006 7:47 am
- Location: Germany
- Contact:
Re: Mesen-S - SNES Emulator
6502 was designed to do as much as possible with a very limited transistor count. As a result it sometimes appears inefficient or confusing.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
-
- Posts: 1565
- Joined: Tue Feb 07, 2017 2:03 am
Re: Mesen-S - SNES Emulator
No this time BRK is very intentionally doing it, I'm fairly convinced.
If you have a EPROM that starts set and is programmed "lo" this allows you to patch about a byte or instruction by re programming all bits to 0. Saving lots of time and money back when it really mattered. In 2020 yeah pointless, 1975 quality of life feature through a through.
also software interuppts are a common paradigm for sys calls. i.e the IBM BIOS has INT 10h and INT 21h etc to do graphics, allocate memory, load files etc so if you want to use that system on a 6502 you can do
BRK #$21
and then you read the byte after BRK by doing a stack lookup and then fetch the byte. Some Assemblers back in the day added "software opcode" and extensions that used BRK Dispatch.
However 99% of the time you would disassemble it as a single byte. And the BRK #XX feature was "replaced" with the COP #XX on the 65816.
If you have a EPROM that starts set and is programmed "lo" this allows you to patch about a byte or instruction by re programming all bits to 0. Saving lots of time and money back when it really mattered. In 2020 yeah pointless, 1975 quality of life feature through a through.
also software interuppts are a common paradigm for sys calls. i.e the IBM BIOS has INT 10h and INT 21h etc to do graphics, allocate memory, load files etc so if you want to use that system on a 6502 you can do
BRK #$21
and then you read the byte after BRK by doing a stack lookup and then fetch the byte. Some Assemblers back in the day added "software opcode" and extensions that used BRK Dispatch.
However 99% of the time you would disassemble it as a single byte. And the BRK #XX feature was "replaced" with the COP #XX on the 65816.
Re: Mesen-S - SNES Emulator
It's a real shame that the quitting happened so suddenly and we didn't get a final 0.5.0 release. There were a lot of fixes since 0.4.0, and the latest dev build has a rather nasty regression that affects a lot of titles including SMW, Super Metroid, and Chrono Trigger.
- NovaSquirrel
- Posts: 483
- Joined: Fri Feb 27, 2009 2:35 pm
- Location: Fort Wayne, Indiana
- Contact:
Re: Mesen-S - SNES Emulator
Sour mentioned on Reddit that he could still end up doing a "final" release that packages up the dev build fixes. He also mentioned on Discord that I could get my own improvements into the final release as well.FitzRoy wrote: ↑Sun Oct 18, 2020 11:42 am It's a real shame that the quitting happened so suddenly and we didn't get a final 0.5.0 release. There were a lot of fixes since 0.4.0, and the latest dev build has a rather nasty regression that affects a lot of titles including SMW, Super Metroid, and Chrono Trigger.
Re: Mesen-S - SNES Emulator
That is complete nonsense. It is NOT illegal to tell someone where they can get ROMs and it is NOT illegal to download and play those ROMs, although it is illegal in the US to upload those files to someone else. So you can receive them but you can't give them. Same with movies and mp3s, it's the sharing that causes problems, not the getting.Hamtaro126 wrote: ↑Fri Aug 28, 2020 9:56 pmSorry, it's illegal to tell someone where ROMs are on the internet, There are search engines for this, I perfer DuckDuckGo!!!thewhitedragon69 wrote: ↑Fri Aug 28, 2020 9:25 pm Where can I get ROMs for the Mesen-S? I love Mesen and have a bunch of games, but can't find game ROMs for SNES anywhere (just bogus malware sites). Anyone know where good, safe ROMs are?
Even then, You need to have common sense, Do NOT download unless you own the games itself, If you own the game cartridges, the Images can be extracted from your own ROM (Advanced soldering and equipment knowledge required!!!) or can be downloaded (If a good place can be found)!!!
But Nintendo (and Sony, et al) has lots of lawyers and websites/forums like this one do not have the resources to resist the harassment that they can unleash so they bend to the pressure and disallow sharing of this information.
Re: Mesen-S - SNES Emulator
As Wikipedia's policy on linking to infringing copies explains, courts have found contributory infringement in hyperlinks. See Intellectual Reserve v. Utah Lighthouse Ministry (US, 2000) and GS Media v Sanoma (EU, 2016).
- Hamtaro126
- Posts: 818
- Joined: Thu Jan 19, 2006 5:08 pm
Re: Mesen-S - SNES Emulator
You are completely wasting your time whining, so Quit it and follow the rules!!!ansarya wrote: ↑Fri Apr 16, 2021 7:37 am That is complete nonsense. It is NOT illegal to tell someone where they can get ROMs and it is NOT illegal to download and play those ROMs, although it is illegal in the US to upload those files to someone else. So you can receive them but you can't give them. Same with movies and mp3s, it's the sharing that causes problems, not the getting.
But Nintendo (and Sony, et al) has lots of lawyers and websites/forums like this one do not have the resources to resist the harassment that they can unleash so they bend to the pressure and disallow sharing of this information.
To quote tepples said, about infringing links and asking for them:
tepples wrote: ↑Fri Apr 16, 2021 8:10 am As Wikipedia's policy on linking to infringing copies explains, courts have found contributory infringement in hyperlinks. See Intellectual Reserve v. Utah Lighthouse Ministry (US, 2000) and GS Media v Sanoma (EU, 2016).
AKA SmilyMZX/AtariHacker.
-
- Posts: 5
- Joined: Sat Nov 28, 2020 12:40 pm
Re: Mesen-S - SNES Emulator
Is there a way to download that anymore, or do I have to grab a lot of files from GitHub and run some compiler on them because the "Artifact" expired? I was highly interested in a Game Boy Mesen for the ability to view memory values mid-frame, but I'm not terribly code-savvy in general.bklD wrote: ↑Wed Aug 05, 2020 5:11 amYou have to use the development build: https://ci.appveyor.com/project/Sour/me ... /artifacts
- NovaSquirrel
- Posts: 483
- Joined: Fri Feb 27, 2009 2:35 pm
- Location: Fort Wayne, Indiana
- Contact:
Re: Mesen-S - SNES Emulator
I've got builds over on my fork - I guess I should go and do a release too so there's an updated version that isn't going to expire.Bag of Magic Food wrote: ↑Sun Jan 02, 2022 10:03 amIs there a way to download that anymore, or do I have to grab a lot of files from GitHub and run some compiler on them because the "Artifact" expired? I was highly interested in a Game Boy Mesen for the ability to view memory values mid-frame, but I'm not terribly code-savvy in general.bklD wrote: ↑Wed Aug 05, 2020 5:11 amYou have to use the development build: https://ci.appveyor.com/project/Sour/me ... /artifacts
Re: Mesen-S - SNES Emulator
What emulator are we using for romhacking now? Mesen-S got discontinued because a bunch of people whose entire hobby is based on stealing other people's code canceled it because he used someone else's code (hypocrites) while it was rapidly becoming the best debug/hack platform for SNES.
So what do we use now?
So what do we use now?
Re: Mesen-S - SNES Emulator
Sour has been hard at work making a new version of Mesen with support for both NES and SNES. It's not ready just yet, but you can expect it in the not too distant future.