Code Monkey home page Code Monkey logo

fdivitto / fabgl Goto Github PK

View Code? Open in Web Editor NEW
1.4K 75.0 203.0 91.13 MB

ESP32 Display Controller (VGA, PAL/NTSC Color Composite, SSD1306, ST7789, ILI9341), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal

Home Page: http://www.fabglib.org

License: Other

C++ 97.84% C 1.16% Python 0.88% Makefile 0.01% CMake 0.03% BASIC 0.09%
esp32 graphics-library game-engine vt100 audio-engine graphics-engine gui widget-library vga mouse ps2 keyboard sound fabgl audio emulator composite ntsc pal terminal

fabgl's Introduction

FabGL

ESP32 Display Controller (VGA, Color NTSC/PAL Composite, I2C and SPI displays), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Graphical User Interface (GUI), Game/Emulation Engine and ANSI/VT Terminal

Please look here for full API documentation

See also my youtube channel where you can find demos and tutorials

You can support development by purchasing my own development board and Serial Terminal. You may also support me donating hardware (boards, lab instruments, etc...).

=================================================================================

License terms:

Created by Fabrizio Di Vittorio ([email protected]) - http://www.fabgl.com

Copyright (c) 2019-2022 Fabrizio Di Vittorio.

All rights reserved.

This library and related software is available under GPL v3.

Please contact [email protected] if you need a commercial license.

Please don't remove copyright and/or original author from FabGL examples (ie from screens, dialogs, etc..), even from derived works which use examples as base.

=================================================================================

FabGL is mainly a Graphics Library for ESP32. It implements several display drivers (VGA output, PAL/NTSC Color Composite, I2C and SPI displays). FabGL can also get input from a PS/2 Keyboard and a Mouse. FabGL implements also: an Audio Engine (DAC and Sigma-Delta), a Graphical User Interface (GUI), a Game Engine and an ANSI/VT Terminal.

This library works with ESP32 revision 1 or upper. See Compatible Boards.

VGA output requires a external digital to analog converter (DAC): it can be done by three 270 Ohm resistors to have 8 colors, or by 6 resistors to have 64 colors. Composite output doesn't require external components (maybe a 5Mhz low pass filter).

There are several fixed and variable width fonts embedded.

Unlimited number of sprites are supported. However big sprites and a large amount of them reduces the frame rate and could generate flickering.

When there is enough memory (on low resolutions like 320x200), it is possible to allocate two screen buffers, so to implement double buffering. In this case primitives are always drawn on the back buffer.

Except for double buffering or when explicitly disabled, all drawings are performed on vertical retracing, so no flickering is visible. If the queue of primitives to draw is not processed before the vertical retracing ends, then it is interrupted and continued at next retracing.

There is a graphical user interface (GUI) with overlapping windows and mouse handling and a lot of widgets (buttons, editboxes, checkboxes, comboboxes, listboxes, etc..).

Finally, there is a sound engine, with multiple channels mixed to a mono output. Each channel can generate sine waveforms, square, etc... or custom sampled data.

Installation Tutorial - fabgl development board (click for video):

Everything Is AWESOME

Installation Tutorial - TTGO VGA32 (click for video):

Everything Is AWESOME

IBM PC Emulator (click for video):

Everything Is AWESOME

Space Invaders Example (click for video):

Everything Is AWESOME

Dev board connected to TFT ILI9341 240x320, TFT ST7789 240x240 and OLED SSD1306 128x64 (click for video):

Everything Is AWESOME

Serial Terminal escape sequences for graphics and sound (click for video):

Everything Is AWESOME

Serial Terminal for MBC2 Z80 Board (click for video):

Everything Is AWESOME

Graphical User Interface - GUI (click for video):

Everything Is AWESOME

Sound Engine (click for video):

Everything Is AWESOME

Altair 8800 emulator - CP/M text games (click for video):

Everything Is AWESOME

Commodore VIC20 emulator (click for video):

Everything Is AWESOME

Simple Terminal Out Example (click for video):

Everything Is AWESOME

Network Terminal Example (click for video):

Everything Is AWESOME

Modeline Studio Example (click for video):

Everything Is AWESOME

Loopback Terminal Example (click for video):

Everything Is AWESOME

