Esempio n. 1
0
        private static void BuildBasicWall(Colors color)
        {
            C64.FillMemory(C64Address.FromLabel("screenMemory+$01B8"), WallChar, 0);
            C64.FillMemory(C64Address.FromLabel("screenMemory+$02B8"), WallChar, 0);
            C64.FillMemory(C64Address.FromLabel("screenMemory+$0300"), WallChar, 0);

            C64.FillMemory(C64Address.FromLabel("colorMemory+$01B8"), (uint)color, 0);
            C64.FillMemory(C64Address.FromLabel("colorMemory+$02B8"), (uint)color, 0);
            C64.FillMemory(C64Address.FromLabel("colorMemory+$0300"), (uint)color, 0);

            C64.CopyMemory(C64Address.FromLabel("screenMemory+$0320"), C64Address.FromLabel("tbl_WallBaseChars"), 199);

            uint d = 0;

            for (uint y = 3; y < 11; y++)
            {
                for (uint x = 37; x < 40; x++)
                {
                    var b = C64.GetMemory(C64Address.FromLabel("tbl_LevelEndBellChars"), d);

                    C64.SetChar(x, y, b, Colors.Grey3);
                    d++;
                }
            }
        }
Esempio n. 2
0
        public static void Clear(Colors charColor = Colors.Black)
        {
            C64.FillMemory(C64Address.FromLabel("(screenMemory)"), 32, 0);
            C64.FillMemory(C64Address.FromLabel("(screenMemory+$100)"), 32, 0);
            C64.FillMemory(C64Address.FromLabel("(screenMemory+$200)"), 32, 0);
            C64.FillMemory(C64Address.FromLabel("(screenMemory+$300)"), 32, 232);

            C64.FillMemory(C64Address.FromLabel("(colorMemory)"), (uint)charColor, 0);
            C64.FillMemory(C64Address.FromLabel("(colorMemory+$100)"), (uint)charColor, 0);
            C64.FillMemory(C64Address.FromLabel("(colorMemory+$200)"), (uint)charColor, 0);
            C64.FillMemory(C64Address.FromLabel("(colorMemory+$300)"), (uint)charColor, 232);
        }
Esempio n. 3
0
        public override void Animate()
        {
            ulong primeNumber = 773;
            ulong tmp         = 0;

            for (ulong i = 0; i < 1000; i++)
            {
                tmp += primeNumber;
                if (tmp > 1000)
                {
                    tmp -= 1000;
                }
                C64.FillMemory(C64Address.FromLabel("(screenMemory)") + tmp, 32, 1);
            }
        }
        public static void Display()
        {
            Screen.Clear(Colors.White);
            C64.CopyMemory(C64Address.FromLabel("(screenMemory+$CD)"), C64Address.FromLabel("titleScreen"), 0);
            C64.CopyMemory(C64Address.FromLabel("(screenMemory+$1CD)"), C64Address.FromLabel("titleScreen+$100"), 0);
            C64.CopyMemory(C64Address.FromLabel("(screenMemory+$21B)"), C64Address.FromLabel("titleScreen+$14E"), 0);

            C64.Write(13, 1, "OCEAN SOFTWARE", Colors.Green);
            C64.Write(13, 3, "   PRESENTS   ", Colors.White);
            C64.Write(25, 21, "   BY J.STEELE", Colors.Green);
            C64.Write(7, 23, "PRESS F1 FOR INSTRUCTIONS", Colors.White);
            C64.Write(7, 24, "    OR SPACE TO START    ", Colors.White);

            var tones = GetTones();

            for (; ;)
            {
                var color = (uint)1;
                foreach (var t in tones)
                {
                    color++;
                    if (color == 7)
                    {
                        color = 1;
                    }
                    C64.Sound.PlayEffectReg1(WaveForm.Saw, t.Frequency, 0, 9, 0, false);
                    C64.FillMemory(C64Address.FromLabel("(colorMemory+$CD)"), color, 0);
                    C64.FillMemory(C64Address.FromLabel("(colorMemory+$1CD)"), color, 0);
                    C64.FillMemory(C64Address.FromLabel("(colorMemory+$21B)"), color, 0);

                    for (uint k = 0; k < 50u; k++)
                    {
                        for (uint kk = 0; kk < t.Sustain; kk++)
                        {
                            if (C64.IsKeyPressed(Keys.Space) || (C64.Joysticks.Joystick2.Pressed & JoystickButtons.Fire) == JoystickButtons.Fire)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }