Giter Club home page Giter Club logo

Comments (5)

chregu82 avatar chregu82 commented on August 16, 2024 1

Without having tested anything, I would try the follwing:

  • Add the resolution in gfx.c to the enum DISPLAY_MODE_DEFINITION, e.g. replace element 7 with {800,600,8}.
  • Send esc[=7h to the Pi

from pigfx.

chregu82 avatar chregu82 commented on August 16, 2024

I just gave this a test. It would be easy to include 1024x768 mode. Graphics are quite slow though and the text is quite small.

from pigfx.

willtco avatar willtco commented on August 16, 2024

Thanks, I had found initialize_framebuffer in pigfx.c and altered that to 800x600 which seems to work fine - is that reasonable?

from pigfx.

chregu82 avatar chregu82 commented on August 16, 2024

That's probably fine.

from pigfx.

willtco avatar willtco commented on August 16, 2024

I've added a simple 3 byte command that allows me to select any 1 of 16 resolutions from 320x240 to 1920x1080 - I use the card purely for graphics so all the escape sequences have been replaced with short binary packets. - My screen res routine is below, once tested fully (along with now using a PS/2 kbd) I hope to offer it up for others.

/*Function to allow Z80 to change screen mode by sending 3 bytes only. Added Sept 14 2021.
Command string: 0xff,0xe3,0x40+mode (where mode is 0-f only). */

int state_set_screen_resolution( char ch, scn_state *state ) //function E3
{
static unsigned char mode;
lineparms[parm]=ch & 0x0f; //;low 4 bits contain mode data
mode=lineparms[0];

switch (mode)
{
case 0x01:
	initialize_framebuffer(400,300,8);
	break;
case 0x02:
	initialize_framebuffer(320,240,8);
	break;
case 0x03:
	initialize_framebuffer(640,480,8);
	break;
case 0x04:
	initialize_framebuffer(800,600,8);
	break;
case 0x05:
	initialize_framebuffer(1024,768,8);
	break;
case 0x06:
	initialize_framebuffer(1280,800,8);
	break;
case 0x07:
	initialize_framebuffer(1600,900,8);
	break;
case 0x08:
	initialize_framebuffer(1920,1080,8);
	break;
}

state->cmd_params_size = 0;
state->next = state_fun_normaltext;

return 1;
}

from pigfx.

Related Issues (20)

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.