Double Buffering Example (click for video):

Everything Is AWESOME

Collision Detection Example (click for video):

Everything Is AWESOME

Multitasking CP/M Plus Example (click for video):

Everything Is AWESOME

fabgl's People

Contributors

fdivitto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fabgl's Issues

Keyboard on VIC20 Basic

VIC20 Commodore Basic - Work Around
In case it's needed to use the Shift key + another key for example to write " after it's needed to press again the Shift key alone to deactivate the upper and special characters

I don't know if this is a bug or something related to the VIC20 keyboard management

New modeline qualifier similar to `DoubleScan`, `ScanLine` to output a blank scanline on every second scanline.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
No

Describe the solution you'd like
A clear and concise description of what you want to happen.
I would like a new modeline qualifier similar to DoubleScan, maybe ScanLine, that instead of outputting a second copy of each scanline outputs a blank scanline on every second scanline. The aim is to produce a "retro" looking scanline effect

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Currently I use DoubleScan modelines, but they don't give the "retro" look like I want.

Additional context
Add any other context or screenshots about the feature request here.
Looking through your i2s code I assume this can be done as this appears to be how you render scanlines outside the vertical viewport. I have tried my own modifications but I just don't understand the i2s code well enough to make it work.

New Modeline for 640x240_60HZ DoubleScan

You have done an amazing job with this library. Thank you.

Here is a extra Modline that people might find useful:

/** Modeline for 640x240@60Hz (DoubleScan) resolution */
#define VGA_640x240_60Hz "\"640x240@60Hz\" 25.175 640 656 752 800 240 245 247 262 -HSync -VSync DoubleScan"

It allows you to have 80x24 text with an 8x10 font with an output resolution of 640x480 and not run out of memory.

Request: Multiple cursors in VGA/Display controller

Hi,

It is possible to have 2 mouses. One on port 0 and one on port 1. Did that and it worked. Now trying to get 2 cursors on the screen but that is not supported. I'm trying to make a pong game so actually I don't need it. Would be nice for testing.

Regards,

Bor.

Fabgl PS2Controller.begin and Rebooting

I have a devkit v1 with bitluni's 14 bit VGA wiring.

FabGL VGA out works fine if I map to the most significant bits for each colour.

But PS2Controller just causes my ESP32 to crash and reboot over and over.

14 bit vga uses up a lot of pins, so there's not much left.

I wired the audio output on D25 which is normal for fabgl.

And I hooked up D5 and D26 using the series resistor and the pull-ups per your schematic for the PS2 keyboard.

I modified one of the example scripts and initialised with

PS2Controller.begin(GPIO_NUM_26, GPIO_NUM_5, GPIO_NUM_39, GPIO_NUM_39);

The result is this, over and over:

18:08:17.701 -> assertion "0 && "invalid register base"" failed: file "/Users/steve/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/tools/sdk/include/ulp/esp32/ulp.h", line 299, function: uint32_t SOC_REG_TO_ULP_PERIPH_SEL(uint32_t)
18:08:17.701 -> abort() was called at PC 0x400e1e1b on core 1
18:08:17.701 -> 
18:08:17.701 -> Backtrace: 0x4008e428:0x3ffb1e70 0x4008e655:0x3ffb1e90 0x400e1e1b:0x3ffb1eb0 0x400d8242:0x3ffb1ee0 0x400d8345:0x3ffb1f00 0x400d85c5:0x3ffb1f50 0x400d1292:0x3ffb1f80 0x400dae27:0x3ffb1fb0 0x4008a895:0x3ffb1fd0
18:08:17.735 -> 
18:08:17.735 -> Rebooting...

Can anyone assist me in getting on track?

As I mentioned, the vga-only examples do work.

font generation

I wonder if a guide to generate fonts from TFT can be provided.
Something more like the font generator from GFX

I tried to convert TFT to FON with https://loboris.eu/ttf2fon/ttf_convert.py, but when I use the font coverter just fails:

python3 dewinfont.py -h ariblk20.fon
ariblk20.fon
Face name not contained within font dataTraceback (most recent call last):
  File "dewinfont.py", line 502, in <module>
    savefont_h(fonts[i], fp) if outext == ".h" else savefont(fonts[i], fp)
  File "dewinfont.py", line 78, in savefont_h
    fname = re.sub('[^0-9a-zA-Z]+', '_', f.facename)
