SNES core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5271
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: SNES core

Postby Sorgelig » Thu Dec 20, 2018 7:09 pm

Locutus73 wrote:The MSU1 is a fictional expansion chip invented by higan’s author byuu, designed to allow the Super Famicom to stream data and audio. Many original games have been patched for using MSU1, adding CD quality audio or full motion videos. As any real chip it can be emulated both in software or hardware (FPGA). I think SD2SNES HDL code will eventually be merged.

This will have least priority to implement as there are no original games requiring it. It will require a lot of power for video playback and probably won't be able to fit into FPGA due to required speed and compression handling. From other side it's noticeable only for small group of fans of specific game.
Such mods are better to play on computer where storage and processing power (CPU+GPU) doesn't matter.

Locutus73
Captain Atari
Captain Atari
Posts: 493
Joined: Wed Feb 07, 2018 6:13 pm

Re: SNES core

Postby Locutus73 » Thu Dec 20, 2018 7:23 pm

Sorgelig wrote:This will have least priority to implement as there are no original games requiring it. It will require a lot of power for video playback and probably won't be able to fit into FPGA due to required speed and compression handling. From other side it's noticeable only for small group of fans of specific game.
Such mods are better to play on computer where storage and processing power (CPU+GPU) doesn't matter.

I agree on the low priority, but regarding the FPGA requirements... MSU-1 has been implemented in SD2SNES (a SNES flashcart) which is based on an old Spartan chip and DE10's Cyclone V runs circles around it, so MSU-1 is feasible.
IMG_0483.jpg

Anyway, MSU-1 aside, the interesting thing is that SD2SNES firmware is open source
https://github.com/mrehkopf/sd2snes
and implements many interesting special chips like SuperFX (AKA GSU) and SA-1, needed by many great original games... Yoshi's Island anyone? :D

Regards.
Locutus73
You do not have the required permissions to view the files attached to this post.

JamesF
Captain Atari
Captain Atari
Posts: 153
Joined: Sat Dec 15, 2018 6:46 am

Re: SNES core

Postby JamesF » Thu Dec 20, 2018 7:43 pm

Hi, my name is JamesF and I'm a long time SNES and SD2SNES fan and user, and now the MiSTer.
Hope SA-1 and GSU special chips will not be hard to implement to the MiSTer, they are already in Verilog on the SD2SNES github.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5271
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: SNES core

Postby Sorgelig » Thu Dec 20, 2018 8:06 pm

GSU and SA1 are in highest priority, but it's hard to tell when it will be implemented. Current progress of SNES on MiSTer is based on porting what has been done already for the past year by srg320. All chips available now have been implemented in original source. That's why all this appeared in a short time.

GSU and SA1 aren't implemented yet. And it's not so easy to just import SD2SNES code into SNES core. The structures are different. Internal signals are bit different as well. It's not that easy just import the whole SD2SNES and connect to SNES as it's done in real HW. SD2SNES uses other kind of memory and of course it doesn't expect to share it with SNES core. So, it's not straight forward process.
Sometimes it's easier to write the code from scratch than adapt the foreigner code. Especially if later there will be bugs, it will be much easier to fix it in own code than understand how foreigner code works.
So, mostly it's up to srg320 choice.
At the same time someone else can try to port sd2snes modules to SNES core.

For me, i would like to see GSU implemented first as it's more attractive. All GSU games are from different league than rest.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5271
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: SNES core

Postby Sorgelig » Thu Dec 20, 2018 8:13 pm

Anyway me and srg320 are agree that after-market chips such as MSU1 if ever will come, they will come after chips used in real carts first. And then if it will be enough resources then other addons can be implemented.
While SD2SNES emulates only cartridge, MiSTer has to implement SNES as well - and this requires a huge resources. If i understood correctly sd2snes doesn't even emulate all chips in the same fw, so it loads different cores depending on chip.

Locutus73
Captain Atari
Captain Atari
Posts: 493
Joined: Wed Feb 07, 2018 6:13 pm

Re: SNES core

Postby Locutus73 » Thu Dec 20, 2018 9:20 pm

Sorgelig wrote:Sometimes it's easier to write the code from scratch than adapt the foreigner code. Especially if later there will be bugs, it will be much easier to fix it in own code than understand how foreigner code works.
As a software developer I can confirm this is my same exact experience, but, on the other side, having some code for reference can be useful even without porting it: it can be used for reference, for having ideas and stuff... better having it as an option than not.

