1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-04 23:08:07 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Werner Almesberger
9412c9debe ubb-vga: test image now shows detailed horizontal and vertical timing
- ubb-vga.c (CYCLES), ubb-vga.h: corrected conversion and moved to
  ubb-vga.h
- tstimg.c (printc): added characters '=' and '+'
- tstimg.c (tstimg): print detailed horizontal and vertical timing
2011-05-01 21:50:20 -03:00
Werner Almesberger
4b59dbf062 ubb-vga: express mode data in more common units and remove hard-coded constants
- ubb-vga.h (struct mode), ubb-vga.c (mode_db): replaced hsync_end with
  its constituends hsync_cycles and hback_cycles
- ubb-vga.h (struct mode), ubb-vga.c (mode_db): added vsync_lines,
  vfront_lines, and vback_lines
- ubb-vga.h (struct mode): changed "line_cycles" from "int" to
  "uint16_t"
- ubb-vga.c (line): don't hard-code horizontal back porch
- ubb-vga.c (line): don't hard-code sum of horizontal back porch and
  hsync
- ubb-vga.c (hdelay): don't hard-code hsync
- ubb-vga.c (frame): don't hard-code vsync and the vertical porches
- ubb-vga.c (frame): don't hard-code hsync and horizontal back porch
2011-05-01 20:59:38 -03:00
Werner Almesberger
eabd0b53f6 ubb-vga: make mode information global
- ubb-vga.c (mode), ubb-vga.h: made global
2011-05-01 15:17:30 -03:00
Werner Almesberger
f7eb220401 ubb-vga: gently prepare the code for sharing mode information
This is tricky: if we just make "mode" global, the whole timing may
fall apart, with the DMA locking up. So let's take small bisectable
steps to get there ...

- ubb-vga.c (struct mode), ubb-vga.h: moved mode entry declaration to
  ubb-vga.h
- ubb-vga.c (mode_db): moved up
2011-05-01 15:17:01 -03:00
Werner Almesberger
6cd21404cd physmem.c: added virtual to physical translation
- physmem.c (calloc_phys_vec): malloc the vector instead of sbrk'ing it
- ubb-vga.h (xlat_virt), physmem.c (xlat_one, xlat_virt): translate a
  vector of virtual addresses to physical addresses
2011-04-29 21:15:27 -03:00
Werner Almesberger
623f3ccbe3 ubb-vga2: non-contiguous allocation of frame buffer memory
- ubb-vga.h (calloc_phys_vec), physmem.c: non-contiguous memory allocator
  (for now, without really considering any mapping to physical memory)
- Makefile (OBJS): added physmem.o
- ubb-vga.h (grabfb), grabfb.c (grabfb): API change for non-contiguous
  frame buffer
- ubb-vga.h (ppmimg), ppmimg.c (convert, ppmimg): API change for
  non-contiguous frame buffer
- ubb-vga.h (tstimg), tstimg.c (pixel, color_bars, grill, grid, sides,
  dot, line45, arc, printc, text, ctext, tstimg): API change for
  non-contiguous frame buffer
- tstimg.c (tstimg): we no longer need to clear the frame buffer
- ubb-vga.c (frame, session, main): use a vector of line buffers instead
  of a contiguous frame buffer
2011-04-29 13:04:02 -03:00
Werner Almesberger
6558f56de6 ubb-vga2: replaced threshold-based color mapping with color cube model
- ubb-vga.h (ccube_init, ccube_map), ccube.c: color mapper based on
  proximity in color cube
- grabfb.c (pattern, grabfb), ppmimg.c (pattern, convert): use the color
  cube mapper instead of inferios threshold-based mapping
- ubb-vga2.c (session): initialize the color cube
- ubb-vga.h (thres), grabfb.c (thres), ubb-vga2.c (usage, main): removed
  the threshold along with the option (-l) to set it
- Makefile (OBJS): added ccube.o
2011-04-28 01:18:03 -03:00
Werner Almesberger
080978ade0 ubb-vga2: added support for showing a PPM image
- Makefile (OBJS): added ppm.o and ppmimg.o
- ppm.h (load_ppm), ppm.c: PPM file loader, adapted from
  eda-tools/schhist/ppmdiff/ppmdiff.c
- ubb-vga.h (img_name, ppmimg), ppmimg.c: PPM image to frame buffer
  converter
- ubb-vga2.c (usage, main): the threshold is now set with the option -l
- ubb-vga2.c (usage, main): if a second argument is given, treat it as
  a PPM file
- ubb-vga2.c (usage): also documented option -t
2011-04-28 00:38:13 -03:00
Werner Almesberger
19f43a77c9 ubb-vga2: added test image generator (option -t)
- tstimg.c: test image generator
- Makefile (OBJS): added tstimg.o
- Makefile (LDFLAGS): tstimg.c needs libm
- ubb-vga2.c (session, main): pass image generator as a function pointer
- ubb-vga2.c (main): new option -t to select the test image generator
2011-04-27 23:31:39 -03:00
Werner Almesberger
8643e457fa ubb-vga2: move image generation out of the main program
- ubb-vga2.c (session, grab): made the frame buffer "void *" and pass
  frame buffer resolution
- ubb-vga.h: color encoding and items shared between compilation units
- ubb-vga2.c (thres, pattern, grab), grabfb.c: move to grabfb.c
- ubb-vga2.c (map): make global, for use by grabfb.c
- ubb-vga2.c (pick, pattern, tricolor, grid): removed obsolete test
  image generators
- Makefile (OBJS, ubb-vga2): added grabfb.o
- Makefile (clean): remove only .o files
- Makefile (spotless): remove only executables
2011-04-27 20:59:29 -03:00