AttributeError: 'NoneType' object has no attribute 'facename'

uiApp in combination with wifi

When wifi is enabled the code crashes on a assert

To reproduce this just add WiFi.begin(ssid,password); to the GraphicalUserInterface example

/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/queue.c:719 (xQueueGenericSend)- assert failed!
abort() was called at PC 0x4008b43b on core 1

Backtrace: 0x4008f060:0x3ffb1de0 0x4008f291:0x3ffb1e00 0x4008b43b:0x3ffb1e20 0x400d2eb6:0x3ffb1e60 0x400d3013:0x3ffb1e80 0x400d56bf:0x3ffb1eb0 0x400d2451:0x3ffb1ef0 0x400db119:0x3ffb1fb0 0x4008abb9:0x3ffb1fd0

Decoded

0x4008b43b: xQueueGenericSend at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/queue.c:1996
0x4008f060: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c:707
0x4008f291: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c:707
0x4008b43b: xQueueGenericSend at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/queue.c:1996
0x400d2eb6: fabgl::uiApp::postEvent(fabgl::uiEvent const*) at ??:?
0x400d3013: fabgl::uiApp::showWindow(fabgl::uiWindow*, bool) at ??:?
0x400d56bf: fabgl::uiApp::run() at ??:?
0x400d2451: loop() at ??:?
0x400db119: loopTask(void*) at ??:?
0x4008abb9: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c:355 (discriminator 1)

TTGO schematic?

I bought two of the TTGO builds of this. Very nice. Works well. Trying to figure out the GPIO pins. Most are on the silkscreen. One switch isn't listed. Is there a schematic out there for the TTGO build?

Request: move the Serial/UART related code out of the Terminal class

It would be useful if all the Serial/UART related code currently in class Terminal was moved out to a new derived class e.g. class SerialTerminal : public Terminal

That would mean moving:

HardwareSerial *   m_serialPort;
void connectSerialPort(Stream & serialPort, bool autoXONXOFF = true);
void pollSerialPort();

and the new UART2 related functions
along with the current versions of:

  void send(char c);
  void send(char const * str);

into this new class.

The 2 send() functions would then need to be made protected and virtual in class Terminal so that they can be polymorphic. Alternatively the two localwrite() functions could be renamed as send() and simply overridden if required.

These thoughts may not be perfect, but the end goal is that the AnsiTerminal and the NetworkTerminal examples should deal with the Terminal class the same way, whereas at the moment a serial connected Terminal is a special case of a Terminal instance with the code that handles the serial connection I/O inside the class, but a network connected Terminal manages the network connection I/O itself. A serial connected Terminalshould not need to be special.

Old version information

In library.json and library.properties is still version 0.0.1 listed.
So platformio sees only the old version.

Suggestions?

Sorry if you've heard this a million times already, but...

Is there any way you might consider implementing an xserver and ssh client? Also, I appreciate that this is a VGA library, but other ESP hacks have implemented video out over Composite Video, and analogue broadcast - is it possible to add this? These options would allow your project to bring ultra low cost computing to virtually anyone in the world, on variety of available displays - end users could get free BSD accounts on SDF or the like.

Either way, thanks for considering it!

How to build ?

I am confused by this code base. I can't see any build instructions.
This project has "Arduino" speak so I guess that is the platform. I am using the Espressif SDK, can I build this ?
Thanks.

SD Card not working with FabGL?

Hi,
thank you very much sharing this impressive library.
I try to use the esp32 sd-card in combination with FabGL, but the sd-card does not work.
Does FabGL uses any resources needed by the sd-card subsystem?
If so, would it be possible to solve this issue?
Best regards,
Kaef

Resistors

Hello, i do not find 800 or400 Ohm resistors. Can I use other resistors?

Computing new modelines

First of all: this is a wonderful and amazing project! Kudos to its creator! I want to use FabGL for another retro platform (the TRS-80) and I would need a screen resolution of 512x192. I used this online modeline calculator https://arachnoid.com/modelines/ Needless to say that the results didn't work. I am curious how to properly compute modelines. Any guidance would be greatly appreciated. TIA.

