gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Misc > What if someone ported Snes9x (PSP) to the NDS?

#87560 - thundrestrike - Wed Jun 14, 2006 2:58 pm

The psp has a great snes emulator, pretty much compatible for every game almost. I know the source code is needed to port it, but hey, just search "snes9x source code" on google and there it is.

I personally don't know how, I'm just suggesting this to others with the knowledge.

Please post your thoughts. :)
_________________
popcorn

#87562 - Critical_Impact - Wed Jun 14, 2006 3:13 pm

I believe that PSP's use a different core type to DS which makes porting a little harder and optimization difficult

#87583 - tepples - Wed Jun 14, 2006 5:50 pm

PSP CPU: 222 MHz, overclockable to 333 MHz
Nintendo DS CPU: 67 MHz + 33 MHz
Which one is more likely to run full-software emulators at full speed?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#87587 - thundrestrike - Wed Jun 14, 2006 5:56 pm

point taken :P

but what are the main reasons SnesDS/SnezziBoy can't run games like Chronotrigger or Mario RPG?

is it possible to for someone to enhance SnesDS/Snezziboy in the future to emulate those special chips? Because the PSP can...
_________________
popcorn

#87591 - tssf - Wed Jun 14, 2006 6:08 pm

Because those games and SNESDS itself will not fit into Nintendo DS RAM.
_________________
Mathew Valente [TSSF]
------
Chrono Resurrection Musician

#87592 - knight0fdragon - Wed Jun 14, 2006 6:09 pm

1 reason is ram , the other is cpu, also not every1 is skilled enough for such a project
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#87603 - LiraNuna - Wed Jun 14, 2006 7:02 pm

You could half-port Snes9x.

Find out where it writes it's data to VRAM (gpu_write_byte?) and just re-direct the GFX to the DS's HW.

That is reasonable, since the PSP has to render the screen, while the DS is a tiled based system.

EDIT: the main reason of current SNES emulators for DS/GBA can't run Chrono Trigger (and many more games), is simply HDMA. I believe HDMA can be emulated on the DS with proper optimizations.

#87608 - Darkflame - Wed Jun 14, 2006 7:31 pm

Its all possible, the question is how easy, and is there anyone with the time to do it ?
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#87621 - fartz - Wed Jun 14, 2006 8:28 pm

Chrono trigger is not to big of a file for ds's ram its just not suported by snesds because of mode 7 witch snesds dousemt suport yet but its not impossible for it to be suported. With some work on snesds mode 7 can be suported and Snesds could run Chrono trigger fully + full speed.
_________________
I go to pet store and fart on puppys and kittys ^_^

#87627 - LiraNuna - Wed Jun 14, 2006 8:57 pm

Quote:
Chrono trigger is not to big of a file for ds's ram

Uh.... <_<

Let the math begin:
DS's RAM = 4MB
Chrono Trigger ROM = 4MB
Needed RAM for emulation 512Kbyte
Needed RAM for other stuff 256Kbyte

Yep, there's planty of room!

#87628 - thundrestrike - Wed Jun 14, 2006 9:04 pm

cool! glad to hear that

is anyone going to ever work on snesds to make this happen?
_________________
popcorn

#87643 - Dark Knight ez - Wed Jun 14, 2006 10:09 pm

LiraNuna was being sarcastic.
The DS's RAM is not big enough to contain everything.

4 MB : Chrono Trigger
512 Kb : Emulation needed RAM
256 Kb : Other purposes needed RAM +
-------------------------------------------------
4,75 MB needed to emulate Chrono Trigger (if all would be put in RAM)

And because the DS's RAM is only 4 MB, and not large enough to contain 4,75 MB or more..... other solutions need to be sought after for Chrono Trigger to work.

#87648 - thundrestrike - Wed Jun 14, 2006 10:33 pm

lol, reread Liranura's post and just realized how stupid i was :P
you're right

but, i am glad there are other ways for chrono trigger to work (please tell me you werent sarcastic, too) :D
_________________
popcorn

#87655 - tepples - Wed Jun 14, 2006 10:44 pm

Splitting the ROM file into 64 KB pages and loading each page from CF (like PocketNES for GBAMP) might help to get Donkey Kong Country and Super Street Fighter II working. As for Chrono Trigger, that will have to wait until F-Zero and the SMB2 warp effects in Super Mario All-Stars are working.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#87661 - Darkflame - Wed Jun 14, 2006 11:23 pm

Indeed.
I dont think ram limits are the problem as such..not with already proven ram streaming techiques...its not going to be a problem compared to having full emulation of the snes's modes and abilitys.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#87680 - thundrestrike - Thu Jun 15, 2006 12:22 am

