Fixes + hack for picture brightness
authorlekernel <sebastien.bourdeauducq@lekernel.net>
Tue, 16 Feb 2010 10:42:56 +0000 (11:42 +0100)
committerlekernel <sebastien.bourdeauducq@lekernel.net>
Tue, 16 Feb 2010 10:42:56 +0000 (11:42 +0100)
cores/pfpu/rtl/pfpu.v
software/demo/apipe.c
software/demo/eval.c
software/demo/renderer.c
software/demo/rpipe.c

index e8f0390..60c74be 100644 (file)
@@ -102,7 +102,7 @@ pfpu_regf regf(
        .err_stray(err_stray)   /* < to control interface */
 );
 
-wire [31:0] dma_adr;
+wire [28:0] dma_base;
 wire dma_busy;
 wire dma_ack;
 pfpu_dma dma(
index eb28962..67674fb 100644 (file)
@@ -112,7 +112,7 @@ void apipe_stop()
 
 static struct pfpu_td pfpu_td;
 
-#define DUMP_MESH
+//#define DUMP_MESH
 
 static void pvv_callback(struct pfpu_td *td)
 {
@@ -142,7 +142,8 @@ static void pfv_callback(struct pfpu_td *td)
 
        rpipe_frame = (struct rpipe_frame *)td->user;
 
-       rpipe_frame->brightness = 63.0f*eval_read_pfv(eval, pfv_decay);
+       // XXX HACK try to make picture less dark
+       rpipe_frame->brightness = 62; //63.0f*eval_read_pfv(eval, pfv_decay);
 
        rpipe_frame->wave_mode = eval_read_pfv(eval, pfv_wave_mode);
        rpipe_frame->wave_scale = eval_read_pfv(eval, pfv_wave_scale);
index 759afa3..d0ce91d 100644 (file)
@@ -259,8 +259,8 @@ static int generate_pervertex(struct eval_state *sc, struct preset *ast)
                sc->pervertex_regs[i] = 0.0f;
        sc->pervertex_regs[3] = 1.0f/(float)sc->hmeshlast;
        sc->pervertex_regs[4] = 1.0f/(float)sc->vmeshlast;
-       sc->pervertex_regs[5] = (float)sc->hres*(1 << TMU_FIXEDPOINT_SHIFT);
-       sc->pervertex_regs[6] = (float)sc->vres*(1 << TMU_FIXEDPOINT_SHIFT);
+       sc->pervertex_regs[5] = (float)(sc->hres << TMU_FIXEDPOINT_SHIFT);
+       sc->pervertex_regs[6] = (float)(sc->vres << TMU_FIXEDPOINT_SHIFT);
        sc->pervertex_regs[13] = PFPU_TRIG_CONV;
 
        vlen = 0;
index 14450c2..4f1d3bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Milkymist VJ SoC (Software)
- * Copyright (C) 2007, 2008, 2009 Sebastien Bourdeauducq
+ * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ int renderer_start(char *preset_code)
        if(!ast) return 0;
        printf("RDR: preset parsing successful\n");
 
-       eval_init(&eval, renderer_hmeshlast, renderer_vmeshlast, vga_hres, vga_vres);
+       eval_init(&eval, renderer_hmeshlast, renderer_vmeshlast, renderer_texsize, renderer_texsize);
        if(!eval_load_preset(&eval, ast)) return 0;
        printf("RDR: preset compilation successful\n");
        free_ast(ast);
index 3215deb..12b1b34 100644 (file)
@@ -240,7 +240,7 @@ static void rpipe_draw_waves()
        params.wave_r = bh_frame->wave_r;
        params.wave_g = bh_frame->wave_g;
        params.wave_b = bh_frame->wave_b;
-       params.wave_a = bh_frame->wave_a;
+       params.wave_a = bh_frame->wave_a+10; // XXX HACK try to make picture less dark
        
        params.treb = bh_frame->treb;
 
@@ -314,7 +314,7 @@ static void rpipe_wave_bottom_half()
        tmu_submit_task(&tmu_task2);
 
        if(spam_enabled) {
-               tmu_task1.flags = 0;
+               tmu_task1.flags = TMU_CTL_CHROMAKEY;
                tmu_task1.hmeshlast = 1;
                tmu_task1.vmeshlast = 1;
                tmu_task1.brightness = TMU_BRIGHTNESS_MAX;