Converting own sound files

This probably has already been asked before somewhere but I can't find any documentation or tools.
What did you use to convert the speech sample to "int8_t[]"?
Did you have any special tool for that?

I really love your project!

Thanks for your time!

Space Invaders freeze

Hi,

Thanks for the great work.
Space Invaders sometimes freezes in the latest version. Probable cause:
The if statement for the touch sides should be true two times to change direction. This is not necessarily the case. The lastHitEnemy could make the sprite causing the touch invisible. So no touch the second time because the move checks the visibility.
Possible solution: A small finite state machine that prepares the next move. I could write it for you if you like.

Regards,

Bor.

Screen rotation

Is it possible to rotate the screen? Flip to left or right?

PS/2 hangs boot on GPIO27

Building a hat for my ESP32 board, and for some reason, feeding the PS/2 controller GPIO 27 makes it not start (I had to swap off of pin12 due to strapping). Is this related to the ULP co-processor, or something I missed elsewhere in the code? I dont have a pin assignment conflict with the VGA, it's been reassigned as well.

Space Invaders Build error

I tried to build space invaders and got a build error.

> C:\Users\HPz420\Documents\GitHub\Other People GitHubs\FabGL VGA on ESP32\FabGL\examples\VGA\SpaceInvaders\SpaceInvaders.ino: In member function 'virtual void IntroScene::init()':
> 
> SpaceInvaders:90:29: error: 'class fabgl::SoundGenerator' has no member named 'playSamples'
> 
>      music_ = soundGenerator.playSamples(themeSoundSamples, sizeof(themeSoundSamples), 100, -1);

Might be due to installing FabGL via the Arduino IDE and it's using the library it loaded from there but not sure how to solve this.

No output with 60Hz 15.7KHz modeline

Possibly a little out of scope but I'm trying to use this library to generate 15Khz test signals for standard definition TVs and arcade monitors and I get no sync or colour output when using the following mode line (Capcom CPS2's resolution):

"384x224@60Hz" 8.040 384 403 440 511 224 236 239 262 -HSync -VSync

However I do get output with the following:

"384x224@50Hz" 8.000 384 404 441 512 224 262 265 312 -HSync -VSync

Trying to debug it hasn't gotten me very far.

Edit:
This is in 8-color mode

New Modeline for 800x300@60Hz (DoubleScan) resolution

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
No

Describe the solution you'd like
A clear and concise description of what you want to happen.
Add a new modeline as follows

/** Modeline for 800x300@60Hz (DoubleScan) resolution */
#define SVGA_800x300_60Hz "\"800x300@60Hz\" 40 800 840 968 1056 300 301 303 314 -HSync -VSync DoubleScan"

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
None

Additional context
Add any other context or screenshots about the feature request here.
It's working for me, although it might need some tweaking as my monitor sometimes crops 1 pixel at the start or end of every line.

External display

Hello, is it possible to connect any kind of display instead of VGA? I want to make a portable version of it

request for a simple draw demo

If it is possible I would like to have a simple demo regarding just drawing a few random dots or lines in the loop.

The point is to clearly understand the way it is supposed to be done this.
As simplest as possible will do.

Example/UI mouse cannot be controlled

image
I tried Mouse to work independently and the screen was full of images. But I can't control the cursor.
Of course, I have already confirmed in another Mouse_demo that the mouse can be used normally. look forward to your reply.
Finally, this is an elegant and interesting project. Thank you

VGA schematic vs Pin Assignment Table issue

Your table shows the pins reversed from the schematic resistor values. In the schematic R0 is connected to GP22 and R1 is connected to GP21. If R1 is the more significant bit it should go to the lower value resistor but it's shown going to the 800 ohm resistor in the schematic.

image

Table is here

VGA
HSync => 23
VSync => 15
R0 => 22
R1 => 21
G0 => 19
G1 => 18
B0 => 5
B1 => 4

No concept of "just a keyboard".

Trying to make an emulator work without resorting to rewriting the scan decoding. This involves the typical old fashioned design where there is a matrix of keys, and you see which are pressed and not, and return an appropriate bit pattern.

As far as I can understand it, you can access the keyboard key state by either catching scancodes on the fly and processing them, or (ii) looking at virtual keys.