idea popper!

the supercard has extra ram!

(i know not all people use supercard... but... it can work!!!)
_________________
popcorn

#87683 - fartz - Thu Jun 15, 2006 12:32 am

Good idea may work with most games but i doubt it will for mario rpg that would be insainly impresive tho if it did.


Edit : Wow nm even tho the zip file when you download the game it ses its 2mb tho the file inside the zip is compressed and its 4Mb my bad. Streaming the ram would probly be a good work around to get chrono trigger working but i was thinking maybe its possible to trim down the rom or try overclocking the ds's ram some how if thats even possible.
_________________
I go to pet store and fart on puppys and kittys ^_^

#87693 - ssj4android - Thu Jun 15, 2006 2:33 am

SNES9x can run on a computer with a 75mhz pentium under Windows. Of course, that computer had 40 MB of RAM and the only game I tried to play was Family Feud.

#87698 - Darkflame - Thu Jun 15, 2006 2:46 am

Compression or cutting games is possible.
But I still think streaming is the best bet.

Unfortuntely, you cant "overclock" ram to give you more space ;)
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#87701 - fartz - Thu Jun 15, 2006 2:57 am

This is all good and stuff but we need the freiken Snesds source code to do anything. Check the other snes topic ive been trying to conveince gladius to release it.
_________________
I go to pet store and fart on puppys and kittys ^_^

#87702 - tepples - Thu Jun 15, 2006 3:00 am

It might almost be easier to port the snesDS sound code to SnezziDS than to contact loopy.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#87704 - Sappharad - Thu Jun 15, 2006 3:10 am

Why is anyone worried about RAM?
It's not an issue. Loading the ROM into RAM is utterly stupid when you've got a cartridge slot that's plenty fast for the job. There's no reason to cater specially to people who can't buy a real flash cart. Both SNESDS and Snezziboy read the roms from the cart, so they don't have to worry about RAM.

The real issue here is clearly that SNES9x would be far too slow on the DS, and the two SNES emulators out right now are doing things the way they need to be done to achieve full speed.

#87705 - fartz - Thu Jun 15, 2006 3:21 am

Well so is chrono trigger fully suported + full speed possible on snesds?

What about a game like mario rpg on snesds thats defanly impossible right?
_________________
I go to pet store and fart on puppys and kittys ^_^

#87712 - thundrestrike - Thu Jun 15, 2006 3:57 am

Sappharad wrote:
The real issue here is clearly that SNES9x would be far too slow on the DS, and the two SNES emulators out right now are doing things the way they need to be done to achieve full speed.

then what can be done to get ChronoTrigger/Mario RPG working?
_________________
popcorn

#87732 - knight0fdragon - Thu Jun 15, 2006 8:56 am

u need to have at least parts of the snes rom in the ram, to get it to run. Does snezzi support fragmenting the rom, or does it load it all in for speed

Sappharad wrote:
Why is anyone worried about RAM?
It's not an issue. Loading the ROM into RAM is utterly stupid when you've got a cartridge slot that's plenty fast for the job. There's no reason to cater specially to people who can't buy a real flash cart. Both SNESDS and Snezziboy read the roms from the cart, so they don't have to worry about RAM.

The real issue here is clearly that SNES9x would be far too slow on the DS, and the two SNES emulators out right now are doing things the way they need to be done to achieve full speed.

_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#87813 - tepples - Thu Jun 15, 2006 7:42 pm

Sappharad wrote:
Why is anyone worried about RAM?
It's not an issue. Loading the ROM into RAM is utterly stupid when you've got a cartridge slot that's plenty fast for the job.

Unless you want to license your emulators to licensed publishers of classics compilations. Licensed games run only from the Nintendo DS slot, which resembles a GBAMP more than anything else.

Quote:
There's no reason to cater specially to people who can't buy a real flash cart. Both SNESDS and Snezziboy read the roms from the cart, so they don't have to worry about RAM.

I've read that the 4 MB RAM is more easily cached than GBA ROM, which could improve the speed of instruction and data fetches.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#87821 - HyperHacker - Thu Jun 15, 2006 7:56 pm

OK, I might be wrong on some of these, but here goes:

Chrono Trigger doesn't work because the emulator isn't developed enough yet and because it doesn't fit into memory. Possible solutions include copying parts of the ROM into VRAM (I don't think there's enough though), keeping the ROM stored on the GBA flash cart or the extra RAM of the Supercard/M3 when using those, or streaming from the CF/SD card. These should all be doable, but they only solve one of many problems.

