mannes wrote: Sun Sep 08, 2024 9:54 pmSo, my understanding was you could get 320x240 @ 30fps with a fully selectable 15bpp per pixel on the Mega Drive using this technique, is this not the case?
That is
not the case. You can do 60 fps with this technique, but (a) the pixels are always doubled horizontally, except the ones that are quadrupled because of refresh slots interrupting the DMA, and (b) the Mega Drive can only do 9-bit RGB.
Unlike the SNES version, Fantom Bitmap on the Mega Drive uses forced blank, so there's really nothing more you can do.
Is this possible in mode 5/6 or when pseudo hires is enabled? Is there any difference in pixel display quality using 512x448? Or are the dots just written twice like expected and end up being 8 pixels long instead of 4?
The 512-wide modes on SNES use the main and sub screens to display alternating half-dots. This means my invisible-layer trick is incompatible with it.
The DMA unit on the SNES does not speed up in high-resolution mode, so the output pixels would be the same width. On top of that, if you're using hires, you can't use the invisible-layer trick, so you can see the layer the DMA is writing to. And the DMA unit's timing alignment behaviour means you
cannot get straight columns - best case, the trigger point is late (or early) by one dot every other scanline, and this pattern oscillates. Also, you have to mess up the data format to prebuffer the DRAM refresh, since those colours now have to be written during HBlank. Basically, hires mode makes DMA direct colour worse for no benefit.
You could use a luminance mask to do lossy full-res (256-wide) video using DMA actually-direct colour (plus DRAM refresh prebuffering) as a slightly jiggly chroma layer. But high-res won't work because the doubled resolution and the subtractive blend both need the same hardware and thus cannot coexist. Interlace would technically work, but that's putting an awful lot of stress on the luminance mask update bandwidth if you want actual video...
I've been looking for a way to do a 16 color 512x448 display on the SNES that has an actual dot resolution of 512x448 instead of a inflated 256x224 resolution that technically outputs as 512x448.
You can easily do true
multipalette 4bpp (so, 121-colour) 512x448i (not 448p) on SNES, with either Mode 5/6 or (if you know what you're doing) pseudo-hires. It's called "pseudo-hires" not because it isn't real hires, but because it's not
specifically hires; you can do other things like pseudo-transparency with it because the even and odd "half-dots" (really just half-width pixels) are from different layers and are not scroll-locked to one another like they are in Modes 5/6.
Mind you, displaying fullscreen video at that resolution is totally impossible because there's not enough VRAM. But a game (or a carefully constructed fullscreen image) that uses repeated and/or flipped tiles to stay under VRAM limits is no problem. Heavily letterboxed/windowboxed video could work too.
512-wide tends to not be super sharp on real hardware because the signal path between the S-PPU and the screen of a CRT TV causes significant horizontal blur and chroma artifacting. (This is why "pseudo-hires" kinda works as a blend mode.) It's got nothing to do with being 'fake' hires.
Señor Ventura wrote: Mon Sep 09, 2024 11:31 amIf cgram is still there the oam still exists, so sprites are not eliminated.
I'm afraid I can't make out what you're trying to say here.
And using the cgram as a color data pool you can iterate two or more pixels with the same color information without repeating the necessary 2 Bytes of the direct color mode
Yes, that's the idea.
or "reserve" colors for a lot of pixels all along the screen saving these transferences too.
Oddly enough, not really. Schemes based around this idea tend to max out their bandwidth just transferring a 6bpp image, or a larger multipalette 4bpp image, and because of the palette double buffering, even the latter can't really use any extra colours. You can pretty much fill a quarter of CGRAM with one line of DMA, and that's how much you can use with the graphics you've got time to transfer. And there's not much point saving time on the CGRAM DMA transfers, because the timing requirement is so tight that you can't really use the CPU time saved anyway.
It's true that sprites are still available, and their half of CGRAM is totally independent of what's going on with the BG layers, so in that sense... yeah, I guess... There's not much room to update the sprite graphics, though...
In principle you could do 7bpp at 30 fps, so as to reserve half of CGRAM as constant colours instead of sprite colours. But you'd only be able to access half the reserved colours on any given line because of the double buffering scheme, and the window size would not be great by SNES standards. Better than the Game Boy, but at half the frame rate, and if you're not playing a Game Boy game there are better ways to use the SNES...
It will not be 32768 colors, but maybe 1000 colors could be for real, including sprites not limited to 128... What are your estimations?
Again, what are you talking about?
I'm talking about a method of taking a hardware-rendered image with hard limits of 56 colours per line and 40 sprites, and encoding it in a format the SNES can display. This involves all the sprites being rendered down into the single 6bpp layer, so the Super Game Boy Color doesn't use SNES sprites at all.
I mentioned the possibility of a video mode using a similar technique, but that would probably be unsuitable for real-time rendering even on a modern PC because of the colour quantization and attribute optimization necessary. This is not a software rendering technique.
You also can't do palette expansion of hardware sprites this way, because you can't linescroll sprites, so there's no way to double buffer sprite palettes.
...
If you must know, the Super Game Boy Color would max out a little below 3000 colours, because the CGB can only change about 20 colours per scanline. The SGBC display method can do 8064 colours, but I'm pretty sure the CGB itself can't achieve that in practice.
The Mega Color-like video mode I alluded to should max out at 11712 colours for a 192-line display, but I wouldn't expect it to ever really get near that. My original DMA direct colour demo was capable of 14336 colours (one per pixel at 64x224), but the highest I've ever actually seen was 10139 colours; most images at that resolution and RGB depth use a lot less.
1000 colours is not hard. We've done that by just changing up to 8 colours per scanline with HDMA. Again, though, that's not a real-time video codec...
...
Hey, I just thought of something silly. A Super Game Boy 3, or a Super Game Boy Color in DMG mode, could have a mode where it writes the 2bpp framebuffer into an 8bpp layer, cycling through the four bitplane pairs every four frames, while also cycling CGRAM through a four-frame pattern, to emulate the slow LCD the original Game Boy used...
But would that be enough? How slow was the original DMG screen?