aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-20 23:41:48 +0200
committerBad Diode <bd@badd10de.dev>2021-05-20 23:41:48 +0200
commitb3f4342b584612f95938f1f00ca2d026a3f3c304 (patch)
tree0189502c98b2d391bfdf5a99c3dcc2d1ba7bf944 /src/main.c
parent431b35d85fa590d199acadbeaf638711eb10c6af (diff)
downloaduxngba-b3f4342b584612f95938f1f00ca2d026a3f3c304.tar.gz
uxngba-b3f4342b584612f95938f1f00ca2d026a3f3c304.zip
Apply asie's patch 5 for PPU fixes and cleanup
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 6df282d..c8a15af 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,7 +25,6 @@ WITH REGARD TO THIS SOFTWARE.
25*/ 25*/
26 26
27static Ppu ppu; 27static Ppu ppu;
28u8 reqdraw = 0;
29static Device *devscreen; 28static Device *devscreen;
30static Device *devctrl; 29static Device *devctrl;
31time_t time_seconds; 30time_t time_seconds;
@@ -78,7 +77,6 @@ screen_talk(Device *d, Uint8 b0, Uint8 w) {
78 } else { 77 } else {
79 putchr(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, mode & 0x2, mode & 0x4); 78 putchr(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, mode & 0x2, mode & 0x4);
80 } 79 }
81 reqdraw = 1;
82 } 80 }
83} 81}
84 82
@@ -192,7 +190,6 @@ int main(void) {
192 irq_init(); 190 irq_init();
193 irs_set(IRQ_VBLANK, irs_stub); 191 irs_set(IRQ_VBLANK, irs_stub);
194 192
195
196 // Initialize VM. 193 // Initialize VM.
197 memset(&u, 0, sizeof(u)); 194 memset(&u, 0, sizeof(u));
198 u.ram.dat = umem; 195 u.ram.dat = umem;
@@ -215,13 +212,8 @@ int main(void) {
215 while(true) { 212 while(true) {
216 bios_vblank_wait(); 213 bios_vblank_wait();
217 handle_input(&u); 214 handle_input(&u);
218 profile_start();
219 evaluxn(&u, mempeek16(devscreen->dat, 0)); 215 evaluxn(&u, mempeek16(devscreen->dat, 0));
220 int eval_cycles = profile_stop();
221 flipbuf(&ppu); 216 flipbuf(&ppu);
222 txt_position(0,0);
223 txt_printf("FRAME: %d\n", frame_counter);
224 txt_printf("EVAL: %d\n", eval_cycles);
225 time_seconds++; 217 time_seconds++;
226 frame_counter++; 218 frame_counter++;
227 } 219 }