less printf
This commit is contained in:
parent
9b953e44b6
commit
e5e6c74749
4 changed files with 11 additions and 17 deletions
15
src/cpu.c
15
src/cpu.c
|
@ -11,13 +11,14 @@ Cpu cpu;
|
||||||
|
|
||||||
void cpu_interrupt( void )
|
void cpu_interrupt( void )
|
||||||
{
|
{
|
||||||
printf( "cpu_interrupt\n" );
|
/* printf( "cpu_interrupt\n" ); */
|
||||||
if ( cpu.inte ) {
|
if ( !cpu.inte )
|
||||||
cpu.inte = false;
|
return;
|
||||||
cpu.rstk_ptr = ( cpu.rstk_ptr - 1 ) & 7;
|
|
||||||
cpu.rstk[ cpu.rstk_ptr ] = cpu.pc;
|
cpu.inte = false;
|
||||||
cpu.pc = 0x0000F;
|
cpu.rstk_ptr = ( cpu.rstk_ptr - 1 ) & 7;
|
||||||
}
|
cpu.rstk[ cpu.rstk_ptr ] = cpu.pc;
|
||||||
|
cpu.pc = 0x0000F;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void decode( byte* ptr )
|
static void decode( byte* ptr )
|
||||||
|
|
|
@ -98,7 +98,7 @@ static void stop_timer_proc( void ( *proc )( void ) )
|
||||||
|
|
||||||
void emulator_set_state( int state )
|
void emulator_set_state( int state )
|
||||||
{
|
{
|
||||||
printf( "emulator_set_state\n" );
|
/* printf( "emulator_set_state\n" ); */
|
||||||
#ifdef true_TIMER2
|
#ifdef true_TIMER2
|
||||||
if ( state != EMULATOR_STOP ) {
|
if ( state != EMULATOR_STOP ) {
|
||||||
start_timer_proc( timer2_update );
|
start_timer_proc( timer2_update );
|
||||||
|
|
|
@ -286,7 +286,7 @@ bool refreshSDL()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
printf( "%d %d\n", event.key.keysym.sym, event.key.keysym.scancode );
|
/* printf( "%d %d\n", event.key.keysym.sym, event.key.keysym.scancode ); */
|
||||||
|
|
||||||
pcalc_kb_down( event.key.keysym.scancode );
|
pcalc_kb_down( event.key.keysym.scancode );
|
||||||
|
|
||||||
|
@ -593,7 +593,6 @@ void mainloop()
|
||||||
|
|
||||||
// printf("mainloop() currentTime = %d\n", currentTime);
|
// printf("mainloop() currentTime = %d\n", currentTime);
|
||||||
|
|
||||||
#if 1
|
|
||||||
// true_speed_proc
|
// true_speed_proc
|
||||||
if ( currentTime > lastTime_timer2 + delay_timer2 ) {
|
if ( currentTime > lastTime_timer2 + delay_timer2 ) {
|
||||||
// printf("Report(2) %dmsec: %d\n", delay_timer2, currentTime -
|
// printf("Report(2) %dmsec: %d\n", delay_timer2, currentTime -
|
||||||
|
@ -631,7 +630,6 @@ void mainloop()
|
||||||
lastTime_timer5 = currentTime;
|
lastTime_timer5 = currentTime;
|
||||||
display_show();
|
display_show();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( refreshSDL() == false ) {
|
if ( refreshSDL() == false ) {
|
||||||
return;
|
return;
|
||||||
|
@ -649,14 +647,9 @@ int main( int argc, char* argv[] )
|
||||||
|
|
||||||
// start_timers();
|
// start_timers();
|
||||||
|
|
||||||
printf( "NO emscripten_set_main_loop\n" );
|
|
||||||
while ( please_exit == false )
|
while ( please_exit == false )
|
||||||
mainloop();
|
mainloop();
|
||||||
|
|
||||||
/*
|
|
||||||
printf("NO emscripten_set_main_loop\n");
|
|
||||||
while(please_exit == false) mainloop();
|
|
||||||
*/
|
|
||||||
gui_exit();
|
gui_exit();
|
||||||
emulator_exit();
|
emulator_exit();
|
||||||
program_exit();
|
program_exit();
|
||||||
|
|
|
@ -268,7 +268,7 @@ void pcalc_up( int mx, int my, int mb ) { button_mouse_up( calc_buttons, mx, my,
|
||||||
|
|
||||||
void pcalc_kb_down( SDL_Keycode sdl_event )
|
void pcalc_kb_down( SDL_Keycode sdl_event )
|
||||||
{
|
{
|
||||||
printf( "%d\n", SDLK_0 );
|
/* printf( "%d\n", SDLK_0 ); */
|
||||||
KBMapping* mapping = kb_sdl_mapping;
|
KBMapping* mapping = kb_sdl_mapping;
|
||||||
while ( mapping->SDL_event_id ) {
|
while ( mapping->SDL_event_id ) {
|
||||||
if ( sdl_event == mapping->SDL_event_id ) {
|
if ( sdl_event == mapping->SDL_event_id ) {
|
||||||
|
|
Loading…
Reference in a new issue