Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A600 Memory

AuthorTopic: reverse engineer the CD32 FMV card.... ?  (Read 819 times)

0 Members and 1 Guest are viewing this topic.

Offline darksun9210

reverse engineer the CD32 FMV card.... ?
« on: January 09, 2020, 11:24:27 AM »
I saw one of these unicorn bits of hardware again recently and it got me thinking.

So i think first things first, what is it, and what does it do?
If i recall correctly, it seems to be a zorro2 board, judging by the 24bit address bus, and 16bit data bus connections on the board.
It outputs its video direct onto the CD32 equivilent of the AGA video slot on the 200pin exp connector, effectively bypassing the AGA chipset in graphics rendering and getting the picture direct to the TV as far as i can figure out.
all the software to run the thing is rom based.
again if i recall correctly, it eats the bottom 4meg out of the zorro2 memory area - so it's not ever going to be PCMCIA compatible. this is why on the CD32 expansions that allowed the connection of the FMV card, with the card connected, you could only plug in 4meg of ram as opposed to 8 - if sticking with the stock 68EC020.

initially i had this weird idea of if it was possible to reverse engineer it into a Zorro board. but then realised it's not the decoding the video stream that's the issue.
its getting the decoded data back into the amiga's framebuffer - be it chip ram, or a graphics card for display.
as looking at the nearest previous zorro equivilent Peggy, or Peggy+ boards, they either display out to their own dedicated monitor, or genlock over the amiga's native display - to again, displayed on their own dedicated monitor for video in the amiga's workbench windows or full screen in standard chipset resolutions.

thinking about it. this is why the CV64/3D ViRGE chip had the scenic highway bus to plug its prototype mpeg decoder into. the decoder could dump output straight into the graphics card's ram, and the chip could use its "overlay" feature to effectively digitally genlock the graphics in that section of ram over the frame buffer's display.  it would never touch any actual amiga display hardware at all.

what do we think? with the vampires and supercharged 060's out there; is there any need for a dedicated video decoder card? and maybe that can dump back into amiga accessable display ram?

thoughts and ideas? kinda shooting the breeze on this one, also to expand my understanding and knowledge if i'm honest  :)

A500 Vampire2, A600 Vampire2, A1200 Bliz030, A1200 Bliz040, A1200 BlizPPC, A3k CS MK3060, A4k C=040, CD32 TF330
 

Offline TribbleSmasher

Re: reverse engineer the CD32 FMV card.... ?
« Reply #1 on: January 09, 2020, 12:36:56 PM »
The FMV decodes the video directly to the monitor, there is no transfer to memory involved (not exposed to the user, afaik), you are right about that. The only thing to add is that the native Amiga screen gets genlocked onto the output of the FMV.

With a Vampire card you do not need any decoder hw anymore, it can decode MPEG1 streams in software, see Riva player.
« Last Edit: January 09, 2020, 12:38:27 PM by TribbleSmasher »
 

Offline darksun9210

Re: reverse engineer the CD32 FMV card.... ?
« Reply #2 on: January 09, 2020, 02:12:28 PM »
yeah i've seen riva player, and it's a good bit of software. hope for a little more performance out of the 2.12 vampire core to smoothen things out a touch, as always, everything could do with a little more zoom.
I usually disable audio to get smooth video on the Vamp, or degrade the video quality to get audio. always a balancing act.
I've taken some MP4's and DVD's and re-encoded them into mpg1's (handbrake on PC), and been able to play them back over the vampires network connection. the mpeg compression keeps the data rates roughly within the ethernet bandwidth available, with the CPU doing the grunt work. It's enough for my A500 to play back "hey Duggee" off of an SMB mounted network share from my home server to keep my kids entertained on my lap while i'm doing something else..
it glitches a bit here and there but base point is that it works.

but this is the perfect scenario. video playback in a window on either a chipset or RTG workbench windows. sure ECS isn't as pretty, but it works.

now. just running some numbers, if playing a 320x240x8bit video@25fps (pal 50i), the mpeg card is going to be dumping 1.8 meg of graphics data a second over the zorro bus. but where to? afaik you can't DMA into chipram? so would it have to be a cpu copy routine after all?
the there is RTG, could DMA be possible into the graphics ram of another zorro card? i suspect it is on Zorro3 with bus mastering, but not sure about zorro2...

mpeg decoders only really got going on the PC when AGP graphics cards started to roam the earth - effectively both devices getting their own dedicated bus into the northbridge. Especially when mpeg2 decoding of full frame DVD video at 720x512x24bit at 25fps would happily eat nearly 30meg a second, not even counting the audio.

so yes the vampire's very good, but it's not quite perfect. and what about all those non-vampire powered machines?

i'm pretty sure this is a case of "if it was possible, it would have been done already!"  ;D
« Last Edit: January 09, 2020, 02:13:33 PM by darksun9210 »