Sorgelig wrote:For me, i would like to see GSU implemented first as it's more attractive. All GSU games are from different league than rest.
Amen bro', Yoshi's Island is one of my favorite games ever.

Sorgelig wrote:Anyway me and srg320 are agree that after-market chips such as MSU1 if ever will come, they will come after chips used in real carts first.
I totally agree that MSU-1 comes after many other official important chips... but it may be considered more important than some chips only used in exotic Japanese shoji games.

Sorgelig wrote:And then if it will be enough resources then other addons can be implemented.
While SD2SNES emulates only cartridge, MiSTer has to implement SNES as well - and this requires a huge resources. If i understood correctly sd2snes doesn't even emulate all chips in the same fw, so it loads different cores depending on chip.
Just to try to give some very rough estimates, SNT which emulates a SNES uses (we don't know to which extent) a Cyclone V LE with 49K LE and SD2SNES Xilinx should be around 10K LE... DE10-nano Cyclone V SE with 110K LE is nearly double them two put together and should have plenty of resources. Probably memory access is a greater problem.
Just for fun I was thinking how cool would be a MiSTer system running a MSU-1 game streaming its CD quality music from a network share mounted with CIFS... that would be a super cool demonstration of how great the hybrid implementation of MiSTer is in all its glory :cheers:

Regards.
Locutus73

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5271
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: SNES core

Postby Sorgelig » Thu Dec 20, 2018 9:56 pm

SNES occupies half LE in its current state. But it's not only about LE. BRAM is in shortage. 80% of BRAM is occupied already. Still 2 important chips need to be implemented.

Counting cells in LE on Cyclone V is incorrect actually. You need to count in ALM. Altera counts ALM=3xLE hence 110K LE with actual 41K ALM. From my experience ALM is not more than 2xLE.
And if be a more precise then need to count in LABs. One LAB is group of 10xLE or 10xALM. And you quickly realize with this parameter ALM=LE :) Since LAB shares some signals among LE/ALM in this group, flexibility is not as good as LE/ALM being completely separate.
When i wanted to compile original ao486 sources targeted for DE2-115, Quartus told me i need twice more LABs than i have! So, it's not obvious how to compare different FPGAs. So according to this test, Cyclone IV with 115K LE is twice larger than Cyclone V with so-called 110K LE.
Xilinx measures its FPGA in LUTs. It's not equal to LE. Cells are different. I've read some sites telling that Xilinx's LUT is more than Altera's LE.

Anyway, as i've said the problem is not in LE but in BRAM. And since BRAM blocks are 10bits (M10K) memory (10x1K each block), using in traditional forms as 8/16bits means wasting 20% of precious memory. So, in general case having listed 5.6MBit of BRAM actually we have is 4.5MBits or even less because blocks cannot be shared so partly unused blocks are also wasted.

PhantombrainM
Captain Atari
Captain Atari
Posts: 184
Joined: Fri Mar 16, 2018 9:10 am

Re: SNES core

Postby PhantombrainM » Thu Dec 20, 2018 10:29 pm

Sorgelig wrote:SNES occupies half LE in its current state. But it's not only about LE. BRAM is in shortage. 80% of BRAM is occupied already. Still 2 important chips need to be implemented.


I came to the idea..as you wrote SDNES is loading "cores as needed...", can't you use BRAM for the chips independently and free it if not used?

For example, if it detects GSU-1 just drop DSP1-4 CPU, CX4,... and so on and free up the whole BRAM, so you have 100% free?
Two beer or not two beer? - Shakesbeer.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5271
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: SNES core

Postby Sorgelig » Thu Dec 20, 2018 10:41 pm

The most BRAM consumer is SNES itself as it has a lot of RAM chips in original HW. Cart chips currently implemented are using like 10% of BRAM all together. Of course if some blocks of BRAM can be re-purposed then it's done already. Like backup RAM is shared between cart chips as in original HW it resides in cart.

Believe me, if user guess that RAM can be shared in some circumstances then core developers also can guess it ;)

slowmo310
Atariator
Atariator
Posts: 21
Joined: Mon Oct 15, 2018 6:41 pm

Re: SNES core

Postby slowmo310 » Fri Dec 21, 2018 2:01 am