The problem with this is there is no easy way of asking the question "is the A key pressed" ? Don't care if it shifted, unshifted , controlled or which other keys are pressed or whatever, just whether the actual key is pressed or not.

This leads to bizarre behaviour where you can test for Ctrl and C for Ctrl+C but not Shift and C for Shift+C ; presumably because one is defined as an extended virtual key and one isn't.

Suggestion for improvement: option to ignore the extended virtual keys that don't relate to actual physical keyboard keys and simply detect whether a physical key is pressed or not.

It looks like there is a table of what is physically pressed or not maintained presumably by tracking scan press/releases.

Speed up Pixel Writes

Hi. I was looking at the PIXEL/PIXELINROW Macros considering the possibility of making them visible for faster access. It dawned on me that all your remapping is doing, I think (?) is simply toggling bit 1 ; hence this could be done simply by ^2 (see below). I haven't tried it exhaustively but it works on what I'm doing (VGA 320x200), and I would doubt the optimiser would work out the equivalence. If it works it would probably be worth a few CPU cycles as it's used quite a lot AFAICS.

(this is from vgacontroller.c obviously)

// pixel 0 = byte 2, pixel 1 = byte 3, pixel 2 = byte 0, pixel 3 = byte 1 :
// pixel : 0  1  2  3  4  5  6  7  8  9 10 11 ...etc...
// byte  : 2  3  0  1  6  7  4  5 10 11  8  9 ...etc...
// dword : 0           1           2          ...etc...

//#define PIXELINROW(row, X) (row[((X) & 0xFFFC) + ((2 + (X)) & 3)])
#define PIXELINROW(row, X) (row[(X) ^ 2])

Understanding how graphics are drawn in the VIC-20 demo

Hi,

I've been looking through the VIC-20 source as I'd like to port some more machines to FabGL, and I'm really struggling to understand how the screen is drawn. I can see that the machine object is hooked into a displayController, but I can't quite bend my head around how the updates are happening. There isn't really any documentation at this level. I was hoping for a framebuffer but I guess there isn't one.

Is there any chance of docs on how to do things at the lower levels like drawing scanlines? It'd make things a heck of a lot easier to understand.

Cheers,
Steve

Using uiApp etc... without a mouse

I would like to use the ui with only a keyboard attached and without a mouse.
I don't even have a few spare pins on my ESP32 that I could pretend are an unconnected mouse.

So when I initialise the PS2Controller I use only:

PS2Controller.begin(PS2Preset::KeyboardPort0);

But then when I try to start a uiApp the ESP32 trace dumps and reboots.

Is this possible?

VGA loses sync after a few seconds..

using latest code from here..
upload NetworkTerminal.ino to esp32.. code loads fine and displays a screen...moments later screen starts to shimmer,then gains horizontal lines and then loses sync... reboot it gives same results...

i also think i just killed my ps/2 keyboard with this latest code....it reported as OK... but wouldnt respond..no LEDs lit...pulled the keyboard apart and the IC is RED HOT... (ive triple checked the pinouts and they are perfect!)..

Space invaders

Hi,
Impressive work on this library!
I noticed a small bug/issue on space invaders that you might consider fixing.
The enemies should bounce (eg. turn direction) only when they one closest to the screen edge actually reaches the edge of the screen. Right now it seems to remember the position of already destroyed enemies and bounce way to early.
Keep up the nice work.
Cheers

VIC20 Basic - How to save program

I have written a basic program in Commodore Basic. It's work
I tried saving it using SAVE "gio",8 but without success
How can I do it?
Could be useful to add a virtual disk in SPIFFS to save the BAS programs

Keyboard/Mouse read from Serial or Wifi instead of PS2

I have connected a VGA monitor, but I don't have a PS2 keyboard (or a port to plug it in to).

I'd like to use another device as the keyboard/mouse, either:

Would anything like this be possible? thanks!

Missing fonts on ESP32

I quickly compiled the 0.8.0 build of invaders last night for an ESP32 dev board. The only code change I make for this is to add a line in the setup code section to identify the right VGA output pins.

The game runs as expected, but on the opening page the text giving the points value for all the game objects doesn't appear.

Request: Mouse only port 1 instead of 0

Hi,

