+ assign vgavs = (posy > 147) && (posy < 151);
+ assign vgahs = (posx < 250) && (posx < 350);
+ assign vgar = (posx < 160) && (posy < 144) ? {posy == rLYC ? 3'b111 : 3'b000} : 3'b000;
+ assign vgag = (posx < 160) && (posy < 144) ? {posy < rSCY ? 3'b111 : 3'b000} : 3'b000;
+ assign vgab = (posx < 160) && (posy < 144) ? {2'b11} : 2'b00;
+
+ reg mode00irq = 0, mode01irq = 0, mode10irq = 0, lycirq = 0;
+ assign lcdcirq = (rSTAT[3] & mode00irq) | (rSTAT[4] & mode01irq) | (rSTAT[5] & mode10irq) | (rSTAT[6] & lycirq);
+ assign vblankirq = (posx == 0 && posy == 153);
+
+ always @(posedge clk4)