I stand to be corrected, but I believe it is legal to give a "bad" reference. Catch is, anything which is said or written about you has to able to be verified. So if for example your previous employers claimed that you were always late for shifts, they would have to hold some form of documentation (sign-in, clock-in reports etc).
You can ask your prospective new employers for a copy of any written reference, and unless your previous employers had specifically requested that it remains confidential (which few bother to do) I believe they are obliged to provide you with a copy.
If you get that far, search for anything you feel is inaccurate or unfair and challenge it.
Obviously this is somewhat time consuming,but if you threaten your former workplace with legal action you should be able to get them to sign any reference you want them to!