Very Simple SuperFX chip demo

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
secondsun
Posts: 41
Joined: Tue Jul 31, 2018 9:37 am

Very Simple SuperFX chip demo

Post by secondsun »

I've noticed that the SuperFX chip demo in the libSFX examples was great for booting the chip, but it does not include examples of drawing with the SFX chip or copying data from the chip to VRAM. I've created, I hope, an example of using the SuperFX in 4bpp 160 line mode that people can build from.

First, here's the source : https://github.com/secondsun/snes-sfx-demo

The source has a link to a youtube video. Be warned, I strobe colors and some people may find that unpleasant.

The demo does a few things that a SFX chip developer may be interested in. It demonstrates how to use the line interrupt to change your vblank interval, it stops and resumes the sfx chip mid frame, and it runs at 30 fps (more or less). I've only tested this on bsnes and Mesen-s but not on real hardware; if you try it on a flash cart let me know how it goes.

There are some improvements to be made. I would like to better align the letter box, and my interrupt is not right as it fires halfway across the screen.
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: Very Simple SuperFX chip demo

Post by Nikku4211 »

secondsun wrote: Sat Mar 13, 2021 5:24 pm The demo does a few things that a SFX chip developer may be interested in. It demonstrates how to use the line interrupt to change your vblank interval, it stops and resumes the sfx chip mid frame, and it runs at 30 fps (more or less). I've only tested this on bsnes and Mesen-s but not on real hardware; if you try it on a flash cart let me know how it goes.

There are some improvements to be made. I would like to better align the letter box, and my interrupt is not right as it fires halfway across the screen.
I can't wait to see you eventually do more with this in the future, and see what doors this code can open.

I'll get back to you when I test the demo on a real SD2SNES. I will say, however, that the SD2SNES still technically just uses an FPGA to emulate the Super FX chip, so the Super FX part there might not be quite as accurate as a real SuperFX cartridge.

EDIT: Just tested it on my SD2SNES. It works just fine on there. I did not notice any problems or differences whatsoever.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
secondsun
Posts: 41
Joined: Tue Jul 31, 2018 9:37 am

Re: Very Simple SuperFX chip demo

Post by secondsun »

Thanks for testing it, that makes me feel a lot better.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Very Simple SuperFX chip demo

Post by jeffythedragonslayer »

I've never seen the .sgs extension before. What does it stand for?
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Very Simple SuperFX chip demo

Post by creaothceann »

*.sgs might stand for SNES Graphics Support?
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
secondsun
Posts: 41
Joined: Tue Jul 31, 2018 9:37 am

Re: Very Simple SuperFX chip demo

Post by secondsun »

In libSFX it is used by the makefile to filter files to be compiled to the SuperFX chip (aka GSU).
ifndef src_gsu
src_gsu := $(call rwildcard, ,%.sgs)
endif
I think it is a shortening of src_gsu.
Post Reply