SNES programming Videos
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: SNES programming Videos
The practical number I use is 5kb, covering for overhead and the OAM DMA of 544 bytes.
-
- Posts: 2988
- Joined: Wed May 19, 2010 6:12 pm
Re: SNES programming Videos
I always thought v-blank was 38 lines.
Re: SNES programming Videos
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.
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.
-
- Posts: 2988
- Joined: Wed May 19, 2010 6:12 pm
Re: SNES programming Videos
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.
-
- Posts: 1097
- Joined: Tue Feb 07, 2017 2:03 am
Re: SNES programming Videos
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.
Re: SNES programming Videos
Awesome.Oziphantom wrote: ↑Fri Apr 02, 2021 9:48 pmOn 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.
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.
Re: SNES programming Videos
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).
Slower frame-rate = more time between the frames
Maybe I'm out on a bike hike though (Swedish proverb).
- 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
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
FrameRate = LineRate / LinesPerFrame
LinesPerFrame = LineRate / FrameRate
LineRate = LinesPerFrame * FrameRate
Re: SNES programming Videos
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.
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.
-
- Posts: 304
- Joined: Mon Jan 23, 2006 7:47 am
- Location: Germany
- Contact:
Re: SNES programming Videos
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).
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
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
Re: SNES programming Videos
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.
-
- Posts: 1097
- Joined: Tue Feb 07, 2017 2:03 am
Re: SNES programming Videos
Video 2 of the SNES series, the dual personalities and how to boot the SNES from cold https://youtu.be/fdcbzYxPNIg
Re: SNES programming Videos
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.
Dang bro I'm hype.Oziphantom wrote: ↑Sat Apr 10, 2021 8:17 amVideo 2 of the SNES series, the dual personalities and how to boot the SNES from cold https://youtu.be/fdcbzYxPNIg
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.
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.