Super Mario RPG is really, really unlikely to work. In addition to the ~4mhz 65816 in the SNES, the cartridge itself contains another 65816 running at ~10mhz (the SA-1). Currently the emulator struggles to emulate the SNES hardware alone; adding another ~10mhz CPU is not going to go over well. One thing I do wonder, though, is if the entire SA-1 or 65816 program in these games could be HLEd? I bet one of the CPUs does all the work while the other just performs simple tasks; maybe if these tasks were done by native DS code, it'd be fast enough to run.

Using the DS's graphics hardware to do the rendering instead of rendering everything into one bitmap is a good idea - so good that this is what the emulator does already. There is a problem, though - the SNES could override layer priority on a per-tile basis (layer X is above layer Y, but some tiles of layer Y still show above layer X), and the DS can't. You can see this problem in Super Mario World, with the scorebar going behind the background.

In addition to that the emulator's just not finished yet. There's still a lot of bugs to work out. A big one is really bad SPC700 timing (I seem to recall hearing that there's no attempt at all to keep the CPUs synched) that prevents a lot of games from running. It doesn't even work quite right in Super Mario World; there are sound bugs and the sound usually stops after a few minutes.

To summarize, wait until "simple" games like Super Mario World work before you expect Chrono Trigger to be playable, and don't count on Super Mario RPG running at all.
_________________
I'm a PSP hacker now, but I still <3 DS.

#87824 - MaHe - Thu Jun 15, 2006 8:03 pm

However, amadeus theoretically figured out a way how to bypass the 8-bit GBA slot write problem and therefore made using SuperCard/M3 a RAM extension possible. He is currently working on the software to prove this ...
_________________
[ Crimson and Black Nintendo DS Lite | CycloDS Evolution | EZ-Flash 3-in-1 | 1 GB Transcend microSD ]

#87830 - tepples - Thu Jun 15, 2006 8:12 pm

Did you mean for reads? The swap trick helps only for byte sized ROM writes, not reads. Byte sized reads already work correctly.

Or did you mean for writes? There is only 256 KB of RAM in the Super NES, and that will easily fit into the DS's own RAM. Writes to ROM should always be ignored or otherwise handled specially; otherwise games that have mappers (such as the S-DD1 games) and games that have copy protection (such as Tetris Attack) will break.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#87837 - HyperHacker - Thu Jun 15, 2006 8:57 pm

There is one case that you need to write to ROM: To load the ROM!
_________________
I'm a PSP hacker now, but I still <3 DS.

#87876 - tepples - Fri Jun 16, 2006 4:07 am

HyperHacker wrote:
There is one case that you need to write to ROM: To load the ROM!

But not from within the emulator, and definitely not from within the 65C816 core. Usually the flash card writing software (for NOR cards) or the built-in menu (for CF/SD adapters) does that for you.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#87895 - LiraNuna - Fri Jun 16, 2006 9:41 am

PSP Snes9x on 66MHz gives ~12FPS.

Think that will make you happy?
Ofcourse it uses Fb to render, but re-directing GFX will be a pain...

#87897 - Darkflame - Fri Jun 16, 2006 9:57 am

Actually 12fps wouldn't be bad for some games :p
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#87918 - Dracker - Fri Jun 16, 2006 3:05 pm

And that's discounting the differences in architecture. PSP uses a MIPS processor, while DS uses ARM. Porting it would not be so easy.

#87967 - HyperHacker - Fri Jun 16, 2006 7:28 pm

And that's a single 66mhz CPU. The DS has a 33mhz ARM7 to do some of the work.
tepples wrote:
HyperHacker wrote:
There is one case that you need to write to ROM: To load the ROM!

But not from within the emulator, and definitely not from within the 65C816 core. Usually the flash card writing software (for NOR cards) or the built-in menu (for CF/SD adapters) does that for you.

I guess if the ROM is embedded into the emulator, but who wants that? Then you'd have to have a copy of the emulator for each ROM.
_________________
I'm a PSP hacker now, but I still <3 DS.

#87980 - tepples - Fri Jun 16, 2006 8:21 pm

HyperHacker wrote:
tepples wrote:
HyperHacker wrote:
There is one case that you need to write to ROM: To load the ROM!

But not from within the emulator, and definitely not from within the 65C816 core. Usually the flash card writing software (for NOR cards) or the built-in menu (for CF/SD adapters) does that for you.

I guess if the ROM is embedded into the emulator, but who wants that? Then you'd have to have a copy of the emulator for each ROM.

PocketNES works with "compilations", or an entire folder of up to 31 MB of NES ROM files appended to an emulator to create a .gba file.

I'm just hoping for compatibility with GBA Movie Player and future Nintendo DS native flash cards, which don't have the extra RAM of a SuperCard or M3, for at least ROM files smaller than 4 MB.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.