projects
/
emu8051.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update NEWS and ChangeLog
[emu8051.git]
/
src
/
emugtk.c
diff --git
a/src/emugtk.c
b/src/emugtk.c
index
e1a8e0e
..
45448a2
100644
(file)
--- a/
src/emugtk.c
+++ b/
src/emugtk.c
@@
-23,16
+23,17
@@
#include "config.h"
#include <gtk/gtk.h>
#include "config.h"
#include <gtk/gtk.h>
-#include "emugtk.h"
-#include "reset.xpm"
-#include "run.xpm"
-#include "stop.xpm"
-#include "step.xpm"
#include "common.h"
#include "cpu8051.h"
#include "options.h"
#include "hexfile.h"
#include "common.h"
#include "cpu8051.h"
#include "options.h"
#include "hexfile.h"
+
+#include "emugtk.h"
+#include "reset.xpm"
+#include "run.xpm"
+#include "stop.xpm"
+#include "step.xpm"
#include "filemenu.h"
#include "viewmenu.h"
#include "helpmenu.h"
#include "filemenu.h"
#include "viewmenu.h"
#include "helpmenu.h"
@@
-40,18
+41,10
@@
#include "pgmwin.h"
#include "memwin.h"
#include "pgmwin.h"
#include "memwin.h"
-
static int RunningState;
static int RunFuncTag;
static int RunningState;
static int RunFuncTag;
-
-
static GtkWidget *mainwin;
static GtkWidget *mainwin;
-
-/* In options.c */
-extern char *hex_file;
-
-
/* Signal DestroyEvent */
static void
WindowDestroyEvent( GtkWidget *widget, gpointer data )
/* Signal DestroyEvent */
static void
WindowDestroyEvent( GtkWidget *widget, gpointer data )
@@
-210,6
+203,8
@@
emugtk_window_init( void )
int
main( int argc, char **argv )
{
int
main( int argc, char **argv )
{
+ char *hex_file;
+
ParseCommandLineOptions( argc, argv );
cpu8051_init();
ParseCommandLineOptions( argc, argv );
cpu8051_init();
@@
-220,6
+215,8
@@
main( int argc, char **argv )
emugtk_window_init();
emugtk_window_init();
+ hex_file = get_hex_filename();
+
if( hex_file != NULL ) {
emugtk_new_file( hex_file );
}
if( hex_file != NULL ) {
emugtk_new_file( hex_file );
}
@@
-267,7
+264,7
@@
emugtk_UpdateDisplay( void )
regwin_Show();
pgmwin_Disasm();
regwin_Show();
pgmwin_Disasm();
- memwin_DumpD(
0
);
+ memwin_DumpD(
"0x00"
);
}
}
@@
-291,7
+288,7
@@
emugtk_Reset( void )
cpu8051_Reset( );
regwin_Show();
pgmwin_Disasm();
cpu8051_Reset( );
regwin_Show();
pgmwin_Disasm();
- memwin_DumpD(
0
);
+ memwin_DumpD(
"0x00"
);
}
}
@@
-304,7
+301,7
@@
emugtk_Step( void )
cpu8051_Exec();
regwin_Show();
pgmwin_Disasm();
cpu8051_Exec();
regwin_Show();
pgmwin_Disasm();
- memwin_DumpD(
0
);
+ memwin_DumpD(
"0x00"
);
}
}
@@
-406,14
+403,9
@@
emugtk_StartRunning( void )
#ifdef EMU8051_DEBUG
printf( "emugtk_StartRunning( )\n" );
#endif
#ifdef EMU8051_DEBUG
printf( "emugtk_StartRunning( )\n" );
#endif
- /*RunFuncTag = gtk_idle_add( GtkFunction( RunningFunction ), 0 );*/
RunFuncTag = gtk_idle_add( RunningFunction, 0 );
RunningState = 1;
RunFuncTag = gtk_idle_add( RunningFunction, 0 );
RunningState = 1;
-
- // gtk_widget_hide( GTK_WIDGET( ButtonRun ) );
- // gtk_widget_show_now( GTK_WIDGET( ButtonStop ) );
- // gtk_table_attach_defaults( GTK_TABLE( ButtonTable ), ButtonStop, 3, 4, 0, 1);
}
}
}
}
@@
-430,11
+422,8
@@
emugtk_StopRunning( )
#endif
gtk_idle_remove( RunFuncTag );
RunningState = 0;
#endif
gtk_idle_remove( RunFuncTag );
RunningState = 0;
- //gtk_widget_hide( GTK_WIDGET( ButtonStop ) );
- //gtk_widget_show( GTK_WIDGET( ButtonRun ) );
- // gtk_table_attach_defaults( GTK_TABLE( ButtonTable ), ButtonRun, 3, 4, 0, 1);
regwin_Show();
pgmwin_Disasm();
regwin_Show();
pgmwin_Disasm();
-
memwin_DumpD( 0
);
+
memwin_DumpD("0x00"
);
}
}
}
}