From 04e7b545e7911ec9bd0bd2361c1bb7c1d13877b4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 4 Oct 2020 02:37:26 +0200 Subject: [PATCH] Cleanups --- src/audio.c | 4 ---- src/cpu.c | 3 +-- src/vdc.c | 3 --- src/voice.c | 1 - src/vpp.c | 6 ------ 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/audio.c b/src/audio.c index 2f0fd33..04e480b 100755 --- a/src/audio.c +++ b/src/audio.c @@ -15,7 +15,6 @@ */ -#include #include #include #include @@ -122,10 +121,7 @@ void init_audio(void) { sound_IRQ=0; if ((app_data.sound_en) || (app_data.voice)) - { - printf("Initializing sound system...\n"); init_sound_stream(); - } } diff --git a/src/cpu.c b/src/cpu.c index fe0b644..76fb15e 100755 --- a/src/cpu.c +++ b/src/cpu.c @@ -15,7 +15,6 @@ */ -#include #include #include "vmachine.h" #include "keyboard.h" @@ -28,7 +27,7 @@ #define pull() (sp--, (sp < 8)?(sp=23):0, intRAM[sp]) #define make_psw() {psw = (cy << 7) | ac | f0 | bs | 0x08; psw = psw | ((sp - 8) >> 1);} #define illegal(o) {} -#define undef(i) {printf("** unimplemented instruction %x, %x**\n",i,pc);} +#define undef(i) { } #define ROM(adr) (rom[(adr) & 0xfff]) uint8_t acc; diff --git a/src/vdc.c b/src/vdc.c index 005cb3f..97ba9ed 100755 --- a/src/vdc.c +++ b/src/vdc.c @@ -18,7 +18,6 @@ #include #include #include -#include #include "vmachine.h" #include "config.h" #include "keyboard.h" @@ -557,7 +556,6 @@ void init_display(void) bmpcache = create_bitmap(BMPW,BMPH); if ((!bmp) || (!bmpcache)) { - fprintf(stderr,"Could not allocate memory for screen buffer.\n"); exit(EXIT_FAILURE); } vscreen = (uint8_t *) &bmp->line[0]; @@ -565,7 +563,6 @@ void init_display(void) col = (uint8_t *)malloc(BMPW*BMPH); if (!col) { - fprintf(stderr,"Could not allocate memory for collision buffer.\n"); free(vscreen); exit(EXIT_FAILURE); } diff --git a/src/voice.c b/src/voice.c index 1db646c..c86c366 100755 --- a/src/voice.c +++ b/src/voice.c @@ -15,7 +15,6 @@ */ -#include #include "vmachine.h" #include "cpu.h" #include "voice.h" diff --git a/src/vpp.c b/src/vpp.c index aad991e..5bfc917 100755 --- a/src/vpp.c +++ b/src/vpp.c @@ -17,7 +17,6 @@ #include #include #include -#include #include "vmachine.h" #include "vdc.h" #include "vpp_cset.h" @@ -102,7 +101,6 @@ uint8_t vpp_read(uint16_t adr){ ext = (vpp_mem[vpp_cx][vpp_cy][1] & 0x80) ? 1 : 0; if (chr < 0xA0) { ta = 0; -fprintf(stderr, "unsupported: CHARROM read %d %d %d\n", chr, ext, slice); } else { ta = dchars[ext][(chr-0xA0)*10+slice]; ta = ((ta&0x80)>>7) | ((ta&0x40)>>5) | ((ta&0x20)>>3) | ((ta&0x10)>>1) | ((ta&0x08)<<1) | ((ta&0x04)<<3) | ((ta&0x02)<<5) | ((ta&0x01)<<7); @@ -217,7 +215,6 @@ void vpp_write(uint8_t dat, uint16_t adr){ vpp_r = vpp_data; break; case 0xC0: /* plus_cmd_loady0 */ -if (vpp_data & 0x20) fprintf(stderr, "unsupported: global double height"); vpp_y0 = (vpp_data & 0x1f) % 24; break; default: @@ -477,10 +474,7 @@ void init_vpp(void) if (!colplus) colplus = (uint8_t *)malloc(BMPW*BMPH); if ((!vppbmp) || (!colplus)) - { - fprintf(stderr,"Could not allocate memory for Videopac+ screen buffer.\n"); exit(EXIT_FAILURE); - } memset(colplus,0,BMPW*BMPH); LumReg = TraReg = 0xff;