MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / lcd_dma

Function lcd_dma

core/lcd.c:392–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392static uint32_t lcd_dma(enum sched_item_id id) {
393 uint32_t ticks;
394 if (unlikely(lcd.prefill)) {
395 if (!lcd.pos) {
396 lcd.upcurr = lcd.upbase;
397 }
398 lcd_fill_bytes(64);
399 if ((lcd.prefill = lcd.pos)) {
400 sched_repeat(id, lcd.pos == 128 ? 22 : 19);
401 } else if (lcd.compare == LCD_FRONT_PORCH) {
402 sched_repeat_relative(SCHED_LCD_DMA, SCHED_LCD, (lcd.HSW + lcd.HBP) * lcd.PCD, 0);
403 }
404 return lcd.pos & 64 ? 18 : 19;
405 }
406 ticks = lcd_words(lcd.WTRMRK ? 16 : 8);
407 lcd_fill_bytes(lcd.WTRMRK ? 64 : 32);
408 if (lcd.curRow < lcd.LPP) {
409 sched_repeat(id, ticks);
410 }
411 return lcd.WTRMRK ? 19 : 11;
412}
413
414static void lcd_init_events(void) {
415 sched_init_event(SCHED_LCD, CLOCK_24M, lcd_event);

Callers

nothing calls this directly

Calls 4

lcd_fill_bytesFunction · 0.85
sched_repeatFunction · 0.85
sched_repeat_relativeFunction · 0.85
lcd_wordsFunction · 0.85

Tested by

no test coverage detected