Compare commits

..

72 commits

Author SHA1 Message Date
ladyada
c33ff22666 fix small compile complaint 2024-09-19 16:21:31 -04:00
Phillip Burgess
aad0f12ad3 Add test.only file for file_access example (tinyusb) 2024-09-19 16:21:31 -04:00
Phillip Burgess
fc2a1bc89b Avert some warnings 2024-09-19 16:21:31 -04:00
Phillip Burgess
2d3e33ac9c file_access example: add begin() arg for CPFS 1.1.0 2024-09-19 16:21:30 -04:00
Phillip Burgess
0de9720e78 Adafruit_CPFS compatibility (example included) 2024-09-19 16:21:30 -04:00
Eva Herrada
41844f5fd6 Bumped to 1.0.7 2024-09-19 16:21:30 -04:00
c93f1fc417 Add 800x480p30 mode
this requires less OC than 800x480p60 and is verified to work with
https://www.adafruit.com/product/2232
2024-09-19 16:21:30 -04:00
dherrada
27edec7280 Update CI action versions 2024-09-19 16:21:30 -04:00
Phillip Burgess
3d7a8c8426 Update tvhost example 2024-09-19 16:21:30 -04:00
Phillip Burgess
33355392b3 Add boing example 2024-09-19 16:21:30 -04:00
Phillip Burgess
52ca906be0 Bump version # for new examples 2024-09-19 16:21:30 -04:00
Phillip Burgess
ec5c86ef26 Add 4 more examples in "screensavers" subdir 2024-09-19 16:21:30 -04:00
lady ada
28f931609e new bell 2024-09-19 16:21:27 -04:00
Eva Herrada
8a6a572f49 Bumped to 1.0.2 2024-09-19 16:20:58 -04:00
Eva Herrada
aeac173e08 Bump to 1.0.1 2024-09-19 16:20:58 -04:00
lady ada
8f7d9af4c1 fix code to match comment 2024-09-19 16:20:58 -04:00
Phillip Burgess
511276be50 Remove soft link to libdvi (copy full directory instead)
For Arduino Library Manager compliance
2024-09-19 16:20:58 -04:00
Phillip Burgess
ff3a338155 Update examples for Feather DVI pinout, fix comments 2024-09-19 16:20:58 -04:00
Phillip Burgess
0b7be17886 Mostly Doxygened 2024-09-19 16:20:58 -04:00
Phillip Burgess
7910e26c6d Update .gitignore 2024-09-19 16:20:57 -04:00
Phillip Burgess
f66a28c7c4 Update githubci.yml 2024-09-19 16:20:57 -04:00
Phillip Burgess
d006e19bb9 Update githubci.yml 2024-09-19 16:20:57 -04:00
Phillip Burgess
97bbc9d3f2 Update githubci.yml 2024-09-19 16:20:57 -04:00
Phillip Burgess
7eee74266a Disable clang-format part of CI because most code is from elsewhere 2024-09-19 16:20:57 -04:00
Phillip Burgess
1c4bbae801 Add Github workflows 2024-09-19 16:20:57 -04:00
Phillip Burgess
c5334f2975 Add Adafruit Feather DVI to pin configs 2024-09-19 16:20:55 -04:00
Phillip Burgess
f7ce41e04e Some notes on text mode 2024-09-19 16:19:52 -04:00
Phillip Burgess
d03b6fb4cd Rename DVIterm1 class to DVItext1, because "term" Implies a Lot 2024-09-19 16:19:52 -04:00
Phillip Burgess
2858950c55 Remove separate 8x2 class; double-buffered is a constructor arg 2024-09-19 16:18:07 -04:00
Phillip Burgess
474ecf171f Terminal: vert scroll fix 2024-09-19 16:18:07 -04:00
Phillip Burgess
eb000eabdb Seems to address startup hang issue? 2024-09-19 16:18:07 -04:00
Phillip Burgess
382363a876 Fix comment 2024-09-19 16:18:06 -04:00
Phillip Burgess
40e15367fe clang-format 2024-09-19 16:17:09 -04:00
Phillip Burgess
fe9e8298b5 Move wait_begin into PicoDVI class so subclasses in other source files can access 2024-09-19 16:17:08 -04:00
Phillip Burgess
278ff38b3c Replace font with canonical IBM VGA 8x8 CP437 2024-09-19 16:17:08 -04:00
Phillip Burgess
ea20cddab5 Add skinny pixel modes, ability to print() to DVIterm1 2024-09-19 16:17:08 -04:00
Phillip Burgess
a5c14a480d Simplify resolution spec and switch some constructor args around 2024-09-19 16:17:08 -04:00
Phillip Burgess
98e8b73ec6 Some text progress 2024-09-19 16:17:08 -04:00
Phillip Burgess
10795d8fa3 Minor text work 2024-09-19 16:17:08 -04:00
Phillip Burgess
1f8a21094a Text mode stuff WIP 2024-09-19 16:17:08 -04:00
Phillip Burgess
75896fc27d Add comments in examples 2024-09-19 16:17:08 -04:00
Phillip Burgess
8a77cb318e Mono double-buffered working 2024-09-19 16:17:07 -04:00
Phillip Burgess
a4a97b3244 Simplify virtual_spitft a bit 2024-09-19 16:17:07 -04:00
Phillip Burgess
9c99e4246d virtual_spitft example: some cleanup 2024-09-19 16:17:07 -04:00
Phillip Burgess
6d00c648a0 virtual_spitft: handle rotation, malformed requests 2024-09-19 16:17:07 -04:00
Phillip Burgess
0a16847855 Quick port of the spitft2hdmi code into Arduino 2024-09-19 16:17:07 -04:00
Phillip Burgess
2486500a14 Fix 1-bit examples built w/Pico SDK 2024-09-19 16:17:07 -04:00
Phillip Burgess
837a2f97bd 640x480 and 800x480 monochrome now working
Required diverging libdvi a little further from the original, sorry
2024-09-19 16:17:07 -04:00
Phillip Burgess
248763ddf9 1bpp WIP 2024-09-19 16:17:07 -04:00
Phillip Burgess
b306fc38ca 1bpp WIP 2024-09-19 16:17:06 -04:00
Phillip Burgess
f603f4d8bd 1bpp WIP 2024-09-19 16:17:06 -04:00
Phillip Burgess
2e91831cc9 Add double-buffered 8-bit framebuf (requires GFX 1.11.4) 2024-09-19 16:17:06 -04:00
Phillip Burgess
a7b4dad24d DVIGFX8 cleanup 2024-09-19 16:17:06 -04:00
Phillip Burgess
a8e4ddc095 Simpler dealing with the framebuf size 2024-09-19 16:17:06 -04:00
Phillip Burgess
bd5cfef670 8bpp WIP 2024-09-19 16:17:06 -04:00
Phillip Burgess
18119d4d88 Can remove AVR mentions from example (bc RP2040 only) 2024-09-19 16:17:06 -04:00
Phillip Burgess
b4f9815316 Various Readme & properties updates, add virtual_spitft boilerplate 2024-09-19 16:17:04 -04:00
Phillip Burgess
fd9ad27be0 Decouple PicoDVI class allowing use as base for more framebuffer types 2024-09-19 16:16:36 -04:00
Phillip Burgess
c35a3a3ed9 More Readme notes 2024-09-19 16:16:34 -04:00
Phillip Burgess
85a8bd1df1 README notes 2024-09-19 16:16:08 -04:00
Phillip Burgess
96a866fc2c 400x240 working (needs higher VREG voltage) 2024-09-19 16:15:36 -04:00
Phillip Burgess
c41d52cf08 Update library.properties 2024-09-19 16:15:33 -04:00
Phillip Burgess
c09bab4baa Tweaklets 2024-09-19 16:14:08 -04:00
Phillip Burgess
bf7c3c2b19 proto 2024-09-19 16:14:08 -04:00
Phillip Burgess
e2bc0d6514 Some cleanup, clang-format 2024-09-19 16:14:08 -04:00
Phillip Burgess
f9fe03db61 Simpler org, soft link libdvi folder instead of each file 2024-09-19 16:14:08 -04:00
Phillip Burgess
314d52624e Starting to work as a GFX subclass, still WIP 2024-09-19 16:14:08 -04:00
Phillip Burgess
4a8d322dd9 Starting to work 2024-09-19 16:14:08 -04:00
Phillip Burgess
e77c6fedad More WIP, trying different approach (soft links rather than include .c's) 2024-09-19 16:13:56 -04:00
Phillip Burgess
86a383d4d6 Moar wip 2024-09-19 16:10:57 -04:00
Phillip Burgess
14542a5187 Moar WIP 2024-09-19 16:10:57 -04:00
Phillip Burgess
692510b391 Initial WIP 2024-09-19 16:10:57 -04:00
8 changed files with 23 additions and 81 deletions

View file

@ -1,6 +1,5 @@
PicoDVI - Adafruit Fork for Arduino IDE + Adafruit_GFX compatibility
====================================================================
(Original Readme content follows later)
Special Fork of PicoDVI for RP2040/RP2350 Arduino Philhower Core + Adafruit_GFX
========================================================================
Implements a few framebuffer types to which Adafruit_GFX drawing operations
can be made; not every permutation PicoDVI is capable of, but a useful subset.
@ -39,37 +38,11 @@ All files from the PicoDVI repo are kept even if not used in this build
used via Pico SDK if desired.
Original Readme content:
=======
RP2350 PicoDVI Preview
======================
Changes from the public GitHub version:
* All Arm assembly in `libdvi` has been ported to RISC-V and tuned for Hazard3
* Some of the existing Arm assembly in `libdvi` has been tweaked for better performance on Cortex-M33
* RGB encode now uses the SIO TMDS encoders by default on RP2350 (can be disabled by defining `DVI_USE_SIO_TMDS_ENCODE=0` -- see `software/libdvi/dvi_config_defs.h`)
* Much of the Arm assembly in `libsprite` has been ported to RISC-V -- enough to run the stock demos
Build instructions:
```bash
cd software
mkdir build
# PICO_PLATFORM can also be rp2350-riscv
# List of DVI configs is in software/include/common_dvi_pin_configs.h
cmake -DPICO_SDK_PATH=/path/to/sdk -DPICO_PLATFORM=rp2350 -DPICO_COPY_TO_RAM=1 -DDVI_DEFAULT_SERIAL_CONFIG=pico_sock_cfg ..
make -j$(nproc)
# Then flash a binary, e.g.:
cp apps/tiles_and_sprites/tiles_and_sprites.uf2
```
If you plan to run the `vista` demo, then note that there are now two UF2 data files, `software/assets/vista_data_rp2040.uf2` and `software/assets/vista_data_rp2350.uf2`. The only difference is the family IDs: the first can be dragged on RP2040 and on RP2350 A0, and the second can be dragged on RP2350 A1 and later.
The following is the original RP2040 writeup:
Bitbanged DVI on the RP2040 Microcontroller
===========================================
![](img/mountains.jpg)
*640x480 RGB565 image, 640x480p 60 Hz DVI mode. 264 kB SRAM, 2x Cortex-M0+, system clock 252 MHz*

View file

@ -510,7 +510,7 @@ void show_canvas() {
display.setFont(&FreeSansBold18pt7b); // Use a custom font
display.setTextSize(1); // and reset to 1:1 scale
char *label[] = { "X:", "Y:", "Z:" }; // Labels for each axis
const char *label[] = { "X:", "Y:", "Z:" }; // Labels for each axis
const uint16_t color[] = { 0xF800, 0x07E0, 0x001F }; // Colors for each value
// To get the labels right-aligned, one option would be simple trial and

View file

@ -1,5 +1,5 @@
name=PicoDVI - Adafruit Fork
version=1.3.2
version=1.1.0
author=Luke Wren (Wren6991)
maintainer=Adafruit <info@adafruit.com>
sentence=Arduino library for RP2040 DVI output, based on PicoDVI

View file

@ -24,12 +24,11 @@
// Pick one:
//#define MODE_640x480_60Hz
#define MODE_640x480_60Hz
// #define MODE_720x480_60Hz
// #define MODE_800x600_60Hz
// #define MODE_960x540p_60Hz
#define MODE_1280x720_30Hz
//#define MODE_1280x720_30Hz
#if defined(MODE_640x480_60Hz)
// DVDD 1.2V (1.1V seems ok too)

View file

@ -112,6 +112,14 @@ static const struct dvi_serialiser_cfg adafruit_feather_dvi_cfg = {
.invert_diffpairs = true
};
// Waveshare RP2040-PiZero
static const struct dvi_serialiser_cfg waveshare_rp2040_pizero = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {26, 24, 22},
.pins_clk = 28,
.invert_diffpairs = false
static const struct dvi_serialiser_cfg adafruit_dvibell_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
@ -120,43 +128,4 @@ static const struct dvi_serialiser_cfg adafruit_dvibell_cfg = {
.invert_diffpairs = false,
};
// hstx dvi cowbell
static const struct dvi_serialiser_cfg adafruit_hstxdvibell_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {12, 18, 16},
.pins_clk = 14,
.invert_diffpairs = false,
};
// Adafruit 'Fruit Jam' computer board
static const struct dvi_serialiser_cfg adafruit_fruitjam_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {14, 16, 18},
.pins_clk = 12,
.invert_diffpairs = true,
};
// Waveshare RP2040-PiZero
static const struct dvi_serialiser_cfg waveshare_rp2040_pizero = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {26, 24, 22},
.pins_clk = 28,
.invert_diffpairs = false
};
// Olimex RP2040PC, RP2040-Pico-PC, Neo6502,
static struct dvi_serialiser_cfg olimex_rp2040_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {14, 18, 16},
.pins_clk = 12,
.invert_diffpairs = true
};
#endif

