if(_c64_fs_filebuf[0] == 0 && f->ptr > _c64_fs_filebuf[1]) { _c64_fs_filebuf[1] = f->ptr; }
c64_fs_write(register struct c64_fs_file *f, char *buf, int len){  int i;  if(len <= 0) {    return 0;  }  /* Check if current block is already in buffer, and if not read it     from disk. */  if(_c64_fs_filebuftrack != f->track ||     _c64_fs_filebufsect != f->sect) {    _c64_fs_filebuftrack = f->track;    _c64_fs_filebufsect = f->sect;    c64_dio_read_block(_c64_fs_filebuftrack,		       _c64_fs_filebufsect,		       _c64_fs_filebuf);  }  i = 256 - f->ptr;  if(len < i) {    i = len;  }  memcpy(&_c64_fs_filebuf[f->ptr], buf, i);  f->ptr += i;  c64_dio_write_block(_c64_fs_filebuftrack,		      _c64_fs_filebufsect,		      _c64_fs_filebuf);    return i;}