Git Product home page Git Product logo

pigfx's Introduction

PiGFX

Raspberry Pi graphics card / ANSI terminal emulator

PiGFX is a bare metal kernel for the Raspberry Pi that implements a basic ANSI terminal emulator with the additional support of some primitive graphics functions. It can be driven by pushing characters to the raspi UART. Additional functions like changing text color, moving the cursor or clear the screen can be invoked via ANSI escape codes. The result is that you can easily add an HDMI display output to your embedded project without the hassle of directly generate the video signal.

This work is inspired by Spencer's project that aims to create a cheap graphics card and keyboard interface to its homebrew Z80 computer. PiGFX has the advantage of removing the fuss of having a full-featured Linux system running on your raspi. This dramatically decreases the boot time, lets the system be more customizable and, of course, adds a lot of fun :)

UPDATE: Thanks to the uspi bare-metal USB driver PiGFX now support an external USB keyboard as input device. Anything typed will be automatically sent to raspi UART Tx0 (pin 8, GPIO 14).

UPDATE: (2018 Nov. by F. Pierot) Added display modes, fonts, tabulation set... See 2018 Nov. modifications.

UPDATE: (2020 by Ch. Lehner) Added new graphic features and configurable baudrate. Fixed some bugs. Ported to Raspberry Pi 2, 3 and 4. Also included the ability to read a config file on the SD card. Also added support for PS/2 keyboards.

By now this is a work in progress with a minimum set of features implemented so expect that more functionalities will be added from time to time.

PiGFX should be working on all Pi models from generation 1 to generation 4. However there is no USB support on the model 4. It's tested on the following models:

  • Pi Zero
  • Pi Zero W
  • Pi B
  • Pi B+
  • Pi 2B
  • Pi 3B
  • Pi 4B

Here is a preliminary TODO list of what I plan to add in the future:

  • ✔ Add support for USB or Ps2 keyboard
  • ✔ Add some graphics primitives like lines
  • ✔ Add some more graphics primitives (circles, rectangles etc.)
  • ✔ Let the resolution being configurable without recompiling
  • ✔ Port to Raspberry Pi Generation 2/3/4
  • ✔ Load configuration from SD card
  • ✔ Support for PS/2 keyboard
  • ✔ Implement some kind of sprite handling with collision detection
  • Implement double buffering
  • Load bitmap fonts directly from the SD card
  • Implement a 8bit interface
  • Support for USB / PS/2 Mouse

