Jump to content

Photo

Need help with IDE hardware

IDE hardware video playback

2 replies to this topic

#1 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,670 posts
  • Location:Bay Area, CA, USA

Posted Sat Jul 7, 2012 9:17 PM

I've been experimenting with video playback on the Atari with the SIDE cart, and I've run into a problem with the I/O that I was hoping someone with IDE experience could shed light on. For the most part it works, but there's a problem where a byte is getting dropped from the IDE device.

Here's a ready to go emulator setup so you can see what it's supposed to look like (3MB, too big to attach here). The SIDE drive is already configured when you launch Altirra and you just have to load the player executable.
http://www.virtualdu...r/side-movie.7z

...and here's what I'm occasionally getting on the real hardware:
side-video-artifact.jpeg

I'm using 8-bit transfer mode with a 32 sector block size and the READ MULTIPLE command, with a 512MB CompactFlash card. It was much worse when I was using the plain READ SECTOR command, and adding a DRQ wait at the beginning of each sector didn't help. I reset the device and configure it for PIO mode 6 before playback. I have a 15KHz IRQ running to do sound and to flip PRIOR, so I don't have a lot of cycles to spare for workarounds and definitely can't afford to re-read sector blocks. I've confirmed that the I/O is happening fast enough to avoid buffer underruns in the player and that no errors are getting signaled by the drive. Any ideas?

Attached Files



#2 bob1200xl OFFLINE  

bob1200xl

    River Patroller

  • 2,581 posts

Posted Sat Jul 7, 2012 9:57 PM

IDE interfaces use edge triggering to clock the data from the device. This makes them sensitive to ringing on the interface control signals, which results in two reads being seen by the device where only one was sent from the system.

When you 'drop' a byte, two things may happen: If you are doing a read multiple, the device just starts reading the next sector. If you are doing a read sector, the system doesn't get what it thinks is the last byte because two bytes were sent during one of the data reads. This may hang the interface.

It has been my experience that the buffer in the CF card (or a real drive) is much faster than anything the Atari is doing, which eliminates any chance of overruns. Once the first byte is 'ready' (and, it's always ready in just a ms or so), you can read the data as fast as you like. I've done millions of sectors on CF cards with no data loss.

I don't know what kind of circuit SIDE uses, but yours may need some tweaking. How much ringing you get depends on the ground path, the logic type and the series damping resistance.

Bob




I've been experimenting with video playback on the Atari with the SIDE cart, and I've run into a problem with the I/O that I was hoping someone with IDE experience could shed light on. For the most part it works, but there's a problem where a byte is getting dropped from the IDE device.

Here's a ready to go emulator setup so you can see what it's supposed to look like (3MB, too big to attach here). The SIDE drive is already configured when you launch Altirra and you just have to load the player executable.
http://www.virtualdu...r/side-movie.7z

...and here's what I'm occasionally getting on the real hardware:
side-video-artifact.jpeg

I'm using 8-bit transfer mode with a 32 sector block size and the READ MULTIPLE command, with a 512MB CompactFlash card. It was much worse when I was using the plain READ SECTOR command, and adding a DRQ wait at the beginning of each sector didn't help. I reset the device and configure it for PIO mode 6 before playback. I have a 15KHz IRQ running to do sound and to flip PRIOR, so I don't have a lot of cycles to spare for workarounds and definitely can't afford to re-read sector blocks. I've confirmed that the I/O is happening fast enough to avoid buffer underruns in the player and that no errors are getting signaled by the drive. Any ideas?



#3 candle OFFLINE  

candle

    River Patroller

  • 2,793 posts
  • Location:Lublin, Poland

Posted Sun Jul 8, 2012 1:00 AM

Hey Avery

I'm glad its good for something
as for your problem - whatever Bob says
ground bounce might be a problem, since i forget to restore polygons on that pcb before it went into pcb house, and i found that it helps, if i add additional wires from atari mobo directly to lm1117 LDO on side
ignore that dropped byte for now, as it is not software related
also, if you have an access to xilinx programmer, we can work together to see if there is a chance of fixing this in HDL

one note: can this be used with anything else than RAW? or you simply run out of cpu time to have this movie over any normal partition (=fat32)

Edited by candle, Sun Jul 8, 2012 1:26 AM.






Also tagged with one or more of these keywords: IDE, hardware, video playback

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users