A500 Vampire2, A600 Vampire2, A1200 Bliz030, A1200 Bliz040, A1200 BlizPPC, A3k CS MK3060, A4k C=040, CD32 TF330
 

Offline TribbleSmasher

Re: reverse engineer the CD32 FMV card.... ?
« Reply #3 on: January 09, 2020, 02:55:37 PM »
Bandwidth is the key, if you keep it below 1500kbits, you are in safe area. The Vampire demos are all around 640x360x1500kbits.
And they play fine, there was even a x16 core for the V4 tested. If you want to decode the stream, you most certainly don't want to do this yourself, but instead use a better gfx card with FPGA/ARM, like the ZZ9000, and let it do the work for you.
 

Offline psxphill

Re: reverse engineer the CD32 FMV card.... ?
« Reply #4 on: January 09, 2020, 09:49:04 PM »
afaik you can't DMA into chipram?

Why do you think that? Lots of zorro2 cards can DMA into chip ram, it's not ideal but it works.

Video CD are 1.44 Mbps. AGA has enough bandwidth, not so sure about ECS.
 

Offline AmigaHope

Re: reverse engineer the CD32 FMV card.... ?
« Reply #5 on: January 10, 2020, 02:23:39 AM »
afaik you can't DMA into chipram?

Why do you think that? Lots of zorro2 cards can DMA into chip ram, it's not ideal but it works.

Video CD are 1.44 Mbps. AGA has enough bandwidth, not so sure about ECS.

That's 1.44Mbps of compressed MPEG stream. The decoded stream is ~61Mbits/s for NTSC. Mind you that's 24-bit video which AGA can't even display. If you cut it down by a third by having some sort of hardware HAM8 encoder in your card, you could theoretically stream a VCD as HAM8 onto an AGA system, while severely limiting any other chip memory activity done by the CPU. The question is, why?

Similar issues occur when you're trying to use AGA to display full-screen games, or output from an emulator, etc. The bandwidth of chip memory is such that a low-res game can do 8-bit 50/60fps using almost all of chip mem's bandwidth not used by Lisa/etc.  (and if CPU driven this means the CPU is eaten by wait states in the process, but you were talking about DMA). Since VCD is half that, it basically means that you'd be eating up half of the available chip cycles exposed to the CPU bus just by decoding the video. Doable, but again, why?
« Last Edit: January 10, 2020, 02:31:32 AM by AmigaHope »
 

Offline psxphill

Re: reverse engineer the CD32 FMV card.... ?
« Reply #6 on: January 10, 2020, 02:01:56 PM »
That's 1.44Mbps of compressed MPEG stream. The decoded stream is ~61Mbits/s for NTSC.

Ok, I got missed where the conversation went from FMV to some new device.

Supposedly VCD is 352x240x30hz, so 8 bit planes (either HAM8 or 256 color) would be 2,534,400 bytes a second. Which should be doable on a low res AGA screen.
 

Offline darksun9210

Re: reverse engineer the CD32 FMV card.... ?
« Reply #7 on: January 13, 2020, 11:04:47 AM »
ah ok. so provided the mpeg stream is small enough in frame size, in theory this may be a thing that could happen...

but looking at this with a bit of a wider view, i suspect we've kinda jumped the relevance of a separate mpeg card - given with the CPU options that are currently and potentially available.
and even if we've not got something with the horse power for real-time playback, the convenience of CPU/internal rendering with regard to the display options pretty much nullifies the extra effort required to get that external video pushed into somewhere useful for output. no-one wants a dedicated monitor for a single purpose unless you're a video production house, or if that's a hobby of yours.

i remember decoding mpegs "offline" so to speak, into a pile of frames at a more reasonable 8/5/4bit colour depth, and then re-combined those into a format that i could play. sure it took a lot more storage but that's the trade off...

[edit]
regarding the DMA into chipram, now you mention it. there is no real reason why not, i just wasn't sure - happy to learn though! :)
« Last Edit: January 13, 2020, 11:11:30 AM by darksun9210 »

A500 Vampire2, A600 Vampire2, A1200 Bliz030, A1200 Bliz040, A1200 BlizPPC, A3k CS MK3060, A4k C=040, CD32 TF330
 

Offline psxphill

Re: reverse engineer the CD32 FMV card.... ?
« Reply #8 on: January 15, 2020, 02:44:46 AM »
but looking at this with a bit of a wider view, i suspect we've kinda jumped the relevance of a separate mpeg card - given with the CPU options that are currently and potentially available.

Sure, although that doesn't automatically make it a bad idea to reverse engineer the CD32 FMV card.

You could re-implement it in an FPGA for lolz.
 

Offline darksun9210

