diff options
author | Bad Diode <bd@badd10de.dev> | 2021-05-20 23:41:48 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-05-20 23:41:48 +0200 |
commit | b3f4342b584612f95938f1f00ca2d026a3f3c304 (patch) | |
tree | 0189502c98b2d391bfdf5a99c3dcc2d1ba7bf944 /src/main.c | |
parent | 431b35d85fa590d199acadbeaf638711eb10c6af (diff) | |
download | uxngba-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.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -25,7 +25,6 @@ WITH REGARD TO THIS SOFTWARE. | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | static Ppu ppu; | 27 | static Ppu ppu; |
28 | u8 reqdraw = 0; | ||
29 | static Device *devscreen; | 28 | static Device *devscreen; |
30 | static Device *devctrl; | 29 | static Device *devctrl; |
31 | time_t time_seconds; | 30 | time_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 | } |