Changeset 0726522 in buchla-emu
- Timestamp:
- 07/29/2017 10:40:29 PM (7 years ago)
- Branches:
- master
- Children:
- a6da9fb
- Parents:
- 375f7fb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/ser.c
r375f7fb r0726522 22 22 #define ver3(...) _ver(ser_verbose, 2, __VA_ARGS__) 23 23 24 #define BEL_CYC 10000 25 24 26 #define CON_W 80 25 27 #define CON_H 25 26 28 27 29 #define CON_BGR 0x00000000 30 #define CON_BEL 0x00808080 28 31 #define CON_CUR 0x00e87000 29 32 #define CON_FGR ((SDL_Color){ .r = 255, .b = 255, .g = 255, .a = 255 }) … … 59 62 60 63 static int32_t cur_x = 0, cur_y = 0; 64 static int32_t bel = 0; 61 65 62 66 static void out(int32_t un, uint8_t c) … … 69 73 static void update(void) 70 74 { 71 if (SDL_FillRect(sur, NULL, CON_BGR) < 0) {75 if (SDL_FillRect(sur, NULL, bel == 0 ? CON_BGR : CON_BEL) < 0) { 72 76 fail("SDL_FillRect() failed: %s", SDL_GetError()); 73 77 } … … 179 183 break; 180 184 185 case '\a': 186 bel = BEL_CYC; 187 break; 188 181 189 default: 182 190 echo('^'); … … 274 282 { 275 283 ver3("ser exec"); 284 285 if (bel > 0) { 286 --bel; 287 288 if (bel == BEL_CYC - 1 || bel == 0) { 289 update(); 290 } 291 } 292 276 293 return state[0].irq_r || state[0].irq_t || state[1].irq_r || state[1].irq_t; 277 294 }
Note:
See TracChangeset
for help on using the changeset viewer.