megadrive_test1

diff src/main.c @ 5:f99eab59e7dc

clarified the C code by using VDP macros
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 01 Feb 2017 14:40:19 +0200
parents e7138066c7ea
children 862f8a034cae
line diff
     1.1 --- a/src/main.c	Wed Feb 01 13:40:50 2017 +0200
     1.2 +++ b/src/main.c	Wed Feb 01 14:40:19 2017 +0200
     1.3 @@ -2,11 +2,11 @@
     1.4  
     1.5  int main(void)
     1.6  {
     1.7 -	VDP_PORT_CTL = 0xc000;
     1.8 -	VDP_PORT_CTL = 0;
     1.9 -	VDP_PORT_DATA = 0x1f8;
    1.10 -	VDP_PORT_CTL = 0x8700;
    1.11 -	VDP_PORT_CTL = 0x8004;
    1.12 -	VDP_PORT_CTL = 0x8144;
    1.13 +	VDP_SET_CRAM_ADDR(0);
    1.14 +	VDP_SET_CRAM_RGB24(64, 128, 255);
    1.15 +	VDP_SET_BGCOLOR(0, 0);
    1.16 +	/* enable display */
    1.17 +	VDP_SET_REG(0, VDP_REG0_BASE);
    1.18 +	VDP_SET_REG(1, VDP_REG1_BASE | VDP_REG1_DISP_BIT);
    1.19  	return 0;
    1.20  }