The absolute simplest hello world...

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.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

The absolute simplest hello world...

Post by jeffythedragonslayer »

I'm having a hard time following what exactly blargg is saying here:
blargg wrote:(the absolute simplest is to enable interlace mode and stare closely at your CRT, an approach I used when first running code on the SNES).
https://wiki.superfamicom.org/basic-ca6 ... rogramming

Does a black screen in interlace mode look different from a black screen without interlace mode on a CRT, or a black screen where the TV hasn't synchronized with the SNES PPU?

I don't see anything like that in these hardware tests: https://snescentral.com/article.php?id=1115
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: The absolute simplest hello world...

Post by lidnariq »

Yup, it does, on a SD CRT. In progressive mode, you'll still see the scanlines, even if nothing's in them. In interlaced mode the whole screen will appear to be more-or-less uniformly illuminated.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: The absolute simplest hello world...

Post by jeffythedragonslayer »

Cool. It sounds like the only edit I need to make to clc_xce's black screen tutorial (https://georgjz.github.io/snesaa01/) to create this demo is add these lines:

Code: Select all

		lda #01   ; bit 0 is V-Scanning, 1 to enable interlacing
		sta 2113h ; SETINI
to enable interlacing. I don't have access to a CRT at the moment. Are there any emulator filters I could use to test this demo?
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: The absolute simplest hello world...

Post by jeffythedragonslayer »

The Ranma 1/2 game could benefit from figuring out how to get (the opposite of) this demo working:
fullsnes wrote: Notes: Ranma is actually only 256x224 (but does accidentally have interlace enabled, which causes some totally useless flickering). Jurassic/Kirby are misusing PseudoH for "blending" the main+sub screen layers (via the blurry TV picture); this allows to use Color Math for coldata additions (ie. resulting in 3-color blending: main+sub+coldata).
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: The absolute simplest hello world...

Post by lidnariq »

Sounds like it should be a good introductory task to figure out using Mesen-S or bsnesplus...
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: The absolute simplest hello world...

Post by jeffythedragonslayer »

I found a copy of Ranma ½: Hard Battle at DKOldies. With any luck I should have an IPS file on RHDN and instructions on how to fix other games with useless flickering soon.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: The absolute simplest hello world...

Post by jeffythedragonslayer »

I've been playing Ranma for awhile now and don't see any flickering. Is this something that only affects CRTs and not LCDs?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: The absolute simplest hello world...

Post by lidnariq »

Yes. An HDTV will almost certainly pretend that progressive input was interlaced anyway.

On a real CRT SDTV, the scanlines will shimmer up and down half a scanline.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: The absolute simplest hello world...

Post by rainwarrior »

jeffythedragonslayer wrote: Mon Jul 04, 2022 12:04 pmI found a copy of Ranma ½: Hard Battle at DKOldies. With any luck I should have an IPS file on RHDN and instructions on how to fix other games with useless flickering soon.
This is the wrong game. There's 4 different Ranma games. The one that uses interlace incorrectly is Ranma 1/2 Chounai Gekitou Hen, by Masaya.
jeffythedragonslayer wrote: Mon Aug 22, 2022 4:23 pmI've been playing Ranma for awhile now and don't see any flickering. Is this something that only affects CRTs and not LCDs?
If you run it in Mesen-S you should see "mouse-teeth" problems constantly as a result.

I've been trying to update this list when I find examples like this: Wiki: Uncommon graphics mode games
iNCEPTIONAL

Re: The absolute simplest hello world...

Post by iNCEPTIONAL »

Curios, does the interlacing on say that Ranma 1/2 Chounai Gekitou Hen game have even the slightest visual effect of making the image look slightly more "high res" purely due to how the interlacing works on the human eye?

I would honestly have to think it does, personally speaking--and I'll go try it on Messen-S in a second, as you suggested--but I'm gonna put it out there as a question and see what other people say.

If it does make the image look slightly more "high res" purely due to how the interlacing works, then, outside of personal opinions of how that looks, couldn't that be one reason why it might have been intentionally implemented by some developers?

I was actually thinking of using it in my game on some stage or whatever purely to have an example of it in there. I currently have an idea to show every single background Mode on my title screen for example, showing each Mode in turn on some variation of the same title screen with some gameplay footage of the game in between each variation. I think it would just be a cool way to display the various things you can do with the different background Modes on SNES, as well as make a cool regularly changing title screen in and of itself.

And, sure, some people might prefer their games to not use interlacing and not have a slight shimmer on old CRTs, and that's a perfectly valid way to think of it on a personal level, but it's possible some developers simply thought it would be interesting to try, and that the illusion of slightly more resolution would be worth the slight shimmer, or however it precisely looks, right.

Nice list by the way--went straight into my bookmarks. :)

PS. I'll have a look later and see if there's any other examples I can find of those rare uses. I've been compiling a list of YouTube videos with this kind of stuff for so long now that I expect I might have one or two decent ones to add to the list, if you care to.
Last edited by iNCEPTIONAL on Tue Aug 23, 2022 10:40 am, edited 4 times in total.
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: The absolute simplest hello world...

Post by creaothceann »

iNCEPTIONAL wrote: Tue Aug 23, 2022 6:48 am Curios, does the interlacing on say that Ranma 1/2 Chounai Gekitou Hen game have even the slightest visual effect of making the image look slightly more "high res" purely due to how the interlacing works on the human eye?

