Ejemplo n.º 1
0
        public void Setup(int length, params Option[] options)
        {
            _done = VByte.New(Ram, $"{nameof(VRamQueue)}{nameof(_done)}");
            //_handlerAddress = VWord.New(ram, "VRamQueue_handlerAddress");
            _executeLoopContinue = Labels.New();
            _executeLoopBreak    = Labels.New();

            _liveQueue = LiveQueue.New(Zp, Ram, Ram, length, $"{nameof(VRamQueue)}{nameof(_liveQueue)}", Op.Stop);

            _options = options ?? Array.Empty <Option>();

            OptionModules();
        }
        //TODO: this doesn't have to be aligned to a page, so allow scenes to use this directly with their ram refs
        public void Setup(U16 pageStart, U8 length)
        {
            _done = VByte.New(Ram, $"{nameof(VRamQueue)}{nameof(_done)}");
            _executeLoopContinue = Labels.New();
            _executeLoopBreak    = Labels.New();

            var VRAM = Ram.Allocate(Addr(pageStart), Addr((U16)(pageStart + 0xFF)), "VRAM");

            _ops = new List <VRamQueueOp>();
            _ops.Add(new NOP());
            _opHandlers = new List <Label>();
            _liveQueue  = LiveQueue.New(Zp, Ram, VRAM, length, $"{nameof(VRamQueue)}{nameof(_liveQueue)}", Op <Stop>()?.Id ?? 255);
        }
Ejemplo n.º 3
0
        //TODO: this doesn't have to be aligned to a page, so allow scenes to use this directly with their ram refs
        public void SetupAligned(U16 pageStart, U8 length, params Option[] options)
        {
            _done = VByte.New(Ram, $"{nameof(VRamQueue)}{nameof(_done)}");
            //_handlerAddress = VWord.New(ram, "VRamQueue_handlerAddress");
            _executeLoopContinue = Labels.New();
            _executeLoopBreak    = Labels.New();

            var VRAM = Ram.Allocate(Addr(pageStart), Addr((U16)(pageStart + 0xFF)), "VRAM");

            _liveQueue = LiveQueue.New(Zp, Ram, VRAM, length, $"{nameof(VRamQueue)}{nameof(_liveQueue)}", Op.Stop);

            _options = options ?? Array.Empty <Option>();

            OptionModules();
        }