megadrive_test2
diff src/main.c @ 6:df2c6b3c6f2e
added NTSC/PAL detection
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Jun 2017 06:32:10 +0300 |
parents | ea70f3da150f |
children | 403367d5df5a |
line diff
1.1 --- a/src/main.c Tue Jun 20 06:08:58 2017 +0300 1.2 +++ b/src/main.c Wed Jun 21 06:32:10 2017 +0300 1.3 @@ -1,5 +1,6 @@ 1.4 #include <stdint.h> 1.5 #include "vdp.h" 1.6 +#include "io.h" 1.7 #include "tun_data.h" 1.8 1.9 #define NAMETAB_A 6 1.10 @@ -31,7 +32,9 @@ 1.11 1.12 vdp_init(); 1.13 1.14 - vdp_setreg(VDP_REG_MODE2, vdp_getreg(VDP_REG_MODE2) | VDP_MODE2_V30CELL); 1.15 + if(IO_REG_VER & IO_VER_PAL) { 1.16 + vdp_setreg(VDP_REG_MODE2, vdp_getreg(VDP_REG_MODE2) | VDP_MODE2_V30CELL); 1.17 + } 1.18 1.19 vdp_begin_palette(0, 0); 1.20 for(i=0; i<16; i++) {