I would honestly have to think it does, personally speaking--and I'll go try it on Mesen-S in a second, as you suggested--but I'm gonna put it out there as a question and see what other people say.

If it does make the image look slightly more "high res" purely due to how the interlacing works, then, outside of personal opinions of how that looks, couldn't that be one reason why it might have been intentionally implemented by some developers rather than a mistake?
Interlacing doesn't improve visuals if both fields are exactly the same. The only things it does on a real CRT TV is
- removing the black lines between the actual scanlines of progressive mode
- cause modern devices (e.g. TV or OSSC) to lose signal for a moment, resulting in a blank screen (very annoying)
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
iNCEPTIONAL

Re: The absolute simplest hello world...

Post by iNCEPTIONAL »

creaothceann wrote: Tue Aug 23, 2022 7:02 am
iNCEPTIONAL wrote: Tue Aug 23, 2022 6:48 am Curios, does the interlacing on say that Ranma 1/2 Chounai Gekitou Hen game have even the slightest visual effect of making the image look slightly more "high res" purely due to how the interlacing works on the human eye?

I would honestly have to think it does, personally speaking--and I'll go try it on Mesen-S in a second, as you suggested--but I'm gonna put it out there as a question and see what other people say.

If it does make the image look slightly more "high res" purely due to how the interlacing works, then, outside of personal opinions of how that looks, couldn't that be one reason why it might have been intentionally implemented by some developers rather than a mistake?
Interlacing doesn't improve visuals if both fields are exactly the same. The only things it does on a real CRT TV is
- removing the black lines between the actual scanlines of progressive mode
- cause modern devices (e.g. TV or OSSC) to lose signal for a moment, resulting in a blank screen (very annoying)
Wait, does the Ranma 1/2 Chounai Gekitou Hen, as an example, have both fields exactly the same?

Yeah, that wouldn't seem to make any sense at all to use it there then, if it has literally no visual effect. :-o

Edit: Sorry, you mean the same art in both fields, but they still move the half-pixel position up/down every frame, right?

Well, does the removal of the black lines between the actual scanlines make the black lines themselves less noticeable, i.e. the traditional scanline effect that we talk of in discussions of retro game is less prominent?

That would still be an interesting test/use case for me personally.

So, I presume that blank screen on modern displays is every second frame then?
iNCEPTIONAL

Re: The absolute simplest hello world...

Post by iNCEPTIONAL »

rainwarrior wrote: Mon Aug 22, 2022 6:36 pm
iNCEPTIONAL wrote: Tue Aug 23, 2022 6:48 am I've been trying to update this list when I find examples like this: Wiki: Uncommon graphics mode games
I'll have a look later and see if there's any other examples I can find of those rare uses. I've been compiling a list of YouTube videos with this kind of stuff for so long now that I expect I might have one or two decent ones to add to the list, if you care to.
Here's an example for the Mode 0 section: https://youtu.be/MJV2Luk_W1M

And this LMPuny SMW hack too for Mode 0: https://youtu.be/51MDNAXcjUg

Here's a LMPuny SMW hack using Mode 2's vertical offset-per-tile: https://youtu.be/pKqC8ZOyT7g
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: The absolute simplest hello world...

Post by creaothceann »

iNCEPTIONAL wrote: Tue Aug 23, 2022 7:04 am Sorry, you mean the same art in both fields, but they still move the half-pixel position up/down every frame, right?
Every other field in a frame shifts a bit vertically, not every frame. (There are 2 fields in a frame; 60 fields per second create 30 frames per second. Only in progressive mode a frame is the same as a field.)

iNCEPTIONAL wrote: Tue Aug 23, 2022 7:04 am Well, does the removal of the black lines between the actual scanlines make the black lines themselves less noticeable, i.e. the traditional scanline effect that we talk of in discussions of retro game is less prominent?
Yes. But emulators usually don't show these black lines anyway, unless the user is using a CRT shader.

iNCEPTIONAL wrote: Tue Aug 23, 2022 7:04 am So, I presume that blank screen on modern displays is every second frame then?
No; whenever an input signal switches from progressive to interlaced or vice versa, modern devices take a while (up to several seconds) to lock onto the new mode. A CRT TV doesn't have that problem. I think Air Strike Patrol does that for the mission briefings.

Keep in mind that interlaced mode means that any movement will lag behind 1/60 of a second in every other line.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
iNCEPTIONAL

Re: The absolute simplest hello world...

Post by iNCEPTIONAL »

Ah, yeah, I forgot about the drop from 60fps to 30fps in interlaced mode. And I still get confused about the difference between interlaced in Modes 5/6 vs interlaced in the other modes too.

So, do emulators add something else in between the pixel art to keep it all the same relative distance apart that it would be if the gaps between scanlines were there on a CRT, or is everything actually slightly squished closer together vertically on emulators then? Or, am I not quite getting what you're describing here?

OK. I didn't know about the issue with switching between the two different display modes. That might put a slight spanner in the works with my own idea for showing each of the SNES' background modes one after the other on the title screen for my game (at least on modern displays), even if I was planning on showing some gameplay in between each mode switch, correct?
Last edited by iNCEPTIONAL on Tue Aug 23, 2022 10:41 am, edited 4 times in total.
Post Reply