The link to the court decision can be found here => R. v Sullivan
Without going to far in the weeds of criminal law, two elements need to be present for a criminal conviction; the actus reus (the actual act) and the mens rae (the state of mind). A person who lack the mens rae is said to be acting with automatism and therefore their actions are not voluntary and cannot be said to be criminal. As the judge explains (quotes from ruling all italicized throughout):
Automatism is defined as “a state of impaired consciousness, rather than unconsciousness, in which an individual, though capable of action, has no voluntary control over that action”: R. v. Stone,  2 S.C.R. 290, at para. 156, per Bastarache J. Involuntariness is therefore the essence of automatism. The“mind does not go with what is being done”: Rabey v. The Queen,  2 S.C.R. 513, at p. 518, citing R. v. K.,  2 O.R. 401 (S.C.), at p. 401.
The most common way of describing automatism is "not guilty by reason of insanity", technically known in Canadian law as "not criminally responsible" (NCR).
There are two branches to the defence of automatism. The mental disorder defence, codified in s. 16 of the Criminal Code, R.S.C., 1985, c. C-46, applies where involuntariness is caused by a disease of the mind, since those who are in a state of automatism are incapable of appreciating the nature and quality of their acts or of knowing at the time of their conduct that it is morally wrong [“mental disorder automatism”]. If successful, a mental disorder automatism defence will result in a not criminally responsible verdict, with the likelihood of detention or extensive community supervision.
The other branch, and the focus of both Section 33.1 of the Criminal Code and the ruling of the court is this branch:
The alternative branch, the common law automatism defence, applies where the involuntariness is not caused by a disease of the mind [“non-mental disorder automatism”]. Where a non-mental disorder automatism defence succeeds, the accused is acquitted.
In response to this common law defence, Parliament passed Section 33.1 of the Criminal Code of Canada which deprived anyone who was voluntary intoxciated of using non-mental disorder automatism as a defense.
Part of the debate in this ruling was the relationship between Parliament and the judiciary. The judiciary must respect and show deference to duly enacted laws of Parliament. But Parliament may not pass laws that violate fundamental justice as enshrined in the Charter. And it is the function of the judiciary to rule on Charter issues.
The judge writes:
I also recognize Parliament’s core competency in creating criminal offences. However, courts have core competency in identifying constitutional principles that determine the proper reach of criminal liability in our free and democratic society, and the responsibility to protect those principles from unconstitutional laws: Reference re Section 94(2) of the B.C. Motor Vehicle Act, at para. 15. As Vertes J. observed in R. v. Brenton, “deference is not the same thing as merely taking Parliament’s choice at face value. That would be an abdication of [judicial] responsibility”: (1999), 180 D.L.R. (4th) 314 (N.W.T.S.C.), at para. 78, rev’d for other reasons, 2001 NWTCA 1, 199 D.L.R. (4th) 119. Even after due deference is accounted for, Parliament’s choice in enacting s. 33.1 cannot be demonstrably justified in a free and democratic society.
Finally (for this post), the judge reviews the debate before Parliament at the time of the passage of 33.1 of the Criminal Code. The judge suggests that creating a charge of "Criminal Intoxication" would serve to advance the the purpose of s. 33.1 while at the same time preserving the aims of fundamental justice for the accused.
I agree with the trial judge that the option of a stand-alone offence of criminal intoxication would achieve the objective of s. 33.1. Making it a crime to commit a prohibited act while drunk is the response Cory J. invited in Daviault, at p. 100, and that was recommended by the Law Reform Commission of Canada: see Recodifying Criminal Law, Report 30, vol. 1 (1986), at pp. 27-28. It is difficult to reject this option as a reasonable alternative given the impressive endorsements it has received...
Certainly, this option would also be less impairing than s. 33.1 since it does not infringe, let alone deny, the Charter rights that s. 33.1 disregards. It would criminalize the very act from which the Crown purports to derive the relevant moral fault, namely, the decision to become intoxicated in those cases where that intoxication proves, by the subsequent conduct of the accused, to have been dangerous.
This distinction protects and safeguards important civil liberties while providing for accountability for offenders. I wonder, also, whether non-mental disorder automatism could fall under the NCR category. Those found NCR for voluntary intoxication could be placed in forensic facilities fo treatment and supervision.