atarilux Posted February 24, 2021 Share Posted February 24, 2021 (edited) I recently watched a video which shows a video player by Avery Lee on an 800XL, I have to say that was very impressive. That got me to thinking, is there any way to stream video into an ATARI 800XL and get similar results? The stream could be from a low res camera or via an online feed. Doing it via SIO is too slow, but via PBI or Cartridge may be possible. So being "new" to programming on these machines I wondered if there are any carts etc which receive data externally so that the Atari can then read it? I guess this all seems a little mad, but it would be fun to push the boundaries... Edited February 24, 2021 by atarilux Quote Link to comment Share on other sites More sharing options...
777ismyname Posted February 27, 2021 Share Posted February 27, 2021 SIDE 2 or SIDE 3 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted February 27, 2021 Share Posted February 27, 2021 2 hours ago, 777ismyname said: SIDE 2 or SIDE 3 Or AVGCart, but I am not sure what OP is asking. He wants to stream video from camera or online feed. Quote Link to comment Share on other sites More sharing options...
atarilux Posted February 27, 2021 Author Share Posted February 27, 2021 Hi River, Thanks for your reply. I want to stream from a webcam. I figured if it is possible to play a movie, streaming from a camera should also be possible. Although connecting a USB camera etc would require a way to get all the hardware talking. Quote Link to comment Share on other sites More sharing options...
Mazzspeed Posted February 27, 2021 Share Posted February 27, 2021 1 minute ago, atarilux said: Hi River, Thanks for your reply. I want to stream from a webcam. I figured if it is possible to play a movie, streaming from a camera should also be possible. Although connecting a USB camera etc would require a way to get all the hardware talking. It has to connect into the PBI bus in order to have the bandwidth needed to stream video. Considering most of the webcam's I've ever seen are USB devices I doubt such an interface exists. It does beg the question however...Why? What would you be trying to achieve? You're not exactly gonna start a Zoom meeting with your work colleagues via an 800XL. Quote Link to comment Share on other sites More sharing options...
atarilux Posted February 27, 2021 Author Share Posted February 27, 2021 You are right "why"? The point is not to create Zoom but to see how far I can push the Atari in the direction of some cool stuff that we do on present day technology. I work in areas where we regularly do such things but on high-end hardware, but having seen the video playing it got me to thinking that we can still achieve a lot with relatively little hardware. Once a camera can be connected there is the option of doing many other programmes etc. So it is not an end in itself. More a starting point for me and others to do other projects. I had looked at the PBI in another thread, so that is the direction of travel for IO. Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 27, 2021 Share Posted February 27, 2021 At this point the quickest IO speed involves the CPU moving the data. That method is at least 8 cycles per byte which is too slow for decent video, especially if you want to use programming tricks to get better graphics (ie more colours). Throw in DMA and refresh losses and you're looking at maybe a tad over 150K per second theoretical. Another method, I think phaeron might have used it, could be to just read the data and get Antic to just display from the hardware data buffer. That frees up the CPU somewhat but requires fairly precise timing to get it right. The ideal (maybe) would be to use our non-existent (at this point) device that does DMA transfers rather than relying on the CPU. Or ideal #2 - a coprocessor device in cartridge that reads from SD then presents the data in it's internal RAM to be displayed by Antic. But as for live streaming - more complex and needing a custom external hardware solution. And still, we have possibly great cost for the sake of having video at a crappy resolution and framerate with not very much colour (OK, we might get 80x200 256 colours) and we've not even started to consider audio yet (though that could be just fed as analog into SIO or PBI for nothing) Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted February 27, 2021 Share Posted February 27, 2021 1 hour ago, Rybags said: The ideal (maybe) would be to use our non-existent (at this point) device that does DMA transfers rather than relying on the CPU. SIDE3 is capable of this already at a rate of 1 byte per 6502 machine cycle. So - on the face of it - you could position the display RAM in one of the cartridge SRAM windows and move upwards of 1MB/s off a FAT formatted SD card without too much trouble. 3 Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 27, 2021 Share Posted February 27, 2021 I had no idea... possibly time for me to look into aquiring one. Quote Link to comment Share on other sites More sharing options...
Mathy Posted February 27, 2021 Share Posted February 27, 2021 (edited) Hello guys The problem isn't DMA transfer, the problem is converting the data to something ANTIC understands on the fly. Usually you'd convert a video on a modern computer and shovel the converted data into the Atari. If you'd want to do that on the fly, you might want to use a small device like the ESP that Thom and his team are using for FujiNet. Connect you camera (or phone) via USB to the ESP and the ESP via PBI to the Atari. Sincerely Mathy Edited February 27, 2021 by Mathy 2 Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 28, 2021 Share Posted February 28, 2021 I was going on the premise that the incoming stream would be ready to display by Antic. Of course if processing was required then you'd be lucky to hit 2 FPS. 1 Quote Link to comment Share on other sites More sharing options...
atarilux Posted February 28, 2021 Author Share Posted February 28, 2021 (edited) This is when other devices come in such as Raspberry PIs (Pi Camera or USB). Basically you could use that as a bridge device which reduces the image to something the ATARI can handle. Essentially downscaling it as many cameras have a resolution that would probably be larger than the Atari can handle... although I do have some really old ones around somewhere! At first you would send the entire image (in ATARI graphics/DLI friendly formats), then only changed pixels from that point on perhaps with the occasional send of the full image. This would radically lower the bandwidth needed. I am not an expert on Atari programming yet, I am coming back to it after about 30 years but it could be that you write to the relevant shadow areas in RAM so that Antic can read them. As someone noted though timing could be an issue. The rule would be though that the actual application e.g. what is being done with the end image, has to be done on the ATARI. Edited February 28, 2021 by atarilux Quote Link to comment Share on other sites More sharing options...
phaeron Posted February 28, 2021 Share Posted February 28, 2021 If you are trying to hit 60 fps as the video player did, there is no time for the CPU to do anything to the image. It takes 30% of the memory bandwidth and 73% of the CPU just to drive the display. The 6502 also isn't remotely fast enough to even copy the frame in time even if the display was turned off. I tried a PIO-based player prior to the DMA-based version and it was unable to run faster than about 8 fps, the fastest rate that the 6502 could copy the frames from the IDE port to the framebuffer. Any processing on the frame would be much lower than that, so processing deltas on the CPU isn't an option. The Atari PBI and cartridge ports are also unable to support DMA, but even if they did, there isn't enough memory bandwidth to support writing a new frame to RAM with ANTIC and the CPU also taking what they need for display, sound, and control logic. The only realistic way is for ANTIC to pull directly from the hardware as the DMA player did or as SIDE 3 can support with its ability to DMA from the SD card to on-cartridge RAM. 1 Quote Link to comment Share on other sites More sharing options...
atarilux Posted February 28, 2021 Author Share Posted February 28, 2021 Phaeron, thanks for your reply. To be clear, I am certainly not hoping for anywhere near 60fps. Eight is FPS is certainly on the lower end. DMA is initially what I had thought about but as I am returning to the Atari after some time I am trying to get my head around how that may or indeed may not be possible. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.