In order to match the colors of the connectors it makes more sense to use port 1 if only the mouse is connected. Just a change in the enum and the GPIO matrix switch for the pin numbers. Again I could make the changes.

Regards,

Bor.

NetworkTerminal wifi wont connect...

im having issues connecting to Wifi SSID with the NetworkTerminal.ino
scan shows the SSID...
type wifi myssid mypass
tries to connect but fails...
it seems the ssid and psw strings are receiving the correct details...but still no connect...

BUT...if i add the WiFi.begin(myssid,mypass); to setup() then it connects every time it reboots...
any thoughts?

Edit: also having issues with the ESP32 rebooting when trying to connect to a ssid... even with a decent power supply (providing upto 3A).. this is the debug

Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Core 1 register dump:
PC      : 0x400819ef  PS      : 0x00060034  A0      : 0x80081cd2  A1      : 0x3ffbe750  
A2      : 0x3ffc15b8  A3      : 0x3ffbe780  A4      : 0x3ffba264  A5      : 0x0000abab  
A6      : 0x3ffc3a5c  A7      : 0x3ffba264  A8      : 0xbad00bad  A9      : 0x3f400038  
A10     : 0x00000001  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x3ffc7cac  
A14     : 0x00060021  A15     : 0x00060023  SAR     : 0x00000020  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000  
Core 1 was running in ISR context:
EPC1    : 0x4008910b  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x400819ef

Backtrace: 0x400819ef:0x3ffbe750 0x40081ccf:0x3ffbe780 0x40083659:0x3ffbe7b0 0x40086e4d:0x3ffbe7d0 0x40089108:0x3ffba190 0x40085267:0x3ffba1b0 0x4008b259:0x3ffba1d0

Rebooting...

and Exception Decoder output...

PC: 0x400819ef: fabgl::DisplayController::execPrimitive(fabgl::Primitive const&) at C:\Users\WacKEDmaN\Documents\Arduino\libraries\FabGL\src\displaycontroller.cpp line 634
EXCVADDR: 0x00000000

Decoding stack results
0x400819ef: fabgl::DisplayController::execPrimitive(fabgl::Primitive const&) at C:\Users\WacKEDmaN\Documents\Arduino\libraries\FabGL\src\displaycontroller.cpp line 634
0x40081ccf: fabgl::VGAController::VSyncInterrupt() at C:\Users\WacKEDmaN\Documents\Arduino\libraries\FabGL\src\dispdrivers\vgacontroller.cpp line 713
0x40083659: __onPinInterrupt at C:\Users\WacKEDmaN\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-gpio.c line 220
0x40089108: spi_flash_op_block_func at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/cache_utils.c line 82
0x40085267: ipc_task at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/ipc.c line 62
0x4008b259: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

flickering

Hello,
it's an awesome librairie
i arrive to collecte data from webpage to display on the vga

but it's flickering
where did i miss something ?
https://pastebin.com/eEhpNwAa

thanks a lot

Regarding 8 colour mode...

The advantage of 8 colour mode is that it leaves 3 GPIOs available for other purposes.
It doesn't save memory, as the same pixel buffer is allocated as you get with 64 colour mode.

Is there a way the library could be modified to pack 2 x 8 colour (3 bit) pixels into a single byte in the (pixel) dma_buffer? Maybe it is possible to place the pixel from 2 consecutive lines in the same byte?

The aim is to try and conserve dma memory as the Esp32 is limited in this resource, and it would enable some higher resolutions like 800x600 without running out of memory?

Can't inherit from TerminalClass successfully

I would like to inherit from TerminalClass to create a specific implementation that extends the base functionality you provide.
e.g.

class Vt100Class : public fabgl::TerminalClass {

};
Vt100Class Vt100;

However when I do this now I get runtime errors that I traced back to following member functions (methods)

  • TerminalClass::reset()
  • TerminalClass::blinkTimerFunc(TimerHandle_t xTimer)
  • TerminalClass::consumeInputQueue()
  • TerminalClass::keyboardReaderTask(void * pvParameters)

Each of these member functions make direct references to the Terminal. object and this conflicts with my Vt100 object and makes the TerminalClass behave in an OO unfriendly way.

Can these member functions be be modified to make TerminalClass OO friendly or do they need to work this way?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.