I'm on a roll now, let's see if we can get the atari 800 computer eyes to show something.

I found a file with v1.3 and v2.0 and the plain 800 driver wouldn't load it, but the 800xl driver would boot them properly.

So let's make some changes to atari400.cpp:

We'll add our capture buffer, plus a couple of functions to pass-through the pia read and write:

uint m_computereyescapturebuffer[192][320];  // resolution of atari 800 capture is 320x192
int  m_cex, m_cey;
int m_portb_write;

uint8_t mypiaread_alt(offs_t offset){

int retval = m_pia->read_alt(offset);

if (offset==0) {

int threshold = ((m_portb_write & (1<<3)) ? 128 : 0) +      // bit 3 = threshold bit 7
                ((m_portb_write & (1<<2)) ? 64  : 0) +      // bit 2 = threshold bit 6
                ((m_portb_write & (1<<1)) ? 32  : 0) ;      // bit 1 = threshold bit 5

retval = m_computereyescapturebuffer[std::min(m_cey,191)][std::min(m_cex,319)]>threshold ? 0x40:0;  // return capture in bit 6, sync is bit 7

// find address of pc
std::string mycontext = machine().describe_context();
int myaddr = stoi(mycontext.substr(mycontext.find("(")+1,4),nullptr,16);
if (myaddr==0x1eb7) // only increment our position if we are reading $D300 at address 0xc101
  if(m_cey>191) {m_cey=0; m_cex=m_cex+1;}
//printf("read pia offset=%x return=%x\n",offset,retval);
return retval;

void   mypiawrite_alt(offs_t offset, uint8_t data) {

if (offset==0) {  // reset the counters on any port write
  printf("set cex,cey to zero pia write to D300 \n");
  m_portb_write = data;
;printf("write pia offset=%x  data=%x\n",offset,data); m_pia->write_alt(offset,data); }


put my pass through handlers into the memory map in place of the pia:
void a400_state::a800xl_mem(address_map &map)
        map(0x0000, 0xcfff).rw(FUNC(a400_state::a800xl_low_r), FUNC(a400_state::a800xl_low_w));
        map(0xd000, 0xd0ff).rw(m_gtia, FUNC(gtia_device::read), FUNC(gtia_device::write));
        map(0xd100, 0xd1ff).noprw();
        map(0xd200, 0xd2ff).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write));
//      map(0xd300, 0xd3ff).rw(m_pia, FUNC(mypiaread_alt), FUNC(pia6821_device::write_alt));
// put in my pia functions
        map(0xd300, 0xd3ff).rw(FUNC(a400_state::mypiaread_alt), FUNC(a400_state::mypiawrite_alt));
        map(0xd400, 0xd4ff).rw(m_antic, FUNC(antic_device::read), FUNC(antic_device::write));
        map(0xd500, 0xd7ff).noprw();
        map(0xd800, 0xffff).rw(FUNC(a400_state::a800xl_high_r), FUNC(a400_state::a800xl_high_w));

add our save item to a800xl:
MACHINE_START_MEMBER( a400_state, a800xl )
        m_mmu = 0xfd;
        m_ext_bank = 0x03;  // only used by a130xe




Making a picture in Gimp that's 320x192.

and our lua code to load the picture from a disk file:
a=f:read("*a") f:close() print(#a) 
quick = emu.items()["Atari 800XL (NTSC)/:/0/m_computereyescapturebuffer"] print(quick)
for i=0,320*200-1 do emu.item(quick):write(i,a:byte(1+i*4)) end  -- just grab the red component to make it simple

[Linked Image from i.imgur.com][Linked Image from i.imgur.com][Linked Image from i.imgur.com][Linked Image from i.imgur.com]

What's different about the Atari 800 is that you get two new options: High contrast and Low contrast which gives you a 4 level grayscale capture, which I like a little better than the dithering.

[Linked Image from i.imgur.com][Linked Image from i.imgur.com]