30

Brunni (./25) :
Interesting, what does the 59.2 Hz correspond to? The NTSC standard is 59.94 Hz no?

Here are the actual figures from the tech wiki :

The AES runs slightly faster than the MVS. Maybe they wanted to match consumer TV's more closely for the home hardware?

rloCUCR.jpeg

https://wiki.neogeodev.org/index.php?title=Framerate
(Tech wiki has some security issues at moment but you can ignore them and get through)

EDIT : Thinking about it, the CPU runs at half speed of the main clock so it must run at 12.08 Mhz in AES (?)

31

384px per line? That's a lot no, 320 active + 64 HBLANK?
Are raster effects possible? Parallax by moving the sprites every line, gradients by modifying the pallet…
avatar
Highway Runners, mon jeu de racing à la Outrun qu'il est sorti le 14 décembre 2016 ! N'hésitez pas à me soutenir :)

https://itunes.apple.com/us/app/highway-runners/id964932741

32

Brunni (./31) :
384px per line? That's a lot no, 320 active + 64 HBLANK?
Are raster effects possible? Parallax by moving the sprites every line, gradients by modifying the pallet…

Yes for raster effects you can modify background color, x sprite pos, y sprite pos, sprite tiles, x-zoom, y-zoom, x mirror tile, y mirror tile and choose *which* palette you use per tile. You can only do sprite changes per line as far as I know (not during a line) because sprites are parsed a line or so before they are displayed. A game like Riding Hero uses raster effects most obviously for the road and Neo Turf Masters for the line scrolling on the psuedo 3D display. Some of the fighting games use it for the floor too.

You can't modify the palettes themselves (apart from during Hblank and vblank) because the palette ram shares a bus with the CPU. I read that the color the Neo Geo displays to the screen is what you are currently reading/writing with the CPU from palette RAM. So you get a messed up display if you read or write to palette RAM during display. There is probably enough time to make some palette changes during Hblank

I don't fully understand why the 384 myself. But here is what it says on the wiki :

gdEeZhg.jpeg

33

Good news on the updated version of Neo Thunder. I did a test with extra enemies to make a total of 60 enemies. Currently the max possible without re-organising the sprite layout

In the screenshot below there are 60 enemies, 61 enemy bullets, 7 player bullets, approx 18 background tiles and 2 player ship sprites

= 148 sprites

And there is still a fair amount of frame time left. (you can see by the color bars) and the 60 FPS.

OhBv7Yc.jpeg

It is possible to fire 20+ player bullets but I can't do it while taking a screenshot. Here I just held the fire button down. The game might find it harder to deal with that. Each extra player bullet here would mean 60 more collision checks with the enemies

UNFORTUNATLEY there is now a lot of noticeable sprite tearing with more sprites on screen. So I will now need to deal with that. I am thinking this should be fairly easy though (famous last words!) since Neo Thunder is a simple game and for most sprites, only the x-coord is updated and only the player ship has any animation. So there should be time to update all the sprites in the vertical blank

34

Brunni (./29) :
Oh OK. But then would they effectively refresh the display at 59 Hz ? (i.e. 59 scans from top to bottom) or would they scan at 59.94 and one image would be displayed twice each second?
The former. Fully analog TVs can't duplicate or skip frames by design, because there's simply no memory inside them to store the video. So the electron beam always moves in sync with the input video signal.

(To nitpick, the "no memory" part is not quite true for PAL-encoded signals. As the decoding requires data from both the previous and the current video lines, there's a component inside the TV that provides a copy of the video signal that's delayed by 64 µs, i.e. the duration of one video line. But it's only needed for decoding color, not brightness, and only for PAL. In pure RGB mode, there's no delay in the signal path.)

CosmicR (./30) :
Maybe they wanted to match consumer TV's more closely for the home hardware?
That's my suspicion as well. The farthest away from 59.94 Hz you get, the higher the risk of some TVs not working fine is. Composite/S-Video encoding may be a factor as well ; NTSC is designed explicitly for 59.94 Hz (there's a complicated explanation why 59.94 Hz was chosen instead of the "normal" 60 Hz), so it may cause additional problems that don't exist in arcade machines (since they use RGB internally).
avatar
Zeroblog

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo

35

Got it smile thanks. So basically the beam scan mechanism has a fixed speed inside TVs, but it "waits" for the signal during synchronisation periods, which allows to effectively draw a little faster or a little slower if those sync signals come early/late? The pixel clock, however, is universal for a NTSC or PAL signal, right?

[Edit] Or I am totally à la rue and there is no notion of pixel at all in an analog TV set? Meaning that you expect the beam to advance at a certain speed — which is roughly the same across TV sets, but not always, hence the under/overscan to take in account, and the colour is constantly "outputted" as it is decoded by the signal. Meaning that there is not a proper "number of pixels", except that the decoding, because it's FM, can only be sampled at a maximum frequency, limiting the number of effective pixels (hence the 512 or 720 pixel limit that machines would suggest?).
avatar
Highway Runners, mon jeu de racing à la Outrun qu'il est sorti le 14 décembre 2016 ! N'hésitez pas à me soutenir :)