Re: reverse engineer the CD32 FMV card.... ?
« Reply #9 on: January 15, 2020, 11:07:26 AM »
true enough, and i do really like the idea, but i like the idea even more of having it write back into framebuffer ram, be it chip or zorro so the amiga can actually do something with the graphics data itself; Instead of being just a glorified control system for a dedicated decoder/framebuffer combo - even if it was video-mixed/genlocked allowing a single display...

yeah yeah i know. cake, and eating it ;)

A500 Vampire2, A600 Vampire2, A1200 Bliz030, A1200 Bliz040, A1200 BlizPPC, A3k CS MK3060, A4k C=040, CD32 TF330
 

Offline ppcamiga1

Re: reverse engineer the CD32 FMV card.... ?
« Reply #10 on: January 16, 2020, 07:52:14 AM »
I like the way that Commodore made CD32 FMV card.
It was additional chip that generate video signal and mix it with amiga video.
Nice, elegant way of good old style of doing things.
No transfer to video memory, independent upgrade of hardware for movies, and you still can have amiga graphics on top of MPEG.
It will be good to se something like that even for vampire, it will save time of vampire team and precious cells in fpga.

 

Offline darksun9210

Re: reverse engineer the CD32 FMV card.... ?
« Reply #11 on: January 16, 2020, 10:09:35 AM »
no i wouldn't suggest to put it in the vampire core. i think they've got a lot on their plate already with what they're doing - to bother with creating a hardware video decoder. especially when their 080 core allows mpeg decoding in software. i imagine they'd just shrug and say, "whats the point?"  ;D

maybe a zorro card with an fpga, or a zorro adapted pi-compute module for the non-vampire equipped machines out there... ???

i think my main issue now with the old way of doing things, was the lack of flexibility. it turned the CD32 and or CDi for that matter, into a glorified control box for the mpeg player. Go full screen or go home. you couldn't play it in a window on workbench, or have a web browser page load with embedded videos and play them within that X/Y space on the screen.
straight up colour zero becomes the video feed. that's it. which is fine when you have pretty much zero cpu and graphics power, and only fullscreen movies to play. but i'm imagining something usable in the way we've become accustomed today.
IIRC, i think the 3DO was the first console machine with enough grunt to layer the video feed from the MPEG decoder into display ram - even usable as texture map in 3D space, or am i going to far there? i never was one for 3DO stuff. It, like neo-geo was only spoken about in hushed whispers on the playground as though it was some rare, almost mythical beast.

in a slightly different tangent; i've found AGAblaster - a new CDXL video player, and AGAconv - a conversion util for linux, (and the windows linux mashup) that uses ffmpeg to convert video into CDXL.
Plus as storage space is cheap these days, i'm going to prat about with that, and see if it's a possible idea i can work with.

A500 Vampire2, A600 Vampire2, A1200 Bliz030, A1200 Bliz040, A1200 BlizPPC, A3k CS MK3060, A4k C=040, CD32 TF330
 

Offline psxphill

Re: reverse engineer the CD32 FMV card.... ?
« Reply #12 on: January 16, 2020, 02:43:30 PM »
i think the 3DO was the first console machine with enough grunt to layer the video feed from the MPEG decoder into display ram - even usable as texture map in 3D space, or am i going to far there?

Apparently there is a different 3do video cd adapter for NTSC & PAL, so it's possible they worked the same as the CD32. Normal game video is done differently.

Even if it did, I don't think it supported 24 bit textures.

but i like the idea even more of having it write back into framebuffer ram, be it chip or zorro so the amiga can actually do something with the graphics data itself; Instead of being just a glorified control system for a dedicated decoder/framebuffer combo - even if it was video-mixed/genlocked allowing a single display...

Sure and if you could have gone back to 1986 and stop them wasting money on AAA and start AGA sooner so that it could have had chunky 256 and 24 bit video, so that when the CD32 came it could dma the graphics in and actually display them then maybe it would have happened. They may have had to develop their own custom MPEG decoder chips though & commodore had basically no money when doing the CD32
« Last Edit: January 16, 2020, 02:48:23 PM by psxphill »
 

Offline darksun9210

Re: reverse engineer the CD32 FMV card.... ?
« Reply #13 on: January 16, 2020, 04:12:53 PM »
yeah i know, that's what i'm saying. they did what they could with the tech of the time.
we're in a slightly better place now. i mean look at hobbist's getting PCBs and stuff done these days with guys like Individual, Amigakit doing their own things, and the TF opensource stuff and the re-amiga projects.
i honestly didn't think there were that many CD32's alive in the wild now, and then seeing the numbers of people wanting the TF330...  it did hearten me to see....

lol, and yeah, don't get me started on what i'd do for amiga if i had a time machine :D

A500 Vampire2, A600 Vampire2, A1200 Bliz030, A1200 Bliz040, A1200 BlizPPC, A3k CS MK3060, A4k C=040, CD32 TF330