SNES programming Videos

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
calima
Posts: 1326
Joined: Tue Oct 06, 2015 10:16 am

Re: SNES programming Videos

Post by calima » Wed Mar 31, 2021 11:50 pm

The practical number I use is 5kb, covering for overhead and the OAM DMA of 544 bytes.

psycopathicteen
Posts: 2988
Joined: Wed May 19, 2010 6:12 pm

Re: SNES programming Videos

Post by psycopathicteen » Thu Apr 01, 2021 9:22 am

I always thought v-blank was 38 lines.

93143
Posts: 1342
Joined: Fri Jul 04, 2014 9:31 pm

Re: SNES programming Videos

Post by 93143 » Thu Apr 01, 2021 2:15 pm

I used to assume that too. But at least one source says the PPU "does everything to render" line 0 even though it isn't displayed. If that's true, it's not just OAM that would be inaccessible during line 0; it's everything.

If you didn't need sprites on line 0, you could use force blank to get it back, and no one would notice... My shmup port uses an extended VBlank with IRQs, but it does take advantage of the fact that the upper border never has any sprites on it to skip the INIDISP=$00 line that would otherwise be necessary.

psycopathicteen
Posts: 2988
Joined: Wed May 19, 2010 6:12 pm

Re: SNES programming Videos

Post by psycopathicteen » Thu Apr 01, 2021 2:34 pm

I always put it in force blank during V-blank just in case I don't screw up any dma load if my V-blank code takes too long.

Oziphantom
Posts: 1097
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES programming Videos

Post by Oziphantom » Fri Apr 02, 2021 9:48 pm

psycopathicteen wrote:
Thu Apr 01, 2021 9:22 am
I always thought v-blank was 38 lines.
On NTSC it is 38 lines, however for the purpose of DMA transfer and safe access to the various RAMs in the PPU you can only safely do it for the first 37.

On PAL it is 88 lines, of which 87 are safe.

User avatar
Nikku4211
Posts: 400
Joined: Sun Dec 15, 2019 1:28 pm
Location: Bronx, New York
Contact:

Re: SNES programming Videos

Post by Nikku4211 » Sat Apr 03, 2021 6:52 am

Oziphantom wrote:
Fri Apr 02, 2021 9:48 pm
On NTSC it is 38 lines, however for the purpose of DMA transfer and safe access to the various RAMs in the PPU you can only safely do it for the first 37.

On PAL it is 88 lines, of which 87 are safe.
Awesome.

So you blokes at Europe and Oceania and Africa and west Asia and south Asia and the PRC and some South Americans have more time to do stuff between frames than people from most of the Americas, (come to) Brazil, and the Japanese, South Koreans, and Taiwanese.

Cool m8.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.

Pokun
Posts: 1813
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: SNES programming Videos

Post by Pokun » Sun Apr 04, 2021 7:47 am

I always thought the extra vblank time is because the frame-rate is slower on PAL, 50 instead of 60 Hz, and since line-rate (hblank) is about the same as on NTSC each frame should be drawn at about the same speed.
Slower frame-rate = more time between the frames

Maybe I'm out on a bike hike though (Swedish proverb).

User avatar
TmEE
Posts: 778
Joined: Wed Feb 13, 2008 9:10 am
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Contact:

Re: SNES programming Videos

Post by TmEE » Sun Apr 04, 2021 9:34 am

That's exactly how it works, the missing frames are turned into extra lines per frame. LinesPerFrame includes blanking and other invisible lines.

FrameRate = LineRate / LinesPerFrame
LinesPerFrame = LineRate / FrameRate
LineRate = LinesPerFrame * FrameRate

Pokun
Posts: 1813
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: SNES programming Videos

Post by Pokun » Sun Apr 04, 2021 9:52 am

Good to hear that I'm not on a bike hike after all.

Also I guess when talking about the invisible lines, one is really using the word "line" as a time unit rather than actual drawn lines (as the electron gun is blanking and currently retracing back to the top), because each line is drawn at the same fixed speed (around 15 kHz for both PAL and NTSC). I see tutorials often taking this for granted, but it might not be so obvious for a beginner that thinks the electron gun is really drawing all vblank lines below the TV.

creaothceann
Posts: 304
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: SNES programming Videos

Post by creaothceann » Sun Apr 04, 2021 12:08 pm

Pokun wrote:
Sun Apr 04, 2021 7:47 am
I always thought the extra vblank time is because the frame-rate is slower on PAL, 50 instead of 60 Hz
PAL frame rate is lower than NTSC, and the extra time is used to draw more lines (625 instead of 525). You get the most extra VBlank time when not enabling overscan mode (224*2 instead of 239*2 lines).

Pokun wrote:
Sun Apr 04, 2021 7:47 am
since line-rate (hblank) is about the same as on NTSC each frame should be drawn at about the same speed [...] Slower frame-rate = more time between the frames
Again, only if you don't enable overscan mode.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10

Pokun
Posts: 1813
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: SNES programming Videos

Post by Pokun » Sun Apr 04, 2021 12:22 pm

But that isn't any different on an NTSC SFC is it? Both versions of the S-PPU draws either 224*2 or 239*2 lines depending on whether overscan mode is enabled or not. The PAL one would have many more extra lines to spare in either mode.

Oziphantom
Posts: 1097
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES programming Videos

Post by Oziphantom » Sat Apr 10, 2021 8:17 am

Video 2 of the SNES series, the dual personalities and how to boot the SNES from cold https://youtu.be/fdcbzYxPNIg

User avatar
Nikku4211
Posts: 400
Joined: Sun Dec 15, 2019 1:28 pm
Location: Bronx, New York
Contact:

Re: SNES programming Videos

Post by Nikku4211 » Sat Apr 10, 2021 10:16 am

Pokun wrote:
Sun Apr 04, 2021 12:22 pm
But that isn't any different on an NTSC SFC is it? Both versions of the S-PPU draws either 224*2 or 239*2 lines depending on whether overscan mode is enabled or not. The PAL one would have many more extra lines to spare in either mode.
Yeah, though PAL does give a good reason to use overscan mode due to the extra lines being clearly visible in PAL TVs, whereas turning overscan mode on in NTSC is pointless.
Oziphantom wrote:
Sat Apr 10, 2021 8:17 am
Video 2 of the SNES series, the dual personalities and how to boot the SNES from cold https://youtu.be/fdcbzYxPNIg
Dang bro I'm hype.

That description makes me want to draw the 65816 as an insane multipersonality anime character or something.

Doesn't help that in your video, you refer to uninitialised RAM as the Solar Flare.
SolarFlare.png
Also, what's that background noise in your video?
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.

Post Reply