1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-17 21:53:46 +02:00
Commit Graph

14 Commits

Author SHA1 Message Date
Werner Almesberger
a63579e119 ubb-vga2.c (line, frame): start line timer outside the "line" function
The indirection introduced with the non-contiguous frame buffer caused
significant horizontal distortions. We can compensate for them by
starting the timer before loading the line pointer and calling "line".
2011-04-29 13:28:22 -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
71c9c7dd78 ubb-vga2: new option -m to select the display mode (resolution, timing)
- ubb-vga2.c (XREs, YRES, res, res_db, setup, line, hdelay, frame,
  session): replaced hard-coded display characteristics with a mode
  database
- ubb-vga2.c (usage, main): new option -m to select the display mode
- ubb-vga2.c (session): allocate frame buffer dynamically
- ubb-vga2.c (session): since we no longer prefetch, we don't need to
  allocate space beyond the end of the frame buffer
- ubb-vga2.c (line): resurrected "quick load" and extended it to fill the
  FIFO completely
2011-04-28 21:30:45 -03:00
Werner Almesberger
957491d209 ubb-vga2: instead of pointers to registers, use pointer plus offset (via macros)
- regs4740.h: macros to access selected Jz4740 registers
- ubb-vga2.c: replaced all pointers to registers with access macros
- ubb-vga2.c (line_cycles): we now seem to be 0.1 us slower
2011-04-28 18:41:00 -03:00
Werner Almesberger
4480b32c50 ubb-vga2.c: corrected and improved loading of the first TX word
- ubb-vga2.c (line): write the first word to the TX FIFO after starting
  the command or it is lost
- ubb-vga2.c (line): fetch the first word while waiting for the back
  porch, making sure we have plenty of time for cache effects
- ubb-vga2.c (line): we no longer need to prefetch the first word of
  the next line
2011-04-28 12:30:22 -03:00
Werner Almesberger
e94b3bbcfc ubb-vga2.c (line, frame): don't pass prefetch pointer but just use *p 2011-04-28 11:57:21 -03:00
Werner Almesberger
6414d92412 ubb-vga2.c: move display resolution to #defines
- ubb-vga2.c (XRES, line_words, session): don't hard-code the X resolution
- ubb-vga2.c (YRES, line_words, frame, session): don't hard-code the Y
  resolution
2011-04-28 02:14:15 -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
Werner Almesberger
625d9877ab ubb-vga2.c: make frame buffer fully VGA-sized; more cleanup
- ubb-vga2.c (frame, grab, session): keep all 480 lines in the frame
  buffer instead of duplicating them on output
- ubb-vga2.c (bad): make "static"
- ubb-vga2.c (session, main): removed the "single" argument
- ubb-vga2.c (main): complain about timeouts only if any occurred
2011-04-27 20:20:59 -03:00
Werner Almesberger
9a455c55fc ubb-vga2.c: code cleanup and some fine-tuning 2011-04-27 18:28:09 -03:00
Werner Almesberger
a759723ed1 ubb-vga: added driver based on the MMC controller (highly experimental)
- ubb-vga2.c: use the MMC controler to stream the pixel data
- Makefile (all, clean): added ubb-vga2
2011-04-27 17:21:30 -03:00