void cmain() { int old; videocpy(1,0,"PMCLOG shows you logging using the multipage video mode"); old = video_setpage(1); videocpy(1,0,"This is page 2, press a key"); kb_waitkey(); video_setpage(old); videocpy(1,2,"This is back to page 1, press ESCAPE to see Logging"); // inizializzazione... i8259_init(); log_init(); idtSetEntry(0x20+0, timerCallback); timer_start(59504); // each 50 ms sti(); log_message("Hello World"); log_message("Logging is Working..."); // attesa while(1) ; }
static #endif void reinitialize(void) { #if !TESTING assert(pthread_self() == cpu_thread_id); #endif cycles_count_total = 0; vm_initialize(); softswitches = SS_TEXT | SS_IOUDIS | SS_C3ROM | SS_LCWRT | SS_LCSEC; video_setpage( 0 ); video_redraw(); cpu65_init(); timing_initialize(); #ifdef AUDIO_ENABLED MB_Reset(); #endif }
void ki_print(char * buf, int page) { if(page == 2) { log_message(buf); return; } int op = video_setpage(page); char c; // log_message("ki_print"); // check user buffer!!!! while(*buf != 0) { c = *buf++; switch(c) { case '\n': lastRow++, lastCol = 0; break; case '\r': lastCol = 0; break; case 8: // BKSP if(lastCol != 0) lastCol--; else if(lastRow != 0) lastRow --; break; case '\t': lastCol += 8; if(lastCol >= 80) lastCol -= 80; break; default: if(lastCol >= 80) lastRow++,lastCol = 0; if(lastRow >= VIDEOROWS) lastRow = 0; video_char(lastCol,lastRow,c); lastCol++; } } video_setpage(op); }
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetColor(JNIEnv *env, jclass cls, jint color) { LOG("color : %d", color); #if TESTING color_mode = COLOR; #else if (color < COLOR_NONE || color > COLOR_INTERP) { return; } color_mode = color; video_reset(); video_setpage(!!(softswitches & SS_SCREEN)); video_redraw(); #endif }