https://itunes.apple.com/us/app/highway-runners/id964932741

36

(sorry for the wall of text!)

Brunni (./35) :
Got it smile thanks. So basically the beam scan mechanism has a fixed speed inside TVs, but it "waits" for the signal during synchronisation periods, which allows to effectively draw a little faster or a little slower if those sync signals come early/late?
No, the sweep rate is constant. So when the sync frequency is a bit higher than it should be, the picture displayed gets a bit smaller (and vice-versa).

Brunni (./35) :
[Edit] Or I am totally à la rue and there is no notion of pixel at all in an analog TV set?
Correct. There's no such thing as an analog pixel smile

One important thing to remember when thinking about traditional TV is that it's really old technology ; the development began roughly one century ago. The fundamental digital bricks we use today (ADCs, RAM, even basic things like counters) would have been too expensive to be used in consumer TV sets, too difficult to manufacture, or just not invented yet. And even analog components were costly and had limited precision (say ±10% at best, often ±20% or more) ; quartz crystals oscillators were only used by the military or laboratories. If you needed more precision, you had to tweak things manually with potentiometers, and hope that it wouldn't drift too much with time and temperature variations.

So traditional TV systems had to be designed to work without relying on precise numbers or timings, or complicated circuits (on the TV side, anyways). For people like us who were born in a digital world, it's a "paradigm shift" in reverse smile

By the way, this is also the reason why CRT TVs have overscan. As mentioned above, the picture size and centering can vary a bit depending on the video signal frequency ; but they're also influenced by other things, like the average brightness of what's displayed, and the mains voltage (not by design, but because of implementation limitations). If the TV was adjusted to make the picture fill the screen exactly in "average" conditions, then there would be situations where the picture would be a bit too small, or off-center, creating black borders around it. So instead, it's adjusted to make the picture slightly larger than the screen ; this creates a small amount of (variable) cropping instead, but this is less noticeable. This is also why you shouldn't put important stuff too close to the edges of the screen, as it may be partially cut off or even invisible depending on the TV. (On computer CRT screens, cropping is not acceptable, so they have stricter tolerances and are usually set up to have some amount of visible borders.)

And the reason analog TV doesn't have pixels is simple. When you take a black-and-white CRT TV and look what happens when it draws a line, everything is continuous: not just the video and sweep signals, but the phosphor layer as well (it's uniform, like a piece of blank paper). The whole notion of the picture being made of a finite number of small-sized elements simply doesn't apply. (For color CRTs, this is a bit less true, since there are RGB dots or stripes in the shadow mask. But those don't have a specific alignment with the video picture, and they only exist because that's the easiest technical way to implement color. The signals are still continuous, and it would work just the same if it was possible to have 3 uniform overlaid layers for R, G and B, for example.)

This is why video games consoles can have various horizontal resolutions and still display fine on any TV. The TV only cares about how long each video line lasts ; it doesn't know and doesn't care about the number of pixels there are, or if the signal is even divisible into pixels at all. The reason why there aren't too many different resolutions is because:
1) the resolution depends on the video clock frequency, and some frequencies are more common than others
2) there's often additional contraints, e.g. having an integral number of 8 pixels-wide tiles/characters per line, etc.
But you can totally use "weird" resolutions if you want. For example, the Jaguar uses a video clock frequency, and thus resolutions, that don't match any other machine.

Same thing for the color decoding (by the way, for NTSC and PAL, it's not really FM, but QAM): there's no sampling involved, it's implemented with continuous (analog) processes.

However, even if there is no "hard" limit like the number of pixels per line on an LCD screen, that doesn't mean that there's no limit, either. Finer details needs more bandwidth (higher frequencies), and analog monitors have a limited amount of bandwidth. Once you go over the bandwidth, the contrast goes down as the frequency rises, like taking a picture with a film camera that has cheap optics or is slightly out-of-focus: things that are too small are dim and fuzzy.
(There are also other factors, like the fact that the spot on the phosphor from the electron beam is not infinitely small.)

RGB, S-video, composite and RF are rated from sharpest to fuzziest in this order, because the video bandwidth of each format is lower than the one before. And colors look smeared on anything other than RGB, because the bandwidth for chroma is much lower than the bandwidth of luminance.

The limited amount of bandwidth means that there's no point in very high resolutions for retro home consoles: it requires faster chips, more RAM, etc. for a limited improvement. Especially since TVs outside of Europe typically had only composite inputs at best, or even just RF!

In the other direction (vertically), there's a countable number of video lines, but that's mostly because sync pulses are, well, pulses instead of continuous signals. Analog TVs don't really care about the number of lines ; as long as the timings are close enough, they will just draw fewer or more lines with no issue. (Some Atari 2600 games do this, and don't display right on digital TVs for this reason. But of course, when they were released, there were no digital TV on the market.). They don't even require the number of lines to be an integer ; you can put the vertical refresh pulse right in the middle of a line, and that's even exactly how interlacing is implemented.
avatar
Zeroblog

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo