diff --git a/src/d6502/base.d b/src/d6502/base.d index 6d24dc4..b8fc220 100644 --- a/src/d6502/base.d +++ b/src/d6502/base.d @@ -41,7 +41,7 @@ final class StatusRegister ubyte toByte() { return (carry ? 0x01 : 0) | - ((zero_ == 0) ? 0x02 : 0) | + ((zero_ == 0) ? 0x02 : 0) | (interrupt ? 0x04 : 0) | (decimal ? 0x08 : 0) | 0x30 | // break and reserved both set @@ -137,4 +137,3 @@ class CpuBase abstract void nmiLow(bool signalLow); abstract void irqLow(bool signalLow); } - diff --git a/src/d6502/cmos.d b/src/d6502/cmos.d index cf33206..4a84901 100644 --- a/src/d6502/cmos.d +++ b/src/d6502/cmos.d @@ -219,7 +219,7 @@ class Cmos : Cpu programCounter = readWord(vector, cast(ushort)(vector + 1)); version(CumulativeCycles) ticks(totalCycles); } - + /* JMP ($$$$,X) */ void opcode7C() { @@ -237,4 +237,3 @@ class Cmos : Cpu flag.zero_ = accumulator & readVal; } } - diff --git a/src/d6502/cpu.d b/src/d6502/cpu.d index 5d123a9..76408df 100644 --- a/src/d6502/cpu.d +++ b/src/d6502/cpu.d @@ -295,7 +295,7 @@ class Cpu : CpuBase programCounter = tryShortcut(false, cast(ushort)(programCounter + offset)); } - + final void addrZeropage() { primaryAddress = readByteOperand(); diff --git a/src/d6502/nmosundoc.d b/src/d6502/nmosundoc.d index 9d02fd5..b726cad 100644 --- a/src/d6502/nmosundoc.d +++ b/src/d6502/nmosundoc.d @@ -199,7 +199,7 @@ class NmosUndoc : NmosBase readVal = operand1 = readFinal(programCounter); flag.zero_ = flag.negative_ = (accumulator = readVal); flag.carry = (flag.negative_ > 0x7F); - } + } /* ANC #$$ */ override void opcode2B() @@ -350,4 +350,3 @@ class NmosUndoc : NmosBase else hex_subWithCarry(readVal); } } - diff --git a/src/device/keyboard.d b/src/device/keyboard.d index a21b827..dbc1bba 100644 --- a/src/device/keyboard.d +++ b/src/device/keyboard.d @@ -156,7 +156,7 @@ class Keyboard void processPresses() { if (!presses.canRead()) return; - + anyKeyDown = true; keyStrobe = true; @@ -409,4 +409,3 @@ class Keyboard_IIe : Keyboard "W", "clearKeystrobe")) ])); } - diff --git a/src/device/speaker.d b/src/device/speaker.d index c240155..33a2b04 100644 --- a/src/device/speaker.d +++ b/src/device/speaker.d @@ -62,7 +62,7 @@ class Speaker uint processExtraBuffer(uint elapsed) { uint newElapsed = elapsed; - + if (extraIndex != 0) { for (; extraIndex < extraBuffer.length; ++extraIndex) @@ -106,7 +106,7 @@ class Speaker uint elapsedSinceToggle = cycle.currentVal() - lastToggleTick; lastToggleTick = cycle.currentVal(); elapsedSinceToggle = processExtraBuffer(elapsedSinceToggle); - + uint samples = elapsedSinceToggle / sampleTicks; uint extraTicks = elapsedSinceToggle % sampleTicks; @@ -126,7 +126,7 @@ class Speaker { toggled = true; update(); - sample = ~sample; + sample = ~sample; } void clearBuffer() diff --git a/src/host.d b/src/host.d index 4a3d339..aabc8ab 100644 --- a/src/host.d +++ b/src/host.d @@ -45,7 +45,7 @@ static this() } if (SDL_Init(0) == -1) { - writefln("%s", to!string(SDL_GetError())); + writefln("%s", to!string(SDL_GetError())); return; } SDL = true; @@ -78,7 +78,7 @@ class Delay { while (soundCardHasEnoughData()) { - usleep(1000); + usleep(1000); } } @@ -102,7 +102,7 @@ class Delay if (timeCompare(&timeShould, &timeNow, &timeDiff)) { usleep(cast(uint)timeDiff.tv_usec); - } + } } void reset() diff --git a/src/iomem.d b/src/iomem.d index 524243b..7858870 100644 --- a/src/iomem.d +++ b/src/iomem.d @@ -197,7 +197,7 @@ class IOMem_IIe : IOMem void reset() { - deactivateStrobeMem(); + deactivateStrobeMem(); resetIntCXROM(); resetSlotC3ROM(); } @@ -210,7 +210,7 @@ class IOMem_IIe : IOMem // $C3XX cannot be configured for slot response if // INTCXROM is set. if (intCXROM) return; - + if (selectMem[3] !is null) { decoder.install(selectMem[3]); @@ -309,4 +309,3 @@ class IOMem_IIe : IOMem intStrobeMem.debugName = "Internal ROM"; } } - diff --git a/src/ioummu.d b/src/ioummu.d index e81e4d9..9bc0bf8 100644 --- a/src/ioummu.d +++ b/src/ioummu.d @@ -68,7 +68,7 @@ class IOU { io_.annun.ann_1_Off(); } - + void resetAn2() { io_.annun.ann_2_Off(); @@ -90,7 +90,7 @@ class IOU { io_.annun.ann_1_On(); } - + void setAn2() { io_.annun.ann_2_On(); @@ -131,7 +131,7 @@ class IOU class MMU { - LanguageCard_IIe himemManager; + LanguageCard_IIe himemManager; AddressDecoder decoder; AuxiliaryCard auxCard; IOMem_IIe ioMem; @@ -169,7 +169,7 @@ class MMU &mainRom.write); initMem(mainRam); - + initSwitches(switches); ioMem.initSwitches(switches); } @@ -404,4 +404,3 @@ class Extended80ColumnCard : AuxiliaryCard void reset() {} } - diff --git a/src/memory.d b/src/memory.d index 5db9e05..33e911f 100644 --- a/src/memory.d +++ b/src/memory.d @@ -24,24 +24,24 @@ import std.conv; class Memory { - ushort baseAddress; - uint blockSize; + ushort baseAddress; + uint blockSize; string debugName; - this(ushort baseAddr, uint size) - { - assert(baseAddr + size <= 0x10000, - "Memory block larger than 64K"); - assert((baseAddr % 0x0100) == 0, - "Memory block does not start on page boundary"); - assert((size % 0x0100) == 0, - "Memory block does not end on page boundary"); - baseAddress = baseAddr; - blockSize = size; - } + this(ushort baseAddr, uint size) + { + assert(baseAddr + size <= 0x10000, + "Memory block larger than 64K"); + assert((baseAddr % 0x0100) == 0, + "Memory block does not start on page boundary"); + assert((size % 0x0100) == 0, + "Memory block does not end on page boundary"); + baseAddress = baseAddr; + blockSize = size; + } - abstract ubyte read(ushort addr); - abstract void write(ushort addr, ubyte val); + abstract ubyte read(ushort addr); + abstract void write(ushort addr, ubyte val); void reboot() {} } @@ -58,36 +58,36 @@ class ZeroMem : Memory class DataMem : Memory { - ubyte* data; - ubyte data_[]; + ubyte* data; + ubyte data_[]; - this(ushort baseAddr, uint size) - { - super(baseAddr, size); - } + this(ushort baseAddr, uint size) + { + super(baseAddr, size); + } - ubyte read(ushort addr) - { - return data[addr - baseAddress]; - } + ubyte read(ushort addr) + { + return data[addr - baseAddress]; + } - void write(ushort addr, ubyte val) - { - data[addr - baseAddress] = val; - } + void write(ushort addr, ubyte val) + { + data[addr - baseAddress] = val; + } } class PrimaryMem : DataMem { - this(ushort baseAddr, uint size) - { - super(baseAddr, size); - } + this(ushort baseAddr, uint size) + { + super(baseAddr, size); + } void reboot() { - data_ = new ubyte[blockSize]; - data = data_.ptr; + data_ = new ubyte[blockSize]; + data = data_.ptr; } } @@ -107,12 +107,12 @@ class SliceMem : DataMem { DataMem otherMem; - this(ushort baseAddr, uint size, DataMem other) - { - super(baseAddr, size); + this(ushort baseAddr, uint size, DataMem other) + { + super(baseAddr, size); otherMem = other; debugName = otherMem.debugName; - } + } void reboot() { @@ -121,7 +121,7 @@ class SliceMem : DataMem assert((otherStart >= 0) && (otherEnd <= otherMem.blockSize), "Memory slice out of range"); data_ = otherMem.data_[otherStart..otherEnd]; - data = data_.ptr; + data = data_.ptr; } } @@ -130,7 +130,7 @@ class BankMem : DataMem ubyte[][] banks; string[] debugNames; - this(ushort baseAddr, uint size, uint numBanks) + this(ushort baseAddr, uint size, uint numBanks) { super(baseAddr, size); banks.length = numBanks; @@ -236,12 +236,12 @@ alias void delegate(ushort, ubyte) WriteFunc; class AddressDecoder { - ReadFunc readPages[256]; - WriteFunc writePages[256]; + ReadFunc readPages[256]; + WriteFunc writePages[256]; Memory readResponders[256]; Memory writeResponders[256]; - void nullWrite(ushort addr, ubyte val) {} + void nullWrite(ushort addr, ubyte val) {} public: @@ -249,47 +249,47 @@ class AddressDecoder void installSwitches(SoftSwitchPage switches) { - readPages[0xC0] = &switches.read; - writePages[0xC0] = &switches.write; + readPages[0xC0] = &switches.read; + writePages[0xC0] = &switches.write; } - ubyte read(ushort addr) - { - return readPages[addr >> 8](addr); - } + ubyte read(ushort addr) + { + return readPages[addr >> 8](addr); + } - void write(ushort addr, ubyte val) - { - writePages[addr >> 8](addr, val); - } + void write(ushort addr, ubyte val) + { + writePages[addr >> 8](addr, val); + } // XXX address read only/write only code - void install(Memory block, bool forRead = true, bool forWrite = true) - { - uint base = block.baseAddress >> 8; - uint size = block.blockSize >> 8; + void install(Memory block, bool forRead = true, bool forWrite = true) + { + uint base = block.baseAddress >> 8; + uint size = block.blockSize >> 8; for (uint pg = base; pg < base + size; ++pg) { if (pg == 0xC0) continue; - if (forRead) + if (forRead) { readPages[pg] = &block.read; readResponders[pg] = block; } - if (forWrite) + if (forWrite) { writePages[pg] = &block.write; writeResponders[pg] = block; } } - } + } void installNull(uint baseAddress, uint blockSize, bool forRead = true, bool forWrite = true) { - uint base = baseAddress >> 8; - uint size = blockSize >> 8; + uint base = baseAddress >> 8; + uint size = blockSize >> 8; for (uint pg = base; pg < base + size; ++pg) { if (pg == 0xC0) continue; @@ -306,15 +306,15 @@ class AddressDecoder } } - void installRead(Memory block) - { - install(block, true, false); - } + void installRead(Memory block) + { + install(block, true, false); + } - void installWrite(Memory block) - { - install(block, false, true); - } + void installWrite(Memory block) + { + install(block, false, true); + } string memoryReadName(ushort addr) { @@ -338,25 +338,25 @@ class SoftSwitchPage : Memory { private: - ReadFunc[256] readSwitches; + ReadFunc[256] readSwitches; ubyte[256] bitsReturned; - WriteFunc[256] writeSwitches; + WriteFunc[256] writeSwitches; ubyte nullRead(ushort addr) { return 0; } - void nullWrite(ushort addr, ubyte val) {} + void nullWrite(ushort addr, ubyte val) {} public: ReadFunc floatingBus; - this() - { + this() + { super(0xC000, 0x0100); - for (int addr = 0xC000; addr < 0xC100; ++addr) - { - writeSwitches[addr & 0xFF] = &nullWrite; - } - } + for (int addr = 0xC000; addr < 0xC100; ++addr) + { + writeSwitches[addr & 0xFF] = &nullWrite; + } + } void setFloatingBus(ReadFunc floatingBus_) { @@ -368,11 +368,11 @@ class SoftSwitchPage : Memory } } - void setReadSwitch(ushort addr, ReadFunc read_, ubyte bitsReturned_) - { - readSwitches[addr - 0xC000] = read_; + void setReadSwitch(ushort addr, ReadFunc read_, ubyte bitsReturned_) + { + readSwitches[addr - 0xC000] = read_; bitsReturned[addr - 0xC000] = bitsReturned_; - } + } void setR0Switch(ushort addr, ReadFunc read_) { @@ -389,13 +389,13 @@ class SoftSwitchPage : Memory setReadSwitch(addr, read_, 0xFF); } - void setWSwitch(ushort addr, WriteFunc write_) - { - writeSwitches[addr - 0xC000] = write_; - } + void setWSwitch(ushort addr, WriteFunc write_) + { + writeSwitches[addr - 0xC000] = write_; + } - final ubyte read(ushort addr) - { + final ubyte read(ushort addr) + { ubyte ret = readSwitches[addr - 0xC000](addr); ubyte mask = bitsReturned[addr - 0xC000]; if (mask < 0xFF) @@ -403,11 +403,10 @@ class SoftSwitchPage : Memory ret = (ret & mask) | (floatingBus(addr) & (mask ^ 0xFF)); } return ret; - } + } - final void write(ushort addr, ubyte val) - { - writeSwitches[addr - 0xC000](addr, val); - } + final void write(ushort addr, ubyte val) + { + writeSwitches[addr - 0xC000](addr, val); + } } - diff --git a/src/peripheral/base.d b/src/peripheral/base.d index eba99e3..c561a47 100644 --- a/src/peripheral/base.d +++ b/src/peripheral/base.d @@ -56,4 +56,3 @@ class Peripheral mixin(EmptyInitSwitches()); } - diff --git a/src/peripheral/diskii.d b/src/peripheral/diskii.d index a321201..b55b3b2 100644 --- a/src/peripheral/diskii.d +++ b/src/peripheral/diskii.d @@ -487,7 +487,7 @@ class Drive imgFile = ExternalImage.loadImage(file); assert(imgFile !is null); imgData = imgFile.imgData; - + return true; } @@ -868,7 +868,7 @@ class DSKImage : ExternalImage int x = 0x55; ubyte y = 2; uint val; - + // Translate 256 bytes of data into 342 6-bit index values while(true) @@ -1053,7 +1053,7 @@ class DSKImage : ExternalImage ubyte[] dskData = saveData[dskOffset..dskOffset+SECTOR_LENGTH]; // Translate the 342 disk bytes into 6-bit index values - + ubyte[] indexData = new ubyte[DATA_FIELD_LENGTH]; int lastByte = 0; @@ -1141,4 +1141,3 @@ class NIBImage : ExternalImage } } } - diff --git a/src/peripheral/langcard.d b/src/peripheral/langcard.d index 5e10b0f..835b578 100644 --- a/src/peripheral/langcard.d +++ b/src/peripheral/langcard.d @@ -123,8 +123,8 @@ class HighRam { AddressDecoder decoder; - ReadFunc origRead; - WriteFunc origWrite; + ReadFunc origRead; + WriteFunc origWrite; Memory lowerChunk, upperChunk; diff --git a/src/peripheral/saturn128.d b/src/peripheral/saturn128.d index d38920e..40663e1 100644 --- a/src/peripheral/saturn128.d +++ b/src/peripheral/saturn128.d @@ -61,8 +61,8 @@ class Saturn128 : Peripheral { AddressDecoder decoder; - ReadFunc origRead; - WriteFunc origWrite; + ReadFunc origRead; + WriteFunc origWrite; bool preWrite; bool readEn, writeEn; BankMem e000ffff; @@ -149,7 +149,7 @@ class Saturn128 : Peripheral } mixin(MakeSaturnSwitches()); - + mixin(InitSwitches("", [ mixin(MakeSwitch([0xC080], "R0W", "accessC080")), mixin(MakeSwitch([0xC081], "R0W", "accessC081")), diff --git a/src/system/base.d b/src/system/base.d index 73f459b..ff890f1 100644 --- a/src/system/base.d +++ b/src/system/base.d @@ -302,4 +302,3 @@ class IIe : System mmu.initIO(video_.scanner, &io_.kbd.peekLatch); } } - diff --git a/src/system/io.d b/src/system/io.d index 2615ee5..c2cc0e2 100644 --- a/src/system/io.d +++ b/src/system/io.d @@ -155,4 +155,3 @@ class IO_IIe : IO return new Paddles(); } } - diff --git a/src/system/peripheral.d b/src/system/peripheral.d index b113e77..988fb0f 100644 --- a/src/system/peripheral.d +++ b/src/system/peripheral.d @@ -84,4 +84,3 @@ class Peripherals_IIe : Peripherals cards[6] = diskController; // XXX } } - diff --git a/src/system/video.d b/src/system/video.d index 35cde74..5a6196f 100644 --- a/src/system/video.d +++ b/src/system/video.d @@ -121,4 +121,3 @@ class Video_IIe : Video return new Signal_IIe(); } } - diff --git a/src/timer.d b/src/timer.d index c6d83d2..a0c0b51 100644 --- a/src/timer.d +++ b/src/timer.d @@ -24,67 +24,67 @@ module timer; class Timer { - class Cycle - { - int delta; - uint rollOver; + class Cycle + { + int delta; + uint rollOver; - this(uint maxVal) - { - rollOver = maxVal; + this(uint maxVal) + { + rollOver = maxVal; restart(); - } + } void restart() { - delta = 0 - currentCounter.elapsed(); + delta = 0 - currentCounter.elapsed(); } - uint currentVal() - { - return (currentCounter.elapsed() + delta) % rollOver; - } + uint currentVal() + { + return (currentCounter.elapsed() + delta) % rollOver; + } - void update() - { - delta = currentVal(); - } - } + void update() + { + delta = currentVal(); + } + } - class Counter - { - bool delegate() expiry; - uint startLength, currentLength; - int ticks; + class Counter + { + bool delegate() expiry; + uint startLength, currentLength; + int ticks; bool shouldContinue; - this(uint start) - { + this(uint start) + { shouldContinue = true; - startLength = currentLength = ticks = start; + startLength = currentLength = ticks = start; addCounter(this); - } + } - this(uint start, bool delegate() expiration) - { - this(start); + this(uint start, bool delegate() expiration) + { + this(start); initCounter(this); - expiry = expiration; - } + expiry = expiration; + } - final uint elapsed() - { - return currentLength - ticks; - } + final uint elapsed() + { + return currentLength - ticks; + } - final void tick() - { - --ticks; - if (ticks == 0) - { - reset(); - } - } + final void tick() + { + --ticks; + if (ticks == 0) + { + reset(); + } + } final void forceExpire() { @@ -98,73 +98,73 @@ class Timer forceExpire(); } - private final void resume() - { - currentLength = ticks; - } + private final void resume() + { + currentLength = ticks; + } - private final bool expire() - { - ticks = currentLength = startLength; - return expiry(); - } + private final bool expire() + { + ticks = currentLength = startLength; + return expiry(); + } private bool nullExpiry() { return false; } - } + } - class DelayedCounter : Counter - { + class DelayedCounter : Counter + { uint realStart; bool delegate() realExpiry; - this(uint start, bool delegate() expiration, uint delay) - { - realStart = start; + this(uint start, bool delegate() expiration, uint delay) + { + realStart = start; realExpiry = expiration; super(delay, &becomeReal); - } + } - private bool becomeReal() - { - ticks = currentLength = startLength = realStart; - expiry = realExpiry; - bool retval = expiry(); - initCounter(this); + private bool becomeReal() + { + ticks = currentLength = startLength = realStart; + expiry = realExpiry; + bool retval = expiry(); + initCounter(this); return retval; - } - } + } + } - Cycle[] cycles; - Counter[] counters; - Counter primaryCounter, currentCounter; + Cycle[] cycles; + Counter[] counters; + Counter primaryCounter, currentCounter; uint hertz; - this(uint primaryStart, uint hz) - { + this(uint primaryStart, uint hz) + { hertz = hz; - cycles.length = 10; - counters.length = 10; - cycles.length = 0; - counters.length = 0; - currentCounter = primaryCounter = new Counter(primaryStart); - } + cycles.length = 10; + counters.length = 10; + cycles.length = 0; + counters.length = 0; + currentCounter = primaryCounter = new Counter(primaryStart); + } - final void onPrimaryStop(bool delegate() expiration) - { - primaryCounter.expiry = expiration; - } + final void onPrimaryStop(bool delegate() expiration) + { + primaryCounter.expiry = expiration; + } Cycle startCycle(uint maxVal) - { - cycles.length = cycles.length + 1; - cycles[$-1] = new Cycle(maxVal); - return cycles[$-1]; - } + { + cycles.length = cycles.length + 1; + cycles[$-1] = new Cycle(maxVal); + return cycles[$-1]; + } - void tick() - { - currentCounter.tick(); - } + void tick() + { + currentCounter.tick(); + } private void deleteCounters() { @@ -186,26 +186,26 @@ main: for (int counter = 0; counter < counters.length; ++counter) } } - private void addCounter(Counter newCounter) - { - counters.length = counters.length + 1; - counters[$-1] = newCounter; - } + private void addCounter(Counter newCounter) + { + counters.length = counters.length + 1; + counters[$-1] = newCounter; + } - private void initCounter(Counter newCounter) - { - if (newCounter.ticks < currentCounter.ticks) - { - reset(newCounter); - } - else - { - newCounter.ticks += currentCounter.elapsed(); - } - } + private void initCounter(Counter newCounter) + { + if (newCounter.ticks < currentCounter.ticks) + { + reset(newCounter); + } + else + { + newCounter.ticks += currentCounter.elapsed(); + } + } - private void reset(Counter newCounter = null) - { + private void reset(Counter newCounter = null) + { // update cycle counts for (int cycle = 0; cycle < cycles.length; ++cycle) { @@ -238,7 +238,6 @@ main: for (int counter = 0; counter < counters.length; ++counter) if (counters[counter].ticks < currentCounter.ticks) currentCounter = counters[counter]; } - } + } } - diff --git a/src/twoapple.d b/src/twoapple.d index 8074857..80bbb18 100644 --- a/src/twoapple.d +++ b/src/twoapple.d @@ -67,8 +67,8 @@ void main(string[] args) { // Init GTK Thread.init(null); - Main.init(args); - GLdInit.init(args); + Main.init(args); + GLdInit.init(args); // open config @@ -112,4 +112,3 @@ string checkRomFile(TwoappleFile checkFile) else return "Invalid ROM file"; } - diff --git a/src/ui/inputevents.d b/src/ui/inputevents.d index 3d2c5d6..4a4cafb 100644 --- a/src/ui/inputevents.d +++ b/src/ui/inputevents.d @@ -278,4 +278,3 @@ class Input return true; } } - diff --git a/src/ui/mainwindow.d b/src/ui/mainwindow.d index b624613..99982a5 100644 --- a/src/ui/mainwindow.d +++ b/src/ui/mainwindow.d @@ -342,7 +342,7 @@ class TwoappleFilePicker fcd.hide(); fcd.destroy(); - + host.delay.reset(); soundCard.resume(); diff --git a/src/ui/monitor.d b/src/ui/monitor.d index d6bdbc9..5c5a85b 100644 --- a/src/ui/monitor.d +++ b/src/ui/monitor.d @@ -38,16 +38,16 @@ Monitor monitor; class Monitor : DrawingArea { - mixin GLCapability; + mixin GLCapability; Screen screen; - this() - { - setGLCapability(new GLConfig( - GLConfigMode.MODE_RGB | GLConfigMode.MODE_DOUBLE, - GLConfigMode.MODE_RGB)); - } + this() + { + setGLCapability(new GLConfig( + GLConfigMode.MODE_RGB | GLConfigMode.MODE_DOUBLE, + GLConfigMode.MODE_RGB)); + } void installScreen(Screen screen_) { @@ -55,9 +55,9 @@ class Monitor : DrawingArea setSizeRequest(screen.width, screen.height * 2); } - bool initGL() - { - resizeGL(null); + bool initGL() + { + resizeGL(null); glDisable(GL_ALPHA_TEST); glDisable(GL_BLEND); @@ -71,26 +71,25 @@ class Monitor : DrawingArea glPixelZoom(1.0, -2.0); - return true; - } + return true; + } - bool drawGL(GdkEventExpose* event = null) - { + bool drawGL(GdkEventExpose* event = null) + { glRasterPos2i(-1, 1); glDrawPixels(screen.width, screen.height, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, screen.data); - return true; - } + return true; + } - bool resizeGL(GdkEventConfigure* event = null) - { + bool resizeGL(GdkEventConfigure* event = null) + { glViewport(0, 0, screen.width, screen.height * 2); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - return true; - } + return true; + } } - diff --git a/src/ui/sound.d b/src/ui/sound.d index 4a93ea2..71f69e7 100644 --- a/src/ui/sound.d +++ b/src/ui/sound.d @@ -209,4 +209,3 @@ extern(C) void audioCallback(void* userdata, Uint8* stream, int len) { (cast(SoundCardYes)userdata).fillAudio(stream, len); } - diff --git a/src/video/base.d b/src/video/base.d index 2c9176e..e99b28a 100644 --- a/src/video/base.d +++ b/src/video/base.d @@ -95,4 +95,3 @@ struct VideoPages hires2.reboot(); } } - diff --git a/src/video/laz_engine.d b/src/video/laz_engine.d index fc84b1c..42befd2 100644 --- a/src/video/laz_engine.d +++ b/src/video/laz_engine.d @@ -137,7 +137,7 @@ class LazEngine : Screen uint prevBit, nextBit; uint nextBitTest = 0b00010000; uint nextBitShift = 4; - + ubyte bits = bitmap[bitmapPtr]; if (scanStart == 0) @@ -213,4 +213,3 @@ class LazEngine : Screen } } } - diff --git a/src/video/offsets.d b/src/video/offsets.d index a26e917..d865b40 100644 --- a/src/video/offsets.d +++ b/src/video/offsets.d @@ -171,4 +171,3 @@ ushort screenOffset(vState* vSt, hState* hSt, Mode mode) return offset; } - diff --git a/src/video/patterns.d b/src/video/patterns.d index f23f0f9..bb2bac1 100644 --- a/src/video/patterns.d +++ b/src/video/patterns.d @@ -174,7 +174,7 @@ class TextPatternGenerator_II : TextPatternGenerator ~ import("charset_upper_ii")); mixin("static ubyte[256] charsetSymbol_II = " ~ import("charset_symbol_ii")); - + void initPatterns() { ubyte[][] segments = new ubyte[][8]; @@ -385,7 +385,7 @@ class LoresPatternGenerator : PatternGenerator ubyte* data = scanner.getData(scanLine, startCol + 25); ubyte* auxData = scanner.getData80(scanLine, startCol + 25); uint memNybble; - + for (uint offset = 0; offset < len; ++offset) { memNybble = (auxData[offset] >> shiftAmt) & 0x0F; @@ -486,4 +486,3 @@ class HiresPatternGenerator_Revision0 : HiresPatternGenerator } } } - diff --git a/src/video/scanner.d b/src/video/scanner.d index 07a0d84..bdef541 100644 --- a/src/video/scanner.d +++ b/src/video/scanner.d @@ -49,7 +49,7 @@ class Scanner : ScannerBase int frameLen = 262 * 65; // XXX PAL: 312 * 65 vidCycle = timer.startCycle(frameLen); graphicsTime = true; - + timer.new Counter(frameLen, &graphicsTimeOn); timer.new DelayedCounter(frameLen, &frameComplete, frameLen - 1); timer.new DelayedCounter(frameLen, &graphicsTimeOff, 160 * 65); @@ -294,4 +294,3 @@ class Scanner_IIe : Scanner mixin(MakeSwitch([0xC01B], "R", "readMixed")) ])); } - diff --git a/src/video/signal.d b/src/video/signal.d index 35e0680..ba28e33 100644 --- a/src/video/signal.d +++ b/src/video/signal.d @@ -206,4 +206,3 @@ class Signal_IIe : Signal mixin(MakeSwitch([0xC01F], "R", "readCol80Switch")) ])); } -