In Home Alone (USA) after starting game main character is unresponsive.

Mmm
Retro freak
Retro freak
Posts: 14
Joined: Tue Sep 15, 2015 5:22 am

Re: SNES core

Postby Mmm » Fri Dec 21, 2018 2:39 pm

Black screen at PGA Tour Golf (USA) (Rev 1)

faxesystem
Atarian
Atarian
Posts: 3
Joined: Sun Nov 04, 2018 4:52 pm

Re: SNES core

Postby faxesystem » Fri Dec 21, 2018 10:14 pm

Sync problem with SNES Core on Bang and Olufsen MX8000.

I have a problem with the SNES core over analog output. I have a Bang and Olufsen MX8000 and the SNES core gives it sync problems. All other cores are working perfectly. I don't have these sync problems on the MX8000 with my SNES. I also don't have these sync problems on my BVM 20F1E.

First video is the original SNES on the MX8000 and switching over to the MISTer SNES core

Second video is the MISTer on the 20F1E

http://imgur.com/gallery/eKcS9Ck

mattsoft
Atari maniac
Atari maniac
Posts: 76
Joined: Fri Apr 21, 2017 7:11 pm

Re: SNES core

Postby mattsoft » Sat Dec 22, 2018 9:55 pm

SNES_20181219.rbf gives me black screen via HDMI. I can get the OSD and hear music from my default game boot.rom (Super Mario), but just black screen. Using MiSTer_20181221.

SNES_20181213.rbf works fine. Just replaced the 20181219 RBF with 20181213 and all is good.

Anyone else have this problem? Thanks!

terminator2k2
Atariator
Atariator
Posts: 21
Joined: Sat Dec 22, 2018 10:23 pm

Re: SNES core

Postby terminator2k2 » Sat Dec 22, 2018 10:25 pm

mattsoft wrote:SNES_20181219.rbf gives me black screen via HDMI. I can get the OSD and hear music from my default game boot.rom (Super Mario), but just black screen. Using MiSTer_20181221.

SNES_20181213.rbf works fine. Just replaced the 20181219 RBF with 20181213 and all is good.

Anyone else have this problem? Thanks!


did you update the mister file aswell?

mattsoft
Atari maniac
Atari maniac
Posts: 76
Joined: Fri Apr 21, 2017 7:11 pm

Re: SNES core

Postby mattsoft » Sat Dec 22, 2018 10:44 pm

terminator2k2 wrote:
mattsoft wrote:SNES_20181219.rbf gives me black screen via HDMI. I can get the OSD and hear music from my default game boot.rom (Super Mario), but just black screen. Using MiSTer_20181221.

SNES_20181213.rbf works fine. Just replaced the 20181219 RBF with 20181213 and all is good.

Anyone else have this problem? Thanks!


did you update the mister file aswell?


Yes, using MiSTer_20181221.

mattsoft
Atari maniac
Atari maniac
Posts: 76
Joined: Fri Apr 21, 2017 7:11 pm

Re: SNES core

Postby mattsoft » Sat Dec 22, 2018 10:50 pm

Think I figured it out. DOH!

You need to update the mister.ini with the new config options when you go to MiSTer_20181221 or you get black screen on some cores. Having vscale_mode declared in the ini is probably important. :)

ghogan42
Atari maniac
Atari maniac
Posts: 95
Joined: Wed Oct 17, 2018 7:27 pm

Re: SNES core

Postby ghogan42 » Sat Dec 22, 2018 11:57 pm

mattsoft wrote:Think I figured it out. DOH!

You need to update the mister.ini with the new config options when you go to MiSTer_20181221 or you get black screen on some cores. Having vscale_mode declared in the ini is probably important. :)


Nope. If you don't have that option then you just get it as if vscale_mode=0

It must be some other problem. Occasionally you can start a core and have no video (not snes specific). Often you need to reboot the board to clear up this issue. It could be that.

mattsoft
Atari maniac
Atari maniac
Posts: 76
Joined: Fri Apr 21, 2017 7:11 pm

Re: SNES core

Postby mattsoft » Sun Dec 23, 2018 12:23 am

ghogan42 wrote:
mattsoft wrote:Think I figured it out. DOH!

You need to update the mister.ini with the new config options when you go to MiSTer_20181221 or you get black screen on some cores. Having vscale_mode declared in the ini is probably important. :)


