A bill to allow up to seven casinos in New York would allow for the first four to be upstate and give existing racetracks tax parity with the casinos in their regions, a memo outlining the agreement shows.

The deal would give the four casinos exclusivity for seven years, which would also mean that the New York City area racinos — Aqueduct and Yonkers — would have exclusivity in their regions for the same period.

But if a November referendum on the casino deal fails, the state’s Gaming Commission would be allowed to set up four new video-lottery facilities — one in each casino region and on Long Island. The move is aimed at keeping the racinos from fighting the November referendum.

The three regions available for casinos would be the Southern Tier, Catskills and Albany area.

“Additional video-lottery gaming facilities in New York will help combat the loss of revenue to neighboring states with gaming facilities and secure new funding for educational assistance,” the memo, obtained by Gannett’s Albany Bureau, states.

But racinos are getting much of what they wanted: tax parity if new casinos are built near they existing facilities.

The tax rate on the slot machines would be equal to the existing tax rate for video-lottery terminals, which range from 37 percent to 45 percent, the memo states.

In another sweetener to get the referendum passed, 10 percent of the revenue from the state received from Indian casinos would go to the counties in regions where the tribes have exclusive gaming rights: western, central and northern New York.

“There was a commitment not to hurt the racinos, and we were going to do whatever was necessary in the legislation and be flexible so their rate would be competitive with casinos but not hurt them,” said Senate Racing and Wagering Committee Chairman John Bonacic, R-Mount Hope, Orange County.