@@ -250,8 +250,8 @@ static void build_address_handlers(nes_t *machine)
250250void nes_irq (void )
251251{
252252#ifdef NOFRENDO_DEBUG
253- if (nes .scanline <= NES_SCREEN_HEIGHT )
254- memset (nes .vidbuf -> line [nes .scanline - 1 ], GUI_RED , NES_SCREEN_WIDTH );
253+ // if (nes.scanline <= NES_SCREEN_HEIGHT)
254+ // memset(nes.vidbuf->line[nes.scanline - 1], GUI_RED, NES_SCREEN_WIDTH);
255255#endif /* NOFRENDO_DEBUG */
256256
257257 nes6502_irq ();
@@ -301,7 +301,8 @@ static void nes_renderframe(bool draw_flag)
301301
302302 while (262 != nes .scanline )
303303 {
304- ppu_scanline (nes .vidbuf , nes .scanline , draw_flag );
304+ // ppu_scanline(nes.vidbuf, nes.scanline, draw_flag);
305+ ppu_scanline (vid_getbuffer (), nes .scanline , draw_flag );
305306
306307 if (241 == nes .scanline )
307308 {
@@ -342,8 +343,8 @@ static void system_video(bool draw)
342343 }
343344
344345 /* blit the NES screen to our video surface */
345- vid_blit (nes .vidbuf , 0 , (NES_SCREEN_HEIGHT - NES_VISIBLE_HEIGHT ) / 2 ,
346- 0 , 0 , NES_SCREEN_WIDTH , NES_VISIBLE_HEIGHT );
346+ // vid_blit(nes.vidbuf, 0, (NES_SCREEN_HEIGHT - NES_VISIBLE_HEIGHT) / 2,
347+ // 0, 0, NES_SCREEN_WIDTH, NES_VISIBLE_HEIGHT);
347348
348349 /* overlay our GUI on top of it */
349350 gui_frame (true);
@@ -437,7 +438,7 @@ void nes_destroy(nes_t **machine)
437438 mmc_destroy (& (* machine )-> mmc );
438439 ppu_destroy (& (* machine )-> ppu );
439440 apu_destroy (& (* machine )-> apu );
440- bmp_destroy (& (* machine )-> vidbuf );
441+ // bmp_destroy(&(*machine)->vidbuf);
441442 if ((* machine )-> cpu )
442443 {
443444 if ((* machine )-> cpu -> mem_page [0 ])
@@ -516,9 +517,9 @@ nes_t *nes_create(void)
516517
517518 /* bitmap */
518519 /* 8 pixel overdraw */
519- machine -> vidbuf = bmp_create (NES_SCREEN_WIDTH , NES_SCREEN_HEIGHT , 8 );
520- if (NULL == machine -> vidbuf )
521- goto _fail ;
520+ // machine->vidbuf = bmp_create(NES_SCREEN_WIDTH, NES_SCREEN_HEIGHT, 8);
521+ // if (NULL == machine->vidbuf)
522+ // goto _fail;
522523
523524 machine -> autoframeskip = true;
524525
0 commit comments