Nope. If you don't have that option then you just get it as if vscale_mode=0

It must be some other problem. Occasionally you can start a core and have no video (not snes specific). Often you need to reboot the board to clear up this issue. It could be that.


Yeah, I think you're right. I just took a backup of my MiSTer SD card from 12/1, put it on an SD card, upgraded it with the latest cores but did NOT update the mister.ini and it's working fine every boot (12 boots in, no problem). Weird.

Move along, nothing to see here.

uigiflip
Atari freak
Atari freak
Posts: 60
Joined: Sun May 13, 2018 6:41 pm

Re: SNES core

Postby uigiflip » Sun Dec 23, 2018 11:26 am

found on f1 roc sounds glitches in and out when race and seems to go blank after race

https://youtu.be/eSdBlslUNK4?t=912

might be rom fine on another version exhaust heat 2 ie same game but different name
Last edited by uigiflip on Sun Dec 23, 2018 11:40 am, edited 2 times in total.
Replay 2, Mister, FPGA Replay + 68060 Daughterboard

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5271
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: SNES core

Postby Sorgelig » Sun Dec 23, 2018 11:31 am

uigiflip wrote:found on f1 roc sounds glitches in and out when race and seems to go blank after race

https://youtu.be/eSdBlslUNK4?t=912

I know about this problem.

paulofduarte
Atariator
Atariator
Posts: 17
Joined: Fri Jul 13, 2018 10:10 pm

Re: SNES core

Postby paulofduarte » Tue Dec 25, 2018 10:26 am

ghogan42 wrote:
mattsoft wrote:Think I figured it out. DOH!

You need to update the mister.ini with the new config options when you go to MiSTer_20181221 or you get black screen on some cores. Having vscale_mode declared in the ini is probably important. :)


Nope. If you don't have that option then you just get it as if vscale_mode=0

It must be some other problem. Occasionally you can start a core and have no video (not snes specific). Often you need to reboot the board to clear up this issue. It could be that.


I've noticed that when you load some roms after being playing other rom, but without reloading the core you have issues. Maybe some state is being left behind in the fpga that cause the issues.

JamesF
Captain Atari
Captain Atari
Posts: 153
Joined: Sat Dec 15, 2018 6:46 am

Re: SNES core

Postby JamesF » Wed Dec 26, 2018 7:28 pm

Hi.
I would like to report a speed issue in 240p Test Suite.

In Drop Shadow Test, Manual Lag Test, Scroll Test, the patters are moving way too fast than they should.
Please confirm against any emulator.

I've got my MiSTer today and I'm having real fun. :)
Thanks!

slowmo310
Atariator
Atariator
Posts: 21
Joined: Mon Oct 15, 2018 6:41 pm

Re: SNES core

Postby slowmo310 » Thu Dec 27, 2018 5:46 am

In Monopoly (USA) beginning where you pick number of players (vault) text and numbers are garbled.

ghogan42
Atari maniac
Atari maniac
Posts: 95
Joined: Wed Oct 17, 2018 7:27 pm

Re: SNES core

Postby ghogan42 » Thu Dec 27, 2018 8:40 am

JamesF wrote:Hi.
I would like to report a speed issue in 240p Test Suite.

In Drop Shadow Test, Manual Lag Test, Scroll Test, the patters are moving way too fast than they should.
Please confirm against any emulator.

I've got my MiSTer today and I'm having real fun. :)
Thanks!


Yes. It used to be correct. I don't know what change has broken this.

SnoopKatt
Atarian
Atarian
Posts: 5
Joined: Thu Oct 11, 2018 5:41 am

Re: SNES core

Postby SnoopKatt » Fri Dec 28, 2018 12:11 am

ghogan42 wrote:
mattsoft wrote:Think I figured it out. DOH!

You need to update the mister.ini with the new config options when you go to MiSTer_20181221 or you get black screen on some cores. Having vscale_mode declared in the ini is probably important. :)


Nope. If you don't have that option then you just get it as if vscale_mode=0

It must be some other problem. Occasionally you can start a core and have no video (not snes specific). Often you need to reboot the board to clear up this issue. It could be that.

Hmm, I get this issue with a fresh install of mister as of yesterday. I don't have that mister.ini file either...

EDIT: Adding the .ini file seemed to do the trick.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 7 guests