Ejemplo n.º 1
0
static int drv_mps803_open(unsigned int prnr, unsigned int secondary)
{
    /*
     *  sa = 0: graphic mode.. . (default)
     *  sa = 7: business mode
     * This is *probably* incorrect: I suspect it happens anew for every
     * OPEN CHANNEL SA (each PRINT# statement). Or maybe the state is
     * even remembered for each SA separately.
     */
    if (secondary == 0) {
        set_mode(&drv_mps803[prnr], MPS_CRSRUP);
    } else if (secondary == 7) {
        set_mode(&drv_mps803[prnr], MPS_BUSINESS);
    } else if (secondary == DRIVER_FIRST_OPEN) {
        /* Is this the first open? */
        output_parameter_t output_parameter;

        output_parameter.maxcol = MAX_COL;
        output_parameter.maxrow = MAX_ROW;
        output_parameter.dpi_x = 60;    /* mps803 has different horizontal & vertical dpi - see pg 49 of the manual part H. */
        output_parameter.dpi_y = 72;    /* NOTE - mixed dpi might not be liked by some image viewers */
        output_parameter.palette = palette;

        return output_select_open(prnr, &output_parameter);
    }

    return 0;
}
Ejemplo n.º 2
0
static int drv_ascii_open(unsigned int prnr, unsigned int secondary)
{
    output_parameter_t output_parameter;

    /* these are unused for non gfx output */
    output_parameter.maxcol = 480;
    output_parameter.maxrow = 66 * 9;
    output_parameter.dpi_x = 100;
    output_parameter.dpi_y = 100;

    if (secondary == 7) {
        print_char(&drv_ascii[prnr], prnr, 17);
    }

    return output_select_open(prnr, &output_parameter);
}
Ejemplo n.º 3
0
static int drv_mps803_open(unsigned int prnr, unsigned int secondary)
{
    output_parameter_t output_parameter;

    output_parameter.maxcol = MAX_COL;
    output_parameter.maxrow = MAX_ROW;
    output_parameter.dpi_x = 72;
    output_parameter.dpi_x = 72;
    output_parameter.palette = palette;

    if (secondary == 7) {
        set_mode(&drv_mps803[prnr], MPS_CRSRUP);
    }

    return output_select_open(prnr, &output_parameter);
}