Skip to content

Commit

Permalink
Remove unnecessary IoRegisters fields
Browse files Browse the repository at this point in the history
  • Loading branch information
DDoS committed Jul 19, 2017
1 parent 56596ed commit 7784a59
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ GBAiD is licensed under [MIT](LICENSE.txt)

## TODO ##

- Remove ioRegisters field where unnecessary
- Implement SIO
- Implement emulator networking for SIO
- Emulator pause feature
Expand Down
2 changes: 0 additions & 2 deletions src/gbaid/gba/display.d
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public class Display {
private static enum short TRANSPARENT = cast(short) 0x8000;
private static enum uint TIMING_WIDTH = DISPLAY_WIDTH + BLANK_LENGTH;
private static enum uint TIMING_HEIGTH = DISPLAY_HEIGHT + BLANK_LENGTH;
private IoRegisters* ioRegisters;
private Palette* palette;
private Vram* vram;
private Oam* oam;
Expand Down Expand Up @@ -130,7 +129,6 @@ public class Display {

public this(IoRegisters* ioRegisters, Palette* palette, Vram* vram, Oam* oam,
InterruptHandler interruptHandler, DMAs dmas) {
this.ioRegisters = ioRegisters;
this.palette = palette;
this.vram = vram;
this.oam = oam;
Expand Down
2 changes: 0 additions & 2 deletions src/gbaid/gba/dma.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import gbaid.gba.halt;

public class DMAs {
private MemoryBus* memory;
private IoRegisters* ioRegisters;
private InterruptHandler interruptHandler;
private HaltHandler haltHandler;
mixin declareFields!(int, true, "srcAddress", 0, 4);
Expand All @@ -26,7 +25,6 @@ public class DMAs {

public this(MemoryBus* memory, IoRegisters* ioRegisters, InterruptHandler interruptHandler, HaltHandler haltHandler) {
this.memory = memory;
this.ioRegisters = ioRegisters;
this.interruptHandler = interruptHandler;
this.haltHandler = haltHandler;

Expand Down
2 changes: 0 additions & 2 deletions src/gbaid/gba/halt.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import gbaid.gba.io;
import gbaid.gba.cpu;

public class HaltHandler {
private IoRegisters* ioRegisters;
private ARM7TDMI processor;
private bool softwareHalted = false, dmaHalted = false;

public this(IoRegisters* ioRegisters, ARM7TDMI processor) {
this.ioRegisters = ioRegisters;
this.processor = processor;

ioRegisters.mapAddress(0x300, null, 0b1, 15).preWriteMonitor(&onHaltRequestPreWrite);
Expand Down
2 changes: 0 additions & 2 deletions src/gbaid/gba/interrupt.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ import gbaid.gba.cpu;
import gbaid.gba.halt;

public class InterruptHandler {
private IoRegisters* ioRegisters;
private ARM7TDMI processor;
private HaltHandler haltHandler;
private bool masterEnable = false;
private int enable = 0;
private int request = 0;

public this(IoRegisters* ioRegisters, ARM7TDMI processor, HaltHandler haltHandler) {
this.ioRegisters = ioRegisters;
this.processor = processor;
this.haltHandler = haltHandler;

Expand Down
2 changes: 0 additions & 2 deletions src/gbaid/gba/keypad.d
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ public struct KeypadState {
}

public class Keypad {
private IoRegisters* ioRegisters;
private InterruptHandler interruptHandler;
private ptrdiff_t cyclesUntilNextUpdate = 0;
private int stateBits = STATE_BITS_CLEARED;
private int control = 0;

public this(IoRegisters* ioRegisters, InterruptHandler interruptHandler) {
this.ioRegisters = ioRegisters;
this.interruptHandler = interruptHandler;

ioRegisters.mapAddress(0x130, &stateBits, 0x3FF, 0, true, false);
Expand Down
2 changes: 0 additions & 2 deletions src/gbaid/gba/timer.d
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import gbaid.gba.interrupt;
import gbaid.gba.sound;

public class Timers {
private IoRegisters* ioRegisters;
private InterruptHandler interruptHandler;
private SoundChip soundChip;
mixin declareFields!(int, true, "reloadValue", 0, 4);
Expand All @@ -18,7 +17,6 @@ public class Timers {
mixin declareFields!(int, true, "ticks", 0, 4);

public this(IoRegisters* ioRegisters, InterruptHandler interruptHandler, SoundChip soundChip) {
this.ioRegisters = ioRegisters;
this.interruptHandler = interruptHandler;
this.soundChip = soundChip;

Expand Down

0 comments on commit 7784a59

Please sign in to comment.