Changeset 3ac8e1b in buchla-68k for ram/ptdkey.c


Ignore:
Timestamp:
11/11/2017 09:48:40 PM (6 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8cc57e6
Parents:
494d8ff
Message:

Fixed ptdkey.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/ptdkey.c

    r494d8ff r3ac8e1b  
    267267
    268268                if (spec EQ PA_OSC)
    269                         ptedata = ptedat1 + 4;
     269                        ptedata = (int16_t)ptedat1 + 4;
    270270                else
    271271                        ptedata = dtabl9[ptedat1];
     
    394394
    395395                                                sprintf(buf2, "%02d", 1 + chan);
    396                                                 buf[0] = key + '0';
     396                                                buf[0] = (int8_t)(key + '0');
    397397                                                UpdVid(7, n ? 25 : 12, buf2, PTDATR);
    398398                                        }
     
    401401
    402402                                        if (n)
    403                                                 ptestm = (ptestm & 0xE7FF) | (port << 11);
     403                                                ptestm = (ptestm & 0xE7FF) | ((uint16_t)port << 11);
    404404                                        else
    405                                                 ptedef = (ptestm & 0xE7FF) | (port << 11);
     405                                                ptedef = (ptestm & 0xE7FF) | ((uint16_t)port << 11);
    406406
    407407                                } else {
    408408
    409                                         buf[0] = key + '0';
     409                                        buf[0] = (int8_t)(key + '0');
    410410                                }
    411411
     
    436436                        if (inrange(stccol, dsdecol[1][n][0], dsdecol[1][n][1])) {
    437437
    438                                 ptdebuf[stccol] = key + '0';
    439                                 buf[0] = key + '0';
     438                                ptdebuf[stccol] = (int8_t)(key + '0');
     439                                buf[0] = (int8_t)(key + '0');
    440440                                buf[1] = '\0';
    441441
     
    462462                                        return;
    463463
    464                                 ptdebuf[stccol] = key + '0';
    465                                 buf[0] = key + '0';
     464                                ptdebuf[stccol] = (int8_t)(key + '0');
     465                                buf[0] = (int8_t)(key + '0');
    466466                                buf[1] = '\0';
    467467
     
    526526                                                        buf[0] = 'L';
    527527                                                else
    528                                                         buf[0] = key + '0';
     528                                                        buf[0] = (int8_t)(key + '0');
    529529
    530530                                        } else {
    531531
    532                                                 buf[0] = key + '0';
     532                                                buf[0] = (int8_t)(key + '0');
    533533                                        }
    534534
     
    553553                                if (inrange(stccol, 36, 37)) {
    554554
    555                                         ptdebuf[stccol] = key + '0';
    556                                         buf[0] = key + '0';
     555                                        ptdebuf[stccol] = (int8_t)(key + '0');
     556                                        buf[0] = (int8_t)(key + '0');
    557557                                        buf[1] = '\0';
    558558
     
    574574                                                return;
    575575
    576                                         ptdebuf[stccol] = key + '0';
    577                                         buf[0] = key + '0';
     576                                        ptdebuf[stccol] = (int8_t)(key + '0');
     577                                        buf[0] = (int8_t)(key + '0');
    578578                                        buf[1] = '\0';
    579579
     
    591591                                                return;
    592592
    593                                         ptdebuf[stccol] = key + 'A';
    594                                         buf[0] = key + 'A';
     593                                        ptdebuf[stccol] = (int8_t)(key + 'A');
     594                                        buf[0] = (int8_t)(key + 'A');
    595595                                        buf[1] = '\0';
    596596
     
    605605                                if (inrange(stccol, 32, 33)) {
    606606
    607                                         ptdebuf[stccol] = key + '0';
    608                                         buf[0] = key + '0';
     607                                        ptdebuf[stccol] = (int8_t)(key + '0');
     608                                        buf[0] = (int8_t)(key + '0');
    609609                                        buf[1] = '\0';
    610610
     
    631631                                                return;
    632632
    633                                         ptdebuf[stccol] = key + '0';
    634                                         buf[0] = key + '0';
     633                                        ptdebuf[stccol] = (int8_t)(key + '0');
     634                                        buf[0] = (int8_t)(key + '0');
    635635                                        buf[1] = '\0';
    636636
     
    648648                                                return;
    649649
    650                                         ptdebuf[stccol] = key + '0';
    651                                         buf[0] = key + '0';
     650                                        ptdebuf[stccol] = (int8_t)(key + '0');
     651                                        buf[0] = (int8_t)(key + '0');
    652652                                        buf[1] = '\0';
    653653
     
    664664                                if (inrange(stccol, 39, 40)) {
    665665
    666                                         vg = (ptesuba >> 8) & 0x00FF;
     666                                        vg = (int16_t)(ptesuba >> 8) & 0x00FF;
    667667
    668668                                        if (stccol EQ 39) {
     
    682682
    683683                                                        ptesuba = (ptesuba & 0x00FF) |
    684                                                                   (vg << 8);
     684                                                                  ((uint16_t)vg << 8);
    685685
    686686                                                } else {
     
    707707
    708708                                                ptesuba = (ptesuba & 0x00FF) |
    709                                                           (vg << 8);
     709                                                          ((uint16_t)vg << 8);
    710710                                        }
    711711
    712                                         ptdebuf[stccol] = val;
    713                                         buf[0] = val;
     712                                        ptdebuf[stccol] = (int8_t)val;
     713                                        buf[0] = (int8_t)val;
    714714                                        buf[1] = '\0';
    715715
     
    752752
    753753                                if ((key EQ 0) OR (key EQ 1))
    754                                         buf[0] = key + '0';
     754                                        buf[0] = (int8_t)(key + '0');
    755755                                else
    756756                                        return;
     
    761761                        case 46:        /* 0..9 */
    762762
    763                                 buf[0] = key + '0';
     763                                buf[0] = (int8_t)(key + '0');
    764764                                break;
    765765
     
    790790                                return;
    791791
    792                         buf[0] = key + '0';
     792                        buf[0] = (int8_t)(key + '0');
    793793                        buf[1] = '\0';
    794794                        ptdebuf[stccol] = buf[0];
     
    859859                        case 46:
    860860
    861                                 buf[0] = key + '0';
     861                                buf[0] = (int8_t)(key + '0');
    862862                                break;
    863863
     
    898898                                        return;
    899899                                else
    900                                         buf[0] = key + '0';
     900                                        buf[0] = (int8_t)(key + '0');
    901901
    902902                        } else {
    903903
    904                                 buf[0] = key + '0';
     904                                buf[0] = (int8_t)(key + '0');
    905905                        }
    906906
     
    924924                        case 44:
    925925
    926                                 buf[0] = key +'0';
     926                                buf[0] = (int8_t)(key +'0');
    927927                                break;
    928928
     
    963963                        case 45:
    964964
    965                                 buf[0] = key + '0';
     965                                buf[0] = (int8_t)(key + '0');
    966966                                break;
    967967
     
    996996                                        return;
    997997
    998                                 buf[0] = key + 'A';
     998                                buf[0] = (int8_t)(key + 'A');
    999999                                break;
    10001000
     
    10161016                        case 46:
    10171017
    1018                                 buf[0] = key + '0';
     1018                                buf[0] = (int8_t)(key + '0');
    10191019                                break;
    10201020                        }
     
    11321132                        case 44:
    11331133
    1134                                 buf[0] = key + '0';
     1134                                buf[0] = (int8_t)(key + '0');
    11351135                                break;
    11361136
     
    11571157                                return;
    11581158
    1159                         buf[0] = key + '0';
     1159                        buf[0] = (int8_t)(key + '0');
    11601160                        ptdebuf[stccol] = buf[0];
    11611161                        buf[1] = '\0';
     
    11781178                                return;
    11791179
    1180                         buf[0] = key + '0';
     1180                        buf[0] = (int8_t)(key + '0');
    11811181                        buf[1] = '\0';
    11821182                        ptdebuf[stccol] = buf[0];
     
    12001200                                return;
    12011201
    1202                         buf[0] = key + '0';
     1202                        buf[0] = (int8_t)(key + '0');
    12031203                        buf[1] = '\0';
    12041204                        ptdebuf[stccol] = buf[0];
     
    12211221                                return;
    12221222
    1223                         buf[0] = key + '0';
     1223                        buf[0] = (int8_t)(key + '0');
    12241224                        buf[1] = '\0';
    12251225                        ptdebuf[stccol] = buf[0];
     
    12421242                                return;
    12431243
    1244                         buf[0] = key + '0';
     1244                        buf[0] = (int8_t)(key + '0');
    12451245                        buf[1] = '\0';
    12461246                        ptdebuf[stccol] = buf[0];
     
    12601260                                return;
    12611261
    1262                         buf[0] = key + '0';
     1262                        buf[0] = (int8_t)(key + '0');
    12631263                        buf[1] = '\0';
    12641264                        ptdebuf[stccol] = buf[0];
Note: See TracChangeset for help on using the changeset viewer.