Skip to content

Commit fb1061c

Browse files
committed
Make PPU (GBHawk) abstract
1 parent 3fd021d commit fb1061c

File tree

1 file changed

+11
-41
lines changed
  • src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk

1 file changed

+11
-41
lines changed

src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
44
{
5-
public class PPU
5+
public abstract class PPU
66
{
77
public GBHawk Core { get; set; }
88

@@ -127,60 +127,30 @@ public class PPU
127127
public int total_counter;
128128
public uint[] color_palette = new uint[4];
129129

130-
public virtual byte ReadReg(int addr)
131-
{
132-
return 0;
133-
}
134-
135-
public virtual void WriteReg(int addr, byte value)
136-
{
130+
public abstract byte ReadReg(int addr);
137131

138-
}
139-
140-
public virtual void tick()
141-
{
132+
public abstract void WriteReg(int addr, byte value);
142133

143-
}
134+
public abstract void tick();
144135

145136
// might be needed, not sure yet
146-
public virtual void latch_delay()
147-
{
148-
149-
}
137+
public abstract void latch_delay();
150138

151-
public virtual void render(int render_cycle)
152-
{
139+
public abstract void render(int render_cycle);
153140

154-
}
155-
156-
public virtual void process_sprite()
157-
{
158-
159-
}
141+
public abstract void process_sprite();
160142

161143
// normal DMA moves twice as fast in double speed mode on GBC
162144
// So give it it's own function so we can seperate it from PPU tick
163-
public virtual void DMA_tick()
164-
{
165-
166-
}
167-
168-
public virtual void OAM_scan(int OAM_cycle)
169-
{
145+
public abstract void DMA_tick();
170146

171-
}
172-
173-
public virtual void Reset()
174-
{
147+
public abstract void OAM_scan(int OAM_cycle);
175148

176-
}
149+
public abstract void Reset();
177150

178151
// order sprites according to x coordinate
179152
// note that for sprites of equal x coordinate, priority goes to first on the list
180-
public virtual void reorder_and_assemble_sprites()
181-
{
182-
183-
}
153+
public abstract void reorder_and_assemble_sprites();
184154

185155
public virtual void SyncState(Serializer ser)
186156
{

0 commit comments

Comments
 (0)