- Timestamp:
- 09/09/2017 02:29:04 PM (7 years ago)
- Branches:
- master
- Children:
- 81d7cdc
- Parents:
- 99cc90a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/lcd.c
r99cc90a r1b30217 36 36 #define REG_COM 1 37 37 38 #define G_NONE 0x00 39 #define G_INIT 0x40 40 #define G_MWRITE 0x42 41 #define G_MREAD 0x43 42 #define G_SETSAD 0x44 43 #define G_CRSWR 0x46 44 #define G_CRSRD 0x47 45 #define G_CRSMRT 0x4C 46 #define G_CRSMLT 0x4D 47 #define G_CRSMUP 0x4E 48 #define G_CRSMDN 0x4F 49 #define G_ERASE 0x52 50 #define G_SLEEP 0x53 51 #define G_DSPOFF 0x58 52 #define G_DSPON 0x59 53 #define G_HSCRL 0x5A 54 #define G_OVRLAY 0x5B 55 #define G_CGRAM 0x5C 56 #define G_CRSFRM 0x5D 38 #define COM_NONE 0x00 39 #define COM_MWRITE 0x42 40 #define COM_MREAD 0x43 41 #define COM_CRSWR 0x46 42 #define COM_CRSMRT 0x4C 43 #define COM_CRSMUP 0x4E 44 #define COM_CRSMDN 0x4F 45 #define COM_DSPOFF 0x58 46 #define COM_DSPON 0x59 57 47 58 48 #define TXT_W 85 … … 294 284 295 285 switch (com) { 296 case G_MREAD:286 case COM_MREAD: 297 287 if (cur >= BASE_TXT && cur < BASE_TXT + TXT_W * TXT_H) { 298 288 return mem_txt[cur - BASE_TXT]; … … 313 303 { 314 304 switch (com) { 315 case G_MWRITE:305 case COM_MWRITE: 316 306 if (cur >= BASE_TXT && cur < BASE_TXT + TXT_W * TXT_H) { 317 307 mem_txt[cur - BASE_TXT] = (uint8_t)val; … … 325 315 break; 326 316 327 case G_CRSWR:317 case COM_CRSWR: 328 318 if (n_arg == 0) { 329 319 cur = val; … … 349 339 { 350 340 switch (val) { 351 case G_CRSWR:352 case G_MREAD:353 case G_MWRITE:341 case COM_CRSWR: 342 case COM_MREAD: 343 case COM_MWRITE: 354 344 com = val; 355 345 break; 356 346 357 case G_CRSMRT:347 case COM_CRSMRT: 358 348 dir = DIR_RIGHT; 359 com = G_NONE;360 break; 361 362 case G_CRSMUP:349 com = COM_NONE; 350 break; 351 352 case COM_CRSMUP: 363 353 dir = DIR_UP; 364 com = G_NONE;365 break; 366 367 case G_CRSMDN:354 com = COM_NONE; 355 break; 356 357 case COM_CRSMDN: 368 358 dir = DIR_DOWN; 369 com = G_NONE;370 break; 371 372 case G_DSPOFF:359 com = COM_NONE; 360 break; 361 362 case COM_DSPOFF: 373 363 SDL_AtomicSet(&ena, 0); 374 com = G_NONE;375 break; 376 377 case G_DSPON:364 com = COM_NONE; 365 break; 366 367 case COM_DSPON: 378 368 SDL_AtomicSet(&ena, 1); 379 com = G_NONE;369 com = COM_NONE; 380 370 break; 381 371 382 372 default: 383 com = G_NONE;373 com = COM_NONE; 384 374 break; 385 375 }
Note:
See TracChangeset
for help on using the changeset viewer.