How to run

  1. Format an SD-card: you need one 1 GB partition using the FAT or FAT32 system. Other formats won't boot, and a bigger size is useless. Avoid 64GB+ cards as they tend to cause problems to PI. A 32GB or 16GB card is ok as long as you format only 1 or 2 GB with FAT or FAT32.

  2. Copy all bin/*.img to the root of the SD card along with the files start.elf, start4.elf and bootcode.bin that are commonly distributed with the Raspberry Pi.

  3. Copy bin/pigfx.txt to the root of the SD card. Edit the file for your needs. If you have a config.txt on the SD card, delete it.

  4. Insert the card and reboot the Pi.

As soon as your raspi is turned on, the boot screen and other informations should be displayed as a 640x480 @ 60hz video stream from the HDMI interface. After that, PiGFX awaits anything coming from the serial line. Any data received from the UART is immediately displayed in a terminal-like fashion (ie. it automatically scrolls once you reach the bottom of the screen, etc.).

You may need to reset your computer before PiGFX displays anything coming from it.

Test inside QEMU

PiGFX can be emulated with QEMU. Just download/compile/install the rpi Torlus branch and launch

$ make run

in the PiGFX root folder.

UART Physical connection

Pin Function
8 UART Tx0 (GPIO 14). Keyboard output
10 UART Rx0 (GPIO 15). Connect this pin to your device transmit pin.

Note: Please be aware that all Raspberry Pi models accept levels between 0 and 3v3. Be sure to provide an appropriate level shifter to match your output

UART communication expects the baudrate configured in pigfx.txt, 8 bit data, 1 bit stop and no parity.

PS/2 keyboard

Be aware that USB support is disabled, if a PS/2 keyboard is detected during boot. This increases boot time a lot.

Physical connection to the Pi

This is the male connector at the keyboard cable.

Most keyboards seem to work if powered with 3.3V. However if your keyboard does not and needs 5V, make sure you use a bidirectional level shifter between the Raspberry Pi and your keyboard on data and clock. If you bring 5V to the GPIO you will destroy the Pi.

PS/2 Pin Pi Pin Function
1 3 PS/2 Data (GPIO 2)
3 9 Ground
4 1 Power to keyboard
5 5 PS/2 Clock (GPIO 3)

Terminal ANSI Codes

The following escape sequences can be used to further control the terminal behaviour

Code Command
\ESC[?25l Cursor invisible
\ESC[?25h Cursor visible
\ESC[H Move to 0-0
\ESC[s Save the cursor position
\ESC[u Move cursor to previously saved position
\ESC[-Row-;-Col-H Move to -Row-,-Col-
\ESC[0K Clear from cursor to the end of the line
\ESC[1K Clear from the beginning of the current line to the cursor
\ESC[2K Clear the whole line
\ESC[2J Clear the screen and move the cursor to 0-0
\ESC[-n-A Move the cursor up -n- lines
\ESC[-n-B Move the cursor down -n- lines
\ESC[-n-C Move the cursor forward -n- characters
\ESC[-n-D Move the cursor backward -n- characters
\ESC[0m Reset color attributes (white on black)
\ESC[38;5;-n-m Set foreground color to -n- (0-255)
\ESC[48;5;-n-m Set background color to -n- (0-255)

Where \ESC is the binary character 0x1B and -n-, -Row-, -Col- is any sequence of numeric characters like 123.

Additionally, PiGFX implements the following custom codes:

Code Command
\ESC[#-x0-;-y0-;-x1-;-y1-l Draw a line from -x0-;-y0- to -x1-;-y1-
\ESC[#-x0-;-y0-;-x1-;-y1-r Fill a rectangle with top-left corner at -x0-;-y0- and bottom-right at -x1-;-y1-

See terminal_codes for a complete list of supported commands.

Color palette

See Here for a reference of the provided xterm color palette. This is the default palette used by PiGFX.

A RGB pixel can be converted to this palette by the following formula:

Pixel = 16 + (round(R / 255 * 5) * 36) + (round(G / 255 * 5) * 6) + round(B / 255 * 5)

Using a different color palette is possible. It can be switched with a control code, see terminal_codes.

Possible palettes are Xterm, VGA and C64. PiGFX always uses 256 colors, so the unused colors in a palette remain black.

It's also possible to load a custom color palette with a specific control code.

Bitmap handling

A maximum of 128 bitmaps can be loaded to the PiGFX, either as list of binary pixels, list of ASCII decimal encoded pixels or list of ASCII hex encoded pixels. All of these can be RLE compressed. Loaded bitmaps can then be put onto the background. A transparent color can be specified before drawing a bitmap, these pixels won't be drawn in transparent mode. RLE compression expects a list of 2 values: first one is the pixel color, second one is the number of pixels to draw with this color.

See terminal_codes for the specific commands.

There are a few examples in this directory.

Sprite handling

Once a bitmap is loaded, it can be used to draw a maximum of 256 sprites. A sprite is an object which is movable over the background. If a sprite is moved or removed, the previous background gets restored. If the sprite is manipulated by a bitmap or a different sprite, this state remains until it gets moved or removed. The sprite is then redrawn and the previous background restored. Moving a sprites, which is overlaped by another leads to artefacts.

Sprites can be drawn solid or with a transparent color. A drawn sprite keeps its settings (solid/transparent) and even the tranparent color until it gets removed.

Once a sprite is active, you should not manipulate or reload its bitmap source, otherwise the sprite changes to this new bitmap source if it gets moved.

Animations could be realized by redefining the sprite with a different bitmap source.

There's a example for a moving dinosaur (after first loading them in hex or binary).

Graphics performance

Since we have cache enabled now on the Pi, the speed is more or less the same on every model. In most cases it's probably faster to not enable DMA.

Graphics which are drawn on a multiple of 4 pixels x-position draw faster than on a multiple of 2 or 1. You will also get more speed if your image has a width of a multiple of 4. Drawing solid is faster than drawing transparent.

This is a table that shows the time for drawing a 400x300 pixel image on different x-positions. This is an example for getting an idea.

Pi Gen. Aligned 4 px Aligned 2 px unaligned DMA enabled
1 (zero) 4.7ms 9.3ms 10.5ms 3.9ms
2 1.9ms 2.1ms 2.6ms 5.2ms
3 2.2ms 2.7ms 3.8ms 5.2ms
4 0.9ms 1.6ms 3.3ms 4.9ms

Collision detection

At the time a sprite is defined, the borders of the sprite are used for detecting collisions with other sprites, so this is always a rectangle. A collision is reported if 2 sprites touch or overlap. Collisions with lower sprite indexes are detected first.

Collision detection takes place at the time a sprite is defined or moved. This sprite is checked against all other active sprites. All detected collisions are reported.

A collision is reported as a keyboard input with this syntax: \ESC[#-idx1-;-idx2-c where -idx1- is the sprite index you just defined or moved and -idx2- is the sprite it collides with.

Compiling on Mac / Linux

To compile you will need to install a GNU ARM cross compiler toolchain and ensure that arm-none-eabi-gcc, arm-none-eabi-as arm-none-eabi-ld and arm-none-eabi-objcopy are in your PATH.

At this point, just run:

$ ./makeall

in the PiGFX root directory. The project should compile with the 2019 version of the toolchain.

Compiling on Windows

To compile you will need to install a GNU ARM cross compiler toolchain and ensure that arm-none-eabi-gcc, arm-none-eabi-as arm-none-eabi-ld and arm-none-eabi-objcopy are in your PATH.

You'll also need the git executable git.exe in your PATH.

At this point, just run:

> makeall

License

The MIT License (MIT)

Copyright (c) 2016-2020 Filippo Bergamasco.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pigfx's People

Contributors

andresdelcampo avatar bkg2018 avatar chregu82 avatar fbergama avatar fpierot avatar trondd555 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

pigfx's Issues

this does not work

raspberry pi zero 1.3
get nothing but rainbow.. have tried it with every file I can think of, installed on each raspberry pi I have to, I can get noob and any other OS to run.. but this does not work

small? Feature-Request: blinking Block-Form-Cursor

I successful use your PiGFX with Arduino Due running RunCPM - many Thanks.

So I would like to ask if it may be possible to get a flashing Block-Form Cursor?
It make me more easy to "find" the Cursor against the static white block ;)
Thanks again for reading/considering :)

Problem building

I'm trying to build the latest version but get the following error:

cc1: error: '-mfloat-abi=hard': selected processor lacks an FPU

I'm using "arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]" under MacOS.

Any hints?

autorepeat dosen't function as expected.

when you hold down a key, there should be a slightly longer delay followed by a series of repeated key presses. an example would be if you open a dos window in windows or an xterm when you hold down the L key it should wait a few milliseconds and then start rapidly repeating that key press. The same should happen with the backspace key. this functionality works like this on the pi terminal in Linux but not under pigfx. The same is true for another serial terminal emulator i tested (the grant serle video and keyboard interface). I do not have a way of testing with PS2, and am only experiencing this with the USB keyboard. this would be on the PiZero 1.3 If you try to toggle the backspace key echo in the config file it does echo the backspace 1 time, and then it does not anymore(it sends 2 of the currently configured control codes for backspace). If you connect to the host computer with a terminal emulator running on a PC and a TTL to USB adapter it works as expected. This issue happens under CPM ,BASIC and forth interpreters on tests were performed on a Z80MBC2 SBC, and putty configured for 115200, with control-H for backspace, on a windows terminal emulator for the same computer (the Z80MBC2).

Having troubles with Pi Zero W

Hi- First of all, great job! Can't wait to see it working.
I have a Pi Zero W V1.1. It runs Linux just fine, with keyboard and mouse working.

I have a small 4-port hub I'm using to connect the keyboard.

When it boots up I get the messages in the attached photo, ending with "No Keyboard Found".

pigfx-screen

uspi @ 6620411 not found

I tried to make a build but uspi did not building.

2016-09-09_00-35-22

It looks like a mismatch uspi submodule with your project.

(OS X El Capitan, cross-compiler toolchain was installed)

USB Keyboard Support

Not sure if I'm doing something wrong or if I haven't loaded some driver or such...
When I have no keyboard attached to the Pi, it seems to go through all the motions very quickly with a nice startup screen, like this:
IMG_5490
But if I do actually have any USB keyboard (I've tried a few, including wireless ones) it freezes at the "Initialising USB" message and doesn't come back.
I read in the Readme.MD description that the USB support is provided with the USPi library. Is that built in, or is it another file that needs to be included on the SD card, or...? (Although from the message when no keyboard is connected seems to indicate that USPi is there...)

README doesn't list compatible Raspberry Pi models

There's nothing in the README (or any other document I found) to explain which versions of Raspberry Pi are compatible with PiGFX.

There's a mention of "all Raspberry Pi models" in the warning about serial port voltage, which seems to suggest that it runs on all of them. But I found an issue comment where you said it would not work on model 2 or 3, and I saw in an RC2014 document that it doesn't work on the Pi Zero W. Unfortunately I didn't find that issue comment until after I'd struggled for a while trying to get PiGFX to work on a Pi 3.

ROMWBW color sequences don't work

I got a pi graphics card for the rc2014 and figured I could slap it in my z180 system. It works, mostly, but there were some issues.

  1. I think that the image that came with the pi was specifically the rc2014, or at least an older version. The text was absolutely horrific to look at, and the colors didn't exactly work as expected. However, the colors did work in the sense they showed up. The attached pictures are from this stock, older image.
    20201124_150326
    20201124_145818
    20201124_145615

The first one is the included 2048 clone in romwbw. The second is the romwbw boot screen, and the last is the pigfx boot screen.
An interesting note is that the graphic charaters for the 20480 clone seemed to have worked on the border, but not on the numberrs.

In addition, the wireless keyboard I was using didn't work with the older image.
I had experienced this before, sub par usb compatibility and errors on the screen. I fixed it before by putting together a new sd card.

I used the master branch's bin folder and the latest bootcode.bin and start.elf, and I rebooted. I was greeted with a better looking screen:
20201124_172358

So this was an improvement. Booting into cp/m seemed to work well too:
20201124_172412

However, the 2048 game didn't look right. It at least was the right dimensions, but there was no color and in place of the solid blocks there were the codes for weird U thing:
20201124_172531

There is another issue where the enter key seems to have a mind of its own. I hit ENTER and it seems to work, mostly, but I don't know what it's sending. Hitting ENTER in zde doesn't do a new line, it thinks I hit escape or something else, it switches me to the menu.

Any ideas on how to fix this?

PiGFX keyboard TX issues

If I load linux on the PI zero the serial port works fine and I can talk to my RC2014, however if I load PiGFX it receives the data from the RC2014 but seems unable to send anything to it.

I tried the normal trick of shorting the TX and RX lines on the Pi to create a loopback and get the same results, works with Linux and not with PiGFX.

Tried several Pi Zeros (all non W) and all have the same symptoms.

Any ideas?

Compiling Error

I think I have the arm cross compiler toolchain set up correctly, but I always seem to be "that guy" when setting up dev environments...

I got the uspi cloned into the right directory and there's no error from gcc, but I am getting these errors:

/bin/sh: 1: [: 4: unexpected error
Screenshot from 2021-04-26 10-57-28

Potential Feature? Making some of the keyboard more customizable.

Since discovering that certain keyboards behave differently with the interface, how hard would it be to make the keyboard settings available in the .ini file. things like manual key repeat through software (for keyboards that do not support this behavior), de bounce delays, repeat behavior or general key reassignments for odd keyboards (not just the backspace)? Just a thought i was having, it should not be considered in any way a high priority. Might also be good to make it posible to switch all that functionality off if everything is working normal..

Sample Z80 Code?

I can't seem to find any sample Z80 code. Would be very helpful to get new users started.

Don't need anything complex... Just to show how escape codes are sent out to set some colours or the like.

PiZero on newest bin file

I have a Pi Zero v1.3 I used in place of a model B. The model b works fine, no issues PS2 and USB. I put in the pi zero, and it would get locked up in boot. If it would boot (witch was not often) it would have issues with key bounce on the USB. I also tested the pi zero with Linux and it boots to desktop no issues and the keyboard works fine with the OTG adapter. I tried multiple SD cards and even formated with GParted to make certain that the SD card was in a format that the Pi would accept. I set the partition size to really low (like 8MB) and also tried 1GB and 500MB. still no love would commonly crash after displaying the volume name, or just before. again no issues at all on the newer PI.

color pallets? / typo in terminal_codes.txt

Is it remotely possible to create swap-able pallets? Looking at porting old code from mode 13h, and I noticed the 256 color Xterm pallet is close but the order is different due to the way that it is organized; so old code which uses a decimal color value (like the PiGFX interface) will output different colors. This facilitates the need for at the very least a conversion table (256 bytes of information). But even then the colors are off slightly. For example mode 13h (VGA / MCGA) color 1 is a blue hue RBG 0,0,170. The closest equivalent in XTerm is 19, which is 0,0,175. I guess what I'm asking is could a set of control codes be implemented to replace a color something along the lines of esc[68;5;{color to replace};{red value};{green value};{blue value}m. This would be reset to defaults by esc [m.

Alternatively a few select-able default pallets would be nice, like 13h (VGA/MCGA), CGA, EGA and TANDY perhaps? I can help with researching what the default values are, i have collected some links with good information as to what the RBG values are for each.

also I was looking over /doc/terminal_codes.txt there is a typo the clear sprite code which reads esc[#;x, but should read

esc[#x.

Its probably a big ask, I was just wondering

USB keyboard feature not working.

Downloading the latest PIGFX (as at Aug26th 2021) and USPI 2 - when compiled the pi is not responding to the keyboard inputs. 2 different pi(zero's) and 3 USB keyboards have been tried in various combinations with no effect.
CIMG5322

Character Glitches?

Unable to replicate the screen that is shown on the main page, certain characters don't show or weirdly reset the display.

The image in question...
mainImage

Looking at the image there appear to be some characters that I can't get to display correctly.
cbios_8x8_8x32highlightedreordered

20180708_124744_0
The red squares are the characters that are acting wrong.
They appear to be special characters.

0 = NULL (Appears to just be a empty space, but still messes up the screen none the less)
8 = Backspace
9 = Horizontal Tab
10 = Line Feed
12 = Form Feed/ New Page
13 = Carriage Return
27 = Escape Fixed By Sending Twice (Marked in Yellow)
127 = Delete

Sending an escape character before them doesn't seem to fix them.
Any clue how to fix this?

"Fixed" by editing gfx.c to stop it from eating the inputs and recompiling, unfortunately this means breaking other things...

20180721_121157_0

Ended up modifying the font itself, it works but is not satisfactory...

20180722_104344_0
Leaves some empty spaces and is not standard but works.

Parallel (8bit) Interface for Z80, etc?

Just found out about this project. Nice work.
I believe it currently uses a serial interface to talk to the mcu... But could it be adapted to work using a 8bit parallel interface?

Inconsistent assembly code suffixes

I've been trying to build PiGFX on MacOS and it kept failing on asm.S. After a bunch of head scratching I figured out the make target is specified as $(SRC_DIR)/%.s and the gnu tools on MacOS are case dependent. So it had no target for .S hence the make failure. When I changed .s to .S, asm.S compiled correctly, but then I realized there are other assembly files with lowercase .s! Either the makefile needs to reference upper and lowercase suffixes or the source files need to be consistent with either .s or .S and a matching target in the Makefile. I would think this would be an issue on Linux as well, but probably not on the PC which you are apparently using most of the time.

Feature request: Screen saver/blanker

I left the Pi running connected to my Espruino when I had to leave my desk... and then forgot about it and had lunch. About an hour later I discovered my mistake.

Would it be possible to add some kind of screen saver functionality, with the time set in the config file? It doesn't have to go all the way to putting the screen to sleep, just fading the image out would be enough to be helpful.

mode4h / 320 x 200 -- apears off screen

was testing the CGA 4 color resolution with a custom pallet I don't know if this is a limit of the PI, the monitor or the software ; but when I do 320 x 200 some of the pixels draw off the screen; this issue is not present in 640x480 or 320x240. this issue happens even with the Xterm pallet. this is with composite output.

unable to correctly set baudrate.

I have followed the instructions to the letter, yet when booting the pi it indicates that the uart is expecting data at 115200 rather than the 9600buad set in pigfx.txt. I am using a pi-zero. It appears that pigfx is being ignored, I compiled the build as later I wish to modify the gfx.c file (but at the time of writing no changes have been made).

Sending CR/LF when CR is pressed

I just built the Pi Zero Serial Terminal Module for my RC2014 and noticed that every time I press the "Enter" key to submit a command to CP/M, it is sending a CR followed by a LF.
This causes things like a directory listing to terminate after the first entry, among other artifacts.
Is there a way to configure this at boot time via the config.txt file?
I have put the most recent kernel.img from here onto the SD card I received as part of the RC2014 kit with no change.
I am using a Raspberry Pi Zero v1.3 and the RC2014 SIO2 card with the Pro backplane. No custom work has been done and the entire kit is as-is from Spencer at RC2014.
I can work-around this issue by typing "CTRL-M" rather than "ENTER"

I also have noticed a strange keyboard mapping when using a standard (EN_US) USB keyboard where the double-quote character (") is mapped to SHIFT-2 (@) and vise versa. I can work-around this issue as well, but it is a strange keystroke compared to what I assumed is a standard keyboard layout.

If I understood more about how to compile/make from source I could investigate further, but I am not that well versed in this type of software development. I apologize if this is not the appropriate place to report this issue. Thank you in advance for your kind attention to this matter.

Serial port data not working

Hi
I am having an issue with a PI zero 1.3. If I connect the TX and RX the display echoes the keystrokes.
If I use any external device (ie FTDI or other serial device) the serial data is bad.
I connected a logic analyser to the Pi TX and to a FTDI and compared the outputs. Please see attached screen shots. I am using your prebuild version. Both system were outputting an M

ftdi

pi

Regards
John

missing control code for insert line

a lot of full screen editors in CPM use the "insert line current line moves down" ANSI control code. I was playing around with settings in turbo pascal and I noticed this was missing. It will cause an issue that causes the full screen editor to not scroll correctly. It's not a Huge deal because most editors give a redraw screen key sequence (it is usually ctrl-kk) and will display the current line for positioning in the lowest portion of the screen, when scrolling so you can move to the line you want and redraw the screen by pressing the key sequence. The most commonly used escape sequence is ( esc [ 1 L ) where the numeral is how many lines to insert, as documented https://www.inwap.com/pdp10/ansicode.txt. It is again by no means 100% important, but something to think about because some of the older terminal based games use it as well, though not nearly as much as esc [2J witch i've found clears the sprites currently, it may be a good idea to have a separate escape code for that (clearing the sprites), but its just something you have to be aware of and when doing on screen graphics. you need to pay attention to so you don't accidentally wipe all of your sprites. I know its a big ask you have done so much already. It was just something that I noticed.

[Feature request?] Change baudrate interactively

Hi

I love this project - it's given purpose to a couple of original Model Bs and some very small SD cards (never thought a 128MB SD card would be useful again!).

A question though: would it be possible to have a way to change the baudrate at boot time (or any time, frankly) with a key combination, or maybe pulling a GPIO pin to ground, with the value in the config file the default? I have a lot of devices that require 9600, a few less that require 115200, a couple at 19200 and one at 38400. Being able to change the rate as required without having to edit the config on a PC would have an enormous benefit - right now I've got two SD cards to swap with the only difference being the baudrate value, which works but is another thing to lose or damage.

Steve

Vt100+ support

I don't really know how to help, but Vt100+ support would be awesome. got primitive graphix to work (awesome) but when I go to run games like ladder it does not work, unless someone has the correct information to place in the config for ESC?

Cannot print ESC literal. Missing up-left box character.

I can print the up-right character with ^Z, and the X character with ^\ yet ^[ waits indefinitely for an escape sequence. Can a time-out or additional sequence be implemented to allow the up-left box character to be printed?
characters
cbios_main_msx1_256w

replaceLFwithCR + sendCRLF don't do anything

My issue right now with pigfx is the fact that for whatever reason, pressing Enter on the plugged-in keyboard sends a cryptic sequence:

(unknown)
LF

So, I thought, maybe its just some strange issue that can be forced as fixed if I change one of the options in the txt file.
However, neither options have any effect on the Enter key.

1024x768?

Hi, thank you for pigfx, it works well, but it doesn't look very good when scaled.. Is implementing 1024x768 difficult because it's bare metal? What is the main obstacle?

Installation issue, no HDMI output

Need some help to install PIGFX on a RPi Zero 1.3 because I did not succeed and there is not any video output. These are my steps so far:

– using a 16GB fast Sandisk SD card I made only 1 partion (of 1 gb)
– FAT32 formatted
– copied bootcode.bin, kernel.img and start.elf in root of the SD card
– created a config.txt file containing one line: init_uart_clock=3000000
– copied config.txt to the root of the SD card

The Zero is powered with 5.1 volt / 2500 mA and after (re-)booting the Zero LED goes on for only a short time and that is it. Not any video output, with or without USB keyboard connected.

The bootcode.bin and start.elf files were extracted from another (working) Pi-Zero SD card installation. The kernel.img file was downloaded from https://github.com/fbergama/pigfx

Someone knows if I am missing something?

# inline following a <esc> when its not required (typo) will cause a crash where previously it was ignored.

Don't know if this is a Huge issue but I had a bug in one of my test programs where i misrepresented the change background color code as '#48;5;' instead of '48;5' .... it was a typo. The terminal was not expecting this input and it caused a full crash and the ACT light would lock up on the pi. I don't know if this is a issue with the string parser that handles the escape codes? It was fully working in the previous version not causing any issue (simply ignoring and changing the background color anyway). but since the adding of the new sprite commands this is now causing a issue; but only with this typo that I can tell. it doesn't seem to cause an issue anywhere in the string, you can place a # mid string and as long as it does not follow an esc character you are good the terminal ignores it. IDK why i have this kind of luck... fortunately this time i found my mistake before issuing a ticket. I was using a Pi Zero (non w) for this test.

Pi/KBD freezes after several hours.

I have noticed that if I leave my system running it freezes or locks up after several hours, no more keyboard characters are passed to the screen and even trying the caps lock fails to light the LED. I checked by connecting TX to RX by direct link at the PI, using the latest download and had the same results. Leaving it running overnight always results in this.

How to load custom fonts?

I'm making a cp 437 font for the pigfx, but I am unsure of how to load it from the sd card. The terminal codes don't seem to have a command to do so, but they do have a way to load 1 of the 3 trs font sizes.

Pi 3 Model B

on 1.7.0 the terminal will not load past showing the baud rate. on the Pi 3 Model B

sprites

what is the preferred method of loading sprites to the terminal? I am trying some of the sample files and it is not working correctly. I tried just dumping them to the screen buffer using the type [NOPAGE] command from CPM. which works well for the animate dinos.bin, but when you try to load the load dinos file several of the characters flood to the screen instead of being read as pixels. Is there a way you could explain how to load a simple bit map from basic, C or Pascal, or explain a better way to get the sprites to load? I will try to make a video to show whats happening.

Issues with ANSI terminal emulation

I've come across a few ANSI emulation issues using some CP/M software that works fine via minicom, which I brought up in the RC2014-Z80 group: https://groups.google.com/forum/#!topic/rc2014-z80/yfAVEdHOpB8

I've prepared what I think are fixes for the cursor positioning issues I was seeing, and I'm looking into an issue with an extra blank line when a line contains exactly 80 printable characters followed by a CR and LF. I am happy to propose a PR if you would like to consider my modifications.

Compile fail.

I downloaded the zip file 2.7mb then used ./makeall which immediately fails as the uspi directory is empty, comparing to my original download (2019 8.1 mb) which had significant subdirectories in uspi. The original software would hang if left for several hours hence my wish to upgrade, is there a full package available to download? - Using UBUNTU on deskop to compile.

Pi Zero version 1.3

pigfx does not seems to start on the new pi zero v1.3
only some random junk on the screen .
ken

using h code

so I am trying to figure out how to use the codes.. maybe I am in the wrong mode.. but I put in

print chr$(27)+"[?#x0;y0;x1;y1l"

and I get
x0;y0;x1;y1l as an output

Feature (Reverse esc [7m) / Possible issue USB?

I know because we have color, a lot of the character modes are kind of out of scope for the project. Would it be hard to add ( esc [7m ) for reverse colors (at least with text), just simply a code to flip the foreground and back ground colors? This would help with some programs that use it (or something like it). The trouble is a lot of set up programs for binary modification under CP/M have a 6 character limit, so you can not use color control codes to simulate this as the minimum characters needed to do a color change is 9-11 characters depending on how many characters your color code is.

Another issue. USB keyboards tend to lock up when left idle or if you hold down a button in auto repeat for a long period of time (like over 50 seconds). the heartbeat light stays on but the terminal is otherwise unresponsive. this is with the pi-zero 1.3 (not w). PS/2 doesn't seam to have the same issue (this is with PS/2 hooked up direct being powered with 3v (no level shift needed) --- at first i thought the issue persisted after switching to PS/2 until i shut off usb in the config file; but I really didn't do much testing beyond switching to PS/2 and shutting off USB.

Suggestion(?): File transfers to/from SD card?

NOTE: I have only rudimentary coding knowledge, and have next to zero knowledge of how the Pi works. So if this Suggestion is dumb - I apologise in advance.

So I'm having a discussion with some people on the RC2014 Facebook group and someone brought up that the reason they don't use PiGFX is because it doesn't have any file transfer functionality. (I'm taking that as being truthful. Please correct me if it can indeed do them.) Which I agreed with him and got me thinking:

The Pi Zero has a SD card. The PiGFX part of that software takes up less than 1gig of space leaving heaps left over. Why can't we make use of it? Could we make some extended escape codes that

  1. List the files that are on the SD card and assign a numeric tag to each.
  2. Initiate a file download using the numeric tags from above (of course, your Monitor program would then have to be able to accept and do something with those files.)
  3. With a third new escape code, it saves to a file that you can name. (And again, the Monitor would need to be engaged with the file transfer.)

Thoughts? Put it on the wishlist or is this an unworkable idea?

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.