Malfunction.java
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: package xeij;
14:
15: class Malfunction {
16:
17: public static final boolean MLF_ON = false;
18:
19:
20:
21:
22: public static void mlfRaster (int dataY) {
23: int my = (CRTC.crtR11TxYZero + dataY) & 1023;
24: final int ba = 0x00e00000 + (0 << 17);
25: int sa = ba + 128 * my;
26: int ea = sa + 128;
27: for (int a = sa; a < ea; a += 2) {
28: MainMemory.mmrM8[a] = (byte) (((random () >>> 24) & 0xf0) |
29: (MainMemory.mmrM8[a] & 0x0f));
30: }
31: }
32:
33: private static int x = 123456789;
34: private static int y = 362436069;
35: private static int z = 521288629;
36: private static int w = 88675123;
37: private static int random () {
38: int t = x ^ (x << 11);
39: x = y;
40: y = z;
41: z = w;
42: return w = (w ^ (w >>> 19)) ^ (t ^ (t >>> 8));
43: }
44:
45: }