View file

@ -4,6 +4,11 @@
#include "hardware/interp.h"
#include "dvi_config_defs.h"
#if defined(__cplusplus)
extern "C"
{
#endif
// Functions from tmds_encode.c
void tmds_encode_data_channel_16bpp(const uint32_t *pixbuf, uint32_t *symbuf, size_t n_pix, uint channel_msb, uint channel_lsb);
void tmds_encode_data_channel_8bpp(const uint32_t *pixbuf, uint32_t *symbuf, size_t n_pix, uint channel_msb, uint channel_lsb);
@ -51,6 +56,9 @@ void tmds_encode_sio_loop_peekpop_ratio8(const uint32_t *pixbuf, uint32_t *symbu
void tmds_encode_sio_loop_peekpop_ratio16(const uint32_t *pixbuf, uint32_t *symbuf, size_t n_pix);
void tmds_encode_sio_loop_peekpop_ratio32(const uint32_t *pixbuf, uint32_t *symbuf, size_t n_pix);
void tmds_encode_sio_loop_peekpop_ratio64(const uint32_t *pixbuf, uint32_t *symbuf, size_t n_pix);
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -191,11 +191,7 @@ static void __dvi_func(dvi_dma_irq_handler)(struct dvi_inst *inst) {
// Make sure all three channels have definitely loaded their last block
// (should be within a few cycles of one another)
for (int i = 0; i < N_TMDS_LANES; ++i) {
#if PICO_SDK_VERSION_MAJOR == 2
while (dma_debug_hw->ch[inst->dma_cfg[i].chan_data].dbg_tcr != inst->timing->h_active_pixels / DVI_SYMBOLS_PER_WORD)
#else
while (dma_debug_hw->ch[inst->dma_cfg[i].chan_data].tcr != inst->timing->h_active_pixels / DVI_SYMBOLS_PER_WORD)
#endif
tight_loop_contents();
}

View file

@ -8,11 +8,8 @@
// Pull in base headers to make sure board definitions override the
// definitions provided here. Note this file is included in asm and C.
// added ifndef after Philhower 4.6.0 release to fix compilation issue
#ifndef __ASSEMBLER__
#include "hardware/platform_defs.h"
#include "pico/config.h"
#endif
// ----------------------------------------------------------------------------
// General DVI defines