Next join an SNES dev team, and you'll see we're still doing a ton of research.lordgalbalan wrote:I thought it already was.
Virtue of converting ASM source to C?
Moderator: ZSNES Mods
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
If the SNES was so well documented you wouldn't be able to write crappy code and have it run in ZSNES when what you wrote was not allowed on the real hardware.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Even if we ignore oddities in the system itself, too many games for the SNES carried add-on chips in the carts for emulation to know exactly how the execution worked. The nice thing about optical disc-based systems is that the disc cannot contain hardware, only software.
Many, if not all, of these damn additional chips have no published specifications. The original documentation for the hardware immensely, immensely helps and it's simply not available.
Sometimes I wonder what it would cost to bribe either Nintendo or the original producer of the hardware for these decade+ old specs. That is, if Nintendo is the type of company to hold onto that kind of information (seems to me Nintendo is).
Many, if not all, of these damn additional chips have no published specifications. The original documentation for the hardware immensely, immensely helps and it's simply not available.
Sometimes I wonder what it would cost to bribe either Nintendo or the original producer of the hardware for these decade+ old specs. That is, if Nintendo is the type of company to hold onto that kind of information (seems to me Nintendo is).
Usually the major details can be found fairly quickly.
Do the data lines from the ROM go to the connector edge, or through a special chip? This tells you if the special chip is placed between the ROM and SNES, which doesn't have much purpose unless the special chip uses data from the ROM (like the SA-1 which can run code from it)... as opposed to the DSP-1,2,3,4 which isn't between the ROM and SNES, so it can only get data by the software sending data to it.
Similarly other details can be found without too much trouble. The SNES carts really don't have that many chips on them.
Looking at the hardware just gives you a rough over view of what it can possibly do. Which narrows the software search to see what it is actually being used for. Then you check assumptions by accessing the hardware, etc.
There's often a bouncing between the hardware and software point of view to check that assumptions are reasonable, and to eventually confirm ideas. Reverse-engineering isn't just tracing out a circuit board. Even with full schematics you need to be able to home in on the important parts otherwise you get lost in the details instead of learning how the system works.
Do the data lines from the ROM go to the connector edge, or through a special chip? This tells you if the special chip is placed between the ROM and SNES, which doesn't have much purpose unless the special chip uses data from the ROM (like the SA-1 which can run code from it)... as opposed to the DSP-1,2,3,4 which isn't between the ROM and SNES, so it can only get data by the software sending data to it.
Similarly other details can be found without too much trouble. The SNES carts really don't have that many chips on them.
Looking at the hardware just gives you a rough over view of what it can possibly do. Which narrows the software search to see what it is actually being used for. Then you check assumptions by accessing the hardware, etc.
There's often a bouncing between the hardware and software point of view to check that assumptions are reasonable, and to eventually confirm ideas. Reverse-engineering isn't just tracing out a circuit board. Even with full schematics you need to be able to home in on the important parts otherwise you get lost in the details instead of learning how the system works.
Wouldn't it take quite a bit less time than -several years-? I'm not saying it wouldn't represent a great deal of works, but several years? I mean, the Snes emulation "community" have quite a bit more experience and knowledge than they did when they first started out,no? They're not starting from nothing I mean.Nightcrawler wrote:We discussed this recently in another topic which slips my mind at this time.
Most people are in agreement that ZSNES's source code has lack of commenting and questionable organization.
The design choice of using assembly was a very good one at ZSNES's concepton. Remember, this was many years ago now.
The problem is what to do about it now. Porting ZSNES to C is like creating an entirely new emulator. That's why current plans only really call for porting a few things such as the GUI.
If you try and port the entire source to C, you are in fact creating an entirely new emulator. That would be an awful lot of work to start a new C based emulator and get it to match what ZSNES is now in terms of accuracy and compatibility and features. No one really wants to spend several years on that project, thus it's continued on in it's current form..
Edit: Of course, if your intend is to make a new -accurate- snes emu, that could take a while indeed. But just creating a "new" zsnes (in C), with all the imperfections and inaccuracies it presently have...well I dunno. I'm not a programmer.
As this discussion appears to have demonstrated, no one wants to rewrite ZSNES in C, and maybe that's not such a bad thing. What would help is a regularly scheduled release of the ZSNES dev team's research work about the workings of the SNES to the public. With this data people who want to program their own SNES emulator wherever or however they want to can, while making sure that they have the latest info about the hardware.
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
Yes, we definitely could use some updated documents in the scene. Many documents are outdated if not most all of them to some degree.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
I understand it's a hobby.I didn't say or implied the contrary. But I thought about an emulator like Kega, which got completely rewritten in (unless I'm mistaken) no more than a few months.Kagerato wrote:ZSNES is a hobby and an interest at best. There's no team of programmers working on it every day. Changes get implemented approximately "whenever the devs feel like it".
It would take years. Extract and examine the zsnes source sometime if you don't believe this.
I guess it all depends on how much hours a week/months the coder(s) are willing to invest in the project/hobby.
-
- Savestate Pimp
- Posts: 129
- Joined: Thu Jul 29, 2004 2:15 pm
- Contact:
By the same author? Because that's a big difference...Dmog wrote:I thought about an emulator like Kega, which got completely rewritten in (unless I'm mistaken) no more than a few months.
"Other people can give you more suggestions as I just lost all my motivation to respond further to this post."
[i] - Nightcrawler[/i]
[url=http://www.geocities.com/illegal_eagle_2003/]vSNES v2.00[/url]: My SNES savestate viewer.
[i] - Nightcrawler[/i]
[url=http://www.geocities.com/illegal_eagle_2003/]vSNES v2.00[/url]: My SNES savestate viewer.